billr@saab.CNA.TEK.COM (Bill Randle) (12/22/90)
Submitted-by: Rich Burridge <rburridge@sun.COM>
Posting-number: Volume 12, Issue 11
Archive-name: reve/Patch4b
Patch-To: reve: Volume 11, Issue 52-58
Environment: SunView, XView, X11R4, termcap
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 2 (of 4)."
# Contents: patches04b
# Wrapped by billr@saab on Fri Dec 21 11:35:38 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches04b' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches04b'\"
else
echo shar: Extracting \"'patches04b'\" \(49681 characters\)
sed "s/^X//" >'patches04b' <<'END_OF_FILE'
X
X------- sunview.c -------
X*** /tmp/da06711 Tue Dec 18 10:04:12 1990
X--- sunview.c Sat Dec 15 19:14:12 1990
X***************
X*** 49,54 ****
X--- 49,55 ----
X #define WINDOW_SET (void) window_set
X
X #define NORMALFONT "/usr/lib/fonts/fixedwidthfonts/screen.r.12"
X+ #define HELPFONT "/usr/lib/fonts/fixedwidthfonts/screen.r.10"
X #define BOLDFONT "/usr/lib/fonts/fixedwidthfonts/screen.b.12"
X
X mpr_static(button_stencil_pr, 64, 64, 1, button_stencil_image) ;
X***************
X*** 68,81 ****
X mpr_static(hglass_pr, 16, 16, 1, hglass_image) ;
X mpr_static(nocur_pr, 16, 16, 1, nocur_image) ;
X
X! Canvas canvas, pcanvas ;
X Cursor cursor[MAXCURSORS] ;
X Event *cur_event ;
X! Frame frame, pframe ;
X Icon reve_icon ;
X Pixfont *font[MAXFONTS] ;
X Pixrect *images[MAXIMAGES] ;
X! Pixwin *cpw, *ppw ;
X
X void pw_batch() ;
X int opvals[3] ; /* Pixrect rasterop values. */
X--- 69,82 ----
X mpr_static(hglass_pr, 16, 16, 1, hglass_image) ;
X mpr_static(nocur_pr, 16, 16, 1, nocur_image) ;
X
X! Canvas canvas, hcanvas, pcanvas ;
X Cursor cursor[MAXCURSORS] ;
X Event *cur_event ;
X! Frame frame, hframe, pframe ;
X Icon reve_icon ;
X Pixfont *font[MAXFONTS] ;
X Pixrect *images[MAXIMAGES] ;
X! Pixwin *cpw, *hpw, *ppw ;
X
X void pw_batch() ;
X int opvals[3] ; /* Pixrect rasterop values. */
X***************
X*** 101,106 ****
X--- 102,108 ----
X Event *event ;
X {
X if (c == canvas) curwin = W_MAIN ;
X+ else if (c == hcanvas) curwin = W_HELP ;
X else if (c == pcanvas) curwin = W_PROPS ;
X
X cur_event = event ;
X***************
X*** 109,126 ****
X
X
X void
X- close_frame(wtype) /* Iconise reve window. */
X- enum win_type wtype ;
X- {
X- Frame f ;
X-
X- if (wtype == W_MAIN) f = frame ;
X- else f = pframe ;
X- WINDOW_SET(f, FRAME_CLOSED, TRUE, 0) ;
X- }
X-
X-
X- void
X color_area(wtype, x, y, width, height, color)
X enum win_type wtype ;
X int x, y, width, height, color ;
X--- 111,116 ----
X***************
X*** 127,133 ****
X {
X Pixwin *pw ;
X
X! pw = (wtype == W_MAIN) ? cpw : ppw ;
X PW_WRITEBACKGROUND(pw, x, y, width, height, PIX_SRC | PIX_COLOR(color)) ;
X }
X
X--- 117,125 ----
X {
X Pixwin *pw ;
X
X! if (wtype == W_MAIN) pw = cpw ;
X! else if (wtype == W_HELP) pw = hpw ;
X! else if (wtype == W_PROPS) pw = ppw ;
X PW_WRITEBACKGROUND(pw, x, y, width, height, PIX_SRC | PIX_COLOR(color)) ;
X }
X
X***************
X*** 147,153 ****
X {
X Pixwin *pw ;
X
X! pw = (wtype == W_MAIN) ? cpw : ppw ;
X PW_ROP(pw, x, y, width, height, PIX_SRC | PIX_DST,
X images[(int) image], 0, 0) ;
X }
X--- 139,147 ----
X {
X Pixwin *pw ;
X
X! if (wtype == W_MAIN) pw = cpw ;
X! else if (wtype == W_HELP) pw = hpw ;
X! else if (wtype == W_PROPS) pw = ppw ;
X PW_ROP(pw, x, y, width, height, PIX_SRC | PIX_DST,
X images[(int) image], 0, 0) ;
X }
X***************
X*** 162,168 ****
X Pixwin *pw ;
X int rop ;
X
X! pw = (wtype == W_MAIN) ? cpw : ppw ;
X rop = opvals[(int) op] ;
X if (!iscolor[(int) cur_dpyno] && color == C_WHITE)
X rop = opvals[(int) RCLR] ;
X--- 156,164 ----
X Pixwin *pw ;
X int rop ;
X
X! if (wtype == W_MAIN) pw = cpw ;
X! else if (wtype == W_HELP) pw = hpw ;
X! else if (wtype == W_PROPS) pw = ppw ;
X rop = opvals[(int) op] ;
X if (!iscolor[(int) cur_dpyno] && color == C_WHITE)
X rop = opvals[(int) RCLR] ;
X***************
X*** 180,186 ****
X Pixwin *pw ;
X int rop ;
X
X! pw = (wtype == W_MAIN) ? cpw : ppw ;
X rop = opvals[(int) op] | PIX_COLOR(color) ;
X PW_STENCIL(pw, x, y, width, height, rop,
X images[(int) stencil], 0, 0, images[(int) image], 0, 0) ;
X--- 176,184 ----
X Pixwin *pw ;
X int rop ;
X
X! if (wtype == W_MAIN) pw = cpw ;
X! else if (wtype == W_HELP) pw = hpw ;
X! else if (wtype == W_PROPS) pw = ppw ;
X rop = opvals[(int) op] | PIX_COLOR(color) ;
X PW_STENCIL(pw, x, y, width, height, rop,
X images[(int) stencil], 0, 0, images[(int) image], 0, 0) ;
X***************
X*** 196,202 ****
X {
X Pixwin *pw ;
X
X! pw = (wtype == W_MAIN) ? cpw : ppw ;
X PW_TTEXT(pw, x, y, PIX_SRC | PIX_COLOR(color), font[(int) ftype], str) ;
X }
X
X--- 194,202 ----
X {
X Pixwin *pw ;
X
X! if (wtype == W_MAIN) pw = cpw ;
X! else if (wtype == W_HELP) pw = hpw ;
X! else if (wtype == W_PROPS) pw = ppw ;
X PW_TTEXT(pw, x, y, PIX_SRC | PIX_COLOR(color), font[(int) ftype], str) ;
X }
X
X***************
X*** 218,223 ****
X--- 218,224 ----
X }
X
X
X+ /*ARGSUSED*/
X char *
X get_resource(rtype) /* Null routine (currently only X11 and XView). */
X enum res_type rtype ;
X***************
X*** 241,252 ****
X--- 242,256 ----
X init_fonts() /* Open the normal and bold fonts. */
X {
X font[(int) BFONT] = get_font(BOLDFONT) ;
X+ font[(int) HFONT] = get_font(HELPFONT) ;
X font[(int) NFONT] = get_font(NORMALFONT) ;
X bfont_height = font[(int) BFONT]->pf_defaultsize.y ;
X+ hfont_height = font[(int) HFONT]->pf_defaultsize.y ;
X nfont_height = font[(int) NFONT]->pf_defaultsize.y ;
X }
X
X
X+ /*ARGSUSED*/
X init_graphics(argc, argv)
X int *argc ;
X char *argv[] ;
X***************
X*** 272,292 ****
X {
X Pixwin *frame_pw ;
X char colorname[CMS_NAMESIZE] ;
X- u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
X
X iscolor[(int) cur_dpyno] = (cpw->pw_pixrect->pr_depth == 8) ? 1 : 0 ;
X! SPRINTF(colorname, "%s%D", OTH_COLOR, getpid()) ;
X PW_SETCMSNAME(cpw, colorname) ;
X
X! oth_colorsetup(red, green, blue) ;
X! PW_PUTCOLORMAP(cpw, 0, OTH_COLORSIZE, red, green, blue) ;
X! if (inv_video) PW_REVERSEVIDEO(cpw, 0, OTH_COLORSIZE) ;
X
X if (iscolor[(int) cur_dpyno])
X {
X frame_pw = (Pixwin *) window_get(frame, WIN_PIXWIN) ;
X PW_SETCMSNAME(frame_pw, colorname) ;
X! PW_PUTCOLORMAP(frame_pw, 0, OTH_COLORSIZE, red, green, blue) ;
X }
X }
X
X--- 276,294 ----
X {
X Pixwin *frame_pw ;
X char colorname[CMS_NAMESIZE] ;
X
X iscolor[(int) cur_dpyno] = (cpw->pw_pixrect->pr_depth == 8) ? 1 : 0 ;
X! SPRINTF(colorname, "%s%D", REVE_COLOR, getpid()) ;
X PW_SETCMSNAME(cpw, colorname) ;
X
X! PW_PUTCOLORMAP(cpw, 0, REVE_COLORSIZE, rcols, gcols, bcols) ;
X! if (inv_video) PW_REVERSEVIDEO(cpw, 0, REVE_COLORSIZE) ;
X
X if (iscolor[(int) cur_dpyno])
X {
X frame_pw = (Pixwin *) window_get(frame, WIN_PIXWIN) ;
X PW_SETCMSNAME(frame_pw, colorname) ;
X! PW_PUTCOLORMAP(frame_pw, 0, REVE_COLORSIZE, rcols, gcols, bcols) ;
X }
X }
X
X***************
X*** 315,321 ****
X void
X make_canvas() /* Create canvas for game board. */
X {
X! canvas = window_create(frame, CANVAS,
X CANVAS_RETAINED, FALSE,
X WIN_HEIGHT, TOTAL_HEIGHT,
X WIN_WIDTH, TOTAL_WIDTH,
X--- 317,323 ----
X void
X make_canvas() /* Create canvas for game board. */
X {
X! canvas = window_create(frame, CANVAS,
X CANVAS_RETAINED, FALSE,
X WIN_HEIGHT, TOTAL_HEIGHT,
X WIN_WIDTH, TOTAL_WIDTH,
X***************
X*** 331,337 ****
X 0) ;
X cpw = (Pixwin *) window_get(canvas, CANVAS_PIXWIN) ;
X
X! pcanvas = window_create(pframe, CANVAS,
X CANVAS_RETAINED, FALSE,
X WIN_HEIGHT, PROPS_HEIGHT,
X WIN_WIDTH, PROPS_WIDTH,
X--- 333,339 ----
X 0) ;
X cpw = (Pixwin *) window_get(canvas, CANVAS_PIXWIN) ;
X
X! pcanvas = window_create(pframe, CANVAS,
X CANVAS_RETAINED, FALSE,
X WIN_HEIGHT, PROPS_HEIGHT,
X WIN_WIDTH, PROPS_WIDTH,
X***************
X*** 395,415 ****
X
X
X void
X! make_icon()
X {
X! reve_icon = icon_create(ICON_IMAGE, &icon_pr, 0) ;
X }
X
X
X void
X! open_frame(wtype)
X! enum win_type wtype ;
X {
X! Frame f ;
X!
X! if (wtype == W_MAIN) f = frame ;
X! else f = pframe ;
X! WINDOW_SET(f, WIN_SHOW, TRUE, 0) ;
X }
X
X
X--- 397,440 ----
X
X
X void
X! make_help_window(argc, argv)
X! int argc ;
X! char *argv[] ;
X {
X! int fontwidth ;
X!
X! hframe = window_create((Window) NULL, FRAME,
X! FRAME_ICON, reve_icon,
X! FRAME_LABEL, "reve help",
X! FRAME_NO_CONFIRM, TRUE,
X! WIN_ERROR_MSG, "Can't create window.",
X! FRAME_ARGS, argc, argv,
X! 0) ;
X!
X! fontwidth = font[(int) HFONT]->pf_defaultsize.x ;
X! help_height = ((hfont_height + 1) * HELP_ROWS) + (4 * CGAP) + CHEIGHT ;
X! help_width = (fontwidth * HELP_COLS) + (2 * CGAP) ;
X!
X! hcanvas = window_create(hframe, CANVAS,
X! CANVAS_RETAINED, FALSE,
X! WIN_HEIGHT, help_height,
X! WIN_WIDTH, help_width,
X! WIN_CONSUME_PICK_EVENTS,
X! MS_LEFT, MS_MIDDLE,
X! 0,
X! WIN_CONSUME_KBD_EVENTS,
X! KBD_USE, KBD_DONE, WIN_ASCII_EVENTS, WIN_UP_EVENTS,
X! 0,
X! WIN_EVENT_PROC, canvas_proc,
X! 0) ;
X! hpw = (Pixwin *) window_get(hcanvas, CANVAS_PIXWIN) ;
X }
X
X
X void
X! make_icon()
X {
X! reve_icon = icon_create(ICON_IMAGE, &icon_pr, 0) ;
X }
X
X
X***************
X*** 446,452 ****
X nextc = MOUSE_MOVING ;
X else if (id == WIN_REPAINT)
X {
X! if (curwin == W_MAIN) nextc = FRAME_REPAINT ;
X else if (curwin == W_PROPS) nextc = PROPS_REPAINT ;
X }
X }
X--- 471,478 ----
X nextc = MOUSE_MOVING ;
X else if (id == WIN_REPAINT)
X {
X! if (curwin == W_MAIN) nextc = FRAME_REPAINT ;
X! else if (curwin == W_HELP) nextc = HELP_REPAINT ;
X else if (curwin == W_PROPS) nextc = PROPS_REPAINT ;
X }
X }
X***************
X*** 460,465 ****
X--- 486,504 ----
X }
X
X
X+ void
X+ set_frame(wtype, showing)
X+ enum win_type wtype ;
X+ int showing ;
X+ {
X+ Frame f ;
X+
X+ if (wtype == W_HELP) f = hframe ;
X+ else if (wtype == W_PROPS) f = pframe ;
X+ WINDOW_SET(f, WIN_SHOW, showing, 0) ;
X+ }
X+
X+
X /*ARGSUSED*/
X void
X start_tool(dtype) /* Display window and start the notifier. */
X***************
X*** 472,477 ****
X--- 511,517 ----
X WINDOW_SET(frame, FRAME_ICON, reve_icon, 0) ;
X }
X window_fit(frame) ;
X+ window_fit(hframe) ;
X window_fit(pframe) ;
X window_main_loop(frame) ;
X }
X
X------- tty.c -------
X*** /tmp/da06714 Tue Dec 18 10:04:13 1990
X--- tty.c Sat Dec 15 19:42:20 1990
X***************
X*** 65,74 ****
X { 1, 1, 43, 32, }, /* Load */
X { 11, 1, 117, 32, }, /* Moves? */
X { 22, 1, 191, 32, }, /* New game */
X! { 33, 1, 265, 32, }, /* Save */
X! { 44, 1, 339, 32, }, /* Suggest */
X! { 55, 1, 413, 32, }, /* Undo */
X! { -1, -1, 43, 74, }, /* Props (not displayed). */
X { -1, -1, 339, 74, }, /* Cancel (not displayed). */
X { -1, -1, 413, 74, }, /* Quit (not displayed). */
X { 60, 5, 15, 111, }, /* Black: */
X--- 65,78 ----
X { 1, 1, 43, 32, }, /* Load */
X { 11, 1, 117, 32, }, /* Moves? */
X { 22, 1, 191, 32, }, /* New game */
X! { -1, -1, 265, 32, }, /* Help (not displayed). */
X! { -1, -1, 339, 32, }, /* Redo (not displayed). */
X! { -1, -1, 413, 32, }, /* Props (not displayed). */
X! { 33, 1, 43, 74, }, /* Save */
X! { 44, 1, 117, 74, }, /* Suggest */
X! { -1, -1, 191, 74, }, /* Edit (not displayed). */
X! { -1, -1, 265, 74, }, /* Stop (not displayed). */
X! { 55, 1, 339, 74, }, /* Undo */
X { -1, -1, 339, 74, }, /* Cancel (not displayed). */
X { -1, -1, 413, 74, }, /* Quit (not displayed). */
X { 60, 5, 15, 111, }, /* Black: */
X***************
X*** 86,91 ****
X--- 90,96 ----
X { -1, -1, -1, -1, }, /* Show evaluation option. */
X { -1, -1, -1, -1, }, /* Number move option. */
X { -1, -1, -1, -1, }, /* Quick game option. */
X+ { -1, -1, -1, -1, }, /* Help window page cycle.*/
X } ;
X
X struct other_info { /* Information needed to place other text values. */
X***************
X*** 97,106 ****
X { -1, -1, }, /* Load (ignored). */
X { -1, -1, }, /* Moves? (ignored). */
X { -1, -1, }, /* New game (ignored). */
X { -1, -1, }, /* Save (ignored). */
X { -1, -1, }, /* Suggest (ignored). */
X { -1, -1, }, /* Undo (ignored). */
X- { -1, -1, }, /* Done (ignored). */
X { -1, -1, }, /* Cancel (ignored). */
X { -1, -1, }, /* Quit (ignored). */
X { 38, 5, }, /* Black: */
X--- 102,115 ----
X { -1, -1, }, /* Load (ignored). */
X { -1, -1, }, /* Moves? (ignored). */
X { -1, -1, }, /* New game (ignored). */
X+ { -1, -1, }, /* Help (ignored). */
X+ { -1, -1, }, /* Redo (ignored). */
X+ { -1, -1, }, /* Props (ignored). */
X { -1, -1, }, /* Save (ignored). */
X { -1, -1, }, /* Suggest (ignored). */
X+ { -1, -1, }, /* Edit (ignored). */
X+ { -1, -1, }, /* Stop (ignored). */
X { -1, -1, }, /* Undo (ignored). */
X { -1, -1, }, /* Cancel (ignored). */
X { -1, -1, }, /* Quit (ignored). */
X { 38, 5, }, /* Black: */
X***************
X*** 118,123 ****
X--- 127,133 ----
X { 60, 11, }, /* Show evaluation option. */
X { -1, -1, }, /* Number move option. */
X { -1, -1, }, /* Quick game option. */
X+ { -1, -1, }, /* Help window page cycle. */
X } ;
X
X
X***************
X*** 135,145 ****
X {}
X
X
X- void
X- close_frame() /* This option does nothing with termcap. */
X- {}
X-
X-
X /*ARGSUSED*/
X void
X color_area(wtype, x, y, width, height, color)
X--- 145,150 ----
X***************
X*** 532,550 ****
X }
X
X
X- void
X- make_icon() /* Null routine - no icon in termcap version. */
X- {}
X-
X-
X /*ARGSUSED*/
X void
X! open_frame(wtype)
X! enum win_type wtype ;
X {
X }
X
X
X static void
X outc(c) /* Output the next character to the screen. */
X register int c ;
X--- 537,556 ----
X }
X
X
X /*ARGSUSED*/
X void
X! make_help_window(argc, argv)
X! int argc ;
X! char *argv[] ;
X {
X }
X
X
X+ void
X+ make_icon() /* Null routine - no icon in termcap version. */
X+ {}
X+
X+
X static void
X outc(c) /* Output the next character to the screen. */
X register int c ;
X***************
X*** 575,580 ****
X--- 581,594 ----
X void
X set_cursor(cursor) /* No cursors in termcap version. */
X enum curtype cursor ;
X+ {}
X+
X+
X+ /*ARGSUSED*/
X+ void
X+ set_frame(wtype, showing)
X+ enum win_type wtype ;
X+ int showing ;
X {}
X
X
X
X------- x11.c -------
X*** /tmp/da06717 Tue Dec 18 10:04:15 1990
X--- x11.c Mon Dec 17 10:26:26 1990
X***************
X*** 41,46 ****
X--- 41,47 ----
X
X #define BOLDFONT "lucidasanstypewriter-bold-12"
X #define DEFFONT "fixed"
X+ #define HELPFONT "lucidasanstypewriter-10"
X #define NORMALFONT "lucidasanstypewriter-12"
X
X #define FRAME_MASK (ButtonPressMask | ButtonReleaseMask | ExposureMask | \
X***************
X*** 63,75 ****
X Pixmap images[MAXIMAGES] ;
X Pixmap no_pixmap ;
X Pixmap load_color_icon(), load_image(), reve_icon[MAXDPY] ;
X! Window frame[MAXDPY], pframe[MAXDPY], root[MAXDPY] ;
X XClassHint class_hint = { "reve", "Reve" } ;
X XColor BGcolor, FGcolor ;
X XEvent event ;
X XFontStruct *font[MAXFONTS] ;
X XrmDatabase reve_DB[MAXDPY] ; /* Combined resources database. */
X! XSizeHints psize, size ;
X XWMHints wm_hints ;
X XGCValues gc_val ; /* Used to setup graphics context values. */
X int gc_flags ; /* Used to set up graphics context flags. */
X--- 64,76 ----
X Pixmap images[MAXIMAGES] ;
X Pixmap no_pixmap ;
X Pixmap load_color_icon(), load_image(), reve_icon[MAXDPY] ;
X! Window frame[MAXDPY], hframe[MAXDPY], pframe[MAXDPY], root[MAXDPY] ;
X XClassHint class_hint = { "reve", "Reve" } ;
X XColor BGcolor, FGcolor ;
X XEvent event ;
X XFontStruct *font[MAXFONTS] ;
X XrmDatabase reve_DB[MAXDPY] ; /* Combined resources database. */
X! XSizeHints size ;
X XWMHints wm_hints ;
X XGCValues gc_val ; /* Used to setup graphics context values. */
X int gc_flags ; /* Used to set up graphics context flags. */
X***************
X*** 78,84 ****
X unsigned long backgnd[MAXDPY] ; /* Default background color. */
X unsigned long foregnd[MAXDPY] ; /* Default foreground color. */
X unsigned long gc_mask ; /* Mask for setting graphic context values. */
X! unsigned long palette[OTH_COLORSIZE] ; /* Xlib color palette. */
X
X #ifndef NOSELECT
X #ifdef NO_43SELECT
X--- 79,85 ----
X unsigned long backgnd[MAXDPY] ; /* Default background color. */
X unsigned long foregnd[MAXDPY] ; /* Default foreground color. */
X unsigned long gc_mask ; /* Mask for setting graphic context values. */
X! unsigned long palette[REVE_COLORSIZE] ; /* Xlib color palette. */
X
X #ifndef NOSELECT
X #ifdef NO_43SELECT
X***************
X*** 143,172 ****
X
X
X void
X- close_frame(wtype) /* Iconise reve window. */
X- enum win_type wtype ;
X- {
X- int d ;
X- XEvent event ;
X- Window window ;
X-
X- d = (int) cur_dpyno ;
X- if (wtype == W_MAIN) window = frame[d] ;
X- else window = pframe[d] ;
X-
X- iconic = 1 ;
X- event.xclient.type = ClientMessage ;
X- event.xclient.display = dpy[d] ;
X- event.xclient.window = window ;
X- event.xclient.message_type = XInternAtom(dpy[d], "WM_CHANGE_STATE", False) ;
X- event.xclient.format = 32 ;
X- event.xclient.data.l[0] = IconicState ;
X- XSendEvent(dpy[d], DefaultRootWindow(dpy[d]), False,
X- SubstructureRedirectMask | SubstructureNotifyMask, &event) ;
X- }
X-
X-
X- void
X color_area(wtype, x, y, width, height, color)
X enum win_type wtype ;
X int x, y, width, height, color ;
X--- 144,149 ----
X***************
X*** 175,181 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X--- 152,161 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (wtype == W_MAIN) window = frame[d] ;
X! else if (wtype == W_HELP) window = hframe[d] ;
X! else if (wtype == W_PROPS) window = pframe[d] ;
X!
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X***************
X*** 206,212 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
X gc_mask = GCStipple | GCTileStipXOrigin | GCTileStipYOrigin ;
X gc_val.stipple = images[(int) image] ;
X gc_val.ts_x_origin = x ;
X--- 186,195 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (wtype == W_MAIN) window = frame[d] ;
X! else if (wtype == W_HELP) window = hframe[d] ;
X! else if (wtype == W_PROPS) window = pframe[d] ;
X!
X gc_mask = GCStipple | GCTileStipXOrigin | GCTileStipYOrigin ;
X gc_val.stipple = images[(int) image] ;
X gc_val.ts_x_origin = x ;
X***************
X*** 226,232 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X--- 209,218 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (wtype == W_MAIN) window = frame[d] ;
X! else if (wtype == W_HELP) window = hframe[d] ;
X! else if (wtype == W_PROPS) window = pframe[d] ;
X!
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X***************
X*** 250,256 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else gc_val.foreground = foregnd[d] ;
X gc_val.function = opvals[(int) op] ;
X--- 236,245 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (wtype == W_MAIN) window = frame[d] ;
X! else if (wtype == W_HELP) window = hframe[d] ;
X! else if (wtype == W_PROPS) window = pframe[d] ;
X!
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else gc_val.foreground = foregnd[d] ;
X gc_val.function = opvals[(int) op] ;
X***************
X*** 279,285 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! window = (wtype == W_MAIN) ? frame[d] : pframe[d] ;
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X--- 268,277 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (wtype == W_MAIN) window = frame[d] ;
X! else if (wtype == W_HELP) window = hframe[d] ;
X! else if (wtype == W_PROPS) window = pframe[d] ;
X!
X if (iscolor[d]) gc_val.foreground = palette[color] ;
X else
X {
X***************
X*** 377,385 ****
X--- 369,380 ----
X init_fonts() /* Open the normal and bold fonts. */
X {
X font[(int) BFONT] = get_font(BOLDFONT) ;
X+ font[(int) HFONT] = get_font(HELPFONT) ;
X font[(int) NFONT] = get_font(NORMALFONT) ;
X bfont_height = font[(int) BFONT]->max_bounds.ascent +
X font[(int) BFONT]->max_bounds.descent ;
X+ hfont_height = font[(int) HFONT]->max_bounds.ascent +
X+ font[(int) HFONT]->max_bounds.descent ;
X nfont_height = font[(int) NFONT]->max_bounds.ascent +
X font[(int) NFONT]->max_bounds.descent ;
X }
X***************
X*** 439,445 ****
X load_colors() /* Create and load reve color map. */
X {
X XColor ccol ;
X- u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
X int d, i, numcolors ;
X
X d = (int) cur_dpyno ;
X--- 434,439 ----
X***************
X*** 446,465 ****
X iscolor[d] = 0 ;
X if (DisplayCells(dpy[d], screen[d]) > 2)
X {
X- oth_colorsetup(red, green, blue) ;
X iscolor[d] = 1 ;
X numcolors = 0 ;
X! for (i = 0; i < OTH_COLORSIZE; i++)
X {
X! ccol.flags = DoRed | DoGreen | DoBlue ;
X! ccol.red = (unsigned short) (red[i] << 8) ;
X! ccol.green = (unsigned short) (green[i] << 8) ;
X! ccol.blue = (unsigned short) (blue[i] << 8) ;
X if (XAllocColor(dpy[d],
X DefaultColormap(dpy[d], screen[d]), &ccol) == True)
X palette[numcolors++] = ccol.pixel ;
X }
X! if (numcolors < 2)
X {
X FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
X exit(1) ;
X--- 440,463 ----
X iscolor[d] = 0 ;
X if (DisplayCells(dpy[d], screen[d]) > 2)
X {
X iscolor[d] = 1 ;
X numcolors = 0 ;
X! for (i = 0; i < REVE_COLORSIZE; i++)
X {
X! if (colstr[i] == NULL ||
X! (XParseColor(dpy[d], DefaultColormap(dpy[d], screen[d]),
X! colstr[i], &ccol) == 0))
X! {
X! ccol.flags = DoRed | DoGreen | DoBlue ;
X! ccol.red = (unsigned short) (rcols[i] << 8) ;
X! ccol.green = (unsigned short) (gcols[i] << 8) ;
X! ccol.blue = (unsigned short) (bcols[i] << 8) ;
X! }
X if (XAllocColor(dpy[d],
X DefaultColormap(dpy[d], screen[d]), &ccol) == True)
X palette[numcolors++] = ccol.pixel ;
X }
X! if (numcolors < REVE_COLORSIZE)
X {
X FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
X exit(1) ;
X***************
X*** 525,530 ****
X--- 523,530 ----
X *
X * XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
X * file.
X+ *
X+ * REVEDEFAULTS environment variable or, if not set, the ~/.reverc file.
X */
X
X void
X***************
X*** 570,575 ****
X--- 570,587 ----
X }
X else db = XrmGetFileDatabase(ptr) ;
X XrmMergeDatabases(db, &reve_DB[d]) ;
X+
X+ /* Finally merge in Reve defaults via REVEDEFAULTS or, if not defined, the
X+ * ~/.reverc file.
X+ */
X+
X+ if ((ptr = getenv("REVEDEFAULTS")) == NULL)
X+ {
X+ SPRINTF(name, "%s/.reverc", home) ;
X+ db = XrmGetFileDatabase(name) ;
X+ }
X+ else db = XrmGetFileDatabase(ptr) ;
X+ XrmMergeDatabases(db, &reve_DB[d]) ;
X }
X
X
X***************
X*** 655,673 ****
X
X /* Setup property window. */
X
X! psize.flags = PMinSize | PMaxSize | PPosition | PSize ;
X! psize.x = TOTAL_WIDTH + 10 ;
X! psize.y = 0 ;
X! psize.max_width = size.min_width = size.width = PROPS_WIDTH ;
X! psize.max_height = size.min_height = size.height = PROPS_HEIGHT ;
X
X pframe[d] = XCreateSimpleWindow(dpy[d], root[d],
X! size.x + TOTAL_WIDTH + 10, size.y,
X! PROPS_WIDTH, PROPS_HEIGHT,
X REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
X
X XSetStandardProperties(dpy[d], pframe[d], "reve properties",
X! "Props", reve_icon[d], argv, argc, &psize) ;
X
X /* Create graphics contexts. */
X
X--- 667,685 ----
X
X /* Setup property window. */
X
X! size.flags = PMinSize | PMaxSize | PPosition | PSize ;
X! size.x = TOTAL_WIDTH + 10 ;
X! size.y = 0 ;
X! size.max_width = size.min_width = size.width = PROPS_WIDTH ;
X! size.max_height = size.min_height = size.height = PROPS_HEIGHT ;
X
X pframe[d] = XCreateSimpleWindow(dpy[d], root[d],
X! size.x, size.y,
X! size.max_width, size.max_height,
X REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
X
X XSetStandardProperties(dpy[d], pframe[d], "reve properties",
X! "Props", reve_icon[d], argv, argc, &size) ;
X
X /* Create graphics contexts. */
X
X***************
X*** 682,691 ****
X--- 694,733 ----
X
X stencilgc[d] = XCreateGC(dpy[d], root[d], gc_mask, &gc_val) ;
X XSetFillStyle(dpy[d], stencilgc[d], FillOpaqueStippled) ;
X+ XSynchronize(dpy[d], TRUE) ;
X }
X
X
X void
X+ make_help_window(argc, argv)
X+ int argc ;
X+ char *argv[] ;
X+ {
X+ int d, fontwidth ;
X+
X+ d = (int) cur_dpyno ;
X+ fontwidth = font[(int) HFONT]->max_bounds.rbearing +
X+ font[(int) HFONT]->min_bounds.lbearing ;
X+ help_height = ((hfont_height + 1) * HELP_ROWS) + (4 * CGAP) + CHEIGHT ;
X+ help_width = (fontwidth * HELP_COLS) + (2 * CGAP) ;
X+
X+ size.flags = PMinSize | PMaxSize | PPosition | PSize ;
X+ size.x = TOTAL_WIDTH + 10 ;
X+ size.y = 0 ;
X+ size.max_width = size.min_width = size.width = help_width ;
X+ size.max_height = size.min_height = size.height = help_height ;
X+
X+ hframe[d] = XCreateSimpleWindow(dpy[d], root[d],
X+ size.x, size.y,
X+ size.max_width, size.max_height,
X+ REVE_BORDER_WIDTH, foregnd[d], backgnd[d]) ;
X+
X+ XSetStandardProperties(dpy[d], hframe[d], "reve help",
X+ "Help", reve_icon[d], argv, argc, &size) ;
X+ }
X+
X+
X+ void
X make_icon() {} /* Null routine - icon created in make_frame. */
X
X
X***************
X*** 719,739 ****
X
X
X void
X- open_frame(wtype)
X- enum win_type wtype ;
X- {
X- int d ;
X- Window window ;
X-
X- d = (int) cur_dpyno ;
X- if (wtype == W_MAIN) window = frame[d] ;
X- else window = pframe[d] ;
X- XSelectInput(dpy[0], window, FRAME_MASK) ;
X- XMapWindow(dpy[0], window) ;
X- }
X-
X-
X- void
X process_event() /* Determine event type. */
X {
X XClientMessageEvent *ev ;
X--- 761,766 ----
X***************
X*** 743,749 ****
X int d ;
X
X d = (int) cur_dpyno ;
X! if (event.xany.window == frame[(int) cur_dpyno]) curwin = W_MAIN ;
X else if (event.xany.window == pframe[(int) cur_dpyno]) curwin = W_PROPS ;
X
X switch (event.type)
X--- 770,777 ----
X int d ;
X
X d = (int) cur_dpyno ;
X! if (event.xany.window == frame[(int) cur_dpyno]) curwin = W_MAIN ;
X! else if (event.xany.window == hframe[(int) cur_dpyno]) curwin = W_HELP ;
X else if (event.xany.window == pframe[(int) cur_dpyno]) curwin = W_PROPS ;
X
X switch (event.type)
X***************
X*** 807,812 ****
X--- 835,841 ----
X {
X int d ;
X int doframe = 0 ;
X+ int dohframe = 0 ;
X int dopframe = 0 ;
X
X d = (int) cur_dpyno ;
X***************
X*** 814,819 ****
X--- 843,850 ----
X {
X if (event->count == 0 && event->window == frame[(int) cur_dpyno])
X doframe++ ;
X+ if (event->count == 0 && event->window == hframe[(int) cur_dpyno])
X+ dohframe++ ;
X if (event->count == 0 && event->window == pframe[(int) cur_dpyno])
X dopframe++ ;
X }
X***************
X*** 820,825 ****
X--- 851,857 ----
X while (XCheckMaskEvent(dpy[d], ExposureMask, (XEvent *) event)) ;
X
X if (doframe) return(FRAME_REPAINT) ;
X+ else if (dohframe) return(HELP_REPAINT) ;
X else if (dopframe) return(PROPS_REPAINT) ;
X else return(IGNORE_EVENT) ;
X }
X***************
X*** 838,847 ****
X
X
X void
X start_tool(dtype) /* Start event dispatcher and display. */
X enum disp_type dtype ;
X {
X! open_frame(W_MAIN) ;
X XSelectInput(dpy[0], pframe[0], FRAME_MASK) ;
X
X if (dtype == XTWO)
X--- 870,898 ----
X
X
X void
X+ set_frame(wtype, showing)
X+ enum win_type wtype ;
X+ int showing ;
X+ {
X+ Window window ;
X+ int d ;
X+
X+ d = (int) cur_dpyno ;
X+ if (wtype == W_HELP) window = hframe[d] ;
X+ else if (wtype == W_PROPS) window = pframe[d] ;
X+
X+ if (showing) XMapWindow(dpy[d], window) ;
X+ else XUnmapWindow(dpy[d], window) ;
X+ }
X+
X+
X+ void
X start_tool(dtype) /* Start event dispatcher and display. */
X enum disp_type dtype ;
X {
X! XSelectInput(dpy[0], frame[0], FRAME_MASK) ;
X! XMapWindow(dpy[0], frame[0]) ;
X! XSelectInput(dpy[0], hframe[0], FRAME_MASK) ;
X XSelectInput(dpy[0], pframe[0], FRAME_MASK) ;
X
X if (dtype == XTWO)
X***************
X*** 848,853 ****
X--- 899,905 ----
X {
X XSelectInput(dpy[1], frame[1], FRAME_MASK) ;
X XMapWindow(dpy[1], frame[1]) ;
X+ XSelectInput(dpy[1], hframe[1], FRAME_MASK) ;
X XSelectInput(dpy[1], pframe[1], FRAME_MASK) ;
X }
X
X
X------- xview.c -------
X*** /tmp/da06720 Tue Dec 18 10:04:16 1990
X--- xview.c Sun Dec 16 11:57:06 1990
X***************
X*** 38,43 ****
X--- 38,44 ----
X #include <xview/cms.h>
X #include <xview/cursor.h>
X #include <xview/svrimage.h>
X+ #include <xview/textsw.h>
X #include <xview/xv_xrect.h>
X #include <X11/Xlib.h>
X #include <X11/Xresource.h>
X***************
X*** 46,52 ****
X
X enum gr_type gtype = GXVIEW ; /* Graphics type. */
X
X! enum popup_pos {P_BELOW, P_RIGHT } ; /* Positions relative to main frame. */
X
X #define CLIENT_NO 10
X #define DEPTH_MENU_ENTRY 9
X--- 47,53 ----
X
X enum gr_type gtype = GXVIEW ; /* Graphics type. */
X
X! enum popup_pos { P_BELOW, P_RIGHT } ; /* Positions relative to main frame. */
X
X #define CLIENT_NO 10
X #define DEPTH_MENU_ENTRY 9
X***************
X*** 59,64 ****
X--- 60,66 ----
X
X #define BOLDFONT "lucidasanstypewriter-bold-12"
X #define DEFFONT "fixed"
X+ #define HELPFONT "lucidasanstypewriter-12"
X #define NORMALFONT "lucidasanstypewriter-12"
X
X Canvas canvas ;
X***************
X*** 71,76 ****
X--- 73,81 ----
X
X Notify_client client = (Notify_client) CLIENT_NO ;
X
X+ Frame h_frame ; /* Help window frame. */
X+ Textsw h_textsw ; /* Text sub-window for help file. */
X+
X Frame ls_frame ; /* Frame for load/save pop-up window. */
X Panel ls_panel ; /* Panel for load/save operations. */
X Panel_item ls_button ; /* Button to start load/save operation. */
X***************
X*** 111,117 ****
X unsigned long backgnd ; /* Default background color. */
X unsigned long foregnd ; /* Default foreground color. */
X unsigned long gc_mask ; /* Mask for setting graphic context values. */
X! unsigned long palette[OTH_COLORSIZE] ; /* Xlib color palette. */
X
X int opvals[3] ; /* Pixrect rasterop values. */
X int pid ; /* Process id of the reve_proc process. */
X--- 116,122 ----
X unsigned long backgnd ; /* Default background color. */
X unsigned long foregnd ; /* Default foreground color. */
X unsigned long gc_mask ; /* Mask for setting graphic context values. */
X! unsigned long palette[REVE_COLORSIZE] ; /* Xlib color palette. */
X
X int opvals[3] ; /* Pixrect rasterop values. */
X int pid ; /* Process id of the reve_proc process. */
X***************
X*** 121,128 ****
X
X Notify_value read_from_reve(), sigchldcatcher() ;
X void destroy_frame() ;
X! static void menu_proc(), set_depth(), set_player() ;
X! static void xv_load_game(), xv_new_game(), xv_save_game(), xv_set_props() ;
X
X
X void
X--- 126,134 ----
X
X Notify_value read_from_reve(), sigchldcatcher() ;
X void destroy_frame() ;
X! static void menu_proc(), set_depth(), set_player() ;
X! static void xv_do_help(), xv_load_game(), xv_new_game() ;
X! static void xv_save_game(), xv_set_props() ;
X
X
X void
X***************
X*** 158,170 ****
X }
X
X
X- void
X- close_frame() /* Iconise reve window. */
X- {
X- XV_SET(frame, FRAME_CLOSED, TRUE, 0) ;
X- }
X-
X-
X /*ARGSUSED*/
X void
X color_area(wtype, x, y, width, height, color)
X--- 164,169 ----
X***************
X*** 427,435 ****
X--- 426,437 ----
X init_fonts() /* Open the normal and bold fonts. */
X {
X font[(int) BFONT] = get_font(BOLDFONT) ;
X+ font[(int) HFONT] = get_font(HELPFONT) ;
X font[(int) NFONT] = get_font(NORMALFONT) ;
X bfont_height = font[(int) BFONT]->max_bounds.ascent +
X font[(int) BFONT]->max_bounds.descent ;
X+ hfont_height = font[(int) HFONT]->max_bounds.ascent +
X+ font[(int) HFONT]->max_bounds.descent ;
X nfont_height = font[(int) NFONT]->max_bounds.ascent +
X font[(int) NFONT]->max_bounds.descent ;
X }
X***************
X*** 460,482 ****
X load_colors() /* Create and load reve color map. */
X {
X XColor ccol ;
X- u_char red[OTH_COLORSIZE], green[OTH_COLORSIZE], blue[OTH_COLORSIZE] ;
X int i, numcolors ;
X
X if (iscolor[(int) cur_dpyno])
X {
X- oth_colorsetup(red, green, blue) ;
X numcolors = 0 ;
X! for (i = 0; i < OTH_COLORSIZE; i++)
X {
X! ccol.flags = DoRed | DoGreen | DoBlue ;
X! ccol.red = (unsigned short) (red[i] << 8) ;
X! ccol.green = (unsigned short) (green[i] << 8) ;
X! ccol.blue = (unsigned short) (blue[i] << 8) ;
X if (XAllocColor(dpy, DefaultColormap(dpy, screen), &ccol) == True)
X palette[numcolors++] = ccol.pixel ;
X }
X! if (numcolors < 2)
X {
X FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
X exit(1) ;
X--- 462,487 ----
X load_colors() /* Create and load reve color map. */
X {
X XColor ccol ;
X int i, numcolors ;
X
X if (iscolor[(int) cur_dpyno])
X {
X numcolors = 0 ;
X! for (i = 0; i < REVE_COLORSIZE; i++)
X {
X! if (colstr[i] == NULL ||
X! (XParseColor(dpy, DefaultColormap(dpy, screen),
X! colstr[i], &ccol) == 0))
X! {
X! ccol.flags = DoRed | DoGreen | DoBlue ;
X! ccol.red = (unsigned short) (rcols[i] << 8) ;
X! ccol.green = (unsigned short) (gcols[i] << 8) ;
X! ccol.blue = (unsigned short) (bcols[i] << 8) ;
X! }
X if (XAllocColor(dpy, DefaultColormap(dpy, screen), &ccol) == True)
X palette[numcolors++] = ccol.pixel ;
X }
X! if (numcolors < REVE_COLORSIZE)
X {
X FPRINTF(stderr, "%s: cannot allocate colors.\n", progname) ;
X exit(1) ;
X***************
X*** 498,503 ****
X--- 503,510 ----
X *
X * XENVIRONMENT environment variable or, if not set, .Xdefaults-hostname
X * file.
X+ *
X+ * REVEDEFAULTS environment variable or, if not set, the ~/.reverc file.
X */
X
X void
X***************
X*** 541,546 ****
X--- 548,565 ----
X }
X else db = XrmGetFileDatabase(ptr) ;
X XrmMergeDatabases(db, &reve_DB[d]) ;
X+
X+ /* Finally merge in Reve defaults via REVEDEFAULTS or, if not defined, the
X+ * ~/.reverc file.
X+ */
X+
X+ if ((ptr = getenv("REVEDEFAULTS")) == NULL)
X+ {
X+ SPRINTF(name, "%s/.reverc", home) ;
X+ db = XrmGetFileDatabase(name) ;
X+ }
X+ else db = XrmGetFileDatabase(ptr) ;
X+ XrmMergeDatabases(db, &reve_DB[d]) ;
X }
X
X
X***************
X*** 652,659 ****
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 0),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_LABEL_STRING, "Load Game...",
X! PANEL_NOTIFY_PROC, xv_load_game,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X--- 671,678 ----
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 0),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_NOTIFY_PROC, xv_new_game,
X! PANEL_LABEL_STRING, " New Game ",
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X***************
X*** 666,687 ****
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 30),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_NOTIFY_PROC, xv_new_game,
X! PANEL_LABEL_STRING, " New Game ",
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 45),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_LABEL_STRING, " Props... ",
X! PANEL_NOTIFY_PROC, xv_set_props,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 0),
X PANEL_ITEM_Y, xv_row(panel, 1),
X! PANEL_LABEL_STRING, "Save Game...",
X! PANEL_NOTIFY_PROC, xv_save_game,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X--- 685,706 ----
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 30),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_LABEL_STRING, " Redo ",
X! PANEL_NOTIFY_PROC, redo,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 45),
X PANEL_ITEM_Y, xv_row(panel, 0),
X! PANEL_LABEL_STRING, " Help... ",
X! PANEL_NOTIFY_PROC, xv_do_help,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 0),
X PANEL_ITEM_Y, xv_row(panel, 1),
X! PANEL_LABEL_STRING, "Load Game...",
X! PANEL_NOTIFY_PROC, xv_load_game,
X 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X***************
X*** 689,695 ****
X PANEL_ITEM_Y, xv_row(panel, 1),
X PANEL_LABEL_STRING, " Suggest ",
X PANEL_NOTIFY_PROC, suggest,
X! 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 30),
X--- 708,714 ----
X PANEL_ITEM_Y, xv_row(panel, 1),
X PANEL_LABEL_STRING, " Suggest ",
X PANEL_NOTIFY_PROC, suggest,
X! 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 30),
X***************
X*** 696,706 ****
X PANEL_ITEM_Y, xv_row(panel, 1),
X PANEL_LABEL_STRING, " Undo ",
X PANEL_NOTIFY_PROC, undo,
X! 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 45),
X PANEL_ITEM_Y, xv_row(panel, 1),
X PANEL_LABEL_STRING, " Quit ",
X PANEL_NOTIFY_PROC, destroy_frame,
X 0) ;
X--- 715,739 ----
X PANEL_ITEM_Y, xv_row(panel, 1),
X PANEL_LABEL_STRING, " Undo ",
X PANEL_NOTIFY_PROC, undo,
X! 0) ;
X
X XV_CREATE(panel, PANEL_BUTTON,
X PANEL_ITEM_X, xv_col(panel, 45),
X PANEL_ITEM_Y, xv_row(panel, 1),
X+ PANEL_LABEL_STRING, " Props... ",
X+ PANEL_NOTIFY_PROC, xv_set_props,
X+ 0) ;
X+
X+ XV_CREATE(panel, PANEL_BUTTON,
X+ PANEL_ITEM_X, xv_col(panel, 0),
X+ PANEL_ITEM_Y, xv_row(panel, 2),
X+ PANEL_LABEL_STRING, "Save Game...",
X+ PANEL_NOTIFY_PROC, xv_save_game,
X+ 0) ;
X+
X+ XV_CREATE(panel, PANEL_BUTTON,
X+ PANEL_ITEM_X, xv_col(panel, 45),
X+ PANEL_ITEM_Y, xv_row(panel, 2),
X PANEL_LABEL_STRING, " Quit ",
X PANEL_NOTIFY_PROC, destroy_frame,
X 0) ;
X***************
X*** 707,713 ****
X
X XV_CREATE(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 2),
X PANEL_LABEL_BOLD, TRUE,
X PANEL_LABEL_STRING, "Black:",
X 0) ;
X--- 740,746 ----
X
X XV_CREATE(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 3),
X PANEL_LABEL_BOLD, TRUE,
X PANEL_LABEL_STRING, "Black:",
X 0) ;
X***************
X*** 714,720 ****
X val = items[(int) BLACK_PLAYS].value ;
X black_item = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 7),
X! PANEL_ITEM_Y, xv_row(panel, 2),
X PANEL_LABEL_BOLD, FALSE,
X PANEL_LABEL_STRING, player_values[val],
X 0) ;
X--- 747,753 ----
X val = items[(int) BLACK_PLAYS].value ;
X black_item = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 7),
X! PANEL_ITEM_Y, xv_row(panel, 3),
X PANEL_LABEL_BOLD, FALSE,
X PANEL_LABEL_STRING, player_values[val],
X 0) ;
X***************
X*** 721,727 ****
X
X XV_CREATE(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 30),
X! PANEL_ITEM_Y, xv_row(panel, 2),
X PANEL_LABEL_BOLD, TRUE,
X PANEL_LABEL_STRING, "White:",
X 0) ;
X--- 754,760 ----
X
X XV_CREATE(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 30),
X! PANEL_ITEM_Y, xv_row(panel, 3),
X PANEL_LABEL_BOLD, TRUE,
X PANEL_LABEL_STRING, "White:",
X 0) ;
X***************
X*** 728,734 ****
X val = items[(int) WHITE_PLAYS].value ;
X white_item = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 37),
X! PANEL_ITEM_Y, xv_row(panel, 2),
X PANEL_LABEL_BOLD, FALSE,
X PANEL_LABEL_STRING, player_values[val],
X 0) ;
X--- 761,767 ----
X val = items[(int) WHITE_PLAYS].value ;
X white_item = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 37),
X! PANEL_ITEM_Y, xv_row(panel, 3),
X PANEL_LABEL_BOLD, FALSE,
X PANEL_LABEL_STRING, player_values[val],
X 0) ;
X***************
X*** 735,759 ****
X
X mes_items[(int) (PANEL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 3),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (EVAL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 4),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (SCORE_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 5),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (TURN_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 30),
X! PANEL_ITEM_Y, xv_row(panel, 5),
X PANEL_LABEL_STRING, "Black to move",
X 0) ;
X window_fit(panel) ;
X--- 768,792 ----
X
X mes_items[(int) (PANEL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 4),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (EVAL_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 5),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (SCORE_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 0),
X! PANEL_ITEM_Y, xv_row(panel, 6),
X PANEL_LABEL_STRING, "",
X 0) ;
X
X mes_items[(int) (TURN_MES - PANEL_MES)] = xv_create(panel, PANEL_MESSAGE,
X PANEL_ITEM_X, xv_col(panel, 30),
X! PANEL_ITEM_Y, xv_row(panel, 6),
X PANEL_LABEL_STRING, "Black to move",
X 0) ;
X window_fit(panel) ;
X***************
X*** 905,911 ****
X--- 938,977 ----
X }
X
X
X+ /*ARGSUSED*/
X void
X+ make_help_window(argc, argv)
X+ int argc ;
X+ char *argv[] ;
X+ {
X+ h_frame = (Frame) xv_create(frame, FRAME_CMD,
X+ FRAME_ICON, reve_icon,
X+ FRAME_LABEL, "Reve Help",
X+ FRAME_CMD_PUSHPIN_IN, TRUE,
X+ FRAME_NO_CONFIRM, TRUE,
X+ XV_X, 0,
X+ XV_Y, 0,
X+ XV_WIDTH, 500,
X+ XV_HEIGHT, 700,
X+ XV_SHOW, help_showing,
X+ FRAME_SHOW_RESIZE_CORNER, FALSE,
X+ 0) ;
X+ h_textsw = (Textsw) xv_create(h_frame, TEXTSW,
X+ XV_X, 0,
X+ XV_Y, 0,
X+ XV_WIDTH, 500,
X+ XV_HEIGHT, 700,
X+ TEXTSW_FILE_CONTENTS, helpfile,
X+ TEXTSW_READ_ONLY, TRUE,
X+ TEXTSW_FIRST, 0,
X+ TEXTSW_BROWSING, TRUE,
X+ 0) ;
X+ window_fit(h_textsw) ;
X+ window_fit(h_frame) ;
X+ }
X+
X+
X+ void
X make_icon()
X {
X
X***************
X*** 973,985 ****
X
X
X void
X! open_frame(wtype) /* **DUMMY ROUTINE** */
X! enum win_type wtype ;
X {
X }
X
X
X void
X paint_prop_sheet() /* **DUMMY ROUTINE** */
X {
X }
X--- 1039,1056 ----
X
X
X void
X! paint_help() /* **DUMMY ROUTINE** */
X {
X }
X
X
X void
X+ paint_help_text() /* **DUMMY ROUTINE** */
X+ {
X+ }
X+
X+
X+ void
X paint_prop_sheet() /* **DUMMY ROUTINE** */
X {
X }
X***************
X*** 1160,1165 ****
X--- 1231,1245 ----
X
X /*ARGSUSED*/
X void
X+ set_frame(wtype, showing) /* **DUMMY ROUTINE** */
X+ enum win_type wtype ;
X+ int showing ;
X+ {
X+ }
X+
X+
X+ /*ARGSUSED*/
X+ void
X set_cycle(wtype, mtype, str) /* **DUMMY ROUTINE** */
X enum win_type wtype ;
X enum panel_type mtype ;
X***************
X*** 1326,1331 ****
X--- 1406,1423 ----
X reve_player = player ;
X processing = TRUE ;
X WRITE(pipe_io[0][1], (char *) &in, sizeof(struct reve_in)) ;
X+ }
X+
X+
X+ /*ARGSUSED*/
X+ static void
X+ xv_do_help(item, value, event) /* Callback for online help window. */
X+ Panel_item item ;
X+ int value ;
X+ Event *event ;
X+ {
X+ position_popup(frame, h_frame, P_RIGHT) ;
X+ XV_SET(h_frame, XV_SHOW, TRUE, 0) ;
X }
X
X
X
END_OF_FILE
if test 49681 -ne `wc -c <'patches04b'`; then
echo shar: \"'patches04b'\" unpacked with wrong size!
fi
# end of 'patches04b'
fi
echo shar: End of archive 2 \(of 4\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 4 archives.
rm -f ark[1-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0