#include <math.h>
#include <stdio.h>
|
| #define | N1 11 /* maximum codeword size in bits (V.42bis App II.1) */ |
| |
| #define | N2 (1<<N1) /* maximum number of codewords */ |
| |
| #define | N3 8 /* character size in bits */ |
| |
| #define | N4 (1<<N3) /* number of characters in alphabet */ |
| |
| #define | N5 |
| |
| #define | N6 3 /* number of control codewords */ |
| |
| #define | N7 250 /* maximum string length */ |
| |
| #define | ETM 0 /* Enter transparent mode */ |
| |
| #define | FLUSH 1 /* Flush data */ |
| |
| #define | STEPUP 2 /* Step up codeword size */ |
| |
| #define | ECM 0 /* Enter compress mode */ |
| |
| #define | EID 1 /* Escape character in data */ |
| |
| #define | RESET 2 /* Force reinitialization */ |
| |
| #define | C_INIT (-1) |
| |
| #define | C_ERROR (-2) |
| |
| #define | C_DATA (-3) |
| |
| #define | C_TRANSFER (-4) |
| |
| #define | C_FLUSH (-5) |
| |
| #define | C_STOP (-6) /* not part of V42 spec */ |
| |
| #define C_STOP (-6) /* not part of V42 spec */ |
| #define EID 1 /* Escape character in data */ |
| #define ETM 0 /* Enter transparent mode */ |
| #define FLUSH 1 /* Flush data */ |
| #define N1 11 /* maximum codeword size in bits (V.42bis App II.1) */ |
| #define N2 (1<<N1) /* maximum number of codewords */ |
| #define N3 8 /* character size in bits */ |
| #define N4 (1<<N3) /* number of characters in alphabet */ |
Value:
#define N6
Definition: v42.c:16
#define N4
Definition: v42.c:12
Referenced by add_dict(), and init_dict().
| #define N6 3 /* number of control codewords */ |
| #define N7 250 /* maximum string length */ |
| #define RESET 2 /* Force reinitialization */ |
| #define STEPUP 2 /* Step up codeword size */ |
| void add_dict |
( |
unsigned long |
string, |
|
|
unsigned char |
data |
|
) |
| |
References add_dict(), C_DATA, C_ERROR, C_FLUSH, C_INIT, C_STOP, C_TRANSFER, dict::data, ECM, EID, ETM, FLUSH, getcode(), init_dict(), N3, N6, N7, dict::parent, putdata(), RESET, s, search_dict(), and STEPUP.
Referenced by main().
References add_dict(), c2, C_DATA, C_ERROR, C_FLUSH, C_INIT, C_STOP, C_TRANSFER, checksize_dict(), dict::data, ECM, EID, ETM, FLUSH, getdata(), init_dict(), N3, N4, N6, N7, putcode(), RESET, and search_dict().
Referenced by main(), and usi.cci.parameter::write().
References dict::data, dict::kids, last, N2, N3, N4, N5, N6, dict::parent, and dict::sibling.
Referenced by decode(), and encode().
| void putcode |
( |
unsigned long |
code, |
|
|
int |
size |
|
) |
| |
| unsigned long search_dict |
( |
unsigned long |
string, |
|
|
unsigned char |
data |
|
) |
| |
| unsigned char codebuf[8 *1024] |
| unsigned char outbuf[8 *1024] |