view libfaim/aim_util.c @ 94:9f6ce50ffb78

[gaim-migrate @ 104] Woohoo, the landing of the plugins. Nearly everything necessary is here. The only thing missing is that you can't load a plugin without signing on first (at least, not without some trickery). committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 09 Apr 2000 11:18:25 +0000
parents 68b230f8da5f
children 6ced2f1c8b24
line wrap: on
line source

/*
 *
 *
 *
 */

#include "aim.h"

int aimutil_put8(u_char *buf, u_short data)
{
  buf[0] = data&0xff;
  return 1;
}

/*
 * Endian-ness issues here?
 */
int aimutil_put16(u_char *buf, u_short data)
{
  buf[0] = (data>>8)&0xff;
  buf[1] = (data)&0xff;
  return 2;
}

int aimutil_put32(u_char *buf, u_long data)
{
  buf[0] = (data>>24)&0xff;
  buf[1] = (data>>16)&0xff;
  buf[2] = (data>>8)&0xff;
  buf[3] = (data)&0xff;
  return 4;
}

int aimutil_putstr(u_char *dest, u_char *src, int len)
{
  memcpy(dest, src, len);
  return len;
}