Mercurial > hg-old > index.cgi
changeset 212:bae1e3ecdce1
More preparation for gnulib integration
author | lost |
---|---|
date | Fri, 24 Apr 2009 06:43:02 +0000 |
parents | 51511cf1c9f8 |
children | c40960370fd8 |
files | lwar/add.c lwar/extract.c lwar/list.c lwar/lwar.c lwar/main.c lwar/remove.c lwar/replace.c lwar/util.c lwasm/expr.c lwasm/insn_bitbit.c lwasm/insn_gen.c lwasm/insn_indexed.c lwasm/insn_inh.c lwasm/insn_logicmem.c lwasm/insn_rel.c lwasm/insn_rlist.c lwasm/insn_rtor.c lwasm/insn_tfm.c lwasm/instab.c lwasm/list.c lwasm/lwasm.c lwasm/lwval.c lwasm/macro.c lwasm/main.c lwasm/output.c lwasm/parse.c lwasm/pass1.c lwasm/pass2.c lwasm/pragma.c lwasm/pseudo.c lwasm/symbol.c lwasm/util.c lwlink/expr.c lwlink/link.c lwlink/lwlink.c lwlink/main.c lwlink/map.c lwlink/objdump.c lwlink/output.c lwlink/readfiles.c lwlink/script.c lwlink/util.c |
diffstat | 42 files changed, 60 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/lwar/add.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/add.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwar/extract.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/extract.c Fri Apr 24 06:43:02 2009 +0000 @@ -19,9 +19,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwar/list.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/list.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwar/lwar.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/lwar.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <stdio.h> #include <stdlib.h>
--- a/lwar/main.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/main.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <argp.h> #include <errno.h> @@ -39,6 +37,7 @@ // command line option handling const char *argp_program_version = "LWAR from " PACKAGE_STRING; const char *argp_program_bug_address = PACKAGE_BUGREPORT; +char *program_name; static error_t parse_opts(int key, char *arg, struct argp_state *state) { @@ -131,6 +130,7 @@ // assembler on the first file int main(int argc, char **argv) { + program_name = argv[0]; argp_parse(&argp, argc, argv, 0, 0, NULL); if (archive_file == NULL) {
--- a/lwar/remove.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/remove.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include "lwar.h"
--- a/lwar/replace.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/replace.c Fri Apr 24 06:43:02 2009 +0000 @@ -19,9 +19,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwar/util.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwar/util.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,6 +23,7 @@ */ #define __util_c_seen__ +#include <config.h> #include <malloc.h> #include <stdio.h>
--- a/lwasm/expr.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/expr.c Fri Apr 24 06:43:02 2009 +0000 @@ -24,6 +24,8 @@ #define __expr_c_seen__ +#include <config.h> + #include <ctype.h> #include <stdlib.h> #include <string.h>
--- a/lwasm/insn_bitbit.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_bitbit.c Fri Apr 24 06:43:02 2009 +0000 @@ -24,6 +24,7 @@ #define __insn_bitbit_c_seen__ +#include <config.h> #include <stdlib.h> #include "lwasm.h"
--- a/lwasm/insn_gen.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_gen.c Fri Apr 24 06:43:02 2009 +0000 @@ -19,6 +19,8 @@ Contains code for parsing general addressing modes (IMM+DIR+EXT+IND) */ +#include <config.h> + #include <ctype.h> #include <stdlib.h>
--- a/lwasm/insn_indexed.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_indexed.c Fri Apr 24 06:43:02 2009 +0000 @@ -24,6 +24,8 @@ #define __insn_indexed_c_seen__ +#include <config.h> + #include <ctype.h> #include <string.h>
--- a/lwasm/insn_inh.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_inh.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,6 +23,7 @@ */ #define __insn_inh_c_seen__ +#include <config.h> #include "lwasm.h" #include "instab.h"
--- a/lwasm/insn_logicmem.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_logicmem.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,6 +20,7 @@ Contains code for handling logic/mem instructions */ +#include <config.h> #include <ctype.h> #include <stdio.h> #include <string.h>
--- a/lwasm/insn_rel.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_rel.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __insn_rel_c_seen__ - +#include <config.h> #include <stdlib.h> #include "expr.h"
--- a/lwasm/insn_rlist.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_rlist.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __insn_rlist_c_seen__ - +#include <config.h> #include "lwasm.h" #include "instab.h"
--- a/lwasm/insn_rtor.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_rtor.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __insn_rtor_c_seen__ - +#include <config.h> #include "lwasm.h" #include "instab.h"
--- a/lwasm/insn_tfm.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/insn_tfm.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __insn_tfm_c_seen__ - +#include <config.h> #include <ctype.h> #include <string.h>
--- a/lwasm/instab.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/instab.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,9 +20,9 @@ Contains the instruction table for assembling code */ +#include <config.h> #include <stdlib.h> - #define __instab_c_seen__ #include "instab.h"
--- a/lwasm/list.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/list.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,6 +21,7 @@ */ #define __list_c_seen__ +#include <config.h> #include <stdio.h> #include <stdlib.h>
--- a/lwasm/lwasm.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/lwasm.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,6 +22,7 @@ */ #define __lwasm_c_seen__ +#include <config.h> #include <stdarg.h> #include <stdlib.h>
--- a/lwasm/lwval.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/lwval.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,6 +23,7 @@ used by LWASM. */ +#include <config.h> #include <malloc.h>
--- a/lwasm/macro.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/macro.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,6 +20,8 @@ Contains stuff associated with macro processing */ +#include <config.h> + #include <ctype.h> #include <stdlib.h> #include <string.h>
--- a/lwasm/main.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/main.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <argp.h> #include <errno.h> @@ -162,10 +160,15 @@ "LWASM, a HD6309 and MC6809 cross-assembler" }; +char *program_name; + // main function; parse command line, set up assembler state, and run the // assembler on the first file int main(int argc, char **argv) { + + program_name = argv[0]; + // assembler state asmstate_t asmstate = { 0 };
--- a/lwasm/output.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/output.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,7 +20,7 @@ Contains the code for actually outputting the assembled code */ - +#include <config.h> //#include <ctype.h> #include <errno.h> #include <stdio.h>
--- a/lwasm/parse.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/parse.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,6 +23,7 @@ */ #define __parse_c_seen__ +#include <config.h> #include <ctype.h> #include <string.h>
--- a/lwasm/pass1.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/pass1.c Fri Apr 24 06:43:02 2009 +0000 @@ -49,9 +49,7 @@ code portability (like *pragma). */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwasm/pass2.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/pass2.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include "lwasm.h"
--- a/lwasm/pragma.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/pragma.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,7 +20,7 @@ This file contains stuff associated with lwasm specific strangeness */ - +#include <config.h> #include <ctype.h> #include <stdlib.h> #include <string.h>
--- a/lwasm/pseudo.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/pseudo.c Fri Apr 24 06:43:02 2009 +0000 @@ -20,7 +20,7 @@ This file implements the various pseudo operations. */ - +#include <config.h> #include <stdlib.h> #include <string.h> #include "lwasm.h"
--- a/lwasm/symbol.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/symbol.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __symbol_c_seen__ - +#include <config.h> #include <string.h> #include "lwasm.h"
--- a/lwasm/util.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwasm/util.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,7 +23,7 @@ */ #define __util_c_seen__ - +#include <config.h> #include <malloc.h> #include <stdio.h> #include <stdlib.h>
--- a/lwlink/expr.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/expr.c Fri Apr 24 06:43:02 2009 +0000 @@ -23,6 +23,7 @@ */ #define __expr_c_seen__ +#include <config.h> #include <ctype.h> #include <stdlib.h>
--- a/lwlink/link.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/link.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,9 +21,7 @@ Resolve section and symbol addresses; handle incomplete references */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <stdio.h> #include <stdlib.h>
--- a/lwlink/lwlink.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/lwlink.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,9 +21,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #define __lwlink_c_seen__
--- a/lwlink/main.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/main.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <argp.h> #include <errno.h> @@ -34,6 +32,8 @@ #include "lwlink.h" +char *program_name; + // command line option handling const char *argp_program_version = "LWLINK from " PACKAGE_STRING; const char *argp_program_bug_address = PACKAGE_BUGREPORT; @@ -158,6 +158,8 @@ // assembler on the first file int main(int argc, char **argv) { + program_name = argv[0]; + argp_parse(&argp, argc, argv, 0, 0, NULL); if (ninputfiles == 0) {
--- a/lwlink/map.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/map.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,9 +21,7 @@ Output information about the linking process */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <errno.h> #include <stdio.h>
--- a/lwlink/objdump.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/objdump.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,7 +21,7 @@ A standalone program to dump an object file in a text form to stdout */ - +#include <config.h> #include <stdio.h> #include <stdlib.h> @@ -32,6 +32,7 @@ #endif void read_lwobj16v0(unsigned char *filedata, long filesize); +char *program_name; /* The logic of reading the entire file into memory is simple. All the symbol @@ -45,7 +46,8 @@ FILE *f; long bread; unsigned char *filedata; - + + program_name = argv[0]; if (argc != 2) { fprintf(stderr, "Must specify exactly one input file.\n");
--- a/lwlink/output.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/output.c Fri Apr 24 06:43:02 2009 +0000 @@ -21,9 +21,7 @@ Actually output the binary */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <stdio.h> #include <stdlib.h>
--- a/lwlink/readfiles.c Fri Apr 24 06:27:00 2009 +0000 +++ b/lwlink/readfiles.c Fri Apr 24 06:43:02 2009 +0000 @@ -22,9 +22,7 @@ */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include <config.h> #include <argp.h> #include <errno.h>