billr@saab.CNA.TEK.COM (Bill Randle) (12/20/90)
Submitted-by: Rich Burridge <rburridge@sun.COM>
Posting-number: Volume 11, Issue 98
Archive-name: reve/Patch2b
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 3)."
# Contents: patches02b
# Wrapped by billr@saab on Wed Dec 19 16:32:29 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches02b' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches02b'\"
else
echo shar: Extracting \"'patches02b'\" \(46204 characters\)
sed "s/^X//" >'patches02b' <<'END_OF_FILE'
X------- main.c -------
X*** /tmp/da02127 Wed Nov 28 11:00:27 1990
X--- main.c Wed Nov 28 10:40:26 1990
X***************
X*** 27,40 ****
X #include "patchlevel.h"
X #ifdef SYSV
X #include <string.h>
X #else
X #include <strings.h>
X- #endif /*SYSV*/
X #include <sys/time.h>
X #ifdef X11
X #include <X11/Xos.h>
X #endif /*X11*/
X
X /* Text values for the cyclic buttons. */
X char *diff_values[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
X char *notes_values[] = { "off", "on", NULL } ;
X--- 27,49 ----
X #include "patchlevel.h"
X #ifdef SYSV
X #include <string.h>
X+ #include <sys/times.h>
X #else
X #include <strings.h>
X #include <sys/time.h>
X+ #endif /*SYSV*/
X+
X #ifdef X11
X #include <X11/Xos.h>
X #endif /*X11*/
X
X+ #ifdef NO_TIMEVAL
X+ struct timeval {
X+ long tv_sec ; /* Seconds */
X+ long tv_usec ; /* Microseconds */
X+ } ;
X+ #endif /*NO_TIMEVAL*/
X+
X /* Text values for the cyclic buttons. */
X char *diff_values[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL } ;
X char *notes_values[] = { "off", "on", NULL } ;
X***************
X*** 50,55 ****
X--- 59,66 ----
X int piece_x ; /* Current X position of moving piece. */
X int piece_y ; /* Current Y position of moving piece */
X
X+ int animation ; /* If set, show computer move glide and piece drag. */
X+ int best_cmove ; /* Best computer move so far. */
X int bfont_height ; /* Height in pixels for bold font. */
X int but_inverted ; /* Value of panel item inverted. */
X int color ; /* Current color value. */
X***************
X*** 56,61 ****
X--- 67,75 ----
X int cur_ch ; /* Current character pressed. */
X int curx ; /* Current mouse X position. */
X int cury ; /* Current mouse Y position. */
X+ int do_bestmove ; /* If set, continuously update computers best move. */
X+ int do_last ; /* If set, don't show last move. */
X+ int do_number ; /* If set, the last stone placed is numbered. */
X int down ; /* Indicates is a mouse button is down. */
X int first_move = 0 ; /* Set if computer plays first move. */
X int iconic ; /* Set if window is currently iconic. */
X***************
X*** 68,73 ****
X--- 82,88 ----
X int ix ; /* Initial X position of the icon. */
X int iy ; /* Initial Y position of the icon. */
X int last_move ; /* Last valid computer move. */
X+ int last_outline ; /* Position of last piece outline whilst dragging. */
X int level ; /* Current level of difficulty for computer moves. */
X int loadgame = 0 ; /* Set if there is a game file to load. */
X int lsval = 0 ; /* Set to 'l' or 's', if loading or saving. */
X***************
X*** 79,86 ****
X int nfont_height ; /* Height in pixels for normal font. */
X int play_computer ; /* Set if playing against the computer. */
X int posspec ; /* Set if -Wp or -g option is present (for X11) */
X int saveres = 0 ; /* If set, save computer results to log file. */
X! int show_moves = 0 ; /* If set, all possible moves are being shown. */
X int show_notes ; /* If set, display notes value from play_reve. */
X int suggestion = -1 ; /* Positive if a suggested move. */
X int suggest_x ; /* X position of suggested move. */
X--- 94,102 ----
X int nfont_height ; /* Height in pixels for normal font. */
X int play_computer ; /* Set if playing against the computer. */
X int posspec ; /* Set if -Wp or -g option is present (for X11) */
X+ int quickgame ; /* If set, don't flash turning stones. */
X int saveres = 0 ; /* If set, save computer results to log file. */
X! int show_moves ; /* If set, all possible moves are being shown. */
X int show_notes ; /* If set, display notes value from play_reve. */
X int suggestion = -1 ; /* Positive if a suggested move. */
X int suggest_x ; /* X position of suggested move. */
X***************
X*** 134,140 ****
X BWIDTH, BHEIGHT, "undo", 0, undo },
X
X { P_BUTTON, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "done", 0, done },
X
X { P_BUTTON, -1, -1, /* Not normally active. */
X BWIDTH, BHEIGHT, "cancel", 0, remove_textfield },
X--- 150,156 ----
X BWIDTH, BHEIGHT, "undo", 0, undo },
X
X { P_BUTTON, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (1*(BHEIGHT+BGAP)),
X! BWIDTH, BHEIGHT, "iconify", 0, done },
X
X { P_BUTTON, -1, -1, /* Not normally active. */
X BWIDTH, BHEIGHT, "cancel", 0, remove_textfield },
X***************
X*** 157,169 ****
X { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
X 0, 0, "Use left mouse button to move", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
X 0, 0, "", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
X 0, 0, "White: 2, Black: 2", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
X 0, 0, "", 0, NULL },
X } ;
X
X--- 173,185 ----
X { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (4*(BHEIGHT+BGAP)),
X 0, 0, "Use left mouse button to move", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (5*(BHEIGHT+BGAP)),
X 0, 0, "", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (0*(BWIDTH+BGAP)), BBORDER + (6*(BHEIGHT+BGAP)),
X 0, 0, "White: 2, Black: 2", 0, NULL },
X
X! { P_MESSAGE, BBORDER + (3*(BWIDTH+BGAP)), BBORDER + (6*(BHEIGHT+BGAP)),
X 0, 0, "", 0, NULL },
X } ;
X
X***************
X*** 248,258 ****
X if (argv[0][0] == '-')
X switch (argv[0][1])
X {
X! case 'b' : isblack = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X {
X! INC ;
X! black_dpy = *argv ;
X }
X break ;
X case 'c' : play_computer = 1 ; /* Play against the computer. */
X--- 264,281 ----
X if (argv[0][0] == '-')
X switch (argv[0][1])
X {
X! case 'a' : /* Allow computer glide and piece dragging. */
X! if (EQUAL(argv[0], "-animate")) animation = TRUE ;
X! break ;
X! case 'b' : if (EQUAL(argv[0], "-bestmove")) do_bestmove = TRUE ;
X! else if (EQUAL(argv[0], "-black"))
X {
X! isblack = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X! {
X! INC ;
X! black_dpy = *argv ;
X! }
X }
X break ;
X case 'c' : play_computer = 1 ; /* Play against the computer. */
X***************
X*** 272,297 ****
X break ;
X case 'i' : inv_video = 1 ; /* Display in inverse video. */
X break ;
X! case 'l' : INC ; /* Reve game file to load. */
X! getparam(gamefile, argv, "-l needs a game file") ;
X! loadgame = 1 ; /* Game file to load. */
X break ;
X case 'm' : monochrome = 1 ; /* Force display to mono. */
X for (i = 0; i < MAXDPY; i++) iscolor[i] = 0 ;
X break ;
X! case 'n' : show_notes = 1 ; /* Display computer notes. */
X! items[(int) NOTES].value = 1 ;
X break ;
X case 'r' : saveres = 1 ; /* Save computer results to file. */
X break ;
X case '?' :
X case 'v' : usage() ;
X
X! case 'w' : iswhite = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X {
X! INC ;
X! white_dpy = *argv ;
X }
X break ;
X
X--- 295,333 ----
X break ;
X case 'i' : inv_video = 1 ; /* Display in inverse video. */
X break ;
X! case 'l' : if (EQUAL(argv[0], "-last")) do_last = TRUE ;
X! else if (EQUAL(argv[0], "-load"))
X! {
X! INC ; /* Reve game file to load. */
X! getparam(gamefile, argv, "-l needs a game file") ;
X! loadgame = 1 ; /* Game file to load. */
X! }
X break ;
X case 'm' : monochrome = 1 ; /* Force display to mono. */
X for (i = 0; i < MAXDPY; i++) iscolor[i] = 0 ;
X break ;
X! case 'n' : if (EQUAL(argv[0], "-notes"))
X! {
X! show_notes = TRUE ;
X! items[(int) NOTES].value = 1 ;
X! }
X! else if (EQUAL(argv[0], "-number")) do_number = TRUE ;
X break ;
X+ case 'q' : if (EQUAL(argv[0], "-quick")) quickgame = TRUE ;
X+ break ;
X case 'r' : saveres = 1 ; /* Save computer results to file. */
X break ;
X case '?' :
X case 'v' : usage() ;
X
X! case 'w' : if (EQUAL(argv[0], "-white"))
X {
X! iswhite = 1 ;
X! if (*(argv+1) != NULL && argv[1][0] != '-')
X! {
X! INC ;
X! white_dpy = *argv ;
X! }
X }
X break ;
X
X***************
X*** 417,422 ****
X--- 453,459 ----
X }
X batch(IS_OFF) ;
X show_last(last_move, IS_ON) ;
X+ show_number(last_move, IS_ON) ;
X show_suggestion() ;
X batch(IS_ON) ;
X FOR_BOARD(i)
X***************
X*** 451,460 ****
X--- 488,505 ----
X play_computer = 1 ; /* Default is human vs computer. */
X iconic = 0 ; /* Initially an open window. */
X last_move = -1 ;
X+ last_outline = -1 ;
X next_player = BLACK ;
X+ animation = FALSE ;
X+ best_cmove = -1 ;
X but_inverted = -1 ;
X+ do_bestmove = FALSE ;
X+ do_last = FALSE ;
X+ do_number = FALSE ;
X+ quickgame = FALSE ;
X validkey = 0 ;
X cmode = BLACK_START ;
X+ show_moves = FALSE ;
X show_notes = FALSE ;
X isblack = 0 ;
X iswhite = 0 ;
X***************
X*** 463,469 ****
X
X black_dpy = NULL ; /* X11 black piece display information. */
X white_dpy = NULL ; /* X11 white piece display information. */
X! STRCPY(geometry, "") ; /* X11 geometry information. */
X STRCPY(edgefile, EDGENAME) ;
X }
X
X--- 508,515 ----
X
X black_dpy = NULL ; /* X11 black piece display information. */
X white_dpy = NULL ; /* X11 white piece display information. */
X! STRCPY(geometry[(int) DPY1], "") ; /* X11 geometry information. */
X! STRCPY(geometry[(int) DPY2], "") ;
X STRCPY(edgefile, EDGENAME) ;
X }
X
X***************
X*** 590,598 ****
X {
X set_cursor(HOURGLASS) ;
X move = TRUE ; /* Make sure the computer clock is decremented. */
X play_reve(board.square, player, level, &move, ¬e) ;
X set_cursor(CANVASCUR) ;
X! animate_move(move) ;
X do_move(player) ;
X last_move = move ;
X cmode = (enum cantype) (OPPONENT(player) + 1) ;
X--- 636,648 ----
X {
X set_cursor(HOURGLASS) ;
X move = TRUE ; /* Make sure the computer clock is decremented. */
X+ best_cmove = -1 ;
X+ message(EVAL_MES, "") ;
X play_reve(board.square, player, level, &move, ¬e) ;
X set_cursor(CANVASCUR) ;
X! if (animation == TRUE) animate_move(move) ;
X! if (best_cmove != -1 && do_bestmove == TRUE)
X! draw_square(best_cmove, IS_OFF, 2) ;
X do_move(player) ;
X last_move = move ;
X cmode = (enum cantype) (OPPONENT(player) + 1) ;
X***************
X*** 603,612 ****
X usage()
X {
X FPRINTF(stderr, "%s version 1.1.%1d\n\n", progname, PATCHLEVEL) ;
X! FPRINTF(stderr, "Usage: %s: [-b [display] ] [-c]\n", progname) ;
X! FPRINTF(stderr, "\t[-d difficulty] [-e edgefile] [-g geometry]\n") ;
X! FPRINTF(stderr, "\t[-l gamefile] [-v] [-w [display] ] [-?] [-Wi]\n") ;
X! FPRINTF(stderr, "\t[-Wp x y] [-WP x y]\n") ;
X }
X
X
X--- 653,663 ----
X usage()
X {
X FPRINTF(stderr, "%s version 1.1.%1d\n\n", progname, PATCHLEVEL) ;
X! FPRINTF(stderr, "Usage: %s: [-animate] [-bestmove]\n", progname) ;
X! FPRINTF(stderr, "\t[-black [display] ] [-c] [-d difficulty]\n") ;
X! FPRINTF(stderr, "\t[-e edgefile] [-g geometry] [-last]\n") ;
X! FPRINTF(stderr, "\t[-load gamefile] [-number] [-notes] [-v]\n") ;
X! FPRINTF(stderr, "\t[-w [display] ] [-?] [-Wi] [-Wp x y] [-WP x y]\n") ;
X }
X
X
X***************
X*** 614,624 ****
X--- 665,682 ----
X usleep(x) /* Suspend execution for interval in microseconds. */
X unsigned x ;
X {
X+ #ifdef NOSELECT
X+ unsigned seconds = x / 1000 ;
X+
X+ if (x > 0) sleep(x) ;
X+ #else
X+
X struct timeval st_delay ;
X
X st_delay.tv_usec = x ;
X st_delay.tv_sec = 0 ;
X (void) select(32, NULL, NULL, NULL, &st_delay) ;
X+ #endif /*NOSELECT*/
X }
X #endif /*NO_USLEEP*/
X
X
X------- procs.c -------
X*** /tmp/da02133 Wed Nov 28 11:00:29 1990
X--- procs.c Fri Nov 23 07:12:47 1990
X***************
X*** 41,57 ****
X {
X int cx, cy ;
X
X set_cursor(CANVASCUR) ;
X if (state == LEFT_DOWN)
X {
X! draw_piece(next_player, piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode - 1) ;
X }
X else
X {
X! draw_piece(next_player, piece_x, piece_y, RINV) ;
X! cx = (piece_x + PIECE_RAD - BBORDER) / CELL_SIZE ;
X! cy = (piece_y + PIECE_RAD - CY - BBORDER) / CELL_SIZE ;
X move = cy * BOARD_SIZE + cx ;
X make_move() ;
X }
X--- 41,62 ----
X {
X int cx, cy ;
X
X+ cx = (piece_x + PIECE_RAD - BBORDER) / CELL_SIZE ;
X+ cy = (piece_y + PIECE_RAD - CY - BBORDER) / CELL_SIZE ;
X+
X set_cursor(CANVASCUR) ;
X if (state == LEFT_DOWN)
X {
X! draw_outline(cy * BOARD_SIZE + cx, IS_ON) ;
X! if (animation == TRUE)
X! draw_piece(next_player, piece_x, piece_y, RINV) ;
X cmode = (enum cantype) ((int) cmode - 1) ;
X }
X else
X {
X! if (animation == TRUE)
X! draw_piece(next_player, piece_x, piece_y, RINV) ;
X! draw_outline(last_outline, IS_OFF) ;
X move = cy * BOARD_SIZE + cx ;
X make_move() ;
X }
X***************
X*** 171,177 ****
X break ;
X case DECREMENT : if (--item_value == -1)
X {
X! while (choices[++item_value] != NULL) ;
X item_value-- ;
X items[(int) item].value = item_value ;
X }
X--- 176,182 ----
X break ;
X case DECREMENT : if (--item_value == -1)
X {
X! while (choices[++item_value] != NULL) continue ;
X item_value-- ;
X items[(int) item].value = item_value ;
X }
X***************
X*** 218,223 ****
X--- 223,229 ----
X suggest_x+5, CY+suggest_y+5, RSRC, C_BLACK) ;
X draw_line(suggest_x-5, CY+suggest_y+5,
X suggest_x+5, CY+suggest_y-5, RSRC, C_BLACK) ;
X+ if (show_notes) set_eval(player, suggestion, note) ;
X }
X
X
X***************
X*** 254,260 ****
X if (n >= 3)
X {
X show_last(last_move, IS_OFF) ;
X! FOR_BOARD(i) board.square[i] = moves[n].square[i] ;
X board.moves_left = moves[n].moves_left ;
X board.player = moves[n].player ;
X board.move = moves[n].move ;
X--- 260,278 ----
X if (n >= 3)
X {
X show_last(last_move, IS_OFF) ;
X! show_number(last_move, IS_OFF) ;
X! FOR_BOARD(i)
X! {
X! if (moves[n].square[i] != board.square[i])
X! {
X! get_xy(i, &x, &y) ;
X! if (moves[n].square[i] == FREE)
X! color_area(x, CY+y, PSIZE, PSIZE,
X! (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE) ;
X! else draw_piece(moves[n].square[i], x, CY+y, RSRC) ;
X! }
X! board.square[i] = moves[n].square[i] ;
X! }
X board.moves_left = moves[n].moves_left ;
X board.player = moves[n].player ;
X board.move = moves[n].move ;
X***************
X*** 276,290 ****
X else cmode = WHITE_START ;
X message(PANEL_MES, "") ;
X
X! FOR_BOARD(i)
X {
X! get_xy(i, &x, &y) ;
X! if (board.square[i] == FREE)
X! color_area(x, CY+y, PSIZE, PSIZE,
X! (iscolor[(int) cur_dpyno]) ? C_LBROWN : C_WHITE) ;
X! else draw_piece(board.square[i], x, CY+y, RSRC) ;
X }
X! if (n > 3) show_last(last_move, IS_ON) ;
X next_player = OPPONENT(board.player) ;
X }
X else message(PANEL_MES, "No moves to undo.") ;
X--- 294,306 ----
X else cmode = WHITE_START ;
X message(PANEL_MES, "") ;
X
X! if (n > 3)
X {
X! show_last(last_move, IS_ON) ;
X! show_number(last_move, IS_ON) ;
X! if (show_notes) set_eval(board.player, board.move, board.note) ;
X }
X! else message(EVAL_MES, "") ;
X next_player = OPPONENT(board.player) ;
X }
X else message(PANEL_MES, "No moves to undo.") ;
X
X------- rev_eval.c -------
X*** /tmp/da02136 Wed Nov 28 11:00:29 1990
X--- rev_eval.c Tue Nov 20 10:31:35 1990
X***************
X*** 36,42 ****
X * - Potential Mobility, looking at squares contacts
X * And then Eval = c1 * ES + c2 * ( CM + cx * XV ) + c3 * PM
X * Eval is replaced by - Eval if Black is replaced by White. Eval is positive
X! * if macouleur ( my color ) has a good position and negatif if tacouleur
X * position is good.
X * If we are "near" the end of the game, then Eval is equal to final disc
X * differential.
X--- 36,42 ----
X * - Potential Mobility, looking at squares contacts
X * And then Eval = c1 * ES + c2 * ( CM + cx * XV ) + c3 * PM
X * Eval is replaced by - Eval if Black is replaced by White. Eval is positive
X! * if macouleur ( my color ) has a good position and negative if tacouleur
X * position is good.
X * If we are "near" the end of the game, then Eval is equal to final disc
X * differential.
X***************
X*** 83,88 ****
X--- 83,94 ----
X }
X note = edges[i] ;
X
X+ if (((i == 2191) && (d[13] == macouleur)) ||
X+ ((i == 2917) && (d[10] == macouleur)) ||
X+ ((i == 3643) && (d[10] == tacouleur)) ||
X+ ((i == 4369) && (d[13] == tacouleur)))
X+ note -= edges[i] ;
X+
X i = 0 ;
X for (p = &d[56]; p < &d[64]; p++)
X {
X***************
X*** 92,97 ****
X--- 98,109 ----
X }
X note += edges[i] ;
X
X+ if (((i == 2191) && (d[53] == macouleur)) ||
X+ ((i == 2917) && (d[50] == macouleur)) ||
X+ ((i == 3643) && (d[50] == tacouleur)) ||
X+ ((i == 4369) && (d[53] == tacouleur)))
X+ note -= edges[i] ;
X+
X i = 0 ;
X for (p = &d[0]; p < &d[64]; p += 8)
X {
X***************
X*** 101,106 ****
X--- 113,124 ----
X }
X note += edges[i] ;
X
X+ if (((i == 2191) && (d[41] == macouleur)) ||
X+ ((i == 2917) && (d[17] == macouleur)) ||
X+ ((i == 3643) && (d[17] == tacouleur)) ||
X+ ((i == 4369) && (d[41] == tacouleur)))
X+ note -= edges[i] ;
X+
X i = 0 ;
X for (p = &d[7]; p < &d[64]; p += 8)
X {
X***************
X*** 109,114 ****
X--- 127,138 ----
X else if (*p == macouleur) i += 2 ;
X }
X note += edges[i] ;
X+
X+ if (((i == 2191) && (d[46] == macouleur)) ||
X+ ((i == 2917) && (d[22] == macouleur)) ||
X+ ((i == 3643) && (d[22] == tacouleur)) ||
X+ ((i == 4369) && (d[46] == tacouleur)))
X+ note -= edges[i] ;
X
X cx = 8 * (50 - mnb - profmax) ;
X
X
X------- rev_ip.c -------
X*** /tmp/da02139 Wed Nov 28 11:00:30 1990
X--- rev_ip.c Fri Nov 23 23:17:29 1990
X***************
X*** 23,29 ****
X--- 23,34 ----
X #include <signal.h>
X #include <setjmp.h>
X #include <sys/types.h>
X+ #ifdef SYSV
X+ #include <sys/times.h>
X+ #else
X #include <sys/time.h>
X+ #endif /*SYSV*/
X+
X #include "reve.h"
X
X extern int saveres ;
X***************
X*** 166,172 ****
X
X if (((k == 1) && (mnb < 52)) || (mnb == 1))
X {
X! for (cp = 0; d0[cpk[cp]] != JPJ; cp++) ;
X cpi[0] = cpi[cp] ;
X cpj[0] = cpj[cp] ;
X cpk[0] = cpk[cp] ;
X--- 171,177 ----
X
X if (((k == 1) && (mnb < 52)) || (mnb == 1))
X {
X! for (cp = 0; d0[cpk[cp]] != JPJ; cp++) continue ;
X cpi[0] = cpi[cp] ;
X cpj[0] = cpj[cp] ;
X cpk[0] = cpk[cp] ;
X***************
X*** 219,229 ****
X allotime = timeleft * 3 / (61 - mnb) ;
X firsttime = time((time_t *) NULL) ;
X
X! signal(SIGALRM, catcher) ;
X
X if (setjmp(jumper) != 0)
X {
X! if (cpmax == 0) note = oldnote ;
X profmax = -profmax ;
X goto trap ;
X }
X--- 224,236 ----
X allotime = timeleft * 3 / (61 - mnb) ;
X firsttime = time((time_t *) NULL) ;
X
X! cpmaxi[0] = cpmaxi[1] = cpmaxi[2] = cpmaxi[3] = 0 ;
X
X+ SIGNAL(SIGALRM, catcher) ;
X+
X if (setjmp(jumper) != 0)
X {
X! if (note == -1000000000) note = oldnote ;
X profmax = -profmax ;
X goto trap ;
X }
X***************
X*** 233,239 ****
X oldnote = note ;
X note = -1000000000 ;
X
X! if ((int) (allotime - timeused) > 2) alarm(allotime - timeused) ;
X
X c1 = 312 + 6 * (mnb + profmax) ;
X if (mnb + profmax < 25)
X--- 240,247 ----
X oldnote = note ;
X note = -1000000000 ;
X
X! if ((int) (allotime - timeused) > 2)
X! ALARM((unsigned) (allotime - timeused)) ;
X
X c1 = 312 + 6 * (mnb + profmax) ;
X if (mnb + profmax < 25)
X***************
X*** 247,254 ****
X if (profmax > 53 - mnb)
X {
X profmax = 61 - mnb ;
X! allotime = timeleft * 3 / 5 ;
X! if ((int) (allotime - timeused) > 2) alarm(allotime - timeused) ;
X }
X
X for (cp = 0; cp <= 60 - mnb; cp++)
X--- 255,263 ----
X if (profmax > 53 - mnb)
X {
X profmax = 61 - mnb ;
X! allotime = timeleft * 2 / 3 ;
X! if ((int) (allotime - timeused) > 2)
X! ALARM((unsigned) (allotime - timeused)) ;
X }
X
X for (cp = 0; cp <= 60 - mnb; cp++)
X***************
X*** 267,283 ****
X {
X note = lnote ;
X cpmax = cp ;
X }
X }
X }
X
X! alarm(0) ;
X cpmaxi[0] = cpmax ;
X
X if ((mnb < 57) && (cpmaxi[0] != cpmaxi[1])
X && (cpmaxi[1] != cpmaxi[2]) && (cpmaxi[0] != cpmaxi[2]))
X {
X- if (cpmax == 0) count++ ; else count = 1 ;
X for (cp = 0; cp <= 60 - mnb; cp++) cpf[cp] = TRUE ;
X for (k = 0; k < 3; k++)
X {
X--- 276,294 ----
X {
X note = lnote ;
X cpmax = cp ;
X+ show_best(cpk[cpmax], lnote) ;
X }
X }
X }
X
X! ALARM(0) ;
X cpmaxi[0] = cpmax ;
X+ if (cpmax == 0) count += 2 ;
X+ else count = 1 ;
X
X if ((mnb < 57) && (cpmaxi[0] != cpmaxi[1])
X && (cpmaxi[1] != cpmaxi[2]) && (cpmaxi[0] != cpmaxi[2]))
X {
X for (cp = 0; cp <= 60 - mnb; cp++) cpf[cp] = TRUE ;
X for (k = 0; k < 3; k++)
X {
X***************
X*** 318,324 ****
X timeused = time((time_t *) NULL) - firsttime ;
X if ((mnb == 4) && (profmax == 3)) break ;
X }
X! while ((timeused * count < allotime * 5 / 4) && (profmax != 61 - mnb)) ;
X trap:
X timeused = time((time_t *) NULL) - firsttime ;
X if (timeused == 0) timeused = 1 ;
X--- 329,335 ----
X timeused = time((time_t *) NULL) - firsttime ;
X if ((mnb == 4) && (profmax == 3)) break ;
X }
X! while ((timeused * count < allotime * 4 / 5) && (profmax != 61 - mnb)) ;
X trap:
X timeused = time((time_t *) NULL) - firsttime ;
X if (timeused == 0) timeused = 1 ;
X***************
X*** 354,361 ****
X long alpha, beta ;
X {
X register int *d0, *d1 ;
X! register int k, cp, cpmax ;
X register long lnote, note ;
X
X d0 = damier[niv] ;
X d1 = damier[niv + 1] ;
X--- 365,373 ----
X long alpha, beta ;
X {
X register int *d0, *d1 ;
X! register int k, cp ;
X register long lnote, note ;
X+ register int cpmax = 0 ;
X
X d0 = damier[niv] ;
X d1 = damier[niv + 1] ;
X***************
X*** 402,409 ****
X long alpha, beta ;
X {
X register int *d0, *d1 ;
X! register int k, cp, cpmax ;
X register long lnote, note ;
X
X d0 = damier[niv] ;
X d1 = damier[niv + 1] ;
X--- 414,422 ----
X long alpha, beta ;
X {
X register int *d0, *d1 ;
X! register int k, cp ;
X register long lnote, note ;
X+ register int cpmax = 0 ;
X
X d0 = damier[niv] ;
X d1 = damier[niv + 1] ;
X
X------- rev_iycp.c -------
X*** /tmp/da02142 Wed Nov 28 11:00:31 1990
X--- rev_iycp.c Tue Nov 20 10:53:09 1990
X***************
X*** 60,66 ****
X
X for (x = posx + 1;
X (x < 7) && (d[(x << 3) + posy] == tacouleur);
X! x++) ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == macouleur))
X {
X flag = TRUE ;
X--- 60,66 ----
X
X for (x = posx + 1;
X (x < 7) && (d[(x << 3) + posy] == tacouleur);
X! x++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 71,77 ****
X
X for (x = posx - 1;
X (x > 0) && (d[(x << 3) + posy] == tacouleur);
X! x--) ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == macouleur))
X {
X flag = TRUE ;
X--- 71,77 ----
X
X for (x = posx - 1;
X (x > 0) && (d[(x << 3) + posy] == tacouleur);
X! x--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 82,88 ****
X
X for (y = posy + 1;
X (y < 7) && (d[pos8x + y] == tacouleur);
X! y++) ;
X if ((y != posy + 1) && (d[pos8x + y] == macouleur))
X {
X flag = TRUE ;
X--- 82,88 ----
X
X for (y = posy + 1;
X (y < 7) && (d[pos8x + y] == tacouleur);
X! y++) continue ;
X if ((y != posy + 1) && (d[pos8x + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 93,99 ****
X
X for (y = posy - 1;
X (y > 0) && (d[pos8x + y] == tacouleur);
X! y--) ;
X if ((y != posy - 1) && (d[pos8x + y] == macouleur))
X {
X flag = TRUE ;
X--- 93,99 ----
X
X for (y = posy - 1;
X (y > 0) && (d[pos8x + y] == tacouleur);
X! y--) continue ;
X if ((y != posy - 1) && (d[pos8x + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 104,110 ****
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x++, y++) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X--- 104,110 ----
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x++, y++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 115,121 ****
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x--, y++) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X--- 115,121 ----
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x--, y++) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 126,132 ****
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x++, y--) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X--- 126,132 ----
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x++, y--) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 137,143 ****
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x--, y--) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X--- 137,143 ----
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x--, y--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X flag = TRUE ;
X***************
X*** 152,165 ****
X }
X
X
X! jejoueen(px, py, niv)
X! int px, py, niv ;
X {
X register int *d ;
X! register int x, y, posx, posy, pos8x ;
X
X- posx = px ;
X- posy = py ;
X pos8x = posx << 3 ;
X
X d = damier[niv] ;
X--- 152,163 ----
X }
X
X
X! jejoueen(posx, posy, niv)
X! int posx, posy, niv ;
X {
X register int *d ;
X! register int x, y, pos8x ;
X
X pos8x = posx << 3 ;
X
X d = damier[niv] ;
X***************
X*** 166,172 ****
X
X d[pos8x + posy] = macouleur ;
X
X! for (x = posx + 1; (x < 7) && (d[(x << 3) + posy] == tacouleur); x++) ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == macouleur))
X {
X for (x = posx + 1; d[(x << 3) + posy] == tacouleur; x++)
X--- 164,171 ----
X
X d[pos8x + posy] = macouleur ;
X
X! for (x = posx + 1;
X! (x < 7) && (d[(x << 3) + posy] == tacouleur); x++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == macouleur))
X {
X for (x = posx + 1; d[(x << 3) + posy] == tacouleur; x++)
X***************
X*** 173,179 ****
X d[(x << 3) + posy] = macouleur ;
X }
X
X! for (x = posx - 1; (x > 0) && (d[(x << 3) + posy] == tacouleur); x--) ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == macouleur))
X {
X for (x = posx - 1; d[(x << 3) + posy] == tacouleur; x--)
X--- 172,179 ----
X d[(x << 3) + posy] = macouleur ;
X }
X
X! for (x = posx - 1;
X! (x > 0) && (d[(x << 3) + posy] == tacouleur); x--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == macouleur))
X {
X for (x = posx - 1; d[(x << 3) + posy] == tacouleur; x--)
X***************
X*** 180,186 ****
X d[(x << 3) + posy] = macouleur ;
X }
X
X! for (y = posy + 1; (y < 7) && (d[pos8x + y] == tacouleur); y++) ;
X if ((y != posy + 1) && (d[pos8x + y] == macouleur))
X {
X for (y = posy + 1; d[pos8x + y] == tacouleur; y++)
X--- 180,187 ----
X d[(x << 3) + posy] = macouleur ;
X }
X
X! for (y = posy + 1;
X! (y < 7) && (d[pos8x + y] == tacouleur); y++) continue ;
X if ((y != posy + 1) && (d[pos8x + y] == macouleur))
X {
X for (y = posy + 1; d[pos8x + y] == tacouleur; y++)
X***************
X*** 187,193 ****
X d[pos8x + y] = macouleur ;
X }
X
X! for (y = posy - 1; (y > 0) && (d[pos8x + y] == tacouleur); y--) ;
X if ((y != posy - 1) && (d[pos8x + y] == macouleur))
X {
X for (y = posy - 1; d[pos8x + y] == tacouleur; y--)
X--- 188,195 ----
X d[pos8x + y] = macouleur ;
X }
X
X! for (y = posy - 1;
X! (y > 0) && (d[pos8x + y] == tacouleur); y--) continue ;
X if ((y != posy - 1) && (d[pos8x + y] == macouleur))
X {
X for (y = posy - 1; d[pos8x + y] == tacouleur; y--)
X***************
X*** 195,201 ****
X }
X
X for (x = posx + 1, y = posy + 1;
X! (x < 7) && (y < 7) && (d[(x << 3) + y] == tacouleur); x++, y++) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx + 1, y = posy + 1; d[(x << 3) + y] == tacouleur; x++, y++)
X--- 197,204 ----
X }
X
X for (x = posx + 1, y = posy + 1;
X! (x < 7) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x++, y++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx + 1, y = posy + 1; d[(x << 3) + y] == tacouleur; x++, y++)
X***************
X*** 203,209 ****
X }
X
X for (x = posx - 1, y = posy + 1;
X! (x > 0) && (y < 7) && (d[(x << 3) + y] == tacouleur); x--, y++) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx - 1, y = posy + 1; d[(x << 3) + y] == tacouleur; x--, y++)
X--- 206,213 ----
X }
X
X for (x = posx - 1, y = posy + 1;
X! (x > 0) && (y < 7) && (d[(x << 3) + y] == tacouleur);
X! x--, y++) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx - 1, y = posy + 1; d[(x << 3) + y] == tacouleur; x--, y++)
X***************
X*** 211,217 ****
X }
X
X for (x = posx + 1, y = posy - 1;
X! (x < 7) && (y > 0) && (d[(x << 3) + y] == tacouleur); x++, y--) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx + 1, y = posy - 1; d[(x << 3) + y] == tacouleur; x++, y--)
X--- 215,222 ----
X }
X
X for (x = posx + 1, y = posy - 1;
X! (x < 7) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x++, y--) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx + 1, y = posy - 1; d[(x << 3) + y] == tacouleur; x++, y--)
X***************
X*** 219,225 ****
X }
X
X for (x = posx - 1, y = posy - 1;
X! (x > 0) && (y > 0) && (d[(x << 3) + y] == tacouleur); x--, y--) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx - 1, y = posy - 1; d[(x << 3) + y] == tacouleur; x--, y--)
X--- 224,231 ----
X }
X
X for (x = posx - 1, y = posy - 1;
X! (x > 0) && (y > 0) && (d[(x << 3) + y] == tacouleur);
X! x--, y--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == macouleur))
X {
X for (x = posx - 1, y = posy - 1; d[(x << 3) + y] == tacouleur; x--, y--)
X***************
X*** 249,255 ****
X {
X for (x = posx + 1;
X (x < 7) && (d[(x << 3) + posy] == macouleur);
X! x++) ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == tacouleur))
X {
X flag = TRUE ;
X--- 255,261 ----
X {
X for (x = posx + 1;
X (x < 7) && (d[(x << 3) + posy] == macouleur);
X! x++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 260,266 ****
X
X for (x = posx - 1;
X (x > 0) && (d[(x << 3) + posy] == macouleur) ;
X! x--) ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == tacouleur))
X {
X flag = TRUE ;
X--- 266,272 ----
X
X for (x = posx - 1;
X (x > 0) && (d[(x << 3) + posy] == macouleur) ;
X! x--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 271,277 ****
X
X for (y = posy + 1;
X (y < 7) && (d[pos8x + y] == macouleur);
X! y++) ;
X if ((y != posy + 1) && (d[pos8x + y] == tacouleur))
X {
X flag = TRUE ;
X--- 277,283 ----
X
X for (y = posy + 1;
X (y < 7) && (d[pos8x + y] == macouleur);
X! y++) continue ;
X if ((y != posy + 1) && (d[pos8x + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 282,288 ****
X
X for (y = posy - 1;
X (y > 0) && (d[pos8x + y] == macouleur);
X! y--) ;
X if ((y != posy - 1) && (d[pos8x + y] == tacouleur))
X {
X flag = TRUE ;
X--- 288,294 ----
X
X for (y = posy - 1;
X (y > 0) && (d[pos8x + y] == macouleur);
X! y--) continue ;
X if ((y != posy - 1) && (d[pos8x + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 293,299 ****
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x++, y++);
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X--- 299,305 ----
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x++, y++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 304,310 ****
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x--, y++) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X--- 310,316 ----
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x--, y++) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 315,321 ****
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x++, y--) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X--- 321,327 ----
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x++, y--) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 326,332 ****
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == macouleur) ;
X! x--, y-- ) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X--- 332,338 ----
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == macouleur) ;
X! x--, y-- ) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X flag = TRUE ;
X***************
X*** 341,360 ****
X }
X
X
X! tujouesen(px, py, niv)
X! int px, py, niv ;
X {
X register int *d ;
X! register int x, y, posx, posy, pos8x ;
X
X- posx = px ;
X- posy = py ;
X-
X pos8x = posx << 3 ;
X d = damier[niv] ;
X d[pos8x + posy] = tacouleur ;
X
X! for (x = posx + 1; (x < 7) && (d[(x << 3) + posy] == macouleur); x++) ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == tacouleur))
X {
X for (x = posx + 1; d[(x << 3) + posy] == macouleur; x++)
X--- 347,364 ----
X }
X
X
X! tujouesen(posx, posy, niv)
X! int posx, posy, niv ;
X {
X register int *d ;
X! register int x, y, pos8x ;
X
X pos8x = posx << 3 ;
X d = damier[niv] ;
X d[pos8x + posy] = tacouleur ;
X
X! for (x = posx + 1;
X! (x < 7) && (d[(x << 3) + posy] == macouleur); x++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + posy] == tacouleur))
X {
X for (x = posx + 1; d[(x << 3) + posy] == macouleur; x++)
X***************
X*** 361,367 ****
X d[(x << 3) + posy] = tacouleur ;
X }
X
X! for (x = posx - 1; (x > 0) && (d[(x << 3) + posy] == macouleur); x--) ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == tacouleur))
X {
X for (x = posx - 1; d[(x << 3) + posy] == macouleur; x--)
X--- 365,372 ----
X d[(x << 3) + posy] = tacouleur ;
X }
X
X! for (x = posx - 1;
X! (x > 0) && (d[(x << 3) + posy] == macouleur); x--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + posy] == tacouleur))
X {
X for (x = posx - 1; d[(x << 3) + posy] == macouleur; x--)
X***************
X*** 368,374 ****
X d[(x << 3) + posy] = tacouleur ;
X }
X
X! for (y = posy + 1; (y < 7) && (d[pos8x + y] == macouleur); y++) ;
X if ((y != posy + 1) && (d[pos8x + y] == tacouleur))
X {
X for (y = posy + 1; d[pos8x + y] == macouleur; y++)
X--- 373,380 ----
X d[(x << 3) + posy] = tacouleur ;
X }
X
X! for (y = posy + 1;
X! (y < 7) && (d[pos8x + y] == macouleur); y++) continue ;
X if ((y != posy + 1) && (d[pos8x + y] == tacouleur))
X {
X for (y = posy + 1; d[pos8x + y] == macouleur; y++)
X***************
X*** 375,381 ****
X d[pos8x + y] = tacouleur ;
X }
X
X! for (y = posy - 1; (y > 0) && (d[pos8x + y] == macouleur); y--) ;
X if ((y != posy - 1) && (d[pos8x + y] == tacouleur))
X {
X for (y = posy - 1; d[pos8x + y] == macouleur; y--)
X--- 381,388 ----
X d[pos8x + y] = tacouleur ;
X }
X
X! for (y = posy - 1;
X! (y > 0) && (d[pos8x + y] == macouleur); y--) continue ;
X if ((y != posy - 1) && (d[pos8x + y] == tacouleur))
X {
X for (y = posy - 1; d[pos8x + y] == macouleur; y--)
X***************
X*** 384,390 ****
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x++, y++) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx + 1, y = posy + 1; d[(x << 3) + y] == macouleur; x++, y++)
X--- 391,397 ----
X
X for (x = posx + 1, y = posy + 1;
X (x < 7) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x++, y++) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx + 1, y = posy + 1; d[(x << 3) + y] == macouleur; x++, y++)
X***************
X*** 393,399 ****
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x--, y++) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx - 1, y = posy + 1; d[(x << 3) + y] == macouleur; x--, y++)
X--- 400,406 ----
X
X for (x = posx - 1, y = posy + 1;
X (x > 0) && (y < 7) && (d[(x << 3) + y] == macouleur);
X! x--, y++) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx - 1, y = posy + 1; d[(x << 3) + y] == macouleur; x--, y++)
X***************
X*** 402,408 ****
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x++, y--) ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx + 1, y = posy - 1; d[(x << 3) + y] == macouleur; x++, y--)
X--- 409,415 ----
X
X for (x = posx + 1, y = posy - 1;
X (x < 7) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x++, y--) continue ;
X if ((x != posx + 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx + 1, y = posy - 1; d[(x << 3) + y] == macouleur; x++, y--)
X***************
X*** 411,417 ****
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x--, y--) ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx - 1, y = posy - 1; d[(x << 3) + y] == macouleur; x--, y--)
X--- 418,424 ----
X
X for (x = posx - 1, y = posy - 1;
X (x > 0) && (y > 0) && (d[(x << 3) + y] == macouleur);
X! x--, y--) continue ;
X if ((x != posx - 1) && (d[(x << 3) + y] == tacouleur))
X {
X for (x = posx - 1, y = posy - 1; d[(x << 3) + y] == macouleur; x--, y--)
X
END_OF_FILE
if test 46204 -ne `wc -c <'patches02b'`; then
echo shar: \"'patches02b'\" unpacked with wrong size!
fi
# end of 'patches02b'
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