-/* $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 $ */
/*-
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)
*/
-/* $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 $ */
/*-
/*
* 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 *);
-/* $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 $ */
/*-
}
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;
}
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;
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;
}
Char *
-s_strchr(Char *str, int ch)
+Strchr(Char *str, int ch)
{
do
if (*str == ch)
}
Char *
-s_strrchr(Char *str, int ch)
+Strrchr(Char *str, int ch)
{
Char *rstr;
}
size_t
-s_strlen(Char *str)
+Strlen(Char *str)
{
size_t n;
}
int
-s_strcmp(Char *str1, Char *str2)
+Strcmp(Char *str1, Char *str2)
{
for (; *str1 && *str1 == *str2; str1++, str2++)
continue;
}
int
-s_strncmp(Char *str1, Char *str2, size_t n)
+Strncmp(Char *str1, Char *str2, size_t n)
{
if (n == 0)
return (0);
}
Char *
-s_strsave(Char *s)
+Strsave(Char *s)
{
Char *n;
Char *p;
}
Char *
-s_strspl(Char *cp, Char *dp)
+Strspl(Char *cp, Char *dp)
{
Char *ep;
Char *p, *q;
}
Char *
-s_strend(Char *cp)
+Strend(Char *cp)
{
if (!cp)
return (cp);
}
Char *
-s_strstr(Char *s, Char *t)
+Strstr(Char *s, Char *t)
{
do {
Char *ss = s;