Mercurial > hg-old > index.cgi
comparison lwasm/main.c @ 212:bae1e3ecdce1
More preparation for gnulib integration
author | lost |
---|---|
date | Fri, 24 Apr 2009 06:43:02 +0000 |
parents | 833d392fec82 |
children | 0df2a39a268c |
comparison
equal
deleted
inserted
replaced
211:51511cf1c9f8 | 212:bae1e3ecdce1 |
---|---|
20 | 20 |
21 Implements the program startup code | 21 Implements the program startup code |
22 | 22 |
23 */ | 23 */ |
24 | 24 |
25 #ifdef HAVE_CONFIG_H | 25 #include <config.h> |
26 #include "config.h" | |
27 #endif | |
28 | 26 |
29 #include <argp.h> | 27 #include <argp.h> |
30 #include <errno.h> | 28 #include <errno.h> |
31 #include <stdio.h> | 29 #include <stdio.h> |
32 #include <stdlib.h> | 30 #include <stdlib.h> |
160 parse_opts, | 158 parse_opts, |
161 "<input file>", | 159 "<input file>", |
162 "LWASM, a HD6309 and MC6809 cross-assembler" | 160 "LWASM, a HD6309 and MC6809 cross-assembler" |
163 }; | 161 }; |
164 | 162 |
163 char *program_name; | |
164 | |
165 // main function; parse command line, set up assembler state, and run the | 165 // main function; parse command line, set up assembler state, and run the |
166 // assembler on the first file | 166 // assembler on the first file |
167 int main(int argc, char **argv) | 167 int main(int argc, char **argv) |
168 { | 168 { |
169 | |
170 program_name = argv[0]; | |
171 | |
169 // assembler state | 172 // assembler state |
170 asmstate_t asmstate = { 0 }; | 173 asmstate_t asmstate = { 0 }; |
171 | 174 |
172 argp_parse(&argp, argc, argv, 0, 0, &asmstate); | 175 argp_parse(&argp, argc, argv, 0, 0, &asmstate); |
173 | 176 |