2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 char program_name
[MAX_STRING
];
24 int main(int argc
, char **argv
)
28 #ifdef STATISTIC_COUNTERS
29 snprintf(program_name
, MAX_STRING
, "owl %s, build %s", PACKAGE_VERSION
, __DATE__
);
31 snprintf(program_name
, MAX_STRING
, "owl %s", PACKAGE_VERSION
);
33 /* turn off I/O buffering */
37 initialize_bitboards();
42 /* parse command line parameters */
43 while ((opt
= getopt(argc
, argv
, "h:p:")) != -1)
46 if ((e
.main_hash_size
= atoi(optarg
)) <= 0)
47 e
.main_hash_enabled
= FALSE
;
50 if ((e
.pawn_hash_size
= atoi(optarg
)) <= 0)
51 e
.pawn_hash_enabled
= FALSE
;
55 /* allocate memory for hashtables */
56 if (initialize_pawn_hashtable()) {
57 e
.pawn_hash_enabled
= FALSE
;
58 fprintf(stderr
, "Can't allocate pawn hashtable!\n");
60 if (initialize_main_hashtable()) {
61 e
.main_hash_enabled
= FALSE
;
62 fprintf(stderr
, "Can't allocate main hashtable!\n");
65 /* clear transposition tables */
66 clear_pawn_hashtable();
67 clear_main_hashtable();