| Top |
GMimeFilterUnix2DosGMimeFilterUnix2Dos — Convert line-endings from UNIX (LF) to Windows/DOS (CRLF). |
Converts bare LF bytes to CRLF, preserving existing CRLF pairs even when split across input buffers. All other bytes, including bare CR, are preserved. If ensure_newline is enabled, completion appends a missing CRLF, or only LF when the input already ends in CR.
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_unix2dos_new (gboolean ensure_newline);
Creates a new GMimeFilterUnix2Dos filter. Bare LF bytes are converted to
CRLF without duplicating existing CR bytes. With ensure_newline
, even
empty input completes with CRLF.