Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/compiler/scpack.c File Reference

#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Defines

#define MAXSIZE   UINT_MAX
#define HASHSIZE   8192
#define THRESHOLD   3
#define START_TOKEN   "#ifdef SCPACK"
#define NAME_TOKEN   "#define SCPACK_TABLE"
#define SEP_TOKEN   "#define SCPACK_SEPARATOR"
#define TERM_TOKEN   "#define SCPACK_TERMINATOR"
#define TEMPFILE   "~SCPACK.TMP"

Functions

int compress (unsigned char *buffer, unsigned buffersize, unsigned char pairtable[128][2])
int strmatch (char *str, char *token, int *indent)
void check_if (char *str, int linenr)
int check_tablename (char *str)
int check_separator (char *str)
unsigned readbuffer (FILE *input, unsigned char *buffer)
void write_pairtable (FILE *output, unsigned char pairtable[128][2], char *tablename)
void writefile (FILE *input, FILE *output, unsigned char *buffer, unsigned buffersize, unsigned char pairtable[128][2])
void usage (void)
int main (int argc, char **argv)

Variables

char tablename [32+1] = "scpack_table"
char separator [16] = ","
char terminator [16] = ""

Define Documentation

#define HASHSIZE   8192
 

#define MAXSIZE   UINT_MAX
 

#define NAME_TOKEN   "#define SCPACK_TABLE"
 

#define SEP_TOKEN   "#define SCPACK_SEPARATOR"
 

#define START_TOKEN   "#ifdef SCPACK"
 

#define TEMPFILE   "~SCPACK.TMP"
 

#define TERM_TOKEN   "#define SCPACK_TERMINATOR"
 

#define THRESHOLD   3
 


Function Documentation

void check_if char *    str,
int    linenr
[static]
 

int check_separator char *    str [static]
 

int check_tablename char *    str [static]
 

int compress unsigned char *    buffer,
unsigned    buffersize,
unsigned char    pairtable[128][2]
 

int main int    argc,
char **    argv
 

unsigned readbuffer FILE *    input,
unsigned char *    buffer
 

int strmatch char *    str,
char *    token,
int *    indent
[static]
 

void usage void    [static]
 

void write_pairtable FILE *    output,
unsigned char    pairtable[128][2],
char *    tablename
[static]
 

void writefile FILE *    input,
FILE *    output,
unsigned char *    buffer,
unsigned    buffersize,
unsigned char    pairtable[128][2]
 


Variable Documentation

char separator[16] = "," [static]
 

char tablename[32+1] = "scpack_table" [static]
 

char terminator[16] = "" [static]
 

SourceForge.net Logo