Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r8a5b5a1 rd544237  
    9292              "Use 'show keymaps' to see the existing keymaps.\n"
    9393              "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"),
    9697
    9798  OWLCMD_ARGS("unbindkey", owl_command_unbindkey, OWL_CTX_ANY,
     
    100101              "Removes a binding of a key sequence within a keymap.\n"
    101102              "Use 'show keymaps' to see the existing keymaps.\n"
    102               "Ex.: unbindkey recv H"
     103              "Ex.: unbindkey recv H\n\n"
    103104              "SEE ALSO: bindkey"),
    104105
    105106  OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE,
    106107              "send a zephyr",
    107               "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcde] [<user> ...] [-m <message...>]",
     108              "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [<user> ...] [-m <message...>]",
    108109              "Zwrite send a zephyr to the one or more users specified.\n\n"
    109110              "The following options are available:\n\n"
     
    137138  OWLCMD_ARGS("zcrypt", owl_command_zcrypt, OWL_CTX_INTERACTIVE,
    138139              "send an encrypted zephyr",
    139               "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcde] [-m <message...>]\n",
     140              "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\n",
    140141              "Behaves like zwrite but uses encryption.  Not for use with\n"
    141142              "personal messages\n"),
     
    147148              "allow editing.\n\n"
    148149              "If 'sender' is specified, reply to the sender.\n\n"
    149               "If 'all' or no args are specified, reply publically to the\n"
     150              "If 'all' or no args are specified, reply publicly to the\n"
    150151              "same class/instance for non-personal messages and to the\n"
    151152              "sender for personal messages.\n\n"
     
    265266              "zpunt <class> <instance> [recipient]\n"
    266267              "zpunt <instance>",
    267               "The zpunt command will supress message to the specified\n"
     268              "The zpunt command will suppress messages to the specified\n"
    268269              "zephyr triplet.  In the second usage messages are suppressed\n"
    269270              "for class MESSAGE and the named instance.\n\n"
     
    282283              "punt <filter-text>",
    283284              "punt <filter-text (multiple words)>\n"
    284               "The punt command will supress message to the specified\n"
     285              "The punt command will suppress messages to the specified\n"
    285286              "filter\n\n"
    286287              "SEE ALSO:  unpunt, zpunt, show zpunts\n"),
     
    585586              "name style after the -s argument.\n"
    586587              "\n"
    587               "The other usages listed above are abbreivated forms that simply set\n"
     588              "The other usages listed above are abbreviated forms that simply set\n"
    588589              "the filter of the current view. The -d option allows you to write a\n"
    589590              "filter expression that will be dynamically created by owl and then\n"
     
    593594  OWLCMD_ARGS("smartnarrow", owl_command_smartnarrow, OWL_CTX_INTERACTIVE,
    594595              "view only messages similar to the current message",
    595               "smartnarrow [-i | --instance]  [-r | --relatde]",
     596              "smartnarrow [-i | --instance]  [-r | --related]",
    596597              "If the curmsg is a personal message narrow\n"
    597598              "   to the conversation with that user.\n"
     
    613614              "   message, the filter is to that instance.\n"
    614615              "If the curmsg is a class message, the filter is that class.\n"
    615               "If the curmsg is a class message and '-i' is specied\n"
     616              "If the curmsg is a class message and '-i' is specified\n"
    616617              "    the filter is to that class and instance.\n"),
    617618
     
    633634              "SEE ALSO: filter, view, viewclass\n"),
    634635  OWLCMD_ALIAS("vu", "viewuser"),
     636  OWLCMD_ALIAS("viewperson", "viewuser"),
     637  OWLCMD_ALIAS("vp", "viewuser"),
    635638
    636639  OWLCMD_ARGS("show", owl_command_show, OWL_CTX_INTERACTIVE,
     
    671674              "for formatting messages.\n\n"
    672675              "Show variables will list the names of all variables.\n\n"
    673               "Show errors will show a list of errors ecountered by Owl.\n\n"
     676              "Show errors will show a list of errors encountered by Owl.\n\n"
    674677              "SEE ALSO: filter, view, alias, bindkey, help\n"),
    675678 
     
    740743              "set the search highlight string without searching",
    741744              "setsearch <string>",
    742               "The setsearch command highlights all occurences of its\n"
     745              "The setsearch command highlights all occurrences of its\n"
    743746          "argument and makes it the default argument for future\n"
    744747          "search commands, but does not move the cursor.  With\n"
     
    12921295  char opt;
    12931296  int instance = 0, related = 0, i;
    1294   char **tmp_argv = owl_malloc(sizeof(char *) * argc);
     1297  const char **tmp_argv = owl_malloc(sizeof(char *) * argc);
    12951298
    12961299  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[] = {
    13001303    {"instance", 0, 0, 'i'},
    13011304    {"related",  0, 0, 'r'},
    13021305    {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) {
    13041309    switch (opt) {
    13051310      case 'i':
     
    13151320  }
    13161321
    1317   for (i = 0; i < argc; i++)
    1318     owl_free(tmp_argv[i]);
    1319   owl_free(tmp_argv);
    1320 
    13211322  filtname = owl_function_smartfilter(instance, related);
    13221323
     
    13271328
    13281329done:
    1329   optind = 0; /* reset getopt */
     1330  owl_free(tmp_argv);
     1331
    13301332  return NULL;
    13311333}
     
    16061608char *owl_command_exec(int argc, const char *const *argv, const char *buff)
    16071609{
    1608   return owl_function_exec(argc, argv, buff, 0);
     1610  return owl_function_exec(argc, argv, buff, OWL_OUTPUT_RETURN);
    16091611}
    16101612
    16111613char *owl_command_pexec(int argc, const char *const *argv, const char *buff)
    16121614{
    1613   return owl_function_exec(argc, argv, buff, 1);
     1615  return owl_function_exec(argc, argv, buff, OWL_OUTPUT_POPUP);
    16141616}
    16151617
    16161618char *owl_command_aexec(int argc, const char *const *argv, const char *buff)
    16171619{
    1618   return owl_function_exec(argc, argv, buff, 2);
     1620  return owl_function_exec(argc, argv, buff, OWL_OUTPUT_ADMINMSG);
    16191621}
    16201622
    16211623char *owl_command_perl(int argc, const char *const *argv, const char *buff)
    16221624{
    1623   return owl_function_perl(argc, argv, buff, 0);
     1625  return owl_function_perl(argc, argv, buff, OWL_OUTPUT_RETURN);
    16241626}
    16251627
    16261628char *owl_command_pperl(int argc, const char *const *argv, const char *buff)
    16271629{
    1628   return owl_function_perl(argc, argv, buff, 1);
     1630  return owl_function_perl(argc, argv, buff, OWL_OUTPUT_POPUP);
    16291631}
    16301632
    16311633char *owl_command_aperl(int argc, const char *const *argv, const char *buff)
    16321634{
    1633   return owl_function_perl(argc, argv, buff, 2);
     1635  return owl_function_perl(argc, argv, buff, OWL_OUTPUT_ADMINMSG);
    16341636}
    16351637
     
    20222024char *owl_command_zcrypt(int argc, const char *const *argv, const char *buff)
    20232025{
    2024 #ifdef OWL_ENABLE_ZCRYPT
    20252026  owl_zwrite z;
    20262027
     
    20442045  }
    20452046  return(NULL);
    2046 #else
    2047   owl_function_makemsg("This Owl does not support zcrypt");
    2048   return NULL;
    2049 #endif
    20502047}
    20512048
Note: See TracChangeset for help on using the changeset viewer.