58 FILE *open_with_ext();
60 char *out_name = NULL;
63 FILE *lut_file, *rlc_file;
69 &oflag
, &out_name
, &was_basename
) == 0)
76 lut_file = open_with_ext( was_basename,
".lut" );
77 rlc_file = open_with_ext( was_basename,
".rlc" );
81 fread( &was_head,
sizeof( was_head ), 1, rlc_file );
103 for (i = 0; i < 256; i++)
105 fread(
rgb,
sizeof(
rgb ), 1, lut_file );
118 fprintf( stderr,
"wasacthrle: malloc failed\n" );
135 *pxlptr++ = was_op
.data;
138 fread( &was_op,
sizeof( was_op ), 1, rlc_file );
156 open_with_ext( basename, ext )
165 strcpy( ext_name, ext );
166 strcpy( file_name, basename );
167 strcat( file_name, ext_name );
169 if (! (f = fopen( file_name,
"r" )))
173 strcpy( file_name, basename );
175 for (; *cptr; cptr++ )
176 *cptr = toupper( *cptr );
177 strcat( file_name, ext_name );
178 f = fopen( file_name,
"r" );
FILE * rle_open_f(char *prog_name, char *file_name, char *mode)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
char * cmd_name(char **argv)
void main(int argc, char **argv)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
int scanargs(int argc, char **argv, const char *format,...)
void rle_puteof(rle_hdr *the_hdr)
void rle_putrow(rows, int rowlen, rle_hdr *the_hdr)
void rle_addhist(argv, rle_hdr *in_hdr, rle_hdr *out_hdr)
#define RLE_CLR_BIT(glob, bit)
void rle_put_setup(rle_hdr *the_hdr)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)