Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
gifencode.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for gifencode.c:

Macros

#define ARGS(alist)   ()
 
#define BITS   12 /* largest code size */
 
#define HSIZE   5003 /* hash table size */
 
#define put_byte(A)   (*put_b)((byte)(A)); Nbyte++
 
#define SHIFT   4 /* shift for hashing */
 
#define THELIMIT   4096 /* NEVER generate this */
 

Typedefs

typedef unsigned char byte
 

Functions

static void char_flush ()
 
static void char_init ()
 
static void char_out ()
 
static void char_out (int c)
 
long GIFencode (int Width, int Height, int Ncol, byte R[], byte G[], byte B[], byte ScLine[], void(*get_scline)(), void(*pb)())
 
static void output ()
 
static void output (int code)
 
static void put_short ()
 
static void put_short (int word)
 

Variables

static int a_count
 
static char accum [256]
 
static int BitsPixel
 
static int ClearCode
 
static int CodeTab [5003]
 
static unsigned long cur_accum
 
static int cur_bits
 
static int CurCodeSize
 
static int CurMaxCode
 
static int EOFCode
 
static int FreeCode
 
static long HashTab [5003]
 
static int IniCodeSize
 
static unsigned long masks []
 
static long Nbyte
 
static void(* put_b )()
 

Macro Definition Documentation

◆ ARGS

#define ARGS (   alist)    ()

Definition at line 10 of file gifencode.c.

◆ BITS

#define BITS   12 /* largest code size */

Definition at line 13 of file gifencode.c.

◆ HSIZE

#define HSIZE   5003 /* hash table size */

Definition at line 15 of file gifencode.c.

◆ put_byte

#define put_byte (   A)    (*put_b)((byte)(A)); Nbyte++

Definition at line 18 of file gifencode.c.

◆ SHIFT

#define SHIFT   4 /* shift for hashing */

Definition at line 16 of file gifencode.c.

◆ THELIMIT

#define THELIMIT   4096 /* NEVER generate this */

Definition at line 14 of file gifencode.c.

Typedef Documentation

◆ byte

typedef unsigned char byte

Definition at line 20 of file gifencode.c.

Function Documentation

◆ char_flush()

static void char_flush ( )
static

Definition at line 285 of file gifencode.c.

◆ char_init()

static void char_init ( )
static

Definition at line 271 of file gifencode.c.

◆ char_out() [1/2]

static void char_out ( )
static

◆ char_out() [2/2]

static void char_out ( int  c)
static

Definition at line 278 of file gifencode.c.

◆ GIFencode()

long GIFencode ( int  Width,
int  Height,
int  Ncol,
byte  R[],
byte  G[],
byte  B[],
byte  ScLine[],
void(*)()  get_scline,
void(*)()  pb 
)

Definition at line 63 of file gifencode.c.

◆ output() [1/2]

static void output ( )
static

◆ output() [2/2]

static void output ( int  code)
static

Definition at line 224 of file gifencode.c.

◆ put_short() [1/2]

static void put_short ( )
static

◆ put_short() [2/2]

static void put_short ( int  word)
static

Definition at line 297 of file gifencode.c.

Variable Documentation

◆ a_count

int a_count
static

Definition at line 207 of file gifencode.c.

◆ accum

char accum[256]
static

Definition at line 208 of file gifencode.c.

◆ BitsPixel

int BitsPixel
static

Definition at line 25 of file gifencode.c.

◆ ClearCode

int ClearCode
static

Definition at line 29 of file gifencode.c.

◆ CodeTab

int CodeTab[5003]
static

Definition at line 23 of file gifencode.c.

◆ cur_accum

unsigned long cur_accum
static

Definition at line 205 of file gifencode.c.

◆ cur_bits

int cur_bits
static

Definition at line 206 of file gifencode.c.

◆ CurCodeSize

int CurCodeSize
static

Definition at line 27 of file gifencode.c.

◆ CurMaxCode

int CurMaxCode
static

Definition at line 28 of file gifencode.c.

◆ EOFCode

int EOFCode
static

Definition at line 30 of file gifencode.c.

◆ FreeCode

int FreeCode
static

Definition at line 31 of file gifencode.c.

◆ HashTab

long HashTab[5003]
static

Definition at line 22 of file gifencode.c.

◆ IniCodeSize

int IniCodeSize
static

Definition at line 26 of file gifencode.c.

◆ masks

unsigned long masks[]
static
Initial value:
= { 0x0000,
0x0001, 0x0003, 0x0007, 0x000F,
0x001F, 0x003F, 0x007F, 0x00FF,
0x01FF, 0x03FF, 0x07FF, 0x0FFF,
0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF }

Definition at line 209 of file gifencode.c.

◆ Nbyte

long Nbyte
static

Definition at line 33 of file gifencode.c.

◆ put_b

void(* put_b) () ( )
static

Definition at line 34 of file gifencode.c.