diff --git a/gv-3.5.8-bzip2.patch b/gv-3.5.8-bzip2.patch deleted file mode 100644 index 1cf1c82..0000000 --- a/gv-3.5.8-bzip2.patch +++ /dev/null @@ -1,305 +0,0 @@ -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 deleted file mode 100644 index e461aa3..0000000 --- a/gv-3.5.8-deb.patch +++ /dev/null @@ -1,916 +0,0 @@ ---- 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 deleted file mode 100644 index 6699d4c..0000000 --- a/gv-3.5.8-gcc4.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- 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 deleted file mode 100644 index 432f9bf..0000000 --- a/gv-3.5.8-sec2.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- 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 deleted file mode 100644 index f217ac4..0000000 --- a/gv-3.5.8-security.patch +++ /dev/null @@ -1,697 +0,0 @@ ---- 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 deleted file mode 100644 index 9503b9e..0000000 --- a/gv-3.5.8.dif +++ /dev/null @@ -1,226 +0,0 @@ ---- .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 deleted file mode 100644 index 12b110a..0000000 --- a/gv-3.5.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a96115c3f9bb76cbb851b94570cef726f1c597f5683f9cf95e8b016a66d67e1 -size 314416 diff --git a/gv-3.5.8-I18N-mb.patch b/gv-3.6.3-I18N-mb.patch similarity index 54% rename from gv-3.5.8-I18N-mb.patch rename to gv-3.6.3-I18N-mb.patch index b1c8158..83426f7 100644 --- a/gv-3.5.8-I18N-mb.patch +++ b/gv-3.6.3-I18N-mb.patch @@ -1,6 +1,5 @@ -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 +--- README.I18N ++++ README.I18N 2005-05-23 19:45:33.000000000 +0200 @@ -0,0 +1,28 @@ +GV I18N Fontset Patch for Japanese + Keio University in Japan @@ -10,7 +9,7 @@ diff -Nru gv-3.5.8.orig/README.I18N gv-3.5.8/README.I18N + + 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 ++ file `$(SRC)/src/gv_font_res-I18N_mb.dat' and + recompile. + +NEED: @@ -30,115 +29,53 @@ diff -Nru gv-3.5.8.orig/README.I18N gv-3.5.8/README.I18N + + /* 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 +--- src/Makefile.am ++++ src/Makefile.am 2008-03-27 17:03:55.202558681 +0100 +@@ -12,7 +12,7 @@ appdefaultsdir = $(pkglibdir) - XCOMM -------------------------------------------------------------------- -+XCOMM --- Fontset support for I18N (multibyte charactor) -+XCOMM -------------------------------------------------------------------- -+#define I18N_MB -+#define NLS -+LINGUAS = ja_JP.eucJP + appdefaults_DATA = GV + +-EXTRA_DIST=ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ ++EXTRA_DIST=ad2c gv_font_res.dat gv_font_res-I18N_mb.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ + gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ + gv_selected.xbm gv_unmark.xbm + +@@ -208,7 +208,7 @@ $(srcdir)/gv_class.h : $(srcdir)/gv_clas + @echo "creating gv_class.h" + @sh $(srcdir)/ad2c $(srcdir)/gv_class.ad > $(srcdir)/gv_class.h + +-$(srcdir)/gv_class.ad : $(srcdir)/gv_font_res.dat $(srcdir)/gv_layout_res.dat $(srcdir)/gv_make_res.dat $(srcdir)/gv_misc_res.dat $(srcdir)/gv_user_res.dat $(srcdir)/gv_intern_res_unix.dat ++$(srcdir)/gv_class.ad : $(srcdir)/gv_font_res-I18N_mb.dat $(srcdir)/gv_layout_res.dat $(srcdir)/gv_make_res.dat $(srcdir)/gv_misc_res.dat $(srcdir)/gv_user_res.dat $(srcdir)/gv_intern_res_unix.dat + @echo "creating gv_class.ad" + cp $(srcdir)/gv_copyright.dat $(srcdir)/gv_class.ad + @echo "!" >> $(srcdir)/gv_class.ad +@@ -221,7 +221,7 @@ $(srcdir)/gv_class.ad : $(srcdir)/gv_fon + @cat $(srcdir)/gv_user_res.dat >> $(srcdir)/gv_class.ad + @cat $(srcdir)/gv_intern_res_unix.dat >> $(srcdir)/gv_class.ad + @cat $(srcdir)/gv_make_res.dat >> $(srcdir)/gv_class.ad +- @cat $(srcdir)/gv_font_res.dat >> $(srcdir)/gv_class.ad ++ @cat $(srcdir)/gv_font_res-I18N_mb.dat >> $(srcdir)/gv_class.ad + @cat $(srcdir)/gv_misc_res.dat >> $(srcdir)/gv_class.ad + @cat $(srcdir)/gv_layout_res.dat >> $(srcdir)/gv_class.ad + +@@ -262,3 +262,14 @@ endif + if USE_MEMDEBUG_CODE + gv_SOURCES += d_mem.c d_mem.h d_xtmem.c d_xtmem.h + endif + -+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-nls: ++ @for LNG in ja_JP.UTF-8 ko_KR.UTF-8; do \ ++ test -f gv_nls_$$LNG.dat || continue; \ ++ cat $(srcdir)/GV.ad > $(srcdir)/GV_$$LNG.ad; \ ++ cat $(srcdir)/gv_nls_$$LNG.dat >> $(srcdir)/GV_$$LNG.ad; \ ++ test -d $(DESTDIR)$(datadir)/X11/$$LNG/app-defaults || \ ++ $(mkdir_p) $(DESTDIR)$(datadir)/X11/$$LNG/app-defaults; \ + $(INSTALL) $(INSTALLFLAGS) \ -+ GV_$$LNG.ad $(DESTDIR)$(SHAREDIR)/$$LNG/app-defaults/GV; \ ++ $(srcdir)/GV_$$LNG.ad $(DESTDIR)$(datadir)/X11/$$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 @@ +--- src/callbacks.c ++++ src/callbacks.c 2005-05-23 19:45:33.000000000 +0200 +@@ -767,12 +767,6 @@ cb_openFile(w, client_data, call_data) BEGINMESSAGE(cb_openFile) XawFileSelectionRemoveButton(FileSel, 3); @@ -151,50 +88,62 @@ diff -Nru gv-3.5.8.orig/source/callbacks.c gv-3.5.8/source/callbacks.c 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 @@ +--- src/dialog.c ++++ src/dialog.c 2008-03-27 15:52:18.179200931 +0100 +@@ -29,6 +29,7 @@ + */ + + #include "config.h" ++#include "VlistP.h" + + #include + +@@ -270,20 +271,27 @@ void DialogPopupSetText(s) + Arg args[10]; + Cardinal n; + Widget response; ++ VlistWidget vw; + Dimension width; + # define DIALOG_POPUP_FREE_SPACE 50 # 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 @@ + if (!dialogPopupCreated) makeDialogPopup(); response = XtNameToWidget(DIALOG_POPUP, "*dialog_text"); ++ vw = (VlistWidget)response; n=0; -+#ifdef I18N_MB -+ XtSetArg(args[n], XtNfontSet, &fontset); n++; -+#else - XtSetArg(args[n], XtNfont, &font); n++; -+#endif +- XtSetArg(args[n], XtNfont, &font); n++; ++ if( vw->simple.international == True ) { ++ XtSetArg(args[n], XtNfontSet, &fontset); n++; ++ } else { ++ XtSetArg(args[n], XtNfont, &font); n++; ++ } XtSetArg(args[n], XtNleftMargin, &lm); n++; XtSetArg(args[n], XtNrightMargin, &rm); n++; XtSetArg(args[n], XtNborderWidth, &bw); n++; -@@ -287,8 +295,13 @@ +@@ -291,8 +299,12 @@ void DialogPopupSetText(s) 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; +- nw= ((font->max_bounds.width+font->min_bounds.width)*((Dimension)strlen(s))+1)/2 +- +lm+rm+DIALOG_POPUP_FREE_SPACE+2*bw; ++ if( vw->simple.international == True ) ++ nw= XmbTextEscapement( fontset, s, strlen(s)); ++ else ++ nw= ((font->max_bounds.width+font->min_bounds.width)*((Dimension)strlen(s))+1)/2; ++ nw += 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 +--- src/gv_font_res-I18N_mb.dat ++++ src/gv_font_res-I18N_mb.dat 2005-05-23 19:46:28.000000000 +0200 @@ -0,0 +1,52 @@ + +!########## gv_font_res_linux.dat @@ -248,10 +197,9 @@ diff -Nru gv-3.5.8.orig/source/gv_font_res-I18N_mb.dat gv-3.5.8/source/gv_font_r +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 @@ +--- src/gv_misc_res.dat ++++ src/gv_misc_res.dat 2005-05-23 19:45:33.000000000 +0200 +@@ -220,6 +220,10 @@ GV*optionsetupPopup*scalesFrame.forcedWi GV*optionsetupPopup*mediasFrame.forcedWidth: 240 GV*optionsetupPopup*mediasFrame.forcedHeight: 400 @@ -262,7 +210,7 @@ diff -Nru gv-3.5.8.orig/source/gv_misc_res.dat gv-3.5.8/source/gv_misc_res.dat !##### Panner GV*pannerFrame.frameType: sunken -@@ -317,6 +321,7 @@ +@@ -317,6 +321,7 @@ GV*checkFile.label: Check File GV*filters.label: Filters: GV*dirs.label: Directories GV*button1.label: Cancel @@ -270,9 +218,8 @@ diff -Nru gv-3.5.8.orig/source/gv_misc_res.dat gv-3.5.8/source/gv_misc_res.dat 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 +--- src/gv_nls_ja_JP.UTF-8.dat ++++ src/gv_nls_ja_JP.UTF-8.dat 2008-03-27 16:17:51.247892392 +0100 @@ -0,0 +1,202 @@ +! +!** Copyright (C) 1995, 1996, 1997 Johannes Plass @@ -305,180 +252,179 @@ diff -Nru gv-3.5.8.orig/source/gv_nls_ja_JP.eucJP.dat gv-3.5.8/source/gv_nls_ja_ + +!##### Zoom Popup + -+GV*zoomPopup.title: GV - ³ÈÂç²èÌÌ ++GV*zoomPopup.title: GV - æ‹¡å¤§ç”»é¢ + +!##### Info Popup + -+GV*infoPopup.title: GhostScript¥á¥Ã¥»¡¼¥¸ ++GV*infoPopup.title: GhostScriptメッセージ + +!##### Dialog Popup + -+GV*dialogPopup.title: ¥À¥¤¥¢¥í¥° ++GV*dialogPopup.title: ダイアログ + +!##### Note Popup + -+GV*notePopup.title: ¥á¥Ã¥»¡¼¥¸ ++GV*notePopup.title: メッセージ + +!##### Confirm Popup + -+GV*confirmPopup.title: ³Îǧ ++GV*confirmPopup.title: ç¢ºèª + +!##### OptionsSetup Popup + -+GV*optionfsPopup.title: ¥Õ¥¡¥¤¥ëÁªÂò¥ª¥×¥·¥ç¥ó ++GV*optionfsPopup.title: ファイルé¸æŠžã‚ªãƒ—ション + +!##### OptionsGS Popup + -+GV*optiongsPopup.title: Ghostscript¥ª¥×¥·¥ç¥ó ++GV*optiongsPopup.title: Ghostscriptオプション + +!##### OptionsGV Popup + -+GV*optiongvPopup.title: GV¥ª¥×¥·¥ç¥ó ++GV*optiongvPopup.title: GVオプション + +!##### OptionsSetup Popup + -+GV*optionsetupPopup.title: ¥»¥Ã¥È¥¢¥Ã¥×¥ª¥×¥·¥ç¥ó ++GV*optionsetupPopup.title: セットアップオプション + +!##### FileSet Popup + -+GV*fileSelPopup.title: ¥Õ¥¡¥¤¥ë¤ò³«¤¯ ++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*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*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*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*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*versionPopup*versionDone*label: é–‰ã˜ã‚‹ ++GV*dialogPopup*cancel.label: キャンセル ++GV*notePopup*done.label: 了解 + -+GV*confirmPopup*cancel.label: ¥­¥ã¥ó¥»¥ë -+GV*confirmPopup*done.label: ½ªÎ» -+GV*save.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*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*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*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*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: ¥Þ¡¼¥¯ÉôʬÊݸ ++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 +--- src/gv_nls_ko_KR.UTF-8.dat ++++ src/gv_nls_ko_KR.UTF-8.dat 2008-03-27 16:41:29.417781453 +0100 @@ -0,0 +1,202 @@ +! +!** Copyright (C) 1995, 1996, 1997 Johannes Plass @@ -511,185 +457,191 @@ diff -Nru gv-3.5.8.orig/source/gv_nls_ko.dat gv-3.5.8/source/gv_nls_ko.dat + +!##### Zoom Popup + -+GV*zoomPopup.title: GV - È®´ë ++GV*zoomPopup.title: GV - 확대 + +!##### Info Popup + -+GV*infoPopup.title: °í½ºÆ® ½ºÅ©¸³Æ® ¸Þ½ÃÁö ++GV*infoPopup.title: 고스트 스í¬ë¦½íŠ¸ 메시지 + +!##### Dialog Popup + -+GV*dialogPopup.title: ´ÙÀÌ¾Ë·Î±× ++GV*dialogPopup.title: 다ì´ì•Œë¡œê·¸ + +!##### Note Popup + -+GV*notePopup.title: ¸Þ½ÃÁö ++GV*notePopup.title: 메시지 + +!##### Confirm Popup + -+GV*confirmPopup.title: È®ÀÎ ++GV*confirmPopup.title: í™•ì¸ + +!##### OptionsSetup Popup + -+GV*optionfsPopup.title: ÆÄÀÏ ¼±Åà ¿É¼Ç ++GV*optionfsPopup.title: íŒŒì¼ ì„ íƒ ì˜µì…˜ + +!##### OptionsGS Popup + -+GV*optiongsPopup.title: °í½ºÆ® ½ºÅ©¸³Æ® ¿É¼Ç ++GV*optiongsPopup.title: 고스트 스í¬ë¦½íŠ¸ 옵션 + +!##### OptionsGV Popup + -+GV*optiongvPopup.title: GV ¿É¼Ç ++GV*optiongvPopup.title: GV 옵션 + +!##### OptionsSetup Popup + -+GV*optionsetupPopup.title: ¼³Á¤ ¿É¼Ç ++GV*optionsetupPopup.title: 설정 옵션 + +!##### FileSet Popup + -+GV*fileSelPopup.title: ÆÄÀÏ ¿­±â ++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*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*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*unmark.Label: 표시 안함 ++GV*automatic.Label: ìžë™ +GV*portrait.Label: Portrait +GV*landscape.Label: Landscape -+GV*upsidedown.Label: »óÇÏ ¹ÝÀü ++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*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*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*versionPopup*versionDone*label: 취소 ++GV*dialogPopup*cancel.label: 취소 ++GV*notePopup*done.label: 예 + -+GV*confirmPopup*cancel.label: Ãë¼Ò -+GV*confirmPopup*done.label: Á¾·á -+GV*save.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*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*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*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*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: Ç¥½Ã ÀúÀå ++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 @@ +--- src/info.c ++++ src/info.c 2008-03-27 15:58:13.548742759 +0100 +@@ -35,6 +35,7 @@ + #include "message.h" + + #include "config.h" ++#include "VlistP.h" + + #include + +@@ -68,6 +69,20 @@ static Bool infoPopupCreated = False; 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; @@ -703,56 +655,60 @@ diff -Nru gv-3.5.8.orig/source/info.c gv-3.5.8/source/info.c + return( overall_logical_return.width ); +} +#define FontSetHeight(fnt) (XExtentsOfFontSet(fnt)->max_logical_extent.height) -+#endif + /*############################################################################### cb_popupInfoPopup ###############################################################################*/ -@@ -178,7 +194,11 @@ +@@ -183,7 +198,9 @@ void makeInfoPopup() Cardinal n; Dimension bottomMargin, leftMargin, rightMargin, topMargin; Dimension width, height; -+#ifdef I18N_MB + XFontSet fontset; -+#else XFontStruct *font; -+#endif ++ VlistWidget vw; BEGINMESSAGE(makeInfoPopup) -@@ -209,15 +229,24 @@ +@@ -211,20 +228,30 @@ void makeInfoPopup() + XtSetArg(args[n], XtNleft, XtChainLeft); n++; + XtSetArg(args[n], XtNright, XtChainRight); n++; + infodismiss = XtCreateManagedWidget("dismiss", buttonWidgetClass,infoform,args,n); ++ vw = (VlistWidget)infodismiss; XtAddCallback(infodismiss, XtNcallback, cb_popdownInfoPopup,NULL); + XtInstallAccelerators(infoform, infodismiss); + XtInstallAccelerators(infotext, infodismiss); n=0; -+#ifdef I18N_MB -+ XtSetArg(args[n], XtNfontSet, &fontset); n++; -+#else - XtSetArg(args[n], XtNfont, &font); n++; -+#endif +- XtSetArg(args[n], XtNfont, &font); n++; ++ if( vw->simple.international == True ) { ++ XtSetArg(args[n], XtNfontSet, &fontset); n++; ++ } else { ++ XtSetArg(args[n], XtNfont, &font); n++; ++ } 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 +- width = font->max_bounds.width * 80 + leftMargin + rightMargin; +- height = (font->ascent + font->descent) * 22 + topMargin + bottomMargin; ++ if( vw->simple.international == True ) { ++ 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; ++ } 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 @@ +--- src/main.c ++++ src/main.c 2008-03-27 15:58:52.821773601 +0100 +@@ -380,6 +380,32 @@ int main(argc, argv) - /*### initializing toolkit and the application context #################*/ + /*### 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 @@ -778,51 +734,76 @@ diff -Nru gv-3.5.8.orig/source/main.c gv-3.5.8/source/main.c + } + 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 @@ +--- src/misc_private.c ++++ src/misc_private.c 2008-03-27 16:02:51.532357064 +0100 +@@ -47,6 +47,7 @@ + + #include "types.h" + #include "misc_private.h" ++#include "VlistP.h" + + /*############################################################*/ + /* update_label */ +@@ -58,6 +59,7 @@ update_label(widget,text) + char *text; + { + LabelWidget w = (LabelWidget) widget; ++ VlistWidget vw = (VlistWidget) widget; + int shadow; + + BEGINMESSAGE1(update_label) +@@ -77,26 +79,41 @@ update_label(widget,text) 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 +- y = w->label.label_y + w->label.font->max_bounds.ascent; ++ if( vw->simple.international == True ) { ++ 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; ++ } 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 +- XFontStruct *fs = w->label.font; +- if (w->label.encoding) width = XTextWidth16 (fs, (XChar2b*)text, (int)(len/2) ); +- else width = XTextWidth (fs, text , (int)(len) ); ++ if( vw->simple.international == True ) { ++ 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) ); ++ } 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 @@ +- if (w->label.encoding) { +- XDrawString16(XtDisplay(widget), XtWindow(widget), +- w->label.normal_GC, +- x, y,(XChar2b*)text, (int)(strlen(text))); ++ if( vw->simple.international == True ) { ++ XmbDrawString(XtDisplay(widget), XtWindow(widget), ++ w->label.fontset, w->label.normal_GC, ++ x, y, text, (int)(strlen(text))); + } else { +- XDrawString(XtDisplay(widget), XtWindow(widget), ++ if (w->label.encoding) { ++ XDrawString16(XtDisplay(widget), XtWindow(widget), ++ w->label.normal_GC, ++ x, y,(XChar2b*)text, (int)(strlen(text))); ++ } else { ++ XDrawString(XtDisplay(widget), XtWindow(widget), w->label.normal_GC, x, y, text, (int)(strlen(text))); ++ } } -+#endif } - ENDMESSAGE1(update_label) diff --git a/gv-3.6.3-bzip2.patch b/gv-3.6.3-bzip2.patch new file mode 100644 index 0000000..b547e9e --- /dev/null +++ b/gv-3.6.3-bzip2.patch @@ -0,0 +1,103 @@ +--- configure.ac ++++ configure.ac 2008-03-27 14:41:36.332982541 +0100 +@@ -49,6 +49,25 @@ dnl Search for libraries + AC_CHECK_LIB(m, sqrt) + AC_CHECK_LIB(fl, yywrap) + ++# ++# Check for zlib and libbz2 libraries to use this together ++# with SuSE's libzio to open compressed info files. ++# ++AC_CHECK_HEADER(zlib.h,[ ++ for lib in z gz ++ do ++ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; break]) ++ done]) ++AC_CHECK_HEADER(bzlib.h,[ ++ for lib in bz2 bzip2 ++ do ++ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; break]) ++ done]) ++AC_CHECK_HEADER(zio.h,[ ++ AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio" ; AC_DEFINE(HAVE_ZIO)]) ++ ]) ++ ++ + AC_PATH_XTRA() + AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS) + AC_CHECK_LIB(ICE, main, , , $X_LIBS) +@@ -229,4 +248,4 @@ AM_CONDITIONAL(USE_MEMDEBUG_CODE, test x + + + dnl Generate output files +-AC_OUTPUT(Makefile doc/version.texi lib/Makefile src/Makefile doc/Makefile) +\ No newline at end of file ++AC_OUTPUT(Makefile doc/version.texi lib/Makefile src/Makefile doc/Makefile) +--- src/ac_config.h.in ++++ src/ac_config.h.in 2008-03-27 14:43:32.755968935 +0100 +@@ -142,3 +142,6 @@ + /* Define to rpl_ if the getopt replacement functions and variables should be + used. */ + #undef __GETOPT_PREFIX ++ ++/* Define to 1 if you have libzio for opening compressed info files */ ++#undef HAVE_ZIO +--- src/ps.c ++++ src/ps.c 2008-03-27 15:33:19.813097964 +0100 +@@ -65,8 +65,15 @@ + + #include + #include ++#include ++#include + + #include ++#include ++ ++#ifdef HAVE_ZIO ++# include ++#endif + + #ifndef SEEK_SET + #define SEEK_SET 0 +@@ -93,7 +100,7 @@ extern Media *gv_medias; + #define memset(a,b,c) bzero(a,c) + #endif + +-extern int sec_scanf(const char *, const char *, ...); ++extern int sec_sscanf(const char *, const char *, ...); + + /* We use this helper function for providing proper */ + /* case and colon :-) insensitive DSC matching */ +@@ -388,6 +395,7 @@ psscan(fileP,filename,filename_raw,filen + cmd_uncompress=NULL; + } + } ++#ifndef HAVE_ZIO + if (cmd_uncompress) { + struct document *retval = NULL; + FILE *tmpfile = (FILE*)NULL; +@@ -441,6 +449,23 @@ unc_ok: + *filename_uncP = (char*)GV_XtNewString(filename_unc); + goto unc_ok; + } ++#else ++ if (cmd_uncompress) { ++ FILE *zfile = fzopen(filename, "r"); ++ INFMESSAGE(is compressed) ++ if (!zfile) { ++ char s[512]; ++ sprintf(s,"Uncompressing of\n%s\nfailed.",filename); ++ NotePopupShowMessage(s); ++ ENDMESSAGE(psscan) ++ return(NULL); ++ } ++ fclose(*fileP); ++ *fileP = zfile; ++ cmd_uncompress = NULL; ++ *filename_uncP = NULL; ++ } ++#endif + + respect_eof = (scanstyle & SCANSTYLE_IGNORE_EOF) ? 0 : 1; + ignore_dsc = (scanstyle & SCANSTYLE_IGNORE_DSC) ? 1 : 0; diff --git a/gv-3.6.3-deb.patch b/gv-3.6.3-deb.patch new file mode 100644 index 0000000..4016617 --- /dev/null +++ b/gv-3.6.3-deb.patch @@ -0,0 +1,3645 @@ +--- gv-3.6.3dfsg.orig/doc/gv.texi ++++ gv-3.6.3dfsg/doc/gv.texi +@@ -22,6 +22,7 @@ + @end quotation + @end copying + ++@dircategory Viewers + @direntry + * gv: (gv). The GNU PostScript and PDF viewer. + @end direntry +@@ -119,6 +120,7 @@ + [-]-style=FILE read and use additional resources from FILE. These resources + have lower priority than those provided on the context of --ad + [-]-spartan shortcut for --style=gv_spartan.dat ++ [-]-widgetless shortcut for --style=gv_widgetless.dat + [-]-version show gv version and exit + @end verbatim + +@@ -210,6 +212,8 @@ + an update of the displayed document. This method + may be used by document creators to trigger gv + remotely. ++@item --widgetless ++This is a shortcut for @code{--style=gv_widgetless.dat}. + @end table + + @node Resources, Mouse and key bindings, Invoking gv, Top +@@ -473,12 +477,17 @@ + @code{line} + @end itemize + +-@item showTitle ++@item titleStyle + Whether the name of the displayed document should be shown in the + title bar of the window. The name of gv's icon will also change + accordingly if this resource is set to @code{True}. + +-It defaults to @code{True}. ++If this is @code{0}, no title will be shown. ++@code{1} means to show a the document title or the file name if there is ++no document title. ++Only the file name is shown with @code{2}. ++ ++It defaults to @code{1}. + @item maximumWidth, maximumHeight + When resizing gv will not attempt to exceed the size specified + by these resources. +--- gv-3.6.3dfsg.orig/doc/gv.1 ++++ gv-3.6.3dfsg/doc/gv.1 +@@ -1,7 +1,7 @@ + .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. + .TH GV "1" "June 2007" "gv 3.6.3" "User Commands" + .SH NAME +-gv \- manual page for gv 3.6.3 ++gv \- PostScript and PDF viewer + .SH SYNOPSIS + .B gv + [\fIOPTION\fR]... [\fIFILE\fR] +@@ -118,6 +118,9 @@ + [\-]\-spartan + shortcut for \fB\-\-style\fR=\fIgv_spartan\fR.dat + .TP ++[\-]\-widgetless ++shortcut for \fB\-\-style\fR=\fIgv_widgetless\fR.dat ++.TP + [\-]\-version + show gv version and exit + .SH "SEE ALSO" +--- gv-3.6.3dfsg.orig/src/gv_misc_res.dat ++++ gv-3.6.3dfsg/src/gv_misc_res.dat +@@ -273,7 +273,7 @@ + GV*eof.Label: Ignore EOF comments + GV*antialias.Label: Antialias + GV*watchFile.Label: Watch file +-GV*showTitle.Label: Show Title ++GV*titleLabel.Label: Show Title + GV*pixmap.Label: Backing Pixmap + GV*size.Label: Automatic resizing + GV*watch.Label: Watch File +@@ -677,6 +677,10 @@ + GV.TopLevelShell*Button.accelerators:#override\n\ + Return: set() notify() unset() + ++GV.TopLevelShell*dismiss.accelerators:#override\n\ ++ Escape: set() notify() unset()\n\ ++ Return: set() notify() unset() ++ + GV.TopLevelShell*Button.baseTranslations: #replace\n\ + Return: set() notify() unset()\n\ + : unset() \n\ +@@ -688,6 +692,18 @@ + GV*TransientShell*Button.accelerators:#override\n\ + Return: set() notify() unset() + ++GV*TransientShell*cancel.accelerators:#override\n\ ++ Escape: set() notify() unset()\n\ ++ Return: set() notify() unset() ++ ++GV*TransientShell*button1.accelerators:#override\n\ ++ Escape: set() notify() unset()\n\ ++ Return: set() notify() unset() ++ ++GV*TransientShell*dismiss.accelerators:#override\n\ ++ Escape: set() notify() unset()\n\ ++ Return: set() notify() unset() ++ + GV*TransientShell*Button.baseTranslations: #replace\n\ + Return: set() notify() unset()\n\ + : unset() \n\ +--- gv-3.6.3dfsg.orig/src/ps.c ++++ gv-3.6.3dfsg/src/ps.c +@@ -1738,6 +1738,7 @@ + { + unsigned int nbytes=0; + int skipped=0; ++ int nesting_level=0; + char *line; + + BEGINMESSAGE(readline) +@@ -1796,7 +1797,15 @@ + #endif + if (!IS_COMMENT("Begin")) {} /* Do nothing */ + else if IS_BEGIN("Document:") { /* Skip the EPS without handling its content */ +- while (line && !IS_END("Document")) { ++ nesting_level=1; ++ line = ps_io_fgetchars(fd,-1); ++ if (line) *line_lenP += FD_LINE_LEN; ++ while (line) { ++ if (IS_COMMENT("Begin") && IS_BEGIN("Document:")) ++ nesting_level++; ++ else if (IS_COMMENT("End") && IS_END("Document")) ++ nesting_level--; ++ if (nesting_level == 0) break; + line = ps_io_fgetchars(fd,-1); + if (line) *line_lenP += FD_LINE_LEN; + } +--- gv-3.6.3dfsg.orig/src/gv_layout_res.dat ++++ gv-3.6.3dfsg/src/gv_layout_res.dat +@@ -247,6 +247,10 @@ + $sss\ + confirmButton<+[1]*>\ + $sss\ ++ titleLabel<+[1]*>\ ++ $sss\ ++ titleButton<+[1]*>\ ++ $sss\ + misc<+[1]*>\ + $sss\ + scrolling<+[1]*>\ +@@ -257,8 +261,6 @@ + $sss\ + autoCenter<+[1]*>\ + $sss\ +- showTitle<+[1]*>\ +- $sss\ + pixmap<+[1]*>\ + $sss\ + magmenuLabel<+[1]*>\ +--- gv-3.6.3dfsg.orig/src/options_gv.c ++++ gv-3.6.3dfsg/src/options_gv.c +@@ -545,10 +545,13 @@ + n=0; + w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_gv_cb_apply,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_gv_cb_save,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gv); ++ XtInstallAccelerators(optionControl, w); + + options_gv_setOptionsAtEntry(); + options_realize(popup,optionControl); +--- gv-3.6.3dfsg.orig/src/Vlist.c ++++ gv-3.6.3dfsg/src/Vlist.c +@@ -314,6 +314,16 @@ + VlistWidget vw = (VlistWidget)w; + char * s; + int i; ++ int yofs, ydelta; ++ ++ if( vw->simple.international == True ) { ++ XFontSetExtents *ext = XExtentsOfFontSet(vw->label.fontset); ++ yofs = (ext->max_ink_extent.y<0)?-ext->max_ink_extent.y:ext->max_ink_extent.y; ++ ydelta = ext->max_ink_extent.height; ++ } else { ++ yofs = vw->label.font->max_bounds.ascent; ++ ydelta = vw->label.font->max_bounds.ascent + vw->label.font->max_bounds.descent; ++ } + + BEGINMESSAGE1(PaintEntryString) + s = vw->label.label; +@@ -321,14 +331,20 @@ + if (s) while (i > 0 && (s = strchr(s,'\n'))) { s++; i--; } + if (s) { + char *nl = strchr(s,'\n'); +- if (nl) *nl = '\0'; +- 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)); +- if (nl) *nl = '\n'; ++ int len; ++ if (nl) ++ len = nl - s; ++ else ++ len = strlen(s); ++ if( vw->simple.international == True ) ++ XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset, ++ vw->label.normal_GC, ++ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, ++ s, len); ++ else ++ XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC, ++ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, ++ s, len); + } + ENDMESSAGE1(PaintEntryString) + } +--- gv-3.6.3dfsg.orig/src/file.c ++++ gv-3.6.3dfsg/src/file.c +@@ -282,7 +282,7 @@ + #ifdef EFTYPE + errno = EFTYPE; + #else +- errno = ENODATA; ++ errno = ENOMSG; + #endif + } + IMESSAGE(r) +--- gv-3.6.3dfsg.orig/src/info.c ++++ gv-3.6.3dfsg/src/info.c +@@ -212,6 +212,8 @@ + XtSetArg(args[n], XtNright, XtChainRight); n++; + infodismiss = XtCreateManagedWidget("dismiss", buttonWidgetClass,infoform,args,n); + XtAddCallback(infodismiss, XtNcallback, cb_popdownInfoPopup,NULL); ++ XtInstallAccelerators(infoform, infodismiss); ++ XtInstallAccelerators(infotext, infodismiss); + + n=0; + XtSetArg(args[n], XtNfont, &font); n++; +--- gv-3.6.3dfsg.orig/src/gv_message.h ++++ gv-3.6.3dfsg/src/gv_message.h +@@ -70,6 +70,7 @@ + [-]-style=FILE read and use additional resources from FILE. These resources\n\ + have lower priority than those provided on the context of --ad\n\ + [-]-spartan shortcut for --style=gv_spartan.dat\n\ ++ [-]-widgetless shortcut for --style=gv_widgetless.dat\n\ + [-]-version show gv version and exit\n\ + "; + +@@ -116,6 +117,8 @@ + [-style ]\n\ + # Shortcut for '-style gv_spartan.dat'\n\ + [-spartan]\n\ ++ # Shortcut for '-style gv_widgetless.dat'\n\ ++ [-widgetless]\n\ + # Toolkit Options\n\ + []\n\ + # Show help\n\ +--- gv-3.6.3dfsg.orig/src/zoom.c ++++ gv-3.6.3dfsg/src/zoom.c +@@ -187,6 +187,7 @@ + n=0; + zdismiss = XtCreateManagedWidget(zoom_dismiss, buttonWidgetClass,zcontrol, args, n); + XtAddCallback(zdismiss, XtNcallback,cb_destroy,(XtPointer)zshell); ++ XtInstallAccelerators(zcontrol, zdismiss); + + XtRealizeWidget(zshell); + { +--- gv-3.6.3dfsg.orig/src/resource.h ++++ gv-3.6.3dfsg/src/resource.h +@@ -38,9 +38,8 @@ + #endif + ); + +-extern XrmDatabase resource_buildDatabase ( ++extern XrmDatabase resource_buildDatabase ( + #if NeedFunctionPrototypes +- XrmDatabase , + Display *, + char *, + char *, +--- gv-3.6.3dfsg.orig/src/miscmenu.c ++++ gv-3.6.3dfsg/src/miscmenu.c +@@ -243,7 +243,8 @@ + int i; + MiscMenuEntry e; + int menu_x, menu_y; +- Dimension menu_width,entry_height,menu_border; ++ Dimension menu_width,menu_height,entry_height,menu_border; ++ Dimension screen_width,screen_height; + Position button_x, button_y; + for (i=0; gv_miscmenu_entries[i]; i++) { + e = gv_miscmenu_entries[i]; +@@ -271,14 +272,23 @@ + + n=0; + XtSetArg(args[n], XtNwidth, &menu_width); ++n; ++ XtSetArg(args[n], XtNheight, &menu_height); ++n; + XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; + XtGetValues(menuwidget, args, n); +- ++ + XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); + menu_x = button_x-menu_width/2 -menu_border; + menu_y = button_y-entry_height/2; + +- n=0; ++ screen_width = WidthOfScreen(XtScreen(menuwidget)); ++ screen_height = HeightOfScreen(XtScreen(menuwidget)); ++ ++ if( menu_x + menu_width > screen_width && menu_width < screen_width ) ++ menu_x = screen_width - menu_width; ++ if( menu_y + menu_height > screen_height && menu_height < screen_height ) ++ menu_y = screen_height - menu_height; ++ ++ n=0; + XtSetArg(args[n], XtNx, menu_x); n++; + XtSetArg(args[n], XtNy, menu_y); n++; + XtSetValues(menuwidget, args, n); +--- gv-3.6.3dfsg.orig/src/widgets_misc.c ++++ gv-3.6.3dfsg/src/widgets_misc.c +@@ -94,6 +94,7 @@ + + static char *LineTextTr = "\ + Return: no-op()\n\ ++Escape: no-op()\n\ + Down: no-op()\n\ + Up: no-op()\n\ + Linefeed: no-op()\n\ +@@ -157,6 +158,7 @@ + /*##################################################*/ + + static char *TextTr = "\ ++Escape: no-op()\n\ + CtrlJ: no-op()\n\ + CtrlM: no-op()\n\ + CtrlN: no-op()\n\ +--- gv-3.6.3dfsg.orig/src/options_fs.c ++++ gv-3.6.3dfsg/src/options_fs.c +@@ -190,10 +190,13 @@ + n=0; + w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_fs_cb_apply,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_fs_cb_save,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_fs); ++ XtInstallAccelerators(optionControl, w); + + scratch_dir = widgets_createLabeledLineTextField("scratchDir", optionControl); + default_save_dir = widgets_createLabeledLineTextField("saveDir", optionControl); +--- gv-3.6.3dfsg.orig/src/main_globals.h ++++ gv-3.6.3dfsg/src/main_globals.h +@@ -276,6 +276,7 @@ + EXTERN int color_p; + EXTERN int grayscale_p; + EXTERN int spartan_p; ++EXTERN int widgetless_p; + EXTERN int quiet_p; + EXTERN int monochrome_p; + EXTERN int media_p; +--- gv-3.6.3dfsg.orig/src/options_setup.c ++++ gv-3.6.3dfsg/src/options_setup.c +@@ -79,10 +79,12 @@ + static Widget popup=NULL,optionControl; + static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle; + static Widget pixmapToggle,miscLabel; +-static Widget confirmLabel,confirmButton,confirmMenu,showTitleToggle; ++static Widget confirmLabel,confirmButton,confirmMenu; ++static Widget titleLabel,titleButton,titleMenu; + static Widget print_command,scales,screenSize,medias,magmenu,miscmenu; + + static String confirm_quit_styles[4] = { "Never","When processing","Always", NULL }; ++static String title_styles[4] = { "No title","Document title","File name", NULL }; + + static void options_setup_setOptionsAtEntry(); + static void options_setup_create(); +@@ -118,7 +120,6 @@ + widgets_setToggle(confirmPrintToggle, (app_res.confirm_print ? 1 : 0)); + widgets_setToggle(reverseScrollingToggle, (app_res.reverse_scrolling ? 1 : 0)); + widgets_setToggle(eyeGuideToggle, (app_res.scrolling_eye_guide ? 1 : 0)); +- widgets_setToggle(showTitleToggle, (app_res.show_title ? 1 : 0)); + widgets_setToggle(pixmapToggle, (app_res.use_bpixmap ? 1 : 0)); + widgets_setToggle(autoCenterToggle, (app_res.auto_center ? 1 : 0)); + +@@ -148,6 +149,11 @@ + XtSetArg(args[n], XtNlabel, s); n++; + XtSetValues(confirmButton, args, n); + ++ s=title_styles[app_res.title_style]; ++ n=0; ++ XtSetArg(args[n], XtNlabel, s); n++; ++ XtSetValues(titleButton, args, n); ++ + ENDMESSAGE(options_setup_setOptionsAtEntry) + } + +@@ -179,9 +185,17 @@ + cb_useBackingPixmap(NULL,(XtPointer)2,NULL); + if (b != app_res.use_bpixmap) reopen=True; + +- b = SwitchIsSet(showTitleToggle) ? True : False; +- if (b != app_res.show_title) { +- cb_showTitle(NULL,(XtPointer)1,NULL); ++ n=0; ++ XtSetArg(args[n], XtNlabel, &l); n++; ++ XtGetValues(titleButton, args, n); ++ i=0;j=0; ++ while (i<3) { ++ if (!strcmp(title_styles[i],l)) j = i; ++ ++i; ++ } ++ if (j != app_res.title_style) { ++ app_res.title_style = j; ++ cb_showTitle(NULL,NULL,NULL); + } + + options_textApply(print_command,NULL,&gv_print_command); +@@ -322,14 +336,21 @@ + ++argn; + options_setArg(&(argi[argn]),&(argv[argn]),s_scrollingEyeGuide ,gv_class ,SwitchIsSet(eyeGuideToggle) ? t : f); + ++argn; +- options_setArg(&(argi[argn]),&(argv[argn]),s_showTitle ,gv_class ,SwitchIsSet(showTitleToggle) ? t : f); +- ++argn; + options_setArg(&(argi[argn]),&(argv[argn]),s_autoCenter ,gv_class ,SwitchIsSet(autoCenterToggle) ? t : f); + ++argn; + options_setArg(&(argi[argn]),&(argv[argn]),s_useBackingPixmap ,gv_class ,SwitchIsSet(pixmapToggle) ? t : f); + ++argn; + n=0; + XtSetArg(args[n], XtNlabel, &l); n++; ++ XtGetValues(titleButton, args, n); ++ i=0; while (i<3) { ++ if (!strcmp(title_styles[i],l)) sprintf(tmp,"%d",i); ++ ++i; ++ } ++ options_setArg(&(argi[argn]),&(argv[argn]),s_titleStyle ,gv_class ,tmp); ++ ++argn; ++ n=0; ++ XtSetArg(args[n], XtNlabel, &l); n++; + XtGetValues(confirmButton, args, n); + i=0; while (i<3) { + if (!strcmp(confirm_quit_styles[i],l)) sprintf(tmp,"%d",i); +@@ -386,9 +407,13 @@ + reverseScrollingToggle = XtCreateManagedWidget("scrolling",switchWidgetClass,optionControl,NULL,(Cardinal)0); + eyeGuideToggle = XtCreateManagedWidget("eyeGuide",switchWidgetClass,optionControl,NULL,(Cardinal)0); + autoCenterToggle = XtCreateManagedWidget("autoCenter",switchWidgetClass,optionControl,NULL,(Cardinal)0); +- showTitleToggle = XtCreateManagedWidget("showTitle",switchWidgetClass,optionControl,NULL,(Cardinal)0); + pixmapToggle = XtCreateManagedWidget("pixmap",switchWidgetClass,optionControl,NULL,(Cardinal)0); + ++ options_createLabeledMenu("title",optionControl,&titleLabel,&titleButton,&titleMenu); ++ for (i = 0; title_styles[i]; i++) { ++ w = XtCreateManagedWidget(title_styles[i],smeBSBObjectClass, titleMenu,NULL,(Cardinal)0); ++ XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); ++ } + options_createLabeledMenu("confirm",optionControl,&confirmLabel,&confirmButton,&confirmMenu); + for (i = 0; confirm_quit_styles[i]; i++) { + w = XtCreateManagedWidget(confirm_quit_styles[i],smeBSBObjectClass, confirmMenu,NULL,(Cardinal)0); +@@ -398,10 +423,13 @@ + n=0; + w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_setup_cb_apply,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_setup_cb_save,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_setup); ++ XtInstallAccelerators(optionControl, w); + + miscmenu = widgets_createLabeledTextField("miscmenu", optionControl); + magmenu = widgets_createLabeledTextField("magmenu", optionControl); +--- gv-3.6.3dfsg.orig/src/main_resources.h ++++ gv-3.6.3dfsg/src/main_resources.h +@@ -33,8 +33,6 @@ + #ifndef _GV_MAIN_RESOURCES_H_ + #define _GV_MAIN_RESOURCES_H_ + +-#include "stdc.h" +- + /* Application resources */ + + typedef struct _AppResources { +@@ -76,17 +74,18 @@ + String style; + String ad; + String misc_menu; +- Boolean show_title; ++ int title_style; ++ Boolean filename_as_title; + Boolean use_bpixmap; + } AppResources; + + #ifdef _GV_MAIN_C_ + # define DECLARE_STRING(aaa) \ +- static char CONCAT(n_,aaa)[] = STRING(aaa); \ +- char * CONCAT(s_,aaa) = CONCAT(n_,aaa); ++ static char n_ ## aaa[] = #aaa; \ ++ char * s_ ## aaa = n_ ## aaa; + #else + # define DECLARE_STRING(aaa) \ +- extern char * CONCAT(s_,aaa); ++ extern char * s_ ## aaa; + #endif + + DECLARE_STRING(miscMenuEntries) +@@ -142,7 +141,7 @@ + DECLARE_STRING(style) + DECLARE_STRING(ad) + DECLARE_STRING(miscMenu) +-DECLARE_STRING(showTitle) ++DECLARE_STRING(titleStyle) + DECLARE_STRING(useBackingPixmap) + + /*-------------------------------------------------------------*/ +@@ -228,8 +227,8 @@ + XtOffsetOf(AppResources, ad), XtRImmediate,(XtPointer)""}, + {n_miscMenu, n_miscMenu, XtRString, sizeof(String), + XtOffsetOf(AppResources, misc_menu), XtRImmediate,"update"}, +- {n_showTitle, n_showTitle, XtRBoolean, sizeof(Boolean), +- XtOffsetOf(AppResources, show_title), XtRImmediate, (XtPointer)True}, ++ {n_titleStyle, n_titleStyle, XtRInt, sizeof(int), ++ XtOffsetOf(AppResources, title_style), XtRImmediate, (XtPointer)1}, + {n_useBackingPixmap,n_useBackingPixmap, XtRBoolean, sizeof(Boolean), + XtOffsetOf(AppResources, use_bpixmap), XtRImmediate, (XtPointer)True}, + }; +--- gv-3.6.3dfsg.orig/src/main.c ++++ gv-3.6.3dfsg/src/main.c +@@ -99,7 +99,6 @@ + #include "resource.h" + #include "doc_misc.h" + #include "version.h" +-#include "stdc.h" + #include "scale.h" + + #if defined(USE_SIGNAL_HANDLER) && (XtSpecificationRelease < 6) +@@ -109,12 +108,12 @@ + # include "gv_signal.h" + #endif /* USE_SIGNAL_HANDLER */ + +- ++#define BITSOF(name) name ## _bits ++#define WIDTHOF(name) name ## _height ++#define HEIGHTOF(name) name ## _width + #define BITMAP_ARGS(name)\ +- (const char*)CONCAT(name,_bits),\ +- CONCAT(name,_width),\ +- CONCAT(name,_height) +- ++ (const char*)BITSOF(name), WIDTHOF(name), HEIGHTOF(name) ++ + #include FALLBACK_ICON_PIXMAP + #include FALLBACK_SELECTED_BITMAP + #include FALLBACK_DOCUMENT_BITMAP +@@ -165,6 +164,7 @@ + ORIENTATION_ARG, + PAGE_ARG, + SPARTAN_ARG, ++ WIDGETLESS_ARG, + USAGE_ARG, + VERSION_ARG + }; +@@ -197,6 +197,7 @@ + {"pixmap", no_argument, NULL, PIXMAP_ARG}, + {"nopixmap", no_argument, NULL, NOPIXMAP_ARG}, + {"color", no_argument, NULL, COLOR_ARG}, ++ {"grayscale", no_argument, NULL, GRAYSCALE_ARG}, + {"help", no_argument, NULL, HELP_ARG}, + {"quiet", no_argument, NULL, QUIET_ARG}, + {"monochrome", no_argument, NULL, MONOCHROME_ARG}, +@@ -206,6 +207,7 @@ + {"page", required_argument, NULL, PAGE_ARG}, + {"usage", no_argument, NULL, USAGE_ARG}, + {"spartan", no_argument, NULL, SPARTAN_ARG}, ++ {"widgetless", no_argument, NULL, WIDGETLESS_ARG}, + {"version", no_argument, NULL, VERSION_ARG}, + {NULL, 0, NULL, 0} + }; +@@ -355,6 +357,7 @@ + orientation_p = 0; + page_p = 0; + spartan_p = 0; ++ widgetless_p = 0; + center_p = 0; + nocenter_p = 0; + scale_p = 0; +@@ -574,6 +577,11 @@ + opt_counter++; + break; + ++ case WIDGETLESS_ARG: ++ widgetless_p = 1; ++ opt_counter++; ++ break; ++ + case VERSION_ARG: + /* Show the program version */ + fprintf(stdout,"%s\n", versionIdentification[0]); +@@ -589,13 +597,10 @@ + } + + /*### getting resources ############################################*/ +- gv_database = resource_buildDatabase (XtDatabase(gv_display), +- gv_display, ++ gv_database = resource_buildDatabase (gv_display, + gv_class, + gv_name, + &argc,argv); +- XrmSetDatabase (gv_display, gv_database); +- + + /*### initializing widget set and creating application shell #########################*/ + +--- gv-3.6.3dfsg.orig/src/misc.c ++++ gv-3.6.3dfsg/src/misc.c +@@ -146,7 +146,6 @@ + static Boolean set_new_scale PT(()); + static Boolean set_new_orientation PT((int)); + static Boolean set_new_pagemedia PT((int)); +-static Widget build_label_menu PT((Widget,String,String,Pixmap)); + static void layout_ghostview PT(()); + #undef PT + +@@ -886,7 +885,7 @@ + int toc_length; + char *tocp; + Pixmap bitmap; +- String label,buttonlabel; ++ String label; + + BEGINMESSAGE(setup_ghostview) + /* Reset to a known state. */ +@@ -933,27 +932,6 @@ + } + } + cb_showTitle(NULL,NULL,NULL); +- if (show_title) { +- if (doc && doc->title) { +- buttonlabel = doc->title; +- label = doc->title; +- bitmap = app_res.document_bitmap; +- } +- else if (gv_filename) { +- +- buttonlabel = gv_filename; +- label = gv_filename; +- bitmap = None; +- } else { +- buttonlabel = ""; label = ""; +- bitmap = None; +- } +- n=0; +- XtSetArg(args[n], XtNlabel, buttonlabel); n++; +- XtSetValues(titlebutton, args, n); +- if (titlemenu) XtDestroyWidget(titlemenu); +- titlemenu = build_label_menu(titlebutton, "title", label, bitmap); +- } + + if (show_date) { + if (doc && doc->date) { +@@ -1595,7 +1573,7 @@ + /* build_label_menu */ + /*------------------------------------------------------------*/ + +-static Widget ++Widget + build_label_menu(parent, name, label, bitmap) + Widget parent; + String name, label; +--- gv-3.6.3dfsg.orig/src/callbacks.c ++++ gv-3.6.3dfsg/src/callbacks.c +@@ -102,13 +102,15 @@ + String t=NULL,s; + Arg args[2]; + Cardinal n; ++ Pixmap bitmap=None; + + BEGINMESSAGE(cb_showTitle) +- if (client_data) { +- app_res.show_title = app_res.show_title ? False : True; +- } +- if (app_res.show_title) { +- if (doc && doc->title) t = doc->title; ++ if (app_res.title_style != 0) { ++ if (app_res.title_style == 1 && doc && doc->title) ++ { ++ t = doc->title; ++ bitmap = app_res.document_bitmap; ++ } + else if (gv_filename) + { + t = gv_filename; +@@ -125,6 +127,14 @@ + XtSetArg(args[n], XtNtitle, s); n++; + XtSetArg(args[n], XtNiconName, t); n++; + XtSetValues(toplevel,args,n); ++ ++ if (show_title) { ++ n=0; ++ XtSetArg(args[n], XtNlabel, t); n++; ++ XtSetValues(titlebutton, args, n); ++ if (titlemenu) XtDestroyWidget(titlemenu); ++ titlemenu = build_label_menu(titlebutton, "title", t, bitmap); ++ } + GV_XtFree(s); + ENDMESSAGE(cb_showTitle) + } +--- gv-3.6.3dfsg.orig/src/dialog.c ++++ gv-3.6.3dfsg/src/dialog.c +@@ -134,6 +134,7 @@ + } + widgets_preferButton(pref,1); + widgets_preferButton(pref_old,0); ++ XtInstallAccelerators(dialogText,pref_old); + XtInstallAccelerators(dialogText,pref); + ENDMESSAGE(action_preferDialogPopupButton) + } +--- gv-3.6.3dfsg.orig/src/resource.c ++++ gv-3.6.3dfsg/src/resource.c +@@ -114,17 +114,17 @@ + #######################################################*/ + + XrmDatabase +-resource_buildDatabase (XrmDatabase gvdb, ++resource_buildDatabase ( + Display *display, + char *app_class, + char *app_name, + int *argcP, + char **argv) + { ++ XrmDatabase gvdb = XtDatabase(display); + XrmDatabase db = NULL; + String *sP; + String s,t, rpath; +- char *spartan_filename; + char tmp[GV_MAX_FILENAME_LENGTH]; + + BEGINMESSAGE(resource_buildDatabase) +@@ -148,6 +148,9 @@ + } + + XrmCombineDatabase (gvdb, &db, True); ++ /* CombineDatabase destroyed gvdb==XtDatabase(display), which ++ * XtResolvePathname will access soon, so repair it: */ ++ XrmSetDatabase (display, db); + + /* ### user resources ################# */ + INFMESSAGE(checking for user resources) +@@ -211,7 +214,7 @@ + } + if (spartan_p) + { +- spartan_filename = (char *) ++ char *spartan_filename = (char *) + GV_XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_spartan.dat") + 1); + spartan_filename[0] = '\0'; + strcat(spartan_filename, GV_LIBDIR); +@@ -219,6 +222,16 @@ + resource_putResource (&db, app_name, ".style", spartan_filename); + GV_XtFree (spartan_filename); + } ++ if (widgetless_p) ++ { ++ char *widgetless_filename = (char *) ++ GV_XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_widgetless.dat") + 1); ++ widgetless_filename[0] = '\0'; ++ strcat(widgetless_filename, GV_LIBDIR); ++ strcat(widgetless_filename, "/gv_widgetless.dat"); ++ resource_putResource (&db, app_name, ".style", widgetless_filename); ++ GV_XtFree (widgetless_filename); ++ } + if (quiet_p) + { + resource_putResource (&db, app_name, ".gsQuiet", "True"); +--- gv-3.6.3dfsg.orig/src/Makefile.in ++++ gv-3.6.3dfsg/src/Makefile.in +@@ -261,8 +261,8 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat +-appdefaultsdir = $(pkglibdir) ++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat ++appdefaultsdir = /etc/X11/app-defaults + appdefaults_DATA = GV + EXTRA_DIST = ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ + gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ +@@ -746,7 +746,7 @@ + @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat + @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat + @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat +- @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat ++ @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat + @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat + @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat + @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat +--- gv-3.6.3dfsg.orig/src/magmenu.c ++++ gv-3.6.3dfsg/src/magmenu.c +@@ -246,7 +246,8 @@ + entry = XtCreateManagedWidget(gv_magmenu_entries[i]->name, smeBSBObjectClass,d->menuwidget,NULL,(Cardinal)0); + { + int menu_x, menu_y; +- Dimension menu_width,entry_height,menu_border; ++ Dimension menu_width,entry_height,menu_border,menu_height; ++ Dimension screen_width,screen_height; + Position button_x, button_y; + + if (!XtIsRealized(d->menuwidget)) XtRealizeWidget(d->menuwidget); +@@ -255,12 +256,21 @@ + XtGetValues(entry, args, n); + n=0; + XtSetArg(args[n], XtNwidth, &menu_width); ++n; ++ XtSetArg(args[n], XtNheight, &menu_height); ++n; + XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; + XtGetValues(d->menuwidget, args, n); + + XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); + menu_x = button_x-menu_width/2 -menu_border; + menu_y = button_y-entry_height/2; ++ ++ screen_width = WidthOfScreen(XtScreen(d->menuwidget)); ++ screen_height = HeightOfScreen(XtScreen(d->menuwidget)); ++ ++ if( menu_x + menu_width > screen_width && menu_width < screen_width ) ++ menu_x = screen_width - menu_width; ++ if( menu_y + menu_height > screen_height && menu_height < screen_height ) ++ menu_y = screen_height - menu_height; + n=0; + XtSetArg(args[n], XtNx, menu_x); n++; + XtSetArg(args[n], XtNy, menu_y); n++; +--- gv-3.6.3dfsg.orig/src/options_gs.c ++++ gv-3.6.3dfsg/src/options_gs.c +@@ -307,12 +307,16 @@ + n=0; + w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_gs_cb_apply,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_gs_cb_save,NULL); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gs); ++ XtInstallAccelerators(optionControl, w); + w = XtCreateManagedWidget("defaults", buttonWidgetClass,optionControl, args, n); + XtAddCallback(w, XtNcallback, options_gs_cb_defaults, NULL); ++ XtInstallAccelerators(optionControl, w); + + options_gs_setOptionsAtEntry(); + options_realize(popup,optionControl); +--- gv-3.6.3dfsg.orig/src/FileSel.c ++++ gv-3.6.3dfsg/src/FileSel.c +@@ -167,11 +167,6 @@ + : FS_textfieldFocusAction() extend-start()\ + "; + +-static String TextField_accelerators = +-"#override\n\ +-Return: set() notify() unset()\ +-"; +- + #if 0 + #define FILE_SELECTION_LAYOUT \ + "\ +@@ -509,6 +504,22 @@ + CreateTextField(&FS_FILTERFRAME,&FS_FILTER,value,text_trans,"filter",new); + } + ++ if (BUTTONS_RESOURCE > 0 && BUTTONS_RESOURCE < 5 ) { ++ XtInstallAccelerators(FS_PATH,FS_BUTTON1); ++ XtInstallAccelerators(FS_FILTER,FS_BUTTON1); ++ if (BUTTONS_RESOURCE > 1) { ++ XtInstallAccelerators(FS_PATH,FS_BUTTON2); ++ XtInstallAccelerators(FS_FILTER,FS_BUTTON2); ++ } ++ if (BUTTONS_RESOURCE > 2) { ++ XtInstallAccelerators(FS_PATH,FS_BUTTON3); ++ XtInstallAccelerators(FS_FILTER,FS_BUTTON3); ++ } ++ if (BUTTONS_RESOURCE > 3) { ++ XtInstallAccelerators(FS_PATH,FS_BUTTON4); ++ XtInstallAccelerators(FS_FILTER,FS_BUTTON4); ++ } ++ } + SetPreferredButton(new,PREFERRED_BUTTON,TRUE); + + { +@@ -875,22 +886,18 @@ + FS_WIDGET w; + char name[10]; + Widget button; +- static XtAccelerators accelerators = (XtAccelerators)NULL; + USE_Arg(2); + + BEGINMESSAGE(SetPreferredButton) +- if (!accelerators) accelerators=XtParseAcceleratorTable(TextField_accelerators); + + IMESSAGE(position) + if (IS_BUTTON(position)) { + POSITION_TO_BUTTON_NAME(position,name); + button = XtNameToWidget((Widget)FS_FILE_SELECTION,name); + if (!install) { +- SET_Value(button,XtNaccelerators,(XtAccelerators)NULL); + preferButton(button,0); + if (PREFERRED_BUTTON==position) PREFERRED_BUTTON=0; + } else { +- SET_Value(button,XtNaccelerators,(XtAccelerators)accelerators); + XtInstallAccelerators(FS_PATH,button); + XtInstallAccelerators(FS_FILTER,button); + preferButton(button,1); +--- gv-3.6.3dfsg.orig/src/gv_user_res.dat ++++ gv-3.6.3dfsg/src/gv_user_res.dat +@@ -22,7 +22,7 @@ + GV.confirmQuit: 1 + GV.watchFile: False + GV.watchFileFrequency: 1000 +-GV.showTitle: True ++GV.titleStyle: 1 + GV.miscMenuEntries: redisplay \n\ + # update \n\ + stop \n\ +--- gv-3.6.3dfsg.orig/src/misc.h ++++ gv-3.6.3dfsg/src/misc.h +@@ -127,6 +127,8 @@ + #endif + ); + ++Widget build_label_menu(Widget,String,String,Pixmap); ++ + #endif /* _GV_MISC_H_ */ + + +--- gv-3.6.3dfsg.orig/src/Aaa.c ++++ gv-3.6.3dfsg/src/Aaa.c +@@ -45,7 +45,6 @@ + #define USE_LAYOUT_DEBUG + */ + +-#include "stdc.h" + #include "Aaa_intern.h" + #include INC_XMU(Converters.h) + +--- gv-3.6.3dfsg.orig/src/gv_widgetless.dat ++++ gv-3.6.3dfsg/src/gv_widgetless.dat +@@ -0,0 +1,30 @@ ++ ++GV*orientationButton*forcedWidth: 72 ++GV.control.MButton.height: 1 ++GV.control.MButton.forcedHeight: 1 ++GV.control.MButton.borderWidth: 0 ++GV.control.MButton.borderColor: green ++GV.control.MButton.background: gray ++GV.control.MButton.topShadowPixel: gray ++GV.control.MButton.bottomShadowPixel: darkgray ++GV.borderWidth: 0 ++GV.control.borderWidth: 0 ++GV.control.viewFrame.borderWidth: 0 ++GV.control.viewFrame.viewClip.borderWidth: 0 ++GV.control.viewFrame.viewClip.page.borderWidth: 0 ++ ++GV*control.layout: \ ++|v{ \ ++ |h{ \ ++ fileButton \ ++ stateButton \ ++ pageButton \ ++ orientationButton \ ++ scaleButton \ ++ pageMediaButton \ ++ } \ ++ |h{ \ ++ newtocFrame<-[1]*+200[1]-[1]> \ ++ viewFrame<+9999-100%*+9999-100%>\ ++ } \ ++} +--- gv-3.6.3dfsg.orig/ChangeLog ++++ gv-3.6.3dfsg/ChangeLog +@@ -1,3 +1,14 @@ ++2007-07-16 Bernhard R. Link ++ ++ * src/main_resources.h: replace showTitle with titleStyle ++ * src/callbacks.c (cb_showTitle): also set the titlebutton, ++ depending on title_style instead of show_title ++ * src/misc.h (build_label_menu): new prototype ++ * src/misc.c (setup_ghostview): move titlebutton setting code to cb_showTitle ++ * src/options_setup.c: allow setting titleStyle instead of showTitle ++ * src/gv_layout_res.dat: titleStyle instead of showTitle ++ * src/texinfo.tex: document titleStyle ++ + 2007-06-28 Jose E. Marchesi + + * src/ps.c (ps_gettext): Bypass trailing ')' when scanning a +--- gv-3.6.3dfsg.orig/debian/patches/26497_widgetless ++++ gv-3.6.3dfsg/debian/patches/26497_widgetless +@@ -0,0 +1,199 @@ ++This patch adds analogous to -spartan a -widgetless, which loads ++a gv_widgetless.dat, which makes all buttons one pixel small and ++hides everything but the PS area (and the page list, but making this ++only visible when the PS area is too small to fit the whole window) ++ ++Index: gv-3.6.3dfsg/src/Makefile.in ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/Makefile.in 2007-07-28 17:20:24.000000000 +0200 +++++ gv-3.6.3dfsg/src/Makefile.in 2007-07-28 17:20:25.000000000 +0200 ++@@ -261,7 +261,7 @@ ++ sharedstatedir = @sharedstatedir@ ++ sysconfdir = @sysconfdir@ ++ target_alias = @target_alias@ ++-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat +++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat ++ appdefaultsdir = /etc/X11/app-defaults ++ appdefaults_DATA = GV ++ EXTRA_DIST = ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ ++Index: gv-3.6.3dfsg/src/gv_widgetless.dat ++=================================================================== ++--- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++++ gv-3.6.3dfsg/src/gv_widgetless.dat 2007-07-28 17:20:25.000000000 +0200 ++@@ -0,0 +1,30 @@ +++ +++GV*orientationButton*forcedWidth: 72 +++GV.control.MButton.height: 1 +++GV.control.MButton.forcedHeight: 1 +++GV.control.MButton.borderWidth: 0 +++GV.control.MButton.borderColor: green +++GV.control.MButton.background: gray +++GV.control.MButton.topShadowPixel: gray +++GV.control.MButton.bottomShadowPixel: darkgray +++GV.borderWidth: 0 +++GV.control.borderWidth: 0 +++GV.control.viewFrame.borderWidth: 0 +++GV.control.viewFrame.viewClip.borderWidth: 0 +++GV.control.viewFrame.viewClip.page.borderWidth: 0 +++ +++GV*control.layout: \ +++|v{ \ +++ |h{ \ +++ fileButton \ +++ stateButton \ +++ pageButton \ +++ orientationButton \ +++ scaleButton \ +++ pageMediaButton \ +++ } \ +++ |h{ \ +++ newtocFrame<-[1]*+200[1]-[1]> \ +++ viewFrame<+9999-100%*+9999-100%>\ +++ } \ +++} ++Index: gv-3.6.3dfsg/src/gv_message.h ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/gv_message.h 2007-07-28 17:19:34.000000000 +0200 +++++ gv-3.6.3dfsg/src/gv_message.h 2007-07-28 17:20:25.000000000 +0200 ++@@ -70,6 +70,7 @@ ++ [-]-style=FILE read and use additional resources from FILE. These resources\n\ ++ have lower priority than those provided on the context of --ad\n\ ++ [-]-spartan shortcut for --style=gv_spartan.dat\n\ +++ [-]-widgetless shortcut for --style=gv_widgetless.dat\n\ ++ [-]-version show gv version and exit\n\ ++ "; ++ ++@@ -116,6 +117,8 @@ ++ [-style ]\n\ ++ # Shortcut for '-style gv_spartan.dat'\n\ ++ [-spartan]\n\ +++ # Shortcut for '-style gv_widgetless.dat'\n\ +++ [-widgetless]\n\ ++ # Toolkit Options\n\ ++ []\n\ ++ # Show help\n\ ++Index: gv-3.6.3dfsg/src/main.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/main.c 2007-07-28 17:20:24.000000000 +0200 +++++ gv-3.6.3dfsg/src/main.c 2007-07-28 17:32:49.000000000 +0200 ++@@ -164,6 +164,7 @@ ++ ORIENTATION_ARG, ++ PAGE_ARG, ++ SPARTAN_ARG, +++ WIDGETLESS_ARG, ++ USAGE_ARG, ++ VERSION_ARG ++ }; ++@@ -206,6 +207,7 @@ ++ {"page", required_argument, NULL, PAGE_ARG}, ++ {"usage", no_argument, NULL, USAGE_ARG}, ++ {"spartan", no_argument, NULL, SPARTAN_ARG}, +++ {"widgetless", no_argument, NULL, WIDGETLESS_ARG}, ++ {"version", no_argument, NULL, VERSION_ARG}, ++ {NULL, 0, NULL, 0} ++ }; ++@@ -355,6 +357,7 @@ ++ orientation_p = 0; ++ page_p = 0; ++ spartan_p = 0; +++ widgetless_p = 0; ++ center_p = 0; ++ nocenter_p = 0; ++ scale_p = 0; ++@@ -574,6 +577,11 @@ ++ opt_counter++; ++ break; ++ +++ case WIDGETLESS_ARG: +++ widgetless_p = 1; +++ opt_counter++; +++ break; +++ ++ case VERSION_ARG: ++ /* Show the program version */ ++ fprintf(stdout,"%s\n", versionIdentification[0]); ++Index: gv-3.6.3dfsg/src/resource.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/resource.c 2007-07-28 17:19:34.000000000 +0200 +++++ gv-3.6.3dfsg/src/resource.c 2007-07-28 17:20:25.000000000 +0200 ++@@ -124,7 +124,6 @@ ++ XrmDatabase db = NULL; ++ String *sP; ++ String s,t, rpath; ++- char *spartan_filename; ++ char tmp[GV_MAX_FILENAME_LENGTH]; ++ ++ BEGINMESSAGE(resource_buildDatabase) ++@@ -211,7 +210,7 @@ ++ } ++ if (spartan_p) ++ { ++- spartan_filename = (char *) +++ char *spartan_filename = (char *) ++ GV_XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_spartan.dat") + 1); ++ spartan_filename[0] = '\0'; ++ strcat(spartan_filename, GV_LIBDIR); ++@@ -219,6 +218,16 @@ ++ resource_putResource (&db, app_name, ".style", spartan_filename); ++ GV_XtFree (spartan_filename); ++ } +++ if (widgetless_p) +++ { +++ char *widgetless_filename = (char *) +++ GV_XtMalloc (strlen(GV_LIBDIR) + strlen ("/gv_widgetless.dat") + 1); +++ widgetless_filename[0] = '\0'; +++ strcat(widgetless_filename, GV_LIBDIR); +++ strcat(widgetless_filename, "/gv_widgetless.dat"); +++ resource_putResource (&db, app_name, ".style", widgetless_filename); +++ GV_XtFree (widgetless_filename); +++ } ++ if (quiet_p) ++ { ++ resource_putResource (&db, app_name, ".gsQuiet", "True"); ++Index: gv-3.6.3dfsg/doc/gv.1 ++=================================================================== ++--- gv-3.6.3dfsg.orig/doc/gv.1 2007-07-28 17:20:24.000000000 +0200 +++++ gv-3.6.3dfsg/doc/gv.1 2007-07-28 17:20:25.000000000 +0200 ++@@ -118,6 +118,9 @@ ++ [\-]\-spartan ++ shortcut for \fB\-\-style\fR=\fIgv_spartan\fR.dat ++ .TP +++[\-]\-widgetless +++shortcut for \fB\-\-style\fR=\fIgv_widgetless\fR.dat +++.TP ++ [\-]\-version ++ show gv version and exit ++ .SH "SEE ALSO" ++Index: gv-3.6.3dfsg/doc/gv.texi ++=================================================================== ++--- gv-3.6.3dfsg.orig/doc/gv.texi 2007-07-28 17:20:24.000000000 +0200 +++++ gv-3.6.3dfsg/doc/gv.texi 2007-07-28 17:20:25.000000000 +0200 ++@@ -120,6 +120,7 @@ ++ [-]-style=FILE read and use additional resources from FILE. These resources ++ have lower priority than those provided on the context of --ad ++ [-]-spartan shortcut for --style=gv_spartan.dat +++ [-]-widgetless shortcut for --style=gv_widgetless.dat ++ [-]-version show gv version and exit ++ @end verbatim ++ ++@@ -211,6 +212,8 @@ ++ an update of the displayed document. This method ++ may be used by document creators to trigger gv ++ remotely. +++@item --widgetless +++This is a shortcut for @code{--style=gv_widgetless.dat}. ++ @end table ++ ++ @node Resources, Mouse and key bindings, Invoking gv, Top ++Index: gv-3.6.3dfsg/src/main_globals.h ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/main_globals.h 2007-07-28 17:25:14.000000000 +0200 +++++ gv-3.6.3dfsg/src/main_globals.h 2007-07-28 17:25:41.000000000 +0200 ++@@ -276,6 +276,7 @@ ++ EXTERN int color_p; ++ EXTERN int grayscale_p; ++ EXTERN int spartan_p; +++EXTERN int widgetless_p; ++ EXTERN int quiet_p; ++ EXTERN int monochrome_p; ++ EXTERN int media_p; +--- gv-3.6.3dfsg.orig/debian/patches/05_314947_FTBFS_GNU_kFreeBSD ++++ gv-3.6.3dfsg/debian/patches/05_314947_FTBFS_GNU_kFreeBSD +@@ -0,0 +1,15 @@ ++#!/bin/sh /usr/share/dpatch/dpatch-run ++@DPATCH@ ++Index: gv/src/file.c ++=================================================================== ++--- gv.orig/src/file.c 2006-10-11 16:26:23.614125408 +0200 +++++ gv/src/file.c 2006-10-11 16:40:55.150631720 +0200 ++@@ -282,7 +282,7 @@ file_fileIsNotUseful(fn) ++ #ifdef EFTYPE ++ errno = EFTYPE; ++ #else ++- errno = ENODATA; +++ errno = ENOMSG; ++ #endif ++ } ++ IMESSAGE(r) +--- gv-3.6.3dfsg.orig/debian/patches/299447and433898-nested-eps ++++ gv-3.6.3dfsg/debian/patches/299447and433898-nested-eps +@@ -0,0 +1,33 @@ ++This patch fixes %%EndDocument handling in two aspects: ++ - allow %%BeginDocument/%%EndDocument pairs within such a pair ++ - do not misdetect %xxxxDocument headers as %%EndDocument ++ ++Index: gv-3.6.3dfsg/src/ps.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/ps.c 2007-07-28 16:22:27.000000000 +0200 +++++ gv-3.6.3dfsg/src/ps.c 2007-07-28 16:27:12.000000000 +0200 ++@@ -1738,6 +1738,7 @@ ++ { ++ unsigned int nbytes=0; ++ int skipped=0; +++ int nesting_level=0; ++ char *line; ++ ++ BEGINMESSAGE(readline) ++@@ -1796,7 +1797,15 @@ ++ #endif ++ if (!IS_COMMENT("Begin")) {} /* Do nothing */ ++ else if IS_BEGIN("Document:") { /* Skip the EPS without handling its content */ ++- while (line && !IS_END("Document")) { +++ nesting_level=1; +++ line = ps_io_fgetchars(fd,-1); +++ if (line) *line_lenP += FD_LINE_LEN; +++ while (line) { +++ if (IS_COMMENT("Begin") && IS_BEGIN("Document:")) +++ nesting_level++; +++ else if (IS_COMMENT("End") && IS_END("Document")) +++ nesting_level--; +++ if (nesting_level == 0) break; ++ line = ps_io_fgetchars(fd,-1); ++ if (line) *line_lenP += FD_LINE_LEN; ++ } +--- gv-3.6.3dfsg.orig/debian/patches/439067resources ++++ gv-3.6.3dfsg/debian/patches/439067resources +@@ -0,0 +1,58 @@ ++--- a/src/main.c 2007-08-27 17:20:30.000000000 +0200 +++++ b/src/main.c 2007-08-27 17:05:02.000000000 +0200 ++@@ -597,13 +597,10 @@ ++ } ++ ++ /*### getting resources ############################################*/ ++- gv_database = resource_buildDatabase (XtDatabase(gv_display), ++- gv_display, +++ gv_database = resource_buildDatabase (gv_display, ++ gv_class, ++ gv_name, ++ &argc,argv); ++- XrmSetDatabase (gv_display, gv_database); ++- ++ ++ /*### initializing widget set and creating application shell #########################*/ ++ ++--- a/src/resource.c 2007-08-27 17:20:30.000000000 +0200 +++++ b/src/resource.c 2007-08-27 17:08:50.000000000 +0200 ++@@ -114,13 +114,14 @@ ++ #######################################################*/ ++ ++ XrmDatabase ++-resource_buildDatabase (XrmDatabase gvdb, +++resource_buildDatabase ( ++ Display *display, ++ char *app_class, ++ char *app_name, ++ int *argcP, ++ char **argv) ++ { +++ XrmDatabase gvdb = XtDatabase(display); ++ XrmDatabase db = NULL; ++ String *sP; ++ String s,t, rpath; ++@@ -147,6 +148,9 @@ ++ } ++ ++ XrmCombineDatabase (gvdb, &db, True); +++ /* CombineDatabase destroyed gvdb==XtDatabase(display), which +++ * XtResolvePathname will access soon, so repair it: */ +++ XrmSetDatabase (display, db); ++ ++ /* ### user resources ################# */ ++ INFMESSAGE(checking for user resources) ++--- a/src/resource.h 2007-06-27 16:42:13.000000000 +0200 +++++ b/src/resource.h 2007-08-27 17:09:25.000000000 +0200 ++@@ -38,9 +38,8 @@ ++ #endif ++ ); ++ ++-extern XrmDatabase resource_buildDatabase ( +++extern XrmDatabase resource_buildDatabase ( ++ #if NeedFunctionPrototypes ++- XrmDatabase , ++ Display *, ++ char *, ++ char *, +--- gv-3.6.3dfsg.orig/debian/patches/no_non_free_stdc_h ++++ gv-3.6.3dfsg/debian/patches/no_non_free_stdc_h +@@ -0,0 +1,70 @@ ++Index: gv-3.6.3/src/Aaa.c ++=================================================================== ++--- gv-3.6.3.orig/src/Aaa.c 2007-07-15 18:59:00.000000000 +0200 +++++ gv-3.6.3/src/Aaa.c 2007-07-15 19:00:24.000000000 +0200 ++@@ -45,7 +45,6 @@ ++ #define USE_LAYOUT_DEBUG ++ */ ++ ++-#include "stdc.h" ++ #include "Aaa_intern.h" ++ #include INC_XMU(Converters.h) ++ ++Index: gv-3.6.3/src/main.c ++=================================================================== ++--- gv-3.6.3.orig/src/main.c 2007-07-15 18:59:08.000000000 +0200 +++++ gv-3.6.3/src/main.c 2007-07-15 19:27:12.000000000 +0200 ++@@ -99,7 +99,6 @@ ++ #include "resource.h" ++ #include "doc_misc.h" ++ #include "version.h" ++-#include "stdc.h" ++ #include "scale.h" ++ ++ #if defined(USE_SIGNAL_HANDLER) && (XtSpecificationRelease < 6) ++@@ -109,12 +108,12 @@ ++ # include "gv_signal.h" ++ #endif /* USE_SIGNAL_HANDLER */ ++ ++- +++#define BITSOF(name) name ## _bits +++#define WIDTHOF(name) name ## _height +++#define HEIGHTOF(name) name ## _width ++ #define BITMAP_ARGS(name)\ ++- (const char*)CONCAT(name,_bits),\ ++- CONCAT(name,_width),\ ++- CONCAT(name,_height) ++- +++ (const char*)BITSOF(name), WIDTHOF(name), HEIGHTOF(name) +++ ++ #include FALLBACK_ICON_PIXMAP ++ #include FALLBACK_SELECTED_BITMAP ++ #include FALLBACK_DOCUMENT_BITMAP ++Index: gv-3.6.3/src/main_resources.h ++=================================================================== ++--- gv-3.6.3.orig/src/main_resources.h 2007-07-15 18:59:12.000000000 +0200 +++++ gv-3.6.3/src/main_resources.h 2007-07-15 18:59:21.000000000 +0200 ++@@ -33,8 +33,6 @@ ++ #ifndef _GV_MAIN_RESOURCES_H_ ++ #define _GV_MAIN_RESOURCES_H_ ++ ++-#include "stdc.h" ++- ++ /* Application resources */ ++ ++ typedef struct _AppResources { ++@@ -82,11 +80,11 @@ ++ ++ #ifdef _GV_MAIN_C_ ++ # define DECLARE_STRING(aaa) \ ++- static char CONCAT(n_,aaa)[] = STRING(aaa); \ ++- char * CONCAT(s_,aaa) = CONCAT(n_,aaa); +++ static char n_ ## aaa[] = #aaa; \ +++ char * s_ ## aaa = n_ ## aaa; ++ #else ++ # define DECLARE_STRING(aaa) \ ++- extern char * CONCAT(s_,aaa); +++ extern char * s_ ## aaa; ++ #endif ++ ++ DECLARE_STRING(miscMenuEntries) +--- gv-3.6.3dfsg.orig/debian/patches/README ++++ gv-3.6.3dfsg/debian/patches/README +@@ -0,0 +1,14 @@ ++This directory contains a number of patches applied to the Debian package ++of gv. They are here for archiving and documentation reasons, they are not ++actively used when building the package, but everything is also found directly ++applied in the .diff.gz. ++ ++If you are: ++ - patching or NMUing this package: ++ You can just ignore this directory and apply the patch directly ++ on top of all those in the .diff.gz. ++ I'll sort it out and put it here with the next maintainer upload. ++ ++ - intrested in looking what is modified: ++ You can either look here to see what changes belong together, or ++ take a look at all the changes together. +--- gv-3.6.3dfsg.orig/debian/patches/texinfo-dircategory ++++ gv-3.6.3dfsg/debian/patches/texinfo-dircategory +@@ -0,0 +1,12 @@ ++Index: gv/doc/gv.texi ++=================================================================== ++--- gv.orig/doc/gv.texi 2006-11-13 15:31:31.000000000 +0100 +++++ gv/doc/gv.texi 2006-11-13 15:35:53.770119024 +0100 ++@@ -22,6 +22,7 @@ any later version published by the Free ++ @end quotation ++ @end copying ++ +++@dircategory Viewers ++ @direntry ++ * gv: (gv). The GNU PostScript and PDF viewer. ++ @end direntry +--- gv-3.6.3dfsg.orig/debian/patches/01_debian_config ++++ gv-3.6.3dfsg/debian/patches/01_debian_config +@@ -0,0 +1,22 @@ ++#!/bin/sh /usr/share/dpatch/dpatch-run ++@DPATCH@ ++--- gv-3.6.1.orig/src/Makefile.in +++++ gv-3.6.1/src/Makefile.in ++@@ -233,7 +233,7 @@ ++ sysconfdir = @sysconfdir@ ++ target_alias = @target_alias@ ++ dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat ++-appdefaultsdir = $(pkglibdir) +++appdefaultsdir = /etc/X11/app-defaults ++ appdefaults_DATA = GV ++ EXTRA_DIST = ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ ++ gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ ++@@ -805,7 +805,7 @@ ++ @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat ++ @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat ++ @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat ++- @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat +++ @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat ++ @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat ++ @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat ++ @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat +--- gv-3.6.3dfsg.orig/debian/patches/manual-whatis ++++ gv-3.6.3dfsg/debian/patches/manual-whatis +@@ -0,0 +1,13 @@ ++Index: gv/doc/gv.1 ++=================================================================== ++--- gv.orig/doc/gv.1 2006-10-11 16:26:32.021847240 +0200 +++++ gv/doc/gv.1 2006-10-11 16:44:13.001553808 +0200 ++@@ -1,7 +1,7 @@ ++ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. ++ .TH GV "1" "June 2007" "gv 3.6.3" "User Commands" ++ .SH NAME ++-gv \- manual page for gv 3.6.3 +++gv \- PostScript and PDF viewer ++ .SH SYNOPSIS ++ .B gv ++ [\fIOPTION\fR]... [\fIFILE\fR] +--- gv-3.6.3dfsg.orig/debian/patches/95266_filename_as_title ++++ gv-3.6.3dfsg/debian/patches/95266_filename_as_title +@@ -0,0 +1,341 @@ ++This patch replaces the Option whether the title bar of the window ++should display the title with an option whether nothing, the filename ++or the PS title (with the filename as fallback) should be displayed ++in both the window title and the title label within the window. ++ ++Index: gv-3.6.3dfsg/src/callbacks.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/callbacks.c 2007-06-25 23:09:32.000000000 +0200 +++++ gv-3.6.3dfsg/src/callbacks.c 2007-07-28 16:33:56.000000000 +0200 ++@@ -102,13 +102,15 @@ ++ String t=NULL,s; ++ Arg args[2]; ++ Cardinal n; +++ Pixmap bitmap=None; ++ ++ BEGINMESSAGE(cb_showTitle) ++- if (client_data) { ++- app_res.show_title = app_res.show_title ? False : True; ++- } ++- if (app_res.show_title) { ++- if (doc && doc->title) t = doc->title; +++ if (app_res.title_style != 0) { +++ if (app_res.title_style == 1 && doc && doc->title) +++ { +++ t = doc->title; +++ bitmap = app_res.document_bitmap; +++ } ++ else if (gv_filename) ++ { ++ t = gv_filename; ++@@ -125,6 +127,14 @@ ++ XtSetArg(args[n], XtNtitle, s); n++; ++ XtSetArg(args[n], XtNiconName, t); n++; ++ XtSetValues(toplevel,args,n); +++ +++ if (show_title) { +++ n=0; +++ XtSetArg(args[n], XtNlabel, t); n++; +++ XtSetValues(titlebutton, args, n); +++ if (titlemenu) XtDestroyWidget(titlemenu); +++ titlemenu = build_label_menu(titlebutton, "title", t, bitmap); +++ } ++ GV_XtFree(s); ++ ENDMESSAGE(cb_showTitle) ++ } ++Index: gv-3.6.3dfsg/src/main_resources.h ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/main_resources.h 2007-07-28 16:31:11.000000000 +0200 +++++ gv-3.6.3dfsg/src/main_resources.h 2007-07-28 16:33:56.000000000 +0200 ++@@ -74,7 +74,8 @@ ++ String style; ++ String ad; ++ String misc_menu; ++- Boolean show_title; +++ int title_style; +++ Boolean filename_as_title; ++ Boolean use_bpixmap; ++ } AppResources; ++ ++@@ -140,7 +141,7 @@ ++ DECLARE_STRING(style) ++ DECLARE_STRING(ad) ++ DECLARE_STRING(miscMenu) ++-DECLARE_STRING(showTitle) +++DECLARE_STRING(titleStyle) ++ DECLARE_STRING(useBackingPixmap) ++ ++ /*-------------------------------------------------------------*/ ++@@ -226,8 +227,8 @@ ++ XtOffsetOf(AppResources, ad), XtRImmediate,(XtPointer)""}, ++ {n_miscMenu, n_miscMenu, XtRString, sizeof(String), ++ XtOffsetOf(AppResources, misc_menu), XtRImmediate,"update"}, ++- {n_showTitle, n_showTitle, XtRBoolean, sizeof(Boolean), ++- XtOffsetOf(AppResources, show_title), XtRImmediate, (XtPointer)True}, +++ {n_titleStyle, n_titleStyle, XtRInt, sizeof(int), +++ XtOffsetOf(AppResources, title_style), XtRImmediate, (XtPointer)1}, ++ {n_useBackingPixmap,n_useBackingPixmap, XtRBoolean, sizeof(Boolean), ++ XtOffsetOf(AppResources, use_bpixmap), XtRImmediate, (XtPointer)True}, ++ }; ++Index: gv-3.6.3dfsg/src/misc.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/misc.c 2007-06-25 23:14:38.000000000 +0200 +++++ gv-3.6.3dfsg/src/misc.c 2007-07-28 16:33:56.000000000 +0200 ++@@ -146,7 +146,6 @@ ++ static Boolean set_new_scale PT(()); ++ static Boolean set_new_orientation PT((int)); ++ static Boolean set_new_pagemedia PT((int)); ++-static Widget build_label_menu PT((Widget,String,String,Pixmap)); ++ static void layout_ghostview PT(()); ++ #undef PT ++ ++@@ -886,7 +885,7 @@ ++ int toc_length; ++ char *tocp; ++ Pixmap bitmap; ++- String label,buttonlabel; +++ String label; ++ ++ BEGINMESSAGE(setup_ghostview) ++ /* Reset to a known state. */ ++@@ -933,27 +932,6 @@ ++ } ++ } ++ cb_showTitle(NULL,NULL,NULL); ++- if (show_title) { ++- if (doc && doc->title) { ++- buttonlabel = doc->title; ++- label = doc->title; ++- bitmap = app_res.document_bitmap; ++- } ++- else if (gv_filename) { ++- ++- buttonlabel = gv_filename; ++- label = gv_filename; ++- bitmap = None; ++- } else { ++- buttonlabel = ""; label = ""; ++- bitmap = None; ++- } ++- n=0; ++- XtSetArg(args[n], XtNlabel, buttonlabel); n++; ++- XtSetValues(titlebutton, args, n); ++- if (titlemenu) XtDestroyWidget(titlemenu); ++- titlemenu = build_label_menu(titlebutton, "title", label, bitmap); ++- } ++ ++ if (show_date) { ++ if (doc && doc->date) { ++@@ -1595,7 +1573,7 @@ ++ /* build_label_menu */ ++ /*------------------------------------------------------------*/ ++ ++-static Widget +++Widget ++ build_label_menu(parent, name, label, bitmap) ++ Widget parent; ++ String name, label; ++Index: gv-3.6.3dfsg/src/options_setup.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/options_setup.c 2007-07-28 16:21:14.000000000 +0200 +++++ gv-3.6.3dfsg/src/options_setup.c 2007-07-28 16:33:56.000000000 +0200 ++@@ -79,10 +79,12 @@ ++ static Widget popup=NULL,optionControl; ++ static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle; ++ static Widget pixmapToggle,miscLabel; ++-static Widget confirmLabel,confirmButton,confirmMenu,showTitleToggle; +++static Widget confirmLabel,confirmButton,confirmMenu; +++static Widget titleLabel,titleButton,titleMenu; ++ static Widget print_command,scales,screenSize,medias,magmenu,miscmenu; ++ ++ static String confirm_quit_styles[4] = { "Never","When processing","Always", NULL }; +++static String title_styles[4] = { "No title","Document title","File name", NULL }; ++ ++ static void options_setup_setOptionsAtEntry(); ++ static void options_setup_create(); ++@@ -118,7 +120,6 @@ ++ widgets_setToggle(confirmPrintToggle, (app_res.confirm_print ? 1 : 0)); ++ widgets_setToggle(reverseScrollingToggle, (app_res.reverse_scrolling ? 1 : 0)); ++ widgets_setToggle(eyeGuideToggle, (app_res.scrolling_eye_guide ? 1 : 0)); ++- widgets_setToggle(showTitleToggle, (app_res.show_title ? 1 : 0)); ++ widgets_setToggle(pixmapToggle, (app_res.use_bpixmap ? 1 : 0)); ++ widgets_setToggle(autoCenterToggle, (app_res.auto_center ? 1 : 0)); ++ ++@@ -148,6 +149,11 @@ ++ XtSetArg(args[n], XtNlabel, s); n++; ++ XtSetValues(confirmButton, args, n); ++ +++ s=title_styles[app_res.title_style]; +++ n=0; +++ XtSetArg(args[n], XtNlabel, s); n++; +++ XtSetValues(titleButton, args, n); +++ ++ ENDMESSAGE(options_setup_setOptionsAtEntry) ++ } ++ ++@@ -179,9 +185,17 @@ ++ cb_useBackingPixmap(NULL,(XtPointer)2,NULL); ++ if (b != app_res.use_bpixmap) reopen=True; ++ ++- b = SwitchIsSet(showTitleToggle) ? True : False; ++- if (b != app_res.show_title) { ++- cb_showTitle(NULL,(XtPointer)1,NULL); +++ n=0; +++ XtSetArg(args[n], XtNlabel, &l); n++; +++ XtGetValues(titleButton, args, n); +++ i=0;j=0; +++ while (i<3) { +++ if (!strcmp(title_styles[i],l)) j = i; +++ ++i; +++ } +++ if (j != app_res.title_style) { +++ app_res.title_style = j; +++ cb_showTitle(NULL,NULL,NULL); ++ } ++ ++ options_textApply(print_command,NULL,&gv_print_command); ++@@ -322,14 +336,21 @@ ++ ++argn; ++ options_setArg(&(argi[argn]),&(argv[argn]),s_scrollingEyeGuide ,gv_class ,SwitchIsSet(eyeGuideToggle) ? t : f); ++ ++argn; ++- options_setArg(&(argi[argn]),&(argv[argn]),s_showTitle ,gv_class ,SwitchIsSet(showTitleToggle) ? t : f); ++- ++argn; ++ options_setArg(&(argi[argn]),&(argv[argn]),s_autoCenter ,gv_class ,SwitchIsSet(autoCenterToggle) ? t : f); ++ ++argn; ++ options_setArg(&(argi[argn]),&(argv[argn]),s_useBackingPixmap ,gv_class ,SwitchIsSet(pixmapToggle) ? t : f); ++ ++argn; ++ n=0; ++ XtSetArg(args[n], XtNlabel, &l); n++; +++ XtGetValues(titleButton, args, n); +++ i=0; while (i<3) { +++ if (!strcmp(title_styles[i],l)) sprintf(tmp,"%d",i); +++ ++i; +++ } +++ options_setArg(&(argi[argn]),&(argv[argn]),s_titleStyle ,gv_class ,tmp); +++ ++argn; +++ n=0; +++ XtSetArg(args[n], XtNlabel, &l); n++; ++ XtGetValues(confirmButton, args, n); ++ i=0; while (i<3) { ++ if (!strcmp(confirm_quit_styles[i],l)) sprintf(tmp,"%d",i); ++@@ -386,9 +407,13 @@ ++ reverseScrollingToggle = XtCreateManagedWidget("scrolling",switchWidgetClass,optionControl,NULL,(Cardinal)0); ++ eyeGuideToggle = XtCreateManagedWidget("eyeGuide",switchWidgetClass,optionControl,NULL,(Cardinal)0); ++ autoCenterToggle = XtCreateManagedWidget("autoCenter",switchWidgetClass,optionControl,NULL,(Cardinal)0); ++- showTitleToggle = XtCreateManagedWidget("showTitle",switchWidgetClass,optionControl,NULL,(Cardinal)0); ++ pixmapToggle = XtCreateManagedWidget("pixmap",switchWidgetClass,optionControl,NULL,(Cardinal)0); ++ +++ options_createLabeledMenu("title",optionControl,&titleLabel,&titleButton,&titleMenu); +++ for (i = 0; title_styles[i]; i++) { +++ w = XtCreateManagedWidget(title_styles[i],smeBSBObjectClass, titleMenu,NULL,(Cardinal)0); +++ XtAddCallback(w, XtNcallback,options_cb_changeMenuLabel,NULL); +++ } ++ options_createLabeledMenu("confirm",optionControl,&confirmLabel,&confirmButton,&confirmMenu); ++ for (i = 0; confirm_quit_styles[i]; i++) { ++ w = XtCreateManagedWidget(confirm_quit_styles[i],smeBSBObjectClass, confirmMenu,NULL,(Cardinal)0); ++Index: gv-3.6.3dfsg/src/gv_layout_res.dat ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/gv_layout_res.dat 2004-11-12 20:07:56.000000000 +0100 +++++ gv-3.6.3dfsg/src/gv_layout_res.dat 2007-07-28 16:33:56.000000000 +0200 ++@@ -247,6 +247,10 @@ ++ $sss\ ++ confirmButton<+[1]*>\ ++ $sss\ +++ titleLabel<+[1]*>\ +++ $sss\ +++ titleButton<+[1]*>\ +++ $sss\ ++ misc<+[1]*>\ ++ $sss\ ++ scrolling<+[1]*>\ ++@@ -257,8 +261,6 @@ ++ $sss\ ++ autoCenter<+[1]*>\ ++ $sss\ ++- showTitle<+[1]*>\ ++- $sss\ ++ pixmap<+[1]*>\ ++ $sss\ ++ magmenuLabel<+[1]*>\ ++Index: gv-3.6.3dfsg/src/gv_misc_res.dat ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/gv_misc_res.dat 2007-07-28 16:21:14.000000000 +0200 +++++ gv-3.6.3dfsg/src/gv_misc_res.dat 2007-07-28 16:33:56.000000000 +0200 ++@@ -273,7 +273,7 @@ ++ GV*eof.Label: Ignore EOF comments ++ GV*antialias.Label: Antialias ++ GV*watchFile.Label: Watch file ++-GV*showTitle.Label: Show Title +++GV*titleLabel.Label: Show Title ++ GV*pixmap.Label: Backing Pixmap ++ GV*size.Label: Automatic resizing ++ GV*watch.Label: Watch File ++Index: gv-3.6.3dfsg/src/misc.h ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/misc.h 2005-03-31 23:14:27.000000000 +0200 +++++ gv-3.6.3dfsg/src/misc.h 2007-07-28 16:33:56.000000000 +0200 ++@@ -127,6 +127,8 @@ ++ #endif ++ ); ++ +++Widget build_label_menu(Widget,String,String,Pixmap); +++ ++ #endif /* _GV_MISC_H_ */ ++ ++ ++Index: gv-3.6.3dfsg/src/gv_user_res.dat ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/gv_user_res.dat 2004-11-15 14:54:42.000000000 +0100 +++++ gv-3.6.3dfsg/src/gv_user_res.dat 2007-07-28 16:33:56.000000000 +0200 ++@@ -22,7 +22,7 @@ ++ GV.confirmQuit: 1 ++ GV.watchFile: False ++ GV.watchFileFrequency: 1000 ++-GV.showTitle: True +++GV.titleStyle: 1 ++ GV.miscMenuEntries: redisplay \n\ ++ # update \n\ ++ stop \n\ ++Index: gv-3.6.3dfsg/ChangeLog ++=================================================================== ++--- gv-3.6.3dfsg.orig/ChangeLog 2007-06-28 22:56:51.000000000 +0200 +++++ gv-3.6.3dfsg/ChangeLog 2007-07-28 16:33:56.000000000 +0200 ++@@ -1,3 +1,14 @@ +++2007-07-16 Bernhard R. Link +++ +++ * src/main_resources.h: replace showTitle with titleStyle +++ * src/callbacks.c (cb_showTitle): also set the titlebutton, +++ depending on title_style instead of show_title +++ * src/misc.h (build_label_menu): new prototype +++ * src/misc.c (setup_ghostview): move titlebutton setting code to cb_showTitle +++ * src/options_setup.c: allow setting titleStyle instead of showTitle +++ * src/gv_layout_res.dat: titleStyle instead of showTitle +++ * src/texinfo.tex: document titleStyle +++ ++ 2007-06-28 Jose E. Marchesi ++ ++ * src/ps.c (ps_gettext): Bypass trailing ')' when scanning a ++Index: gv-3.6.3dfsg/doc/gv.texi ++=================================================================== ++--- gv-3.6.3dfsg.orig/doc/gv.texi 2007-07-28 16:21:14.000000000 +0200 +++++ gv-3.6.3dfsg/doc/gv.texi 2007-07-28 16:33:56.000000000 +0200 ++@@ -474,12 +474,17 @@ ++ @code{line} ++ @end itemize ++ ++-@item showTitle +++@item titleStyle ++ Whether the name of the displayed document should be shown in the ++ title bar of the window. The name of gv's icon will also change ++ accordingly if this resource is set to @code{True}. ++ ++-It defaults to @code{True}. +++If this is @code{0}, no title will be shown. +++@code{1} means to show a the document title or the file name if there is +++no document title. +++Only the file name is shown with @code{2}. +++ +++It defaults to @code{1}. ++ @item maximumWidth, maximumHeight ++ When resizing gv will not attempt to exceed the size specified ++ by these resources. +--- gv-3.6.3dfsg.orig/debian/patches/201439_escape ++++ gv-3.6.3dfsg/debian/patches/201439_escape +@@ -0,0 +1,228 @@ ++Index: gv/src/dialog.c ++=================================================================== ++--- gv.orig/src/dialog.c 2006-09-07 14:30:27.221001776 +0200 +++++ gv/src/dialog.c 2006-09-07 14:36:25.228576352 +0200 ++@@ -134,6 +134,7 @@ action_preferDialogPopupButton(w, event, ++ } ++ widgets_preferButton(pref,1); ++ widgets_preferButton(pref_old,0); +++ XtInstallAccelerators(dialogText,pref_old); ++ XtInstallAccelerators(dialogText,pref); ++ ENDMESSAGE(action_preferDialogPopupButton) ++ } ++Index: gv/src/FileSel.c ++=================================================================== ++--- gv.orig/src/FileSel.c 2006-09-07 14:30:27.243998280 +0200 +++++ gv/src/FileSel.c 2006-09-07 14:36:43.892738968 +0200 ++@@ -192,11 +192,6 @@ MetaZ: no-op()\n\ ++ : FS_textfieldFocusAction() extend-start()\ ++ "; ++ ++-static String TextField_accelerators = ++-"#override\n\ ++-Return: set() notify() unset()\ ++-"; ++- ++ #if 0 ++ #define FILE_SELECTION_LAYOUT \ ++ "\ ++@@ -534,6 +529,22 @@ static void Initialize(request, new, arg ++ CreateTextField(&FS_FILTERFRAME,&FS_FILTER,value,text_trans,"filter",new); ++ } ++ +++ if (BUTTONS_RESOURCE > 0 && BUTTONS_RESOURCE < 5 ) { +++ XtInstallAccelerators(FS_PATH,FS_BUTTON1); +++ XtInstallAccelerators(FS_FILTER,FS_BUTTON1); +++ if (BUTTONS_RESOURCE > 1) { +++ XtInstallAccelerators(FS_PATH,FS_BUTTON2); +++ XtInstallAccelerators(FS_FILTER,FS_BUTTON2); +++ } +++ if (BUTTONS_RESOURCE > 2) { +++ XtInstallAccelerators(FS_PATH,FS_BUTTON3); +++ XtInstallAccelerators(FS_FILTER,FS_BUTTON3); +++ } +++ if (BUTTONS_RESOURCE > 3) { +++ XtInstallAccelerators(FS_PATH,FS_BUTTON4); +++ XtInstallAccelerators(FS_FILTER,FS_BUTTON4); +++ } +++ } ++ SetPreferredButton(new,PREFERRED_BUTTON,TRUE); ++ ++ { ++@@ -929,22 +940,18 @@ static void SetPreferredButton(w,positio ++ FS_WIDGET w; ++ char name[10]; ++ Widget button; ++- static XtAccelerators accelerators = (XtAccelerators)NULL; ++ USE_Arg(2); ++ ++ BEGINMESSAGE(SetPreferredButton) ++- if (!accelerators) accelerators=XtParseAcceleratorTable(TextField_accelerators); ++ ++ IMESSAGE(position) ++ if (IS_BUTTON(position)) { ++ POSITION_TO_BUTTON_NAME(position,name); ++ button = XtNameToWidget((Widget)FS_FILE_SELECTION,name); ++ if (!install) { ++- SET_Value(button,XtNaccelerators,(XtAccelerators)NULL); ++ preferButton(button,0); ++ if (PREFERRED_BUTTON==position) PREFERRED_BUTTON=0; ++ } else { ++- SET_Value(button,XtNaccelerators,(XtAccelerators)accelerators); ++ XtInstallAccelerators(FS_PATH,button); ++ XtInstallAccelerators(FS_FILTER,button); ++ preferButton(button,1); ++Index: gv/src/gv_misc_res.dat ++=================================================================== ++--- gv.orig/src/gv_misc_res.dat 2006-09-07 14:34:48.696251496 +0200 +++++ gv/src/gv_misc_res.dat 2006-09-07 14:36:25.229576200 +0200 ++@@ -677,6 +677,10 @@ GV.TopLevelShell.Aaa.baseTranslations:#r ++ GV.TopLevelShell*Button.accelerators:#override\n\ ++ Return: set() notify() unset() ++ +++GV.TopLevelShell*dismiss.accelerators:#override\n\ +++ Escape: set() notify() unset()\n\ +++ Return: set() notify() unset() +++ ++ GV.TopLevelShell*Button.baseTranslations: #replace\n\ ++ Return: set() notify() unset()\n\ ++ : unset() \n\ ++@@ -688,6 +692,18 @@ GV.TopLevelShell*Button.baseTranslations ++ GV*TransientShell*Button.accelerators:#override\n\ ++ Return: set() notify() unset() ++ +++GV*TransientShell*cancel.accelerators:#override\n\ +++ Escape: set() notify() unset()\n\ +++ Return: set() notify() unset() +++ +++GV*TransientShell*button1.accelerators:#override\n\ +++ Escape: set() notify() unset()\n\ +++ Return: set() notify() unset() +++ +++GV*TransientShell*dismiss.accelerators:#override\n\ +++ Escape: set() notify() unset()\n\ +++ Return: set() notify() unset() +++ ++ GV*TransientShell*Button.baseTranslations: #replace\n\ ++ Return: set() notify() unset()\n\ ++ : unset() \n\ ++Index: gv/src/info.c ++=================================================================== ++--- gv.orig/src/info.c 2006-09-07 14:30:27.290991136 +0200 +++++ gv/src/info.c 2006-09-07 14:36:25.230576048 +0200 ++@@ -211,6 +211,8 @@ void makeInfoPopup() ++ XtSetArg(args[n], XtNright, XtChainRight); n++; ++ infodismiss = XtCreateManagedWidget("dismiss", buttonWidgetClass,infoform,args,n); ++ XtAddCallback(infodismiss, XtNcallback, cb_popdownInfoPopup,NULL); +++ XtInstallAccelerators(infoform, infodismiss); +++ XtInstallAccelerators(infotext, infodismiss); ++ ++ n=0; ++ XtSetArg(args[n], XtNfont, &font); n++; ++Index: gv/src/options_fs.c ++=================================================================== ++--- gv.orig/src/options_fs.c 2006-09-07 14:34:48.694251800 +0200 +++++ gv/src/options_fs.c 2006-09-07 14:36:25.230576048 +0200 ++@@ -190,10 +190,13 @@ static void options_fs_create() ++ n=0; ++ w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_fs_cb_apply,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_fs_cb_save,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_fs); +++ XtInstallAccelerators(optionControl, w); ++ ++ scratch_dir = widgets_createLabeledLineTextField("scratchDir", optionControl); ++ default_save_dir = widgets_createLabeledLineTextField("saveDir", optionControl); ++Index: gv/src/options_gs.c ++=================================================================== ++--- gv.orig/src/options_gs.c 2006-09-07 14:30:27.336984144 +0200 +++++ gv/src/options_gs.c 2006-09-07 14:36:25.230576048 +0200 ++@@ -307,12 +307,16 @@ void options_gs_create() ++ n=0; ++ w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_gs_cb_apply,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_gs_cb_save,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gs); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("defaults", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_gs_cb_defaults, NULL); +++ XtInstallAccelerators(optionControl, w); ++ ++ options_gs_setOptionsAtEntry(); ++ options_realize(popup,optionControl); ++Index: gv/src/options_gv.c ++=================================================================== ++--- gv.orig/src/options_gv.c 2006-09-07 14:30:27.359980648 +0200 +++++ gv/src/options_gv.c 2006-09-07 14:36:25.230576048 +0200 ++@@ -549,10 +549,13 @@ void options_gv_create() ++ n=0; ++ w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_gv_cb_apply,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_gv_cb_save,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_cb_popdown, (XtPointer)gv_options_gv); +++ XtInstallAccelerators(optionControl, w); ++ ++ options_gv_setOptionsAtEntry(); ++ options_realize(popup,optionControl); ++Index: gv/src/options_setup.c ++=================================================================== ++--- gv.orig/src/options_setup.c 2006-09-07 14:30:27.382977152 +0200 +++++ gv/src/options_setup.c 2006-09-07 14:36:25.230576048 +0200 ++@@ -400,10 +400,13 @@ void options_setup_create() ++ n=0; ++ w = XtCreateManagedWidget("apply", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_setup_cb_apply,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("save", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_setup_cb_save,NULL); +++ XtInstallAccelerators(optionControl, w); ++ w = XtCreateManagedWidget("dismiss", buttonWidgetClass,optionControl, args, n); ++ XtAddCallback(w, XtNcallback, options_cb_popdown,(XtPointer)gv_options_setup); +++ XtInstallAccelerators(optionControl, w); ++ ++ miscmenu = widgets_createLabeledTextField("miscmenu", optionControl); ++ magmenu = widgets_createLabeledTextField("magmenu", optionControl); ++Index: gv/src/widgets_misc.c ++=================================================================== ++--- gv.orig/src/widgets_misc.c 2006-09-07 14:30:27.406973504 +0200 +++++ gv/src/widgets_misc.c 2006-09-07 14:36:25.231575896 +0200 ++@@ -94,6 +94,7 @@ widgets_setToggle(w,value) ++ ++ static char *LineTextTr = "\ ++ Return: no-op()\n\ +++Escape: no-op()\n\ ++ Down: no-op()\n\ ++ Up: no-op()\n\ ++ Linefeed: no-op()\n\ ++@@ -157,6 +158,7 @@ widgets_createLabeledLineTextField(name, ++ /*##################################################*/ ++ ++ static char *TextTr = "\ +++Escape: no-op()\n\ ++ CtrlJ: no-op()\n\ ++ CtrlM: no-op()\n\ ++ CtrlN: no-op()\n\ ++Index: gv/src/zoom.c ++=================================================================== ++--- gv.orig/src/zoom.c 2006-09-07 14:30:27.431969704 +0200 +++++ gv/src/zoom.c 2006-09-07 14:36:25.231575896 +0200 ++@@ -189,6 +189,7 @@ zoom_createZoom(w, call_data) ++ n=0; ++ zdismiss = XtCreateManagedWidget(zoom_dismiss, buttonWidgetClass,zcontrol, args, n); ++ XtAddCallback(zdismiss, XtNcallback,cb_destroy,(XtPointer)zshell); +++ XtInstallAccelerators(zcontrol, zdismiss); ++ ++ XtRealizeWidget(zshell); ++ { +--- gv-3.6.3dfsg.orig/debian/patches/series ++++ gv-3.6.3dfsg/debian/patches/series +@@ -0,0 +1,14 @@ ++01_debian_config ++04_309949_grayscale ++05_314947_FTBFS_GNU_kFreeBSD ++201439_escape ++manual-whatis ++texinfo-dircategory ++299447and433898-nested-eps ++no_non_free_stdc_h ++95266_filename_as_title ++26497_widgetless ++439067resources ++149032fontsets ++276639popupwithinscreen -p0 ++configure_drop_libs +--- gv-3.6.3dfsg.orig/debian/patches/149032fontsets ++++ gv-3.6.3dfsg/debian/patches/149032fontsets +@@ -0,0 +1,50 @@ ++Index: gv-3.6.3dfsg/src/Vlist.c ++=================================================================== ++--- gv-3.6.3dfsg.orig/src/Vlist.c 2007-10-03 14:15:44.000000000 +0200 +++++ gv-3.6.3dfsg/src/Vlist.c 2007-10-03 14:16:07.000000000 +0200 ++@@ -314,6 +314,16 @@ ++ VlistWidget vw = (VlistWidget)w; ++ char * s; ++ int i; +++ int yofs, ydelta; +++ +++ if( vw->simple.international == True ) { +++ XFontSetExtents *ext = XExtentsOfFontSet(vw->label.fontset); +++ yofs = (ext->max_ink_extent.y<0)?-ext->max_ink_extent.y:ext->max_ink_extent.y; +++ ydelta = ext->max_ink_extent.height; +++ } else { +++ yofs = vw->label.font->max_bounds.ascent; +++ ydelta = vw->label.font->max_bounds.ascent + vw->label.font->max_bounds.descent; +++ } ++ ++ BEGINMESSAGE1(PaintEntryString) ++ s = vw->label.label; ++@@ -321,14 +331,20 @@ ++ if (s) while (i > 0 && (s = strchr(s,'\n'))) { s++; i--; } ++ if (s) { ++ char *nl = strchr(s,'\n'); ++- if (nl) *nl = '\0'; ++- 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)); ++- if (nl) *nl = '\n'; +++ int len; +++ if (nl) +++ len = nl - s; +++ else +++ len = strlen(s); +++ if( vw->simple.international == True ) +++ XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset, +++ vw->label.normal_GC, +++ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, +++ s, len); +++ else +++ XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC, +++ vw->label.label_x, vw->label.label_y + yofs + entry*ydelta, +++ s, len); ++ } ++ ENDMESSAGE1(PaintEntryString) ++ } +--- gv-3.6.3dfsg.orig/debian/patches/04_309949_grayscale ++++ gv-3.6.3dfsg/debian/patches/04_309949_grayscale +@@ -0,0 +1,12 @@ ++#!/bin/sh /usr/share/dpatch/dpatch-run ++@DPATCH@ ++--- gv-3.6.1.orig/src/main.c +++++ gv-3.6.1/src/main.c ++@@ -202,6 +202,7 @@ ++ {"pixmap", no_argument, NULL, PIXMAP_ARG}, ++ {"nopixmap", no_argument, NULL, NOPIXMAP_ARG}, ++ {"color", no_argument, NULL, COLOR_ARG}, +++ {"grayscale", no_argument, NULL, GRAYSCALE_ARG}, ++ {"help", no_argument, NULL, HELP_ARG}, ++ {"quiet", no_argument, NULL, QUIET_ARG}, ++ {"monochrome", no_argument, NULL, MONOCHROME_ARG}, +--- gv-3.6.3dfsg.orig/debian/patches/276639popupwithinscreen ++++ gv-3.6.3dfsg/debian/patches/276639popupwithinscreen +@@ -0,0 +1,82 @@ ++Index: src/magmenu.c ++=================================================================== ++RCS file: /sources/gv/gv/src/magmenu.c,v ++retrieving revision 1.2 ++diff -u -r1.2 magmenu.c ++--- src/magmenu.c 11 Nov 2004 12:21:05 -0000 1.2 +++++ src/magmenu.c 6 Dec 2007 17:58:53 -0000 ++@@ -246,7 +246,8 @@ ++ entry = XtCreateManagedWidget(gv_magmenu_entries[i]->name, smeBSBObjectClass,d->menuwidget,NULL,(Cardinal)0); ++ { ++ int menu_x, menu_y; ++- Dimension menu_width,entry_height,menu_border; +++ Dimension menu_width,entry_height,menu_border,menu_height; +++ Dimension screen_width,screen_height; ++ Position button_x, button_y; ++ ++ if (!XtIsRealized(d->menuwidget)) XtRealizeWidget(d->menuwidget); ++@@ -255,12 +256,21 @@ ++ XtGetValues(entry, args, n); ++ n=0; ++ XtSetArg(args[n], XtNwidth, &menu_width); ++n; +++ XtSetArg(args[n], XtNheight, &menu_height); ++n; ++ XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; ++ XtGetValues(d->menuwidget, args, n); ++ ++ XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); ++ menu_x = button_x-menu_width/2 -menu_border; ++ menu_y = button_y-entry_height/2; +++ +++ screen_width = WidthOfScreen(XtScreen(d->menuwidget)); +++ screen_height = HeightOfScreen(XtScreen(d->menuwidget)); +++ +++ if( menu_x + menu_width > screen_width && menu_width < screen_width ) +++ menu_x = screen_width - menu_width; +++ if( menu_y + menu_height > screen_height && menu_height < screen_height ) +++ menu_y = screen_height - menu_height; ++ n=0; ++ XtSetArg(args[n], XtNx, menu_x); n++; ++ XtSetArg(args[n], XtNy, menu_y); n++; ++Index: src/miscmenu.c ++=================================================================== ++RCS file: /sources/gv/gv/src/miscmenu.c,v ++retrieving revision 1.5 ++diff -u -r1.5 miscmenu.c ++--- src/miscmenu.c 10 Aug 2005 10:42:28 -0000 1.5 +++++ src/miscmenu.c 6 Dec 2007 17:58:53 -0000 ++@@ -243,7 +243,8 @@ ++ int i; ++ MiscMenuEntry e; ++ int menu_x, menu_y; ++- Dimension menu_width,entry_height,menu_border; +++ Dimension menu_width,menu_height,entry_height,menu_border; +++ Dimension screen_width,screen_height; ++ Position button_x, button_y; ++ for (i=0; gv_miscmenu_entries[i]; i++) { ++ e = gv_miscmenu_entries[i]; ++@@ -271,14 +272,23 @@ ++ ++ n=0; ++ XtSetArg(args[n], XtNwidth, &menu_width); ++n; +++ XtSetArg(args[n], XtNheight, &menu_height); ++n; ++ XtSetArg(args[n], XtNborderWidth, &menu_border); ++n; ++ XtGetValues(menuwidget, args, n); ++- +++ ++ XtTranslateCoords(w, event->xbutton.x, event->xbutton.y, &button_x, &button_y); ++ menu_x = button_x-menu_width/2 -menu_border; ++ menu_y = button_y-entry_height/2; ++ ++- n=0; +++ screen_width = WidthOfScreen(XtScreen(menuwidget)); +++ screen_height = HeightOfScreen(XtScreen(menuwidget)); +++ +++ if( menu_x + menu_width > screen_width && menu_width < screen_width ) +++ menu_x = screen_width - menu_width; +++ if( menu_y + menu_height > screen_height && menu_height < screen_height ) +++ menu_y = screen_height - menu_height; +++ +++ n=0; ++ XtSetArg(args[n], XtNx, menu_x); n++; ++ XtSetArg(args[n], XtNy, menu_y); n++; ++ XtSetValues(menuwidget, args, n); +--- gv-3.6.3dfsg.orig/debian/patches/configure_drop_libs ++++ gv-3.6.3dfsg/debian/patches/configure_drop_libs +@@ -0,0 +1,457 @@ ++Index: gv-3.6.3dfsg/configure ++=================================================================== ++--- gv-3.6.3dfsg.orig/configure 2007-12-06 19:27:12.000000000 +0100 +++++ gv-3.6.3dfsg/configure 2007-12-06 19:39:44.000000000 +0100 ++@@ -5686,15 +5686,6 @@ ++ echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } ++ fi ++ ++-if test "$no_x" = yes; then ++- # Not all programs may use this symbol, but it does not hurt to define it. ++- ++-cat >>confdefs.h <<\_ACEOF ++-#define X_DISPLAY_MISSING 1 ++-_ACEOF ++- ++- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= ++-else ++ if test -n "$x_includes"; then ++ X_CFLAGS="$X_CFLAGS -I$x_includes" ++ fi ++@@ -6910,97 +6901,6 @@ ++ # Check for libraries that X11R6 Xt/Xaw programs need. ++ ac_save_LDFLAGS=$LDFLAGS ++ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" ++- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to ++- # check for ICE first), but we must link in the order -lSM -lICE or ++- # we get undefined symbols. So assume we have SM if we have ICE. ++- # These have to be linked with before -lX11, unlike the other ++- # libraries we check for below, so use a different variable. ++- # John Interrante, Karl Berry ++- { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 ++-echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } ++-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then ++- echo $ECHO_N "(cached) $ECHO_C" >&6 ++-else ++- ac_check_lib_save_LIBS=$LIBS ++-LIBS="-lICE $X_EXTRA_LIBS $LIBS" ++-cat >conftest.$ac_ext <<_ACEOF ++-/* confdefs.h. */ ++-_ACEOF ++-cat confdefs.h >>conftest.$ac_ext ++-cat >>conftest.$ac_ext <<_ACEOF ++-/* end confdefs.h. */ ++- ++-/* Override any GCC internal prototype to avoid an error. ++- Use char because int might match the return type of a GCC ++- builtin and then its argument prototype would still apply. */ ++-#ifdef __cplusplus ++-extern "C" ++-#endif ++-char IceConnectionNumber (); ++-int ++-main () ++-{ ++-return IceConnectionNumber (); ++- ; ++- return 0; ++-} ++-_ACEOF ++-rm -f conftest.$ac_objext conftest$ac_exeext ++-if { (ac_try="$ac_link" ++-case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_link") 2>conftest.er1 ++- ac_status=$? ++- grep -v '^ *+' conftest.er1 >conftest.err ++- rm -f conftest.er1 ++- cat conftest.err >&5 ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); } && ++- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; } && ++- { ac_try='test -s conftest$ac_exeext' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; }; then ++- ac_cv_lib_ICE_IceConnectionNumber=yes ++-else ++- echo "$as_me: failed program was:" >&5 ++-sed 's/^/| /' conftest.$ac_ext >&5 ++- ++- ac_cv_lib_ICE_IceConnectionNumber=no ++-fi ++- ++-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++- conftest$ac_exeext conftest.$ac_ext ++-LIBS=$ac_check_lib_save_LIBS ++-fi ++-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 ++-echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } ++-if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then ++- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" ++-fi ++- ++- LDFLAGS=$ac_save_LDFLAGS ++- ++-fi ++- ++ ++ { echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 ++ echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6; } ++@@ -7088,250 +6988,6 @@ ++ ++ fi ++ ++- ++-{ echo "$as_me:$LINENO: checking for main in -lICE" >&5 ++-echo $ECHO_N "checking for main in -lICE... $ECHO_C" >&6; } ++-if test "${ac_cv_lib_ICE_main+set}" = set; then ++- echo $ECHO_N "(cached) $ECHO_C" >&6 ++-else ++- ac_check_lib_save_LIBS=$LIBS ++-LIBS="-lICE $X_LIBS $LIBS" ++-cat >conftest.$ac_ext <<_ACEOF ++-/* confdefs.h. */ ++-_ACEOF ++-cat confdefs.h >>conftest.$ac_ext ++-cat >>conftest.$ac_ext <<_ACEOF ++-/* end confdefs.h. */ ++- ++- ++-int ++-main () ++-{ ++-return main (); ++- ; ++- return 0; ++-} ++-_ACEOF ++-rm -f conftest.$ac_objext conftest$ac_exeext ++-if { (ac_try="$ac_link" ++-case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_link") 2>conftest.er1 ++- ac_status=$? ++- grep -v '^ *+' conftest.er1 >conftest.err ++- rm -f conftest.er1 ++- cat conftest.err >&5 ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); } && ++- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; } && ++- { ac_try='test -s conftest$ac_exeext' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; }; then ++- ac_cv_lib_ICE_main=yes ++-else ++- echo "$as_me: failed program was:" >&5 ++-sed 's/^/| /' conftest.$ac_ext >&5 ++- ++- ac_cv_lib_ICE_main=no ++-fi ++- ++-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++- conftest$ac_exeext conftest.$ac_ext ++-LIBS=$ac_check_lib_save_LIBS ++-fi ++-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_main" >&5 ++-echo "${ECHO_T}$ac_cv_lib_ICE_main" >&6; } ++-if test $ac_cv_lib_ICE_main = yes; then ++- cat >>confdefs.h <<_ACEOF ++-#define HAVE_LIBICE 1 ++-_ACEOF ++- ++- LIBS="-lICE $LIBS" ++- ++-fi ++- ++- ++-{ echo "$as_me:$LINENO: checking for main in -lSM" >&5 ++-echo $ECHO_N "checking for main in -lSM... $ECHO_C" >&6; } ++-if test "${ac_cv_lib_SM_main+set}" = set; then ++- echo $ECHO_N "(cached) $ECHO_C" >&6 ++-else ++- ac_check_lib_save_LIBS=$LIBS ++-LIBS="-lSM $X_LIBS $LIBS" ++-cat >conftest.$ac_ext <<_ACEOF ++-/* confdefs.h. */ ++-_ACEOF ++-cat confdefs.h >>conftest.$ac_ext ++-cat >>conftest.$ac_ext <<_ACEOF ++-/* end confdefs.h. */ ++- ++- ++-int ++-main () ++-{ ++-return main (); ++- ; ++- return 0; ++-} ++-_ACEOF ++-rm -f conftest.$ac_objext conftest$ac_exeext ++-if { (ac_try="$ac_link" ++-case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_link") 2>conftest.er1 ++- ac_status=$? ++- grep -v '^ *+' conftest.er1 >conftest.err ++- rm -f conftest.er1 ++- cat conftest.err >&5 ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); } && ++- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; } && ++- { ac_try='test -s conftest$ac_exeext' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; }; then ++- ac_cv_lib_SM_main=yes ++-else ++- echo "$as_me: failed program was:" >&5 ++-sed 's/^/| /' conftest.$ac_ext >&5 ++- ++- ac_cv_lib_SM_main=no ++-fi ++- ++-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++- conftest$ac_exeext conftest.$ac_ext ++-LIBS=$ac_check_lib_save_LIBS ++-fi ++-{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_main" >&5 ++-echo "${ECHO_T}$ac_cv_lib_SM_main" >&6; } ++-if test $ac_cv_lib_SM_main = yes; then ++- cat >>confdefs.h <<_ACEOF ++-#define HAVE_LIBSM 1 ++-_ACEOF ++- ++- LIBS="-lSM $LIBS" ++- ++-fi ++- ++- ++-{ echo "$as_me:$LINENO: checking for main in -lXext" >&5 ++-echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } ++-if test "${ac_cv_lib_Xext_main+set}" = set; then ++- echo $ECHO_N "(cached) $ECHO_C" >&6 ++-else ++- ac_check_lib_save_LIBS=$LIBS ++-LIBS="-lXext $X_LIBS $LIBS" ++-cat >conftest.$ac_ext <<_ACEOF ++-/* confdefs.h. */ ++-_ACEOF ++-cat confdefs.h >>conftest.$ac_ext ++-cat >>conftest.$ac_ext <<_ACEOF ++-/* end confdefs.h. */ ++- ++- ++-int ++-main () ++-{ ++-return main (); ++- ; ++- return 0; ++-} ++-_ACEOF ++-rm -f conftest.$ac_objext conftest$ac_exeext ++-if { (ac_try="$ac_link" ++-case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_link") 2>conftest.er1 ++- ac_status=$? ++- grep -v '^ *+' conftest.er1 >conftest.err ++- rm -f conftest.er1 ++- cat conftest.err >&5 ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); } && ++- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; } && ++- { ac_try='test -s conftest$ac_exeext' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; }; then ++- ac_cv_lib_Xext_main=yes ++-else ++- echo "$as_me: failed program was:" >&5 ++-sed 's/^/| /' conftest.$ac_ext >&5 ++- ++- ac_cv_lib_Xext_main=no ++-fi ++- ++-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++- conftest$ac_exeext conftest.$ac_ext ++-LIBS=$ac_check_lib_save_LIBS ++-fi ++-{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 ++-echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } ++-if test $ac_cv_lib_Xext_main = yes; then ++- cat >>confdefs.h <<_ACEOF ++-#define HAVE_LIBXEXT 1 ++-_ACEOF ++- ++- LIBS="-lXext $LIBS" ++- ++-fi ++- ++- ++ { echo "$as_me:$LINENO: checking for XtOpenDisplay in -lXt" >&5 ++ echo $ECHO_N "checking for XtOpenDisplay in -lXt... $ECHO_C" >&6; } ++ if test "${ac_cv_lib_Xt_XtOpenDisplay+set}" = set; then ++@@ -7500,87 +7156,6 @@ ++ fi ++ ++ ++-{ echo "$as_me:$LINENO: checking for main in -lXpm" >&5 ++-echo $ECHO_N "checking for main in -lXpm... $ECHO_C" >&6; } ++-if test "${ac_cv_lib_Xpm_main+set}" = set; then ++- echo $ECHO_N "(cached) $ECHO_C" >&6 ++-else ++- ac_check_lib_save_LIBS=$LIBS ++-LIBS="-lXpm $X_LIBS $LIBS" ++-cat >conftest.$ac_ext <<_ACEOF ++-/* confdefs.h. */ ++-_ACEOF ++-cat confdefs.h >>conftest.$ac_ext ++-cat >>conftest.$ac_ext <<_ACEOF ++-/* end confdefs.h. */ ++- ++- ++-int ++-main () ++-{ ++-return main (); ++- ; ++- return 0; ++-} ++-_ACEOF ++-rm -f conftest.$ac_objext conftest$ac_exeext ++-if { (ac_try="$ac_link" ++-case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_link") 2>conftest.er1 ++- ac_status=$? ++- grep -v '^ *+' conftest.er1 >conftest.err ++- rm -f conftest.er1 ++- cat conftest.err >&5 ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); } && ++- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; } && ++- { ac_try='test -s conftest$ac_exeext' ++- { (case "(($ac_try" in ++- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++- *) ac_try_echo=$ac_try;; ++-esac ++-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++- (eval "$ac_try") 2>&5 ++- ac_status=$? ++- echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++- (exit $ac_status); }; }; then ++- ac_cv_lib_Xpm_main=yes ++-else ++- echo "$as_me: failed program was:" >&5 ++-sed 's/^/| /' conftest.$ac_ext >&5 ++- ++- ac_cv_lib_Xpm_main=no ++-fi ++- ++-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++- conftest$ac_exeext conftest.$ac_ext ++-LIBS=$ac_check_lib_save_LIBS ++-fi ++-{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_main" >&5 ++-echo "${ECHO_T}$ac_cv_lib_Xpm_main" >&6; } ++-if test $ac_cv_lib_Xpm_main = yes; then ++- cat >>confdefs.h <<_ACEOF ++-#define HAVE_LIBXPM 1 ++-_ACEOF ++- ++- LIBS="-lXpm $LIBS" ++- ++-fi ++- ++- ++ { echo "$as_me:$LINENO: checking for XawInitializeWidgetSet in -lXaw3d" >&5 ++ echo $ECHO_N "checking for XawInitializeWidgetSet in -lXaw3d... $ECHO_C" >&6; } ++ if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then +--- gv-3.6.3dfsg.orig/debian/rules ++++ gv-3.6.3dfsg/debian/rules +@@ -0,0 +1,105 @@ ++#!/usr/bin/make -f ++ ++DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++CONFFLAGS += --enable-scrollbar-code --enable-signal-handler --disable-setenv-code ++ ++CFLAGS = -Wall -g ++ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) ++ CFLAGS += -O0 ++else ++ CFLAGS += -O2 ++endif ++ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) ++ CFLAGS += -DMESSAGES ++endif ++ ++version=3.6.3 ++get-orig-source: ++ test ! -d gv-$(version) ++ test ! -d gv-$(version).orig ++ if [ ! -e gv-$(version).tar.gz ] ; then wget ftp://ftp.gnu.org/gnu/gv/gv-$(version).tar.gz ; fi ++ tar -xzf gv-$(version).tar.gz ++ mv gv-$(version) gv-$(version)dfsg.orig ++ rm gv-$(version)dfsg.orig/src/stdc.h ++ rm gv-$(version)dfsg.orig/src/getenv.c ++ rm gv-$(version)dfsg.orig/src/setenv.c ++ rm gv-$(version)dfsg.orig/src/setenv.h ++ tar -cf - gv-$(version)dfsg.orig | gzip --best > gv_$(version)dfsg.orig.tar.gz ++ rm -r gv-$(version)dfsg.orig ++ ++clean: ++ dh_testdir ++ # is this is not here, someone forgot it when creating the package: ++ test -f maintainer-patch-stamp ++ # run distclean of configure was completed or attempted ++ if [ -f config.status -o -f config.log ] ; then $(MAKE) distclean ; fi ++ test ! -f config.status ++ rm -f doc/gv.info ++ dh_clean ++ rm -f build-arch-stamp build-indep-stamp ++ ++maintainer-prepare: ++ # This is supposed to be called by the maintainer, after copying the ++ # the debian/ directory into a new pristine source tree. ++ if [ -f maintainer-patch-stamp ] ; then \ ++ rm maintainer-patch-stamp ; \ ++ test -d ../gv-quilt-status ; \ ++ else \ ++ mkdir -p ../gv-quilt-status ; \ ++ fi ++ ln -sf debian/patches patches ++ ln -sf ../gv-quilt-status .pc ++ quilt upgrade ++ quilt push -a || test $$? = 2 ++maintainer-done: ++ # This is supposed to be called by the maintainer only, before ++ # when the package is ready to be built... ++ quilt push -a || test $$? = 2 ++ rm patches .pc ++ echo "package ready and patched for .diff.gz creation" > maintainer-patch-stamp ++ ++config.status: maintainer-patch-stamp configure ++ dh_testdir ++ ./configure --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) \ ++ $(CONFFLAGS) CFLAGS='$(CFLAGS)' LDFLAGS="-Wl,-z,defs" \ ++ --bindir=/usr/bin --libdir=/usr/share \ ++ --mandir=/usr/share/man --infodir=/usr/share/info ++ touch $@ ++ ++build-arch: build-arch-stamp ++build-arch-stamp: config.status ++ dh_testdir ++ $(MAKE) ++ touch $@ ++ ++binary-arch: build-arch-stamp ++ dh_testdir ++ dh_testroot ++ dh_clean ++ $(MAKE) install DESTDIR=${CURDIR}/debian/gv ++ dh_install ++ dh_installchangelogs ChangeLog ++ dh_installdocs AUTHORS NEWS README ++ dh_installinfo doc/gv.info ++ dh_installmenu ++ dh_installmime ++ dh_strip ++ dh_compress ++ dh_fixperms ++ dh_md5sums ++ dh_shlibdeps ++ dh_installdeb ++ dh_gencontrol ++ dh_builddeb ++ ++build-indep: build-indep-stamp ++build-indep-stamp: ++ touch $@ ++binary-indep: ++# nothing to do... ++ ++build: build-arch build-indep ++binary: binary-arch binary-indep ++ ++.PHONY: binary binary-arch binary-indep build build-arch build-indep clean +--- gv-3.6.3dfsg.orig/debian/copyright ++++ gv-3.6.3dfsg/debian/copyright +@@ -0,0 +1,101 @@ ++This package was put together by Christian Kesselheim ++using sources obtained from ftp://ftp.gnu.org/gnu/gv/. ++It was later maintained by Martin A. Godisch , ++then by Christoph Berg . ++The current maintainer is Bernhard R. Link . ++ ++Copyright (C) 1992 Timothy O. Theisen ++Copyright (c) 1995,1996,1997 Johannes Plass , ++Department of Physics, Johannes Gutenberg-University, Mainz, Germany. ++Copyright (C) 2004,2005,2006,2007 José E. Marchesi ++with changes from Maurizio Loreti that are in the public domain. ++ ++ 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., ++ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ ++On Debian GNU/Linux systems, the complete text of the GNU General ++Public License can be found in /usr/share/common-licenses/GPL-2. ++ ++Further Contributors include: ++ - Karl Berry ++ - John Bowman ++ - Brett W. McCoy ++ - Hans Fredrik Nordhaug ++ - Peter Breitenlohner ++ ++Parts of the usual auto* generated build scripts and parser code ++and the compatibility code in lib/ are: ++Copyright (C) 1984-2007 Free Software Foundation, Inc, ++install-sh is based on code Copyright (C) 1994 X Consortium ++ ++This package contains a modified version of the Layout widget, the original ++being: ++* Copyright 1991 Massachusetts Institute of Technology ++* Permission to use, copy, modify, distribute, and sell this software and its ++* documentation for any purpose is hereby granted without fee, provided that ++* the above copyright notice appear in all copies and that both that ++* copyright notice and this permission notice appear in supporting ++* documentation, and that the name of M.I.T. not be used in advertising or ++* publicity pertaining to distribution of the software without specific, ++* written prior permission. M.I.T. makes no representations about the ++* suitability of this software for any purpose. It is provided "as is" ++* without express or implied warranty. ++* ++* M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. ++* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++* ++* Author: Keith Packard, MIT X Consortium ++ ++########The dsfg.orig.tar.gz was created removing the following files:######## ++ ++The files src/getenv.c, src/setenv.c, because their license was: ++* Copyright (c) 1987 Regents of the University of California. ++* All rights reserved. ++* ++* Redistribution and use in source and binary forms are permitted ++* provided that: (1) source distributions retain this entire copyright ++* notice and comment, and (2) distributions including binaries display ++* the following acknowledgement: ``This product includes software ++* developed by the University of California, Berkeley and its contributors'' ++* in the documentation or other materials provided with the distribution ++* and in all advertising materials mentioning features or use of this ++* software. Neither the name of the University nor the names of its ++* contributors may be used to endorse or promote products derived ++* from this software without specific prior written permission. ++* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ++* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ++* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++ ++The file src/stdc.h, because its license was: ++* Copyright (c) 1988 The Regents of the University of California. ++* All rights reserved. ++* ++* Redistribution is only permitted until one year after the first shipment ++* of 4.4BSD by the Regents. Otherwise, redistribution and use in source and ++* binary forms are permitted provided that: (1) source distributions retain ++* this entire copyright notice and comment, and (2) distributions including ++* binaries display the following acknowledgement: This product includes ++* software developed by the University of California, Berkeley and its ++* contributors'' in the documentation or other materials provided with the ++* distribution and in all advertising materials mentioning features or use ++* of this software. Neither the name of the University nor the names of ++* its contributors may be used to endorse or promote products derived from ++* this software without specific prior written permission. ++* THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ++* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ++* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +--- gv-3.6.3dfsg.orig/debian/mime ++++ gv-3.6.3dfsg/debian/mime +@@ -0,0 +1,3 @@ ++application/postscript; /usr/bin/gv %s; test=test -n "$DISPLAY"; description=postscript ++application/ghostview; /usr/bin/gv %s; test=test -n "$DISPLAY" ++application/pdf; /usr/bin/gv %s; test=test -n "$DISPLAY" +--- gv-3.6.3dfsg.orig/debian/mini-gv.xpm ++++ gv-3.6.3dfsg/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.6.3dfsg.orig/debian/watch ++++ gv-3.6.3dfsg/debian/watch +@@ -0,0 +1,3 @@ ++# see uscan(1) for format ++version=3 ++http://ftp.gnu.org/gnu/gv/gv-(.*).tar.gz +--- gv-3.6.3dfsg.orig/debian/changelog ++++ gv-3.6.3dfsg/debian/changelog +@@ -0,0 +1,622 @@ ++gv (1:3.6.3dfsg-6) unstable; urgency=low ++ ++ * remove Vcs-* headers, as Vcs- is not for upstream's vcs. ++ * try to keep popup windows within the screen (Closes: 276639) ++ ++ -- Bernhard R. Link Thu, 06 Dec 2007 19:09:31 +0100 ++ ++gv (1:3.6.3dfsg-5) unstable; urgency=high ++ ++ * depend on new ghostscript-x instead of gs (Closes: 448679) ++ * to work around ghostscript providing gs and gs-gpl without ++ the full functionality of those packages, the alternative depends ++ are versioned on the packages I know of that offered gs. I hope ++ noone has another package providing gs around they want to have ++ installed exclusively. ++ * make Homepage: a proper header, move XS-Vcs to Vcs- ++ ++ -- Bernhard R. Link Wed, 31 Oct 2007 10:46:14 +0100 ++ ++gv (1:3.6.3dfsg-4) unstable; urgency=low ++ ++ * properly handle FontSets in Vlist.c when International resource is set ++ (Closes: 149032) ++ ++ -- Bernhard R. Link Wed, 3 Oct 2007 14:20:19 +0200 ++ ++gv (1:3.6.3dfsg-3) unstable; urgency=low ++ ++ * don't crash when XUSERFILESEARCHPATH is set (Closes: 439067, 441450) ++ * update to new menu policy ++ ++ -- Bernhard R. Link Mon, 10 Sep 2007 18:32:49 +0200 ++ ++gv (1:3.6.3dfsg-2) unstable; urgency=low ++ ++ * do not mistake %xxxxDocument for %%EndDocument (Closes: 433898) ++ * add option to use filename as title (Closes: 95266) ++ * add widgetless mode (Closes: 26497) ++ ++ -- Bernhard R. Link Sat, 28 Jul 2007 17:05:44 +0200 ++ ++gv (1:3.6.3dfsg-1) unstable; urgency=low ++ ++ * new maintainer (Closes: 407666) ++ * no longer uses quilt at build time (nor the seperated patches) ++ * general clean up (complete debian/copyright, clean up debian/rules, ...) ++ * add Vcs-{Browse,CVS} headers ++ * new upstream version ++ - handle filenames starting with "-" (Closes: 397118) ++ - includes fix for CVE-2006-5864 (so droping patches/398292-CVE-2006-5864) ++ - fixes X resource handling (so droping patches/393454_config) ++ * repack source to remove files with problematic licenses ++ ++ -- Bernhard R. Link Sun, 15 Jul 2007 21:38:19 +0200 ++ ++gv (1:3.6.2-4) unstable; urgency=low ++ ++ * QA upload. ++ * gv has been orphaned. Setting maintainer to QA group. ++ * Fix reading of ~/.gv config file. (Closes: #393454) ++ * Fix handling of files with nested .eps files. (Closes: #299447) ++ ++ -- Stefan Fritsch Sat, 05 May 2007 14:51:16 +0200 ++ ++gv (1:3.6.2-3) unstable; urgency=high ++ ++ * Update fix for CVE-2006-5864 as in DSA 1214-2 (See: #398292). ++ ++ -- Christoph Berg Fri, 5 Jan 2007 17:02:41 +0100 ++ ++gv (1:3.6.2-2) unstable; urgency=high ++ ++ * Apply patch by Werner Fink to fix ps_gettext() buffer overflow ++ vulnerability (Closes: #398292, CVE-2006-5864). ++ * Put @dircategory before @direntry so that it still works as debhelper ++ doesn't parse INFO-DIR-SECTION anymore (See: #337215, Blame: texinfo). ++ ++ -- Christoph Berg Mon, 13 Nov 2006 15:39:11 +0100 ++ ++gv (1:3.6.2-1) unstable; urgency=low ++ ++ * New upstream version. ++ * Removed patches that went upstream: ++ + 02_293976=045735_filename+unknown ++ + 03_294864=295056_scrollbar ++ + 06_334400_getopt_long_only ++ + 148533_use_Xresources ++ ++ -- Christoph Berg Wed, 11 Oct 2006 16:48:33 +0200 ++ ++gv (1:3.6.1-15) unstable; urgency=low ++ ++ * Depend on gs-gpl | gs. ++ * Add debtags to control file. ++ ++ -- Christoph Berg Fri, 22 Sep 2006 12:45:57 +0200 ++ ++gv (1:3.6.1-14) unstable; urgency=low ++ ++ * Use quilt for patches. ++ * Add patch by Bernhard Link to honor X resources (Closes: #148533). ++ * Add patch by Bernhard Link to enable ESC in dialog windows ++ (Closes: #201439). ++ * Put info page in correct section again. ++ * Use a sane whatis entry in manpage. ++ ++ -- Christoph Berg Wed, 13 Sep 2006 12:51:39 +0200 ++ ++gv (1:3.6.1-13) unstable; urgency=low ++ ++ * New maintainer (Closes: #347447). ++ * Move /usr/lib/gv to /usr/share/gv. ++ * Use dpatch for patches. ++ * Add patch to recognize single-dash options again (Closes: #334400). ++ * Convert packaging to debhelper. ++ * Remove old install-mime compatibility stuff (cf. version 1:3.5.8-14). ++ * Remove install-docs call (Closes: #315787). ++ * Remove 3.5.8 patches. ++ * Update Description. ++ * Bump Standards-Version. ++ ++ -- Christoph Berg Sat, 28 Jan 2006 22:08:19 +0100 ++ ++gv (1:3.6.1-12) unstable; urgency=low ++ ++ * Fixed FTBFS on GNU/kFreeBSD, closes: #314947. ++ Thanks to Aurelien Jarno. ++ ++ -- Martin A. Godisch Mon, 20 Jun 2005 20:17:55 +0200 ++ ++gv (1:3.6.1-11) unstable; urgency=low ++ ++ * Fixed option --grayscale, closes: #309949. ++ ++ -- Martin A. Godisch Fri, 20 May 2005 22:33:05 +0200 ++ ++gv (1:3.6.1-10) unstable; urgency=medium ++ ++ * Re-upload of 1:3.6.1-10 to trigger rebuild on arm. ++ * Added README.Debian note that command line arguments have changed, ++ closes: #295711. ++ ++ -- Martin A. Godisch Thu, 24 Mar 2005 17:04:15 +0100 ++ ++gv (1:3.6.1-9) unstable; urgency=medium ++ ++ * Fixed configure script, enabled scrollbar code, closes: #294864. ++ ++ -- Martin A. Godisch Sun, 13 Feb 2005 20:43:15 +0100 ++ ++gv (1:3.6.1-8) unstable; urgency=low ++ ++ * Enabled signal handling, closes: #294863. ++ * This time really added DEB_BUILD_OPTIONS="debug", see 1:3.6.1-7. ++ ++ -- Martin A. Godisch Sat, 12 Feb 2005 07:41:25 +0100 ++ ++gv (1:3.6.1-7) unstable; urgency=high ++ ++ * Re-applied lost 3.5.8 patch (filename quotation), closes: #293976. ++ * Added DEB_BUILD_OPTIONS="debug". ++ ++ -- Martin A. Godisch Mon, 07 Feb 2005 17:20:25 +0100 ++ ++gv (1:3.6.1-6) unstable; urgency=medium ++ ++ * Reverted changes for ghostview upgrade path, closes: #293812, ++ reopens: #289864, #291443. ++ ++ -- Martin A. Godisch Sun, 06 Feb 2005 08:36:50 +0100 ++ ++gv (1:3.6.1-5) unstable; urgency=low ++ ++ * Added compatibility symlink and provides for ghostview users, ++ closes: #291443. ++ ++ -- Martin A. Godisch Fri, 21 Jan 2005 16:01:40 +0100 ++ ++gv (1:3.6.1-4) unstable; urgency=low ++ ++ * Conflict with and replace ghostview, closes: #289864. ++ * Fixed prerm script. ++ ++ -- Martin A. Godisch Fri, 14 Jan 2005 20:21:55 +0100 ++ ++gv (1:3.6.1-3) unstable; urgency=low ++ ++ * Removed pdf2dsc and pdf2ps patch, closes: #288696. ++ ++ -- Martin A. Godisch Sat, 08 Jan 2005 09:29:10 +0100 ++ ++gv (1:3.6.1-2) unstable; urgency=low ++ ++ * Adjusted build-dependencies, closes: #288291. ++ * Fixed lintian errors. ++ ++ -- Martin A. Godisch Mon, 03 Jan 2005 18:34:25 +0100 ++ ++gv (1:3.6.1-1) unstable; urgency=low ++ ++ * New upstream release, closes: #282253. ++ ++ -- Martin A. Godisch Sat, 01 Jan 2005 21:59:30 +0100 ++ ++gv (1:3.5.8-36) unstable; urgency=medium ++ ++ * Reverted gs-gpl dependency, closes: #269339. ++ ++ -- Martin A. Godisch Wed, 01 Sep 2004 05:41:05 +0200 ++ ++gv (1:3.5.8-35) unstable; urgency=medium ++ ++ * Reenabled fixed DELAYSAFER, closes: #243442 et al. ++ ++ -- Martin A. Godisch Tue, 31 Aug 2004 18:05:20 +0200 ++ ++gv (1:3.5.8-34) unstable; urgency=medium ++ ++ * Further patches cleanup. ++ * Replaced gs dependency with gs-gpl. ++ * Added double-buffering support, closes: #206008. ++ Thanks to Fabrice Le Fessant and Martin Quinson. ++ * Fixed error message when opening empty files, closes: #252548. ++ * Deactivated DELAYSAFER patch, closes: #269234. ++ ++ -- Martin A. Godisch Tue, 31 Aug 2004 17:32:55 +0200 ++ ++gv (1:3.5.8-33) unstable; urgency=medium ++ ++ * Big build system cleanup. ++ * Changed function of delete key, closes: #159433. ++ * Hid hidden directories, closes: #223556. ++ * Fixed opening files in /tmp, closes: #243442 et al. ++ * Fixed permissions of tempfiles, closes: #250854. ++ * Removed xutils from build-dependencies. ++ * Updated standards version, added watch file. ++ ++ -- Martin A. Godisch Sun, 29 Aug 2004 14:31:10 +0200 ++ ++gv (1:3.5.8-32) unstable; urgency=medium ++ ++ * New maintainer upload, ++ closes: #212174, #206486, #206554, #206798, #212839. ++ * Applied bzip2 patch, closes: #153001. ++ Thanks to Tobias Burnus and Euan MacGregor. ++ ++ -- Martin A. Godisch Sat, 28 Aug 2004 20:49:20 +0200 ++ ++gv (1:3.5.8-31) unstable; urgency=low ++ ++ * Rebuild with correct umask (closes: #220807, #221042, #222314) ++ ++ -- Christian Kesselheim Thu, 11 Dec 2003 19:45:11 +0100 ++ ++gv (1:3.5.8-30) unstable; urgency=low ++ ++ * FTBFS when using gcc-3.3 fixed (closes: #197187) ++ ++ -- Christian Kesselheim Fri, 13 Jun 2003 00:37:10 +0200 ++ ++gv (1:3.5.8-29) unstable; urgency=low ++ ++ * Algorithm for guessing page media by looking at the documents ++ bounding box fixed (closes: #175023, #167994) ++ * GV did throw a segfault, when triggering "Respect document structure" ++ twice; fixed (closes: #152171) ++ * Upgraded to standards version 3.5.9.0 ++ ++ -- Christian Kesselheim Wed, 14 May 2003 17:01:15 +0200 ++ ++gv (1:3.5.8-28) unstable; urgency=low ++ ++ * Prevent gv from rashly triggering TOC update if only numeric keypad ++ navigation was used (thanx to Sebastian Leske ++ for tracking down this problem) ++ (closes: #166654) ++ * Quotes in man page fixed (patch by Kevin Ryde ) ++ (closes: #163745) ++ * Access beyound end of array fixed (closes: #167029) ++ * DSC parsing has been made case insensitive and does no longer insist ++ on trailing colons after each name; this will hopefully result in ++ less problems concerning badly structured documents (closes: #179643) ++ ++ -- Christian Kesselheim Tue, 6 May 2003 21:12:19 +0200 ++ ++gv (1:3.5.8-27) unstable; urgency=high ++ ++ * SECURITY: Fixed buffer overflow bug that allowed malformed ++ PDF/Postscript files to cause arbitrary code to run with the ++ privileges of the current user (closes: #162830). ++ Thanks to Jan Niehusmann for the patch. ++ ++ -- Christian Kesselheim Fri, 11 Oct 2002 12:15:59 +0100 ++ ++gv (1:3.5.8-26) unstable; urgency=low ++ ++ * Upgraded to standards version 3.5.6.0 ++ * Maintainer's email address exchanged ++ * Minor spelling mistakes in manpage fixed ++ ++ -- Christian Kesselheim Thu, 21 Mar 2002 14:58:18 +0100 ++ ++gv (1:3.5.8-25) unstable; urgency=high ++ ++ * New maintainer ++ * Keep page markers in ToC when toggeling 'antialiasing' ++ or some of the other flags (closes: #111039) ++ * Corrected handling of '-nosafer' and '-noquiet' (closes: #63223) ++ * Broken handling of malformed EPS files fixed (closes: #66059) ++ * Update ToC after auto-scrolling (closes: #46607) ++ * Replaced email address in "send error reports to" field ++ by maintainer's address, because upstream is dead ++ * Bashism in debian/rules fixed ++ ++ -- Christian Kesselheim Mon, 11 Feb 2002 13:38:12 +0100 ++ ++gv (1:3.5.8-24) unstable; urgency=low ++ ++ * Orphaned this package. ++ ++ -- Adrian Bunk Fri, 25 Jan 2002 12:50:51 +0100 ++ ++gv (1:3.5.8-23) unstable; urgency=high ++ ++ * Added a "Documents" menu hint. (closes: #121035) ++ ++ -- Adrian Bunk Fri, 11 Jan 2002 01:12:57 +0100 ++ ++gv (1:3.5.8-22) unstable; urgency=high ++ ++ * Make gv build again (patch by Jeff Licquia ++ ). (closes: #109902) ++ * Corrected some URLs in the documentation. (closes: #101630) ++ * Use the full path for the menu icon. (closes: #96346) ++ ++ -- Adrian Bunk Thu, 30 Aug 2001 21:19:07 +0200 ++ ++gv (1:3.5.8-21) unstable; urgency=low ++ ++ * Removed the outdated debian/shlibs.local. ++ * Strip gv better. ++ * Added a menu hint. (closes: #82334) ++ ++ -- Adrian Bunk Wed, 14 Feb 2001 19:52:19 +0100 ++ ++gv (1:3.5.8-20) unstable; urgency=low ++ ++ * Added missing build dependency on xutils. (closes: #80186) ++ * Enable antialiasing by default. (closes: #79913) ++ * Make /etc/X11/app-defaults/GV a conffile. ++ ++ -- Adrian Bunk Tue, 16 Jan 2001 00:40:35 +0100 ++ ++gv (1:3.5.8-19) unstable; urgency=low ++ ++ * Moved app-defaults from /usr/X11R6/lib/X11 to /etc/X11. ++ (closes: #77601) ++ ++ -- Adrian Bunk Fri, 15 Dec 2000 00:42:46 +0100 ++ ++gv (1:3.5.8-18) unstable; urgency=low ++ ++ * New maintainer. ++ * This upload goes to unstable. (closes: #68810) ++ * Added "-isp" to dpkg-gencontrol in debian/rules. ++ * Added Build-Depends. ++ * Updated the package description. ++ ++ -- Adrian Bunk Mon, 18 Sep 2000 12:35:57 +0200 ++ ++gv (1:3.5.8-17) frozen; urgency=low ++ ++ * Corrected wrong link from /usr/doc/gv to ++ ../share/doc/gv (previously it pointed to ../share/doc/gv#). ++ The only file affected is debian/postinst (closes: Bug#61140) ++ ++ -- Marco Pistore Mon, 27 Mar 2000 10:36:00 +0200 ++ ++gv (1:3.5.8-16) unstable; urgency=low ++ ++ * Removed empty lines from the top of file doc/gv.html, ++ so that it is correctly recognized as a html file ++ by dwww (closed: Bug#58977) ++ * Added DOCTYPE header to the doc/gv*.html files ++ * Documentation moved to /usr/share/doc/gv and link in /usr/doc ++ created. ++ * Moved to a recent debian-policy (3.1.1.1). ++ ++ -- Marco Pistore Fri, 3 Mar 2000 08:38:47 +0100 ++ ++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 +0200 ++ ++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 +--- gv-3.6.3dfsg.orig/debian/gv_icon.xpm ++++ gv-3.6.3dfsg/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.. ", ++" .......... ", ++" ....... ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" ", ++" "}; +--- gv-3.6.3dfsg.orig/debian/control ++++ gv-3.6.3dfsg/debian/control +@@ -0,0 +1,20 @@ ++Source: gv ++Section: text ++Priority: optional ++Maintainer: Bernhard R. Link ++Build-Depends: debhelper (>> 5), xaw3dg-dev, texinfo ++Standards-Version: 3.7.3 ++Homepage: http://www.gnu.org/software/gv/ ++ ++Package: gv ++Architecture: any ++Depends: ghostscript-x | gs-gpl (<< 8.61) | gs-afpl (<< 8.61) | gs-esp (<< 8.61), ${shlibs:Depends} ++Provides: postscript-viewer, pdf-viewer ++Replaces: gv-2d, gv-3d, fvwm-common (<< 2.0.46-BETA-2) ++Conflicts: gv-2d, gv-3d ++Description: PostScript and PDF viewer for X ++ gv is a comfortable viewer of PostScript and PDF files for the X ++ Window System. It uses the ghostscript PostScript interpreter ++ and is based on the classic X front-end for gs, ghostview, which ++ it has replaced now. ++XB-Tag: interface::x11, role::program, scope::application, uitoolkit::athena, use::viewing, works-with-format::pdf, works-with-format::postscript, works-with::text, x11::application +--- gv-3.6.3dfsg.orig/debian/install ++++ gv-3.6.3dfsg/debian/install +@@ -0,0 +1,2 @@ ++debian/gv_icon.xpm usr/share/pixmaps ++debian/mini-gv.xpm usr/share/pixmaps +--- gv-3.6.3dfsg.orig/debian/compat ++++ gv-3.6.3dfsg/debian/compat +@@ -0,0 +1 @@ ++5 +--- gv-3.6.3dfsg.orig/debian/menu ++++ gv-3.6.3dfsg/debian/menu +@@ -0,0 +1,3 @@ ++?package(gv):needs="x11" section="Applications/Viewers" title="GV" \ ++ icon="/usr/share/pixmaps/mini-gv.xpm" \ ++ command="/usr/bin/gv" hints="PostScript,Documents" +--- gv-3.6.3dfsg.orig/maintainer-patch-stamp ++++ gv-3.6.3dfsg/maintainer-patch-stamp +@@ -0,0 +1 @@ ++package ready and patched for .diff.gz creation diff --git a/intptr_t.patch b/gv-3.6.3-intptr_t.patch similarity index 72% rename from intptr_t.patch rename to gv-3.6.3-intptr_t.patch index 650634c..2894e43 100644 --- a/intptr_t.patch +++ b/gv-3.6.3-intptr_t.patch @@ -1,14 +1,14 @@ ---- 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 @@ +--- src/FileSel.c ++++ src/FileSel.c 2008-03-27 17:10:04.806005718 +0100 +@@ -40,6 +40,7 @@ #include /* for malloc etc.*/ #include /* for toupper */ #include +#include - #ifdef VMS - # include /* for chdir etc. */ -@@ -1085,9 +1086,9 @@ + #include + #include +@@ -1045,9 +1046,9 @@ static void FS_listAction(w, event, para if (!scrolling) { int entry = VlistEntryOfPosition(list,(int)event->xbutton.y); if (entry >=0 && entry < VlistEntries(list)) { @@ -21,39 +21,39 @@ } } } -@@ -1753,7 +1754,7 @@ +@@ -1660,7 +1661,7 @@ TopDirSelectionProc(w, client_data, call XtPointer client_data, call_data; { FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); - int item = (int) call_data; -+ int item = (intptr_t) call_data; ++ intptr_t item = (intptr_t) call_data; char newpath[FS_MAXNAMLEN]; BEGINMESSAGE(TopDirSelectionProc) -@@ -1799,7 +1800,7 @@ +@@ -1706,7 +1707,7 @@ CurDirSelectionProc(w, client_data, call { FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); char name[10]; - int item = (int) call_data; -+ int item = (intptr_t) call_data; ++ intptr_t item = (intptr_t) call_data; BEGINMESSAGE(CurDirSelectionProc) -@@ -1841,7 +1842,7 @@ +@@ -1748,7 +1749,7 @@ SubDirSelectionProc(w, client_data, call Widget w; XtPointer client_data, call_data; { - int item = (int)call_data; -+ int item = (intptr_t)call_data; ++ intptr_t item = (intptr_t)call_data; FS_WIDGET XtParent(XtParent(XtParent(XtParent(w)))); char newpath[FS_MAXNAMLEN]; -@@ -1946,14 +1947,14 @@ +@@ -1845,14 +1846,14 @@ SMESSAGE(XtName(p)) { Widget clip=NULL,aaa=NULL,scroll=NULL; FS_WIDGET p; - int style = (int)client_data; -+ int style = (intptr_t)client_data; ++ intptr_t style = (intptr_t)client_data; if (s[0] == 'c') { clip = FS_CURCLIP; aaa = FS_CURAAA; scroll = FS_CURSCROLL; } else if (s[0] == 's') { clip = FS_SUBCLIP; aaa = FS_SUBAAA; scroll = FS_SUBSCROLL; } else style=0; @@ -65,9 +65,9 @@ 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 @@ +--- src/actions.c ++++ src/actions.c 2004-04-30 16:35:07.000000000 +0200 +@@ -40,6 +40,7 @@ #include #include #include @@ -75,7 +75,7 @@ #include "paths.h" #include INC_X11(Intrinsic.h) -@@ -897,7 +898,7 @@ +@@ -897,7 +898,7 @@ action_setPageMark(w, event, params, num else if (!strcmp(params[1],mark)) spm=spm|SPM_MARK; else spm=spm|SPM_UNMARK; @@ -84,7 +84,7 @@ ENDMESSAGE(action_setPageMark) } -@@ -945,7 +946,7 @@ +@@ -945,7 +946,7 @@ action_setScale(w, event, params, num_pa if (i<0) i = (-i)|SCALE_MIN; i |= SCALE_REL; } @@ -93,7 +93,7 @@ ENDMESSAGE(action_setScale) } -@@ -971,7 +972,7 @@ +@@ -971,7 +972,7 @@ action_setOrientation(w, event, params, return; } o = doc_convStringToDocOrient(params[0]); @@ -102,7 +102,7 @@ ENDMESSAGE(action_setOrientation) } -@@ -999,7 +1000,7 @@ +@@ -999,7 +1000,7 @@ action_setPagemedia(w, event, params, nu } m = doc_convStringToPageMedia(doc,params[0]); @@ -111,9 +111,9 @@ 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 @@ +--- src/callbacks.c ++++ src/callbacks.c 2008-03-27 17:13:48.466712393 +0100 +@@ -40,6 +40,7 @@ #include #include #include @@ -121,36 +121,38 @@ #ifndef BUFSIZ # define BUFSIZ 1024 -@@ -150,8 +151,8 @@ +@@ -152,9 +153,9 @@ cb_newtocScrollbar(w, client_data, call_ BEGINMESSAGE(cb_newtocScrollbar) x = (int) newtocControl->core.x; - if (((int)client_data)==1) { - int dy = (int)call_data; +- y = (int) newtocControl->core.y - dy; + if (((intptr_t)client_data)==1) { -+ int dy = (intptr_t)call_data; - y = (int) newtocControl->core.y - dy; ++ intptr_t dy = (intptr_t)call_data; ++ y = (int)((intptr_t) newtocControl->core.y - dy); } else { float *percent = (float *) call_data; -@@ -260,7 +261,7 @@ + y = (int)(-*percent * newtocControl->core.height); +@@ -262,7 +263,7 @@ void cb_useBackingPixmap(w, client_data, Widget w; XtPointer client_data, call_data; { - int i = (int)client_data; -+ int i = (intptr_t)client_data; ++ intptr_t i = (intptr_t)client_data; BEGINMESSAGE(cb_useBackingPixmap) if (i&1) { -@@ -364,7 +365,7 @@ +@@ -366,7 +367,7 @@ cb_checkFile(w, client_data, call_data) int changed; BEGINMESSAGE(cb_checkFile) - changed = check_file(((int)client_data)); + changed = check_file(((intptr_t)client_data)); - if (changed==1) show_page(current_page,NULL); - ENDMESSAGE(cb_checkFile) - } -@@ -386,7 +387,7 @@ + if (changed==1) + { + cb_stopInterpreter(page,NULL,NULL); +@@ -392,7 +393,7 @@ static void watch_file (client_data, idp BEGINMESSAGE(watch_file) /* notification after timeout */ @@ -159,7 +161,7 @@ if (!file_fileIsNotUseful(gv_filename)) { int error; String s; -@@ -506,7 +507,7 @@ +@@ -509,7 +510,7 @@ cb_print(w, client_data, call_data) return; } @@ -168,7 +170,7 @@ pagelist=get_pagelist(&gv_print_mode); if (pagelist) GV_XtFree(pagelist); if (gv_print_mode==PAGE_MODE_INVALID) { -@@ -624,7 +625,7 @@ +@@ -627,7 +628,7 @@ cb_save(w, client_data, call_data) BEGINMESSAGE(cb_save) @@ -177,8 +179,12 @@ pagelist=get_pagelist(&gv_save_mode); if (pagelist) GV_XtFree(pagelist); if (gv_save_mode==PAGE_MODE_INVALID) { -@@ -708,7 +709,7 @@ - int type; +@@ -708,10 +709,10 @@ cb_doSave(w, client_data, call_data) + String name; + String error=NULL; + char *pagelist; +- int type; ++ intptr_t type; BEGINMESSAGE(cb_doSave) - if (client_data) type = (int)client_data; @@ -186,7 +192,7 @@ else type = FILE_TYPE_PS; name = XawFileSelectionGetPath(FileSel); -@@ -929,7 +930,7 @@ +@@ -932,7 +933,7 @@ cb_positionPage(w, client_data, call_dat cow = (int)control->core.width; coh = (int)control->core.height; @@ -195,54 +201,58 @@ if (!center) have_pagepos=misc_restorePagePosition(&px,&py); if (app_res.auto_center == True) center = True; -@@ -970,7 +971,7 @@ +@@ -973,7 +974,7 @@ cb_setPageMark(w, client_data, call_data Widget w; XtPointer client_data, call_data; { - int r=(int)client_data; -+ int r=(intptr_t)client_data; ++ intptr_t r = (intptr_t)client_data; int entry=XawVlistInvalid,change=XawVlistInvalid; BEGINMESSAGE(cb_setPageMark) -@@ -1023,7 +1024,7 @@ +@@ -1026,10 +1027,10 @@ cb_setScale(w, client_data, call_data) Widget w; XtPointer client_data, call_data; { - int i=(int)client_data; -+ int i=(intptr_t)client_data; ++ intptr_t i=(intptr_t)client_data; BEGINMESSAGE(cb_setScale) - i = scale_checkScaleNum(gv_scales,i); -@@ -1048,7 +1049,7 @@ +- i = scale_checkScaleNum(gv_scales,i); ++ i = scale_checkScaleNum(gv_scales, (int)i); + if (i>=0) { + if (i&SCALE_BAS) gv_scale_base = i&SCALE_VAL; + else gv_scale = i&SCALE_VAL; +@@ -1051,7 +1052,7 @@ cb_setOrientation(w, client_data, call_d Widget w; XtPointer client_data, call_data; { - int o = (int) client_data; -+ int o = (intptr_t) client_data; ++ intptr_t o = (intptr_t) client_data; int changed = 1; BEGINMESSAGE(cb_setOrientation) -@@ -1094,7 +1095,7 @@ +@@ -1097,7 +1098,7 @@ cb_setPagemedia(w, client_data, call_dat Widget w; XtPointer client_data, call_data; { - int media = (int)client_data; -+ int media = (intptr_t)client_data; ++ intptr_t 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 +--- src/main.c ++++ src/main.c 2004-04-30 16:36:16.000000000 +0200 @@ -72,6 +72,8 @@ - # include - #endif + #include + #include +#include + #include "types.h" #include "actions.h" #include "callbacks.h" -@@ -1038,8 +1040,8 @@ +@@ -1349,8 +1351,8 @@ void main_createScaleMenu() have_line=True; } scaleEntry[i] = XtCreateManagedWidget(gv_scales[i]->name, smeBSBObjectClass,scaleMenu,args,n); @@ -253,9 +263,9 @@ } 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 @@ +--- src/misc.c ++++ src/misc.c 2004-04-30 16:35:07.000000000 +0200 +@@ -65,6 +65,7 @@ #include #include #include @@ -263,7 +273,7 @@ #ifndef SEEK_SET # define SEEK_SET 0 -@@ -1647,7 +1648,7 @@ +@@ -1555,7 +1556,7 @@ void misc_buildPagemediaMenu() if (doc && doc->nummedia) { for (i = 0; i < doc->nummedia; i++) { pagemediaEntry[i] = XtCreateManagedWidget(doc->media[i].name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0); @@ -272,7 +282,7 @@ } w = XtCreateManagedWidget("line", smeLineObjectClass, pagemediaMenu,NULL,(Cardinal)0); } -@@ -1657,7 +1658,7 @@ +@@ -1565,7 +1566,7 @@ void misc_buildPagemediaMenu() if (!(gv_medias[i]->used)) continue; pagemediaEntry[i+num_doc_media] = XtCreateManagedWidget(gv_medias[i]->name,smeBSBObjectClass, pagemediaMenu,NULL,(Cardinal)0); @@ -281,9 +291,9 @@ } { 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 @@ +--- src/options_gv.c ++++ src/options_gv.c 2004-04-30 16:35:07.000000000 +0200 +@@ -40,6 +40,7 @@ #include #include #include @@ -291,7 +301,7 @@ #include "paths.h" #include INC_X11(Intrinsic.h) -@@ -251,7 +252,7 @@ +@@ -252,7 +253,7 @@ static void options_gv_cb_apply(w, clien k = gv_pagemedia; gv_pagemedia_auto = 0; i = doc_convStringToPageMedia(doc,app_res.default_pagemedia); @@ -300,7 +310,7 @@ if ((j != gv_pagemedia_auto) || (k != gv_pagemedia)) redisplay = True; } s_media = True; -@@ -276,7 +277,7 @@ +@@ -277,7 +278,7 @@ static void options_gv_cb_apply(w, clien j = gv_orientation_auto; k = gv_orientation; gv_orientation_auto = 0; diff --git a/gv-3.6.3-security.patch b/gv-3.6.3-security.patch new file mode 100644 index 0000000..e8bdbf5 --- /dev/null +++ b/gv-3.6.3-security.patch @@ -0,0 +1,940 @@ +--- src/Makefile.am ++++ src/Makefile.am 2008-03-27 14:10:24.644359171 +0100 +@@ -123,6 +123,7 @@ gv_SOURCES = Aaa.c \ + save.h \ + scale.c \ + scale.h \ ++ secscanf.c \ + gv_signal.c \ + gv_signal.h \ + version.c \ +--- src/Makefile.in ++++ src/Makefile.in 2008-03-27 14:18:31.898867989 +0100 +@@ -79,13 +79,13 @@ am__gv_SOURCES_DIST = Aaa.c Aaa_bison.c + options_gs.c options_gs.h options_gv.c options_gv.h \ + options_setup.c options_setup.h paths.h process.c process.h \ + popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \ +- scale.c scale.h gv_signal.c gv_signal.h version.c version.h \ +- versionp.h widgets_misc.c widgets_misc.h zoom.c zoom.h stdc.h \ +- Aaa_intern.h Aaa.h AaaP.h d_memdebug.h d_aaa_xtmem.h \ +- d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h d_proc_xtmem.h d_ps_mem.h \ +- d_ps_xtmem.h gv_message.h types.h Scrollbar.c Scrollbar.h \ +- ScrollbarP.h setenv.c setenv.h getenv.c d_mem.c d_mem.h \ +- d_xtmem.c d_xtmem.h ++ scale.c scale.h secscanf.c gv_signal.c gv_signal.h version.c \ ++ version.h versionp.h widgets_misc.c widgets_misc.h zoom.c \ ++ zoom.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \ ++ d_aaa_xtmem.h d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h \ ++ d_proc_xtmem.h d_ps_mem.h d_ps_xtmem.h gv_message.h types.h \ ++ Scrollbar.c Scrollbar.h ScrollbarP.h setenv.c setenv.h \ ++ getenv.c d_mem.c d_mem.h d_xtmem.c d_xtmem.h + @USE_SCROLLBAR_CODE_TRUE@am__objects_1 = Scrollbar.$(OBJEXT) + @USE_SETENV_CODE_TRUE@am__objects_2 = setenv.$(OBJEXT) \ + @USE_SETENV_CODE_TRUE@ getenv.$(OBJEXT) +@@ -103,9 +103,9 @@ am_gv_OBJECTS = Aaa.$(OBJEXT) Aaa_bison. + options_fs.$(OBJEXT) options_gs.$(OBJEXT) options_gv.$(OBJEXT) \ + options_setup.$(OBJEXT) process.$(OBJEXT) popup.$(OBJEXT) \ + ps.$(OBJEXT) resource.$(OBJEXT) save.$(OBJEXT) scale.$(OBJEXT) \ +- gv_signal.$(OBJEXT) version.$(OBJEXT) widgets_misc.$(OBJEXT) \ +- zoom.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ +- $(am__objects_3) ++ secscanf.$(OBJEXT) gv_signal.$(OBJEXT) version.$(OBJEXT) \ ++ widgets_misc.$(OBJEXT) zoom.$(OBJEXT) $(am__objects_1) \ ++ $(am__objects_2) $(am__objects_3) + gv_OBJECTS = $(am_gv_OBJECTS) + gv_LDADD = $(LDADD) + gv_DEPENDENCIES = $(top_srcdir)/lib/libgnu.a +@@ -261,8 +261,8 @@ sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat +-appdefaultsdir = /etc/X11/app-defaults ++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat ++appdefaultsdir = $(pkglibdir) + appdefaults_DATA = GV + EXTRA_DIST = ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat Aaa_bison.yacc \ + gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm gv_odd.xbm \ +@@ -303,9 +303,9 @@ gv_SOURCES = Aaa.c Aaa_bison.c Aaa_bison + options_gs.c options_gs.h options_gv.c options_gv.h \ + options_setup.c options_setup.h paths.h process.c process.h \ + popup.c popup.h ps.c ps.h resource.c resource.h save.c save.h \ +- scale.c scale.h gv_signal.c gv_signal.h version.c version.h \ +- versionp.h widgets_misc.c widgets_misc.h zoom.c zoom.h \ +- message.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \ ++ scale.c scale.h secscanf.c gv_signal.c gv_signal.h version.c \ ++ version.h versionp.h widgets_misc.c widgets_misc.h zoom.c \ ++ zoom.h message.h stdc.h Aaa_intern.h Aaa.h AaaP.h d_memdebug.h \ + d_aaa_xtmem.h d_fs_xtmem.h d_gv_mem.h d_gv_xtmem.h \ + d_proc_xtmem.h d_ps_mem.h d_ps_xtmem.h gv_message.h types.h \ + $(am__append_1) $(am__append_2) $(am__append_3) +@@ -436,6 +436,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secscanf.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widgets_misc.Po@am__quote@ +@@ -746,7 +747,7 @@ $(srcdir)/gv_make_res.dat : + @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat + @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat + @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat +- @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat ++ @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat + @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat + @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat + @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat +--- src/ps.c ++++ src/ps.c 2008-03-27 14:20:04.186703895 +0100 +@@ -93,6 +93,10 @@ extern Media *gv_medias; + #define memset(a,b,c) bzero(a,c) + #endif + ++extern int sec_sscanf(const char *, const char *, ...); ++ ++ ++ + /* We use this helper function for providing proper */ + /* case and colon :-) insensitive DSC matching */ + static int dsc_strncmp(s1, s2, n) +@@ -464,7 +468,7 @@ unc_ok: + doc = (struct document *) PS_malloc(sizeof(struct document)); + CHECK_MALLOCED(doc); + memset(doc, 0, sizeof(struct document)); +- sscanf(line, "%*s %256s", text); ++ sec_sscanf(line, "%*s %256s", text); + /*###jp###*/ + /*doc->epsf = iscomment(text, "EPSF-");*/ + doc->epsf = iscomment(text, "EPSF"); +@@ -560,11 +564,11 @@ scan_ok: + } else if (doc->date == NULL && iscomment(line+2, "CreationDate:")) { + doc->date = gettextline(line+length("%%CreationDate:")); + } else if (bb_set == NONE && iscomment(line+2, "BoundingBox:")) { +- sscanf(line+length("%%BoundingBox:"), "%256s", text); ++ sec_sscanf(line+length("%%BoundingBox:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + bb_set = ATEND; + } else { +- if (sscanf(line+length("%%BoundingBox:"), "%d %d %d %d", ++ if (sec_sscanf(line+length("%%BoundingBox:"), "%d %d %d %d", + &(doc->boundingbox[LLX]), + &(doc->boundingbox[LLY]), + &(doc->boundingbox[URX]), +@@ -572,7 +576,7 @@ scan_ok: + bb_set = 1; + else { + float fllx, flly, furx, fury; +- if (sscanf(line+length("%%BoundingBox:"), "%f %f %f %f", ++ if (sec_sscanf(line+length("%%BoundingBox:"), "%f %f %f %f", + &fllx, &flly, &furx, &fury) == 4) { + bb_set = 1; + doc->boundingbox[LLX] = fllx; +@@ -592,7 +596,7 @@ scan_ok: + } + } else if (orientation_set == NONE && + iscomment(line+2, "Orientation:")) { +- sscanf(line+length("%%Orientation:"), "%256s", text); ++ sec_sscanf(line+length("%%Orientation:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + orientation_set = ATEND; + } else if (strcmp(text, "Portrait") == 0) { +@@ -603,7 +607,7 @@ scan_ok: + orientation_set = 1; + } + } else if (page_order_set == NONE && iscomment(line+2, "PageOrder:")) { +- sscanf(line+length("%%PageOrder:"), "%256s", text); ++ sec_sscanf(line+length("%%PageOrder:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + page_order_set = ATEND; + } else if (strcmp(text, "Ascend") == 0) { +@@ -617,11 +621,11 @@ scan_ok: + page_order_set = 1; + } + } else if (pages_set == NONE && iscomment(line+2, "Pages:")) { +- sscanf(line+length("%%Pages:"), "%256s", text); ++ sec_sscanf(line+length("%%Pages:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + pages_set = ATEND; + } else { +- switch (sscanf(line+length("%%Pages:"), "%d %d", ++ switch (sec_sscanf(line+length("%%Pages:"), "%d %d", + &maxpages, &i)) { + case 2: + if (page_order_set == NONE) { +@@ -653,7 +657,7 @@ scan_ok: + doc->media[0].name = ps_gettext(line+length("%%DocumentMedia:"), + &next_char); + if (doc->media[0].name != NULL) { +- if (sscanf(next_char, "%f %f", &w, &h) == 2) { ++ if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) { + doc->media[0].width = w + 0.5; + doc->media[0].height = h + 0.5; + } +@@ -674,7 +678,7 @@ scan_ok: + doc->media[doc->nummedia].name = ps_gettext(line+length("%%+"), + &next_char); + if (doc->media[doc->nummedia].name != NULL) { +- if (sscanf(next_char, "%f %f", &w, &h) == 2) { ++ if (sec_sscanf(next_char, "%f %f", &w, &h) == 2) { + doc->media[doc->nummedia].width = w + 0.5; + doc->media[doc->nummedia].height = h + 0.5; + } +@@ -837,7 +841,7 @@ scan_ok: + /* Do nothing */ + } else if (doc->default_page_orientation == NONE && + iscomment(line+2, "PageOrientation:")) { +- sscanf(line+length("%%PageOrientation:"), "%256s", text); ++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text); + if (strcmp(text, "Portrait") == 0) { + doc->default_page_orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -856,7 +860,7 @@ scan_ok: + PS_free(cp); + } else if (page_bb_set == NONE && + iscomment(line+2, "PageBoundingBox:")) { +- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", + &(doc->default_page_boundingbox[LLX]), + &(doc->default_page_boundingbox[LLY]), + &(doc->default_page_boundingbox[URX]), +@@ -864,7 +868,7 @@ scan_ok: + page_bb_set = 1; + else { + float fllx, flly, furx, fury; +- if (sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f", ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f", + &fllx, &flly, &furx, &fury) == 4) { + page_bb_set = 1; + doc->default_page_boundingbox[LLX] = fllx; +@@ -959,7 +963,7 @@ scan_ok: + /* Do nothing */ + } else if (doc->default_page_orientation == NONE && + iscomment(line+2, "PageOrientation:")) { +- sscanf(line+length("%%PageOrientation:"), "%256s", text); ++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text); + if (strcmp(text, "Portrait") == 0) { + doc->default_page_orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -982,7 +986,7 @@ scan_ok: + PS_free(cp); + } else if (page_bb_set == NONE && + iscomment(line+2, "PageBoundingBox:")) { +- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", + &(doc->default_page_boundingbox[LLX]), + &(doc->default_page_boundingbox[LLY]), + &(doc->default_page_boundingbox[URX]), +@@ -990,7 +994,7 @@ scan_ok: + page_bb_set = 1; + else { + float fllx, flly, furx, fury; +- if (sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f", ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%f %f %f %f", + &fllx, &flly, &furx, &fury) == 4) { + page_bb_set = 1; + doc->default_page_boundingbox[LLX] = fllx; +@@ -1058,7 +1062,7 @@ newpage: + CHECK_MALLOCED(doc->pages); + } + label = ps_gettext(line+length("%%Page:"), &next_char); +- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0; ++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0; + if (nextpage == 1) { + ignore = thispage != 1; + } +@@ -1096,7 +1100,7 @@ continuepage: + /* Do nothing */ + } else if (doc->pages[doc->numpages].orientation == NONE && + iscomment(line+2, "PageOrientation:")) { +- sscanf(line+length("%%PageOrientation:"), "%256s", text); ++ sec_sscanf(line+length("%%PageOrientation:"), "%256s", text); + if (strcmp(text, "Portrait") == 0) { + doc->pages[doc->numpages].orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { +@@ -1128,11 +1132,11 @@ continuepage: + PS_free(cp); + } else if ((page_bb_set == NONE || page_bb_set == ATEND) && + iscomment(line+2, "PageBoundingBox:")) { +- sscanf(line+length("%%PageBoundingBox:"), "%256s", text); ++ sec_sscanf(line+length("%%PageBoundingBox:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + page_bb_set = ATEND; + } else { +- if (sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), "%d %d %d %d", + &(doc->pages[doc->numpages].boundingbox[LLX]), + &(doc->pages[doc->numpages].boundingbox[LLY]), + &(doc->pages[doc->numpages].boundingbox[URX]), +@@ -1142,7 +1146,7 @@ continuepage: + } + else { + float fllx, flly, furx, fury; +- if (sscanf(line+length("%%PageBoundingBox:"), ++ if (sec_sscanf(line+length("%%PageBoundingBox:"), + "%f %f %f %f", + &fllx, &flly, &furx, &fury) == 4) { + if (page_bb_set == NONE) page_bb_set = 1; +@@ -1193,7 +1197,7 @@ continuepage: + /* Do nothing */ + } else if (iscomment(line+2, "Page:")) { + PS_free(ps_gettext(line+length("%%Page:"), &next_char)); +- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0; ++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0; + if (!ignore && thispage == nextpage) { + if (doc->numpages > 0) { + doc->pages[doc->numpages-1].end = position; +@@ -1220,13 +1224,13 @@ continuepage: + doc->begintrailer = position; + section_len = line_len; + } else if (bb_set == ATEND && iscomment(line+2, "BoundingBox:")) { +- if (sscanf(line+length("%%BoundingBox:"), "%d %d %d %d", ++ if (sec_sscanf(line+length("%%BoundingBox:"), "%d %d %d %d", + &(doc->boundingbox[LLX]), + &(doc->boundingbox[LLY]), + &(doc->boundingbox[URX]), + &(doc->boundingbox[URY])) != 4) { + float fllx, flly, furx, fury; +- if (sscanf(line+length("%%BoundingBox:"), "%f %f %f %f", ++ if (sec_sscanf(line+length("%%BoundingBox:"), "%f %f %f %f", + &fllx, &flly, &furx, &fury) == 4) { + doc->boundingbox[LLX] = fllx; + doc->boundingbox[LLY] = flly; +@@ -1244,14 +1248,14 @@ continuepage: + } + } else if (orientation_set == ATEND && + iscomment(line+2, "Orientation:")) { +- sscanf(line+length("%%Orientation:"), "%256s", text); ++ sec_sscanf(line+length("%%Orientation:"), "%256s", text); + if (strcmp(text, "Portrait") == 0) { + doc->orientation = PORTRAIT; + } else if (strcmp(text, "Landscape") == 0) { + doc->orientation = LANDSCAPE; + } + } else if (page_order_set == ATEND && iscomment(line+2, "PageOrder:")) { +- sscanf(line+length("%%PageOrder:"), "%256s", text); ++ sec_sscanf(line+length("%%PageOrder:"), "%256s", text); + if (strcmp(text, "Ascend") == 0) { + doc->pageorder = ASCEND; + } else if (strcmp(text, "Descend") == 0) { +@@ -1260,7 +1264,7 @@ continuepage: + doc->pageorder = SPECIAL; + } + } else if (pages_set == ATEND && iscomment(line+2, "Pages:")) { +- if (sscanf(line+length("%%Pages:"), "%*u %d", &i) == 1) { ++ if (sec_sscanf(line+length("%%Pages:"), "%*u %d", &i) == 1) { + if (page_order_set == NONE) { + if (i == -1) doc->pageorder = DESCEND; + else if (i == 0) doc->pageorder = SPECIAL; +@@ -1286,7 +1290,7 @@ continuepage: + preread = 0; + if (DSCcomment(line) && iscomment(line+2, "Page:")) { + PS_free(ps_gettext(line+length("%%Page:"), &next_char)); +- if (sscanf(next_char, "%d", &thispage) != 1) thispage = 0; ++ if (sec_sscanf(next_char, "%d", &thispage) != 1) thispage = 0; + if (!ignore && thispage == nextpage) { + if (doc->numpages > 0) { + doc->pages[doc->numpages-1].end = position; +@@ -1825,7 +1829,7 @@ static char * readline (fd, lineP, posit + INFMESSAGE(encountered "BeginData:") + if (FD_LINE_LEN > 100) FD_BUF[100] = '\0'; + text[0] = '\0'; +- if (sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) { ++ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) { + if (strcmp(text, "Lines") == 0) { + INFIMESSAGE(number of lines to skip:,num) + while (num) { +@@ -1849,7 +1853,7 @@ static char * readline (fd, lineP, posit + else if IS_BEGIN("Binary:") { + int num; + INFMESSAGE(encountered "BeginBinary:") +- if (sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { ++ if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { + int read_chunk_size = LINE_CHUNK_SIZE; + INFIMESSAGE(number of chars to skip:,num) + while (num>0) { +@@ -1924,7 +1928,7 @@ pscopyuntil(fd, to, begin, end, comment) + INFMESSAGE(encountered "BeginData:") + if (FD_LINE_LEN > 100) FD_BUF[100] = '\0'; + text[0] = '\0'; +- if (sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) { ++ if (sec_sscanf(line+length("%%BeginData:"), "%d %*s %100s", &num, text) >= 1) { + if (strcmp(text, "Lines") == 0) { + INFIMESSAGE(number of lines:,num) + while (num) { +@@ -1947,7 +1951,7 @@ pscopyuntil(fd, to, begin, end, comment) + else if IS_BEGIN("Binary:") { + int num; + INFMESSAGE(encountered "BeginBinary:") +- if (sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { ++ if (sec_sscanf(line+length("%%BeginBinary:"), "%d", &num) == 1) { + int read_chunk_size = LINE_CHUNK_SIZE; + INFIMESSAGE(number of chars:,num) + while (num>0) { +@@ -2021,12 +2025,12 @@ pscopydoc(dest_file,src_filename,d,pagel + PS_free(comment); + continue; + } +- sscanf(comment+length("%%Pages:"), "%256s", text); ++ sec_sscanf(comment+length("%%Pages:"), "%256s", text); + if (strcmp(text, "(atend)") == 0) { + fputs(comment, dest_file); + pages_atend = True; + } else { +- switch (sscanf(comment+length("%%Pages:"), "%*d %d", &i)) { ++ switch (sec_sscanf(comment+length("%%Pages:"), "%*d %d", &i)) { + case 1: + fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i); + break; +@@ -2061,7 +2065,7 @@ pscopydoc(dest_file,src_filename,d,pagel + PS_free(comment); + continue; + } +- switch (sscanf(comment+length("%%Pages:"), "%*d %d", &i)) { ++ switch (sec_sscanf(comment+length("%%Pages:"), "%*d %d", &i)) { + case 1: + fprintf(dest_file, "%%%%Pages: %d %d\n", pages, i); + break; +--- src/secscanf.c ++++ src/secscanf.c 2002-09-20 13:54:53.000000000 +0200 +@@ -0,0 +1,540 @@ ++/* ++ * Secure sscanf - sscanf with an additional size argument for string ++ * 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/settitle.patch b/gv-3.6.3-settitle.patch similarity index 81% rename from settitle.patch rename to gv-3.6.3-settitle.patch index a00feb6..4f37738 100644 --- a/settitle.patch +++ b/gv-3.6.3-settitle.patch @@ -1,8 +1,8 @@ ---- 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 +--- src/callbacks.c ++++ src/callbacks.c 2004-04-30 22:59:01.000000000 +0200 +@@ -62,6 +62,11 @@ + #include + #include +#include +#include @@ -12,7 +12,7 @@ #include "types.h" #include "actions.h" #include "callbacks.h" -@@ -96,6 +101,82 @@ +@@ -95,6 +100,82 @@ static char* open_directory = NULL; /* cb_showTitle */ /*############################################################*/ @@ -95,7 +95,7 @@ void cb_showTitle(w, client_data, call_data) Widget w; -@@ -129,6 +210,8 @@ +@@ -124,6 +205,8 @@ cb_showTitle(w, client_data, call_data) } else { t = s = GV_XtNewString(versionIdentification[0]); } @@ -104,9 +104,9 @@ 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 @@ +--- src/main.c ++++ src/main.c 2004-04-30 22:50:21.000000000 +0200 +@@ -1226,6 +1226,7 @@ int main(argc, argv) INFMESSAGE(mapping toplevel) XtMapWidget(toplevel); @@ -114,14 +114,14 @@ } 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 @@ +--- src/misc.c ++++ src/misc.c 2008-03-27 17:16:44.877346759 +0100 +@@ -932,7 +932,7 @@ setup_ghostview() gv_pagemedia = m; } } - cb_showTitle(NULL,NULL,NULL); + cb_showTitle(toplevel,NULL,NULL); - if (show_title) { - if (doc && doc->title) { - buttonlabel = doc->title; + + if (show_date) { + if (doc && doc->date) { diff --git a/gv-3.6.3.dif b/gv-3.6.3.dif new file mode 100644 index 0000000..db5de26 --- /dev/null +++ b/gv-3.6.3.dif @@ -0,0 +1,177 @@ +--- .pkgextract ++++ .pkgextract 2006-02-28 15:49:27.000000000 +0100 +@@ -0,0 +1 @@ ++patch -p1 -b -s --suffix=".debian" < ../gv-3.6.3-deb.patch +--- NOTE ++++ NOTE 2008-03-27 13:49:41.452894000 +0100 +@@ -0,0 +1,52 @@ ++ ++** ++** Copyright (C) 1995, 1996, 1997 Johannes Plass ++** Copyright (C) 2004 Jose E. Marchesi ++** ++** This program is free software; you can redistribute it and/or modify ++** it under the terms of the GNU General Public License as published by ++** 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 ++** ++** Jose E. Marchesi (jemarch@gnu.org) ++** GNU Project ++** ++ ++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 +--- src/Ghostview.c ++++ src/Ghostview.c 2008-03-27 13:50:57.606662000 +0100 +@@ -1419,6 +1419,12 @@ StartInterpreter(w) + if (gvw->ghostview.safer) + { + argv[argc++] = "-dSAFER"; ++# ifdef ALLOW_PDF ++ /* The file created by pdf2dsc opens the original ++ pdf file with the read operator. */ ++ if (gv_filename_dsc && (!gvw->ghostview.filename || !strcmp(gvw->ghostview.filename,"-"))) ++ argv[argc++] = "-dDELAYSAFER"; ++# endif + } + + if (gvw->ghostview.arguments) { +--- src/Makefile.am ++++ src/Makefile.am 2008-03-27 17:36:23.280458747 +0100 +@@ -6,9 +6,9 @@ + + # File distribution + bin_PROGRAMS = gv +-dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat ++dist_pkglib_DATA = gv_system.ad gv_user.ad gv_class.ad gv_spartan.dat gv_user_res.dat gv_copyright.dat gv_widgetless.dat + +-appdefaultsdir = $(pkglibdir) ++appdefaultsdir = $(datadir)/X11/app-defaults + + appdefaults_DATA = GV + +@@ -172,7 +172,7 @@ $(srcdir)/gv_user.ad : $(srcdir)/gv_user + @echo "! gv_user.ad" >> $(srcdir)/gv_user.ad + @echo "! User specific application defaults for gv" >> $(srcdir)/gv_user.ad + @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> $(srcdir)/gv_user.ad +- @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> $(srcdir)/gv_user.ad ++ @echo "! Copyright (C) 2004,2005,2006,2007 Jose E. Marchesi" >> $(srcdir)/gv_user.ad + @echo "!" >> $(srcdir)/gv_user.ad + @cat $(srcdir)/gv_user_res.dat >> $(srcdir)/gv_user.ad + @cat $(srcdir)/gv_intern_res_unix.dat >> $(srcdir)/gv_user.ad +@@ -215,7 +215,7 @@ $(srcdir)/gv_class.ad : $(srcdir)/gv_fon + @echo "! gv_class.ad" >> $(srcdir)/gv_class.ad + @echo "! Application class defaults for gv" >> $(srcdir)/gv_class.ad + @echo "! Copyright (C) 1995, 1996, 1997 Johannes Plass" >> $(srcdir)/gv_class.ad +- @echo "! Copyright (C) 2004,2005,2006,2007 José E. Marchesi" >> $(srcdir)/gv_class.ad ++ @echo "! Copyright (C) 2004,2005,2006,2007 Jose E. Marchesi" >> $(srcdir)/gv_class.ad + @echo "!" >> $(srcdir)/gv_class.ad + @echo "" >> $(srcdir)/gv_class.ad + @cat $(srcdir)/gv_user_res.dat >> $(srcdir)/gv_class.ad +@@ -236,7 +236,7 @@ $(srcdir)/gv_make_res.dat : + @echo "GV.useBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(srcdir)/gv_make_res.dat + @echo "GV*dirs: Home\n\\" >> $(srcdir)/gv_make_res.dat + @echo " Tmp\n\\" >> $(srcdir)/gv_make_res.dat +- @echo " /usr/doc\n\\" >> $(srcdir)/gv_make_res.dat ++ @echo " /usr/share/doc\n\\" >> $(srcdir)/gv_make_res.dat + @echo " /usr/local/doc" >> $(srcdir)/gv_make_res.dat + @echo "GV*filter: no .*" >> $(srcdir)/gv_make_res.dat + @echo "GV*filters: None\n\\" >> $(srcdir)/gv_make_res.dat +--- src/gv_misc_res.dat ++++ src/gv_misc_res.dat 2006-02-28 15:49:27.000000000 +0100 +@@ -50,7 +50,7 @@ GV*Scrollbar.background: gray78 + GV*Scrollbar.pointerColor: black + GV*Scrollbar.pointerColorBackground: White + GV*Scrollbar.scrollbarBackground: gray71 +-GV*Scrollbar.foreground: gray78 ++GV*Scrollbar.foreground: gray65 + GV*optionsetupPopup*Text*Scrollbar.background:gray71 + GV*optionfsPopup*Text*Scrollbar.background:gray71 + +--- src/misc.c ++++ src/misc.c 2006-02-28 15:49:27.000000000 +0100 +@@ -1337,7 +1337,8 @@ set_new_orientation(pagenumber) + else if ( no == O_LANDSCAPE) w = landscapeEntry; + else if ( no == O_UPSIDEDOWN) w = upsidedownEntry; + else w = seascapeEntry; +- set_newBitmapIfChanged(w,bitmap); ++ if (w) ++ set_newBitmapIfChanged(w,bitmap); + + if (gv_swap_landscape != gv_swap_landscape_old) + widgets_setSelectedBitmap(swapEntry,gv_swap_landscape); +@@ -1369,13 +1370,17 @@ set_pagemediaButton_label(media_id) + Widget w; + if (pagemediaEntry[media_id]) w = pagemediaEntry[media_id]; + else w = pagemediaEntry[media_id-1]; ++ 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) ++ return; + } + + /*------------------------------------------------------------*/ +@@ -1443,7 +1448,8 @@ set_new_pagemedia(pagenumber) + else bitmap = app_res.selected_bitmap; + if (pagemediaEntry[gv_pagemedia]) w = pagemediaEntry[gv_pagemedia]; + else w = pagemediaEntry[gv_pagemedia-1]; +- set_newBitmapIfChanged(w,bitmap); ++ if (w) ++ set_newBitmapIfChanged(w,bitmap); + } + + if (gv_pagemedia_auto != gv_pagemedia_auto_old) widgets_setSelectedBitmap(autoMediaEntry,gv_pagemedia_auto); +--- src/ps.c ++++ src/ps.c 2008-03-27 18:28:32.973306228 +0100 +@@ -75,6 +75,8 @@ + #define BUFSIZ 1024 + #endif + #include ++#include ++#include + + #include "paths.h" + #include INC_X11(Intrinsic.h) diff --git a/gv-3.6.3.tar.bz2 b/gv-3.6.3.tar.bz2 new file mode 100644 index 0000000..246752e --- /dev/null +++ b/gv-3.6.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ab4f25aaabee9a1a79d68fb9d1a5b17bef2719ddb67eda86ea8b851ec7dc7c3 +size 390970 diff --git a/gv.changes b/gv.changes index 0327263..2bdb665 100644 --- a/gv.changes +++ b/gv.changes @@ -1,3 +1,52 @@ +------------------------------------------------------------------- +Thu Mar 27 19:01:38 CET 2008 - werner@suse.de + +- Update to gv 3.6.3 + * gv is now able to work with latest ghostscript: gs 8.57 + * The bug causing the version not to figure in the manual has been + fixed. + * The SIGINT signal is now masked (ignored) by gv. + * gv no more segfaults when reading a configuration file as produced by + State -> Setup Options -> Save + * gv should compile in non-GNU system that doesnt have glib2. The + `getopt' gnulib module has been imported to fix this. + * gv now correctly adjust the page index window after PAGE-UP and + PAGE-DOWN events. + * gv is now able to open files with minus character beginning + filenames. + * X resources related bugs has been fixed. gv is now able to get + resources from the display database, user file, gv system database + and command line doing the Right Thing (TM). + * gv is now able to correctly understand DocumentMedia and other DSC + directives that uses postscript strings. It was not possible with + previous versions due to a bug in the postscript names scanning + routine. + * New set of command line arguments. This solves the horrid bug on + gv 3.6.0 that made such release nearly unusable. See the + documentation for details about the new argument list. + * The "Reopen" entry on the File menu has been renamed to "Reload" in + order to be coherent with the "Reload" button. + * The distributed package structure have been fixed, now conforming a + legal GNU source package. + * The delete key now work as expected, that is, it deletes the next + character rather the last character when typed on text entries. + * Dot files are not shown by default on file selection forms. + * If you try to open an empty file you get a coherent error + message. + * New manual page + * The gs command used for PDF to PostScript conversion has been fixed to allow + document saving. + * New configuration/compilation/installation using GNU Autotools + * Documentation is now distributed in texinfo format. + * "Redisplay" button has been renamed to "Reload". + * Some GNU standard command line arguments are supported now: + --help, --usage and --version. + * Antialiasing is now used by default. + * Solved bug #11014: gv is capable to open files with spaces (or other + harm character) in the filename. +- Use Debain patch +- Port our patches to this version + ------------------------------------------------------------------- Sun Jan 13 17:51:44 CET 2008 - coolo@suse.de diff --git a/gv.spec b/gv.spec index 851ea4a..934a2d2 100644 --- a/gv.spec +++ b/gv.spec @@ -1,5 +1,5 @@ # -# spec file for package gv (Version 3.5.8) +# spec file for package gv (Version 3.6.3) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -10,45 +10,57 @@ # norootforbuild + Name: gv -BuildRequires: update-desktop-files xaw3d-devel xorg-x11 xorg-x11-devel +BuildRequires: update-desktop-files xorg-x11 xorg-x11-devel +%if %suse_version > 1020 +BuildRequires: xaw3d-devel +%else +BuildRequires: xaw3d +%endif +%if %suse_version < 1100 +BuildRequires: desktop-data-SuSE +%endif License: GPL v2 or later Group: Productivity/Publishing/PS +PreReq: %install_info_prereq Requires: ghostscript_x11 Conflicts: gs_serv gs_vga # NOTE: We don't want this dependency and desktop-data-SuSE is in all # desktop selections. #Requires: desktop-data-SuSE AutoReqProv: on -Url: http://wwwthep.physik.uni-mainz.de/~plass/gv/ +Url: http://www.gnu.org/software/gv/ Summary: A Program to View PostScript Files -Version: 3.5.8 -Release: 1300 -Source0: gv-3.5.8.tar.bz2 +Version: 3.6.3 +Release: 1 +Source0: gv-3.6.3.tar.bz2 Source1: gv.desktop Source2: gv.png -Patch0: gv-3.5.8-deb.patch -Patch1: gv-3.5.8.dif -Patch2: gv-3.5.8-security.patch -Patch3: gv-3.5.8-bzip2.patch +Patch0: gv-3.6.3-deb.patch +Patch1: gv-3.6.3.dif +Patch2: gv-3.6.3-security.patch +Patch3: gv-3.6.3-bzip2.patch # I18N patch originally from: # http://www.on.cs.keio.ac.jp/~yasu/jp_xaw.html # http://www.on.cs.keio.ac.jp/~yasu/linux/Xaw/gv-3.5.8-I18N-mb.patch # changed a little bit for SuSE: -Patch4: gv-3.5.8-I18N-mb.patch -Patch5: intptr_t.patch -Patch6: settitle.patch -Patch7: gv-3.5.8-gcc4.patch -Patch8: gv-3.5.8-sec2.patch +Patch4: gv-3.6.3-I18N-mb.patch +Patch5: gv-3.6.3-intptr_t.patch +Patch6: gv-3.6.3-settitle.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %if "%_exec_prefix" == "/usr/X11R6" %global _mandir %{_exec_prefix}/man +%define _x11lib %{_exec_prefix}/%{_lib} %define _x11data %{_exec_prefix}/lib/X11 %define _appdefdir %{_x11data}/app-defaults +%define _x11inc %{_x11_prefix}/include %else +%define _x11lib %{_libdir} %define _x11data %{_datadir}/X11 %define _appdefdir %{_x11data}/app-defaults +%define _x11inc %{_includedir} %endif %description @@ -61,119 +73,194 @@ Authors: -------- Tim Theisen Johannes Plass + José E. Marchesi %prep -%setup -n gv-3.5.8 -%patch0 -p 1 -b .deb -%patch1 -%patch2 -p1 -b .sec -%patch3 -p0 -b .bzip2 -%patch4 -p1 -b .I18N-mb -%patch5 -p1 -b .intptr_t -%patch6 -p1 -b .settitle -%patch7 -p0 -b .gcc4 -%patch8 -p0 -b .sec2 +%setup +echo >> src/Makefile.am +%patch0 -p1 -b .deb +%patch1 -p0 +%patch2 -p0 -b .sec +# fzopen from libzio does not work due ftell() +#patch3 -p0 -b .bzip2 +# +%patch4 -p0 -b .I18N-mb +%patch5 -p0 -b .intptr_t +%patch6 -p0 -b .settitle %build -xmkmf -a -make CCOPTIONS="$RPM_OPT_FLAGS" +autoreconf -fis +sed -ri 's@[[:blank:]]*-(R|rpath)[[:blank:]]*\$[[:alpha:]_]+@@g' configure +chmod 755 configure +CC=gcc +CFLAGS="$RPM_OPT_FLAGS" +LDFLAGS="-Wl,-z,defs" +cflags () +{ + local flag=$1; shift + case "${RPM_OPT_FLAGS}" in + *${flag}*) return + esac + if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + local var=$1; shift + eval $var=\${$var:+\$$var\ }$flag + fi + if test -n "$1" && g++ -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then + local var=$1; shift + eval $var=\${$var:+\$$var\ }$flag + fi +} +cflags -std=gnu89 CFLAGS +cflags -fno-strict-aliasing CFLAGS +cflags -Wno-unused CFLAGS +cflags -Wno-unprototyped-calls CFLAGS +cflags -pipe CFLAGS +export CC CFLAGS LDFLAGS +./configure --prefix=%{_prefix} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --with-x \ + --x-includes=%{_x11inc} \ + --x-libraries=%{_x11lib}\ + --enable-backing-pixmap \ + --disable-memmove-code \ + --disable-setenv-code \ + --with-default-papersize=a4 +make pkglibdir='%{_x11data}/gv' %install rm -rf %{buildroot} -make DESTDIR=%{buildroot} install -make DESTDIR=%{buildroot} install.man -make DESTDIR=%{buildroot} install.doc +mkdir %{buildroot} +make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install +make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-info +make DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-man +make -C src DESTDIR=%{buildroot} pkglibdir='%{_x11data}/gv' install-nls +mkdir -p %{buildroot}/%{_defaultdocdir}/gv install -m 0444 NOTE %{buildroot}/%{_defaultdocdir}/gv/Copyright # add font settings to app-defaults: for i in $(find %{buildroot}%{_x11data} -type f -name "GV") do - cat source/gv_font_res-I18N_mb.dat >> ${i} + cat src/gv_font_res-I18N_mb.dat >> ${i} + chmod 0644 ${i} done # japanese app-defaults: -mkdir -p %{buildroot}%{_x11data}/{ja,ja_JP.SJIS,ja_JP.UTF-8}/app-defaults -mv %{buildroot}%{_x11data}/ja_JP.eucJP/app-defaults/GV \ - %{buildroot}%{_x11data}/ja/app-defaults/GV -iconv -f EUC-JP -t SJIS < %{buildroot}%{_x11data}/ja/app-defaults/GV \ +mkdir -p %{buildroot}%{_x11data}/{ja_JP.SJIS,ja_JP.EUC-JP}/app-defaults +iconv -f UTF-8 -t SJIS < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \ > %{buildroot}%{_x11data}/ja_JP.SJIS/app-defaults/GV -iconv -f EUC-JP -t UTF-8 < %{buildroot}%{_x11data}/ja/app-defaults/GV \ - > %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV +iconv -f UTF-8 -t EUC-JP < %{buildroot}%{_x11data}/ja_JP.UTF-8/app-defaults/GV \ + > %{buildroot}%{_x11data}/ja_JP.EUC-JP/app-defaults/GV +mkdir -p %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults +iconv -f UTF-8 -t EUC-KR < %{buildroot}%{_x11data}/ko_KR.UTF-8/app-defaults/GV \ + > %{buildroot}%{_x11data}/ko_KR.EUC-KR/app-defaults/GV %suse_update_desktop_file -i gv Office Viewer +%post +%install_info --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz + +%postun +%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/gv.info.gz + %files %defattr(-,root,root) -/usr/share/applications/gv.desktop -/usr/share/pixmaps/gv.png +%{_datadir}/applications/gv.desktop +%{_datadir}/pixmaps/gv.png %dir %{_x11data}/gv/ -%config %{_x11data}/gv/gv_system.ad -%config %{_x11data}/gv/gv_user.ad -%config %{_x11data}/gv/gv_class.ad +%config %{_x11data}/gv/*.ad +%config %{_x11data}/gv/*.dat %config %{_appdefdir}/GV %dir %{_x11data}/?? %dir %{_x11data}/??_* %dir %{_x11data}/*/app-defaults -%config %{_x11data}/ja*/app-defaults/GV +%config %{_x11data}/*/app-defaults/GV %{_bindir}/gv -%doc %{_mandir}/man1/gv.1x.gz -%docdir %{_defaultdocdir}/gv/ +%doc %{_mandir}/man1/gv.1.gz +%doc %{_infodir}/gv.info.gz +%dir %{_defaultdocdir}/gv +%docdir %{_defaultdocdir}/gv %{_defaultdocdir}/gv/Copyright -%doc %{_defaultdocdir}/gv/gs.interface.gz -%doc %{_defaultdocdir}/gv/gv-faq.txt.gz -%doc %{_defaultdocdir}/gv/key-bindings.txt.gz -%doc %{_defaultdocdir}/gv/comments.doc.gz -%doc %{_defaultdocdir}/gv/gv.ps.gz -%doc %{_defaultdocdir}/gv/gv-1.html -%doc %{_defaultdocdir}/gv/gv-10.html -%doc %{_defaultdocdir}/gv/gv-11.html -%doc %{_defaultdocdir}/gv/gv-12.html -%doc %{_defaultdocdir}/gv/gv-13.html -%doc %{_defaultdocdir}/gv/gv-2.html -%doc %{_defaultdocdir}/gv/gv-3.html -%doc %{_defaultdocdir}/gv/gv-4.html -%doc %{_defaultdocdir}/gv/gv-5.html -%doc %{_defaultdocdir}/gv/gv-6.html -%doc %{_defaultdocdir}/gv/gv-7.html -%doc %{_defaultdocdir}/gv/gv-8.html -%doc %{_defaultdocdir}/gv/gv-9.html -%doc %{_defaultdocdir}/gv/gv-faq.html -%doc %{_defaultdocdir}/gv/gv.html -%dir %{_defaultdocdir}/gv/ %changelog -* Sun Jan 13 2008 - coolo@suse.de +* Thu Mar 27 2008 werner@suse.de +- Update to gv 3.6.3 + * gv is now able to work with latest ghostscript: gs 8.57 + * The bug causing the version not to figure in the manual has been + fixed. + * The SIGINT signal is now masked (ignored) by gv. + * gv no more segfaults when reading a configuration file as produced by + State -> Setup Options -> Save + * gv should compile in non-GNU system that doesnt have glib2. The + `getopt' gnulib module has been imported to fix this. + * gv now correctly adjust the page index window after PAGE-UP and + PAGE-DOWN events. + * gv is now able to open files with minus character beginning + filenames. + * X resources related bugs has been fixed. gv is now able to get + resources from the display database, user file, gv system database + and command line doing the Right Thing (TM). + * gv is now able to correctly understand DocumentMedia and other DSC + directives that uses postscript strings. It was not possible with + previous versions due to a bug in the postscript names scanning + routine. + * New set of command line arguments. This solves the horrid bug on + gv 3.6.0 that made such release nearly unusable. See the + documentation for details about the new argument list. + * The "Reopen" entry on the File menu has been renamed to "Reload" in + order to be coherent with the "Reload" button. + * The distributed package structure have been fixed, now conforming a + legal GNU source package. + * The delete key now work as expected, that is, it deletes the next + character rather the last character when typed on text entries. + * Dot files are not shown by default on file selection forms. + * If you try to open an empty file you get a coherent error + message. + * New manual page + * The gs command used for PDF to PostScript conversion has been fixed to allow + document saving. + * New configuration/compilation/installation using GNU Autotools + * Documentation is now distributed in texinfo format. + * "Redisplay" button has been renamed to "Reload". + * Some GNU standard command line arguments are supported now: + --help, --usage and --version. + * Antialiasing is now used by default. + * Solved bug #11014: gv is capable to open files with spaces (or other + harm character) in the filename. +- Use Debain patch +- Port our patches to this version +* Sun Jan 13 2008 coolo@suse.de - remove desktop-data from buildrequires -* Thu Jul 05 2007 - coolo@suse.de +* Thu Jul 05 2007 coolo@suse.de - put desktop file and icon into the package -* Fri Jun 01 2007 - dmueller@suse.de +* Fri Jun 01 2007 dmueller@suse.de - fix buildrequires -* Fri Nov 17 2006 - werner@suse.de +* Fri Nov 17 2006 werner@suse.de - Corrected version of last fix (bug #219454) -* Thu Nov 09 2006 - werner@suse.de +* Thu Nov 09 2006 werner@suse.de - Avoid buffer overflow in gv gettext() (bug #219454) -* Thu Aug 24 2006 - werner@suse.de +* Thu Aug 24 2006 werner@suse.de - Check for existence of gv.png -* Wed Aug 02 2006 - werner@suse.de +* Wed Aug 02 2006 werner@suse.de - Make it build with X11R7 -* Tue Feb 28 2006 - werner@suse.de +* Tue Feb 28 2006 werner@suse.de - Fix range of array subscript (bug #154109) -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Tue Nov 29 2005 - sbrabec@suse.cz +* Tue Nov 29 2005 sbrabec@suse.cz - Don't package icon already present in desktop-data-SuSE. Cleans rpm -V output. -* Tue Jun 07 2005 - meissner@suse.de +* Tue Jun 07 2005 meissner@suse.de - Use RPM_OPT_FLAGS. -* Mon May 23 2005 - mfabian@suse.de +* Mon May 23 2005 mfabian@suse.de - Bugzilla #85410: improve default fontsets to make it work better with the recent changes in the XLC_LOCALE files in Xorg. Japanese should look nicer now and warning messages should usually disappear. -* Mon Apr 18 2005 - werner@suse.de +* Mon Apr 18 2005 werner@suse.de - Set DELAYSAFER for dsc file of the pdf within a pipe (bug #78322) -* Wed Apr 13 2005 - werner@suse.de +* Wed Apr 13 2005 werner@suse.de - Add a return after label even for void functions for stupid gcc4 -* Wed Nov 17 2004 - werner@suse.de +* Wed Nov 17 2004 werner@suse.de - Add gv.png pixmap to file list -* Mon Jun 28 2004 - mfabian@suse.de +* Mon Jun 28 2004 mfabian@suse.de - add "-*-*-Medium-R-*--16-*-*-*-*-*-*-*" to all fontsets as a fallback to suppress useless warnings if "-*-*-Medium-R-*--14-*-*-*-*-*-*-*" or other sizes are not @@ -184,9 +271,9 @@ iconv -f EUC-JP -t UTF-8 < %{buildroot}%{_x11data}/ja/app-defaults/GV \ In 16 pixel, there are fonts for all common encodings already in the basic X11 packages, therefore 16 pixel should always work as a fallback. -* Fri May 28 2004 - adrian@suse.de +* Fri May 28 2004 adrian@suse.de - add "Office" to Categories to match the menu definition (#41338) -* Fri Apr 30 2004 - mfabian@suse.de +* Fri Apr 30 2004 mfabian@suse.de - Bugzilla #39594: add gv-3.5.8-I18N-mb.patch to support the display of multibyte file names. - intptr_t.patch: fix compiler warnings @@ -194,48 +281,48 @@ iconv -f EUC-JP -t UTF-8 < %{buildroot}%{_x11data}/ja/app-defaults/GV \ - fix display of file names in the window title and icons by setting _NET_WM_NAME and _NET_WM_ICON_NAME properties (thanks a lot to Marcus Schaefer for help). -* Thu Apr 29 2004 - werner@suse.de +* Thu Apr 29 2004 werner@suse.de - correct category for desktop file: "PostScript Viewer" -> "Viewer". -* Tue Apr 06 2004 - werner@suse.de +* Tue Apr 06 2004 werner@suse.de - Add desktop entry -* Sat Jan 10 2004 - adrian@suse.de +* Sat Jan 10 2004 adrian@suse.de - add %%defattr -* Mon Aug 25 2003 - werner@suse.de +* Mon Aug 25 2003 werner@suse.de - Fix menu entry for bunzip2 label -* Fri Aug 22 2003 - werner@suse.de +* Fri Aug 22 2003 werner@suse.de - Uncompress bzip2 files on the fly, patch based on Volker Kuhlmann's patch (bug #29260) -* Tue Apr 15 2003 - coolo@suse.de +* Tue Apr 15 2003 coolo@suse.de - use BuildRoot -* Mon Mar 10 2003 - werner@suse.de +* Mon Mar 10 2003 werner@suse.de - Fix sigsegv in case of unkown paper size. -* Fri Nov 08 2002 - werner@suse.de +* Fri Nov 08 2002 werner@suse.de - Remove XCOMM definition to make new cpp happy -* Fri Sep 20 2002 - okir@suse.de +* Fri Sep 20 2002 okir@suse.de - added security patch to address buffer overflows -* Tue Sep 17 2002 - ro@suse.de +* Tue Sep 17 2002 ro@suse.de - removed bogus self-provides -* Mon Jan 14 2002 - schwab@suse.de +* Mon Jan 14 2002 schwab@suse.de - Fix use of token concatenation. -* Fri Jun 22 2001 - ro@suse.de +* Fri Jun 22 2001 ro@suse.de - use ComplexProgramTargetNoMan -* Fri Oct 06 2000 - kukuk@suse.de +* Fri Oct 06 2000 kukuk@suse.de - change group tag - Remove bogus xshared requires, rpm will handle this correct -* Wed May 24 2000 - kukuk@suse.de +* Wed May 24 2000 kukuk@suse.de - Use /usr/share/doc/packages -* Mon Jan 24 2000 - werner@suse.de +* Mon Jan 24 2000 werner@suse.de - Add Debian patch 15 for gv 3.5.8 - Use RPM_OPT_FLAGS -* Mon Sep 20 1999 - ro@suse.de +* Mon Sep 20 1999 ro@suse.de - added Requires ghostscript_x11 -* Mon Sep 13 1999 - bs@suse.de +* Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. -* Wed Oct 15 1997 - werner@suse.de +* Wed Oct 15 1997 werner@suse.de - New version: 3.5.8 - This version is usable only with Xaw3d -* Thu Feb 13 1997 - werner@suse.de +* Fri Feb 14 1997 werner@suse.de - New package with gv version 2_7_6 - Remove call of Xaw/Xaw3d private function ... now we can use Xaw or Xaw3d or Xaw95. diff --git a/gv.test b/gv.test deleted file mode 100644 index 6a923f0..0000000 --- a/gv.test +++ /dev/null @@ -1,21 +0,0 @@ - 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 :-) -