Add missing quotes around #file names in preprocessor output

This commit is contained in:
Zeex 2014-08-05 00:03:13 +07:00
parent 1af47f05c3
commit 5cf3b0977b
2 changed files with 4 additions and 4 deletions

View File

@ -493,9 +493,9 @@ int pc_compile(int argc, char *argv[])
strcpy(inpfname,sname); /* avoid invalid filename */
error(100,sname);
} /* if */
pc_writesrc(ftmp,(unsigned char*)"#file ");
pc_writesrc(ftmp,(unsigned char*)"#file \"");
pc_writesrc(ftmp,(unsigned char*)sname);
pc_writesrc(ftmp,(unsigned char*)"\n");
pc_writesrc(ftmp,(unsigned char*)"\"\n");
while (!pc_eofsrc(fsrc)) {
pc_readsrc(fsrc,tstring,sizeof tstring);
pc_writesrc(ftmp,tstring);

View File

@ -264,9 +264,9 @@ SC_FUNC void setfiledirect(char *name)
{
if (sc_status==statFIRST && sc_listing) {
assert(name!=NULL);
pc_writeasm(outf,"#file ");
pc_writeasm(outf,"#file \"");
pc_writeasm(outf,name);
pc_writeasm(outf,"\n");
pc_writeasm(outf,"\"\n");
} /* if */
}