1 #include <stdio.h> 2 #include "tpl.h" 3 4 extern tpl_hook_t tpl_hook; 5 main()6int main() { 7 tpl_node *tn; 8 int i; 9 10 tpl_hook.oops = printf; 11 12 tn = tpl_map("A(i)",&i); 13 tpl_load(tn,TPL_FILE,"test13.tpl"); 14 while (tpl_unpack(tn,1) > 0) printf("i is %d\n", i); 15 tpl_free(tn); 16 return(0); 17 } 18