Prevent a crash when creating diagrams of extra-long sentences
Prevent a crash when creating diagrams of extra-long sentences

Fix issue #101.

When a line with more than MAX_LINE of characters are needed for the
linkage diagram, a buffer overrun *may* occur. Even when it doesn't
occur in such cases (a much longer sentence is normally needed for
that), this would write into the next diagram row.

A check was added to detect a diagram line overrun, by checking the
length of the printed sentence.  It acts the same as in the case of a
row overrun, which is already checked: putting an error message into
the returned diagram.

ampli/link-grammar,opencog/link-grammar,linas/link-grammar,opencog/link-grammar,MadBomber/link-grammar,linas/link-grammar,MadBomber/link-grammar,linas/link-grammar,MadBomber/link-grammar,MadBomber/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,MadBomber/link-grammar,linas/link-grammar,linas/link-grammar,MadBomber/link-grammar,MadBomber/link-grammar,linas/link-grammar,ampli/link-grammar