Go to the source code of this file.
 | 
| static void  | help (void) | 
|   | 
| int  | main (int argc, char **argv) | 
|   | 
◆ help()
  
  
      
        
          | static void help  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 69 of file test_pap.c.
References info().
Referenced by main().
   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");
 void info(int err, const char *fmt,...)
 
 
 
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 78 of file test_pap.c.
References debug(), error(), getopt(), GW_DEBUG, GW_NON_EXCL, gwlib_init(), gwlib_shutdown(), help(), log_open(), log_set_output_level(), octstr_create, octstr_destroy(), octstr_get_cstr, octstr_read_file(), optarg, optind, panic, pap_compile(), wap_event_destroy(), and wap_event_dump().
   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,...)
 
#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)
 
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)