From 687d1ff0172c2ae0938d805565e3efb2e840daff Mon Sep 17 00:00:00 2001 From: Zeex Date: Sun, 12 Feb 2017 20:49:08 +0600 Subject: [PATCH] Remove extra newlines from assembly listings Those new lines were added in commit 6b2119f9. This is basically an improved version of that fix. Fixes #149. --- source/compiler/sc2.c | 1 - source/compiler/sc4.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index 4b2aeaf..18a9caa 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -358,7 +358,6 @@ static void readline(unsigned char *line) cont=FALSE; do { if (inpf==NULL || pc_eofsrc(inpf)) { - pc_writeasm(outf,"\n"); /* insert a newline at the end of file */ if (cont) error(49); /* invalid line continuation */ if (inpf!=NULL && inpf!=inpf_org) diff --git a/source/compiler/sc4.c b/source/compiler/sc4.c index 9058fdc..4ee5972 100644 --- a/source/compiler/sc4.c +++ b/source/compiler/sc4.c @@ -264,7 +264,7 @@ SC_FUNC void setfiledirect(char *name) { if (sc_status==statFIRST && sc_listing) { assert(name!=NULL); - pc_writeasm(outf,"#file \""); + pc_writeasm(outf,"\n#file \""); pc_writeasm(outf,name); pc_writeasm(outf,"\"\n"); } /* if */