aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fmt.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-14 19:41:11 +0000
committerrsc <devnull@localhost>2006-02-14 19:41:11 +0000
commit565fd89edfb1858d4cbf6b334f0b7443cefada1c (patch)
tree9ee301fca6163a3c25d5dfc2ee7cf954ed738a00 /src/cmd/fmt.c
parent1bb8ccf14e1c405e8bd038b80b286e233c4a1556 (diff)
downloadplan9port-565fd89edfb1858d4cbf6b334f0b7443cefada1c.tar.gz
plan9port-565fd89edfb1858d4cbf6b334f0b7443cefada1c.tar.bz2
plan9port-565fd89edfb1858d4cbf6b334f0b7443cefada1c.zip
better fmt -j
Diffstat (limited to 'src/cmd/fmt.c')
-rw-r--r--src/cmd/fmt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/fmt.c b/src/cmd/fmt.c
index f2ebb7bf..362dcf41 100644
--- a/src/cmd/fmt.c
+++ b/src/cmd/fmt.c
@@ -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;