Clearsilver模板系统-cs_render()和CSOUTFUNC的问题

|| 从我的代码中提取:
NEOERR*
func(void *,char *);
...
char* buf;
buf = (char*) malloc(1024);
HDF* hdf;
CSPARSE* cs;
hdf_init(&hdf);
hdf_set_value(hdf, \"name\", \"foo\"); 
cs_init(&cs, hdf);
strcpy(buf, \"This is <?cs var:name ?>\");
cs_parse_string(cs, buf, 1024);
cs_render(cs, NULL , func);
...
NEOERR*
func(void *b, char* a)
{
    printf(\"%s\", a);
}
输出为:
This is<space>
如果我用
strcpy(buf, \"<?cs var:name ?>\");
那么输出是
foo
如何将模板命令与静态文本结合使用?我的CSOUTFUNC函数有什么问题? 提前谢谢了     
已邀请:
        问题是缺少
return (STATUS_OK);
在功能上
NEOERR*
func(void *,char *);
解决了。     

要回复问题请先登录注册