Changeset 12e5f17 for commands.c


Ignore:
Timestamp:
Jan 11, 2007, 11:19:34 AM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
60986b2
Parents:
cba04e0
Message:
Changing owl_command_yes/no to return void instead, as declared in the
owl_cmd struct.

 --This line, and those below, will be ignored--

M    owl/commands.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rcba04e0 r12e5f17  
    24402440}
    24412441
    2442 char *owl_command_yes(void)
     2442void owl_command_yes(void)
    24432443{
    24442444  owl_message *m;
     
    24502450  if (owl_view_get_size(v) < 1) {
    24512451    owl_function_error("No current message.");
    2452     return NULL;
     2452    return;
    24532453  }
    24542454
     
    24562456  if(!owl_message_is_question(m)) {
    24572457    owl_function_error("That message isn't a question.");
    2458     return NULL;
     2458    return;
    24592459  }
    24602460  if(owl_message_is_answered(m)) {
    24612461    owl_function_error("You already answered that question.");
    2462     return NULL;
     2462    return;
    24632463  }
    24642464  char * cmd = owl_message_get_attribute_value(m, "yescommand");
    24652465  if(!cmd) {
    24662466    owl_function_error("No yes command!");
    2467     return NULL;
     2467    return;
    24682468  }
    24692469
    24702470  owl_function_command_norv(cmd);
    24712471  owl_message_set_isanswered(m);
    2472   return NULL;
    2473 }
    2474 
    2475 char *owl_command_no(void)
     2472  return;
     2473}
     2474
     2475void owl_command_no(void)
    24762476{
    24772477  owl_message *m;
     
    24832483  if (owl_view_get_size(v) < 1) {
    24842484    owl_function_error("No current message.");
    2485     return NULL;
     2485    return;
    24862486  }
    24872487
     
    24892489  if(!owl_message_is_question(m)) {
    24902490    owl_function_error("That message isn't a question.");
    2491     return NULL;
     2491    return;
    24922492  }
    24932493  if(owl_message_is_answered(m)) {
    24942494    owl_function_error("You already answered that question.");
    2495     return NULL;
     2495    return;
    24962496  }
    24972497  char * cmd = owl_message_get_attribute_value(m, "nocommand");
    24982498  if(!cmd) {
    24992499    owl_function_error("No no command!");
    2500     return NULL;
     2500    return;
    25012501  }
    25022502
    25032503  owl_function_command_norv(cmd);
    25042504  owl_message_set_isanswered(m);
    2505   return NULL;
     2505  return;
    25062506}
    25072507
Note: See TracChangeset for help on using the changeset viewer.