xref: /aosp_15_r20/external/one-true-awk/testdir/t.roff (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott HughesNF > 0	{
2*9a7741deSElliott Hughes	for (i = 1; i <= NF; i++) {
3*9a7741deSElliott Hughes		n = length($i)
4*9a7741deSElliott Hughes		if (n + olen >= 60) {
5*9a7741deSElliott Hughes			print oline
6*9a7741deSElliott Hughes			olen = n
7*9a7741deSElliott Hughes			oline = $i
8*9a7741deSElliott Hughes		} else {
9*9a7741deSElliott Hughes			oline = oline " " $i
10*9a7741deSElliott Hughes			olen += n
11*9a7741deSElliott Hughes		}
12*9a7741deSElliott Hughes	}
13*9a7741deSElliott Hughes}
14*9a7741deSElliott Hughes
15*9a7741deSElliott HughesNF == 0 {
16*9a7741deSElliott Hughes	print oline
17*9a7741deSElliott Hughes	olen = 0
18*9a7741deSElliott Hughes}
19*9a7741deSElliott Hughes
20*9a7741deSElliott HughesEND {
21*9a7741deSElliott Hughes	if (olen > 0)
22*9a7741deSElliott Hughes		print oline
23*9a7741deSElliott Hughes}
24