21#ifndef VLC_MEMSTREAM_H
22# define VLC_MEMSTREAM_H 1
117 const void *ptr,
size_t len);
157static inline int vlc_memstream_puts_len(
struct vlc_memstream *ms,
158 const char *str,
size_t len)
162# define vlc_memstream_puts(ms,s) \
163 (__builtin_constant_p(__builtin_strlen(s)) ? \
164 vlc_memstream_puts_len(ms,s,__builtin_strlen(s)) : \
165 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:193
int vlc_memstream_open(struct vlc_memstream *ms)
Initializes a byte stream object.
Definition memstream.c:119
int vlc_memstream_flush(struct vlc_memstream *ms)
Flushes a byte stream object.
Definition memstream.c:129
int vlc_memstream_printf(struct vlc_memstream *s, const char *fmt,...)
Appends a formatted string to a byte stream.
Definition memstream.c:214
int vlc_memstream_putc(struct vlc_memstream *ms, int c)
Appends a single byte to a byte stream.
Definition memstream.c:171
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:144
int vlc_memstream_puts(struct vlc_memstream *ms, const char *str)
Appends a nul-terminated string to a byte stream.
Definition memstream.c:176
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:182
int vlc_memstream_close(struct vlc_memstream *ms)
Closes a byte stream object.
Definition memstream.c:134
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.