Angband
z-form.h
Go to the documentation of this file.
1 
18 #ifndef INCLUDED_Z_FORM_H
19 #define INCLUDED_Z_FORM_H
20 
21 #include "h-basic.h"
22 
34 /* MSVC doesn't have va_copy (which is C99) or an alternative, so we'll just
35  * copy the SRC pointer. In other cases we'll use va_copy() as we should. */
36 #ifdef _MSC_VER
37 #define VA_COPY(DST, SRC) (DST) = (SRC)
38 #else
39 #define VA_COPY(DST, SRC) va_copy(DST, SRC)
40 #endif
41 
42 
43 /**** Available Functions ****/
44 
48 extern size_t vstrnfmt(char *buf, size_t max, const char *fmt, va_list vp);
49 
53 extern size_t strnfmt(char *buf, size_t max, const char *fmt, ...);
54 
58 extern char *vformat(const char *fmt, va_list vp);
59 
63 extern void vformat_kill(void);
64 
68 extern void strnfcat(char *str, size_t max, size_t *end, const char *fmt, ...);
69 
73 extern char *format(const char *fmt, ...);
74 
78 extern void plog_fmt(const char *fmt, ...);
79 
83 extern void quit_fmt(const char *fmt, ...);
84 
85 
86 #endif /* INCLUDED_Z_FORM_H */
void strnfcat(char *str, size_t max, size_t *end, const char *fmt,...)
Append a formatted string to another string.
Definition: z-form.c:539
void plog_fmt(const char *fmt,...)
Vararg interface to "plog()", using "format()".
Definition: z-form.c:663
char * format(const char *fmt,...)
Simple interface to "vformat()".
Definition: z-form.c:639
The lowest level header.
png_bytep buf
Definition: libpng12/png.h:2815
char * vformat(const char *fmt, va_list vp)
Format arguments into a static resizing buffer.
Definition: z-form.c:570
size_t strnfmt(char *buf, size_t max, const char *fmt,...)
Simple interface to "vstrnfmt()".
Definition: z-form.c:613
size_t vstrnfmt(char *buf, size_t max, const char *fmt, va_list vp)
Format arguments into given bounded-length buffer.
Definition: z-form.c:185
void vformat_kill(void)
Free the memory allocated for the format buffer.
Definition: z-form.c:604
void quit_fmt(const char *fmt,...)
Vararg interface to "quit()", using "format()".
Definition: z-form.c:686