tpl/tests/test78.c
2013-03-12 16:38:58 -04:00

24 lines
393 B
C

#include "tpl.h"
int main() {
int i;
char c;
tpl_node *tn;
tn = tpl_map("A(i)c", &i, &c);
/* pack index number 0 (char c) */
c = 'a';
tpl_pack(tn, 0);
/* pack A(i) (that is, index number 1) a few times */
i = 3;
tpl_pack(tn, 1);
i = 4;
tpl_pack(tn, 1);
tpl_dump(tn, TPL_FILE, "/tmp/test78.tpl");
tpl_free(tn);
return(0);
}