Refactor warnings and errors (#1728)

* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too

* Separate RGBGFX and RGBLINK warnings/errors from main options

* Separate `report` function into `error` and `fatal` messages

* Implicit newlines for most RGBASM errors
This commit is contained in:
Rangi
2025-07-08 12:58:23 -04:00
committed by GitHub
parent 991b74dd0d
commit 35962dedc4
39 changed files with 753 additions and 757 deletions

View File

@@ -47,30 +47,15 @@ set(rgbasm_src
"asm/section.cpp"
"asm/symbol.cpp"
"asm/warning.cpp"
"extern/getopt.cpp"
"extern/utf8decoder.cpp"
"diagnostics.cpp"
"error.cpp"
"linkdefs.cpp"
"opmath.cpp"
"util.cpp"
)
set(rgbfix_src
"fix/main.cpp"
)
set(rgbgfx_src
"gfx/main.cpp"
"gfx/pal_packing.cpp"
"gfx/pal_sorting.cpp"
"gfx/pal_spec.cpp"
"gfx/process.cpp"
"gfx/proto_palette.cpp"
"gfx/reverse.cpp"
"gfx/rgba.cpp"
"extern/getopt.cpp"
"error.cpp"
)
set(rgblink_src
"${BISON_LINKER_SCRIPT_PARSER_OUTPUT_SOURCE}"
"link/assign.cpp"
@@ -81,12 +66,35 @@ set(rgblink_src
"link/sdas_obj.cpp"
"link/section.cpp"
"link/symbol.cpp"
"link/warning.cpp"
"extern/getopt.cpp"
"extern/utf8decoder.cpp"
"error.cpp"
"linkdefs.cpp"
"opmath.cpp"
"util.cpp"
)
set(rgbfix_src
"fix/main.cpp"
"extern/getopt.cpp"
"error.cpp"
)
set(rgbgfx_src
"gfx/main.cpp"
"gfx/pal_packing.cpp"
"gfx/pal_sorting.cpp"
"gfx/pal_spec.cpp"
"gfx/process.cpp"
"gfx/proto_palette.cpp"
"gfx/reverse.cpp"
"gfx/rgba.cpp"
"gfx/warning.cpp"
"extern/getopt.cpp"
"error.cpp"
)
foreach(PROG "asm" "fix" "gfx" "link")
add_executable(rgb${PROG}
${rgb${PROG}_src}