/* * Humax EPG Tool * by af123, 2011 */ #include "epg.h" #include "descriptor.h" #include "util.h" #define SYSOPT_PARSABLE 0x1 #define SYSOPT_BRIEF 0x2 extern int debug; extern const char *version; extern unsigned long sysopts; extern unsigned long filterflags; inline uint16_t read_uint16(uint8_t *, int); inline uint32_t read_uint32(uint8_t *, int); void hexdump(uint8_t *, uint32_t, uint32_t); char *hexstr(uint8_t *, uint32_t); char *ctime_nl(time_t *); time_t mjd(unsigned int, unsigned int, unsigned int, unsigned int); void safeprintf(char *, ...); void uncompress_epg(char **, unsigned int *); void iso6937_convert(char **, unsigned int *); struct epg *open_file(char *); void close_file(struct epg *); void add_epgfilter(struct epgfilter **, enum epgfiltertype, unsigned long, unsigned long, char *, enum matchtype); struct section *read_section(struct epg *); void dump_section(struct section *); struct data *read_data(struct epg *); void dump_data(struct data *); int parse(char *, void (*)(struct epg *, struct section *, struct data *, struct descriptor **, void *), void *, struct epgfilter *); struct descriptor *read_descriptor_header(struct epg *); void read_descriptor(struct epg *, struct descriptor *); void skip_descriptor(struct epg *, struct descriptor *); void dump_descriptor(struct descriptor *, int); void free_descriptor(struct descriptor *); const char *content_type(struct descriptor *); unsigned char *freeview_huffman_to_string(const unsigned char *, unsigned int, unsigned int *); int is_bst(time_t); void bstise(time_t *); char *strcasestr (char *, char *);