forked from pool/gnuplot
This commit is contained in:
parent
2e1791cfc5
commit
541212488f
@ -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);
|
||||
+ }
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user