tbetter fmt -j - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 565fd89edfb1858d4cbf6b334f0b7443cefada1c (DIR) parent 1bb8ccf14e1c405e8bd038b80b286e233c4a1556 (HTM) Author: rsc <devnull@localhost> Date: Tue, 14 Feb 2006 19:41:11 +0000 better fmt -j Diffstat: M src/cmd/fmt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- (DIR) diff --git a/src/cmd/fmt.c b/src/cmd/fmt.c t@@ -144,8 +144,12 @@ parseline(char *line, Word **words, int *nwordp) } /* how long is this word? */ for(l=0; line[l]; l++) - if(line[l]==' ' || line[l]=='\t') + if(line[l]==' ' || line[l]=='\t'){ + if(join) + while(line[l]==' ' || line[l]=='\t') + l++; break; + } words = addword(words, nwordp, line, l, indent, bol); bol = 0; line += l;