4.1a, 4.1c compatibility removed, local.h added
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 17 Apr 1984 11:29:13 +0000 (03:29 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 17 Apr 1984 11:29:13 +0000 (03:29 -0800)
SCCS-vsn: usr.bin/window/main.c 3.24
SCCS-vsn: usr.bin/window/wwinit.c 3.18
SCCS-vsn: usr.bin/window/ww.h 3.31
SCCS-vsn: usr.bin/window/startup.c 3.12
SCCS-vsn: usr.bin/window/wwsuspend.c 3.4
SCCS-vsn: usr.bin/window/README 3.3
SCCS-vsn: usr.bin/window/wwrint.c 3.2
SCCS-vsn: usr.bin/window/wwspawn.c 3.9

usr/src/usr.bin/window/README
usr/src/usr.bin/window/main.c
usr/src/usr.bin/window/startup.c
usr/src/usr.bin/window/ww.h
usr/src/usr.bin/window/wwinit.c
usr/src/usr.bin/window/wwrint.c
usr/src/usr.bin/window/wwspawn.c
usr/src/usr.bin/window/wwsuspend.c

index c4314bf..d0e6bf3 100644 (file)
@@ -1,21 +1,17 @@
-@(#)README     3.2 84/04/05
+@(#)README     3.3 84/04/16
 
 Compilation notes:
 
 
 Compilation notes:
 
-     The flags:
+     There is only one compiler option:
 
        O_SUN           use 68000 byte ordering
 
        O_SUN           use 68000 byte ordering
-       O_4_1C          4.1c
-       O_4_1A          4.1a
 
 
-     4.2bsd on a vax needs no flags.  Some systems will need the jobs library.
-4.1a does not support the 't' command.
+     The file local.h contains locally tunable constants.
 
      The makefile should be updated with mkmf.  The only library it needs
 is termcap (and jobs for 4.1).
 
 
      The makefile should be updated with mkmf.  The only library it needs
 is termcap (and jobs for 4.1).
 
-     Do not profile on 4.1.  A bug in the system causes profiling
-to stay on after an exec.
+     Window only runs on 4.2 machines.
 
 
 A few notes about the internals:
 
 
 A few notes about the internals:
index b12196c..5674e80 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)main.c      3.23 84/04/08";
+static char *sccsid = "@(#)main.c      3.24 84/04/16";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -7,6 +7,7 @@ static  char *sccsid = "@(#)main.c      3.23 84/04/08";
 #include <stdio.h>
 #include "string.h"
 #include "char.h"
 #include <stdio.h>
 #include "string.h"
 #include "char.h"
+#include "local.h"
 
 #define next(a) (*++*(a) ? *(a) : (*++(a) ? *(a) : (char *)usage()))
 
 
 #define next(a) (*++*(a) ? *(a) : (*++(a) ? *(a) : (char *)usage()))
 
@@ -61,10 +62,10 @@ char **argv;
                } else
                        (void) usage();
        }
                } else
                        (void) usage();
        }
-       nbufline = 48;                          /* compatible */
-       escapec = ctrl(p);      
+       nbufline = NLINE;
+       escapec = ESCAPEC;      
        if ((p = getenv("SHELL")) == 0)
        if ((p = getenv("SHELL")) == 0)
-               p = "/bin/csh";
+               p = SHELL;
        if ((shellfile = str_cpy(p)) == 0)
                nomem();
        if (p = rindex(shellfile, '/'))
        if ((shellfile = str_cpy(p)) == 0)
                nomem();
        if (p = rindex(shellfile, '/'))
@@ -73,9 +74,7 @@ char **argv;
                p = shellfile;
        shell[0] = p;
        shell[1] = 0;
                p = shellfile;
        shell[0] = p;
        shell[1] = 0;
-#ifndef O_4_1A
        (void) gettimeofday(&starttime, (struct timezone *)0);
        (void) gettimeofday(&starttime, (struct timezone *)0);
-#endif
        if (wwinit() < 0) {
                (void) fprintf(stderr, "%s.\n", wwerror());
                exit(1);
        if (wwinit() < 0) {
                (void) fprintf(stderr, "%s.\n", wwerror());
                exit(1);
index f9153d4..464144f 100644 (file)
@@ -1,17 +1,18 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)startup.c   3.11 84/04/09";
+static char *sccsid = "@(#)startup.c   3.12 84/04/16";
 #endif
 
 #include "defs.h"
 #include "value.h"
 #include "var.h"
 #include "char.h"
 #endif
 
 #include "defs.h"
 #include "value.h"
 #include "var.h"
 #include "char.h"
+#include "local.h"
 
 doconfig()
 {
        char buf[100];
        char *home;
 
 doconfig()
 {
        char buf[100];
        char *home;
-       static char runcom[] = ".windrc";
+       static char runcom[] = RUNCOM;
 
        if ((home = getenv("HOME")) == 0)
                home = ".";
 
        if ((home = getenv("HOME")) == 0)
                home = ".";
index 3fd4499..9b141b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     @(#)ww.h        3.30 84/04/09   
+ *     @(#)ww.h        3.31 84/04/16   
  */
 
 #include <sgtty.h>
  */
 
 #include <sgtty.h>
@@ -239,11 +239,4 @@ char *sprintf();
 #define MIN(x, y)      ((x) > (y) ? (y) : (x))
 #define MAX(x, y)      ((x) > (y) ? (x) : (y))
 
 #define MIN(x, y)      ((x) > (y) ? (y) : (x))
 #define MAX(x, y)      ((x) > (y) ? (x) : (y))
 
-#if defined(O_4_1A)||defined(O_4_1C)
-int (*sigset)();
-#define signal(s, v)   sigset((s), (v))
-#else
 #define sigmask(s)     (1 << (s) - 1)
 #define sigmask(s)     (1 << (s) - 1)
-#define sighold(s)     sigblock(sigmask(s))
-#define sigrelse(s)    sigsetmask(sigblock(0) & ~sigmask(s))
-#endif
index a9b21a4..8168be4 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwinit.c    3.17 84/04/08";
+static char *sccsid = "@(#)wwinit.c    3.18 84/04/16";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -15,19 +15,15 @@ wwinit()
        register char **p, **q;
        char **env, **termcap;
        extern char **environ;
        register char **p, **q;
        char **env, **termcap;
        extern char **environ;
+       int s;
 
 
-#ifndef O_4_1A
        wwdtablesize = getdtablesize();
        wwdtablesize = getdtablesize();
-#else
-#include <sys/param.h>
-       wwdtablesize = NOFILE;
-#endif
        wwhead.ww_forw = &wwhead;
        wwhead.ww_back = &wwhead;
 
        wwhead.ww_forw = &wwhead;
        wwhead.ww_back = &wwhead;
 
+       s = sigblock(sigmask(SIGIO));
        if (signal(SIGIO, wwrint) == BADSIG)
                return -1;
        if (signal(SIGIO, wwrint) == BADSIG)
                return -1;
-       (void) sighold(SIGIO);
 
        if (wwgettty(0, &wwoldtty) < 0)
                return -1;
 
        if (wwgettty(0, &wwoldtty) < 0)
                return -1;
@@ -154,7 +150,7 @@ wwinit()
        *q = 0;
        environ = env;
 
        *q = 0;
        environ = env;
 
-       (void) sigrelse(SIGIO);
+       (void) sigsetmask(s);
        return 0;
 bad:
        /*
        return 0;
 bad:
        /*
@@ -163,7 +159,7 @@ bad:
         */
        (void) wwsettty(0, &wwoldtty);
        (void) signal(SIGIO, SIG_DFL);
         */
        (void) wwsettty(0, &wwoldtty);
        (void) signal(SIGIO, SIG_DFL);
-       (void) sigrelse(SIGIO);
+       (void) sigsetmask(s);
        return -1;
 }
 
        return -1;
 }
 
index 5bc2086..d4c305f 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwrint.c    3.1 84/03/03";
+static char *sccsid = "@(#)wwrint.c    3.2 84/04/16";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -36,7 +36,7 @@ wwrint()
                wwnreade++;
        if (wwinterrupt() && wwsetjmp) {
                wwsetjmp = 0;
                wwnreade++;
        if (wwinterrupt() && wwsetjmp) {
                wwsetjmp = 0;
-               (void) sigrelse(SIGIO);
+               (void) sigsetmask(sigblock(0) & ~sigmask(SIGIO));
                longjmp(wwjmpbuf, 1);
        }
 }
                longjmp(wwjmpbuf, 1);
        }
 }
index b0073a9..c036b12 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwspawn.c   3.8 84/04/08";
+static char *sccsid = "@(#)wwspawn.c   3.9 84/04/16";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
-#include <signal.h>
+#include <sys/signal.h>
 
 /*
  * There is a dead lock with vfork and closing of pseudo-ports.
 
 /*
  * There is a dead lock with vfork and closing of pseudo-ports.
@@ -17,8 +17,9 @@ char **argv;
        int pid;
        int ret;
        char erred = 0;
        int pid;
        int ret;
        char erred = 0;
+       int s;
 
 
-       (void) sighold(SIGCHLD);
+       s = sigblock(sigmask(SIGCHLD));
        switch (pid = vfork()) {
        case -1:
                wwerrno = WWE_SYS;
        switch (pid = vfork()) {
        case -1:
                wwerrno = WWE_SYS;
@@ -39,12 +40,10 @@ char **argv;
                        ret = pid;
                }
        }
                        ret = pid;
                }
        }
-       (void) sigrelse(SIGCHLD);
-       /*
+       (void) sigsetmask(s);
        if (wp->ww_socket >= 0) {
                (void) close(wp->ww_socket);
                wp->ww_socket = -1;
        }
        if (wp->ww_socket >= 0) {
                (void) close(wp->ww_socket);
                wp->ww_socket = -1;
        }
-       */
        return ret;
 }
        return ret;
 }
index fe14e23..2c7b171 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwsuspend.c 3.3 83/11/02";
+static char *sccsid = "@(#)wwsuspend.c 3.4 84/04/16";
 #endif
 
 #include "ww.h"
 #include "tt.h"
 #endif
 
 #include "ww.h"
 #include "tt.h"
-#include <signal.h>
+#include <sys/signal.h>
 
 wwsuspend()
 {
 
 wwsuspend()
 {