mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-08 22:11:09 +00:00
11d1c41873
instead of overwriting the original string. ACS performing this operation in place caused crashes with RTC-3057. - fixed: FScriptPosition::Message did not print the message if it was not a fatal error. SVN r1313 (trunk)
61 lines
1.6 KiB
C
61 lines
1.6 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 <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 *)1)->identifier - 1)
|
|
|
|
int Q_filelength (FILE *f);
|
|
bool FileExists (const char *filename);
|
|
|
|
extern FString progdir;
|
|
|
|
void FixPathSeperator (char *path);
|
|
static void inline FixPathSeperator (FString &path) { path.ReplaceChars('\\', '/'); }
|
|
|
|
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 (const char *str);
|
|
int ParseNum (const char *str);
|
|
bool IsNum (const 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 *buffer, size_t buffsize, const GUID &guid);
|
|
|
|
const char *myasctime ();
|
|
|
|
int strbin (char *str);
|
|
FString strbin1 (const char *start);
|
|
|
|
void CreatePath(const char * fn);
|
|
|
|
FString ExpandEnvVars(const char *searchpathstring);
|
|
|
|
#endif
|