28 char rcsid[] =
"$Header: /l/spencer/src/urt/tools/RCS/rlegrid.c,v 3.0.1.1 1992/04/30 14:12:01 spencer Exp $";
59 char *outfname = NULL;
60 int oflag = 0, sflag=0, wflag=0, fflag=0, bflag=0, cflag=0;
61 int xsize=512, ysize=512, width=16, fg_color=255, bg_color=0;
73 "% o%-outfile!s s%-xsize!dysize!d w%-width!d f%-fg_color!d b%-bg_color!d c%-",
75 &sflag
, &xsize
, &ysize
,
93 out_hdr
.xmax = xsize -1;
94 out_hdr
.ymax = ysize -1;
118 *nrawp[0] = *nrawp[1] = 0;
119 for(x=0; x<xsize;x+=2*width)
125 p->u.run_val = fg_color;
126 q->u.run_val = bg_color;
127 (*nrawp[0])++; (*nrawp[1])++;
132 p
->length = (x+width < xsize) ? width : (xsize-x);
134 p->u.run_val = bg_color;
135 q->u.run_val = fg_color;
136 (*nrawp[0])++; (*nrawp[1])++;
147 p->u.run_val = fg_color;
153 for(x=0; x<xsize;x+=width)
164 p
->length = (x+width < xsize) ? width-1 : (xsize-x);
165 p->u.run_val = bg_color;
172 for ( y = 0; y < ysize; y++ )
174 i = (cflag) ? ((y/width) %2) : ((y %width) != 0);
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)
int rle_raw_alloc(rle_hdr *the_hdr, rle_op ***scanp, int **nrawp)
char * cmd_name(char **argv)
void main(int argc, char **argv)
void rle_putraw(rle_op **scanraw, int *nraw, rle_hdr *the_hdr)
int scanargs(int argc, char **argv, const char *format,...)
void rle_puteof(rle_hdr *the_hdr)
void rle_addhist(argv, rle_hdr *in_hdr, rle_hdr *out_hdr)
void rle_put_setup(rle_hdr *the_hdr)
void rle_raw_free(rle_hdr *the_hdr, rle_op **scanp, nrawp)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
#define RLE_CHECK_ALLOC(pgm, ptr, name)