Index: engine/board.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/board.c,v retrieving revision 1.102 diff -u -r1.102 board.c --- engine/board.c 25 Oct 2004 01:06:22 -0000 1.102 +++ engine/board.c 13 Nov 2004 04:43:11 -0000 @@ -1351,7 +1351,8 @@ /* Returns true if the empty vertex respectively the string at pos1 is * adjacent to the empty vertex respectively the string at pos2. */ -int are_neighbors(int pos1, int pos2) +int +are_neighbors(int pos1, int pos2) { if (board[pos1] == EMPTY) { if (board[pos2] == EMPTY) Index: engine/board.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/board.h,v retrieving revision 1.16 diff -u -r1.16 board.h --- engine/board.h 8 Sep 2004 17:03:42 -0000 1.16 +++ engine/board.h 13 Nov 2004 04:43:11 -0000 @@ -384,7 +384,7 @@ const char *location_to_string(int pos); void location_to_buffer(int pos, char *buf); -int string_to_location(int boardsize, char *str, int *m, int *n); +int string_to_location(int boardsize, const char *str, int *m, int *n); int is_hoshi_point(int m, int n); void draw_letter_coordinates(FILE *outfile); Index: engine/endgame.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/endgame.c,v retrieving revision 1.9 diff -u -r1.9 endgame.c --- engine/endgame.c 12 Apr 2004 15:22:28 -0000 1.9 +++ engine/endgame.c 13 Nov 2004 04:43:11 -0000 @@ -318,7 +318,7 @@ if (value <= 0 && num_attacks2 == 0) return; - /* We filled the liberties with stones of "other" color. That could leed to + /* We filled the liberties with stones of "other" color. That could lead to * some strange attacks, since inessential liberties are not always really * inessential (see trevorb:320 and trevorb:940 for examples where this step * is necessary). Now we fill the liberties with stones of the same color as Index: engine/genmove.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v retrieving revision 1.98 diff -u -r1.98 genmove.c --- engine/genmove.c 10 Nov 2004 16:07:07 -0000 1.98 +++ engine/genmove.c 13 Nov 2004 04:43:11 -0000 @@ -419,7 +419,7 @@ fuseki(color); gg_assert(stackp == 0); - /* Look for moves too break mirror play by the opponent. */ + /* Look for moves to break mirror play by the opponent. */ break_mirror_go(color); /* The general pattern database. */ Index: engine/gnugo.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/gnugo.h,v retrieving revision 1.115 diff -u -r1.115 gnugo.h --- engine/gnugo.h 9 Nov 2004 19:30:29 -0000 1.115 +++ engine/gnugo.h 13 Nov 2004 04:43:12 -0000 @@ -258,7 +258,6 @@ extern int mandated_owl_reading_depth; extern int mandated_owl_node_limit; -/* Keep this as 2D until we change the entire API. */ extern float potential_moves[BOARDMAX]; extern int limit_search; /* limit move search to a portion of the board */ Index: engine/hash.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/hash.c,v retrieving revision 1.30 diff -u -r1.30 hash.c --- engine/hash.c 15 Sep 2004 14:43:29 -0000 1.30 +++ engine/hash.c 13 Nov 2004 04:43:12 -0000 @@ -145,13 +145,15 @@ /* Set or remove the komaster value in the hash data. */ -void hashdata_invert_komaster(Hash_data *hd, int komaster) +void +hashdata_invert_komaster(Hash_data *hd, int komaster) { hashdata_xor(*hd, komaster_hash[komaster]); } /* Set or remove the komaster position in the hash data. */ -void hashdata_invert_kom_pos(Hash_data *hd, int kom_pos) +void +hashdata_invert_kom_pos(Hash_data *hd, int kom_pos) { hashdata_xor(*hd, kom_pos_hash[kom_pos]); } Index: engine/influence.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/influence.c,v retrieving revision 1.103 diff -u -r1.103 influence.c --- engine/influence.c 31 May 2004 13:57:50 -0000 1.103 +++ engine/influence.c 13 Nov 2004 04:43:12 -0000 @@ -863,8 +863,8 @@ add_influence_source(pos, this_color, strength, attenuation, q); DEBUG(DEBUG_INFLUENCE, - " low intensity influence source at %1m, strength %f, color %C\n", - pos, strength, this_color); + " low intensity influence source at %1m, strength %f, color %C\n", + pos, strength, this_color); return; } Index: engine/liberty.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v retrieving revision 1.230 diff -u -r1.230 liberty.h --- engine/liberty.h 8 Nov 2004 04:10:02 -0000 1.230 +++ engine/liberty.h 13 Nov 2004 04:43:12 -0000 @@ -941,7 +941,7 @@ #if 1 /* Trust DRAGON2 accesses */ #define DRAGON2(pos) dragon2[dragon[pos].id] #else -struct dragon_data2 * dragon2_func(int pos); +struct dragon_data2 *dragon2_func(int pos); #define DRAGON2(pos) (*dragon2_func(pos)) #endif Index: engine/optics.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v retrieving revision 1.95 diff -u -r1.95 optics.c --- engine/optics.c 25 Oct 2004 01:06:22 -0000 1.95 +++ engine/optics.c 13 Nov 2004 04:43:13 -0000 @@ -219,16 +219,10 @@ partition_eyespaces(struct eye_data eye[BOARDMAX], int color) { int pos; - int eye_color; if (!eye) return; - if (color == WHITE) - eye_color = WHITE; - else - eye_color = BLACK; - for (pos = BOARDMIN; pos < BOARDMAX; pos++) if (ON_BOARD(pos)) eye[pos].origin = NO_MOVE; @@ -236,7 +230,7 @@ for (pos = BOARDMIN; pos < BOARDMAX; pos++) { if (!ON_BOARD(pos)) continue; - if (eye[pos].origin == NO_MOVE && eye[pos].color == eye_color) { + if (eye[pos].origin == NO_MOVE && eye[pos].color == color) { int esize = 0; int msize = 0; @@ -463,8 +457,8 @@ return owl_lively(pos); else return (!worm[pos].inessential - && (worm[pos].attack_codes[0] == 0 - || worm[pos].defense_codes[0] != 0)); + && (worm[pos].attack_codes[0] == 0 + || worm[pos].defense_codes[0] != 0)); } @@ -545,9 +539,10 @@ /* - * originate_eye(pos, pos, *size) creates an eyeshape with origin (pos). - * the last variable returns the size. The repeated variables (pos) are due - * to the recursive definition of the function. + * originate_eye(pos, pos, *esize, *msize, eye) creates an eyeshape + * with origin pos. esize and msize return the size and the number of + * marginal vertices. The repeated variables (pos) are due to the + * recursive definition of the function. */ static void originate_eye(int origin, int pos, @@ -1197,7 +1192,7 @@ } if (add_moves) { - struct vital_eye_points* vital; + struct vital_eye_points *vital; if (eye_color == WHITE) vital = white_vital_points; else Index: engine/owl.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v retrieving revision 1.223 diff -u -r1.223 owl.c --- engine/owl.c 9 Nov 2004 15:34:48 -0000 1.223 +++ engine/owl.c 13 Nov 2004 04:43:14 -0000 @@ -189,7 +189,7 @@ int escape, int defense_pos, int max_moves); static void owl_determine_life(struct local_owl_data *owl, struct local_owl_data *second_owl, - int does_attack, + int does_attack, struct owl_move_data *moves, struct eyevalue *probable_eyes, int *eyemin, int *eyemax); @@ -199,7 +199,7 @@ struct local_owl_data *second_owl, struct owl_move_data vital_moves[MAX_MOVES], const char **live_reason, - int does_attack, + int does_attack, struct eyevalue *probable_eyes, int *eyemin, int *eyemax); static int modify_stupid_eye_vital_point(struct local_owl_data *owl, @@ -2400,8 +2400,7 @@ */ static int -do_owl_defend(int str, int *move, int *wormid, - struct local_owl_data *owl, +do_owl_defend(int str, int *move, int *wormid, struct local_owl_data *owl, int escape) { int color = board[str]; @@ -3842,10 +3841,10 @@ * heap elements first. */ if (list->counter > 0) { /* avoid malloc(0) */ - list->pattern_heap = (struct matched_pattern_data**) - malloc(list->counter * sizeof(struct matched_pattern_data*)); + list->pattern_heap = malloc(list->counter * sizeof(*(list->pattern_heap))); gg_assert(list->pattern_heap != NULL); - } else { + } + else { /* free() has defined behaviour for NULL pointer */ list->pattern_heap = NULL; } @@ -4629,7 +4628,7 @@ return 0; memset(component, -1, MAX_CUTS); - for (;;) { + for (;;) { int found_one; /* Find unidentified string. */ for (k = 0; k < graph_size; k++) @@ -4713,7 +4712,7 @@ int component_size[MAX_CUTS]; int num_components; int biggest_component = -1; - struct connection_data* conn_data; + struct connection_data *conn_data; int c_id; int pos; @@ -5528,10 +5527,10 @@ owl->lunch_attack_code[lunches] = acode; owl->lunch_attack_point[lunches] = apos; owl->lunch_defend_code[lunches] = dcode; - ASSERT1(board[apos == EMPTY], lunch); + ASSERT1(board[apos] == EMPTY, lunch); if (dcode != 0) { owl->lunch_defense_point[lunches] = dpos; - ASSERT1(board[apos == EMPTY], lunch); + ASSERT1(board[dpos] == EMPTY, lunch); } else owl->lunch_defense_point[lunches] = NO_MOVE; Index: engine/persistent.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/persistent.c,v retrieving revision 1.29 diff -u -r1.29 persistent.c --- engine/persistent.c 8 Sep 2004 17:03:42 -0000 1.29 +++ engine/persistent.c 13 Nov 2004 04:43:14 -0000 @@ -120,7 +120,7 @@ const float age_factor; /* Reduce value of old entries with this factor. */ const char *name; /* For debugging purposes. */ const compute_active_area_fn compute_active_area; - struct persistent_cache_entry* table; /* Array of actual results. */ + struct persistent_cache_entry *table; /* Array of actual results. */ int current_size; /* Current number of entries. */ int last_purge_position_number; }; Index: engine/printutils.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/printutils.c,v retrieving revision 1.48 diff -u -r1.48 printutils.c --- engine/printutils.c 28 Aug 2004 20:54:43 -0000 1.48 +++ engine/printutils.c 13 Nov 2004 04:43:14 -0000 @@ -362,7 +362,7 @@ */ int -string_to_location(int boardsize, char *str, int *m, int *n) +string_to_location(int boardsize, const char *str, int *m, int *n) { if (*str == '\0') return 0; Index: engine/readconnect.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v retrieving revision 1.86 diff -u -r1.86 readconnect.c --- engine/readconnect.c 11 Nov 2004 19:10:41 -0000 1.86 +++ engine/readconnect.c 13 Nov 2004 04:43:15 -0000 @@ -1617,7 +1617,7 @@ * the moves that prevent capture and that might also * connect. */ - if ( (ForcedMoves[0] != 0) && (Moves[0] != 0) ) + if ((ForcedMoves[0] != 0) && (Moves[0] != 0)) intersection_array(Moves, ForcedMoves); order_connection_moves(Moves, str1, str2, board[str1], @@ -2868,8 +2868,7 @@ if (stackp <= depth && (hashflags & HASH_BREAK_IN) && !has_passed - && tt_get(&ttable, BREAK_IN, str, NO_MOVE, - depth - stackp, goal_hash, + && tt_get(&ttable, BREAK_IN, str, NO_MOVE, depth - stackp, goal_hash, &retval, NULL, &xpos) == 2) { /* FIXME: Use move for move ordering if tt_get() returned 1 */ TRACE_CACHED_RESULT(retval, xpos); @@ -2897,9 +2896,7 @@ &ko_move, stackp <= ko_depth && savecode == 0)) { tried_moves++; if (!ko_move) { - int acode = recursive_block(str, goal, NULL, - - has_passed, goal_hash); + int acode = recursive_block(str, goal, NULL, has_passed, goal_hash); popgo(); if (acode == 0) { SGFTRACE(xpos, WIN, "break effective"); @@ -2912,8 +2909,7 @@ UPDATE_SAVED_KO_RESULT(savecode, savemove, acode, xpos); } else { - if (recursive_block(str, goal, NULL, - has_passed, goal_hash) != WIN) { + if (recursive_block(str, goal, NULL, has_passed, goal_hash) != WIN) { savemove = xpos; savecode = KO_B; } @@ -2946,8 +2942,7 @@ /* Can (str) connect to goal[] if the other color moves first? */ static int recursive_block(int str, const char goal[BOARDMAX], int *move, - int has_passed, - Hash_data *goal_hash) + int has_passed, Hash_data *goal_hash) { int color = board[str]; int other = OTHER_COLOR(color); @@ -3018,9 +3013,7 @@ &ko_move, stackp <= ko_depth && savecode == 0)) { tried_moves++; if (!ko_move) { - int dcode = recursive_break(str, goal, NULL, - has_passed, - goal_hash); + int dcode = recursive_break(str, goal, NULL, has_passed, goal_hash); popgo(); if (dcode == 0) { SGFTRACE(xpos, WIN, "block effective"); @@ -3049,13 +3042,13 @@ || !recursive_break(str, goal, NULL, 1, goal_hash))) { SGFTRACE(NO_MOVE, WIN, "no move, probably disconnected"); - READ_RETURN_HASH(BLOCK_OFF, str, depth - stackp, goal_hash, + READ_RETURN_HASH(BLOCK_OFF, str, depth - stackp, goal_hash, move, NO_MOVE, WIN); } if (savecode != 0) { SGFTRACE(savemove, savecode, "saved move"); - READ_RETURN_HASH(BLOCK_OFF, str, depth - stackp, goal_hash, + READ_RETURN_HASH(BLOCK_OFF, str, depth - stackp, goal_hash, move, savemove, savecode); } Index: engine/reading.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v retrieving revision 1.154 diff -u -r1.154 reading.c --- engine/reading.c 5 Nov 2004 01:19:00 -0000 1.154 +++ engine/reading.c 13 Nov 2004 04:43:16 -0000 @@ -2689,7 +2689,7 @@ /* reading_callback helper. * pushes moves onto the move list. */ static void -r_push_move(int move, int value, const char * name, +r_push_move(int move, int value, const char *name, struct reading_move_data *moves) { int k; Index: engine/score.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/score.c,v retrieving revision 1.26 diff -u -r1.26 score.c --- engine/score.c 27 May 2004 16:51:34 -0000 1.26 +++ engine/score.c 13 Nov 2004 04:43:17 -0000 @@ -552,8 +552,8 @@ for (d = 0; d < DRAGON2(pos).neighbors; d++) if (DRAGON(DRAGON2(pos).adjacent[d]).color == OTHER_COLOR(board[pos]) && (DRAGON(DRAGON2(pos).adjacent[d]).status == ALIVE - || (DRAGON(DRAGON2(pos).adjacent[d]).status == UNKNOWN && - dragon2[DRAGON2(pos).adjacent[d]].weakness < .1) + || (DRAGON(DRAGON2(pos).adjacent[d]).status == UNKNOWN + && dragon2[DRAGON2(pos).adjacent[d]].weakness < .1) || (board[pos] != color && DRAGON(DRAGON2(pos).adjacent[d]).status == CRITICAL))) return 1; Index: engine/sgffile.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/sgffile.c,v retrieving revision 1.33 diff -u -r1.33 sgffile.c --- engine/sgffile.c 9 Nov 2004 19:30:29 -0000 1.33 +++ engine/sgffile.c 13 Nov 2004 04:43:17 -0000 @@ -23,11 +23,10 @@ /* * sgffile.c * - * This file contains functions that create an SGF file on the fly. - * There can be only one file open simultaneously. - * - * See sgf/sgftree.c for more general handling of SGF trees and file I/O. + * This file used to contain functions that create an SGF file on the fly. * + * Today it contains supporting code around the more general SGF library + * found in the sgf/ directory. */ #include "gnugo.h" Index: engine/utils.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/utils.c,v retrieving revision 1.99 diff -u -r1.99 utils.c --- engine/utils.c 12 Nov 2004 05:22:48 -0000 1.99 +++ engine/utils.c 13 Nov 2004 04:43:17 -0000 @@ -296,8 +296,8 @@ sum = board[pos] + board[MIRROR_MOVE(pos)]; if (sum != EMPTY + EMPTY && sum != BLACK + WHITE) { if (strict || sum == EMPTY + WHITE || sum == EMPTY + BLACK) { - result = 0; - break; + result = 0; + break; } } } Index: engine/value_moves.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v retrieving revision 1.134 diff -u -r1.134 value_moves.c --- engine/value_moves.c 8 Nov 2004 04:10:02 -0000 1.134 +++ engine/value_moves.c 13 Nov 2004 04:43:17 -0000 @@ -567,10 +567,10 @@ int dd = NO_MOVE; int worth_trying; int save_verbose; - struct eye_data* our_eyes; - struct eye_data* your_eyes; - struct vital_eye_points * our_vital_points; - struct vital_eye_points * your_vital_points; + struct eye_data *our_eyes; + struct eye_data *your_eyes; + struct vital_eye_points *our_vital_points; + struct vital_eye_points *your_vital_points; if (verbose) gprintf("\nTrying to upgrade strategical attack and defense moves.\n"); Index: interface/main.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/interface/main.c,v retrieving revision 1.105 diff -u -r1.105 main.c --- interface/main.c 9 Nov 2004 00:45:36 -0000 1.105 +++ interface/main.c 13 Nov 2004 04:43:18 -0000 @@ -479,7 +479,7 @@ case OPT_GTP_INITIAL_ORIENTATION: orientation = atoi(gg_optarg); if (orientation < 0 || orientation > 7) { - fprintf(stderr, "Illegal orientation: %d.\n", orientation); + fprintf(stderr, "Invalid orientation: %d.\n", orientation); fprintf(stderr, "Try `gnugo --help' for more information.\n"); exit(EXIT_FAILURE); } @@ -543,7 +543,7 @@ int handicap = atoi(gg_optarg); if (handicap < 0 || handicap > MAX_HANDICAP) { - fprintf(stderr, "Illegal handicap: %d.\n", handicap); + fprintf(stderr, "Unsupported handicap: %d.\n", handicap); fprintf(stderr, "Try `gnugo --help' for more information.\n"); exit(EXIT_FAILURE); } @@ -556,7 +556,7 @@ int boardsize = atoi(gg_optarg); if (boardsize < MIN_BOARD || boardsize > MAX_BOARD) { - fprintf(stderr, "Illegal board size: %d.\n", boardsize); + fprintf(stderr, "Unsupported board size: %d.\n", boardsize); fprintf(stderr, "Try `gnugo --help' for more information.\n"); exit(EXIT_FAILURE); } @@ -1025,8 +1025,7 @@ exit(EXIT_FAILURE); } - gameinfo_play_sgftree_rot(&gameinfo, &sgftree, untilstring, - orientation); + gameinfo_play_sgftree_rot(&gameinfo, &sgftree, untilstring, orientation); } else /* Initialize and empty sgf tree if there was no infile. */ Index: interface/gtp_examples/metamachine.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/interface/gtp_examples/metamachine.c,v retrieving revision 1.5 diff -u -r1.5 metamachine.c --- interface/gtp_examples/metamachine.c 24 Jan 2004 04:04:56 -0000 1.5 +++ interface/gtp_examples/metamachine.c 13 Nov 2004 04:43:18 -0000 @@ -83,7 +83,7 @@ error("can't open pipe a"); if (pipe(pfd_b) == -1) error("can't open pipe b"); - switch(fork()) { + switch (fork()) { case -1: error("fork failed (try chopsticks)"); case 0: @@ -221,8 +221,8 @@ gprintf(stdout, "=%d PASS\n\n", id); fflush(stdout); } - else if (moves_considered == 1 || - position_value[0] > position_value[1]) { + else if (moves_considered == 1 + || position_value[0] > position_value[1]) { gprintf(to_gnugo_stream, "%s %m\n", color == BLACK ? "black" : "white", move_i[0], move_j[0]); ask_gnugo(gnugo_line, 0, "6"); @@ -294,7 +294,7 @@ int line_length = 0; char line[GTP_BUFSIZE]; - while(line_length != 1) { + while (line_length != 1) { if (!fgets(line, 128, from_gnugo_stream)) error("can't get response"); line_length = strlen(line); @@ -341,7 +341,7 @@ int vgprintf(FILE *outputfile, const char *fmt, va_list ap) { - for ( ; *fmt ; ++fmt ) { + for ( ; *fmt; ++fmt) { if (*fmt == '%') { switch (*++fmt) { case 'c': @@ -366,7 +366,7 @@ } case 's': { - char *s = va_arg(ap, char*); + char *s = va_arg(ap, char *); fputs(s, outputfile); break; } Index: interface/gtp_examples/vanilla.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/interface/gtp_examples/vanilla.c,v retrieving revision 1.4 diff -u -r1.4 vanilla.c --- interface/gtp_examples/vanilla.c 24 Jan 2004 04:04:56 -0000 1.4 +++ interface/gtp_examples/vanilla.c 13 Nov 2004 04:43:18 -0000 @@ -58,7 +58,7 @@ error("can't open pipe a"); if (pipe(pfd_b) == -1) error("can't open pipe b"); - switch(fork()) { + switch (fork()) { case -1: error("fork failed (try chopsticks)"); case 0: Index: patterns/barriers.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/barriers.db,v retrieving revision 1.67 diff -u -r1.67 barriers.db --- patterns/barriers.db 26 Oct 2004 22:04:15 -0000 1.67 +++ patterns/barriers.db 13 Nov 2004 04:43:18 -0000 @@ -1660,6 +1660,7 @@ ;oplay_attack(a,b,c,d,e,f,f) + Pattern Intrusion30a ???? @@ -1681,6 +1682,7 @@ ;oplay_connect(a,b,a,c) >return (!xplay_attack(b,c)) + Pattern Intrusion31 ooo Index: patterns/dfa-mkpat.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/dfa-mkpat.h,v retrieving revision 1.3 diff -u -r1.3 dfa-mkpat.h --- patterns/dfa-mkpat.h 8 Jun 2004 05:52:25 -0000 1.3 +++ patterns/dfa-mkpat.h 13 Nov 2004 04:43:18 -0000 @@ -206,18 +206,17 @@ }; -void dfa_graph_reset(dfa_graph *graph); - -void dfa_patterns_reset(dfa_patterns *patterns); -void dfa_patterns_clear(dfa_patterns *patterns); -void dfa_patterns_add_pattern(dfa_patterns *patterns, - const char *string, int index); -void dfa_patterns_set_last_pattern_variation(dfa_patterns *patterns, - int variation); -void dfa_patterns_select_shortest_variation(dfa_patterns *patterns); -void dfa_patterns_build_graph(dfa_patterns *patterns); -int * dfa_patterns_optimize_variations(dfa_patterns *patterns, - int iterations); +void dfa_graph_reset(dfa_graph *graph); + +void dfa_patterns_reset(dfa_patterns *patterns); +void dfa_patterns_clear(dfa_patterns *patterns); +void dfa_patterns_add_pattern(dfa_patterns *patterns, + const char *string, int index); +void dfa_patterns_set_last_pattern_variation(dfa_patterns *patterns, + int variation); +void dfa_patterns_select_shortest_variation(dfa_patterns *patterns); +void dfa_patterns_build_graph(dfa_patterns *patterns); +int *dfa_patterns_optimize_variations(dfa_patterns *patterns, int iterations); #endif /* _DFA_MKPAT_H_ */ Index: patterns/extract_fuseki.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/extract_fuseki.c,v retrieving revision 1.23 diff -u -r1.23 extract_fuseki.c --- patterns/extract_fuseki.c 25 May 2004 03:14:03 -0000 1.23 +++ patterns/extract_fuseki.c 13 Nov 2004 04:43:18 -0000 @@ -305,8 +305,8 @@ static int compare_numbers(const void *a, const void *b) { - unsigned int aa = *((const unsigned int *)a); - unsigned int bb = *((const unsigned int *)b); + unsigned int aa = *((const unsigned int *) a); + unsigned int bb = *((const unsigned int *) b); if (aa > bb) return 1; if (aa < bb) Index: patterns/fuseki.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/fuseki.db,v retrieving revision 1.42 diff -u -r1.42 fuseki.db --- patterns/fuseki.db 26 Oct 2004 22:12:33 -0000 1.42 +++ patterns/fuseki.db 13 Nov 2004 04:43:18 -0000 @@ -2061,7 +2061,7 @@ |..X*....ooo |........... |........... -+----------- ++----------- :8,sFedJ @@ -2071,7 +2071,7 @@ |..X*....def |........... |........... -+----------- ++----------- ;o_somewhere(a,b,c,d,e,f) @@ -2088,7 +2088,7 @@ |..X*....ooo |........... |........... -+----------- ++----------- :8,sFedJ @@ -2100,7 +2100,7 @@ |..X*....def |........... |........... -+----------- ++----------- ;o_somewhere(a,b,c,d,e,f) && o_somewhere(g,h) @@ -2117,7 +2117,7 @@ |..X*.....oo |........... |........... -+----------- ++----------- :8,sFedJ @@ -2130,7 +2130,7 @@ |..X*.....cd |........... |........... -+----------- ++----------- ;o_somewhere(a,b,c,d) && o_somewhere(e,f) Index: patterns/helpers.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/helpers.c,v retrieving revision 1.64 diff -u -r1.64 helpers.c --- patterns/helpers.c 10 Nov 2004 16:07:07 -0000 1.64 +++ patterns/helpers.c 13 Nov 2004 04:43:18 -0000 @@ -755,7 +755,6 @@ int thrash_around_helper(ARGS) { - int d; UNUSED(pattern); UNUSED(trans); UNUSED(move); Index: patterns/mkpat.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/mkpat.c,v retrieving revision 1.141 diff -u -r1.141 mkpat.c --- patterns/mkpat.c 13 Sep 2004 10:56:37 -0000 1.141 +++ patterns/mkpat.c 13 Nov 2004 04:43:19 -0000 @@ -2356,7 +2356,7 @@ /* ================================================================ */ #define CORNER_DB_SIZE(patterns, variations)\ - ((int) (( patterns * sizeof(struct corner_pattern)\ + ((int) ((patterns * sizeof(struct corner_pattern)\ + variations * sizeof(struct corner_variation)) / 1024)) static struct corner_variation_b corner_root; @@ -3453,7 +3453,7 @@ patno++; reset_pattern(); } - } + } if (discard_pattern) { patno--; Index: patterns/owl_attackpats.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/owl_attackpats.db,v retrieving revision 1.114 diff -u -r1.114 owl_attackpats.db --- patterns/owl_attackpats.db 24 Aug 2004 14:39:53 -0000 1.114 +++ patterns/owl_attackpats.db 13 Nov 2004 04:43:19 -0000 @@ -4656,7 +4656,7 @@ Pattern A1127a -# Same as A1127 - differnt anchor. +# Same as A1127 - different anchor. O*Y prevent connection ?XO Index: patterns/owl_defendpats.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/owl_defendpats.db,v retrieving revision 1.122 diff -u -r1.122 owl_defendpats.db --- patterns/owl_defendpats.db 10 Nov 2004 15:54:08 -0000 1.122 +++ patterns/owl_defendpats.db 13 Nov 2004 04:43:20 -0000 @@ -571,7 +571,6 @@ :8,-,value(80) - ######################################################### # # # Expanding moves on the second line # @@ -6490,7 +6489,7 @@ A.B O*. -?C? +?Co ;!same_string(A,B) && (lib(A) <= 4 || lib(B) <= 4 || lib(C) <= 4) @@ -6508,7 +6507,7 @@ A.B O*. -?C? +?CX ;!same_string(A,B) && (lib(A) <= 4 || lib(B) <= 4 || lib(C) <= 4) ;&& !oplay_connect(*,A,C) Index: patterns/patterns.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.h,v retrieving revision 1.66 diff -u -r1.66 patterns.h --- patterns/patterns.h 8 Sep 2004 17:03:42 -0000 1.66 +++ patterns/patterns.h 13 Nov 2004 04:43:20 -0000 @@ -353,7 +353,6 @@ /* pattern arrays themselves */ extern struct pattern_db pat_db; -extern struct corner_db joseki_db; extern struct pattern_db aa_attackpat_db; extern struct pattern_db owl_attackpat_db; extern struct pattern_db owl_vital_apat_db; @@ -368,6 +367,8 @@ extern struct pattern_db handipat_db; extern struct pattern_db oracle_db; +extern struct corner_db joseki_db; + extern struct fullboard_pattern fuseki19[]; extern struct fullboard_pattern fuseki13[]; extern struct fullboard_pattern fuseki9[]; Index: patterns/patterns2.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/patterns2.db,v retrieving revision 1.75 diff -u -r1.75 patterns2.db --- patterns/patterns2.db 26 Oct 2004 22:01:46 -0000 1.75 +++ patterns/patterns2.db 13 Nov 2004 04:43:20 -0000 @@ -235,6 +235,7 @@ ;lib(a)>1 + ##################### # # Connection of keima