]>
Commit | Line | Data |
---|---|---|
f92ad96b | 1 | /************************** Start of BITIO.H *************************/ |
2 | ||
3 | #ifndef _BITIO_H | |
4 | #define _BITIO_H | |
5 | ||
6 | #include <stdio.h> | |
7 | ||
8 | typedef struct bit_file { | |
9 | FILE *file; | |
10 | unsigned char mask; | |
11 | int rack; | |
12 | int pacifier_counter; | |
13 | } BIT_FILE; | |
14 | ||
15 | //#ifdef __STDC__ | |
16 | ||
17 | BIT_FILE *OpenInputBitFile( char *name ); | |
18 | BIT_FILE *OpenOutputBitFile( char *name ); | |
19 | void OutputBit( BIT_FILE *bit_file, int bit ); | |
20 | void OutputBits( BIT_FILE *bit_file, | |
21 | unsigned long code, int count ); | |
22 | int InputBit( BIT_FILE *bit_file ); | |
23 | unsigned long InputBits( BIT_FILE *bit_file, int bit_count ); | |
24 | void CloseInputBitFile( BIT_FILE *bit_file ); | |
25 | void CloseOutputBitFile( BIT_FILE *bit_file ); | |
26 | void FilePrintBinary( FILE *file, unsigned int code, int bits ); | |
27 | /* | |
28 | #else | |
29 | ||
30 | BIT_FILE *OpenInputBitFile(); | |
31 | BIT_FILE *OpenOutputBitFile(); | |
32 | void OutputBit(); | |
33 | void OutputBits(); | |
34 | int InputBit(); | |
35 | unsigned long InputBits(); | |
36 | void CloseInputBitFile(); | |
37 | void CloseOutputBitFile(); | |
38 | void FilePrintBinary(); | |
39 | ||
40 | #endif | |
41 | */ | |
42 | #endif /* _BITIO_H */ | |
43 | ||
44 | /*************************** End of BITIO.H **************************/ | |
45 | ||
8f2aba92 | 46 |