Deleted Added
full compact
asllisting.c (241973) asllisting.c (243347)
1/******************************************************************************
2 *
3 * Module Name: asllisting - Listing file generation
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

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

130 void);
131
132static ACPI_STATUS
133LsTreeWriteWalk (
134 ACPI_PARSE_OBJECT *Op,
135 UINT32 Level,
136 void *Context);
137
1/******************************************************************************
2 *
3 * Module Name: asllisting - Listing file generation
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

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

130 void);
131
132static ACPI_STATUS
133LsTreeWriteWalk (
134 ACPI_PARSE_OBJECT *Op,
135 UINT32 Level,
136 void *Context);
137
138static UINT32
139LsReadAmlOutputFile (
140 UINT8 *Buffer);
138
141
142
139/*******************************************************************************
140 *
141 * FUNCTION: LsTreeWriteWalk
142 *
143 * PARAMETERS: ASL_WALK_CALLBACK
144 *
145 *
146 * RETURN: None.

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

1277 /* No other output types supported */
1278 break;
1279 }
1280}
1281
1282
1283/*******************************************************************************
1284 *
143/*******************************************************************************
144 *
145 * FUNCTION: LsTreeWriteWalk
146 *
147 * PARAMETERS: ASL_WALK_CALLBACK
148 *
149 *
150 * RETURN: None.

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

1281 /* No other output types supported */
1282 break;
1283 }
1284}
1285
1286
1287/*******************************************************************************
1288 *
1289 * FUNCTION: LsReadAmlOutputFile
1290 *
1291 * PARAMETERS: Buffer - Where to return data
1292 *
1293 * RETURN: None.
1294 *
1295 * DESCRIPTION: Read a line of the AML output prior to formatting the data
1296 *
1297 ******************************************************************************/
1298
1299static UINT32
1300LsReadAmlOutputFile (
1301 UINT8 *Buffer)
1302{
1303 UINT32 Actual;
1304
1305
1306 Actual = fread (Buffer, 1, HEX_TABLE_LINE_SIZE,
1307 Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
1308
1309 if (ferror (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle))
1310 {
1311 FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ);
1312 AslAbort ();
1313 }
1314
1315 return (Actual);
1316}
1317
1318
1319/*******************************************************************************
1320 *
1285 * FUNCTION: LsDoHexOutputC
1286 *
1287 * PARAMETERS: None
1288 *
1289 * RETURN: None.
1290 *
1291 * DESCRIPTION: Create the hex output file. This is the same data as the AML
1292 * output file, but formatted into hex/ascii bytes suitable for

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

1314 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n",
1315 AmlFileSize);
1316 FlPrintFile (ASL_FILE_HEX_OUTPUT, "unsigned char AmlCode[] =\n{\n");
1317
1318 while (Offset < AmlFileSize)
1319 {
1320 /* Read enough bytes needed for one output line */
1321
1321 * FUNCTION: LsDoHexOutputC
1322 *
1323 * PARAMETERS: None
1324 *
1325 * RETURN: None.
1326 *
1327 * DESCRIPTION: Create the hex output file. This is the same data as the AML
1328 * output file, but formatted into hex/ascii bytes suitable for

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

1350 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n",
1351 AmlFileSize);
1352 FlPrintFile (ASL_FILE_HEX_OUTPUT, "unsigned char AmlCode[] =\n{\n");
1353
1354 while (Offset < AmlFileSize)
1355 {
1356 /* Read enough bytes needed for one output line */
1357
1322 LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE,
1323 Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
1358 LineLength = LsReadAmlOutputFile (FileData);
1324 if (!LineLength)
1325 {
1326 break;
1327 }
1328
1329 FlPrintFile (ASL_FILE_HEX_OUTPUT, " ");
1330
1331 for (i = 0; i < LineLength; i++)

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

1402 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n",
1403 AmlFileSize);
1404 FlPrintFile (ASL_FILE_HEX_OUTPUT, " Name (BUF1, Buffer()\n {\n");
1405
1406 while (Offset < AmlFileSize)
1407 {
1408 /* Read enough bytes needed for one output line */
1409
1359 if (!LineLength)
1360 {
1361 break;
1362 }
1363
1364 FlPrintFile (ASL_FILE_HEX_OUTPUT, " ");
1365
1366 for (i = 0; i < LineLength; i++)

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

1437 FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n",
1438 AmlFileSize);
1439 FlPrintFile (ASL_FILE_HEX_OUTPUT, " Name (BUF1, Buffer()\n {\n");
1440
1441 while (Offset < AmlFileSize)
1442 {
1443 /* Read enough bytes needed for one output line */
1444
1410 LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE,
1411 Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
1445 LineLength = LsReadAmlOutputFile (FileData);
1412 if (!LineLength)
1413 {
1414 break;
1415 }
1416
1417 FlPrintFile (ASL_FILE_HEX_OUTPUT, " ");
1418
1419 for (i = 0; i < LineLength; i++)

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

1489 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; Assembly code source output\n");
1490 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; AML code block contains 0x%X bytes\n;\n",
1491 AmlFileSize);
1492
1493 while (Offset < AmlFileSize)
1494 {
1495 /* Read enough bytes needed for one output line */
1496
1446 if (!LineLength)
1447 {
1448 break;
1449 }
1450
1451 FlPrintFile (ASL_FILE_HEX_OUTPUT, " ");
1452
1453 for (i = 0; i < LineLength; i++)

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

1523 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; Assembly code source output\n");
1524 FlPrintFile (ASL_FILE_HEX_OUTPUT, "; AML code block contains 0x%X bytes\n;\n",
1525 AmlFileSize);
1526
1527 while (Offset < AmlFileSize)
1528 {
1529 /* Read enough bytes needed for one output line */
1530
1497 LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE,
1498 Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
1531 LineLength = LsReadAmlOutputFile (FileData);
1499 if (!LineLength)
1500 {
1501 break;
1502 }
1503
1504 FlPrintFile (ASL_FILE_HEX_OUTPUT, " db ");
1505
1506 for (i = 0; i < LineLength; i++)

--- 33 unchanged lines hidden ---
1532 if (!LineLength)
1533 {
1534 break;
1535 }
1536
1537 FlPrintFile (ASL_FILE_HEX_OUTPUT, " db ");
1538
1539 for (i = 0; i < LineLength; i++)

--- 33 unchanged lines hidden ---