mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-08 05:51:26 +00:00
c412b42703
- The stat meters now return an FString instead of sprintfing into a fixed output buffer. - NOASM is now automatically defined when compiling for a non-x86 target. - Some changes have been made to the integral types in doomtype.h: - For consistancy with the other integral types, byte is no longer a synonym for BYTE. - Most uses of BOOL have been change to the standard C++ bool type. Those that weren't were changed to INTBOOL to indicate they may contain values other than 0 or 1 but are still used as a boolean. - Compiler-provided types with explicit bit sizes are now used. In particular, DWORD is no longer a long so it will work with both 64-bit Windows and Linux. - Since some files need to include Windows headers, uint32 is a synonym for the non-Windows version of DWORD. - Removed d_textur.h. The pic_t struct it defined was used nowhere, and that was all it contained. SVN r326 (trunk)
56 lines
1.4 KiB
C
56 lines
1.4 KiB
C
// cmdlib.h
|
|
|
|
#ifndef __CMDLIB__
|
|
#define __CMDLIB__
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable : 4244) // MIPS
|
|
#pragma warning(disable : 4136) // X86
|
|
#pragma warning(disable : 4051) // ALPHA
|
|
|
|
#pragma warning(disable : 4018) // signed/unsigned mismatch
|
|
#pragma warning(disable : 4305) // truncate from double to float
|
|
#endif
|
|
|
|
#include "doomtype.h"
|
|
#include "zstring.h"
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <ctype.h>
|
|
#include <stdarg.h>
|
|
|
|
// the dec offsetof macro doesnt work very well...
|
|
#define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
|
|
|
|
int Q_filelength (FILE *f);
|
|
bool FileExists (const char *filename);
|
|
|
|
extern char progdir[1024];
|
|
|
|
void FixPathSeperator (char *path);
|
|
|
|
void DefaultExtension (char *path, const char *extension);
|
|
void DefaultExtension (FString &path, const char *extension);
|
|
|
|
FString ExtractFilePath (const char *path);
|
|
FString ExtractFileBase (const char *path, bool keep_extension=false);
|
|
|
|
int ParseHex (char *str);
|
|
int ParseNum (char *str);
|
|
bool IsNum (char *str); // [RH] added
|
|
|
|
char *copystring(const char *s);
|
|
void ReplaceString (char **ptr, const char *str);
|
|
|
|
bool CheckWildcards (const char *pattern, const char *text);
|
|
|
|
void FormatGUID (char *text, const GUID &guid);
|
|
|
|
char *myasctime ();
|
|
|
|
void CreatePath(const char * fn);
|
|
|
|
#endif
|