aboutsummaryrefslogtreecommitdiff
path: root/src/template.c
Commit message (Collapse)AuthorAgeFilesLines
* Refactor directory structureJoseph Hunkeler2024-10-141-318/+0
| | | | | * Move core library sources into src/lib/core * Move command-line programs into src/cli
* Fix leaks in tpl functions (#18)Joseph Hunkeler2024-08-071-0/+1
| | | | | | | | * Free the function key string in tplfunc_frame during tpl_free() * Fix leaks in get_github_release_notes_auto_tplfunc_entrypoint(): * Free repository name * Free list of release notes
* Add github.c and github.h (#9)Joseph Hunkeler2024-07-061-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add github.c and github.h * Implements get_github_release_notes() * Remove unused variables * Fix circular dependency on tplfunc_frame * Remove predeclaration of tplfunc_frame * tpl_register_func accepts pointer to void instead * tpl_register_func sets maximum number of arguments * Frame is generated within tpl_register_func * Improve template function error handling and return/output management * Remove redundant extern statement * Include github.h and template_func_proto.h in core.h * Expose get_github_release_notes_tplfunc_entrypoint function to template engine * Add template_func_proto.c and template_func_proto.h * Replace free() with guard variant * Fix test_template::test_tpl_register_func * Fix tests * Fix tests * cmd should be at least PATH_MAX in size. * Magic number caused failure to install conda with a long installation path * Implement get_github_release_notes_auto function that bases release note data off test contexts * Disable overwriting releases by default * Add automatic release note generation function call to release_notes.md.in * Fix test_tpl_register_func() * Add enough space for tar command plus a path * Fix circular include * Github functions do not require access to core.h anyway * Add comments to union * Update README to mention template function availability * Add EnvCtl structure * Add runtime checks to avoid running all the way to the end only to be met with a configuration error. * Rename GITHUB to GH * Development docs pre-rough-draft
* Rebrand OhMyCal (OMC) as STASIS (#7)Joseph Hunkeler2024-06-211-1/+1
|
* Unit tests (#6)Joseph Hunkeler2024-06-201-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit of unit tests [WIP] * Address shortcomings and bugs flushed out by unit tests * Enable unit testing in CI workflow * Enable verbose ctests * Handle lack of __FILE_NAME__ define * Only podman support `run --arch` argument * Skip docker build testing if CI system cannot pull an image * Remove errant call to puts() * Identify local repo user * Fix missing xmllint * NULL terminate arrays * Fix filename assignment in is_url mode * Break loop when expected lines are exhausted * strcmp_array expects NULL terminated array. Iterating by size in this case passes NULL to strcmp leading to an invalid read * Remove debug printf statements * Disable a few warnings for tests * Workaround for ctest junit xml truncation * Update checkout@v4 * Prevent false-positive result * Return zero on error * Fix strlist_remove function * Value argument can be constant * Fix test to match changes to startswith and endswith * Add test_ini.c * Fix redaction code to accept NULL pointers in array * And let the caller specify the length of the array of strings to redact. * Redactions now occur directly on authentication strings rather than their command line arguments * Fix BUILD_TESTING_DEBUG * Adds missing -D argument
* Fix invalid size for tpl_pool_funcJoseph Hunkeler2024-05-081-1/+1
|
* Fix invalid readJoseph Hunkeler2024-04-121-4/+1
| | | | * Replaces the bare pointer while-loop with a for-loop and tests against the length of the string.
* Registering a variable more than once will replace the pointer associated ↵Joseph Hunkeler2024-04-121-4/+33
| | | | with a key; not generate a new record
* Ignore unused variableJoseph Hunkeler2024-04-101-0/+1
|
* Fix an unintended offset shift in closing brace detectionJoseph Hunkeler2024-04-021-1/+1
|
* Lock output behind DEBUG defineJoseph Hunkeler2024-04-021-1/+5
|
* Comment branchJoseph Hunkeler2024-03-241-2/+2
|
* Short-circuit on zero-length str argumentJoseph Hunkeler2024-03-241-0/+2
|
* Fix realloc error handlingJoseph Hunkeler2024-03-241-1/+2
|
* Error messagesJoseph Hunkeler2024-03-221-2/+2
|
* Use array notation instead of pure pointersJoseph Hunkeler2024-03-221-13/+16
| | | | | * The compiler was convinced pos could be NULL but I found no such issue in the code. * Accessing by index satisfies whatever GCC thinks was happening here.
* Consolidate pointer assignment to if-statementJoseph Hunkeler2024-03-221-1/+1
| | | | * Easier to see what's happening. Nothing more.
* Replace free() with guard_* macrosJoseph Hunkeler2024-03-221-0/+2
|
* Add template functions to store/load function pointers.Joseph Hunkeler2024-03-141-0/+27
| | | | * Incomplete and unused for now
* Use do/while in guard_* macros to make them behave more like functionsJoseph Hunkeler2024-03-101-2/+2
|
* Fix memory corruption in runtime_set and tpl_renderJoseph Hunkeler2024-03-041-7/+6
|
* Remove semicolon from call to guard_freeJoseph Hunkeler2024-03-041-1/+1
|
* Fixes several memory leaksJoseph Hunkeler2024-02-261-0/+1
|
* Fix typo in position pointer calculationJoseph Hunkeler2024-02-231-1/+2
| | | | * Not sure how it ended up as (bclose + 2 - pos) to begin with
* Implement delivery_mission_render_filesJoseph Hunkeler2024-02-131-30/+34
|
* Fix addressing issue...Joseph Hunkeler2024-02-061-5/+6
| | | | | | | * Store the address of the pointer to template variable, instead of the pointer. Whoops! * Pre-declare all template pointers as early as possible to make them available to the entire program * Comment tpl_*() prototypes
* Initial commit of template engine code (not hooked up yet)Joseph Hunkeler2024-01-301-0/+190