From 9489d31f6314322d26ec43196284b94069d6cd3a Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 20 Jul 2024 11:56:16 -0400 Subject: Regression tests, envctl, and bug fixes (#13) * Found too many bugs * Implements a regression test * Moves and completely refactors the envctl code * Allows the user to keep @STR@ values in output files (if you want full control over where external packages comes from post-build) * Fixes wording in a few places * envctl redaction is not implemented yet. The original redaction code hasn't been modified. * Use generic.ini instead of bare_minimum.ini --- include/envctl.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/envctl.h (limited to 'include/envctl.h') diff --git a/include/envctl.h b/include/envctl.h new file mode 100644 index 0000000..c8ef357 --- /dev/null +++ b/include/envctl.h @@ -0,0 +1,37 @@ +#ifndef STASIS_ENVCTL_H +#define STASIS_ENVCTL_H + +#include + +#define STASIS_ENVCTL_PASSTHRU 0 +#define STASIS_ENVCTL_REQUIRED 1 << 1 +#define STASIS_ENVCTL_REDACT 1 << 2 +#define STASIS_ENVCTL_DEFAULT_ALLOC 100 + +#define STASIS_ENVCTL_RET_FAIL (-1) +#define STASIS_ENVCTL_RET_SUCCESS 1 +#define STASIS_ENVCTL_RET_IGNORE 2 +typedef int (envctl_except_fn)(const void *, const void *); + +struct EnvCtl_Item { + unsigned flags; //