- Main Page
- Data Structures
- Files

- File List
- Globals

# E:/DevIL/src-IL/include/il_bits.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2002 by Denton Woods
    00005 // Last modified: 05/25/2001 <--Y2K Compliant! =]
    00006 //
    00007 // Filename: src-IL/include/il_bits.h
    00008 //
    00009 // Description: Implements a file class that reads/writes bits directly.
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef BITS_H
    00015 #define BITS_H
    00016
    00017 #include "il_internal.h"
    00018
    00019
    00020 // Struct for dealing with reading bits from a file
    00021 typedef struct BITFILE
    00022 {
    00023         ILHANDLE        File;
    00024         ILuint          BitPos;
    00025         ILint           ByteBitOff;
    00026         ILubyte         Buff;
    00027 } BITFILE;
    00028
    00029 // Functions for reading bits from a file
    00030 //BITFILE*      bopen(const char *FileName, const char *Mode);
    00031 ILint           bclose(BITFILE *BitFile);
    00032 BITFILE*        bfile(ILHANDLE File);
    00033 ILint           btell(BITFILE *BitFile);
    00034 ILint           bseek(BITFILE *BitFile, ILuint Offset, ILuint Mode);
    00035 ILint           bread(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile);
    00036 //ILint         bwrite(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile);
    00037
    00038 // Useful macros for manipulating bits
    00039 #define SetBits(var, bits)              (var |= bits)
    00040 #define ClearBits(var, bits)    (var &= ~(bits))
    00041
    00042
    00043 #endif//BITS_H