#include <cstdlib>
#include <cstdint>
#include <string>
#include <cmath>
#include <string.h>
Go to the source code of this file.
|
#define | _WIN32_WINNT 0x0400 |
|
#define | _TRUNCATE ((size_t)-1) |
|
typedef int | errno_t |
|
unsigned | SyncRandSeed |
|
uint32_t | FileChecksums |
| Sync random seed value. More...
|
|
char * | optarg |
|
int | optind |
|
int | opterr |
|
int | optopt |
|
void | InitSyncRand () |
| checksums of all loaded lua files More...
|
|
int | SyncRand () |
| Initialize the syncron rand. More...
|
|
int | SyncRand (int max) |
| Syncron rand. More...
|
|
int | MyRand () |
| Syncron rand. More...
|
|
long | isqrt (long num) |
| Compute a square root using ints. More...
|
|
int | square (int v) |
|
template<typename T > |
void | clamp (T *value, T minValue, T maxValue) |
|
uint32_t | fletcher32 (const std::string &content) |
|
errno_t | strcpy_s (char *dst, size_t dstsize, const char *src) |
|
errno_t | strncpy_s (char *dst, size_t dstsize, const char *src, size_t count) |
|
errno_t | strcat_s (char *dst, size_t dstsize, const char *src) |
|
char * | strcasestr (const char *str, const char *substr) |
| case insensitive strstr More...
|
|
size_t | strnlen (const char *str, size_t strsize) |
| determine length of a fixed-length string More...
|
|
int | getopt (int argc, char *const argv[], const char *optstring) |
|
int | GetClipboard (std::string &str) |
|
int | UTF8GetNext (const std::string &text, int curpos) |
|
int | UTF8GetPrev (const std::string &text, int curpos) |
|
#define _TRUNCATE ((size_t)-1) |
#define _WIN32_WINNT 0x0400 |
template<typename T >
void clamp |
( |
T * |
value, |
|
|
T |
minValue, |
|
|
T |
maxValue |
|
) |
| |
uint32_t fletcher32 |
( |
const std::string & |
content | ) |
|
int GetClipboard |
( |
std::string & |
str | ) |
|
Paste text from the clipboard
int getopt |
( |
int |
argc, |
|
|
char *const |
argv[], |
|
|
const char * |
optstring |
|
) |
| |
checksums of all loaded lua files
Inititalize sync rand seed.
Syncron rand.
rand only used on this computer.
char* strcasestr |
( |
const char * |
a, |
|
|
const char * |
b |
|
) |
| |
case insensitive strstr
Case insensitive version of strstr
- Parameters
-
a | String to search in |
b | Substring to search for |
- Returns
- Pointer to first occurrence of b or NULL if not found.
errno_t strcat_s |
( |
char * |
dst, |
|
|
size_t |
dstsize, |
|
|
const char * |
src |
|
) |
| |
errno_t strcpy_s |
( |
char * |
dst, |
|
|
size_t |
dstsize, |
|
|
const char * |
src |
|
) |
| |
errno_t strncpy_s |
( |
char * |
dst, |
|
|
size_t |
dstsize, |
|
|
const char * |
src, |
|
|
size_t |
count |
|
) |
| |
size_t strnlen |
( |
const char * |
str, |
|
|
size_t |
strsize |
|
) |
| |
determine length of a fixed-length string
Initialize the syncron rand.
Synchronized random number.
- Note
- This random value must be same on all machines in network game. Very simple random generations, enough for us.
Syncron rand.
Synchronized random number.
- Parameters
-
max | Max value of random number to return |
int UTF8GetNext |
( |
const std::string & |
text, |
|
|
int |
curpos |
|
) |
| |
int UTF8GetPrev |
( |
const std::string & |
text, |
|
|
int |
curpos |
|
) |
| |
Sync random seed value.
Sync random seed value.
Standard implementation of getopt(3).
One extension: If the first character of the optionsstring is a ':' the error return for 'argument required' is a ':' not a '?'. This makes it easier to differentiate between an 'illegal option' and an 'argument required' error.
(C) Copyright 1998-2012 by The