Annotation of 42BSD/usr.lib/lib2648/sync.c, revision 1.1.1.1

1.1       root        1: /*     sync.c  4.1     83/03/09        */
                      2: /*
                      3:  * Make the screen & screen mode look like what it's supposed to.
                      4:  *
                      5:  * There are two basic things to do here, put the _pen
                      6:  * in the right place, and make the line drawing mode be right.
                      7:  * We don't sync the cursor here, only when there's user input & it's on.
                      8:  */
                      9: 
                     10: #include "2648.h"
                     11: 
                     12: sync()
                     13: {
                     14:        if (_supx != _penx || _supy != _peny) {
                     15:                escseq(ESCP);
                     16:                outchar('a');
                     17:                motion(_supx, _supy);
                     18:        }
                     19:        if (_supsmode != _actsmode) {
                     20:                escseq(ESCM);
                     21:                switch (_actsmode = _supsmode) {
                     22:                case MX:
                     23:                        outchar('3');
                     24:                        break;
                     25:                case MC:
                     26:                        outchar('1');
                     27:                        break;
                     28:                case MS:
                     29:                        outchar('2');
                     30:                        break;
                     31:                }
                     32:                outchar('a');
                     33:        }
                     34: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.