fix up warnings

This commit is contained in:
Caolan McNamara 2009-07-09 08:13:52 +00:00
parent e62683855a
commit 4663cc48d2
2 changed files with 8 additions and 5 deletions

View File

@ -9,7 +9,7 @@ diff -ru hunspell-1.2.8.orig/man/hunspell.1 hunspell-1.2.8/man/hunspell.1
-Without locale support, the default personal dictionary is -Without locale support, the default personal dictionary is
-the $HOME/.hunspell_default. -the $HOME/.hunspell_default.
+The default dictionary depends on the locale settings. The +The default dictionary depends on the locale settings. The
+following environment variables are searched: LANGUAGE, LC_ALL, +following environment variables are searched: LC_ALL,
+LC_MESSAGES, and LANG. If none are set then the default personal +LC_MESSAGES, and LANG. If none are set then the default personal
+dictionary is $HOME/.hunspell_default. +dictionary is $HOME/.hunspell_default.
@ -20,7 +20,7 @@ diff -ru hunspell-1.2.8.orig/man/hunspell.1 hunspell-1.2.8/man/hunspell.1
.I \-p. .I \-p.
.SH FILES .SH FILES
+The default dictionary depends on the locale settings. The +The default dictionary depends on the locale settings. The
+following environment variables are searched: LANGUAGE, LC_ALL, +following environment variables are searched: LC_ALL,
+LC_MESSAGES, and LANG. If none are set then the following +LC_MESSAGES, and LANG. If none are set then the following
+fallbacks are used: +fallbacks are used:
+ +
@ -59,10 +59,10 @@ diff -ru hunspell-1.2.8.orig/src/tools/hunspell.cxx hunspell-1.2.8/src/tools/hun
- if (at) *at = '\0'; - if (at) *at = '\0';
- } else { - } else {
+ /* + /*
+ * Search in order of LANGUAGE, LC_ALL, LC_MESSAGES & + * Search in order of LC_ALL, LC_MESSAGES &
+ * LANG + * LANG
+ */ + */
+ const char *tests[] = { "LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG" }; + const char *tests[] = { "LC_ALL", "LC_MESSAGES", "LANG" };
+ for (size_t i = 0; i < sizeof(tests) / sizeof(const char*); ++i) { + for (size_t i = 0; i < sizeof(tests) / sizeof(const char*); ++i) {
+ if ((dicname=getenv(tests[i])) && strcmp(dicname, "") != 0) { + if ((dicname=getenv(tests[i])) && strcmp(dicname, "") != 0) {
+ dicname = mystrdup(dicname); + dicname = mystrdup(dicname);

View File

@ -1,7 +1,7 @@
Name: hunspell Name: hunspell
Summary: A spell checker and morphological analyzer library Summary: A spell checker and morphological analyzer library
Version: 1.2.8 Version: 1.2.8
Release: 8%{?dist} Release: 9%{?dist}
Source0: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz Source0: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz
Source1: http://people.debian.org/~agmartin/misc/ispellaff2myspell Source1: http://people.debian.org/~agmartin/misc/ispellaff2myspell
Source2: http://people.redhat.com/caolanm/hunspell/wordlist2hunspell Source2: http://people.redhat.com/caolanm/hunspell/wordlist2hunspell
@ -111,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/hunspell.3.gz %{_mandir}/man3/hunspell.3.gz
%changelog %changelog
* Thu Jul 09 2009 Caolan McNamara <caolanm@redhat.com> - 1.2.8-9
- fix up rpmlint warnings
* Tue Jul 07 2009 Caolan McNamara <caolanm@redhat.com> - 1.2.8-8 * Tue Jul 07 2009 Caolan McNamara <caolanm@redhat.com> - 1.2.8-8
- Resolves: rhbz#509882 ignore an empty LANGUAGE variable - Resolves: rhbz#509882 ignore an empty LANGUAGE variable