From d8e03b1a1d929f6afeac72d475183d0218656b48 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Sat, 11 Jan 2025 16:57:57 -0600 Subject: First pass at genpassword --- src/shared.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/shared.h') diff --git a/src/shared.h b/src/shared.h index 05ab58c..5894b41 100644 --- a/src/shared.h +++ b/src/shared.h @@ -4,17 +4,17 @@ #include #include -#define STATICARRAY_SIZE(arr) (sizeof((arr))/sizeof((arr)[0])) +#define STATICARR_SIZE(arr) (sizeof((arr))/sizeof((arr)[0])) -// Defines how `x___alloc()` functions should exit. `___VXGG___XCALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions -// registered with `atexit()` and `on_exit()`. `___VXGG___XCALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `xcalloc()` -// will ALWAYS 'abort', doing otherwise defeats the purpose of the function -#define ___VXGG___XCALLOC_EXIT_ON_ERROR___ 1 +// Defines how `x___alloc()` functions should exit. `___VXGG___XALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions +// registered with `atexit()` and `on_exit()`. `___VXGG___XALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `x___alloc()` +// type functions will ALWAYS 'abort', doing otherwise defeats the purpose of the function type +#define ___VXGG___XALLOC_EXIT_ON_ERROR___ 1 -// `calloc()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XCALLOC_EXIT_ON_ERROR___` +// `calloc()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XALLOC_EXIT_ON_ERROR___` void* xcalloc(size_t nmemb, size_t size); -// `reallocarray()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XCALLOC_EXIT_ON_ERROR___` +// `reallocarray()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XALLOC_EXIT_ON_ERROR___` void* xreallocarray(void *ptr, size_t nmemb, size_t size); #if !defined _GNU_SOURCE -- cgit v1.2.3