$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <winsock2.h>
#include <windows.h>
#include <string>
Go to the source code of this file.
Classes | |
class | CMutex |
class | CThread |
util.h - General utilities. | |
#define | _WIN32_WINNT 0x0400 |
#define | MyRand() rand() |
Syncron rand. | |
#define | _TRUNCATE ((size_t)-1) |
unsigned | SyncRandSeed |
int | get_cpu_count () |
void | InitSyncRand () |
Sync random seed value. | |
int | SyncRand () |
Initialize the syncron rand. | |
int | SyncRand (int max) |
Syncron rand. | |
int | MyAbs (int x) |
long | isqrt (long num) |
Compute a square root using ints. | |
unsigned int | strcpy_s (char *dst, size_t dstsize, const char *src) |
unsigned int | strncpy_s (char *dst, size_t dstsize, const char *src, size_t count) |
unsigned int | strcat_s (char *dst, size_t dstsize, const char *src) |
char * | strcasestr (const char *str, const char *substr) |
case insensitive strstr | |
size_t | strnlen (const char *str, size_t strsize) |
determine length of a fixed-length string | |
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 |
#define MyRand | ( | ) | rand() |
Syncron rand.
rand only used on this computer.
int get_cpu_count | ( | ) | [inline] |
int GetClipboard | ( | std::string & | str | ) |
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. Paste text from the clipboard
void InitSyncRand | ( | ) |
Sync random seed value.
Sync random seed value.
Inititalize sync rand seed.
long isqrt | ( | long | num | ) |
Compute a square root using ints.
Compute a square root using ints
Uses John Halleck's method, see http://www.cc.utah.edu/~nahaj/factoring/isqrt.legalize.c.html
num | Calculate the square root of this number |
int MyAbs | ( | int | x | ) | [inline] |
char* strcasestr | ( | const char * | a, | |
const char * | b | |||
) |
case insensitive strstr
Case insensitive version of strstr
a | String to search in | |
b | Substring to search for |
unsigned int strcat_s | ( | char * | dst, | |
size_t | dstsize, | |||
const char * | src | |||
) |
unsigned int strcpy_s | ( | char * | dst, | |
size_t | dstsize, | |||
const char * | src | |||
) |
unsigned int 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
int SyncRand | ( | int | max | ) |
Syncron rand.
Synchronized random number.
max | Max value of random number to return |
int SyncRand | ( | ) |
Initialize the syncron rand.
Synchronized random number.
int UTF8GetNext | ( | const std::string & | text, | |
int | curpos | |||
) |
int UTF8GetPrev | ( | const std::string & | text, | |
int | curpos | |||
) |
unsigned SyncRandSeed |