diff --git a/programs/datagen.c b/programs/datagen.c index bf35c568..7ce0d84d 100644 --- a/programs/datagen.c +++ b/programs/datagen.c @@ -29,6 +29,9 @@ #include /* malloc */ #include /* FILE, fwrite */ #include /* memcpy */ +<<<<<<< HEAD +#include "mem.h" +======= /*-************************************ @@ -48,6 +51,7 @@ typedef signed int S32; typedef unsigned long long U64; #endif +>>>>>>> 59b6ba767710823fa688ff1f4b7ea443567f0b27 /*-************************************ @@ -63,7 +67,7 @@ /*-************************************ -* Constants +* Macros **************************************/ #define KB *(1 <<10) @@ -98,15 +102,10 @@ static unsigned int RDG_rand(U32* src) static void RDG_fillLiteralDistrib(litDistribTable lt, double ld) { U32 i = 0; - BYTE character = '0'; - BYTE firstChar = '('; - BYTE lastChar = '}'; + BYTE character = (ld<=0.0) ? 0 : '0'; + BYTE const firstChar = (ld<=0.0) ? 0 : '('; + BYTE const lastChar = (ld<=0.0) ?255: '}'; - if (ld<=0.0) { - character = 0; - firstChar = 0; - lastChar =255; - } while (i buffSize) d = buffSize; while (pos < d) buffPtr[pos++] = RDG_genChar(seed, lt); } }