From 541212488fe6767b834a5ebce5885abfbb2c22faf9e8112480be1b6d4ab3386c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 11 May 2007 14:55:36 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuplot?expand=0&rev=5 --- gnuplot-4.2.0.dif | 14 ++++++-------- gnuplot.changes | 5 +++++ gnuplot.spec | 4 +++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gnuplot-4.2.0.dif b/gnuplot-4.2.0.dif index caa30d4..bd8b6f0 100644 --- a/gnuplot-4.2.0.dif +++ b/gnuplot-4.2.0.dif @@ -235,22 +235,20 @@ #endif /* make sure that we really have revoked root access, this might happen if gnuplot is compiled without vga support but is installed suid by mistake */ -@@ -348,6 +352,24 @@ main(int argc, char **argv) +@@ -348,6 +352,22 @@ main(int argc, char **argv) unsigned int status[2] = { 1, 0 }; #endif +#ifdef __linux__ + if (!getenv("GNUHELP")) { -+ char* lang = getenv ("LANG"); -+ if (lang) { ++ const char* msg = setlocale(LC_MESSAGES, NULL); ++ if (msg) { + char hfile[64]; + struct stat buf; + -+ if (strlen(lang) > 2) -+ lang[2] = '\0'; -+ strcpy(hfile, "/usr/share/gnuplot/4.0/gnuplot-"); -+ strcat(hfile, lang); -+ strcat(hfile, ".gih"); ++ strcpy (hfile, "/usr/share/gnuplot/4.0/gnuplot-"); ++ strncat(hfile, msg, 2); ++ strcat (hfile, ".gih"); + if (stat(hfile, &buf) == 0) + setenv("GNUHELP", strdup(hfile), 0); + } diff --git a/gnuplot.changes b/gnuplot.changes index 90d5d0d..be88ac4 100644 --- a/gnuplot.changes +++ b/gnuplot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 11 16:52:57 CEST 2007 - werner@suse.de + +- Use setlocale(..,NULL) instead of gentenv() (bug #272915) + ------------------------------------------------------------------- Tue Apr 24 12:32:31 CEST 2007 - werner@suse.de diff --git a/gnuplot.spec b/gnuplot.spec index 0aba199..f793782 100644 --- a/gnuplot.spec +++ b/gnuplot.spec @@ -18,7 +18,7 @@ Group: Productivity/Graphics/Visualization/Graph Autoreqprov: on PreReq: %install_info_prereq Version: 4.2.0 -Release: 4 +Release: 13 Summary: Function Plotting Utility Source0: gnuplot-4.2.0.tar.bz2 Source2: gnuplot-fr.doc.bz2 @@ -163,6 +163,8 @@ test $? -eq 0 || exit 1 %{_appdef}/Gnuplot.app-defaults %changelog +* Fri May 11 2007 - werner@suse.de +- Use setlocale(..,NULL) instead of gentenv() (bug #272915) * Tue Apr 24 2007 - werner@suse.de - Enable new but experimental wxt terminal (bug #266693) * Fri Apr 20 2007 - aj@suse.de