2011-06-01 23:34:35 +00:00
|
|
|
|
|
|
|
#include "epg.h"
|
2011-06-02 11:14:43 +00:00
|
|
|
#include "descriptor.h"
|
|
|
|
#include "util.h"
|
2011-06-01 23:34:35 +00:00
|
|
|
|
2011-06-04 21:45:40 +00:00
|
|
|
#define SYSOPT_PARSABLE 0x1
|
|
|
|
#define SYSOPT_BRIEF 0x2
|
|
|
|
#define SYSOPT_TIMESTAMP 0x4
|
2011-06-02 23:51:14 +00:00
|
|
|
|
2011-06-01 23:34:35 +00:00
|
|
|
extern int debug;
|
|
|
|
extern const char *version;
|
|
|
|
extern unsigned long sysopts;
|
|
|
|
|
|
|
|
inline uint16_t read_uint16(uint8_t *, int);
|
|
|
|
inline uint32_t read_uint32(uint8_t *, int);
|
|
|
|
void hexdump(uint8_t *, uint32_t, uint32_t);
|
2011-06-02 11:14:43 +00:00
|
|
|
char *hexstr(uint8_t *, uint32_t);
|
|
|
|
char *ctime_nl(time_t *);
|
2011-06-02 23:51:14 +00:00
|
|
|
time_t mjd(uint16_t, int, int, int);
|
|
|
|
void safeprintf(char *, ...);
|
2011-06-01 23:34:35 +00:00
|
|
|
|
|
|
|
struct epg *open_file(char *);
|
|
|
|
void close_file(struct epg *);
|
2011-06-03 10:27:40 +00:00
|
|
|
void add_epgfilter(struct epgfilter **, enum epgfiltertype,
|
2011-06-04 21:45:40 +00:00
|
|
|
unsigned long, unsigned long, char *, enum matchtype);
|
2011-06-01 23:34:35 +00:00
|
|
|
|
2011-06-02 11:14:43 +00:00
|
|
|
struct section *read_section(struct epg *);
|
|
|
|
void dump_section(struct section *);
|
2011-06-01 23:34:35 +00:00
|
|
|
|
|
|
|
struct data *read_data(struct epg *);
|
|
|
|
void dump_data(struct data *);
|
|
|
|
|
2011-06-02 23:51:14 +00:00
|
|
|
void parse(char *,
|
|
|
|
void (*)(struct epg *, struct section *, struct data *,
|
2011-06-03 10:27:40 +00:00
|
|
|
struct descriptor **, void *), void *, struct epgfilter *);
|
2011-06-02 23:51:14 +00:00
|
|
|
|
2011-06-02 11:14:43 +00:00
|
|
|
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);
|
2011-06-02 15:21:56 +00:00
|
|
|
void free_descriptor(struct descriptor *);
|
2011-06-02 01:32:55 +00:00
|
|
|
|
2011-06-05 18:23:29 +00:00
|
|
|
unsigned char *freeview_huffman_to_string(const unsigned char *, uint,
|
|
|
|
unsigned int *);
|
|
|
|
|
2011-06-02 23:51:14 +00:00
|
|
|
#ifdef sun
|
|
|
|
char *strcasestr (char *, char *);
|
|
|
|
#endif
|
|
|
|
|