13 #include <sys/types.h>
25 // the dec offsetof macro doesn't work very well...
26 #define myoffsetof(type,identifier) ((size_t)&((type *)NULL)->identifier)
29 // set these before calling CheckParm
33 //char *strupr (char *in);
34 //char *strlower (char *in);
35 int QCC_filelength (int handle);
36 int QCC_tell (int handle);
38 int QC_strcasecmp (const char *s1, const char *s2);
41 #define QC_vsnprintf _vsnprintf
43 #define QC_vsnprintf vsnprintf
46 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
48 #define LIKEPRINTF(x) __attribute__((format(printf,x,x+1)))
55 double I_FloatTime (void);
57 void VARGS QCC_Error (int errortype, const char *error, ...) LIKEPRINTF(2);
58 int CheckParm (char *check);
61 int SafeOpenWrite (char *filename, int maxsize);
62 int SafeOpenRead (char *filename);
63 void SafeRead (int handle, void *buffer, long count);
64 void SafeWrite (int handle, void *buffer, long count);
65 void SafeClose(int handle);
66 int SafeSeek(int hand, int ofs, int mode);
67 void *SafeMalloc (long size);
70 long QCC_LoadFile (char *filename, void **bufferptr);
71 void QCC_SaveFile (char *filename, void *buffer, long count);
73 void DefaultExtension (char *path, char *extension);
74 void DefaultPath (char *path, char *basepath);
75 void StripFilename (char *path);
76 void StripExtension (char *path);
78 void ExtractFilePath (char *path, char *dest);
79 void ExtractFileBase (char *path, char *dest);
80 void ExtractFileExtension (char *path, char *dest);
82 long ParseNum (char *str);
85 char *QCC_COM_Parse (char *data);
86 char *QCC_COM_Parse2 (char *data);
88 extern char qcc_token[1024];