tools: Change mime-maker to write out CR,LF.
authorWerner Koch <wk@gnupg.org>
Thu, 29 Sep 2016 10:29:27 +0000 (12:29 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 29 Sep 2016 15:56:37 +0000 (17:56 +0200)
commit29db3be6e8dbc9b4dd52cd1781106fa9fa3954a5
treef2de522f904a19322fbb62fa1a648cd70b5f0048
parent95d60c6ce9e8a7a7741553af957978c1f91547c5
tools: Change mime-maker to write out CR,LF.

* tools/mime-maker.c (struct part_s): Add field PARTID.
(struct mime_maker_context_s): Add field PARTID_COUNTER.
(dump_parts): Print part ids.
(mime_maker_add_header): Assign PARTID.
(mime_maker_add_container): Ditto.
(mime_maker_get_partid): New.
(write_ct_with_boundary): Remove.
(add_header): Strip trailing white spaces.
(write_header): Remove trailing spaces trimming.  Add arg BOUNDARY.
Handle emdedded LFs.
(write_gap, write_boundary, write_body): New.
(write_tree): Use new functions.
--

These changes prepare for forthcoming enhancements.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/mime-maker.c
tools/mime-maker.h