rip out SHELL_ESCAPE define
[unix-history] / usr / src / usr.bin / window / wwrint.c
index a98cf87..7630927 100644 (file)
@@ -1,13 +1,24 @@
-#ifndef lint
-static char sccsid[] = "@(#)wwrint.c   3.4 %G%";
-#endif
-
 /*
 /*
- * Copyright (c) 1983 Regents of the University of California,
- * All rights reserved.  Redistribution permitted subject to
- * the terms of the Berkeley Software License Agreement.
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
  */
 
+#ifndef lint
+static char sccsid[] = "@(#)wwrint.c   3.7 (Berkeley) %G%";
+#endif /* not lint */
+
 #include "ww.h"
 #include <fcntl.h>
 #include <sys/signal.h>
 #include "ww.h"
 #include <fcntl.h>
 #include <sys/signal.h>
@@ -15,8 +26,7 @@ static char sccsid[] = "@(#)wwrint.c  3.4 %G%";
 /*
  * Tty input interrupt handler.
  * (1) Read input into buffer (wwib*).
 /*
  * Tty input interrupt handler.
  * (1) Read input into buffer (wwib*).
- * (2) If the flag wwsetjmp is true, do longjmp(wwjmpbuf) for asyncronous
- *     actions, and to avoid race conditions, clear wwsetjmp.
+ * (2) Set the interrupt flag if anything is read.
  * Currently, the last is used to get out of the blocking
  * select() in wwiomux().
  * To avoid race conditions, we only modify wwibq in here, except
  * Currently, the last is used to get out of the blocking
  * select() in wwiomux().
  * To avoid race conditions, we only modify wwibq in here, except
@@ -36,13 +46,9 @@ wwrint()
        if (n > 0) {
                wwibq += n;
                wwnreadc += n;
        if (n > 0) {
                wwibq += n;
                wwnreadc += n;
+               wwsetintr();
        } else if (n == 0)
                wwnreadz++;
        else
                wwnreade++;
        } else if (n == 0)
                wwnreadz++;
        else
                wwnreade++;
-       if (wwinterrupt() && wwsetjmp) {
-               wwsetjmp = 0;
-               (void) sigsetmask(sigblock(0) & ~sigmask(SIGIO));
-               longjmp(wwjmpbuf, 1);
-       }
 }
 }