diff options
author | jkim <jkim@FreeBSD.org> | 2010-07-06 17:18:05 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-07-06 17:18:05 +0000 |
commit | 9ef1b91c0f59a1a15565c354b3e372ab265c7b5a (patch) | |
tree | 514e3ade7be23ac83127870abf009b5e5ae1d36f /compiler/aslfiles.c | |
parent | d54ec0eced2867779a0ed7f3c8043be7a3325934 (diff) | |
download | FreeBSD-src-9ef1b91c0f59a1a15565c354b3e372ab265c7b5a.zip FreeBSD-src-9ef1b91c0f59a1a15565c354b3e372ab265c7b5a.tar.gz |
Import ACPICA 20100702.
Diffstat (limited to 'compiler/aslfiles.c')
-rw-r--r-- | compiler/aslfiles.c | 93 |
1 files changed, 49 insertions, 44 deletions
diff --git a/compiler/aslfiles.c b/compiler/aslfiles.c index c9f87f7..6ba32ca 100644 --- a/compiler/aslfiles.c +++ b/compiler/aslfiles.c @@ -768,6 +768,55 @@ FlOpenMiscOutputFiles ( char *Filename; + /* Create/Open a hex output file if asked */ + + if (Gbl_HexOutputFlag) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP); + if (!Filename) + { + AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME, + 0, 0, 0, 0, NULL, NULL); + return (AE_ERROR); + } + + /* Open the hex file, text mode */ + + FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+"); + + AslCompilerSignon (ASL_FILE_HEX_OUTPUT); + AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT); + } + + /* Create/Open a debug output file if asked */ + + if (Gbl_DebugFlag) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); + if (!Filename) + { + AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME, + 0, 0, 0, 0, NULL, NULL); + return (AE_ERROR); + } + + /* Open the debug file as STDERR, text mode */ + + /* TBD: hide this behind a FlReopenFile function */ + + Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename; + Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = + freopen (Filename, "w+t", stderr); + + AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT); + AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT); + } + + if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA) + { + return (AE_OK); + } + /* Create/Open a combined source output file */ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE); @@ -887,26 +936,6 @@ FlOpenMiscOutputFiles ( AslCompilerFileHeader (ASL_FILE_C_INCLUDE_OUTPUT); } - /* Create/Open a hex output file if asked */ - - if (Gbl_HexOutputFlag) - { - Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP); - if (!Filename) - { - AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME, - 0, 0, 0, 0, NULL, NULL); - return (AE_ERROR); - } - - /* Open the hex file, text mode */ - - FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+"); - - AslCompilerSignon (ASL_FILE_HEX_OUTPUT); - AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT); - } - /* Create a namespace output file if asked */ if (Gbl_NsOutputFlag) @@ -927,30 +956,6 @@ FlOpenMiscOutputFiles ( AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT); } - /* Create/Open a debug output file if asked */ - - if (Gbl_DebugFlag) - { - Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); - if (!Filename) - { - AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME, - 0, 0, 0, 0, NULL, NULL); - return (AE_ERROR); - } - - /* Open the debug file as STDERR, text mode */ - - /* TBD: hide this behind a FlReopenFile function */ - - Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename; - Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = - freopen (Filename, "w+t", stderr); - - AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT); - AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT); - } - return (AE_OK); } |