fmt: delete 2-space code
Typographers say its wrong. R=rsc http://codereview.appspot.com/5517046
This commit is contained in:
parent
73392c2c7c
commit
d33a4d7f1b
1 changed files with 1 additions and 18 deletions
|
|
@ -166,23 +166,6 @@ printindent(int w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* give extra space if word ends with period, etc. */
|
|
||||||
int
|
|
||||||
nspaceafter(char *s)
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
|
|
||||||
n = strlen(s);
|
|
||||||
if(n < 2)
|
|
||||||
return 1;
|
|
||||||
if(isupper((uchar)s[0]) && n < 4)
|
|
||||||
return 1;
|
|
||||||
if(strchr(".!?", s[n-1]) != nil)
|
|
||||||
return 2;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
printwords(Word **w, int nw)
|
printwords(Word **w, int nw)
|
||||||
{
|
{
|
||||||
|
|
@ -207,7 +190,7 @@ printwords(Word **w, int nw)
|
||||||
break; /* out of words */
|
break; /* out of words */
|
||||||
if(w[i]->indent != w[i-1]->indent)
|
if(w[i]->indent != w[i-1]->indent)
|
||||||
break; /* indent change */
|
break; /* indent change */
|
||||||
nsp = nspaceafter(w[i-1]->text);
|
nsp = 1;
|
||||||
if(col+nsp+utflen(w[i]->text) > extraindent+length)
|
if(col+nsp+utflen(w[i]->text) > extraindent+length)
|
||||||
break; /* fold line */
|
break; /* fold line */
|
||||||
if(!join && w[i]->bol)
|
if(!join && w[i]->bol)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue