make ANSI C compatible
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Dec 1987 05:50:20 +0000 (21:50 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 23 Dec 1987 05:50:20 +0000 (21:50 -0800)
SCCS-vsn: usr.bin/systat/keyboard.c 5.2
SCCS-vsn: usr.bin/tip/cmds.c 5.6
SCCS-vsn: usr.bin/tip/cmdtab.c 5.4
SCCS-vsn: usr.bin/tip/vars.c 5.2

usr/src/usr.bin/systat/keyboard.c
usr/src/usr.bin/tip/cmds.c
usr/src/usr.bin/tip/cmdtab.c
usr/src/usr.bin/tip/vars.c

index 277dc92..9c35878 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)keyboard.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)keyboard.c 5.2 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -34,13 +34,13 @@ keyboard()
                                 ch += 'a' - 'A';
                         if (col == 0) {
 #define        mask(s) (1 << ((s) - 1))
                                 ch += 'a' - 'A';
                         if (col == 0) {
 #define        mask(s) (1 << ((s) - 1))
-                                if (ch == CTRL(l)) {
+                                if (ch == CTRL('l')) {
                                        oldmask = sigblock(mask(SIGALRM));
                                        wrefresh(curscr);
                                        sigsetmask(oldmask);
                                         continue;
                                 }
                                        oldmask = sigblock(mask(SIGALRM));
                                        wrefresh(curscr);
                                        sigsetmask(oldmask);
                                         continue;
                                 }
-                               if (ch == CTRL(g)) {
+                               if (ch == CTRL('g')) {
                                        oldmask = sigblock(mask(SIGALRM));
                                        status();
                                        sigsetmask(oldmask);
                                        oldmask = sigblock(mask(SIGALRM));
                                        status();
                                        sigsetmask(oldmask);
@@ -57,7 +57,7 @@ keyboard()
                                 col--;
                                 goto doerase;
                         }
                                 col--;
                                 goto doerase;
                         }
-                        if (ch == CTRL(w) && col > 0) {
+                        if (ch == CTRL('w') && col > 0) {
                                 while (--col >= 0 && isspace(line[col]))
                                         ;
                                 col++;
                                 while (--col >= 0 && isspace(line[col]))
                                         ;
                                 col++;
index d71fd30..48b7306 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)cmds.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)cmds.c     5.6 (Berkeley) %G%";
 #endif not lint
 
 #include "tip.h"
 #endif not lint
 
 #include "tip.h"
@@ -767,7 +767,7 @@ suspend(c)
 {
 
        unraw();
 {
 
        unraw();
-       kill(c == CTRL(y) ? getpid() : 0, SIGTSTP);
+       kill(c == CTRL('y') ? getpid() : 0, SIGTSTP);
        raw();
 }
 
        raw();
 }
 
index 339636b..11e3d95 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)cmdtab.c   5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)cmdtab.c   5.4 (Berkeley) %G%";
 #endif not lint
 
 #include "tip.h"
 #endif not lint
 
 #include "tip.h"
@@ -27,9 +27,9 @@ esctable_t etable[] = {
 #endif
        { 'c',  NORM,   "change directory",              chdirectory },
        { '.',  NORM,   "exit from tip",                 finish },
 #endif
        { 'c',  NORM,   "change directory",              chdirectory },
        { '.',  NORM,   "exit from tip",                 finish },
-       {CTRL(d),NORM,  "exit from tip",                 finish },
-       {CTRL(y),NORM,  "suspend tip (local+remote)",    suspend },
-       {CTRL(z),NORM,  "suspend tip (local only)",      suspend },
+       {CTRL('d'),NORM,"exit from tip",                 finish },
+       {CTRL('y'),NORM,"suspend tip (local+remote)",    suspend },
+       {CTRL('z'),NORM,"suspend tip (local only)",      suspend },
        { 's',  NORM,   "set variable",                  variable },
        { '?',  NORM,   "get this summary",              help },
        { '#',  NORM,   "send break",                    genbrk },
        { 's',  NORM,   "set variable",                  variable },
        { '?',  NORM,   "get this summary",              help },
        { '#',  NORM,   "send break",                    genbrk },
index c1ac6d5..4327f3f 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)vars.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)vars.c     5.2 (Berkeley) %G%";
 #endif not lint
 
 #include "tip.h"
 #endif not lint
 
 #include "tip.h"
@@ -31,7 +31,7 @@ value_t vtable[] = {
        { "exceptions", STRING|INIT|IREMOTE,    (READ|WRITE)<<PUBLIC,
          "ex",         (char *)&EX },
        { "force",      CHAR,                   (READ|WRITE)<<PUBLIC,
        { "exceptions", STRING|INIT|IREMOTE,    (READ|WRITE)<<PUBLIC,
          "ex",         (char *)&EX },
        { "force",      CHAR,                   (READ|WRITE)<<PUBLIC,
-         "fo",         (char *)CTRL(p) },
+         "fo",         (char *)CTRL('p') },
        { "framesize",  NUMBER|IREMOTE|INIT,    (READ|WRITE)<<PUBLIC,
          "fr",         (char *)&FS },
        { "host",       STRING|IREMOTE|INIT,    READ<<PUBLIC,
        { "framesize",  NUMBER|IREMOTE|INIT,    (READ|WRITE)<<PUBLIC,
          "fr",         (char *)&FS },
        { "host",       STRING|IREMOTE|INIT,    READ<<PUBLIC,
@@ -45,7 +45,7 @@ value_t vtable[] = {
        { "raise",      BOOL,                   (READ|WRITE)<<PUBLIC,
          "ra",         (char *)FALSE },
        { "raisechar",  CHAR,                   (READ|WRITE)<<PUBLIC,
        { "raise",      BOOL,                   (READ|WRITE)<<PUBLIC,
          "ra",         (char *)FALSE },
        { "raisechar",  CHAR,                   (READ|WRITE)<<PUBLIC,
-         "rc",         (char *)CTRL(a) },
+         "rc",         (char *)CTRL('a') },
        { "record",     STRING|INIT|IREMOTE,    (READ|WRITE)<<PUBLIC,
          "rec",        (char *)&RE },
        { "remote",     STRING|INIT|IREMOTE,    READ<<PUBLIC,
        { "record",     STRING|INIT|IREMOTE,    (READ|WRITE)<<PUBLIC,
          "rec",        (char *)&RE },
        { "remote",     STRING|INIT|IREMOTE,    READ<<PUBLIC,