From f01127845b764655d7126668c974714088d886ea Mon Sep 17 00:00:00 2001 From: TheUltimateOptimist Date: Sun, 28 Jan 2024 01:46:56 +0100 Subject: [PATCH] refactoring: renamed getstr to gets --- src/userinput.c | 4 ++-- src/userinput.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/userinput.c b/src/userinput.c index a3729d3..cdf03c6 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -62,7 +62,7 @@ char *readInput() { return buffer; } -char *getstr(char *message, unsigned long *minLength, unsigned long *maxLength) { +char *gets(char *message, unsigned long *minLength, unsigned long *maxLength) { printf("%s", message); fflush(stdout); char *result = readInput(); @@ -95,7 +95,7 @@ void printlf(long double value) { long double getNumber(char *message, long double *min, long double *max, long double *greaterThan, long double *smallerThan, long double leftBorder, long double rightBorder) { while (1) { - char *input = getstr(message, NULL, NULL); + char *input = gets(message, NULL, NULL); if (strlen(input) == 0) { printf("%s\n", "Fehlende Eingabe!"); fflush(stdout); diff --git a/src/userinput.h b/src/userinput.h index 9afa84a..a693f60 100644 --- a/src/userinput.h +++ b/src/userinput.h @@ -1,6 +1,6 @@ #ifndef USERINPUT_H #define USERINPUT_H -char *getstr(char *message, unsigned long *minLength, unsigned long *maxLength); +char *gets(char *message, unsigned long *minLength, unsigned long *maxLength); short gethd(char *message, short *min, short *max); int getd(char *message, int *min, int *max); long getld(char *message, long *min, long *max);