chkbuf.h

00001 
00002 #ifndef _CHKBUF_H_
00003 #define _CHKBUF_H_
00004 
00005 #include "edtinc.h"
00006 
00007 #ifdef DOXYGEN_SHOW_UNDOC
00008 
00012 #endif
00013 
00014 #ifdef _NT_
00015 typedef unsigned __int64 u_longlong_t;
00016 #endif
00017 
00018 #if defined (sgi)
00019 typedef __uint64_t u_longlong_t;
00020 #endif
00021 
00022 #if defined(__linux__)
00023 typedef unsigned long long u_longlong_t ;
00024 #endif
00025 
00026 #if defined(__APPLE__)
00027 typedef uint64_t u_longlong_t ;
00028 #endif
00029 /*
00030  * dump 64 longs
00031  */
00032 EDTAPI void dumpblk(unsigned char *ptr, int index, int maxindex);
00033 
00034 EDTAPI int chkbuf(unsigned char *align, int bufsize, int bufnum, int verbose);
00035 
00036 EDTAPI int chkbuf_short(unsigned short *align, int bufsize, int bufnum, 
00037                                                 int verbose);
00038 
00039 /*
00040  * find the bit alignment in a byte for incrementing bytes
00041  * (look for the bit that flips each time, it is the lsb)
00042  */
00043 EDTAPI int bitoffset(unsigned char * bptr);
00044 EDTAPI int bitoffset32(unsigned int * bptr);
00045 EDTAPI int bitoffset64(unsigned int * bptr);
00046 
00047 /*
00048  * copy a buffer andshift a by n bits to the left
00049  * result buffer is one byte less
00050  * n is assumed to be less than 8
00051  */
00052 EDTAPI void cp_shift(unsigned char *from,unsigned char  *to, int shift, int blen);
00053 EDTAPI void cp_shift32(unsigned int *from,unsigned int  *to, int shift, int blen);
00054 EDTAPI void cp_shift64(u_longlong_t *from, u_longlong_t *to, int shift, int blen);
00055 EDTAPI void intswap(u_char *buf, int size);
00056 EDTAPI u_longlong_t iswap(u_longlong_t val);
00057 
00058 #ifdef DOXYGEN_SHOW_UNDOC
00059  /* end weakgroup */
00060 #endif
00061 
00062 #endif

Generated on 19 Jun 2015 by  doxygen 1.4.7