1 #include <stdio.h>
2 #include "tpl.h"
3 
main()4 int main() {
5     tpl_node *tn;
6     unsigned i;
7 
8     tn = tpl_map("A(u)",&i);
9     for(i=0;i<10;i++) tpl_pack(tn,1);
10     tpl_dump(tn,TPL_FILE,"/tmp/test22.tpl");
11     tpl_free(tn);
12 
13     tn = tpl_map("A(u)",&i);
14     tpl_load(tn,TPL_FILE,"/tmp/test22.tpl");
15     while (tpl_unpack(tn,1) > 0) printf("i is %d\n", i);
16     tpl_free(tn);
17     return(0);
18 }
19