Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
5c0e78e8
...
5c0e78e8fa056cc193362114eca781a546343461
authored
2003-07-26 11:07:27 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(util_strcasestr): Reimplemented via mu_strcasestr()
1 parent
d484612d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
29 deletions
imap4d/util.c
imap4d/util.c
View file @
5c0e78e
...
...
@@ -719,37 +719,9 @@ util_parse_ctime_date (const char *date, time_t * timep)
char
*
util_strcasestr
(
const
char
*
haystack
,
const
char
*
needle
)
{
register
char
*
needle_end
=
strchr
(
needle
,
'\0'
);
register
char
*
haystack_end
=
strchr
(
haystack
,
'\0'
);
register
size_t
needle_len
=
needle_end
-
needle
;
register
size_t
needle_last
=
needle_len
-
1
;
register
const
char
*
begin
;
if
(
needle_len
==
0
)
return
(
char
*
)
haystack_end
;
if
((
size_t
)
(
haystack_end
-
haystack
)
<
needle_len
)
return
NULL
;
for
(
begin
=
&
haystack
[
needle_last
];
begin
<
haystack_end
;
++
begin
)
{
register
const
char
*
n
=
&
needle
[
needle_last
];
register
const
char
*
h
=
begin
;
do
if
(
tolower
(
*
h
)
!=
tolower
(
*
n
))
goto
loop
;
/* continue for loop */
while
(
--
n
>=
needle
&&
--
h
>=
haystack
);
return
(
char
*
)
h
;
loop:
;
}
return
NULL
;
return
mu_strcasestr
(
haystack
,
needle
);
}
struct
{
char
*
name
;
...
...
Please
register
or
sign in
to post a comment