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_3_Tahoe release
[unix-history]
/
usr
/
src
/
bin
/
pr.c
diff --git
a/usr/src/bin/pr.c
b/usr/src/bin/pr.c
index
20177cc
..
e01769e
100644
(file)
--- a/
usr/src/bin/pr.c
+++ b/
usr/src/bin/pr.c
@@
-1,4
+1,4
@@
-static char *sccsid = "@(#)pr.c 4.
4 (Berkeley) 4/29/83
";
+static char *sccsid = "@(#)pr.c 4.
7 (Berkeley) 10/22/87
";
/*
* print file with headings
/*
* print file with headings
@@
-19,7
+19,7
@@
int col;
int icol;
FILE *file;
char *bufp;
int icol;
FILE *file;
char *bufp;
-#define BUFS
6720
+#define BUFS
9000 /* at least 66 * 132 */
char buffer[BUFS]; /* for multi-column output */
char obuf[BUFSIZ];
#define FF 014
char buffer[BUFS]; /* for multi-column output */
char obuf[BUFSIZ];
#define FF 014
@@
-168,7
+168,6
@@
print(fp, argp)
char *fp;
char **argp;
{
char *fp;
char **argp;
{
- extern char *sprintf();
struct stat sbuf;
register sncol;
register char *sheader;
struct stat sbuf;
register sncol;
register char *sheader;
@@
-228,7
+227,7
@@
char **argp;
if (mflg==0) {
colp[ncol]--;
if (colp[ncol] < buffer)
if (mflg==0) {
colp[ncol]--;
if (colp[ncol] < buffer)
- colp[ncol] = &buffer[BUFS];
+ colp[ncol] = &buffer[BUFS
- 1
];
}
line = 0;
if (ntflg==0) {
}
line = 0;
if (ntflg==0) {
@@
-236,10
+235,10
@@
char **argp;
/* Assume a ff takes two blank lines at the
top of the page. */
line = 2;
/* Assume a ff takes two blank lines at the
top of the page. */
line = 2;
- sprintf(linebuf, "%s %s %s Page %d\n\n\n",
+
(void)
sprintf(linebuf, "%s %s %s Page %d\n\n\n",
cbuf+4, cbuf+20, header, page);
} else
cbuf+4, cbuf+20, header, page);
} else
- sprintf(linebuf, "\n\n%s %s %s Page %d\n\n\n",
+
(void)
sprintf(linebuf, "\n\n%s %s %s Page %d\n\n\n",
cbuf+4, cbuf+20, header, page);
for(cp=linebuf;*cp;) put(*cp++);
}
cbuf+4, cbuf+20, header, page);
for(cp=linebuf;*cp;) put(*cp++);
}