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