summaryrefslogtreecommitdiff
path: root/src/pr.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-15 13:49:13 +0000
committerJim Meyering <jim@meyering.net>1999-04-15 13:49:13 +0000
commit69e1d626bd1a86a0bc2c4d0e01a6aae3aa699632 (patch)
tree93f8d5f398f0e583857e49bdd6c5b27d5735179b /src/pr.c
parent609582a1610a96c83e4b42698d71f403f33d20be (diff)
downloadcoreutils-69e1d626bd1a86a0bc2c4d0e01a6aae3aa699632.tar.xz
Add comments.
(init_header): Tweak white space in Date/Time header.
Diffstat (limited to 'src/pr.c')
-rw-r--r--src/pr.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/pr.c b/src/pr.c
index 9b7507034..8208f27b1 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -72,6 +72,23 @@
An overflow of the line length (without margin) over the input value
PAGE_WIDTH may occur.
+ The interference of the POSIX-compliant small letter options -w and -s:
+ (`interference' means `setting a _separator_ with -s switches off the
+ column sturctur and the default - not generally - page_width,
+ acts on -w option')
+ options: text form / separator: equivalent new capital
+ -w l -s[x] letter options:
+ --------------------------------------------------------------------
+ 1. -- -- columns / space --
+ trunc. to page_width = 72
+ 2. -- -s[:] full lines / TAB[:] -J -S["<TAB>"|:]
+ no truncation
+ 3. -w l -- columns / space -W l
+ trunc. to page_width = l
+ 4. -w l -s[:] columns / no sep.[:] -W l -S[:]
+ trunc. to page_width = l
+ --------------------------------------------------------------------
+
Options:
@@ -1637,7 +1654,7 @@ init_header (char *filename, int desc)
char *header_text;
struct tm *tmptr;
struct stat st;
- char *datim = "- Date/Time --";
+ char *datim = "-- Date/Time -- ";
if (filename == NULL)
f = "";
@@ -1647,7 +1664,7 @@ init_header (char *filename, int desc)
header = (char *) xmalloc (chars_per_line + 1);
if (!standard_header && *custom_header == '\0')
- sprintf (header, "%s", " "); /* blank line header */
+ *header = '\0'; /* blank line header */
else
{
#define T_BUF_FMT "%Y-%m-%d %H:%M" /* date/time short format */