File: pts_lzw.h

package info (click to toggle)
sam2p 0.44-13-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,268 kB
  • ctags: 3,184
  • sloc: cpp: 14,125; ansic: 9,026; tcl: 973; sh: 555; makefile: 242; perl: 67
file content (55 lines) | stat: -rw-r--r-- 1,713 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * pts_lzw.h -- a compact LZW compressor (not uncompressor) interface
 * compiled by pts@fazekas.hu at Mon Mar  4 00:31:20 CET 2002
 */

#ifndef PTS_LZW_H
#define PTS_LZW_H 1

#ifdef __GNUC__
#pragma interface
#endif

/**** pts ****/
#ifndef ___
#if (defined(__STDC__) || defined(__cplusplus)) && !defined(NO_PROTO)
# define _(args) args
# define OF(args) args
# define ___(arg2s,arg1s,argafter) arg2s /* Dat: no direct comma allowed in args :-( */
#else
# define _(args) ()
# define OF(args) ()
# define ___(arg2s,arg1s,argafter) arg1s argafter /* Dat: no direct comma allowed in args :-( */
#endif
#endif
typedef char tbool_t;
typedef	unsigned char tidataval_t;	/* internal image data value type */
typedef	unsigned int tsize_t;		/* i/o size in bytes */
typedef int  (*tiwriter_t) OF((char *block, unsigned len, void *zfile));
struct pts_lzw_state;
struct pts_lzw_state {
	/*FILE*/void*	tif_sout;       /**** pts ****/ /* for encode */
	tiwriter_t     tif_writer;
        int (*tif_feeder)(char *readbuf, unsigned readlen, struct pts_lzw_state *tif);
#if 0
	tbool_t		tif_revbits_p;  /**** pts ****/
#endif
	tbool_t		tif_reading_p;  /**** pts ****/
	char*		tif_name;	/* name of open file, used for debugging */
/* compression scheme hooks */
	tidataval_t*	tif_data;	/* compression scheme private data */
/* input/output buffering */
        tidataval_t*    tif_rawend;     /**** pts ****/
	tidataval_t*	tif_rawdata;	/* raw data buffer */
	tsize_t		tif_rawdatasize;/* # of bytes in raw data buffer */
	tidataval_t*	tif_rawcp;	/* current spot in raw buffer */
	tsize_t		tif_rawcc;	/* bytes unread from raw buffer */
};

extern
#ifdef __cplusplus
"C"
#endif
int pts_lzw_init OF((struct pts_lzw_state*));

#endif