summaryrefslogtreecommitdiff
path: root/src/case.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
commit795ffc5e62e8ba383575dbcd9943a580d4bd3358 (patch)
treec128889056202b255e2f22afeb7717894d350862 /src/case.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/case.c')
-rw-r--r--src/case.c36
1 files changed, 18 insertions, 18 deletions
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';