| Top |
GMimeFilterDos2UnixGMimeFilterDos2Unix — Convert line-endings from Windows/DOS (CRLF) to UNIX (LF). |
Converts CRLF pairs to LF, including pairs split across input buffers. All other bytes are preserved, including a trailing bare CR on completion. If ensure_newline is enabled, completion ensures a final LF instead; a trailing bare CR is combined with that newline and converted to LF.
Repeated empty completion calls add no further output. Reset discards conversion state; copying preserves the ensure_newline setting but creates a fresh filter without buffered input.
GMimeFilter *
g_mime_filter_dos2unix_new (gboolean ensure_newline);
Creates a new GMimeFilterDos2Unix filter. CRLF pairs are converted to LF;
bare CR bytes are preserved unless a trailing CR is combined with the
newline requested by ensure_newline
. With ensure_newline
, even empty
input completes with a single LF.