comparison libcommon/hexread.c @ 129:94d87d05f6c5

libcommon: initial support for file search
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 20 Feb 2021 21:00:24 +0000
parents f7145c77b7fb
children a1aa8ee2da85
comparison
equal deleted inserted replaced
128:01aed8d0685a 129:94d87d05f6c5
3 * to be used in the implementation of manual write commands. 3 * to be used in the implementation of manual write commands.
4 */ 4 */
5 5
6 #include <sys/types.h> 6 #include <sys/types.h>
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <string.h>
9 #include <strings.h>
10 #include <stdio.h> 8 #include <stdio.h>
11 #include <stdlib.h> 9 #include <stdlib.h>
10
11 extern FILE *open_script_input_file();
12 12
13 read_hex_data_file(filename, databuf) 13 read_hex_data_file(filename, databuf)
14 char *filename; 14 char *filename;
15 u_char *databuf; 15 u_char *databuf;
16 { 16 {
17 FILE *inf; 17 FILE *inf;
18 unsigned count; 18 unsigned count;
19 int c, c2; 19 int c, c2;
20 20
21 inf = fopen(filename, "r"); 21 inf = open_script_input_file(filename);
22 if (!inf) { 22 if (!inf) {
23 perror(filename); 23 perror(filename);
24 return(-1); 24 return(-1);
25 } 25 }
26 for (count = 0; ; count++) { 26 for (count = 0; ; count++) {