src/test/SDL_test_random.c
changeset 7191 75360622e65f
parent 6885 700f1b25f77f
child 8149 681eb46b8ac4
     1.1 --- a/src/test/SDL_test_random.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/test/SDL_test_random.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -23,14 +23,14 @@
     1.4  
     1.5   A portable "32-bit Multiply with carry" random number generator.
     1.6  
     1.7 - Used by the fuzzer component. 
     1.8 + Used by the fuzzer component.
     1.9   Original source code contributed by A. Schiffler for GSOC project.
    1.10  
    1.11  */
    1.12  
    1.13  #include "SDL_config.h"
    1.14  
    1.15 -#include <stdlib.h>
    1.16 +#include <stdlib.h>
    1.17  #include <stdio.h>
    1.18  #include <time.h>
    1.19  
    1.20 @@ -41,13 +41,13 @@
    1.21  void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, unsigned int ci)
    1.22  {
    1.23    if (rndContext==NULL) return;
    1.24 -  
    1.25 +
    1.26    /*
    1.27     * Choose a value for 'a' from this list
    1.28     * 1791398085 1929682203 1683268614 1965537969 1675393560
    1.29     * 1967773755 1517746329 1447497129 1655692410 1606218150
    1.30     * 2051013963 1075433238 1557985959 1781943330 1893513180
    1.31 -   * 1631296680 2131995753 2083801278 1873196400 1554115554 
    1.32 +   * 1631296680 2131995753 2083801278 1873196400 1554115554
    1.33     */
    1.34    rndContext->a = 1655692410;
    1.35    rndContext->x = 30903;
    1.36 @@ -65,9 +65,9 @@
    1.37  void SDLTest_RandomInitTime(SDLTest_RandomContext * rndContext)
    1.38  {
    1.39    int a, b;
    1.40 -  
    1.41 +
    1.42    if (rndContext==NULL) return;
    1.43 -  
    1.44 +
    1.45    srand((unsigned int)time(NULL));
    1.46    a=rand();
    1.47    srand(clock());
    1.48 @@ -82,7 +82,7 @@
    1.49    unsigned int xh, xl;
    1.50  
    1.51    if (rndContext==NULL) return -1;
    1.52 -  
    1.53 +
    1.54    xh = rndContext->x >> 16, xl = rndContext->x & 65535;
    1.55    rndContext->x = rndContext->x * rndContext->a + rndContext->c;
    1.56    rndContext->c =