474
/* NULL message ID, just print the raw message */
473
/* If a NULL message ID, just print the raw message */
476
475
if (Enode->MessageId == 0)
478
477
fprintf (OutputFile, "%s\n", Enode->Message);
482
/* Decode the message ID */
484
if (Gbl_VerboseErrors)
486
fprintf (OutputFile, "%s %4.4d -",
487
AslErrorLevel[Enode->Level],
488
Enode->MessageId + ((Enode->Level+1) * 1000));
492
fprintf (OutputFile, "%s %4.4d:",
493
AslErrorLevelIde[Enode->Level],
494
Enode->MessageId + ((Enode->Level+1) * 1000));
497
MainMessage = AslMessages[Enode->MessageId];
498
ExtraMessage = Enode->Message;
500
if (Enode->LineNumber)
502
/* Main message: try to use string from AslMessages first */
509
MsgLength = strlen (MainMessage);
512
/* Use the secondary/extra message as main message */
514
MainMessage = Enode->Message;
520
MsgLength = strlen (MainMessage);
524
if (Gbl_VerboseErrors && !PrematureEOF)
528
fprintf (OutputFile, " %s",
533
SourceColumn = Enode->Column + Enode->FilenameLength + 6 + 2;
534
ErrorColumn = ASL_ERROR_LEVEL_LENGTH + 5 + 2 + 1;
536
if ((MsgLength + ErrorColumn) < (SourceColumn - 1))
538
fprintf (OutputFile, "%*s%s",
539
(int) ((SourceColumn - 1) - ErrorColumn),
544
fprintf (OutputFile, "%*s %s",
545
(int) ((SourceColumn - ErrorColumn) + 1), "^",
481
/* Decode the message ID */
483
fprintf (OutputFile, "%s %4.4d -",
484
AeDecodeExceptionLevel (Enode->Level),
485
AeBuildFullExceptionCode (Enode->Level, Enode->MessageId));
487
MainMessage = AeDecodeMessageId (Enode->MessageId);
488
ExtraMessage = Enode->Message;
490
/* If a NULL line number, just print the decoded message */
492
if (!Enode->LineNumber)
494
fprintf (OutputFile, " %s %s\n\n", MainMessage, ExtraMessage);
498
MsgLength = strlen (MainMessage);
501
/* Use the secondary/extra message as main message */
503
MainMessage = Enode->Message;
509
MsgLength = strlen (MainMessage);
513
if (Gbl_VerboseErrors && !PrematureEOF)
517
fprintf (OutputFile, " %s",
522
SourceColumn = Enode->Column + Enode->FilenameLength + 6 + 2;
523
ErrorColumn = ASL_ERROR_LEVEL_LENGTH + 5 + 2 + 1;
525
if ((MsgLength + ErrorColumn) < (SourceColumn - 1))
527
fprintf (OutputFile, "%*s%s",
528
(int) ((SourceColumn - 1) - ErrorColumn),
552
fprintf (OutputFile, " %s", MainMessage);
555
/* Print the extra info message if present */
559
fprintf (OutputFile, " (%s)", ExtraMessage);
564
fprintf (OutputFile, " and premature End-Of-File");
567
fprintf (OutputFile, "\n");
568
if (Gbl_VerboseErrors)
570
fprintf (OutputFile, "\n");
575
fprintf (OutputFile, " %s %s\n\n", MainMessage, ExtraMessage);
533
fprintf (OutputFile, "%*s %s",
534
(int) ((SourceColumn - ErrorColumn) + 1), "^",
541
fprintf (OutputFile, " %s", MainMessage);
544
/* Print the extra info message if present */
548
fprintf (OutputFile, " (%s)", ExtraMessage);
553
fprintf (OutputFile, " and premature End-Of-File");
556
fprintf (OutputFile, "\n");
557
if (Gbl_VerboseErrors)
559
fprintf (OutputFile, "\n");