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
8c9df3a7
...
8c9df3a7ef095d25342e82d1c933d96846e1fa7a
authored
2001-10-23 22:32:49 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Honor `progname:' entries in the user's profile.
1 parent
7aa63182
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletions
mh/mh_argp.c
mh/mh_argp.c
View file @
8c9df3a
...
...
@@ -81,6 +81,9 @@ mh_argp_parse (int argc, char **argv,
program_invocation_short_name
=
p
+
1
;
else
program_invocation_short_name
=
program_invocation_name
;
mh_init
();
memset
(
&
argp
,
0
,
sizeof
(
argp
));
argp
.
options
=
option
;
argp
.
parser
=
parse_opt
;
...
...
@@ -89,7 +92,36 @@ mh_argp_parse (int argc, char **argv,
data
.
mh_option
=
mh_option
;
data
.
closure
=
closure
;
data
.
handler
=
handler
;
return
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
data
);
p
=
mh_profile_value
(
program_invocation_short_name
,
NULL
);
if
(
p
)
{
int
_argc
;
char
**
_argv
;
int
xargc
;
char
**
xargv
;
int
i
;
argcv_get
(
p
,
""
,
&
xargc
,
&
xargv
);
_argc
=
argc
+
xargc
;
_argv
=
calloc
(
_argc
+
1
,
sizeof
*
_argv
);
if
(
!
_argv
)
{
mh_error
(
"not enough memory"
);
abort
();
}
for
(
i
=
0
;
i
<
argc
;
i
++
)
_argv
[
i
]
=
argv
[
i
];
for
(;
i
<
_argc
;
i
++
)
_argv
[
i
]
=
xargv
[
i
-
argc
];
_argv
[
i
]
=
NULL
;
argp_parse
(
&
argp
,
_argc
,
_argv
,
0
,
0
,
&
data
);
free
(
_argv
);
}
else
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
data
);
return
0
;
}
void
...
...
Please
register
or
sign in
to post a comment