Changes in commands.c [8a5b5a1:d544237]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r8a5b5a1 rd544237 92 92 "Use 'show keymaps' to see the existing keymaps.\n" 93 93 "Key sequences may be things like M-C-t or NPAGE.\n\n" 94 "Ex.: bindkey recv C-b command zwrite -c barnowl" 95 "SEE ALSO: bindkey"), 94 "Ex.: bindkey recv C-b command zwrite -c barnowl\n" 95 "Ex.: bindkey recv m command start-command zwrite -c my-class -i \n\n" 96 "SEE ALSO: unbindkey, start-command"), 96 97 97 98 OWLCMD_ARGS("unbindkey", owl_command_unbindkey, OWL_CTX_ANY, … … 100 101 "Removes a binding of a key sequence within a keymap.\n" 101 102 "Use 'show keymaps' to see the existing keymaps.\n" 102 "Ex.: unbindkey recv H "103 "Ex.: unbindkey recv H\n\n" 103 104 "SEE ALSO: bindkey"), 104 105 105 106 OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE, 106 107 "send a zephyr", 107 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [<user> ...] [-m <message...>]",108 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [<user> ...] [-m <message...>]", 108 109 "Zwrite send a zephyr to the one or more users specified.\n\n" 109 110 "The following options are available:\n\n" … … 137 138 OWLCMD_ARGS("zcrypt", owl_command_zcrypt, OWL_CTX_INTERACTIVE, 138 139 "send an encrypted zephyr", 139 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [-m <message...>]\n",140 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\n", 140 141 "Behaves like zwrite but uses encryption. Not for use with\n" 141 142 "personal messages\n"), … … 147 148 "allow editing.\n\n" 148 149 "If 'sender' is specified, reply to the sender.\n\n" 149 "If 'all' or no args are specified, reply public ally to the\n"150 "If 'all' or no args are specified, reply publicly to the\n" 150 151 "same class/instance for non-personal messages and to the\n" 151 152 "sender for personal messages.\n\n" … … 265 266 "zpunt <class> <instance> [recipient]\n" 266 267 "zpunt <instance>", 267 "The zpunt command will sup ress messageto the specified\n"268 "The zpunt command will suppress messages to the specified\n" 268 269 "zephyr triplet. In the second usage messages are suppressed\n" 269 270 "for class MESSAGE and the named instance.\n\n" … … 282 283 "punt <filter-text>", 283 284 "punt <filter-text (multiple words)>\n" 284 "The punt command will sup ress messageto the specified\n"285 "The punt command will suppress messages to the specified\n" 285 286 "filter\n\n" 286 287 "SEE ALSO: unpunt, zpunt, show zpunts\n"), … … 585 586 "name style after the -s argument.\n" 586 587 "\n" 587 "The other usages listed above are abbre ivated forms that simply set\n"588 "The other usages listed above are abbreviated forms that simply set\n" 588 589 "the filter of the current view. The -d option allows you to write a\n" 589 590 "filter expression that will be dynamically created by owl and then\n" … … 593 594 OWLCMD_ARGS("smartnarrow", owl_command_smartnarrow, OWL_CTX_INTERACTIVE, 594 595 "view only messages similar to the current message", 595 "smartnarrow [-i | --instance] [-r | --relat de]",596 "smartnarrow [-i | --instance] [-r | --related]", 596 597 "If the curmsg is a personal message narrow\n" 597 598 " to the conversation with that user.\n" … … 613 614 " message, the filter is to that instance.\n" 614 615 "If the curmsg is a class message, the filter is that class.\n" 615 "If the curmsg is a class message and '-i' is speci ed\n"616 "If the curmsg is a class message and '-i' is specified\n" 616 617 " the filter is to that class and instance.\n"), 617 618 … … 633 634 "SEE ALSO: filter, view, viewclass\n"), 634 635 OWLCMD_ALIAS("vu", "viewuser"), 636 OWLCMD_ALIAS("viewperson", "viewuser"), 637 OWLCMD_ALIAS("vp", "viewuser"), 635 638 636 639 OWLCMD_ARGS("show", owl_command_show, OWL_CTX_INTERACTIVE, … … 671 674 "for formatting messages.\n\n" 672 675 "Show variables will list the names of all variables.\n\n" 673 "Show errors will show a list of errors e countered by Owl.\n\n"676 "Show errors will show a list of errors encountered by Owl.\n\n" 674 677 "SEE ALSO: filter, view, alias, bindkey, help\n"), 675 678 … … 740 743 "set the search highlight string without searching", 741 744 "setsearch <string>", 742 "The setsearch command highlights all occur ences of its\n"745 "The setsearch command highlights all occurrences of its\n" 743 746 "argument and makes it the default argument for future\n" 744 747 "search commands, but does not move the cursor. With\n" … … 1292 1295 char opt; 1293 1296 int instance = 0, related = 0, i; 1294 c har **tmp_argv = owl_malloc(sizeof(char *) * argc);1297 const char **tmp_argv = owl_malloc(sizeof(char *) * argc); 1295 1298 1296 1299 for (i = 0; i < argc; i++) 1297 tmp_argv[i] = owl_strdup(argv[i]);1298 1299 static struct option options[] = {1300 tmp_argv[i] = argv[i]; 1301 1302 static const struct option options[] = { 1300 1303 {"instance", 0, 0, 'i'}, 1301 1304 {"related", 0, 0, 'r'}, 1302 1305 {NULL, 0, 0, 0}}; 1303 while ((opt = getopt_long(argc, tmp_argv, "ir", options, NULL)) != -1) { 1306 1307 optind = 0; 1308 while ((opt = getopt_long(argc, (char **)tmp_argv, "ir", options, NULL)) != -1) { 1304 1309 switch (opt) { 1305 1310 case 'i': … … 1315 1320 } 1316 1321 1317 for (i = 0; i < argc; i++)1318 owl_free(tmp_argv[i]);1319 owl_free(tmp_argv);1320 1321 1322 filtname = owl_function_smartfilter(instance, related); 1322 1323 … … 1327 1328 1328 1329 done: 1329 optind = 0; /* reset getopt */ 1330 owl_free(tmp_argv); 1331 1330 1332 return NULL; 1331 1333 } … … 1606 1608 char *owl_command_exec(int argc, const char *const *argv, const char *buff) 1607 1609 { 1608 return owl_function_exec(argc, argv, buff, 0);1610 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_RETURN); 1609 1611 } 1610 1612 1611 1613 char *owl_command_pexec(int argc, const char *const *argv, const char *buff) 1612 1614 { 1613 return owl_function_exec(argc, argv, buff, 1);1615 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_POPUP); 1614 1616 } 1615 1617 1616 1618 char *owl_command_aexec(int argc, const char *const *argv, const char *buff) 1617 1619 { 1618 return owl_function_exec(argc, argv, buff, 2);1620 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_ADMINMSG); 1619 1621 } 1620 1622 1621 1623 char *owl_command_perl(int argc, const char *const *argv, const char *buff) 1622 1624 { 1623 return owl_function_perl(argc, argv, buff, 0);1625 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_RETURN); 1624 1626 } 1625 1627 1626 1628 char *owl_command_pperl(int argc, const char *const *argv, const char *buff) 1627 1629 { 1628 return owl_function_perl(argc, argv, buff, 1);1630 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_POPUP); 1629 1631 } 1630 1632 1631 1633 char *owl_command_aperl(int argc, const char *const *argv, const char *buff) 1632 1634 { 1633 return owl_function_perl(argc, argv, buff, 2);1635 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_ADMINMSG); 1634 1636 } 1635 1637 … … 2022 2024 char *owl_command_zcrypt(int argc, const char *const *argv, const char *buff) 2023 2025 { 2024 #ifdef OWL_ENABLE_ZCRYPT2025 2026 owl_zwrite z; 2026 2027 … … 2044 2045 } 2045 2046 return(NULL); 2046 #else2047 owl_function_makemsg("This Owl does not support zcrypt");2048 return NULL;2049 #endif2050 2047 } 2051 2048
Note: See TracChangeset
for help on using the changeset viewer.