comparison bootmatch/comp_main.c @ 9:bfcc8180cf3c

bootmatch compiler written
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 10 Jun 2023 02:55:29 +0000
parents
children
comparison
equal deleted inserted replaced
8:304ac8119c8a 9:bfcc8180cf3c
1 /*
2 * This C module is the main for our bootmatch compiler.
3 */
4
5 #include <sys/types.h>
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include "comp_defs.h"
9
10 u_char boot_image[BOOT_BLOCK_SIZE];
11 struct range range_list[MAX_RANGES];
12 unsigned range_count;
13 char *output_array_name;
14
15 main(argc, argv)
16 char **argv;
17 {
18 if (argc != 5) {
19 fprintf(stderr,
20 "usage: %s bin-file ranges-file array-name output-file\n",
21 argv[0]);
22 exit(1);
23 }
24 read_bin_file(argv[1]);
25 read_ranges_file(argv[2]);
26 output_array_name = argv[3];
27 emit_output_file(argv[4]);
28 exit(0);
29 }