hvr@kimba (Heather Rose) (11/21/90)
Submitted-by: Heather Rose <hvr@kimba> Posting-number: Volume 10, Issue 77 Archive-name: spider/patch2 Patch-To: spider: Volume 7, Issue 4-13 *** README Mon Apr 30 20:04:34 1990 --- ../1.1/README Mon Nov 19 21:05:25 1990 *************** *** 4,9 **** --- 4,15 ---- fixed bug, "f" will use the text field then selection for information. added, patch_level variable to version.c file. + Patch level 2: + added advice for choosing a move. + added "squish" feature for packing contiguous cards of same suit. + added looking in common places in XView for help files if not found. + bumped version number to 1.1 from 1.0.1. + Spider is a challenging double decked solitaire game. Unlike most soilitaire games, skill is just as important as luck. *************** *** 42,48 **** Spider has been tested on the following: Hosts: ! Sun 3 & 4 running 4.0.x Solbourne 5 running 4.0x Decstation 3100 Ultrix 3.1 Decstation 3100 running OSF/1 --- 48,54 ---- Spider has been tested on the following: Hosts: ! Sun 3 & 4 running 4.0.x, 4.1.x Solbourne 5 running 4.0x Decstation 3100 Ultrix 3.1 Decstation 3100 running OSF/1 *************** *** 83,89 **** -resource_file. These allow you to have instances of the Spider tool which resources apply to and allow one to use a different resource file than the default. The default resource file for the XView version ! is $HOME/.spiderrc. The spider.info file has more information on resources when you prompt it for spot help. Please send any bugs or comments about the XView front end to: --- 89,95 ---- -resource_file. These allow you to have instances of the Spider tool which resources apply to and allow one to use a different resource file than the default. The default resource file for the XView version ! is $HOME/.Xdefaults. The spider.info file has more information on resources when you prompt it for spot help. Please send any bugs or comments about the XView front end to: *** defs.h Mon Apr 30 18:58:04 1990 --- ../1.1/defs.h Tue Nov 13 18:37:16 1990 *************** *** 184,190 **** #define STACK_WIDTH (CARD_WIDTH + 10) #define STACK_LOC_X(i) ((STACK_INDEX(i) * STACK_WIDTH) + CARD_INSET_X) ! #define STACK_LOC_Y (CARD_HEIGHT + 4 * CARD_INSET_Y) #define PILE_WIDTH STACK_WIDTH #define PILE_INSET_X (STACK_WIDTH + CARD_INSET_X + CARD_WIDTH) --- 184,190 ---- #define STACK_WIDTH (CARD_WIDTH + 10) #define STACK_LOC_X(i) ((STACK_INDEX(i) * STACK_WIDTH) + CARD_INSET_X) ! #define STACK_LOC_Y (CARD_HEIGHT + 3 * CARD_INSET_Y) #define PILE_WIDTH STACK_WIDTH #define PILE_INSET_X (STACK_WIDTH + CARD_INSET_X + CARD_WIDTH) *** events.c Mon Apr 30 19:00:35 1990 --- ../1.1/events.c Mon Jul 23 19:22:41 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)events.c 2.3 90/04/30 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * @(#)events.c 2.5 90/06/18 * */ *************** *** 17,22 **** --- 17,24 ---- #include "defs.h" #include "globals.h" + extern int cheat_count; + static CardPtr current_card = CARDNULL; static CardList current_list = CARDLISTNULL; *************** *** 77,82 **** --- 79,85 ---- button_press((XButtonPressedEvent *)xev); } else if (xev->xany.type == ButtonRelease) { button_release((XButtonReleasedEvent *)xev); + current_list = CARDLISTNULL; } else if (xev->xany.type == KeyPress) { key_press((XKeyPressedEvent *)xev); } else if (xev->xany.type == ConfigureNotify) { *************** *** 178,185 **** return CARDNULL; while (tmp) { if (tmp->next) { ! if ((y <= (tmp->y + list->card_delta)) && ! (y >= tmp->y)) { return (tmp); } } else { --- 181,187 ---- return CARDNULL; while (tmp) { if (tmp->next) { ! if ((y <= tmp->next->y) && (y >= tmp->y)) { return (tmp); } } else { *************** *** 214,221 **** current_list = deck; return; } if (xev->button == Button2) { - current_card = coords_to_card(xev->x, xev->y); if (current_card == CARDNULL) return; /* ignore facedown cards */ --- 216,223 ---- current_list = deck; return; } + current_card = coords_to_card(xev->x, xev->y); if (xev->button == Button2) { if (current_card == CARDNULL) return; /* ignore facedown cards */ *************** *** 293,298 **** --- 295,304 ---- return; } #endif + if (list_hit == current_list) { + best_list_move(list_hit, current_card); + return; + } if ((IS_PILE(list_hit))) { if((current_card->rank == King) && (can_move(current_card)) && *************** *** 315,321 **** current_card = CARDNULL; /* try best move if the mouse wasn't moved */ } else if (list_hit == current_list) { ! best_list_move(list_hit); } else { if (IS_PILE(list_hit)) { tmp = last_card(current_list); --- 321,327 ---- current_card = CARDNULL; /* try best move if the mouse wasn't moved */ } else if (list_hit == current_list) { ! best_list_move(list_hit, CARDNULL); } else { if (IS_PILE(list_hit)) { tmp = last_card(current_list); *************** *** 339,346 **** move_to_list(tmp, list_hit, True); return; } - /* only try to move the first possible move */ - break; } tmp = tmp->next; } --- 345,350 ---- *************** *** 459,467 **** if (deal_number == 0) { show_message("Haven't dealt yet."); } else if (deal_number == 1) { ! show_message("Initial deal."); } else { ! sprintf(buf, "Deal number %d of 5", deal_number - 1); show_message(buf); } break; --- 463,474 ---- if (deal_number == 0) { show_message("Haven't dealt yet."); } else if (deal_number == 1) { ! sprintf(buf, "Initial deal; cheat count: %d", ! cheat_count); ! show_message(buf); } else { ! sprintf(buf, "Deal number %d of 5; cheat count: %d", ! deal_number - 1, cheat_count); show_message(buf); } break; *** gfx.c Mon Apr 30 19:00:48 1990 --- ../1.1/gfx.c Mon Jul 23 19:22:43 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)gfx.c 2.2 90/04/30 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * @(#)gfx.c 2.3 90/05/30 * */ *************** *** 742,747 **** --- 742,748 ---- CARD_WIDTH + 1, h, False); tmp = card; + /* draw outline */ if (tmp == CARDNULL) { #ifdef ROUND_CARDS if (round_cards) *************** *** 757,763 **** show_card(tmp); tmp = tmp->next; } - } /* --- 758,763 ---- *** movelog.c Sat Apr 28 14:53:02 1990 --- ../1.1/movelog.c Sun Nov 18 16:37:56 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)movelog.c 2.1 90/04/25 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * %W% %E% * */ *************** *** 19,24 **** --- 19,27 ---- #include <string.h> #include <sys/file.h> #include <ctype.h> + #ifdef SVR4 + #include <unistd.h> + #endif #define CACHE_SIZE 50 static int move_index = 0; *************** *** 28,33 **** --- 31,38 ---- int deck_cache[NUM_CARDS]; int deck_index = 0; + extern int cheat_count; + make_deck_cache() { CardPtr tmp; *************** *** 102,107 **** --- 107,113 ---- val = move_cache[--move_index]; if (val > 11 * 11 * 14) { show_message("Cheater!"); + cheat_count++; spider_bell(dpy, 0); } unencode(val, &from, &dest, &num_cards, &exposed); *************** *** 108,113 **** --- 114,122 ---- if (from == 0) { /* undo deal */ undo_deal(); + show_message("Cheater!"); + cheat_count++; + spider_bell(dpy, 0); } else { /* * note that cols are from 0-9, but saved as 1-10, *************** *** 585,591 **** } if ((fp = fopen(fname, "w")) == NULL) { ! (void)sprintf(buf, "Can't open output file %s.", fname); show_message(buf); return; } --- 594,600 ---- } if ((fp = fopen(fname, "w")) == NULL) { ! (void)sprintf(buf, "Can't open output file \"%s\".", fname); show_message(buf); return; } *************** *** 655,661 **** /* write human readable version */ write_human(fp); (void)fclose(fp); ! (void)sprintf(buf, "Position saved to file %s.", fname); show_message(buf); } --- 664,670 ---- /* write human readable version */ write_human(fp); (void)fclose(fp); ! (void)sprintf(buf, "Position saved to file \"%s\".", fname); show_message(buf); } *************** *** 706,713 **** char *moves; buf = remove_newlines(buf); ! moves = strchr(buf, '.') + 1; /* find moves, if any */ ! if (!strchr(moves, '.')) moves = NULL; if (restore_game(buf, moves) != 0) { show_message("Bogus data in selection."); --- 715,724 ---- char *moves; buf = remove_newlines(buf); ! moves = strchr(buf, '.'); ! if (moves) ! moves++; ! if (moves && !strchr(moves, '.')) moves = NULL; if (restore_game(buf, moves) != 0) { show_message("Bogus data in selection."); *************** *** 737,743 **** fname = remove_newlines(fname); if ((fp = fopen(fname, "r")) == NULL) { ! (void)sprintf(buf, "Can't open file %s for loading.", fname); show_message(buf); return; } --- 748,755 ---- fname = remove_newlines(fname); if ((fp = fopen(fname, "r")) == NULL) { ! (void)sprintf(buf, "Can't open file \"%s\" for loading.", ! fname); show_message(buf); return; } *************** *** 765,773 **** *++dp = '\0'; if (restore_game(buf, buf2) == 0) { ! (void)sprintf(buf, "Saved game %s loaded.", fname); } else { ! (void)sprintf(buf, "Bogus save file %s.", fname); restart = True; } --- 777,785 ---- *++dp = '\0'; if (restore_game(buf, buf2) == 0) { ! (void)sprintf(buf, "Saved game \"%s\" loaded.", fname); } else { ! (void)sprintf(buf, "Bogus save file \"%s\".", fname); restart = True; } *** spider.c Sat Apr 28 16:46:57 1990 --- ../1.1/spider.c Mon Nov 19 20:07:50 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)spider.c 2.1 90/04/25 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * @(#)spider.c 2.3 90/06/18 * */ *************** *** 21,26 **** --- 21,28 ---- static void fix_coords(); int deltamod = 0; + Bool squish = True; + int cheat_count = 0; /* * build all the cards, stacks, piles and the original deck *************** *** 160,165 **** --- 162,168 ---- deal_number = 0; restart = False; + cheat_count = 0; /* reset move log */ init_cache(); *************** *** 242,253 **** old_delta = stack[i]->card_delta; tmp = deck->cards; remove_card(tmp); add_card(tmp, stack[i]->cards, LOC_END, stack[i]); if (old_delta != stack[i]->card_delta) { - tmp->type = Faceup; show_list(stack[i], stack[i]->cards); } else { ! flip_card(tmp, Faceup); } } --- 245,256 ---- old_delta = stack[i]->card_delta; tmp = deck->cards; remove_card(tmp); + tmp->type = Faceup; add_card(tmp, stack[i]->cards, LOC_END, stack[i]); if (old_delta != stack[i]->card_delta) { show_list(stack[i], stack[i]->cards); } else { ! show_card(tmp); } } *************** *** 343,348 **** --- 346,359 ---- } /* + * see if cards exist, are faceup, and part of the same run + */ + #define in_sequence(a, b) \ + ((a) && (b) && \ + ((a)->type == Faceup) && ((b)->type == Faceup) && \ + ((a)->suit == (b)->suit) && ((a)->rank == (b)->rank + 1)) + + /* * fix up the inter-card spacing for a stack */ static void *************** *** 360,366 **** if (display) show_list(list, list->cards); } ! new->y = new->prev->y + list->card_delta; } else { new->y = list->y; } --- 371,383 ---- if (display) show_list(list, list->cards); } ! /* runs are coallesced */ ! if (squish && in_sequence(new->prev, new) && ! in_sequence(new->prev->prev, new->prev)) { ! new->y = new->prev->y + (list->card_delta >> 2); ! } else { ! new->y = new->prev->y + list->card_delta; ! } } else { new->y = list->y; } *************** *** 367,372 **** --- 384,414 ---- } /* + * fix up the inter-card spacing when resource value "squish" changes. + */ + void + fix_up_card_spacing() + { + int i, maxy; + CardPtr tmp, last; + CardList list; + + for (i = 0; i < NUM_STACKS; i++) { + list = stack[i]; + tmp = list->cards; + last = last_card(list); + maxy = last->y; + while(tmp) { + fix_coords(tmp, list, False); + tmp = tmp->next; + } + if (maxy != last->y) { + show_list(list, list->cards); + } + } + } + + /* * compute the inter-card spacing for a stack */ void *************** *** 708,724 **** * performs the best move for an entire sub-list */ void ! best_list_move(list) CardList list; { CardPtr tmp, tmp2; CardList best = CARDLISTNULL; ! tmp = list->cards; ! if (tmp == CARDNULL) { ! show_message("Empty list"); ! spider_bell(dpy, 0); ! return; } /* --- 750,771 ---- * performs the best move for an entire sub-list */ void ! best_list_move(list, first_card) CardList list; + CardPtr first_card; { CardPtr tmp, tmp2; CardList best = CARDLISTNULL; ! if (first_card != CARDNULL) { ! tmp = first_card; ! } else { ! tmp = list->cards; ! if (tmp == CARDNULL) { ! show_message("Empty list"); ! spider_bell(dpy, 0); ! return; ! } } /* *************** *** 979,986 **** for (tmp = list->cards; tmp; tmp = tmp->next) { if (tmp->type != Faceup) continue; ! if ((!checksuit || tmp->suit == suit) && ! tmp->rank == rank) count++; } return count; --- 1026,1041 ---- for (tmp = list->cards; tmp; tmp = tmp->next) { if (tmp->type != Faceup) continue; ! /* we have a find if we asked for a suit and found it ! * OR if we don't have a suit and are looking for a free ! * card ! */ ! if (tmp->rank == rank && ! ((checksuit && tmp->suit == suit) || ! (!checksuit && ! (!tmp->next || /* end of stack */ ! (tmp->next && /* free */ ! tmp->next->rank != (tmp->rank - 1)))))) count++; } return count; *************** *** 1056,1062 **** } } ! (void)sprintf(buf, "%s ", str); for (i = 0; i < NUM_STACKS; i++) { if (num = col_locate(stack[i], suit, rank, checksuit)) { if (found) { --- 1111,1121 ---- } } ! if (checksuit) ! (void)sprintf(buf, "%s of %s ", ! rank_name(rank), suit_name(suit)); ! else ! (void)sprintf(buf, "Free %s ", rank_name(rank)); for (i = 0; i < NUM_STACKS; i++) { if (num = col_locate(stack[i], suit, rank, checksuit)) { if (found) { *** spider.info Mon Apr 30 20:06:15 1990 --- ../1.1/spider.info Mon Nov 19 20:37:38 1990 *************** *** 81,86 **** --- 81,91 ---- Corresponds to resource "Spider.confirm". + :squish + If True, cards which can be moved as a group will be stacked together to save board space. Instead of seeing K, Q, J, 10 of hearts, one would see K & 10 and just the tops of Q & J. + + Corresponds to resource "Spider.squish". + :deltaMod Specifies the interval at which to recalculate the inter-card spacing. The default is 1, which means the card stacks are resized every time they grow or shrink when they near the bottom of the table. Setting this to a higher value will cut down on the number of redraws by limiting visibility when its unnecessary. *************** *** 92,107 **** Corresponds to resource "Spider.textField". :helpDir ! Specifies where to look for the help files in the "Help" button. If the new location does not have help documents, the "Help" button will be greyed out. Corresponds to resource "Spider.helpDir". :props.apply ! When pressed, "Apply" will apply all changes made to the property sheet to the running spider game as well as the current resource file as specified by the default value or the -resource_file command line option. :props.reset When pressed, "Reset" will reset the changes made to the property sheet to the original values. The values will be from the last "Apply" operation. :props.dismiss ! When pressed, "Dismiss" will dismiss the property sheet window. --- 97,115 ---- Corresponds to resource "Spider.textField". :helpDir ! Specifies where to look for the help files in the "Help" button. If the new location does not have help documents, the "Help" button will be greyed out. If the help files are not found in the specified help directory, at start up time only Spider will also look for help files first in $OPENWINHOME/lib/help/spider and then in $XVIEWHOME/lib/help/spider. Corresponds to resource "Spider.helpDir". :props.apply ! When pressed, "Apply" will apply all changes made to the property sheet to the running spider game only. + :props.apply_save + When pressed, "Apply & Save" will apply all changes made to the property sheet to the running spider game as well as the current resource file. If no resource file is specified by the "-resource_file" command line option, ~/.Xdefaults is used. + :props.reset When pressed, "Reset" will reset the changes made to the property sheet to the original values. The values will be from the last "Apply" operation. :props.dismiss ! When pressed, "Dismiss" will reset and dismiss the property sheet window. *** spider.man Sat Apr 28 16:50:06 1990 --- ../1.1/spider.man Thu Jul 26 11:57:00 1990 *************** *** 1,4 **** ! .\" @(#)spider.man 2.1 90/04/27; Copyright (c) 1990 - David Lemke & Network Computing Devices Inc .TH spider 1 "30 Jan 1990" .SH NAME spider \- play double deck solitaire --- 1,4 ---- ! .\" @(#)spider.man 2.2 90/05/30; Copyright (c) 1990 - David Lemke & Network Computing Devices Inc .TH spider 1 "30 Jan 1990" .SH NAME spider \- play double deck solitaire *************** *** 26,33 **** .I spider when compiled with XView has a property sheet for defining resources. The property sheet is on the "File" menu item. To be sure spot help is ! active, set the environment variable HELPDIR to the directory containing ! the spider.info file. .SH OPTIONS .TP 5 .BI \-save_file " filename" --- 26,34 ---- .I spider when compiled with XView has a property sheet for defining resources. The property sheet is on the "File" menu item. To be sure spot help is ! active, set the environment variable HELPDIR for XView version 1.0.1 or ! HELPPATH for XView version 2.0 or later to the directory containing ! the spider.info file. See spot help on the property sheet for more details. .SH OPTIONS .TP 5 .BI \-save_file " filename" *************** *** 62,67 **** --- 63,73 ---- they grow or shrink when when they near the bottom of the table. Setting this to a higher value will cut down on the number of redraws by limiting visibility when its unnecessary. + .TP 8 + .B "squish" (\fPclass\fB Squish)" + Specifies whether to use a different card layout that saves on + screen space but can also be somewhat confusing. The default + is "off". .TP 8 .B "helpDir (\fPclass\fB HelpDir)" Specifies where to look for the help files. *** version.c Tue May 1 16:09:34 1990 --- ../1.1/version.c Sun Nov 18 16:40:17 1990 *************** *** 16,20 **** * In the case below, add the line Prereq: "1.0.1" to the next patch to be * sure patches are installed in the correct order. */ ! char *version = "1.0.1" ; char *build_date = DATE; --- 16,20 ---- * In the case below, add the line Prereq: "1.0.1" to the next patch to be * sure patches are installed in the correct order. */ ! char *version = "1.1" ; char *build_date = DATE; *** xaw_stubs.c Mon Apr 30 19:01:36 1990 --- ../1.1/xaw_stubs.c Sun Nov 18 16:37:57 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)xaw_stubs.c 2.4 90/04/30 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * %W% %E% * */ *************** *** 156,163 **** XtGetValues(file, args, ONE); switch ((int) call_data) { case 0: ! if (fname) { write_file(fname, write_confirmer); } else { show_message("Bogus filename."); } --- 156,165 ---- XtGetValues(file, args, ONE); switch ((int) call_data) { case 0: ! if (strlen(fname)) { write_file(fname, write_confirmer); + } else if (fname = get_selection()) { + write_file(fname, write_confirmer); } else { show_message("Bogus filename."); } *************** *** 243,248 **** --- 245,251 ---- table_height = ((XConfigureEvent *)xev)->height; table_width = ((XConfigureEvent *)xev)->width; + XClearArea(dpy, table, 0, 0, 0, 0, False); for (i = 0; i < NUM_STACKS; i++) { if (stack[i]) recompute_list_deltas(stack[i]); *** xaw_ui.c Mon Apr 30 19:01:36 1990 --- ../1.1/xaw_ui.c Mon Jul 23 19:22:39 1990 *************** *** 6,12 **** * * See copyright.h for the terms of the copyright. * ! * @(#)xaw_ui.c 2.3 90/04/30 * */ --- 6,12 ---- * * See copyright.h for the terms of the copyright. * ! * @(#)xaw_ui.c 2.5 90/06/18 * */ *************** *** 37,42 **** --- 37,43 ---- #ifdef ROUND_CARDS extern Bool round_cards; #endif + extern Bool squish; extern int deltamod; extern char *helpDir; *************** *** 48,53 **** --- 49,55 ---- #ifdef ROUND_CARDS Bool round_cards; #endif + Bool squish; int replayTime; int deltamod; char *helpDir; *************** *** 66,71 **** --- 68,75 ---- { "roundCards", "RoundCards", XtRBoolean, sizeof(Boolean), offset(round_cards), XtRString, "True" }, #endif + { "squish", "Squish", XtRBoolean, sizeof(Boolean), + offset(squish), XtRString, "False" }, { "deltaMod", "DeltaMod", XtRInt, sizeof(int), offset(deltamod), XtRString, "1" }, { "helpDir", "HelpDir", XtRString, sizeof(char *), *************** *** 216,221 **** --- 220,226 ---- #ifdef ROUND_CARDS round_cards = app_resources.round_cards; #endif + squish = app_resources.squish; deltamod = app_resources.deltamod; helpDir = app_resources.helpDir; *** xv_stubs.c Mon Apr 30 19:50:20 1990 --- ../1.1/xv_stubs.c Sun Nov 18 22:42:25 1990 *************** *** 23,28 **** --- 23,29 ---- char *instanceName; char *resourceFile; char *helpDir; + extern Bool squish; int INSTANCE, HELPKEY; spider_window1_objects *spider_window1; *************** *** 295,300 **** --- 296,304 ---- ip = (spider_window1_objects*)xv_get(item,XV_KEY_DATA,INSTANCE); if (ip->subwindow2 == (spider_subwindow2_objects *)NULL) { ip->subwindow2 = spider_subwindow2_objects_initialize(ip, ip->window1); + xv_set(ip->subwindow2->window3, + FRAME_CMD_PUSHPIN_IN, TRUE, + NULL); } if (!(int)xv_get(ip->subwindow2->window3, XV_SHOW)) { xv_set(ip->subwindow2->window3, *************** *** 411,426 **** Xv_opaque owner; int which; { ! char buf[256]; sprintf(buf,"%s/%s",ip->defaults->helpDir, helpfiles[which]); if (ip->subwindow1 == NULL) { ip->subwindow1 = spider_subwindow1_objects_initialize(ip, ip->window1); } xv_set(ip->subwindow1->window2, ! FRAME_LABEL, buf, NULL); xv_set(ip->subwindow1->textsw1, TEXTSW_READ_ONLY, TRUE, TEXTSW_FILE, buf, --- 415,434 ---- Xv_opaque owner; int which; { ! char buf[512], buf2[640]; sprintf(buf,"%s/%s",ip->defaults->helpDir, helpfiles[which]); + sprintf(buf2,"%s Help: %s",ip->defaults->instanceName, buf); if (ip->subwindow1 == NULL) { ip->subwindow1 = spider_subwindow1_objects_initialize(ip, ip->window1); } xv_set(ip->subwindow1->window2, ! FRAME_LABEL, buf2, NULL); + xv_set(ip->subwindow1->categoryChoice, + PANEL_VALUE, which, + NULL); xv_set(ip->subwindow1->textsw1, TEXTSW_READ_ONLY, TRUE, TEXTSW_FILE, buf, *************** *** 433,439 **** } else { wmgr_top(ip->subwindow1->window2); } ! show_message(buf); } /* --- 441,448 ---- } else { wmgr_top(ip->subwindow1->window2); } ! sprintf(buf2,"Viewing help file %s", buf); ! show_message(buf2); } /* *************** *** 507,514 **** } /* ! * Notify callback function for `button8 (Intro)', `button9 (Rules)', ! * `button10 (Controls)', `button11 (Examples)', `button12 (Extras)'. */ void subhelp_handler(item, event) --- 516,522 ---- } /* ! * Notify callback function for 'categoryChoice' choice items. */ void subhelp_handler(item, event) *************** *** 520,526 **** int which; void do_spider_help(); ! which = (int) xv_get(item, XV_KEY_DATA, HELPKEY); if (which < HELP_MIN || which >= HELP_MAX) { sprintf(buf,"Error in show help, key = %d", which); show_message(buf); --- 528,534 ---- int which; void do_spider_help(); ! which = (int)xv_get(item, PANEL_VALUE); if (which < HELP_MIN || which >= HELP_MAX) { sprintf(buf,"Error in show help, key = %d", which); show_message(buf); *************** *** 531,537 **** } /* ! * Notify callback function for for `button14 (Done)' */ void help_done_handler(item, event) --- 539,545 ---- } /* ! * Notify callback function for for `dismissButton (Dismiss)' */ void help_done_handler(item, event) *************** *** 543,549 **** ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); xv_set(ip->subwindow1->window2, XV_SHOW, FALSE, ! FRAME_CMD_PUSHPIN_IN, FALSE, 0); xv_set(ip->subwindow1->textsw1, TEXTSW_FILE, NULL, --- 551,557 ---- ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); xv_set(ip->subwindow1->window2, XV_SHOW, FALSE, ! FRAME_CMD_PUSHPIN_IN, FALSE, 0); xv_set(ip->subwindow1->textsw1, TEXTSW_FILE, NULL, *************** *** 643,654 **** { spider_window1_objects *ip; char buf[256]; ! int i; char *s; Bool resource_confirmer(); extern Bool usebell, round_cards; extern int deltamod; extern void force_redraw(); ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); --- 651,663 ---- { spider_window1_objects *ip; char buf[256]; ! int i, need_redraw=FALSE; char *s; Bool resource_confirmer(); extern Bool usebell, round_cards; extern int deltamod; extern void force_redraw(); + extern void fix_up_card_spacing(); ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); *************** *** 668,674 **** if ((i = (int)xv_get(ip->subwindow2->choice2, PANEL_VALUE)) != ip->defaults->roundCards) { ip->defaults->roundCards = round_cards = i; ! force_redraw(); sprintf(buf,"%s.%s", ip->defaults->instanceName, "roundCards"); defaults_set_boolean(buf, ip->defaults->roundCards); } --- 677,683 ---- if ((i = (int)xv_get(ip->subwindow2->choice2, PANEL_VALUE)) != ip->defaults->roundCards) { ip->defaults->roundCards = round_cards = i; ! need_redraw = TRUE; sprintf(buf,"%s.%s", ip->defaults->instanceName, "roundCards"); defaults_set_boolean(buf, ip->defaults->roundCards); } *************** *** 679,684 **** --- 688,700 ---- sprintf(buf,"%s.%s", ip->defaults->instanceName, "confirm"); defaults_set_boolean(buf,ip->defaults->confirm); } + if ((i = (int)xv_get(ip->subwindow2->choice4, PANEL_VALUE)) != + ip->defaults->squish) { + ip->defaults->squish = squish = i; + sprintf(buf,"%s.%s", ip->defaults->instanceName, "squish"); + defaults_set_boolean(buf,ip->defaults->squish); + fix_up_card_spacing(); + } if ((i = (int)xv_get(ip->subwindow2->slider1, PANEL_VALUE)) != ip->defaults->deltaMod) { ip->defaults->deltaMod = deltamod = i; *************** *** 708,726 **** xv_set(ip->button6, PANEL_INACTIVE, TRUE, 0); } } ! /* TODO: Use xrm directly since XView defaults currently store ! * the entire contents of xrm to the resource file instead of ! * a select number of things ! */ ! if ((access(resourceFile, R_OK) == -1) || ! resource_confirmer()) { ! defaults_store_db(resourceFile); ! sprintf(buf,"Defaults saved to %s", resourceFile); ! show_message(buf); } else { ! sprintf(buf,"Defaults not saved to %s", resourceFile); ! show_message(buf); } } /* --- 724,762 ---- xv_set(ip->button6, PANEL_INACTIVE, TRUE, 0); } } ! if (need_redraw) force_redraw(); ! ! sprintf(buf,"Defaults saved for running tool"); ! show_message(buf); ! } ! ! /* ! * Notify callback function for `button18 (Apply & Save)'. ! */ ! void ! props_apply_save_handler(item, event) ! Panel_item item; ! Event *event; ! { ! char buf[640]; ! ! props_apply_handler(item, event); ! if (resource_confirmer()) { ! if (access(resourceFile, R_OK) == -1) { ! defaults_store_db(resourceFile); ! sprintf(buf,"Defaults saved to file %s.", resourceFile); ! } else { ! sprintf(buf,"%s. %s %s.", ! "Could not access resource file", ! "Defaults NOT saved to file", ! resourceFile); ! xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL); ! } } else { ! sprintf(buf,"Defaults NOT saved to file %s.", resourceFile); ! xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL); } + show_message(buf); } /* *************** *** 745,750 **** --- 781,792 ---- PANEL_VALUE, ip->defaults->roundCards, 0); #endif + xv_set(ip->subwindow2->choice3, + PANEL_VALUE, ip->defaults->confirm, + 0); + xv_set(ip->subwindow2->choice4, + PANEL_VALUE, ip->defaults->squish, + 0); xv_set(ip->subwindow2->slider1, PANEL_VALUE, ip->defaults->deltaMod, 0); *************** *** 754,763 **** xv_set(ip->subwindow2->textfield2, PANEL_VALUE, ip->defaults->helpDir, 0); } /* ! * Notify callback function for `button17 (Done)'. */ void props_done_handler(item, event) --- 796,806 ---- xv_set(ip->subwindow2->textfield2, PANEL_VALUE, ip->defaults->helpDir, 0); + xv_set(item, PANEL_NOTIFY_STATUS, XV_ERROR, NULL); } /* ! * Notify callback function for `button17 (Dismiss)'. */ void props_done_handler(item, event) *************** *** 767,776 **** spider_window1_objects *ip; Xv_opaque win; ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); (void) xv_set(ip->subwindow2->window3, XV_SHOW, FALSE, ! FRAME_CMD_PUSHPIN_IN, FALSE, 0); } --- 810,821 ---- spider_window1_objects *ip; Xv_opaque win; + props_reset_handler(item, event); + xv_set(item, PANEL_NOTIFY_STATUS, XV_OK, NULL); ip = (spider_window1_objects *) xv_get(item, XV_KEY_DATA, INSTANCE); (void) xv_set(ip->subwindow2->window3, XV_SHOW, FALSE, ! FRAME_CMD_PUSHPIN_IN, FALSE, 0); } *** xv_ui.c Mon Apr 30 19:33:40 1990 --- ../1.1/xv_ui.c Sun Nov 18 21:56:15 1990 *************** *** 24,33 **** --- 24,35 ---- #include <xview/text.h> #include <xview/defaults.h> #include <xview/notice.h> + #include <xview/font.h> #include "xv_ui.h" #include "spider.bm" int defaultHelpDir = FALSE; + extern Bool squish; /* * Create object `BackUpMenu' in the specified instance. *************** *** 362,379 **** return obj; } ! void ! set_help_label(win, name) ! Xv_opaque win; ! char *name; ! { ! char *buf; - buf = malloc(strlen(name) + 8); - sprintf(buf, "%s Help", name); - xv_set(win, XV_LABEL, buf, 0); - } - /* * Initialize an instance of object `subwindow1'. */ --- 364,381 ---- return obj; } ! /* ! * define the help window strings, subwindow1 ! */ ! #define HELP_STR_CATS "Categories:" ! #define HELP_STR_INTRO "Introduction" ! #define HELP_STR_RULES "Rules" ! #define HELP_STR_CNTRLS "Controls" ! #define HELP_STR_EXS "Examples" ! #define HELP_STR_MISC "Extras" ! #define HELP_STR_SUM "Summary" ! #define HELP_STR_DISMISS "Dismiss" /* * Initialize an instance of object `subwindow1'. */ *************** *** 392,429 **** return (spider_subwindow1_objects *) NULL; } obj->window2 = spider_popup_create(ip, owner); - set_help_label(obj->window2, ip->defaults->instanceName); obj->controls2 = xv_get(obj->window2, FRAME_CMD_PANEL); ! obj->button8 = spider_button_create(ip, obj->controls2, ! "Intro", subhelp_handler); ! xv_set(obj->button8, XV_KEY_DATA, HELPKEY, HELP_INTRO, 0); - obj->button9 = spider_button_create(ip, obj->controls2, - "Rules", subhelp_handler); - xv_set(obj->button9, XV_KEY_DATA, HELPKEY, HELP_RULES, - 0); - obj->button10 = spider_button_create(ip, obj->controls2, - "Controls", subhelp_handler); - xv_set(obj->button10, XV_KEY_DATA, HELPKEY, HELP_CNTRLS, - 0); - obj->button11 = spider_button_create(ip, obj->controls2, - "Examples", subhelp_handler); - xv_set(obj->button11, XV_KEY_DATA, HELPKEY, HELP_EXS, - 0); - obj->button12 = spider_button_create(ip, obj->controls2, - "Extras", subhelp_handler); - xv_set(obj->button12, XV_KEY_DATA, HELPKEY, HELP_MISC, - 0); - obj->button13 = spider_button_create(ip, obj->controls2, - "Summary", subhelp_handler); - xv_set(obj->button13, XV_KEY_DATA, HELPKEY, HELP_SUM, - 0); - obj->button14 = spider_button_create(ip, obj->controls2, - "Dismiss", help_done_handler); - xv_set(obj->button14, - XV_X, (int) xv_get(obj->button14, XV_X) + - (int) xv_get(obj->button14, XV_WIDTH), - 0); window_fit_height(obj->controls2); obj->textsw1 = spider_subwindow1_textsw1_create(ip, obj->window2); --- 394,421 ---- return (spider_subwindow1_objects *) NULL; } obj->window2 = spider_popup_create(ip, owner); obj->controls2 = xv_get(obj->window2, FRAME_CMD_PANEL); ! obj->categoryChoice = xv_create(obj->controls2, PANEL_CHOICE, ! XV_KEY_DATA, INSTANCE, ip, ! PANEL_CHOOSE_ONE, TRUE, ! PANEL_LABEL_STRING, HELP_STR_CATS, ! PANEL_CHOICE_STRINGS, ! HELP_STR_INTRO, ! HELP_STR_RULES, ! HELP_STR_CNTRLS, ! HELP_STR_EXS, ! HELP_STR_MISC, ! HELP_STR_SUM, ! NULL, ! PANEL_VALUE, 0, ! PANEL_NOTIFY_PROC, subhelp_handler, ! NULL); ! obj->dismissButton = spider_button_create(ip, obj->controls2, ! HELP_STR_DISMISS, help_done_handler); ! xv_set(obj->dismissButton, ! XV_X, (int)xv_get(obj->dismissButton, XV_X) + ! ((int)xv_get(obj->dismissButton, XV_WIDTH) / 2), 0); window_fit_height(obj->controls2); obj->textsw1 = spider_subwindow1_textsw1_create(ip, obj->window2); *************** *** 484,489 **** --- 476,482 ---- extern char *helpDir; extern char *instanceName; extern char *resourceFile; + extern int squish; if (obj != (spider_defaults_objects *)NULL ){ return obj; *************** *** 508,513 **** --- 501,509 ---- obj->roundCards = round_cards = defaults_get_boolean(buf1, "RoundCards", TRUE); #endif + sprintf(buf1,"%s.%s", obj->instanceName, "squish"); + obj->squish = squish = + defaults_get_boolean(buf1, "Squish", TRUE); sprintf(buf1,"%s.%s", obj->instanceName, "deltaMod"); obj->deltaMod = deltamod = defaults_get_integer(buf1, "DeltaMod", 1); *************** *** 518,529 **** sprintf(buf1,"%s.%s", obj->instanceName, "helpDir"); s = (char *)defaults_get_string(buf1, "HelpDir", (char *)NULL); if (s == (char *)NULL) { ! obj->helpDir = helpDir; ! } else { ! obj->helpDir = malloc(strlen(s) + 1); ! sprintf(obj->helpDir, "%s", s); ! helpDir = obj->helpDir; } return(obj); } --- 514,542 ---- sprintf(buf1,"%s.%s", obj->instanceName, "helpDir"); s = (char *)defaults_get_string(buf1, "HelpDir", (char *)NULL); if (s == (char *)NULL) { ! s = helpDir; } + /* + * Do some checking around for help files if not already found + */ + if (!helpfiles_exist(s)) { + char *helphome; + extern char *getenv(); + + if (((helphome = getenv("OPENWINHOME")) || + (helphome = getenv("XVIEWHOME"))) && + (helphome != (char *)NULL)) { + sprintf(buf1,"%s/lib/help/spider",helphome); + if (helpfiles_exist(buf1)) { + s = buf1; + } + } + } + obj->helpDir = malloc(strlen(s) + 1); + sprintf(obj->helpDir, "%s", s); + free(helpDir); + helpDir = obj->helpDir; + return(obj); } *************** *** 540,545 **** --- 553,574 ---- } /* + * strings used in the properties panel, subwindow2. + */ + #define PROPS_BELL "Use audible bell to notify:" + #define PROPS_REPLAY "Replay Time (in microseconds):" + #define PROPS_ROUND "Use rounded edges on cards:" + #define PROPS_NOTICE "Use notice to verify deletion of data:" + #define PROPS_STACK "Stack contiguous cards of the same suit:" + #define PROPS_DELTA "Spacing of cards relative to board size:" + #define PROPS_VISIBLE "Characters visible in text fields:" + #define PROPS_HELPDIR "Help Directory:" + #define PROPS_APPLY "Apply" + #define PROPS_SAVE "Apply & Save" + #define PROPS_RESET "Reset" + #define PROPS_DISMISS "Dismiss" + + /* * Initialize an instance of object `subwindow2'. */ spider_subwindow2_objects * *************** *** 550,558 **** char *buf; spider_subwindow2_objects *obj = ip->subwindow2; ! int row=1, width, bwidth; extern void props_done_handler(), props_apply_handler(), ! props_reset_handler(); if (obj != (spider_subwindow2_objects *)NULL ){ return obj; --- 579,588 ---- char *buf; spider_subwindow2_objects *obj = ip->subwindow2; ! int row=1, width, bwidth, space, basex, mplw, w[10], i; ! Panel_item pitem; extern void props_done_handler(), props_apply_handler(), ! props_apply_save_handler(), props_reset_handler(); if (obj != (spider_subwindow2_objects *)NULL ){ return obj; *************** *** 565,571 **** obj->controls3 = xv_get(obj->window3, FRAME_CMD_PANEL); xv_set(obj->controls3, XV_HELP_DATA, "spider:props.panel", 0); obj->choice1 = spider_boolean_choice_create(ip, obj->controls3, ! "Use audible bell to notify:"); xv_set(obj->choice1, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 595,601 ---- obj->controls3 = xv_get(obj->window3, FRAME_CMD_PANEL); xv_set(obj->controls3, XV_HELP_DATA, "spider:props.panel", 0); obj->choice1 = spider_boolean_choice_create(ip, obj->controls3, ! PROPS_BELL); xv_set(obj->choice1, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 574,583 **** 0); obj->numtext1 = spider_subwindow2_numtext1_create(ip, obj->controls3, row++); ! xv_set(obj->numtext1, XV_HELP_DATA, "spider:replayTime", 0); #ifdef ROUND_CARDS obj->choice2 = spider_boolean_choice_create(ip, obj->controls3, ! "Use round cards:"); xv_set(obj->choice2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 604,615 ---- 0); obj->numtext1 = spider_subwindow2_numtext1_create(ip, obj->controls3, row++); ! xv_set(obj->numtext1, ! XV_HELP_DATA, "spider:replayTime", ! 0); #ifdef ROUND_CARDS obj->choice2 = spider_boolean_choice_create(ip, obj->controls3, ! PROPS_ROUND); xv_set(obj->choice2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 586,592 **** 0); #endif obj->choice3 = spider_boolean_choice_create(ip, obj->controls3, ! "Use notice to verify deletion of data:"); xv_set(obj->choice3, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 618,624 ---- 0); #endif obj->choice3 = spider_boolean_choice_create(ip, obj->controls3, ! PROPS_NOTICE); xv_set(obj->choice3, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 593,600 **** PANEL_VALUE, ip->defaults->confirm, XV_HELP_DATA, "spider:confirm", 0); obj->slider1 = spider_slider_create(ip, obj->controls3, ! "Delta Modification:", 0, 30, 15); xv_set(obj->slider1, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 625,640 ---- PANEL_VALUE, ip->defaults->confirm, XV_HELP_DATA, "spider:confirm", 0); + obj->choice4 = spider_boolean_choice_create(ip, obj->controls3, + PROPS_STACK); + xv_set(obj->choice4, + XV_X, xv_cols(obj->controls3, 1), + XV_Y, xv_rows(obj->controls3, row++), + PANEL_VALUE, ip->defaults->squish, + XV_HELP_DATA, "spider:squish", + 0); obj->slider1 = spider_slider_create(ip, obj->controls3, ! PROPS_DELTA, 0, 30, 15); xv_set(obj->slider1, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 602,608 **** XV_HELP_DATA, "spider:deltaMod", 0); obj->slider2 = spider_slider_create(ip, obj->controls3, ! "Characters visible in text fields:", 8, 45, 20); xv_set(obj->slider2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 642,648 ---- XV_HELP_DATA, "spider:deltaMod", 0); obj->slider2 = spider_slider_create(ip, obj->controls3, ! PROPS_VISIBLE, 8, 45, 20); xv_set(obj->slider2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 610,616 **** XV_HELP_DATA, "spider:textField", 0); obj->textfield2 = spider_textfield_create(ip, obj->controls3, ! "Help Directory:"); xv_set(obj->textfield2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), --- 650,656 ---- XV_HELP_DATA, "spider:textField", 0); obj->textfield2 = spider_textfield_create(ip, obj->controls3, ! PROPS_HELPDIR); xv_set(obj->textfield2, XV_X, xv_cols(obj->controls3, 1), XV_Y, xv_rows(obj->controls3, row++), *************** *** 617,646 **** PANEL_VALUE, ip->defaults->helpDir, XV_HELP_DATA, "spider:helpDir", 0); window_fit_width(obj->controls3); width = xv_get(obj->controls3, XV_WIDTH); obj->button15 = spider_button_create(ip, obj->controls3, ! "Apply", props_apply_handler); obj->button16 = spider_button_create(ip, obj->controls3, ! "Reset", props_reset_handler); obj->button17 = spider_button_create(ip, obj->controls3, ! "Dismiss", props_done_handler); bwidth = ((int)xv_get(obj->button15, XV_WIDTH) + (int)xv_get(obj->button16, XV_WIDTH) + ! (int)xv_get(obj->button17, XV_WIDTH))/3; xv_set(obj->button15, XV_Y, xv_rows(obj->controls3, ++row), ! XV_X, (width - 5*bwidth) / 2, XV_HELP_DATA, "spider:props.apply", 0); xv_set(obj->button16, XV_Y, xv_rows(obj->controls3, row), ! XV_X, (width - 5*bwidth) / 2 + 2*bwidth, XV_HELP_DATA, "spider:props.reset", 0); xv_set(obj->button17, XV_Y, xv_rows(obj->controls3, row), ! XV_X, (width - 5*bwidth) / 2 + 4*bwidth, XV_HELP_DATA, "spider:props.dismiss", 0); window_fit_height(obj->controls3); --- 657,717 ---- PANEL_VALUE, ip->defaults->helpDir, XV_HELP_DATA, "spider:helpDir", 0); + /* + * right justify the panel labels along the ":" + */ + mplw = 0; i = 0; + PANEL_EACH_ITEM(obj->controls3, pitem) + mplw = ( mplw > (w[i]=(int)xv_get(pitem, PANEL_LABEL_WIDTH))) ? + mplw : w[i]; + i++; + PANEL_END_EACH + mplw = mplw + xv_cols(obj->controls3, 1); + i = 0; + PANEL_EACH_ITEM(obj->controls3, pitem) + xv_set(pitem, PANEL_LABEL_X, mplw - w[i], NULL); + i++; + PANEL_END_EACH + /* + * fit the panel to width of items and then create bottom buttons + */ window_fit_width(obj->controls3); width = xv_get(obj->controls3, XV_WIDTH); obj->button15 = spider_button_create(ip, obj->controls3, ! PROPS_APPLY, props_apply_handler); ! obj->button18 = spider_button_create(ip, obj->controls3, ! PROPS_SAVE, props_apply_save_handler); obj->button16 = spider_button_create(ip, obj->controls3, ! PROPS_RESET, props_reset_handler); obj->button17 = spider_button_create(ip, obj->controls3, ! PROPS_DISMISS, props_done_handler); bwidth = ((int)xv_get(obj->button15, XV_WIDTH) + + (int)xv_get(obj->button18, XV_WIDTH) + (int)xv_get(obj->button16, XV_WIDTH) + ! (int)xv_get(obj->button17, XV_WIDTH))/4; ! space = 2*(int)xv_get(xv_get(obj->controls3,WIN_FONT),FONT_CHAR_WIDTH); ! basex = (width - (4*bwidth + 3*space)) / 2; xv_set(obj->button15, XV_Y, xv_rows(obj->controls3, ++row), ! XV_X, basex, XV_HELP_DATA, "spider:props.apply", 0); + basex = basex + (int)xv_get(obj->button15, XV_WIDTH) + space; + xv_set(obj->button18, + XV_Y, xv_rows(obj->controls3, row), + XV_X, basex, + XV_HELP_DATA, "spider:props.apply_save", + 0); + basex = basex + (int)xv_get(obj->button18, XV_WIDTH) + space; xv_set(obj->button16, XV_Y, xv_rows(obj->controls3, row), ! XV_X, basex, XV_HELP_DATA, "spider:props.reset", 0); + basex = basex + (int)xv_get(obj->button16, XV_WIDTH) + space; xv_set(obj->button17, XV_Y, xv_rows(obj->controls3, row), ! XV_X, basex, XV_HELP_DATA, "spider:props.dismiss", 0); window_fit_height(obj->controls3); *************** *** 685,691 **** XV_X, xv_cols(owner, 1), XV_Y, xv_rows(owner, row), PANEL_LAYOUT, PANEL_HORIZONTAL, ! PANEL_LABEL_STRING, "Replay Time (in microseconds):", PANEL_MIN_VALUE, 20, PANEL_MAX_VALUE, 20000, PANEL_VALUE_DISPLAY_LENGTH, 6, --- 756,762 ---- XV_X, xv_cols(owner, 1), XV_Y, xv_rows(owner, row), PANEL_LAYOUT, PANEL_HORIZONTAL, ! PANEL_LABEL_STRING, PROPS_REPLAY, PANEL_MIN_VALUE, 20, PANEL_MAX_VALUE, 20000, PANEL_VALUE_DISPLAY_LENGTH, 6, *** xv_ui.h Sat Apr 28 14:52:57 1990 --- ../1.1/xv_ui.h Sun Nov 18 19:31:44 1990 *************** *** 25,31 **** #define HELP_MAX 6 #ifndef SPIDER_DEFAULTS ! #define SPIDER_DEFAULTS ".spiderrc" #endif #ifndef HELPDIR --- 25,31 ---- #define HELP_MAX 6 #ifndef SPIDER_DEFAULTS ! #define SPIDER_DEFAULTS ".Xdefaults" #endif #ifndef HELPDIR *************** *** 39,51 **** typedef struct { Xv_opaque window2; Xv_opaque controls2; ! Xv_opaque button8; ! Xv_opaque button9; ! Xv_opaque button10; ! Xv_opaque button11; ! Xv_opaque button12; ! Xv_opaque button13; ! Xv_opaque button14; Xv_opaque textsw1; } spider_subwindow1_objects; --- 39,46 ---- typedef struct { Xv_opaque window2; Xv_opaque controls2; ! Xv_opaque categoryChoice; ! Xv_opaque dismissButton; Xv_opaque textsw1; } spider_subwindow1_objects; *************** *** 62,70 **** --- 57,67 ---- Xv_opaque slider2; Xv_opaque textfield2; Xv_opaque textfield3; + Xv_opaque choice4; Xv_opaque button15; Xv_opaque button16; Xv_opaque button17; + Xv_opaque button18; } spider_subwindow2_objects; typedef struct { *************** *** 78,83 **** --- 75,81 ---- int textField; char *helpDir; char *instanceName; + Bool squish; } spider_defaults_objects; typedef struct { dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only. -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.