comparison lwlink/trunk/src/main.c @ 115:776d8bea5b46

implement reading files
author lost
date Sun, 18 Jan 2009 04:53:57 +0000
parents c65fcec346cd
children bb3cc989e84b
comparison
equal deleted inserted replaced
114:c65fcec346cd 115:776d8bea5b46
110 parse_opts, 110 parse_opts,
111 "<input file> ...", 111 "<input file> ...",
112 "LWLINK, a HD6309 and MC6809 cross-linker" 112 "LWLINK, a HD6309 and MC6809 cross-linker"
113 }; 113 };
114 114
115 extern void read_files(void);
116
115 // main function; parse command line, set up assembler state, and run the 117 // main function; parse command line, set up assembler state, and run the
116 // assembler on the first file 118 // assembler on the first file
117 int main(int argc, char **argv) 119 int main(int argc, char **argv)
118 { 120 {
119 argp_parse(&argp, argc, argv, 0, 0, NULL); 121 argp_parse(&argp, argc, argv, 0, 0, NULL);
120 if (ninputfiles == 0) 122 if (ninputfiles == 0)
121 { 123 {
122 fprintf(stderr, "No input files\n"); 124 fprintf(stderr, "No input files\n");
123 exit(1); 125 exit(1);
124 } 126 }
127
128 // read the input files
129 read_files();
125 130
126 exit(0); 131 exit(0);
127 } 132 }