comparison utils.h @ 199:1d2bad7151f9

Add a -debuglog option to send an execution trace to a file. Intended to be used when debugging imake templates and other complex input, not for debugging tradcpp itself.
author David A. Holland
date Sun, 04 Sep 2016 17:14:42 -0400
parents 4c3375895c6e
children
comparison
equal deleted inserted replaced
198:4158b974e23f 199:1d2bad7151f9
61 size_t notrailingws(char *buf, size_t len); 61 size_t notrailingws(char *buf, size_t len);
62 bool is_identifier(const char *str); 62 bool is_identifier(const char *str);
63 63
64 /* in place.c */ 64 /* in place.c */
65 void complain_init(const char *progname); 65 void complain_init(const char *progname);
66 void complain(const struct place *, const char *fmt, ...) PF(2, 3); 66 PF(2, 3) void complain(const struct place *, const char *fmt, ...);
67 void complain_fail(void); 67 void complain_fail(void);
68 bool complain_failed(void); 68 bool complain_failed(void);
69
70 void debuglog_open(const struct place *p, /*const*/ char *file);
71 void debuglog_close(void);
72 PF(2, 3) void debuglog(const struct place *p, const char *fmt, ...);
73 PF(3, 4) void debuglog2(const struct place *p, const struct place *p2,
74 const char *fmt, ...);
69 75
70 /* in main.c */ 76 /* in main.c */
71 void freestringlater(char *s); 77 void freestringlater(char *s);
72 DEAD void die(void); 78 DEAD void die(void);