int pdfout_strtoint_null (fz_context *ctx, const char *string);
Throw if string does not contain a null-terminated int number.
int pdfout_strtoint (fz_context *ctx, const char *nptr, char **endptr);
Like strtol, but throw exception on int overflow.
float pdfout_strtof (fz_context *ctx, const char *string);
Throw if string does not contain a null-terminated float number.
int pdfout_snprintf_imp (fz_context *ctx, char *buf, int size, const char *fmt, ...);
int pdfout_vsnprintf_imp (fz_context *ctx, char *buf, int size, const char *fmt, va_list ap);
Safe frontends to sprintf. Throw if the result is longer than size.
int pdfout_snprintf (fz_context *ctx, char *buf, const char *fmt, ...);
int pdfout_vsnprintf (fz_context *ctx, char *buf, const char *fmt, va_list ap);
Macros. Defined as
pdfout_snprintf_imp (ctx, buff, sizeof buff, fmt, ## args)
pdfout_vsnprintf_imp (ctx, buff, sizeof buff, fmt, ap)
void pdfout_throw (fz_context *ctx, const char *fmt, ...);
Call mupdf's fz_throw with error type FZ_ERROR_GENERIC.
void pdfout_vthrow (fz_context *ctx, const char *fmt, va_list ap);
va_list version of pdfout_throw.
void pdfout_throw_errno (fz_context *ctx, const char *fmt, ...);
Like pdfout_throw, but show the message produced by strerror if errno is set.
void pdfout_warn (fz_context *ctx, const char *fmt, ...);
Equivalent to fz_warn.
ssize_t pdfout_getline (fz_context *ctx, fz_buffer **buffer_ptr, fz_stream *stm);
Read a line from stm. Stops after the next '\n' or EOF. Return the length of the read string (including the newline) and copy it into *buffer_ptr. If *buffer_ptr is NULL, allocate a new buffer. Throw on read error.