+ *
+ ******************************************************************************
+ * 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.