Binary

From Mailutils

(Difference between revisions)
Jump to: navigation, search
(Initial revision)
m
Line 8: Line 8:
<source lang="C">
<source lang="C">
-
mu_filter_record_t mu_binary_filter;
+
extern mu_filter_record_t mu_binary_filter;
-
mu_filter_record_t mu_bit8_filter;
+
extern mu_filter_record_t mu_bit8_filter;
</source>
</source>

Revision as of 11:26, 15 December 2010

Binary is the simplest of Mailtils filters. In both decode and encode modes, the filter copies its input to output verbatim.

This filter is also available under the alias 8bit.

The binary filter takes no arguments.

The following objects, declared in the header mailutils/filter.h, describe this filter:

extern mu_filter_record_t mu_binary_filter;
extern mu_filter_record_t mu_bit8_filter;

An example of how to create a binary filter stream:

  int rc;          /* Return code */
  mu_stream_t flt; /* Filter stream */
  mu_stream_t input; /* Input stream */
 
  initialize_input_stream (&stream);
  rc = mu_filter_stream_create (&flt, input, "bin8", MU_FILTER_DECODE, MU_STREAM_READ);
Personal tools