2 function wrap
(line
, prefix
)
7 if (length(line
) < wrapMargin
) {
11 count =
split(line
, words
);
13 indent =
match(line
, /[^
]/)
20 for (w =
1; w
<= count
; w
++) {
21 if (length(result
) + length(words
[w
]) > wrapMargin
- indent
) {
23 print prefix indentStr result
;
29 result = result
" " words
[w
];
32 print prefix indentStr result
;
39 BEGIN { prefixed =
0; pre =
0 }
40 /^PREFIXED$
/ {prefixed =
1; next }
41 /^NOT_PREFIXED$
/ {prefixed =
0; next }
42 /^PRE$
/ {pre =
1; next }
43 /^NOT_PRE$
/ {pre =
0; next }
46 if (prefixed
) print "> " $
0;
49 if (prefixed
) wrap
($
0, "> ");