1535
|
1 /*
|
|
2 * Administrative things for libfaim.
|
|
3 *
|
|
4 *
|
|
5 */
|
|
6
|
|
7 #include <aim.h>
|
|
8
|
|
9 faim_export char *aim_getbuilddate(void)
|
|
10 {
|
|
11 return AIM_BUILDDATE;
|
|
12 }
|
|
13
|
|
14 faim_export char *aim_getbuildtime(void)
|
|
15 {
|
|
16 return AIM_BUILDTIME;
|
|
17 }
|
|
18
|
|
19 faim_export char *aim_getbuildstring(void)
|
|
20 {
|
|
21 static char string[100];
|
|
22
|
|
23 snprintf(string, 99, "%d.%d.%d-%s%s",
|
|
24 FAIM_VERSION_MAJOR,
|
|
25 FAIM_VERSION_MINOR,
|
|
26 FAIM_VERSION_MINORMINOR,
|
|
27 aim_getbuilddate(),
|
|
28 aim_getbuildtime());
|
|
29 return string;
|
|
30 }
|
|
31
|
|
32 faim_internal void faimdprintf(struct aim_session_t *sess, int dlevel, const char *format, ...)
|
|
33 {
|
|
34 if (!sess) {
|
|
35 fprintf(stderr, "faimdprintf: no session! boo! (%d, %s)\n", dlevel, format);
|
|
36 return;
|
|
37 }
|
|
38
|
|
39 if ((dlevel <= sess->debug) && sess->debugcb) {
|
|
40 va_list ap;
|
|
41
|
|
42 va_start(ap, format);
|
|
43 sess->debugcb(sess, dlevel, format, ap);
|
|
44 va_end(ap);
|
|
45 }
|
|
46
|
|
47 return;
|
|
48 }
|