From 795ffc5e62e8ba383575dbcd9943a580d4bd3358 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 15:50:21 +0200 Subject: formatting changes Manual format adjustments. Comment adjustments. Remove usage of the register keyword. --- src/case.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/case.c') diff --git a/src/case.c b/src/case.c index fa5c86b..8303d8f 100644 --- a/src/case.c +++ b/src/case.c @@ -3,15 +3,15 @@ #include "str.h" /** - @file case.c - @author djb - @brief string comparison and helper functions; case insensitive + @file case.c + @author djb + @brief string comparison and helper functions; case insensitive */ -int case_diffb(register char *s, unsigned int len, register char *t) +int case_diffb(char *s, unsigned int len, char *t) { - register unsigned char x; - register unsigned char y; + unsigned char x; + unsigned char y; while (len > 0) { --len; @@ -30,10 +30,10 @@ int case_diffb(register char *s, unsigned int len, register char *t) return 0; } -int case_diffs(register char *s, register char *t) +int case_diffs(char *s, char *t) { - register unsigned char x; - register unsigned char y; + unsigned char x; + unsigned char y; for (;;) { x = *s++ - 'A'; @@ -52,10 +52,10 @@ int case_diffs(register char *s, register char *t) return ((int)(unsigned int)x) - ((int)(unsigned int)y); } -int case_diffrs(register char *s, register char *t) +int case_diffrs(char *s, char *t) { - register unsigned char x = 0; - register unsigned char y = 0; + unsigned char x = 0; + unsigned char y = 0; unsigned int lens = str_len(s); unsigned int lent = str_len(t); @@ -119,10 +119,10 @@ void case_uppers(char *s) } } -int case_startb(register char *s, unsigned int len, register char *t) +int case_startb(char *s, unsigned int len, char *t) { - register unsigned char x; - register unsigned char y; + unsigned char x; + unsigned char y; for (;;) { y = *t++ - 'A'; @@ -142,10 +142,10 @@ int case_startb(register char *s, unsigned int len, register char *t) } } -int case_starts(register char *s, register char *t) +int case_starts(char *s, char *t) { - register unsigned char x; - register unsigned char y; + unsigned char x; + unsigned char y; for (;;) { x = *s++ - 'A'; -- cgit v1.2.3