OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

safeguards.h
Go to the documentation of this file.
1 /* $Id: safeguards.h 26651 2014-06-17 19:01:45Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
21 #ifndef SAFEGUARDS_H
22 #define SAFEGUARDS_H
23
24 /* Use MallocT instead. */
25 #define malloc SAFEGUARD_DO_NOT_USE_THIS_METHOD
26
27 /* Use MallocT instead. */
28 #define calloc SAFEGUARD_DO_NOT_USE_THIS_METHOD
29
30 /* Use ReallocT instead. */
31 #define realloc SAFEGUARD_DO_NOT_USE_THIS_METHOD
32
33 /* Use stredup instead. */
34 #define strdup SAFEGUARD_DO_NOT_USE_THIS_METHOD
35 #define strndup SAFEGUARD_DO_NOT_USE_THIS_METHOD
36
37 /* Use strecpy instead. */
38 #define strcpy SAFEGUARD_DO_NOT_USE_THIS_METHOD
39 #define strncpy SAFEGUARD_DO_NOT_USE_THIS_METHOD
40
41 /* Use strecat instead. */
42 #define strcat SAFEGUARD_DO_NOT_USE_THIS_METHOD
43 #define strncat SAFEGUARD_DO_NOT_USE_THIS_METHOD
44
45 /* Use seprintf instead. */
46 #define sprintf SAFEGUARD_DO_NOT_USE_THIS_METHOD
47 #define snprintf SAFEGUARD_DO_NOT_USE_THIS_METHOD
48
49 /* Use vseprintf instead. */
50 #define vsprintf SAFEGUARD_DO_NOT_USE_THIS_METHOD
51 #define vsnprintf SAFEGUARD_DO_NOT_USE_THIS_METHOD
52
53 /* Use fgets instead. */
54 #define gets SAFEGUARD_DO_NOT_USE_THIS_METHOD
55
56 /* No clear replacement. */
57 #define strtok SAFEGUARD_DO_NOT_USE_THIS_METHOD
58
59 /* Use our own templated implementation instead of a macro or function with only one type. */
60 #ifdef min
61 #undef min
62 #endif
63
64 /* Use our own templated implementation instead of a macro or function with only one type. */
65 #ifdef max
66 #undef max
67 #endif
68
69 /* Use our own templated implementation instead of a macro or function with only one type. */
70 #ifdef abs
71 #undef abs
72 #endif
73
74 #endif /* SAFEGUARDS_H */