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
f73e289f
...
f73e289faba4b13b6bab34ae1312e25e3ca76394
authored
2002-11-22 14:51:28 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(sieve_require): Implemented loadable tests.
1 parent
7b00df82
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
libsieve/require.c
libsieve/require.c
View file @
f73e289
...
...
@@ -42,36 +42,36 @@ sieve_require (list_t slist)
for
(
iterator_first
(
itr
);
!
iterator_is_done
(
itr
);
iterator_next
(
itr
))
{
char
*
s
;
char
*
name
;
int
(
*
reqfn
)
__PMT
((
sieve_machine_t
mach
,
const
char
*
name
))
=
NULL
;
char
*
text
=
NULL
;
iterator_current
(
itr
,
(
void
**
)
&
s
);
iterator_current
(
itr
,
(
void
**
)
&
name
);
if
(
strncmp
(
s
,
"comparator-"
,
11
)
==
0
)
if
(
strncmp
(
name
,
"comparator-"
,
11
)
==
0
)
{
if
(
sieve_require_comparator
(
sieve_machine
,
s
+
11
))
{
sieve_compile_error
(
sieve_filename
,
sieve_line_num
,
"source for the required comparator %s is not available"
,
s
+
11
);
}
name
+=
11
;
reqfn
=
sieve_require_comparator
;
text
=
"comparator"
;
}
else
if
(
strncmp
(
s
,
"test-"
,
5
)
==
0
)
/* GNU extension */
else
if
(
strncmp
(
name
,
"test-"
,
5
)
==
0
)
/* GNU extension */
{
/* FIXME: test- requires are a GNU extension allowing to
declare user-defined tests */
name
+=
5
;
reqfn
=
sieve_require_test
;
text
=
"test"
;
}
else
{
sieve_register_t
*
reg
;
reg
=
sieve_action_lookup
(
sieve_machine
,
s
);
if
(
!
reg
)
reqfn
=
sieve_require_action
;
text
=
"action"
;
}
if
(
reqfn
(
sieve_machine
,
name
))
{
sieve_compile_error
(
sieve_filename
,
sieve_line_num
,
"source for the required action %s is not available"
,
s
);
break
;
}
reg
->
required
=
1
;
"source for the required %s %s is not available"
,
text
,
name
);
}
}
iterator_destroy
(
&
itr
);
...
...
Please
register
or
sign in
to post a comment