date and time created 83/03/09 16:23:07 by ralph
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 10 Mar 1983 08:23:07 +0000 (00:23 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 10 Mar 1983 08:23:07 +0000 (00:23 -0800)
SCCS-vsn: old/lib2648/printg.c 4.1

usr/src/old/lib2648/printg.c [new file with mode: 0644]

diff --git a/usr/src/old/lib2648/printg.c b/usr/src/old/lib2648/printg.c
new file mode 100644 (file)
index 0000000..7ac4636
--- /dev/null
@@ -0,0 +1,33 @@
+/*     printg.c        4.1     83/03/09        */
+
+#include "2648.h"
+
+printg()
+{
+       int oldvid = _video;
+       int c, c2;
+
+       if (oldvid==INVERSE)
+               togvid();
+       sync();
+       escseq(NONE);
+       outstr("\33&p4d5u0C");
+       outchar('\21'); /* test handshaking fix */
+
+       /*
+        * The terminal sometimes sends back S<cr> or F<cr>.
+        * Ignore them.
+        */
+       fflush(stdout);
+       c = getchar();
+       if (c=='F' || c=='S') {
+               c2 = getchar();
+               if (c2 != '\r' && c2 != '\n')
+                       ungetc(c2, stdin);
+       } else {
+               ungetc(c, stdin);
+       }
+
+       if (oldvid==INVERSE)
+               togvid();
+}