FreeBSD/sys/contrib/dev/acpica/compiler/prscan.c
/*******************************************************************************
 *
 * FUNCTION:    PrDoPreprocess
 *
 * PARAMETERS:  None
 *
 * RETURN:      None
 *
 * DESCRIPTION: Main entry point for the iASL Preprocessor. Input file must
 *              be already open. Handles multiple input files via the
 *              #include directive.
 *
 ******************************************************************************/


None

Main entry point for the iASL Preprocessor. Input file must
be already open. Handles multiple input files via the
#include directive.
None Main entry point for the iASL Preprocessor . Input file must be already open . Handles multiple input files via the #include directive .
void
PrDoPreprocess (
    void)
{
    BOOLEAN                 MoreInputFiles;
    DbgPrint (ASL_DEBUG_OUTPUT, "Starting preprocessing phase\n\n");
    FlSeekFile (ASL_FILE_INPUT, 0);
    PrDumpPredefinedNames ();
    do
    {
        PrPreprocessInputFile ();
        MoreInputFiles = PrPopInputFileStack ();
    } while (MoreInputFiles);
    FlCloseFile (ASL_FILE_INPUT);
    Gbl_Files[ASL_FILE_INPUT].Handle = Gbl_Files[ASL_FILE_PREPROCESSOR].Handle;
    AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
    FlSeekFile (ASL_FILE_INPUT, 0);
    if (!Gbl_PreprocessOnly)
    {
        Gbl_CurrentLineNumber = 0;
    }
    DbgPrint (ASL_DEBUG_OUTPUT, "Preprocessing phase complete \n\n");
}
void PrDoPreprocess ( void ) { BOOLEAN MoreInputFiles ; DbgPrint ( ASL_DEBUG_OUTPUT , " \n \n " ) ; FlSeekFile ( ASL_FILE_INPUT , 0 ) ; PrDumpPredefinedNames ( ) ; do { PrPreprocessInputFile ( ) ; MoreInputFiles = PrPopInputFileStack ( ) ; } while ( MoreInputFiles ) ; FlCloseFile ( ASL_FILE_INPUT ) ; Gbl_Files [ ASL_FILE_INPUT ] . Handle = Gbl_Files [ ASL_FILE_PREPROCESSOR ] . Handle ; AslCompilerin = Gbl_Files [ ASL_FILE_INPUT ] . Handle ; FlSeekFile ( ASL_FILE_INPUT , 0 ) ; if ( ! Gbl_PreprocessOnly ) { Gbl_CurrentLineNumber = 0 ; } DbgPrint ( ASL_DEBUG_OUTPUT , " \n \n " ) ; }
FUNCTION:    PrDoPreprocess
 PARAMETERS:  None
FUNCTION : PrDoPreprocess PARAMETERS : None
/* Main preprocessor loop, handles include files */ /* Point compiler input to the new preprocessor output file (.pre) */ /* Reset globals to allow compiler to run */