Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gnuplot.15840 for openSUSE:Leap:15.2:Update checked in at 2021-02-26 14:05:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2:Update/gnuplot.15840 (Old) and /work/SRC/openSUSE:Leap:15.2:Update/.gnuplot.15840.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnuplot.15840" Fri Feb 26 14:05:28 2021 rev:1 rq:874569 version:5.2.2 Changes: -------- New Changes file: --- /dev/null 2021-02-22 01:36:22.145178436 +0100 +++ /work/SRC/openSUSE:Leap:15.2:Update/.gnuplot.15840.new.2378/gnuplot.changes 2021-02-26 14:05:29.131464502 +0100 @@ -0,0 +1,1352 @@ +------------------------------------------------------------------- +Thu Feb 11 14:30:20 UTC 2021 - Dr. Werner Fink <wer...@suse.de> + +- Add patch 052cbd17.patch and 1f36c4fb.patch + * Fix boo#1176689: + VUL-0: CVE-2020-25559: gnuplot: double free when executing print_set_output + +------------------------------------------------------------------- +Wed Nov 28 11:35:10 UTC 2018 - Dr. Werner Fink <wer...@suse.de> + +- Add patch gnuplot-e3cc539c.patch from upstream commit e3cc539c + Fix the bugs boo#1117463 (CVE-2018-19492), boo#1117464 (CVE-2018-19491), + and boo#1117465 (CVE-2018-19490) + +------------------------------------------------------------------- +Thu Feb 15 10:30:48 UTC 2018 - wer...@suse.de + +- Do not miss gpic and mif +- Even if pulled by other packages do explicite require for the build + * pkgconfig(freetype2) + * pkgconfig(libjpeg) + * pkgconfig(libpng16) + +------------------------------------------------------------------- +Mon Feb 12 18:26:08 UTC 2018 - crrodrig...@opensuse.org + +- Do not use xorg-x11-* as buildrequires +- Fix broken GD libs detection (gnuplot-gd.patch) +- Remove unneeded buildrequires. + +------------------------------------------------------------------- +Thu Nov 16 07:52:31 UTC 2017 - wer...@suse.de + +- Update to gnuplot 5.2.2 + * NEW splot ... with lines title at {beg|end} + * FIX allow mixed use of in-key plot titles and manually placed titles + * FIX prevent runaway iterations of the form plot for [i=start:*] ... + * FIX handle in-line range limits for linked or nonlinear axes + * FIX restore pre-5.2 interpretation of logscaled tic increment as a multiplier + * FIX logscale tic placement is closer to that of versions before 5.2.0 + * FIX recheck inrange/outrange points after spline or bezier smoothing + * FIX sampling on x2 if linked to x1; e.g. plot sample [t=1:5:1] '+' axes x2y1 + * FIX empty range on logscale y axis is handled by auto-extending the range + * FIX autoscaling xrange of stacked histograms +- Add now missed TEXDIR at configure time which now includes also + the sub path tex/latex/gnuplot/ below /usr/share/texmf/ (could + become removed with some of the next version updates?) + +------------------------------------------------------------------- +Wed Nov 8 18:31:59 UTC 2017 - nico.kru...@gmail.com + +- Update to gnuplot 5.2.1 + * NEW set table separator {tab|comma|"char"} allows creation of csv files + * NEW hotkey for changing azimuth in 3D plots with mousing + * NEW titles for "splot .. with lines" can be placed at {beg|end} of plotted line + * NEW Rework gstrptime() to handle relative time formats tH tM tS + * NEW command 'set rgbmax <value>' controls interpretation of input RGB values + * CHANGE restore pre-5.2 interpretation of logscaled tic increment as a multiplier + * CHANGE allow mixed use of in-key plot titles and manually placed titles + * FIX autoscaling of plots with spline or bezier smoothing + * FIX autoscaling of plots with linked axes where data is plotted on x2 or y2 + * FIX "with filledcurves below y=foo" mishandled the case of y value exactly = foo + * FIX [windows] repair breakage of stderr/stdout redirection to console + * FIX postscript terminal artifacts when drawing dot/dash circles + * FIX handle empty range on logscale y axis as a warning, not an error + +------------------------------------------------------------------- +Fri Sep 29 07:55:11 UTC 2017 - wer...@suse.de + +- Add patch gnuplot-5.2.0-texi2info.patch as source to be avble + to patch the resulting gnuplot.texi +- Modify patches + * gnuplot-4.4.0-x11ovf.dif + * gnuplot-4.6.0-demo.diff + * gnuplot-4.6.0-fonts.diff + * gnuplot-4.6.0.dif + * gnuplot-QtCore-PIC.dif + * gnuplot-wx3.diff + +------------------------------------------------------------------- +Wed Sep 27 13:47:57 UTC 2017 - wer...@suse.de + +- Update to gnuplot 5.2.0 + * NEW user-defined dashtypes in metapost terminal + * NEW datablock contents may be accessed as an indexed array of strings + * CHANGE allow explicit sample interval for u and v using pseudofile '++' + * CHANGE decouple cbrange from color components in "with rgbimage" + * FIX reconcile aspect ratio flags from "set view map" and "set view equal xy" + * FIX "set key fixed" should be ignored in the case of "set view map" + * FIX GPVAL_* variables were not being updated in "set table" mode + * FIX evaluation of nested iteration containing an empty range + * FIX bug in variant time_spec formats %tH %tM (undesired wrapping) + * NEW "plot with table" can handle string-valued output columns + * CHANGE add caca terminal documentation to the user manual + * CHANGE revised output of "test" command + * CHANGE use Mingw-w64 and MSVC popen rather than built-in "fake" popen + * FIX copy environmental variable GNUTERM to internal variable on entry + * FIX more consistent handling of plot 'with table' + * FIX incorrect, possibly empty, command string was saved for previous fit + * FIX ignore non-numeric values of potential dummy params used by "fit" + * FIX autoscaling during refresh of volatile data plots "with vectors" + * FIX terminal initialization must be done before executing ~/.gnuplot + * FIX do not use LaTeX formatting in tabular output + * FIX polar border should not be clipped to rectangular border + * FIX raxis was truncated at R=0 if the axis direction was inverted + * FIX sanity check to catch "plot '+' binary" + * FIX sanity check for NULL format passed to gprintf + * FIX sanity check inverse mapping function of set link and set nonlinear + * FIX sanity check for empty image data structure + * FIX segfault from corruption of timestamp text + * FIX several unitialized variables (see Bug 1933) + * FIX dumb term: linetype character distinction was lost if not in color mode + * CHANGE svg terminal option "fontscale" replaces obsolete "fsize" + * NEW plot styles + * NEW splot ... using <x>:<y>:<z>:<zlow>:<zhigh> with zerrorfill + * NEW "set jitter" allows creation of bee swarm plots + * NEW data filter "bins" sorts input into equal width bins on x + * NEW "with points" and "with linespoints" accept `pointtype variable` + * NEW hidden3d now treats 'image' and 'rgbimage' as occluding rectangles + * NEW "smooth fnormal" normalized frequency + * NEW polar mode improvements and extensions + * NEW "set [m]ttics" places labels around perimeter of polar grid + * NEW "set rlabel" places a label above the r axis + * NEW "set rrange [90:0]" plots in celestial horizontal coordinates + * NEW "set border polar" uses border linetype for perimeter of polar plot + * NEW "set theta <origin> <sense>" orientation of polar coordinate theta + * NEW label, arrow, and object positions may be given in polar coordinates + * NEW nonlinear coordinate systems + * NEW "set nonlinear <axis> via f(axis) inverse g(axis)" + * NEW "set log" re-implemented as special case of "set nonlinear" + * NEW data type array[size] + * NEW commands and command options + * NEW "break" exits from iteration loop + * NEW "continue" begins next iteration immediately + * NEW "toggle {<plotno> | "plottitle" | all}" + * NEW "set pm3d lighting" specifies lighting model with specular highlighting + * NEW "set table OUTFILE {append}" + * NEW "set minussign" and "set micro" (first appeared in 5.0.5) + * NEW "set view azimuth <angle>" controls azimuth of the z axis in 3D plots + * NEW "save fit <filename>" replaces deprecated command "update" + * NEW terminals and terminal options + * NEW terminal domterm (supports in-line SVG in DomTerm terminal emulator) + * NEW terminal sixelgd (sixel terminal graphics using gdlib) + * NEW svg 'standalone' embeds images rather than including by reference + * NEW windows terminal supports saving graph as bitmap + * NEW windows graph windows can be docked to the wgnuplot text window + * NEW windows terminal Direct2D driver rather than GDI/GDI+ where possible + * NEW wxt supports saving graph as EMF on Windows + * NEW wxt supports printing on Windows + * NEW dumb suports ANSI colors and filled polygons + * NEW Optional sampling interval in range specifiers for pseudofiles '+' '++' + * NEW gnuplot on Windows + * converts Unicode (BMP) input to current `set encoding`, including UTF-8 + * is system DPI aware + * NEW textbox style supports fillcolor and bordercolor + * CHANGE point style associated with "plot with labels" is shown in the key + * CHANGE Revise placement of axis labels in 3D plots + * CHANGE Timestamp is now placed relative to page rather than plot boundary + * CHANGE Track font/enhanced for key title separately from the key entries + * CHANGE order of margins in `set margins <left>, <right>, <bottom>, <top>` + * CHANGE Store and reuse x,y dimensions from the time image data is read in + * CHANGE Some STATS_* variables are of type integer rather than real (complex) + * CHANGE ^R starts a backward search when using the built-in readline + * CHANGE Only update axis->data_min/max if the point being stored is INRANGE + * CHANGE auto-generation of minitics on logscale axis has changed + * CHANGE revised printing dialogs on Windows + * CHANGE preserve whitespace following opening { in enhanced text strings + * CHANGE windows terminal provides better oversampling + * CHANGE New default "set key fixed" prevents 3D key box from rotating with plot + * CHANGE Deprecate pdf terminal requiring non-free library PDFlib + * CHANGE windows terminal also uses GDI+ for printing and copy-to-clipboard + * CHANGE raxis/polar grid can coexist with cartesian axes + * CHANGE evaluation of norm(x) or x**y returns 0 on floating underflow + * CHANGE support for space-in-x11-raises-KDE3-konsole is now a configure option + * CHANGE don't use loadpath to choose output directory for "save" + * CHANGE GNUTERM may contain terminal options in addition to bare terminal name + * CHANGE remove legacy terminals corel and dxf from default build + * FIX cairo.trm - reset terminal font after printing an enhanced text string + * FIX autoscaling of data with "smooth cnorm" + * FIX Built-in readline handles S-JIS encoding + * FIX Output to printer on Windows via special file "PRN" + +------------------------------------------------------------------- +Wed Aug 16 07:09:12 UTC 2017 - wer...@suse.de + +- Update to 5.0.7 (which does also close CVE-2017-9670 (bsc#1044638)) + * NEW set term {pngcairo|pdfcairo} pointscale <factor> + * NEW "save fit" back-ported from version 5.2 as a replacement for "update" + * NEW user-defined dashtypes in metapost terminal + * CHANGE deprecate "update" command (but do not remove it) + * CHANGE allow placement of circles in 3D plots using axis coordinates + * CHANGE ignore invalid z coordinate for 3D objects placed in "set view map" + * CHANGE distinguish 'bind "shift-Button1"' from 'bind "Button1"' + * CHANGE use Mingw-w64 and MSVC popen rather than built-in "fake" popen + * CHANGE allow range to include sampling interval in plots using pseudofile '+' + * FIX rangelimited y2 axis could produce spurious diagonal line across plot + * FIX assignment of x/y dimensions in "binary record=(a,b) ... with image" ++++ 1155 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Leap:15.2:Update/.gnuplot.15840.new.2378/gnuplot.changes New: ---- 052cbd17.patch 1f36c4fb.patch README.whynot gnuplot-4.4.0-x11ovf.dif gnuplot-4.6.0-demo.diff gnuplot-4.6.0-fonts.diff gnuplot-4.6.0.dif gnuplot-5.2.0-texi2info.patch gnuplot-5.2.2.tar.gz gnuplot-QtCore-PIC.dif gnuplot-e3cc539c.patch gnuplot-el.tar.bz2 gnuplot-fr.doc.bz2 gnuplot-gd.patch gnuplot-wx3.diff gnuplot.changes gnuplot.spec gnuplot.test picins.sty ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnuplot.spec ++++++ # # spec file for package gnuplot # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %bcond_without h3d_gridbox %if 0%{suse_version} > 1310 %define qtver 5 %else %define qtver 4 %endif Name: gnuplot BuildRequires: ImageMagick BuildRequires: automake BuildRequires: cairo-devel BuildRequires: emacs-nox BuildRequires: gcc-c++ BuildRequires: gd-devel BuildRequires: glib2-devel BuildRequires: gtk2-devel BuildRequires: netpbm BuildRequires: pango-devel BuildRequires: readline-devel BuildRequires: pkgconfig(caca) BuildRequires: pkgconfig(x11) %if %qtver >= 5 BuildRequires: libqt5-linguist-devel BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Svg) %else BuildRequires: libqt4-devel >= 4.5 %endif BuildRequires: fdupes BuildRequires: latex2html BuildRequires: lua-devel BuildRequires: makeinfo BuildRequires: plotutils-devel BuildRequires: texlive-dvips BuildRequires: texlive-epstopdf BuildRequires: texlive-latex BuildRequires: texlive-latexconfig BuildRequires: texlive-tex BuildRequires: texlive-tex4ht BuildRequires: texlive-texinfo BuildRequires: texlive-ucs BuildRequires: texlive-ucs BuildRequires: zziplib BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libcerf) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng16) BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(hyperref.sty) BuildRequires: tex(pdftex.def) BuildRequires: tex(subfigure.sty) %if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1310 BuildRequires: wxWidgets-devel %define _use_internal_dependency_generator 0 %define __find_requires %wx_requires %else BuildRequires: wxWidgets-devel >= 3 %endif Url: http://www.gnuplot.info/ Version: 5.2.2 Release: 0 Summary: Function Plotting Utility and more License: SUSE-Gnuplot and GPL-2.0+ Group: Productivity/Graphics/Visualization/Graph Source0: http://downloads.sourceforge.net/project/gnuplot/gnuplot/%{version}/gnuplot-%{version}.tar.gz Source2: gnuplot-fr.doc.bz2 Source3: README.whynot # According to the gnuplot 5.0.0 release notes, the emacs .el should now be # available at https://github.com/rudi/gnuplot-el but it doesn't exist anymore. # Use the files from the lisp/ directory from gnuplot' CVS just before it was # removed on 6 March 2014. Source4: gnuplot-el.tar.bz2 # http://mirrors.ctan.org/macros/latex209/contrib/picins/picins.sty # That's a build requirement, not provided by Tex Live Source5: picins.sty # Repair broken texi(nfo) file Source6: gnuplot-5.2.0-texi2info.patch Patch0: gnuplot-4.6.0.dif Patch1: gnuplot-4.4.0-x11ovf.dif Patch2: gnuplot-4.6.0-fonts.diff Patch4: gnuplot-4.6.0-demo.diff Patch5: gnuplot-wx3.diff Patch6: gnuplot-QtCore-PIC.dif Patch7: gnuplot-gd.patch # PATCH-FIX-UPSTREAM upstream cimmit for boo#1117463, #1117464, and #1117465 Patch8: gnuplot-e3cc539c.patch # PATCH-FIX-UPSTREAM for boo#1176689 Patch9: 052cbd17.patch Patch10: 1f36c4fb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %if "%_exec_prefix" == "/usr/X11R6" %define _x11lib %{_exec_prefix}/%{_lib} %define _x11data %{_exec_prefix}/lib/X11 %define _libx11 %{_x11data} %define _x11inc %{_exec_prefix}/include %define _appdef %{_x11data}/app-defaults %else %define _x11lib %{_libdir} %define _x11data %{_datadir}/X11 %define _libx11 %{_exec_prefix}/lib/X11 %define _x11inc %{_includedir} %define _appdef %{_x11data}/app-defaults %endif %define _gnplttex tex/latex/gnuplot %description GNUplot is a command line driven interactive function plotting utility. GNUplot supports many different types of terminals, plotters, and printers (including many color devices and pseudodevices like LaTeX) and can easily be extended to include new devices. %package doc Summary: Documentation of GNUplot Group: Productivity/Graphics/Visualization/Graph Requires: %{name} Requires(post): %install_info_prereq Requires(preun): %install_info_prereq BuildArch: noarch %description doc GNUplot documentation files including the man and info pages. GNUplot is a command line driven interactive function plotting utility. GNUplot supports many different types of terminals, plotters, and printers (including many color devices and pseudodevices like LaTeX) and can easily be extended to include new devices. %{name} documentation files including the man and info pages %prep %setup -qa 4 bunzip2 -dc %{_sourcedir}/gnuplot-fr.doc.bz2 > docs/gnuplot-fr.doc test $? -eq 0 || exit 1 cp %{_sourcedir}/picins.sty docs %patch2 -p0 -b .font %patch4 -p0 -b .demo %patch0 -p1 -b .0 %patch1 -p0 -b .x11ovf %patch5 -p1 -b .w3x %patch6 -p0 -b .pic %patch7 -p1 -b .gd %patch8 -p0 -b .sec %patch9 -p0 -b .sec1 %patch10 -p0 -b .sec2 %build autoreconf -fi SECSVGA="-DSVGA_IS_SECURE=1" export CPPFLAGS="-I%{_x11inc} -I%{_includedir}/gd -DAppDefDir=\\\"%{_appdef}\\\"" export CPPFLAGS="$CPPFLAGS -DGNUPLOT_LIB_DEFAULT=\\\"%{_docdir}/%{name}/demo\\\"" export CFLAGS="${RPM_OPT_FLAGS} -pipe ${SECSVGA} -D_GNU_SOURCE" export CXXFLAGS="$CFLAGS -fno-strict-aliasing" export LDFLAGS="-L%{_x11lib} -Wl,--as-needed" export ARCHLIB=%_lib for f in docs/makefile*; do test -e $f || continue mv $f $f.bak done autoreconf -fi # sed -i "s;bin/uic;bin/uic-qt5;g" ./configure # sed -i "s;bin/moc;bin/moc-qt5;g" ./configure # sed -i "s;bin/rcc;bin/rcc-qt5;g" ./configure # sed -i "s;bin/lrelease;bin/lrelease-qt5;g" ./configure # sed -i "s;UIC=uic;UIC=uic-qt5;g" ./configure # sed -i "s;MOC=moc;MOC=moc-qt5;g" ./configure # sed -i "s;RCC=rcc;RCC=rcc-qt5;g" ./configure # sed -i "s;LRELEASE=lrelease;LRELEASE=lrelease-qt5;g" ./configure %configure \ --enable-stats \ --with-x \ --x-includes=%{_x11inc} \ --x-libraries=%{_x11lib}\ --with-x-app-defaultdir=%{_appdef}\ --with-texdir=/usr/share/texmf/%{_gnplttex} \ --with-readline=gnu \ --enable-history-file \ --with-linux-vga \ --with-bitmap-terminals \ --with-gpic \ --with-mif \ --enable-x11-mbfonts \ %if ! %{with h3d_gridbox} --enable-h3d-quadtree \ --disable-h3d-gridbox \ %else --disable-h3d-quadtree \ --enable-h3d-gridbox \ %endif --enable-backwards-compatibility\ --with-gd=%{_usr} \ --without-row-help \ --with-kpsexpand \ --with-caca \ --with-qt=qt%{qtver} %if %{qtver} >= 5 make %{?_smp_mflags} UIC=/usr/bin/uic-qt5 MOC=/usr/bin/moc-qt5 RCC=/usr/bin/rcc-qt5 LRELEASE=/usr/bin/lrelease-qt5 %else make %{?_smp_mflags} %endif pushd docs/ make srcdir=. clean all html pdf make srcdir=. gnuplot.texi patch -p0 < %{S:6} make srcdir=. info pushd psdoc/ make srcdir=. pdf popd popd pushd tutorial/ make srcdir=. clean pdf popd pushd lisp/ for el_file in gnuplot.el gnuplot-gui.el; do emacs -batch -q -no-site-file -l "dot.el" -f batch-byte-compile \ "$el_file" done popd %install rm -rf %{buildroot} make DESTDIR=%{buildroot} appdefaultdir=%{_appdef} install mkdir -p %{buildroot}/%{_infodir} mkdir -p %{buildroot}/%{_mandir}/ja/man1 mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc/html mkdir -p %{buildroot}/%{_docdir}/gnuplot/demo mkdir -p %{buildroot}/%{_datadir}/emacs/site-lisp rm -vf docs/htmldocs/images.{aux,idx,log,out,tex} rm -vf docs/htmldocs/*.pl rm -vf docs/htmldocs/*.sty rm -vf docs/htmldocs/WARNINGS rm -vf docs/htmldocs/VERSION rm -rvf demo/html install -m 0444 docs/*.info* %{buildroot}/%{_infodir}/ install -m 0444 docs/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/htmldocs/* %{buildroot}/%{_docdir}/gnuplot/doc/html install -m 0444 docs/psdoc/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/psdoc/*.ps %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/psdoc/*.gpi %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/psdoc/*.doc %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/psdoc/README %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 tutorial/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 demo/*.* %{buildroot}/%{_docdir}/gnuplot/demo/ install -m 0444 README* %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 Copyright %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 VERSION %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 NEWS BUGS %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 %{SOURCE3} %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 lisp/gnuplot*.el* %{buildroot}/%{_datadir}/emacs/site-lisp/ mv %{buildroot}/%{_mandir}/man1/gnuplot-ja.1 %{buildroot}/%{_mandir}/ja/man1/gnuplot.1 rm -f %{buildroot}/%{_docdir}/gnuplot/demo/Makefile* %fdupes -s %{buildroot} %post doc %install_info --info-dir=.%{_infodir} .%{_infodir}/%{name}.info.gz %preun doc %install_info_delete --info-dir=.%{_infodir} .%{_infodir}/%{name}.info.gz %files %defattr(-,root,root) %{_bindir}/gnuplot %{_libexecdir}/gnuplot %{_datadir}/gnuplot %{_datadir}/texmf/%{_gnplttex}/ %{_datadir}/emacs/site-lisp/ %{_appdef}/Gnuplot %files doc %defattr(-,root,root,-) %doc %{_docdir}/gnuplot/ %doc %{_infodir}/%{name}.info.gz %doc %{_mandir}/man1/gnuplot.1.gz %doc %{_mandir}/ja/man1/gnuplot.1.gz %changelog ++++++ 052cbd17.patch ++++++ >From 052cbd17c3cbbc602ee080b2617d32a8417d7563 Mon Sep 17 00:00:00 2001 From: Ethan A Merritt <merr...@u.washington.edu> Date: Wed, 9 Sep 2020 11:00:59 -0700 Subject: [PATCH] successive failures of "set print <foo>" could cause double-free Bug #2312 --- src/command.c | 1 + 1 file changed, 1 insertion(+) diff --git src/command.c src/command.c index c6a923b5a..9701de995 100644 --- src/command.c +++ src/command.c @@ -1842,6 +1842,7 @@ print_set_output(char *name, TBOOLEAN datablock, TBOOLEAN append_p) #endif if (0 > fclose(print_out)) perror(print_out_name); + print_out = stderr; } free(print_out_name); -- 2.26.2 ++++++ 1f36c4fb.patch ++++++ >From 1f36c4fbb3e8e0beb213b4a29ab463e43db9ef42 Mon Sep 17 00:00:00 2001 From: Ethan A Merritt <merr...@u.washington.edu> Date: Fri, 11 Sep 2020 17:38:55 -0700 Subject: [PATCH] prevent buffer overflow of enhanced text fragment The generic enhanced text buffering uses a shared buffer with fixed length. Add a check on the current position before adding each character in an enhanced text fragment. Affects terminals caca canvas dumb emf gd pc pdf pm tkcanvas x11 win Does not affect terminals with customized text handling qt wxt cairo Bugs #2310 #2311 --- src/term.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git src/term.c src/term.c index 7fd46fa04..70a2a7f25 100644 --- src/term.c +++ src/term.c @@ -194,6 +194,7 @@ char *enhanced_cur_text = NULL; double enhanced_fontscale = 1.0; char enhanced_escape_format[16] = ""; double enhanced_max_height = 0.0, enhanced_min_height = 0.0; +#define ENHANCED_TEXT_MAX (&enhanced_text[MAX_LINE_LEN]) /* flag variable to disable enhanced output of filenames, mainly. */ TBOOLEAN ignore_enhanced_text = FALSE; @@ -2203,6 +2203,9 @@ test_term() void do_enh_writec(int c) { + /* Guard against buffer overflow */ + if (enhanced_cur_text >= ENHANCED_TEXT_MAX) + return; /* note: c is meant to hold a char, but is actually an int, for * the same reasons applying to putc() and friends */ *enhanced_cur_text++ = c; -- 2.26.2 ++++++ README.whynot ++++++ Why PDF support is not enabled: =============================== Requires libpdf which is a commercial library and therefore not part of SuSE LINUX. As a replacement the `pdfcairo' terminal can be used to generate output in pdf. ++++++ gnuplot-4.4.0-x11ovf.dif ++++++ --- src/gplt_x11.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- src/gplt_x11.c +++ src/gplt_x11.c 2017-09-27 10:05:59.165076157 +0000 @@ -960,6 +960,8 @@ mainloop() nfds = cn + 1; while (1) { + int ipc; + XFlush(dpy); /* see above */ FD_ZERO(&tset); @@ -997,7 +999,11 @@ mainloop() process_event(&xe); } } - if ((X11_ipc = fopen(X11_ipcpath, "r"))) { + + if ((ipc = open(X11_ipcpath, O_RDONLY|O_CREAT|O_CLOEXEC|O_EXCL)) < 0) + break; + + if ((X11_ipc = dfopen(ipc, "r"))) { unlink(X11_ipcpath); record(); fclose(X11_ipc); @@ -1229,8 +1235,8 @@ static int read_input __PROTO((void)); static int read_input() { - static int rdbuf_size = 10 * X11_COMMAND_BUFFER_LENGTH; - static char rdbuf[10 * X11_COMMAND_BUFFER_LENGTH]; + const int rdbuf_size = 10 * X11_COMMAND_BUFFER_LENGTH; + static char rdbuf[(10 * X11_COMMAND_BUFFER_LENGTH)+1]; static int total_chars; static int rdbuf_offset; static int buf_offset; ++++++ gnuplot-4.6.0-demo.diff ++++++ --- demo/fit.dem | 4 ++++ demo/poldat.dem | 2 +- demo/simple.dem | 3 +-- src/show.c | 9 +++++++++ src/variable.c | 20 +++++++++++++++++++- 5 files changed, 34 insertions(+), 4 deletions(-) --- demo/fit.dem +++ demo/fit.dem 2017-09-27 09:55:05.976971898 +0000 @@ -10,6 +10,7 @@ set dummy x, y print "Some examples how data fitting using nonlinear least squares fit can be done." print '' +logfile = "`mktemp /tmp/fit.log.XXXXXX`" print "We fit a straight line to the data -- only as a demo without physical meaning." l(x) = y0 + m*x @@ -29,6 +30,7 @@ set title 'data set and initial paramete plot 'lcdemo.dat', l(x) pause -1 "Now start fitting... (-> return)" +set fit logfile logfile fit l(x) 'lcdemo.dat' via y0, m set title 'unweighted fit' plot 'lcdemo.dat', l(x) @@ -324,6 +326,7 @@ print ' "fit3.dat" u 1:2:3:4 via a0, pause -1 "Press enter to proceed with the next example." reset +set fit logfile logfile print "\n" print "The fit command can handle errors in the independent variable, too." print "The problem shown here is Pearson's data with York's weights.\n" @@ -429,6 +432,7 @@ print "to time." print '' pause -1 "Done with fitting demo (-> return)" reset +set fit logfile logfile set encoding myencoding # release datablock undefine $PearsonYork --- demo/poldat.dem +++ demo/poldat.dem 2017-09-27 09:55:05.976971898 +0000 @@ -11,7 +11,7 @@ unset grid unset polar set title "Primitive Smith Chart" unset key -set xlabel "Impedance or Admittance Coordinates" +set xlabel "Impedance or Admittance Coordinates" offset 12,-1 set para set rrange [-0 : 10] set trange [-pi : pi] --- demo/simple.dem +++ demo/simple.dem 2017-09-27 09:55:05.976971898 +0000 @@ -8,14 +8,13 @@ # set title "Simple Plots" font ",20" set key left box -set samples 50 +set samples 400 set style data points plot [-10:10] sin(x),atan(x),cos(atan(x)) pause -1 "Hit return to continue" set key right nobox -set samples 100 plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) pause -1 "Hit return to continue" --- src/show.c +++ src/show.c 2017-09-27 09:55:05.980971825 +0000 @@ -1076,6 +1076,15 @@ show_version(FILE *fp) p /* type "help seeking-assistance" */ ); +#ifdef GNUPLOT_LIB_DEFAULT + { + struct stat st; + if ((stat(GNUPLOT_LIB_DEFAULT, &st) == 0) && S_ISDIR(st.st_mode)) { + fprintf(fp, "%s\n%s\tType `load \"all.dem\"` to display a large number of examples.", p, p); + fprintf(fp, "\n%s\tThey are located at %s/*\n%s\n", p, GNUPLOT_LIB_DEFAULT, p); + } + } +#endif /* show version long */ if (almost_equals(c_token, "l$ong")) { --- src/variable.c +++ src/variable.c 2017-09-27 09:55:05.980971825 +0000 @@ -37,7 +37,10 @@ static char *RCSid() { return RCSid("$Id /* The Death of Global Variables - part one. */ #include <string.h> - +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> #include "variable.h" #include "alloc.h" @@ -98,6 +101,17 @@ loadpath_handler(int action, char *path) if (!loadpath) { char *envlib = getenv("GNUPLOT_LIB"); +#ifdef GNUPLOT_LIB_DEFAULT + char *defenvlib = (char*)0; + struct stat st; + if ((stat(GNUPLOT_LIB_DEFAULT, &st) == 0) && S_ISDIR(st.st_mode)) { + if (envlib) { + if (asprintf(&defenvlib, "%s:%s", envlib, GNUPLOT_LIB_DEFAULT) > 0) + envlib = defenvlib; + } else + envlib = GNUPLOT_LIB_DEFAULT; + } +#endif /* GNUPLOT_LIB_DEFAULT */ if (envlib) { int len = strlen(envlib); loadpath = gp_strdup(envlib); @@ -106,6 +120,10 @@ loadpath_handler(int action, char *path) /* convert all PATHSEPs to \0 */ PATHSEP_TO_NUL(loadpath); } /* else: NULL = empty */ +#ifdef GNUPLOT_LIB_DEFAULT + if (defenvlib) + free(defenvlib); +#endif /* GNUPLOT_LIB_DEFAULT */ } /* else: already initialised; int_warn (?) */ /* point to env portion of loadpath */ envptr = loadpath; ++++++ gnuplot-4.6.0-fonts.diff ++++++ --- src/gplt_x11.c | 33 +++++++++++++++++++++++++++------ src/variable.c | 2 ++ 2 files changed, 29 insertions(+), 6 deletions(-) --- src/gplt_x11.c +++ src/gplt_x11.c 2017-09-27 09:54:43.805379677 +0000 @@ -103,15 +103,16 @@ static char *RCSid() { return RCSid("$Id * patches by Masahito Yamaga <m...@yama-ga.com> */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include <string.h> #include <X11/Xos.h> #include <X11/Xlib.h> #include <X11/Xresource.h> #include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/keysym.h> -#ifdef USE_X11_MULTIBYTE -# include <X11/Xlocale.h> -#endif #include <X11/XKBlib.h> /* for XkbKeycodeToKeysym */ #include <assert.h> @@ -122,6 +123,12 @@ static char *RCSid() { return RCSid("$Id #include "gplt_x11.h" #include "version.h" +#ifdef USE_X11_MULTIBYTE +# include <locale.h> +# include <langinfo.h> +# include <X11/Xlocale.h> +#endif + #ifdef EXPORT_SELECTION # undef EXPORT_SELECTION #endif /* EXPORT SELECTION */ @@ -525,8 +532,8 @@ static char *gpFallbackFont __PROTO((voi static int gpXGetFontascent __PROTO((XFontStruct *cfont)); enum set_encoding_id encoding = S_ENC_DEFAULT; /* EAM - mirrored from core code by 'QE' */ -static char default_font[196] = { '\0' }; -static char default_encoding[16] = { '\0' }; +static char default_font[256] = { '\0' }; +static char default_encoding[64] = { '\0' }; #define Nwidths 10 static unsigned int widths[Nwidths] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -2291,6 +2298,8 @@ exec_cmd(plot_struct *plot, char *comman /* Save the request default font */ c = &(buffer[strlen(buffer)-1]); while (*c <= ' ') *c-- = '\0'; + if (strlen(&buffer[2]) == 0) + break; strncpy(default_font, &buffer[2], strlen(&buffer[2])+1); FPRINTF((stderr, "gnuplot_x11: exec_cmd() set default_font to \"%s\"\n", default_font)); break; @@ -5774,7 +5783,7 @@ XFontStruct *gpXLoadQueryFont (Display * } #else if (first_time) { - fprintf(stderr,"gnuplot_x11: Some character sets not available\n"); + FPRINTF(("gnuplot_x11: Some character sets not available\n")); first_time = FALSE; } while (n_miss-- > 0) @@ -5929,6 +5938,18 @@ char *fontname; } #ifdef USE_X11_MULTIBYTE + if ((!fontname || !(*fontname)) && multibyte_fonts_usable) { + const char * codeset = nl_langinfo(CODESET); + if (strcasestr(codeset, "UTF-8")) { + const char* utf8 = "mbfont:-*-sazanami*mincho-medium-r-normal--16-* \ +-*-mincho-medium-r-normal--16-*,-*-verdana-medium-r-normal--16-* \ +-*-dejavu*sans-medium-r-normal--16-*,-*-medium-r-normal--16-*"; + strncpy(default_font, utf8, strlen(utf8)+1); + } + } +#endif + +#ifdef USE_X11_MULTIBYTE if (fontname && strncmp(fontname, "mbfont:", 7) == 0) { if (multibyte_fonts_usable) { usemultibyte = 1; --- src/variable.c +++ src/variable.c 2017-09-27 09:54:43.805379677 +0000 @@ -280,6 +280,8 @@ static const struct path_table fontpath_ { "$`kpsexpand '$TEXMFDIST'`/fonts/type1!" }, #endif /* Linux paths */ + { "/usr/share/fonts/Type1" }, + { "/usr/share/fonts/truetype" }, { "/usr/X11R6/lib/X11/fonts/Type1" }, { "/usr/X11R6/lib/X11/fonts/truetype" }, /* HP-UX */ ++++++ gnuplot-4.6.0.dif ++++++ --- gnuplot-5.2.0/configure.ac | 2 +- gnuplot-5.2.0/docs/Makefile.am | 12 ++++++++---- gnuplot-5.2.0/docs/gnuplot-fr.doc | 4 ++-- gnuplot-5.2.0/src/gadgets.h | 2 +- gnuplot-5.2.0/src/gplt_x11.c | 9 ++++++--- gnuplot-5.2.0/src/plot.c | 22 +++++++++++++++++++++- gnuplot-5.2.0/src/term.h | 6 +++--- gnuplot-5.2.0/term/linux.trm | 4 ++-- 8 files changed, 44 insertions(+), 17 deletions(-) Index: gnuplot-5.2.2/configure.ac =================================================================== --- gnuplot-5.2.2.orig/configure.ac +++ gnuplot-5.2.2/configure.ac @@ -365,7 +365,7 @@ if test "$with_linux_vga" = yes; then [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 Index: gnuplot-5.2.2/docs/Makefile.am =================================================================== --- gnuplot-5.2.2.orig/docs/Makefile.am +++ gnuplot-5.2.2/docs/Makefile.am @@ -42,7 +42,7 @@ # # default is what is needed for interactive gnuplot -gih_DATA = gnuplot.gih +gih_DATA = gnuplot.gih gnuplot-fr.gih gihdir = @GIHDIR@ noinst_PROGRAMS = checkdoc doc2ipf doc2tex doc2gih doc2rnh doc2hlp \ @@ -97,7 +97,7 @@ gnuplot-groff.ps gnuplot.tmp VERSION gnu gnuplot.idv gnuplot.xref gnuplot.lg gnuplot.pdf wxhelp_figures \ wxhelp/*.html wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk \ wxhelp/wgnuplot.htc wxhelp/doc2html$(EXEEXT) windows/wgnuplot.htk \ -windows/*.png gnuplot.htb gnuplot.texi gnuplot-eldoc.el $(ELCS) +windows/*.png gnuplot.htb gnuplot.texi gnuplot-eldoc.el $(ELCS) gnuplot-fr.gih DISTFILES = $(DIST_COMMON) $(SOURCES) $(DOCHEADERS) $(EXTRA_DIST) @@ -261,17 +261,21 @@ gnuplot.hlp: doc2hlp$(EXEEXT) $(srcdir)/ doc2hlp_SOURCES = doc2hlp.c termdoc.c ### gnuplot interactive help format -gih: gnuplot.gih +gih: gnuplot.gih gnuplot-fr.gih gnuplot.gih: doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc $(AM_V_GEN)./doc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih +gnuplot-fr.gih: doc2gih$(EXEEXT) $(srcdir)/gnuplot-fr.doc + $(AM_V_GEN)./doc2gih$(EXEEXT) $(srcdir)/gnuplot-fr.doc gnuplot-fr.gih + doc2gih_SOURCES = doc2gih.c termdoc.c # To include all terminals in the .gih file -allgih: alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc +allgih: alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc $(srcdir)/gnuplot-fr.doc @echo "generate gnuplot.gih with all terminals" $(AM_V_at)./alldoc2gih$(EXEEXT) $(srcdir)/gnuplot.doc gnuplot.gih + $(AM_V_at)./alldoc2gih$(EXEEXT) $(srcdir)/gnuplot-fr.doc gnuplot-fr.gih alldoc2gih_SOURCES = doc2gih.c termdoc.c alldoc2gih_CPPFLAGS = -DALL_TERM_DOC $(AM_CPPFLAGS) Index: gnuplot-5.2.2/src/gadgets.h =================================================================== --- gnuplot-5.2.2.orig/src/gadgets.h +++ gnuplot-5.2.2/src/gadgets.h @@ -489,7 +489,7 @@ extern TBOOLEAN clip_lines1; extern TBOOLEAN clip_lines2; extern TBOOLEAN clip_points; -#define SAMPLES 100 /* default number of samples for a plot */ +#define SAMPLES 500 /* default number of samples for a plot */ extern int samples_1; extern int samples_2; Index: gnuplot-5.2.2/src/gplt_x11.c =================================================================== --- gnuplot-5.2.2.orig/src/gplt_x11.c +++ gnuplot-5.2.2/src/gplt_x11.c @@ -2526,9 +2526,12 @@ exec_cmd(plot_struct *plot, char *comman } } /* X11_justify_text(mode) - set text justification mode */ - else if (*buffer == 'J') - sscanf(buffer, "J%d", (int *) &plot->jmode); - + else if (*buffer == 'J') { + int jmode; + sscanf(buffer, "J%d", &jmode); + plot->jmode = jmode; + } + else if (*buffer == 'A') sscanf(buffer + 1, "%lf", &plot->angle); Index: gnuplot-5.2.2/src/plot.c =================================================================== --- gnuplot-5.2.2.orig/src/plot.c +++ gnuplot-5.2.2/src/plot.c @@ -219,6 +219,7 @@ static int asked_privi = 0; void drop_privilege() { +#ifndef SVGA_IS_SECURE if (!asked_privi) { euid = geteuid(); egid = getegid(); @@ -232,11 +233,13 @@ drop_privilege() 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(); @@ -250,6 +253,7 @@ take_privilege() if (seteuid(euid) == -1) (void) fprintf(stderr, "seteuid(%d): %s\n", (int) euid, strerror(errno)); +#endif } #endif /* LINUXVGA */ @@ -276,8 +280,8 @@ main(int argc, char **argv) int i; #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 */ @@ -338,6 +342,22 @@ main(int argc, char **argv) rl_getc_function = getc_wrapper; #endif +#ifdef __linux__ + if (!getenv("GNUHELP")) { + const char* msg = setlocale(LC_MESSAGES, NULL); + if (msg) { + char hfile[64]; + struct stat buf; + + sprintf(hfile, "/usr/share/gnuplot/%s/gnuplot-", gnuplot_version); + strncat(hfile, msg, 2); + strcat (hfile, ".gih"); + if (stat(hfile, &buf) == 0) + setenv("GNUHELP", strdup(hfile), 0); + } + } +#endif + #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) /* T.Walter 1999-06-24: 'rl_readline_name' must be this fix name. * It is used to parse a 'gnuplot' specific section in '~/.inputrc' Index: gnuplot-5.2.2/src/term.h =================================================================== --- gnuplot-5.2.2.orig/src/term.h +++ gnuplot-5.2.2/src/term.h @@ -242,9 +242,9 @@ #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" @@ -277,7 +277,7 @@ /* #include "imagen.trm" */ /* Kyocera Prescribe printer */ -/* #include "kyo.trm" */ +#include "kyo.trm" /* Frame Maker MIF 3.00 format driver */ #ifdef HAVE_MIF Index: gnuplot-5.2.2/term/linux.trm =================================================================== --- gnuplot-5.2.2.orig/term/linux.trm +++ gnuplot-5.2.2/term/linux.trm @@ -195,7 +195,7 @@ TERM_PUBLIC void LINUX_linetype __PROTO( 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)); @@ -408,7 +408,7 @@ LINUX_putc( } TERM_PUBLIC void -LINUX_put_text(unsigned int x, unsigned int y, const char *str) +LINUX_put_text(unsigned int x, unsigned int y, char *str) { int i; switch (linux_angle) { ++++++ gnuplot-5.2.0-texi2info.patch ++++++ --- gnuplot.texi +++ gnuplot.texi 2017-09-29 07:05:15.168397901 +0000 @@ -1703,7 +1703,6 @@ third kind. See `elliptic integrals` for @findex besj0 -@item esj0(x) & int or real & $J_@{0@}$ Bessel function of $x$, in radians \\ The `besj0(x)` function returns the J0th Bessel function of its argument. @ref{besj0} expects its argument to be in radians. @@ -1716,7 +1715,6 @@ The `besj0(x)` function returns the J0th @findex besj1 -@item esj1(x) & int or real & $J_@{1@}$ Bessel function of $x$, in radians \\ The `besj1(x)` function returns the J1st Bessel function of its argument. @ref{besj1} expects its argument to be in radians. @@ -1729,7 +1727,6 @@ The `besj1(x)` function returns the J1st @findex besy0 -@item esy0(x) & int or real & $Y_@{0@}$ Bessel function of $x$, in radians \\ The `besy0(x)` function returns the Y0th Bessel function of its argument. @ref{besy0} expects its argument to be in radians. @@ -1742,7 +1739,6 @@ The `besy0(x)` function returns the Y0th @findex besy1 -@item esy1(x) & int or real & $Y_@{1@}$ Bessel function of $x$, in radians \\ The `besy1(x)` function returns the Y1st Bessel function of its argument. @ref{besy1} expects its argument to be in radians. @@ -10624,8 +10620,7 @@ but @end example See also -@uref{http://www.gnuplot.info/demo/poldat.html,poldat.dem: polar plot using @ref{angles} demo. -} +@uref{http://www.gnuplot.info/demo/poldat.html,poldat.dem}: polar plot using @ref{angles} demo. @node arrow, autoscale, angles, set-show @subsection arrow @@ -11009,7 +11004,6 @@ entries from the following table: 4096 polar no effect @end example -@item it & plot & splot \\ \hline @@ -21207,13 +21201,10 @@ Syntax: @{[no]enhanced@} @end example -@end itemizeif @example @{mono|ansi|ansi256|ansirgb@} @end example -@end itemizeif - where <xchars> and <ychars> set the size of the text block. The default is 79 by 24. The last newline is printed only if `feed` is enabled. @@ -21251,7 +21242,6 @@ See also e.g. the description at @uref{https://en.wikipedia.org/wiki/ANSI_escape_code#Colors,https://en.wikipedia.org/wiki/ANSI_escape_code#Colors } -@end itemizeif Example: @example set term dumb mono size 60,15 aspect 1 @@ -21623,8 +21613,6 @@ Preferred combinations are `medium norma With each of these drivers, a binary copy is required on a PC to print. Do not use `print`---use instead `copy file /b lpt1:`. -@end itemizeif - @node excl, fig, epson_180dpi, complete_list_of_terminals @subsection excl @@ -22423,8 +22411,6 @@ the environmental variable GNUPLOT_LUA_D All arguments will be provided to the selected script for further evaluation. E.g. 'set term lua tikz help' will cause the script itself to print additional help on options and choices for the script. -@end itemizeif - @node mf, mp, lua, complete_list_of_terminals @subsection mf @@ -23118,7 +23104,6 @@ terminals. It has no options." @c ?term km-tek40xx @cindex km-tek40xx -@end itemizeif @c ?commands set terminal selanar @c ?set terminal selanar @c ?set term selanar @@ -23126,7 +23111,6 @@ terminals. It has no options." @c ?term selanar @cindex selanar -@end itemizeif @c ?commands set terminal sixel @c ?set terminal sixel @c ?set term sixel @@ -23147,7 +23131,6 @@ For use with xterm emulation, xterm must "--enable-sixel-graphics" and started with "-ti 340" on the command line. Menu option "sixelScrolling" should be selected. xterm/vt340 emulation limits plots to 16 simultaneous colors, but other emulators may permit more. -@end itemizeif @c ?commands set terminal bitgraph @c ?set terminal bitgraph @c ?set term bitgraph @@ -23155,7 +23138,6 @@ limits plots to 16 simultaneous colors, @c ?term bitgraph @cindex bitgraph -@end itemizeif This family of terminal drivers supports a variety of VT-like terminals. `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators. `vttek` supports VT-like tek40xx terminal emulators. @@ -23536,7 +23518,6 @@ Syntax: [dump "file"] \\ @end example -@end itemizeif @example [mode] @@ -23556,7 +23537,6 @@ If this option is present, (i.e the dump the key KP_Delete will write the file. This action cannot and cannot be rebound. The file is written in raw ppm (P6) format. Note that this option is reset each time the `set term` command is issued. -@end itemizeif To get high resolution modes, you will probably have to modify the configuration file of libvga, usually /etc/vga/libvga.conf. Using @@ -23762,7 +23742,6 @@ of an additional redraw after releasing `Line Styles...` allows customization of the line colors and styles. -@end itemizeif `Update wgnuplot.ini` saves the current window locations, window sizes, text window font, text window font size, graph window font, graph window font size, background color to the initialization file `wgnuplot.ini`. @@ -23928,8 +23907,6 @@ This file is located in the user's appli Line5=0 0 128 0 4 @end example -@end itemizeif - @c ^ <h3>Text window options</h3> These settings apply to the wgnuplot text-window only." @@ -23966,7 +23943,6 @@ solid line in color mode, or a dashed li line width is 1 pixel. If `Linestyle` is negative, it specifies the width of a SOLID line in pixels. Line1 and any linestyle used with the `points` style must be SOLID with unit width. -@end itemizeif See `graph-menu`." @@ -24354,13 +24330,10 @@ later by `set term x11 [no]raise [no]per `-ctrlq ` closes window on ctrl-q rather than q @end example -@end itemizeif @example `-persist` plot windows survive after main gnuplot program exits @end example -@end itemizeif - @cindex X resources The options are shown above in their command-line syntax. When entered as ++++++ gnuplot-QtCore-PIC.dif ++++++ Since QtCore is build with -reduce-relocations a -fPIC is required --- src/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) --- src/Makefile.am +++ src/Makefile.am 2017-09-27 10:07:07.767840550 +0000 @@ -163,6 +163,9 @@ clean-local: clean-qt-extra clean-demo gnuplot_SOURCES += qtterminal/qt_term.cpp +qtterminal/%.$(OBJEXT): qtterminal/%.cpp + $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -fPIC -c -o $@ $< + pkglibexec_PROGRAMS += gnuplot_qt $(gnuplot_qt_OBJECTS) : ui_QtGnuplotSettings.h ++++++ gnuplot-e3cc539c.patch ++++++ >From e3cc539c23ceb1640395236248f0ab5a26397557 Mon Sep 17 00:00:00 2001 From: Ethan A Merritt <merr...@u.washington.edu> Date: Mon, 19 Nov 2018 11:35:25 -0800 Subject: [PATCH] various overflow cases found by fuzzing Credits: Tim Blazytko Cornelius Aschermann Sergej Schumilo Nils Bars Bug 2088: term.c(strlen_tex) Bug 2089: cairo.trm metapost.trm tgif.trm (arbitrarily long font name) Bug 2092: cgm.trm overwrites trailing '\0' in default font name also context.trm emf.trm Bug 2094: also post.trm Bug 2093: datafile.c expand df_line on input as necessary to hold string data Bug 2095: eepic.trm (EEPIC_put_text) ignore request to print empty string --- src/datafile.c | 11 +++++++---- src/set.c | 4 ++-- src/term.c | 2 +- term/cairo.trm | 2 +- term/cgm.trm | 9 ++------- term/context.trm | 4 ++-- term/eepic.trm | 3 +++ term/emf.trm | 4 ++-- term/metapost.trm | 2 +- term/post.trm | 2 +- term/tgif.trm | 2 +- 11 files changed, 23 insertions(+), 22 deletions(-) --- src/datafile.c +++ src/datafile.c 2018-11-28 11:49:35.826872537 +0000 @@ -5584,10 +5584,13 @@ df_generate_ascii_array_entry() return NULL; entry = &(df_array->udv_value.v.value_array[df_array_index]); - if (entry->type == STRING) - sprintf(df_line, "%d \"%s\"", df_array_index, entry->v.string_val); - else - sprintf(df_line, "%d %g", df_array_index, real(entry)); + if (entry->type == STRING) { + while (max_line_len < strlen(entry->v.string_val)) + df_line = gp_realloc(df_line, max_line_len *= 2, "datafile line buffer"); + snprintf(df_line, max_line_len-1, "%d \"%s\"", df_array_index, entry->v.string_val); + } else { + snprintf(df_line, max_line_len-1, "%d %g", df_array_index, real(entry)); + } return df_line; } --- src/set.c +++ src/set.c 2018-11-28 11:49:35.830872464 +0000 @@ -1167,7 +1167,7 @@ set_clabel() c_token++; clabel_onecolor = FALSE; if ((new_format = try_to_get_string())) { - strncpy(contour_format, new_format, sizeof(contour_format)); + safe_strncpy(contour_format, new_format, sizeof(contour_format)); free(new_format); } } @@ -1308,7 +1308,7 @@ set_cntrlabel() char *new; c_token++; if ((new = try_to_get_string())) - strncpy(contour_format,new,sizeof(contour_format)); + safe_strncpy(contour_format,new,sizeof(contour_format)); free(new); } else if (equals(c_token, "font")) { char *ctmp; --- src/term.c +++ src/term.c 2018-11-28 11:49:35.830872464 +0000 @@ -2945,7 +2945,7 @@ strlen_tex(const char *str) switch (*s) { case '[': while (*s && *s != ']') s++; - s++; + if (*s) s++; break; case '\\': s++; --- term/cairo.trm +++ term/cairo.trm 2018-11-28 11:49:35.830872464 +0000 @@ -293,7 +293,7 @@ TERM_PUBLIC void cairotrm_options() cairo_params->fontsize = 0; } else { sep = strcspn(s,","); - if (sep > 0) { + if (0 < sep && sep < MAX_ID_LEN) { strncpy(cairo_params->fontname, s, sep); cairo_params->fontname[sep] = '\0'; } --- term/cgm.trm +++ term/cgm.trm 2018-11-28 11:49:35.830872464 +0000 @@ -473,7 +473,7 @@ CGM_options() font_index = 1; } else free(s); - strncpy(cgm_font, cgm_font_data[font_index-1].name, sizeof(cgm_font)); + safe_strncpy(cgm_font, cgm_font_data[font_index-1].name, sizeof(cgm_font)); } else { /* the user is specifying the font size */ @@ -830,12 +830,7 @@ CGM_set_font(const char *font) { char *s = cgm_font_data[font_index-1].name; - - len = strlen(s); - if (len > 31) - len = 31; - strncpy(cgm_font, s, len); - cgm_font[len] = NUL; + safe_strncpy(cgm_font, s, sizeof(cgm_font)); } /* set font size */ --- term/context.trm +++ term/context.trm 2018-11-28 11:49:35.830872464 +0000 @@ -593,7 +593,7 @@ CONTEXT_options() if ((tmp_string = try_to_get_string()) && (tmp_string != NULL)) { CONTEXT_fontstring_parse(tmp_string, tmp_font, MAX_ID_LEN+1, &tmp_fontsize); /* copies font name to parameters */ - strncpy(CONTEXT_params.font, tmp_font, sizeof(CONTEXT_params.font)); + safe_strncpy(CONTEXT_params.font, tmp_font, sizeof(CONTEXT_params.font)); tmp_font[MAX_ID_LEN] = NUL; free(tmp_string); /* save font size: @@ -1379,7 +1379,7 @@ CONTEXT_set_font(const char *font) /* saves font name & family to CONTEXT_font */ CONTEXT_fontstring_parse((char *)font, CONTEXT_font, sizeof(CONTEXT_font), &CONTEXT_fontsize_explicit); - strncpy(CONTEXT_font_explicit, CONTEXT_font, sizeof(CONTEXT_font_explicit)); + safe_strncpy(CONTEXT_font_explicit, CONTEXT_font, sizeof(CONTEXT_font_explicit)); /* valid fontsize has been provided */ if (CONTEXT_fontsize_explicit > 0.) { /* XXX: if valid */ --- term/eepic.trm +++ term/eepic.trm 2018-11-28 11:49:35.830872464 +0000 @@ -375,6 +375,9 @@ EEPIC_put_text(unsigned int x, unsigned { int i, l; + if (*str == '\0') + return; + EEPIC_endline(); fprintf(gpoutfile, "\\put(%d,%d)", x, y); --- term/emf.trm +++ term/emf.trm 2018-11-28 11:49:35.830872464 +0000 @@ -790,7 +790,7 @@ EMF_options() *comma = '\0'; } if (*s) - strncpy(emf_defaultfontname, s, sizeof(emf_defaultfontname)); + safe_strncpy(emf_defaultfontname, s, sizeof(emf_defaultfontname)); free(s); if (isanumber(c_token)) { emf_defaultfontsize = int_expression(); @@ -1865,7 +1865,7 @@ ENHemf_put_text(unsigned int x, unsigned /* set up the global variables needed by enhanced_recursion() */ enhanced_fontscale = 1.0; - strncpy(enhanced_escape_format,"&#x%2.2x;",sizeof(enhanced_escape_format)); + safe_strncpy(enhanced_escape_format,"&#x%2.2x;",sizeof(enhanced_escape_format)); ENHemf_opened_string = FALSE; ENHemf_overprint = 0; --- term/metapost.trm +++ term/metapost.trm 2018-11-28 11:49:35.830872464 +0000 @@ -320,7 +320,7 @@ MP_options() char *s; if ((s = try_to_get_string())) { int sep = strcspn(s,","); - if (sep > 0) { + if (0 < sep && sep < sizeof(MP_fontname)) { strncpy(MP_fontname, s, sizeof(MP_fontname)); MP_fontname[sep] = '\0'; } --- term/post.trm +++ term/post.trm 2018-11-28 11:49:35.830872464 +0000 @@ -1196,7 +1196,7 @@ PS_options() term->h_char = (unsigned int)(ps_fontsize*PS_SCF*5/10); else term->h_char = (unsigned int)(ps_fontsize*PS_SCF*6/10); - sprintf(PS_default_font,"%s,%g",ps_params->font,ps_fontsize); + snprintf(PS_default_font, sizeof(PS_default_font)-1, "%s, %.2g", ps_params->font, ps_fontsize); if (ps_params->terminal == PSTERM_POSTSCRIPT) { if (ps_params->first_fontfile) { --- term/tgif.trm +++ term/tgif.trm 2018-11-28 11:49:35.830872464 +0000 @@ -369,7 +369,7 @@ TGIF_options() int sep = strcspn(s,","); if (s[sep] == ',' && (1 == sscanf(&s[sep+1],"%lf",&fontsize))) uActFontSize = (int)(fontsize+0.5); - if (sep > 0) { + if (0 < sep && sep < sizeof(sActFont)) { strncpy(sActFont, s, sizeof(sActFont)); sActFont[sep] = NUL; } ++++++ gnuplot-gd.patch ++++++ Index: gnuplot-5.2.2/configure.ac =================================================================== --- gnuplot-5.2.2.orig/configure.ac +++ gnuplot-5.2.2/configure.ac @@ -570,63 +570,13 @@ AC_ARG_WITH(gd,dnl with_gd=yes) if test "$with_gd" != no; then - AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config]) - if test -n "$GDLIB_CONFIG"; then - libgd_CPPFLAGS=`$GDLIB_CONFIG --cflags` - libgd_LDFLAGS=`$GDLIB_CONFIG --ldflags` - libgd_LIBS=`$GDLIB_CONFIG --libs` - elif test -d "$with_gd"; then - libgd_CPPFLAGS="-I$with_gd/include" - libgd_LDFLAGS="-L$with_gd/lib" - libgd_LIBS="-ljpeg -lpng -lfreetype -lz" - fi - - _cppflags="$CPPFLAGS" - _ldflags="$LDFLAGS" - _libs="$LIBS" - CPPFLAGS="$CPPFLAGS $libgd_CPPFLAGS" - LDFLAGS="$LDFLAGS $libgd_LDFLAGS" - LIBS="$LIBS $libgd_LIBS" - - AC_CHECK_LIB(gd,gdImageCreateTrueColor, - [dnl found gd library +PKG_CHECK_MODULES([GD], [gdlib], [ AC_DEFINE(HAVE_LIBGD,1,[ Define if you have gd library. ]) - AC_CHECK_HEADERS(gd.h,, - AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile])) - - dnl gif support in libgd - AC_CHECK_LIB(gd,gdImageGif, - [AC_DEFINE(HAVE_GD_GIF,1,[ Define if libgd supports gif. ])]) - AC_CHECK_LIB(gd,gdImageGifAnimBegin, - [AC_DEFINE(GIF_ANIMATION,1,[ Define if libgd supports animated gifs. ])]) - - dnl jpeg support in libgd - AC_CHECK_LIB(gd,gdImageJpeg, - [AC_DEFINE(HAVE_GD_JPEG,1,[ Define if libgd supports jpeg. ])]) - - dnl freetype support in libgd - AC_CHECK_LIB(gd,gdImageStringFT, - AC_DEFINE(HAVE_GD_TTF,1, - [ Define if libgd supports TrueType fonts through libfreetype. ])) - - dnl png support in libgd - AC_CHECK_LIB(gd,gdImagePng, - [AC_DEFINE(HAVE_GD_PNG,1,[ Define if libgd supports png. ])]) - - ],[dnl gd library not found - AC_MSG_WARN([libgd not found or too old, version >= 2.0 is required]) - with_gd=no - ]) - - dnl piece it all together - if test "$with_gd" = no; then - CPPFLAGS="$_cppflags" - LDFLAGS="$_ldflags" - LIBS="$_libs" - else - LIBS="$_libs" - TERMLIBS="$TERMLIBS -lgd $libgd_LIBS" - fi + AC_DEFINE(HAVE_GD_GIF,1,[ Define if libgd supports gif. ]) + AC_DEFINE(GIF_ANIMATION,1,[ Define if libgd supports animated gifs. ]) + AC_DEFINE(HAVE_GD_JPEG,1,[ Define if libgd supports jpeg. ]) + AC_DEFINE(HAVE_GD_TTF,1, [ Define if libgd supports TrueType fonts through libfreetype. ]) + AC_DEFINE(HAVE_GD_PNG,1,[ Define if libgd supports png. ])]) fi dnl end gd Index: gnuplot-5.2.2/src/Makefile.am =================================================================== --- gnuplot-5.2.2.orig/src/Makefile.am +++ gnuplot-5.2.2/src/Makefile.am @@ -58,7 +58,7 @@ tabulate.c tabulate.h \ template.h term_api.h term.c term.h time.c unset.c util.c util.h \ util3d.c util3d.h variable.c variable.h version.c version.h -gnuplot_LDADD = $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS) +gnuplot_LDADD = $(GD_LIBS) $(TERMLIBS) $(TERMXLIBS) $(WX_LIBS) $(QT_LIBS) pkglibexec_PROGRAMS = ++++++ gnuplot-wx3.diff ++++++ From: Jan Engelhardt <jeng...@inai.de> Date: 2015-03-22 15:21:46.000000000 +0100 gnuplot's wxt_gui.cpp (*not* wxWidgets) uses XInitThreads, but the program does not link in X11 and runs into a build error otherwise. --- gnuplot-5.2.0/src/Makefile.am | 1 + 1 file changed, 1 insertion(+) --- gnuplot-5.2.0/src/Makefile.am +++ gnuplot-5.2.0/src/Makefile.am 2017-09-27 10:06:44.716255786 +0000 @@ -93,6 +93,7 @@ $(EXTRA_gnuplot_SOURCES) if BUILD_WXWIDGETS gnuplot_SOURCES += wxterminal/wxt_gui.cpp +gnuplot_LDADD += -lX11 endif if BUILD_GPCAIRO ++++++ gnuplot.test ++++++ Testform f?r GNUPLPOT ===================== 27.04.2004: Version 4.0.0 Maintainer: werner Vorraussetzungen: ================= X muss installiert sein. Starten: ======== gnuplot aufrufen ... Doku lesen. Ergebinsse: =========== Plots ... bei falscher Anwendung kann das Programm abschmieren. Bei richtiger Verwendung der Syntax von gnuplot ist es allerdings ein m?chtiges Programm. ++++++ picins.sty ++++++ % PICINS.STY --- Style File zum Einbinden von Bildern % Autor: J. Bleser, E. Lang % Hochschulrechenzentrum % Technische Hochschule Darmstadt % !!! Dieses Style-File ist urheberrechtlich geschuetzt !!! % !!! Aenderungen nur mit Zustimmung der Autoren !!! \message{Option `picins' Version 3.0 Sep. 1992, TH Darmstadt/HRZ} \newbox\@BILD% \newbox\@TEXT% \newdimen\d@breite% \newdimen\d@hoehe% \newdimen\d@xoff% \newdimen\d@yoff% \newdimen\d@shad% \newdimen\d@dash% \newdimen\d@boxl% \newdimen\d@pichskip% \newdimen\d@tmp \newdimen\d@tmpa \newdimen\d@bskip \newdimen\hsiz@% \newdimen\p@getot@l% \newcount\c@breite \newcount\c@hoehe \newcount\c@xoff \newcount\c@yoff \newcount\c@pos \newcount\c@shad \newcount\c@dash \newcount\c@boxl \newcount\c@zeilen% \newcount\@changemode% \newcount\c@piccaption% \newcount\c@piccaptionpos% \newcount\c@picpos \newcount\c@whole% \newcount\c@half% \newcount\c@tmp \newcount\c@tmpa \newcount\c@tmpb \newcount\c@tmpc \newcount\c@tmpd \newskip\d@leftskip \newif\if@list \@listfalse% \newif\if@offset% \c@piccaptionpos=1% \c@picpos=0 \d@shad=4pt% \d@dash=4pt% \d@boxl=10pt% \d@pichskip=1em% \@changemode=0% \def\@captype{figure}% \let\old@par=\par% \def\pichskip#1{\d@pichskip #1\relax} \def\shadowthickness#1{\d@shad #1\relax} \def\dashlength#1{\d@dash #1\relax} \def\boxlength#1{\d@boxl #1\relax} \def\picchangemode{\@changemode=1}% \def\nopicchangemode{\@changemode=0}% \def\piccaptionoutside{\c@piccaptionpos=1}% \def\piccaptioninside{\c@piccaptionpos=2}% \def\piccaptionside{\c@piccaptionpos=3}% \def\piccaptiontopside{\c@piccaptionpos=4}% \def\piccaption{\@ifnextchar [{\@piccaption}{\@piccaption[]}} \def\@piccaption[#1]#2{\c@piccaption=1\def\sh@rtf@rm{#1}\def\capti@nt@xt{#2}} \def\make@piccaption{% \hsiz@\d@breite% \ifnum\c@piccaptionpos=2% \advance\hsiz@ -2\fboxsep% \fi% \ifnum\c@piccaptionpos>2% \hsiz@\hsize\advance\hsiz@-\d@breite\advance\hsiz@-\d@pichskip% \fi% \setbox\@TEXT=\vbox{\hsize\hsiz@\caption[\sh@rtf@rm]{\capti@nt@xt}}% } \def\newcaption{\refstepcounter\@captype\@dblarg{\@newcaption\@captype}} \long\def\@newcaption#1[#2]#3{% \old@par% \addcontentsline{\csname ext@#1\endcsname }{#1}% {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}} \begingroup\@parboxrestore\normalsize% \@newmakecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\old@par% \endgroup% } \long\def\@newmakecaption#1#2{% \vskip 10pt% \setbox\@tempboxa \hbox {#1: #2}% \ifdim \wd\@tempboxa >\hsize% \setbox0=\hbox{#1: }\dimen0=\hsize\advance\dimen0 by-\wd0 \setbox1=\vtop{\hsize=\dimen0 #2} \hbox{\box0 \box1} \par \else \hbox to\hsize {\hfil \box \@tempboxa \hfil} \fi } \def\parpic{% \@ifnextchar ({\iparpic}{\iparpic(0pt,0pt)} } \def\iparpic(#1,#2){% \@ifnextchar ({\@offsettrue\iiparpic(#1,#2)}% {\@offsetfalse\iiparpic(#1,#2)(0pt,0pt)} } \def\iiparpic(#1,#2)(#3,#4){% \@ifnextchar [{\iiiparpic(#1,#2)(#3,#4)}{\iiiparpic(#1,#2)(#3,#4)[l]} } \def\iiiparpic(#1,#2)(#3,#4)[#5]{% \@ifnextchar [{\ivparpic(#1,#2)(#3,#4)[#5]}{\ivparpic(#1,#2)(#3,#4)[#5][]} } \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% \let\par=\old@par\par% \hangindent0pt\hangafter1% \setbox\@BILD=\hbox{#7}% \d@breite=#1\d@breite=\the\d@breite% \ifdim\d@breite=0pt\d@breite=\wd\@BILD\fi% \c@breite=\d@breite\divide\c@breite by65536% \multiply\c@piccaption\c@piccaptionpos% \d@hoehe=#2\d@hoehe=\the\d@hoehe% \ifdim\d@hoehe=0pt\d@hoehe=\ht\@BILD\advance\d@hoehe by\dp\@BILD\fi% \c@hoehe=\d@hoehe\divide\c@hoehe by65536% \d@xoff=#3\c@xoff=\d@xoff\divide\c@xoff by65536% \d@yoff=\d@hoehe% \advance\d@yoff by-#4\c@yoff=\d@yoff\divide\c@yoff by65536% \c@pos=1\unitlength1pt% \if@offset% \setbox\@BILD=\hbox{% \begin{picture}(\c@breite,\c@hoehe)% \put(0,0){\makebox(\c@breite,\c@hoehe){}}% \put(\c@xoff,\c@yoff){\box\@BILD}% \end{picture}% }% \else% \setbox\@BILD=\hbox{% \begin{picture}(\c@breite,\c@hoehe)% \put(0,0){\makebox(\c@breite,\c@hoehe)[#6]{\box\@BILD}}% \end{picture}% }% \fi% \ifnum\c@piccaption=2% \make@piccaption% \advance\d@hoehe\ht\@TEXT\advance\d@hoehe\dp\@TEXT% \c@hoehe=\d@hoehe\divide\c@hoehe by65536% \setbox\@BILD=\vbox{\box\@BILD\vspace{-5pt}% \hbox{\hspace{\fboxsep}\box\@TEXT}% \vspace{4pt}}% \fi% \@tfor\@tempa := #5\do{% \if\@tempa f\setbox\@BILD=\hbox{\Rahmen(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa s\setbox\@BILD=\hbox{\Schatten(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa o\setbox\@BILD=\hbox{\Oval(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa d\setbox\@BILD=\hbox{\Strich(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa x\setbox\@BILD=\hbox{\Kasten(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa l\c@pos=1\fi% \if\@tempa r\c@pos=2\fi% }% \ifnum\c@piccaption=1% \make@piccaption% \advance\d@hoehe\ht\@TEXT\advance\d@hoehe\dp\@TEXT% \c@hoehe=\d@hoehe\divide\c@hoehe by65536% \setbox\@BILD=\vbox{\box\@BILD\vspace{-5pt}\hbox{\box\@TEXT}\vspace{4pt}}% \fi% \ifodd\count0\c@picpos=0\else\c@picpos=\@changemode\fi% \pagetotal=\the\pagetotal% \d@tmp=\pagegoal\advance\d@tmp by-\pagetotal\advance\d@tmp by-\baselineskip% \ifdim\d@hoehe>\d@tmp% \vskip 0pt plus\d@hoehe\relax\pagebreak[3]\vskip 0pt plus-\d@hoehe\relax% \ifnum\c@picpos=1\c@picpos=0\else\c@picpos=\@changemode\fi% \fi% \ifnum\c@picpos=1\ifnum\c@pos=1\c@pos=2\else\c@pos=1\fi\fi% \ifnum\@listdepth>0 \@listtrue\parshape 0% \advance\hsize -\rightmargin% \d@leftskip \leftskip% \leftskip \@totalleftmargin% \if@inlabel\rule{\linewidth}{0pt}\vskip-\baselineskip\relax\fi% \else\@listfalse\medskip% \fi% \if@list\d@tmpa=\linewidth\else\d@tmpa=\hsize\fi% \ifnum\c@piccaption=3% \make@piccaption% \d@tmp\ht\@TEXT\advance\d@tmp\dp\@TEXT% \ifdim\d@hoehe>\d@tmp% \setbox\@TEXT=\vbox to\d@hoehe{\vfill\box\@TEXT\vspace{.2\baselineskip}\vfill}% \else% \setbox\@BILD=\vbox to\d@tmp{\vfill\box\@BILD\vfill}% \d@hoehe\d@tmp% \fi% \fi% \ifnum\c@piccaption=4% \make@piccaption% \d@tmp\ht\@TEXT\advance\d@tmp\dp\@TEXT% \setbox\@TEXT=\vbox to\d@hoehe{\vspace{-10pt}\box\@TEXT\vfil}% \advance\d@hoehe-\d@tmp% \fi% \ifnum\c@pos=1\d@tmpa=0pt% \ifnum\c@piccaption>2% \setbox\@BILD=\hbox{\box\@BILD\hspace{\d@pichskip}\hbox{\box\@TEXT}}% \fi% \else\advance\d@tmpa by-\wd\@BILD\d@breite=-\d@breite% \ifnum\c@piccaption>2% \d@tmpa=0pt% \setbox\@BILD=\hbox{\hbox{\box\@TEXT}\hspace{\d@pichskip}\box\@BILD}% \fi% \fi% \p@getot@l\the\pagetotal% \d@bskip\d@hoehe\advance\d@bskip by\parskip\advance\d@bskip by.3\baselineskip% {\noindent\hspace*{\d@tmpa}\relax% \box\@BILD\nopagebreak\vskip-\d@bskip\relax\nopagebreak}% \d@tmp=-\d@hoehe\divide\d@tmp by\baselineskip% \c@zeilen=\d@tmp\advance\c@zeilen by-1% \ifdim\d@breite<0pt\advance\d@breite by-\d@pichskip% \else\advance\d@breite by\d@pichskip% \fi% \hangindent=\d@breite% \hangafter=\c@zeilen% \let\par=\x@par% \ifnum\c@piccaption=3% \hangindent0pt\hangafter1\let\par=\old@par% \vskip\d@hoehe\vskip.2\baselineskip% \fi% \c@piccaption=0% } \newdimen\ptoti \newdimen\ptotii \def\x@par{% \ptoti\pagetotal% \old@par% \ptotii\pagetotal% \ifdim\ptoti=\ptotii% \d@tmp\d@hoehe% \else% \d@tmp\baselineskip% \multiply\d@tmp by\prevgraf% \advance\d@tmp by\parskip% \global\advance\d@hoehe by-\d@tmp\d@tmp=\d@hoehe% \fi% \ifdim\d@hoehe>0pt% \divide\d@tmp by\baselineskip\c@zeilen=-\d@tmp\advance\c@zeilen by-1% \c@zeilen=\the\c@zeilen% \else\c@zeilen=0 \fi \ifnum\c@zeilen<0\hangafter=\c@zeilen\hangindent=\d@breite% \else\let\par=\old@par% \hangindent 0pt% \leftskip \d@leftskip% \if@list\parshape \@ne \@totalleftmargin \linewidth% \advance\hsize \rightmargin% \fi% \fi% } \def\picskip#1{% \let\par=\old@par% \par% \pagetotal\the\pagetotal% \c@tmp=#1\relax% \ifnum\c@tmp=0% \d@tmp\baselineskip\multiply\d@tmp by\prevgraf\advance\d@tmp\parskip% \ifdim\p@getot@l<\pagetotal \advance\d@hoehe by-\d@tmp\advance\d@hoehe by1ex% \ifdim\d@hoehe>0pt\vspace*{\d@hoehe}\fi% \fi% \ifdim\p@getot@l=\pagetotal% \advance\d@hoehe by-\d@tmp\advance\d@hoehe by1ex% \ifdim\d@hoehe>0pt\vspace*{\d@hoehe}\fi% \fi% \else\hangafter=-\c@tmp\hangindent=\d@breite% \fi% \leftskip \d@leftskip% \if@list\parshape \@ne \@totalleftmargin \linewidth% \advance\hsize \rightmargin% \fi% } \def\hpic{% \@ifnextchar ({\ihpic}{\ihpic(0pt,0pt)} } \def\ihpic(#1,#2){% \@ifnextchar ({\@offsettrue\iihpic(#1,#2)}% {\@offsetfalse\iihpic(#1,#2)(0pt,0pt)} } \def\iihpic(#1,#2)(#3,#4){% \@ifnextchar [{\iiihpic(#1,#2)(#3,#4)}{\iiihpic(#1,#2)(#3,#4)[l]} } \def\iiihpic(#1,#2)(#3,#4)[#5]{% \@ifnextchar [{\ivhpic(#1,#2)(#3,#4)[#5]}{\ivhpic(#1,#2)(#3,#4)[#5][]} } \def\ivhpic(#1,#2)(#3,#4)[#5][#6]#7{% \setbox\@BILD=\hbox{#7}% \d@breite=#1\d@breite=\the\d@breite% \ifdim\d@breite=0pt\d@breite=\wd\@BILD\fi% \c@breite=\d@breite\divide\c@breite by65536% \d@hoehe=#2\d@hoehe=\the\d@hoehe% \ifdim\d@hoehe=0pt\d@hoehe=\ht\@BILD\advance\d@hoehe by\dp\@BILD\fi% \c@hoehe=\d@hoehe\divide\c@hoehe by65536% \d@xoff=#3\c@xoff=\d@xoff\divide\c@xoff by65536% \d@yoff=\d@hoehe% \advance\d@yoff by-#4\c@yoff=\d@yoff\divide\c@yoff by65536% \c@pos=0\d@tmpa=\parindent\parindent=0pt\unitlength1pt% \if@offset \setbox\@BILD=\hbox{% \begin{picture}(\c@breite,\c@hoehe)% \put(0,0){\makebox(\c@breite,\c@hoehe){}}% \put(\c@xoff,\c@yoff){\box\@BILD}% \end{picture}% }% \else% \setbox\@BILD=\hbox{% \begin{picture}(\c@breite,\c@hoehe)% \put(0,0){\makebox(\c@breite,\c@hoehe)[#6]{\box\@BILD}}% \end{picture}% }% \fi% \@tfor\@tempa := #5\do{% \if\@tempa f\setbox\@BILD=\hbox{\Rahmen(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa s\setbox\@BILD=\hbox{\Schatten(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa o\setbox\@BILD=\hbox{\Oval(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa d\setbox\@BILD=\hbox{\Strich(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa x\setbox\@BILD=\hbox{\Kasten(\c@breite,\c@hoehe){\box\@BILD}}\fi% \if\@tempa t\c@pos=1\fi% \if\@tempa b\c@pos=2\fi% }% \ifnum\c@pos=0\parbox{\d@breite}{\makebox[0cm]{}\\\box\@BILD\smallskip}\fi% \ifnum\c@pos=1\parbox[t]{\d@breite}{\makebox[0cm]{}\\\box\@BILD\smallskip}\fi% \ifnum\c@pos=2\parbox[b]{\d@breite}{\makebox[0cm]{}\\\box\@BILD\smallskip}\fi% \parindent=\d@tmpa% } \def\Rahmen(#1,#2)#3{% \c@whole=\@wholewidth\divide\c@whole by65536% \c@half=\@halfwidth\divide\c@half by65536% \c@tmpa=#1\advance\c@tmpa by\c@whole\advance\c@tmpa by\c@whole% \c@tmpb=#2\advance\c@tmpb by\c@whole\advance\c@tmpb by\c@whole% \begin{picture}(\c@tmpa,\c@tmpb)% \put(\c@whole,\c@half){\framebox(#1,#2){#3}}% \end{picture}% \global\advance\d@breite by2\@wholewidth% \global\advance\d@hoehe by2\@wholewidth% } \def\Schatten(#1,#2)#3{% \c@whole=\@wholewidth\divide\c@whole by65536% \c@half=\@halfwidth\divide\c@half by65536% \c@shad=\d@shad\divide\c@shad by65536% \c@tmp=\c@whole\advance\c@tmp by\c@whole\c@tmpd=\c@tmp% \advance\c@tmp by\c@shad% \advance\c@tmpd by#1% \advance\c@half by\c@shad% \c@tmpa=#1\advance\c@tmpa by\c@tmp% \c@tmpb=#2\advance\c@tmpb by\c@tmp% \begin{picture}(\c@tmpa,\c@tmpb)% \put(\c@whole,\c@half){\framebox(#1,#2){#3}}% \put(\c@shad,0){\rule{\c@tmpd pt}{\c@shad pt}}% \put(\c@tmpd,0){\rule{\c@shad pt}{#2 pt}}% \end{picture}% \global\advance\d@breite by2\@wholewidth\global\advance\d@breite by\d@shad% \global\advance\d@hoehe by2\@wholewidth\global\advance\d@hoehe by\d@shad% } \def\Oval(#1,#2)#3{% \@wholewidth=0.4pt% \c@tmpa=\the#1\divide\c@tmpa by2% \c@tmpb=\the#2\divide\c@tmpb by2% \begin{picture}(#1,#2)% \put(\c@tmpa,\c@tmpb){\oval(#1,#2)}% \put(0.4,0.4){#3}% \end{picture}% \global\advance\d@breite by1pt\global\advance\d@hoehe by1pt% } \def\Strich(#1,#2)#3{% \c@whole=\@wholewidth\divide\c@whole by65536% \c@half=\@halfwidth\divide\c@half by65536% \c@dash=\d@dash\divide\c@dash by65536% \c@tmp=\c@whole\advance\c@tmp by\c@whole% \c@tmpa=#1\advance\c@tmpa by\c@tmp% \c@tmpb=#2\advance\c@tmpb by\c@tmp% \c@tmpc=#1\advance\c@tmpc by\c@whole% \c@tmpd=#2\advance\c@tmpd by\c@whole% \begin{picture}(\c@tmpa,\c@tmpb)% \put(\c@half,\c@half){\dashbox{\c@dash}(\c@tmpc,\c@tmpd){#3}}% \end{picture}% \global\advance\d@breite by2\@wholewidth% \global\advance\d@hoehe by2\@wholewidth% } \def\Kasten(#1,#2)#3{% \@wholewidth=0.4pt% \c@boxl=\d@boxl\divide\c@boxl by65536\c@boxl=\the\c@boxl% \c@tmpa=#1\advance\c@tmpa by\c@boxl% \c@tmpb=#2\advance\c@tmpb by\c@boxl% \c@tmp=#2% \begin{picture}(\c@tmpa,\c@tmpb)% \put(0,\c@boxl){\framebox(#1,#2){#3}}% \put(\c@boxl,0){\line(-1,1){\c@boxl}}% \put(\c@boxl,0){\line(1,0){#1}\line(-1,1){\c@boxl}}% \put(\c@boxl,0){\put(#1,0){\line(0,1){\c@tmp}% \put(0,\c@tmp){\line(-1,1){\c@boxl}}}}% \end{picture}% \global\advance\d@breite by\d@boxl% \global\advance\d@hoehe by\d@boxl% } \newbox\env@box% \newdimen\d@envdp \newcount\c@hsize \newcount\c@envdp \newdimen\d@envb \long\def\frameenv{\@ifnextchar [{\@frameenv}{\@frameenv[\textwidth]}} \long\def\@frameenv[#1]{% \hsiz@=\textwidth \textwidth=#1 \d@envb=#1 \advance\textwidth by-2\@wholewidth \advance\textwidth by-2\fboxsep \hsize=\textwidth \linewidth=\textwidth \setbox\env@box=\vbox\bgroup}% \def\endframeenv{% \egroup% \hsize=\hsiz@ \textwidth=\hsiz@ \linewidth=\hsiz@ \c@breite=\d@envb \divide\c@breite by65536 \advance\d@envb by-2\@wholewidth \c@hsize=\d@envb \divide\c@hsize by65536% \d@envdp=\dp\env@box \advance\d@envdp by\ht\env@box% \advance\d@envdp by2\fboxsep% \d@hoehe=\d@envdp \advance\d@hoehe by2\@wholewidth \c@hoehe=\d@hoehe \divide\c@hoehe by65536 \c@envdp=\d@envdp \divide\c@envdp by65536% \c@tmp=\@wholewidth \divide\c@tmp by65536 \vskip\@wholewidth% \unitlength 1pt\noindent% \begin{picture}(\c@breite,\c@hoehe)(0,0) \put(\c@tmp,\c@tmp){\framebox(\c@hsize,\c@envdp){\box\env@box}} \end{picture}% } \long\def\shadowenv{\@ifnextchar [{\@shadowenv}{\@shadowenv[\textwidth]}} \long\def\@shadowenv[#1]{% \hsiz@=\textwidth \textwidth=#1 \d@envb=#1 \advance\textwidth by-2\@wholewidth \advance\textwidth by-2\fboxsep \advance\textwidth by-\d@shad% \hsize=\textwidth \linewidth=\textwidth \setbox\env@box=\vbox\bgroup}% \def\endshadowenv{% \egroup \hsize=\hsiz@ \textwidth=\hsiz@ \linewidth=\hsiz@ \d@tmpa=\d@envb \c@breite=\d@envb \divide\c@breite by65536 \advance\d@envb by-2\@wholewidth \advance\d@envb by-\d@shad \c@hsize=\d@envb \divide\c@hsize by65536% \d@envdp=\dp\env@box \advance\d@envdp by\ht\env@box% \advance\d@envdp by2\fboxsep% \c@envdp=\d@envdp \divide\c@envdp by65536% \d@hoehe=\d@envdp \advance\d@hoehe by2\@wholewidth \advance\d@hoehe by\d@shad \c@hoehe=\d@hoehe \divide\c@hoehe by65536 \c@shad =\d@shad \divide\c@shad by65536 \c@tmp=\@wholewidth \divide\c@tmp by65536 \advance\d@tmpa by-2\d@shad \c@xoff =\d@tmpa \divide\c@xoff by65536 \advance\c@xoff by\c@shad \advance\c@xoff by-1 \advance\d@envdp by\@wholewidth \vskip\@halfwidth \unitlength 1pt\noindent% \begin{picture}(\c@breite,\c@hoehe)(0,0) \put(\c@tmp,\c@shad){\framebox(\c@hsize,\c@envdp){\box\env@box}} \put(\c@shad,0){\rule{\d@tmpa}{\d@shad}}% \put(\c@xoff,0){\rule{\d@shad}{\d@envdp}}% \end{picture}% \vskip\@halfwidth } \long\def\dashenv{\@ifnextchar [{\@dashenv}{\@dashenv[\textwidth]}} \long\def\@dashenv[#1]{% \hsiz@=\textwidth \textwidth=#1 \d@envb=#1 \advance\textwidth by-2\@wholewidth \advance\textwidth by-2\fboxsep \hsize=\textwidth \linewidth=\textwidth \setbox\env@box=\vbox\bgroup}% \long\def\enddashenv{% \egroup \hsize=\hsiz@ \textwidth=\hsiz@ \linewidth=\hsiz@ \c@breite=\d@envb \divide\c@breite by65536 \advance\d@envb by-\@wholewidth \c@hsize=\d@envb \divide\c@hsize by65536% \d@envdp=\dp\env@box \advance\d@envdp by\ht\env@box% \advance\d@envdp by2\fboxsep% \advance\d@envdp by\@wholewidth \d@hoehe=\d@envdp \advance\d@hoehe by2\@wholewidth \c@hoehe=\d@hoehe \divide\c@hoehe by65536 \c@envdp=\d@envdp \divide\c@envdp by65536% \c@dash=\d@dash \divide\c@dash by65536% \c@whole=\@wholewidth \divide\c@whole by65536 \c@half=\@halfwidth \divide\c@half by 65536 \noindent\unitlength 1pt \begin{picture}(\c@breite,\c@hoehe)(0,0) \put(\c@half,\c@whole){\dashbox{\c@dash}(\c@hsize,\c@envdp){\box\env@box}} \end{picture}% } \long\def\ovalenv{\@ifnextchar [{\@ovalenv}{\@ovalenv[\textwidth]}}% \long\def\@ovalenv[#1]{% \hsiz@=\textwidth \textwidth=#1 \d@envb=#1 \advance\textwidth by-4\fboxsep \hsize=\textwidth \linewidth=\textwidth \setbox\env@box=\vbox\bgroup}% \long\def\endovalenv{% \egroup \hsize=\hsiz@ \textwidth=\hsiz@ \linewidth=\hsiz@ \@wholewidth=0.4pt \c@breite=\d@envb \divide\c@breite by65536 \advance\d@envb by-2\@wholewidth \c@hsize=\d@envb \divide\c@hsize by65536% \d@envdp=\dp\env@box \advance\d@envdp by\ht\env@box% \advance\d@envdp by4\fboxsep% \c@envdp=\d@envdp \divide\c@envdp by65536% \d@hoehe=\d@envdp \advance\d@hoehe by2\@wholewidth \c@hoehe=\d@hoehe \divide\c@hoehe by65536 \c@tmpa=\c@hsize \divide\c@tmpa by2% \c@tmpb=\c@envdp \divide\c@tmpb by2% \d@tmpa=2\fboxsep \advance\d@tmpa by\@wholewidth \c@xoff=\d@tmpa \divide\c@xoff by65536% \advance\d@tmpa by\dp\env@box \c@yoff=\d@tmpa \divide\c@yoff by65536% \unitlength 1pt\noindent \begin{picture}(\c@breite,\c@hoehe)(0,0) \put(\c@tmpa,\c@tmpb){\oval(\c@hsize,\c@envdp)} \put(\c@xoff,\c@yoff){\box\env@box}% \end{picture}% }