mirror of
https://github.com/cc65/cc65.git
synced 2025-03-04 00:30:35 +00:00
Fixed a problem with line continuations and -T
git-svn-id: svn://svn.cc65.org/cc65/trunk@1893 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
0c50092c3e
commit
0293cc4bc0
@ -1282,9 +1282,21 @@ void CS_Output (const CodeSeg* S, FILE* F)
|
|||||||
/* Line info has changed, remember the new line info */
|
/* Line info has changed, remember the new line info */
|
||||||
LI = E->LI;
|
LI = E->LI;
|
||||||
|
|
||||||
/* Add the source line as a comment */
|
/* Add the source line as a comment. Beware: When line continuation
|
||||||
|
* was used, the line may contain newlines.
|
||||||
|
*/
|
||||||
if (AddSource) {
|
if (AddSource) {
|
||||||
fprintf (F, ";\n; %s\n;\n", LI->Line);
|
const char* L = LI->Line;
|
||||||
|
fputs (";\n; ", F);
|
||||||
|
while (*L) {
|
||||||
|
if (*L == '\n') {
|
||||||
|
fputs ("\n; ", F);
|
||||||
|
} else {
|
||||||
|
fputc (*L, F);
|
||||||
|
}
|
||||||
|
++L;
|
||||||
|
}
|
||||||
|
fputs ("\n;\n", F);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add line debug info */
|
/* Add line debug info */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user