diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-07-18 21:07:17 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-07-18 18:43:12 -0700 |
commit | 9bd1506d5999d7c41a4cf6de2f43b97939bb260e (patch) | |
tree | d3dad5bda2b167af7dfe29cad7cb532406ddb1c4 /output/nulldbg.c | |
parent | 159178f2aa516718fcb420a281c17adc8b330492 (diff) | |
download | nasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.tar.gz nasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.tar.bz2 nasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.zip |
Remove function pointers in output, simplify error handling
Remove a bunch of function pointers in the output stage; they are
never changed and don't add any value. Also make "ofile" a global
variable and let the backend use it directly.
All we ever did with these variables were stashing it in locals and
using them as-is anyway for no benefit.
Also change the global error function, nasm_error() into a true
function which invokes a function pointer internally. That lets us
use direct calls to it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output/nulldbg.c')
-rw-r--r-- | output/nulldbg.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/output/nulldbg.c b/output/nulldbg.c index 54a4580..2b985c5 100644 --- a/output/nulldbg.c +++ b/output/nulldbg.c @@ -34,19 +34,17 @@ #include "nasm.h" #include "nasmlib.h" -void null_debug_init(struct ofmt *of, void *id, FILE * fp, efunc error) +void null_debug_init(void) { - (void)of; - (void)id; - (void)fp; - (void)error; } + void null_debug_linenum(const char *filename, int32_t linenumber, int32_t segto) { (void)filename; (void)linenumber; (void)segto; } + void null_debug_deflabel(char *name, int32_t segment, int64_t offset, int is_global, char *special) { @@ -56,20 +54,24 @@ void null_debug_deflabel(char *name, int32_t segment, int64_t offset, (void)is_global; (void)special; } + void null_debug_routine(const char *directive, const char *params) { (void)directive; (void)params; } + void null_debug_typevalue(int32_t type) { (void)type; } + void null_debug_output(int type, void *param) { (void)type; (void)param; } + void null_debug_cleanup(void) { } |