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
679d1f51
...
679d1f51a62feeec527d57b47e0145baff19e438
authored
2003-03-29 16:58:22 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_argp_init): New function.
1 parent
42a78355
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
include/mailutils/argp.h
mailbox/mu_argp.c
include/mailutils/argp.h
View file @
679d1f5
...
...
@@ -48,6 +48,8 @@ extern char *mu_license_text;
extern
"C"
{
#endif
extern
void
mu_argp_init
__P
((
const
char
*
vers
,
const
char
*
bugaddr
));
extern
void
mu_create_argcv
__P
((
const
char
*
capa
[],
int
argc
,
char
**
argv
,
int
*
p_argc
,
char
***
p_argv
));
...
...
mailbox/mu_argp.c
View file @
679d1f5
...
...
@@ -49,8 +49,6 @@
#define ARG_SHOW_OPTIONS 3
#define ARG_LICENSE 4
const
char
*
argp_program_bug_address
=
"<"
PACKAGE_BUGREPORT
">"
;
static
struct
argp_option
mu_common_argp_options
[]
=
{
{
NULL
,
0
,
NULL
,
0
,
N_
(
"Common options"
),
0
},
...
...
@@ -863,6 +861,13 @@ mu_build_argp (const struct argp *template, const char *capa[])
return
argp
;
}
void
mu_argp_init
(
const
char
*
vers
,
const
char
*
bugaddr
)
{
argp_program_version
=
vers
?
vers
:
PACKAGE_STRING
;
argp_program_bug_address
=
bugaddr
?
bugaddr
:
"<"
PACKAGE_BUGREPORT
">"
;
}
error_t
mu_argp_parse
(
const
struct
argp
*
argp
,
int
*
pargc
,
char
**
pargv
[],
...
...
@@ -874,6 +879,9 @@ mu_argp_parse(const struct argp *argp,
error_t
ret
;
const
struct
argp
argpnull
=
{
0
};
/* Make sure we have program version and bug address initialized */
mu_argp_init
(
argp_program_version
,
argp_program_bug_address
);
if
(
!
argp
)
argp
=
&
argpnull
;
...
...
Please
register
or
sign in
to post a comment