--- lib/combinations.c~ 2009-01-01 14:12:46.000000000 -0800 +++ lib/combinations.c 2009-01-01 14:42:53.000000000 -0800 @@ -91,7 +91,8 @@ break; } } - if (firstIncr == -1) { printf("BUG!\n"); exit(1); } + if (firstIncr == -1) + return NULL; for (i=0; icombos[i][j] = combo->combos[i][j-1]; for (i=firstIncr+1; inelem; i++) --- lib/evx_generate.c~ 2009-01-01 14:12:18.000000000 -0800 +++ lib/evx_generate.c 2009-01-01 14:12:34.000000000 -0800 @@ -69,7 +69,7 @@ fp = fopen ("evx_preamble.cfrag", "r"); if (fp == NULL) { fprintf (stderr, "Unable to read evx_preamble.c\n"); - exit (-1); + return -1; } puts("/* This file is machine-generated -- DO NOT EDIT! */\n"); { --- include/enumerate.h~ 2009-01-01 17:06:31.000000000 -0800 +++ include/enumerate.h 2009-01-01 17:09:40.000000000 -0800 @@ -641,7 +641,7 @@ if (!deck##_CardMask_ANY_SET(_unavail, set_var[_i])) \ break; /* this hand is available for player i */ \ } \ - if (_j == _ncombo[_i]) { printf("not enough cards\n"); exit(1); } \ + if (_j == _ncombo[_i]) { printf("not enough cards\n"); return(1); } \ deck##_CardMask_OR(_unavail, _unavail, set_var[_i]); \ _curIndex[_i] = _j; \ } \