Revision: 23 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=23&view=rev Author: eht16 Date: 2008-05-20 07:45:24 -0700 (Tue, 20 May 2008)
Log Message: ----------- Add new GeanyFunctions API. Avoid crashes when LANG environment variable can't be read (e.g. on Windows).
Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/spellcheck.c
Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2008-05-16 12:52:26 UTC (rev 22) +++ trunk/spellcheck/ChangeLog 2008-05-20 14:45:24 UTC (rev 23) @@ -1,3 +1,11 @@ +2008-05-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/spellcheck.c: + Add new GeanyFunctions API. + Avoid crashes when LANG environment variable can't be read + (e.g. on Windows). + + 2008-05-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* configure.in:
Modified: trunk/spellcheck/src/spellcheck.c =================================================================== --- trunk/spellcheck/src/spellcheck.c 2008-05-16 12:52:26 UTC (rev 22) +++ trunk/spellcheck/src/spellcheck.c 2008-05-20 14:45:24 UTC (rev 23) @@ -45,6 +45,7 @@
PluginFields *plugin_fields; GeanyData *geany_data; +GeanyFunctions *geany_functions;
PLUGIN_VERSION_CHECK(58) @@ -246,13 +247,16 @@ static const gchar *get_default_lang(void) { const gchar *lang = g_getenv("LANG"); - if (lang) + if (lang != NULL) { if (g_strncasecmp(lang, "C", 1) == 0) lang = "en"; else if (lang[0] == 0) lang = "en"; } + else + lang = "en"; + return lang; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.