#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include "rle.h"
Go to the source code of this file.
void main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 54 of file wasatchrle.c.
60 char *out_name = NULL;
63 FILE *lut_file, *rlc_file;
68 if (
scanargs( argc, argv,
"% o%-outfile!s basename!s",
69 &oflag, &out_name, &was_basename ) == 0)
95 for (i = 1; i < hdr.
ncolors; i++)
103 for (i = 0; i < 256; i++)
105 fread(
rgb,
sizeof(
rgb ), 1, lut_file );
118 fprintf( stderr,
"wasacthrle: malloc failed\n" );
int scanargs(int argc, char **argv, const char *format,...)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
void rle_putrow(rle_pixel *rows[], int rowlen, rle_hdr *the_hdr)
void rle_addhist(char *argv[], rle_hdr *in_hdr, rle_hdr *out_hdr)
void rle_puteof(rle_hdr *the_hdr)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
#define RLE_CLR_BIT(glob, bit)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
FILE * open_with_ext(char *basename, char *ext)
void rle_put_setup(rle_hdr *the_hdr)
char * cmd_name(char **argv)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
FILE* open_with_ext |
( |
char * |
basename, |
|
|
char * |
ext |
|
) |
| |
Definition at line 156 of file wasatchrle.c.
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" );
static Panel_item file_name