|
|
1.1.1.2 ! root 1: /* Created by Microsoft Corp. 1987 */ ! 2: 1.1 root 3: #define FBUFFSIZE (1024 * 8) 4: #define HEADERSIZE 8 5: #define LINESIZE 80 6: #define MAXLINES 4096 7: #define MAXSEGS 100 8: #define NOTSHARED 0 9: #define SHORTPAGE 24 10: #define LONGPAGE 42 11: #define SEGSIZE (1024 * 4) 12: #define TABSIZE 8 13: #define MAXTABS (LINESIZE / TABSIZE) 14: #define FOFLAG 0x0001 /* set openflag to open file or fail */ 15: #define CFFLAG 0x0010 /* set openflag to create file or fail */ 16: #define WCFLAG 0x0012 /* set openflag to replace or create file */ 17: 18: #define inline(U, U1) ( ((unsigned char)U < (unsigned char)LINESIZE) && \ 19: ((unsigned char)U >= (unsigned char)U1) ) 20: 21: 22: struct Line { 1.1.1.2 ! root 23: USHORT linenum; /* line number (only valid during 1.1 root 24: compaction) */ 1.1.1.2 ! root 25: UCHAR deleted; /* flag to mark line as deleted */ ! 26: UCHAR linelength; /* characters in line */ 1.1 root 27: char firstchar[1]; /* first character in line */ 28: }; 29: 1.1.1.2 ! root 30: extern USHORT TotalLines; /* num of entries in line table */ 1.1 root 31: extern struct Line far *LineTable[MAXLINES]; /* the line table */ 32: 33: struct SegEntry{ 1.1.1.2 ! root 34: SEL segment; /* seletor of segment */ ! 35: USHORT free; /* num of free bytes in segment */ ! 36: USHORT flags; /* various flags */ 1.1 root 37: }; 1.1.1.2 ! root 38: extern USHORT TotalSegs; /* num of entries in seg table */ 1.1 root 39: extern struct SegEntry SegTable[MAXSEGS]; 40: 41: extern char fbuffer[FBUFFSIZE]; 1.1.1.2 ! root 42: extern USHORT bufflength; ! 43: extern USHORT bytesread; 1.1 root 44: 1.1.1.2 ! root 45: extern UCHAR ScrBuff[LONGPAGE][LINESIZE]; ! 46: extern UCHAR EditBuff[LINESIZE]; ! 47: extern USHORT EditBuffDirty; 1.1 root 48: 1.1.1.2 ! root 49: extern USHORT PageSize; ! 50: extern USHORT Mode43Set; 1.1 root 51: 1.1.1.2 ! root 52: extern USHORT CurRow, CurCol; ! 53: extern USHORT TopRow; 1.1 root 54: 1.1.1.2 ! root 55: extern USHORT LinesMarked, CharsMarked; ! 56: extern USHORT MarkedLine[MAXLINES], MarkedChar[LINESIZE]; 1.1 root 57: 1.1.1.2 ! root 58: extern USHORT ForeNorm, BackNorm, ForeHilite, BackHilite, Fore25, Back25; 1.1 root 59: 60: extern char *fname; 1.1.1.2 ! root 61: extern USHORT fhandle; 1.1 root 62: 63: extern void dispatch(); 1.1.1.2 ! root 64: extern short readfile(USHORT); ! 65: extern short openfile(char *, USHORT *, USHORT); ! 66: extern void closefile(USHORT); ! 67: extern short addline(USHORT, UCHAR, UCHAR[]); 1.1 root 68: extern void freesegs(); 69: extern void clearscr(); 1.1.1.2 ! root 70: extern void drawscr(USHORT); ! 71: extern SHORT allocseg(); ! 72: extern void getline(USHORT, UCHAR *); 1.1 root 73: extern void del();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.