Files
bitchx/dll/nap/test.c
Kevin Easton 28febcfea9 Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00

23 lines
409 B
C

#include <stdio.h>
unsigned short len = 0;
unsigned char blah[3];
main()
{
int burp = 1;
blah[2] = '\224';
blah[3] = '\1';
blah[0] = '\027';
blah[1] = 0x0;
memcpy(&len, blah, sizeof(len));
printf("%d\n", len);
memcpy(&len, blah+2, sizeof(len));
printf("%d\n", len);
printf("%d ", burp);
burp += 0xf0;
printf("%d ", burp);
printf("and %d ", burp & ~0xf0);
printf("or %d \n", burp | 0xf0);
}