mikew@wyse.wyse.com (Mike Wexler) (09/08/88)
Submitted-by: dana@thumper.bellcore.com(Dana Chee) Posting-number: Volume 1, Issue 19 Archive-name: xmille/part02 #! /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 3)." # Contents: comp.c curses_ui.c drawcard.c fill # Wrapped by mikew@x2 on Wed Sep 7 10:48:23 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f comp.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"comp.c\" else echo shar: Extracting \"comp.c\" \(9582 characters\) sed "s/^X//" >comp.c <<'END_OF_comp.c' X# include "mille.h" X X/* X * @(#)comp.c 1.1 (Berkeley) 4/1/82 X */ X X# define V_VALUABLE 40 X Xcalcmove() { X X reg CARD card; X reg int *value; X reg PLAY *pp, *op; X reg bool foundend, cango, canstop, foundlow; X reg unsgn int i, count200, badcount, nummin, nummax, diff; X reg int curmin, curmax; X reg CARD safe, oppos; X int valbuf[HAND_SZ], count[NUM_CARDS]; X bool playit[HAND_SZ]; X X Message (""); X pp = &Player[COMP]; X op = &Player[PLAYER]; X safe = 0; X cango = 0; X canstop = FALSE; X foundend = FALSE; X for (i = 0; i < NUM_CARDS; i++) X count[i] = 0; X for (i = 0; i < HAND_SZ; i++) { X card = pp->hand[i]; X switch (card) { X case C_STOP: case C_CRASH: X case C_FLAT: case C_EMPTY: X if (playit[i] = canplay(pp, op, card)) X canstop = TRUE; X goto norm; X case C_LIMIT: X if ((playit[i] = canplay(pp, op, card)) X && Numseen[C_25] == Numcards[C_25] X && Numseen[C_50] == Numcards[C_50]) X canstop = TRUE; X goto norm; X case C_25: case C_50: case C_75: X case C_100: case C_200: X if ((playit[i] = canplay(pp, op, card)) X && pp->mileage + Value[card] == End) X foundend = TRUE; X goto norm; X default: X playit[i] = canplay(pp, op, card); Xnorm: X if (playit[i]) X ++cango; X break; X case C_GAS_SAFE: case C_DRIVE_SAFE: X case C_SPARE_SAFE: case C_RIGHT_WAY: X if (pp->battle == opposite(card) X || (pp->speed == C_LIMIT && card == C_RIGHT_WAY)) { X Movetype = M_PLAY; X Card_no = i; X return; X } X ++safe; X playit[i] = TRUE; X break; X } X ++count[card]; X } X if (pp->hand[0] == C_INIT && Topcard > Deck) { X Movetype = M_DRAW; X return; X } X if (Debug) X fprintf(outf, "CALCMOVE: cango = %d, canstop = %d, safe = %d\n", cango, canstop, safe); X if (foundend) X foundend = !check_ext(TRUE); X for (i = 0; safe && i < HAND_SZ; i++) { X if (issafety(pp->hand[i])) { X if (onecard(op) || (foundend && cango && !canstop)) { X if (Debug) X fprintf(outf, "CALCMOVE: onecard(op) = %d, foundend = %d\n", onecard(op), foundend); Xplaysafe: X Movetype = M_PLAY; X Card_no = i; X return; X } X oppos = opposite(pp->hand[i]); X if (Numseen[oppos] == Numcards[oppos]) X goto playsafe; X else if (!cango X && (op->can_go || !pp->can_go || Topcard < Deck)) { X card = (Topcard - Deck) - roll(1, 10); X if ((!pp->mileage) != (!op->mileage)) X card -= 7; X if (Debug) X fprintf(outf, "CALCMOVE: card = %d, DECK_SZ / 4 = %d\n", card, DECK_SZ / 4); X if (card < DECK_SZ / 4) X goto playsafe; X } X safe--; X playit[i] = cango; X } X } X if (!pp->can_go && !isrepair(pp->battle)) X Numneed[opposite(pp->battle)]++; Xredoit: X foundlow = (cango || count[C_END_LIMIT] != 0 X || Numseen[C_LIMIT] == Numcards[C_LIMIT] X || pp->safety[S_RIGHT_WAY] != S_UNKNOWN); X foundend = FALSE; X count200 = pp->nummiles[C_200]; X badcount = 0; X curmax = -1; X curmin = 101; X nummin = -1; X nummax = -1; X value = valbuf; X for (i = 0; i < HAND_SZ; i++) { X card = pp->hand[i]; X if (issafety(card) || playit[i] == (cango != 0)) { X if (Debug) X fprintf(outf, "CALCMOVE: switch(\"%s\")\n", C_name[card]); X switch (card) { X case C_25: case C_50: X diff = End - pp->mileage; X /* avoid getting too close */ X if (Topcard > Deck && cango && diff <= 100 X && diff / Value[card] > count[card] X && (card == C_25 || diff % 50 == 0)) { X if (card == C_50 && diff - 50 == 25 X && count[C_25] > 0) X goto okay; X *value = 0; X if (--cango <= 0) X goto redoit; X break; X } Xokay: X *value = (Value[card] >> 3); X if (pp->speed == C_LIMIT) X ++*value; X else X --*value; X if (!foundlow X && (card == C_50 || count[C_50] == 0)) { X *value = (pp->mileage ? 10 : 20); X foundlow = TRUE; X } X goto miles; X case C_200: X if (++count200 > 2) { X *value = 0; X break; X } X case C_75: case C_100: X *value = (Value[card] >> 3); X if (pp->speed == C_LIMIT) X --*value; X else X ++*value; Xmiles: X if (pp->mileage + Value[card] > End) X *value = (End == 700 ? card : 0); X else if (pp->mileage + Value[card] == End) { X *value = (foundend ? card : V_VALUABLE); X foundend = TRUE; X } X break; X case C_END_LIMIT: X if (pp->safety[S_RIGHT_WAY] != S_UNKNOWN) X *value = (pp->safety[S_RIGHT_WAY] == S_PLAYED ? -1 : 1); X else if (pp->speed == C_LIMIT && End - pp->mileage <= 50) X *value = 1; X else if (pp->speed == C_LIMIT X || Numseen[C_LIMIT] != Numcards[C_LIMIT]) { X safe = S_RIGHT_WAY; X oppos = C_LIMIT; X goto repair; X } X else { X *value = 0; X --count[C_END_LIMIT]; X } X break; X case C_REPAIRS: case C_SPARE: case C_GAS: X safe = safety(card) - S_CONV; X oppos = opposite(card); X if (pp->safety[safe] != S_UNKNOWN) X *value = (pp->safety[safe] == S_PLAYED ? -1 : 1); X else if (pp->battle != oppos X && (Numseen[oppos] == Numcards[oppos] || Numseen[oppos] + count[card] > Numcards[oppos])) { X *value = 0; X --count[card]; X } X else { Xrepair: X *value = Numcards[oppos] * 6; X *value += (Numseen[card] - Numseen[oppos]); X if (!cango) X *value /= (count[card]*count[card]); X count[card]--; X } X break; X case C_GO: X if (pp->safety[S_RIGHT_WAY] != S_UNKNOWN) X *value = (pp->safety[S_RIGHT_WAY] == S_PLAYED ? -1 : 2); X else if (pp->can_go X && Numgos + count[C_GO] == Numneed[C_GO]) { X *value = 0; X --count[C_GO]; X } X else { X *value = Numneed[C_GO] * 3; X *value += (Numseen[C_GO] - Numgos); X *value /= (count[C_GO] * count[C_GO]); X count[C_GO]--; X } X break; X case C_LIMIT: X if (op->mileage + 50 >= End) { X *value = (End == 700 && !cango); X break; X } X if (canstop || (cango && !op->can_go)) X *value = 1; X else { X *value = (pp->safety[S_RIGHT_WAY] != S_UNKNOWN ? 2 : 3); X safe = S_RIGHT_WAY; X oppos = C_END_LIMIT; X goto normbad; X } X break; X case C_CRASH: case C_EMPTY: case C_FLAT: X safe = safety(card) - S_CONV; X oppos = opposite(card); X *value = (pp->safety[safe]!=S_UNKNOWN ? 3 : 4); Xnormbad: X if (op->safety[safe] == S_PLAYED) X *value = -1; X else { X *value *= (Numneed[oppos] + Numseen[oppos] + 2); X if (!pp->mileage || foundend || onecard(op)) X *value += 5; X if (op->mileage == 0 || onecard(op)) X *value += 5; X if (op->speed == C_LIMIT) X *value -= 3; X if (cango && pp->safety[safe] != S_UNKNOWN) X *value += 3; X if (!cango) X *value /= ++badcount; X } X break; X case C_STOP: X if (op->safety[S_RIGHT_WAY] == S_PLAYED) X *value = -1; X else { X *value = (pp->safety[S_RIGHT_WAY] != S_UNKNOWN ? 3 : 4); X *value *= (Numcards[C_STOP] + Numseen[C_GO]); X if (!pp->mileage || foundend || onecard(op)) X *value += 5; X if (!cango) X *value /= ++badcount; X if (op->mileage == 0) X *value += 5; X if ((card == C_LIMIT X && op->speed == C_LIMIT) || (!op->can_go)) X *value -= 5; X if (cango && pp->safety[S_RIGHT_WAY] != S_UNKNOWN) X *value += 5; X } X break; X case C_GAS_SAFE: case C_DRIVE_SAFE: X case C_SPARE_SAFE: case C_RIGHT_WAY: X *value = cango ? 0 : 101; X break; X case C_INIT: X *value = 0; X } X } X else X *value = cango ? 0 : 101; X if (card != C_INIT) { X if (*value >= curmax) { X nummax = i; X curmax = *value; X } X if (*value <= curmin) { X nummin = i; X curmin = *value; X } X } X if (Debug) X debug(i, "%3d %-14s",*value,C_name[pp->hand[i]]); X value++; X } X if (!pp->can_go && !isrepair(pp->battle)) X Numneed[opposite(pp->battle)]++; X if (cango) { X ComputerStatus ("PLAY\n"); X if (Debug) X getmove(); X if (!Debug || Movetype == M_DRAW) { X Movetype = M_PLAY; X Card_no = nummax; X } X } X else { X ComputerStatus ("DISCARD\n"); X if (Debug) X getmove(); X if (!Debug || Movetype == M_DRAW) { X Movetype = M_DISCARD; X Card_no = nummin; X } X } X ComputerCard (pp->hand[Card_no]); X} X Xonecard(pp) Xreg PLAY *pp; { X X reg CARD bat, spd, card; X X bat = pp->battle; X spd = pp->speed; X card = -1; X if (pp->can_go || ((isrepair(bat) || bat == C_STOP X || spd == C_LIMIT) && Numseen[S_RIGHT_WAY] != 0) X || Numseen[safety(bat)] != 0) X switch (End - pp->mileage) { X case 200: X if (pp->nummiles[C_200] == 2) X return FALSE; X card = C_200; X case 100: X case 75: X if (card == -1) X card = (End - pp->mileage == 75 ? C_75 : C_100); X if (spd == C_LIMIT) X return Numseen[S_RIGHT_WAY] == 0; X case 50: X case 25: X if (card == -1) X card = (End - pp->mileage == 25 ? C_25 : C_50); X return Numseen[card] != Numcards[card]; X } X return FALSE; X} X Xcanplay(pp, op, card) Xreg PLAY *pp, *op; Xreg CARD card; { X X switch (card) { X case C_200: X if (pp->nummiles[C_200] == 2) X break; X case C_75: case C_100: X if (pp->speed == C_LIMIT) X break; X case C_50: X if (pp->mileage + Value[card] > End) X break; X case C_25: X if (pp->can_go) X return TRUE; X break; X case C_EMPTY: case C_FLAT: case C_CRASH: X case C_STOP: X if (op->can_go && op->safety[safety(card) - S_CONV] != S_PLAYED) X return TRUE; X break; X case C_LIMIT: X if (op->speed != C_LIMIT && op->safety[S_RIGHT_WAY] != S_PLAYED X && op->mileage + 50 < End) X return TRUE; X break; X case C_GAS: case C_SPARE: case C_REPAIRS: X if (pp->battle == opposite(card)) X return TRUE; X break; X case C_GO: X if (!pp->can_go X && (isrepair(pp->battle) || pp->battle == C_STOP)) X return TRUE; X break; X case C_END_LIMIT: X if (pp->speed == C_LIMIT) X return TRUE; X } X return FALSE; X} END_OF_comp.c if test 9582 -ne `wc -c <comp.c`; then echo shar: \"comp.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f curses_ui.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"curses_ui.c\" else echo shar: Extracting \"curses_ui.c\" \(10994 characters\) sed "s/^X//" >curses_ui.c <<'END_OF_curses_ui.c' X/* X * ui.c X * X * curses interface routines for mille X */ X X# include "mille.h" X#undef TRUE X#undef FALSE X# include "ui.h" X#ifdef CTRL X# undef CTRL X#endif X#define CTRL(x) (x - 'A' + 1) X XWINDOW *Board, *Miles, *Score; X Xchar *C_fmt = "%-18.18s"; /* format for printing cards */ Xchar Initstr[100]; /* initial string for error field */ Xchar *_cn[NUM_CARDS] = { /* Card name buffer */ X "", X "25", X "50", X "75", X "100", X "200", X "Out of Gas", X "Flat Tire", X "Accident", X "Stop", X "Speed Limit", X "Gasoline", X "Spare Tire", X "Repairs", X "Go", X "End of Limit", X "Extra Tank", X "Puncture Proof", X "Driving Ace", X "Right of Way" X }, X **C_name = &_cn[1]; /* Card names */ X XMessage (string) Xchar *string; X{ X wmove (Score, ERR_Y, ERR_X); X waddstr (Score, string); X wclrtoeol (Score); X} X Xdebug (pos, string, a0, a1, a2) X{ X mvprintw (pos+6, 2, string, a0, a1, a2); X} X XComputerStatus (string) X{ X mvaddstr (MOVE_Y + 1, MOVE_X, string); X} X XComputerCard (type) Xint type; X{ X mvprintw (MOVE_Y + 2, MOVE_X, "%16s", C_name[type]); X} X X XPrompt (string) Xchar *string; X{ X mvaddstr (MOVE_Y, MOVE_X, string); X clrtoeol (); X refresh (); X} X Xchar * XGetpromptedInput (string) Xchar *string; X{ X static char buf[1024]; X char *sp; X X sp = buf; X Prompt (string); X leaveok (Board, FALSE); X while ((*sp = readch()) != '\n') { X if (*sp == _tty.sg_kill) { X sp = buf; X break; X } X else if (*sp == _tty.sg_erase) { X if (--sp < buf) X sp = buf; X else { X addch('\b'); X /* X * if the previous char was a control X * char, cover up two characters. X */ X if (*sp < ' ') X addch('\b'); X clrtoeol(); X } X } X else X addstr(unctrl(*sp++)); X refresh(); X } X *sp = '\0'; X leaveok (Board, TRUE); X return buf; X} X Xnewboard() X{ X werase(Board); X werase(Score); X mvaddstr(5, 0, "--HAND--"); X mvaddch(6, 0, 'P'); X mvaddch(7, 0, '1'); X mvaddch(8, 0, '2'); X mvaddch(9, 0, '3'); X mvaddch(10, 0, '4'); X mvaddch(11, 0, '5'); X mvaddch(12, 0, '6'); X mvaddstr(13, 0, "--BATTLE--"); X mvaddstr(15, 0, "--SPEED--"); X mvaddstr(5, 20, "--DECK--"); X mvaddstr(7, 20, "--DISCARD--"); X mvaddstr(13, 20, "--BATTLE--"); X mvaddstr(15, 20, "--SPEED--"); X wmove(Miles, 0, 0); X if (winch(Miles) != '-') { X werase(Miles); X mvwaddstr(Miles, 0, 0, "--MILEAGE--"); X mvwaddstr(Miles, 0, 41, "--MILEAGE--"); X } X else { X wmove(Miles, 1, 0); X wclrtobot(Miles); X } X newscore(); X stdscr = Board; X} X Xnewscore() { X X reg int i; X X stdscr = Score; X move(0, 22); X if (inch() != 'Y') { X erase(); X mvaddstr(0, 22, "You Comp Value"); X mvaddstr(1, 2, "Milestones Played"); X mvaddstr(2, 8, "Each Safety"); X mvaddstr(3, 5, "All 4 Safeties"); X mvaddstr(4, 3, "Each Coup Fourre"); X mvaddstr(2, 37, "100"); X mvaddstr(3, 37, "300"); X mvaddstr(4, 37, "300"); X } X else { X move(5, 1); X clrtobot(); X } X for (i = 0; i < SCORE_Y; i++) X mvaddch(i, 0, '|'); X move(SCORE_Y - 1, 1); X while (addch('_') != ERR) X continue; X if (WIndow == W_FULL || Finished) { X mvaddstr(5, 5, "Trip Completed"); X mvaddstr(6, 10, "Safe Trip"); X mvaddstr(7, 5, "Delayed Action"); X mvaddstr(8, 10, "Extension"); X mvaddstr(9, 11, "Shut-Out"); X mvaddstr(10, 21, "---- ---- -----"); X mvaddstr(11, 9, "Hand Total"); X mvaddstr(12, 20, "----- -----"); X mvaddstr(13, 6, "Overall Total"); X mvaddstr(14, 15, "Games"); X mvaddstr(5, 37, "400"); X mvaddstr(6, 37, "300"); X mvaddstr(7, 37, "300"); X mvaddstr(8, 37, "200"); X mvaddstr(9, 37, "500"); X } X else { X mvaddstr(5, 21, "---- ---- -----"); X mvaddstr(6, 9, "Hand Total"); X mvaddstr(7, 20, "----- -----"); X mvaddstr(8, 6, "Overall Total"); X mvaddstr(9, 15, "Games"); X mvaddstr(11, 2, "p: pick"); X mvaddstr(12, 2, "u: use #"); X mvaddstr(13, 2, "d: discard #"); X mvaddstr(14, 2, "w: toggle window"); X mvaddstr(11, 21, "q: quit"); X mvaddstr(12, 21, "o: order hand"); X mvaddstr(13, 21, "s: save"); X mvaddstr(14, 21, "r: reprint"); X } X stdscr = Board; X} X Xinit_ui () X{ X initscr(); X# ifdef attron X# define CA cursor_address X# endif X if (!CA) { X printf("Sorry. Need cursor addressing to play mille\n"); X exit(-1); X } X delwin(stdscr); X stdscr = Board = newwin(BOARD_Y, BOARD_X, 0, 0); X Score = newwin(SCORE_Y, SCORE_X, 0, 40); X Miles = newwin(MILES_Y, MILES_X, 17, 0); X#ifdef attron X idlok(Board, TRUE); X idlok(Score, TRUE); X idlok(Miles, TRUE); X#endif X leaveok(Score, TRUE); X leaveok(Miles, TRUE); X clearok(curscr, TRUE); X crmode(); X noecho(); X} X XError (string, arg) Xchar *string; X{ X stdscr = Score; X mvprintw (Score, ERR_Y, ERR_X, string, arg); X clrtoeol (); X stdscr = Board; X} X Xfinish_ui () X{ X mvcur(0, COLS - 1, LINES - 1, 0); X endwin(); X} X Xupdate_ui () X{ X refresh (); X} X XBeep () X{ X putchar ('\007'); X} X XCARD Xgetcard() X{ X reg char c, c1; X X for (;;) { X while ((c = readch()) == '\n' || c == '\r' || c == ' ') X continue; X if (islower(c)) X c = toupper(c); X if (c == _tty.sg_kill || c == _tty.sg_erase) X return -1; X addstr(unctrl(c)); X clrtoeol(); X switch (c) { X case '1': case '2': case '3': X case '4': case '5': case '6': X c -= '0'; X break; X case '0': case 'P': case 'p': X c = 0; X break; X default: X putchar(''); X addch('\b'); X if (!isprint(c)) X addch('\b'); X c = -1; X break; X } X refresh(); X if (c >= 0) { X while ((c1=readch()) != '\r' && c1 != '\n' && c1 != ' ') X if (c1 == _tty.sg_kill) X return -1; X else if (c1 == _tty.sg_erase) { X addch('\b'); X clrtoeol(); X refresh(); X goto cont; X } X else X write(0, "", 1); X return c; X } Xcont: ; X } X} X X X/* X * Get a yes or no answer to the given question. Saves are X * also allowed. Return TRUE if the answer was yes, FALSE if no. X */ Xgetyn(prompt) Xreg char *prompt; { X X reg char c; X X Saved = FALSE; X for (;;) { X leaveok(Board, FALSE); X mvaddstr(MOVE_Y, MOVE_X, prompt); X clrtoeol(); X refresh(); X switch (c = readch()) { X case 'n': case 'N': X addch('N'); X refresh(); X leaveok(Board, TRUE); X return FALSE; X case 'y': case 'Y': X addch('Y'); X refresh(); X leaveok(Board, TRUE); X return TRUE; X case 's': case 'S': X addch('S'); X refresh(); X Saved = save(); X continue; X default: X addstr(unctrl(c)); X refresh(); X putchar(''); X break; X } X } X} X Xreadch() X{ X reg int cnt; X static char c; X X for (cnt = 0; read(0, &c, 1) <= 0; cnt++) X if (cnt > 100) X exit(1); X return c; X} X X Xgetmove() X{ X reg char c, *sp; X static char moveprompt[] = ">>:Move:"; X#ifdef EXTRAP X static bool last_ex = FALSE; /* set if last command was E */ X X if (last_ex) { X undoex(); X prboard(); X last_ex = FALSE; X } X#endif X for (;;) { X stand(MOVE_Y, MOVE_X, moveprompt); X clrtoeol(); X move(MOVE_Y, MOVE_X + sizeof moveprompt); X leaveok(Board, FALSE); X refresh(); X while ((c = readch()) == _tty.sg_kill || c == _tty.sg_erase) X continue; X if (islower(c)) X c = toupper(c); X if (isprint(c) && !isspace(c)) { X addch(c); X refresh(); X } X switch (c) X { X case 'P': /* Pick */ X Movetype = M_DRAW; X goto ret; X case 'U': /* Use Card */ X case 'D': /* Discard Card */ X if ((Card_no = getcard()) < 0) X break; X Movetype = (c == 'U' ? M_PLAY : M_DISCARD); X goto ret; X case 'O': /* Order */ X Order = !Order; X Movetype = M_ORDER; X goto ret; X case 'Q': /* Quit */ X rub(); /* Same as a rubout */ X break; X case 'W': /* WIndow toggle */ X WIndow = nextwin(WIndow); X newscore(); X prscore(TRUE); X wrefresh(Score); X break; X case 'R': /* Redraw screen */ X case CTRL('L'): X clearok(curscr, TRUE); X newboard(); X prboard(); X break; X case 'S': /* Save game */ X On_exit = FALSE; X save(); X break; X case 'E': /* Extrapolate */ X#ifdef EXTRAP X if (last_ex) X break; X Finished = TRUE; X if (WIndow != W_FULL) X newscore(); X prscore(FALSE); X wrefresh(Score); X last_ex = TRUE; X Finished = FALSE; X#else X error("%c: command not implemented", c); X#endif X break; X case '\r': /* Ignore RETURNs and */ X case '\n': /* Line Feeds */ X case ' ': /* Spaces */ X case '\0': /* and nulls */ X break; X case 'Z': /* Debug code */ X if (geteuid() == ARNOLD) { X if (!Debug && outf == NULL) { X char buf[40]; Xover: X mvaddstr(MOVE_Y, MOVE_X, "file: "); X clrtoeol(); X leaveok(Board, FALSE); X refresh(); X sp = buf; X while ((*sp = readch()) != '\n') { X if (*sp == _tty.sg_kill) X goto over; X else if (*sp == _tty.sg_erase) { X if (--sp < buf) X sp = buf; X else { X addch('\b'); X if (*sp < ' ') X addch('\b'); X clrtoeol(); X } X } X else X addstr(unctrl(*sp++)); X refresh(); X } X *sp = '\0'; X leaveok(Board, TRUE); X if ((outf = fopen(buf, "w")) == NULL) X perror(buf); X setbuf(outf, 0); X } X Debug = !Debug; X break; X } X /* FALLTHROUGH */ X default: X error("unknown command: %s", unctrl(c)); X break; X } X } Xret: X leaveok(Board, TRUE); X} X X X# define COMP_STRT 20 X# define CARD_STRT 2 X Xprboard() { X X reg PLAY *pp; X reg int i, j, k, temp; X X for (k = 0; k < 2; k++) { X pp = &Player[k]; X temp = k * COMP_STRT + CARD_STRT; X for (i = 0; i < NUM_SAFE; i++) X if (pp->safety[i] == S_PLAYED) { X mvaddstr(i, temp, C_name[i + S_CONV]); X if (pp->coups[i]) X mvaddch(i, temp - CARD_STRT, '*'); X } X mvprintw(14, temp, C_fmt, C_name[pp->battle]); X mvprintw(16, temp, C_fmt, C_name[pp->speed]); X for (i = C_25; i <= C_200; ) { X reg char *name; X reg int end; X X name = C_name[i]; X temp = k * 40; X end = pp->nummiles[i++]; X for (j = 0; j < end; j++) X mvwaddstr(Miles, i, (j << 2) + temp, name); X } X } X prscore(TRUE); X temp = CARD_STRT; X pp = &Player[PLAYER]; X for (i = 0; i < HAND_SZ; i++) X mvprintw(i + 6, temp, C_fmt, C_name[pp->hand[i]]); X mvprintw(6, COMP_STRT + CARD_STRT, "%2d", Topcard - Deck); X mvprintw(8, COMP_STRT + CARD_STRT, C_fmt, C_name[Discard]); X if (End == 1000) { X static char ext[] = "Extension"; X X stand(EXT_Y, EXT_X, ext); X } X wrefresh(Board); X wrefresh(Miles); X wrefresh(Score); X} X X/* X * Put str at (y,x) in standout mode X */ Xstand(y, x, str) Xreg int y, x; Xreg char *str; { X X standout(); X mvaddstr(y, x, str); X standend(); X return TRUE; X} X Xprscore(for_real) Xreg bool for_real; { X X reg PLAY *pp; X reg int x; X reg char *Score_fmt = "%4d"; X X stdscr = Score; X for (pp = Player; pp < &Player[2]; pp++) { X x = (pp - Player) * 6 + 21; X mvprintw(1, x, Score_fmt, pp->mileage); X mvprintw(2, x, Score_fmt, pp->safescore); X if (pp->safescore == 400) X mvaddstr(3, x + 1, "300"); X else X mvaddch(3, x + 3, '0'); X mvprintw(4, x, Score_fmt, pp->coupscore); X if (WIndow == W_FULL || Finished) { X#ifdef EXTRAP X if (for_real) X finalscore(pp); X else X extrapolate(pp); X#else X finalscore(pp); X#endif X mvprintw(11, x, Score_fmt, pp->hand_tot); X mvprintw(13, x, Score_fmt, pp->total); X mvprintw(14, x, Score_fmt, pp->games); X } X else { X mvprintw(6, x, Score_fmt, pp->hand_tot); X mvprintw(8, x, Score_fmt, pp->total); X mvprintw(9, x, Score_fmt, pp->games); X } X } X stdscr = Board; X} X XFlushInput () X{ X raw(); /* Flush input */ X noraw(); X X} END_OF_curses_ui.c if test 10994 -ne `wc -c <curses_ui.c`; then echo shar: \"curses_ui.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f drawcard.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"drawcard.c\" else echo shar: Extracting \"drawcard.c\" \(9034 characters\) sed "s/^X//" >drawcard.c <<'END_OF_drawcard.c' X/* X * drawcard.c X * X * display cards on the table X */ X X# include "mille.h" X# include "ui.h" X# include "card.h" X# include "background.h" X Xstruct card_init { X char *bits; X char *mask; X int color; X}; X Xextern char go_bits[], go_mask_bits[]; Xextern char stop_bits[], stop_mask_bits[]; Xextern char right_bits[], right_mask_bits[]; Xextern char speed_bits[], speed_mask_bits[]; Xextern char end_bits[], end_mask_bits[]; Xextern char accident_bits[], accident_mask_bits[]; Xextern char repairs_bits[], repairs_mask_bits[]; Xextern char ace_bits[], ace_mask_bits[]; Xextern char flat_bits[], flat_mask_bits[]; Xextern char spare_bits[], spare_mask_bits[]; Xextern char puncture_bits[], puncture_mask_bits[]; Xextern char out_bits[], out_mask_bits[]; Xextern char gas_bits[], gas_mask_bits[]; Xextern char extra_bits[], extra_mask_bits[]; Xextern char miles_mask_bits[]; Xextern char _25_bits[], _50_bits[], _75_bits[], _100_bits[], _200_bits[]; X Xextern char deck_both_bits[]; X Xstruct card_init card_inits[NUM_CARDS] = { X{ _25_bits, miles_mask_bits, BLUE_COLOR, }, X{ _50_bits, miles_mask_bits, BLUE_COLOR, }, X{ _75_bits, miles_mask_bits, BLUE_COLOR, }, X{ _100_bits, miles_mask_bits, BLUE_COLOR, }, X{ _200_bits, miles_mask_bits, BLUE_COLOR, }, X{ out_bits, out_mask_bits, RED_COLOR, }, X{ flat_bits, flat_mask_bits, RED_COLOR, }, X{ accident_bits, accident_mask_bits, RED_COLOR, }, X{ stop_bits, stop_mask_bits, RED_COLOR, }, X{ speed_bits, speed_mask_bits, RED_COLOR, }, X{ gas_bits, gas_mask_bits, GREEN_COLOR, }, X{ spare_bits, spare_mask_bits, GREEN_COLOR, }, X{ repairs_bits, repairs_mask_bits, GREEN_COLOR, }, X{ go_bits, go_mask_bits, GREEN_COLOR, }, X{ end_bits, end_mask_bits, GREEN_COLOR, }, X{ extra_bits, extra_mask_bits, BLUE_COLOR, }, X{ puncture_bits, puncture_mask_bits, BLUE_COLOR, }, X{ ace_bits, ace_mask_bits, BLUE_COLOR, }, X{ right_bits, right_mask_bits, RED_COLOR, }, X}; Xextern char deck_red_bits[], deck_blue_bits[], deck_mask_bits[]; X Xextern char blank_bits[]; X Xstruct card cards[NUM_CARDS]; X Xstruct card backside; Xstruct card eraseCard; X X Xbw_init_cards() X{ X int i; X Pixmap bits, mask; X long bits_p, mask_p, fill_p; X X setbuf(stderr, NULL); X XSetFillStyle(dpy, cheap_gc, FillStippled); X XSetFunction(dpy, cheap_gc, GXcopy); X XSetTSOrigin(dpy, cheap_gc, 0, 0); X X eraseCard.bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, 1); X bits = XCreateBitmapFromData (dpy, xwindow, blank_bits, WIDTH, HEIGHT); X bits_p = WhitePixel(dpy, screen); X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, eraseCard.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XFreePixmap(dpy, bits); X X fill = XCreateBitmapFromData (dpy, xwindow, fill_bits, WIDTH, HEIGHT); X fill_p = WhitePixel(dpy, screen); X mask_p = bits_p = BlackPixel(dpy, screen); X X fprintf(stderr, "Building pixmaps, please wait "); X X for (i = 0; i < (NUM_CARDS - 1); i++) { X mask = XCreateBitmapFromData (dpy, xwindow, card_inits[i].mask, WIDTH, HEIGHT); X X bits = XCreateBitmapFromData (dpy, xwindow, card_inits[i].bits, WIDTH, HEIGHT); X X cards[i].bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, 1); X X XCopyArea(dpy, eraseCard.bits, cards[i].bits, cheap_gc, X 0, 0, WIDTH, HEIGHT, 0, 0); X X XSetForeground(dpy, cheap_gc, fill_p); X XSetStipple(dpy, cheap_gc, fill); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, mask_p); X XSetStipple(dpy, cheap_gc, mask); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X XFreePixmap(dpy, mask); X XFreePixmap(dpy, bits); X fprintf(stderr, ". "); X } X backside.bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, 1); X X bits = XCreateBitmapFromData (dpy, xwindow, deck_both_bits, X WIDTH, HEIGHT); X bits_p = BlackPixel(dpy, screen); X X XSetForeground(dpy, cheap_gc, fill_p); X XSetStipple(dpy, cheap_gc, fill); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XFreePixmap(dpy, bits); X fprintf(stderr, ". done\n"); X} Xinit_cards () X{ X int i; X Pixmap bits, mask, bits1, bits2; X long bits_p, mask_p, fill_p, bits1_p, bits2_p; X X setbuf(stderr, NULL); X XSetFillStyle(dpy, cheap_gc, FillStippled); X XSetFunction(dpy, cheap_gc, GXcopy); X XSetTSOrigin(dpy, cheap_gc, 0, 0); X X eraseCard.bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, X DefaultDepth(dpy, screen)); X bits = XCreateBitmapFromData (dpy, xwindow, blank_bits, WIDTH, HEIGHT); X bits_p = colorMap[GREY_COLOR].pixel; X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, eraseCard.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XFreePixmap(dpy, bits); X X fill = XCreateBitmapFromData (dpy, xwindow, fill_bits, WIDTH, HEIGHT); X fill_p = colorMap[WHITE_COLOR].pixel; X X fprintf(stderr, "Building pixmaps, please wait "); X X for (i = 0; i < (NUM_CARDS - 1); i++) { X mask = XCreateBitmapFromData (dpy, xwindow, card_inits[i].mask, WIDTH, HEIGHT); X mask_p = colorMap[card_inits[i].color].pixel; X X bits = XCreateBitmapFromData (dpy, xwindow, card_inits[i].bits, WIDTH, HEIGHT); X bits_p = colorMap[BLACK_COLOR].pixel; X X cards[i].bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, X DefaultDepth(dpy, screen)); X X XCopyArea(dpy, eraseCard.bits, cards[i].bits, cheap_gc, X 0, 0, WIDTH, HEIGHT, 0, 0); X X XSetForeground(dpy, cheap_gc, fill_p); X XSetStipple(dpy, cheap_gc, fill); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, mask_p); X XSetStipple(dpy, cheap_gc, mask); X XFillRectangle (dpy, cards[i].bits, cheap_gc, 0, 0, X WIDTH, HEIGHT); X X XFreePixmap(dpy, mask); X XFreePixmap(dpy, bits); X fprintf(stderr, ". "); X } X backside.bits = XCreatePixmap(dpy, xwindow, WIDTH, HEIGHT, X DefaultDepth(dpy, screen)); X X bits = XCreateBitmapFromData (dpy, xwindow, deck_red_bits, X WIDTH, HEIGHT); X bits_p = colorMap[RED_COLOR].pixel; X X bits1 = XCreateBitmapFromData (dpy, xwindow, deck_blue_bits, X WIDTH, HEIGHT); X bits1_p = colorMap[BLUE_COLOR].pixel; X X bits2 = XCreateBitmapFromData (dpy, xwindow, deck_mask_bits, X WIDTH, HEIGHT); X bits2_p = colorMap[BLACK_COLOR].pixel; X X fill_p = colorMap[GREEN_COLOR].pixel; X X XCopyArea(dpy, eraseCard.bits, backside.bits, cheap_gc, X 0, 0, WIDTH, HEIGHT, 0, 0); X X XSetForeground(dpy, cheap_gc, fill_p); X XSetStipple(dpy, cheap_gc, fill); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits2_p); X XSetStipple(dpy, cheap_gc, bits2); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits1_p); X XSetStipple(dpy, cheap_gc, bits1); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XSetForeground(dpy, cheap_gc, bits_p); X XSetStipple(dpy, cheap_gc, bits); X XFillRectangle (dpy, backside.bits, cheap_gc, 0, 0, WIDTH, HEIGHT); X X XFreePixmap(dpy, bits); X XFreePixmap(dpy, bits1); X XFreePixmap(dpy, bits2); X fprintf(stderr, ". done\n"); X} X XdisplayCard (card, x, y) Xint card; Xint x, y; X{ X if (card < 0 || card >= NUM_CARDS) { X cardDisplay (&eraseCard, x, y); X } else { X cardDisplay (&cards[card], x, y); X } X} X Xstruct displayed { X struct displayed *next; X struct card *card; X int x, y; X int flag; X}; X Xstatic struct displayed *onscreen; X XcardDisplay (c, x, y) Xstruct card *c; X{ X int i; X struct displayed *d, *p; X char *malloc (); X X p = 0; X for (d = onscreen; d; d = d->next) { X if (d->x == x && d->y == y) { X if (d->card == c) X return; X if (p) { X p->next = d->next; X d->next = onscreen; X onscreen = d; X } X goto gotim; X } X p = d; X } X d = (struct displayed *) malloc (sizeof (struct displayed)); X d->x = x; X d->y = y; X if (p) X p->next = d; X else X onscreen = d; X d->next = 0; Xgotim: ; X d->card = c; X drawIm (c, x, y); X} X Xstatic XdrawIm (c, x, y) Xstruct card *c; Xint x, y; X{ X int i; X X XSetFunction(dpy, cheap_gc, GXcopy); X XCopyArea(dpy, c->bits, xwindow, cheap_gc, 0, 0, WIDTH, HEIGHT, X x, y); X} X XcardRedisplay (x, y, w, h) X{ X struct displayed *d; X X for (d = onscreen; d; d = d->next) X d->flag = 0; X redisplaybelow (onscreen, x, y, w, h); X} X Xstatic Xredisplaybelow (d, x, y, w, h) Xstruct displayed *d; X{ X int x2, y2; X X x2 = x + w; X y2 = y + h; X for (; d; d = d->next) { X if ((d->x <= x2 && x <= (d->x + WIDTH)) && X (d->y <= y2 && y <= (d->y + HEIGHT))) X { X if (d->flag == 0) { X drawIm (d->card, d->x, d->y); X d->flag = 1; X redisplaybelow (d->next, d->x, d->y, WIDTH, HEIGHT); X } X } X } X X} X XcardEraseAll () X{ X struct displayed *d, *n; X X for (d = onscreen; d; d = n) { X n = d->next; X free (d); X } X onscreen = 0; X} END_OF_drawcard.c if test 9034 -ne `wc -c <drawcard.c`; then echo shar: \"drawcard.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f fill -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"fill\" else echo shar: Extracting \"fill\" \(12265 characters\) sed "s/^X//" >fill <<'END_OF_fill' X#define fill_width 100 X#define fill_height 150 Xstatic char fill_bits[] = { X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0x0f, 0xf0, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0x3f, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf0, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf1, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xfc, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, X 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfe, 0xff, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfc, 0xff, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xfc, X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, X 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xf1, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xf1, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xf0, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0x3f, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, X 0xff, 0xff, 0xff, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0}; END_OF_fill if test 12265 -ne `wc -c <fill`; then echo shar: \"fill\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of archive 2 \(of 3\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 3 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 -- Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330