version 1.16, 2015/02/08 23:40:34 |
version 1.17, 2015/04/18 18:28:38 |
|
|
#include <string.h> |
#include <string.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <unistd.h> |
|
#include <limits.h> |
#include <err.h> |
#include <err.h> |
#include <vis.h> |
#include <vis.h> |
|
|
|
|
int |
int |
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
|
const char *errstr; |
FILE *fp; |
FILE *fp; |
int ch; |
int ch; |
|
|
|
|
eflags |= VIS_NOSLASH; |
eflags |= VIS_NOSLASH; |
break; |
break; |
case 'F': |
case 'F': |
if ((foldwidth = atoi(optarg))<5) { |
foldwidth = strtonum(optarg, 1, INT_MAX, &errstr); |
|
if (errstr) |
|
errx(1, "%s: %s", optarg, errstr); |
|
if (foldwidth < 5) |
errx(1, "can't fold lines to less than 5 cols"); |
errx(1, "can't fold lines to less than 5 cols"); |
/* NOTREACHED */ |
|
} |
|
/*FALLTHROUGH*/ |
/*FALLTHROUGH*/ |
case 'f': |
case 'f': |
fold = 1; /* fold output lines to 80 cols */ |
fold = 1; /* fold output lines to 80 cols */ |