Example #1
0
File: libio.c Project: JWasm/JWlink
void ResetLibIo( void )
{
    libfile lio;

    while( fileList ) {
        lio = fileList->next;
        close( fileList->io );
        MemFreeGlobal( fileList->name );
        MemFreeGlobal( fileList );
        fileList = lio;
    }
}
Example #2
0
File: libio.c Project: JWasm/JWlink
void LibClose( libfile lio )
{
    if( lio->access & O_WRONLY ) {
        LibFlush( lio );
    }
    if( close( lio->io ) != 0 ) {
        LibWriteError( lio );
    }
    if( fileList == lio ) {
        fileList = fileList->next;
    }
    if( lio->next ) {
        lio->next->prev = lio->prev;
    }
    if( lio->prev ) {
        lio->prev->next = lio->next;
    }
    MemFreeGlobal( lio->name );
    MemFreeGlobal( lio );
}
Example #3
0
static void ObjFree( void *ptr )
/******************************/
{
    MemFreeGlobal( ptr );
}