ircu2.10.12 pk910 fork
[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     fputc('\n', stderr);
21     va_end(args);
22 }
23
24 void
25 debug(int level, const char *form, ...)
26 {
27     va_list args;
28
29     va_start(args, form);
30     vfprintf(stdout, form, args);
31     fputc('\n', stdout);
32     va_end(args);
33 }
34
35 int
36 exit_client(struct Client *cptr, struct Client *victim, struct Client *killer,
37             const char *comment)
38 {
39     Debug((DEBUG_LIST, "exit_client(%p, %p, %p, \"%s\")\n", cptr, victim, killer, comment));
40     return 0;
41 }