原書ではこう。

Revise the main routine of the longest-line program
so it will correctly print the length of arbitrarily
long input lines, and as much as possible of the text.

とりあえずof the textは of arbitrarily ... linesと
並列になっているように見える。

ので「各行の長さ、およびテキスト全体の長さを出力する」
という解釈はどうでしょう?