third_party/inchi/INCHI_BASE/src/ichi_io.c
void inchi_ios_close( INCHI_IOSTREAM* ios )
{
    if (NULL == ios)
    {
        return;
    }
    if (ios->s.pStr)
    {
        inchi_free( ios->s.pStr );
    }
    ios->s.pStr = NULL;
    ios->s.nUsedLength = ios->s.nAllocatedLength = ios->s.nPtr = 0;

    if (NULL != ios->f && stdout != ios->f && stderr != ios->f && stdin != ios->f)
    {
        fclose( ios->f );
    }

    return;
}
/****************************************************************************
    Close INCHI_IOSTREAM: free string buffer and close associated file.
****************************************************************************/
Close INCHI_IOSTREAM: free string buffer and close associated file.
Close INCHI_IOSTREAM : free string buffer and close associated file .
void inchi_ios_close( INCHI_IOSTREAM* ios )
{
    if (NULL == ios)
    {
        return;
    }
    if (ios->s.pStr)
    {
        inchi_free( ios->s.pStr );
    }
    ios->s.pStr = NULL;
    ios->s.nUsedLength = ios->s.nAllocatedLength = ios->s.nPtr = 0;
    if (NULL != ios->f && stdout != ios->f && stderr != ios->f && stdin != ios->f)
    {
        fclose( ios->f );
    }
    return;
}
void inchi_ios_close ( INCHI_IOSTREAM * ios ) { if ( NULL == ios ) { return ; } if ( ios -> s . pStr ) { inchi_free ( ios -> s . pStr ) ; } ios -> s . pStr = NULL ; ios -> s . nUsedLength = ios -> s . nAllocatedLength = ios -> s . nPtr = 0 ; if ( NULL != ios -> f && stdout != ios -> f && stderr != ios -> f && stdin != ios -> f ) { fclose ( ios -> f ) ; } return ; }
Close INCHI_IOSTREAM: free string buffer and close associated file.
Close INCHI_IOSTREAM : free string buffer and close associated file .