Mercurial > pidgin
comparison libfaim/aim_util.c @ 2:68b230f8da5f
[gaim-migrate @ 11]
A few more commits :)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 23 Mar 2000 03:16:06 +0000 |
parents | |
children | 6ced2f1c8b24 |
comparison
equal
deleted
inserted
replaced
1:2846a03bda67 | 2:68b230f8da5f |
---|---|
1 /* | |
2 * | |
3 * | |
4 * | |
5 */ | |
6 | |
7 #include "aim.h" | |
8 | |
9 int aimutil_put8(u_char *buf, u_short data) | |
10 { | |
11 buf[0] = data&0xff; | |
12 return 1; | |
13 } | |
14 | |
15 /* | |
16 * Endian-ness issues here? | |
17 */ | |
18 int aimutil_put16(u_char *buf, u_short data) | |
19 { | |
20 buf[0] = (data>>8)&0xff; | |
21 buf[1] = (data)&0xff; | |
22 return 2; | |
23 } | |
24 | |
25 int aimutil_put32(u_char *buf, u_long data) | |
26 { | |
27 buf[0] = (data>>24)&0xff; | |
28 buf[1] = (data>>16)&0xff; | |
29 buf[2] = (data>>8)&0xff; | |
30 buf[3] = (data)&0xff; | |
31 return 4; | |
32 } | |
33 | |
34 int aimutil_putstr(u_char *dest, u_char *src, int len) | |
35 { | |
36 memcpy(dest, src, len); | |
37 return len; | |
38 } |