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
cf3fdc22
...
cf3fdc2232fc6726a4a9e42eb8d7c830fe58a6ec
authored
2001-10-19 13:18:04 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed option recognition heuristics.
1 parent
53f9c27e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
mh/mh_getopt.c
mh/mh_getopt.c
View file @
cf3fdc2
...
...
@@ -53,13 +53,14 @@ mh_getopt (int argc, char **argv, struct mh_option *mh_opt)
optlen
=
strlen
(
mh_optptr
+
1
);
for
(
p
=
mh_opt
;
p
->
opt
;
p
++
)
{
if
(
p
->
match_len
<=
optlen
&&
strlen
(
p
->
opt
)
>=
optlen
&&
(
memcmp
(
mh_optptr
+
1
,
p
->
opt
,
optlen
)
==
0
||
(
p
->
flags
==
MH_OPT_BOOL
&&
optlen
>
2
&&
memcmp
(
mh_optptr
+
3
,
p
->
opt
,
optlen
-
2
)
==
0
)))
break
;
if
((
p
->
match_len
<=
optlen
&&
memcmp
(
mh_optptr
+
1
,
p
->
opt
,
optlen
)
==
0
)
||
(
p
->
flags
==
MH_OPT_BOOL
&&
optlen
>
2
&&
memcmp
(
mh_optptr
+
1
,
"no"
,
2
)
==
0
&&
strlen
(
p
->
opt
)
>=
optlen
-
2
&&
memcmp
(
mh_optptr
+
3
,
p
->
opt
,
optlen
-
2
)
==
0
))
break
;
}
if
(
p
->
opt
)
...
...
Please
register
or
sign in
to post a comment