summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-08-04 23:45:20 +0000
committerDarkvater <darkvater@openttd.org>2006-08-04 23:45:20 +0000
commitb5e3718ac4ead73a7b7bb9fd694cae5d9aaefa7b (patch)
tree8366278d35f2187288e8d53bf4fc9e043e630808 /win32.c
parent4de30befaee2141e410bf0df5d5f7e3906bc0111 (diff)
downloadopenttd-b5e3718ac4ead73a7b7bb9fd694cae5d9aaefa7b.tar.xz
(svn r5763) - Cleanup: Move the now unified GetLanguageList and comparator function to strings.c where it belongs.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/win32.c b/win32.c
index a7dacb668..6f2c76921 100644
--- a/win32.c
+++ b/win32.c
@@ -1097,34 +1097,6 @@ bool FileExists(const char *filename)
return true;
}
-static int CDECL LanguageCompareFunc(const void *a, const void *b)
-{
- return strcmp(*(const char* const *)a, *(const char* const *)b);
-}
-
-int GetLanguageList(char **languages, int max)
-{
- HANDLE hand;
- int num = 0;
- char filedir[MAX_PATH];
- WIN32_FIND_DATA fd;
- sprintf(filedir, "%s*.lng", _path.lang_dir);
-
- hand = FindFirstFile(filedir, &fd);
- if (hand != INVALID_HANDLE_VALUE) {
- do {
- if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- languages[num++] = strdup(fd.cFileName);
- if (num == max) break;
- }
- } while (FindNextFile(hand, &fd));
- FindClose(hand);
- }
-
- qsort(languages, num, sizeof(char*), LanguageCompareFunc);
- return num;
-}
-
static int ParseCommandLine(char *line, char **argv, int max_argc)
{
int n = 0;