freeswitch/libs/libtpl-1.5/tests/test36.c
2012-09-13 15:01:01 -05:00

23 lines
373 B
C
Executable File

#include <stdio.h>
#include <stdlib.h>
#include "tpl.h"
int main(int argc, char *argv[]) {
tpl_node *tn;
int id;
char *name;
tn = tpl_map("A(is)", &id, &name);
tpl_load(tn, TPL_FILE, "/tmp/test35.tpl");
while ( tpl_unpack(tn,1) > 0 ) {
printf("id %d, user %s\n", id, name);
free(name);
}
tpl_free(tn);
return(0);
}