FreeCalypso > hg > fc-pcsc-tools
comparison uicc/script.c @ 133:ede661d78730
fc-uicc-tool: command shell features match fc-simtool
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 20 Feb 2021 22:30:54 +0000 |
parents | 1b1468869ccf |
children |
comparison
equal
deleted
inserted
replaced
132:d991944aa5f3 | 133:ede661d78730 |
---|---|
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <string.h> | 7 #include <string.h> |
8 #include <strings.h> | 8 #include <strings.h> |
9 | 9 |
10 extern FILE *open_script_input_file(); | |
11 | |
10 cmd_exec(argc, argv) | 12 cmd_exec(argc, argv) |
11 char **argv; | 13 char **argv; |
12 { | 14 { |
13 FILE *f; | 15 FILE *f; |
14 char linebuf[512], *cp; | 16 char linebuf[512], *cp; |
15 int lineno, retval = 0; | 17 int lineno, retval = 0; |
16 | 18 |
17 f = fopen(argv[1], "r"); | 19 f = open_script_input_file(argv[1]); |
18 if (!f) { | 20 if (!f) { |
19 perror(argv[1]); | 21 perror(argv[1]); |
20 return(-1); | 22 return(-1); |
21 } | 23 } |
22 for (lineno = 1; fgets(linebuf, sizeof linebuf, f); lineno++) { | 24 for (lineno = 1; fgets(linebuf, sizeof linebuf, f); lineno++) { |