From 5a7f0d2e7b4265153ccc70051bdae8b851617ede Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 11 Nov 2008 23:00:38 +0000 Subject: Remove stupid datatypes. Begin code cleanup git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@5 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- nmglobal.h | 144 +++++++++++-------------------------------------------------- 1 file changed, 26 insertions(+), 118 deletions(-) (limited to 'nmglobal.h') diff --git a/nmglobal.h b/nmglobal.h index a20fe62..6c2a145 100644 --- a/nmglobal.h +++ b/nmglobal.h @@ -28,6 +28,7 @@ /* ** SYSTEM DEFINES */ +#include /* +++ MEMORY +++ */ @@ -96,46 +97,6 @@ */ /* #define WIN31TIMER */ -/* +++ MISCELLANEOUS +++ */ - -/* -** Define DOS16 if you'll be compiling under DOS in 16-bit -** (non DOS-extended) mode. This will enable proper definitions -** for the far*** typedefs -*/ -/* #define DOS16 */ - -/* -** Define MAC if you're compiling on a Macintosh. This -** does a number of things: -** includes unix.h -** Incorporates code to mimic the command line via either -** the console library (Symantec/Think) or the SIOUX -** library (Code Warrior). -*/ -/* #define MAC */ - -/* -** Define LONG64 if your compiler emits 64-bit longs. -** This is typically true of Alpha compilers on Unix -** systems...though, who knows, this may change in the -** future. I MOVED THIS DEFINTION INTO THE FILE pointer.h. DO NOT -** DEFINE IT HERE. IT WILL AUTOMATICALLY BE DEFINED IF NECESSARY. -** Uwe F. Mayer, Dec 15, 1996, Nov 15, 1997 -*/ -/* #define LONG64 */ - -/* -** Define MACCWPROF if you are profiling on the Mac using -** Code Warrior. This enables code that turns off the -** profiler in an evern of an error exit. -*/ -/* #define MACCWPROF */ - -#ifdef MAC -#include -#endif - /* ** ERROR CODES */ @@ -174,7 +135,7 @@ ** ** This is the maximum positive long. */ -#ifdef LONG64 +#ifdef _LP64 #define MAXPOSLONG 0x7FFFFFFFFFFFFFFFL #else #define MAXPOSLONG 0x7FFFFFFFL @@ -194,59 +155,6 @@ */ #define MEM_ARRAY_SIZE 20 -/* -** TYPEDEFS -*/ -#define ulong unsigned long -#define uchar unsigned char -#define uint unsigned int -#define ushort unsigned short -/* -typedef unsigned char uchar; -typedef unsigned int uint; -typedef unsigned short ushort; -typedef unsigned long ulong; -*/ -/* -** The 'farxxx' typedefs were added in deference to DOS, which -** requires far pointers to handle some of the bigger -** memory structures. Other systems will simply -** map 'farxxx' to 'xxx' -*/ -#ifdef DOS16 -typedef void huge farvoid; -typedef double huge fardouble; -typedef long huge farlong; -typedef unsigned long huge farulong; -typedef char huge farchar; -typedef unsigned char huge faruchar; - -#else - -typedef void farvoid; -typedef double fardouble; -typedef long farlong; -typedef unsigned long farulong; -typedef char farchar; -typedef unsigned char faruchar; - -#endif - -/* -** The following typedefs are used when element size -** is critical. You'll have to alter these for -** your specifical platform/compiler. -*/ -typedef unsigned char u8; /* Unsigned 8-bits */ -typedef unsigned short u16; /* Unsigned 16 bits */ -#ifdef LONG64 -typedef unsigned int u32; /* Unsigned 32 bits */ -typedef int int32; /* Signed 32 bit integer */ -#else -typedef unsigned long u32; /* Unsigned 32 bits */ -typedef long int32; /* Signed 32 bit integer */ -#endif - /***************** ** NUMERIC SORT ** *****************/ @@ -278,10 +186,10 @@ typedef long int32; /* Signed 32 bit integer */ */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* # of seconds requested */ + unsigned long request_secs; /* # of seconds requested */ double sortspersec; /* # of sort iterations per sec */ - ushort numarrays; /* # of arrays */ - ulong arraysize; /* # of elements in array */ + unsigned short numarrays; /* # of arrays */ + unsigned long arraysize; /* # of elements in array */ } SortStruct; /**************** @@ -315,7 +223,7 @@ typedef struct { /* ** Following field sets the size of the bitfield array (in longs). */ -#ifdef LONG64 +#ifdef _LP64 #define BITFARRAYSIZE 16384L #else #define BITFARRAYSIZE 32768L @@ -326,10 +234,10 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* # of seconds requested */ + unsigned long request_secs; /* # of seconds requested */ double bitopspersec; /* # of bitfield ops per sec */ - ulong bitoparraysize; /* Total # of bitfield ops */ - ulong bitfieldarraysize; /* Bit field array size */ + unsigned long bitoparraysize; /* Total # of bitfield ops */ + unsigned long bitfieldarraysize; /* Bit field array size */ } BitOpStruct; /**************************** @@ -360,9 +268,9 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* # of seconds requested */ - ulong arraysize; /* Size of array */ - ulong loops; /* Loops per iterations */ + unsigned long request_secs; /* # of seconds requested */ + unsigned long arraysize; /* Size of array */ + unsigned long loops; /* Loops per iterations */ double emflops; /* Results */ } EmFloatStruct; @@ -375,8 +283,8 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* # of requested seconds */ - ulong arraysize; /* Size of coeff. arrays */ + unsigned long request_secs; /* # of requested seconds */ + unsigned long arraysize; /* Size of coeff. arrays */ double fflops; /* Results */ } FourierStruct; @@ -389,8 +297,8 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* Requested # of seconds */ - ulong numarrays; /* # of arrays */ + unsigned long request_secs; /* Requested # of seconds */ + unsigned long numarrays; /* # of arrays */ double iterspersec; /* Results */ } AssignStruct; @@ -419,9 +327,9 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* Requested # of seconds */ - ulong arraysize; /* Size of array */ - ulong loops; /* # of times to convert */ + unsigned long request_secs; /* Requested # of seconds */ + unsigned long arraysize; /* Size of array */ + unsigned long loops; /* # of times to convert */ double iterspersec; /* Results */ } IDEAStruct; @@ -457,9 +365,9 @@ typedef struct { typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* Requested # of seconds */ - ulong arraysize; /* Size of array */ - ulong loops; /* # of times to compress/decompress */ + unsigned long request_secs; /* Requested # of seconds */ + unsigned long arraysize; /* Size of array */ + unsigned long loops; /* # of times to compress/decompress */ double iterspersec; /* Results */ } HuffStruct; @@ -483,8 +391,8 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* Requested # of seconds */ - ulong loops; /* # of times to learn */ + unsigned long request_secs; /* Requested # of seconds */ + unsigned long loops; /* # of times to learn */ double iterspersec; /* Results */ } NNetStruct; @@ -509,8 +417,8 @@ typedef struct { */ typedef struct { int adjust; /* Set adjust code */ - ulong request_secs; /* Requested # of seconds */ - ulong numarrays; /* # of arrays */ + unsigned long request_secs; /* Requested # of seconds */ + unsigned long numarrays; /* # of arrays */ double iterspersec; /* Results */ } LUStruct; -- cgit v1.2.3