_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
60 extern long isqrt(
long num);
68 void clamp(T *value, T minValue, T maxValue)
70 Assert(minValue <= maxValue);
72 if (*value < minValue) {
74 }
else if (maxValue < *value) {
79 extern uint32_t
fletcher32(
const std::string &content);
88 #define _TRUNCATE ((size_t)-1)
100 extern errno_t strncpy_s(
char *dst,
size_t dstsize,
const char *src,
size_t count);
107 #ifndef HAVE_STRCASESTR
108 extern char *
strcasestr(
const char *str,
const char *substr);
110 #endif // !HAVE_STRCASESTR
113 extern size_t strnlen(
const char *str,
size_t strsize);
115 #endif // !HAVE_STRNLEN
126 int getopt(
int argc,
char *
const argv[],
const char *optstring);
142 int UTF8GetNext(
const std::string &text,
int curpos);
143 int UTF8GetPrev(
const std::string &text,
int curpos);
uint32_t fletcher32(const std::string &content)
Definition: util.cpp:173
bool supportsSSE2()
Definition: util.cpp:619
uint32_t FileChecksums
Sync random seed value.
Definition: util.cpp:63
errno_t strncpy_s(char *dst, size_t dstsize, const char *src, size_t count)
Definition: util.cpp:246
void InitSyncRand()
checksums of all loaded lua files
Definition: util.cpp:68
errno_t strcpy_s(char *dst, size_t dstsize, const char *src)
Definition: util.cpp:217
bool supportsAVX()
Definition: util.cpp:624
int optopt
Definition: util.h:125
void aligned_free(void *block)
Definition: util.cpp:642
unsigned SyncRandSeed
Definition: util.cpp:62
void * aligned_malloc(size_t alignment, size_t size)
Definition: util.cpp:631
int SyncRand()
Initialize the syncron rand.
Definition: util.cpp:84
int errno_t
Definition: util.h:92
int square(int v)
Definition: util.h:62
int MyRand()
Syncron rand.
Definition: util.cpp:114
int UTF8GetNext(const std::string &text, int curpos)
Definition: util.cpp:453
int GetClipboard(std::string &str)
Definition: util.cpp:415
int opterr
Definition: util.h:125
void clamp(T *value, T minValue, T maxValue)
Definition: util.h:68
void SetClipboard(std::string &str)
Definition: util.cpp:427
int optind
Definition: util.cpp:349
char * optarg
Definition: util.cpp:351
long isqrt(long num)
Compute a square root using ints.
Definition: util.cpp:133
size_t strnlen(const char *str, size_t strsize)
determine length of a fixed-length string
Definition: util.cpp:231
int getopt(int argc, char *const argv[], const char *optstring)
#define Assert(cond)
Definition: stratagus.h:142
char * strcasestr(const char *str, const char *substr)
case insensitive strstr
Definition: util.cpp:306
int UTF8GetPrev(const std::string &text, int curpos)
Definition: util.cpp:435
errno_t strcat_s(char *dst, size_t dstsize, const char *src)
Definition: util.cpp:275
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.