# HG changeset patch # User Mychaela Falconia # Date 1613858052 0 # Node ID 9c10afbb745a73efb5231c9e46ec3bdddc6dbb34 # Parent 94d87d05f6c59d7104be56dceb3558d1bc5c5f72 fc-simtool: search added to file-reading commands diff -r 94d87d05f6c5 -r 9c10afbb745a simtool/pbrestore.c --- a/simtool/pbrestore.c Sat Feb 20 21:00:24 2021 +0000 +++ b/simtool/pbrestore.c Sat Feb 20 21:54:12 2021 +0000 @@ -10,6 +10,8 @@ #include #include "curfile.h" +extern FILE *open_script_input_file(); + extern char *alpha_from_file_qstring(); extern char *alpha_from_file_hex(); @@ -134,7 +136,7 @@ perror("malloc for full phonebook EF"); return(-1); } - inf = fopen(argv[2], "r"); + inf = open_script_input_file(argv[2]); if (!inf) { perror(argv[2]); free(databuf); @@ -176,7 +178,7 @@ rc = phonebook_op_common(argv[1]); if (rc < 0) return(rc); - inf = fopen(argv[2], "r"); + inf = open_script_input_file(argv[2]); if (!inf) { perror(argv[2]); return(-1); @@ -218,7 +220,7 @@ perror("malloc for full EF_LND"); return(-1); } - inf = fopen(argv[1], "r"); + inf = open_script_input_file(argv[1]); if (!inf) { perror(argv[1]); free(databuf); diff -r 94d87d05f6c5 -r 9c10afbb745a simtool/script.c --- a/simtool/script.c Sat Feb 20 21:00:24 2021 +0000 +++ b/simtool/script.c Sat Feb 20 21:54:12 2021 +0000 @@ -7,6 +7,8 @@ #include #include +extern FILE *open_script_input_file(); + cmd_exec(argc, argv) char **argv; { @@ -14,7 +16,7 @@ char linebuf[512], *cp; int lineno, retval = 0; - f = fopen(argv[1], "r"); + f = open_script_input_file(argv[1]); if (!f) { perror(argv[1]); return(-1); diff -r 94d87d05f6c5 -r 9c10afbb745a simtool/smsp_restore.c --- a/simtool/smsp_restore.c Sat Feb 20 21:00:24 2021 +0000 +++ b/simtool/smsp_restore.c Sat Feb 20 21:54:12 2021 +0000 @@ -10,6 +10,8 @@ #include #include "curfile.h" +extern FILE *open_script_input_file(); + extern char *alpha_from_file_qstring(); extern char *alpha_from_file_hex(); @@ -220,7 +222,7 @@ rc = select_ef_smsp(); if (rc < 0) return(rc); - inf = fopen(argv[1], "r"); + inf = open_script_input_file(argv[1]); if (!inf) { perror(argv[1]); return(-1);