X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Frand.c;h=779b3b2371e777c046d13474cd5e71a5f6151df5;hb=689f876fb2420ed2ce45aca58dc39f05e1eb5c2d;hp=b4d01de8db5a056ed4157a7b03c7544d1b17cc4f;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/functions/stdlib/rand.c b/functions/stdlib/rand.c index b4d01de..779b3b2 100644 --- a/functions/stdlib/rand.c +++ b/functions/stdlib/rand.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* rand( void ) This file is part of the Public Domain C Library (PDCLib). @@ -13,13 +11,14 @@ int rand( void ) { _PDCLIB_seed = _PDCLIB_seed * 1103515245 + 12345; - return (unsigned int) ( _PDCLIB_seed / 65536 ) % 32768; + return (int)( _PDCLIB_seed / 65536 ) % 32768; } #endif #ifdef TEST -#include <_PDCLIB_test.h> + +#include "_PDCLIB_test.h" int main( void ) {