comparison lwasm/main.c @ 442:61580fc48f98

Add option to omit file names from lwasm listings Add --list-nofiles option to modify generated listing to omit the filename specification.
author William Astle <lost@l-w.ca>
date Mon, 27 Nov 2017 22:52:17 -0700
parents b138b4005125
children 141a1beb98ae
comparison
equal deleted inserted replaced
441:b138b4005125 442:61580fc48f98
44 { 44 {
45 { "output", 'o', "FILE", 0, "Output to FILE"}, 45 { "output", 'o', "FILE", 0, "Output to FILE"},
46 { "debug", 'd', "LEVEL", lw_cmdline_opt_optional, "Set debug mode"}, 46 { "debug", 'd', "LEVEL", lw_cmdline_opt_optional, "Set debug mode"},
47 { "format", 'f', "TYPE", 0, "Select output format: decb, basic, raw, obj, os9"}, 47 { "format", 'f', "TYPE", 0, "Select output format: decb, basic, raw, obj, os9"},
48 { "list", 'l', "FILE", lw_cmdline_opt_optional, "Generate list [to FILE]"}, 48 { "list", 'l', "FILE", lw_cmdline_opt_optional, "Generate list [to FILE]"},
49 { "list-nofiles", 0x104, 0, 0, "Omit file names in list output"},
49 { "symbols", 's', 0, lw_cmdline_opt_optional, "Generate symbol list in listing, no effect without --list"}, 50 { "symbols", 's', 0, lw_cmdline_opt_optional, "Generate symbol list in listing, no effect without --list"},
50 { "symbols-nolocals", 0x103, 0, lw_cmdline_opt_optional, "Same as --symbols but with local labels ignored"}, 51 { "symbols-nolocals", 0x103, 0, lw_cmdline_opt_optional, "Same as --symbols but with local labels ignored"},
51 { "tabs", 't', "WIDTH", 0, "Set tab spacing in listing (0=don't expand tabs)" }, 52 { "tabs", 't', "WIDTH", 0, "Set tab spacing in listing (0=don't expand tabs)" },
52 { "map", 'm', "FILE", lw_cmdline_opt_optional, "Generate map [to FILE]"}, 53 { "map", 'm', "FILE", lw_cmdline_opt_optional, "Generate map [to FILE]"},
53 { "decb", 'b', 0, 0, "Generate DECB .bin format output, equivalent of --format=decb"}, 54 { "decb", 'b', 0, 0, "Generate DECB .bin format output, equivalent of --format=decb"},
146 147
147 case 0x103: 148 case 0x103:
148 as -> flags |= FLAG_SYMBOLS | FLAG_SYMBOLS_NOLOCALS; 149 as -> flags |= FLAG_SYMBOLS | FLAG_SYMBOLS_NOLOCALS;
149 break; 150 break;
150 151
152 case 0x104:
153 as -> listnofile = 1;
154 break;
155
151 case 'b': 156 case 'b':
152 as -> output_format = OUTPUT_DECB; 157 as -> output_format = OUTPUT_DECB;
153 break; 158 break;
154 159
155 case 'r': 160 case 'r':