aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/pr
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>1996-10-22 05:02:01 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>1996-10-22 05:02:01 +0000
commitebcf24fb2bf82a3d2b09728e298515fceaed4478 (patch)
tree3c50e34a8eedb28a304f09d5647ffb90d2676b28 /usr.bin/pr
parentb87efe4572c8b841b0394d2c70dcba130e6ec2b0 (diff)
Notes
Diffstat (limited to 'usr.bin/pr')
-rw-r--r--usr.bin/pr/pr.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c
index 3da319ce17614..decaaed767eb7 100644
--- a/usr.bin/pr/pr.c
+++ b/usr.bin/pr/pr.c
@@ -1457,16 +1457,23 @@ prtail(cnt, incomp)
/*
* only pad with no headers when incomplete last line
*/
- if (!incomp)
- return(0);
- if ((dspace && (putchar('\n') == EOF)) ||
- (putchar('\n') == EOF)) {
+ if (incomp &&
+ ((dspace && (putchar('\n') == EOF)) ||
+ (putchar('\n') == EOF))) {
pfail();
return(1);
}
+ /*
+ * but honor the formfeed request
+ */
+ if (formfeed) {
+ if (putchar('\f') == EOF) {
+ pfail();
+ return(1);
+ }
+ }
return(0);
}
-
/*
* if double space output two \n
*/