diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2015-10-26 16:31:10 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2015-10-26 16:31:10 +0000 |
commit | 86f40f24a92f411db61b7b115133b3c0809661c7 (patch) | |
tree | 731265303753da7bb2836c853aa4808d52b0d4d2 /bin/csh | |
parent | 618425776f3c2632152e75dd19885a1bc55371c8 (diff) |
Remove the #define Strfoo() s_strfoo() redirection and move everything
directly to Strfoo(). Purely mechanical. ok deraadt@
Diffstat (limited to 'bin/csh')
-rw-r--r-- | bin/csh/csh.h | 18 | ||||
-rw-r--r-- | bin/csh/extern.h | 24 | ||||
-rw-r--r-- | bin/csh/str.c | 26 |
3 files changed, 26 insertions, 42 deletions
diff --git a/bin/csh/csh.h b/bin/csh/csh.h index d111dced5b6..08ad8054ade 100644 --- a/bin/csh/csh.h +++ b/bin/csh/csh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.h,v 1.24 2015/10/26 16:27:04 naddy Exp $ */ +/* $OpenBSD: csh.h,v 1.25 2015/10/26 16:31:09 naddy Exp $ */ /* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */ /*- @@ -458,22 +458,6 @@ Char HIST; /* history invocation character */ Char HISTSUB; /* auto-substitute character */ /* - * strings.h: - */ -#define Strchr(a, b) s_strchr(a, b) -#define Strrchr(a, b) s_strrchr(a, b) -#define Strlcat(a, b, l) s_strlcat(a, b, l) -#define Strlcpy(a, b, l) s_strlcpy(a, b, l) -#define Strlen(a) s_strlen(a) -#define Strcmp(a, b) s_strcmp(a, b) -#define Strncmp(a, b, c) s_strncmp(a, b, c) - -#define Strspl(a, b) s_strspl(a, b) -#define Strsave(a) s_strsave(a) -#define Strend(a) s_strend(a) -#define Strstr(a, b) s_strstr(a, b) - -/* * setname is a macro to save space (see sh.err.c) */ char *bname; diff --git a/bin/csh/extern.h b/bin/csh/extern.h index 384711d5d9f..0c76ef724a6 100644 --- a/bin/csh/extern.h +++ b/bin/csh/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.22 2015/10/26 15:01:15 naddy Exp $ */ +/* $OpenBSD: extern.h,v 1.23 2015/10/26 16:31:09 naddy Exp $ */ /* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */ /*- @@ -294,17 +294,17 @@ void * Calloc(size_t, size_t); /* * str.c: */ -size_t s_strlcpy(Char *, const Char *, size_t); -size_t s_strlcat(Char *, const Char *, size_t); -Char *s_strchr(Char *, int); -Char *s_strrchr(Char *, int); -Char *s_strspl(Char *, Char *); -size_t s_strlen(Char *); -int s_strcmp(Char *, Char *); -int s_strncmp(Char *, Char *, size_t); -Char *s_strsave(Char *); -Char *s_strend(Char *); -Char *s_strstr(Char *, Char *); +size_t Strlcpy(Char *, const Char *, size_t); +size_t Strlcat(Char *, const Char *, size_t); +Char *Strchr(Char *, int); +Char *Strrchr(Char *, int); +Char *Strspl(Char *, Char *); +size_t Strlen(Char *); +int Strcmp(Char *, Char *); +int Strncmp(Char *, Char *, size_t); +Char *Strsave(Char *); +Char *Strend(Char *); +Char *Strstr(Char *, Char *); Char *str2short(char *); Char **blk2short(char **); char *short2str(Char *); diff --git a/bin/csh/str.c b/bin/csh/str.c index 85c41c32c46..edf45e31188 100644 --- a/bin/csh/str.c +++ b/bin/csh/str.c @@ -1,4 +1,4 @@ -/* $OpenBSD: str.c,v 1.18 2015/10/26 16:27:04 naddy Exp $ */ +/* $OpenBSD: str.c,v 1.19 2015/10/26 16:31:09 naddy Exp $ */ /* $NetBSD: str.c,v 1.6 1995/03/21 09:03:24 cgd Exp $ */ /*- @@ -142,7 +142,7 @@ short2str(Char *src) } size_t -s_strlcpy(Char *dst, const Char *src, size_t siz) +Strlcpy(Char *dst, const Char *src, size_t siz) { Char *d = dst; const Char *s = src; @@ -168,7 +168,7 @@ s_strlcpy(Char *dst, const Char *src, size_t siz) } size_t -s_strlcat(Char *dst, const Char *src, size_t siz) +Strlcat(Char *dst, const Char *src, size_t siz) { Char *d = dst; const Char *s = src; @@ -182,7 +182,7 @@ s_strlcat(Char *dst, const Char *src, size_t siz) n = siz - dlen; if (n == 0) - return(dlen + s_strlen((Char *)s)); + return(dlen + Strlen((Char *)s)); while (*s != '\0') { if (n != 1) { *d++ = *s; @@ -196,7 +196,7 @@ s_strlcat(Char *dst, const Char *src, size_t siz) } Char * -s_strchr(Char *str, int ch) +Strchr(Char *str, int ch) { do if (*str == ch) @@ -207,7 +207,7 @@ s_strchr(Char *str, int ch) } Char * -s_strrchr(Char *str, int ch) +Strrchr(Char *str, int ch) { Char *rstr; @@ -221,7 +221,7 @@ s_strrchr(Char *str, int ch) } size_t -s_strlen(Char *str) +Strlen(Char *str) { size_t n; @@ -231,7 +231,7 @@ s_strlen(Char *str) } int -s_strcmp(Char *str1, Char *str2) +Strcmp(Char *str1, Char *str2) { for (; *str1 && *str1 == *str2; str1++, str2++) continue; @@ -251,7 +251,7 @@ s_strcmp(Char *str1, Char *str2) } int -s_strncmp(Char *str1, Char *str2, size_t n) +Strncmp(Char *str1, Char *str2, size_t n) { if (n == 0) return (0); @@ -278,7 +278,7 @@ s_strncmp(Char *str1, Char *str2, size_t n) } Char * -s_strsave(Char *s) +Strsave(Char *s) { Char *n; Char *p; @@ -294,7 +294,7 @@ s_strsave(Char *s) } Char * -s_strspl(Char *cp, Char *dp) +Strspl(Char *cp, Char *dp) { Char *ep; Char *p, *q; @@ -316,7 +316,7 @@ s_strspl(Char *cp, Char *dp) } Char * -s_strend(Char *cp) +Strend(Char *cp) { if (!cp) return (cp); @@ -326,7 +326,7 @@ s_strend(Char *cp) } Char * -s_strstr(Char *s, Char *t) +Strstr(Char *s, Char *t) { do { Char *ss = s; |