mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Made strpbrk_or_eos inline. Use strchr(s, '\0') for finding the NUL
char in the string.
This commit is contained in:
parent
58828beb5f
commit
d761d066cd
@ -1,3 +1,8 @@
|
||||
2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* url.c (strpbrk_or_eos): Made inline. Use strchr(s, '\0') for
|
||||
finding the NUL char position.
|
||||
|
||||
2005-05-07 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* url.c (decide_copy_method): Renamed to char_needs_escaping.
|
||||
|
@ -584,21 +584,21 @@ static void split_path PARAMS ((const char *, char **, char **));
|
||||
#define strpbrk_or_eos(s, accept) ({ \
|
||||
char *SOE_p = strpbrk (s, accept); \
|
||||
if (!SOE_p) \
|
||||
SOE_p = (char *)s + strlen (s); \
|
||||
SOE_p = strchr (s, '\0'); \
|
||||
SOE_p; \
|
||||
})
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
|
||||
static char *
|
||||
static inline char *
|
||||
strpbrk_or_eos (const char *s, const char *accept)
|
||||
{
|
||||
char *p = strpbrk (s, accept);
|
||||
if (!p)
|
||||
p = (char *)s + strlen (s);
|
||||
p = strchr (s, '\0');
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
#endif /* not __GNUC__ */
|
||||
|
||||
/* Turn STR into lowercase; return non-zero if a character was
|
||||
actually changed. */
|
||||
|
Loading…
Reference in New Issue
Block a user