Beispiel #1
0
void IFDone (CharSource* S)
/* Close the current input file */
{
    /* We're at the end of an include file. Check if we have any
    ** open .IFs, or any open token lists in this file. This
    ** enforcement is artificial, using conditionals that start
    ** in one file and end in another are uncommon, and don't
    ** allowing these things will help finding errors.
    */
    CheckOpenIfs ();

    /* If we've added search paths for this file, remove them */
    if (S->V.File.IncSearchPath) {
        PopSearchPath (IncSearchPath);
    }
    if (S->V.File.BinSearchPath) {
        PopSearchPath (BinSearchPath);
    }

    /* Free the line buffer */
    SB_Done (&S->V.File.Line);

    /* Close the input file and decrement the file count. We will ignore
    ** errors here, since we were just reading from the file.
    */
    (void) fclose (S->V.File.F);
    --FCount;
}
Beispiel #2
0
void IFDone (CharSource* S)
/* Close the current input file */
{
    /* We're at the end of an include file. Check if we have any
     * open .IFs, or any open token lists in this file. This
     * enforcement is artificial, using conditionals that start
     * in one file and end in another are uncommon, and don't
     * allowing these things will help finding errors.
     */
    CheckOpenIfs ();

    /* Close the input file and decrement the file count. We will ignore
     * errors here, since we were just reading from the file.
     */
    (void) fclose (S->V.File.F);
    --FCount;
}