Use strchr(3) instead of a legacy POSIX.1-2001 index(3) API.
Also removed the index() implementation on MS Windows as no longer used.
return _write(fd, buf, siz);
}
-inline char *
-index(const char *s, int c)
-{
- return (char *)strchr(s,c);
-}
-
// stdlib <functional> definitions are required before std API redefinitions.
#include <functional>
{
char const *t;
int len;
- t = index(s,'/');
+ t = strchr(s, '/');
if (!t || !*(++t))
return xstrdup("");
if ((t = strstr (s, "MSIE"))) {
browser = ESI_BROWSER_MSIE;
- t = index (t, ' ');
+ t = strchr(t, ' ');
if (!t)
browserversion = xstrdup("");
else {
- t1 = index(t, ';');
+ t1 = strchr(t, ';');
if (!t1)
browserversion = xstrdup(t + 1);