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 */