30 int x_len, y_len, x_off = 0, y_off = 0;
31 int i, j, map_offset ;
34 char * filename = NULL;
39 gescape_arg arg1, arg2;
42 "% pP%-xpos!dypos!d O%- d%-display!s x%-driver!s infile%s",
43 &pos_flag, &x_off, &y_off, &over_flag,
64 clip_indicator( fildes, CLIP_OFF );
67 gescape( fildes, SWITCH_SEMAPHORE, &arg1, &arg2 );
70 shade_mode( fildes, CMAP_FULL, 0 );
77 for (i = 0; i < 256; i++)
79 colors[
i][0] = (float) ((hdr.
cmap[i] >>8) & 0xFF)
81 colors[
i][1] = (float) ((hdr.
cmap[i+map_offset] >>8)
83 colors[
i][2] = (float) ((hdr.
cmap[i+2*map_offset]>>8)
90 for (i = 0; i < 256; i++)
92 tmp = (float) ((hdr.
cmap[i] >> 8) * 0xFF);
100 fprintf(stderr,
"%s: Sorry, don't grock %d channel color maps\n",
108 for (i = 0; i < 256; i++)
110 tmp = (float) i / 255.0;
116 define_color_table( fildes, 0, 256, colors );
124 x_off = hdr.
xmin + x_off;
146 for ( i = 0; i < y_len ; i ++)
153 bank_switch( fildes, 2-j, 0 );
154 dcblock_write( fildes, x_off, y_off - i,
155 x_len, 1, scan[j], 0 );
161 bank_switch( fildes, 2-j, 1 );
162 dcblock_write( fildes, x_off, y_off - i,
163 x_len, 1, scan[0], 0 );
int scanargs(int argc, char **argv, const char *format,...)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
char * cmd_name(char **argv)
void rle_get_setup_ok(rle_hdr *the_hdr, const char *prog_name, const char *file_name)
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
#define RLE_CHECK_ALLOC(pgm, ptr, name)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)