next up previous contents index Search
Next: 0.2 Data Searching and Up: 0.1 Introduction Previous: 0.1.3 Conventions

0.1.4 Example Code

The example code in this document may or may not compile as is. The reason I include it is to give a concrete implementation of an angorithm or idea. You may, of course, use the code however you want. The code that is intended to compile was built on a FreeBSD machine with gcc 2.7.2. In order to compile certain examples you may need this header file, called global.h:





#ifndef TYPEDEFS_
 #define TYPEDEFS_
 
 #ifndef FAILURE
 #define FAILURE -1
 #endif
 
 #ifndef DWORD
 typedef unsigned int DWORD;
 #endif
 
 #ifndef ULONG
 typedef unsigned long ULONG;
 #endif
 
 #ifndef BOOL
 typedef int BOOL;
 #endif
 
 #ifndef TRUE
 #define TRUE 1
 #endif
 
 #ifndef FALSE
 #define FALSE 0
 #endif
 
 #ifndef VOID
 typedef void VOID;
 #endif
 
 #ifndef CHAR
 typedef unsigned char CHAR;
 #endif
 
 #ifndef UCHAR
 typedef unsigned char UCHAR;
 #endif
 
 #ifndef BYTE
 typedef unsigned char BYTE;
 #endif
 
 #ifndef HANDLE
 typedef int HANDLE;
 #endif
 
 #define IN
 #define OUT
 #define INOUT
 
 #endif



Also, here is debug.h:





INSERTFILE=/home/scott/algs/code/headers/debug.h



Scott Gasch
1999-07-09