diff options
author | Frank Kotler <fbkotler@users.sourceforge.net> | 2003-09-06 04:45:37 +0000 |
---|---|---|
committer | Frank Kotler <fbkotler@users.sourceforge.net> | 2003-09-06 04:45:37 +0000 |
commit | abebb08083f295ce9ce3f287c46523ef44ecf8be (patch) | |
tree | 2338407138788d5105a977bc24678de7aa46072f /assemble.c | |
parent | a75b8018b28a2b273f20ead89ecb1dcf62b061ee (diff) | |
download | nasm-abebb08083f295ce9ce3f287c46523ef44ecf8be.tar.gz nasm-abebb08083f295ce9ce3f287c46523ef44ecf8be.tar.bz2 nasm-abebb08083f295ce9ce3f287c46523ef44ecf8be.zip |
quick fix to -f obj debug format - put "static" back in assemble.c
-
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -105,8 +105,8 @@ static int chsize (operand *, int); static void out (long offset, long segto, const void *data, unsigned long type, long segment, long wrt) { - long lineno; - char *lnfname = NULL; + static long lineno = 0; /* static!!! */ + static char *lnfname = NULL; if ((type & OUT_TYPMASK) == OUT_ADDRESS) { if (segment != NO_SEG || wrt != NO_SEG) { @@ -143,6 +143,15 @@ static void out (long offset, long segto, const void *data, unsigned long type, list->output (offset, data, type); } + /* + * this call to src_get determines when we call the + * debug-format-specific "linenum" function + * it updates lineno and lnfname to the current values + * returning 0 if "same as last time", -2 if lnfname + * changed, and the amount by which lineno changed, + * if it did. thus, these variables must be static + */ + if (src_get(&lineno,&lnfname)) { outfmt->current_dfmt->linenum(lnfname,lineno,segto); |