mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-25 02:16:03 +00:00
C99 Compliance (#29)
This pull request brings Cytoplasm up from C89 to C99, which makes it much more portable across platforms. In particular, this pull request solves a number of issues with 32-bit platforms. Closes #28. Closes #12. Closes #20. Reviewed-on: https://git.telodendria.io/Telodendria/Cytoplasm/pulls/29
This commit is contained in:
parent
d0969d0dd7
commit
662696ce12
40 changed files with 384 additions and 1667 deletions
|
@ -58,11 +58,13 @@
|
|||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Generate a single random integer between 0 and the passed value.
|
||||
* Generate a single random 32-bit integer between 0 and the
|
||||
* passed value.
|
||||
*/
|
||||
extern int RandInt(unsigned int);
|
||||
extern uint32_t RandInt(uint32_t);
|
||||
|
||||
/**
|
||||
* Generate the number of integers specified by the second argument
|
||||
|
@ -76,6 +78,6 @@ extern int RandInt(unsigned int);
|
|||
* has to lock and unlock a mutex. It is therefore better to obtain
|
||||
* multiple random numbers in one pass if multiple are needed.
|
||||
*/
|
||||
extern void RandIntN(int *, size_t, unsigned int);
|
||||
extern void RandIntN(uint32_t *, size_t, uint32_t);
|
||||
|
||||
#endif /* CYTOPLASM_RAND_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue