summaryrefslogtreecommitdiffstats
path: root/programs/datagen.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/datagen.c')
-rw-r--r--programs/datagen.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/programs/datagen.c b/programs/datagen.c
index f97c2d0..a61afc0 100644
--- a/programs/datagen.c
+++ b/programs/datagen.c
@@ -26,43 +26,14 @@
/**************************************
* Includes
**************************************/
+#include "platform.h" /* Compiler options, SET_BINARY_MODE */
+#include "util.h" /* U32 */
#include <stdlib.h> /* malloc */
#include <stdio.h> /* FILE, fwrite */
#include <string.h> /* memcpy */
/**************************************
-* Basic Types
-**************************************/
-#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */
-# include <stdint.h>
- typedef uint8_t BYTE;
- typedef uint16_t U16;
- typedef uint32_t U32;
- typedef int32_t S32;
- typedef uint64_t U64;
-#else
- typedef unsigned char BYTE;
- typedef unsigned short U16;
- typedef unsigned int U32;
- typedef signed int S32;
- typedef unsigned long long U64;
-#endif
-
-
-/**************************************
-* OS-specific Includes
-**************************************/
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
-# include <fcntl.h> /* _O_BINARY */
-# include <io.h> /* _setmode, _isatty */
-# define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)
-#else
-# define SET_BINARY_MODE(file)
-#endif
-
-
-/**************************************
* Constants
**************************************/
#define KB *(1 <<10)