[ C code | Pascal code ]
Last updated 19 August 1996. A few minor bugs in the C and Pascal code have been fixed. If your compiler accepted the previous versions, then you probably do not need to worry about the differences. If your compiler did not accept the previous versions, then you probably have already found and fixed these bugs yourself.
A small file of test data is available.
When written in C,
the text formatter consists of 3 or 5 files.
You job is to replace the first of these files with an optimal
and efficient implementation of ChooseLineBreaks.
You should be able to leave the other files unchanged.
Two versions of the Pascal code are available: