diff options
Diffstat (limited to 'tools/301_solve_file')
| -rw-r--r-- | tools/301_solve_file/solve_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/301_solve_file/solve_file.c b/tools/301_solve_file/solve_file.c index a1277e3..a8f0925 100644 --- a/tools/301_solve_file/solve_file.c +++ b/tools/301_solve_file/solve_file.c | |||
| @@ -38,7 +38,8 @@ void run(void) { | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | int main(int argc, char **argv) { | 40 | int main(int argc, char **argv) { |
| 41 | char filename[255], dataid[NISSY_SIZE_DATAID], *scrfilename; | 41 | char filename[7+NISSY_SIZE_DATAID], dataid[NISSY_SIZE_DATAID]; |
| 42 | char *scrfilename; | ||
| 42 | FILE *scrfile; | 43 | FILE *scrfile; |
| 43 | 44 | ||
| 44 | if (argc < 3) { | 45 | if (argc < 3) { |
| @@ -60,12 +61,11 @@ int main(int argc, char **argv) { | |||
| 60 | srand(time(NULL)); | 61 | srand(time(NULL)); |
| 61 | nissy_setlogger(log_stderr, NULL); | 62 | nissy_setlogger(log_stderr, NULL); |
| 62 | 63 | ||
| 63 | sprintf(filename, "tables/%s", solver); | 64 | size = nissy_solverinfo(solver, dataid); |
| 65 | sprintf(filename, "tables/%s", dataid); | ||
| 64 | if (getdata(solver, &buf, filename) != 0) | 66 | if (getdata(solver, &buf, filename) != 0) |
| 65 | return 1; | 67 | return 1; |
| 66 | 68 | ||
| 67 | size = nissy_solverinfo(solver, dataid); | ||
| 68 | |||
| 69 | if ((scrfile = fopen(scrfilename, "r")) == NULL) { | 69 | if ((scrfile = fopen(scrfilename, "r")) == NULL) { |
| 70 | printf("Error: could not read given file '%s'.\n", | 70 | printf("Error: could not read given file '%s'.\n", |
| 71 | scrfilename); | 71 | scrfilename); |
