}
static int _bufio_flushBuf( BufioFile* file ){    PRUint32 written;    PRUint32 dirtyamt;    PRInt32  startpos;    PR_ASSERT(file);    if ( !file || !file->bufdirty )        return 0;    startpos = file->datastart + file->dirtystart;    if ( !fseek( file->fd, startpos, SEEK_SET ) )    {        dirtyamt = file->dirtyend - file->dirtystart;        written = fwrite( file->data+file->dirtystart, 1, dirtyamt, file->fd );        if ( written == dirtyamt )            return 0;    }    return -1;}