Changeset ecd5dc5 for commands.c


Ignore:
Timestamp:
Apr 12, 2003, 4:54:57 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e9b1f60
Parents:
8262340
Message:
M-p is bound to 'view personal' by default
loadsubs and loadloginsubs only print messages if in interactive
  mode
added the 'alert_filter' variable, defaults to 'none'.
added the 'alert_action' variable, which is an owl command that
  will be executed when new messages arive that match the
  alert_filter
added the 'term' command which takes the 'raise' and 'deiconify'
  options.  It assumes xterm for now.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r7933748 recd5dc5  
    6161  OWLCMD_ALIAS("exit", "quit"),
    6262  OWLCMD_ALIAS("q",    "quit"),
     63
     64  OWLCMD_ARGS("term", owl_command_term, OWL_CTX_ANY,
     65              "control the terminal",
     66              "term raise\n"
     67              "term deiconify\n",
     68              ""),
     69
     70  OWLCMD_VOID("nop", owl_command_nop, OWL_CTX_ANY,
     71              "do nothing",
     72              "",
     73              ""),
    6374 
    6475  OWLCMD_ARGS("start-command", owl_command_start_command, OWL_CTX_INTERACTIVE,
     
    750761}
    751762
     763void owl_command_nop() {
     764}
     765
    752766char *owl_command_help(int argc, char **argv, char *buff) {
    753767  if (argc!=2) {
     
    11681182  if (argc<2) {
    11691183    owl_function_makemsg("Need at least one argument to debug command");
    1170     return NULL;
     1184    return(NULL);
    11711185  }
    11721186
    11731187  if (!owl_global_is_debug_fast(&g)) {
    11741188    owl_function_makemsg("Debugging is not turned on");
    1175     return NULL;
     1189    return(NULL);
    11761190  }
    11771191
    11781192  owl_function_debugmsg(argv[1]);
    1179   return NULL;
    1180 }
    1181 
    1182 char *owl_command_ktest(int argc, char **argv, char *buff) {
    1183   owl_function_popless_text("foobar");
    1184   return NULL;
     1193  return(NULL);
     1194}
     1195
     1196char *owl_command_term(int argc, char **argv, char *buff) {
     1197  if (argc<2) {
     1198    owl_function_makemsg("Need at least one argument to the term command");
     1199    return(NULL);
     1200  }
     1201
     1202  if (!strcmp(argv[1], "raise")) {
     1203    owl_function_xterm_raise();
     1204  } else if (!strcmp(argv[1], "deiconify")) {
     1205    owl_function_xterm_deiconify();
     1206  } else {
     1207    owl_function_makemsg("Uknown terminal subcommand");
     1208  }
     1209  return(NULL);
    11851210}
    11861211
Note: See TracChangeset for help on using the changeset viewer.