Files
libgphoto2/camlibs/sonydscf1/getuint.c
Arnaud Launay 65d768d6ec Fix warnings
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5984 67ed7778-7388-44ab-90cf-0a291f65f57c
2002-12-29 12:45:16 +00:00

24 lines
340 B
C

#include "config.h"
#include <sys/types.h>
#include "getuint.h"
u_short
get_u_short(buf)
u_char *buf;
{
return ((u_short)buf[0] << 8) | buf[1];
}
u_int
get_u_int(buf)
u_char *buf;
{
u_int t;
t = (((u_int)buf[0] << 8) | buf[1]) << 16;;
t |= ((u_int)buf[2] << 8) | buf[3];;
return t;
}