Debian Codegraph @

include/support.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2002-2010 The DOSBox Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 /* $Id: support.h,v 1.18 2009-05-27 09:15:41 qbix79 Exp $ */
20
21 #ifndef DOSBOX_SUPPORT_H
22 #define DOSBOX_SUPPORT_H
23
24 #include <string.h>
25 #include <string>
26 #include <ctype.h>
27 #ifndef DOSBOX_DOSBOX_H
28 #include "dosbox.h"
29 #endif
30
31 #if defined (_MSC_VER) /* MS Visual C++ */
32 #define strcasecmp(a,b) stricmp(a,b)
33 #define strncasecmp(a,b,n) _strnicmp(a,b,n)
34 #endif
35
36 #define safe_strncpy(a,b,n) do { strncpy((a),(b),(n)-1); (a)[(n)-1] = 0; } while (0)
37
38 #ifdef HAVE_STRINGS_H
39 #include <strings.h>
40 #endif
41
42 void strreplace(char * str,char o,char n);
43 char *ltrim(char *str);
44 char *rtrim(char *str);
45 char *trim(char * str);
46 char * upcase(char * str);
47 char * lowcase(char * str);
48
49 bool ScanCMDBool(char * cmd,char const * const check);
50 char * ScanCMDRemain(char * cmd);
51 char * StripWord(char *&cmd);
52 bool IsDecWord(char * word);
53 bool IsHexWord(char * word);
54 Bits ConvDecWord(char * word);
55 Bits ConvHexWord(char * word);
56
57 void upcase(std::string &str);
58 void lowcase(std::string &str);
59
60 #endif