[378] in BarnOwl Developers
[D-O-H] r519 - trunk/owl
daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:05:31 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@MIT.EDU
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Thu, 11 Jan 2007 11:19:35 -0500 (EST)
Author: asedeno
Date: 2007-01-11 11:19:34 -0500 (Thu, 11 Jan 2007)
New Revision: 519
Modified:
trunk/owl/commands.c
Log:
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
Modified: trunk/owl/commands.c
===================================================================
--- trunk/owl/commands.c 2007-01-11 16:02:24 UTC (rev 518)
+++ trunk/owl/commands.c 2007-01-11 16:19:34 UTC (rev 519)
@@ -2439,7 +2439,7 @@
return NULL;
}
-char *owl_command_yes(void)
+void owl_command_yes(void)
{
owl_message *m;
owl_view *v;
@@ -2449,30 +2449,30 @@
/* bail if there's no current message */
if (owl_view_get_size(v) < 1) {
owl_function_error("No current message.");
- return NULL;
+ return;
}
m = owl_view_get_element(v, owl_global_get_curmsg(&g));
if(!owl_message_is_question(m)) {
owl_function_error("That message isn't a question.");
- return NULL;
+ return;
}
if(owl_message_is_answered(m)) {
owl_function_error("You already answered that question.");
- return NULL;
+ return;
}
char * cmd = owl_message_get_attribute_value(m, "yescommand");
if(!cmd) {
owl_function_error("No yes command!");
- return NULL;
+ return;
}
owl_function_command_norv(cmd);
owl_message_set_isanswered(m);
- return NULL;
+ return;
}
-char *owl_command_no(void)
+void owl_command_no(void)
{
owl_message *m;
owl_view *v;
@@ -2482,27 +2482,27 @@
/* bail if there's no current message */
if (owl_view_get_size(v) < 1) {
owl_function_error("No current message.");
- return NULL;
+ return;
}
m = owl_view_get_element(v, owl_global_get_curmsg(&g));
if(!owl_message_is_question(m)) {
owl_function_error("That message isn't a question.");
- return NULL;
+ return;
}
if(owl_message_is_answered(m)) {
owl_function_error("You already answered that question.");
- return NULL;
+ return;
}
char * cmd = owl_message_get_attribute_value(m, "nocommand");
if(!cmd) {
owl_function_error("No no command!");
- return NULL;
+ return;
}
owl_function_command_norv(cmd);
owl_message_set_isanswered(m);
- return NULL;
+ return;
}
/*********************************************************************/