Return to foldit.c CVS log | Up to [local] / src / usr.bin / vis |
version 1.7, 2013/11/12 22:51:18 | version 1.8, 2020/08/17 18:41:23 | ||
---|---|---|---|
|
|
||
foldit(char *chunk, int col, int max) | foldit(char *chunk, int col, int max) | ||
{ | { | ||
char *cp; | char *cp; | ||
int first = (col != 0); | |||
/* | /* | ||
* Keep track of column position. Insert hidden newline | * Keep track of column position. Insert hidden newline | ||
|
|
||
col++; | col++; | ||
} | } | ||
if (col > (max - 2)) { | if (col > (max - 2)) { | ||
if (!first) | |||
return (col); | |||
printf("\\\n"); | printf("\\\n"); | ||
col = 0; | col = 0; | ||
first = 0; | |||
goto again; | goto again; | ||
} | } | ||
cp++; | cp++; |