/[mailutils]/mailutils/doc/texinfo/libsieve.texi
ViewVC logotype

Diff of /mailutils/doc/texinfo/libsieve.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gray, Sun Dec 15 21:53:59 2002 UTC revision 1.11 by gray, Mon Dec 16 10:16:19 2002 UTC
# Line 75  It is created by @code{sieve_machine_cre Line 75  It is created by @code{sieve_machine_cre
75  type are described in @ref{Manipulating the Sieve Machine}.  type are described in @ref{Manipulating the Sieve Machine}.
76  @end deftp  @end deftp
77    
78  @deftp {Enumeration} sieve_data_type  @deftp {Data Type} sieve_data_type
79  This enumeration keeps the possible types of sieve data. These are:  This enumeration keeps the possible types of sieve data. These are:
80    
81  @table @code  @table @code
# Line 105  An opaque pointer. Line 105  An opaque pointer.
105  @end table  @end table
106  @end deftp  @end deftp
107    
108  @deftp {Structure} sieve_value_t  @deftp {Data Type} sieve_value_t
109  The @code{sieve_value_t} keeps an instance of sieve data. It is defined  The @code{sieve_value_t} keeps an instance of sieve data. It is defined
110  as follows:  as follows:
111    
# Line 153  The data are pointed to by @code{ptr} me Line 153  The data are pointed to by @code{ptr} me
153    
154  @end deftp  @end deftp
155    
156  @deftp {Structure} sieve_tag_def_t  @deftp {Data Type} sieve_tag_def_t
157  This structure represents a definition of a tagged (optional) argument  This structure represents a definition of a tagged (optional) argument
158  to a sieve action or test. It is defined as follows:  to a sieve action or test. It is defined as follows:
159    
# Line 171  colon}. The @code{argtype} is set to @co Line 171  colon}. The @code{argtype} is set to @co
171  not take argument, or to the type of the argument otherwise.  not take argument, or to the type of the argument otherwise.
172  @end deftp  @end deftp
173    
174  @deftp {Structure} sieve_runtime_tag_t  @deftp {Data Type} sieve_runtime_tag_t
175  This structure represents the tagged (optional) argument at a runtime.  This structure represents the tagged (optional) argument at a runtime.
176  It is defined as:  It is defined as:
177    
# Line 187  struct sieve_runtime_tag @{ Line 187  struct sieve_runtime_tag @{
187  The @code{arg} member is @code{NULL} if the tag does not take an argument.  The @code{arg} member is @code{NULL} if the tag does not take an argument.
188  @end deftp  @end deftp
189    
190  @deftp {Function Type} sieve_handler_t  @deftp {Data Type} sieve_handler_t
191    
192  This is a pointer to function handler for a sieve action or test.  This is a pointer to function handler for a sieve action or test.
193  It is defined as follows:  It is defined as follows:
# Line 208  A list of required arguments to the hand Line 208  A list of required arguments to the hand
208  A list of optional arguments (tags).  A list of optional arguments (tags).
209  @end table  @end table
210    
211  @deftp {Function Type} sieve_printf_t  @deftp {Data Type} sieve_printf_t
212  A pointer to a diagnostic output function. It is defined as follows:  A pointer to a diagnostic output function. It is defined as follows:
213  @example  @example
214  typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap});  typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap});
# Line 225  Printf-like format string. Line 225  Printf-like format string.
225  Other arguments.  Other arguments.
226  @end table  @end table
227    
228  @deftp {Function Type} sieve_parse_error_t  @deftp {Data Type} sieve_parse_error_t
229  This data type is declared as follows:  This data type is declared as follows:
230  @example  @example
231  typedef int (*sieve_parse_error_t) (void *@var{data},  typedef int (*sieve_parse_error_t) (void *@var{data},
# Line 240  argument. Arguments @var{filename} and @ Line 240  argument. Arguments @var{filename} and @
240  of the error in the source text, while @var{fmt} and @var{ap} give  of the error in the source text, while @var{fmt} and @var{ap} give
241  verbose description of the error.  verbose description of the error.
242    
243  @deftp {Function Type} sieve_action_log_t  @deftp {Data Type} sieve_action_log_t
244  A pointer to the application-specific logging function:  A pointer to the application-specific logging function:
245    
246  @example  @example
# Line 274  The name of the action. Line 274  The name of the action.
274  These two arguments give the detailed description of the action.  These two arguments give the detailed description of the action.
275  @end table  @end table
276    
277  @deftp {Function Type} sieve_comparator_t  @deftp {Data Type} sieve_comparator_t
278  @example  @example
279  typedef int (*sieve_comparator_t) (const char *, const char *);  typedef int (*sieve_comparator_t) (const char *, const char *);
280  @end example  @end example
# Line 286  in comparison with most standard libc fu Line 286  in comparison with most standard libc fu
286    
287  @end deftp  @end deftp
288    
289  @deftp {Function Type} sieve_retrieve_t  @deftp {Data Type} sieve_retrieve_t
290  @example  @example
291  typedef int (*sieve_retrieve_t) (void *item, void *data, int idx,  typedef int (*sieve_retrieve_t) (void *item, void *data, int idx,
292                                   char **pval);                                   char **pval);
# Line 296  A pointer to generic retriever function. Line 296  A pointer to generic retriever function.
296  @code{sieve_vlist_compare()} for details of its usage.  @code{sieve_vlist_compare()} for details of its usage.
297  @end deftp  @end deftp
298    
299  @deftp {Function Type} sieve_destructor_t  @deftp {Data Type} sieve_destructor_t
300  @example  @example
301  typedef void (*sieve_destructor_t) (void *data);  typedef void (*sieve_destructor_t) (void *data);
302  @end example  @end example
# Line 306  associated with @code{data}. See the des Line 306  associated with @code{data}. See the des
306  @code{sieve_machine_add_destructor()} for more information.  @code{sieve_machine_add_destructor()} for more information.
307  @end deftp  @end deftp
308    
309  @deftp {Function Type} sieve_tag_checker_t  @deftp {Data Type} sieve_tag_checker_t
310  @example  @example
311  typedef int (*sieve_tag_checker_t) (const char *@var{name},  typedef int (*sieve_tag_checker_t) (const char *@var{name},
312                                      list_t @var{tags},                                      list_t @var{tags},
# Line 341  case. [FIXME: describe how to do that] Line 341  case. [FIXME: describe how to do that]
341  This subsection describes functions used to create an instance of the  This subsection describes functions used to create an instance of the
342  sieve machine, read or alter its internal fields and destroy it.  sieve machine, read or alter its internal fields and destroy it.
343    
344  @deftypefn int sieve_machine_init (sieve_machine_t *@var{mach}, void *@var{data})  @deftypefun int sieve_machine_init (sieve_machine_t *@var{mach}, void *@var{data})
345    
346  The @code{sieve_machine_init()} function creates an instance of a sieve  The @code{sieve_machine_init()} function creates an instance of a sieve
347  machine. A pointer to the instance itself is returned in the argument  machine. A pointer to the instance itself is returned in the argument
348  @var{mach}. The user-specific data to be associated with the new machine  @var{mach}. The user-specific data to be associated with the new machine
349  are passed in @var{data} argument. The function returns 0 on success,  are passed in @var{data} argument. The function returns 0 on success,
350  non-zero error code otherwise,  non-zero error code otherwise,
351  @end deftypefn  @end deftypefun
352    
353  @deftypefn void sieve_machine_destroy (sieve_machine_t *@var{pmach})  @deftypefun void sieve_machine_destroy (sieve_machine_t *@var{pmach})
354    
355  This function destroys the instance of sieve machine pointed to by  This function destroys the instance of sieve machine pointed to by
356  @var{mach} parameter. After execution of @code{sieve_machine_destroy()}  @var{mach} parameter. After execution of @code{sieve_machine_destroy()}
357  @var{pmach} contains @code{NULL}. The destructors registered with  @var{pmach} contains @code{NULL}. The destructors registered with
358  @code{sieve_machine_add_destructor()} are executed in @sc{lifo}  @code{sieve_machine_add_destructor()} are executed in @sc{lifo}
359  order.  order.
360  @end deftypefn  @end deftypefun
361    
362  @deftypefn int sieve_machine_add_destructor (sieve_machine_t @var{mach}, sieve_destructor_t @var{destr}, void *@var{ptr});  @deftypefun int sieve_machine_add_destructor (sieve_machine_t @var{mach}, sieve_destructor_t @var{destr}, void *@var{ptr});
363    
364  This function registers a destructor function @var{dest}. The purpose  This function registers a destructor function @var{dest}. The purpose
365  of the destructor is to free any resources associated with the item  of the destructor is to free any resources associated with the item
# Line 392  match_part_checker (const char *name, li Line 392  match_part_checker (const char *name, li
392  @}  @}
393  @end group  @end group
394  @end example  @end example
395  @end deftypefn  @end deftypefun
396    
397  @deftypefn void *sieve_get_data (sieve_machine_t @var{mach})  @deftypefun void *sieve_get_data (sieve_machine_t @var{mach})
398  This function returns the application-specific data associated with  This function returns the application-specific data associated with
399  the instance of sieve machine. See @code{sieve_machine_init()}.  the instance of sieve machine. See @code{sieve_machine_init()}.
400  @end deftypefn  @end deftypefun
401    
402  @deftypefn message_t sieve_get_message (sieve_machine_t @var{mach})  @deftypefun message_t sieve_get_message (sieve_machine_t @var{mach})
403  This function returns the current message.  This function returns the current message.
404  @end deftypefn  @end deftypefun
405    
406  @deftypefn size_t sieve_get_message_num (sieve_machine_t @var{mach});  @deftypefun size_t sieve_get_message_num (sieve_machine_t @var{mach});
407  This function returns the current message number in the mailbox.  This function returns the current message number in the mailbox.
408  If there are no mailbox, i.e. the execution of the sieve code is started  If there are no mailbox, i.e. the execution of the sieve code is started
409  with @code{sieve_message}, this function returns 1.  with @code{sieve_message}, this function returns 1.
410  @end deftypefn  @end deftypefun
411    
412  @deftypefn int sieve_get_debug_level (sieve_machine_t @var{mach})  @deftypefun int sieve_get_debug_level (sieve_machine_t @var{mach})
413  Returns the debug level set for this instance of sieve machine.  Returns the debug level set for this instance of sieve machine.
414  @end deftypefn  @end deftypefun
415    
416  @deftypefn ticket_t sieve_get_ticket (sieve_machine_t @var{mach})  @deftypefun ticket_t sieve_get_ticket (sieve_machine_t @var{mach})
417  Returns the authentication ticket for this machine.  Returns the authentication ticket for this machine.
418  @end deftypefn  @end deftypefun
419    
420  @deftypefn mailer_t sieve_get_mailer (sieve_machine_t @var{mach})  @deftypefun mailer_t sieve_get_mailer (sieve_machine_t @var{mach})
421  Returns the mailer.  Returns the mailer.
422  @end deftypefn  @end deftypefun
423    
424  @deftypefn {char *} sieve_get_daemon_email __P((sieve_machine_t @var{mach})  @deftypefun {char *} sieve_get_daemon_email __P((sieve_machine_t @var{mach})
425  This function returns the @dfn{daemon email} associated with this  This function returns the @dfn{daemon email} associated with this
426  instance of sieve machine. The daemon email is an email address used in  instance of sieve machine. The daemon email is an email address used in
427  envelope from addresses of automatic reply messages. By default its local  envelope from addresses of automatic reply messages. By default its local
428  part is @samp{<MAILER-DAEMON>} and the domain part is the machine name.  part is @samp{<MAILER-DAEMON>} and the domain part is the machine name.
429  @end deftypefn  @end deftypefun
430    
431    
432  @deftypefn void sieve_set_error (sieve_machine_t @var{mach}, sieve_printf_t @var{error_printer})  @deftypefun void sieve_set_error (sieve_machine_t @var{mach}, sieve_printf_t @var{error_printer})
433  This function sets the error printer function for the machine. If it is  This function sets the error printer function for the machine. If it is
434  not set, the default error printer will be used. It is defined as  not set, the default error printer will be used. It is defined as
435  follows:  follows:
# Line 442  _sieve_default_error_printer (void *unus Line 442  _sieve_default_error_printer (void *unus
442    return mu_verror (fmt, ap);    return mu_verror (fmt, ap);
443  @}  @}
444  @end example  @end example
445  @end deftypefn  @end deftypefun
446    
447  @deftypefn void sieve_set_parse_error (sieve_machine_t @var{mach}, sieve_parse_error_t @var{p})  @deftypefun void sieve_set_parse_error (sieve_machine_t @var{mach}, sieve_parse_error_t @var{p})
448  This function sets the parse error printer function for the machine. If it is  This function sets the parse error printer function for the machine. If it is
449  not set, the default parse error printer will be used. It is defined as  not set, the default parse error printer will be used. It is defined as
450  follows:  follows:
# Line 464  _sieve_default_parse_error (void *unused Line 464  _sieve_default_parse_error (void *unused
464  @}  @}
465  @end group  @end group
466  @end example  @end example
467  @end deftypefn  @end deftypefun
468    
469  @deftypefn void sieve_set_debug (sieve_machine_t @var{mach}, sieve_printf_t @var{debug}));  @deftypefun void sieve_set_debug (sieve_machine_t @var{mach}, sieve_printf_t @var{debug}));
470  This function sets the debug printer function for the machine. If it is  This function sets the debug printer function for the machine. If it is
471  not set, the default debug printer is @code{NULL} which means no  not set, the default debug printer is @code{NULL} which means no
472  debugging information will be displayed.  debugging information will be displayed.
473  @end deftypefn  @end deftypefun
474    
475  @deftypefn void sieve_set_debug_level (sieve_machine_t @var{mach}, mu_debug_t @var{dbg}, int @var{level})  @deftypefun void sieve_set_debug_level (sieve_machine_t @var{mach}, mu_debug_t @var{dbg}, int @var{level})
476  This function sets the debug level for the given instance of sieve  This function sets the debug level for the given instance of sieve
477  machine. The @var{dbg} argument is the @code{mu_debug_t} object to be  machine. The @var{dbg} argument is the @code{mu_debug_t} object to be
478  used with mailutils library, the @var{level} argument specifies the  used with mailutils library, the @var{level} argument specifies the
# Line 492  Dump the disassembled code of the sieve Line 492  Dump the disassembled code of the sieve
492  @item MU_SIEVE_DRY_RUN  @item MU_SIEVE_DRY_RUN
493  Do not executed the actions, only show what would have been done.  Do not executed the actions, only show what would have been done.
494  @end table  @end table
495  @end deftypefn  @end deftypefun
496    
497  @deftypefn void sieve_set_logger (sieve_machine_t @var{mach}, sieve_action_log_t @var{logger})  @deftypefun void sieve_set_logger (sieve_machine_t @var{mach}, sieve_action_log_t @var{logger})
498  This function sets the logger function. By default the logger function  This function sets the logger function. By default the logger function
499  is @code{NULL}, which means that the executed actions are not logged.  is @code{NULL}, which means that the executed actions are not logged.
500  @end deftypefn  @end deftypefun
501    
502  @deftypefn void sieve_set_ticket (sieve_machine_t @var{mach}, ticket_t @var{ticket})  @deftypefun void sieve_set_ticket (sieve_machine_t @var{mach}, ticket_t @var{ticket})
503  This function sets the authentication ticket to be used with this machine.  This function sets the authentication ticket to be used with this machine.
504  @end deftypefn  @end deftypefun
505    
506  @deftypefn void sieve_set_mailer (sieve_machine_t @var{mach}, mailer_t @var{mailer})  @deftypefun void sieve_set_mailer (sieve_machine_t @var{mach}, mailer_t @var{mailer})
507  This function sets the mailer. The default mailer is @code{"sendmail:"}.  This function sets the mailer. The default mailer is @code{"sendmail:"}.
508  @end deftypefn  @end deftypefun
509    
510  @deftypefn void sieve_set_daemon_email (sieve_machine_t @var{mach}, const char *@var{email})  @deftypefun void sieve_set_daemon_email (sieve_machine_t @var{mach}, const char *@var{email})
511  This functions sets the @dfn{daemon email} for @code{reject} and  This functions sets the @dfn{daemon email} for @code{reject} and
512  @code{redirect} actions.  @code{redirect} actions.
513  @end deftypefn  @end deftypefun
514    
515  @deftypefn int sieve_is_dry_run (sieve_machine_t @var{mach})  @deftypefun int sieve_is_dry_run (sieve_machine_t @var{mach})
516  The @code{sieve_is_dry_run()} returns 1 if the machine is in @dfn{dry  The @code{sieve_is_dry_run()} returns 1 if the machine is in @dfn{dry
517  run} state, i.e. it will only log the actions that would have been  run} state, i.e. it will only log the actions that would have been
518  executed without actually executing them. The dry run state is set  executed without actually executing them. The dry run state is set
519  by calling @code{sieve_set_debug_level()} if its last argument has  by calling @code{sieve_set_debug_level()} if its last argument has
520  the @code{MU_SIEVE_DRY_RUN} bit set.  the @code{MU_SIEVE_DRY_RUN} bit set.
521  @end deftypefn  @end deftypefun
522    
523  @deftypefn {const char *} sieve_type_str (sieve_data_type @var{type})  @deftypefun {const char *} sieve_type_str (sieve_data_type @var{type})
524  Returns the string representation for the given sieve data type. The  Returns the string representation for the given sieve data type. The
525  return value is a pointer to a static constant string.  return value is a pointer to a static constant string.
526  @end deftypefn  @end deftypefun
527    
528  @node Logging and Diagnostic Functions  @node Logging and Diagnostic Functions
529  @subsection Logging and Diagnostic Functions  @subsection Logging and Diagnostic Functions
530    
531  @deftypefn void sieve_error (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})  @deftypefun void sieve_error (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})
532  Format and output an error message using error printer of the machine @var{mach}.  Format and output an error message using error printer of the machine @var{mach}.
533  @end deftypefn  @end deftypefun
534    
535  @deftypefn void sieve_debug (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})  @deftypefun void sieve_debug (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})
536  Format and output a debug message using debug printer of the machine @var{mach}.  Format and output a debug message using debug printer of the machine @var{mach}.
537  @end deftypefn  @end deftypefun
538    
539  @deftypefn void sieve_log_action (sieve_machine_t @var{mach}, const char *@var{action}, const char *@var{fmt}, @dots{})  @deftypefun void sieve_log_action (sieve_machine_t @var{mach}, const char *@var{action}, const char *@var{fmt}, @dots{})
540  Log a sieve action using logger function associated with the machine @var{mach}.  Log a sieve action using logger function associated with the machine @var{mach}.
541  @end deftypefn  @end deftypefun
542    
543  @deftypefn void sieve_abort (sieve_machine_t @var{mach})  @deftypefun void sieve_abort (sieve_machine_t @var{mach})
544  Immediately abort the execution of the script.  Immediately abort the execution of the script.
545  @end deftypefn  @end deftypefun
546    
547  @node Symbol Space Functions  @node Symbol Space Functions
548  @subsection Symbol Space Functions  @subsection Symbol Space Functions
549    
550  @deftypefn {sieve_register_t *} sieve_test_lookup (sieve_machine_t @var{mach}, const char *@var{name})  @deftypefun {sieve_register_t *} sieve_test_lookup (sieve_machine_t @var{mach}, const char *@var{name})
551  Find a register object describing the test @var{name}. Returns  Find a register object describing the test @var{name}. Returns
552  @code{NULL} if no such test exists.  @code{NULL} if no such test exists.
553  @end deftypefn  @end deftypefun
554    
555  @deftypefn sieve_register_t *sieve_action_lookup (sieve_machine_t @var{mach}, const char *@var{name})  @deftypefun {sieve_register_t *} sieve_action_lookup (sieve_machine_t @var{mach}, const char *@var{name})
556  Find a register object describing the action @var{name}. Returns  Find a register object describing the action @var{name}. Returns
557  @code{NULL} if no such action exists.  @code{NULL} if no such action exists.
558  @end deftypefn  @end deftypefun
559                                                                                        
560  @deftypefn int sieve_register_test (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})  @deftypefun int sieve_register_test (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})
561  @end deftypefn  @end deftypefun
562                                                            
563  @deftypefn 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})  @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 deftypefn  @end deftypefun
565                                                                
566  @deftypefn 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})  @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})
567  @end deftypefn  @end deftypefun
568                                                                        
569  @deftypefn int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg})  @deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg})
570  @end deftypefn  @end deftypefun
571    
572  @deftypefn int sieve_load_ext (sieve_machine_t @var{mach}, const char *@var{name})  @deftypefun int sieve_load_ext (sieve_machine_t @var{mach}, const char *@var{name})
573  @end deftypefn  @end deftypefun
574    
575  @node Memory Allocation  @node Memory Allocation
576  @subsection Memory Allocation  @subsection Memory Allocation
# Line 579  The following functions act as their lib Line 579  The following functions act as their lib
579  memory is associated with the @var{mach} argument and is automatically  memory is associated with the @var{mach} argument and is automatically
580  freed upon the call to @code{sieve_machine_destroy (@var{mach})}.  freed upon the call to @code{sieve_machine_destroy (@var{mach})}.
581    
582  @deftypefn {void *} sieve_malloc (sieve_machine_t @var{mach}, size_t @var{size})  @deftypefun {void *} sieve_malloc (sieve_machine_t @var{mach}, size_t @var{size})
583  Allocates @var{size} bytes and returns a pointer to the allocated memory.  Allocates @var{size} bytes and returns a pointer to the allocated memory.
584  @end deftypefn  @end deftypefun
585    
586  @deftypefn {char *} sieve_mstrdup (sieve_machine_t @var{mach}, const char *@var{str})  @deftypefun {char *} sieve_mstrdup (sieve_machine_t @var{mach}, const char *@var{str})
587  This function returns a pointer to a new string  which is a duplicate of the  This function returns a pointer to a new string  which is a duplicate of the
588  string @var{str}.  string @var{str}.
589  @end deftypefn  @end deftypefun
590    
591  @deftypefn {void *} sieve_mrealloc (sieve_machine_t @var{mach}, void *@var{ptr}, size_t @var{size})  @deftypefun {void *} sieve_mrealloc (sieve_machine_t @var{mach}, void *@var{ptr}, size_t @var{size})
592  Changes the size of the memory block pointed to by @var{ptr} to  Changes the size of the memory block pointed to by @var{ptr} to
593  @var{size} bytes.  The contents will be unchanged to the minimum of the  @var{size} bytes.  The contents will be unchanged to the minimum of the
594  old and new sizes; newly allocated memory will be uninitialized. If  old and new sizes; newly allocated memory will be uninitialized. If
# Line 597  old and new sizes; newly allocated memor Line 597  old and new sizes; newly allocated memor
597  zero, the call is equivalent to @code{sieve_mfree(@var{ptr})}. Unless  zero, the call is equivalent to @code{sieve_mfree(@var{ptr})}. Unless
598  @var{ptr} is @code{NULL}, it must have been returned by an earlier  @var{ptr} is @code{NULL}, it must have been returned by an earlier
599  call to @code{sieve_malloc()} or @code{sieve_mrealloc()}.  call to @code{sieve_malloc()} or @code{sieve_mrealloc()}.
600  @end deftypefn  @end deftypefun
601    
602  @deftypefn void sieve_mfree (sieve_machine_t @var{mach}, void *@var{ptr})  @deftypefun void sieve_mfree (sieve_machine_t @var{mach}, void *@var{ptr})
603  @code{sieve_mfree()} frees the memory space pointed to by @var{ptr} and  @code{sieve_mfree()} frees the memory space pointed to by @var{ptr} and
604  detaches it from the destructor list of @var{mach}. The @var{ptr} must  detaches it from the destructor list of @var{mach}. The @var{ptr} must
605  have been returned by a previous call to @code{sieve_malloc()} or  have been returned by a previous call to @code{sieve_malloc()} or
# Line 607  have been returned by a previous call to Line 607  have been returned by a previous call to
607  has already been called before, undefined behaviour occurs.  has already been called before, undefined behaviour occurs.
608    
609  If @var{ptr} is @code{NULL}, no operation is performed.  If @var{ptr} is @code{NULL}, no operation is performed.
610  @end deftypefn  @end deftypefun
611    
612  @node Compiling and Executing the Script  @node Compiling and Executing the Script
613  @subsection Compiling and Executing the Script  @subsection Compiling and Executing the Script
614    
615  @deftypefn int sieve_compile (sieve_machine_t @var{mach}, const char *@var{name})  @deftypefun int sieve_compile (sieve_machine_t @var{mach}, const char *@var{name})
616  Compile the sieve script from the file @var{name}.  Compile the sieve script from the file @var{name}.
617  @end deftypefn  @end deftypefun
618    
619  @deftypefn int sieve_mailbox (sieve_machine_t @var{mach}, mailbox_t @var{mbox})  @deftypefun int sieve_mailbox (sieve_machine_t @var{mach}, mailbox_t @var{mbox})
620  Execute the code from the given instance of sieve machine @var{mach}  Execute the code from the given instance of sieve machine @var{mach}
621  over each message in the mailbox @var{mbox}.  over each message in the mailbox @var{mbox}.
622  @end deftypefn  @end deftypefun
623    
624  @deftypefn int sieve_message (sieve_machine_t @var{mach}, message_t @var{message})  @deftypefun int sieve_message (sieve_machine_t @var{mach}, message_t @var{message})
625  Execute the code from the given instance of sieve machine @var{mach}  Execute the code from the given instance of sieve machine @var{mach}
626  over the @var{message}.  over the @var{message}.
627  @end deftypefn  @end deftypefun
628    
629  @deftypefn int sieve_disass (sieve_machine_t @var{mach})  @deftypefun int sieve_disass (sieve_machine_t @var{mach})
630  Dump the disassembled code of the sieve machine @var{mach}.  Dump the disassembled code of the sieve machine @var{mach}.
631  @end deftypefn  @end deftypefun
632    
633  @node Input Language  @node Input Language
634  @section Input Language  @section Input Language

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26