Deleted Added
sdiff udiff text old ( 241973 ) new ( 243347 )
full compact
1/******************************************************************************
2 *
3 * Module Name: aslfiles - file I/O suppoert
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

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

138 UINT32 FileId,
139 char *Filename,
140 char *Mode)
141{
142 FILE *File;
143
144
145 File = fopen (Filename, Mode);
146 if (!File)
147 {
148 FlFileError (FileId, ASL_MSG_OPEN);
149 AslAbort ();
150 }
151
152 Gbl_Files[FileId].Filename = Filename;
153 Gbl_Files[FileId].Handle = File;
154}
155
156
157/*******************************************************************************
158 *
159 * FUNCTION: FlGetFileSize
160 *
161 * PARAMETERS: FileId - Index into file info array

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

210 UINT32 Length)
211{
212 UINT32 Actual;
213
214
215 /* Read and check for error */
216
217 Actual = fread (Buffer, 1, Length, Gbl_Files[FileId].Handle);
218 if (Actual < Length)
219 {
220 if (feof (Gbl_Files[FileId].Handle))
221 {
222 /* End-of-file, just return error */
223
224 return (AE_ERROR);
225 }
226

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

653 Pathname = FlMergePathnames (PrefixDir, Filename);
654
655 DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n",
656 Pathname);
657
658 /* Attempt to open the file, push if successful */
659
660 IncludeFile = fopen (Pathname, "r");
661 if (!IncludeFile)
662 {
663 fprintf (stderr, "Could not open include file %s\n", Pathname);
664 ACPI_FREE (Pathname);
665 return (NULL);
666 }
667
668 /* Push the include file on the open input file stack */
669
670 AslPushInputFileStack (IncludeFile, Pathname);
671 return (IncludeFile);
672}
673
674
675/*******************************************************************************
676 *
677 * FUNCTION: FlOpenIncludeFile
678 *
679 * PARAMETERS: Op - Parse node for the INCLUDE ASL statement

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

947
948 /* All done for data table compiler */
949
950 if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
951 {
952 return (AE_OK);
953 }
954
955 /* Create/Open a combined source output file */
956
957 Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE);
958 if (!Filename)
959 {
960 AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
961 0, 0, 0, 0, NULL, NULL);
962 return (AE_ERROR);
963 }

--- 184 unchanged lines hidden ---