2009-06-15 16:35:00 +02:00
|
|
|
|
--- configure.in
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ configure.in 2009-05-09 11:32:24.000000000 +0000
|
|
|
|
|
@@ -264,7 +264,7 @@ if test "$with_linux_vga" = yes; then
|
2007-01-16 00:15:11 +01:00
|
|
|
|
[AC_DEFINE(LINUXVGA,1,
|
|
|
|
|
[ Define if this is a Linux system with SuperVGA library. ])
|
|
|
|
|
LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot'
|
|
|
|
|
- TERMLIBS="-lvga $TERMLIBS"],
|
|
|
|
|
+ TERMLIBS="/usr/${ARCHLIB:=lib}/libvga.a $TERMLIBS"],
|
|
|
|
|
with_linux_vga=no)
|
|
|
|
|
fi
|
|
|
|
|
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- docs/Makefile.in
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ docs/Makefile.in 2009-05-09 11:32:24.000000000 +0000
|
2007-04-12 17:32:27 +02:00
|
|
|
|
@@ -37,7 +37,7 @@
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# default is what is needed for interactive gnuplot
|
2007-04-12 17:32:27 +02:00
|
|
|
|
-all: gnuplot.gih
|
2007-01-16 00:15:11 +01:00
|
|
|
|
+all: gnuplot.gih gnuplot-fr.gih gnuplot.info
|
|
|
|
|
|
|
|
|
|
# this tells GNU make not to export variables into the environment
|
|
|
|
|
# But other makes dont understand its significance, so it must
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -245,6 +245,8 @@ html: htmldocs/gnuplot.html
|
|
|
|
|
#
|
2007-05-31 21:34:47 +02:00
|
|
|
|
htmldocs/gnuplot.html: $(srcdir)/gnuplot.tex
|
|
|
|
|
mkdir -p htmldocs
|
|
|
|
|
+ ln -sf ../../VERSION htmldocs/
|
|
|
|
|
+ ln -sf ../toc_entr.sty htmldocs/
|
|
|
|
|
latex2html -dir htmldocs -local_icons gnuplot
|
|
|
|
|
|
|
|
|
|
### PDF documentation
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -337,12 +339,16 @@ doc2hlp: doc2hlp.o termdoc.o
|
2007-01-16 00:15:11 +01:00
|
|
|
|
$(LINK) doc2hlp.o termdoc.o $(LIBS)
|
|
|
|
|
|
|
|
|
|
### gnuplot interactive help format
|
|
|
|
|
-gih: gnuplot.gih
|
|
|
|
|
+gih: gnuplot.gih gnuplot-fr.gih
|
|
|
|
|
|
|
|
|
|
gnuplot.gih: doc2gih $(srcdir)/gnuplot.doc
|
|
|
|
|
@rm -f alldoc2gih
|
|
|
|
|
./doc2gih $(srcdir)/gnuplot.doc gnuplot.gih
|
|
|
|
|
|
|
|
|
|
+gnuplot-fr.gih: doc2gih $(srcdir)/gnuplot-fr.doc
|
|
|
|
|
+ @rm -f alldoc2gih
|
|
|
|
|
+ ./doc2gih $(srcdir)/gnuplot-fr.doc gnuplot-fr.gih
|
|
|
|
|
+
|
|
|
|
|
doc2gih: doc2gih.o termdoc.o
|
|
|
|
|
$(LINK) doc2gih.o termdoc.o $(LIBS)
|
|
|
|
|
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -431,6 +437,7 @@ install: install-gih install-info
|
2007-01-16 00:15:11 +01:00
|
|
|
|
install-gih: gnuplot.gih
|
|
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(GIHDIR)
|
|
|
|
|
$(INSTALL_DATA) gnuplot.gih $(DESTDIR)$(GIHDIR)/gnuplot.gih
|
|
|
|
|
+ $(INSTALL_DATA) gnuplot-fr.gih $(DESTDIR)$(GIHDIR)/gnuplot-fr.gih
|
|
|
|
|
|
|
|
|
|
install-info: gnuplot.info
|
|
|
|
|
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -450,6 +457,7 @@ uninstall: uninstall-gih uninstall-info
|
2007-01-16 00:15:11 +01:00
|
|
|
|
|
|
|
|
|
uninstall-gih:
|
|
|
|
|
rm -f $(DESTDIR)$(GIHDIR)/gnuplot.gih
|
|
|
|
|
+ rm -f $(DESTDIR)$(GIHDIR)/gnuplot-fr.gih
|
|
|
|
|
|
|
|
|
|
uninstall-info:
|
|
|
|
|
$(PRE_UNINSTALL)
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- docs/gnuplot-fr.doc
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ docs/gnuplot-fr.doc 2009-05-09 11:32:24.000000000 +0000
|
2009-06-15 16:35:00 +02:00
|
|
|
|
@@ -436,8 +436,8 @@ C
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#Home & same as \verb~^A~. \\
|
|
|
|
|
#Ctrl Home & same as \verb~^E~. \\
|
|
|
|
|
#Esc & same as \verb~^U~. \\
|
|
|
|
|
-#Help & `{\bf help}' plus Entr<74>e. \\
|
|
|
|
|
-#Ctrl Help & `{\bf help }'. \\
|
|
|
|
|
+#Help & `{\bf help}` plus Entr<74>e. \\
|
|
|
|
|
+#Ctrl Help & `{\bf help }`. \\
|
|
|
|
|
%c l .
|
|
|
|
|
%Touche fl<66>ch<63>e@Fonction
|
|
|
|
|
%_
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- src/gplt_x11.c
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ src/gplt_x11.c 2009-05-09 11:32:24.000000000 +0000
|
|
|
|
|
@@ -2256,8 +2256,11 @@ exec_cmd(plot_struct *plot, char *comman
|
2007-01-16 00:15:11 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* X11_justify_text(mode) - set text justification mode */
|
|
|
|
|
- else if (*buffer == 'J')
|
|
|
|
|
- sscanf(buffer, "J%4d", (int *) &plot->jmode);
|
|
|
|
|
+ else if (*buffer == 'J') {
|
|
|
|
|
+ int jmode;
|
|
|
|
|
+ sscanf(buffer, "J%4d", &jmode);
|
|
|
|
|
+ plot->jmode = jmode;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
else if (*buffer == 'A')
|
2007-04-12 17:32:27 +02:00
|
|
|
|
sscanf(buffer + 1, "%lf", &plot->angle);
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- src/plot.c
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ src/plot.c 2009-05-09 11:32:24.000000000 +0000
|
|
|
|
|
@@ -222,6 +222,7 @@ static int asked_privi = 0;
|
2007-01-16 00:15:11 +01:00
|
|
|
|
void
|
|
|
|
|
drop_privilege()
|
|
|
|
|
{
|
|
|
|
|
+#ifndef SVGA_IS_SECURE
|
|
|
|
|
if (!asked_privi) {
|
|
|
|
|
euid = geteuid();
|
|
|
|
|
egid = getegid();
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -235,11 +236,13 @@ drop_privilege()
|
2007-01-16 00:15:11 +01:00
|
|
|
|
if (seteuid(ruid) == -1)
|
|
|
|
|
(void) fprintf(stderr, "seteuid(%d): %s\n",
|
|
|
|
|
(int) ruid, strerror(errno));
|
|
|
|
|
+#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
take_privilege()
|
|
|
|
|
{
|
|
|
|
|
+#ifndef SVGA_IS_SECURE
|
|
|
|
|
if (!asked_privi) {
|
|
|
|
|
euid = geteuid();
|
|
|
|
|
egid = getegid();
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -253,6 +256,7 @@ take_privilege()
|
2007-01-16 00:15:11 +01:00
|
|
|
|
if (seteuid(euid) == -1)
|
|
|
|
|
(void) fprintf(stderr, "seteuid(%d): %s\n",
|
|
|
|
|
(int) euid, strerror(errno));
|
|
|
|
|
+#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* LINUXVGA */
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -278,8 +282,8 @@ main(int argc, char **argv)
|
2007-01-16 00:15:11 +01:00
|
|
|
|
int i;
|
2007-04-12 17:32:27 +02:00
|
|
|
|
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#ifdef LINUXVGA
|
|
|
|
|
- LINUX_setup(); /* setup VGA before dropping privilege DBT 4/5/99 */
|
|
|
|
|
drop_privilege();
|
|
|
|
|
+ LINUX_setup();
|
|
|
|
|
#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 */
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -345,6 +349,23 @@ main(int argc, char **argv)
|
2009-05-28 04:44:00 +02:00
|
|
|
|
#if defined(HAVE_LIBEDITLINE)
|
|
|
|
|
rl_getc_function = getc_wrapper;
|
2007-04-12 17:32:27 +02:00
|
|
|
|
#endif
|
2009-05-28 04:44:00 +02:00
|
|
|
|
+
|
2007-01-16 00:15:11 +01:00
|
|
|
|
+#ifdef __linux__
|
|
|
|
|
+ if (!getenv("GNUHELP")) {
|
2007-05-11 16:55:36 +02:00
|
|
|
|
+ const char* msg = setlocale(LC_MESSAGES, NULL);
|
|
|
|
|
+ if (msg) {
|
2007-01-16 00:15:11 +01:00
|
|
|
|
+ char hfile[64];
|
|
|
|
|
+ struct stat buf;
|
|
|
|
|
+
|
2007-05-11 16:55:36 +02:00
|
|
|
|
+ strcpy (hfile, "/usr/share/gnuplot/4.0/gnuplot-");
|
|
|
|
|
+ strncat(hfile, msg, 2);
|
|
|
|
|
+ strcat (hfile, ".gih");
|
2007-01-16 00:15:11 +01:00
|
|
|
|
+ if (stat(hfile, &buf) == 0)
|
|
|
|
|
+ setenv("GNUHELP", strdup(hfile), 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
2007-04-12 17:32:27 +02:00
|
|
|
|
+#endif
|
|
|
|
|
+
|
2009-05-28 04:44:00 +02:00
|
|
|
|
#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE)
|
2007-04-12 17:32:27 +02:00
|
|
|
|
using_history();
|
|
|
|
|
/* T.Walter 1999-06-24: 'rl_readline_name' must be this fix name.
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- src/term.h
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ src/term.h 2009-05-09 11:32:24.000000000 +0000
|
|
|
|
|
@@ -309,9 +309,9 @@
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#include "emf.trm"
|
|
|
|
|
|
|
|
|
|
/* Roland DXY800A plotter */
|
|
|
|
|
-/* #include "dxy.trm" */
|
|
|
|
|
+#include "dxy.trm"
|
|
|
|
|
/* QMS/EXCL laserprinter (Talaris 1590 and others) */
|
|
|
|
|
-/* #include "excl.trm" */
|
|
|
|
|
+#include "excl.trm"
|
|
|
|
|
|
|
|
|
|
/* fig graphics */
|
|
|
|
|
#include "fig.trm"
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -341,7 +341,7 @@
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#include "imagen.trm"
|
|
|
|
|
|
|
|
|
|
/* Kyocera Prescribe printer */
|
|
|
|
|
-/* #include "kyo.trm" */
|
|
|
|
|
+#include "kyo.trm"
|
|
|
|
|
|
|
|
|
|
/* Frame Maker MIF 3.00 format driver */
|
|
|
|
|
#include "mif.trm"
|
2010-04-07 21:19:15 +02:00
|
|
|
|
@@ -377,7 +377,7 @@
|
2007-01-16 00:15:11 +01:00
|
|
|
|
#include "tkcanvas.trm"
|
|
|
|
|
|
|
|
|
|
/* Vectrix 384 printer, also Tandy colour */
|
|
|
|
|
-/* #include "v384.trm" */
|
|
|
|
|
+#include "v384.trm"
|
|
|
|
|
|
|
|
|
|
/* wire printers */
|
|
|
|
|
/* Epson LX-800, Star NL-10, NX-1000 and lots of others */
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- src/time.c
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ src/time.c 2009-05-09 11:32:24.000000000 +0000
|
2009-06-15 16:35:00 +02:00
|
|
|
|
@@ -291,11 +291,12 @@ gstrptime(char *s, char *fmt, struct tm
|
2007-01-16 00:15:11 +01:00
|
|
|
|
case 's':
|
|
|
|
|
#if 0 /* HBB 20040213: comment this out, but keep it around for now */
|
|
|
|
|
{
|
|
|
|
|
- /* time_t when; */
|
|
|
|
|
- int when;
|
|
|
|
|
+ time_t when;
|
|
|
|
|
+ int iwhen;
|
|
|
|
|
struct tm *tmwhen;
|
|
|
|
|
- s = read_int(s, 10, &when);
|
|
|
|
|
- tmwhen = gmtime((time_t*)&when);
|
|
|
|
|
+ s = read_int(s, 10, &iwhen);
|
|
|
|
|
+ when = iwhen;
|
|
|
|
|
+ tmwhen = gmtime(&when);
|
|
|
|
|
tmwhen->tm_year += 1900;
|
|
|
|
|
*tm = *tmwhen;
|
|
|
|
|
break;
|
2009-06-15 16:35:00 +02:00
|
|
|
|
--- term/linux.trm
|
2010-04-07 21:19:15 +02:00
|
|
|
|
+++ term/linux.trm 2009-05-09 11:32:24.000000000 +0000
|
2009-06-15 16:35:00 +02:00
|
|
|
|
@@ -80,7 +80,7 @@ TERM_PUBLIC void LINUX_linetype __PROTO(
|
2007-01-16 00:15:11 +01:00
|
|
|
|
TERM_PUBLIC void LINUX_move __PROTO((unsigned int x, unsigned int y));
|
|
|
|
|
TERM_PUBLIC void LINUX_vector __PROTO((unsigned int x, unsigned int y));
|
|
|
|
|
TERM_PUBLIC int LINUX_text_angle __PROTO((int ang));
|
|
|
|
|
-TERM_PUBLIC void LINUX_put_text __PROTO((unsigned int x, unsigned int y, const char *str));
|
|
|
|
|
+TERM_PUBLIC void LINUX_put_text __PROTO((unsigned int x, unsigned int y, char *str));
|
|
|
|
|
TERM_PUBLIC void LINUX_suspend __PROTO((void));
|
|
|
|
|
TERM_PUBLIC void LINUX_resume __PROTO((void));
|
|
|
|
|
|
2009-06-15 16:35:00 +02:00
|
|
|
|
@@ -293,7 +293,7 @@ LINUX_putc(
|
2007-04-12 17:32:27 +02:00
|
|
|
|
}
|
|
|
|
|
|
2007-01-16 00:15:11 +01:00
|
|
|
|
TERM_PUBLIC void
|
2007-04-12 17:32:27 +02:00
|
|
|
|
-LINUX_put_text(unsigned int x, unsigned int y, const char *str)
|
|
|
|
|
+LINUX_put_text(unsigned int x, unsigned int y, char *str)
|
2007-01-16 00:15:11 +01:00
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
switch (linux_angle) {
|