]> diplodocus.org Git - nmh/blobdiff - uip/msh.c
Document argsplit changes in mh-profile man page.
[nmh] / uip / msh.c
index e5f82bfadb44f21df62d694fdddbd22ad921f33e..4ab73286825fa15e15dd331176ec62b24affa938 100644 (file)
--- a/uip/msh.c
+++ b/uip/msh.c
@@ -1274,8 +1274,7 @@ static int
 parse (char *buffer, struct Cmd *cmdp)
 {
     int argp = 0;
 parse (char *buffer, struct Cmd *cmdp)
 {
     int argp = 0;
-    unsigned char c, *cp;
-    char *pp;
+    char c, *cp, *pp;
 
     cmdp->line[0] = 0;
     pp = cmdp->args[argp++] = cmdp->line;
 
     cmdp->line[0] = 0;
     pp = cmdp->args[argp++] = cmdp->line;
@@ -1284,7 +1283,7 @@ parse (char *buffer, struct Cmd *cmdp)
     cmdp->stream = NULL;
 
     for (cp = buffer; (c = *cp); cp++) {
     cmdp->stream = NULL;
 
     for (cp = buffer; (c = *cp); cp++) {
-       if (!isspace (c))
+       if (!isspace ((unsigned char) c))
            break;
     }
     if (c == '\0') {
            break;
     }
     if (c == '\0') {
@@ -1294,8 +1293,8 @@ parse (char *buffer, struct Cmd *cmdp)
     }
 
     while ((c = *cp++)) {
     }
 
     while ((c = *cp++)) {
-       if (isspace (c)) {
-           while (isspace (c))
+       if (isspace ((unsigned char) c)) {
+           while (isspace ((unsigned char) c))
                c = *cp++;
            if (c == 0)
                break;
                c = *cp++;
            if (c == 0)
                break;
@@ -1350,7 +1349,7 @@ parse (char *buffer, struct Cmd *cmdp)
                }
                cmdp->redirect = pp + 1;/* sigh */
                for (; (c = *cp); cp++)
                }
                cmdp->redirect = pp + 1;/* sigh */
                for (; (c = *cp); cp++)
-                   if (!isspace (c))
+                   if (!isspace ((unsigned char) c))
                        break;
                if (c == 0) {
                    padvise (NULL, cmdp->direction != PIPIO
                        break;
                if (c == 0) {
                    padvise (NULL, cmdp->direction != PIPIO
@@ -1361,7 +1360,7 @@ parse (char *buffer, struct Cmd *cmdp)
                strcpy (cmdp->redirect, cp);
                if (cmdp->direction != PIPIO) {
                    for (; *cp; cp++)
                strcpy (cmdp->redirect, cp);
                if (cmdp->direction != PIPIO) {
                    for (; *cp; cp++)
-                       if (isspace (*cp)) {
+                       if (isspace ((unsigned char) *cp)) {
                            padvise (NULL, "bad name for redirect");
                            return NOTOK;
                        }
                            padvise (NULL, "bad name for redirect");
                            return NOTOK;
                        }
@@ -1593,7 +1592,7 @@ static int
 pINI (void)
 {
     int i, vrsn;
 pINI (void)
 {
     int i, vrsn;
-    unsigned char *bp;
+    char *bp;
     struct record rcs, *rc;
 
     rc = &rcs;
     struct record rcs, *rc;
 
     rc = &rcs;
@@ -1602,7 +1601,7 @@ pINI (void)
     switch (peer2rc (rc)) {
        case RC_INI: 
            bp = rc->rc_data;
     switch (peer2rc (rc)) {
        case RC_INI: 
            bp = rc->rc_data;
-           while (isspace (*bp))
+           while (isspace ((unsigned char) *bp))
                bp++;
            if (sscanf (bp, "%d", &vrsn) != 1) {
        bad_init: ;
                bp++;
            if (sscanf (bp, "%d", &vrsn) != 1) {
        bad_init: ;
@@ -1614,9 +1613,9 @@ pINI (void)
                done (1);
            }
 
                done (1);
            }
 
-           while (*bp && !isspace (*bp))
+           while (*bp && !isspace ((unsigned char) *bp))
                bp++;
                bp++;
-           while (isspace (*bp))
+           while (isspace ((unsigned char) *bp))
                bp++;
            if (sscanf (bp, "%d", &numwins) != 1 || numwins <= 0)
                goto bad_init;
                bp++;
            if (sscanf (bp, "%d", &numwins) != 1 || numwins <= 0)
                goto bad_init;
@@ -1624,9 +1623,9 @@ pINI (void)
                numwins = NWIN;
 
            for (i = 1; i <= numwins; i++) {
                numwins = NWIN;
 
            for (i = 1; i <= numwins; i++) {
-               while (*bp && !isspace (*bp))
+               while (*bp && !isspace ((unsigned char) *bp))
                    bp++;
                    bp++;
-               while (isspace (*bp))
+               while (isspace ((unsigned char) *bp))
                    bp++;
                if (sscanf (bp, "%d", &windows[i]) != 1 || windows[i] <= 0)
                    goto bad_init;
                    bp++;
                if (sscanf (bp, "%d", &windows[i]) != 1 || windows[i] <= 0)
                    goto bad_init;