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
15f3d1ea
...
15f3d1ea73e60026f8bbe7d9ce4b613a987bc17e
authored
2003-08-17 20:10:30 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mh_getopt): Implemented -version option.
1 parent
7ea39bc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
mh/mh_getopt.c
mh/mh_getopt.c
View file @
15f3d1e
...
...
@@ -53,6 +53,10 @@ mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc)
return
0
;
}
if
(
strcmp
(
mh_optptr
,
"-version"
)
==
0
)
asprintf
(
&
argv
[
mh_optind
],
"--version"
);
else
{
optlen
=
strlen
(
mh_optptr
+
1
);
for
(
p
=
mh_opt
;
p
->
opt
;
p
++
)
{
...
...
@@ -98,6 +102,7 @@ mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc)
}
else
mh_optind
++
;
}
return
'?'
;
}
...
...
@@ -137,6 +142,7 @@ mh_help (struct mh_option *mh_opt, const char *doc)
printf
(
"
\n
"
);
}
printf
(
" -help
\n
"
);
printf
(
" -version
\n
"
);
printf
(
_
(
"
\n
Please use GNU long options instead.
\n
"
"Run %s --help for more info on these.
\n
"
),
program_invocation_short_name
);
...
...
Please
register
or
sign in
to post a comment