Add -E option to rgbds, allows exporting all labels by default

This commit is contained in:
Sanqui
2015-10-12 13:54:04 +02:00
parent 6438ae2591
commit 338c176b37
6 changed files with 41 additions and 15 deletions

View File

@@ -257,7 +257,7 @@ static void
usage(void)
{
printf(
"Usage: rgbasm [-hv] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
"Usage: rgbasm [-hvE] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
" [-o outfile] [-p pad_value] file.asm\n");
exit(1);
}
@@ -296,12 +296,13 @@ main(int argc, char *argv[])
DefaultOptions.fillchar = 0;
DefaultOptions.verbose = false;
DefaultOptions.haltnop = true;
DefaultOptions.exportall = false;
opt_SetCurrentOptions(&DefaultOptions);
newopt = CurrentOptions;
while ((ch = getopt(argc, argv, "b:D:g:hi:o:p:v")) != -1) {
while ((ch = getopt(argc, argv, "b:D:g:hi:o:p:vE")) != -1) {
switch (ch) {
case 'b':
if (strlen(optarg) == 2) {
@@ -348,6 +349,9 @@ main(int argc, char *argv[])
case 'v':
newopt.verbose = true;
break;
case 'E':
newopt.exportall = true;
break;
default:
usage();
}
@@ -379,6 +383,7 @@ main(int argc, char *argv[])
nPass = 1;
nErrors = 0;
sym_PrepPass1();
sym_SetExportAll(CurrentOptions.exportall);
fstk_Init(tzMainfile);
opt_ParseDefines();