aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-12-05 18:42:19 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2018-12-05 18:42:19 -0500
commit7d3b0b917cdb93d249dc356db8471fe9e6863424 (patch)
treef5544048afa123a8f483e4ef7173235ba2a3e565 /README.md
parentea5f2d56933d04975ef34b85372a577ad433950f (diff)
downloadlibctemplates-7d3b0b917cdb93d249dc356db8471fe9e6863424.tar.gz
libctemplates-7d3b0b917cdb93d249dc356db8471fe9e6863424.tar.bz2
libctemplates-7d3b0b917cdb93d249dc356db8471fe9e6863424.zip
Added more documentation
Added documentation for each function in the include/ctemplates.h file Also did some spellchecking on the readme.
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 10 insertions, 12 deletions
diff --git a/README.md b/README.md
index f23ad85..1f2c740 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ If you found this page using a search engine, you may be looking for the
original [libctemplate](http://libctemplate.sourceforge.net) by Stephen C. Losen
libctemplates is a template expander written for use with HTML. It's goals are
-to be simple, versitile, and fast. This library started off as a
+to be simple, versatile, and fast. This library started off as a
fork of libctemplate, but eventually became a total rewrite. libctemplate,
the original, was built primarily for cgi applications. libctemplate was
tightly coupled with file streams, while libctemplate**S** renders templates to
@@ -12,22 +12,20 @@ strings for use in any application, FastCGI or [Kore](kore.io), for example.
If you think libctemplates is missing a feature, feel free to suggest it to
[alex@cogarr.net](mailto://alex@cogarr.net),
or, even better, write it yourself and send the patch! You can find
-instructions on createing and sending git patches [here](http://cogarr.net/source/cgit.cgi/?p=about).
+instructions on creating and sending git patches [here](http://cogarr.net/source/cgit.cgi/?p=about).
## Contents
1. [Installation](#Installation)
2. [Usage](#Usage)
-3. [Quick refrence](#Quick refernce)
+3. [Quick reference](#Quick refernce)
4. [Examples](#Examples)
-
-
<section id="Installation"></section>
## Installation
Run the make file. libctemplates should compile on any system with a c99
-complient c compiler. If you are on linux, run
+complaint c compiler. If you are on linux, run
make; make install
@@ -40,7 +38,7 @@ libctemplates.a, for example:
gcc main.c -lctemplates
<section id="Quick refrence"></section>
-## Quick refrence
+## Quick reference
### Structs
@@ -50,7 +48,7 @@ libctemplates.a, for example:
Holds a list of variables to be used when rendering a template
loops can be held in a varlist, and varlists can be held in loops.
* struct TMPL\_loop
- Used to defien things to loop through in a varlist.
+ Used to define things to loop through in a varlist.
### Functions
@@ -94,7 +92,7 @@ Adds a varlist that should be used one iteration through the loop
char* TMPL_render(struct TMPL_templates* t, struct TMPL_varlist* vl, size_t* length)
-Turns a template and varlist into a string. the returned char\* should NOT be freed. The returned char\* is only valid until TMPL\_render() is called again. If you need it even after TMPL\_render() is called, copy it. The length of the returned string is put into `length` to help in copying.
+Turns a template and varlist into a string. The returned char\* should NOT be freed. The returned char\* is only valid until TMPL\_render() is called again. If you need it even after TMPL\_render() is called, copy it. The length of the returned string is put into `length` to help in copying.
### Templating tags
@@ -114,7 +112,7 @@ Prints the variable named "variable\_name" in it's place, if no variable named "
Branching statements, checks if a variable is equal to a constant value.
-Checks if the variable "variable\_name" contains the string "check\_value". There is currently no way to check if two variables are equal. Elseif and Else clauses are optional. All `TMPL_IF` statements must be closed with `TMPL_END`. You can use `TMPL_IF` and `TMPL_ELSEIF` to check for a variable's existance by not specifying a `value` parameter.
+Checks if the variable "variable\_name" contains the string "check\_value". There is currently no way to check if two variables are equal. Elseif and Else clauses are optional. All `TMPL_IF` statements must be closed with `TMPL_END`. You can use `TMPL_IF` and `TMPL_ELSEIF` to check for a variable's existence by not specifying a `value` parameter.
<TMPL_LOOP name="loop_name">
:
@@ -327,7 +325,7 @@ a minifier! Just a template expander!
### Loops
Loops are special in libctemplates, loops each have their own namespace, and
-only variables that have been added to the namespace are acessable in the loop.
+only variables that have been added to the namespace are accessible in the loop.
*template.html*
@@ -411,7 +409,7 @@ only variables that have been added to the namespace are acessable in the loop.
This time through the loop, my variable is theird
Done!
-<!-- Some styleing, make it pretty! -->
+<!-- Some styling, make it pretty! -->
<style>
body,html{
line-height:1.2;