Difference between revisions of "CRLF (filter)"

From Mailutils
Jump to navigationJump to search
(Initial revision)
 
m
Line 23: Line 23:
  
 
This filter is also available under the name <tt>RFC822</tt>, which is deprecated.
 
This filter is also available under the name <tt>RFC822</tt>, which is deprecated.
 +
 +
== See also ==
 +
* [[CRLFDOT (filter)|CRLFDOT]]
  
 
[[Category:Filters]]
 
[[Category:Filters]]

Revision as of 12:27, 15 December 2010

CRLF is a Mailutils filter which converts line separators from LF (ASCII 10) to CRLF (ASCII 13 10) and vice-versa.

In decode mode, the CRLF filter replaces each LF character with the CRLF sequence, unless LF is already preceded by a CR.

In encode mode, this filter removes CR from each CRLF sequence.

The following object, declared in the header mailutils/filter.h, describes this filter:

extern mu_filter_record_t mu_crlf_filter;

This filter does not take any arguments. The example below shows how to create a CRLF filter instance in decode mode for reading:

  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, "CRLF", MU_FILTER_DECODE, MU_STREAM_READ);

This filter is also available under the name RFC822, which is deprecated.

See also