1 |
/* |
2 |
* user_strings_dummy.cpp - Localizable strings, dummy implementation |
3 |
* |
4 |
* Basilisk II (C) 1997-2008 Christian Bauer |
5 |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
8 |
* the Free Software Foundation; either version 2 of the License, or |
9 |
* (at your option) any later version. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
*/ |
20 |
|
21 |
#include "sysdeps.h" |
22 |
#include "user_strings.h" |
23 |
|
24 |
|
25 |
// Platform-specific string definitions |
26 |
const user_string_def platform_strings[] = { |
27 |
{-1, NULL} // End marker |
28 |
}; |
29 |
|
30 |
|
31 |
/* |
32 |
* Fetch pointer to string, given the string number |
33 |
*/ |
34 |
|
35 |
char *GetString(int num) |
36 |
{ |
37 |
// First search for platform-specific string |
38 |
int i = 0; |
39 |
while (platform_strings[i].num >= 0) { |
40 |
if (platform_strings[i].num == num) |
41 |
return platform_strings[i].str; |
42 |
i++; |
43 |
} |
44 |
|
45 |
// Not found, search for common string |
46 |
i = 0; |
47 |
while (common_strings[i].num >= 0) { |
48 |
if (common_strings[i].num == num) |
49 |
return common_strings[i].str; |
50 |
i++; |
51 |
} |
52 |
return NULL; |
53 |
} |