1
0
mirror of https://github.com/simh/simh.git synced 2026-02-24 16:08:40 +00:00

SCP: Add a local rand() implementation to avoid Coverity issues

This commit is contained in:
Mark Pizzolato
2019-03-20 12:57:36 -07:00
parent 726a07b547
commit 5960bca32a
3 changed files with 24 additions and 1 deletions

6
scp.h
View File

@@ -231,6 +231,12 @@ size_t sim_strlcpy (char *dst, const char *src, size_t size);
#ifndef strcasecmp
#define strcasecmp(str1, str2) sim_strcasecmp ((str1), (str2))
#endif
void sim_srand (unsigned int seed);
int sim_rand (void);
#ifdef RAND_MAX
#undef RAND_MAX
#endif
#define RAND_MAX 32767
CONST char *get_sim_opt (int32 opt, CONST char *cptr, t_stat *st);
CONST char *get_sim_sw (CONST char *cptr);
const char *put_switches (char *buf, size_t bufsize, uint32 sw);