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

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

diff --git a/usr/src/old/lib2648/sync.c b/usr/src/old/lib2648/sync.c
new file mode 100644 (file)
index 0000000..55a6c74
--- /dev/null
@@ -0,0 +1,34 @@
+/*     sync.c  4.1     83/03/09        */
+/*
+ * Make the screen & screen mode look like what it's supposed to.
+ *
+ * There are two basic things to do here, put the _pen
+ * in the right place, and make the line drawing mode be right.
+ * We don't sync the cursor here, only when there's user input & it's on.
+ */
+
+#include "2648.h"
+
+sync()
+{
+       if (_supx != _penx || _supy != _peny) {
+               escseq(ESCP);
+               outchar('a');
+               motion(_supx, _supy);
+       }
+       if (_supsmode != _actsmode) {
+               escseq(ESCM);
+               switch (_actsmode = _supsmode) {
+               case MX:
+                       outchar('3');
+                       break;
+               case MC:
+                       outchar('1');
+                       break;
+               case MS:
+                       outchar('2');
+                       break;
+               }
+               outchar('a');
+       }
+}