From: teodor Date: Thu, 2 Oct 2008 15:44:13 +0000 (+0000) Subject: Usage information is added X-Git-Url: http://www.sigaev.ru/git/gitweb.cgi?p=tedtools.git;a=commitdiff_plain;h=5021375089006beb01d053f57b0d913df885b26e Usage information is added --- diff --git a/template.h b/template.h index 0e12052..a2d7e39 100644 --- a/template.h +++ b/template.h @@ -28,6 +28,9 @@ */ /****************************************************************************** + * Html template library * + ****************************************************************************** + ****************************************************************************** * SYNTAX * ****************************************************************************** * <% EXPRESSION , "FORMAT"] [# "DEFAULTVALUE"] [|(h|u)]%> @@ -74,7 +77,7 @@ * <# comment #> * ****************************************************************************** - * C-Interface + * C-Interface * ****************************************************************************** * - setTemplateValueInt * setTemplateValueString @@ -98,6 +101,17 @@ * setTemplateValueBool("outerLoop.var1"); * addTemplateRow("innerLoop"); * setTemplateValueBool("outerLoop.innerLoop.var2"); + * + ****************************************************************************** + * Memory management * + ****************************************************************************** + * Unfortunatly, I'm too lazy to unify memory usage by several pieces + * in library. So, library uses mixed plain malloc and memory context + * concepts (tmalloc.h). + * To work with library it's needed to allocate persitent memory context + * for initTemplate() call and temprorary memory context for usual work. + * after printTemplate is called it's needed to call resetTemplate() and + * then resetMemoryContext() for second context. * ******************************************************************************/