File:  [OS/2 SDKs] / os2sdk / demos / apps / sse / ssedefs.h
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:05 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
Microsoft OS/2 SDK 03-01-1988

/*  Created by Microsoft Corp. 1987  */

#define  FBUFFSIZE (1024 * 8)
#define  HEADERSIZE 8
#define  LINESIZE   80
#define  MAXLINES   4096
#define  MAXSEGS    100
#define  NOTSHARED  0
#define  SHORTPAGE  24
#define  LONGPAGE   42
#define  SEGSIZE   (1024 * 4)
#define  TABSIZE    8
#define  MAXTABS   (LINESIZE / TABSIZE)
#define  FOFLAG     0x0001  /* set openflag to open file or fail */
#define  CFFLAG     0x0010  /* set openflag to create file or fail */
#define  WCFLAG     0x0012  /* set openflag to replace or create file */

#define  inline(U, U1) ( ((unsigned char)U <  (unsigned char)LINESIZE) &&   \
			 ((unsigned char)U >= (unsigned char)U1) )


struct Line {
    USHORT linenum;		     /* line number (only valid during
					 compaction) */
    UCHAR  deleted;		     /* flag to mark line as deleted */
    UCHAR  linelength;		     /* characters in line */
    char	   firstchar[1];      /* first character in line */
};

extern USHORT  TotalLines;	    /* num of entries in line table */
extern struct Line far *LineTable[MAXLINES]; /* the line table */

struct SegEntry{
    SEL segment;	      /* seletor of segment */
    USHORT free;	      /* num of free bytes in segment */
    USHORT flags;	      /* various flags */
};
extern USHORT	TotalSegs;	     /* num of entries in seg table */
extern struct  SegEntry SegTable[MAXSEGS];

extern char	      fbuffer[FBUFFSIZE];
extern USHORT bufflength;
extern USHORT bytesread;

extern UCHAR ScrBuff[LONGPAGE][LINESIZE];
extern UCHAR EditBuff[LINESIZE];
extern USHORT EditBuffDirty;

extern USHORT PageSize;
extern USHORT Mode43Set;

extern USHORT CurRow, CurCol;
extern USHORT TopRow;

extern USHORT LinesMarked, CharsMarked;
extern USHORT MarkedLine[MAXLINES], MarkedChar[LINESIZE];

extern USHORT ForeNorm, BackNorm, ForeHilite, BackHilite, Fore25, Back25;

extern char	      *fname;
extern USHORT fhandle;

extern void  dispatch();
extern short readfile(USHORT);
extern short openfile(char *, USHORT *, USHORT);
extern void  closefile(USHORT);
extern short addline(USHORT, UCHAR, UCHAR[]);
extern void  freesegs();
extern void  clearscr();
extern void  drawscr(USHORT);
extern SHORT allocseg();
extern void  getline(USHORT, UCHAR *);
extern void  del();

unix.superglobalmegacorp.com

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