diff --git a/src/userinput.c b/src/userinput.c index 41bf30d..1269cb1 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -27,6 +27,18 @@ void printText(char *text) { } } +void printlf(long double value) { + if (fakeInput != NULL) { + return; + } + if (roundl(value) == value) { + printf("%.0Lf", value); + } + else { + printf("%Lf", value); + } +} + void trimLeft(char *input) { size_t length = strlen(input); int firstIndex = 0; @@ -81,18 +93,6 @@ char *readInput() { return buffer; } -void printlf(long double value) { - if (fakeInput != NULL) { - return; - } - if (roundl(value) == value) { - printf("%.0Lf", value); - } - else { - printf("%Lf", value); - } -} - char *gets(char *message, unsigned long *minLength, unsigned long *maxLength) { printText(message); char *result = readInput();