71 info(0,
"Usage test_pap [option] pap_source");
72 info(0,
"where options are");
73 info(0,
"-h print this text");
74 info(0,
"-v level set log level for stderr logging");
75 info(0,
"-l log wap event to this file");
78 int main(
int argc,
char **argv)
89 while ((opt =
getopt(argc, argv,
"h:v:l:")) != EOF) {
107 error(0,
"Invalid option %c", opt);
109 panic(0,
"Stopping");
115 error(0,
"Missing arguments");
117 panic(0,
"Stopping");
120 if (log_file != NULL) {
127 panic(0,
"Cannot read the pap document");
133 debug(
"test.pap", 0,
"Unable to compile the pap document, rc %d", ret);
137 debug(
"test.pap", 0,
"Compiling successfull, wap event being:\n");
void error(int err, const char *fmt,...)
void info(int err, const char *fmt,...)
#define octstr_get_cstr(ostr)
void wap_event_dump(WAPEvent *event)
int getopt(int argc, char **argv, char *opts)
void log_set_output_level(enum output_level level)
int main(int argc, char **argv)
void octstr_destroy(Octstr *ostr)
#define octstr_create(cstr)
Octstr * octstr_read_file(const char *filename)
int log_open(char *filename, int level, enum excl_state excl)
void debug(const char *place, int err, const char *fmt,...)
void gwlib_shutdown(void)
int pap_compile(Octstr *pap_content, WAPEvent **e)
void wap_event_destroy(WAPEvent *event)