summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/listing.c7
-rw-r--r--asm/nasm.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/asm/listing.c b/asm/listing.c
index 3101a258..9b101ff4 100644
--- a/asm/listing.c
+++ b/asm/listing.c
@@ -148,6 +148,8 @@ static void list_cleanup(void)
static void list_init(const char *fname)
{
+ enum file_flags flags = NF_TEXT;
+
if (listfp)
list_cleanup();
@@ -156,7 +158,10 @@ static void list_init(const char *fname)
return;
}
- listfp = nasm_open_write(fname, NF_TEXT);
+ if (list_option('w'))
+ flags |= NF_IOLBF;
+
+ listfp = nasm_open_write(fname, flags);
if (!listfp) {
nasm_nonfatal("unable to open listing file `%s'", fname);
return;
diff --git a/asm/nasm.c b/asm/nasm.c
index 07a360b2..a30831dc 100644
--- a/asm/nasm.c
+++ b/asm/nasm.c
@@ -2067,6 +2067,7 @@ static void help(FILE *out)
" -Lm show multi-line macro calls with expanded parmeters\n"
" -Lp output a list file every pass, in case of errors\n"
" -Ls show all single-line macro definitions\n"
+ " -Lw flush the output after every line\n"
" -L+ enable all listing options (very verbose!)\n"
"\n"
" -Oflags... optimize opcodes, immediates and branch offsets\n"