X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftinygettext%2Ffindlocale.cpp;h=dbcb961e16937013394c739d1851c59c49146d1e;hb=64bd35ffec4a9929da496dbc1755fc8f2c806a74;hp=da3fa1c556add0db2d1efc766845790ea5fe8875;hpb=db06d3f57856bc82edbee52016858e3004189584;p=supertux.git diff --git a/src/tinygettext/findlocale.cpp b/src/tinygettext/findlocale.cpp index da3fa1c55..dbcb961e1 100644 --- a/src/tinygettext/findlocale.cpp +++ b/src/tinygettext/findlocale.cpp @@ -1,6 +1,6 @@ /* findlocale-0.46.tar.gz from http://icculus.org/~aspirin/findlocale/ - + Copyright (C) 2004 Adam D. Moss (the "Author"). All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -26,6 +26,7 @@ use or other dealings in this Software without prior written authorization from the Author. */ +#include #include #include @@ -36,6 +37,10 @@ from the Author. #include #endif +#ifdef MACOSX +#include +#endif + #include "findlocale.hpp" static int @@ -134,6 +139,7 @@ accumulate_locstring(const char *str, FL_Locale *l) { } +#ifndef WIN32 static int accumulate_env(const char *name, FL_Locale *l) { char *env; @@ -147,10 +153,10 @@ accumulate_env(const char *name, FL_Locale *l) { free(lang); free(country); free(variant); return 0; } - +#endif static void -canonise_fl(FL_Locale *l) { +canonize_fl(FL_Locale *l) { /* this function fixes some common locale-specifying mistakes */ /* en_UK -> en_GB */ if (l->lang && 0 == strcmp(l->lang, "en")) { @@ -420,7 +426,9 @@ lcid_to_fl(LCID lcid, FL_Locale *rtn) { LANGID langid = LANGIDFROMLCID(lcid); LANGID primary_lang = PRIMARYLANGID(langid); +#if 0 LANGID sub_lang = SUBLANGID(langid); +#endif int i; /* try to find an exact primary/sublanguage combo that we know about */ for (i=0; i