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
8e183b75
...
8e183b755dac4b335859e2747a083ae6c178daf4
authored
2007-06-26 19:36:37 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
New option --clearpath
1 parent
945de1f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
libsieve/argp.c
libsieve/argp.c
View file @
8e183b7
...
...
@@ -28,12 +28,16 @@ mu_list_t mu_sieve_library_path = NULL;
static
error_t
sieve_argp_parser
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
);
#define CLEARPATH_OPTION 256
/* Options used by programs that use extended authentication mechanisms. */
static
struct
argp_option
sieve_argp_option
[]
=
{
{
"includedir"
,
'I'
,
N_
(
"DIR"
),
0
,
N_
(
"Append directory DIR to the list of directories searched for include files"
),
0
},
{
"libdir"
,
'L'
,
N_
(
"DIR"
),
0
,
N_
(
"Append directory DIR to the list of directories searched for library files"
),
0
},
{
"clearpath"
,
CLEARPATH_OPTION
,
NULL
,
0
,
N_
(
"Clear Sieve load path"
),
0
},
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
}
};
...
...
@@ -49,6 +53,12 @@ static struct argp_child sieve_argp_child = {
0
};
static
void
destroy_string
(
void
*
str
)
{
free
(
str
);
}
static
error_t
sieve_argp_parser
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
{
...
...
@@ -64,6 +74,10 @@ sieve_argp_parser (int key, char *arg, struct argp_state *state)
plist
=
&
mu_sieve_library_path
;
break
;
case
CLEARPATH_OPTION
:
mu_list_destroy
(
&
mu_sieve_library_path
);
break
;
case
ARGP_KEY_INIT
:
#ifdef SIEVE_MODDIR
plist
=
&
mu_sieve_library_path
;
...
...
@@ -90,6 +104,7 @@ sieve_argp_parser (int key, char *arg, struct argp_state *state)
mu_strerror
(
rc
));
exit
(
1
);
}
mu_list_set_destroy_item
(
plist
,
destroy_string
);
}
mu_list_append
(
*
plist
,
strdup
(
arg
));
}
...
...
Please
register
or
sign in
to post a comment