/* This program may be freely distributed , copied,and modified so long as a fee is not charged. However, I reserve all rights available to me under The Copyright Act. If you find any bugs please feel free to contact me. David DeGeorge Princeton,New Jersey March 1987 USENET: ....princeton!idacrd!dld COMPUSERVE: 74176,3210 GENIE: DEGEORGE */ #include #include enum error { FATAL,WARN,NOMEM,USAGE}; typedef enum error ERROR; #define nullnes(a,b) if((a)==NULL)error(b,NOMEM) #define MAXSTR 400 #define MAXIMG 400 #define TRUE 1 #define FALSE 0 /* defines for access() */ #define EXISTS 0 #define CANREAD 4 #define CANWRITE 2 typedef struct rshdr { int rsh_vrsn; int rsh_object; int rsh_tedinfo; int rsh_iconblk; /* list of ICONBLKS */ int rsh_bitblk; int rsh_frstr; int rsh_string; int rsh_imdata; /* image data */ int rsh_frimg; int rsh_trindex; int rsh_nobs; /* counts of various structs */ int rsh_ntree; int rsh_nted; int rsh_nib; int rsh_nbb; int rsh_nstring; int rsh_nimages; int rsh_rssize; /* total bytes in resource */ } RSHDR; #ifndef MAIN #ifdef GEM extern int contrl[],intin[],ptsin[],intout[],ptsout[]; extern int work_out[]; extern int work_in[]; extern int handle; #endif extern RSHDR rheader; extern BITBLK *bitblks; extern ICONBLK *iconblks; extern TEDINFO *teds; extern OBJECT *objs; extern int curimage ; extern char *types[]; extern char *head; extern long *stradds,*bbadds; extern FILE *in,*out; extern int strmax,nstrings,nimages; #endif long findstr(),makeimage(),findbb(); char * realloc(),*malloc();