Commit 4478521c 4478521ca70109e80159d44d661cf80105b697df by Sergey Poznyakoff

Reflect recent changes to libsieve.

1 parent 5421405f
...@@ -195,7 +195,6 @@ It is defined as follows: ...@@ -195,7 +195,6 @@ It is defined as follows:
195 typedef int (*sieve_handler_t) (sieve_machine_t @var{mach}, 195 typedef int (*sieve_handler_t) (sieve_machine_t @var{mach},
196 list_t @var{args}, list_t @var{tags}); 196 list_t @var{args}, list_t @var{tags});
197 @end example 197 @end example
198 @end deftp
199 198
200 The arguments to the handler have the following meaning: 199 The arguments to the handler have the following meaning:
201 200
...@@ -207,13 +206,13 @@ A list of required arguments to the handler ...@@ -207,13 +206,13 @@ A list of required arguments to the handler
207 @item tags 206 @item tags
208 A list of optional arguments (tags). 207 A list of optional arguments (tags).
209 @end table 208 @end table
209 @end deftp
210 210
211 @deftp {Data Type} sieve_printf_t 211 @deftp {Data Type} sieve_printf_t
212 A pointer to a diagnostic output function. It is defined as follows: 212 A pointer to a diagnostic output function. It is defined as follows:
213 @example 213 @example
214 typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap}); 214 typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap});
215 @end example 215 @end example
216 @end deftp
217 216
218 @table @var 217 @table @var
219 @item data 218 @item data
...@@ -224,6 +223,7 @@ Printf-like format string. ...@@ -224,6 +223,7 @@ Printf-like format string.
224 @item ap 223 @item ap
225 Other arguments. 224 Other arguments.
226 @end table 225 @end table
226 @end deftp
227 227
228 @deftp {Data Type} sieve_parse_error_t 228 @deftp {Data Type} sieve_parse_error_t
229 This data type is declared as follows: 229 This data type is declared as follows:
...@@ -232,13 +232,13 @@ typedef int (*sieve_parse_error_t) (void *@var{data}, ...@@ -232,13 +232,13 @@ typedef int (*sieve_parse_error_t) (void *@var{data},
232 const char *@var{filename}, int @var{lineno}, 232 const char *@var{filename}, int @var{lineno},
233 const char *@var{fmt}, va_list @var{ap}); 233 const char *@var{fmt}, va_list @var{ap});
234 @end example 234 @end example
235 @end deftp
236 235
237 It is used to declare error handlers for parsing errors. The 236 It is used to declare error handlers for parsing errors. The
238 application-specific data are passed in the @var{data} 237 application-specific data are passed in the @var{data}
239 argument. Arguments @var{filename} and @var{line} indicate the location 238 argument. Arguments @var{filename} and @var{line} indicate the location
240 of the error in the source text, while @var{fmt} and @var{ap} give 239 of the error in the source text, while @var{fmt} and @var{ap} give
241 verbose description of the error. 240 verbose description of the error.
241 @end deftp
242 242
243 @deftp {Data Type} sieve_action_log_t 243 @deftp {Data Type} sieve_action_log_t
244 A pointer to the application-specific logging function: 244 A pointer to the application-specific logging function:
...@@ -250,7 +250,6 @@ typedef void (*sieve_action_log_t) (void *@var{data}, ...@@ -250,7 +250,6 @@ typedef void (*sieve_action_log_t) (void *@var{data},
250 const char *@var{action}, 250 const char *@var{action},
251 const char *@var{fmt}, va_list @var{ap}); 251 const char *@var{fmt}, va_list @var{ap});
252 @end example 252 @end example
253 @end deftp
254 253
255 @table @var 254 @table @var
256 @item data 255 @item data
...@@ -273,6 +272,15 @@ The name of the action. ...@@ -273,6 +272,15 @@ The name of the action.
273 @itemx var 272 @itemx var
274 These two arguments give the detailed description of the action. 273 These two arguments give the detailed description of the action.
275 @end table 274 @end table
275 @end deftp
276
277 @deftp {Data Type} sieve_relcmp_t
278 @deftpx {Data Type} sieve_relcmpn_t
279 @example
280 typedef int (*sieve_relcmp_t) (int, int);
281 typedef int (*sieve_relcmpn_t) (size_t, size_t);
282 @end example
283 @end deftp
276 284
277 @deftp {Data Type} sieve_comparator_t 285 @deftp {Data Type} sieve_comparator_t
278 @example 286 @example
...@@ -563,7 +571,7 @@ Find a register object describing the action @var{name}. Returns ...@@ -563,7 +571,7 @@ Find a register object describing the action @var{name}. Returns
563 @deftypefun int sieve_register_action (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required}) 571 @deftypefun int sieve_register_action (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required})
564 @end deftypefun 572 @end deftypefun
565 573
566 @deftypefun int sieve_register_comparator (sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, sieve_comparator_t @var{is}, sieve_comparator_t @var{contains}, sieve_comparator_t @var{matches}, sieve_comparator_t @var{regex}) 574 @deftypefun int sieve_register_comparator (sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, sieve_comparator_t @var{is}, sieve_comparator_t @var{contains}, sieve_comparator_t @var{matches}, sieve_comparator_t @var{regex}, sieve_comparator_t @var{eq})
567 @end deftypefun 575 @end deftypefun
568 576
569 @deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg}) 577 @deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg})
...@@ -1193,6 +1201,36 @@ together, they escape the @samp{*}. ...@@ -1193,6 +1201,36 @@ together, they escape the @samp{*}.
1193 @item :regex 1201 @item :regex
1194 The @code{:regex} version specifies a match using POSIX Extended Regular 1202 The @code{:regex} version specifies a match using POSIX Extended Regular
1195 Expressions. 1203 Expressions.
1204
1205 @item :value @var{relation}
1206 The @code{:value} match type does a relational comparison between
1207 strings. Valid values for @var{relation} are:
1208
1209 @table @asis
1210 @item "eq"
1211 Equal
1212
1213 @item "ne"
1214 Not Equal
1215
1216 @item "gt"
1217 Greater Than
1218
1219 @item "ge"
1220 Greater than or Equal
1221
1222 @item "lt"
1223 Less Than
1224
1225 @item "le"
1226 Less than or Equal
1227 @end table
1228
1229 @item :count @var{relation}
1230 This match type first determines the number of the specified entities
1231 (headers, addresses, etc.) in the message and does a relational
1232 comparison of the number of entities to the values specified in the
1233 test expression. The test expression must be a list of one element.
1196 @end table 1234 @end table
1197 1235
1198 @item comparator 1236 @item comparator
......