bglibs
misc.h
1 #ifndef MISC__H__
2 #define MISC__H__
3 
4 #include "sysdeps.h"
5 
6 extern void random_init(uint32 seed);
7 extern uint32 random_int(void);
8 #define random_float() (random_int() * (double)(1.0/4294967296.0))
9 #define random_scale(S) ((unsigned int)(random_float() * (S)))
10 #define random_trunc(T) (random_int() % (T))
11 
12 unsigned long strtou(const char* str, const char** end);
13 const char* utoa(unsigned long);
14 char* utoa2(unsigned long, char*);
15 
16 #endif
str::s
char * s
Definition: str.h:36
str_catb
int str_catb(str *s, const char *in, unsigned len)
Definition: cat.c:43
str::len
unsigned len
Definition: str.h:40
obuf_putstr
#define obuf_putstr(out, str)
Definition: obuf.h:89
path_merge
int path_merge(str *path, const char *start)
Definition: merge.c:54
str_copys
int str_copys(str *s, const char *in)
Definition: copy.c:28
str_truncate
int str_truncate(str *s, unsigned len)
Definition: truncate.c:27
outbuf
obuf outbuf
Definition: obuf_stdout.c:7
str_catc
int str_catc(str *s, char in)
Definition: cat.c:34
str
Definition: str.h:30