[7418] in testers

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

jwrite -q isn't implemented

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Mar 17 15:23:42 2006

Message-Id: <200603172023.k2HKNWhI026730@infinite-loop.mit.edu>
To: testers@MIT.EDU
Reply-To: Jonathan Reed <jdreed@MIT.EDU>
Date: Fri, 17 Mar 2006 15:23:32 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>


The -q option option in jwrite doesn't actually do anything.  As in,
the variable isn't referenced outside of argument parsing.  However,
I'm not quite sure to what degree -q is supposed to work.  In the
zwrite manpage, for example, -q suppresses information about the
sending of the message, successful or not.  In the jwrite manpage, it
merely refers to "unnecessary output", which I would interpret as
"Suppress messages of success, still display errors".  So I think
something like this should work (it does for me).

--- jwgc/clients/jwrite/jwrite.c        2006-03-10 10:32:58.000000000 -0500
+++ jwgc-patched/clients/jwrite/jwrite.c        2006-03-17 15:22:27.426711429 -0
500
@@ -48,7 +48,9 @@
        cdata = xode_get_data(x);
 
        if (!strcmp(xode_get_name(x), "success")) {
-               printf("%s\n", cdata);
+               if (!quiet) {
+                       printf("%s\n", cdata);
+               }
        }
        else if (!strcmp(xode_get_name(x), "error")) {
                printf("ERROR: %s\n", cdata);






--------
Jonathan Reed
jdreed@mit.edu

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