[57] in bug-owl

home help back first fref pref prev next nref lref last post

owl clobbers its useful error message for message,personal,* zephyrs

daemon@ATHENA.MIT.EDU (Mitchell E Berger)
Wed Jul 10 20:42:37 2002

Message-Id: <200207110042.UAA24301@athenaphobia.mit.edu>
To: bug-owl@MIT.EDU
cc: meeroh@MIT.EDU, mitchb@MIT.EDU
Date: Wed, 10 Jul 2002 20:42:36 -0400
From: Mitchell E Berger <mitchb@MIT.EDU>

Meeroh noticed that when he hit "r" on a message,personal,* message, he got
an "Error in zwrite arugments".  This is because it's purposely forcing you
to specify a recipient, and it says so, however, the return code that gets
sent back from the zwrite setup function causes the caller to clobber the
useful error message with the misleading one.  This patch corrects the
spelling of the word "arguments" and returns a different value in this special
case so that the good error message will not get clobbered.

Mitch

Index: functions.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/ktools/src/owl/repository/owl/functions.c,v
retrieving revision 1.12
diff -u -p -r1.12 functions.c
--- functions.c	2002/07/09 19:54:57	1.12
+++ functions.c	2002/07/11 00:31:16
@@ -110,7 +110,9 @@ void owl_function_zwrite_setup(char *lin
   /* check the arguments */
   ret=owl_zwrite_create_from_line(&z, line);
   if (ret) {
-    owl_function_makemsg("Error in zwrite arugments");
+    if (ret==-1) {
+      owl_function_makemsg("Error in zwrite arguments");
+    }
     owl_zwrite_free(&z);
     return;
   }
Index: zwrite.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/ktools/src/owl/repository/owl/zwrite.c,v
retrieving revision 1.4
diff -u -p -r1.4 zwrite.c
--- zwrite.c	2002/07/09 04:04:42	1.4
+++ zwrite.c	2002/07/11 00:31:46
@@ -99,7 +99,7 @@ int owl_zwrite_create_from_line(owl_zwri
       owl_list_get_size(&(z->recips))==0) {
     /* do the makemsg somewhere else */
     owl_function_makemsg("You must specify a recipient");
-    return(-1);
+    return(-2);
   }
 
   return(0);

home help back first fref pref prev next nref lref last post