libfaim/aim_util.c

Sun, 30 Apr 2000 21:47:04 +0000

author
Eric Warmenhoven <warmenhoven@yahoo.com>
date
Sun, 30 Apr 2000 21:47:04 +0000
changeset 200
aa9fbd9e68a3
parent 2
62fbb00c531a
child 237
83ff5f92ee7e
permissions
-rw-r--r--

[gaim-migrate @ 210]
Made the receive non-blocking, added a cancel button, and a few other updates.
No, sending a file to someone does not work yet. Be patient.

/*
 *
 *
 *
 */

#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;
}

mercurial