1
0
Fork 0

Add some new function and clean up

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1793
This commit is contained in:
Sjoerd van der Berg 2004-05-11 18:58:18 +00:00
parent 2339e11d9c
commit c7e25e08b7
2 changed files with 13 additions and 16 deletions

View file

@ -19,11 +19,11 @@
#if !defined __SUPPORT_H
#define __SUPPORT_H
#include <dosbox.h>
#include <string.h>
#include <ctype.h>
#include "dosbox.h"
#if defined (_MSC_VER) /* MS Visual C++ */
#define strcasecmp(a,b) stricmp(a,b)
#define strncasecmp(a,b,n) _strnicmp(a,b,n)
@ -38,14 +38,17 @@
#endif
void strreplace(char * str,char o,char n);
char *ltrim(char *str);
void rtrim(char * const str);
char *trim(char *str);
char *ltrim(const char *str);
char *rtrim(const char *str);
char *trim(const char *str);
bool ScanCMDBool(char * cmd,char * check);
char * ScanCMDRemain(char * cmd);
bool ScanCMDHex(char * cmd,char * check,Bits * result);
char * StripWord(char * cmd);
char * StripWord(char *&cmd);
bool IsDecWord(char * word);
bool IsHexWord(char * word);
Bits ConvDecWord(char * word);
Bits ConvHexWord(char * word);
INLINE char * upcase(char * str) {
for (char* idx = str; *idx ; idx++) *idx = toupper(*idx);