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