*** ./doc/comments.doc- Wed Mar 19 18:00:00 1997 --- ./doc/comments.doc Sat Mar 29 20:55:05 1997 *************** *** 59,64 **** --- 59,65 ---- Legal 612x1008 Statement 396x612 Executive 540x720 + A2 1190x1684 A3 842x1190 A4 595x842 A4Small 595x842 *** ./doc/gs.interface- Wed Mar 19 18:00:00 1997 --- ./doc/gs.interface Sat Mar 29 20:55:05 1997 *************** *** 72,78 **** Margins around the window. The margins extend the imageable area beyond the boundaries of the window. This is primarily used for popup zoom windows. I have encountered several ! instances of PostScript program that position themselves with respect to the imageable area. The margins are specified in PostScript points. If omitted, the margins are assumed to be 0. --- 72,78 ---- Margins around the window. The margins extend the imageable area beyond the boundaries of the window. This is primarily used for popup zoom windows. I have encountered several ! instances of PostScript programs that position themselves with respect to the imageable area. The margins are specified in PostScript points. If omitted, the margins are assumed to be 0. *** ./doc/gv.html- Wed Mar 19 18:00:00 1997 --- ./doc/gv.html Mon Mar 31 14:18:31 1997 *************** *** 65,70 **** --- 65,73 ----
  • 11.3 Xaw3d +

    +

    12. Frequently Asked Questions

    +
    Previous *** ./doc/gv_faq.html- Sat Mar 29 20:55:05 1997 --- ./doc/gv_faq.html Mon Mar 31 14:25:14 1997 *************** *** 0 **** --- 1,152 ---- + + + + gv 2.9, March 1997: Ghostview Frequently Asked Questions + + + + Previous + Next + Table of Contents +
    +

    12. Ghostview Frequently Asked Questions

    + +

    Contents

    + + + +

    Additional Sources of Information

    + + + +

    FAQ

    + +
    +
    What happened to the + scroll bars?

    + + They have been removed in order to make more room for the image. + The displayed portion of the image may be moved by dragging the + image or the paner (panel between + the Save Marked and Redisplay buttons) + with the mouse. Alternatively, the cursor arrow keys can be used. + +

    + Similarly, the mouse may be used to drag the file list up and down + in the Open and Save dialogues. +

    How can I make even more room for + the image?

    + + Use the "spartan" style by starting gv with the command + +

    +     gv -style gv_spartan.dat
    + 
    + + This removes the Open, Save, + and Print buttons (they are still + available from the File menu) and replaces them with the + document attribute controls, which are normally along the top. + +

    Small characters aren't very clear + (eg. compared to dvips).

    + + Antialiasing can improve the display of bitmapped fonts (eg. from + TeX) when displayed on a colour or greyscale screen. The same + technique is used by dvips. + +

    + Antialiasing can be turned on with options menu + (File|Options ...), + and can be made default by selecting Save. + It is not on by default because it's slower. + +

    When the display is obscured + (eg. by another window) and then + brought back into view, the output is not refreshed automatically + (but the Refresh button does work).

    + + There are two methods used to save the contents of the window when + it's not currently displayed: backing store or backing pixmap. + Some X-servers seem to support only backing store (eg. VAXstations) + and some only backing pixmap (eg. some X-terminals, including EWS). + +

    + On VMS, the default may be changed by creating a file + called GV.DAT with the following line + (or, if the file already exists, add the line) + +

    +     GV*Ghostview.UseBackingPixmap: False
    + 
    + + This file should be placed in your home directory (ie. where + you find yourself immediately after logging in) unless you have + redefined the logical name DECW$USER_DEFAULTS, in which case it + should go in the directory specified by this logical name. + +

    + UseBackingPixmap is true by default + (so as to work on X-terminals), so should be defined + as false if, eg., a VAXstation display is used. + +

    + On Unix, the definition should go in ~/.gv . + +

    Characters are displayed in unreadable + reverse-video or as black or white rectangles.

    + + This occurs on EWS X-terminals, which do not implement bitmap/pixmap + displaying properly. On VMS, to fix this you need to create a file + called GHOSTSCRIPT.DAT with the following line + +

    +     Ghostscript*useXPutImage: false
    + 
    + + Again, this file should be placed in your home directory (i.e. where + you find yourself immediately after logging in) unless you have + redefined the logical name DECW$USER_DEFAULTS, in which case it + should go in the directory specified by this logical name. + +

    + On Unix, put the above line into a file called ~/Ghostscript . + +

    When I start VMS Ghostscript I get the + message "Cannot get Window from ghostview" and then ghostscript + exits.

    + + Ghostscript reserves the environment + variable GHOSTVIEW (logical + name or DCL symbol on VMS) for internal use, so it should not be used for + other purposes (eg. as a VMS command symbol for this program; + use GV instead). +

    + +
    + First created: 20th January 1997 (gv 2.7.6) +
    + Tim Adye, + <T.J.Adye@rl.ac.uk> +
    +
    + Previous + Next + Table of Contents + + *** ./doc/gv-setpage-bug.ps- Sat Mar 29 20:55:06 1997 --- ./doc/gv-setpage-bug.ps Sat Mar 29 20:55:06 1997 *************** *** 0 **** --- 1,31 ---- + %!PS-Adobe-2.0 + %%Title: Test to show gv/gs bug with the used of setpage + %%BoundingBox: 0 0 613 793 + %%Pages: 1 + %%EndComments + % The size in /setpage must differ from the initial size + statusdict /setpage known {statusdict begin 613 793 1 setpage end} if + %%EndProlog + %%Page: 1 1 + newpath 0 setgray 0 setlinecap 0 setlinejoin [] 0 setdash + + /inch { 72 mul } def + /Times-Roman findfont 24 scalefont setfont + + 1.5 inch 300 moveto (If you view this file at a size larger) show + 1.5 inch 250 moveto (than letter, gs will clip the bottom.) show + + /W { 10 } def + /W2 { W 2 mul } def + + W2 setlinewidth + W W moveto + 0 11 inch W2 sub rlineto + 8.5 inch W2 sub 0 rlineto + 0 -11 inch W2 add rlineto + closepath + stroke + + showpage + %%Trailer + %%EOF *** ./doc/gv_faq.txt- Sat Mar 29 20:55:06 1997 --- ./doc/gv_faq.txt Sat Mar 29 20:55:06 1997 *************** *** 0 **** --- 1,101 ---- + Ghostview Frequently Asked Questions gv 2.7.6 + ========= ========== ===== ========= + + Contents + ======== + + o What happened to the scroll bars? + o How can I make even more room for the image? + o Small characters aren't very clear (eg. compared to dvips). + o When the display is obscured (eg. by another window) and then brought + back into view, the output is not refreshed automatically. + o Characters are displayed in unreadable reverse-video or as black or + white rectangles. + o When I start VMS Ghostscript I get the message "Cannot get Window from + ghostview" and then ghostscript exits. + + + FAQ + === + + What happened to the scroll bars? + + They have been removed in order to make more room for the image. The + displayed portion of the image may be moved by dragging the image or + the paner (panel between the "Save Marked" and "Redisplay" buttons) with + the mouse. Alternatively, the cursor arrow keys can be used. + + Similarly, the mouse may be used to drag the file list up and down in + the "Open" and "Save" dialogues. + + How can I make even more room for the image? + + Use the "spartan" style by starting gv with the command + + gv -style gv_spartan.dat + + This removes the "Open", "Save", and "Print" buttons (they are still + available from the "File" menu) and replaces them with the document + attribute controls, which are normally along the top. + + Small characters aren't very clear (eg. compared to dvips). + + Antialiasing can improve the display of bitmapped fonts (eg. from TeX) + when displayed on a colour or greyscale screen. The same technique is + used by dvips. + + Antialiasing can be turned on with options menu ("File"|"Options ..."), and + can be made default by selecting "Save". It is not on by default because + it's slower. + + When the display is obscured (eg. by another window) and then brought back + into view, the output is not refreshed automatically (but the "Refresh" button + does work). + + There are two methods used to save the contents of the window when it's + not currently displayed: backing store or backing pixmap. Some + X-servers seem to support only backing store (eg. VAXstations) and some + only backing pixmap (eg. some X-terminals, including EWS). + + On VMS, the default may be changed by creating a file called GV.DAT + with the following line (or, if the file already exists, add the line) + + GV*Ghostview.UseBackingPixmap: False + + This file should be placed in your home directory (ie. where you find + yourself immediately after logging in) UNLESS you have redefined the + logical name DECW$USER_DEFAULTS, in which case it should go in the + directory specified by this logical name. + + UseBackingPixmap is true by default (so as to work on X-terminals), so + should be defined as false if, eg., a VAXstation display is used. + + On Unix, the definition should go in ~/.gv . + + Characters are displayed in unreadable reverse-video or as black or white + rectangles. + + This occurs on EWS X-terminals, which do not implement bitmap/pixmap + displaying properly. On VMS, to fix this you need to create a file + called GHOSTSCRIPT.DAT with the following line + + Ghostscript*useXPutImage: false + + Again, this file should be placed in your home directory (i.e. where + you find yourself immediately after logging in) UNLESS you have + redefined the logical name DECW$USER_DEFAULTS, in which case it should + go in the directory specified by this logical name. + + On Unix, put the above line into a file called ~/Ghostscript . + + When I start VMS Ghostscript I get the message "Cannot get Window from + ghostview" and then ghostscript exits. + + Ghostscript reserves the environment variable GHOSTVIEW (logical name + or DCL symbol on VMS) for internal use, so it should not be used for + other purposes (eg. as a VMS command symbol for this program; use GV + instead). + + ---------------------------------------------------------------------------- + First created: 20th January 1997 (gv 2.7.6) by + Tim Adye, *** ./source/misc_private.c- Wed Mar 19 18:00:00 1997 --- ./source/misc_private.c Sat Mar 29 20:55:07 1997 *************** *** 33,43 **** --- 33,61 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Cardinals.h) #include INC_X11(IntrinsicP.h) #include INC_XAW(LabelP.h) + #endif + #include "GhostviewP.h" #include "gv.h" *************** *** 61,67 **** --- 79,89 ---- return; } + #ifdef BASIC_XAW + shadow = 0; + #else shadow = w->threeD.shadow_width; + #endif if ((w->core.width > shadow+shadow) && (w->core.height > shadow+shadow)) { XClearArea(XtDisplay(widget),XtWindow(widget), shadow,shadow, *************** *** 80,86 **** else width = XTextWidth (fs, text , (int)(len) ); x = (Position) ((w->core.width-width)/2); } else { ! x = w->label.internal_width + w->threeD.shadow_width; } if (w->label.encoding) { --- 102,112 ---- else width = XTextWidth (fs, text , (int)(len) ); x = (Position) ((w->core.width-width)/2); } else { ! x = w->label.internal_width ! #ifndef BASIC_XAW ! + w->threeD.shadow_width ! #endif ! ; } if (w->label.encoding) { *** ./source/paths.h- Wed Mar 19 18:00:00 1997 --- ./source/paths.h Sat Mar 29 20:55:07 1997 *************** *** 29,34 **** --- 29,41 ---- #define _PATHS_H_ #include "config.h" + #ifndef XAW_NAME + # ifdef BASIC_XAW + # define XAW_NAME Xaw + # else + # define XAW_NAME Xaw3d + # endif + #endif #ifdef VMS # define INC_X11(aaa) # define INC_XMU(aaa) *************** *** 36,42 **** #else # define INC_X11(aaa) # define INC_XMU(aaa) ! # define INC_XAW(aaa) #endif #endif /* _PATHS_H_ */ --- 43,49 ---- #else # define INC_X11(aaa) # define INC_XMU(aaa) ! # define INC_XAW(aaa) #endif #endif /* _PATHS_H_ */ *** ./source/Imakefile- Wed Mar 19 18:00:00 1997 --- ./source/Imakefile Sat Mar 29 20:55:07 1997 *************** *** 37,42 **** --- 37,43 ---- actions.c\ action_mag.c\ callbacks.c\ + confirm.c\ dialog.c\ doc_misc.c\ error.c\ *************** *** 68,73 **** --- 69,75 ---- actions.o\ action_mag.o\ callbacks.o\ + confirm.o\ dialog.o\ doc_misc.o\ error.o\ *************** *** 138,146 **** SYS_LIBS_2 = -lXpm #endif 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) 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) OBJS = $(OBJS_0) $(OBJS_1) $(OBJS_2) $(OBJS_3) $(OBJS_4) $(OBJS_5)\ --- 140,161 ---- SYS_LIBS_2 = -lXpm #endif + #ifdef BASIC_XAW + USER_DEFS_XAW = -DBASIC_XAW + #endif + + #ifdef BROKEN_CPP + USER_DEFS_BCPP = -DBROKEN_CPP + #endif + + #ifdef FIXED_PAGE_PARAMS + USER_DEFS_FPP = -DFIXED_PAGE_PARAMS + #endif + 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_XAW) $(USER_DEFS_BCPP) $(USER_DEFS_FPP) 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) OBJS = $(OBJS_0) $(OBJS_1) $(OBJS_2) $(OBJS_3) $(OBJS_4) $(OBJS_5)\ *************** *** 167,172 **** --- 182,189 ---- GV_CLASS_NAME = GV GV_AD = $(GV_CLASS_NAME).ad GV_USER_AD = $(GV_CLASS_NAME).user.ad + STYLE1_DAT = gv_spartan.dat + STYLE1_H = gv_spartan.h GV_SOURCE_IMAKEFILE = ./Imakefile #if defined(USE_FALLBACK_RESOURCES) || defined(USE_FALLBACK_FILES) *************** *** 185,192 **** InstallNonExec(gv_icon.xbm,$(GV_LIB)) InstallNonExec(gv_selected.xbm,$(GV_LIB)) InstallNonExec($(GV_MESSAGES_DAT),$(GV_LIB)) #endif - InstallNonExec(gv_spartan.dat,$(GV_LIB)) InstallNonExec($(GV_AD), $(GV_LIB)) InstallNonExec($(GV_USER_AD),$(GV_LIB)) #ifndef USE_FALLBACK_RESOURCES --- 202,209 ---- InstallNonExec(gv_icon.xbm,$(GV_LIB)) InstallNonExec(gv_selected.xbm,$(GV_LIB)) InstallNonExec($(GV_MESSAGES_DAT),$(GV_LIB)) + InstallNonExec($(STYLE1_DAT),$(GV_LIB)) #endif InstallNonExec($(GV_AD), $(GV_LIB)) InstallNonExec($(GV_USER_AD),$(GV_LIB)) #ifndef USE_FALLBACK_RESOURCES *************** *** 198,204 **** main.o: $(GV_INTERN_RES_H) #ifdef USE_FALLBACK_FILES ! main.o: $(GV_MESSAGES_H) #endif #ifdef USE_FALLBACK_RESOURCES --- 215,221 ---- main.o: $(GV_INTERN_RES_H) #ifdef USE_FALLBACK_FILES ! main.o: $(GV_MESSAGES_H) $(STYLE1_H) #endif #ifdef USE_FALLBACK_RESOURCES *************** *** 209,216 **** @echo "creating $(APP_DEFAULTS_H)" @sh ./ad2c $(GV_AD) > $(APP_DEFAULTS_H) $(GV_MESSAGES_H): $(GV_MESSAGES_DAT) ! @echo "creating $(GV_MESSAGES_DAT)" @sh ./ad2c $(GV_MESSAGES_DAT) > $(GV_MESSAGES_H) includes::$(GV_INTERN_RES_H) --- 226,237 ---- @echo "creating $(APP_DEFAULTS_H)" @sh ./ad2c $(GV_AD) > $(APP_DEFAULTS_H) + $(STYLE1_H): $(STYLE1_DAT) + @echo "creating $(STYLE1_H)" + @sh ./ad2c $(STYLE1_DAT) > $(STYLE1_H) + $(GV_MESSAGES_H): $(GV_MESSAGES_DAT) ! @echo "creating $(GV_MESSAGES_H)" @sh ./ad2c $(GV_MESSAGES_DAT) > $(GV_MESSAGES_H) includes::$(GV_INTERN_RES_H) *************** *** 219,226 **** @echo "creating $(GV_INTERN_RES_H)" @sh ./ad2c $(GV_INTERN_RES_DAT) > $(GV_INTERN_RES_H) ! $(GV_AD): $(GV_FONT_RES_DAT) $(GV_LAYOUT_RES_DAT)\ ! $(GV_MAKE_RES_DAT) $(GV_MISC_RES_DAT) $(GV_USER_RES_DAT) @echo "creating $(GV_AD)" @cp $(GV_COPYRIGHT_DAT) $(GV_AD) @echo "!" >> $(GV_AD) --- 240,246 ---- @echo "creating $(GV_INTERN_RES_H)" @sh ./ad2c $(GV_INTERN_RES_DAT) > $(GV_INTERN_RES_H) ! $(GV_AD): $(GV_FONT_RES_DAT) $(GV_LAYOUT_RES_DAT) $(GV_MAKE_RES_DAT) $(GV_MISC_RES_DAT) $(GV_USER_RES_DAT) @echo "creating $(GV_AD)" @cp $(GV_COPYRIGHT_DAT) $(GV_AD) @echo "!" >> $(GV_AD) *************** *** 253,258 **** --- 273,280 ---- @echo "" >> $(GV_MAKE_RES_DAT) @echo "GV.scratchDir: $(SCRATCH_DIR)" >> $(GV_MAKE_RES_DAT) @echo "GV.defaultSaveDir: $(SAVE_DIR)" >> $(GV_MAKE_RES_DAT) + @echo "GV.fallbackPageMedia: $(PAGE_MEDIA)" >> $(GV_MAKE_RES_DAT) + @echo "GV*Ghostview.UseBackingPixmap: $(USE_BACKING_PIXMAP)" >> $(GV_MAKE_RES_DAT) @echo "" >> $(GV_MAKE_RES_DAT) @echo "$(IF_NOT_FF)GV.documentBitmap: $(DOC_BMP)" >> $(GV_MAKE_RES_DAT) @echo "$(IF_NOT_FF)GV.iconPixmap: $(ICON_BMP)" >> $(GV_MAKE_RES_DAT) *************** *** 286,289 **** --- 308,312 ---- $(RM) $(GV_MAKE_RES_DAT) $(RM) $(GV_MESSAGES_H) $(RM) $(GV_AD) + $(RM) $(STYLE1_H) $(RM) $(GV_USER_AD) *** ./source/Aaa.c- Wed Mar 19 18:00:00 1997 --- ./source/Aaa.c Sat Mar 29 20:55:08 1997 *************** *** 47,53 **** --- 47,58 ---- #include "stdc.h" #include "Aaa_intern.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_XMU(Converters.h) + #endif #define ForAllChildren(pw, childP) \ for ( (childP) = (pw)->composite.children ; \ *** ./source/Aaa.h- Wed Mar 19 18:00:00 1997 --- ./source/Aaa.h Sat Mar 29 20:55:08 1997 *************** *** 33,40 **** --- 33,46 ---- #define _Layout_h #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #else #include INC_X11(Constraint.h) #include INC_X11(Xfuncproto.h) + #endif /**************************************************************** * *** ./source/AaaP.h- Wed Mar 19 18:00:00 1997 --- ./source/AaaP.h Sat Mar 29 20:55:09 1997 *************** *** 33,39 **** --- 33,44 ---- #include "paths.h" #include "Aaa.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_X11(ConstrainP.h) + #endif typedef enum _BoxType { BoxBox, WidgetBox, GlueBox, VariableBox } BoxType; *** ./source/Aaa_intern.h- Wed Mar 19 18:00:00 1997 --- ./source/Aaa_intern.h Sat Mar 29 20:55:09 1997 *************** *** 41,46 **** --- 41,56 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #include + #include + #include + #else #include INC_X11(Xlib.h) #include INC_X11(Xresource.h) #include INC_X11(IntrinsicP.h) *************** *** 49,54 **** --- 59,66 ---- #include INC_XMU(Misc.h) #include INC_XMU(Converters.h) + #endif + #define DESTROY_EXPLICITLY #include "AaaP.h" *** ./source/Clip.c- Wed Mar 19 18:00:00 1997 --- ./source/Clip.c Sat Mar 29 20:55:10 1997 *************** *** 31,40 **** --- 31,53 ---- #include "message.h" #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + #include + #else + #include + #endif + #include + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(XawInit.h) #include INC_XMU(Misc.h) + #endif + #include "ClipP.h" #include *** ./source/Clip.h- Wed Mar 19 18:00:00 1997 --- ./source/Clip.h Sat Mar 29 20:55:10 1997 *************** *** 28,34 **** --- 28,42 ---- #ifndef _XawClip_h #define _XawClip_h + #ifdef BROKEN_CPP + #ifdef BASIC_XAW + # include + #else + # include + #endif + #else #include INC_XAW(Reports.h) + #endif /***************************************************************************** * *** ./source/ClipP.h- Wed Mar 19 18:00:00 1997 --- ./source/ClipP.h Sat Mar 29 20:55:10 1997 *************** *** 29,35 **** --- 29,40 ---- #ifndef _XawClipP_h #define _XawClipP_h + #ifdef BROKEN_CPP + #include + #else #include INC_X11(CompositeP.h) + #endif + #include "Clip.h" typedef struct { /* new fields in widget class */ *** ./source/FileSel.c- Wed Mar 19 18:00:00 1997 --- ./source/FileSel.c Mon Mar 31 14:33:03 1997 *************** *** 48,53 **** --- 48,71 ---- #endif #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #include + #include /* for XmuCompareISOLatin1() */ + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #else #include INC_X11(Xlib.h) #include INC_X11(Xos.h) #include INC_X11(IntrinsicP.h) *************** *** 57,62 **** --- 75,82 ---- #include INC_XAW(XawInit.h) #include INC_XAW(Command.h) #include INC_XAW(AsciiText.h) + #endif + #include "Clip.h" #include "Frame.h" #include "FileSelP.h" *************** *** 72,78 **** # define LISTWIDGET ListcWidget # define XAWLISTCHANGE XawListcChange #else ! # include INC_XAW(List.h) # define LISTWIDGETCLASS listWidgetClass # define LISTWIDGET ListWidget # define XAWLISTCHANGE XawListChange --- 92,106 ---- # define LISTWIDGET ListcWidget # define XAWLISTCHANGE XawListcChange #else ! # ifdef BROKEN_CPP ! # ifdef BASIC_XAW ! # include ! # else ! # include ! # endif ! # else ! # include INC_XAW(List.h) ! # endif # define LISTWIDGETCLASS listWidgetClass # define LISTWIDGET ListWidget # define XAWLISTCHANGE XawListChange *************** *** 145,151 **** ~Button2 : List(notify) List(stop-move)\n\ ~Button1 : List(set) List(start-move)\n\ : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\ "; static String curlist_translations = --- 173,182 ---- ~Button2 : List(notify) List(stop-move)\n\ ~Button1 : List(set) List(start-move)\n\ : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\n\ ! ~Button1 : List(set) List(start-move)\n\ ! : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\ "; static String curlist_translations = *************** *** 155,161 **** ~Button2 : List(set) List(notify) List(stop-move)\n\ ~Button1 : List(start-move)\n\ : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\ "; static String TextField_translations = --- 186,195 ---- ~Button2 : List(set) List(notify) List(stop-move)\n\ ~Button1 : List(start-move)\n\ : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\n\ ! ~Button1 : List(start-move)\n\ ! : List(move,0,2.0)\n\ ! ~Button1 : List(page) List(stop-move)\ "; static String TextField_translations = *** ./source/FileSel.h- Wed Mar 19 18:00:00 1997 --- ./source/FileSel.h Sat Mar 29 20:55:11 1997 *************** *** 29,35 **** --- 29,39 ---- #ifndef _XawFileSelection_h #define _XawFileSelection_h + #ifdef BROKEN_CPP + #include + #else #include INC_X11(Xfuncproto.h) + #endif #define XawFileSelectionRescan 1 #define XawFileSelectionFilter 2 *** ./source/Frame.c- Wed Mar 19 18:00:00 1997 --- ./source/Frame.c Sat Mar 29 20:55:11 1997 *************** *** 6,16 **** --- 6,30 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Converters.h) #include INC_XMU(CharSet.h) #include INC_XAW(XawInit.h) + #endif + #include "FrameP.h" /* *** ./source/FrameP.h- Wed Mar 19 18:00:00 1997 --- ./source/FrameP.h Sat Mar 29 20:55:11 1997 *************** *** 15,21 **** --- 15,26 ---- #ifndef _XawFrameP_h #define _XawFrameP_h + #ifdef BROKEN_CPP + #include + #else #include INC_X11(ConstrainP.h) + #endif + #include "Frame.h" *** ./source/Ghostview.c- Wed Mar 19 18:00:00 1997 --- ./source/Ghostview.c Tue Apr 1 17:55:34 1997 *************** *** 38,49 **** --- 38,60 ---- #include "config.h" #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #include + #include + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_X11(Xatom.h) #include INC_X11(Xproto.h) #include INC_X11(Xos.h) #include INC_X11(Xfuncs.h) + #endif + #include "GhostviewP.h" #ifdef VMS *************** *** 1491,1496 **** --- 1502,1513 ---- argv[argc++] = "-dNOPAUSE"; if (gvw->ghostview.quiet) argv[argc++] = "-dQUIET"; if (gvw->ghostview.safer) argv[argc++] = "-dSAFER"; + #ifdef FIXED_PAGE_PARAMS + /* Disable PostScript setpage and setpageparams so gs does not */ + /* change the page geometry on us. */ + argv[argc++] = "-dFIXEDMEDIA"; + argv[argc++] = "-dFIXEDRESOLUTION"; + #endif if (gvw->ghostview.arguments) { cptr = arguments = GV_XtNewString(gvw->ghostview.arguments); while (isspace(*cptr)) cptr++; *************** *** 2610,2615 **** --- 2627,2638 ---- strcat(cmd," \"-dNOPAUSE\""); if (gvw->ghostview.safer) strcat(cmd, " \"-dSAFER\""); if (gvw->ghostview.quiet) strcat(cmd, " \"-dQUIET\""); + #ifdef FIXED_PAGE_PARAMS + /* Disable PostScript setpage and setpageparams so gs does not */ + /* change the page geometry on us. */ + strcat(cmd, " \"-dFIXEDMEDIA\""); + strcat(cmd, " \"-dFIXEDRESOLUTION\""); + #endif if (gvw->ghostview.arguments) {strcat(cmd, " "); strcat(cmd,gvw->ghostview.arguments);} if (gvw->ghostview.filename != NULL && strcmp(gvw->ghostview.filename,"-")) { strcat(cmd," "); *** ./source/GhostviewP.h- Wed Mar 19 18:00:00 1997 --- ./source/GhostviewP.h Sat Mar 29 20:55:13 1997 *************** *** 28,35 **** --- 28,42 ---- #include "paths.h" #include "Ghostview.h" + + #ifdef BROKEN_CPP + #include + #include + #else #include INC_XMU(Atoms.h) #include INC_XMU(CharSet.h) + #endif + #include typedef struct { *** ./source/Listc.c- Wed Mar 19 18:00:00 1997 --- ./source/Listc.c Sat Mar 29 20:55:13 1997 *************** *** 52,61 **** --- 52,74 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Drawing.h) #include INC_XAW(XawInit.h) + #endif + #include "ListcP.h" /* *** ./source/Listc.h- Wed Mar 19 18:00:00 1997 --- ./source/Listc.h Sat Mar 29 20:55:14 1997 *************** *** 44,51 **** --- 44,61 ---- ***********************************************************************/ #include "paths.h" + + #ifdef BROKEN_CPP + #ifdef BASIC_XAW + # include + #else + # include + #endif + #include + #else #include INC_XAW(Simple.h) #include INC_X11(Xfuncproto.h) + #endif /* Resources: *** ./source/ListcP.h- Wed Mar 19 18:00:00 1997 --- ./source/ListcP.h Sat Mar 29 20:55:14 1997 *************** *** 52,58 **** --- 52,68 ---- ***********************************************************************/ #include "paths.h" + + #ifdef BROKEN_CPP + #ifdef BASIC_XAW + # include + #else + # include + #endif + #else #include INC_XAW(SimpleP.h) + #endif + #include "Listc.h" #define NO_HIGHLIGHT XAW_LIST_NONE *** ./source/action_mag.c- Wed Mar 19 18:00:00 1997 --- ./source/action_mag.c Sat Mar 29 20:55:15 1997 *************** *** 34,39 **** --- 34,57 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + # include + # include + #else + # include + # include + # include + # include + # include + #endif + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(SimpleMenu.h) *************** *** 41,46 **** --- 59,66 ---- #include INC_XAW(SmeLine.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Scrollbar.h) + #endif + #include "Ghostview.h" #include "actions.h" *** ./source/actions.c- Wed Mar 19 18:00:00 1997 --- ./source/actions.c Sat Mar 29 20:55:15 1997 *************** *** 67,72 **** --- 67,93 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + # include + # include + # include + #else + # include + # include + # include + # include + # include + # include + #endif + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Cardinals.h) *************** *** 76,81 **** --- 97,104 ---- #include INC_XAW(Scrollbar.h) #include INC_XAW(MenuButton.h) #include INC_X11(IntrinsicP.h) + #endif + #include "Aaa.h" #include "Clip.h" #include "Ghostview.h" *************** *** 90,95 **** --- 113,119 ---- #include "ps.h" #include "doc_misc.h" #include "dialog.h" /* include the popup headers for action_delete_window */ + #include "confirm.h" #include "note.h" #include "info.h" #include "main_resources.h" *************** *** 922,927 **** --- 946,952 ---- else s = w; if (s==infopopup) {INFMESSAGE(infopopup) cb_popdownInfoPopup((Widget)NULL,NULL,NULL); } else if (s==dialogpopup) {INFMESSAGE(dialogpopup) cb_popdownDialogPopup((Widget)NULL,NULL,NULL); } + else if (s==confirmpopup) {INFMESSAGE(confirmpopup) cb_popdownConfirmPopup((Widget)NULL,NULL,NULL); } else if (s==notepopup) {INFMESSAGE(notepopup) cb_popdownNotePopup((Widget)NULL,NULL,NULL); } else if (s==optionpopup) {INFMESSAGE(optionpopup) cb_popdownOptionPopup((Widget)NULL,NULL,NULL); } else if (s==versionpopup) {INFMESSAGE(versionpopup) cb_popdownVersionPopup((Widget)NULL,NULL,NULL); } *** ./source/callbacks.c- Wed Mar 19 18:00:00 1997 --- ./source/callbacks.c Sat Mar 29 20:55:16 1997 *************** *** 69,83 **** --- 69,103 ---- #endif #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + #else + # include + # include + #endif + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Cardinals.h) #include INC_XAW(AsciiText.h) + #endif + #include "Clip.h" #include "FileSel.h" #include "Ghostview.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_X11(IntrinsicP.h) + #endif #include "actions.h" #include "callbacks.h" *************** *** 90,95 **** --- 110,116 ---- #include "popup_misc.h" #include "process.h" #include "dialog.h" + #include "confirm.h" #include "main_resources.h" #include "main_globals.h" #include "misc.h" *************** *** 499,504 **** --- 520,528 ---- } } + /* We assume the if ext was filled, then we'll definitely write PDF. */ + if (gv_scanfilename && *ext) name= file_pdfname2psname(name); + pathlen = strlen(path)+strlen(name)+strlen(ext); if (pathlen=1) { ! message = process_disallow_quit(); ! if (message || app_res.confirm_quit>=2) { ! cb_popdownConfirmPopup(w, client_data, call_data); /* Redo panel */ ! if (message) ConfirmPopupSetMessage("messagea",message); ! ConfirmPopupSetMessage("messageb","Do you really want to quit?"); ! ConfirmPopupSetButton(CONFIRM_BUTTON_DONE,GV_QUIT_CONFIRM_BUTTON_LABEL,cb_doQuit); ! ConfirmPopupSetButton(CONFIRM_BUTTON_CANCEL,NULL,cb_cancelQuit); ! ConfirmPopupSetInitialButton(CONFIRM_BUTTON_CANCEL); ! ConfirmPopupFix(); ! cb_popupConfirmPopup((Widget)NULL,NULL,NULL); ! ENDMESSAGE(cb_quitGhostview) ! return; ! } ! } ! cb_doQuit((Widget)NULL,NULL,(XtPointer)NULL); ENDMESSAGE(cb_quitGhostview) } + /*##################################################################*/ + /* cb_cancelQuit */ + /*##################################################################*/ + + void + cb_cancelQuit(w, client_data, call_data) + Widget w; + XtPointer client_data, call_data; + { + BEGINMESSAGE(cb_cancelQuit) + cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL); + ENDMESSAGE(cb_cancelQuit) + } + + /*##################################################################*/ + /* cb_doQuit */ + /*##################################################################*/ + + void + cb_doQuit(w, client_data, call_data) + Widget w; + XtPointer client_data, call_data; + { + BEGINMESSAGE(cb_doQuit) + cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL); + XtUnmapWidget(toplevel); + XtDestroyWidget(toplevel); + ENDMESSAGE(cb_doQuit) + } *** ./source/callbacks.h- Wed Mar 19 18:00:00 1997 --- ./source/callbacks.h Sat Mar 29 20:55:16 1997 *************** *** 260,263 **** --- 260,279 ---- #endif ); + extern void cb_doQuit ( + #if NeedFunctionPrototypes + Widget, + XtPointer, + XtPointer + #endif + ); + + extern void cb_cancelQuit ( + #if NeedFunctionPrototypes + Widget, + XtPointer, + XtPointer + #endif + ); + #endif /* _GV_CALLBACKS_H_ */ *** ./source/config.h- Wed Mar 19 18:00:00 1997 --- ./source/config.h Sat Mar 29 20:55:17 1997 *************** *** 95,100 **** --- 95,104 ---- # define FALLBACK_ICON_NAME GV # define FALLBACK_SELECTED_NAME DOT # define FALLBACK_DOCUMENT_NAME DOC + + # define USE_INTERN_STYLES + # define STYLE1_NAME "spartan" + # define STYLE1_H "gv_spartan.h" #endif /* *************** *** 108,113 **** --- 112,118 ---- #define GV_PRINT_PAGE_MESSAGE "Print Current Page" #define GV_PRINT_ALL_MESSAGE "Print Document" #define GV_PRINT_BUTTON_LABEL "Print" + #define GV_QUIT_CONFIRM_BUTTON_LABEL "Quit" #define GV_ERROR_OPEN_FAIL "Cannot open file" #define GV_OPEN_MESSAGE "Open" #define GV_ERROR_SAVE_FAIL "Cannot write to file" *** ./source/d_mem.c- Wed Mar 19 18:00:00 1997 --- ./source/d_mem.c Sat Mar 29 20:55:18 1997 *************** *** 31,37 **** #include #include "paths.h" ! #include INC_X11(Intrinsic.h) #define GV_MEMDEBUG_OUT stderr --- 31,42 ---- #include #include "paths.h" ! ! #ifdef BROKEN_CPP ! #include ! #else ! #include INC_X11(Intrinsic.h) ! #endif #define GV_MEMDEBUG_OUT stderr *** ./source/d_xtmem.c- Wed Mar 19 18:00:00 1997 --- ./source/d_xtmem.c Sat Mar 29 20:55:19 1997 *************** *** 31,37 **** #include #include "paths.h" ! #include INC_X11(Intrinsic.h) #define GV_MEMDEBUG_OUT stderr --- 31,42 ---- #include #include "paths.h" ! ! #ifdef BROKEN_CPP ! #include ! #else ! #include INC_X11(Intrinsic.h) ! #endif #define GV_MEMDEBUG_OUT stderr *** ./source/dialog.c- Wed Mar 19 18:00:00 1997 --- ./source/dialog.c Sat Mar 29 20:55:19 1997 *************** *** 35,40 **** --- 35,56 ---- #include "message.h" #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Xos.h) *************** *** 42,47 **** --- 58,65 ---- #include INC_XAW(Command.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) + #endif + #include "Aaa.h" #include "Ghostview.h" *** ./source/doc_misc.c- Wed Mar 19 18:00:00 1997 --- ./source/doc_misc.c Sat Mar 29 20:55:20 1997 *************** *** 34,41 **** --- 34,48 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #else #include INC_X11(Intrinsic.h) #include INC_XMU(CharSet.h) + #endif + #include "Ghostview.h" #include "main_resources.h" *** ./source/error.c- Wed Mar 19 18:00:00 1997 --- ./source/error.c Sat Mar 29 20:55:20 1997 *************** *** 37,44 **** --- 37,50 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #else #include INC_X11(Xos.h) #include INC_X11(Intrinsic.h) + #endif #include "gv.h" #include "error.h" *** ./source/file.c- Wed Mar 19 18:00:00 1997 --- ./source/file.c Sat Mar 29 20:55:21 1997 *************** *** 31,36 **** --- 31,37 ---- #include "message.h" #include + #include /* for tolower */ #include #include #include *************** *** 43,49 **** --- 44,55 ---- #endif #include "paths.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_X11(Intrinsic.h) + #endif #include "d_memdebug.h" #include "file.h" *************** *** 171,187 **** if (pos) { *pos='\0'; tmpExt = pos+1; } else tmpExt = ""; ! if (strlen(tmpName)>20) *(tmpName+20) = '\0'; ! if (strlen(tmpExt) >8) *(tmpExt+8) = '\0'; { struct stat s; int no_such_file; int i=1; do { #ifdef VMS ! sprintf(tempFilename,"%sgv_%s_%s_%ld_%d.tmp",tmpDirBuf,tmpName,tmpExt,time(NULL),i); #else ! sprintf(tempFilename,"%sgv_%s.%s_%ld_%d.tmp",tmpDirBuf,tmpName,tmpExt,time(NULL),i); #endif file_translateTildeInPath(tempFilename); no_such_file = stat(tempFilename,&s); --- 177,197 ---- if (pos) { *pos='\0'; tmpExt = pos+1; } else tmpExt = ""; ! /* Limit filename to 39 characters (excluding dir and .tmp). ! This is required for VMS, but is also reasonable for Unix. */ ! if (strlen(tmpName)+strlen(tmpExt)>23) { ! if (strlen(tmpExt)>11) tmpExt[11] = '\0'; /* allow .ps_page_nnn */ ! if (strlen(tmpName)+strlen(tmpExt)>23) tmpName[23-strlen(tmpExt)] = '\0'; ! } { struct stat s; int no_such_file; int i=1; do { #ifdef VMS ! sprintf(tempFilename,"%sgv_%s_%s_%lx_%x.tmp",tmpDirBuf,tmpName,tmpExt,time(NULL),i); #else ! sprintf(tempFilename,"%sgv_%s.%s_%lx_%x.tmp",tmpDirBuf,tmpName,tmpExt,time(NULL),i); #endif file_translateTildeInPath(tempFilename); no_such_file = stat(tempFilename,&s); *************** *** 242,247 **** return(retval); } ! ! --- 252,297 ---- return(retval); } + /*############################################################*/ + /* file_pdfname2psname */ + /* If the file ends in .pdf, change this to .ps.*/ + /* Return pointer to temp copy if changed, else to input string. */ + /*############################################################*/ ! char * ! file_pdfname2psname(name) ! char *name; ! { ! static char tmpname[GV_MAX_FILENAME_LENGTH]; ! char *pver; ! int lname; ! ! BEGINMESSAGE(file_pdfname2psname) ! if (!name) { ! ENDMESSAGE(file_pdfname2psname) ! return(name); ! } ! #ifdef VMS ! pver= strrchr(name,';'); ! if (!pver) ! #endif ! pver= name+strlen(name); ! lname= (pver-name)-4; ! if (lname>=0) { ! char *q = pver-4, *p = ".pdf"; ! while (q #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(Command.h) #include INC_XAW(Form.h) #include INC_XAW(AsciiText.h) #include INC_X11(Shell.h) + #endif /*### Application dependencies ##############################################*/ *** ./source/main.c- Wed Mar 19 18:00:00 1997 --- ./source/main.c Tue Apr 1 17:11:06 1997 *************** *** 40,45 **** --- 40,74 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + # include + # include + # include + # include + # include + # include + #else + # include + # include + # include + # include + # include + # include + # include + # include + # include + #endif + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(cursorfont.h) #include INC_X11(StringDefs.h) *************** *** 54,59 **** --- 83,90 ---- #include INC_XAW(Command.h) #include INC_XAW(XawInit.h) #include INC_XMU(Editres.h) + #endif + #include "Aaa.h" #include "Clip.h" #include "FileSel.h" *************** *** 79,84 **** --- 110,116 ---- #include "callbacks.h" #include "d_memdebug.h" #include "dialog.h" + #include "confirm.h" #include "error.h" #include "file.h" #include "note.h" *************** *** 143,148 **** --- 175,181 ---- { "GV_SetPageMedia" , action_set_pagemedia }, { "GV_Show" , action_showThisPage }, { "GV_TogDialPrefBut" , action_preferDialogPopupButton }, + { "GV_TogConfPrefBut" , action_preferConfirmPopupButton }, }; #ifdef FALLBACK_RESOURCES *************** *** 164,169 **** --- 197,223 ---- }; #endif + #ifdef USE_INTERN_STYLES + #ifdef STYLE1_H + static String intern_style1[] = { + # include STYLE1_H + NULL + }; + #endif + #ifdef STYLE2_H + static String intern_style2[] = { + # include STYLE2_H + NULL + }; + #endif + #ifdef STYLE3_H + static String intern_style3[] = { + # include STYLE3_H + NULL + }; + #endif + #endif + /*-------------------------------------------------------------- dummyCvtStringToPixmap Dummy String to Pixmap converter. Used to suppress warnings *************** *** 252,257 **** --- 306,312 ---- infopopup = NULL; optionpopup = NULL; dialogpopup = NULL; + confirmpopup = NULL; notepopup = NULL; versionpopup = NULL; FileSel_popup = NULL; *************** *** 364,371 **** { if (gv_style_file) { INFSMESSAGE(merging style resource file into database,gv_style_file) ! main_mergeFileIntoDatabase(gv_display,gv_style_file,0); } if (gv_ad_file) { --- 419,449 ---- { if (gv_style_file) { + #ifdef USE_INTERN_STYLES + String *sP = NULL; + #ifdef STYLE1_H + if (strcmp(STYLE1_NAME,gv_style_file)==0) sP = intern_style1; + #endif + #ifdef STYLE2_H + if (strcmp(STYLE2_NAME,gv_style_file)==0) sP = intern_style2; + #endif + #ifdef STYLE3_H + if (strcmp(STYLE3_NAME,gv_style_file)==0) sP = intern_style3; + #endif + if (sP) { + while (*sP) { + SMESSAGE(*sP) + XrmPutLineResource(&db,*sP++); + } + } else { + #endif INFSMESSAGE(merging style resource file into database,gv_style_file) ! if (main_mergeFileIntoDatabase(gv_display,gv_style_file,0)==NULL) ! fprintf(stderr," %s: Style file %s not found - ignored\n", ! gv_application_name,gv_style_file); ! #ifdef USE_INTERN_STYLES ! } ! #endif } if (gv_ad_file) { *************** *** 969,974 **** --- 1047,1054 ---- /*### remaining initialization #####################################################*/ INFMESSAGE(remaining initialization) + + catch_fatal_signals(); gv_num_std_pagemedia = 0; while (papersizes[gv_num_std_pagemedia].name) gv_num_std_pagemedia++; *** ./source/main_globals.h- Wed Mar 19 18:00:00 1997 --- ./source/main_globals.h Sat Mar 29 20:55:22 1997 *************** *** 213,218 **** --- 213,219 ---- EXTERN Widget infopopup; EXTERN Widget optionpopup; EXTERN Widget dialogpopup; + EXTERN Widget confirmpopup; EXTERN Widget notepopup; EXTERN Widget versionpopup; *** ./source/main_parseCmdLine.c- Wed Mar 19 18:00:00 1997 --- ./source/main_parseCmdLine.c Sat Mar 29 20:55:22 1997 *************** *** 36,42 **** --- 36,47 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_X11(Intrinsic.h) + #endif #include "d_memdebug.h" #include "gv.h" *** ./source/main_resources.h- Wed Mar 19 18:00:00 1997 --- ./source/main_resources.h Sat Mar 29 20:55:23 1997 *************** *** 61,66 **** --- 61,67 ---- Pixel highlight_pixel; Boolean reverse_scrolling; Boolean respect_dsc; + int confirm_quit; } AppResources; *************** *** 82,88 **** {"minimumMagstep", "MinimumMagstep", XtRInt, sizeof(int), XtOffsetOf(AppResources, minimum_magstep), XtRImmediate, (XtPointer)-11}, {"maximumMagstep", "MaximumMagstep", XtRInt, sizeof(int), ! XtOffsetOf(AppResources, maximum_magstep), XtRImmediate, (XtPointer)5}, {"magstep", "Magstep", XtRInt, sizeof(int), XtOffsetOf(AppResources, magstep), XtRImmediate, (XtPointer)0}, {"orientation", "Orientation", XtRString, sizeof(String), --- 83,89 ---- {"minimumMagstep", "MinimumMagstep", XtRInt, sizeof(int), XtOffsetOf(AppResources, minimum_magstep), XtRImmediate, (XtPointer)-11}, {"maximumMagstep", "MaximumMagstep", XtRInt, sizeof(int), ! XtOffsetOf(AppResources, maximum_magstep), XtRImmediate, (XtPointer)7}, {"magstep", "Magstep", XtRInt, sizeof(int), XtOffsetOf(AppResources, magstep), XtRImmediate, (XtPointer)0}, {"orientation", "Orientation", XtRString, sizeof(String), *************** *** 133,138 **** --- 134,141 ---- XtOffsetOf(AppResources, reverse_scrolling), XtRImmediate, (XtPointer)False}, {"respectDSC", "RespectDSC", XtRBoolean, sizeof(Boolean), XtOffsetOf(AppResources, respect_dsc), XtRImmediate, (XtPointer)True}, + {"confirmQuit", "ConfirmQuit", XtRInt, sizeof(int), + XtOffsetOf(AppResources, confirm_quit), XtRImmediate, (XtPointer)1}, /* 0=never,1=when processing,2=always */ }; static XrmOptionDescRec options[] = { *** ./source/misc.c- Wed Mar 19 18:00:00 1997 --- ./source/misc.c Sat Mar 29 20:55:24 1997 *************** *** 93,98 **** --- 93,126 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + # include + # include + #else + # include + # include + # include + # include + # include + #endif + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #include + #else #include INC_X11(Xos.h) #include INC_X11(Xatom.h) #include INC_X11(Intrinsic.h) *************** *** 106,111 **** --- 134,141 ---- #include INC_X11(IntrinsicP.h) #include INC_XAW(TextP.h) #include INC_XMU(StdCmap.h) + #endif + #include "Aaa.h" #include "Frame.h" #include "Ghostview.h" *** ./source/note.c- Wed Mar 19 18:00:00 1997 --- ./source/note.c Sat Mar 29 20:55:24 1997 *************** *** 35,45 **** --- 35,60 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + #else + # include + # include + #endif + #include + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XAW(Command.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) + #endif + #include "Aaa.h" #include "popup_misc.h" *** ./source/options.c- Wed Mar 19 18:00:00 1997 --- ./source/options.c Sat Mar 29 20:55:24 1997 *************** *** 35,44 **** --- 35,57 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #ifdef BASIC_XAW + # include + #else + # include + #endif + #include + #include + #else #include INC_X11(Intrinsic.h) #include INC_XAW(Command.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) + #endif + #include "Aaa.h" #include "FileSel.h" #include "Frame.h" *** ./source/popup.c- Wed Mar 19 18:00:00 1997 --- ./source/popup.c Sat Mar 29 20:55:24 1997 *************** *** 35,43 **** --- 35,50 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) + #endif /*##################################################################*/ /* cb_popdownPopup Callback */ *** ./source/popup_misc.c- Wed Mar 19 18:00:00 1997 --- ./source/popup_misc.c Sat Mar 29 20:55:24 1997 *************** *** 31,40 **** --- 31,48 ---- #include "message.h" #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(IntrinsicP.h) #include INC_X11(ShellP.h) + #endif #include "gv.h" #include "popup_misc.h" *** ./source/process.c- Wed Mar 19 18:00:00 1997 --- ./source/process.c Tue Apr 1 17:55:35 1997 *************** *** 48,53 **** --- 48,69 ---- #endif #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #include + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(MenuButton.h) *************** *** 55,60 **** --- 71,77 ---- #include INC_XAW(SmeBSB.h) #include INC_X11(IntrinsicP.h) #include INC_X11(ShellP.h) + #endif #include "d_memdebug.h" #include "gv.h" *************** *** 63,68 **** --- 80,91 ---- #include "main_globals.h" #include "misc_private.h" + #ifdef SIGNALRETURNSINT + #define SIGVAL int + #else + #define SIGVAL void + #endif + #define CHECK_PERIOD 500 #define ADD_TIMEOUT(widget,interval,data) \ XtAppAddTimeOut ( \ *************** *** 223,228 **** --- 246,313 ---- } /*------------------------------------------------------------*/ + /* catch_signal catch a signal and abort cleanly */ + /*------------------------------------------------------------*/ + + static SIGVAL catch_signal(sig) + int sig; + { + static Boolean aborting = False; + + /* ignore abort requests if we are already aborting */ + + if (aborting) return; + + /* mark that we are aborting */ + + aborting = True; + + /* kill misc processes */ + + process_kill_all_processes(); + + /* destroy widgets to zap the widget that will zap gs */ + + XtUnmapWidget(toplevel); + XtDestroyWidget(toplevel); + + /* if (app_con) XtDestroyApplicationContext(app_con); */ + + /* print a message */ + + fprintf(stderr, "gv terminated by signal %d\n", sig); + + /* exit with an error status */ + + exit(EXIT_STATUS_ERROR); + + /* make lint happy if we must return a value */ + + #ifdef SIGNALRETURNSINT + return 0; + #endif + } + + /*##############################################################*/ + /* catch_fatal_signals install handlers on fatal signals */ + /*##############################################################*/ + + void catch_fatal_signals() + { + BEGINMESSAGE(catch_fatal_signals) + signal(SIGHUP, catch_signal); + signal(SIGINT, catch_signal); + signal(SIGQUIT, catch_signal); + signal(SIGILL, catch_signal); + signal(SIGFPE, catch_signal); + signal(SIGBUS, catch_signal); + signal(SIGSEGV, catch_signal); + signal(SIGSYS, catch_signal); + signal(SIGTERM, catch_signal); + ENDMESSAGE(catch_fatal_signals) + } + + /*------------------------------------------------------------*/ /* process_notify */ /*------------------------------------------------------------*/ *************** *** 461,463 **** --- 546,574 ---- } } + /*##############################################################*/ + /* process_confirm_quit */ + /*##############################################################*/ + + char *process_disallow_quit() + { + #define MAX_DISALLOW_QUIT_MESSAGE 512 + static char message[MAX_DISALLOW_QUIT_MESSAGE]; + ProcessData pd; + + BEGINMESSAGE(process_confirm_quit) + if (!gpd) { + ENDMESSAGE(process_confirm_quit) + return NULL; + } + strcpy(message,"Processing"); + for (pd = gpd; /* Following is inefficient, but so what */ + pd && strlen(message)+strlen(pd->name)+7next) { + strcat(message,"\n "); + strcat(message,pd->name); + }; + if (pd) strcat(message,"\n ..."); + ENDMESSAGE(process_confirm_quit) + return message; + } *** ./source/process.h- Wed Mar 19 18:00:00 1997 --- ./source/process.h Tue Apr 1 17:11:06 1997 *************** *** 71,76 **** --- 71,81 ---- #endif ); + extern void catch_fatal_signals ( + #if NeedFunctionPrototypes + #endif + ); + extern ProcessData process_fork ( #if NeedFunctionPrototypes String, /* name */ *************** *** 84,89 **** --- 89,99 ---- #if NeedFunctionPrototypes ProcessData, /* pd */ int /* action */ + #endif + ); + + extern char* process_disallow_quit ( + #if NeedFunctionPrototypes #endif ); *** ./source/ps.c- Wed Mar 19 18:00:00 1997 --- ./source/ps.c Sat Mar 29 20:55:26 1997 *************** *** 81,89 **** --- 81,96 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include /* #includes the appropriate */ + #include + #else #include INC_X11(Intrinsic.h) #include INC_X11(Xos.h) /* #includes the appropriate */ #include INC_X11(Xfuncs.h) + #endif #include "file.h" #include "gv.h" *************** *** 167,172 **** --- 174,183 ---- static char *skipped_line = "% ps_io_fgetchars: skipped line"; static char *empty_string = ""; + /* A page can contain EPS sections, each of which has a %%EOF */ + /* Set this flag to False, read past them, or to True to stop at them */ + static Boolean check_eof = False; + /*--------------------------------------------------*/ /* *************** *** 804,810 **** if (!(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! iscomment(line+2, "EOF")))) { doc->beginsetup = beginsection; beginsection = 0; preread = 1; --- 815,821 ---- if (!(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! (check_eof && iscomment(line+2, "EOF"))))) { doc->beginsetup = beginsection; beginsection = 0; preread = 1; *************** *** 814,820 **** (iscomment(line+2, "EndSetup") || iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! iscomment(line+2, "EOF")))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { --- 825,831 ---- (iscomment(line+2, "EndSetup") || iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! (check_eof && iscomment(line+2, "EOF"))))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { *************** *** 892,898 **** (iscomment(line+2, "EndSetup") || (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! iscomment(line+2, "EOF")))) && (readline(fd, &line, &position, &line_len))) { doc->endsetup = position; doc->lensetup += line_len; --- 903,909 ---- (iscomment(line+2, "EndSetup") || (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! (check_eof && iscomment(line+2, "EOF"))))) && (readline(fd, &line, &position, &line_len))) { doc->endsetup = position; doc->lensetup += line_len; *************** *** 951,957 **** !(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! iscomment(line+2, "EOF")))) { section_len += line_len; if (!DSCcomment(line)) { /* Do nothing */ --- 962,968 ---- !(DSCcomment(line) && (iscomment(line+2, "Page:") || iscomment(line+2, "Trailer") || ! (check_eof && iscomment(line+2, "EOF"))))) { section_len += line_len; if (!DSCcomment(line)) { /* Do nothing */ *************** *** 1045,1051 **** preread = 1; while ((preread || readline(fd, &line, &position, &line_len)) && ! !(DSCcomment(line) && iscomment(line+2, "EOF"))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { --- 1056,1062 ---- preread = 1; while ((preread || readline(fd, &line, &position, &line_len)) && ! !(check_eof && DSCcomment(line) && iscomment(line+2, "EOF"))) { if (!preread) section_len += line_len; preread = 0; if (!DSCcomment(line)) { *************** *** 1068,1073 **** --- 1079,1094 ---- } goto newpage; } + } else if (iscomment(line+2, "Trailer")) { + /* What we thought was the start of the trailer was really */ + /* the trailer of an EPS on the page. */ + /* Set the end of the page to this trailer and keep scanning. */ + if (doc->numpages > 0) { + doc->pages[ doc->numpages-1 ].end = position; + doc->pages[ doc->numpages-1 ].len += section_len - line_len; + } + 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", &(doc->boundingbox[LLX]), *************** *** 1332,1338 **** #define FD_STATUS_BUFTOOLARGE 1 #define FD_STATUS_NOMORECHARS 2 ! #define LINE_CHUNK_SIZE 512 #define MAX_PS_IO_FGETCHARS_BUF_SIZE 131072 static FileData ps_io_init(file) --- 1353,1359 ---- #define FD_STATUS_BUFTOOLARGE 1 #define FD_STATUS_NOMORECHARS 2 ! #define LINE_CHUNK_SIZE 4096 #define MAX_PS_IO_FGETCHARS_BUF_SIZE 131072 static FileData ps_io_init(file) *************** *** 1442,1448 **** --- 1463,1479 ---- do { if (num<0) { /* reading whole line */ if (FD_BUF_END-FD_LINE_END) { + #if 0 + /* strpbrk is faster but fails on lines with embedded NULLs */ eol = strpbrk(FD_BUF+FD_LINE_END,"\n\r"); + #else + char *end = FD_BUF + FD_BUF_END; + eol = FD_BUF + FD_LINE_END; + while (eol < end && *eol != '\r' && *eol != '\n') { + eol++; + } + if (eol >= end) eol = NULL; + #endif if (eol) { if (*eol=='\r' && *(eol+1)=='\n') eol += 2; else eol++; *** ./source/save.c- Wed Mar 19 18:00:00 1997 --- ./source/save.c Sat Mar 29 20:55:26 1997 *************** *** 34,40 **** --- 34,46 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #else #include INC_X11(Intrinsic.h) + #endif + #include "Ghostview.h" #include "gv.h" *************** *** 256,262 **** } if (!error && sd->convert && !sd->conv_fn) { ! sd->conv_fn = file_getTmpFilename(NULL,sd->save_fn); INFSMESSAGE(converting from file,sd->src_fn) INFSMESSAGE(converting to file,sd->conv_fn) error = save_forkPDFToPSConversion(sd); --- 262,268 ---- } if (!error && sd->convert && !sd->conv_fn) { ! sd->conv_fn = file_getTmpFilename(NULL,file_pdfname2psname(sd->save_fn?sd->save_fn:sd->src_fn)); INFSMESSAGE(converting from file,sd->src_fn) INFSMESSAGE(converting to file,sd->conv_fn) error = save_forkPDFToPSConversion(sd); *************** *** 268,274 **** if (sd->conv_fn) src_fn = sd->conv_fn; if (!error && sd->save_to_file) { ! if (!sd->save_fn) sd->save_fn = file_getTmpFilename(NULL,NULL); INFSMESSAGE(saving from file,src_fn) INFSMESSAGE(saving to file,sd->save_fn) error = save_copyToFile(sd->save_fn,src_fn,sd->pagelist); --- 274,281 ---- if (sd->conv_fn) src_fn = sd->conv_fn; if (!error && sd->save_to_file) { ! if (!sd->save_fn) ! sd->save_fn = file_getTmpFilename(NULL,file_pdfname2psname(sd->src_fn)); INFSMESSAGE(saving from file,src_fn) INFSMESSAGE(saving to file,sd->save_fn) error = save_copyToFile(sd->save_fn,src_fn,sd->pagelist); *** ./source/version.c- Wed Mar 19 18:00:00 1997 --- ./source/version.c Sat Mar 29 20:55:26 1997 *************** *** 35,40 **** --- 35,57 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #include + #else #include INC_X11(IntrinsicP.h) #include INC_X11(StringDefs.h) #include INC_XMU(Misc.h) *************** *** 43,48 **** --- 60,67 ---- #include INC_XAW(Command.h) #include INC_XAW(Label.h) #include INC_X11(Shell.h) + #endif + #include "AaaP.h" #include "main_resources.h" *** ./source/widgets_misc.c- Wed Mar 19 18:00:00 1997 --- ./source/widgets_misc.c Sat Mar 29 20:55:27 1997 *************** *** 33,43 **** --- 33,59 ---- #include #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + # include + #else + # include + # include + # include + #endif + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_XAW(AsciiText.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Toggle.h) + #endif + #include "Frame.h" #include "d_memdebug.h" *** ./source/zoom.c- Wed Mar 19 18:00:00 1997 --- ./source/zoom.c Sat Mar 29 20:55:28 1997 *************** *** 39,49 **** --- 39,64 ---- #endif #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #include + #ifdef BASIC_XAW + # include + # include + #else + # include + # include + #endif + #else #include INC_X11(Intrinsic.h) #include INC_X11(StringDefs.h) #include INC_X11(Shell.h) #include INC_XAW(Cardinals.h) #include INC_XAW(Command.h) + #endif + #include "Aaa.h" #include "Clip.h" #include "Frame.h" *** ./source/confirm.c- Sat Mar 29 20:55:28 1997 --- ./source/confirm.c Sat Mar 29 20:55:28 1997 *************** *** 0 **** --- 1,289 ---- + /* + ** + ** confirm.c + ** + ** Copyright (C) 1995, 1996 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 + ** + */ + + #include "config.h" + + #include + + /* + #define MESSAGES + */ + #include "message.h" + + #include "paths.h" + + #ifdef BROKEN_CPP + #include + #include + #ifdef BASIC_XAW + # include + # include + #else + # include + # include + #endif + #include + #else + #include INC_X11(Intrinsic.h) + #include INC_X11(StringDefs.h) + #include INC_XAW(Command.h) + #include INC_XAW(Label.h) + #include INC_X11(Shell.h) + #endif + + #include "Aaa.h" + #include "Ghostview.h" + + #include "main_resources.h" + #include "main_globals.h" + #include "popup_misc.h" + #include "widgets_misc.h" + + /*### Application dependencies ##############################################*/ + + #define CONFIRM_TOPLEVEL toplevel + #define CONFIRM_POPUP_NAME "confirmPopup" + #define CONFIRM_POPUP confirmpopup + + #include "gv.h" + #include "confirm.h" + + static Bool confirmPopupCreated = False; + static Bool confirmPopupVisible = False; + static Widget doneButton=NULL,cancelButton=NULL,confirmAaa=NULL; + static int preferedButton=0,initialButton=0; + + /*############################################################################### + cb_popdownConfirmPopup + ###############################################################################*/ + + void cb_popdownConfirmPopup(w, client_data, call_data) + Widget w; + XtPointer client_data, call_data; + { + BEGINMESSAGE(cb_popdownConfirmPopup) + if (confirmPopupVisible) { + XtPopdown(CONFIRM_POPUP); + confirmPopupVisible=False; + } + if (confirmPopupCreated==True) { + INFMESSAGE(destroying confirmpopup) + XtDestroyWidget(confirmpopup); + confirmpopup=NULL; + confirmPopupCreated = False; + } + ENDMESSAGE(cb_popdownConfirmPopup) + } + + /*############################################################################### + cb_popupConfirmPopup + ###############################################################################*/ + + void cb_popupConfirmPopup(w, client_data, call_data) + Widget w; + XtPointer client_data, call_data; + { + BEGINMESSAGE(cb_popupConfirmPopup) + if (!confirmPopupVisible) { + if (!confirmPopupCreated) makeConfirmPopup(); + if (initialButton==CONFIRM_BUTTON_DONE) + preferedButton=CONFIRM_BUTTON_CANCEL; + else if (initialButton==CONFIRM_BUTTON_CANCEL) + preferedButton=CONFIRM_BUTTON_DONE; + action_preferConfirmPopupButton(NULL, NULL, NULL, NULL); + popup_positionPopup(CONFIRM_POPUP,fileButton,POPUP_POSITION_POS,85,25); + XtPopup(CONFIRM_POPUP,XtGrabNone); + confirmPopupVisible=True; + } + ENDMESSAGE(cb_popupConfirmPopup) + } + + /*############################################################################### + action_preferConfirmPopupButton + ###############################################################################*/ + + void + action_preferConfirmPopupButton(w, event, params, num_params) + Widget w; + XEvent *event; + String *params; + Cardinal *num_params; + { + Widget pref,pref_old; + + BEGINMESSAGE(action_preferConfirmPopupButton) + if (preferedButton==CONFIRM_BUTTON_DONE) { + pref=cancelButton; + pref_old=doneButton; + preferedButton=CONFIRM_BUTTON_CANCEL; + } else { + pref=doneButton; + pref_old=cancelButton; + preferedButton=CONFIRM_BUTTON_DONE; + } + widgets_preferButton(pref,1); + widgets_preferButton(pref_old,0); + XtInstallAccelerators(confirmAaa,pref); + ENDMESSAGE(action_preferConfirmPopupButton) + } + + /*############################################################################### + makeConfirmPopup + ###############################################################################*/ + + static char *tabTrans = + "\ + Tab: GV_TogConfPrefBut()\ + "; + + void makeConfirmPopup() + { + Arg args[7]; + Cardinal n; + static XtTranslations tab_trans=(XtTranslations)NULL; + + BEGINMESSAGE(makeConfirmPopup) + + n=0; + XtSetArg(args[n], XtNallowShellResize, True); n++; + CONFIRM_POPUP = XtCreatePopupShell(CONFIRM_POPUP_NAME,transientShellWidgetClass,CONFIRM_TOPLEVEL, args, n); + + n=0; + XtSetArg(args[n], XtNresizeWidth, True); n++; + XtSetArg(args[n], XtNresizeHeight, True); n++; + /* + XtSetArg(args[n], XtNconditionedResize, False); n++; + XtSetArg(args[n], XtNmaximumWidth, 0); n++; + XtSetArg(args[n], XtNmaximumHeight,0); n++; + */ + confirmAaa = XtCreateManagedWidget("confirmAaa",aaaWidgetClass,CONFIRM_POPUP,args,n); + + n=0; + doneButton=XtCreateManagedWidget("done",commandWidgetClass,confirmAaa,args,n); + cancelButton=XtCreateManagedWidget("cancel",commandWidgetClass,confirmAaa,args,n); + + XtRealizeWidget(CONFIRM_POPUP); + + /* We'll still add the message(s), so don't fix the size yet. */ + + XtSetKeyboardFocus(confirmAaa,confirmAaa); + if (!tab_trans) tab_trans=XtParseTranslationTable(tabTrans); + XtOverrideTranslations(confirmAaa,tab_trans); + + XSetWMProtocols(XtDisplay(CONFIRM_POPUP),XtWindow(CONFIRM_POPUP),&wm_delete_window,1); + confirmPopupCreated=True; + + ENDMESSAGE(makeConfirmPopup) + } + + /*############################################################################### + ConfirmPopupSetButton + ###############################################################################*/ + + void ConfirmPopupSetButton(button,label,callback) + int button; + String label; + XtCallbackProc callback; + { + Arg args[5]; + Cardinal n; + Widget response=NULL; + + BEGINMESSAGE(ConfirmPopupSetButton) + if (!confirmPopupCreated) makeConfirmPopup(); + if (button&CONFIRM_BUTTON_DONE) response = doneButton; + else if (button&CONFIRM_BUTTON_CANCEL) response = cancelButton; + + if (response) { + if (label) { + n=0; + XtSetArg(args[n], XtNlabel, label); n++; + XtSetValues(response, args, n); + } + if (callback) { + XtRemoveAllCallbacks(response,XtNcallback); + XtAddCallback(response, XtNcallback,callback,NULL); + } + } + ENDMESSAGE(ConfirmPopupSetButton) + } + + /*############################################################################### + ConfirmPopupSetMessage + ###############################################################################*/ + + void ConfirmPopupSetMessage(widgetName,message) + String widgetName,message; + { + Arg args[5]; + Cardinal n; + + BEGINMESSAGE(ConfirmPopupSetMessage) + if (!confirmPopupCreated) makeConfirmPopup(); + n=0; + XtSetArg(args[n], XtNlabel, message); n++; + XtSetArg(args[n], XtNborderWidth, 0); n++; + XtSetArg(args[n], XtNjustify, XtJustifyCenter); n++; + XtCreateManagedWidget(widgetName,labelWidgetClass,confirmAaa, args, n); + XtRealizeWidget(CONFIRM_POPUP); + ENDMESSAGE(ConfirmPopupSetMessage) + } + + /*############################################################################### + ConfirmPopupSetInitialButton + ###############################################################################*/ + + void ConfirmPopupSetInitialButton(button) + int button; + { + BEGINMESSAGE(ConfirmPopupSetInitialButton) + initialButton=button; + ENDMESSAGE(ConfirmPopupSetInitialButton) + } + + /*############################################################################### + ConfirmPopupFix + ###############################################################################*/ + + void ConfirmPopupFix() + { + Arg args[5]; + Cardinal n; + Dimension minw,minh; + + BEGINMESSAGE(ConfirmPopupFix) + XtRealizeWidget(CONFIRM_POPUP); + AaaWidgetGetNaturalSize((AaaWidget)confirmAaa,&minw,&minh); + IMESSAGE(minw) IMESSAGE(minh) + n=0; + XtSetArg(args[n], XtNminWidth, minw); ++n; + XtSetArg(args[n], XtNminHeight, minh); ++n; + XtSetArg(args[n], XtNmaxWidth, minw); ++n; + XtSetArg(args[n], XtNmaxHeight, minh); ++n; + XtSetValues(CONFIRM_POPUP, args, n); + ENDMESSAGE(ConfirmPopupFix) + } *** ./source/confirm.h- Sat Mar 29 20:55:28 1997 --- ./source/confirm.h Sat Mar 29 20:55:28 1997 *************** *** 0 **** --- 1,91 ---- + /* + ** + ** confirm.h + ** + ** Copyright (C) 1995, 1996 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 + ** + */ + + + #ifndef _GV_CONFIRM_H_ + #define _GV_CONFIRM_H_ + + #define CONFIRM_BUTTON_DONE (1<<0) + #define CONFIRM_BUTTON_CANCEL (1<<1) + + extern void cb_popdownConfirmPopup ( + #if NeedFunctionPrototypes + Widget, + XtPointer, + XtPointer + #endif + ); + + extern void cb_popupConfirmPopup ( + #if NeedFunctionPrototypes + Widget, + XtPointer, + XtPointer + #endif + ); + + extern void action_preferConfirmPopupButton ( + #if NeedFunctionPrototypes + Widget, + XEvent *, + String *, + Cardinal * + #endif + ); + + extern void makeConfirmPopup ( + #if NeedFunctionPrototypes + #endif + ); + + extern void ConfirmPopupSetButton ( + #if NeedFunctionPrototypes + int, + String, + XtCallbackProc + #endif + ); + + extern void ConfirmPopupSetMessage ( + #if NeedFunctionPrototypes + String, + String + #endif + ); + + extern void ConfirmPopupSetInitialButton ( + #if NeedFunctionPrototypes + int + #endif + ); + + extern void ConfirmPopupFix ( + #if NeedFunctionPrototypes + #endif + ); + + #endif /* _GV_CONFIRM_H_ */ *** ./source/gv_messages.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_messages.dat Sat Mar 29 20:55:28 1997 *************** *** 37,43 **** !---------------- #begin usage ! V %s Usage: gv [[.ps]] [-monochrome] [-grayscale] [-color] --- 37,43 ---- !---------------- #begin usage ! V %s usage (use "gv -help" for more details): gv [[.ps]] [-monochrome] [-grayscale] [-color] *************** *** 56,62 **** [-resize] [-noresize] [-geometry [][x][{+-}{+-}] [-ad ] ! [-style ] [] #end usage --- 56,62 ---- [-resize] [-noresize] [-geometry [][x][{+-}{+-}] [-ad ] ! [-style ] [-style spartan] [] #end usage *************** *** 106,111 **** --- 106,112 ---- [-ad ] # Load additional resource style file at startup [-style ] + [-style spartan] ! Built-in alternate style # Toolkit Options [] # Show help *** ./source/gv_font_res.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_font_res.dat Sat Mar 29 20:55:29 1997 *************** *** 3,39 **** !##### Fonts ! GV*font: -*-helvetica-medium-r-normal--14-140-75-75-*-*-iso8859-1 ! GV*SmeBSB.font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV*Command.font: -*-helvetica-medium-r-normal--14-140-75-75-*-*-iso8859-1 ! GV*toc*font: -*-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1 ! GV*fileSel*font: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* ! GV*fileSel*button1.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*fileSel*button2.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*fileSel*button3.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*fileSel*button4.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*fileSel*pathtext*font: -*-helvetica-medium-r-*-*-14-*-*-*-*-*-*-* ! !GV*fileSel*List.font: -*-menu-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV*optionPopup*font: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* ! GV*optionPopup*Command.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*dialogPopup*font: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* ! GV*dialogPopup*Command.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV*notePopup*Command.font: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* ! GV.fileSel*rescan.font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV*versionPopup*Label*font: -*-fixed-medium-r-normal--10-70-100-100-c-*-iso8859-1 ! GV*versionPopup*versionTexta*font:-*-helvetica-bold-r-normal--18-*-*-*-p-*-iso8859-1 ! GV*versionPopup*versionTextb*font:-*-helvetica-bold-r-normal--12-*-*-*-p-*-iso8859-1 ! GV*infoPopup*Text*font: -*-fixed-medium-r-normal--10-70-100-100-c-60-iso8859-1 ! GV*dialogPopup*message*font: -*-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 ! GV*notePopup*message*font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV.?.processButton.font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV.?.Label*font: -*-helvetica-medium-r-normal--10-100-75-75-*-*-iso8859-1 ! GV.?.Command*font: -*-helvetica-medium-r-normal--10-100-75-75-*-*-iso8859-1 ! GV.?.locator*font: -*-fixed-medium-r-normal--10-70-100-100-c-60-iso8859-1 ! GV.?.dateButton*font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 ! GV.?.titleButton*font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 --- 3,44 ---- !##### Fonts ! GV*font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 ! GV*SmeBSB.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*Command.font: -*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1 ! GV*toc*font: -*-Courier-Bold-R-Normal--*-120-*-*-M-*-ISO8859-1 ! GV*fileSel*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV*fileSel*button1.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*fileSel*button2.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*fileSel*button3.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*fileSel*button4.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*fileSel*pathtext*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! !GV*fileSel*List.font: -*-Menu-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV*optionPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*optionPopup*Command.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*dialogPopup*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*dialogPopup*Command.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*confirmPopup*Command.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*notePopup*Command.font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! ! GV.fileSel*rescan.font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV*versionPopup*Label*font: -*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1 ! GV*versionPopup*versionTexta*font:-*-Helvetica-Bold-R-Normal--*-180-*-*-P-*-ISO8859-1 ! GV*versionPopup*versionTextb*font:-*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*infoPopup*Text*font: -*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1 ! GV*dialogPopup*message*font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*confirmPopup*messagea*font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*confirmPopup*messageb*font: -*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*notePopup*message*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV*magMenu*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV.?.processButton.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV.?.Label*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV.?.Command*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV.?.locator*font: -*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1 ! GV.?.dateButton*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 ! GV.?.titleButton*font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 *** ./source/gv_layout_res.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_layout_res.dat Sat Mar 29 20:55:29 1997 *************** *** 258,263 **** --- 258,285 ---- $bs\ } + !##### Confirm Popup Layout + + GV*confirmPopup*layout:\ + |v{ \ + vs=8\ + bs=14\ + (3*$vs)\ + |h{ $vs<+[1]> messagea $vs <+[1]> }\ + (3*$vs)\ + |h{ $vs<+[1]> messageb $vs <+[1]> }\ + $vs<+[1]>\ + $bs\ + |h{\ + (2*$bs)<+[1]>\ + done\ + $bs<+[1]>\ + cancel\ + (2*$bs)<+[1]>\ + }\ + $bs\ + } + !##### Version Popup Layout GV*versionPopup*layout:\ *** ./source/gv_misc_res.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_misc_res.dat Sat Mar 29 20:55:29 1997 *************** *** 116,121 **** --- 116,122 ---- GV*fileSel.rescan.label: Rescan GV*versionPopup*versionDone*label: Dismiss GV*dialogPopup*cancel.label: Cancel + GV*confirmPopup*cancel.label: Cancel GV*notePopup*done.label: Okay GV*optionPopup*done.label: Accept *************** *** 200,205 **** --- 201,210 ---- GV*dialogPopup*message.internalWidth: 8 GV*dialogPopup*defaultDistance: 2 + !##### Confirm Popup + + GV*confirmPopup.title: Confirm + !##### Note Popup GV*notePopup.title: Message *************** *** 264,269 **** --- 269,276 ---- CtrlL: GV_Redisplay() \n\ M: GV_SetPageMark(current,mark)\n\ N: GV_SetPageMark(current,unmark)\n\ + Shift7: GV_SetMagstep(-7) \n\ + Shift6: GV_SetMagstep(-6) \n\ Shift5: GV_SetMagstep(-5) \n\ Shift4: GV_SetMagstep(-4) \n\ Shift3: GV_SetMagstep(-3) \n\ *************** *** 275,280 **** --- 282,289 ---- 3: GV_SetMagstep(3) \n\ 4: GV_SetMagstep(4) \n\ 5: GV_SetMagstep(5) \n\ + 6: GV_SetMagstep(6) \n\ + 7: GV_SetMagstep(7) \n\ +: GV_SetMagstep(+) \n\ -: GV_SetMagstep(-) \n\ U: GV_Scroll(up) \n\ *************** *** 293,300 **** --- 302,331 ---- Left: GV_Scroll(left) !##### Ghostview widget + !##### 19mar97 wb changed to work with 2 button mouse with + !##### right button as Button2 on Linux or Button3 on SCO GV*Ghostview.Translations: #replace \n\ + ~Button1 ~Button3 Shift: cursor(scroll) \ + GV_MovePage(start) \ + GV_EraseLocator() \ + GV_MiscMenu(init) \n\ + Button2 Shift: GV_MiscMenu(reset) \n\ + Button2 Shift: GV_MiscMenu(reset) \n\ + ~Button1 ~Button3 Shift:GV_MovePage(move,0,1.0)\n\ + Shift: cursor(normal) \ + GV_MiscMenu(popup) \ + notify() \n\ + ~Button1 ~Button2 Shift: cursor(scroll) \ + GV_MovePage(start) \ + GV_EraseLocator() \ + GV_MiscMenu(init) \n\ + Button3 Shift: GV_MiscMenu(reset) \n\ + Button3 Shift: GV_MiscMenu(reset) \n\ + ~Button1 ~Button2 Shift:GV_MovePage(move,0,1.0)\n\ + Shift: cursor(normal) \ + GV_MiscMenu(popup) \ + notify() \n\ ~Button2 ~Button3 : cursor(scroll) \ GV_MovePage(start) \ GV_EraseLocator() \n\ *************** *** 308,323 **** Button2: GV_MagMenu(reset) \n\ ~Button1 ~Button3 :GV_MagMenu(extend) \n\ ~Button1 ~Button3 : GV_MagMenu(choose) \n\ ! ~Button1 ~Button2 : cursor(scroll) \ ! GV_MovePage(start) \ ! GV_EraseLocator() \ ! GV_MiscMenu(init) \n\ ! Button3: GV_MiscMenu(reset) \n\ ! Button3: GV_MiscMenu(reset) \n\ ! ~Button1 ~Button2 :GV_MovePage(move,0,1.0)\n\ ! : cursor(normal) \ ! GV_MiscMenu(popup) \ ! notify() \n\ Button1 ~Button3 : GV_Redisplay() \n\ : message() \n\ : notify() \n\ --- 339,349 ---- Button2: GV_MagMenu(reset) \n\ ~Button1 ~Button3 :GV_MagMenu(extend) \n\ ~Button1 ~Button3 : GV_MagMenu(choose) \n\ ! ~Button1 ~Button2 : GV_MagMenu(begin) \n\ ! Button3: GV_MagMenu(reset) \n\ ! Button3: GV_MagMenu(reset) \n\ ! ~Button1 ~Button2 :GV_MagMenu(extend) \n\ ! ~Button1 ~Button2 : GV_MagMenu(choose) \n\ Button1 ~Button3 : GV_Redisplay() \n\ : message() \n\ : notify() \n\ *************** *** 350,355 **** --- 376,383 ---- : GV_Panner(on) \n\ : GV_Panner(move) \n\ : GV_Panner(off) \n\ + Shift: GV_Next() \n\ + Shift: GV_Previous() \n\ : GV_Previous() \n\ : GV_Next() *************** *** 402,407 **** --- 430,439 ---- GV.control*toc.Translations: #replace \n\ : focus-in() \n\ : focus-out() \n\ + Shift: select-start() \ + extend-end(CUT_BUFFER0) \ + GV_SetPageMark(selection,toggle)\n\ + Ctrl: GV_SetPageMark(all,unmark)\n\ : select-start() \ select-end(CUT_BUFFER0) \ GV_Show() \n\ *** ./source/gv_spartan.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_spartan.dat Sat Mar 29 20:55:29 1997 *************** *** 3,9 **** !##### Layouts !######################################## ! GV.control.MenuButton.font: -*-helvetica-medium-r-normal--12-120-75-75-*-*-iso8859-1 GV*titleButton.resizable: False GV*dateButton.resizable: False GV*orientationButton.resizable: False --- 3,9 ---- !##### Layouts !######################################## ! GV.control.MenuButton.font: -*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1 GV*titleButton.resizable: False GV*dateButton.resizable: False GV*orientationButton.resizable: False *** ./source/gv_user_res.dat- Wed Mar 19 18:00:00 1997 --- ./source/gv_user_res.dat Sat Mar 29 20:55:29 1997 *************** *** 4,10 **** !##### Application specific Resources GV.pageMedia: automatic - GV.fallbackPageMedia: a4 GV.magstep: 0 GV.orientation: automatic GV.fallbackOrientation: portrait --- 4,9 ---- *************** *** 15,28 **** GV.confirmPrint: True GV.reverseScrolling: False GV.autoResize: True ! GV.minimumMagstep: -5 ! GV.maximumMagstep: 5 GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 400 GV.geometry: +10+10 GV.highlightPixel: #FBB GVintern.printCommand: lpr !##### Ghostview Widget --- 14,28 ---- GV.confirmPrint: True GV.reverseScrolling: False GV.autoResize: True ! GV.minimumMagstep: -7 ! GV.maximumMagstep: 7 GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 400 GV.geometry: +10+10 GV.highlightPixel: #FBB + GV.confirmQuit: 1 GVintern.printCommand: lpr !##### Ghostview Widget *** ./source/descrip.mms- Wed Mar 19 18:00:00 1997 --- ./source/descrip.mms Sat Mar 29 20:55:30 1997 *************** *** 29,35 **** .include X11_ROOT:[GV]CONFIG.VMS CC_DEFS = VMS,GV_CODE,GV_LIB="""$(GV_LIB)""" - !MEMDEBUG = 1 .ifdef STATIC .ifdef USE_FALLBACK_RESOURCES --- 29,34 ---- *************** *** 53,67 **** .ifdef USE_FALLBACK_FILES CC_DEF_USE_FALLBACK_FILES = ,USE_FALLBACK_FILES .endif ! CC_DEFINES = /DEF=($(CC_DEFS)$(CC_DEF_USE_FALLBACK_RESOURCES)$(CC_DEF_USE_FALLBACK_FILES)) .ifdef __DECC__ CC_QUALIFIER = /NODEB/EXT=STRICT/PREF=ALL .endif .ifdef __VAXC__ CC_QUALIFIER = /NODEB/OPT=(D,I) .endif .include X11_ROOT:[COMMAND]X11_RULES.MMS --- 52,86 ---- .ifdef USE_FALLBACK_FILES CC_DEF_USE_FALLBACK_FILES = ,USE_FALLBACK_FILES .endif ! .ifdef BASIC_XAW ! CC_DEF_BASIC_XAW = ,BASIC_XAW ! .endif ! .ifdef USE_RUNTIME_MESSAGES ! CC_DEF_MESSAGES = ,MESSAGES,MESSAGES1 ! .endif ! CC_DEFINES = /DEF=($(CC_DEFS)$(CC_DEF_USE_FALLBACK_RESOURCES)$(CC_DEF_USE_FALLBACK_FILES)$(CC_DEF_BASIC_XAW)$(CC_DEF_MESSAGES)) .ifdef __DECC__ + .ifdef DEBUG + CC_QUALIFIER = /DEB/NOOPT/EXT=STRICT/PREF=ALL + .else CC_QUALIFIER = /NODEB/EXT=STRICT/PREF=ALL .endif + .endif .ifdef __VAXC__ + .ifdef DEBUG + CC_QUALIFIER = /DEB/NOOPT + .ELSE CC_QUALIFIER = /NODEB/OPT=(D,I) .endif + .endif + + .ifdef DEBUG + LINK_QUALIFIER = /DEB + .else + LINK_QUALIFIER = /NODEB/NOTRACE + .endif .include X11_ROOT:[COMMAND]X11_RULES.MMS *************** *** 73,78 **** --- 92,102 ---- D_XTMEM.$(OBJ_EXT), .endif + .ifdef USE_SCROLLBAR_CODE + SCROLLBAR_OBJS =\ + SCROLLBAR.$(OBJ_EXT), + .endif + OBJS =\ AAA.$(OBJ_EXT),\ AAA_BISON.$(OBJ_EXT),\ *************** *** 80,85 **** --- 104,110 ---- ACTION_MAG.$(OBJ_EXT),\ ACTIONS.$(OBJ_EXT),\ CALLBACKS.$(OBJ_EXT),\ + CONFIRM.$(OBJ_EXT),\ CLIP.$(OBJ_EXT),\ $(DEBUG_OBJS)\ DIALOG.$(OBJ_EXT),\ *************** *** 101,106 **** --- 126,132 ---- POPUP_MISC.$(OBJ_EXT),\ PS.$(OBJ_EXT),\ SAVE.$(OBJ_EXT),\ + $(SCROLLBAR_OBJS)\ STRCASECMP.$(OBJ_EXT),\ VERSION.$(OBJ_EXT),\ VMS_DIR.$(OBJ_EXT),\ *************** *** 124,140 **** GV_CLASS_DAT = gv_class.dat GV_USER_DAT = gv_user.dat GV_SOURCE_IMAKEFILE = descrip.mms .ifdef USE_FALLBACK_RESOURCES ! APP_DEFAULTS_H_TARGET = $(APP_DEFAULTS_H) ! .else ! APP_DEFAULTS_H_TARGET = ! .endif ! ! .ifdef USE_FALLBACK_FILES ! GV_MESSAGES_H_TARGET = $(GV_MESSAGES_H) .else ! GV_MESSAGES_H__TARGET = .endif !### Targets ########################################################## --- 150,162 ---- GV_CLASS_DAT = gv_class.dat GV_USER_DAT = gv_user.dat GV_SOURCE_IMAKEFILE = descrip.mms + STYLE1_DAT = gv_spartan.dat + STYLE1_H = gv_spartan.h .ifdef USE_FALLBACK_RESOURCES ! GV_CLASS_DAT_TARGET = .else ! GV_CLASS_DAT_TARGET = $(GV_CLASS_DAT) .endif !### Targets ########################################################## *************** *** 149,168 **** $(GV_MESSAGES_H__TARGET) $(APP_DEFAULTS_H_TARGET) \ $(OBJS) $(XMU_LIBRARY) $(XAW3D_LIBRARY) @ write_ sys$output " linking $(TARGET).$(EXE_EXT) ..." ! @ LINK_/NODEB/NOTRACE - /EXE=$(TARGET).$(EXE_EXT) - $(OBJS),X11_LIBRARY:XAW3D_CLIENT.OPT/OPT .ifdef USE_FALLBACK_RESOURCES .else @ write_ sys$output " copying $(GV_CLASS_DAT) -> X11_ROOT:[DEFAULTS]GV_CLASS.DAT" ! @ COPY_/NOLOG/NOCONF $(GV_CLASS_DAT) X11_ROOT:[DEFAULTS]$(GV_CLASS_DAT); .endif .ifdef USE_FALLBACK_FILES .else @ write_ sys$output " copying $(GV_MESSAGES_DAT) -> $(GV_LIB)$(GV_MESSAGES_DAT)" ! @ COPY_/NOLOG/NOCONF $(GV_MESSAGES_DAT) $(GV_LIB)$(GV_MESSAGES_DAT); @ write_ sys$output " copying *.XBM -> $(GV_LIB)*.XBM" ! @ COPY_/NOLOG/NOCONF *.XBM $(GV_LIB)*.XBM; .endif @ write_ sys$output " copying GV_SPARTAN.DAT -> $(GV_LIB)GV_SPARTAN.DAT" @ COPY_/NOLOG/NOCONF GV_SPARTAN.DAT $(GV_LIB)GV_SPARTAN.DAT; --- 171,202 ---- $(GV_MESSAGES_H__TARGET) $(APP_DEFAULTS_H_TARGET) \ $(OBJS) $(XMU_LIBRARY) $(XAW3D_LIBRARY) @ write_ sys$output " linking $(TARGET).$(EXE_EXT) ..." ! @ LINK_$(LINK_QUALIFIER) - /EXE=$(TARGET).$(EXE_EXT) - $(OBJS),X11_LIBRARY:XAW3D_CLIENT.OPT/OPT .ifdef USE_FALLBACK_RESOURCES .else @ write_ sys$output " copying $(GV_CLASS_DAT) -> X11_ROOT:[DEFAULTS]GV_CLASS.DAT" ! @- COPY_/NOLOG/NOCONF $(GV_CLASS_DAT) X11_ROOT:[DEFAULTS]$(GV_CLASS_DAT); .endif .ifdef USE_FALLBACK_FILES .else @ write_ sys$output " copying $(GV_MESSAGES_DAT) -> $(GV_LIB)$(GV_MESSAGES_DAT)" ! @- COPY_/NOLOG/NOCONF $(GV_MESSAGES_DAT) $(GV_LIB)$(GV_MESSAGES_DAT); @ write_ sys$output " copying *.XBM -> $(GV_LIB)*.XBM" ! @- COPY_/NOLOG/NOCONF *.XBM $(GV_LIB)*.XBM; ! .ifdef STYLE1_DAT ! @ write_ sys$output " copying $(STYLE1_DAT) -> $(GV_LIB)$(STYLE1_DAT)" ! @- COPY_/NOLOG/NOCONF $(STYLE1_DAT) $(GV_LIB)$(STYLE1_DAT); ! .endif ! .ifdef STYLE2_DAT ! @ write_ sys$output " copying $(STYLE2_DAT) -> $(GV_LIB)$(STYLE2_DAT)" ! @- COPY_/NOLOG/NOCONF $(STYLE2_DAT) $(GV_LIB)$(STYLE2_DAT); ! .endif ! .ifdef STYLE3_DAT ! @ write_ sys$output " copying $(STYLE3_DAT) -> $(GV_LIB)$(STYLE3_DAT)" ! @- COPY_/NOLOG/NOCONF $(STYLE3_DAT) $(GV_LIB)$(STYLE3_DAT); ! .endif .endif @ write_ sys$output " copying GV_SPARTAN.DAT -> $(GV_LIB)GV_SPARTAN.DAT" @ COPY_/NOLOG/NOCONF GV_SPARTAN.DAT $(GV_LIB)GV_SPARTAN.DAT; *************** *** 176,182 **** @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) @ ad2c__ $(GV_CLASS_DAT) $(APP_DEFAULTS_H) ! $(GV_MESSAGES_H) : AD2C.$(EXE_EXT) $(GV_CLASS_DAT) @ write_ sys$output " generating $(GV_MESSAGES_H) ..." @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) @ ad2c__ $(GV_MESSAGES_DAT) $(GV_MESSAGES_H) --- 210,237 ---- @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) @ ad2c__ $(GV_CLASS_DAT) $(APP_DEFAULTS_H) ! .ifdef STYLE1_H ! $(STYLE1_H) : AD2C.$(EXE_EXT) $(STYLE1_DAT) ! @ write_ sys$output " generating $(STYLE1_H) ..." ! @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) ! @ ad2c__ $(STYLE1_DAT) $(STYLE1_H) ! .endif ! ! .ifdef STYLE2_H ! $(STYLE2_H) : AD2C.$(EXE_EXT) $(STYLE2_DAT) ! @ write_ sys$output " generating $(STYLE2_H) ..." ! @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) ! @ ad2c__ $(STYLE2_DAT) $(STYLE2_H) ! .endif ! ! .ifdef STYLE3_H ! $(STYLE3_H) : AD2C.$(EXE_EXT) $(STYLE3_DAT) ! @ write_ sys$output " generating $(STYLE3_H) ..." ! @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) ! @ ad2c__ $(STYLE3_DAT) $(STYLE3_H) ! .endif ! ! $(GV_MESSAGES_H) : AD2C.$(EXE_EXT) $(GV_MESSAGES_DAT) @ write_ sys$output " generating $(GV_MESSAGES_H) ..." @ ad2c__ := $X11_ROOT:[GV.SOURCE]AD2C.$(EXE_EXT) @ ad2c__ $(GV_MESSAGES_DAT) $(GV_MESSAGES_H) *************** *** 230,235 **** --- 285,292 ---- @ WRITE_ file "" @ WRITE_ file "GV.scratchDir: $(SCRATCH_DIR)" @ WRITE_ file "GV.defaultSaveDir: $(SAVE_DIR)" + @ WRITE_ file "GV.fallbackPageMedia: $(PAGE_MEDIA)" + @ WRITE_ file "GV*Ghostview.UseBackingPixmap: $(USE_BACKING_PIXMAP)" @ WRITE_ file "" .ifdef USE_FALLBACK_FILES @ IF_NOT_FF = "!" *************** *** 276,282 **** main.$(obj_ext) : $(GV_INTERN_RES_H) .ifdef USE_FALLBACK_FILES ! main.$(obj_ext) : $(GV_MESSAGES_H) .endif .ifdef USE_FALLBACK_RESOURCES --- 333,339 ---- main.$(obj_ext) : $(GV_INTERN_RES_H) .ifdef USE_FALLBACK_FILES ! main.$(obj_ext) : $(GV_MESSAGES_H) $(STYLE1_H) $(STYLE2_H) $(STYLE3_H) .endif .ifdef USE_FALLBACK_RESOURCES *** ./config.Unix- Wed Mar 19 18:00:00 1997 --- ./config.Unix Tue Apr 1 16:32:24 1997 *************** *** 28,40 **** XCOMM ==================================================================== XCOMM === The print command. XCOMM ==================================================================== PRINT_COMMAND = lpr XCOMM ==================================================================== XCOMM === The name of the Xaw3d library. XCOMM ==================================================================== ! XCOMM XAWLIB = -lXaw ! XAWLIB = -lXaw3d XCOMM ==================================================================== XCOMM === As far as the Xaw3d header files are concerned it is by --- 28,71 ---- XCOMM ==================================================================== XCOMM === The print command. XCOMM ==================================================================== + #ifdef SCOArchitecture + PRINT_COMMAND = lp + #else PRINT_COMMAND = lpr + #endif + + XCOMM ==================================================================== + XCOMM === Default page size if not specified in the document. + XCOMM === In the US "letter" is probably best, elsewhere "a4". + XCOMM === To use "letter", use the override + XCOMM === IMAKE_DEFINES="-DDEFAULT_PAGE_MEDIA=letter" + XCOMM === when you run "make Makefiles". + XCOMM ==================================================================== + #ifdef DEFAULT_PAGE_MEDIA + PAGE_MEDIA = DEFAULT_PAGE_MEDIA + #else + PAGE_MEDIA = a4 + #endif + + XCOMM ==================================================================== + XCOMM === Use backing pixmap (True) or backing store (False) + XCOMM ==================================================================== + USE_BACKING_PIXMAP = True + + XCOMM ==================================================================== + XCOMM === Use Xaw (BASIC_XAW defined) or Xaw3d (the default)? + XCOMM ==================================================================== + XCOMM #define BASIC_XAW + #ifdef BASIC_XAW + XAWNAME = Xaw + #else + XAWNAME = Xaw3d + #endif XCOMM ==================================================================== XCOMM === The name of the Xaw3d library. XCOMM ==================================================================== ! XAWLIB = -l$(XAWNAME) XCOMM ==================================================================== XCOMM === As far as the Xaw3d header files are concerned it is by *************** *** 49,61 **** XCOMM === ln -s /home/aaa/Xaw3d X11 XCOMM === ln -s /home/aaa/Xaw3d Xaw3d XCOMM ==================================================================== ! XCOMM XAW3D_HEADERS = -I/home/aaa/Xaw3d XCOMM ==================================================================== XCOMM === If defined: Use a Motif like scrollbar instead of the one XCOMM === included in the original Xaw3D library. XCOMM ==================================================================== #define USE_SCROLLBAR_CODE XCOMM ==================================================================== XCOMM === If defined: Compile bitmaps and messages into the executable. --- 80,94 ---- XCOMM === ln -s /home/aaa/Xaw3d X11 XCOMM === ln -s /home/aaa/Xaw3d Xaw3d XCOMM ==================================================================== ! XCOMM XAW3D_HEADERS = -I/home/aaa/$(XAWNAME) XCOMM ==================================================================== XCOMM === If defined: Use a Motif like scrollbar instead of the one XCOMM === included in the original Xaw3D library. XCOMM ==================================================================== + #ifndef BASIC_XAW #define USE_SCROLLBAR_CODE + #endif XCOMM ==================================================================== XCOMM === If defined: Compile bitmaps and messages into the executable. *************** *** 65,71 **** XCOMM ==================================================================== XCOMM === If defined: Compile fallback resources into the executable. XCOMM ==================================================================== ! XCOMM #define USE_FALLBACK_RESOURCES XCOMM ==================================================================== XCOMM === If defined: PDF to PostScript conversion will produce --- 98,111 ---- XCOMM ==================================================================== XCOMM === If defined: Compile fallback resources into the executable. XCOMM ==================================================================== ! #define USE_FALLBACK_RESOURCES ! ! XCOMM ==================================================================== ! XCOMM === If defined: cpp does not handle building include names with defines. ! XCOMM ==================================================================== ! #ifdef SCOArchitecture ! #define BROKEN_CPP ! #endif XCOMM ==================================================================== XCOMM === If defined: PDF to PostScript conversion will produce *************** *** 75,88 **** XCOMM #define PRODUCE_PS_LEVEL_ONE XCOMM ==================================================================== XCOMM === Destination directory for the gv manpage. XCOMM ==================================================================== MANDIR = /usr/local/man/man1 XCOMM ==================================================================== XCOMM === Destination directory for the gv executable. XCOMM ==================================================================== ! BINDIR = /usr/local/bin XCOMM ==================================================================== XCOMM === Destination directory for gv data files. --- 115,143 ---- XCOMM #define PRODUCE_PS_LEVEL_ONE XCOMM ==================================================================== + XCOMM === If defined: run gs with -dFIXEDMEDIA and -dFIXEDRESOLUTION + XCOMM === FIXEDMEDIA requires gs 3.41 or higher + XCOMM === FIXEDRESOLUTION requires gs 3.46 or higher + XCOMM === Without these options, PostScript that uses setpage or + XCOMM === setpageparams can change the page geometry that gv sets. + XCOMM === This seems PS fail when it sets the page. + XCOMM === Do not use this option for now. + XCOMM === FIXEDMEDIA was broken in gs 3.53. + XCOMM === gv should probably use the gs ViewerPreProcess used by GSview. + XCOMM ==================================================================== + XCOMM #define FIXED_PAGE_PARAMS + + XCOMM ==================================================================== XCOMM === Destination directory for the gv manpage. XCOMM ==================================================================== MANDIR = /usr/local/man/man1 XCOMM ==================================================================== XCOMM === Destination directory for the gv executable. + XCOMM === Note: SCO V5 sets BINDIR = /usr/bin/X11 and + XCOMM === MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier XCOMM ==================================================================== ! BINDIR = /usr/local/bin XCOMM ==================================================================== XCOMM === Destination directory for gv data files. *************** *** 100,107 **** --- 155,177 ---- XCOMM ==================================================================== XCOMM === Your favorite compiler/compiler flags. XCOMM ==================================================================== + #ifdef SCOArchitecture + XCOMM For SCO v5 + sco cc + CCOPTIONS = -O1 -Kpentium + XCOMM The options below cause core dump when doing to magnifications at once + XCOMM CCOPTIONS = -O1 -Khost,inline -Knoframe -Kpentium + XCOMM CCOPTIONS = -O2 -Khost,inline -Knoframe -Kpentium + XCOMM CCOPTIONS = -O3 -Khost,inline -Knoframe -Kpentium + XCOMM For SCO v5 + sco cc with debugging + XCOMM CCOPTIONS = -g + XCOMM For SCO + gcc + XCOMM CC = /usr/local/bin/gcc + XCOMM CCOPTIONS = -Wall -m486 -O3 -fomit-frame-pointer + #endif XCOMM CC = gcc XCOMM CCOPTIONS = -ansi -pedantic -Wall + XCOMM CCOPTIONS = -g -p + XCOMM CCOPTIONS = -g -ql XCOMM CDEBUGFLAGS = XCOMM LDPOSTLIB = *************** *** 163,169 **** XCOMM ==================================================================== XCOMM === If defined: Use a bug-fixed List widget. XCOMM ==================================================================== ! XCOMM #define USE_LISTC_CODE XCOMM ==================================================================== XCOMM === Definitions concerning memory debugging. --- 233,239 ---- XCOMM ==================================================================== XCOMM === If defined: Use a bug-fixed List widget. XCOMM ==================================================================== ! #define USE_LISTC_CODE XCOMM ==================================================================== XCOMM === Definitions concerning memory debugging. *** ./config.VMS- Wed Mar 19 18:00:00 1997 --- ./config.VMS Sat Mar 29 20:55:31 1997 *************** *** 26,32 **** !XCOMM ==================================================================== !XCOMM === The print command. Don't forget the /DELETE qualifier on VMS. !XCOMM ==================================================================== ! PRINT_COMMAND = PRINT/DELETE/PARAM=(DATA=POST) !XCOMM ==================================================================== !XCOMM === If defined: PDF to PostScript conversion will produce --- 26,59 ---- !XCOMM ==================================================================== !XCOMM === The print command. Don't forget the /DELETE qualifier on VMS. !XCOMM ==================================================================== ! PRINT_COMMAND = PRINT/NOID/DELETE/PARAM=(DATA=POST) ! ! !XCOMM ==================================================================== ! !XCOMM === Default page size if not specified in the document. ! !XCOMM === In the US "letter" is probably best, elsewhere "a4". ! !XCOMM ==================================================================== ! PAGE_MEDIA = a4 ! ! !XCOMM ==================================================================== ! !XCOMM === Use backing pixmap (True) or backing store (False) ! !XCOMM ==================================================================== ! USE_BACKING_PIXMAP = False ! ! !XCOMM ==================================================================== ! !XCOMM === Use Xaw (BASIC_XAW defined) or Xaw3d (the default)? ! !XCOMM ==================================================================== ! !BASIC_XAW = 1 ! ! !XCOMM ==================================================================== ! !XCOMM === If defined: Use a Motif like scrollbar instead of the one ! !XCOMM === included in the Xaw3D library. ! !XCOMM === The one that comes in the VMS X11KIT is practically identical, ! !XCOMM === so we keep that one. ! !XCOMM ==================================================================== ! .ifdef BASIC_XAW ! .else ! !USE_SCROLLBAR_CODE = 1 ! .endif !XCOMM ==================================================================== !XCOMM === If defined: PDF to PostScript conversion will produce *************** *** 72,74 **** --- 99,108 ---- SELECTED_BMP = $(GV_LIB)gv_selected.xbm ICON_BMP = $(GV_LIB)gv_icon.xbm MESSAGES_DAT = $(GV_LIB)gv_messages.dat + + !XCOMM ==================================================================== + !XCOMM === Debugging settings + !XCOMM ==================================================================== + !USE_RUNTIME_MESSAGES = 1 + !MEMDEBUG = 1 + !DEBUG = 1