Skip to content

Commit 6ceb345

Browse files
committed
Revert langv2 support
1 parent 4179365 commit 6ceb345

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/config/language.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "tx.h"
1919
#include "ini.h"
2020

21-
#ifndef SUPPORT_LANG_V1
22-
#define SUPPORT_LANG_V1 1
21+
#ifndef SUPPORT_LANG_V2
22+
#define SUPPORT_LANG_V2 0
2323
#endif
2424

2525
/* String long enough to hold every used string in the code
@@ -105,7 +105,6 @@ static unsigned fix_crlf(char *str)
105105
return len;
106106
}
107107

108-
#if SUPPORT_LANG_V1
109108
static void ReadLangV1(FILE* fh)
110109
{
111110
struct str_map *lookup = lookupmap;
@@ -155,8 +154,8 @@ static void ReadLangV1(FILE* fh)
155154
}
156155
table_size = lookup - lookupmap;
157156
}
158-
#endif
159157

158+
#if SUPPORT_LANG_V2
160159
static void ReadLangV2(FILE* fh)
161160
{
162161
u16 hash;
@@ -187,6 +186,7 @@ static void ReadLangV2(FILE* fh)
187186
}
188187
table_size = lookup - lookupmap;
189188
}
189+
#endif
190190

191191
static int ReadLang(const char *file)
192192
{
@@ -199,7 +199,7 @@ static int ReadLang(const char *file)
199199
// first line of langauge name, ignore it
200200
fgets(tempstring, sizeof(tempstring), fh);
201201

202-
#if SUPPORT_LANG_V1
202+
#if SUPPORT_LANG_V2
203203
// Try to detect the version
204204
if (fread(tempstring, 1, 1, fh) == 1)
205205
{
@@ -212,7 +212,7 @@ static int ReadLang(const char *file)
212212
ReadLangV2(fh);
213213
}
214214
#else
215-
CONFIG_ReadLangV2(fh);
215+
ReadLangV1(fh);
216216
#endif
217217

218218
fclose(fh);

0 commit comments

Comments
 (0)