/* header file with various definitions */ /* this one should really be in stdio.h ... */ #ifndef NULL #define NULL ((char *) 0) #endif #define TRUE 1 #define FALSE 0 /* constants */ #define ALTINDICATOR '\05' #define MAXFUNCLEN 41 /* Maximum length of function key string */ #define BREAK_TICKS 20 /* length of break in clock() ticks (5ms * 20 = .1s) */ #define MAXSCROLLED 8 #define MAX_WIND 8 #define NFSTRINGS 42 /* number of function keys */ #define WI_WITHSLD (SIZER|UPARROW|DNARROW|VSLIDE|LFARROW|RTARROW|HSLIDE) #define WI_NOSLD (NAME|MOVER|CLOSER|FULLER) #define WI_ROWS 80 #define WI_LINES 24 #define WI_WCHAR 8 #define WI_HCHAR 16 #define WI_WPIX (WI_ROWS*WI_WCHAR+16) #define WI_WWORDS ((WI_WPIX+15)/16) #define WI_HPIX (WI_LINES*WI_HCHAR) #define WI_SIZE ((long)WI_WWORDS*WI_HPIX*2) #define XON '\021' #define XOFF '\023' #define xmitcmd(x) { Bconout(1, IAC); Bconout(1, CB_DIR_MTOH|x); } #define MINMAX(x, y, z) ( xz ? z :x) ) #define HASHBITS 9 /* number of bits of hash for character lookup*/ #define FM_INVERT 12 /* logic parameter to copy_fm */ #define FM_COPY 3 /* copy source to dest */ #define X0 1 #define Y0 1 /* emulation FSM states */ #define S_NORMAL 0 #define S_ESC 1 #define S_ESC1 2 #define S_ESC2 3 #define S_ESC3 4 #define S_STATUS 5 #define S_ESCA 6 #define min(a,b) ( a < b ? a : b ) #define max(a,b) ( a > b ? a : b ) /* data types used */ typedef struct mfdb { short *ptr; /* ptr to memory holding the image */ short wpix; /* width in pixels */ short hpix; /* height in pixels */ short wwords; /* width in words */ short format; /* 0 for machine-dependent */ short planes; /* 1 for hires screen */ } MFDB; typedef struct { unsigned char h_t[1< #include #include #include #include #include #ifndef __NO_PROTO__ /* kermit.c */ int kerminit ( int curwin ); int kermterm ( void ); int kermtimchk ( void ); int sendsw ( void ); int sinit ( void ); int sfile ( void ); int sdata ( void ); int seof ( void ); int sbreak ( void ); int recsw ( void ); int rinit ( void ); int rfile ( void ); int rdata ( void ); int spack ( int type , int num , int len , char *data ); int rpack ( int *len , int *num , char *data ); int bufill ( char buffer []); int bufemp ( char buffer [], int len ); int gnxtfl ( void ); int spar ( char data []); int rpar ( char data []); /* int printmsg ( char *fmt , int a1 , int a2 , int a3 , int a4 , int a5 ); */ int prerrpkt ( char *msg ); /* winhash.c */ int char_at ( int wdes , int x_loc , int y_loc ); int which_char ( FNT *font , HTBL *htbl , char *pa ); void gen_hash ( FNT *font , HTBL *htbl ); int hash_char ( char *pa , int height ); int dump_line ( int wdes , int y_coord ); int dump_window ( int wdes ); int copy_word ( int wdes , int x1 , int y1 , char *buffer ); int copy_text ( int wdes , int x1 , int y1 , int x2 , int y2 , char *buffer ); /* winio.c */ FNT *loadfont ( char *name ); int read_config ( char *path , char *name ); int write_config ( char *path , char *name ); int setcapture ( WI_STR *wp ); int getrsconf ( void ); int setrsconf ( void ); void rsbufset ( int bufsiz ); /* winmain.c */ char *locate ( char *name ); int startup ( void ); int finish ( void ); int memory ( void ); int main ( void ); int printer_mark ( int wnd ); int s_dial ( int tree , int action ); int set_menu_string ( char *newstr , int object ); int size_dial ( void ); /* winproc.c */ int do_exec ( void ); int do_path ( void ); /* winproto.c */ int proto_out ( int outport , char *str , int length ); int proto_close ( int curwind ); int proto_in ( void ); /* winsubr.c */ char *getmem ( long size ); #ifndef __GNUC__ int bzero ( char *ptr , long size ); #endif int find_port ( int wnd ); int find_wind ( int port ); int w_open ( int port , char *name , int xsiz , int ysiz ); int w_closei ( int wdes ); int w_close ( int wdes ); int w_resize ( int wdes , int xsiz , int ysiz ); int w_rename ( int wdes , char *name ); int w_redraw ( int wdes , int logic , int xx , int yy , int ww , int hh ); int w_update ( int wdes , int logic , int xx , int yy , int ww , int hh ); int w_move ( int wdes , int xx , int yy , int ww , int hh ); int w_top ( int win ); int w_bottom ( void ); int w_hide ( void ); int w_shrink ( int wdes ); int w_full ( int wdes ); int w_arrow ( int wdes , int arrow ); int w_slide ( int wdes , int hor , int val ); int sethslide ( int wdes ); int setvslide ( int wdes ); int w_flash ( int wdes , int state ); int w_output ( int wdes , char *ptr ); int lineerase ( struct wi_str *wp , int first , int last ); int scrollup ( struct wi_str *wp , int first , int nlines , int amount ); int scrolldn ( struct wi_str *wp , int first , int nlines , int amount ); #endif /* __NO_PROTO__ */ #endif /* __GNUC__ */