X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/blobdiff_plain/862414c1fb14417cf57b4fad4798fd5833ef0325..2ec562f15a095c23bc7c16199ea7428007b7b8ec:/catacomb.c diff --git a/catacomb.c b/catacomb.c index d7b3dc7..daa404a 100644 --- a/catacomb.c +++ b/catacomb.c @@ -31,7 +31,8 @@ /*----- Main code ---------------------------------------------------------*/ static const struct nameval consts[] = { -#define C(x) { #x, x } +#define CF(f, x) { #x, f, x } +#define C(x) { #x, (x) >= 0 ? 0 : CF_SIGNED, x } C(FTY_PRIME), C(FTY_BINARY), C(PGEN_PASS), C(PGEN_FAIL), C(PGEN_BEGIN), C(PGEN_TRY), C(PGEN_DONE), C(PGEN_ABORT), @@ -39,7 +40,7 @@ static const struct nameval consts[] = { C(RAND_IBITS), C(PMODE_READ), C(PMODE_VERIFY), C(KOPEN_READ), C(KOPEN_WRITE), C(KOPEN_NOFILE), - C(KEXP_FOREVER), C(KEXP_EXPIRE), + CF(0, KEXP_FOREVER), CF(0, KEXP_EXPIRE), C(KF_ENCMASK), C(KENC_BINARY), C(KENC_MP), C(KENC_STRUCT), C(KENC_ENCRYPT), C(KENC_STRING), C(KENC_EC), C(KF_CATMASK), C(KCAT_SYMM), C(KCAT_PRIV), C(KCAT_PUB), C(KCAT_SHARE), @@ -55,6 +56,7 @@ static const struct nameval consts[] = { KEY_ERRORS(ENTRY) #undef ENTRY #undef C +#undef CF { 0 } };