From b7053a62411c7b72ac75121d0b5e59d05de22bd6 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Sun, 23 May 2021 16:04:45 +0200 Subject: [PATCH] updated readme for changed interface --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf4baa4..3a9b6ae 100644 --- a/README.md +++ b/README.md @@ -143,13 +143,11 @@ Include the `templates.h` file into your program. #include ``` -Use the function `findTemplate()` to find the template for a given name. This function will always return a valid `template_t` pointer. In case no template with the given name is found a placeholder template is returned. - -The result is a function pointer that takes a `FILE*` argument (the template will be rendered to that stream) followed by the arguments that are specified in the template file (in the same order). +Use the function `renderTemplate()` to render a template with a given namen. The first argument is the name of the template, the second one is the `FILE*` into with the template will be rendered. The following arguments are the parameters of the template itself (in the order that they were declared in the template file). Following example shows how this could look like (using the previous discussed "Complete Example" withe name specified in "Translating Template"). ``` -findTemplate("templates/index.html.templ")(stdout, "Page Title", userArray, userArrayLength); +renderTemplate("templates/index.html.templ", qstdout, "Page Title", userArray, userArrayLength); ``` # Demo