From 41974ae5265fbc23a06f276f9e008d5dad020e0b Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 30 Aug 2012 16:16:25 -0700 Subject: Rename files for C++ conversion. Does not compile. After updating, you can remove these files, as shown in 'git status': Untracked files: (use "git add ..." to include in what will be committed) src/map/magic-interpreter-lexer.c src/map/magic-interpreter-parser.c src/map/magic-interpreter-parser.h --- src/common/mt_rand.h | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/common/mt_rand.h (limited to 'src/common/mt_rand.h') diff --git a/src/common/mt_rand.h b/src/common/mt_rand.h deleted file mode 100644 index 84d32e5..0000000 --- a/src/common/mt_rand.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef MT_RAND_H -#define MT_RAND_H - -# include "sanity.h" - -/// Initialize the generator (called automatically with time() if you don't) -void mt_seed (uint32_t seed); -/// Get a random number -uint32_t mt_random (void); - -/** - * ModuloRand and ModuloPlusRand - * These macros are used to replace the vast number of calls to rand()%mod - * TODO eliminate the rest of the calls to rand() - * MRAND(10) returns 0..9 - * MPRAND(5,10) returns 5..14 - */ -// The cast is essential because the result is sometimes -// compared with a possibly negative number. -// Because it's using modulus, high numbers shouldn't happen anyway. -# define MRAND(mod) ((int)(mt_random() % (mod))) -# define MPRAND(add, mod) ((add) + MRAND(mod)) - -#endif // MT_RAND_H -- cgit v1.2.3-60-g2f50