Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r697221f rc809f5e  
    281281  OWLCMD_ARGS("punt", owl_command_punt, OWL_CTX_ANY,
    282282              "suppress an arbitrary filter",
    283               "punt <filter-name>\n"
    284               "punt <filter-text (multiple words)>",
     283              "punt <filter-text>",
     284              "punt <filter-text (multiple words)>\n"
    285285              "The punt command will suppress messages to the specified\n"
    286286              "filter\n\n"
     
    289289  OWLCMD_ARGS("unpunt", owl_command_unpunt, OWL_CTX_ANY,
    290290              "remove an entry from the punt list",
    291               "unpunt <number>\n"
    292               "unpunt <filter-name>\n"
    293               "unpunt <filter-text (multiple words)>",
     291              "unpunt <filter-text>\n"
     292              "unpunt <filter-text>\n"
     293              "unpunt <number>\n",
    294294              "The unpunt command will remove an entry from the puntlist.\n"
    295               "The last two forms correspond to the two forms of the :punt\n"
    296               "command. The first allows you to remove a specific entry from\n"
     295              "The first two forms correspond to the first two forms of the :punt\n"
     296              "command. The latter allows you to remove a specific entry from the\n"
    297297              "the list (see :show zpunts)\n\n"
    298298              "SEE ALSO:  punt, zpunt, zunpunt, show zpunts\n"),
     
    12881288  }
    12891289  owl_function_nextmsg_full(filter, skip_deleted, last_if_none);
    1290   g_free(filter);
     1290  if (filter) g_free(filter);
    12911291  return(NULL);
    12921292}
     
    13181318  }
    13191319  owl_function_prevmsg_full(filter, skip_deleted, first_if_none);
    1320   g_free(filter);
     1320  if (filter) g_free(filter);
    13211321  return(NULL);
    13221322}
     
    16911691  commands = g_strsplit_set(newbuff, ";", 0);
    16921692  for (i = 0; commands[i] != NULL; i++) {
    1693     g_free(lastrv);
     1693    if (lastrv) {
     1694      g_free(lastrv);
     1695    }
    16941696    lastrv = owl_function_command(commands[i]);
    16951697  }
     
    24642466  owl_list * fl;
    24652467  owl_filter * f;
     2468  char * text;
    24662469  int i;
    24672470
     
    24792482        return;
    24802483      } else {
    2481         owl_function_makemsg("No such filter number: %d.", i+1);
     2484        owl_function_error("No such filter number: %d", i+1);
    24822485      }
    24832486    }
    2484     const char *filter[] = {"filter", argv[1]};
    2485     owl_function_punt(2, filter, unpunt);
     2487    text = owl_string_build_quoted("filter %q", argv[1]);
     2488    owl_function_punt(text, unpunt);
     2489    g_free(text);
    24862490  } else {
    2487     /* Pass in argv[1]..argv[argc-1]. */
    2488     owl_function_punt(argc - 1, argv + 1, unpunt);
     2491    owl_function_punt(skiptokens(buff, 1), unpunt);
    24892492  }
    24902493}
Note: See TracChangeset for help on using the changeset viewer.