From 900f5171c548754146aba9a4d6322a482d853d1e Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 25 Dec 2023 17:52:45 +0100 Subject: Reformatted printablestring() --- FICS/utils.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'FICS') diff --git a/FICS/utils.c b/FICS/utils.c index fab43fd..423f6ff 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -539,17 +539,16 @@ PUBLIC int alphastring(char *str) return 1; } -PUBLIC int printablestring(char *str) +PUBLIC int +printablestring(char *str) { - int i; - - if (!str) - return 1; - for (i = 0; str[i]; i++) { - if ((!isprint(str[i])) && (str[i] != '\t') && (str[i] != '\n')) - return 0; - } - return 1; + if (!str) + return 1; + for (int i = 0; str[i]; i++) { + if (!isprint(str[i]) && str[i] != '\t' && str[i] != '\n') + return 0; + } + return 1; } PUBLIC char * -- cgit v1.2.3