a template engine write in c language