new signals
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Thu, 16 Jun 1983 04:51:40 +0000 (20:51 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Thu, 16 Jun 1983 04:51:40 +0000 (20:51 -0800)
SCCS-vsn: usr.bin/ex/ex_vget.c 6.4

usr/src/usr.bin/ex/ex_vget.c

index 5640277..08fc010 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 1981 Regents of the University of California */
 /* Copyright (c) 1981 Regents of the University of California */
-static char *sccsid = "@(#)ex_vget.c   6.3 %G%";
+static char *sccsid = "@(#)ex_vget.c   6.4 %G%";
 #include "ex.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
 #include "ex.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
@@ -48,6 +48,7 @@ peekbr()
 }
 
 short  precbksl;
 }
 
 short  precbksl;
+jmp_buf        readbuf;
 
 /*
  * Get a keystroke, including a ^@.
 
 /*
  * Get a keystroke, including a ^@.
@@ -102,6 +103,8 @@ getATTN:
        }
        flusho();
 again:
        }
        flusho();
 again:
+       if (setjmp(readbuf))
+               goto getATTN;
        if ((c=read(slevel == 0 ? 0 : ttyindes, &ch, 1)) != 1) {
                if (errno == EINTR)
                        goto getATTN;
        if ((c=read(slevel == 0 ? 0 : ttyindes, &ch, 1)) != 1) {
                if (errno == EINTR)
                        goto getATTN;