projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4 release
[unix-history]
/
usr
/
src
/
cmd
/
col.c
diff --git
a/usr/src/cmd/col.c
b/usr/src/cmd/col.c
index
a26ac03
..
9ab0ba3
100644
(file)
--- a/
usr/src/cmd/col.c
+++ b/
usr/src/cmd/col.c
@@
-1,5
+1,5
@@
+static char *sccsid = "@(#)col.c 4.1 (Berkeley) 10/1/80";
# include <stdio.h>
# include <stdio.h>
-
# define PL 256
# define ESC '\033'
# define RLF '\013'
# define PL 256
# define ESC '\033'
# define RLF '\013'
@@
-10,13
+10,13
@@
char *page[PL];
char lbuff [LINELN], *line;
char *page[PL];
char lbuff [LINELN], *line;
-int bflag,
x
flag, fflag;
+int bflag,
h
flag, fflag;
int half;
int cp, lp;
int ll, llh, mustwr;
int pcp = 0;
char *pgmname;
int half;
int cp, lp;
int ll, llh, mustwr;
int pcp = 0;
char *pgmname;
-char *strcpy();
+char
*strcpy();
main (argc, argv)
int argc; char **argv;
main (argc, argv)
int argc; char **argv;
@@
-42,8
+42,8
@@
main (argc, argv)
bflag++;
break;
bflag++;
break;
- case '
x
':
-
x
flag++;
+ case '
h
':
+
h
flag++;
break;
case 'f':
break;
case 'f':
@@
-156,7
+156,7
@@
main (argc, argv)
if (page[(mustwr+i)%PL] != 0)
emit (page[(mustwr+i) % PL], mustwr+i-PL);
emit (" ", (llh + 1) & -2);
if (page[(mustwr+i)%PL] != 0)
emit (page[(mustwr+i) % PL], mustwr+i-PL);
emit (" ", (llh + 1) & -2);
-
return 0
;
+
exit(0)
;
}
outc (c)
}
outc (c)
@@
-243,10
+243,6
@@
emit (s, lineno)
static int gflag = 0;
if (*s) {
static int gflag = 0;
if (*s) {
- if (gflag) {
- putchar (SI);
- gflag = 0;
- }
while (cline < lineno - 1) {
putchar ('\n');
pcp = 0;
while (cline < lineno - 1) {
putchar ('\n');
pcp = 0;
@@
-264,7
+260,7
@@
emit (s, lineno)
while (*p) {
ncp = pcp;
while (*p++ == ' ') {
while (*p) {
ncp = pcp;
while (*p++ == ' ') {
- if ((++ncp & 7) == 0 &&
!x
flag) {
+ if ((++ncp & 7) == 0 &&
h
flag) {
pcp = ncp;
putchar ('\t');
}
pcp = ncp;
putchar ('\t');
}