date and time created 89/05/23 10:06:08 by bostic
[unix-history] / usr / src / old / lib2648 / sync.c
CommitLineData
97e3edfb
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifndef lint
8static char sccsid[] = "@(#)sync.c 5.1 (Berkeley) %G%";
9#endif not lint
10
efeb513a
RC
11/*
12 * Make the screen & screen mode look like what it's supposed to.
13 *
14 * There are two basic things to do here, put the _pen
15 * in the right place, and make the line drawing mode be right.
16 * We don't sync the cursor here, only when there's user input & it's on.
17 */
18
19#include "2648.h"
20
21sync()
22{
23 if (_supx != _penx || _supy != _peny) {
24 escseq(ESCP);
25 outchar('a');
26 motion(_supx, _supy);
27 }
28 if (_supsmode != _actsmode) {
29 escseq(ESCM);
30 switch (_actsmode = _supsmode) {
31 case MX:
32 outchar('3');
33 break;
34 case MC:
35 outchar('1');
36 break;
37 case MS:
38 outchar('2');
39 break;
40 }
41 outchar('a');
42 }
43}