diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-04-04 21:18:57 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-04-04 21:18:57 +0000 |
commit | 0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8 (patch) | |
tree | 2d060ed4fedfc9aace2e673176570faa8ae1d376 /source/compiler/aslerror.c | |
parent | 6bb10c5e2fa82c104e57c7468335930ba9e47d4f (diff) |
Notes
Diffstat (limited to 'source/compiler/aslerror.c')
-rw-r--r-- | source/compiler/aslerror.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c index 551a2a54d0fa..5b3b483e33e2 100644 --- a/source/compiler/aslerror.c +++ b/source/compiler/aslerror.c @@ -302,12 +302,25 @@ AePrintException ( } else { - while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256)) + /* Read/write the source line, up to the maximum line length */ + + while (RActual && SourceByte && (SourceByte != '\n')) { - if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + if (Total < 256) { - printf ("[*** iASL: Write error on output file ***]\n"); - return; + /* After the max line length, we will just read the line, no write */ + + if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + { + printf ("[*** iASL: Write error on output file ***]\n"); + return; + } + } + else if (Total == 256) + { + fprintf (OutputFile, + "\n[*** iASL: Very long input line, message below refers to column %u ***]", + Enode->Column); } RActual = fread (&SourceByte, 1, 1, SourceFile); @@ -320,13 +333,6 @@ AePrintException ( } Total++; } - - if (Total >= 256) - { - fprintf (OutputFile, - "\n[*** iASL: Long input line, an error occurred at column %u ***]", - Enode->Column); - } } } } |