| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
#ifndef __CMDLIB__ |
|---|
| 27 |
#define __CMDLIB__ |
|---|
| 28 |
|
|---|
| 29 |
#include <stdio.h> |
|---|
| 30 |
#include <string.h> |
|---|
| 31 |
#include <stdlib.h> |
|---|
| 32 |
#include <errno.h> |
|---|
| 33 |
#include <ctype.h> |
|---|
| 34 |
#include <time.h> |
|---|
| 35 |
#include <stdarg.h> |
|---|
| 36 |
#include <limits.h> |
|---|
| 37 |
#ifdef _WIN32 |
|---|
| 38 |
#define PATH_MAX 260 |
|---|
| 39 |
#endif |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
#ifdef _WIN32 |
|---|
| 43 |
#include <direct.h> |
|---|
| 44 |
#define Q_mkdir(a,b) _mkdir(a) |
|---|
| 45 |
#else |
|---|
| 46 |
#include <sys/stat.h> |
|---|
| 47 |
#define Q_mkdir(a,b) mkdir(a,b) |
|---|
| 48 |
#endif |
|---|
| 49 |
|
|---|
| 50 |
#ifdef __cplusplus |
|---|
| 51 |
typedef bool qboolean; |
|---|
| 52 |
#endif |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
#ifndef __BYTEBOOL__ |
|---|
| 56 |
#define __BYTEBOOL__ |
|---|
| 57 |
|
|---|
| 58 |
#ifndef __cplusplus |
|---|
| 59 |
typedef enum {false, true} boolean; |
|---|
| 60 |
#else |
|---|
| 61 |
typedef unsigned char boolean; |
|---|
| 62 |
#endif |
|---|
| 63 |
|
|---|
| 64 |
typedef unsigned char byte; |
|---|
| 65 |
|
|---|
| 66 |
#endif // __BYTEBOOL__ |
|---|
| 67 |
|
|---|
| 68 |
void DefaultExtension( char *path, char *extension ); |
|---|
| 69 |
void DefaultPath( char *path, char *basepath ); |
|---|
| 70 |
void StripFilename( char *path ); |
|---|
| 71 |
void StripExtension( char *path ); |
|---|
| 72 |
void ExtractFilePath( const char *path, char *dest ); |
|---|
| 73 |
void ExtractFileName( const char *path, char *dest ); |
|---|
| 74 |
void ExtractFileBase( const char *path, char *dest ); |
|---|
| 75 |
void ExtractFileExtension( const char *path, char *dest ); |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
void CreateDirectoryPath (const char *path); |
|---|
| 80 |
|
|---|
| 81 |
short BigShort (short l); |
|---|
| 82 |
short LittleShort (short l); |
|---|
| 83 |
int BigLong (int l); |
|---|
| 84 |
int LittleLong (int l); |
|---|
| 85 |
float BigFloat (float l); |
|---|
| 86 |
float LittleFloat (float l); |
|---|
| 87 |
void *qmalloc (size_t size); |
|---|
| 88 |
void* qblockmalloc(size_t nSize); |
|---|
| 89 |
|
|---|
| 90 |
void ConvertDOSToUnixName( char *dst, const char *src ); |
|---|
| 91 |
#ifdef __cplusplus |
|---|
| 92 |
char* StrDup(char* pStr); |
|---|
| 93 |
#endif |
|---|
| 94 |
char* StrDup(const char* pStr); |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 |
bool Q_Exec(const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole); |
|---|
| 110 |
|
|---|
| 111 |
#endif |
|---|