ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

rand_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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.