Lines Matching +full:open +full:- +full:source

3  * Module Name: aslfiles - File support functions
11 * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
22 * copy of the source code appearing in this file ("Covered Code") an
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
59 * addition, Licensee may not authorize further sublicense of source of any
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
108 * any of its subsidiaries will export/re-export any technical data, process,
119 * Redistribution and use in source and binary forms, with or without
122 * 1. Redistributions of source code must retain the above copyright
130 * 3. Neither the names of the above-listed copyright holders nor the names
181 * PARAMETERS: InputFilename - The user-specified ASL source file to be
210 NewFileNode->ParserErrorDetected = FALSE; in FlInitOneFile()
211 NewFileNode->Next = AslGbl_FilesList; in FlInitOneFile()
214 AslGbl_Files = NewFileNode->Files; in FlInitOneFile()
243 * PARAMETERS: Filename - File name to be searched
260 if (!strcmp (Filename, Current->Files[ASL_FILE_INPUT].Filename)) in FlInputFileExists()
265 Current = Current->Next; in FlInputFileExists()
276 * PARAMETERS: Op - Parse node for the LINE asl statement
289 char *PrevFilename = Current->Files[ASL_FILE_INPUT].Filename; in FlSwitchFileSet()
294 if (!strcmp(Current->Files[ASL_FILE_INPUT].Filename, InputFilename)) in FlSwitchFileSet()
296 AslGbl_Files = Current->Files; in FlSwitchFileSet()
297 AslGbl_TableSignature = Current->TableSignature; in FlSwitchFileSet()
298 AslGbl_TableId = Current->TableId; in FlSwitchFileSet()
310 Current = Current->Next; in FlSwitchFileSet()
321 * PARAMETERS: OutFileId - denotes file type of output handle
322 * InFileId - denotes file type of the input Filename
349 if (!strcmp (Current->Files[InFileId].Filename, Filename)) in FlGetFileHandle()
351 return (Current->Files[OutFileId].Handle); in FlGetFileHandle()
354 Current = Current->Next; in FlGetFileHandle()
365 * PARAMETERS: FileId - File type (ID) of the input Filename
366 * Filename - File to search for
389 if (!strcmp (Current->Files[FileId].Filename, Filename)) in FlGetFileNode()
394 Current = Current->Next; in FlGetFileNode()
440 * PARAMETERS: Op - Parse node for the LINE asl statement
464 * PARAMETERS: Op - Parse node for the LINE asl statement
490 * PARAMETERS: Dir - Directory pathname string
517 if ((Dir[DirLength-1] != '/') && in FlAddIncludeDirectory()
518 (Dir[DirLength-1] != '\\')) in FlAddIncludeDirectory()
525 NewDir->Dir = UtLocalCacheCalloc (DirLength + 1 + NeedsSeparator); in FlAddIncludeDirectory()
526 strcpy (NewDir->Dir, Dir); in FlAddIncludeDirectory()
529 strcat (NewDir->Dir, "/"); in FlAddIncludeDirectory()
533 * Preserve command line ordering of -I options by adding new elements in FlAddIncludeDirectory()
540 NextDir = NextDir->Next; in FlAddIncludeDirectory()
545 PrevDir->Next = NewDir; in FlAddIncludeDirectory()
558 * PARAMETERS: PrefixDir - Prefix directory pathname. Can be NULL or
560 * FilePathname - The include filename from the source ASL.
580 DbgPrint (ASL_PARSE_OUTPUT, "Include: Prefix path - \"%s\"\n" in FlMergePathnames()
581 "Include: FilePathname - \"%s\"\n", in FlMergePathnames()
649 DbgPrint (ASL_PARSE_OUTPUT, "Include: Merged Pathname - \"%s\"\n", in FlMergePathnames()
659 * PARAMETERS: PrefixDir - Prefix directory pathname. Can be a zero
661 * Filename - The include filename from the source ASL.
665 * DESCRIPTION: Open an include file and push it on the input file stack.
684 DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n", in FlOpenIncludeWithPrefix()
687 /* Attempt to open the file, push if successful */ in FlOpenIncludeWithPrefix()
706 AslGbl_CurrentLineNumber--; in FlOpenIncludeWithPrefix()
724 /* Push the include file on the open input file stack */ in FlOpenIncludeWithPrefix()
735 * PARAMETERS: Op - Parse node for the INCLUDE ASL statement
739 * DESCRIPTION: Open an include file and push it on the input file stack.
758 AslGbl_Files[ASL_FILE_INPUT].Filename, " - Null parse node"); in FlOpenIncludeFile()
772 /* Attempt to open the include file */ in FlOpenIncludeFile()
774 /* If the file specifies an absolute path, just open it */ in FlOpenIncludeFile()
776 if ((Op->Asl.Value.String[0] == '/') || in FlOpenIncludeFile()
777 (Op->Asl.Value.String[0] == '\\') || in FlOpenIncludeFile()
778 (Op->Asl.Value.String[1] == ':')) in FlOpenIncludeFile()
780 IncludeFile = FlOpenIncludeWithPrefix ("", Op, Op->Asl.Value.String); in FlOpenIncludeFile()
791 * First, search for the file within the "local" directory -- meaning in FlOpenIncludeFile()
792 * the same directory that contains the source file. in FlOpenIncludeFile()
797 AslGbl_DirectoryPath, Op, Op->Asl.Value.String); in FlOpenIncludeFile()
805 * specified by the -I option on the command line. in FlOpenIncludeFile()
811 NextDir->Dir, Op, Op->Asl.Value.String); in FlOpenIncludeFile()
817 NextDir = NextDir->Next; in FlOpenIncludeFile()
820 /* We could not open the include file after trying very hard */ in FlOpenIncludeFile()
823 sprintf (AslGbl_MsgBuffer, "%s, %s", Op->Asl.Value.String, strerror (errno)); in FlOpenIncludeFile()
832 * PARAMETERS: InputFilename - The user-specified ASL source file to be
837 * DESCRIPTION: Open the specified input file, and save the directory path to
848 /* Open the input ASL file, text mode */ in FlOpenInputFile()
861 * PARAMETERS: FilenamePrefix - The user-specified ASL source file
865 * DESCRIPTION: Create the output filename (*.AML) and open the file. The file
901 /* Open the output AML file in binary mode */ in FlOpenAmlOutputFile()
912 * PARAMETERS: FilenamePrefix - The user-specified ASL source file
916 * DESCRIPTION: Create and open the various output files needed, depending on
928 /* Create/Open a map file if requested */ in FlOpenMiscOutputFiles()
940 /* Open the hex file, text mode (closed at compiler exit) */ in FlOpenMiscOutputFiles()
955 /* Create/Open a hex output file if asked */ in FlOpenMiscOutputFiles()
967 /* Open the hex file, text mode */ in FlOpenMiscOutputFiles()
975 /* Create/Open a debug output file if asked */ in FlOpenMiscOutputFiles()
987 /* Open the debug file as STDERR, text mode */ in FlOpenMiscOutputFiles()
1001 "\nCould not open debug output file: %s\n\n", Filename); in FlOpenMiscOutputFiles()
1011 /* Create/Open a cross-reference output file if asked */ in FlOpenMiscOutputFiles()
1029 /* Create/Open a listing output file if asked */ in FlOpenMiscOutputFiles()
1041 /* Open the listing file, text mode */ in FlOpenMiscOutputFiles()
1065 * Create the "user" preprocessor output file if -li flag set. in FlOpenMiscOutputFiles()
1088 /* Create/Open a combined source output file */ in FlOpenMiscOutputFiles()
1099 * Open the source output file, binary mode (so that LF does not get in FlOpenMiscOutputFiles()
1109 /* Create/Open a assembly code source output file if asked */ in FlOpenMiscOutputFiles()
1121 /* Open the assembly code source file, text mode */ in FlOpenMiscOutputFiles()
1129 /* Create/Open a C code source output file if asked */ in FlOpenMiscOutputFiles()
1141 /* Open the C code source file, text mode */ in FlOpenMiscOutputFiles()
1150 /* Create/Open a C code source output file for the offset table if asked */ in FlOpenMiscOutputFiles()
1162 /* Open the C code source file, text mode */ in FlOpenMiscOutputFiles()
1171 /* Create/Open a assembly include output file if asked */ in FlOpenMiscOutputFiles()
1183 /* Open the assembly include file, text mode */ in FlOpenMiscOutputFiles()
1191 /* Create/Open a C include output file if asked */ in FlOpenMiscOutputFiles()
1203 /* Open the C include file, text mode */ in FlOpenMiscOutputFiles()
1224 /* Open the namespace file, text mode */ in FlOpenMiscOutputFiles()
1244 /* Open the converter debug file, text mode */ in FlOpenMiscOutputFiles()
1263 * PARAMETERS: InputFilename - The user-specified ASL source file to be
1269 * 1) Directory part used to open include files