Support the siteconf feature

Patch to support the siteconf feature, from [w3m-dev 04463]
on 2012-06-27, provided by AIDA Shinra.
This commit is contained in:
Tatsuya Kinoshita
2013-04-08 21:48:49 +09:00
parent dbd52ac2ca
commit a32bf68c85
21 changed files with 781 additions and 263 deletions

14
indep.c
View File

@@ -357,6 +357,20 @@ strcasemstr(char *str, char *srch[], char **ret_ptr)
return -1;
}
int
strmatchlen(const char *s1, const char *s2, int maxlen)
{
int i;
/* To allow the maxlen to be negatie (infinity),
* compare by "!=" instead of "<=". */
for (i = 0; i != maxlen; ++i) {
if (!s1[i] || !s2[i] || s1[i] != s2[i])
break;
}
return i;
}
char *
remove_space(char *str)
{