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
|
1649
|
19 faim_export int aim_getbuildstring(char *buf, int buflen)
|
1535
|
20 {
|
|
21
|
1649
|
22 snprintf(buf, buflen, "%d.%d.%d-%s%s",
|
1535
|
23 FAIM_VERSION_MAJOR,
|
|
24 FAIM_VERSION_MINOR,
|
|
25 FAIM_VERSION_MINORMINOR,
|
|
26 aim_getbuilddate(),
|
|
27 aim_getbuildtime());
|
1649
|
28
|
|
29 return 0;
|
1535
|
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 }
|