Branch data Line data Source code
1 : : #pragma once
2 : :
3 : : // RPG Hacker: Some standard headers unfortunately like to
4 : : // spew loads of warnings on some platforms, and since this
5 : : // is kinda annoying, let's wrap the headers in here so
6 : : // that we can easily disable certain warnings via pragmas.
7 : :
8 : : #if defined(_MSC_VER)
9 : : # pragma warning(push)
10 : : # pragma warning(disable : 4514)
11 : : # pragma warning(disable : 4577)
12 : : # pragma warning(disable : 4668)
13 : : # pragma warning(disable : 4987)
14 : : #endif
15 : :
16 : : #include <new>//placement new
17 : : #include <stdlib.h>//malloc, realloc, free
18 : : #include <string.h>//strcmp, memmove
19 : : #include <stdio.h>
20 : : #include <ctype.h>
21 : : #include <math.h>
22 : : #include <cstdio>
23 : :
24 : 42046 : inline char * duplicate_string(const char * str)
25 : : {
26 : 42046 : char * a = (char*)malloc(sizeof(char)*(strlen(str) + 1));
27 : 42046 : strcpy(a, str);
28 : 42046 : return a;
29 : : }
30 : :
31 : : #if defined(_MSC_VER)
32 : : # pragma warning(pop)
33 : : #endif
|