-/* Copyright (c) 1980 Regents of the University of California */
-static char *sccsid = "@(#)ex_vget.c 4.2 %G%";
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char *sccsid = "@(#)ex_vget.c 6.13 (Berkeley) 9/11/89";
+#endif not lint
+
- if (read(slevel == 0 ? 0 : ttyindes, &ch, 1) != 1) {
+ if (setjmp(readbuf))
+ goto getATTN;
+ doingread = 1;
+#ifndef vms
+ c = read(slevel == 0 ? 0 : ttyindes, &ch, 1);
+#else
+ c = vms_read(slevel == 0 ? 0 : ttyindes, &ch, 1);
+#endif
+ doingread = 0;
+ if (c != 1) {
if (trace)
fprintf(trace, "macpush(%s), canundo=%d\n",st,canundo);
#endif
if (trace)
fprintf(trace, "macpush(%s), canundo=%d\n",st,canundo);
#endif
s, undkind, vundkind, lineno(unddel), lineno(undap1), lineno(undap2));
fprintf(trace, " undadot=%d, dot=%d, dol=%d, unddol=%d, truedol=%d\n",
lineno(undadot), lineno(dot), lineno(dol), lineno(unddol), lineno(truedol));
s, undkind, vundkind, lineno(unddel), lineno(undap1), lineno(undap2));
fprintf(trace, " undadot=%d, dot=%d, dol=%d, unddol=%d, truedol=%d\n",
lineno(undadot), lineno(dot), lineno(dol), lineno(unddol), lineno(truedol));
- fprintf(trace, " [");
- for (p=zero+1; p<=truedol; p++)
+ fprintf(trace, " [\n");
+ CP(savelb, linebuf);
+ fprintf(trace, "linebuf = '%s'\n", linebuf);
+ for (p=zero+1; p<=truedol; p++) {
- fprintf(trace,"[OK]",c);
+ fprintf(trace,"\nfastpeekkey: ");
+#endif
+ Oint = signal(SIGINT, trapalarm);
+ CATCH
+ if (value(TIMEOUT) && inopen >= 0) {
+ signal(SIGALRM, trapalarm);
+#ifdef MDEBUG
+ alarm(10);
+ if (trace)
+ fprintf(trace, "set alarm ");
+#else
+ alarm(1);