Hello community,
here is the log from the commit of package gv
checked in at Fri Mar 28 17:21:37 CET 2008.
--------
--- gv/gv.changes 2008-01-13 17:51:52.000000000 +0100
+++ /mounts/work_src_done/STABLE/gv/gv.changes 2008-03-28 11:49:25.242843000 +0100
@@ -1,0 +2,49 @@
+Thu Mar 27 19:01:38 CET 2008 - werner@suse.de
+
+- Update to gv 3.6.3
+ * gv is now able to work with latest ghostscript: gs 8.57
+ * The bug causing the version not to figure in the manual has been
+ fixed.
+ * The SIGINT signal is now masked (ignored) by gv.
+ * gv no more segfaults when reading a configuration file as produced by
+ State -> Setup Options -> Save
+ * gv should compile in non-GNU system that doesnt have glib2. The
+ `getopt' gnulib module has been imported to fix this.
+ * gv now correctly adjust the page index window after PAGE-UP and
+ PAGE-DOWN events.
+ * gv is now able to open files with minus character beginning
+ filenames.
+ * X resources related bugs has been fixed. gv is now able to get
+ resources from the display database, user file, gv system database
+ and command line doing the Right Thing (TM).
+ * gv is now able to correctly understand DocumentMedia and other DSC
+ directives that uses postscript strings. It was not possible with
+ previous versions due to a bug in the postscript names scanning
+ routine.
+ * New set of command line arguments. This solves the horrid bug on
+ gv 3.6.0 that made such release nearly unusable. See the
+ documentation for details about the new argument list.
+ * The "Reopen" entry on the File menu has been renamed to "Reload" in
+ order to be coherent with the "Reload" button.
+ * The distributed package structure have been fixed, now conforming a
+ legal GNU source package.
+ * The delete key now work as expected, that is, it deletes the next
+ character rather the last character when typed on text entries.
+ * Dot files are not shown by default on file selection forms.
+ * If you try to open an empty file you get a coherent error
+ message.
+ * New manual page
+ * The gs command used for PDF to PostScript conversion has been fixed to allow
+ document saving.
+ * New configuration/compilation/installation using GNU Autotools
+ * Documentation is now distributed in texinfo format.
+ * "Redisplay" button has been renamed to "Reload".
+ * Some GNU standard command line arguments are supported now:
+ --help, --usage and --version.
+ * Antialiasing is now used by default.
+ * Solved bug #11014: gv is capable to open files with spaces (or other
+ harm character) in the filename.
+- Use Debain patch
+- Port our patches to this version
+
+-------------------------------------------------------------------
Old:
----
gv-3.5.8-bzip2.patch
gv-3.5.8-deb.patch
gv-3.5.8.dif
gv-3.5.8-gcc4.patch
gv-3.5.8-I18N-mb.patch
gv-3.5.8-sec2.patch
gv-3.5.8-security.patch
gv-3.5.8.tar.bz2
gv.test
intptr_t.patch
settitle.patch
New:
----
gv-3.6.3-bzip2.patch
gv-3.6.3-deb.patch
gv-3.6.3.dif
gv-3.6.3-I18N-mb.patch
gv-3.6.3-intptr_t.patch
gv-3.6.3-security.patch
gv-3.6.3-settitle.patch
gv-3.6.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gv.spec ++++++
--- /var/tmp/diff_new_pack.J21956/_old 2008-03-28 17:20:40.000000000 +0100
+++ /var/tmp/diff_new_pack.J21956/_new 2008-03-28 17:20:40.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package gv (Version 3.5.8)
+# spec file for package gv (Version 3.6.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -10,45 +10,57 @@
# norootforbuild
+
Name: gv
-BuildRequires: update-desktop-files xaw3d-devel xorg-x11 xorg-x11-devel
+BuildRequires: update-desktop-files xorg-x11 xorg-x11-devel
+%if %suse_version > 1020
+BuildRequires: xaw3d-devel
+%else
+BuildRequires: xaw3d
+%endif
+%if %suse_version < 1100
+BuildRequires: desktop-data-SuSE
+%endif
License: GPL v2 or later
Group: Productivity/Publishing/PS
+PreReq: %install_info_prereq
Requires: ghostscript_x11
Conflicts: gs_serv gs_vga
# NOTE: We don't want this dependency and desktop-data-SuSE is in all
# desktop selections.
#Requires: desktop-data-SuSE
AutoReqProv: on
-Url: http://wwwthep.physik.uni-mainz.de/~plass/gv/
+Url: http://www.gnu.org/software/gv/
Summary: A Program to View PostScript Files
-Version: 3.5.8
-Release: 1300
-Source0: gv-3.5.8.tar.bz2
+Version: 3.6.3
+Release: 1
+Source0: gv-3.6.3.tar.bz2
Source1: gv.desktop
Source2: gv.png
-Patch0: gv-3.5.8-deb.patch
-Patch1: gv-3.5.8.dif
-Patch2: gv-3.5.8-security.patch
-Patch3: gv-3.5.8-bzip2.patch
+Patch0: gv-3.6.3-deb.patch
+Patch1: gv-3.6.3.dif
+Patch2: gv-3.6.3-security.patch
+Patch3: gv-3.6.3-bzip2.patch
# I18N patch originally from:
# http://www.on.cs.keio.ac.jp/~yasu/jp_xaw.html
# http://www.on.cs.keio.ac.jp/~yasu/linux/Xaw/gv-3.5.8-I18N-mb.patch
# changed a little bit for SuSE:
-Patch4: gv-3.5.8-I18N-mb.patch
-Patch5: intptr_t.patch
-Patch6: settitle.patch
-Patch7: gv-3.5.8-gcc4.patch
-Patch8: gv-3.5.8-sec2.patch
+Patch4: gv-3.6.3-I18N-mb.patch
+Patch5: gv-3.6.3-intptr_t.patch
+Patch6: gv-3.6.3-settitle.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"
%global _mandir %{_exec_prefix}/man
+%define _x11lib %{_exec_prefix}/%{_lib}
%define _x11data %{_exec_prefix}/lib/X11
%define _appdefdir %{_x11data}/app-defaults
+%define _x11inc %{_x11_prefix}/include
%else
+%define _x11lib %{_libdir}
%define _x11data %{_datadir}/X11
%define _appdefdir %{_x11data}/app-defaults
+%define _x11inc %{_includedir}
%endif
%description
@@ -61,119 +73,194 @@
--------
Tim Theisen
Johannes Plass
+ Jos� E. Marchesi
%prep
-%setup -n gv-3.5.8
-%patch0 -p 1 -b .deb
-%patch1
-%patch2 -p1 -b .sec
-%patch3 -p0 -b .bzip2
-%patch4 -p1 -b .I18N-mb
-%patch5 -p1 -b .intptr_t
-%patch6 -p1 -b .settitle
-%patch7 -p0 -b .gcc4
-%patch8 -p0 -b .sec2
+%setup
+echo >> src/Makefile.am
+%patch0 -p1 -b .deb
+%patch1 -p0
+%patch2 -p0 -b .sec
+# fzopen from libzio does not work due ftell()
+#patch3 -p0 -b .bzip2
+#
+%patch4 -p0 -b .I18N-mb
+%patch5 -p0 -b .intptr_t
+%patch6 -p0 -b .settitle
%build
-xmkmf -a
-make CCOPTIONS="$RPM_OPT_FLAGS"
+autoreconf -fis
+sed -ri 's@[[:blank:]]*-(R|rpath)[[:blank:]]*\$[[:alpha:]_]+@@g' configure
+chmod 755 configure
+CC=gcc
+CFLAGS="$RPM_OPT_FLAGS"
+LDFLAGS="-Wl,-z,defs"
+cflags ()
+{
+ local flag=$1; shift
+ case "${RPM_OPT_FLAGS}" in
+ *${flag}*) return
+ esac
+ if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
+ local var=$1; shift
+ eval $var=\${$var:+\$$var\ }$flag
+ fi
+ if test -n "$1" && g++ -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
+ local var=$1; shift
+ eval $var=\${$var:+\$$var\ }$flag
+ fi
+}
+cflags -std=gnu89 CFLAGS
+cflags -fno-strict-aliasing CFLAGS
+cflags -Wno-unused CFLAGS
+cflags -Wno-unprototyped-calls CFLAGS
+cflags -pipe CFLAGS
+export CC CFLAGS LDFLAGS
+./configure --prefix=%{_prefix} \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --with-x \
+ --x-includes=%{_x11inc} \
+ --x-libraries=%{_x11lib}\
+ --enable-backing-pixmap \
+ --disable-memmove-code \
+ --disable-setenv-code \
+ --with-default-papersize=a4
+make pkglibdir='%{_x11data}/gv'
%install
rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
-make DESTDIR=%{buildroot} install.man
-make DESTDIR=%{buildroot} install.doc
+mkdir %{buildroot}
+make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install
+make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-info
+make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-man
+make -C src DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-nls
+mkdir -p %{buildroot}/%{_defaultdocdir}/gv
install -m 0444 NOTE %{buildroot}/%{_defaultdocdir}/gv/Copyright
# add font settings to app-defaults:
for i in $(find %{buildroot}%{_x11data} -type f -name "GV")
do
- cat source/gv_font_res-I18N_mb.dat >> ${i}
+ cat src/gv_font_res-I18N_mb.dat >> ${i}
+ chmod 0644 ${i}
done
# japanese app-defaults:
-mkdir -p %{buildroot}%{_x11data}/{ja,ja_JP.SJIS,ja_JP.UTF-8}/app-defaults
-mv %{buildroot}%{_x11data}/ja_JP.eucJP/app-defaults/GV \
- %{buildroot}%{_x11data}/ja/app-defaults/GV
-iconv -f EUC-JP -t SJIS < %{buildroot}%{_x11data}/ja/app-defaults/GV \
+mkdir -p %{buildroot}%{_x11data}/{ja_JP.SJIS,ja_JP.EUC-JP}/app-defaults
+iconv -f UTF-8 -t SJIS < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \
> %{buildroot}%{_x11data}/ja_JP.SJIS/app-defaults/GV
-iconv -f EUC-JP -t UTF-8 < %{buildroot}%{_x11data}/ja/app-defaults/GV \
- > %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV
+iconv -f UTF-8 -t EUC-JP < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \
+ > %{buildroot}%{_x11data}/ja_JP.EUC-JP/app-defaults/GV
+mkdir -p %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults
+iconv -f UTF-8 -t EUC-KR < %{buildroot}%{_x11data}/ko_KR.UTF-8/app-defaults/GV \
+ > %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults/GV
%suse_update_desktop_file -i gv Office Viewer
+%post
+%install_info --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz
+
+%postun
+%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz
+
%files
%defattr(-,root,root)
-/usr/share/applications/gv.desktop
-/usr/share/pixmaps/gv.png
+%{_datadir}/applications/gv.desktop
+%{_datadir}/pixmaps/gv.png
%dir %{_x11data}/gv/
-%config %{_x11data}/gv/gv_system.ad
-%config %{_x11data}/gv/gv_user.ad
-%config %{_x11data}/gv/gv_class.ad
+%config %{_x11data}/gv/*.ad
+%config %{_x11data}/gv/*.dat
%config %{_appdefdir}/GV
%dir %{_x11data}/??
%dir %{_x11data}/??_*
%dir %{_x11data}/*/app-defaults
-%config %{_x11data}/ja*/app-defaults/GV
+%config %{_x11data}/*/app-defaults/GV
%{_bindir}/gv
-%doc %{_mandir}/man1/gv.1x.gz
-%docdir %{_defaultdocdir}/gv/
+%doc %{_mandir}/man1/gv.1.gz
+%doc %{_infodir}/gv.info.gz
+%dir %{_defaultdocdir}/gv
+%docdir %{_defaultdocdir}/gv
%{_defaultdocdir}/gv/Copyright
-%doc %{_defaultdocdir}/gv/gs.interface.gz
-%doc %{_defaultdocdir}/gv/gv-faq.txt.gz
-%doc %{_defaultdocdir}/gv/key-bindings.txt.gz
-%doc %{_defaultdocdir}/gv/comments.doc.gz
-%doc %{_defaultdocdir}/gv/gv.ps.gz
-%doc %{_defaultdocdir}/gv/gv-1.html
-%doc %{_defaultdocdir}/gv/gv-10.html
-%doc %{_defaultdocdir}/gv/gv-11.html
-%doc %{_defaultdocdir}/gv/gv-12.html
-%doc %{_defaultdocdir}/gv/gv-13.html
-%doc %{_defaultdocdir}/gv/gv-2.html
-%doc %{_defaultdocdir}/gv/gv-3.html
-%doc %{_defaultdocdir}/gv/gv-4.html
-%doc %{_defaultdocdir}/gv/gv-5.html
-%doc %{_defaultdocdir}/gv/gv-6.html
-%doc %{_defaultdocdir}/gv/gv-7.html
-%doc %{_defaultdocdir}/gv/gv-8.html
-%doc %{_defaultdocdir}/gv/gv-9.html
-%doc %{_defaultdocdir}/gv/gv-faq.html
-%doc %{_defaultdocdir}/gv/gv.html
-%dir %{_defaultdocdir}/gv/
%changelog
-* Sun Jan 13 2008 - coolo@suse.de
+* Thu Mar 27 2008 werner@suse.de
+- Update to gv 3.6.3
+ * gv is now able to work with latest ghostscript: gs 8.57
+ * The bug causing the version not to figure in the manual has been
+ fixed.
+ * The SIGINT signal is now masked (ignored) by gv.
+ * gv no more segfaults when reading a configuration file as produced by
+ State -> Setup Options -> Save
+ * gv should compile in non-GNU system that doesnt have glib2. The
+ `getopt' gnulib module has been imported to fix this.
+ * gv now correctly adjust the page index window after PAGE-UP and
+ PAGE-DOWN events.
+ * gv is now able to open files with minus character beginning
+ filenames.
+ * X resources related bugs has been fixed. gv is now able to get
+ resources from the display database, user file, gv system database
+ and command line doing the Right Thing (TM).
+ * gv is now able to correctly understand DocumentMedia and other DSC
+ directives that uses postscript strings. It was not possible with
+ previous versions due to a bug in the postscript names scanning
+ routine.
+ * New set of command line arguments. This solves the horrid bug on
+ gv 3.6.0 that made such release nearly unusable. See the
+ documentation for details about the new argument list.
+ * The "Reopen" entry on the File menu has been renamed to "Reload" in
+ order to be coherent with the "Reload" button.
+ * The distributed package structure have been fixed, now conforming a
+ legal GNU source package.
+ * The delete key now work as expected, that is, it deletes the next
+ character rather the last character when typed on text entries.
+ * Dot files are not shown by default on file selection forms.
+ * If you try to open an empty file you get a coherent error
+ message.
+ * New manual page
+ * The gs command used for PDF to PostScript conversion has been fixed to allow
+ document saving.
+ * New configuration/compilation/installation using GNU Autotools
+ * Documentation is now distributed in texinfo format.
+ * "Redisplay" button has been renamed to "Reload".
+ * Some GNU standard command line arguments are supported now:
+ --help, --usage and --version.
+ * Antialiasing is now used by default.
+ * Solved bug #11014: gv is capable to open files with spaces (or other
+ harm character) in the filename.
+- Use Debain patch
+- Port our patches to this version
+* Sun Jan 13 2008 coolo@suse.de
- remove desktop-data from buildrequires
-* Thu Jul 05 2007 - coolo@suse.de
+* Thu Jul 05 2007 coolo@suse.de
- put desktop file and icon into the package
-* Fri Jun 01 2007 - dmueller@suse.de
+* Fri Jun 01 2007 dmueller@suse.de
- fix buildrequires
-* Fri Nov 17 2006 - werner@suse.de
+* Fri Nov 17 2006 werner@suse.de
- Corrected version of last fix (bug #219454)
-* Thu Nov 09 2006 - werner@suse.de
+* Thu Nov 09 2006 werner@suse.de
- Avoid buffer overflow in gv gettext() (bug #219454)
-* Thu Aug 24 2006 - werner@suse.de
+* Thu Aug 24 2006 werner@suse.de
- Check for existence of gv.png
-* Wed Aug 02 2006 - werner@suse.de
+* Wed Aug 02 2006 werner@suse.de
- Make it build with X11R7
-* Tue Feb 28 2006 - werner@suse.de
+* Tue Feb 28 2006 werner@suse.de
- Fix range of array subscript (bug #154109)
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Tue Nov 29 2005 - sbrabec@suse.cz
+* Tue Nov 29 2005 sbrabec@suse.cz
- Don't package icon already present in desktop-data-SuSE.
Cleans rpm -V output.
-* Tue Jun 07 2005 - meissner@suse.de
+* Tue Jun 07 2005 meissner@suse.de
- Use RPM_OPT_FLAGS.
-* Mon May 23 2005 - mfabian@suse.de
+* Mon May 23 2005 mfabian@suse.de
- Bugzilla #85410: improve default fontsets to make it work better
with the recent changes in the XLC_LOCALE files in Xorg.
Japanese should look nicer now and warning messages should
usually disappear.
-* Mon Apr 18 2005 - werner@suse.de
+* Mon Apr 18 2005 werner@suse.de
- Set DELAYSAFER for dsc file of the pdf within a pipe (bug #78322)
-* Wed Apr 13 2005 - werner@suse.de
+* Wed Apr 13 2005 werner@suse.de
- Add a return after label even for void functions for stupid gcc4
-* Wed Nov 17 2004 - werner@suse.de
+* Wed Nov 17 2004 werner@suse.de
- Add gv.png pixmap to file list
-* Mon Jun 28 2004 - mfabian@suse.de
+* Mon Jun 28 2004 mfabian@suse.de
- add "-*-*-Medium-R-*--16-*-*-*-*-*-*-*" to all fontsets as a
fallback to suppress useless warnings if
"-*-*-Medium-R-*--14-*-*-*-*-*-*-*" or other sizes are not
@@ -184,9 +271,9 @@
In 16 pixel, there are fonts for all common encodings already
in the basic X11 packages, therefore 16 pixel should
always work as a fallback.
-* Fri May 28 2004 - adrian@suse.de
+* Fri May 28 2004 adrian@suse.de
- add "Office" to Categories to match the menu definition (#41338)
-* Fri Apr 30 2004 - mfabian@suse.de
+* Fri Apr 30 2004 mfabian@suse.de
- Bugzilla #39594: add gv-3.5.8-I18N-mb.patch to support the
display of multibyte file names.
- intptr_t.patch: fix compiler warnings
@@ -194,48 +281,48 @@
- fix display of file names in the window title and icons by
setting _NET_WM_NAME and _NET_WM_ICON_NAME properties
(thanks a lot to Marcus Schaefer for help).
-* Thu Apr 29 2004 - werner@suse.de
+* Thu Apr 29 2004 werner@suse.de
- correct category for desktop file: "PostScript Viewer"
-> "Viewer".
-* Tue Apr 06 2004 - werner@suse.de
+* Tue Apr 06 2004 werner@suse.de
- Add desktop entry
-* Sat Jan 10 2004 - adrian@suse.de
+* Sat Jan 10 2004 adrian@suse.de
- add %%defattr
-* Mon Aug 25 2003 - werner@suse.de
+* Mon Aug 25 2003 werner@suse.de
- Fix menu entry for bunzip2 label
-* Fri Aug 22 2003 - werner@suse.de
+* Fri Aug 22 2003 werner@suse.de
- Uncompress bzip2 files on the fly, patch based on
Volker Kuhlmann's patch (bug #29260)
-* Tue Apr 15 2003 - coolo@suse.de
+* Tue Apr 15 2003 coolo@suse.de
- use BuildRoot
-* Mon Mar 10 2003 - werner@suse.de
+* Mon Mar 10 2003 werner@suse.de
- Fix sigsegv in case of unkown paper size.
-* Fri Nov 08 2002 - werner@suse.de
+* Fri Nov 08 2002 werner@suse.de
- Remove XCOMM definition to make new cpp happy
-* Fri Sep 20 2002 - okir@suse.de
+* Fri Sep 20 2002 okir@suse.de
- added security patch to address buffer overflows
-* Tue Sep 17 2002 - ro@suse.de
+* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
-* Mon Jan 14 2002 - schwab@suse.de
+* Mon Jan 14 2002 schwab@suse.de
- Fix use of token concatenation.
-* Fri Jun 22 2001 - ro@suse.de
+* Fri Jun 22 2001 ro@suse.de
- use ComplexProgramTargetNoMan
-* Fri Oct 06 2000 - kukuk@suse.de
+* Fri Oct 06 2000 kukuk@suse.de
- change group tag
- Remove bogus xshared requires, rpm will handle this correct
-* Wed May 24 2000 - kukuk@suse.de
+* Wed May 24 2000 kukuk@suse.de
- Use /usr/share/doc/packages
-* Mon Jan 24 2000 - werner@suse.de
+* Mon Jan 24 2000 werner@suse.de
- Add Debian patch 15 for gv 3.5.8
- Use RPM_OPT_FLAGS
-* Mon Sep 20 1999 - ro@suse.de
+* Mon Sep 20 1999 ro@suse.de
- added Requires ghostscript_x11
-* Mon Sep 13 1999 - bs@suse.de
+* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-* Wed Oct 15 1997 - werner@suse.de
+* Wed Oct 15 1997 werner@suse.de
- New version: 3.5.8
- This version is usable only with Xaw3d
-* Thu Feb 13 1997 - werner@suse.de
+* Fri Feb 14 1997 werner@suse.de
- New package with gv version 2_7_6
- Remove call of Xaw/Xaw3d private function ...
now we can use Xaw or Xaw3d or Xaw95.
++++++ gv-3.5.8-bzip2.patch -> gv-3.6.3-bzip2.patch ++++++
--- gv/gv-3.5.8-bzip2.patch 2003-08-25 14:49:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/gv/gv-3.6.3-bzip2.patch 2008-03-27 15:34:18.104583000 +0100
@@ -1,305 +1,103 @@
-gv (the successor to Tim Theisen's ghostview) by default can uncompress gziped
-files on the fly. This patch allows to also uncompress bzip2-compressed files
-on the fly.
-
-Compressed input can't be read from a pipe, the input must be seekable. The
-name of the compressed file is irrelevant, detection is by magic file ID. gv
-can't read from stdin.
-
-gv only allows to specify one program to handle the decompression, it might
-make more sense to extend this to two, but it's also possible to use a short
-shell script to handle both bzip2 and gzip decompression, which is what
-gv_uncompress does.
-
-Volker Kuhlmann , 22 Aug 2003
-
-// Just extended to use bzip2 after the detection of bzip2 magic
-// without the usage of an extern script.
-//
-
---- source/Imakefile
-+++ source/Imakefile Fri Aug 22 16:13:35 2003
-@@ -320,7 +320,8 @@
- @echo "GV.gsSafer: True" >> $(GV_INTERN_RES_DAT)
- @echo "GV.gsQuiet: True" >> $(GV_INTERN_RES_DAT)
- @echo "GV.gsArguments:" >> $(GV_INTERN_RES_DAT)
-- @echo "GV.uncompressCommand: gzip -d -c %s > %s" >> $(GV_INTERN_RES_DAT)
-+ @echo "GV.uncompressCommand: gzip -d -c %s > %s" >> $(GV_INTERN_RES_DAT)
-+ @echo "GV.bunzip2Command: bzip2 -d -c %s > %s" >> $(GV_INTERN_RES_DAT)
- @echo "GV.printCommand: $(PRINT_COMMAND)" >> $(GV_INTERN_RES_DAT)
-
- clean::
---- source/callbacks.c
-+++ source/callbacks.c Fri Aug 22 15:49:25 2003
-@@ -1271,6 +1271,7 @@
- GV_XtFree(gv_miscmenu_entries_res);
- GV_XtFree(gv_print_command);
- GV_XtFree(gv_uncompress_command);
-+ GV_XtFree(gv_bunzip2_command);
- GV_XtFree(gv_gs_interpreter);
- GV_XtFree(gv_gs_cmd_scan_pdf);
- GV_XtFree(gv_gs_cmd_conv_pdf);
---- source/doc_misc.c
-+++ source/doc_misc.c Fri Aug 22 16:04:43 2003
-@@ -49,7 +49,7 @@
- /*##################################################################*/
-
- int
--doc_scanFile(fPP,docP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle)
-+doc_scanFile(fPP,docP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,cmd_bunzip2,scanstyle)
- FILE ** fPP;
- Document *docP;
- String filename;
-@@ -58,6 +58,7 @@
- String cmd_scan_pdf;
- String *filename_uncP;
- String cmd_uncompress;
-+ String cmd_bunzip2;
- int scanstyle;
- {
- Document d;
-@@ -67,7 +68,7 @@
- d = (Document)NULL;
- ret = 0;
- if (*fPP && filename)
-- d = psscan(fPP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle);
-+ d = psscan(fPP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,cmd_bunzip2,scanstyle);
- if (d) {
- d->labels_useful=0;
- d->structured =0;
---- source/doc_misc.h
-+++ source/doc_misc.h Fri Aug 22 15:51:37 2003
-@@ -38,6 +38,7 @@
- String,
- String*,
- String,
-+ String,
- int /* scanstyle */
+--- configure.ac
++++ configure.ac 2008-03-27 14:41:36.332982541 +0100
+@@ -49,6 +49,25 @@ dnl Search for libraries
+ AC_CHECK_LIB(m, sqrt)
+ AC_CHECK_LIB(fl, yywrap)
+
++#
++# Check for zlib and libbz2 libraries to use this together
++# with SuSE's libzio to open compressed info files.
++#
++AC_CHECK_HEADER(zlib.h,[
++ for lib in z gz
++ do
++ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; break])
++ done])
++AC_CHECK_HEADER(bzlib.h,[
++ for lib in bz2 bzip2
++ do
++ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; break])
++ done])
++AC_CHECK_HEADER(zio.h,[
++ AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio" ; AC_DEFINE(HAVE_ZIO)])
++ ])
++
++
+ AC_PATH_XTRA()
+ AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
+ AC_CHECK_LIB(ICE, main, , , $X_LIBS)
+@@ -229,4 +248,4 @@ AM_CONDITIONAL(USE_MEMDEBUG_CODE, test x
+
+
+ dnl Generate output files
+-AC_OUTPUT(Makefile doc/version.texi lib/Makefile src/Makefile doc/Makefile)
+\ No newline at end of file
++AC_OUTPUT(Makefile doc/version.texi lib/Makefile src/Makefile doc/Makefile)
+--- src/ac_config.h.in
++++ src/ac_config.h.in 2008-03-27 14:43:32.755968935 +0100
+@@ -142,3 +142,6 @@
+ /* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+ #undef __GETOPT_PREFIX
++
++/* Define to 1 if you have libzio for opening compressed info files */
++#undef HAVE_ZIO
+--- src/ps.c
++++ src/ps.c 2008-03-27 15:33:19.813097964 +0100
+@@ -65,8 +65,15 @@
+
+ #include
+ #include
++#include
++#include
+
+ #include
++#include
++
++#ifdef HAVE_ZIO
++# include
++#endif
+
+ #ifndef SEEK_SET
+ #define SEEK_SET 0
+@@ -93,7 +100,7 @@ extern Media *gv_medias;
+ #define memset(a,b,c) bzero(a,c)
#endif
- );
---- source/file.c
-+++ source/file.c Fri Aug 22 15:49:25 2003
-@@ -376,6 +376,7 @@
- while (*ext) { *ext = tolower(*ext); ext++; }
- if (!strncmp(mext,".gz",3)) ext = "";
- else if (!strncmp(mext,".z",2)) ext = "";
-+ else if (!strncmp(mext,".bz2",4)) ext = "";
- else if (!strncmp(mext,".ps",3)) ext = ".ps";
- else if (!strncmp(mext,".pdf",4)) ext = ".pdf";
- else ext = e;
---- source/main.c
-+++ source/main.c Fri Aug 22 15:49:25 2003
-@@ -348,6 +348,7 @@
- main_setGhostscriptResources(gv_database);
- main_setInternResource(gv_database,&gv_print_command,"printCommand");
- main_setInternResource(gv_database,&gv_uncompress_command,"uncompressCommand");
-+ main_setInternResource(gv_database,&gv_bunzip2_command,"bunzip2Command");
-
- gv_user_defaults_file = resource_userDefaultsFile();
- gv_screen = XtScreen(toplevel);
---- source/main_globals.h
-+++ source/main_globals.h Fri Aug 22 15:49:25 2003
-@@ -128,6 +128,7 @@
- EXTERN String gv_user_defaults_file;
- EXTERN String gv_print_command; /* command used to print doc, usually "lpr" */
- EXTERN String gv_uncompress_command; /* command used to uncompress a file */
-+EXTERN String gv_bunzip2_command; /* command used to bunzip2 a file */
- EXTERN int gv_print_kills_file; /* whether the print symbiont removes the file after printing */
- EXTERN int gv_exiting; /* flag set when exiting gv */
- EXTERN String gv_dirs;
---- source/main_resources.h
-+++ source/main_resources.h Fri Aug 22 15:58:27 2003
-@@ -89,6 +89,7 @@
- DECLARE_STRING(scales)
- DECLARE_STRING(printCommand)
- DECLARE_STRING(uncompressCommand)
-+DECLARE_STRING(bunzip2Command)
-
- DECLARE_STRING(gsInterpreter)
- DECLARE_STRING(gsCmdScanPDF)
---- source/misc.c
-+++ source/misc.c Fri Aug 22 15:49:25 2003
-@@ -952,7 +952,7 @@
- gv_filename,
- gv_filename_raw,
- &gv_filename_dsc,gv_gs_cmd_scan_pdf,
-- &gv_filename_unc,gv_uncompress_command,
-+ &gv_filename_unc,gv_uncompress_command,gv_bunzip2_command,
- gv_scanstyle);
- {
- int m;
---- source/options_setup.c
-+++ source/options_setup.c Fri Aug 22 15:49:25 2003
-@@ -71,7 +71,7 @@
- static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle;
- static Widget pixmapToggle,miscLabel;
- static Widget confirmLabel,confirmButton,confirmMenu,showTitleToggle;
--static Widget print_command,scales,uncompress,screenSize,medias,magmenu,miscmenu;
-+static Widget print_command,scales,uncompress,bunzip2,screenSize,medias,magmenu,miscmenu;
-
- static String confirm_quit_styles[4] = { "Never","When processing","Always", NULL };
-
-@@ -117,6 +117,8 @@
- widgets_setText(print_command, gv_print_command);
- SMESSAGE(gv_uncompress_command)
- widgets_setText(uncompress,gv_uncompress_command);
-+ SMESSAGE(gv_bunzip2_command)
-+ widgets_setText(bunzip2,gv_bunzip2_command);
- SMESSAGE(gv_scales_res)
- s = options_squeezeMultiline(gv_scales_res);
- widgets_setText(scales,s);
-@@ -178,6 +180,7 @@
- }
-
- options_textApply(uncompress,NULL,&gv_uncompress_command);
-+ options_textApply(bunzip2,NULL,&gv_bunzip2_command);
- options_textApply(print_command,NULL,&gv_print_command);
- options_textApply(magmenu,NULL,&gv_magmenu_entries_res);
- magmenu_freeMagMenuEntries(gv_magmenu_entries);
-@@ -312,6 +315,8 @@
- ++argn;
- options_setArg(&(argi[argn]),&(argv[argn]),s_uncompressCommand ,gv_class,widgets_getText(uncompress));
- ++argn;
-+ options_setArg(&(argi[argn]),&(argv[argn]),s_bunzip2Command ,gv_class,widgets_getText(bunzip2));
-+ ++argn;
- options_setArg(&(argi[argn]),&(argv[argn]),s_confirmPrint ,gv_class ,SwitchIsSet(confirmPrintToggle) ? t : f);
- ++argn;
- options_setArg(&(argi[argn]),&(argv[argn]),s_reverseScrolling ,gv_class ,SwitchIsSet(reverseScrollingToggle) ? t : f);
-@@ -405,6 +410,7 @@
- magmenu = widgets_createLabeledTextField("magmenu", optionControl);
- medias = widgets_createLabeledTextField("medias", optionControl);
- uncompress = widgets_createLabeledLineTextField("uncompress", optionControl);
-+ bunzip2 = widgets_createLabeledLineTextField("bunzip2", optionControl);
- print_command = widgets_createLabeledLineTextField("printCommand", optionControl);
- scales = widgets_createLabeledTextField("scales", optionControl);
- screenSize = widgets_createLabeledLineTextField("screenSize", optionControl);
---- source/ps.c
-+++ source/ps.c Fri Aug 22 16:11:14 2003
-@@ -353,7 +353,7 @@
- /*###########################################################*/
- struct document *
--psscan(fileP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle)
-+psscan(fileP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,cmd_bunzip2,scanstyle)
- FILE **fileP;
- char *filename;
- char *filename_raw;
-@@ -361,6 +361,7 @@
- char *cmd_scan_pdf;
- char **filename_uncP;
- char *cmd_uncompress;
-+ char *cmd_bunzip2;
- int scanstyle;
- {
- FILE *file;
-@@ -404,18 +405,27 @@
- int ignore_dsc; /* Derived from scanstyle.
- If set the document structure will be ignored.
- */
-+ char *run_uncompress = NULL;
+-extern int sec_scanf(const char *, const char *, ...);
++extern int sec_sscanf(const char *, const char *, ...);
- BEGINMESSAGE(psscan)
-
- if (cmd_uncompress) {
-- char b[2];
-- if (!(fread(b, sizeof(char),2, *fileP) == 2)
-- || b[0] != '\037' || (b[1] != '\235' && b[1] != '\213')) {
-+ char b[4];
-+ /* 0x1F9D, 0x1F8B = gzip */
-+ #define is_gzip (b[0] == '\037' && (b[1] == '\235' || b[1] == '\213'))
-+ /* "BZ" = bzip2; should we skip the test in b[3]? */
-+ #define is_bzip2 (b[0] == 'B' && b[1] == 'Z' \
-+ && (b[3] >= 48) && (b[3] <=57) )
-+ if (fread(b, sizeof(char),4, *fileP) != 4) { /* I/O error */
- rewind(*fileP);
-- cmd_uncompress=NULL;
-+ } else {
-+ if (is_gzip)
-+ run_uncompress=cmd_uncompress;
-+ if (is_bzip2)
-+ run_uncompress=cmd_bunzip2;
+ /* We use this helper function for providing proper */
+ /* case and colon :-) insensitive DSC matching */
+@@ -388,6 +395,7 @@ psscan(fileP,filename,filename_raw,filen
+ cmd_uncompress=NULL;
}
}
-- if (cmd_uncompress) {
-+ if (run_uncompress) {
++#ifndef HAVE_ZIO
+ if (cmd_uncompress) {
struct document *retval = NULL;
FILE *tmpfile = (FILE*)NULL;
- char *filename_unc;
-@@ -425,7 +435,7 @@
- filename_unc=file_getTmpFilename(NULL,filename_raw);
- quoted_filename = quote_filename(filename);
- quoted_filename_unc = quote_filename(filename_unc);
-- sprintf(cmd,cmd_uncompress,quoted_filename,quoted_filename_unc);
-+ sprintf(cmd,run_uncompress,quoted_filename,quoted_filename_unc);
- GV_XtFree(quoted_filename);
- GV_XtFree(quoted_filename_unc);
- INFMESSAGE(is compressed)
-@@ -449,7 +459,7 @@
- if (!tmpfile) goto unc_exec_failed;
- fclose(*fileP);
- *fileP = tmpfile;
-- retval = psscan(fileP,filename_unc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,scanstyle);
-+ retval = psscan(fileP,filename_unc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,NULL,scanstyle);
- #if 0
- if (!retval) {
- sprintf(s,"333 Scanning\n%s\nfailed.",filename_unc);
-@@ -548,7 +558,7 @@
- if (!tmpfile) goto scan_exec_failed;
- fclose(*fileP);
- *fileP = tmpfile;
-- retval = psscan(fileP,filename_dsc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,scanstyle);
-+ retval = psscan(fileP,filename_dsc,filename_raw,filename_dscP,cmd_scan_pdf,NULL,NULL,NULL,scanstyle);
- if (!retval) {
- sprintf(s,"Scanning\n%s\nfailed.",filename_dsc);
- goto scan_failed;
---- source/ps.h
-+++ source/ps.h Fri Aug 22 16:10:21 2003
-@@ -116,6 +116,7 @@
- char *,
- char **,
- char *,
-+ char *,
- int /* scanstyle */
- #endif
- );
---- source/save.c
-+++ source/save.c Fri Aug 22 16:00:03 2003
-@@ -270,7 +270,7 @@
- String s = GV_XtNewString(src_filename);
- s = file_getUsefulName(s);
- INFMESSAGE(scanning document)
-- doc_scanFile(&src_file,&src_doc,src_filename,s,NULL,NULL,NULL,NULL,scanstyle);
-+ doc_scanFile(&src_file,&src_doc,src_filename,s,NULL,NULL,NULL,NULL,NULL,scanstyle);
- if (src_doc) {
- INFMESSAGE(calling pscopydoc)
- pscopydoc(save_file,src_filename,src_doc,pagelist);
---- source/gv_misc_res.dat
-+++ source/gv_misc_res.dat 2003-08-25 12:35:43.000000000 +0000
-@@ -349,6 +349,7 @@
- GV*eyeGuide.label: Scrolling Eye Guide
- GV*confirmPrint.label: Confirm Printing
- GV*uncompressLabel.label: Uncompress
-+GV*bunzip2Label.label: Bunzip2
- GV*autoCenter.label: Auto Center
- GV*printCommandLabel.label: Print Command
- GV*scratchDirLabel.label: Scratch Directory
---- source/gv_layout_res.dat
-+++ source/gv_layout_res.dat 2003-08-25 12:46:04.000000000 +0000
-@@ -283,6 +283,8 @@
- printCommandLabel<+[1]*>\
- $bs\
- uncompressLabel<+[1]*>\
-+ $bs\
-+ bunzip2Label<+[1]*>\
- }\
- $s\
- |v{\
-@@ -291,6 +293,8 @@
- printCommandFrame<+[2]-100%*>\
- $s\
- uncompressFrame<+[2]-100%*>\
-+ $s\
-+ bunzip2Frame<+[2]-100%*>\
- }\
- }\
- }\
+@@ -441,6 +449,23 @@ unc_ok:
+ *filename_uncP = (char*)GV_XtNewString(filename_unc);
+ goto unc_ok;
+ }
++#else
++ if (cmd_uncompress) {
++ FILE *zfile = fzopen(filename, "r");
++ INFMESSAGE(is compressed)
++ if (!zfile) {
++ char s[512];
++ sprintf(s,"Uncompressing of\n%s\nfailed.",filename);
++ NotePopupShowMessage(s);
++ ENDMESSAGE(psscan)
++ return(NULL);
++ }
++ fclose(*fileP);
++ *fileP = zfile;
++ cmd_uncompress = NULL;
++ *filename_uncP = NULL;
++ }
++#endif
+
+ respect_eof = (scanstyle & SCANSTYLE_IGNORE_EOF) ? 0 : 1;
+ ignore_dsc = (scanstyle & SCANSTYLE_IGNORE_DSC) ? 1 : 0;
++++++ gv-3.5.8-deb.patch -> gv-3.6.3-deb.patch ++++++
++++ 3987 lines (skipped)
++++ between gv/gv-3.5.8-deb.patch
++++ and /mounts/work_src_done/STABLE/gv/gv-3.6.3-deb.patch
++++++ gv-3.5.8.dif -> gv-3.6.3.dif ++++++
--- gv/gv-3.5.8.dif 2006-08-02 14:56:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/gv/gv-3.6.3.dif 2008-03-27 18:28:40.914322000 +0100
@@ -1,24 +1,14 @@
--- .pkgextract
+++ .pkgextract 2006-02-28 15:49:27.000000000 +0100
-@@ -0,0 +1,2 @@
-+patch -p1 -s --suffix=".debian" < ../gv-3.5.8-deb.patch
-+patch -p1 -s --suffix=".secure" < ../gv-3.5.8-security.patch
---- Imakefile
-+++ Imakefile 2006-02-28 15:49:27.000000000 +0100
-@@ -1,7 +1,3 @@
--#ifndef XCOMM
--#define XCOMM #
--#endif
--
- XCOMM
- XCOMM Imakefile
- XCOMM
+@@ -0,0 +1 @@
++patch -p1 -b -s --suffix=".debian" < ../gv-3.6.3-deb.patch
--- NOTE
-+++ NOTE 2006-02-28 15:49:27.000000000 +0100
-@@ -0,0 +1,48 @@
++++ NOTE 2008-03-27 13:49:41.452894000 +0100
+@@ -0,0 +1,52 @@
+
+**
+** Copyright (C) 1995, 1996, 1997 Johannes Plass
++** Copyright (C) 2004 Jose E. Marchesi
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
@@ -39,6 +29,9 @@
+** Johannes Gutenberg-University
+** Mainz, Germany
+**
++** Jose E. Marchesi (jemarch@gnu.org)
++** GNU Project
++**
+
+GV is real based on ghostview 1.5 by Tim Theisen:
+
@@ -64,94 +57,65 @@
+ * UUCP: uwvax!tim University of Wisconsin-Madison
+ * Phone: (608)262-0438 1210 West Dayton Street
+ * FAX: (608)262-9777 Madison, WI 53706
---- config.Unix
-+++ config.Unix 2006-02-28 15:49:27.000000000 +0100
-@@ -32,16 +32,22 @@
- XCOMM --------------------------------------------------------------------
- XCOMM Destination directories.
- XCOMM --------------------------------------------------------------------
-- GV_BINDIR = /usr/local/bin/
-- GV_DOCDIR = /usr/local/doc/gv/
-- GV_LIBDIR = /usr/local/lib/gv/
-- GV_MANDIR = /usr/local/man/man1/
-+ SHAREDIR ?= $(LIBDIR)
-+ GV_BINDIR = $(BINDIR)/
-+ GV_DOCDIR = /usr/share/doc/packages/gv/
-+ GV_LIBDIR = $(SHAREDIR)/gv/
-+ GV_MANDIR = $(MANPATH)/man1/
-+
-+XCOMM --------------------------------------------------------------------
-+XCOMM --- Don not use private functions of Xaw or Xaw3d
-+XCOMM --------------------------------------------------------------------
-+XCOMM #define USE_STANDARD_XAW
-
- XCOMM --------------------------------------------------------------------
- XCOMM --- The name of the Xaw3d library.
- XCOMM --------------------------------------------------------------------
- XCOMM XAWLIB = -lXaw
-- XAWLIB = -lXaw3d
-+XAWLIB = -lXaw3d
-
- XCOMM --------------------------------------------------------------------
- XCOMM As far as the Xaw3d header files are concerned it is by
-@@ -57,6 +63,7 @@
- XCOMM ln -s /home/aaa/Xaw3d Xaw3d
- XCOMM --------------------------------------------------------------------
- XCOMM XAW3D_HEADERS = -I/home/aaa/Xaw3d
-+XAW3D_HEADERS = -I/usr/include
-
- XCOMM --------------------------------------------------------------------
- XCOMM Print Command
-@@ -100,7 +107,7 @@
- XCOMM --------------------------------------------------------------------
- XCOMM --- Use gv's own Motif like scrollbar.
- XCOMM --------------------------------------------------------------------
--#define USE_SCROLLBAR_CODE
-+XCOMM #define USE_SCROLLBAR_CODE
-
- XCOMM --------------------------------------------------------------------
- XCOMM --- Compile style files into the executable.
-@@ -121,6 +128,7 @@
- XCOMM CCOPTIONS = -ansi -pedantic -Wall
- XCOMM CDEBUGFLAGS =
- XCOMM LDPOSTLIB =
-+CCOPTIONS = -O2 -pipe
-
- XCOMM ####################################################################
- XCOMM ##### Architecture specific settings
---- source/Ghostview.c
-+++ source/Ghostview.c 2006-02-28 15:49:27.000000000 +0100
-@@ -1325,7 +1325,15 @@
- }
- argv[argc++] = "-dNOPAUSE";
- if (gvw->ghostview.quiet) argv[argc++] = "-dQUIET";
-- if (gvw->ghostview.safer) argv[argc++] = "-dSAFER";
-+ if (gvw->ghostview.safer) {
-+ argv[argc++] = "-dSAFER";
+--- src/Ghostview.c
++++ src/Ghostview.c 2008-03-27 13:50:57.606662000 +0100
+@@ -1419,6 +1419,12 @@ StartInterpreter(w)
+ if (gvw->ghostview.safer)
+ {
+ argv[argc++] = "-dSAFER";
+# ifdef ALLOW_PDF
+ /* The file created by pdf2dsc opens the original
+ pdf file with the read operator. */
+ if (gv_filename_dsc && (!gvw->ghostview.filename || !strcmp(gvw->ghostview.filename,"-")))
-+ argv[argc++] = "-dDELAYSAFER";
-+ }
++ argv[argc++] = "-dDELAYSAFER";
+# endif
+ }
+
if (gvw->ghostview.arguments) {
- cptr = arguments = GV_XtNewString(gvw->ghostview.arguments);
- while (isspace(*cptr)) cptr++;
---- source/Imakefile
-+++ source/Imakefile 2006-02-28 15:49:27.000000000 +0100
-@@ -213,7 +213,7 @@
- #endif /* InstallProgram */
-
- MANDIR=$(GV_MANDIR)
--ComplexProgramTarget(gv)
-+ComplexProgramTargetNoMan(gv)
- InstallNonExec($(GV_SYSTEM_AD),$(GV_LIBDIR))
- InstallNonExec($(GV_USER_AD),$(GV_LIBDIR))
- InstallNonExec($(GV_CLASS_AD),$(GV_LIBDIR))
---- source/gv_misc_res.dat
-+++ source/gv_misc_res.dat 2006-02-28 15:49:27.000000000 +0100
-@@ -50,7 +50,7 @@
+--- src/Makefile.am
++++ src/Makefile.am 2008-03-27 17:36:23.280458747 +0100
+@@ -6,9 +6,9 @@
+
+ # File distribution
+ bin_PROGRAMS = gv
+-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat
++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat
+
+-appdefaultsdir = $(pkglibdir)
++appdefaultsdir = $(datadir)/X11/app-defaults
+
+ appdefaults_DATA = GV
+
+@@ -172,7 +172,7 @@ $(srcdir)/gv_user.ad : $(srcdir)/gv_user
+ @echo "! gv_user.ad" >> $(srcdir)/gv_user.ad
+ @echo "! User specific application defaults for gv" >> $(srcdir)/gv_user.ad
+ @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> $(srcdir)/gv_user.ad
+- @echo "! Copyright (C) 2004,2005,2006,2007 Jos� E. Marchesi" >> $(srcdir)/gv_user.ad
++ @echo "! Copyright (C) 2004,2005,2006,2007 Jose E. Marchesi" >> $(srcdir)/gv_user.ad
+ @echo "!" >> $(srcdir)/gv_user.ad
+ @cat $(srcdir)/gv_user_res.dat >> $(srcdir)/gv_user.ad
+ @cat $(srcdir)/gv_intern_res_unix.dat >> $(srcdir)/gv_user.ad
+@@ -215,7 +215,7 @@ $(srcdir)/gv_class.ad : $(srcdir)/gv_fon
+ @echo "! gv_class.ad" >> $(srcdir)/gv_class.ad
+ @echo "! Application class defaults for gv" >> $(srcdir)/gv_class.ad
+ @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> $(srcdir)/gv_class.ad
+- @echo "! Copyright (C) 2004,2005,2006,2007 Jos� E. Marchesi" >> $(srcdir)/gv_class.ad
++ @echo "! Copyright (C) 2004,2005,2006,2007 Jose E. Marchesi" >> $(srcdir)/gv_class.ad
+ @echo "!" >> $(srcdir)/gv_class.ad
+ @echo "" >> $(srcdir)/gv_class.ad
+ @cat $(srcdir)/gv_user_res.dat >> $(srcdir)/gv_class.ad
+@@ -236,7 +236,7 @@ $(srcdir)/gv_make_res.dat :
+ @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat
+ @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat
+- @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat
++ @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat
+ @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat
+--- src/gv_misc_res.dat
++++ src/gv_misc_res.dat 2006-02-28 15:49:27.000000000 +0100
+@@ -50,7 +50,7 @@ GV*Scrollbar.background: gray78
GV*Scrollbar.pointerColor: black
GV*Scrollbar.pointerColorBackground: White
GV*Scrollbar.scrollbarBackground: gray71
@@ -160,9 +124,9 @@
GV*optionsetupPopup*Text*Scrollbar.background:gray71
GV*optionfsPopup*Text*Scrollbar.background:gray71
---- source/misc.c
-+++ source/misc.c 2006-02-28 15:49:27.000000000 +0100
-@@ -1435,7 +1435,8 @@
+--- src/misc.c
++++ src/misc.c 2006-02-28 15:49:27.000000000 +0100
+@@ -1337,7 +1337,8 @@ set_new_orientation(pagenumber)
else if ( no == O_LANDSCAPE) w = landscapeEntry;
else if ( no == O_UPSIDEDOWN) w = upsidedownEntry;
else w = seascapeEntry;
@@ -172,7 +136,7 @@
if (gv_swap_landscape != gv_swap_landscape_old)
widgets_setSelectedBitmap(swapEntry,gv_swap_landscape);
-@@ -1467,12 +1468,15 @@
+@@ -1369,13 +1370,17 @@ set_pagemediaButton_label(media_id)
Widget w;
if (pagemediaEntry[media_id]) w = pagemediaEntry[media_id];
else w = pagemediaEntry[media_id-1];
@@ -186,9 +150,11 @@
XtSetValues(pagemediaButton, args, ONE);
+out:
ENDMESSAGE(set_pagemediaButton_label)
++ return;
}
-@@ -1541,7 +1545,8 @@
+ /*------------------------------------------------------------*/
+@@ -1443,7 +1448,8 @@ set_new_pagemedia(pagenumber)
else bitmap = app_res.selected_bitmap;
if (pagemediaEntry[gv_pagemedia]) w = pagemediaEntry[gv_pagemedia];
else w = pagemediaEntry[gv_pagemedia-1];
@@ -198,29 +164,14 @@
}
if (gv_pagemedia_auto != gv_pagemedia_auto_old) widgets_setSelectedBitmap(autoMediaEntry,gv_pagemedia_auto);
---- source/paths.h
-+++ source/paths.h 2006-02-28 15:49:27.000000000 +0100
-@@ -34,9 +34,9 @@
- # define INC_XMU(aaa)
- # define INC_XAW(aaa)
- #else
--# define INC_X11(aaa)
--# define INC_XMU(aaa)
--# define INC_XAW(aaa)
-+# define INC_X11(aaa)
-+# define INC_XMU(aaa)
-+# define INC_XAW(aaa)
+--- src/ps.c
++++ src/ps.c 2008-03-27 18:28:32.973306228 +0100
+@@ -75,6 +75,8 @@
+ #define BUFSIZ 1024
#endif
+ #include
++#include
++#include
- #endif /* _PATHS_H_ */
---- source/process.c
-+++ source/process.c 2006-02-28 15:50:00.000000000 +0100
-@@ -272,7 +272,7 @@
- pid = fork();
-
- if (pid == 0) { /* child */
-- char *argv[3];
-+ char *argv[4];
- char *c;
-
- INFMESSAGE(child process)
+ #include "paths.h"
+ #include INC_X11(Intrinsic.h)
++++++ gv-3.5.8-I18N-mb.patch -> gv-3.6.3-I18N-mb.patch ++++++
++++ 1142 lines (skipped)
++++ between gv/gv-3.5.8-I18N-mb.patch
++++ and /mounts/work_src_done/STABLE/gv/gv-3.6.3-I18N-mb.patch
++++++ gv-3.6.3-intptr_t.patch ++++++
--- src/FileSel.c
+++ src/FileSel.c 2008-03-27 17:10:04.806005718 +0100
@@ -40,6 +40,7 @@
#include /* for malloc etc.*/
#include /* for toupper */
#include
+#include
#include
#include
@@ -1045,9 +1046,9 @@ static void FS_listAction(w, event, para
if (!scrolling) {
int entry = VlistEntryOfPosition(list,(int)event->xbutton.y);
if (entry >=0 && entry < VlistEntries(list)) {
- if (list == FS_CURLIST) CurDirSelectionProc(list,NULL,(XtPointer)entry);
- else if (list == FS_SUBLIST) SubDirSelectionProc(list,NULL,(XtPointer)entry);
- else if (list == FS_TOPLIST) TopDirSelectionProc(list,NULL,(XtPointer)entry);
+ if (list == FS_CURLIST) CurDirSelectionProc(list,NULL,(XtPointer)(intptr_t)entry);
+ else if (list == FS_SUBLIST) SubDirSelectionProc(list,NULL,(XtPointer)(intptr_t)entry);
+ else if (list == FS_TOPLIST) TopDirSelectionProc(list,NULL,(XtPointer)(intptr_t)entry);
}
}
}
@@ -1660,7 +1661,7 @@ TopDirSelectionProc(w, client_data, call
XtPointer client_data, call_data;
{
FS_WIDGET XtParent(XtParent(XtParent(XtParent(w))));
- int item = (int) call_data;
+ intptr_t item = (intptr_t) call_data;
char newpath[FS_MAXNAMLEN];
BEGINMESSAGE(TopDirSelectionProc)
@@ -1706,7 +1707,7 @@ CurDirSelectionProc(w, client_data, call
{
FS_WIDGET XtParent(XtParent(XtParent(XtParent(w))));
char name[10];
- int item = (int) call_data;
+ intptr_t item = (intptr_t) call_data;
BEGINMESSAGE(CurDirSelectionProc)
@@ -1748,7 +1749,7 @@ SubDirSelectionProc(w, client_data, call
Widget w;
XtPointer client_data, call_data;
{
- int item = (int)call_data;
+ intptr_t item = (intptr_t)call_data;
FS_WIDGET XtParent(XtParent(XtParent(XtParent(w))));
char newpath[FS_MAXNAMLEN];
@@ -1845,14 +1846,14 @@ SMESSAGE(XtName(p))
{
Widget clip=NULL,aaa=NULL,scroll=NULL;
FS_WIDGET p;
- int style = (int)client_data;
+ intptr_t style = (intptr_t)client_data;
if (s[0] == 'c') { clip = FS_CURCLIP; aaa = FS_CURAAA; scroll = FS_CURSCROLL; }
else if (s[0] == 's') { clip = FS_SUBCLIP; aaa = FS_SUBAAA; scroll = FS_SUBSCROLL; }
else style=0;
if (style == SCROLL_SCROLLPROC || style == SCROLL_JUMPPROC) {
int x,y;
x = (int) aaa->core.x;
- if (((int)client_data)==1) y = (int) aaa->core.y - (int)call_data;
+ if (((intptr_t)client_data)==1) y = (int) aaa->core.y - (intptr_t)call_data;
else y = (int)(-*((float*)call_data) * aaa->core.height);
ClipWidgetSetCoordinates(clip, x, y);
} else if (style == SCROLL_CLIPREPORT) {
--- src/actions.c
+++ src/actions.c 2004-04-30 16:35:07.000000000 +0200
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#include "paths.h"
#include INC_X11(Intrinsic.h)
@@ -897,7 +898,7 @@ action_setPageMark(w, event, params, num
else if (!strcmp(params[1],mark)) spm=spm|SPM_MARK;
else spm=spm|SPM_UNMARK;
- cb_setPageMark((Widget)NULL,(XtPointer)spm,NULL);
+ cb_setPageMark((Widget)NULL,(XtPointer)(intptr_t)spm,NULL);
ENDMESSAGE(action_setPageMark)
}
@@ -945,7 +946,7 @@ action_setScale(w, event, params, num_pa
if (i<0) i = (-i)|SCALE_MIN;
i |= SCALE_REL;
}
- cb_setScale(w, (XtPointer)i, NULL);
+ cb_setScale(w, (XtPointer)(intptr_t)i, NULL);
ENDMESSAGE(action_setScale)
}
@@ -971,7 +972,7 @@ action_setOrientation(w, event, params,
return;
}
o = doc_convStringToDocOrient(params[0]);
- if (o != O_UNSPECIFIED) cb_setOrientation(w, (XtPointer)o, NULL);
+ if (o != O_UNSPECIFIED) cb_setOrientation(w, (XtPointer)(intptr_t)o, NULL);
ENDMESSAGE(action_setOrientation)
}
@@ -999,7 +1000,7 @@ action_setPagemedia(w, event, params, nu
}
m = doc_convStringToPageMedia(doc,params[0]);
- if (m!= MEDIA_ID_INVALID) cb_setPagemedia(w, (XtPointer)m, NULL);
+ if (m!= MEDIA_ID_INVALID) cb_setPagemedia(w, (XtPointer)(intptr_t)m, NULL);
ENDMESSAGE(action_setPagemedia)
}
--- src/callbacks.c
+++ src/callbacks.c 2008-03-27 17:13:48.466712393 +0100
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#ifndef BUFSIZ
# define BUFSIZ 1024
@@ -152,9 +153,9 @@ cb_newtocScrollbar(w, client_data, call_
BEGINMESSAGE(cb_newtocScrollbar)
x = (int) newtocControl->core.x;
- if (((int)client_data)==1) {
- int dy = (int)call_data;
- y = (int) newtocControl->core.y - dy;
+ if (((intptr_t)client_data)==1) {
+ intptr_t dy = (intptr_t)call_data;
+ y = (int)((intptr_t) newtocControl->core.y - dy);
} else {
float *percent = (float *) call_data;
y = (int)(-*percent * newtocControl->core.height);
@@ -262,7 +263,7 @@ void cb_useBackingPixmap(w, client_data,
Widget w;
XtPointer client_data, call_data;
{
- int i = (int)client_data;
+ intptr_t i = (intptr_t)client_data;
BEGINMESSAGE(cb_useBackingPixmap)
if (i&1) {
@@ -366,7 +367,7 @@ cb_checkFile(w, client_data, call_data)
int changed;
BEGINMESSAGE(cb_checkFile)
- changed = check_file(((int)client_data));
+ changed = check_file(((intptr_t)client_data));
if (changed==1)
{
cb_stopInterpreter(page,NULL,NULL);
@@ -392,7 +393,7 @@ static void watch_file (client_data, idp
BEGINMESSAGE(watch_file)
/* notification after timeout */
- if ((int)client_data && app_res.watch_file) {
+ if ((intptr_t)client_data && app_res.watch_file) {
if (!file_fileIsNotUseful(gv_filename)) {
int error;
String s;
@@ -509,7 +510,7 @@ cb_print(w, client_data, call_data)
return;
}
- gv_print_mode = (int)client_data;
+ gv_print_mode = (intptr_t)client_data;
pagelist=get_pagelist(&gv_print_mode);
if (pagelist) GV_XtFree(pagelist);
if (gv_print_mode==PAGE_MODE_INVALID) {
@@ -627,7 +628,7 @@ cb_save(w, client_data, call_data)
BEGINMESSAGE(cb_save)
- gv_save_mode = (int)client_data;
+ gv_save_mode = (intptr_t)client_data;
pagelist=get_pagelist(&gv_save_mode);
if (pagelist) GV_XtFree(pagelist);
if (gv_save_mode==PAGE_MODE_INVALID) {
@@ -708,10 +709,10 @@ cb_doSave(w, client_data, call_data)
String name;
String error=NULL;
char *pagelist;
- int type;
+ intptr_t type;
BEGINMESSAGE(cb_doSave)
- if (client_data) type = (int)client_data;
+ if (client_data) type = (intptr_t)client_data;
else type = FILE_TYPE_PS;
name = XawFileSelectionGetPath(FileSel);
@@ -932,7 +933,7 @@ cb_positionPage(w, client_data, call_dat
cow = (int)control->core.width;
coh = (int)control->core.height;
- if ((int)client_data) center = True;
+ if ((intptr_t)client_data) center = True;
if (!center) have_pagepos=misc_restorePagePosition(&px,&py);
if (app_res.auto_center == True) center = True;
@@ -973,7 +974,7 @@ cb_setPageMark(w, client_data, call_data
Widget w;
XtPointer client_data, call_data;
{
- int r=(int)client_data;
+ intptr_t r = (intptr_t)client_data;
int entry=XawVlistInvalid,change=XawVlistInvalid;
BEGINMESSAGE(cb_setPageMark)
@@ -1026,10 +1027,10 @@ cb_setScale(w, client_data, call_data)
Widget w;
XtPointer client_data, call_data;
{
- int i=(int)client_data;
+ intptr_t i=(intptr_t)client_data;
BEGINMESSAGE(cb_setScale)
- i = scale_checkScaleNum(gv_scales,i);
+ i = scale_checkScaleNum(gv_scales, (int)i);
if (i>=0) {
if (i&SCALE_BAS) gv_scale_base = i&SCALE_VAL;
else gv_scale = i&SCALE_VAL;
@@ -1051,7 +1052,7 @@ cb_setOrientation(w, client_data, call_d
Widget w;
XtPointer client_data, call_data;
{
- int o = (int) client_data;
+ intptr_t o = (intptr_t) client_data;
int changed = 1;
BEGINMESSAGE(cb_setOrientation)
@@ -1097,7 +1098,7 @@ cb_setPagemedia(w, client_data, call_dat
Widget w;
XtPointer client_data, call_data;
{
- int media = (int)client_data;
+ intptr_t media = (intptr_t)client_data;
int media_bbox = doc ? doc->nummedia : 0;
BEGINMESSAGE(cb_setPagemedia)
--- src/main.c
+++ src/main.c 2004-04-30 16:36:16.000000000 +0200
@@ -72,6 +72,8 @@
#include
#include
+#include
+
#include "types.h"
#include "actions.h"
#include "callbacks.h"
@@ -1349,8 +1351,8 @@ void main_createScaleMenu()
have_line=True;
}
scaleEntry[i] = XtCreateManagedWidget(gv_scales[i]->name, smeBSBObjectClass,scaleMenu,args,n);
- if (gv_scales[i]->is_base) XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(i|SCALE_BAS));
- else XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(i|SCALE_ABS));
+ if (gv_scales[i]->is_base) XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(intptr_t)(i|SCALE_BAS));
+ else XtAddCallback(scaleEntry[i], XtNcallback,cb_setScale,(XtPointer)(intptr_t)(i|SCALE_ABS));
}
ENDMESSAGE(main_createScaleMenu)
}
--- src/misc.c
+++ src/misc.c 2004-04-30 16:35:07.000000000 +0200
@@ -65,6 +65,7 @@
#include
#include
#include
+#include
#ifndef SEEK_SET
# define SEEK_SET 0
@@ -1555,7 +1556,7 @@ void misc_buildPagemediaMenu()
if (doc && doc->nummedia) {
for (i = 0; i < doc->nummedia; i++) {
pagemediaEntry[i] = XtCreateManagedWidget(doc->media[i].name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0);
- XtAddCallback(pagemediaEntry[i], XtNcallback,cb_setPagemedia, (XtPointer)i);
+ XtAddCallback(pagemediaEntry[i], XtNcallback,cb_setPagemedia, (XtPointer)(intptr_t)i);
}
w = XtCreateManagedWidget("line", smeLineObjectClass, pagemediaMenu,NULL,(Cardinal)0);
}
@@ -1565,7 +1566,7 @@ void misc_buildPagemediaMenu()
if (!(gv_medias[i]->used)) continue;
pagemediaEntry[i+num_doc_media] =
XtCreateManagedWidget(gv_medias[i]->name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0);
- XtAddCallback(pagemediaEntry[i+num_doc_media], XtNcallback,cb_setPagemedia, (XtPointer)(i+num_doc_media));
+ XtAddCallback(pagemediaEntry[i+num_doc_media], XtNcallback,cb_setPagemedia, (XtPointer)(intptr_t)(i+num_doc_media));
}
{
Boolean b = (doc_mediaIsOk(doc,current_page,num_doc_media) ? True : False);
--- src/options_gv.c
+++ src/options_gv.c 2004-04-30 16:35:07.000000000 +0200
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#include "paths.h"
#include INC_X11(Intrinsic.h)
@@ -252,7 +253,7 @@ static void options_gv_cb_apply(w, clien
k = gv_pagemedia;
gv_pagemedia_auto = 0;
i = doc_convStringToPageMedia(doc,app_res.default_pagemedia);
- cb_setPagemedia(NULL,(XtPointer)i,(XtPointer)1);
+ cb_setPagemedia(NULL,(XtPointer)(intptr_t)i,(XtPointer)(intptr_t)1);
if ((j != gv_pagemedia_auto) || (k != gv_pagemedia)) redisplay = True;
}
s_media = True;
@@ -277,7 +278,7 @@ static void options_gv_cb_apply(w, clien
j = gv_orientation_auto;
k = gv_orientation;
gv_orientation_auto = 0;
- cb_setOrientation(NULL,(XtPointer)i,(XtPointer)1);
+ cb_setOrientation(NULL,(XtPointer)(intptr_t)i,(XtPointer)(intptr_t)1);
if ((j != gv_orientation_auto) || (k != gv_orientation)) redisplay = True;
}
s_orient = True;
++++++ gv-3.5.8-security.patch -> gv-3.6.3-security.patch ++++++
--- gv/gv-3.5.8-security.patch 2002-11-08 12:09:05.000000000 +0100
+++ /mounts/work_src_done/STABLE/gv/gv-3.6.3-security.patch 2008-03-27 17:37:42.338602000 +0100
@@ -1,159 +1,402 @@
---- gv-3.5.8/source/Imakefile.security Fri Sep 20 13:54:53 2002
-+++ gv-3.5.8/source/Imakefile Fri Sep 20 13:55:18 2002
-@@ -63,6 +63,7 @@
- resource.c\
- save.c\
- scale.c\
-+ secscanf.c\
- signal.c\
- version.c\
- widgets_misc.c\
-@@ -106,6 +107,7 @@
- resource.o\
- save.o\
- scale.o\
-+ secscanf.o\
- signal.o\
- version.o\
- widgets_misc.o\
---- gv-3.5.8/source/ps.c.security Fri Sep 20 13:54:53 2002
-+++ gv-3.5.8/source/ps.c Fri Sep 20 13:54:53 2002
-@@ -93,6 +93,8 @@
+--- src/Makefile.am
++++ src/Makefile.am 2008-03-27 14:10:24.644359171 +0100
+@@ -123,6 +123,7 @@ gv_SOURCES = Aaa.c \
+ save.h \
+ scale.c \
+ scale.h \
++ secscanf.c \
+ gv_signal.c \
+ gv_signal.h \
+ version.c \
+--- src/Makefile.in
++++ src/Makefile.in 2008-03-27 14:18:31.898867989 +0100
+@@ -79,13 +79,13 @@ am__gv_SOURCES_DIST = Aaa.c Aaa_bison.c
+ options_gs.c options_gs.h options_gv.c options_gv.h \
+ options_setup.c options_setup.h paths.h process.c process.h \
+ popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \
+- scale.c scale.h gv_signal.c gv_signal.h version.c version.h \
+- versionp.h widgets_misc.c widgets_misc.h zoom.c zoom.h stdc.h \
+- Aaa_intern.h Aaa.h AaaP.h d_memdebug.h d_aaa_xtmem.h \
+- d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h d_proc_xtmem.h d_ps_mem.h \
+- d_ps_xtmem.h gv_message.h types.h Scrollbar.c Scrollbar.h \
+- ScrollbarP.h setenv.c setenv.h getenv.c d_mem.c d_mem.h \
+- d_xtmem.c d_xtmem.h
++ scale.c scale.h secscanf.c gv_signal.c gv_signal.h version.c \
++ version.h versionp.h widgets_misc.c widgets_misc.h zoom.c \
++ zoom.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \
++ d_aaa_xtmem.h d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h \
++ d_proc_xtmem.h d_ps_mem.h d_ps_xtmem.h gv_message.h types.h \
++ Scrollbar.c Scrollbar.h ScrollbarP.h setenv.c setenv.h \
++ getenv.c d_mem.c d_mem.h d_xtmem.c d_xtmem.h
+ @USE_SCROLLBAR_CODE_TRUE@am__objects_1 = Scrollbar.$(OBJEXT)
+ @USE_SETENV_CODE_TRUE@am__objects_2 = setenv.$(OBJEXT) \
+ @USE_SETENV_CODE_TRUE@ getenv.$(OBJEXT)
+@@ -103,9 +103,9 @@ am_gv_OBJECTS = Aaa.$(OBJEXT) Aaa_bison.
+ options_fs.$(OBJEXT) options_gs.$(OBJEXT) options_gv.$(OBJEXT) \
+ options_setup.$(OBJEXT) process.$(OBJEXT) popup.$(OBJEXT) \
+ ps.$(OBJEXT) resource.$(OBJEXT) save.$(OBJEXT) scale.$(OBJEXT) \
+- gv_signal.$(OBJEXT) version.$(OBJEXT) widgets_misc.$(OBJEXT) \
+- zoom.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+- $(am__objects_3)
++ secscanf.$(OBJEXT) gv_signal.$(OBJEXT) version.$(OBJEXT) \
++ widgets_misc.$(OBJEXT) zoom.$(OBJEXT) $(am__objects_1) \
++ $(am__objects_2) $(am__objects_3)
+ gv_OBJECTS = $(am_gv_OBJECTS)
+ gv_LDADD = $(LDADD)
+ gv_DEPENDENCIES = $(top_srcdir)/lib/libgnu.a
+@@ -261,8 +261,8 @@ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat
+-appdefaultsdir = /etc/X11/app-defaults
++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat
++appdefaultsdir = $(pkglibdir)
+ appdefaults_DATA = GV
+ EXTRA_DIST = ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \
+ gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \
+@@ -303,9 +303,9 @@ gv_SOURCES = Aaa.c Aaa_bison.c Aaa_bison
+ options_gs.c options_gs.h options_gv.c options_gv.h \
+ options_setup.c options_setup.h paths.h process.c process.h \
+ popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \
+- scale.c scale.h gv_signal.c gv_signal.h version.c version.h \
+- versionp.h widgets_misc.c widgets_misc.h zoom.c zoom.h \
+- message.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \
++ scale.c scale.h secscanf.c gv_signal.c gv_signal.h version.c \
++ version.h versionp.h widgets_misc.c widgets_misc.h zoom.c \
++ zoom.h message.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \
+ d_aaa_xtmem.h d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h \
+ d_proc_xtmem.h d_ps_mem.h d_ps_xtmem.h gv_message.h types.h \
+ $(am__append_1) $(am__append_2) $(am__append_3)
+@@ -436,6 +436,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secscanf.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgets_misc.Po@am__quote@
+@@ -746,7 +747,7 @@ $(srcdir)/gv_make_res.dat :
+ @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat
+ @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat
+- @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat
++ @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat
+ @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat
+ @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat
+--- src/ps.c
++++ src/ps.c 2008-03-27 14:20:04.186703895 +0100
+@@ -93,6 +93,10 @@ extern Media *gv_medias;
#define memset(a,b,c) bzero(a,c)
#endif
-+extern int sec_scanf(const char *, const char *, ...);
++extern int sec_sscanf(const char *, const char *, ...);
+
- /* length calculates string length at compile time */
- /* can only be used with character constants */
- #define length(a) (sizeof((a))-1)
-@@ -483,7 +485,7 @@
++
++
+ /* We use this helper function for providing proper */
+ /* case and colon :-) insensitive DSC matching */
+ static int dsc_strncmp(s1, s2, n)
+@@ -464,7 +468,7 @@ unc_ok:
doc = (struct document *) PS_malloc(sizeof(struct document));
CHECK_MALLOCED(doc);
memset(doc, 0, sizeof(struct document));
-- sscanf(line, "%*s %s", text);
-+ sec_sscanf(line, "%*s %s", text, sizeof(text));
+- sscanf(line, "%*s %256s", text);
++ sec_sscanf(line, "%*s %256s", text);
/*###jp###*/
/*doc->epsf = iscomment(text, "EPSF-");*/
doc->epsf = iscomment(text, "EPSF");
-@@ -576,7 +578,7 @@
+@@ -560,11 +564,11 @@ scan_ok:
} else if (doc->date == NULL && iscomment(line+2, "CreationDate:")) {
doc->date = gettextline(line+length("%%CreationDate:"));
} else if (bb_set == NONE && iscomment(line+2, "BoundingBox:")) {
-- sscanf(line+length("%%BoundingBox:"), "%s", text);
-+ sec_sscanf(line+length("%%BoundingBox:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%BoundingBox:"), "%256s", text);
++ sec_sscanf(line+length("%%BoundingBox:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
bb_set = ATEND;
} else {
-@@ -608,7 +610,7 @@
+- if (sscanf(line+length("%%BoundingBox:"), "%d %d %d %d",
++ if (sec_sscanf(line+length("%%BoundingBox:"), "%d %d %d %d",
+ &(doc->boundingbox[LLX]),
+ &(doc->boundingbox[LLY]),
+ &(doc->boundingbox[URX]),
+@@ -572,7 +576,7 @@ scan_ok:
+ bb_set = 1;
+ else {
+ float fllx, flly, furx, fury;
+- if (sscanf(line+length("%%BoundingBox:"), "%f %f %f %f",
++ if (sec_sscanf(line+length("%%BoundingBox:"), "%f %f %f %f",
+ &fllx, &flly, &furx, &fury) == 4) {
+ bb_set = 1;
+ doc->boundingbox[LLX] = fllx;
+@@ -592,7 +596,7 @@ scan_ok:
}
} else if (orientation_set == NONE &&
iscomment(line+2, "Orientation:")) {
-- sscanf(line+length("%%Orientation:"), "%s", text);
-+ sec_sscanf(line+length("%%Orientation:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%Orientation:"), "%256s", text);
++ sec_sscanf(line+length("%%Orientation:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
orientation_set = ATEND;
} else if (strcmp(text, "Portrait") == 0) {
-@@ -619,7 +621,7 @@
+@@ -603,7 +607,7 @@ scan_ok:
orientation_set = 1;
}
} else if (page_order_set == NONE && iscomment(line+2, "PageOrder:")) {
-- sscanf(line+length("%%PageOrder:"), "%s", text);
-+ sec_sscanf(line+length("%%PageOrder:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageOrder:"), "%256s", text);
++ sec_sscanf(line+length("%%PageOrder:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
page_order_set = ATEND;
} else if (strcmp(text, "Ascend") == 0) {
-@@ -633,7 +635,7 @@
+@@ -617,11 +621,11 @@ scan_ok:
page_order_set = 1;
}
} else if (pages_set == NONE && iscomment(line+2, "Pages:")) {
-- sscanf(line+length("%%Pages:"), "%s", text);
-+ sec_sscanf(line+length("%%Pages:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%Pages:"), "%256s", text);
++ sec_sscanf(line+length("%%Pages:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
pages_set = ATEND;
} else {
-@@ -853,7 +855,7 @@
+- switch (sscanf(line+length("%%Pages:"), "%d %d",
++ switch (sec_sscanf(line+length("%%Pages:"), "%d %d",
+ &maxpages, &i)) {
+ case 2:
+ if (page_order_set == NONE) {
+@@ -653,7 +657,7 @@ scan_ok:
+ doc->media[0].name = ps_gettext(line+length("%%DocumentMedia:"),
+ &next_char);
+ if (doc->media[0].name != NULL) {
+- if (sscanf(next_char, "%f %f", &w, &h) == 2) {
++ if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) {
+ doc->media[0].width = w + 0.5;
+ doc->media[0].height = h + 0.5;
+ }
+@@ -674,7 +678,7 @@ scan_ok:
+ doc->media[doc->nummedia].name = ps_gettext(line+length("%%+"),
+ &next_char);
+ if (doc->media[doc->nummedia].name != NULL) {
+- if (sscanf(next_char, "%f %f", &w, &h) == 2) {
++ if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) {
+ doc->media[doc->nummedia].width = w + 0.5;
+ doc->media[doc->nummedia].height = h + 0.5;
+ }
+@@ -837,7 +841,7 @@ scan_ok:
/* Do nothing */
} else if (doc->default_page_orientation == NONE &&
iscomment(line+2, "PageOrientation:")) {
-- sscanf(line+length("%%PageOrientation:"), "%s", text);
-+ sec_sscanf(line+length("%%PageOrientation:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageOrientation:"), "%256s", text);
++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text);
if (strcmp(text, "Portrait") == 0) {
doc->default_page_orientation = PORTRAIT;
} else if (strcmp(text, "Landscape") == 0) {
-@@ -975,7 +977,7 @@
+@@ -856,7 +860,7 @@ scan_ok:
+ PS_free(cp);
+ } else if (page_bb_set == NONE &&
+ iscomment(line+2, "PageBoundingBox:")) {
+- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
+ &(doc->default_page_boundingbox[LLX]),
+ &(doc->default_page_boundingbox[LLY]),
+ &(doc->default_page_boundingbox[URX]),
+@@ -864,7 +868,7 @@ scan_ok:
+ page_bb_set = 1;
+ else {
+ float fllx, flly, furx, fury;
+- if (sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f",
++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f",
+ &fllx, &flly, &furx, &fury) == 4) {
+ page_bb_set = 1;
+ doc->default_page_boundingbox[LLX] = fllx;
+@@ -959,7 +963,7 @@ scan_ok:
/* Do nothing */
} else if (doc->default_page_orientation == NONE &&
iscomment(line+2, "PageOrientation:")) {
-- sscanf(line+length("%%PageOrientation:"), "%s", text);
-+ sec_sscanf(line+length("%%PageOrientation:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageOrientation:"), "%256s", text);
++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text);
if (strcmp(text, "Portrait") == 0) {
doc->default_page_orientation = PORTRAIT;
} else if (strcmp(text, "Landscape") == 0) {
-@@ -1112,7 +1114,7 @@
+@@ -982,7 +986,7 @@ scan_ok:
+ PS_free(cp);
+ } else if (page_bb_set == NONE &&
+ iscomment(line+2, "PageBoundingBox:")) {
+- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
+ &(doc->default_page_boundingbox[LLX]),
+ &(doc->default_page_boundingbox[LLY]),
+ &(doc->default_page_boundingbox[URX]),
+@@ -990,7 +994,7 @@ scan_ok:
+ page_bb_set = 1;
+ else {
+ float fllx, flly, furx, fury;
+- if (sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f",
++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f",
+ &fllx, &flly, &furx, &fury) == 4) {
+ page_bb_set = 1;
+ doc->default_page_boundingbox[LLX] = fllx;
+@@ -1058,7 +1062,7 @@ newpage:
+ CHECK_MALLOCED(doc->pages);
+ }
+ label = ps_gettext(line+length("%%Page:"), &next_char);
+- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
+ if (nextpage == 1) {
+ ignore = thispage != 1;
+ }
+@@ -1096,7 +1100,7 @@ continuepage:
/* Do nothing */
} else if (doc->pages[doc->numpages].orientation == NONE &&
iscomment(line+2, "PageOrientation:")) {
-- sscanf(line+length("%%PageOrientation:"), "%s", text);
-+ sec_sscanf(line+length("%%PageOrientation:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageOrientation:"), "%256s", text);
++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text);
if (strcmp(text, "Portrait") == 0) {
doc->pages[doc->numpages].orientation = PORTRAIT;
} else if (strcmp(text, "Landscape") == 0) {
-@@ -1144,7 +1146,7 @@
+@@ -1128,11 +1132,11 @@ continuepage:
PS_free(cp);
} else if ((page_bb_set == NONE || page_bb_set == ATEND) &&
iscomment(line+2, "PageBoundingBox:")) {
-- sscanf(line+length("%%PageBoundingBox:"), "%s", text);
-+ sec_sscanf(line+length("%%PageBoundingBox:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageBoundingBox:"), "%256s", text);
++ sec_sscanf(line+length("%%PageBoundingBox:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
page_bb_set = ATEND;
} else {
-@@ -1258,14 +1260,14 @@
+- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d",
+ &(doc->pages[doc->numpages].boundingbox[LLX]),
+ &(doc->pages[doc->numpages].boundingbox[LLY]),
+ &(doc->pages[doc->numpages].boundingbox[URX]),
+@@ -1142,7 +1146,7 @@ continuepage:
+ }
+ else {
+ float fllx, flly, furx, fury;
+- if (sscanf(line+length("%%PageBoundingBox:"),
++ if (sec_sscanf(line+length("%%PageBoundingBox:"),
+ "%f %f %f %f",
+ &fllx, &flly, &furx, &fury) == 4) {
+ if (page_bb_set == NONE) page_bb_set = 1;
+@@ -1193,7 +1197,7 @@ continuepage:
+ /* Do nothing */
+ } else if (iscomment(line+2, "Page:")) {
+ PS_free(ps_gettext(line+length("%%Page:"), &next_char));
+- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
+ if (!ignore && thispage == nextpage) {
+ if (doc->numpages > 0) {
+ doc->pages[doc->numpages-1].end = position;
+@@ -1220,13 +1224,13 @@ continuepage:
+ doc->begintrailer = position;
+ section_len = line_len;
+ } else if (bb_set == ATEND && iscomment(line+2, "BoundingBox:")) {
+- if (sscanf(line+length("%%BoundingBox:"), "%d %d %d %d",
++ if (sec_sscanf(line+length("%%BoundingBox:"), "%d %d %d %d",
+ &(doc->boundingbox[LLX]),
+ &(doc->boundingbox[LLY]),
+ &(doc->boundingbox[URX]),
+ &(doc->boundingbox[URY])) != 4) {
+ float fllx, flly, furx, fury;
+- if (sscanf(line+length("%%BoundingBox:"), "%f %f %f %f",
++ if (sec_sscanf(line+length("%%BoundingBox:"), "%f %f %f %f",
+ &fllx, &flly, &furx, &fury) == 4) {
+ doc->boundingbox[LLX] = fllx;
+ doc->boundingbox[LLY] = flly;
+@@ -1244,14 +1248,14 @@ continuepage:
}
} else if (orientation_set == ATEND &&
iscomment(line+2, "Orientation:")) {
-- sscanf(line+length("%%Orientation:"), "%s", text);
-+ sec_sscanf(line+length("%%Orientation:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%Orientation:"), "%256s", text);
++ sec_sscanf(line+length("%%Orientation:"), "%256s", text);
if (strcmp(text, "Portrait") == 0) {
doc->orientation = PORTRAIT;
} else if (strcmp(text, "Landscape") == 0) {
doc->orientation = LANDSCAPE;
}
} else if (page_order_set == ATEND && iscomment(line+2, "PageOrder:")) {
-- sscanf(line+length("%%PageOrder:"), "%s", text);
-+ sec_sscanf(line+length("%%PageOrder:"), "%s", text, sizeof(text));
+- sscanf(line+length("%%PageOrder:"), "%256s", text);
++ sec_sscanf(line+length("%%PageOrder:"), "%256s", text);
if (strcmp(text, "Ascend") == 0) {
doc->pageorder = ASCEND;
} else if (strcmp(text, "Descend") == 0) {
-@@ -1819,7 +1821,7 @@
+@@ -1260,7 +1264,7 @@ continuepage:
+ doc->pageorder = SPECIAL;
+ }
+ } else if (pages_set == ATEND && iscomment(line+2, "Pages:")) {
+- if (sscanf(line+length("%%Pages:"), "%*u %d", &i) == 1) {
++ if (sec_sscanf(line+length("%%Pages:"), "%*u %d", &i) == 1) {
+ if (page_order_set == NONE) {
+ if (i == -1) doc->pageorder = DESCEND;
+ else if (i == 0) doc->pageorder = SPECIAL;
+@@ -1286,7 +1290,7 @@ continuepage:
+ preread = 0;
+ if (DSCcomment(line) && iscomment(line+2, "Page:")) {
+ PS_free(ps_gettext(line+length("%%Page:"), &next_char));
+- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0;
+ if (!ignore && thispage == nextpage) {
+ if (doc->numpages > 0) {
+ doc->pages[doc->numpages-1].end = position;
+@@ -1825,7 +1829,7 @@ static char * readline (fd, lineP, posit
INFMESSAGE(encountered "BeginData:")
if (FD_LINE_LEN > 100) FD_BUF[100] = '\0';
text[0] = '\0';
-- if (sscanf(line+length("%%BeginData:"), "%d %*s %s", &num, text) >= 1) {
-+ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %s", &num, text, sizeof(text)) >= 1) {
+- if (sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
++ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
if (strcmp(text, "Lines") == 0) {
INFIMESSAGE(number of lines to skip:,num)
while (num) {
-@@ -1918,7 +1920,7 @@
+@@ -1849,7 +1853,7 @@ static char * readline (fd, lineP, posit
+ else if IS_BEGIN("Binary:") {
+ int num;
+ INFMESSAGE(encountered "BeginBinary:")
+- if (sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) {
++ if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) {
+ int read_chunk_size = LINE_CHUNK_SIZE;
+ INFIMESSAGE(number of chars to skip:,num)
+ while (num>0) {
+@@ -1924,7 +1928,7 @@ pscopyuntil(fd, to, begin, end, comment)
INFMESSAGE(encountered "BeginData:")
if (FD_LINE_LEN > 100) FD_BUF[100] = '\0';
text[0] = '\0';
-- if (sscanf(line+length("%%BeginData:"), "%d %*s %s", &num, text) >= 1) {
-+ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %s", &num, text, sizeof(text)) >= 1) {
+- if (sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
++ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) {
if (strcmp(text, "Lines") == 0) {
INFIMESSAGE(number of lines:,num)
while (num) {
-@@ -2015,7 +2017,7 @@
+@@ -1947,7 +1951,7 @@ pscopyuntil(fd, to, begin, end, comment)
+ else if IS_BEGIN("Binary:") {
+ int num;
+ INFMESSAGE(encountered "BeginBinary:")
+- if (sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) {
++ if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) {
+ int read_chunk_size = LINE_CHUNK_SIZE;
+ INFIMESSAGE(number of chars:,num)
+ while (num>0) {
+@@ -2021,12 +2025,12 @@ pscopydoc(dest_file,src_filename,d,pagel
PS_free(comment);
continue;
}
-- sscanf(comment+length("%%Pages:"), "%s", text);
-+ sec_sscanf(comment+length("%%Pages:"), "%s", text, sizeof(text));
+- sscanf(comment+length("%%Pages:"), "%256s", text);
++ sec_sscanf(comment+length("%%Pages:"), "%256s", text);
if (strcmp(text, "(atend)") == 0) {
fputs(comment, dest_file);
pages_atend = True;
---- gv-3.5.8/source/secscanf.c.security Fri Sep 20 13:54:53 2002
-+++ gv-3.5.8/source/secscanf.c Fri Sep 20 13:54:53 2002
+ } else {
+- switch (sscanf(comment+length("%%Pages:"), "%*d %d", &i)) {
++ switch (sec_sscanf(comment+length("%%Pages:"), "%*d %d", &i)) {
+ case 1:
+ fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i);
+ break;
+@@ -2061,7 +2065,7 @@ pscopydoc(dest_file,src_filename,d,pagel
+ PS_free(comment);
+ continue;
+ }
+- switch (sscanf(comment+length("%%Pages:"), "%*d %d", &i)) {
++ switch (sec_sscanf(comment+length("%%Pages:"), "%*d %d", &i)) {
+ case 1:
+ fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i);
+ break;
+--- src/secscanf.c
++++ src/secscanf.c 2002-09-20 13:54:53.000000000 +0200
@@ -0,0 +1,540 @@
+/*
+ * Secure sscanf - sscanf with an additional size argument for string
++++++ gv-3.6.3-settitle.patch ++++++
--- src/callbacks.c
+++ src/callbacks.c 2004-04-30 22:59:01.000000000 +0200
@@ -62,6 +62,11 @@
#include
#include
+#include
+#include
+#include
+#include INC_X11(Xatom.h)
+
#include "types.h"
#include "actions.h"
#include "callbacks.h"
@@ -95,6 +100,82 @@ static char* open_directory = NULL;
/* cb_showTitle */
/*############################################################*/
+void setTitle ( Display* dpy, Window w, char* title, int icon);
+XTextProperty* char_to_xtp ( Display* dpy, char* s );
+
+void setTitle ( Display* dpy, Window w, char* title, int icon) {
+ char* from;
+ iconv_t cd;
+ char* inptr;
+ size_t insize;
+ char utf8title [4096];
+ char* outptr;
+ size_t outsize;
+ Atom net_wm_name;
+ Atom net_wm_icon_name;
+ Atom utf8_string;
+
+ net_wm_name = XInternAtom (dpy, "_NET_WM_NAME", False);
+ net_wm_icon_name = XInternAtom (dpy, "_NET_WM_ICON_NAME", False);
+ utf8_string = XInternAtom (dpy, "UTF8_STRING" ,False);
+
+ from = nl_langinfo (CODESET);
+ cd = iconv_open ("UTF-8",from);
+ inptr = title;
+ outptr = utf8title;
+ insize = strlen(title);
+ outsize = sizeof (utf8title);
+ memset (&utf8title, 0, sizeof(utf8title));
+ iconv (cd, &inptr, &insize, &outptr, &outsize);
+
+ if (icon) {
+ XSetWMIconName (
+ dpy, w, char_to_xtp (dpy,utf8title)
+ );
+ XChangeProperty (
+ dpy, w, net_wm_icon_name, utf8_string, 8,
+ PropModeReplace, (unsigned char *)utf8title,
+ strlen (utf8title)
+ );
+ } else {
+ XSetWMName (
+ dpy, w, char_to_xtp (dpy,utf8title)
+ );
+ XChangeProperty (
+ dpy, w, net_wm_name, utf8_string, 8,
+ PropModeReplace, (unsigned char *)utf8title,
+ strlen (utf8title)
+ );
+ }
+}
+
+XTextProperty* char_to_xtp ( Display* dpy, char* s ) {
+ static XTextProperty tp = { 0, 0, 0, 0 };
+ static int free_prop = True;
+ int errCode = 0;
+ char* tl[2];
+ if ( tp.value ) {
+ if ( free_prop ) {
+ XFree( tp.value );
+ }
+ tp.value = 0;
+ free_prop = True;
+ }
+ tl[0] = s;
+ tl[1] = 0;
+ errCode = XmbTextListToTextProperty (
+ dpy,tl, 1, XStdICCTextStyle, &tp
+ );
+ if ( errCode < 0 ) {
+ tp.value = (unsigned char*)s;
+ tp.encoding = XA_STRING;
+ tp.format = 8;
+ tp.nitems = strlen (s);
+ free_prop = False;
+ }
+ return &tp;
+}
+
void
cb_showTitle(w, client_data, call_data)
Widget w;
@@ -124,6 +205,8 @@ cb_showTitle(w, client_data, call_data)
} else {
t = s = GV_XtNewString(versionIdentification[0]);
}
+ if (w && XtWindow(w)) setTitle(gv_display, XtWindow(w), s, 0);
+ if (w && XtWindow(w)) setTitle(gv_display, XtWindow(w), t, 1);
n=0;
XtSetArg(args[n], XtNtitle, s); n++;
XtSetArg(args[n], XtNiconName, t); n++;
--- src/main.c
+++ src/main.c 2004-04-30 22:50:21.000000000 +0200
@@ -1226,6 +1226,7 @@ int main(argc, argv)
INFMESSAGE(mapping toplevel)
XtMapWidget(toplevel);
+ cb_showTitle(toplevel, NULL, NULL);
}
INFMESSAGE(waiting for events now)
--- src/misc.c
+++ src/misc.c 2008-03-27 17:16:44.877346759 +0100
@@ -932,7 +932,7 @@ setup_ghostview()
gv_pagemedia = m;
}
}
- cb_showTitle(NULL,NULL,NULL);
+ cb_showTitle(toplevel,NULL,NULL);
if (show_date) {
if (doc && doc->date) {
++++++ gv-3.5.8.tar.bz2 -> gv-3.6.3.tar.bz2 ++++++
++++ 114046 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org