flags for different machines.
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Thu, 3 Nov 1983 03:08:09 +0000 (19:08 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Thu, 3 Nov 1983 03:08:09 +0000 (19:08 -0800)
SCCS-vsn: usr.bin/window/main.c 3.13
SCCS-vsn: usr.bin/window/wwinit.c 3.11
SCCS-vsn: usr.bin/window/ww.h 3.18
SCCS-vsn: usr.bin/window/cmd.c 3.14
SCCS-vsn: usr.bin/window/cmd2.c 3.13
SCCS-vsn: usr.bin/window/wwsuspend.c 3.3
SCCS-vsn: usr.bin/window/defs.h 3.5

usr/src/usr.bin/window/cmd.c
usr/src/usr.bin/window/cmd2.c
usr/src/usr.bin/window/defs.h
usr/src/usr.bin/window/main.c
usr/src/usr.bin/window/ww.h
usr/src/usr.bin/window/wwinit.c
usr/src/usr.bin/window/wwsuspend.c

index e796368..c95f672 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cmd.c       3.13 83/09/15";
+static char *sccsid = "@(#)cmd.c       3.14 83/11/02";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -139,12 +139,14 @@ docmd()
                        case 's':
                                c_stat();
                                break;
                        case 's':
                                c_stat();
                                break;
+#ifndef O_4_1A
                        case 't':
                                c_time(RUSAGE_SELF);
                                break;
                        case 'T':
                                c_time(RUSAGE_CHILDREN);
                                break;
                        case 't':
                                c_time(RUSAGE_SELF);
                                break;
                        case 'T':
                                c_time(RUSAGE_CHILDREN);
                                break;
+#endif
                        /* debugging stuff */
                        case '&':
                                if (debug) {
                        /* debugging stuff */
                        case '&':
                                if (debug) {
index f076f9d..0140a04 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cmd2.c      3.12 83/09/14";
+static char *sccsid = "@(#)cmd2.c      3.13 83/11/02";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -47,6 +47,7 @@ c_help()
        closeiwin(w);
 }
 
        closeiwin(w);
 }
 
+#ifndef O_4_1A
 char *strtime();
 
 c_time(flag)
 char *strtime();
 
 c_time(flag)
@@ -115,6 +116,7 @@ register struct timeval *t;
                t->tv_sec, t->tv_usec / 10000);
        return buf;
 }
                t->tv_sec, t->tv_usec / 10000);
        return buf;
 }
+#endif
 
 c_stat()
 {
 
 c_stat()
 {
index 0b8236c..3f19992 100644 (file)
@@ -1,11 +1,13 @@
 /*
 /*
- *     @(#)defs.h      3.4 83/09/01    
+ *     @(#)defs.h      3.5 83/11/02    
  */
 
 #include "ww.h"
 #include <signal.h>
  */
 
 #include "ww.h"
 #include <signal.h>
+#ifndef O_4_1A
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/time.h>
 #include <sys/resource.h>
+#endif
 
 #define NWINDOW 9
 
 
 #define NWINDOW 9
 
@@ -13,7 +15,9 @@ int nread;
 int nreade;
 int nreadz;
 int nreadc;
 int nreade;
 int nreadz;
 int nreadc;
+#ifndef O_4_1A
 struct timeval starttime;
 struct timeval starttime;
+#endif
 
        /* things for handling input */
 char ibuf[512];
 
        /* things for handling input */
 char ibuf[512];
index 39560bd..1116c14 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)main.c      3.12 83/09/19";
+static char *sccsid = "@(#)main.c      3.13 83/11/02";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -17,7 +17,9 @@ char **argv;
        char fflag = 0;
        char dflag = 0;
        char xflag = 0;
        char fflag = 0;
        char dflag = 0;
        char xflag = 0;
+#ifndef O_4_1A
        struct timezone timezone;
        struct timezone timezone;
+#endif
 
        if (p = rindex(*argv, '/'))
                p++;
 
        if (p = rindex(*argv, '/'))
                p++;
@@ -57,7 +59,9 @@ char **argv;
                shellname++;
        else
                shellname = shell;
                shellname++;
        else
                shellname = shell;
+#ifndef O_4_1A
        (void) gettimeofday(&starttime, &timezone);
        (void) gettimeofday(&starttime, &timezone);
+#endif
        if (wwinit() < 0) {
                (void) fflush(stdout);
                (void) fprintf(stderr, "%s.\n", wwerror());
        if (wwinit() < 0) {
                (void) fflush(stdout);
                (void) fprintf(stderr, "%s.\n", wwerror());
index ab8d645..3845ab1 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     @(#)ww.h        3.17 83/10/19   
+ *     @(#)ww.h        3.18 83/11/02   
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
@@ -202,3 +202,8 @@ char *strcat();
 #define CTRL(c)                ('c'&0x1f)
 #define DEL            0x7f
 #define ISCTRL(c)      ((c) < ' ' || (c) >= DEL)
 #define CTRL(c)                ('c'&0x1f)
 #define DEL            0x7f
 #define ISCTRL(c)      ((c) < ' ' || (c) >= DEL)
+
+#if defined(O_4_1A)||defined(O_4_1C)
+int (*sigset)();
+#define signal(s, v)   sigset((s), (v))
+#endif
index f6e7381..5f0ce20 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwinit.c    3.10 83/09/15";
+static char *sccsid = "@(#)wwinit.c    3.11 83/11/02";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -14,7 +14,12 @@ wwinit()
        int kn;
 
        setbuf(stdout, _sobuf);
        int kn;
 
        setbuf(stdout, _sobuf);
+#ifndef O_4_1A
        wwdtablesize = getdtablesize();
        wwdtablesize = getdtablesize();
+#else
+#include <sys/param.h>
+       wwdtablesize = NOFILE;
+#endif
        if (wwgettty(0, &wwoldtty) < 0)
                return -1;
        wwwintty = wwoldtty;
        if (wwgettty(0, &wwoldtty) < 0)
                return -1;
        wwwintty = wwoldtty;
index 055f345..fe14e23 100644 (file)
@@ -1,24 +1,22 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwsuspend.c 3.2 83/08/15";
+static char *sccsid = "@(#)wwsuspend.c 3.3 83/11/02";
 #endif
 
 #include "ww.h"
 #include "tt.h"
 #include <signal.h>
 
 #endif
 
 #include "ww.h"
 #include "tt.h"
 #include <signal.h>
 
-#define mask(s)        (1 << (s) - 1)
-
 wwsuspend()
 {
 wwsuspend()
 {
-       int oldmask;
+       int (*oldsig)();
 
 
-       oldmask = sigblock(mask(SIGTSTP));
+       oldsig = signal(SIGTSTP, SIG_IGN);
        wwend();
        wwend();
-       (void) sigsetmask(sigblock(0) & ~mask(SIGTSTP));
+       (void) signal(SIGTSTP, SIG_DFL);
        (void) kill(0, SIGTSTP);
        (void) kill(0, SIGTSTP);
-       (void) sigblock(mask(SIGTSTP));
+       (void) signal(SIGTSTP, SIG_IGN);
        (void) wwsettty(0, &wwnewtty);
        (*tt.tt_init)();
        wwredraw();
        (void) wwsettty(0, &wwnewtty);
        (*tt.tt_init)();
        wwredraw();
-       (void) sigsetmask(oldmask);
+       (void) signal(SIGTSTP, oldsig);
 }
 }