21#ifndef VLC_MEMSTREAM_H
22# define VLC_MEMSTREAM_H 1
116 const void *ptr,
size_t len);
155static inline int vlc_memstream_puts_len(
struct vlc_memstream *ms,
156 const char *str,
size_t len)
160# define vlc_memstream_puts(ms,s) \
161 (__builtin_constant_p(__builtin_strlen(s)) ? \
162 vlc_memstream_puts_len(ms,s,__builtin_strlen(s)) : \
163 vlc_memstream_puts(ms,s))
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:204
int vlc_memstream_open(struct vlc_memstream *ms)
Initializes a byte stream object.
Definition: memstream.c:105
int vlc_memstream_flush(struct vlc_memstream *ms)
Flushes a byte stream object.
Definition: memstream.c:115
int vlc_memstream_printf(struct vlc_memstream *s, const char *fmt,...)
Appends a formatted string to a byte stream.
Definition: memstream.c:194
int vlc_memstream_putc(struct vlc_memstream *ms, int c)
Appends a single byte to a byte stream.
Definition: memstream.c:151
size_t vlc_memstream_write(struct vlc_memstream *ms, const void *ptr, size_t len)
Appends a binary blob to a byte stream.
Definition: memstream.c:127
int vlc_memstream_puts(struct vlc_memstream *ms, const char *str)
Appends a nul-terminated string to a byte stream.
Definition: memstream.c:156
int vlc_memstream_vprintf(struct vlc_memstream *ms, const char *fmt, va_list args)
Appends a formatted string to a byte stream.
Definition: memstream.c:162
int vlc_memstream_close(struct vlc_memstream *ms)
Closes a byte stream object.
Definition: memstream.c:120
In-memory stream object.
Definition: vlc_memstream.h:42
char * ptr
Buffer start address.
Definition: vlc_memstream.h:48
FILE * stream
Definition: vlc_memstream.h:45
size_t length
Buffer length in bytes.
Definition: vlc_memstream.h:49
int error
Definition: vlc_memstream.h:46
This file is a collection of common definitions and types.