Browse Source

remove flex array init

master
boB Rudis 6 years ago
parent
commit
d07ea56610
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 52
      src/language.c
  2. 6
      src/tidyplatform.h

52
src/language.c

@ -24,36 +24,54 @@
/**
* This structure type provides universal access to all of Tidy's strings.
*/
// typedef struct {
// languageDefinition *currentLanguage;
// languageDefinition *fallbackLanguage;
// languageDefinition *languages[];
// } tidyLanguagesType;
typedef struct {
languageDefinition *currentLanguage;
languageDefinition *fallbackLanguage;
languageDefinition *languages[];
languageDefinition *languages[2];
} tidyLanguagesType;
/**
* This single structure contains all localizations. Note that we preset
* `.currentLanguage` to language_en, which is Tidy's default language.
*/
static tidyLanguagesType tidyLanguages = {
&language_en, /* current language */
&language_en, /* first fallback language */
{
/* Required localization! */
&language_en,
#if SUPPORT_LOCALIZATIONS
/* These additional languages are installed. */
&language_en_gb,
&language_es,
&language_es_mx,
&language_zh_cn,
&language_fr,
#endif
NULL /* This array MUST be null terminated. */
}
&language_en, /* current language */
&language_en, /* first fallback language */
{
/* Required localization! */
&language_en,
NULL /* This array MUST be null terminated. */
}
};
// static tidyLanguagesType tidyLanguages = {
// &language_en, /* current language */
// &language_en, /* first fallback language */
// {
// /* Required localization! */
// &language_en,
// #if SUPPORT_LOCALIZATIONS
// /* These additional languages are installed. */
// &language_en_gb,
// &language_es,
// &language_es_mx,
// &language_zh_cn,
// &language_fr,
// #endif
// NULL /* This array MUST be null terminated. */
// }
// };
/**
* This structure maps old-fashioned Windows strings
* to proper POSIX names (modern Windows already uses

6
src/tidyplatform.h

@ -61,9 +61,9 @@ extern "C" {
#endif
/* Enable/disable support for additional languages */
#ifndef SUPPORT_LOCALIZATIONS
#define SUPPORT_LOCALIZATIONS 1
#endif
// #ifndef SUPPORT_LOCALIZATIONS
// #define SUPPORT_LOCALIZATIONS 1
// #endif
/* Convenience defines for Mac platforms */

Loading…
Cancel
Save