read_next_tmpl
while ( buflen > 0 && ( rc = read_next_tmpl( &buf, &buflen, &tmpl,
static int read_next_tmpl( char **bufp, long *blenp,