1 | /* |
1 | /* |
2 | * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Crossfire TRT is free software: you can redistribute it and/or modify |
6 | * Deliantra is free software: you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by |
7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation, either version 3 of the License, or |
8 | * the Free Software Foundation, either version 3 of the License, or |
9 | * (at your option) any later version. |
9 | * (at your option) any later version. |
10 | * |
10 | * |
11 | * This program is distributed in the hope that it will be useful, |
11 | * This program is distributed in the hope that it will be useful, |
… | |
… | |
14 | * GNU General Public License for more details. |
14 | * GNU General Public License for more details. |
15 | * |
15 | * |
16 | * You should have received a copy of the GNU General Public License |
16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | * |
18 | * |
19 | * The authors can be reached via e-mail to <crossfire@schmorp.de> |
19 | * The authors can be reached via e-mail to <support@deliantra.net> |
20 | */ |
20 | */ |
21 | |
21 | |
22 | #ifndef SHSTR_H__ |
22 | #ifndef SHSTR_H__ |
23 | #define SHSTR_H__ |
23 | #define SHSTR_H__ |
24 | |
24 | |
25 | #include <sstream> |
25 | #include <sstream> |
26 | |
26 | |
27 | #include "util.h" |
27 | #include "util.h" |
|
|
28 | |
|
|
29 | extern size_t shstr_alloc; |
28 | |
30 | |
29 | extern int buf_overflow (const char *buf1, const char *buf2, int bufsize); |
31 | extern int buf_overflow (const char *buf1, const char *buf2, int bufsize); |
30 | |
32 | |
31 | struct shstr |
33 | struct shstr |
32 | { |
34 | { |
… | |
… | |
177 | inline bool operator ==(const shstr &a, const shstr_cmp &b) |
179 | inline bool operator ==(const shstr &a, const shstr_cmp &b) |
178 | { |
180 | { |
179 | return b == a; |
181 | return b == a; |
180 | } |
182 | } |
181 | |
183 | |
182 | extern const shstr undead_name; /* Used in hit_player() in main.c */ |
184 | #define def(str) extern const shstr shstr_ ## str; |
|
|
185 | # include "shstrinc.h" |
|
|
186 | #undef def |
183 | |
187 | |
184 | #endif |
188 | #endif |
185 | |
189 | |