Sat, 19 Jan 2002 19:31:04 +0100
trunk: changeset 39
- The tokenizer also supports reading from a buffer now.
- 2002 update
5 | 1 | /* |
2 | * libtu/output.h | |
3 | * | |
36 | 4 | * Copyright (c) Tuomo Valkonen 1999-2002. |
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 | ||
35 | 15 | typedef void WarnHandler(const char *); |
16 | extern WarnHandler *set_warn_handler(WarnHandler *handler); | |
5 | 17 | |
18 | extern void verbose(const char *p, ...); | |
19 | extern void verbose_v(const char *p, va_list args); | |
20 | extern void verbose_enable(bool enable); | |
21 | extern int verbose_indent(int depth); | |
22 | ||
23 | extern void warn_progname_enable(bool enable); | |
24 | ||
25 | extern void die(const char *p, ...); | |
26 | extern void die_v(const char *p, va_list args); | |
27 | ||
28 | extern void die_obj(const char *obj, const char *p, ...); | |
29 | extern void die_obj_v(const char *obj, const char *p, va_list args); | |
30 | extern void die_obj_line(const char *obj, int line, const char *p, ...); | |
31 | extern void die_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
32 | ||
33 | extern void die_err(); | |
34 | extern void die_err_obj(const char *obj); | |
35 | extern void die_err_obj_line(const char *obj, int line); | |
36 | ||
37 | ||
38 | extern void warn(const char *p, ...); | |
39 | extern void warn_v(const char *p, va_list args); | |
40 | ||
41 | extern void warn_obj(const char *obj, const char *p, ...); | |
42 | extern void warn_obj_v(const char *obj, const char *p, va_list args); | |
43 | extern void warn_obj_line(const char *obj, int line, const char *p, ...); | |
44 | extern void warn_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
45 | ||
46 | extern void warn_err(); | |
47 | extern void warn_err_obj(const char *obj); | |
48 | extern void warn_err_obj_line(const char *obj, int line); | |
49 | ||
25 | 50 | |
51 | extern char *errmsg(const char *p, ...); | |
52 | extern char *errmsg_v(const char *p, va_list args); | |
53 | ||
54 | extern char *errmsg_obj(const char *obj, const char *p, ...); | |
55 | extern char *errmsg_obj_v(const char *obj, const char *p, va_list args); | |
56 | extern char *errmsg_obj_line(const char *obj, int line, const char *p, ...); | |
57 | extern char *errmsg_obj_line_v(const char *obj, int line, const char *p, va_list args); | |
58 | ||
59 | extern char *errmsg_err(); | |
60 | extern char *errmsg_err_obj(const char *obj); | |
61 | extern char *errmsg_err_obj_line(const char *obj, int line); | |
62 | ||
31 | 63 | extern void libtu_asprintf(char **ret, const char *fmt, ...); |
64 | extern void libtu_vasprintf(char **ret, const char *fmt, va_list args); | |
65 | ||
8 | 66 | #endif /* LIBTU_OUTPUT_H */ |