commit 7c73a9fe6ea00be551cc5387ec044a6985fa0f098b58325bffba462d7bb9e225 Author: OBS User unknown Date: Mon Jan 15 23:16:17 2007 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gv?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/gv-3.5.8-I18N-mb.patch b/gv-3.5.8-I18N-mb.patch new file mode 100644 index 0000000..b1c8158 --- /dev/null +++ b/gv-3.5.8-I18N-mb.patch @@ -0,0 +1,828 @@ +diff -Nru gv-3.5.8.orig/README.I18N gv-3.5.8/README.I18N +--- gv-3.5.8.orig/README.I18N 1970-01-01 01:00:00.000000000 +0100 ++++ gv-3.5.8/README.I18N 2005-05-23 19:45:33.000000000 +0200 +@@ -0,0 +1,28 @@ ++GV I18N Fontset Patch for Japanese ++ Keio University in Japan ++ 1998 Yasuyuki Furukawa ++ ++This patch make gv to support Japanese NLS. ++ ++ if you can not see Japanese GV, please install ++ 10/12pt kanji fonts to X Window System, or edit ++ file `$(SRC)/source/gv_font_res-I18N_mb.dat' and ++ recompile. ++ ++NEED: ++ Xaw3d 1.4, 1.5 has a fatal bug in MultiSrc.c line 735-740. ++ This GV's patch need Xaw3d library patched follow: ++ ++diff -Ncr xc/lib/Xaw3d/MultiSrc.c xc-fix/lib/Xaw3d/MultiSrc.c ++*** xc/lib/Xaw3d/MultiSrc.c Fri May 15 04:03:23 1998 ++--- xc-fix/lib/Xaw3d/MultiSrc.c Fri Dec 18 09:59:52 1998 ++*** 735,740 **** ++--- 735,741 ---- ++ ++ if ( string_set || (old_src->multi_src.type != src->multi_src.type) ) { ++ RemoveOldStringOrFile(old_src, string_set); +++ src->multi_src.allocated_string = old_src->multi_src.allocated_string; ++ file = InitStringOrFile(src, string_set); ++ ++ /* Load pieces does this logic for us, but it shouldn't. Its messy.*/ ++ +diff -Nru gv-3.5.8.orig/config.Unix gv-3.5.8/config.Unix +--- gv-3.5.8.orig/config.Unix 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8/config.Unix 2005-05-23 19:45:33.000000000 +0200 +@@ -115,6 +115,13 @@ + #endif + + XCOMM -------------------------------------------------------------------- ++XCOMM --- Fontset support for I18N (multibyte charactor) ++XCOMM -------------------------------------------------------------------- ++#define I18N_MB ++#define NLS ++LINGUAS = ja_JP.eucJP ++ ++XCOMM -------------------------------------------------------------------- + XCOMM --- Compiler flags. + XCOMM -------------------------------------------------------------------- + XCOMM CC = gcc +diff -Nru gv-3.5.8.orig/source/Imakefile gv-3.5.8/source/Imakefile +--- gv-3.5.8.orig/source/Imakefile 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/Imakefile 2005-05-23 19:45:33.000000000 +0200 +@@ -154,12 +154,19 @@ + USER_DEFS_9 = -DUSE_FALLBACK_STYLES + #endif + ++#ifdef I18N_MB ++ I18NMB = -I18N_mb ++ I18N_DEFS = -DI18N_MB ++#else ++#undef NLS ++#endif ++ + SYS_LIBS_1 = -lm XawClientLibs + + USER_DEFINES = $(USER_DEFS_0) $(USER_DEFS_1) $(USER_DEFS_2) $(USER_DEFS_3)\ + $(USER_DEFS_4) $(USER_DEFS_5) $(USER_DEFS_6) $(USER_DEFS_7)\ + $(USER_DEFS_8) $(USER_DEFS_9) $(USER_DEFS_10) $(USER_DEFS_11)\ +- $(USER_DEFS_12) $(USER_DEFS_13) $(USER_DEFS_14) $(USER_DEFS_15) ++ $(USER_DEFS_12) $(USER_DEFS_13) $(USER_DEFS_14) $(USER_DEFS_15) $(I18N_DEFS) + SRCS = $(SRCS_0) $(SRCS_1) $(SRCS_2) $(SRCS_3) $(SRCS_4) $(SRCS_5)\ + $(SRCS_6) $(SRCS_7) $(SRCS_8) $(SRCS_9) $(SRCS_10) $(SRCS_11)\ + $(SRCS_12) $(SRCS_13) $(SRCS_14) $(SRCS_15) +@@ -175,7 +182,11 @@ + DEPLIBS = XawClientDepLibs + INSTDATFLAGS = -m 0644 + ++#ifdef I18N_MB ++GV_FONT_RES_DAT = gv_font_res-I18N_mb.dat ++#else + GV_FONT_RES_DAT = gv_font_res.dat ++#endif + GV_MAKE_RES_DAT = gv_make_res.dat + GV_MISC_RES_DAT = gv_misc_res.dat + GV_USER_RES_DAT = gv_user_res.dat +@@ -216,6 +227,26 @@ + InstallNonExec($(GV_USER_AD),$(GV_LIBDIR)) + InstallNonExec($(GV_CLASS_AD),$(GV_LIBDIR)) + InstallAppDefaults($(GV_CLASS_NAME)) ++ ++#ifdef NLS ++install:: $(GV_SYSTEM_AD) ++ @for LNG in $(LINGUAS);do \ ++ [ -f gv_nls_$$LNG.dat ] || continue; \ ++ cat $(GV_SYSTEM_AD) > GV_$$LNG.ad; \ ++ cat gv_nls_$$LNG.dat >> GV_$$LNG.ad; \ ++ [ -d $(DESTDIR)$(SHAREDIR)/$$LNG/app-defaults ] || \ ++ $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)/$$LNG/app-defaults; \ ++ $(INSTALL) $(INSTALLFLAGS) \ ++ GV_$$LNG.ad $(DESTDIR)$(SHAREDIR)/$$LNG/app-defaults/GV; \ ++ done ++ ++clean:: ++ @for LNG in $(LINGUAS);do \ ++ [ -f GV_$$LNG.ad ] && rm -f GV_$$LNG.ad; \ ++ done ++ ++#endif ++ + #ifndef USE_FALLBACK_STYLES + InstallNonExec($(GV_STYLE_1_DAT),$(GV_LIBDIR)) + #endif +diff -Nru gv-3.5.8.orig/source/Vlist.c gv-3.5.8/source/Vlist.c +--- gv-3.5.8.orig/source/Vlist.c 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/Vlist.c 2005-05-23 19:45:33.000000000 +0200 +@@ -317,12 +317,21 @@ + if (s) { + char *nl = strchr(s,'\n'); + if (nl) *nl = '\0'; ++#ifdef I18N_MB ++ XmbDrawString(XtDisplay(w), XtWindow(w), ++ vw->label.fontset, vw->label.normal_GC, ++ vw->label.label_x, ++ vw->label.label_y+entry*vw->label.label_height/vw->vlist.entries ++ - XExtentsOfFontSet(vw->label.fontset)->max_logical_extent.y +1, ++ s, (int)strlen(s)); ++#else + XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC, + vw->label.label_x, + vw->label.label_y+entry*(vw->label.font->max_bounds.ascent + + vw->label.font->max_bounds.descent) + + vw->label.font->max_bounds.ascent, + s, (int)strlen(s)); ++#endif + if (nl) *nl = '\n'; + } + ENDMESSAGE1(PaintEntryString) +diff -Nru gv-3.5.8.orig/source/callbacks.c gv-3.5.8/source/callbacks.c +--- gv-3.5.8.orig/source/callbacks.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/callbacks.c 2005-05-23 19:45:33.000000000 +0200 +@@ -764,12 +764,6 @@ + BEGINMESSAGE(cb_openFile) + + XawFileSelectionRemoveButton(FileSel, 3); +- n=0; +- XtSetArg(args[n], XtNtitle, "Open File"); ++n; +- XtSetValues(FileSel_popup, args, n); +- n=0; +- XtSetArg(args[n], XtNlabel, "Open File"); ++n; +- XtSetValues(button, args, n); + XtRemoveAllCallbacks(button, XtNcallback); + XtAddCallback(button, XtNcallback,cb_doOpenFile,NULL); + +diff -Nru gv-3.5.8.orig/source/dialog.c gv-3.5.8/source/dialog.c +--- gv-3.5.8.orig/source/dialog.c 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/dialog.c 2005-05-23 19:45:33.000000000 +0200 +@@ -271,7 +271,11 @@ + # define DIALOG_POPUP_TEXT_MIN_WIDTH 100 + String os; + Dimension lm,rm,bw,nw; ++#ifdef I18N_MB ++ XFontSet fontset; ++#else + XFontStruct *font; ++#endif + + BEGINMESSAGE(DialogPopupSetText) + if (!s) {INFMESSAGE(no text) ENDMESSAGE(DialogPopupSetText) return;} +@@ -279,7 +283,11 @@ + response = XtNameToWidget(DIALOG_POPUP, "*dialog_text"); + + n=0; ++#ifdef I18N_MB ++ XtSetArg(args[n], XtNfontSet, &fontset); n++; ++#else + XtSetArg(args[n], XtNfont, &font); n++; ++#endif + XtSetArg(args[n], XtNleftMargin, &lm); n++; + XtSetArg(args[n], XtNrightMargin, &rm); n++; + XtSetArg(args[n], XtNborderWidth, &bw); n++; +@@ -287,8 +295,13 @@ + XtSetArg(args[n], XtNwidth, &width); n++; + XtGetValues(response, args, n); + n=0; ++#ifdef I18N_MB ++ nw= XmbTextEscapement( fontset, s, strlen(s)) ++#else + nw= ((font->max_bounds.width+font->min_bounds.width)*((Dimension)strlen(s))+1)/2 ++#endif + +lm+rm+DIALOG_POPUP_FREE_SPACE+2*bw; ++ + if (nwwidth) { + INFIMESSAGE(new width,nw) +diff -Nru gv-3.5.8.orig/source/gv_font_res-I18N_mb.dat gv-3.5.8/source/gv_font_res-I18N_mb.dat +--- gv-3.5.8.orig/source/gv_font_res-I18N_mb.dat 1970-01-01 01:00:00.000000000 +0100 ++++ gv-3.5.8/source/gv_font_res-I18N_mb.dat 2005-05-23 19:46:28.000000000 +0200 +@@ -0,0 +1,52 @@ ++ ++!########## gv_font_res_linux.dat ++GV*international: True ++ ++!##### Fonts ++ ++GV*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*SmeBSB.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.processButton.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.Button*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.locator*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.dateButton*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.titleButton*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.prevPage*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV.?.nextPage*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*newtoc.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*button1.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*button2.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*button3.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*button4.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*fileSel*pathtext*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionsetupPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionsetupPopup*confirmButton.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionsetupPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionsetupPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionsetupPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongvPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongvPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongvPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongvPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionfsPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionfsPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionfsPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optionfsPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongsPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongsPopup*Switch*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongsPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*optiongsPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*dialogPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*dialogPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*dialogPopup*message*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*notePopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*notePopup*message*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*confirmPopup*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*confirmPopup*Button.fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*versionPopup*Label*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*versionPopup*versionTexta*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*versionPopup*versionTextb*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* ++GV*infoPopup*Text*fontSet: -efont-biwidth-medium-r-normal--16-*-*-*-*-*-iso10646-1,-gnu-unifont-medium-r-normal--16-*-*-*-*-*-iso10646-1,-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*,-jis-fixed-medium-r-*--16-*-*-*-*-*-jisx0208.1983-0,-*-*-medium-r-*--16-*-*-*-*-*-*-*,* +diff -Nru gv-3.5.8.orig/source/gv_misc_res.dat gv-3.5.8/source/gv_misc_res.dat +--- gv-3.5.8.orig/source/gv_misc_res.dat 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/gv_misc_res.dat 2005-05-23 19:45:33.000000000 +0200 +@@ -220,6 +220,10 @@ + GV*optionsetupPopup*mediasFrame.forcedWidth: 240 + GV*optionsetupPopup*mediasFrame.forcedHeight: 400 + ++!##### FileSet Popup ++ ++GV*fileSelPopup.title: Open File ++ + !##### Panner + + GV*pannerFrame.frameType: sunken +@@ -317,6 +321,7 @@ + GV*filters.label: Filters: + GV*dirs.label: Directories + GV*button1.label: Cancel ++GV*button2.label: Open File + GV*rescan.label: Rescan Directory + GV*screenSizeLabel.label: Screen Size (mm) + +diff -Nru gv-3.5.8.orig/source/gv_nls_ja_JP.eucJP.dat gv-3.5.8/source/gv_nls_ja_JP.eucJP.dat +--- gv-3.5.8.orig/source/gv_nls_ja_JP.eucJP.dat 1970-01-01 01:00:00.000000000 +0100 ++++ gv-3.5.8/source/gv_nls_ja_JP.eucJP.dat 2005-05-23 19:45:33.000000000 +0200 +@@ -0,0 +1,202 @@ ++! ++!** Copyright (C) 1995, 1996, 1997 Johannes Plass ++! ++! 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 ++! the Free Software Foundation; either version 2 of the License, or ++! (at your option) any later version. ++! ++! This program is distributed in the hope that it will be useful, ++! but WITHOUT ANY WARRANTY; without even the implied warranty of ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++! GNU General Public License for more details. ++! ++! You should have received a copy of the GNU General Public License ++! along with this program; if not, write to the Free Software ++! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++! ++! Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ++! Department of Physics ++! Johannes Gutenberg-University ++! Mainz, Germany ++! ++! ++! gv_ja_JP.eucJP.ad ++! Japanese NLS label for gv by ++! 1998 Yasuyuki Furukawa (yasu@on.cs.keio.ac.jp) ++! ++ ++ ++!##### Zoom Popup ++ ++GV*zoomPopup.title: GV - ³ÈÂç²èÌÌ ++ ++!##### Info Popup ++ ++GV*infoPopup.title: GhostScript¥á¥Ã¥»¡¼¥¸ ++ ++!##### Dialog Popup ++ ++GV*dialogPopup.title: ¥À¥¤¥¢¥í¥° ++ ++!##### Note Popup ++ ++GV*notePopup.title: ¥á¥Ã¥»¡¼¥¸ ++ ++!##### Confirm Popup ++ ++GV*confirmPopup.title: ³Îǧ ++ ++!##### OptionsSetup Popup ++ ++GV*optionfsPopup.title: ¥Õ¥¡¥¤¥ëÁªÂò¥ª¥×¥·¥ç¥ó ++ ++!##### OptionsGS Popup ++ ++GV*optiongsPopup.title: Ghostscript¥ª¥×¥·¥ç¥ó ++ ++!##### OptionsGV Popup ++ ++GV*optiongvPopup.title: GV¥ª¥×¥·¥ç¥ó ++ ++!##### OptionsSetup Popup ++ ++GV*optionsetupPopup.title: ¥»¥Ã¥È¥¢¥Ã¥×¥ª¥×¥·¥ç¥ó ++ ++!##### FileSet Popup ++ ++GV*fileSelPopup.title: ¥Õ¥¡¥¤¥ë¤ò³«¤¯ ++ ++!################################################ ++!##### Labels ++!################################################ ++ ++GV*cancel.Label: ¥­¥ã¥ó¥»¥ë ++GV*dismiss.Label: ÊĤ¸¤ë ++GV*apply.label: ŬÍÑ ++GV*copyright.Label: Ãøºî¸¢ ++GV*quit.Label: ½ªÎ» ++GV*fileButton.Label: ¥Õ¥¡¥¤¥ë ++GV*open.Label: ³«¤¯ ... ++GV*reopen.Label: ºÆ¥ª¡¼¥×¥ó ++GV*update.Label: ¹¹¿· ++GV*printAllPages.Label: ʸ¾Ï°õºþ ... ++GV*printMarkedPages.Label: ¥Þ¡¼¥¯¤·¤¿¥Ú¡¼¥¸¤Î°õºþ... ++GV*saveAllPages.Label: ʸ¾ÏÊݸ ... ++GV*saveMarkedPages.Label: ¥Þ¡¼¥¯¤·¤¿¥Ú¡¼¥¸¤ÎÊݸ... ++GV*stateButton.Label: ´Ä¶­ÀßÄê ++GV*stop.Label: ³ä¤ê¹þ¤ßÄä»ß ++GV*dsc.Label: ʸ½ñ¹½Â¤¤Ë¤è¤ë¥¹¥Ú¥¯¥ÈÄ´À° ++GV*eof.Label: EOF¥³¥á¥ó¥È¤ò̵»ë ++GV*antialias.Label: ¥¢¥ó¥Á¥¨¥¤¥ê¥¢¥¹ ++GV*watchFile.Label: ¼«Æ°¥Õ¥¡¥¤¥ë¹¹¿· ++GV*showTitle.Label: ¥¿¥¤¥È¥ëɽ¼¨ ++GV*pixmap.Label: Backing Pixmap ++GV*size.Label: ¼«Æ°¥µ¥¤¥ºÊѹ¹ ++GV*watch.Label: ¼«Æ°¥Õ¥¡¥¤¥ë¹¹¿· ++GV*optionsgv.Label: GV¥ª¥×¥·¥ç¥ó... ++GV*optionsfs.Label: ¥Õ¥¡¥¤¥ëÁªÂò¥ª¥×¥·¥ç¥ó... ++GV*optionsgs.Label: Ghostscript¥ª¥×¥·¥ç¥ó... ++GV*optionssetup.Label: ¥»¥Ã¥È¥¢¥Ã¥×¥ª¥×¥·¥ç¥ó... ++GV*pageButton.Label: ¥Ú¡¼¥¸ ++GV*next.Label: ¼¡¤Ø ++GV*show.Label: ºÆɽ¼¨ ++GV*prev.Label: Á°¤Ø ++GV*center.Label: Ãæ±û ++GV*pageButton*current.Label: ¸½ºß¤Î¥Ú¡¼¥¸¤ò¥Þ¡¼¥¯/²ò½ü ++GV*pageButton*even.Label: ¶ö¿ô¥Ú¡¼¥¸¤ò¥Þ¡¼¥¯/²ò½ü ++GV*pageButton*odd.Label: ´ñ¿ô¥Ú¡¼¥¸¤ò¥Þ¡¼¥¯/²ò½ü ++GV*pageButton*unmark.Label: Á´¥Þ¡¼¥¯²ò½ü ++GV*processButton.Label: \ ¼Â¹Ô ++GV*mark.Label: ¥Þ¡¼¥¯ ++GV*prevPage.Label: << ++GV*nextPage.Label: >> ++GV*unmark.Label: ¥Þ¡¼¥¯²ò½ü ++GV*automatic.Label: ¼«Æ° ++GV*portrait.Label: ¥Ý¡¼¥È¥ì¡¼¥È ++GV*landscape.Label: ¥é¥ó¥É¥¹¥±¡¼¥× ++GV*upsidedown.Label: ¾å²¼È¿Å¾ ++GV*seascape.Label: µÕ¥é¥ó¥É¥¹¥±¡¼¥× ++GV*swap.Label: ¥é¥ó¥É¥¹¥±¡¼¥×ÊÑ´¹ ++GV*toggleCurrent.label: ¸½ºß¤Î¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*toggleEven.label: ¶ö¿ô¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*toggleOdd.label: ´ñ¿ô¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*unmarkAll.label: Á´¥Þ¡¼¥¯²ò½ü ++GV*printAll.label: Á´°õºþ ++GV*printMarked.label: ¥Þ¡¼¥¯Éôʬ°õºþ ++GV*saveAll.label: Á´Êݸ ++GV*saveMarked.label: ¥Þ¡¼¥¯ÉôʬÊݸ ++GV*openFile.label: ³«¤¯ ++GV*redisplay.label: ºÆɽ¼¨ ++GV*updateFile.label: ¥Õ¥¡¥¤¥ë¹¹¿· ++GV*checkFile.label: ¥Õ¥¡¥¤¥ë¥Á¥§¥Ã¥¯ ++ ++GV*filters.label: ¥Õ¥£¥ë¥¿: ++GV*dirs.label: ¥Ç¥£¥ì¥¯¥È¥ê ++GV*button1.label: ¥­¥ã¥ó¥»¥ë ++GV*button2.label: ¥Õ¥¡¥¤¥ë¤ò³«¤¯ ++GV*rescan.label: ¥Ç¥£¥ì¥¯¥È¥êºÆÆɹþ ++GV*screenSizeLabel.label: ²èÌÌ¥µ¥¤¥º[mm] ++ ++GV*versionPopup*versionDone*label: ÊĤ¸¤ë ++GV*dialogPopup*cancel.label: ¥­¥ã¥ó¥»¥ë ++GV*notePopup*done.label: λ²ò ++ ++GV*confirmPopup*cancel.label: ¥­¥ã¥ó¥»¥ë ++GV*confirmPopup*done.label: ½ªÎ» ++GV*save.label: Êݸ ++ ++GV*optiongvPopup*mediaLabel.label: \ Íѻ極¥¤¥º \ ++GV*optiongvPopup*fmediaLabel.label: ȽÊÌÉÔÌÀ»þ¤ÎÍѻ極¥¤¥º ++GV*optiongvPopup*orientLabel.label: \ ÍÑ»æ¤Î¸þ¤­ \ ++GV*optiongvPopup*forientLabel.label: ȽÊÌÉÔÌÀ»þ¤ÎÍÑ»æ¸þ¤­ ++GV*optiongvPopup*magLabel.label: ³ÈÂç½Ì¾® ++GV*optiongvPopup*antialias.label: ¥¢¥ó¥Á¥¨¥¤¥ê¥¢¥¹ ++GV*optiongvPopup*respectDSC.label: DSC¤òÍ­¸ú ++GV*optiongvPopup*eof.label: EOF¤ò̵»ë ++GV*optiongvPopup*autoResize.label: ²ÄÊÑ¥µ¥¤¥º ++GV*optiongvPopup*swapLandscape.label: ¥é¥ó¥É¥¹¥±¡¼¥×ÊÑ´¹ ++GV*optiongvPopup*scalesLabel.label: \ ¥¹¥±¡¼¥ë \ ++ ++GV*miscmenuLabel.label: ¤½¤Î¾¥á¥Ë¥å¡¼¥¨¥ó¥È¥ê ++GV*magmenuLabel.label: ³ÈÂç¥á¥Ë¥å¡¼¥¨¥ó¥È¥ê ++GV*mediasLabel.label: ¥á¥Ç¥£¥¢¤ÎÂ礭¤µ ++GV*confirmLabel.label: ½ªÎ»»þ¤Î³Îǧ ++GV*misc.label: ¤½¤Î¾ ++GV*scrolling.label: ¥¹¥¯¥í¡¼¥ëȿž ++GV*eyeGuide.label: ¥¹¥¯¥í¡¼¥ë¥¬¥¤¥É ++GV*confirmPrint.label: °õºþ»þ¤Î³Îǧ ++GV*uncompressLabel.label: °µ½ÌŸ³« ++GV*autoCenter.label: ¼«Æ°Åª¤ËÃæ±û¤Ø ++GV*printCommandLabel.label: °õºþ¥³¥Þ¥ó¥É ++GV*scratchDirLabel.label: ¥¹¥¯¥é¥Ã¥Á¥Ç¥£¥ì¥¯¥È¥ê ++GV*saveDirLabel.label: Êݸ¥Ç¥£¥ì¥¯¥È¥ê ++GV*scalesLabel.label: ¥¹¥±¡¼¥ë ++GV*scaleBaseLabel.label: ¥¹¥±¡¼¥ë¥Ù¡¼¥¹ ++ ++GV*safer.label: ¤è¤ê°ÂÁ´¤Ë ++GV*quiet.label: ½ªÎ» ++GV*defaults.label: ¥·¥¹¥Æ¥àɸ½àÃÍ ++GV*scanLabel.label: PDFÆɤ߹þ¤ß ++GV*convLabel.label: PDFÊÑ´¹ ++GV*gsLabel.label: Postscript¥¨¥ó¥¸¥ó ++GV*x11devLabel.label: ¥Ç¥Ð¥¤¥¹ ++GV*x11alphadevLabel.label: ¥¢¥ó¥Á¥¨¥¤¥ê¥¢¥¹¥Ç¥Ð¥¤¥¹ ++GV*argumentsLabel.label: °ú¿ô ++ ++GV*filtersLabel.label: ¥Õ¥¡¥¤¥ëÁªÂò¥Õ¥£¥ë¥¿ ++GV*dirsLabel.label: ¥Õ¥¡¥¤¥ëÁªÂò¥Ç¥£¥ì¥¯¥È¥ê ++GV*filterLabel.label: ɸ½à¥Õ¥£¥ë¥¿ ++ ++GV*miscMenu.update.label: ¥Õ¥¡¥¤¥ë¹¹¿· ++GV*miscMenu.redisplay.label: ºÆɽ¼¨ ++GV*miscMenu.stop.label: ³ä¤ê¹þ¤ßÄä»ß ++GV*miscMenu.toggle_current.label: ¸½ºß¤Î¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*miscMenu.toggle_odd.label: ´ñ¿ô¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*miscMenu.toggle_even.label: ¶ö¿ô¥Ú¡¼¥¸¥Þ¡¼¥¯/²ò½ü ++GV*miscMenu.unmark.label: Á´¥Þ¡¼¥¯²ò½ü ++GV*miscMenu.print_all.label: Á´°õºþ ++GV*miscMenu.print_marked.label: ¥Þ¡¼¥¯Éôʬ°õºþ ++GV*miscMenu.save_all.label: Á´Êݸ ++GV*miscMenu.save_marked.label: ¥Þ¡¼¥¯ÉôʬÊݸ ++ +diff -Nru gv-3.5.8.orig/source/gv_nls_ko.dat gv-3.5.8/source/gv_nls_ko.dat +--- gv-3.5.8.orig/source/gv_nls_ko.dat 1970-01-01 01:00:00.000000000 +0100 ++++ gv-3.5.8/source/gv_nls_ko.dat 2005-05-23 19:45:33.000000000 +0200 +@@ -0,0 +1,202 @@ ++! ++!** Copyright (C) 1995, 1996, 1997 Johannes Plass ++! ++! 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 ++! the Free Software Foundation; either version 2 of the License, or ++! (at your option) any later version. ++! ++! This program is distributed in the hope that it will be useful, ++! but WITHOUT ANY WARRANTY; without even the implied warranty of ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++! GNU General Public License for more details. ++! ++! You should have received a copy of the GNU General Public License ++! along with this program; if not, write to the Free Software ++! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++! ++! Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ++! Department of Physics ++! Johannes Gutenberg-University ++! Mainz, Germany ++! ++! ++! gv_euc-kr.ad ++! Korean NLS label for gv by ++! 1999 Sang-Jin Hwang, (hsjlinux@netian.com) ++! ++ ++ ++!##### Zoom Popup ++ ++GV*zoomPopup.title: GV - È®´ë ++ ++!##### Info Popup ++ ++GV*infoPopup.title: °í½ºÆ® ½ºÅ©¸³Æ® ¸Þ½ÃÁö ++ ++!##### Dialog Popup ++ ++GV*dialogPopup.title: ´ÙÀÌ¾Ë·Î±× ++ ++!##### Note Popup ++ ++GV*notePopup.title: ¸Þ½ÃÁö ++ ++!##### Confirm Popup ++ ++GV*confirmPopup.title: È®ÀÎ ++ ++!##### OptionsSetup Popup ++ ++GV*optionfsPopup.title: ÆÄÀÏ ¼±Åà ¿É¼Ç ++ ++!##### OptionsGS Popup ++ ++GV*optiongsPopup.title: °í½ºÆ® ½ºÅ©¸³Æ® ¿É¼Ç ++ ++!##### OptionsGV Popup ++ ++GV*optiongvPopup.title: GV ¿É¼Ç ++ ++!##### OptionsSetup Popup ++ ++GV*optionsetupPopup.title: ¼³Á¤ ¿É¼Ç ++ ++!##### FileSet Popup ++ ++GV*fileSelPopup.title: ÆÄÀÏ ¿­±â ++ ++!################################################ ++!##### Labels ++!################################################ ++ ++GV*cancel.Label: Ãë¼Ò ++GV*dismiss.Label: ´Ý±â ++GV*apply.label: Àû¿ë ++GV*copyright.Label: ÀúÀÛ±Ç ++GV*quit.Label: Á¾·á ++GV*fileButton.Label: ÆÄÀÏ ++GV*open.Label: ¿­±â ... ++GV*reopen.Label: Àç¿­±â ++GV*update.Label: °æ½Å ++GV*printAllPages.Label: ¹®¼­ Àμâ ... ++GV*printMarkedPages.Label: ¸¶Å©ÇÑ ÆäÀÌÁö Àμâ ... ++GV*saveAllPages.Label: ¹®¼­ ÀúÀå ... ++GV*saveMarkedPages.Label: ¸¶Å©ÇÑ ÆäÀÌÁö ÀúÀå ... ++GV*stateButton.Label: ȯ°æ ¼³Á¤ ++GV*stop.Label: ÁßÁö ++GV*dsc.Label: ¹®¼­ ±¸Á¶È­ ++GV*eof.Label: EOF ÁÖ¼® ¹«½Ã ++GV*antialias.Label: ¸Å²ô·¯¿î È­¸é ó¸® ++GV*watchFile.Label: ÀÚµ¿ ÆÄÀÏ°æ½Å ++GV*showTitle.Label: ŸÀÌƲ Ç¥½Ã ++GV*pixmap.Label: Backing Pixmap ++GV*size.Label: ÀÚµ¿ Å©±â Á¶Àý ++GV*watch.Label: ÀÚµ¿ ÆÄÀÏ°æ½Å ++GV*optionsgv.Label: GV ¿É¼Ç ... ++GV*optionsfs.Label: ÆÄÀÏ ¼±Åà ¿É¼Ç ... ++GV*optionsgs.Label: °í½ºÆ® ½ºÅ©¸³Æ® ¿É¼Ç ... ++GV*optionssetup.Label: ¼³Á¤ ¿É¼Ç ... ++GV*pageButton.Label: ÆäÀÌÁö ++GV*next.Label: ´ÙÀ½ ++GV*show.Label: È­¸é Àç½ÃÀÛ ++GV*prev.Label: ÀÌÀü ++GV*center.Label: Áß°£ ++GV*pageButton*current.Label: ÇöÀçÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*pageButton*even.Label: ¦¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*pageButton*odd.Label: Ȧ¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*pageButton*unmark.Label: Àü ¸¶Å© ÇØÁ¦ ++GV*processButton.Label: \ ÁøÇàÁß ++GV*mark.Label: ¥Þ¸¶Å© ++GV*prevPage.Label: << ++GV*nextPage.Label: >> ++GV*unmark.Label: Ç¥½Ã ¾ÈÇÔ ++GV*automatic.Label: ÀÚµ¿ ++GV*portrait.Label: Portrait ++GV*landscape.Label: Landscape ++GV*upsidedown.Label: »óÇÏ ¹ÝÀü ++GV*seascape.Label: Seascape ++GV*swap.Label: Landscapeº¯È¯ ++GV*toggleCurrent.label: ÇöÀçÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*toggleEven.label: ¦¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*toggleOdd.label: Ȧ¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*unmarkAll.label: ¸ðµÎ Ç¥½Ã ¾ÈÇÔ ++GV*printAll.label: ¸ðµÎ Àμâ ++GV*printMarked.label: ¸¶Å©ºÎºÐ Àμâ ++GV*saveAll.label: ¸ðµÎ ÀúÀå ++GV*saveMarked.label: Ç¥½Ã ÀúÀå ++GV*openFile.label: ¿­±â ++GV*redisplay.label: È­¸é Àç½ÃÀÛ ++GV*updateFile.label: ÆÄÀÏ°æ½Å ++GV*checkFile.label: ÆÄÀÏ È®ÀÎ¥¯ ++ ++GV*filters.label: ÇÊÅÍ¿: ++GV*dirs.label: µð·ºÅ丮 ++GV*button1.label: Ãë¼Ò ++GV*button2.label: ÆÄÀÏ ¿­±â ++GV*rescan.label: µð·ºÅ丮 °Ë»ö ++GV*screenSizeLabel.label: ȸ¸é »çÀÌÁî¥[mm] ++ ++GV*versionPopup*versionDone*label: Ãë¼Ò ++GV*dialogPopup*cancel.label: Ãë¼Ò ++GV*notePopup*done.label: ¿¹ ++ ++GV*confirmPopup*cancel.label: Ãë¼Ò ++GV*confirmPopup*done.label: Á¾·á ++GV*save.label: ÀúÀå ++ ++GV*optiongvPopup*mediaLabel.label: \ ¿ëÁö »çÀÌÁî \ ++GV*optiongvPopup*fmediaLabel.label: ºÒÆǸí½ÃÀÇ ¿ëÁö »çÀÌÁî ++GV*optiongvPopup*orientLabel.label: \ Í ¿ø »óÅ \ ++GV*optiongvPopup*forientLabel.label: À© »óÅ·Πº¹±Í ++GV*optiongvPopup*magLabel.label: È®´ëÃà¼Ò ++GV*optiongvPopup*antialias.label: ´Ùµë±â ++GV*optiongvPopup*respectDSC.label: DSC¸¦ À¯È¿ ++GV*optiongvPopup*eof.label: EOF¸¦ ¹«½Ã ++GV*optiongvPopup*autoResize.label: °¡º¯ »çÀÌÁî ++GV*optiongvPopup*swapLandscape.label: Landscapeº¯È¯ ++GV*optiongvPopup*scalesLabel.label: \ ½ºÄÉÀÏ \ ++ ++GV*miscmenuLabel.label: ±âŸ ¸Þ´º ++GV*magmenuLabel.label: È®´ë ¸Þ´º ¸ñ·Ï ++GV*mediasLabel.label: ¹Ìµð¾î Å©±â ++GV*confirmLabel.label: È®ÀÎ Á¾·á ++GV*misc.label: ±âŸ ++GV*scrolling.label: ½ºÅ©·Ñ ¹ÝÀü ++GV*eyeGuide.label: ½ºÅ©·Ñ °¡À̵å ++GV*confirmPrint.label: Àμâ½Ã È®ÀÎ ++GV*uncompressLabel.label: ¾ÐÃà Àü°³ ++GV*autoCenter.label: ÀÚµ¿ÀûÀ¸·Î Áß¾ÓÀ¸·Î ++GV*printCommandLabel.label: Àμ⠸í·É¾î ++GV*scratchDirLabel.label: ½ºÅ©·¹Ä¡ µð·ºÅ丮 ++GV*saveDirLabel.label: µð·ºÅ丮 ÀúÀå ++GV*scalesLabel.label: ½ºÄÉÀÏ ++GV*scaleBaseLabel.label: ±âº» ½ºÄÉÀÏ ++ ++GV*safer.label: º¸´Ù ¾ÈÀüÇÏ°Ô ++GV*quiet.label: Á¾·á ++GV*defaults.label: ½Ã½ºÅÛ Ç¥ÁØ°ª ++GV*scanLabel.label: PDF °Ë»ö ++GV*convLabel.label: PDF º¯È¯ ++GV*gsLabel.label: ÀÎÅÍ·´Æ® ++GV*x11devLabel.label: µð¹ÙÀ̽º ++GV*x11alphadevLabel.label: µð¹ÙÀ̽º Á¶Á¤¹ ++GV*argumentsLabel.label: Àμö ++ ++GV*filtersLabel.label: ÆÄÀÏ ¼±Åà ÇÊÅÍ¥¿ ++GV*dirsLabel.label: ÆÄÀÏ ¼±Åà µð·ºÅ丮 ++GV*filterLabel.label: ±âº» ÇÊÅÍ ++ ++GV*miscMenu.update.label: ÆÄÀÏ°æ½Å ++GV*miscMenu.redisplay.label: È­¸é ÀçÁ¶Á¤ ++GV*miscMenu.stop.label: ÀÎÅÍ·´Æ® ÁßÁö ++GV*miscMenu.toggle_current.label: ÇöÀçÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*miscMenu.toggle_odd.label: Ȧ¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*miscMenu.toggle_even.label: ¦¼öÆäÀÌÁö ¸¶Å©/ÇØÁ¦ ++GV*miscMenu.unmark.label: ¸ðµÎ Ç¥½Ã ¾ÈÇÔ ++GV*miscMenu.print_all.label: ¸ðµÎ Àμâ ++GV*miscMenu.print_marked.label: ¸¶Å© ºÎºÐ Àμâ ++GV*miscMenu.save_all.label: ¸ðµÎ ÀúÀå ++GV*miscMenu.save_marked.label: Ç¥½Ã ÀúÀå ++ +diff -Nru gv-3.5.8.orig/source/info.c gv-3.5.8/source/info.c +--- gv-3.5.8.orig/source/info.c 1997-04-26 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/info.c 2005-05-23 19:45:33.000000000 +0200 +@@ -64,6 +64,22 @@ + static Bool infoPopupVisible = False; + static int info_length; + ++#ifdef I18N_MB ++static int FontSetWidth( XFontSet fnt ) { ++ XRectangle ink_array_return, logical_array_return; ++ XRectangle overall_ink_return, overall_logical_return; ++ int num_chars_return; ++ XmbTextPerCharExtents( fnt, "A", 1, ++ &ink_array_return, ++ &logical_array_return, 1, ++ &num_chars_return, ++ &overall_ink_return, ++ &overall_logical_return ); ++ return( overall_logical_return.width ); ++} ++#define FontSetHeight(fnt) (XExtentsOfFontSet(fnt)->max_logical_extent.height) ++#endif ++ + /*############################################################################### + cb_popupInfoPopup + ###############################################################################*/ +@@ -178,7 +194,11 @@ + Cardinal n; + Dimension bottomMargin, leftMargin, rightMargin, topMargin; + Dimension width, height; ++#ifdef I18N_MB ++ XFontSet fontset; ++#else + XFontStruct *font; ++#endif + + BEGINMESSAGE(makeInfoPopup) + +@@ -209,15 +229,24 @@ + XtAddCallback(infodismiss, XtNcallback, cb_popdownInfoPopup,NULL); + + n=0; ++#ifdef I18N_MB ++ XtSetArg(args[n], XtNfontSet, &fontset); n++; ++#else + XtSetArg(args[n], XtNfont, &font); n++; ++#endif + XtSetArg(args[n], XtNbottomMargin, &bottomMargin); n++; + XtSetArg(args[n], XtNleftMargin, &leftMargin); n++; + XtSetArg(args[n], XtNrightMargin, &rightMargin); n++; + XtSetArg(args[n], XtNtopMargin, &topMargin); n++; + XtGetValues(infotext,args,n); + ++#ifdef I18N_MB ++ width = FontSetWidth(fontset) * 80 + leftMargin + rightMargin; ++ height = FontSetHeight(fontset) * 22 + topMargin + bottomMargin; ++#else + width = font->max_bounds.width * 80 + leftMargin + rightMargin; + height = (font->ascent + font->descent) * 22 + topMargin + bottomMargin; ++#endif + + n=0; + XtSetArg(args[0], XtNwidth, width); n++; +diff -Nru gv-3.5.8.orig/source/main.c gv-3.5.8/source/main.c +--- gv-3.5.8.orig/source/main.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/main.c 2005-05-23 19:45:33.000000000 +0200 +@@ -257,6 +257,33 @@ + + /*### initializing toolkit and the application context #################*/ + ++#ifdef I18N_MB ++ /* ++ Make sure that LC_NUMERIC is POSIX. ++ LC_NUMERIC must not use locales like de_DE.UTF-8 or de_DE@eurowhere ++ the decimal separator is ',' or gv will fail with the ++ message "**** Unable to open the initial device, quitting." ++ */ ++ if (getenv("LC_ALL")) { ++ char *locale; ++ locale = getenv("LC_ALL"); ++ unsetenv("LC_ALL"); ++ setenv("LC_CTYPE", locale, 1); ++ setenv("LC_NUMERIC", locale, 1); ++ setenv("LC_TIME", locale, 1); ++ setenv("LC_COLLATE", locale, 1); ++ setenv("LC_MONETARY", locale, 1); ++ setenv("LC_MESSAGES", locale, 1); ++ setenv("LC_PAPER", locale, 1); ++ setenv("LC_NAME", locale, 1); ++ setenv("LC_ADDRESS", locale, 1); ++ setenv("LC_TELEPHONE", locale, 1); ++ setenv("LC_MEASUREMENT", locale, 1); ++ setenv("LC_IDENTIFICATION", locale, 1); ++ } ++ setenv("LC_NUMERIC", "POSIX", 1); ++ XtSetLanguageProc(NULL, NULL, NULL); ++#endif + INFMESSAGE(initializing toolkit and the application context) + XtToolkitInitialize(); + app_con = XtCreateApplicationContext(); +diff -Nru gv-3.5.8.orig/source/misc_private.c gv-3.5.8/source/misc_private.c +--- gv-3.5.8.orig/source/misc_private.c 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/misc_private.c 2005-05-23 19:45:33.000000000 +0200 +@@ -72,18 +72,32 @@ + if (text) { /* most of the following comes from X11/Xaw/Label.c */ + Position x,y; + INFSMESSAGE(update_label,text) ++#ifdef I18N_MB ++ y = w->label.label_y - XExtentsOfFontSet(w->label.fontset)->max_logical_extent.y; ++#else + y = w->label.label_y + w->label.font->max_bounds.ascent; ++#endif + if (w->label.justify == XtJustifyCenter) { + unsigned int width; + int len = (int) strlen(text); ++#ifdef I18N_MB ++ XFontSet fs = w->label.fontset; ++ width = XmbTextEscapement(fs, text, (int)len ); ++#else + XFontStruct *fs = w->label.font; + if (w->label.encoding) width = XTextWidth16 (fs, (XChar2b*)text, (int)(len/2) ); + else width = XTextWidth (fs, text , (int)(len) ); ++#endif + x = (Position) ((w->core.width-width)/2); + } else { + x = w->label.internal_width + w->threeD.shadow_width; + } + ++#ifdef I18N_MB ++ XmbDrawString(XtDisplay(widget), XtWindow(widget), ++ w->label.fontset, w->label.normal_GC, ++ x, y, text, (int)(strlen(text))); ++#else + if (w->label.encoding) { + XDrawString16(XtDisplay(widget), XtWindow(widget), + w->label.normal_GC, +@@ -93,6 +107,7 @@ + w->label.normal_GC, + x, y, text, (int)(strlen(text))); + } ++#endif + } + + ENDMESSAGE1(update_label) diff --git a/gv-3.5.8-bzip2.patch b/gv-3.5.8-bzip2.patch new file mode 100644 index 0000000..1cf1c82 --- /dev/null +++ b/gv-3.5.8-bzip2.patch @@ -0,0 +1,305 @@ +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 */ + #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; + + 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; + } + } +- if (cmd_uncompress) { ++ if (run_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%*>\ + }\ + }\ + }\ diff --git a/gv-3.5.8-deb.patch b/gv-3.5.8-deb.patch new file mode 100644 index 0000000..e461aa3 --- /dev/null +++ b/gv-3.5.8-deb.patch @@ -0,0 +1,916 @@ +--- gv-3.5.8.orig/source/Imakefile ++++ gv-3.5.8/source/Imakefile +@@ -311,8 +311,8 @@ + @echo "!########## gv_intern_res.dat (generated by makefile)" >> $(GV_INTERN_RES_DAT) + @echo "" >> $(GV_INTERN_RES_DAT) + @echo "GV.gsInterpreter: gs" >> $(GV_INTERN_RES_DAT) +- @echo "GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit" >> $(GV_INTERN_RES_DAT) +- @echo "GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET $(PS_LEVEL) -dNOPAUSE -sPSFile=%s %s -c quit" >> $(GV_INTERN_RES_DAT) ++ @echo "GV.gsCmdScanPDF: pdf2dsc %pdf %dsc" >> $(GV_INTERN_RES_DAT) ++ @echo "GV.gsCmdConvPDF: pdf2ps $(PS_LEVEL) %pdf %ps" >> $(GV_INTERN_RES_DAT) + @echo "GV.gsX11Device: -sDEVICE=x11" >> $(GV_INTERN_RES_DAT) + @echo "GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha" >> $(GV_INTERN_RES_DAT) + @echo "GV.gsSafer: True" >> $(GV_INTERN_RES_DAT) +--- gv-3.5.8.orig/source/ps.c ++++ gv-3.5.8/source/ps.c +@@ -417,10 +417,15 @@ + struct document *retval = NULL; + FILE *tmpfile = (FILE*)NULL; + char *filename_unc; ++ char *quoted_filename, *quoted_filename_unc; + char cmd[512]; + char s[512]; + filename_unc=file_getTmpFilename(NULL,filename_raw); +- sprintf(cmd,cmd_uncompress,filename,filename_unc); ++ quoted_filename = quote_filename(filename); ++ quoted_filename_unc = quote_filename(filename_unc); ++ sprintf(cmd,cmd_uncompress,quoted_filename,quoted_filename_unc); ++ GV_XtFree(quoted_filename); ++ GV_XtFree(quoted_filename_unc); + INFMESSAGE(is compressed) + INFSMESSAGE(uncompress command,cmd) + if (ps_system(cmd) || file_fileIsNotUseful(filename_unc)) { +@@ -488,10 +493,35 @@ + struct document *retval = NULL; + FILE *tmpfile = (FILE*)NULL; + char *filename_dsc; ++ char *quoted_filename, *quoted_filename_dsc; ++ char *pdfpos; ++ char *dscpos; + char cmd[512]; + char s[512]; +- filename_dsc=file_getTmpFilename(NULL,filename_raw); +- sprintf(cmd,cmd_scan_pdf,filename,filename_dsc); ++ filename_dsc=file_getTmpFilename(NULL,filename_raw); ++ quoted_filename = quote_filename(filename); ++ quoted_filename_dsc = quote_filename(filename_dsc); ++ if ((pdfpos = strstr(cmd_scan_pdf,"%pdf")) && ++ (dscpos = strstr(cmd_scan_pdf,"%dsc"))) { ++ cmd[0] = '\0'; ++ if (pdfpos < dscpos) { ++ strncat(cmd,cmd_scan_pdf,(pdfpos-cmd_scan_pdf)); ++ strcat(cmd,quoted_filename); ++ strncat(cmd,pdfpos+4,(dscpos-pdfpos-4)); ++ strcat(cmd,quoted_filename_dsc); ++ strcat(cmd,dscpos+4); ++ } else { ++ strncat(cmd,cmd_scan_pdf,(dscpos-cmd_scan_pdf)); ++ strcat(cmd,quoted_filename_dsc); ++ strncat(cmd,dscpos+4,(pdfpos-dscpos-4)); ++ strcat(cmd,quoted_filename); ++ strcat(cmd,pdfpos+4); ++ } ++ } else { ++ sprintf(cmd,cmd_scan_pdf,quoted_filename,quoted_filename_dsc); ++ } ++ GV_XtFree(quoted_filename); ++ GV_XtFree(quoted_filename_dsc); + INFMESSAGE(is PDF) + INFSMESSAGE(scan command,cmd) + #ifdef VMS +--- gv-3.5.8.orig/source/misc.c ++++ gv-3.5.8/source/misc.c +@@ -1154,7 +1154,7 @@ + misc_setSensitive(w_printAllPages , show_printAllPages , (gv_psfile != NULL)); + misc_setSensitive(w_checkFile , show_checkFile , (gv_filename != NULL)); + misc_setSensitive(w_updateFile , show_updateFile , (gv_filename != NULL)); +- misc_setSensitive(w_showThisPage , show_showThisPage , (gv_filename != NULL)); ++ misc_setSensitive(w_showThisPage , show_showThisPage , (gv_psfile != NULL)); + misc_setSensitive(w_prevPage , show_prevPage , (toc_text != NULL)); + misc_setSensitive(w_nextPage , show_nextPage , (gv_filename != NULL)); + misc_setSensitive(w_toggleCurrentPage , show_toggleCurrentPage , (toc_text != NULL)); +@@ -1168,7 +1168,7 @@ + XtSetSensitive(saveAllEntry, (gv_psfile != NULL)); + XtSetSensitive(saveMarkedEntry, (toc_text != NULL)); + XtSetSensitive(nextEntry, (gv_filename != NULL)); +- XtSetSensitive(redisplayEntry, (gv_filename != NULL)); ++ XtSetSensitive(redisplayEntry, (gv_psfile != NULL)); + XtSetSensitive(prevEntry, (toc_text != NULL)); + XtSetSensitive(currentEntry, (toc_text != NULL)); + XtSetSensitive(oddEntry, (toc_text != NULL)); +@@ -1717,4 +1717,52 @@ + XtDestroyWidget(toplevel); + ENDMESSAGE(catch_Xerror) + return 0; ++} ++ ++/*############################################################*/ ++/* quote_filename */ ++/* Quotes special characters in filenames */ ++/* (taken from bash sources) */ ++/*############################################################*/ ++ ++char * ++quote_filename (string) ++ char *string; ++{ ++ int c; ++ char *result, *r, *s; ++ ++ BEGINMESSAGE(quote_filename) ++ ++ result = (char*) GV_XtMalloc((2 * strlen (string) + 1) * sizeof(char)); ++ ++ for (r = result, s = string; s && (c = *s); s++) ++ { ++ switch (c) ++ { ++ case ' ': case '\t': case '\n': /* IFS white space */ ++ case '\'': case '"': case '\\': /* quoting chars */ ++ case '|': case '&': case ';': /* shell metacharacters */ ++ case '(': case ')': case '<': case '>': ++ case '!': case '{': case '}': /* reserved words */ ++ case '*': case '[': case '?': case ']': /* globbing chars */ ++ case '^': ++ case '$': case '`': /* expansion chars */ ++ *r++ = '\\'; ++ *r++ = c; ++ break; ++ case '#': /* comment char */ ++ if (s == string) ++ *r++ = '\\'; ++ /* FALLTHROUGH */ ++ default: ++ *r++ = c; ++ break; ++ } ++ } ++ *r = '\0'; ++ ++ ENDMESSAGE(quote_filename) ++ ++ return (result); + } +--- gv-3.5.8.orig/source/callbacks.c ++++ gv-3.5.8/source/callbacks.c +@@ -870,7 +870,7 @@ + char *s; + + BEGINMESSAGE(cb_page) +- if (gv_psfile && client_data) { ++ if (gv_filename && client_data) { + s = (char*)client_data; + if (*s=='-' || *s=='+') { + k = 1; +--- gv-3.5.8.orig/source/misc.h ++++ gv-3.5.8/source/misc.h +@@ -115,6 +115,12 @@ + #endif + ); + ++extern char * quote_filename ( ++#if NeedFunctionPrototypes ++ char* ++#endif ++); ++ + #endif /* _GV_MISC_H_ */ + + +--- gv-3.5.8.orig/source/file.c ++++ gv-3.5.8/source/file.c +@@ -145,6 +145,25 @@ + } + + /*############################################################*/ ++/* file_assureDirectory */ ++/*############################################################*/ ++ ++void ++file_assureDirectory(to,from) ++ char *to; ++ char *from; ++{ ++ int len; ++ BEGINMESSAGE(file_assureDirectory) ++ strcpy(to,from); ++# ifndef VMS ++ len = strlen(to); ++ if (to[len-1] != '/') { to[len] = '/'; to[len+1] = '\0'; } ++# endif ++ ENDMESSAGE(file_assureDirectory) ++} ++ ++/*############################################################*/ + /* file_getTmpFilename */ + /* provide some temporary file name */ + /*############################################################*/ +@@ -164,11 +183,13 @@ + + BEGINMESSAGE(file_getTmpFilename) + +- if (!baseDirectory) baseDirectory = app_res.scratch_dir; +- strcpy(tmpDirBuf,baseDirectory); +- pos = file_locateFilename(tmpDirBuf); +- if (pos) { ++pos; *pos='\0'; } +- else strcpy(tmpDirBuf,app_res.scratch_dir); ++ pos = NULL; ++ if (baseDirectory) { ++ strcpy(tmpDirBuf,baseDirectory); ++ pos = file_locateFilename(tmpDirBuf); ++ } ++ if (pos) *pos='\0'; ++ else file_assureDirectory(tmpDirBuf,app_res.scratch_dir); + + if (!baseFilename) baseFilename= "."; + strcpy(tmpNameBuf,baseFilename); +--- gv-3.5.8.orig/source/save.c ++++ gv-3.5.8/source/save.c +@@ -112,17 +112,19 @@ + String print_filename; + { + String error=NULL; ++ char *print_quoted_filename; + char *c,*p; + Cardinal m,n; + String printfail=GV_ERROR_PRINT_FAIL; + + BEGINMESSAGE(print_file) + ++ print_quoted_filename = quote_filename(print_filename); + p = GV_XtNewString(print_command); + n=0; + c=p; + while ((c=strstr(c,"%s"))) { c+=2; n++; } +- m = (strlen(p)+(n>0?n:1)*strlen(print_filename)+5)*sizeof(char); ++ m = (strlen(p)+(n>0?n:1)*strlen(print_quoted_filename)+5)*sizeof(char); + c = (char*) GV_XtMalloc(m); + if (n>0) { + char *e,*s; +@@ -133,13 +135,13 @@ + if (s) *s='\0'; + strcat(c,e); + if (s) { +- strcat(c,print_filename); ++ strcat(c,print_quoted_filename); + e=s+2; + } + else s=NULL; + } + } else { +- sprintf(c, "%s %s",p,print_filename); ++ sprintf(c, "%s %s",p,print_quoted_filename); + } + INFSMESSAGE(printing:,c) + if (SYSTEM_FAILED_ON(c)) { +@@ -149,6 +151,7 @@ + } + GV_XtFree(c); + GV_XtFree(p); ++ GV_XtFree(print_quoted_filename); + ENDMESSAGE(print_file) + return(error); + } +@@ -198,6 +201,9 @@ + char proc_name[256]; + char *error=NULL; + char *pos; ++ char *pdfpos; ++ char *pspos; ++ char *quoted_src_fn, *quoted_conv_fn; + + BEGINMESSAGE(save_forkPDFToPSConversion) + +@@ -205,7 +211,30 @@ + strcpy(proc_name,pos); + strcat(proc_name," conversion"); + +- sprintf(command,gv_gs_cmd_conv_pdf,sd->conv_fn,sd->src_fn); ++ quoted_src_fn = quote_filename(sd->src_fn); ++ quoted_conv_fn = quote_filename(sd->conv_fn); ++ if ((pdfpos = strstr(gv_gs_cmd_conv_pdf,"%pdf")) && ++ (pspos = strstr(gv_gs_cmd_conv_pdf,"%ps"))) { ++ command[0] = '\0'; ++ if (pdfpos < pspos) { ++ strncat(command,gv_gs_cmd_conv_pdf,(pdfpos-gv_gs_cmd_conv_pdf)); ++ strcat(command,quoted_src_fn); ++ strncat(command,pdfpos+4,(pspos-pdfpos-4)); ++ strcat(command,quoted_conv_fn); ++ strcat(command,pspos+3); ++ } else { ++ strncat(command,gv_gs_cmd_conv_pdf,(pspos-gv_gs_cmd_conv_pdf)); ++ strcat(command,quoted_conv_fn); ++ strncat(command,pspos+3,(pdfpos-pspos-3)); ++ strcat(command,quoted_src_fn); ++ strcat(command,pdfpos+4); ++ } ++ } else { ++ sprintf(command,gv_gs_cmd_conv_pdf,quoted_conv_fn,quoted_src_fn); ++ } ++ GV_XtFree(quoted_src_fn); ++ GV_XtFree(quoted_conv_fn); ++ + INFSMESSAGE(starting conversion:,command) + process_fork(proc_name,command,save_forkPDFToPSConversionDone,(XtPointer)sd); + ENDMESSAGE(save_forkPDFToPSConversion) +--- gv-3.5.8.orig/source/process.c ++++ gv-3.5.8/source/process.c +@@ -272,8 +272,7 @@ + pid = fork(); + + if (pid == 0) { /* child */ +- int argc=0; +- char *argv[20]; ++ char *argv[3]; + char *c; + + INFMESSAGE(child process) +@@ -286,15 +285,10 @@ + */ + system(c); + #else +- while (isspace(*c)) c++; +- while (*c) { +- argv[argc++] = c; +- while (*c && !isspace(*c)) c++; +- if (*c) *c++ = '\0'; +- while (isspace(*c)) c++; +- SMESSAGE(argv[argc-1]) +- } +- argv[argc] = NULL; ++ argv[0] = "sh"; ++ argv[1] = "-c"; ++ argv[2] = c; ++ argv[3] = NULL; + + INFMESSAGE(spawning conversion process) + /* +--- gv-3.5.8.orig/source/miscmenu.c ++++ gv-3.5.8/source/miscmenu.c +@@ -60,7 +60,7 @@ + + static MiscMenuEntryStruct miscmenu_entries[] = { + { "update",cb_checkFile,(XtPointer)CHECK_FILE_DATE,2 }, +- { "redisplay",cb_redisplay,NULL,2 }, ++ { "redisplay",cb_redisplay,NULL,3 }, + { "toggle_current" , cb_setPageMark, (XtPointer)(SPM_CURRENT|SPM_TOGGLE),1 }, + { "toggle_even" , cb_setPageMark, (XtPointer)(SPM_EVEN|SPM_TOGGLE),1 }, + { "toggle_odd" , cb_setPageMark, (XtPointer)(SPM_ODD|SPM_TOGGLE),1 }, +--- gv-3.5.8.orig/source/options_fs.c ++++ gv-3.5.8/source/options_fs.c +@@ -105,7 +105,6 @@ + Widget w; + XtPointer client_data, call_data; + { +- BEGINMESSAGE(options_fs_cb_apply) + Arg args[5]; + Cardinal n; + static Boolean s_scratch_dir = False; +--- gv-3.5.8.orig/debian/gv.doc-base ++++ gv-3.5.8/debian/gv.doc-base +@@ -0,0 +1,9 @@ ++Document: gv ++Title: GV Manual - A PostScript and PDF viewer ++Author: Johannes Plass ++Abstract: Users manual for GV, a PostScript and PDF viewer. ++Section: Apps/Viewers ++ ++Format: HTML ++Index: /usr/doc/gv/gv.html ++Files: /usr/doc/gv/*.html +--- gv-3.5.8.orig/debian/changelog ++++ gv-3.5.8/debian/changelog +@@ -0,0 +1,237 @@ ++gv (1:3.5.8-15) unstable; urgency=low ++ ++ * Corrected weird error in preinst (closes: Bug#47044) ++ ++ -- Marco Pistore Tue, 12 Oct 1999 02:01:30 +0200 ++ ++gv (1:3.5.8-14) unstable; urgency=low ++ ++ * Corrected the upstream URL in the copyright file (closes: Bug#41667) ++ * Now mime informations are handled via the update-mime approach ++ (closes: Bug#43331) ++ * Changed my email address to pistore@debian.org ++ ++ -- Marco Pistore Wed, 6 Oct 1999 23:12:30 +0200 ++ ++gv (1:3.5.8-13) unstable; urgency=low ++ ++ * Readded menu entry (closes: Bug#41216) ++ ++ -- Marco Pistore Fri, 16 Jul 1999 02:03:04 +0200 ++ ++gv (1:3.5.8-12) unstable; urgency=low ++ ++ * Corrected the doc-base control file (closes: Bug#31771) ++ * Removed explicit dwww support: doc-base supplies it ++ (closes: Bug#31772) ++ ++ -- Marco Pistore Tue, 6 Jul 1999 22:38:32 +0200 ++ ++gv (1:3.5.8-11) unstable; urgency=low ++ ++ * Special characters of filenames are now quoted in the commands that ++ print, decompress and deal with PDF files (added function ++ quote_filename to file misc.c; modified files source/save.c and ++ source/ps.c) (closes: Bug#30738) ++ * Removed double quotes from commands that print, decompress and deal ++ with PDF files: they are no more needed (modified files config.Unix ++ and source/Imakefile) ++ * Added support for doc-base (closes Bug#31152) ++ ++ -- Marco Pistore Sat, 2 Jan 1999 22:08:25 +0100 ++ ++gv (1:3.5.8-10) unstable; urgency=low ++ ++ * Changed scratch dir from ~ to /tmp in file config.Unix ++ (closes: Bug#30520). ++ * Changed print command in file config.Unix: the file name is ++ now quoted and gv prints also files with spaces (closes: Bug#30738). ++ * Changed command for uncompressing .gz files and for managing ++ PDF files in source/Imakefile so that the involved file names ++ are quoted (closes: Bug#30514). ++ * Modified ps.c, so that strings %dsc and %pdf can appear in the command ++ that extract the structure from PDF files. Changed the default command to ++ 'pdf2dsc "%pdf" "%dsc"'. ++ * Changed the default command that converts PDF files into PS files ++ to 'pdf2ps "%pdf" "%ps"'. ++ * Added support for quoted strings in function process_fork in file ++ process.c. ++ * Now forward scrolling is allowed also when gv is called from a pipe: ++ modified file callbacks.c (closes: Bug#28382, Bug#29706). ++ * Redisplay is disabled for non-(gv_psfile) execution: modified ++ files misc.c and miscmenu.c. ++ ++ -- Marco Pistore Sat, 19 Dec 1998 23:36:13 +0100 ++ ++gv (1:3.5.8-9) unstable frozen; urgency=low ++ ++ * Rewritten description in control file (now PDF support is ++ provided also by GNU gs, not only by Aladdin gs). For the same ++ reason, removed Suggests: gs-aladdin. ++ * Modified save.c, so that strings %ps and %pdf can appear in the command ++ that converts PDF files into PS files. Changed the default command to ++ "pdf2ps %pdf %ps" that works both with gs 4 and with gs 5. ++ (Closes: Bug:#30255) ++ ++ -- Marco Pistore Mon, 7 Dec 1998 18:43:45 +0100 ++ ++gv (1:3.5.8-8) unstable; urgency=low ++ ++ * Scratch dir back to ~/ ++ * Now a "/" is automatically added to the end of the default scratch dir ++ if it is not present (so, if you set the scartch directory to ++ /tmp, the scratch files are saved into "/tmp/", not into "/"): ++ modified "source/file.c". (Closes: Bug#23055) ++ ++ -- Marco Pistore Wed, 17 Jun 1998 00:08:51 +0200 ++ ++gv (1:3.5.8-7) unstable frozen; urgency=low ++ ++ * I forgot to upload previous version also to FROZEN! ++ BRIAN, please include this in HAMM, since it avoids a conflict ++ the BO version of fvwm-common. ++ ++ -- Marco Pistore Sun, 5 Apr 1998 19:17:58 +0200 ++ ++gv (1:3.5.8-6) unstable; urgency=low ++ ++ * Added "Replaces: fvwm-common (<< 2.0.46-BETA-2)". ++ File /usr/X11R6/include/X11/pixmaps/mini-gv.xpm is present both in gv ++ and in old versions of package fvwm-common (for instance, the one in ++ debian 1.3). The "Replaces: fvwm-common" allows to install the package ++ without the --force-overwrite flag. See Packaging 8.5.1 (thanks James). ++ ++ -- Marco Pistore Fri, 3 Apr 1998 22:11:04 +0200 ++ ++gv (1:3.5.8-5) unstable frozen; urgency=low ++ ++ * New maintainer ++ * Typos in package description fixed (closes Bug#18925) ++ * Scartch dir is now /tmp (closes Bug#18728) ++ * Address of FSF corrected (lintian bug) ++ * Man and doc files have now mode 644 (lintian bug) ++ * -rpath (for xaw3d) has been removed: all works perfectly well also ++ without it ++ * Small changes in the rules file ++ ++ -- Marco Pistore Wed, 25 Mar 1998 11:20:51 +0100 ++ ++gv (1:3.5.8-4) unstable; urgency=low ++ ++ * Hech. I forgot the epock so dpkg will replace the `.1' version. One more go. ++ ++ -- Karl M. Hegbloom Tue, 9 Dec 1997 03:36:49 -0800 ++ ++gv (3.5.8-3) unstable; urgency=low ++ ++ * Really fix the depends on xaw3dg using a shlibs.local file. ++ fixes bug #15514 ++ ++ -- Karl M. Hegbloom Tue, 9 Dec 1997 02:42:19 -0800 ++ ++gv (3.5.8-2) unstable; urgency=low ++ ++ * Increment version number so that it will upgrade the non-maintainer version ++ `-.1' that should have been `-0.1'. ++ ++ -- Karl M. Hegbloom Mon, 24 Nov 1997 12:51:57 -0800 ++ ++gv (3.5.8-1) unstable; urgency=low ++ ++ * I've closed a bunch of outstanding bug reports, many of which should ++ have been closed earlier. ++ * Depend on `xaw3dg' (several bugs, merged, 13986) ++ ++ -- Karl M. Hegbloom Sat, 22 Nov 1997 22:59:39 -0800 ++ ++gv (3.5.8-.1) unstable; urgency=low ++ ++ * Non-maintainer release ++ * Latest version - Pristine sources. ++ * compiled with xlib6g, and libc6 ++ ++ -- Karl M. Hegbloom Wed, 1 Oct 1997 11:02:22 -0700 ++ ++gv (3.4.3-1.1) unstable; urgency=low ++ ++ * Non-maintainer release, compiled with xlib6g. ++ ++ -- Karl M. Hegbloom Tue, 30 Sep 1997 17:06:16 -0700 ++ ++gv (3.4.3-1) unstable; urgency=low ++ ++ * new upstream release including heavy improvements in look and feel as ++ well as several major improvements of the PostScript preprocessor and ++ several new features. ++ * this version can no longer be used with standard Athena Widgets. This ++ release uses (and depends on) the shared Xaw3d library. By using the ++ -rpath option, the library has to be installed, but doesn't have to be ++ used as replacement for Xaw. It would be possible to link it ++ statically against Xaw3d (still dynamically linking all the rest). ++ If there are enough requests for this, I'll change the package to do ++ this. ++ For people compiling from source, simply use the other definition of ++ XAWLIB in config.Unix for the static version. ++ Note that the standard symlinks in /usr/X11R6/lib/Xaw3d may be ++ incorrect. You should check them first if you want to compile gv with ++ shared libXaw3d. ++ ++ -- Helmut Geyer Sun, 27 Apr 1997 02:05:17 +0200 ++ ++gv (2.9.4-2) frozen unstable; urgency=low ++ ++ * fixed typo ++ * uploaded to frozen ++ ++ -- Helmut Geyer Fri, 18 Apr 1997 01:01:13 +0200 ++ ++gv (2.9.4-1) unstable; urgency=low ++ ++ * new upstream release ++ * fixed prerm script (Bug# 7857) ++ * added menu entries ++ * added direct access to HTML docs according to Webstandard via menu. ++ ++ -- Helmut Geyer Sat, 5 Apr 1997 13:06:04 +020 ++0 ++ ++gv (2.7b6-1) unstable; urgency=low ++ ++ * fixed bug 6718 (wrong MIME viewer installation) ++ * fixed bug 7228 (app-default problem) ++ * converted to new debian standard version 2.1.2.2 ++ * new upstream release ++ ++ -- Helmut Geyer Thu, 20 Feb 1997 01:04:29 +0100 ++ ++gv (2.7b5-3) unstable; urgency=low ++ ++ * fixed bug 4700 (gv not stripped) ++ * added mime type application/ghostview ++ * added Provides: postscript-viewer, pdf-viewer ++ * finally found all functions using private Xaw code and eliminated ++ them. Now there is just one gv package for both standard and 3D Athena ++ Widgets. fixed control files for this. ++ ++ -- Helmut Geyer Thu, 17 Oct 1996 22:56:53 +0200 ++ ++gv (2.7b5-2) unstable; urgency=low ++ ++ * fixed install-mime entry in postinst ++ * fixed app-defaults file for 2d gv ++ ++ -- Helmut Geyer Sat, 5 Oct 1996 10:48:54 +0200 ++ ++gv (2.7b5-1) unstable; urgency=LOW ++ ++ * First Debian release of the gv PostScript/PDF viewer. ++ several changes had to be made in order to support ++ standard Athena Widgets as well as Xaw3d. ++ * Regretfully there is currently no way to make a binary supporting ++ both kinds at the same time. ++ ++ -- Helmut Geyer Sat, 5 Oct 1996 10:48:08 +0200 ++ ++Local Variables: ++mode: debian-changelog ++End: +--- gv-3.5.8.orig/debian/rules ++++ gv-3.5.8/debian/rules +@@ -0,0 +1,71 @@ ++#!/usr/bin/make -f ++# X?Emacs, -*- makefile -*- mode, please. Thank you. ++ ++INSTALL=install ++INSTDATA=$(INSTALL) -o root -g root -m 644 -c ++INSTDIR=$(INSTALL) -d ++INSTPROG=$(INSTALL) -o root -g root -m 755 -c ++ ++package=gv ++version=3.5.8 ++ ++define checkdir ++ test -f config.Unix -a -f debian/rules ++endef ++ ++build: ++ $(checkdir) ++ -rm -f build ++ xmkmf -a ++ make ++ touch build ++ ++clean: checkroot ++ $(checkdir) ++ -rm -f build ++ -make clean ++ -rm -rf debian/tmp ++ -rm -f `find . -name Makefile -print` ++ -rm -f debian/files debian/substvars ++ -rm -f `find . \( -name \*~ -o -name \*.bak \) -print` ++ ++binary-indep: checkroot build ++ $(checkdir) ++ ++binary-arch: checkroot build ++ $(checkdir) ++ $(INSTDIR) debian/tmp/DEBIAN ++ $(INSTPROG) debian/{preinst,postinst,prerm,postrm} debian/tmp/DEBIAN ++ $(INSTDIR) debian/tmp/usr/doc/gv ++ make install install.man INSTMANFLAGS="-m 644" DESTDIR=$(shell pwd)/debian/tmp ++ $(INSTDATA) debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian ++ $(INSTDATA) CHANGES debian/tmp/usr/doc/$(package)/changelog ++ gzip -9v debian/tmp/usr/doc/$(package)/* debian/tmp/usr/X11R6/man/man1/* ++ make install.doc INSTMANFLAGS="-m 644" GV_DOCDIR=$(shell pwd)/debian/tmp/usr/doc/$(package) ++ $(INSTDATA) debian/copyright debian/tmp/usr/doc/$(package) ++ $(INSTDIR) debian/tmp/usr/X11R6/include/X11/pixmaps ++ $(INSTDATA) debian/gv_icon.xpm debian/mini-gv.xpm debian/tmp/usr/X11R6/include/X11/pixmaps ++ $(INSTDIR) debian/tmp/usr/lib/menu ++ $(INSTDATA) debian/gv.menu debian/tmp/usr/lib/menu/gv ++ $(INSTDIR) debian/tmp/usr/share debian/tmp/usr/share/doc-base ++ $(INSTDATA) debian/gv.doc-base debian/tmp/usr/share/doc-base/gv ++ $(INSTDIR) debian/tmp/usr/lib/mime debian/tmp/usr/lib/mime/packages ++ $(INSTDATA) debian/gv.mime debian/tmp/usr/lib/mime/packages/gv ++ strip debian/tmp/usr/X11R6/bin/gv ++ dpkg-shlibdeps source/gv ++ dpkg-gencontrol ++ chown -R root.root debian/tmp ++ chmod -R g-ws debian/tmp ++ dpkg --build debian/tmp .. ++ ++# generic targets: ++binary: binary-indep binary-arch ++ ++source diff: ++ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false ++ ++checkroot: ++ $(checkdir) ++ test root = "`whoami`" ++ ++.PHONY: binary binary-arch binary-indep clean checkroot +--- gv-3.5.8.orig/debian/gv.menu ++++ gv-3.5.8/debian/gv.menu +@@ -0,0 +1,2 @@ ++?package(gv):needs="x11" section="Apps/Viewers" title="GV" icon="mini-gv.xpm" \ ++ command="/usr/bin/X11/gv" +--- gv-3.5.8.orig/debian/postinst ++++ gv-3.5.8/debian/postinst +@@ -0,0 +1,17 @@ ++#!/bin/sh ++ ++if [ -x /usr/sbin/update-mime ]; then ++ update-mime ++fi ++ ++if [ -x /usr/bin/update-menus ] ; then ++ update-menus ++fi ++ ++if [ -x /usr/sbin/install-docs ]; then ++ install-docs -i /usr/share/doc-base/gv ++fi ++ ++exit 0 ++ ++ +--- gv-3.5.8.orig/debian/preinst ++++ gv-3.5.8/debian/preinst +@@ -0,0 +1,9 @@ ++#!/bin/sh ++ ++if [ -x /usr/sbin/install-mime ] && [ "$1" = "upgrade" ] && \ ++ `dpkg --compare-versions $2 lt 1:3.5.8-14` ; then ++ echo "Removing old MIME information..." ++ install-mime --remove --package=gv ++fi ++ ++exit 0 +--- gv-3.5.8.orig/debian/control ++++ gv-3.5.8/debian/control +@@ -0,0 +1,26 @@ ++Source: gv ++Section: text ++Priority: optional ++Maintainer: Marco Pistore ++Standards-Version: 2.4.0.0 ++ ++Package: gv ++Architecture: any ++Provides: postscript-viewer, pdf-viewer ++Priority: optional ++Replaces: gv-2d, gv-3d, fvwm-common (<< 2.0.46-BETA-2) ++Conflicts: gv-2d, gv-3d ++Depends: gs, ${shlibs:Depends} ++Description: A PostScript and PDF viewer for X using 3d Athena Widgets ++ `gv' is a comfortable viewer of PostScript and PDF files for the X ++ Window System. ++ . ++ It uses the `ghostscript' PostScript(tm) interpreter and is based ++ on the classic X front-end for `gs', `ghostview'. It is more ++ comfortable and more powerful than `ghostview'. ++ . ++ Some features as e.g. PDF files or anti-aliasing are only supported ++ if a recent ghostscript (4.0 or later) is installed. With ++ anti-aliasing turned on, the text is very crisp and readable, with no ++ `stepping' on the slants at all. ++ +--- gv-3.5.8.orig/debian/copyright ++++ gv-3.5.8/debian/copyright +@@ -0,0 +1,40 @@ ++ This is Debian/GNU Linux's prepackaged version of the PostScript ++ viewer `gv'. `gv' is a front-end to `gs', so you need this as well. ++ ++ The original package was put together by Helmut Geyer ++ from the sources obtained from ++ ++ iphthf.physik.uni-mainz.de:/pub/gv/unix/. ++ ++ This release was put together by Marco Pistore , ++ from sources obtained at the same site, ++ ++ iphthf.physik.uni-mainz.de:/pub/gv/unix/gv-3.5.8.tar.gz ++ ++ This program bears a GNU version 2 copyright, as well as the ++ following notice, which is displayed by the [File | Copyright] menu, ++ compiled in from "source/gv_copyright.dat". ++ ++! ++!** Copyright (C) 1995, 1996, 1997 Johannes Plass ++! ++! 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 ++! the Free Software Foundation; either version 2 of the License, or ++! (at your option) any later version. ++! ++! This program is distributed in the hope that it will be useful, ++! but WITHOUT ANY WARRANTY; without even the implied warranty of ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++! GNU General Public License for more details. ++! ++! You should have received a copy of the GNU General Public License ++! along with this program; if not, write to the Free Software ++! Foundation, Inc., 59 Temple Place - Suite 330, Boston, ++! MA 02111-1307, USA. ++! ++! Author: Johannes Plass (plass@thep.physik.uni-mainz.de) ++! Department of Physics ++! Johannes Gutenberg-University ++! Mainz, Germany ++! +--- gv-3.5.8.orig/debian/mini-gv.xpm ++++ gv-3.5.8/debian/mini-gv.xpm +@@ -0,0 +1,23 @@ ++/* XPM */ ++static char * mini_gv_xpm[] = { ++/* width height num_colors chars_per_pixel */ ++"16 14 3 1", ++/* colors */ ++" s None c None", ++". c black", ++"X c White", ++/* pixels */ ++" .... ", ++" .XXXX. ", ++" .XXXXXX. ", ++" .XXXXXX. ", ++" ..X.XX.X... ", ++" .XXX.XX.X.XX. ", ++" .XXXXXXXXXXX. ", ++" .XXXXXXXXX. ", ++" .XXXXXXX. ", ++" .XXXXXXX. ", ++" .XXXXXXX. ", ++" .XXXXXXXXX. ", ++" .XXX.XXX.XXX. ", ++" .... ... .. "}; +--- gv-3.5.8.orig/debian/prerm ++++ gv-3.5.8/debian/prerm +@@ -0,0 +1,8 @@ ++#!/bin/sh ++ ++if [ -x /usr/sbin/install-docs ]; then ++ install-docs -r gv ++fi ++ ++exit 0 ++ +--- gv-3.5.8.orig/debian/postrm ++++ gv-3.5.8/debian/postrm +@@ -0,0 +1,9 @@ ++#!/bin/sh ++ ++if [ -x /usr/bin/update-menus ] ; then ++ update-menus ++fi ++ ++if [ -x /usr/sbin/update-mime ]; then ++ update-mime ++fi +--- gv-3.5.8.orig/debian/shlibs.local ++++ gv-3.5.8/debian/shlibs.local +@@ -0,0 +1 @@ ++libXaw3d 6 xaw3dg (>= 1.3-6) +--- gv-3.5.8.orig/debian/gv.mime ++++ gv-3.5.8/debian/gv.mime +@@ -0,0 +1,5 @@ ++application/postscript; /usr/bin/X11/gv %s; test=test -n "$DISPLAY"; description=postscript ++application/ghostview; /usr/bin/X11/gv %s; test=test -n "$DISPLAY" ++application/pdf; /usr/bin/X11/gv %s; test=test -n "$DISPLAY" ++ ++ +--- gv-3.5.8.orig/debian/gv_icon.xpm ++++ gv-3.5.8/debian/gv_icon.xpm +@@ -0,0 +1,59 @@ ++/* XPM */ ++static char * gv_icon_xpm[] = { ++/* width height num_colors chars_per_pixel */ ++"50 50 3 1", ++/* colors */ ++" c None", ++". c black", ++"X c white", ++/* pixels */ ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ...... ", ++" ..XXXX... ", ++" ..XXXXXXX.. ", ++" ..XXXXXXXXX. ", ++" ..XXXXXXXXXX. ", ++" ..XXXXXXXXXX. ", ++" ..XXXXXXXXX.. ", ++" ...XXXXXXX.. ", ++" .... ..XXXXXX.. ", ++" ..X.. ...XXXXX. .... ", ++" ...XX. ..XXXXX. ..XX.. ", ++" ...XX... .XXXXXX. ..XXXX. ", ++" ...XXX.....XXXXXXX.. ..XXX... ", ++" ...XXXXXXXXXXXXXXX....XXX.. ", ++" ....XXXXXXXXXXXXXXXXXXX.. ", ++" ...XXXXXXXXXXXXXXXXX.. ", ++" ...XXXXXXXXXXXXXXX.. ", ++" ...XXXXXXXXXXXXX.. ", ++" ..XXXXXXXXXXXXX.. ", ++" ...XXXXXXXXXXX.. ", ++" ...XXXXXXXXXX.. ", ++" ..XXXXXXXXXX. ", ++" ...XXXXXXXX.. ", ++" ...XXXXXXX. ", ++" ..XXXXXXX.. ", ++" ...XXXXXX.. ", ++" ...XXXXXX. ", ++" ...XXXXXX.. .. ", ++" ...XXXXX....... ", ++" ...XXXXXX....X. ", ++" ...XXXXXXXXX.. ", ++" ....XXXXXX.. ", ++" .......... ", ++" ....... ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" "}; diff --git a/gv-3.5.8-gcc4.patch b/gv-3.5.8-gcc4.patch new file mode 100644 index 0000000..6699d4c --- /dev/null +++ b/gv-3.5.8-gcc4.patch @@ -0,0 +1,40 @@ +--- source/misc.c ++++ source/misc.c 2005-04-13 16:48:09.631599707 +0000 +@@ -1479,6 +1479,7 @@ + XtSetValues(pagemediaButton, args, ONE); + out: + ENDMESSAGE(set_pagemediaButton_label) ++ return; /* For stupid compilers like gcc4 */ + } + + /*------------------------------------------------------------*/ +--- source/ps.c ++++ source/ps.c 2005-04-13 16:53:53.003469239 +0000 +@@ -163,7 +163,8 @@ + + static char *readline PT((FileData, char **, long *, unsigned int *)); + static char *gettextline PT((char *)); +-static char *gettext PT((char *,char **)); ++#define gettext(a, b) _gettext(a, b) ++static char *_gettext PT((char *,char **)); + static int blank PT((char *)); + static char *pscopyuntil PT((FileData,FILE *,long,long,char *)); + +--- source/signal.c ++++ source/signal.c 2005-04-13 16:54:16.178883017 +0000 +@@ -39,6 +39,7 @@ + # include + # include + #endif ++#include + + #include "paths.h" + #include INC_X11(Intrinsic.h) +@@ -55,6 +56,7 @@ + #endif + + #include "types.h" ++#include "config.h" + #include "callbacks.h" + #include "d_memdebug.h" + #include "main_resources.h" diff --git a/gv-3.5.8-sec2.patch b/gv-3.5.8-sec2.patch new file mode 100644 index 0000000..432f9bf --- /dev/null +++ b/gv-3.5.8-sec2.patch @@ -0,0 +1,28 @@ +--- source/ps.c ++++ source/ps.c 2006-11-09 17:37:07.000000000 +0000 +@@ -1423,6 +1423,10 @@ + quoted=1; + line++; + while (*line && !(*line == ')' && level == 0 )) { ++ if (cp - text >= PSLINELENGTH - 2) { ++ ENDMESSAGE(gettext) ++ return NULL; ++ } + if (*line == '\\') { + if (*(line+1) == 'n') { + *cp++ = '\n'; +@@ -1477,8 +1481,13 @@ + } + } + } else { +- while (*line && !(*line == ' ' || *line == '\t' || *line == '\n')) ++ while (*line && !(*line == ' ' || *line == '\t' || *line == '\n')) { ++ if (cp - text >= PSLINELENGTH - 2) { ++ ENDMESSAGE(gettext) ++ return NULL; ++ } + *cp++ = *line++; ++ } + } + *cp = '\0'; + if (next_char) *next_char = line; diff --git a/gv-3.5.8-security.patch b/gv-3.5.8-security.patch new file mode 100644 index 0000000..f217ac4 --- /dev/null +++ b/gv-3.5.8-security.patch @@ -0,0 +1,697 @@ +--- 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 @@ + #define memset(a,b,c) bzero(a,c) + #endif + ++extern int sec_scanf(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 @@ + 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)); + /*###jp###*/ + /*doc->epsf = iscomment(text, "EPSF-");*/ + doc->epsf = iscomment(text, "EPSF"); +@@ -576,7 +578,7 @@ + } 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)); + if (strcmp(text, "(atend)") == 0) { + bb_set = ATEND; + } else { +@@ -608,7 +610,7 @@ + } + } else if (orientation_set == NONE && + iscomment(line+2, "Orientation:")) { +- sscanf(line+length("%%Orientation:"), "%s", text); ++ sec_sscanf(line+length("%%Orientation:"), "%s", text, sizeof(text)); + if (strcmp(text, "(atend)") == 0) { + orientation_set = ATEND; + } else if (strcmp(text, "Portrait") == 0) { +@@ -619,7 +621,7 @@ + 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)); + if (strcmp(text, "(atend)") == 0) { + page_order_set = ATEND; + } else if (strcmp(text, "Ascend") == 0) { +@@ -633,7 +635,7 @@ + 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)); + if (strcmp(text, "(atend)") == 0) { + pages_set = ATEND; + } else { +@@ -853,7 +855,7 @@ + /* 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)); + if (strcmp(text, "Portrait") == 0) { + doc->default_page_orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -975,7 +977,7 @@ + /* 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)); + if (strcmp(text, "Portrait") == 0) { + doc->default_page_orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -1112,7 +1114,7 @@ + /* 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)); + if (strcmp(text, "Portrait") == 0) { + doc->pages[doc->numpages].orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -1144,7 +1146,7 @@ + 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)); + if (strcmp(text, "(atend)") == 0) { + page_bb_set = ATEND; + } else { +@@ -1258,14 +1260,14 @@ + } + } else if (orientation_set == ATEND && + iscomment(line+2, "Orientation:")) { +- sscanf(line+length("%%Orientation:"), "%s", text); ++ sec_sscanf(line+length("%%Orientation:"), "%s", text, sizeof(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)); + if (strcmp(text, "Ascend") == 0) { + doc->pageorder = ASCEND; + } else if (strcmp(text, "Descend") == 0) { +@@ -1819,7 +1821,7 @@ + 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 (strcmp(text, "Lines") == 0) { + INFIMESSAGE(number of lines to skip:,num) + while (num) { +@@ -1918,7 +1920,7 @@ + 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 (strcmp(text, "Lines") == 0) { + INFIMESSAGE(number of lines:,num) + while (num) { +@@ -2015,7 +2017,7 @@ + PS_free(comment); + continue; + } +- sscanf(comment+length("%%Pages:"), "%s", text); ++ sec_sscanf(comment+length("%%Pages:"), "%s", text, sizeof(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 +@@ -0,0 +1,540 @@ ++/* ++ * Secure sscanf - sscanf with an additional size argument for string ++ * arguments. All format specifiers should work as in the standard ++ * scanf - except for those writing to a string buffer provided by the ++ * caller. These specifiers take an additional argument of type size_t ++ * that specifies the size of the buffer. ++ * ++ * Copyright (C) 2002, Olaf Kirch ++ */ ++ ++#define _GNU_SOURCE ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++enum { ++ CONV_ANY, ++ CONV_STR, ++ CONV_NUM, ++ CONV_INTEGER, ++ CONV_FLOAT, ++ CONV_POINTER, ++}; ++ ++enum { ++ SIZE_ANY, ++ SIZE_SHORT, ++ SIZE_LONG, ++ SIZE_QUAD, ++}; ++ ++union scan_value { ++ const char * v_string; ++ long long v_signed; ++ unsigned long long v_integer; ++ long double v_double; ++ void * v_pointer; ++}; ++ ++ ++static int process_number(union scan_value *vp, const char **sp, char fmt); ++static int process_char_class(const char **, const char **, int); ++ ++static inline int ++set_conv_type(int *type, int new_type) ++{ ++ switch (*type) { ++ case CONV_ANY: ++ break; ++ case CONV_NUM: ++ if (new_type == CONV_INTEGER ++ || new_type == CONV_FLOAT ++ || new_type == CONV_POINTER) ++ break; ++ /* fallthru */ ++ default: ++ if (*type != new_type) ++ return 0; ++ break; ++ } ++ ++ *type = new_type; ++ return 1; ++} ++ ++int ++sec_sscanf(const char *s, const char *fmt, ...) ++{ ++ const char *begin = s; ++ int num_fields = 0, fmt_empty = 1; ++ va_list ap; ++ ++ va_start(ap, fmt); ++ while (*fmt) { ++ union scan_value value; ++ const char *pre_space_skip, ++ *value_begin; ++ int assign = 1, allocate = 0, ++ conv_type = CONV_ANY, ++ conv_size = SIZE_ANY, ++ field_width = -1, ++ nul_terminated = 1; ++ char c; ++ ++ c = *fmt++; ++ if (isspace(c)) { ++ while (isspace(*s)) ++ s++; ++ continue; ++ } ++ ++ fmt_empty = 0; ++ if (c != '%') { ++ if (c != *s) ++ goto stop; ++ s++; ++ continue; ++ } ++ ++ /* Each % directive implicitly skips white space ++ * except for the %c case */ ++ pre_space_skip = s; ++ while (isspace(*s)) ++ s++; ++ ++ while (1) { ++ int type = CONV_ANY, size = SIZE_ANY; ++ ++ switch (*fmt) { ++ case '*': ++ assign = 0; ++ break; ++ case 'a': ++ type = CONV_STR; ++ allocate = 1; ++ break; ++ case 'h': ++ type = CONV_INTEGER; ++ size = SIZE_SHORT; ++ break; ++ case 'l': ++ type = CONV_NUM; ++ size = SIZE_LONG; ++ break; ++ case 'L': ++ case 'q': ++ type = CONV_NUM; ++ size = SIZE_QUAD; ++ break; ++ case '0': case '1': case '2': case '3': case '4': ++ case '5': case '6': case '7': case '8': case '9': ++ field_width = strtol(fmt, (char **) &fmt, 10); ++ fmt--; ++ break; ++ default: ++ goto flags_done; ++ } ++ ++ if (!set_conv_type(&conv_type, type)) ++ goto stop; ++ ++ if (size != SIZE_ANY) { ++ if (size == SIZE_LONG && conv_size == SIZE_LONG) ++ conv_size = SIZE_QUAD; ++ else ++ conv_size = size; ++ } ++ ++ fmt++; ++ } ++ ++ flags_done: ++ value_begin = s; ++ ++ switch (*fmt++) { ++ case '%': ++ if (*s == '\0') ++ goto eof; ++ if (*s != '%') ++ goto stop; ++ continue; ++ case '[': ++ value.v_string = s; ++ if (!set_conv_type(&conv_type, CONV_STR) ++ || !process_char_class(&fmt, &s, field_width)) ++ goto stop; ++ break; ++ case 's': ++ value.v_string = s; ++ if (!set_conv_type(&conv_type, CONV_STR)) ++ goto stop; ++ while (*s && !isspace(*s) && field_width-- != 0) ++ s++; ++ break; ++ case 'c': ++ if (!set_conv_type(&conv_type, CONV_STR)) ++ goto stop; ++ value.v_string = s = value_begin = pre_space_skip; ++ ++ if (field_width < 0) ++ s++; ++ else while (*s && field_width--) ++ s++; ++ nul_terminated = 0; ++ break; ++ case 'd': ++ case 'i': ++ case 'o': ++ case 'u': ++ case 'x': ++ case 'X': ++ if (!set_conv_type(&conv_type, CONV_INTEGER) ++ || !process_number(&value, &s, fmt[-1])) ++ goto stop; ++ break; ++ case 'p': ++ if (!set_conv_type(&conv_type, CONV_POINTER) ++ || !process_number(&value, &s, fmt[-1])) ++ goto stop; ++ break; ++ case 'f': ++ case 'g': ++ case 'e': ++ case 'E': ++ if (!set_conv_type(&conv_type, CONV_FLOAT) ++ || !process_number(&value, &s, fmt[-1])) ++ goto stop; ++ break; ++ case 'n': ++ if (!set_conv_type(&conv_type, CONV_INTEGER)) ++ goto stop; ++ value.v_signed = (s - begin); ++ break; ++ default: ++ goto stop; ++ } ++ ++ /* We've consumed what we need to consume. Now copy */ ++ if (!assign) ++ continue; ++ ++ /* Make sure we've consumed at least *something* */ ++ if (s == value_begin) ++ goto eof; ++ ++ /* Deal with a conversion flag */ ++ if (conv_type == CONV_STR && allocate) { ++ value.v_pointer = strndup(value.v_string, s - value.v_string); ++ conv_type = CONV_POINTER; ++ allocate = 0; ++ } ++ ++ switch (conv_type) { ++ case CONV_STR: ++ { ++ const char *string = value.v_string; ++ char *buf; ++ size_t size; ++ ++ if (string == NULL) ++ goto stop; ++ buf = va_arg(ap, char *); ++ size = va_arg(ap, size_t) - nul_terminated; ++ if (size > s - string) ++ size = s - string; ++ strncpy(buf, string, size); ++ if (nul_terminated) ++ buf[size] = '\0'; ++ } ++ break; ++ ++ case CONV_POINTER: ++ { ++ void **ptr; ++ ++ ptr = va_arg(ap, void **); ++ *ptr = value.v_pointer; ++ } ++ break; ++ case CONV_INTEGER: ++ { ++ void *ptr; ++ ++ ptr = va_arg(ap, void *); ++ switch (conv_size) { ++ case SIZE_SHORT: ++ *(short *) ptr = value.v_integer; ++ break; ++ case SIZE_ANY: ++ *(int *) ptr = value.v_integer; ++ break; ++ case SIZE_LONG: ++ *(long *) ptr = value.v_integer; ++ break; ++ case SIZE_QUAD: ++ *(long long *) ptr = value.v_integer; ++ break; ++ default: ++ goto stop; ++ } ++ } ++ break; ++ case CONV_FLOAT: ++ { ++ void *ptr; ++ ++ ptr = va_arg(ap, void *); ++ switch (conv_size) { ++ case SIZE_ANY: ++ *(float *) ptr = value.v_double; ++ break; ++ case SIZE_LONG: ++ *(double *) ptr = value.v_double; ++ break; ++ case SIZE_QUAD: ++ *(long double *) ptr = value.v_double; ++ break; ++ default: ++ goto stop; ++ } ++ } ++ break; ++ default: ++ goto stop; ++ } ++ ++ num_fields++; ++ } ++ ++stop: return num_fields; ++ ++eof: if (num_fields) ++ return num_fields; ++ return EOF; ++} ++ ++static int ++process_number(union scan_value *vp, const char **sp, char fmt) ++{ ++ const char *s = *sp; ++ ++ switch (fmt) { ++ case 'd': ++ vp->v_signed = strtoll(s, (char **) sp, 10); ++ break; ++ case 'i': ++ vp->v_signed = strtoll(s, (char **) sp, 0); ++ break; ++ case 'o': ++ vp->v_integer = strtoull(s, (char **) sp, 8); ++ break; ++ case 'u': ++ vp->v_integer = strtoull(s, (char **) sp, 10); ++ break; ++ case 'x': ++ case 'X': ++ vp->v_integer = strtoull(s, (char **) sp, 16); ++ break; ++ case 'p': ++ vp->v_pointer = (void *) strtoull(s, (char **) sp, 0); ++ break; ++ case 'f': ++ case 'g': ++ case 'e': ++ case 'E': ++ vp->v_double = strtold(s, (char **) sp); ++ break; ++ default: ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static int ++process_char_class(const char **fmt, const char **sp, int width) ++{ ++ unsigned char *s, c, prev_char = 0; ++ unsigned char table[255]; ++ int val = 1; ++ ++ s = (unsigned char *) *fmt; ++ if (*s == '^') { ++ memset(table, 1, sizeof(table)); ++ val = 0; ++ s++; ++ } else { ++ memset(table, 0, sizeof(table)); ++ val = 1; ++ } ++ /* First character in set is closing bracket means add it to the ++ * set of characters */ ++ if ((c = *s) == ']') { ++ table[c] = val; ++ prev_char = c; ++ s++; ++ } ++ ++ /* Any other closing bracket finishes off the set */ ++ while ((c = *s++) != ']') { ++ if (prev_char) { ++ if (c == '-' && *s != '\0' && *s != ']') { ++ c = *s++; ++ } else { ++ //table[prev_char] = val; ++ prev_char = '\0'; ++ } ++ } ++ ++ if (c == '\0') ++ return 0; ++ ++ if (prev_char) { ++ while (prev_char < c) ++ table[prev_char++] = val; ++ } ++ table[c] = val; ++ prev_char = c; ++ } ++ *fmt = (char *) s; ++ ++#if 0 ++ { ++ int n; ++ ++ printf("char class="); ++ for (n = 0; n < 255; n++) ++ if (table[n]) ++ printf(isprint(n)? "%c" : "\\%03o", n); ++ printf("\n"); ++ } ++#endif ++ ++ s = (unsigned char *) *sp; ++ while ((c = *s) != '\0' && table[c] && width--) ++ s++; ++ ++ *sp = (char *) s; ++ return 1; ++} ++ ++#ifdef TEST ++static int verify(const char *fmt, const char *s); ++static int verify_s(const char *fmt, const char *s); ++ ++enum { S, I, L, F, D, P }; ++ ++int ++main(int argc, char **argv) ++{ ++ verify("%d %d", "12 13"); ++ verify("%d-%d", "12 13"); ++ verify("%d-%d", "12-13"); ++ verify("%u %u", "12 13"); ++ verify("%o %o", "12 13"); ++ verify("%x %x", "12 13"); ++ verify("%X %X", "12 13"); ++ verify("%hd %hd", "12 13"); ++ verify("%ld %ld", "12 13"); ++ verify("%lld %lld", "12 13"); ++ verify("%Ld %Ld", "12 13"); ++ verify("%qd %qd", "12 13"); ++ verify("%f %f", "12 13"); ++ verify("%lf %lf", "12 13"); ++ verify("%Lf %Lf", "12 13"); ++ verify("%qf %qf", "12 13"); ++ verify("%*d-%d", "12-13"); ++ verify("%*s %d", "12 13"); ++ verify("%p", "0xdeadbeef"); ++ verify("%*[a-e] %x", "deadbeef feeb"); ++ verify("%*[a-f] %x", "deadbeef feeb"); ++ verify("%*[^g-z] %x", "deadbeef feeb"); ++ verify("%*[^ g-z] %x", "deadbeef feeb"); ++ verify("%*[^ g-z-] %x", "dead-beef feeb"); ++ verify("%*5s %d", "toast123 456"); ++ verify("", "lalla"); ++ verify("%u", ""); ++ ++ verify_s("%s", "aa bb"); ++ verify_s("%s %s", "aa bb"); ++ verify_s("%[a-z] %s", "aa bb"); ++ verify_s("%c %s", "aa bb"); ++ verify_s("%2c %s", " aa bb"); ++ verify_s("%20c %s", " aa bb"); ++ ++ return 0; ++} ++ ++static int ++verify(const char *fmt, const char *s) ++{ ++ union scan_value vals[5], vals_ref[5], *v; ++ int n, m; ++ ++ memset(vals, 0xe5, sizeof(vals)); ++ memset(vals_ref, 0xe5, sizeof(vals_ref)); ++ ++ v = vals; ++ n = sec_sscanf(s, fmt, v + 0, v + 1, v + 2, v + 3, v + 4); ++ ++ v = vals_ref; ++ m = sscanf(s, fmt, v + 0, v + 1, v + 2, v + 3, v + 4); ++ ++ if (m != n) { ++ printf("FAILED: fmt=\"%s\"\n" ++ " str=\"%s\"\n" ++ " sec_scanf returns %d, sscanf returns %d\n", ++ fmt, s, n, m); ++ return 0; ++ } ++ ++ if (memcmp(vals, vals_ref, sizeof(vals))) { ++ printf("FAILED: fmt=\"%s\"\n" ++ " str=\"%s\"\n" ++ " data differs!\n", ++ fmt, s); ++ printf("0x%Lx != 0x%Lx\n", vals[0].v_integer, vals_ref[0].v_integer); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static int ++verify_s(const char *fmt, const char *s) ++{ ++ char buf[3][256], buf_ref[3][256]; ++ int n, m; ++ ++ memset(buf, 0xe5, sizeof(buf)); ++ memset(buf_ref, 0xe5, sizeof(buf_ref)); ++ ++ n = sec_sscanf(s, fmt, buf, sizeof(buf[0]), buf + 1, sizeof(buf[1]), buf + 2, sizeof(buf[2])); ++ ++ m = sscanf(s, fmt, buf_ref, buf_ref + 1, buf_ref + 2); ++ ++ if (m != n) { ++ printf("FAILED: fmt=\"%s\"\n" ++ " str=\"%s\"\n" ++ " sec_scanf returns %d, sscanf returns %d\n", ++ fmt, s, n, m); ++ return 0; ++ } ++ ++ if (memcmp(buf, buf_ref, sizeof(buf))) { ++ printf("FAILED: fmt=\"%s\"\n" ++ " str=\"%s\"\n" ++ " data differs!\n", ++ fmt, s); ++ printf("%s != %s\n", buf[0], buf_ref[0]); ++ return 0; ++ } ++ ++ return 1; ++} ++#endif diff --git a/gv-3.5.8.dif b/gv-3.5.8.dif new file mode 100644 index 0000000..9503b9e --- /dev/null +++ b/gv-3.5.8.dif @@ -0,0 +1,226 @@ +--- .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 +--- NOTE ++++ NOTE 2006-02-28 15:49:27.000000000 +0100 +@@ -0,0 +1,48 @@ ++ ++** ++** Copyright (C) 1995, 1996, 1997 Johannes Plass ++** ++** 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 ++** the Free Software Foundation; either version 2 of the License, or ++** (at your option) any later version. ++** ++** This program is distributed in the hope that it will be useful, ++** but WITHOUT ANY WARRANTY; without even the implied warranty of ++** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++** GNU General Public License for more details. ++** ++** You should have received a copy of the GNU General Public License ++** along with this program; if not, write to the Free Software ++** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++** ++** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de) ++** Department of Physic ++** Johannes Gutenberg-University ++** Mainz, Germany ++** ++ ++GV is real based on ghostview 1.5 by Tim Theisen: ++ ++ * Ghostview.c -- Ghostview widget. ++ * Copyright (C) 1992 Timothy O. Theisen ++ * ++ * 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 ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Author: Tim Theisen Systems Programmer ++ * Internet: tim@cs.wisc.edu Department of Computer Sciences ++ * 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"; ++# 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"; ++ } ++# 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 @@ + GV*Scrollbar.pointerColor: black + GV*Scrollbar.pointerColorBackground: White + GV*Scrollbar.scrollbarBackground: gray71 +-GV*Scrollbar.foreground: gray78 ++GV*Scrollbar.foreground: gray65 + 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 @@ + else if ( no == O_LANDSCAPE) w = landscapeEntry; + else if ( no == O_UPSIDEDOWN) w = upsidedownEntry; + else w = seascapeEntry; +- set_newBitmapIfChanged(w,bitmap); ++ if (w) ++ set_newBitmapIfChanged(w,bitmap); + + if (gv_swap_landscape != gv_swap_landscape_old) + widgets_setSelectedBitmap(swapEntry,gv_swap_landscape); +@@ -1467,12 +1468,15 @@ + Widget w; + if (pagemediaEntry[media_id]) w = pagemediaEntry[media_id]; + else w = pagemediaEntry[media_id-1]; ++ if (!w) ++ goto out; + XtSetArg(args[0], XtNlabel, &s); + XtGetValues(w, args, ONE); + } + else s = "?"; + XtSetArg(args[0], XtNlabel, s); + XtSetValues(pagemediaButton, args, ONE); ++out: + ENDMESSAGE(set_pagemediaButton_label) + } + +@@ -1541,7 +1545,8 @@ + else bitmap = app_res.selected_bitmap; + if (pagemediaEntry[gv_pagemedia]) w = pagemediaEntry[gv_pagemedia]; + else w = pagemediaEntry[gv_pagemedia-1]; +- set_newBitmapIfChanged(w,bitmap); ++ if (w) ++ set_newBitmapIfChanged(w,bitmap); + } + + 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) + #endif + + #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) diff --git a/gv-3.5.8.tar.bz2 b/gv-3.5.8.tar.bz2 new file mode 100644 index 0000000..12b110a --- /dev/null +++ b/gv-3.5.8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a96115c3f9bb76cbb851b94570cef726f1c597f5683f9cf95e8b016a66d67e1 +size 314416 diff --git a/gv.changes b/gv.changes new file mode 100644 index 0000000..a9d6ee4 --- /dev/null +++ b/gv.changes @@ -0,0 +1,195 @@ +------------------------------------------------------------------- +Wed Nov 17 13:00:41 CET 2006 - werner@suse.de + +- Corrected version of last fix (bug #219454) + +------------------------------------------------------------------- +Thu Nov 9 18:45:59 CET 2006 - werner@suse.de + +- Avoid buffer overflow in gv gettext() (bug #219454) + +------------------------------------------------------------------- +Thu Aug 24 12:55:08 CEST 2006 - werner@suse.de + +- Check for existence of gv.png + +------------------------------------------------------------------- +Wed Aug 2 15:01:57 CEST 2006 - werner@suse.de + +- Make it build with X11R7 + +------------------------------------------------------------------- +Tue Feb 28 15:50:41 CET 2006 - werner@suse.de + +- Fix range of array subscript (bug #154109) + +------------------------------------------------------------------- +Wed Jan 25 21:36:24 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Nov 29 17:32:27 CET 2005 - sbrabec@suse.cz + +- Don't package icon already present in desktop-data-SuSE. + Cleans rpm -V output. + +------------------------------------------------------------------- +Tue Jun 7 12:54:32 CEST 2005 - meissner@suse.de + +- Use RPM_OPT_FLAGS. + +------------------------------------------------------------------- +Mon May 23 19:48:03 CEST 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 12:22:18 CEST 2005 - werner@suse.de + +- Set DELAYSAFER for dsc file of the pdf within a pipe (bug #78322) + +------------------------------------------------------------------- +Wed Apr 13 18:57:33 CEST 2005 - werner@suse.de + +- Add a return after label even for void functions for stupid gcc4 + +------------------------------------------------------------------- +Wed Nov 17 14:43:17 CET 2004 - werner@suse.de + +- Add gv.png pixmap to file list + +------------------------------------------------------------------- +Mon Jun 28 12:48:12 CEST 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 + available. For example, Korean fonts in sizes other than 16 + pixel are usually not available in a Japanese installation. + Therefore one gets warnings because the ja_JP.UTF-8/XLC_LOCALE \ + file usually specifies the charset KSC5601.1987-0 as well. + 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 11:38:29 CEST 2004 - adrian@suse.de + +- add "Office" to Categories to match the menu definition (#41338) + +------------------------------------------------------------------- +Fri Apr 30 22:42:18 CEST 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 + "converting integer to pointer of different size" +- 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 15:09:03 CEST 2004 - werner@suse.de + +- correct category for desktop file: "PostScript Viewer" + -> "Viewer". + +------------------------------------------------------------------- +Tue Apr 6 17:11:14 CEST 2004 - werner@suse.de + +- Add desktop entry + +------------------------------------------------------------------- +Sat Jan 10 22:34:29 CET 2004 - adrian@suse.de + +- add %defattr + +------------------------------------------------------------------- +Mon Aug 25 16:57:41 CEST 2003 - werner@suse.de + +- Fix menu entry for bunzip2 label + +------------------------------------------------------------------- +Fri Aug 22 16:32:04 CEST 2003 - werner@suse.de + +- Uncompress bzip2 files on the fly, patch based on + Volker Kuhlmann's patch (bug #29260) + +------------------------------------------------------------------- +Tue Apr 15 17:20:31 CEST 2003 - coolo@suse.de + +- use BuildRoot + +------------------------------------------------------------------- +Mon Mar 10 18:09:16 CET 2003 - werner@suse.de + +- Fix sigsegv in case of unkown paper size. + +------------------------------------------------------------------- +Fri Nov 8 12:12:15 CET 2002 - werner@suse.de + +- Remove XCOMM definition to make new cpp happy + +------------------------------------------------------------------- +Fri Sep 20 14:08:42 CEST 2002 - okir@suse.de + +- added security patch to address buffer overflows + +------------------------------------------------------------------- +Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de + +- removed bogus self-provides + +------------------------------------------------------------------- +Mon Jan 14 11:02:31 CET 2002 - schwab@suse.de + +- Fix use of token concatenation. + +------------------------------------------------------------------- +Fri Jun 22 00:50:33 CEST 2001 - ro@suse.de + +- use ComplexProgramTargetNoMan + +------------------------------------------------------------------- +Fri Oct 6 18:04:50 CEST 2000 - kukuk@suse.de + +- change group tag +- Remove bogus xshared requires, rpm will handle this correct + +------------------------------------------------------------------- +Wed May 24 22:38:58 CEST 2000 - kukuk@suse.de + +- Use /usr/share/doc/packages + +------------------------------------------------------------------- +Mon Jan 24 16:21:25 CET 2000 - werner@suse.de + + - Add Debian patch 15 for gv 3.5.8 + - Use RPM_OPT_FLAGS + +------------------------------------------------------------------- +Mon Sep 20 17:04:59 CEST 1999 - ro@suse.de + +- added Requires ghostscript_x11 + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +---------------------------------------------------------------------------- +Wed Oct 15 15:52:39 MET DST 1997 - werner@suse.de + - New version: 3.5.8 + - This version is usable only with Xaw3d +---------------------------------------------------------------------------- +Thu Feb 13 23:44:02 MET 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. + - Some small changes on app-defaults for + better viewing in all three Athena Widgets + diff --git a/gv.spec b/gv.spec new file mode 100644 index 0000000..363aff3 --- /dev/null +++ b/gv.spec @@ -0,0 +1,241 @@ +# +# spec file for package gv (Version 3.5.8) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: gv +BuildRequires: desktop-data-SuSE update-desktop-files xaw3d xorg-x11 xorg-x11-devel +License: GNU General Public License (GPL) +Group: Productivity/Publishing/PS +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/ +Summary: A Program to View PostScript Files +Version: 3.5.8 +Release: 1186 +Source0: gv-3.5.8.tar.bz2 +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 +# 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 +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 _x11data %{_exec_prefix}/lib/X11 +%define _appdefdir %{_x11data}/app-defaults +%else +%define _x11data %{_datadir}/X11 +%define _appdefdir %{_x11data}/app-defaults +%endif + +%description +GV offers you an X Window System GUI for viewing PostScript files. This +is an X Window System interface to ghostscript. + + + +Authors: +-------- + Tim Theisen + Johannes Plass + +%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 + +%build +xmkmf -a +make CCOPTIONS="$RPM_OPT_FLAGS" + +%install +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install +make DESTDIR=%{buildroot} install.man +make DESTDIR=%{buildroot} install.doc +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} +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 \ + > %{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 +%suse_update_desktop_file -i gv Office Viewer +if test -e /usr/share/pixmaps/gv.png; then + rm %{buildroot}/usr/share/pixmaps/gv.png + > filelist +else + echo /usr/share/pixmaps/gv.png > filelist +fi + +%files -f filelist +%defattr(-,root,root) +/usr/share/applications/gv.desktop +%dir %{_x11data}/gv/ +%config %{_x11data}/gv/gv_system.ad +%config %{_x11data}/gv/gv_user.ad +%config %{_x11data}/gv/gv_class.ad +%config %{_appdefdir}/GV +%dir %{_x11data}/?? +%dir %{_x11data}/??_* +%dir %{_x11data}/*/app-defaults +%config %{_x11data}/ja*/app-defaults/GV +%{_bindir}/gv +%doc %{_mandir}/man1/gv.1x.gz +%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 -n gv +* Fri Nov 17 2006 - werner@suse.de +- Corrected version of last fix (bug #219454) +* Thu Nov 09 2006 - werner@suse.de +- Avoid buffer overflow in gv gettext() (bug #219454) +* Thu Aug 24 2006 - werner@suse.de +- Check for existence of gv.png +* Wed Aug 02 2006 - werner@suse.de +- Make it build with X11R7 +* Tue Feb 28 2006 - werner@suse.de +- Fix range of array subscript (bug #154109) +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* 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 +- Use RPM_OPT_FLAGS. +* 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 +- Set DELAYSAFER for dsc file of the pdf within a pipe (bug #78322) +* 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 +- Add gv.png pixmap to file list +* 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 + available. For example, Korean fonts in sizes other than 16 + pixel are usually not available in a Japanese installation. + Therefore one gets warnings because the ja_JP.UTF-8/XLC_LOCALE \ + file usually specifies the charset KSC5601.1987-0 as well. + 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 +- add "Office" to Categories to match the menu definition (#41338) +* 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 + "converting integer to pointer of different size" +- 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 +- correct category for desktop file: "PostScript Viewer" + -> "Viewer". +* Tue Apr 06 2004 - werner@suse.de +- Add desktop entry +* Sat Jan 10 2004 - adrian@suse.de +- add %%defattr +* Mon Aug 25 2003 - werner@suse.de +- Fix menu entry for bunzip2 label +* 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 +- use BuildRoot +* Mon Mar 10 2003 - werner@suse.de +- Fix sigsegv in case of unkown paper size. +* Fri Nov 08 2002 - werner@suse.de +- Remove XCOMM definition to make new cpp happy +* Fri Sep 20 2002 - okir@suse.de +- added security patch to address buffer overflows +* Tue Sep 17 2002 - ro@suse.de +- removed bogus self-provides +* Mon Jan 14 2002 - schwab@suse.de +- Fix use of token concatenation. +* Fri Jun 22 2001 - ro@suse.de +- use ComplexProgramTargetNoMan +* 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 +- Use /usr/share/doc/packages +* 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 +- added Requires ghostscript_x11 +* 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 +- New version: 3.5.8 + - This version is usable only with Xaw3d +* Thu Feb 13 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. + - Some small changes on app-defaults for + better viewing in all three Athena Widgets diff --git a/gv.test b/gv.test new file mode 100644 index 0000000..6a923f0 --- /dev/null +++ b/gv.test @@ -0,0 +1,21 @@ + Testform für GV + =============== + +15.10.1997: Version 3.5.8 +Maintainer: werner + +Vorraussetzungen: +================= + +X, gs und xaw3d müssen installiert sein. + +Starten: +======== + +gv mit einem PostScript-File als Argument aufrufen. + +Ergebnisse: +=========== + +Hmmm --- das hängt vom PostScript-File ab :-) + diff --git a/intptr_t.patch b/intptr_t.patch new file mode 100644 index 0000000..650634c --- /dev/null +++ b/intptr_t.patch @@ -0,0 +1,311 @@ +--- gv-3.5.8/source/FileSel.c 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8.new/source/FileSel.c 2004-04-30 16:35:07.317969358 +0200 +@@ -35,6 +35,7 @@ + #include /* for malloc etc.*/ + #include /* for toupper */ + #include ++#include + + #ifdef VMS + # include /* for chdir etc. */ +@@ -1085,9 +1086,9 @@ + 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); + } + } + } +@@ -1753,7 +1754,7 @@ + XtPointer client_data, call_data; + { + FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); +- int item = (int) call_data; ++ int item = (intptr_t) call_data; + char newpath[FS_MAXNAMLEN]; + + BEGINMESSAGE(TopDirSelectionProc) +@@ -1799,7 +1800,7 @@ + { + FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); + char name[10]; +- int item = (int) call_data; ++ int item = (intptr_t) call_data; + + BEGINMESSAGE(CurDirSelectionProc) + +@@ -1841,7 +1842,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int item = (int)call_data; ++ int item = (intptr_t)call_data; + FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); + char newpath[FS_MAXNAMLEN]; + +@@ -1946,14 +1947,14 @@ + { + Widget clip=NULL,aaa=NULL,scroll=NULL; + FS_WIDGET p; +- int style = (int)client_data; ++ int 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) { +--- gv-3.5.8/source/actions.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8.new/source/actions.c 2004-04-30 16:35:07.317969358 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "paths.h" + #include INC_X11(Intrinsic.h) +@@ -897,7 +898,7 @@ + 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 @@ + 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 @@ + 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 @@ + } + + 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) + } +--- gv-3.5.8/source/callbacks.c 2004-04-30 16:29:44.124745274 +0200 ++++ gv-3.5.8.new/source/callbacks.c 2004-04-30 16:35:07.318969151 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #ifndef BUFSIZ + # define BUFSIZ 1024 +@@ -150,8 +151,8 @@ + + BEGINMESSAGE(cb_newtocScrollbar) + x = (int) newtocControl->core.x; +- if (((int)client_data)==1) { +- int dy = (int)call_data; ++ if (((intptr_t)client_data)==1) { ++ int dy = (intptr_t)call_data; + y = (int) newtocControl->core.y - dy; + } else { + float *percent = (float *) call_data; +@@ -260,7 +261,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int i = (int)client_data; ++ int i = (intptr_t)client_data; + + BEGINMESSAGE(cb_useBackingPixmap) + if (i&1) { +@@ -364,7 +365,7 @@ + int changed; + + BEGINMESSAGE(cb_checkFile) +- changed = check_file(((int)client_data)); ++ changed = check_file(((intptr_t)client_data)); + if (changed==1) show_page(current_page,NULL); + ENDMESSAGE(cb_checkFile) + } +@@ -386,7 +387,7 @@ + + 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; +@@ -506,7 +507,7 @@ + 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) { +@@ -624,7 +625,7 @@ + + 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,7 +709,7 @@ + int 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); +@@ -929,7 +930,7 @@ + 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; + +@@ -970,7 +971,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int r=(int)client_data; ++ int r=(intptr_t)client_data; + int entry=XawVlistInvalid,change=XawVlistInvalid; + + BEGINMESSAGE(cb_setPageMark) +@@ -1023,7 +1024,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int i=(int)client_data; ++ int i=(intptr_t)client_data; + + BEGINMESSAGE(cb_setScale) + i = scale_checkScaleNum(gv_scales,i); +@@ -1048,7 +1049,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int o = (int) client_data; ++ int o = (intptr_t) client_data; + int changed = 1; + + BEGINMESSAGE(cb_setOrientation) +@@ -1094,7 +1095,7 @@ + Widget w; + XtPointer client_data, call_data; + { +- int media = (int)client_data; ++ int media = (intptr_t)client_data; + int media_bbox = doc ? doc->nummedia : 0; + + BEGINMESSAGE(cb_setPagemedia) +--- gv-3.5.8/source/main.c 2004-04-30 16:33:43.972188696 +0200 ++++ gv-3.5.8.new/source/main.c 2004-04-30 16:36:16.194740767 +0200 +@@ -72,6 +72,8 @@ + # include + #endif + ++#include ++ + #include "types.h" + #include "actions.h" + #include "callbacks.h" +@@ -1038,8 +1040,8 @@ + 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) + } +--- gv-3.5.8/source/misc.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8.new/source/misc.c 2004-04-30 16:35:07.370958411 +0200 +@@ -64,6 +64,7 @@ + #include + #include + #include ++#include + + #ifndef SEEK_SET + # define SEEK_SET 0 +@@ -1647,7 +1648,7 @@ + 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); + } +@@ -1657,7 +1658,7 @@ + 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); +--- gv-3.5.8/source/options_gv.c 1997-06-07 00:00:00.000000000 +0200 ++++ gv-3.5.8.new/source/options_gv.c 2004-04-30 16:35:07.374957585 +0200 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include "paths.h" + #include INC_X11(Intrinsic.h) +@@ -251,7 +252,7 @@ + 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; +@@ -276,7 +277,7 @@ + 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; diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/settitle.patch b/settitle.patch new file mode 100644 index 0000000..a00feb6 --- /dev/null +++ b/settitle.patch @@ -0,0 +1,127 @@ +--- gv-3.5.8.orig/source/callbacks.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/callbacks.c 2004-04-30 22:59:00.768199359 +0200 +@@ -63,6 +63,11 @@ + # include + #endif + ++#include ++#include ++#include ++#include INC_X11(Xatom.h) ++ + #include "types.h" + #include "actions.h" + #include "callbacks.h" +@@ -96,6 +101,82 @@ + /* 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; +@@ -129,6 +210,8 @@ + } 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++; +--- gv-3.5.8.orig/source/main.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/main.c 2004-04-30 22:50:20.957594901 +0200 +@@ -908,6 +908,7 @@ + + INFMESSAGE(mapping toplevel) + XtMapWidget(toplevel); ++ cb_showTitle(toplevel, NULL, NULL); + } + + INFMESSAGE(waiting for events now) +--- gv-3.5.8.orig/source/misc.c 1997-06-21 00:00:00.000000000 +0200 ++++ gv-3.5.8/source/misc.c 2004-04-30 22:50:20.962593868 +0200 +@@ -980,7 +980,7 @@ + gv_pagemedia = m; + } + } +- cb_showTitle(NULL,NULL,NULL); ++ cb_showTitle(toplevel,NULL,NULL); + if (show_title) { + if (doc && doc->title) { + buttonlabel = doc->title;