Hello community, here is the log from the commit of package enscript for openSUSE:Factory checked in at 2018-01-24 15:25:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/enscript (Old) and /work/SRC/openSUSE:Factory/.enscript.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "enscript" Wed Jan 24 15:25:26 2018 rev:29 rq:568705 version:1.6.6 Changes: -------- --- /work/SRC/openSUSE:Factory/enscript/enscript.changes 2013-06-25 14:39:53.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.enscript.new/enscript.changes 2018-01-24 15:25:27.956501563 +0100 @@ -1,0 +2,88 @@ +Tue Jan 23 14:27:55 UTC 2018 - [email protected] + +- Add missing scan vor LC_PAPER in patch enscript-1.6.6-encoding+paper.patch + +------------------------------------------------------------------- +Tue Jan 23 10:57:32 UTC 2018 - [email protected] + +- Add enscript-1.6.6-ghostscript.patch to get correct support for + ghostscript back + +------------------------------------------------------------------- +Tue Jan 23 10:42:02 UTC 2018 - [email protected] + +- Add enscript-1.6.6-silent-warns.patch to silent gcc +- Move %install_info_delete from %postun to %preun + +------------------------------------------------------------------- +Tue Jan 23 09:49:31 UTC 2018 - [email protected] + +- Add patch enscript-1.6.6-helper-apps.patch to mention + helper app support again + +------------------------------------------------------------------- +Tue Jan 23 09:39:43 UTC 2018 - [email protected] + +- Add patch enscript-1.6.6-mailto.patch to get mailto support with + optional address back + +------------------------------------------------------------------- +Tue Jan 23 09:24:52 UTC 2018 - [email protected] + +- Add patch enscript-1.6.6-encoding+paper.patch to get better + encoding and automatic paper size support back + +------------------------------------------------------------------- +Tue Jan 23 08:59:49 UTC 2018 - [email protected] + +- Add patch enscript-1.6.6-euro+baltic.patch to get support for the + Euro symbol as well as the Baltic language support back + +------------------------------------------------------------------- +Tue Jan 23 01:38:16 UTC 2018 - [email protected] + +- update to 1.6.6 + * Add afm/MustRead.html, containing licensing information for + Adobe AFM files. + * Sync all translations from the Translation Project. Visit + http://translationproject.org/ to help translate Enscript + * Add documented but missing '-w' option as an alias for + '--language' + * Apply sliceprint patch from Debian +- includes 1.6.5.2: + * Fix CFG_FATAL macro in util.c-- prevents a segfault when the + config file contains unknown parameters + * Fix segfault with line lengths over 90 characters +- includes 1.6.5.1: + * Typo corrections in the manual pages + * Actually ship f90.st in the tarball + * Better organization for ChangeLog, INSTALL and README +- includes 1.6.5: + * Licensing change: GNU Enscript is now distributed under + version 3 or later of the GNU GPL + * Build system fixes - distcheck now passes + * At least four security bug fixes: + - CAN-2004-1184 + - CAN-2004-1185 + - CAN-2004-1186 + - CVE-2008-3863, CVE-2008-4306 + * Syntax highlighting fixes + - shell escaping rules from Shawn McMahon + - JavaScript regexps now recognised + - New highlighting rules for Fortran 90 from David Bowler +- rebase enscript-automake.diff +- remove enscript-1.6.4-CAN-2004-1184.patch + * upstreamed in 9510e4315705329e51b27fa2f3f688989b9fb37f +- remove enscript-1.6.4-CAN-2004-1185.patch + * fixed in a3e6bf57e48bb7434cdd590732e221fd2e0b4c17 +- remove enscript-1.6.4-CAN-2004-1186.patch + * fixed in 0acc7b63a1be9f5d02f1a21d6df52cb5a9ce7e58 +- remove enscript-1.6.4-CVE-2008-3863.patch + * upstreamed in 94135714871a735e3fe624eaf37901bbb6314e05 +- remove enscript-1.6.4-fdleak.patch + * fixed in f2bfb5ead29048ce42000e4796383a4406b069f6 +- remove enscript-1.6.4.dif +- renumber patches +- cleanup with spec-cleaner + +------------------------------------------------------------------- Old: ---- enscript-1.6.4-CAN-2004-1184.patch enscript-1.6.4-CAN-2004-1185.patch enscript-1.6.4-CAN-2004-1186.patch enscript-1.6.4-CVE-2008-3863.patch enscript-1.6.4-fdleak.patch enscript-1.6.4.dif enscript-1.6.4.tar.bz2 New: ---- enscript-1.6.6-encoding+paper.patch enscript-1.6.6-euro+baltic.patch enscript-1.6.6-ghostscript.patch enscript-1.6.6-helper-apps.patch enscript-1.6.6-mailto.patch enscript-1.6.6-silent-warns.patch enscript-1.6.6.tar.gz enscript-1.6.6.tar.gz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ enscript.spec ++++++ --- /var/tmp/diff_new_pack.43hdhS/_old 2018-01-24 15:25:28.740464895 +0100 +++ /var/tmp/diff_new_pack.43hdhS/_new 2018-01-24 15:25:28.744464707 +0100 @@ -1,7 +1,7 @@ # # spec file for package enscript # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -17,35 +17,42 @@ Name: enscript -BuildRequires: automake -%if %suse_version >= 1230 -BuildRequires: makeinfo -%endif -Provides: genscript -Provides: nenscrip -Requires: /bin/sed -Requires: /usr/bin/file -Requires: /usr/bin/iconv -Requires: ghostscript-fonts-std -PreReq: %install_info_prereq -Version: 1.6.4 +Version: 1.6.6 Release: 0 Summary: An ASCII to PostScript(tm) Converter -License: GPL-2.0+ +License: GPL-3.0+ Group: Productivity/Publishing/PS -Source: enscript-%{version}.tar.bz2 -Source1: enscript-gs-font.map -Source2: enscript.sh -Patch: enscript-%{version}.dif -Patch1: enscript-1.6.4-CAN-2004-1184.patch -Patch2: enscript-1.6.4-CAN-2004-1185.patch -Patch3: enscript-1.6.4-CAN-2004-1186.patch -Patch4: enscript-1.6.4-CVE-2008-3863.patch -Patch5: enscript-1.6.4-perl_parens.patch -Patch6: enscript-1.6.4-sh_string.patch -Patch7: enscript-1.6.4-fdleak.patch -Patch8: enscript-automake.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: http://git.savannah.gnu.org/cgit/enscript.git +Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +Source2: enscript-gs-font.map +Source3: enscript.sh +Patch1: enscript-1.6.4-perl_parens.patch +Patch2: enscript-1.6.4-sh_string.patch +Patch3: enscript-automake.diff +# PATCH-ENHANCE-SUSE -- Add Euro and Baltic support +Patch4: enscript-1.6.6-euro+baltic.patch +# PATCH-ENHANCE-SUSE -- Add better encoding and automatic paper size support +Patch5: enscript-1.6.6-encoding+paper.patch +# PATCH-ENHANCE-SUSE -- Add mailto support with optional address +Patch6: enscript-1.6.6-mailto.patch +# PATCH-ENHANCE-SUSE -- Mention helper app support to manual page +Patch7: enscript-1.6.6-helper-apps.patch +# PATCH-ENHANCE-SUSE -- Silent the compiler warnings +Patch8: enscript-1.6.6-silent-warns.patch +# PATCH-ENHANCE-SUSE -- To be able to map fonts from adobe to gs replacement +Patch9: enscript-1.6.6-ghostscript.patch +BuildRequires: automake +Requires: %{_bindir}/file +Requires: %{_bindir}/iconv +Requires: /bin/sed +Requires: ghostscript-fonts-std +PreReq: %{install_info_prereq} +Provides: genscript +Provides: nenscrip +%if 0%{?suse_version} >= 1230 +BuildRequires: makeinfo +%endif %description Enscript converts ASCII files to PostScript and writes the generated @@ -59,23 +66,24 @@ %prep %setup -q -%patch -P 1 -p 1 -b .CAN-2004-1184 -%patch -P 2 -p 1 -b .CAN-2004-1185 -%patch -P 3 -p 1 -b .CAN-2004-1186 -%patch -P 4 -p 0 -b .CVE-2008-3863 -%patch -P 5 -p 0 -b .perl -%patch -P 6 -p 0 -b .shell -%patch -P 7 -p 0 -b .fdleak -%patch -%patch -P 8 -p 1 +%patch1 -p0 -b .perl +%patch2 -p0 -b .shell +%patch3 -p1 +%patch4 -p0 -b .euro +%patch5 -p0 -b .paper +%patch6 -p0 -b .mailto +%patch7 -p0 -b .happ +%patch8 -p0 -b .nowarns +%patch9 -p0 -b .gs %build - CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -funroll-loops -Wall -fno-strict-aliasing -pipe -fstack-protector" + CFLAGS="%{optflags} -DPROTOTYPES -D_GNU_SOURCE -funroll-loops -Wall -fno-strict-aliasing -pipe -fstack-protector" LDFLAGS= export CC CFLAGS LDFLAGS AUTOPOINT=true autoreconf --force --install test ! -f po/Makevars.template || mv po/Makevars.template po/Makevars %configure \ + --with-spooler=lpr \ --with-media=LC_PAPER \ --with-encoding=LC_CTYPE pushd lib/ @@ -87,42 +95,41 @@ make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" %{?_smp_mflags} %install - make install DESTDIR=$RPM_BUILD_ROOT - ln -sf enscript $RPM_BUILD_ROOT/usr/bin/genscript - ln -sf enscript.1 $RPM_BUILD_ROOT%{_mandir}/man1/genscript.1 - mkdir -p -m 0755 $RPM_BUILD_ROOT%{_datadir}/ghostscript/fonts - install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/ghostscript/fonts/font.map - mv $RPM_BUILD_ROOT/usr/bin/enscript $RPM_BUILD_ROOT/usr/bin/enscript.bin - install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/enscript +%make_install + ln -sf enscript %{buildroot}%{_bindir}/genscript + ln -sf enscript.1 %{buildroot}%{_mandir}/man1/genscript.1 + mkdir -p -m 0755 %{buildroot}%{_datadir}/ghostscript/fonts + install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/ghostscript/fonts/font.map + mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.bin + install -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/%{name} %find_lang %{name} %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz -%postun +%preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %files -f %{name}.lang -%defattr(-,root,root) -%doc docs/ChangeLog docs/FAQ.html -/usr/bin/diffpp -/usr/bin/enscript -/usr/bin/enscript.bin -/usr/bin/genscript -/usr/bin/mkafmmap -/usr/bin/sliceprint -/usr/bin/over -/usr/bin/states -%config /etc/enscript.cfg -%doc %{_mandir}/man1/diffpp.1.gz -%doc %{_mandir}/man1/enscript.1.gz -%doc %{_mandir}/man1/genscript.1.gz -%doc %{_mandir}/man1/sliceprint.1.gz -%doc %{_mandir}/man1/states.1.gz -/usr/share/enscript -%dir /usr/share/ghostscript -%dir /usr/share/ghostscript/fonts -/usr/share/ghostscript/fonts/font.map -%doc %{_infodir}/%{name}.info.gz +%doc docs/FAQ.html +%{_bindir}/diffpp +%{_bindir}/%{name} +%{_bindir}/%{name}.bin +%{_bindir}/genscript +%{_bindir}/mkafmmap +%{_bindir}/sliceprint +%{_bindir}/over +%{_bindir}/states +%config %{_sysconfdir}/%{name}.cfg +%{_mandir}/man1/diffpp.1%{ext_man} +%{_mandir}/man1/enscript.1%{ext_man} +%{_mandir}/man1/genscript.1%{ext_man} +%{_mandir}/man1/sliceprint.1%{ext_man} +%{_mandir}/man1/states.1%{ext_man} +%{_datadir}/enscript +%dir %{_datadir}/ghostscript +%dir %{_datadir}/ghostscript/fonts +%{_datadir}/ghostscript/fonts/font.map +%{_infodir}/%{name}.info%{ext_info} %changelog ++++++ enscript-1.6.6-encoding+paper.patch ++++++ --- configure.ac | 18 ++++++++++++++++++ lib/Makefile.am | 1 + lib/enscript.cfg.in | 34 +++++++++++++++++++++++++++++++++- src/main.c | 6 ++++++ src/util.c | 10 ++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) --- configure.ac +++ configure.ac 2018-01-23 14:31:47.816179389 +0000 @@ -65,6 +65,23 @@ AC_ARG_WITH(media, MEDIA=$ac_cv_value_media AC_SUBST(MEDIA) +dnl Define the default input encoding. +AC_ARG_WITH(encoding, +[ --with-encoding(=ENCODING) use input encoding (ENCODING), default is latin1], + if test "X$withval" != "Xno"; then + if test "X$withval" = "Xyes"; then + ac_cv_value_encoding='latin1' + else + ac_cv_value_encoding=$withval + fi + else + ac_cv_value_encoding=${ENCODING-latin1} + fi, + ac_cv_value_encoding=${ENCODING-latin1} +) +ENCODING=$ac_cv_value_encoding +AC_SUBST(ENCODING) + dnl Find the printer spooler command. AC_CHECK_PROG(SPOOLER, lpr, lpr) @@ -142,6 +159,7 @@ echo "" echo "Option Change with configure's option Current value" echo "---------------------------------------------------------" echo "Media --with-media=MEDIA $MEDIA" +echo "Encoding --with-encoding=ENCODING $ENCODING" echo "Spooler --with-spooler=SPOOLER $SPOOLER" echo "PS level --with-ps-level=LEVEL $PSLEVEL" echo "" --- lib/Makefile.am +++ lib/Makefile.am 2018-01-23 14:31:47.816179389 +0000 @@ -35,6 +35,7 @@ EXTRA_DIST = ChangeLog.old enscript.cfg. Makefile-encodings make-encoding.pl do_subst = sed -e 's%@DATADIR@%$(datadir)%g' \ + -e 's%@encoding@%@ENCODING@%g' \ -e 's%@media@%@MEDIA@%g' \ -e 's%@BINDIR@%$(bindir)%g' \ -e 's%@spooler@%@SPOOLER@%g' \ --- lib/enscript.cfg.in +++ lib/enscript.cfg.in 2018-01-23 14:31:47.816179389 +0000 @@ -40,7 +40,7 @@ AppendCtrlD: 0 Clean7Bit: 1 # Default input encoding. -DefaultEncoding: latin1 +DefaultEncoding: @encoding@ # Default fancy header. DefaultFancyHeader: enscript @@ -94,6 +94,38 @@ Media: Letter 612 792 38 24 574 768 Media: A4dj 595 842 24 50 571 818 Media: Letterdj 612 792 24 40 588 768 +# Define ghostscript page names and their sizes +Media: letter 612 792 24 24 574 768 +Media: note 540 720 24 24 516 696 +Media: legal 612 1008 24 24 588 984 +Media: a0 2380 3368 24 24 2356 3344 +Media: a1 1684 2380 24 24 1660 2356 +Media: a2 1190 1684 24 24 1166 1660 +Media: a3 842 1190 24 24 818 1166 +Media: a4 595 842 24 24 571 818 +Media: a5 421 595 24 24 397 571 +Media: a6 297 421 24 24 273 397 +Media: a7 210 297 24 24 186 273 +Media: a8 148 210 24 24 124 186 +Media: a9 105 148 24 24 81 124 +Media: a10 74 105 24 24 50 81 +Media: b0 2836 4008 24 24 2812 3984 +Media: b1 2004 2836 24 24 1980 2812 +Media: b2 1418 2004 24 24 1394 1980 +Media: b3 1002 1418 24 24 978 1394 +Media: b4 709 1002 24 24 685 978 +Media: b5 501 709 24 24 477 685 +Media: archE 2592 3456 24 24 2568 3432 +Media: archD 1728 2592 24 24 1704 2568 +Media: archC 1296 1728 24 24 1272 1704 +Media: archB 864 1296 24 24 840 1272 +Media: archA 648 864 24 24 624 840 +Media: flsa 612 936 24 24 588 912 +Media: flse 612 936 24 24 588 912 +Media: halfletter 396 612 24 24 372 588 +Media: 11x17 792 1224 24 24 768 1200 +Media: ledger 1224 792 24 24 1200 768 + # Spooler option to suppress the job header. NoJobHeaderSwitch: -h --- src/main.c +++ src/main.c 2018-01-23 14:31:47.816179389 +0000 @@ -24,6 +24,8 @@ #include "gsint.h" #include "getopt.h" +#include <locale.h> +#include <limits.h> /* * Prototypes for static functions. @@ -959,6 +961,10 @@ main (int argc, char *argv[]) #if HAVE_LC_MESSAGES setlocale (LC_MESSAGES, ""); #endif + setlocale (LC_CTYPE, ""); +#ifdef LC_PAPER + setlocale (LC_PAPER, ""); +#endif #endif #if ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); --- src/util.c +++ src/util.c 2018-01-23 14:31:47.816179389 +0000 @@ -179,6 +179,16 @@ read_config (char *path, char *file) { token2 = GET_TOKEN (NULL); CHECK_TOKEN (); +#ifdef LC_PAPER + if (!strcasecmp("LC_PAPER", token2)) + { + unsigned int paperheight = (unsigned int)nl_langinfo(_NL_PAPER_HEIGHT); + if (paperheight && paperheight == 279) + token2 = "letter"; + else + token2 = "a4"; + } +#endif xfree (media_name); media_name = xstrdup (token2); } ++++++ enscript-1.6.6-euro+baltic.patch ++++++ ++++ 1272 lines (skipped) ++++++ enscript-1.6.6-ghostscript.patch ++++++ --- lib/enscript.cfg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- lib/enscript.cfg.in +++ lib/enscript.cfg.in 2005-02-01 12:36:36.000000000 +0000 @@ -27,7 +27,7 @@ AcceptCompositeCharacters: 0 # Lookup path for the AFM files. -AFMPath: @DATADIR@/enscript/afm:/usr/local/lib/ps:/usr/lib/ps +AFMPath: @DATADIR@/ghostscript/fonts:@DATADIR@/enscript/afm # Append ^D character to the end of the output. Some printers like HP # LaserJet 5 require this but the default is `false'. ++++++ enscript-1.6.6-helper-apps.patch ++++++ --- docs/enscript.man | 3 +++ 1 file changed, 3 insertions(+) --- docs/enscript.man +++ docs/enscript.man 2007-10-09 16:50:01.290749204 +0000 @@ -394,6 +394,9 @@ generate RTF (Rich Text Format) generate ANSI terminal control codes .RE .TP 8 +.B \-W \f2app\f1,\f2option\f3, \-\-language\f3=\f2app\f1,\f2option\f3 +pass the option \f2option\f3 to helper application \f2app\f3. +.TP 8 .B \-X \f2name\f3, \-\-encoding=\f2name\f3 Use the input encoding \f2name\f1. Currently \f3enscript\f1 supports the following encodings: ++++++ enscript-1.6.6-mailto.patch ++++++ --- src/main.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) --- src/main.c +++ src/main.c 2007-10-09 16:35:28.159452385 +0000 @@ -331,6 +331,7 @@ unsigned int lines_per_page = (unsigned * Send mail notification to user after print job has been completed. */ int mail = 0; +char *mailto; /* * -M, --media @@ -852,7 +853,7 @@ static struct option long_options[] = {"no-page-prefeed", no_argument, 0, 'K'}, {"lineprinter", no_argument, 0, 'l'}, {"lines-per-page", required_argument, 0, 'L'}, - {"mail", no_argument, 0, 'm'}, + {"mail", optional_argument, 0, 'm'}, {"media", required_argument, 0, 'M'}, {"copies", required_argument, 0, 'n'}, {"newline", required_argument, 0, 'N'}, @@ -1851,7 +1852,11 @@ open_output_file () /* Format spooler options. */ spooler_options[0] = '\0'; if (mail) - strcat (spooler_options, "-m "); + { + strcat (spooler_options, "-m "); + strcat (spooler_options, mailto); + strcat (spooler_options, " "); + } if (no_job_header) { strcat (spooler_options, no_job_header_switch); @@ -2014,7 +2019,7 @@ handle_options (int argc, char *argv[]) int i; c = getopt_long (argc, argv, - "#:123456789a:A:b:BcC::d:D:e::E::f:F:gGhH::i:I:jJ:kKlL:mM:n:N:o:Op:P:qrRs:S:t:T:u::U:vVw:W:X:zZ", + "#:123456789a:A:b:BcC::d:D:e::E::f:F:gGhH::i:I:jJ:kKlL:m::M:n:N:o:Op:P:qrRs:S:t:T:u::U:vVw:W:X:zZ", long_options, &option_index); if (c == -1) @@ -2215,6 +2220,10 @@ handle_options (int argc, char *argv[]) case 'm': /* send mail upon completion */ mail = 1; + if(optarg) + mailto = (optarg); + else + mailto = (*passwd).pw_name; break; case 'M': /* select output media */ ++++++ enscript-1.6.6-silent-warns.patch ++++++ --- afmlib/afmparse.c | 2 +- compat/regex.c | 12 ++++++------ compat/xalloc.c | 6 +++--- src/gsint.h | 2 +- src/main.c | 3 ++- src/psgen.c | 30 ++++++++++++++---------------- src/util.c | 10 ++++++---- states/main.c | 2 +- states/utils.c | 2 +- 9 files changed, 35 insertions(+), 34 deletions(-) --- afmlib/afmparse.c +++ afmlib/afmparse.c 2018-01-23 14:32:29.747373763 +0000 @@ -620,7 +620,7 @@ static void get_key (AFMHandle handle, ParseCtx *ctx, AFMKey *key_return) { int key; - char msg[256]; + char msg[1024+16]; while (1) { --- compat/regex.c +++ compat/regex.c 2018-01-23 14:32:29.751373687 +0000 @@ -2400,11 +2400,12 @@ regex_compile (pattern, size, syntax, bu case ')': if (syntax & RE_NO_BK_PARENS) goto normal_backslash; - if (COMPILE_STACK_EMPTY) + if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_backslash; else FREE_STACK_RETURN (REG_ERPAREN); + } handle_close: if (fixup_alt_jump) @@ -2420,11 +2421,12 @@ regex_compile (pattern, size, syntax, bu } /* See similar code for backslashed left paren above. */ - if (COMPILE_STACK_EMPTY) + if (COMPILE_STACK_EMPTY) { if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) goto normal_char; else FREE_STACK_RETURN (REG_ERPAREN); + } /* Since we just checked for an empty stack above, this ``can't happen''. */ @@ -3106,8 +3108,6 @@ re_compile_fastmap (bufp) char *destination; #endif /* We don't push any register information onto the failure stack. */ - unsigned num_regs = 0; - register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned char *p = pattern; @@ -4801,8 +4801,8 @@ re_match_2_internal (bufp, string1, size register from the stack, since lowest will == highest in `pop_failure_point'. */ active_reg_t dummy_low_reg, dummy_high_reg; - unsigned char *pdummy; - const char *sdummy; + unsigned char *pdummy __attribute__ ((__unused__)); + const char *sdummy __attribute__ ((__unused__)); DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); POP_FAILURE_POINT (sdummy, pdummy, --- compat/xalloc.c +++ compat/xalloc.c 2018-01-23 14:32:29.763373456 +0000 @@ -67,7 +67,7 @@ xmalloc (size) ptr = malloc (size); if (ptr == NULL) { - fprintf (stderr, _("xmalloc(): couldn't allocate %d bytes\n"), size); + fprintf (stderr, _("xmalloc(): couldn't allocate %zd bytes\n"), size); exit (1); } @@ -85,7 +85,7 @@ xcalloc (num, size) ptr = calloc (num, size); if (ptr == NULL) { - fprintf (stderr, _("xcalloc(): couldn't allocate %d bytes\n"), size); + fprintf (stderr, _("xcalloc(): couldn't allocate %zd bytes\n"), size); exit (1); } @@ -106,7 +106,7 @@ xrealloc (ptr, size) nptr = realloc (ptr, size); if (nptr == NULL) { - fprintf (stderr, _("xrealloc(): couldn't reallocate %d bytes\n"), size); + fprintf (stderr, _("xrealloc(): couldn't reallocate %zd bytes\n"), size); exit (1); } --- src/gsint.h +++ src/gsint.h 2018-01-23 14:32:29.763373456 +0000 @@ -131,7 +131,7 @@ extern double atan2 ___P ((double, doubl (('0' <= (ch) && (ch) <= '9') || (ch) == '.' || (ch) == '-' || (ch) == '+') /* Return the width of the character <ch> */ -#define CHAR_WIDTH(ch) (font_widths[(unsigned char) (ch)]) +#define FNT_CHAR_WIDTH(ch) (font_widths[(unsigned char) (ch)]) /* Current point y movement from line to line. */ #define LINESKIP (Fpt.h + baselineskip) --- src/main.c +++ src/main.c 2018-01-23 14:32:29.771373302 +0000 @@ -1470,7 +1470,8 @@ name width\theight\tllx\tlly buffer_append (&buffer, enscript_library); buffer_append (&buffer, "/hl/*.st"); - system (buffer_ptr (&buffer)); + if (system (buffer_ptr (&buffer)) < 0) + perror("system"); exit (0); } --- src/psgen.c +++ src/psgen.c 2018-01-23 14:32:29.775373225 +0000 @@ -585,8 +585,8 @@ process_file (char *fname_arg, InputStre * Count possible line number spaces. This should be enought for 99999 * lines */ - linenumber_space = CHAR_WIDTH ('0') * 5 + 1.0; - linenumber_margin = CHAR_WIDTH (':') + CHAR_WIDTH ('m'); + linenumber_space = FNT_CHAR_WIDTH ('0') * 5 + 1.0; + linenumber_margin = FNT_CHAR_WIDTH (':') + FNT_CHAR_WIDTH ('m'); /* We got a new input file. */ input_filenum++; @@ -1137,7 +1137,7 @@ large for page\n"), /* Help macros. */ /* Check if character <ch> fits to current line. */ -#define FITS_ON_LINE(ch) ((linepos + CHAR_WIDTH (ch) < linew) || col == 0) +#define FITS_ON_LINE(ch) ((linepos + FNT_CHAR_WIDTH (ch) < linew) || col == 0) /* Is line buffer empty? */ #define BUFFER_EMPTY() (bufpos == 0) @@ -1160,13 +1160,13 @@ large for page\n"), #define EMIT(ch) \ do { \ APPEND_CHAR (ch); \ - linepos += CHAR_WIDTH (ch); \ + linepos += FNT_CHAR_WIDTH (ch); \ col++; \ } while (0) #define UNEMIT(ch) \ do { \ - linepos -= CHAR_WIDTH (ch); \ + linepos -= FNT_CHAR_WIDTH (ch); \ col--; \ } while (0) @@ -1690,7 +1690,7 @@ get_next_token (InputStream *is, double { /* Proportional font. */ - double grid = tabsize * CHAR_WIDTH (' '); + double grid = tabsize * FNT_CHAR_WIDTH (' '); col++; /* Move linepos to the next multiple of <grid>. */ @@ -1748,9 +1748,9 @@ get_next_token (InputStream *is, double if (ch == bs) { if (BUFFER_EMPTY () || !EXISTS (buffer[bufpos - 1])) - linepos -= CHAR_WIDTH ('m'); + linepos -= FNT_CHAR_WIDTH ('m'); else - linepos -= CHAR_WIDTH (buffer[bufpos - 1]); + linepos -= FNT_CHAR_WIDTH (buffer[bufpos - 1]); done = DONE_DONE; break; @@ -1775,7 +1775,7 @@ get_next_token (InputStream *is, double APPEND_CHAR (buf[i]); /* Update current point counters manually. */ - linepos += CHAR_WIDTH (ch); + linepos += FNT_CHAR_WIDTH (ch); col++; } else if (ch == '(' || ch == ')' || ch == '\\') @@ -1848,7 +1848,7 @@ get_next_token (InputStream *is, double /* Count length. */ for (i = 0; buf[i]; i++) - len += CHAR_WIDTH (buf[i]); + len += FNT_CHAR_WIDTH (buf[i]); if (linepos + len < linew || col == 0) { @@ -2472,7 +2472,7 @@ recognize_eps_file (Token *token) /* No, this BoundingBox comment is corrupted. */ MESSAGE (0, (stderr, _("EPS file \"%s\" contains malformed \ %%%%BoundingBox row:\n\"%.*s\"\n"), - token->u.epsf.filename, strlen (buf) - 1, buf)); + token->u.epsf.filename, (int)(strlen (buf) - 1), buf)); break; } } @@ -2599,7 +2599,7 @@ read_float (InputStream *is, int units, case 'l': /* lines or characters */ if (horizontal) - val *= CHAR_WIDTH ('m'); + val *= FNT_CHAR_WIDTH ('m'); else val *= LINESKIP; break; @@ -2728,7 +2728,7 @@ print_line_number (double x, double y, d int i; char *saved_Fname = ""; FontPoint saved_Fpt; - InputEncoding saved_Fencoding; + InputEncoding saved_Fencoding = 0; saved_Fpt.w = 0.0; saved_Fpt.h = 0.0; @@ -2758,7 +2758,7 @@ print_line_number (double x, double y, d /* Count linenumber string length. */ sprintf (buf, "%d", linenum); for (i = 0; buf[i]; i++) - len += CHAR_WIDTH (buf[i]); + len += FNT_CHAR_WIDTH (buf[i]); /* Print line numbers. */ OUTPUT ((cofp, "%g %g M (%s:) s\n", x + space - len, y, buf)); @@ -2781,8 +2781,6 @@ print_line_number (double x, double y, d * The name of the divert file, shared between divert() and undivert() * functions. */ -static char divertfname[512]; - static void divert () { --- src/util.c +++ src/util.c 2018-01-23 14:32:29.775373225 +0000 @@ -646,7 +646,7 @@ paste_file (char *name, char *suffix) if (j >= sizeof (name) - 1) FATAL ((stderr, _("%s:%d: %%Format: too long name, maxlen=%d"), - buffer_ptr (ctx.fullname), line, sizeof (name) - 1)); + buffer_ptr (ctx.fullname), line, (int)(sizeof (name) - 1))); /* Find the start of the format string. */ for (; buf[i] && isspace (buf[i]); i++) @@ -1387,7 +1387,8 @@ format_user_string (char *context_name, break; case 'c': /* `%c' trailing component of pwd. */ - getcwd (buf, sizeof (buf)); + if (!getcwd (buf, sizeof (buf))) + perror("getcwd"); cp = strrchr (buf, '/'); if (cp) cp++; @@ -1403,7 +1404,8 @@ format_user_string (char *context_name, break; case 'd': /* `%d' current working directory */ - getcwd (buf, sizeof (buf)); + if (!getcwd (buf, sizeof (buf))) + perror("getcwd"); APPEND_STR (buf); break; @@ -1871,7 +1873,7 @@ parse_float (char *string, int units, in case 'l': if (horizontal) - val *= CHAR_WIDTH ('m'); + val *= FNT_CHAR_WIDTH ('m'); else val *= LINESKIP; break; --- states/main.c +++ states/main.c 2018-01-23 14:32:29.775373225 +0000 @@ -371,7 +371,7 @@ main (argc, argv) if (cp) { path = xmalloc (cp - defs_file + 3); - sprintf (path, ".%c%.*s", PATH_SEPARATOR, cp - defs_file, defs_file); + sprintf (path, ".%c%.*s", PATH_SEPARATOR, (int)(cp - defs_file), defs_file); } else path = "."; --- states/utils.c +++ states/utils.c 2018-01-23 14:32:29.775373225 +0000 @@ -833,7 +833,7 @@ eval_expr (expr, env) { Environment *nenv = NULL; ListItem *i, *e; - List *stmts; + List *stmts __attribute__ ((__unused__)); List *lst; Cons *args_locals; ++++++ enscript-automake.diff ++++++ --- /var/tmp/diff_new_pack.43hdhS/_old 2018-01-24 15:25:28.832460592 +0100 +++ /var/tmp/diff_new_pack.43hdhS/_new 2018-01-24 15:25:28.832460592 +0100 @@ -4,46 +4,18 @@ automake 1.12 no longer supports pre-ANSI. --- - afmlib/Makefile.am | 2 +- - configure.in | 1 - - src/Makefile.am | 2 -- - 3 files changed, 1 insertion(+), 4 deletions(-) + configure.ac | 1 - + 1 file changed, 1 deletion(-) -Index: enscript-1.6.4/afmlib/Makefile.am +Index: b/configure.ac =================================================================== ---- enscript-1.6.4.orig/afmlib/Makefile.am -+++ enscript-1.6.4/afmlib/Makefile.am -@@ -23,7 +23,7 @@ - # Boston, MA 02111-1307, USA. - # - --AUTOMAKE_OPTIONS = ansi2knr -+AM_CPPFLAGS = -DPROTOTYPES - - noinst_LIBRARIES = libafm.a - libafm_a_SOURCES = afm.c afmparse.c strhash.c e_88591.c e_88592.c \ -Index: enscript-1.6.4/configure.in -=================================================================== ---- enscript-1.6.4.orig/configure.in -+++ enscript-1.6.4/configure.in -@@ -30,7 +30,6 @@ if test "X$CC" = "X"; then - fi - - AC_ISC_POSIX +--- a/configure.ac ++++ b/configure.ac +@@ -11,7 +11,6 @@ + AC_PROG_CC + + AC_USE_SYSTEM_EXTENSIONS -AM_C_PROTOTYPES - + AC_C_CONST AC_FUNC_ALLOCA -Index: enscript-1.6.4/src/Makefile.am -=================================================================== ---- enscript-1.6.4.orig/src/Makefile.am -+++ enscript-1.6.4/src/Makefile.am -@@ -24,8 +24,6 @@ - # Boston, MA 02111-1307, USA. - # - --AUTOMAKE_OPTIONS = ansi2knr -- - SUBDIRS = tests - - bin_PROGRAMS = enscript mkafmmap
