From d2a2ce7ab060866e397480c57e147aafe8f9704c Mon Sep 17 00:00:00 2001 From: TheUltimateOptimist Date: Sun, 28 Jan 2024 01:02:15 +0100 Subject: [PATCH] implemented LD macro --- src/userinput.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/userinput.c b/src/userinput.c index 554b296..9a3e85f 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -7,6 +7,15 @@ #include #include +#define LD(name)\ + long double name##ldvalue;\ + long double *name##ld = NULL;\ + if (name != NULL) {\ + name##ldvalue = *name;\ + name##ld = &name##ldvalue;\ + } + + void trimLeft(char *input) { size_t length = strlen(input); int firstIndex = 0;