]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/comp/bitio.h
-Added protected copy constructors and assignment operators. -Public data members...
[u/mrichter/AliRoot.git] / HLT / comp / bitio.h
CommitLineData
43d89950 1/* @(#) $Id$ */
3e87ef69 2
f92ad96b 3/************************** Start of BITIO.H *************************/
4
5#ifndef _BITIO_H
6#define _BITIO_H
7
8#include <stdio.h>
9
10typedef struct bit_file {
11 FILE *file;
12 unsigned char mask;
13 int rack;
14 int pacifier_counter;
15} BIT_FILE;
16
f92ad96b 17
43d89950 18/* The following we do because this file is read both by
19 C and C++ compiler. */
3e87ef69 20#ifdef __cplusplus
21extern "C" BIT_FILE *OpenInputBitFile( char *name );
22extern "C" BIT_FILE *OpenOutputBitFile( char *name );
23extern "C" void OutputBit( BIT_FILE *bit_file, int bit );
24extern "C" void OutputBits( BIT_FILE *bit_file,
25 unsigned long code, int count );
26extern "C" int InputBit( BIT_FILE *bit_file );
27extern "C" unsigned long InputBits( BIT_FILE *bit_file, int bit_count );
28extern "C" void CloseInputBitFile( BIT_FILE *bit_file );
29extern "C" void CloseOutputBitFile( BIT_FILE *bit_file );
30extern "C" void FilePrintBinary( FILE *file, unsigned int code, int bits );
31#else
f92ad96b 32BIT_FILE *OpenInputBitFile( char *name );
33BIT_FILE *OpenOutputBitFile( char *name );
34void OutputBit( BIT_FILE *bit_file, int bit );
35void OutputBits( BIT_FILE *bit_file,
3e87ef69 36 unsigned long code, int count );
f92ad96b 37int InputBit( BIT_FILE *bit_file );
38unsigned long InputBits( BIT_FILE *bit_file, int bit_count );
39void CloseInputBitFile( BIT_FILE *bit_file );
40void CloseOutputBitFile( BIT_FILE *bit_file );
41void FilePrintBinary( FILE *file, unsigned int code, int bits );
3e87ef69 42#endif
43
f92ad96b 44/*
45#else
46
47BIT_FILE *OpenInputBitFile();
48BIT_FILE *OpenOutputBitFile();
49void OutputBit();
50void OutputBits();
51int InputBit();
52unsigned long InputBits();
53void CloseInputBitFile();
54void CloseOutputBitFile();
55void FilePrintBinary();
56
57#endif
58*/
59#endif /* _BITIO_H */
60
61/*************************** End of BITIO.H **************************/