#ifndef LIBTIO_IO_GENERIC_H # define LIBTIO_IO_GENERIC_H 20190429 # include "../cdefs.h" TIO_BEGIN_NAMESPACE /* A generic stream is inspired from the libc streams, which mainly serve * for interacting with local files. Using such a stream, you can read, * write and seek (move the cursor to a specific offset in the stream). * * Offset types, for seeking, are the following: * * `SET`: set the current position to the offset. * `CUR`: add the offset to the current position. * `END`: set the current position to the end minus the offset. * `DATA`: seek to the next data. * `HOLE`: seek to the next hole. */ typedef long tio_off_t; typedef int tio_whence_t; # define TIO_SEEK_SET 1 # define TIO_SEEK_CUR 2 # define TIO_SEEK_END 4 # define TIO_SEEK_DATA 8 # define TIO_SEEK_HOLE 16 TIO_END_NAMESPACE #endif /* LIBTIO_IO_GENERIC_H */