Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/csh fix incorrect operation caused by the previous checkin.



details:   https://anonhg.NetBSD.org/src/rev/1afcfcc93a5c
branches:  trunk
changeset: 472815:1afcfcc93a5c
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun May 09 00:00:20 1999 +0000

description:
fix incorrect operation caused by the previous checkin.

diffstat:

 bin/csh/proc.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (58 lines):

diff -r e9532526d5fa -r 1afcfcc93a5c bin/csh/proc.c
--- a/bin/csh/proc.c    Sat May 08 23:12:29 1999 +0000
+++ b/bin/csh/proc.c    Sun May 09 00:00:20 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.c,v 1.18 1999/05/08 23:12:29 christos Exp $       */
+/*     $NetBSD: proc.c,v 1.19 1999/05/09 00:00:20 cgd Exp $    */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)proc.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: proc.c,v 1.18 1999/05/08 23:12:29 christos Exp $");
+__RCSID("$NetBSD: proc.c,v 1.19 1999/05/09 00:00:20 cgd Exp $");
 #endif
 #endif /* not lint */
 
@@ -973,6 +973,7 @@
     struct command *t;
 {
     int signum = SIGTERM;
+    Char *signame;
     char *name;
 
     v++;
@@ -1006,14 +1007,14 @@
        }
        else {
            if (v[0][1] == 's' && (Isspace(v[0][2]) || v[0][2] == '\0'))
-               name = short2str(&v[0][0]);
+               signame = *(++v);
            else
-               name = short2str(&v[0][1]);
-           v++;
+               signame = &v[0][1];
 
-           if (v[0] == NULL || v[1] == NULL)
+           if (signame == NULL || v[1] == NULL)
                stderror(ERR_NAME | ERR_TOOFEW);
 
+           name = short2str(signame);
            for (signum = 1; signum < NSIG; signum++)
                if (!strcasecmp(sys_signame[signum], name) ||
                    (!strncasecmp("SIG", name, 3) &&    /* skip "SIG" prefix */
@@ -1021,10 +1022,10 @@
                    break;
 
            if (signum == NSIG) {
-               if (v[0][0] == '0')
+               if (signame[0] == '0')
                    signum = 0;
                else {
-                   setname(vis_str(&v[0][0]));
+                   setname(vis_str(signame));
                    stderror(ERR_NAME | ERR_UNKSIG);
                }
            }



Home | Main Index | Thread Index | Old Index