version 1.20, 2009/10/27 23:59:42 |
version 1.21, 2012/03/04 04:05:15 |
|
|
void usage(void); |
void usage(void); |
void getargs(int, char *[]); |
void getargs(int, char *[]); |
void getfile(void); |
void getfile(void); |
int getline(void); |
int get_line(void); |
char **getptrs(char **); |
char **getptrs(char **); |
void prepfile(void); |
void prepfile(void); |
void prints(char *, int); |
void prints(char *, int); |
|
|
char **padto; |
char **padto; |
|
|
while (skip--) { |
while (skip--) { |
getline(); |
get_line(); |
if (flags & SKIPPRINT) |
if (flags & SKIPPRINT) |
puts(curline); |
puts(curline); |
} |
} |
getline(); |
get_line(); |
if (flags & NOARGS && curlen < owidth) |
if (flags & NOARGS && curlen < owidth) |
flags |= ONEPERLINE; |
flags |= ONEPERLINE; |
if (flags & ONEPERLINE) |
if (flags & ONEPERLINE) |
|
|
INCR(ep); |
INCR(ep); |
} |
} |
} |
} |
} while (getline() != EOF); |
} while (get_line() != EOF); |
*ep = NULL; /* mark end of pointers */ |
*ep = NULL; /* mark end of pointers */ |
nelem = ep - elem; |
nelem = ep - elem; |
} |
} |
|
|
char ibuf[BSIZE]; /* two screenfuls should do */ |
char ibuf[BSIZE]; /* two screenfuls should do */ |
|
|
int |
int |
getline(void) /* get line; maintain curline, curlen; manage storage */ |
get_line(void) /* get line; maintain curline, curlen; manage storage */ |
{ |
{ |
static int putlength; |
static int putlength; |
static char *endblock = ibuf + BSIZE; |
static char *endblock = ibuf + BSIZE; |