home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_02
/
9n02094a
< prev
next >
Wrap
Text File
|
1990-12-17
|
1KB
|
52 lines
/*
* 27-Mar-1990 - created
*/
/***********************************************************
*
* Module: portdefs.h
*
* Purpose: include file for portability definitions
*
* The definitions in this file are system and compiler
* dependent. You should adjust them as necessary to
* fit your environment.
*
**********************************************************/
#ifndef PORTDEFS_H
#define PORTDEFS_H
/**** define the system ****/
#undef SUN
/* use function prototypes */
#define PROTO
#ifdef SUN
#undef PROTO
#endif
#ifndef _TYPES_
typedef unsigned int uint; /* for unsigned int */
#endif
typedef unsigned char ubyte; /* for unsigned byte */
typedef char bool; /* for boolean comparisons) */
typedef unsigned int index_t; /* index variable for loops */
/* random number generators */
#ifdef __TURBOC__
#define RANDOM() rand()
#define RANDOMIZE() randomize()
#else
#ifdef SUN
#define RANDOM() random()
#define RANDOMIZE() srandom((int)(time(NULL)))
#else
#define RANDOM() rand()
#define RANDOMIZE() srand((int)(time(NULL)))
#endif
#endif
#endif /* PORTDEFS_H */
/*
* end of file
*/