diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-08-26 11:26:51 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-08-26 11:57:30 +0200 |
commit | 806a13ed8a23eeda97f50e4a9e0dd0fc5988efa7 (patch) | |
tree | 08c1071fcc8af4bc038b8d91460ceb4c799cdfca /build-aux | |
parent | de85010edc4ba228313f730473258743a1063652 (diff) | |
download | calcurse-806a13ed8a23eeda97f50e4a9e0dd0fc5988efa7.tar.gz calcurse-806a13ed8a23eeda97f50e4a9e0dd0fc5988efa7.zip |
src/io.c: iCal content line folding correctness
This is a rather invasive change that introduces correct line folding to
our iCal parser.
From now on, ical_readline() should be used instead of fgets() to read
lines from an iCal file as it unfolds lines automatically. We also need
to use shared buffers as each ical_readline() invocation eats up the
first part of the next line and stores it in the "lstore" buffer.
Subsequent ical_readline() invocations copy the contents of this buffer
and append continuation lines. We currently use a single buffer pair
that is allocated in io_import_data() and pass it to all subroutines.
ical_readline_init() needs to be called once for every buffer pair. It
reads the first part of the current line and writes to "lstore",
clearing the target buffer at the same time.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'build-aux')
0 files changed, 0 insertions, 0 deletions