10#ifndef LIBOPENMPT_STREAM_CALLBACKS_FILE_H
11#define LIBOPENMPT_STREAM_CALLBACKS_FILE_H
36 retval = fread( dst, 1, bytes, f );
64 if ( (
long)offset != offset ) {
67 return fseek( f, (
long)offset, fwhence ) ? -1 : 0;
79 if ( (int64_t)result != result ) {
82 retval = (int64_t)result;
static openmpt_stream_callbacks openmpt_stream_get_file_callbacks2(void)
Provide openmpt_stream_callbacks for standard C FILE objects.
Definition: libopenmpt_stream_callbacks_file.h:132
#define OPENMPT_STREAM_SEEK_SET
Definition: libopenmpt.h:253
#define OPENMPT_STREAM_SEEK_CUR
Definition: libopenmpt.h:255
static int openmpt_stream_file_seek_func(void *stream, int64_t offset, int whence)
Definition: libopenmpt_stream_callbacks_file.h:43
static size_t openmpt_stream_file_read_func(void *stream, void *dst, size_t bytes)
Definition: libopenmpt_stream_callbacks_file.h:29
#define OPENMPT_STREAM_SEEK_END
Definition: libopenmpt.h:257
static openmpt_stream_callbacks openmpt_stream_get_file_callbacks(void)
Provide openmpt_stream_callbacks for standard C FILE objects.
Definition: libopenmpt_stream_callbacks_file.h:109
static int64_t openmpt_stream_file_tell_func(void *stream)
Definition: libopenmpt_stream_callbacks_file.h:70
#define LIBOPENMPT_DEPRECATED
Definition: libopenmpt_config.h:315
#define LIBOPENMPT_C_INLINE
Definition: libopenmpt_config.h:339
Stream callbacks.
Definition: libopenmpt.h:300
openmpt_stream_read_func read
Read callback.
Definition: libopenmpt.h:306
openmpt_stream_seek_func seek
Seek callback.
Definition: libopenmpt.h:313
openmpt_stream_tell_func tell
Tell callback.
Definition: libopenmpt.h:320