Skip to content

FileWhence

Description

Whence values for FileSeek, matching the libc SEEK_* constants (numerically identical so a caller that’s used to stdio transitions cleanly).

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    i64 FileSeek(File *f, i64 offset, FileWhence whence) {
        if (!FileIsValid(f)) {
            return -1;
        FILE_SEEK_CUR = 1,
        FILE_SEEK_END = 2,
    } FileWhence;
    
    ///
    /// FAILURE : Returns -1 on error (typically ESPIPE for a pipe/tty).
    ///
    i64 FileSeek(File *f, i64 offset, FileWhence whence);
    
    ///
Last updated on