-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBITIO.H
28 lines (21 loc) · 866 Bytes
/
BITIO.H
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
/************************** Start of BITIO.H *************************/
#ifndef _BITIO_H
#define _BITIO_H
#include <stdio.h>
typedef struct bit_file {
FILE *file;
unsigned char mask;
int rack;
int pacifier_counter;
} BIT_FILE;
BIT_FILE *OpenInputBitFile( char *name );
BIT_FILE *OpenOutputBitFile( char *name );
void OutputBit( BIT_FILE *bit_file, int bit );
void OutputBits( BIT_FILE *bit_file, unsigned long code, int count );
int InputBit( BIT_FILE *bit_file );
unsigned long InputBits( BIT_FILE *bit_file, int bit_count );
void CloseInputBitFile( BIT_FILE *bit_file );
void CloseOutputBitFile( BIT_FILE *bit_file );
void FilePrintBinary( FILE *file, unsigned int code, int bits );
#endif /* _BITIO_H */
/*************************** End of BITIO.H **************************/