file_case: add read interface, extend abstraction..
commit9783aca0bbd6627ac52cc90bc8a0e2f410a7ac37
authorSteffen Nurpmeso <sdaoden@users.sf.net>
Sat, 26 Jul 2014 21:12:55 +0000 (26 23:12 +0200)
committerSteffen Nurpmeso <sdaoden@users.sf.net>
Tue, 14 Jul 2015 14:28:27 +0000 (14 16:28 +0200)
tree4258a957f384e6f876796af2b390553b664c13a5
parentccf95e0f247c875c8b8cb34f2ed172d6f0f3d807
file_case: add read interface, extend abstraction..

Encapsulate I/O reads under the file_case surface in order to
implement a decompression layer that doesn't use external unpack
programs but instead directly uses and links against the libraries
which implement the decompression algorithms.

Add new file_case::mux_need_stdio (and ::fc_have_stdio) flags
which henceforth will be required in order to access the .file()
a.k.a STD I/O FILE* of an object, for those rare cases (only the
grn(1) gremlin preprocessor) where the file_case user needs a
FILE* for extended operations which we don't support in file_case,
e.g. fscanf(3).

This also fixes an obviously faulty ungetc(3) in
src/devices/grops/psrm.cpp, line 834 (before patch; c->cc).
14 files changed:
src/devices/grops/ps.cpp
src/devices/grops/ps.h
src/devices/grops/psrm.cpp
src/include/file_case.h
src/libs/libgroff/file_case.cpp
src/libs/libgroff/font.cpp
src/libs/libgroff/searchpath.cpp
src/preproc/eqn/main.cpp
src/preproc/grn/main.cpp
src/preproc/html/pre-html.cpp
src/preproc/soelim/soelim.cpp
src/roff/troff/env.cpp
src/roff/troff/input.cpp
src/roff/troff/node.cpp