Differences From Artifact [99534416b6]:
- File
src/OFSeekableStream.h
— part of check-in
[ef614a225d]
at
2020-09-26 21:58:39
on branch trunk
— Don't require __COUNTER__ for OF_RESERVE_IVARS
__COUNTER__ does not exist in GCC 4.2, and Apple GCC 4.2 is still the
newest compiler available for macOS 10.5. (user: js, size: 2933) [annotate] [blame] [check-ins using]
To Artifact [1f7744a123]:
- File src/OFSeekableStream.h — part of check-in [163a4a5a2e] at 2020-10-03 11:35:41 on branch trunk — Use /** */ instead of /*! */ for documentation (user: js, size: 2933) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
40 41 42 43 44 45 46 | typedef signed long long of_offset_t; #elif defined(OF_HAVE_OFF64_T) typedef off64_t of_offset_t; #else typedef off_t of_offset_t; #endif | | | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | typedef signed long long of_offset_t; #elif defined(OF_HAVE_OFF64_T) typedef off64_t of_offset_t; #else typedef off_t of_offset_t; #endif /** * @class OFSeekableStream OFSeekableStream.h ObjFW/OFSeekableStream.h * * @brief A stream that supports seeking. * * @note If you want to subclass this, override * @ref lowlevelSeekToOffset:whence:. OFSeekableStream uses this method * and makes it work together with the caching of OFStream. If you * override this methods without the `lowlevel` prefix, you *will* break * caching, get broken results and seek to the wrong position! */ @interface OFSeekableStream: OFStream { OF_RESERVE_IVARS(OFSeekableStream, 4) } /** * @brief Seeks to the specified absolute offset. * * @param offset The offset in bytes * @param whence From where to seek.@n * Possible values are: * Value | Description * -----------|--------------------------------------- * `SEEK_SET` | Seek to the specified byte * `SEEK_CUR` | Seek to the current location + offset * `SEEK_END` | Seek to the end of the stream + offset * @return The new offset form the start of the file */ - (of_offset_t)seekToOffset: (of_offset_t)offset whence: (int)whence; /** * @brief Seek the stream on the lowlevel. * * @warning Do not call this directly! * * @note Override this method with your actual seek implementation when * subclassing! * |
︙ | ︙ |