1 #include <stdio.h>
2 #include <stdint.h>
3
4 #include <tpl.h>
5
main(int n,char * a[])6 int main ( int n , char* a [ ] )
7 {
8
9 tpl_node* tn ;
10 int64_t cn = 100,cn2 ;
11
12 tn = tpl_map ( "I" , &cn ) ;
13 tpl_pack ( tn , 0 ) ;
14 tpl_dump ( tn , TPL_FILE , "/tmp/test90.tpl" ) ;
15 tpl_free ( tn ) ;
16
17 tn = tpl_map ( "I" , &cn2 ) ;
18 tpl_load ( tn , TPL_FILE , "/tmp/test90.tpl" ) ;
19 tpl_unpack ( tn , 0 ) ;
20 printf("cn is %sequal to cn2\n", (cn == cn2) ? "" : "not");
21 tpl_free ( tn ) ;
22 return ( 0 ) ;
23 }
24