Tue, 02 Jan 2001 01:45:46 +0100
trunk: changeset 34
Added libtu_(v)asprintf functions.
5 | 1 | /* |
2 | * libtu/output.h | |
3 | * | |
9 | 4 | * Copyright (c) Tuomo Valkonen 1999-2000. |
5 | 5 | * See the included file LICENSE for details. |
6 | */ | |
7 | ||
8 | 8 | #ifndef LIBTU_OUTPUT_H |
9 | #define LIBTU_OUTPUT_H | |
5 | 10 | |
11 | #include <stdarg.h> | |
12 | ||
13 | #include "types.h" | |
14 | ||
15 | ||
16 | extern void verbose(const char *p, ...); | |
17 | extern void verbose_v(const char *p, va_list args); | |
18 | extern void verbose_enable(bool enable); | |
19 | extern int verbose_indent(int depth); | |
20 | ||
21 | extern void warn_progname_enable(bool enable); | |
22 | ||
23 | extern void die(const char *p, ...); | |
24 | extern void die_v(const char *p, va_list args); | |
25 | ||
26 | extern void die_obj(const char *obj, const char *p, ...); | |
27 | extern void die_obj_v(const char *obj, const char *p, va_list args); | |
28 | extern void die_obj_line(const char *obj, int line, const char *p, ...); | |
29 | extern void die_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
30 | ||
31 | extern void die_err(); | |
32 | extern void die_err_obj(const char *obj); | |
33 | extern void die_err_obj_line(const char *obj, int line); | |
34 | ||
35 | ||
36 | extern void warn(const char *p, ...); | |
37 | extern void warn_v(const char *p, va_list args); | |
38 | ||
39 | extern void warn_obj(const char *obj, const char *p, ...); | |
40 | extern void warn_obj_v(const char *obj, const char *p, va_list args); | |
41 | extern void warn_obj_line(const char *obj, int line, const char *p, ...); | |
42 | extern void warn_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
43 | ||
44 | extern void warn_err(); | |
45 | extern void warn_err_obj(const char *obj); | |
46 | extern void warn_err_obj_line(const char *obj, int line); | |
47 | ||
25 | 48 | |
49 | extern char *errmsg(const char *p, ...); | |
50 | extern char *errmsg_v(const char *p, va_list args); | |
51 | ||
52 | extern char *errmsg_obj(const char *obj, const char *p, ...); | |
53 | extern char *errmsg_obj_v(const char *obj, const char *p, va_list args); | |
54 | extern char *errmsg_obj_line(const char *obj, int line, const char *p, ...); | |
55 | extern char *errmsg_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
56 | ||
57 | extern char *errmsg_err(); | |
58 | extern char *errmsg_err_obj(const char *obj); | |
59 | extern char *errmsg_err_obj_line(const char *obj, int line); | |
60 | ||
31 | 61 | extern void libtu_asprintf(char **ret, const char *fmt, ...); |
62 | extern void libtu_vasprintf(char **ret, const char *fmt, va_list args); | |
63 | ||
8 | 64 | #endif /* LIBTU_OUTPUT_H */ |