Convert irc_in_addr_* to macros. Add test program for that code. Fix
[ircu2.10.12-pk.git] / ircd / test / test_stub.c
1 /* test_stub.c - support stubs for test programs */
2
3 #include "client.h"
4 #include "ircd_log.h"
5 #include "s_debug.h"
6 #include <stdarg.h>
7 #include <stdio.h>
8
9 struct Client me;
10 int log_inassert;
11
12 void
13 log_write(enum LogSys subsys, enum LogLevel severity, unsigned int flags,
14           const char *fmt, ...)
15 {
16     va_list args;
17
18     va_start(args, fmt);
19     vfprintf(stderr, fmt, args);
20     va_end(args);
21 }
22
23 void
24 debug(int level, const char *form, ...)
25 {
26     va_list args;
27
28     va_start(args, form);
29     vfprintf(stdout, form, args);
30     va_end(args);
31 }
32
33 int
34 exit_client(struct Client *cptr, struct Client *bcptr, struct Client *sptr,
35             const char *comment)
36 {
37     Debug((DEBUG_LIST, "exit_client(%p, %p, %p, \"%s\")\n", cptr, bcptr, sptr, comment));
38     return 0;
39 }