aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fixed testsAlexander Pickering2019-11-25
| | | | Fixed tests to use the new apis
* Fixed a crashAlexander Pickering2019-11-25
| | | | | Certain conditions on an if statement could cause a crash, bug introduced when adding errors everywhere a few patches ago.
* Added appropriate error for missing a var bindingAlexander Pickering2019-11-25
| | | | | The var binding warning before was just a printf(), change it so that it outputs some helpful text to the template's errout.
* Merge branch 'master' of ssh://cogarr.net:43/home/git/libctemplatesAlexander Pickering2019-11-24
|\
| * Fixed memory corruption bugsAlex Pickering2019-09-28
| | | | | | | | Fixed various memory corruption bugs in the parsing step
* | Reset the output buffer on renderAlexander Pickering2019-11-24
| | | | | | | | | | Reset the output buffer when TMPL_render() is called so that only only the latest render errors are preserved.
* | Fixed empty loop causeing infinite loopAlexander Pickering2019-11-21
|/ | | | | | If a loop was defined in the template, but no loop was defined in the varlist, render() would infinite loop while trying to execute. Fixs that.
* BugfixAlexander Pickering2019-09-28
| | | | Fixed a bug where rendering a template multiple times would fail.
* Fixed some out of bounds writesAlex Pickering2019-09-28
|
* Fixed test to use new template allocAlex Pickering2019-09-28
|
* Merge branch 'master' of ssh://cogarr.net:43/home/git/libctemplatesAlexander Pickering2019-09-27
|\
| * Squashed warningsAlexander Pickering2019-09-27
| | | | | | | | | | Added the -Wextra flag to the makefile for debug builds, and squashed all the warning that came up.
* | Squashed warningsAlexander Pickering2019-09-27
|/ | | | | Added the -Wextra flag to the makefile for debug builds, and squashed all the warning that came up.
* Fix typos in headersAlexander Pickering2019-09-04
|
* Added break statement to templatesAlexander Pickering2019-08-28
| | | | | Added a break statement that can break out of loops, also added some tests to test the functionality of the same.
* Added more testAlexander Pickering2019-08-07
| | | | Added more system tests for loop breaking
* Added some unit tests for the break functionality.Alexander Pickering2019-07-21
| | | | | | Sill needs some more tests, like: make sure variable scoping is still correct after breaking out of a loop, how about multiple loops?
* Added break statementsAlexander Pickering2019-07-21
| | | | Added break statements that can be used to break out of loops
* Cleaning up printsAlexander Pickering2019-02-19
| | | | Cleanning up prints after the last commit
* Added break statementAlexander Pickering2019-02-19
| | | | Added a break statement that can break out of loops.
* Spelling correctionsAlexander Pickering2019-01-15
| | | | Corrected a bunch of spelling mistakes in the readme and the Makefile
* Make tokenize return double-linked listAlexander Pickering2018-12-15
| | | | | Tokenize now has a doubly linked list of toekns, for additionall help parsing break/continue instructions.
* Added more documentationAlexander Pickering2018-12-05
| | | | | Added documentation for each function in the include/ctemplates.h file Also did some spellchecking on the readme.
* Allow bstringify to accept a null sizeAlexander Pickering2018-12-05
| | | | | | Allow bstringify (and therefore TMPL_render()) to accept NULL as the size. When NULL is passed as the size, the size of the resulting string is not stored anywhere.
* Added a method to get errors from the templateAlexander Pickering2018-11-07
| | | | | | | Added a method const char* TMPL_err(TMPL_templates* t, size_t* size); t is the template that had an error size is a pointer, size of the error message is returned;
* Updated include to use const qualifiersAlexander Pickering2018-11-07
|\
| * Changed structs in header to forward declarationsAlexander Pickering2018-11-07
| |
* | Changed structs in header to forward declarationsAlexander Pickering2018-11-07
|/
* Added const to most charsAlexander Pickering2018-11-07
| | | | Added const qualifier for clarity.
* Started refactoring codeAlexander Pickering2018-10-25
| | | | | | Added a src/ and build/ directory Added a include/ directory Included file is smaller
* Fixed makefileAlexander Pickering2018-10-24
|
* Added another testAlexander Pickering2018-10-13
| | | | Added another test case to the test file.
* Added DEBUG=true flag to makefileAlexander Pickering2018-10-13
| | | | | | | When compileing with DEBUG=true, gcc will build with no optimizations and with debugging symbols. When compileing without DEBUG=true, gcc with build with -O3 and no debugging symbols.
* Allowed spaces to be used in attributesAlexander Pickering2018-10-13
| | | | | | | | | | | | | * Added an is_whitespace() function * <TMPL_VAR ...> may have whitespace between * name = "..." * default = "..." * <TMPL_IF ...> may have whitespace between * name = "..." * value = "..." * <TMPL_ELSEIF ...> may have whitespace between * name = "..." * value = "..."
* Added more testsAlexander Pickering2018-04-06
| | | | Added a few more tests.
* Added "if to check for existance" to readme.Alexander Pickering2018-04-06
| | | | | Added documentation that explains how to use TMPL_IF and TMPL_ELSEIF to check for a variable's existance.
* Added print_ast as a function.Alexander Pickering2018-04-06
| | | | Added `void print_ast(TMPL_node)` as a debugging function.
* Fixed a bug with if/elseifAlexander Pickering2018-04-06
| | | | | Elseif now works exactly like if, where it will check for the existance of a variable if it does not have a value field.
* Update copyright & emailAlexander Pickering2018-02-17
| | | | Updated copyright to cover 2018, and updated email to alex@cogarr.net
* Added a debug functionAlexander Pickering2018-01-18
| | | | Added a function print_varlist(TMPL_varlist* vl) for debugging
* Allows make install to work after installing onceAlex2018-01-18
|
* More changes for unix file pathsAlexander Pickering2018-01-18
| | | | Changed test file path from windows style to unix style.
* Removed object file & changed make fileAlexander Pickering2018-01-18
| | | | | | removed an object file that somehow made it into the repo Also chagned makefile to use unix style paths instead of windows style paths.
* Fixed a bug with TMPL_IF not working as variable checkAlexander Pickering2018-01-07
| | | | | Fixed a bug where the <TMPL_IF> tag was not correctly checking if a variable exists if it does not have a "testval" attribute.
* Started writing unit testsAlexander Pickering2018-01-05
| | | | | Added some tests for good input. Also fixed a bug where an empty loop would crash.
* Fixed a memory corruption bugAlexander Pickering2017-12-30
| | | | | Fixed a bug where adding a var to a varlist would sometimes cause memroy corruption
* Added more docmentationAlexander Pickering2017-12-30
| | | | Added some more documentation, and removed some extranious prints
* Various bugfixesAlexander Pickering2017-12-29
| | | | Also removed debug prints
* Fixed bugfixesAlexander Pickering2017-12-29
| | | | | | Fixed bug with tokenizing, also fixed a bug with parsing loops also fixed a bug with adding vars to a varlist
* Changed render functionAlexander Pickering2017-12-28
| | | | Render function now returns the length of the string it returns