diff options
author | Bertrand Garrigues <bertrand.garrigues@laposte.net> | 2017-11-09 00:43:17 +0100 |
---|---|---|
committer | Bertrand Garrigues <bertrand.garrigues@laposte.net> | 2017-11-09 00:43:17 +0100 |
commit | 97ae5b7026a7225d6a541fcf885a1a9a3fc060d2 (patch) | |
tree | 0ad4603b3b2ceee4208990c452ba5314aeb983ad /test/test.am | |
parent | 894dfbfa69e2d4bc7446818d6415d3e77f94cd85 (diff) | |
download | groff-git-format_knuth_plass.tar.gz |
Add class 'paragraph' for Knuth-Plass formatting.format_knuth_plass
To be used in `troff' in the future, but not connected to the rest of
the `troff' code yet.
* src/include/trace.h: macro to trace and debug.
* src/roff/troff/paragraph.h:
* src/roff/troff/paragraph_l.h:
* src/roff/troff/paragraph.cpp:
* src/roff/troff/paragraph_word.h:
New files. The class `paragraph' exposes some public methods to
build the paragraph (`add_box', `add_glue', `add_optional_hyphen',
`add_explicit_hyphen'). It use an interface `paragraph_word' that
the caller must implement to pass the words width and the glue
values to the `paragraph' class, and also a `write' method. The
caller must also implement `paragraph_writer_interface', another
interface used by `paragraph' to control the writing process.
* test/test_paragraph.cpp: A simple example to demonstrate the usage
of `paragraph', including the original example from Knuth's book
`Digital Typography'.
* test/test.am: add `test_paragraph' to `make check'.
Diffstat (limited to 'test/test.am')
-rw-r--r-- | test/test.am | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.am b/test/test.am index 1bf5e392c..7fec26cd5 100644 --- a/test/test.am +++ b/test/test.am @@ -23,3 +23,12 @@ utest_list_SOURCES = test/utest_list.cpp utest_list_CXXFLAGS = $(CPPUNIT_CFLAGS) -I$(top_srcdir)/src/roff/troff utest_list_LDFLAGS = $(CPPUNIT_LIBS) endif + +TESTS += test_paragraph +check_PROGRAMS += test_paragraph +test_paragraph_SOURCES = \ + src/roff/troff/paragraph.cpp \ + test/test_paragraph.cpp + +test_paragraph_CXXFLAGS = -I$(top_srcdir)/src/roff/troff + |