From d378fa1a31459407b4ebf8fb3eba2d39f33496db Mon Sep 17 00:00:00 2001 From: TheUltimateOptimist Date: Sun, 28 Jan 2024 01:03:10 +0100 Subject: [PATCH] implemented gethd --- src/userinput.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/userinput.c b/src/userinput.c index 9a3e85f..24946dc 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -6,6 +6,7 @@ #include #include #include +#include #define LD(name)\ long double name##ldvalue;\ @@ -159,4 +160,10 @@ long double getNumber(char *message, long double *min, long double *max, long do printf("\n"); fflush(stdout); } +} + +short gethd(char *message, short *min, short *max) { + LD(min) + LD(max) + return getNumber(message, minld, maxld, NULL, NULL, SHRT_MIN, SHRT_MAX); } \ No newline at end of file