home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TopWare 18: Liquid
/
Image.iso
/
liquid
/
top1089
/
rdsgen.h
< prev
next >
Wrap
Text File
|
1993-12-14
|
3KB
|
112 lines
#define LOCAL static
#define IMPORT extern
#define FAST register
#define WORD int
#define UWORD int
#define ULONG long
#define UTINY unsigned char
#define OUT_OF_MEMORY -10
#define BAD_CODE_SIZE -20
#define READ_ERROR -1
#define WRITE_ERROR -2
#define OPEN_ERROR -3
#define CREATE_ERROR -4
#define MAX_CODES 4095
#define TRUE 1
#define FALSE 0
#define PR_OUT 0
#define LPT1 0
#define LPT2 1
#ifndef min
#define min(a,b) ((a>b) ? b : a)
#endif
#define BITS 12
#define MSDOS 1
#define HSIZE 5003 /* 80% occupancy */
#ifdef NO_UCHAR
typedef char char_type;
#else
typedef unsigned char char_type;
#endif /* UCHAR */
#define ARGVAL() (*++(*argv) || (--argc && *++argv))
#ifdef COMPATIBLE /* But wrong! */
# define MAXCODE(n_bits) ((code_int) 1 << (n_bits) - 1)
#else
# define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1)
#endif /* COMPATIBLE */
#define HashTabOf(i) htab[i]
#define CodeTabOf(i) codetab[i]
#define tab_prefixof(i) CodeTabOf(i)
#define tab_suffixof(i) ((char_type *)(htab))[i]
#define de_stack ((char_type *)&tab_suffixof((code_int)1<<BITS))
#define test_exit if (kbhit()) if(getch() == 27) {closegraph(); printf("Program terminated by user\n"); exit(1);}
typedef int (* ifunptr)();
typedef int code_int;
#ifdef SIGNED_COMPARE_SLOW
typedef unsigned long int count_int;
typedef unsigned short int count_short;
#else
typedef long int count_int;
#endif
/* */
/* Function prototypes */
/* */
void error(char *, ...);
void open_targa_file(char *, unsigned int, unsigned int);
void write_targa_line(unsigned int);
unsigned int get_value();
void read_data_line(int);
void gen_rds_line(int);
void add_index(int);
int get_pix(int, int);
void read_header_data(unsigned *, unsigned *);
void add_line(int, int);
void beep();
void showparms();
void TGAEncode(char *, int, int);
int GIFNextPixel(ifunptr);
void GIFEncode(char *,int, int, int, int, int, int [], int [], int [], ifunptr);
void Putword(int w, FILE *fp );
void output(code_int code );
void cl_block();
void cl_hash(register count_int hsize);
void writeerr();
void char_init();
void char_out(int c );
void flush_char();
int ialloc_gif_stacks();
void ifree_gif_stacks();
int iinit_gif_idecoder();
int idecode_gif();
int iget_byte();
int iget_next_code();
void read_background_header(unsigned *, unsigned *);
int balloc_gif_stacks();
void bfree_gif_stacks();
int binit_gif_idecoder();
int bdecode_gif();
int bget_byte();
int bget_next_code();
unsigned int bget_map();
void printout();
void epsonout();
void hewlettout();