Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrand_nt.c
Go to the documentation of this file.
00001 #include <stdlib.h> 00002 00003 #if defined(__GNUC__) 00004 static unsigned long long next = 0; 00005 #else 00006 static unsigned __int64 next = 0; 00007 #endif 00008 00009 /* 00010 * @implemented 00011 */ 00012 int rand(void) 00013 { 00014 #if defined(__GNUC__) 00015 next = next * 0x5deece66dLL + 11; 00016 #else 00017 next = next * 0x5deece66di64 + 11; 00018 #endif 00019 return (int)((next >> 16) & RAND_MAX); 00020 } 00021 00022 00023 /* 00024 * @implemented 00025 */ 00026 void srand(unsigned seed) 00027 { 00028 next = seed; 00029 } Generated on Sat May 26 2012 04:35:27 for ReactOS by
1.7.6.1
|