Deleted Added
full compact
aslerror.c (237412) aslerror.c (240716)
1
2/******************************************************************************
3 *
4 * Module Name: aslerror - Error handling and statistics
5 *
6 *****************************************************************************/
7
8/*

--- 169 unchanged lines hidden (view full) ---

178 char *MainMessage;
179 char *ExtraMessage;
180 UINT32 SourceColumn;
181 UINT32 ErrorColumn;
182 FILE *OutputFile;
183 FILE *SourceFile = NULL;
184 long FileSize;
185 BOOLEAN PrematureEOF = FALSE;
1
2/******************************************************************************
3 *
4 * Module Name: aslerror - Error handling and statistics
5 *
6 *****************************************************************************/
7
8/*

--- 169 unchanged lines hidden (view full) ---

178 char *MainMessage;
179 char *ExtraMessage;
180 UINT32 SourceColumn;
181 UINT32 ErrorColumn;
182 FILE *OutputFile;
183 FILE *SourceFile = NULL;
184 long FileSize;
185 BOOLEAN PrematureEOF = FALSE;
186 UINT32 Total = 0;
186
187
188 if (Gbl_NoErrors)
189 {
190 return;
191 }
192
193 /*

--- 101 unchanged lines hidden (view full) ---

295 {
296 RActual = fread (&SourceByte, 1, 1, SourceFile);
297 if (!RActual)
298 {
299 fprintf (OutputFile,
300 "[*** iASL: Read error on source code temp file %s ***]",
301 Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
302 }
187
188
189 if (Gbl_NoErrors)
190 {
191 return;
192 }
193
194 /*

--- 101 unchanged lines hidden (view full) ---

296 {
297 RActual = fread (&SourceByte, 1, 1, SourceFile);
298 if (!RActual)
299 {
300 fprintf (OutputFile,
301 "[*** iASL: Read error on source code temp file %s ***]",
302 Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
303 }
303
304 else while (RActual && SourceByte && (SourceByte != '\n'))
304 else
305 {
305 {
306 fwrite (&SourceByte, 1, 1, OutputFile);
307 RActual = fread (&SourceByte, 1, 1, SourceFile);
306 while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256))
307 {
308 fwrite (&SourceByte, 1, 1, OutputFile);
309 RActual = fread (&SourceByte, 1, 1, SourceFile);
310 Total++;
311 }
312
313 if (Total >= 256)
314 {
315 fprintf (OutputFile,
316 "\n[*** iASL: Long input line, an error occurred at column %u ***]",
317 Enode->Column);
318 }
308 }
309 }
310 }
311
312 fprintf (OutputFile, "\n");
313 }
314 }
315 }

--- 60 unchanged lines hidden (view full) ---

376 }
377
378 MsgLength = strlen (MainMessage);
379 ExtraMessage = NULL;
380 }
381
382 if (Gbl_VerboseErrors && !PrematureEOF)
383 {
319 }
320 }
321 }
322
323 fprintf (OutputFile, "\n");
324 }
325 }
326 }

--- 60 unchanged lines hidden (view full) ---

387 }
388
389 MsgLength = strlen (MainMessage);
390 ExtraMessage = NULL;
391 }
392
393 if (Gbl_VerboseErrors && !PrematureEOF)
394 {
384 SourceColumn = Enode->Column + Enode->FilenameLength + 6 + 2;
385 ErrorColumn = ASL_ERROR_LEVEL_LENGTH + 5 + 2 + 1;
386
387 if ((MsgLength + ErrorColumn) < (SourceColumn - 1))
395 if (Total >= 256)
388 {
396 {
389 fprintf (OutputFile, "%*s%s",
390 (int) ((SourceColumn - 1) - ErrorColumn),
391 MainMessage, " ^ ");
397 fprintf (OutputFile, " %s",
398 MainMessage);
392 }
393 else
394 {
399 }
400 else
401 {
395 fprintf (OutputFile, "%*s %s",
396 (int) ((SourceColumn - ErrorColumn) + 1), "^",
397 MainMessage);
402 SourceColumn = Enode->Column + Enode->FilenameLength + 6 + 2;
403 ErrorColumn = ASL_ERROR_LEVEL_LENGTH + 5 + 2 + 1;
404
405 if ((MsgLength + ErrorColumn) < (SourceColumn - 1))
406 {
407 fprintf (OutputFile, "%*s%s",
408 (int) ((SourceColumn - 1) - ErrorColumn),
409 MainMessage, " ^ ");
410 }
411 else
412 {
413 fprintf (OutputFile, "%*s %s",
414 (int) ((SourceColumn - ErrorColumn) + 1), "^",
415 MainMessage);
416 }
398 }
399 }
400 else
401 {
402 fprintf (OutputFile, " %s", MainMessage);
403 }
404
405 /* Print the extra info message if present */

--- 363 unchanged lines hidden ---
417 }
418 }
419 else
420 {
421 fprintf (OutputFile, " %s", MainMessage);
422 }
423
424 /* Print the extra info message if present */

--- 363 unchanged lines hidden ---