#include <stdio.h>
#include "rle.h"
Go to the source code of this file.
Definition at line 177 of file painttorle.c.
References xlat.
  189     for( i=0; i<256; i++ )
 
  191     if( i &   1 )   
xlat[
i] = bits[0];
 
  194     if( i &   2 )   
xlat[
i] += bits[1];
 
  195     if( i &   4 )   
xlat[
i] += bits[2];
 
  196     if( i &   8 )   
xlat[
i] += bits[3];
 
  197     if( i &  16 )   
xlat[
i] += bits[4];
 
  198     if( i &  32 )   
xlat[
i] += bits[5];
 
  199     if( i &  64 )   
xlat[
i] += bits[6];
 
  200     if( i & 128 )   
xlat[
i] += bits[7];
 
 
 
 
      
        
          | void main | ( | int | argc, | 
        
          |  |  | argv |  | 
        
          |  | ) |  |  | 
      
 
Definition at line 50 of file painttorle.c.
   54     char           *in_fname = NULL,
 
   62        "% c%-red%dgreen%dblue%dalpha%d r%- o%-outfile!s infile.paint%s\n(\ 
   63 \tConvert MacPaint file to RLE.\n\ 
   64 \t-c\tSpecify \"white\" color, optionally include alpha value.\n\ 
   65 \t-r\tReverse image (foreground colored, background black).)",
 
   67            &
oflag, &out_fname, &in_fname ) == 0)
 
   83     fprintf(stderr, 
"%s: No heap space\n", hdr.
cmd);
 
   97     for (i=0; i < 720; i++)
 
#define RLE_SET_BIT(glob, bit)
int scanargs(int argc, char **argv, const char *format,...)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
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)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
void rle_put_setup(rle_hdr *the_hdr)
char * cmd_name(char **argv)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
 
 
 
      
        
          | void read_scan | ( | FILE * | infile | ) |  | 
      
 
Definition at line 111 of file painttorle.c.
  114     int in_pos, count, data_byte;
 
  120     if (count > 127) count -= 256;
 
unsigned char in_line[72]
 
 
 
Definition at line 141 of file painttorle.c.
  150     for (i = 0; i < 72; i++ )
 
  152     for (bit = 7; bit >= 0; bit--)
 
  155         outval = (outval >> 
bit) & 1; 
 
  157         outpos = i*8 + (7-
bit);
 
unsigned char in_line[72]
void rle_putrow(rle_pixel *rows[], int rowlen, rle_hdr *the_hdr)
 
 
 
      
        
          | unsigned char in_line[72] |