]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(init_parameters): For compatibility: use default
authorJim Meyering <jim@meyering.net>
Sat, 1 Feb 1997 13:23:27 +0000 (13:23 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 1 Feb 1997 13:23:27 +0000 (13:23 +0000)
separator `TAB' with full length lines.  From Roland Huebner.

src/pr.c

index 0981cfa8a1d13a18b1e65ba235f815a8a0431eab..ebfe895017e8b721f0da22bfa3b03452ec465b33 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
 
   -s[STRING]   Separate columns by any string STRING.
                 Don't use -s "STRING".
-               without -s: default separator 'space' s used,
-               same as -s" ",
+                without -s: Default separator `TAB' with -j and `space'
+                otherwise (same as -s\" \"),
                with -s only: no separator is used, same as -s"".
                Quotes should be used with blanks and some shell active
                characters.
@@ -547,10 +547,12 @@ static int ignore_failed_opens = FALSE;
 static int use_col_separator = FALSE;
 
 /* String used to separate columns if the -s option has been specified.
-   Default value with -s is a space. */
+   Default without -s but together with one of the column options
+   -a|COLUMN|-m is a `space' and with the -j option a `tab'. */
 static char *col_sep_string;
 static int col_sep_length = 0;
 static char *column_separator = " ";
+static char *line_separator = "\t";
 
 /* Number of separator characters waiting to be printed as soon as we
    know that we have any input remaining to be printed. */
@@ -975,7 +977,11 @@ init_parameters (int number_of_files)
     {
       if (!use_col_separator)
        {
-         col_sep_string = column_separator;
+         /* Use default separator */
+         if (join_lines)
+           col_sep_string = line_separator;
+         else
+           col_sep_string = column_separator;
          col_sep_length = 1;
          use_col_separator = TRUE;
        }
@@ -2451,10 +2457,10 @@ Paginate or columnate FILE(s) for printing.\n\
                     page printed (see +FIRST_PAGE)\n\
   -o MARGIN         offset each line with MARGIN spaces (do not affect -w)\n\
   -r                inhibit warning when a file cannot be opened\n\
-  -s[STRING]        separate columns by an optional STRING\n\
-                    don't use -s \"STRING\" \n\
-                    without -s: default sep. \'space\' used, same as -s\" \"\n\
-                    -s only: no separator used, same as -s\"\" \n\
+  -s[STRING]        separate columns by an optional STRING, don't use\n\
+                    -s \"STRING\", -s only: No separator used (same as -s\"\"),\n\
+                    without -s: Default separator \'TAB\' with -j and \'space\'\n\
+                    otherwise (same as -s\" \")\n\
   -t                inhibit page headers and trailers\n\
   -T                inhibit page headers and trailers, eliminate any page\n\
                     layout by form feeds set in input files\n\