[878] in Zephyr_Bugs

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

patch for clients/zctl/zctl.c

daemon@ATHENA.MIT.EDU (Derrick J Brashear)
Fri Aug 1 17:41:17 1997

Date: Fri,  1 Aug 1997 17:39:10 -0400 (EDT)
From: Derrick J Brashear <shadow+@andrew.cmu.edu>
To: bug-zephyr@MIT.EDU

zctl shouldn't trip over the shell when parsing arguments; if the shell has
done it's work, let it be. e.g.:
zctl add message "foo bar" \*
from your shell should work since
zctl
zctl: add message "foo bar" *

works
*** /afs/andrew/system/src/local/zephyr/044/zephyr-2.0.2/clients/zctl/zctl.c
Fri Aug  1 17:36:32 1997
--- /usr/tmp/zsrc/zephyr/clients/zctl/zctl.c    Thu Apr  4 19:30:34 1996
***************
*** 120,133 ****
        }
  
        if (argc > 1) {
!               code = ss_execute_command(sci_idx,&argv[1]);
                if (code)
                    fprintf (stderr, "%s: %s: %s\n",
!                            argv[0], error_message (code), argv[1]);
                exit((code != 0));
        } 
  
!       printf("ZCTL 1.28 (Protocol %s%d.%d) - Type '?' for a list of commands.\n\n",
               ZVERSIONHDR,
               ZVERSIONMAJOR,ZVERSIONMINOR);
  
--- 120,137 ----
        }
  
        if (argc > 1) {
!               *ssline = '\0';
!               for (i=1;i<argc;i++)
!                       (void) sprintf(ssline+strlen(ssline),"%s ",argv[i]);
!               ssline[strlen(ssline)-1] = '\0';
!               code = ss_execute_line(sci_idx,ssline);
                if (code)
                    fprintf (stderr, "%s: %s: %s\n",
!                            argv[0], error_message (code), ssline);
                exit((code != 0));
        } 
  
!       printf("ZCTL $Revision: 1.28 $ (Protocol %s%d.%d) - Type '?' for a list 
of commands.\n\n",
               ZVERSIONHDR,
               ZVERSIONMAJOR,ZVERSIONMINOR);
  

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