OSDN Git Service

add bit parser
[rec10/rec10-git.git] / epgdump / util.h
1 #ifndef UTIL_H
2 #define UTIL_H 1
3
4 #define MAXSECLEN 4096
5
6 #include <time.h>
7 //#define BCD(n) ((n/100)<<8)|(((n%100)/10)<<4)|(n%10)
8 #define BCD(n) ((n>>4)*10+(n&0xf))
9
10 #ifdef __cplusplus
11 extern "C"{
12 #endif /* __cplusplus */
13
14         int strrep(char *buf, char *mae, char *ato);
15         int    getBit(unsigned char *byte, int *pbit, int gbit);
16         void   getStr(char *tostr, unsigned char *byte, int *pbit, int len);
17         int    parseOTHERdesc(unsigned char *data);
18         void*  allocCopy(void* src, int *boff, size_t size);
19         time_t parseMJD( unsigned char *data );
20
21 #ifdef __cplusplus
22 }
23 #endif /* __cplusplus */
24
25 #endif