X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fz80%2Fmain.c;fp=src%2Fz80%2Fmain.c;h=dbd02319366655b3caffc1abaf5080ac3e7921e8;hb=6210487131834e13c9a50d4eb9739f9036bb66e0;hp=23089afe534d22690a8ad91b345c24ee6638c494;hpb=95a483ef7dbd98e5fb89b90cacd065d471e8c721;p=fw%2Fsdcc diff --git a/src/z80/main.c b/src/z80/main.c index 23089afe..dbd02319 100644 --- a/src/z80/main.c +++ b/src/z80/main.c @@ -59,8 +59,8 @@ static OPTION _z80_options[] = { 0, OPTION_CALLEE_SAVES_BC, &z80_opts.calleeSavesBC, "Force a called function to always save BC" }, { 0, OPTION_PORTMODE, NULL, "Determine PORT I/O mode (z80/z180)" }, { 0, OPTION_ASM, NULL, "Define assembler name (rgbds/asxxxx/isas/z80asm)" }, - { 0, OPTION_CODE_SEG, NULL, " use this name for the code segment" }, - { 0, OPTION_CONST_SEG, NULL, " use this name for the const segment" }, + { 0, OPTION_CODE_SEG, &options.code_seg, " use this name for the code segment", CLAT_STRING }, + { 0, OPTION_CONST_SEG, &options.const_seg, " use this name for the const segment", CLAT_STRING }, { 0, OPTION_NO_STD_CRT0, &options.no_std_crt0, "For the z80/gbz80 do not link default crt0.o"}, { 0, NULL } }; @@ -70,8 +70,8 @@ static OPTION _gbz80_options[] = { 0, OPTION_BO, NULL, " use code bank " }, { 0, OPTION_BA, NULL, " use data bank " }, { 0, OPTION_CALLEE_SAVES_BC, &z80_opts.calleeSavesBC, "Force a called function to always save BC" }, - { 0, OPTION_CODE_SEG, NULL, " use this name for the code segment" }, - { 0, OPTION_CONST_SEG, NULL, " use this name for the const segment" }, + { 0, OPTION_CODE_SEG, &options.code_seg, " use this name for the code segment", CLAT_STRING }, + { 0, OPTION_CONST_SEG, &options.const_seg, " use this name for the const segment", CLAT_STRING }, { 0, OPTION_NO_STD_CRT0, &options.no_std_crt0, "For the z80/gbz80 do not link default crt0.o"}, { 0, NULL } }; @@ -463,18 +463,6 @@ _parseOptions (int *pargc, char **argv, int *i) return TRUE; } } - else if (!strcmp (argv[*i], OPTION_CODE_SEG)) - { - if (options.code_seg) Safe_free(options.code_seg); - options.code_seg = Safe_strdup(getStringArg (OPTION_CODE_SEG, argv, i, *pargc)); - return TRUE; - } - else if (!strcmp (argv[*i], OPTION_CONST_SEG)) - { - if (options.const_seg) Safe_free(options.const_seg); - options.const_seg = Safe_strdup(getStringArg (OPTION_CONST_SEG, argv, i, *pargc)); - return TRUE; - } } return FALSE; }