Commit Graph

547 Commits

Author SHA1 Message Date
Pádraig Brady
8fc12909f6 sort: fix parsing of end field in obsolescent key formats
This regression was introduced in commit 224a69b5, 2009-02-24,
"sort: Fix two bugs with determining the end of field".
The specific regression being that we include 1 field too many when
an end field is specified using obsolescent key syntax (+POS -POS).

* src/sort.c (struct keyfield): Clarify the description of the eword
member, as suggested by Alan Curry.
(main): When processing obsolescent format key specifications,
normalize eword to a zero based count when no specific end char is given
for an end field. This matches what's done when keys are specified with -k.
* tests/misc/sort: Add a few more tests for the obsolescent key formats,
with test 07i being the particular failure addressed by this change.
* THANKS: Add Alan Curry who precisely identified the issue.
* NEWS: Mention the fix.
Reported by Santiago Rodríguez
2010-04-20 22:37:18 +01:00
Kim Hansen
88d4b3461e timeout: use more standard option parsing
* src/timeout.c (main): Don't use parse_long_options()
which is a helper for commands that don't have any
long options specific to them.
* tests/misc/timeout-parameters: Remove a case that now
passes due to us accepting multiple instances of the
--help and --version options.
* THANKS: Add the author.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2010-03-26 14:27:54 +00:00
Eric Blake
b44d4b6b0e doc: improve ls --help's description of --escape (-b)
* src/ls.c (usage): Be more precise about how --escape (-b) works:
say "C-style escapes", not "octal escapes".  Reported by Jacky Fong.
2010-03-18 17:41:12 +01:00
Eric Blake
d4de2dc83a dirname: improve man page description
* doc/coreutils.texi (dirname invocation): Properly cover behavior
on directory.
* man/dirname.x: Likewise.
* THANKS: Update.
Reported by Emmanuel Lacour.
2010-02-15 06:56:07 -07:00
Kamil Dudka
aad0bde0b5 who --mesg (-T) can use a more accurate test for TTY writability
Enabled when coreutils is configured with --with-tty-group.
Based on a patch written by Piotr Gackiewicz.  Details at
http://bugzilla.redhat.com/454261

* src/who.c (is_tty_writable): A new function returning true if a TTY
device is writable by the group.  Additionally it checks the group to be
the same as TTY_GROUP_NAME when compiled with --with-tty-group.
* m4/jm-macros.m4: Introduce a new configure option --with-tty-group.
* NEWS: Mention the change.
2010-01-25 11:43:49 +01:00
Eric Blake
e489fd04d6 build: fix failure from bogus USE_XATTR definition
* m4/xattr.m4 (gl_FUNC_ADDR): Fix regression introduced in commit
6beca4248.
* THANKS: Update.
Reported by Adam Sampson.
2010-01-19 06:41:57 -07:00
Jim Meyering
e06e7a8331 maint: change an email address in THANKS
* THANKS: Adjust Denis' address.
2010-01-07 07:17:06 +01:00
Eric Blake
67d3e26350 pr: ensure the page header line is of the required format
Before this change, with too long a file name, the name would
abut the date field on the left and possibly also the "Page N"
field on the right, rather than leaving a one-space separator
in each case.  Fixes a regression introduced on Mar 6 2009,
by commit a4053c5291

* src/pr.c (print_header): Ensure that there is at least one
space before and after the file name part of the header line.
* NEWS: Mention it.
* tests/pr/W20l24f-ll: s/xPage/ x Page/.
* THANKS: Update.
Reported by Denis McKeon, in https://savannah.gnu.org/bugs/?28492.
2010-01-06 21:07:23 -07:00
Eric Blake
b7f2b51c42 ls: fix color of broken symlinks colored as target
* src/ls.c (print_color_indicator): When using 'LINK target' in
dircolors, treat broken symlink as C_ORPHAN.
* tests/misc/ls-misc (sl-dangle2, sl-dangle3, sl-dangle4)
(sl-dangle5): Test for it, and add more coverage.
* NEWS: Document it.
* THANKS: Update.
Reported by Chris Jones.
2010-01-01 13:41:46 -07:00
Jim Meyering
f428e548e5 doc: update tail's documentation to allow for new -F semantics
* src/tail.c (usage): Reword tail -F description, so that it no
longer mentions details specific to the non-inotify implementation.
Also, join diagnostic strings (while staying under the 509-byte limit)
to ease formatting of translations.  The latter was prompted by
a report from Stéphane Raimbault.
* doc/coreutils.texi (tail invocation): Update description here, too.
2009-12-31 09:42:52 +01:00
Eric Blake
7e0c2b9a59 touch: work around ntfs-3g bug
* gnulib: Update, for utimensat fix.
* NEWS: Improve wording about touch fixes.
* THANKS: Update.
Reported by Stuart Citrin.
2009-12-30 20:33:39 -07:00
Jim Meyering
bd26efaaa3 tail: add a test to exercise abort-inducing flaw in tail -F
* tests/tail-2/inotify-hash-abuse: New file, derived from
a report by Rob Wortman.
* tests/Makefile.am (TESTS): Add it.
Improved by: Pádraig Brady.
2009-12-29 17:01:54 +01:00
Eric Blake
67bfde6668 tac: supply link dependency
* src/Makefile.am (tac_LDADD): Add LIB_GETHRXTIME.
* THANKS: Update.
Reported by Robert Schwebel.
2009-12-26 10:40:17 -07:00
Eric Blake
01e4f003a0 touch: fix ctime regression in 'touch -a'
Regression introduced in coreutils 8.1 due to a bug in the Linux
kernel implementation of utimensat with mtime of UTIME_OMIT.

* gnulib: Update to latest, to pick up utimensat fix.
* NEWS: Mention the change.
* THANKS: Update.
Reported by John Stanley.
2009-12-19 17:32:45 -07:00
Jim Meyering
d9ba885974 tests: tail-without-inotify: avoid spurious test failure
* tests/tail-2/wait: Account for the possibility that the kernel
lacks inotify support.  Reported by Chris Clayton.
2009-12-12 17:40:42 +01:00
Eric Blake
9b4b38f56e id: handle systems without getgroups support
If getgroups failed with ENOSYS, mgetgroups would unnecessarily
fail, and that provoked id into freeing an uninitialized pointer.
Meanwhile, we were not using xalloc_die properly.  Both issues
are better solved in gnulib, by introducing xgetgroups; this
patch uses the new interface.

Regression introduced by commit 6a31fd8d7.

* gnulib: Update, for mgetgroups improvments.
* src/id.c (print_full_info): Adjust caller to die on allocation
failure, and no longer worry about ENOSYS.
* src/group-list.c (print_group_list): Likewise.
* src/setuidgid.c (main): Likewise.
* NEWS: Mention the fix.
* THANKS: Update.
Reported by Scott Harrison.
2009-12-04 19:18:06 -07:00
Jim Meyering
0dc1f4c6f3 rm: fix empty-name bug introduced with conversion to use fts
While "rm ''" would properly fail, "rm F1 '' F2" would fail
to remove F1 and F2, due to the empty string argument.
This bug was introduced on 2009-07-12, via commit 4f73ecaf,
"rm: rewrite to use fts".
* gnulib: Update to latest, for fixed fts.c.
* NEWS (Bug fixes): Describe it.
* tests/rm/empty-name: Adjust for changed diagnostic.
(mk_file): Define, copied from misc/ls-misc.
(empty-name-2): New test, for today's fix.
* lib/xfts.c (xfts_open): Reflect the change in fts_open, now that
it no longer fails immediately when one argument is the empty string.
Assert that the bit flags were not the cause of failure.
* po/POTFILES.in: Remove xfts.c.
* THANKS: Update.
Reported by Ladislav Hagara.
2009-12-01 14:38:39 +01:00
Jim Meyering
3b997a9bcb tail -F can fail to track a file after it's been rotated
Tailing forever and by-name (--follow=name, -F), tail would
sometimes fail to follow a file that had been removed via rename.
If you can't apply this patch and have tail 7.6 or newer, you can
work around the bug via the undocumented --disable-inotify option.
* src/tail.c (tail_forever_inotify): When tailing by name (-F),
do not un-watch a file upon receipt of the IN_MOVE_SELF event.
Reported by Arjan Opmeer in http://bugs.debian.org/548439.
* NEWS (Bug fixes): Mention it.
Also see http://marc.info/?l=coreutils-bug&m=125829031916515
* tests/Makefile.am (TESTS): Add tail-2/inotify-rotate.
* tests/tail-2/inotify-rotate: New test.
2009-11-16 09:30:43 +01:00
Jim Meyering
49741b61b7 build: correct gettext configure-time support
* configure.ac: Use AM_GNU_GETTEXT([external], [need-ngettext]),
rather than AM_GNU_GETTEXT([external], [need-formatstring-macros]).
Reported by Martin Jacobs in
http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3181
* THANKS: Add his name.
2009-11-13 17:54:07 +01:00
Pádraig Brady
10d97b3191 ls: fix capability coloring
Capability checking was incorrectly done on just the base name
rather than on the whole path.  Consequently there could be both
false positives and negatives when coloring files with capabilities.
Also capability checking was not done at all in certain cases for
non executable files.  Note passing absolute rather than relative
names to cap_get_file() reduces the has_capability() overhead
from around 33% to 30%.  I.E. ls --color is now around 3% faster.

* src/ls.c (struct fileinfo): Add a has_capability member.
(print_color_indicator): Refactor to pass just a fileinfo pointer
and a flag to say if we're dealing with a symlink target.
(print_name_with_quoting): Likewise.
(gobble_file): Set has_capability in the fileinfo struct.  Also do
a capability check even if executable coloring is disabled.
Ditto for SETUID and SETUID coloring.
Comment on how expensive has_capability() is.
(print_long_format): Adjust to refactored print_name_with_quoting.
(quote_name): Likewise.
(print_file_name_and_frills): Likewise.
* tests/ls/capability: Test the various false positive and negatives.
* THANKS: Add reporter (Ivan Labath).
* NEWS: Mention the fix.
2009-11-09 08:16:20 +00:00
Jim Meyering
7bf2e3db23 rm -f: ignore EROFS when it's really ENOENT
rm -f must not print a diagnostic for a nonexistent file.  However,
most linux-based kernel unlinkat functions set errno to EROFS when
the named file (regardless of whether it exists) would lie on a
read-only file system.  remove.c now performs an extra fstatat call
in that case, to determine whether the file exists.
* src/remove.c (excise): Map EROFS to ENOENT, if a file is nonexistent.
Reported by Steven Drake in <http://savannah.gnu.org/bugs/?27923>.
* NEWS (Changes in behavior): Mention it.
2009-11-03 14:14:00 +01:00
Jim Meyering
c695781753 tests: rm/one-file-system: work around umount failure
* tests/rm/one-file-system (cleanup_): Unmount a/b, rather than
"$other_partition_tmpdir", to accommodate those who link /etc/mtab
to /proc/mounts.  Reported by Gilles Espinasse in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18508
2009-10-26 10:21:25 +01:00
Eric Blake
f25273d7f1 tail: tweak usage for more clarity
* src/tail.c (usage): Spell out -n +K.
* THANKS: Update.
Reported by Jan-Pawel Wrozstinski.
2009-10-12 07:00:12 -06:00
Ondřej Vašík
3a97d664b9 chcon: exit immediately if SELinux is disabled
This change happens to avoid an abort in chcon when SELinux is
disabled while operating on a file with an "unlabeled" context from
back in 2006.  However, that same abort can still be triggered by the
same file when running chcon with SELinux enabled.  This bug in chcon
will be fixed in a subsequent commit via a getfilecon wrapper.  See
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18378/focus=18384
for how to correct your disk attributes to avoid triggering this bug.
* src/chcon.c (main): Exit immediately if SELinux is disabled.
Reported in http://bugzilla.redhat.com/527142 by Yanko Kaneti.
* src/runcon.c (main): Do not hardcode program name in error message.
* THANKS: Update.
2009-10-06 10:10:51 +02:00
James R. Van Zandt
569df689e3 dircolors: highlight .cgm and .emf as images
* src/dircolors.hin: Add .cgm, .emf.
* THANKS: Update.
2009-10-02 10:58:05 -06:00
Jim Meyering
242689c7f9 ls: with -LR, exit with status 2 upon detecting a cycle
* src/ls.c (print_dir): Diagnosing the cycle is not enough.
Also set exit status to 2.  This is what Solaris' /bin/ls does, too.
* tests/ls/infloop: Rework test: match both expected stdout and stderr.
Require an exit status of 2 in this case.
* doc/coreutils.texi (ls invocation): Mention that a loop provokes
in an exit status of 2.
* NEWS (Bug fixes): Mention it.
Reported by Yang Ren in http://bugzilla.redhat.com/525402.
* THANKS: Correct ordering of Yang Ren's names.
2009-09-29 07:28:39 +02:00
Pádraig Brady
9837344837 doc: normalize and add missing entries to texinfo menu
* doc/coreutils.texi: Add the missing arch, base64, link, readlink,
and unlink entries.  Also remove extraneous '.' from some entries
and try to align all entries on the same column.
* THANKS: Add Benno Schulenberg.
2009-09-21 12:42:19 +01:00
Jim Meyering
a2883947bc dircolors: arrange to highlight names with the .lz suffix
* src/dircolors.hin: Add .lz, for GNU lzip.
Suggested by Matias A. Fonzo.
2009-09-19 12:26:41 +02:00
Jim Meyering
99f59aaaf8 mktemp: adapt to new, 3-argument gen_tempname_len
* src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers of
gen_tempname_len.
* gl/lib/tempname.c, gl/lib/tempname.h: Rebase against recently
API-modified copy of tempname module in gnulib.
Reported by Lluís Batlle.
2009-09-19 11:16:56 +02:00
Jim Meyering
af6436559c tail: ignore -f for piped-stdin, as POSIX requires
* src/tail.c (main): Tailing a pipe "forever" is not useful,
and POSIX specifies that tail ignore the -f when there is no
file argument and stdin is a FIFO or pipe.  So we do that.
In addition, GNU tail excludes "-" arguments from the list of files
to tail forever, when the associated file descriptor is connected
to a FIFO or pipe.  Before this change, ":|tail -f" would hang.
Reported by Ren Yang and Ulrich Drepper.
* tests/tail-2/pipe-f: Test for this.
* tests/tail-2/pipe-f2: Ensure tail doesn't exit early for a fifo.
* tests/Makefile.am (TESTS): Add these tests.
* NEWS (POSIX conformance): Mention it.
2009-09-07 23:19:56 +02:00
Jim Meyering
cdfb703c5d tail -f: handle "-"/stdin once again
* src/tail.c (main) [HAVE_INOTIFY]: When stdin (i.e., "-", or no args,
but not /dev/stdin) is specified on the command line, don't use inotify.
Reported by Bill Brelsford in <http://bugs.debian.org/545422>.
* tests/tail-2/follow-stdin: New file.  Test for this.
* tests/Makefile.am (TESTS): Add the test.
* NEWS (Bug fixes): Mention it.
This bug was introduced in coreutils-7.5 via commit ae494d4b,
2009-06-02, "tail: use inotify if it is available".
2009-09-07 09:01:14 +02:00
Jim Meyering
467cc9bb43 tests: ls-misc: don't let a bogus umask cause test failure
* tests/misc/ls-misc: Set umask to 022.  A umask setting permitting
world-write access, e.g., umask o+w, would cause this test to fail.
Report by Mathias Brodala and analysis by Tom Fitzhenry in
<http://bugs.debian.org/544965>.
2009-09-06 18:40:40 +02:00
Jim Meyering
e0e8429c24 df: don't fail due to an unreadable argument
* src/df.c (main): If open or fstat fails when we're trying to ensure
that all arg-partitions are automounted, fall back on using stat.
Inspired by the report and patch from Olivier Fourdan in
http://bugzilla.redhat.com/520630.
* NEWS (Bug fixes): Mention it.
* tests/df/unreadable: New test for the above.
* tests/Makefile.am (TESTS): Add df/unreadable.
The bug was introduced in coreutils-7.3 via commit dbd17157,
2009-04-28, "df: use open(2), not stat, to trigger automounting".
2009-09-03 19:52:47 +02:00
Kamil Dudka
1422cabf93 doc: install -C: fix bug in the texi documentation
* doc/coreutils.texi: Move the documentation for install --compare (-C)
from the section on fmt to that for install.
Reported by Florian Schlichting.
2009-09-03 16:24:14 +02:00
Pádraig Brady
e4caea5775 dd: fix a signal handling race
* src/dd.c (main): Install the signal handlers at startup
rather than just before the copy starts. In this way signals
received before the copy (like during a slow truncate for e.g.)
will be deferred and handled consistently.
* THANKS: Add Bernhard's email address.
* NEWS: Mention the fix.
Reported by Bernhard Voelker.
2009-08-13 16:06:50 +01:00
Jim Meyering
e40c5f735c maint: make update-copyright work in yet another case
* build-aux/update-copyright: Handle the case in which "\n#"
appears between the final year number and the copyright holder name.
* m4/lib-check.m4: Update copyright year list.
Reported by Joel E. Denny.
2009-07-29 15:39:25 +02:00
Kamil Dudka
493c481684 ls -1U dir arg ... now works again
* src/ls.c (print_dir): Emit "$dir_name:\n" *before* accumulating (and
possibly printing) directory entry names.
The bug was introduced in coreutils-7.0 via commit
8d974b00, 2008-07-30, "ls -U1 now uses constant memory".
Reported by Julian Bradfield.
* NEWS (Bug fixes): Mention it.
2009-07-27 17:10:39 +02:00
Cliff Miller
24c727d3c2 sort: Ignore fields where end position is before the start position
* NEWS: Mention the fix
* THANKS: Add Cliff Miller
* src/sort.c (keycompare): Ensure lima >= texta
* tests/misc/sort: Add 3 corresponding tests

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2009-06-13 01:25:06 +01:00
Michael Speer
159faba137 sort: new --human-numeric-sort option to sort KiB MB etc.
* NEWS: Document the new option
* doc/coreutils.texi (sort invocation): ditto
* src/sort.c (main): handle the new --human-numeric-sort option (-h).
(human_numcompare): A new function to compare SI and IEC suffixes
before falling back to the standard --numeric comparison.
(find_unit_order): A new helper function to find the order
of magnitude of a number string as determined by its suffix.
(check_mixed_SI_IEC): A new helper function to exit with error
if both SI and IEC suffixes are presented.
* tests/misc/sort: Add 8 tests to test the new functionality.
* THANKS: Update
2009-05-26 14:49:17 +01:00
Tomas Smetana
dbd17157d7 df: use open(2), not stat, to trigger automounting
* src/df.c (main): When iterating over command-line arguments,
attempting to ensure each backing file system is mounted, use
open, not stat.  stat is no longer sufficient to trigger
automounting, in some cases.  Based on a suggestion from Ian Kent.
More details in http://bugzilla.redhat.com/497830
2009-04-28 14:32:17 +02:00
Jim Meyering
25eb4c6909 sort -m: don't segfault when output file is also an input file
* src/sort.c (avoid_trashing_input): Fix an off-by-one error and
guard the use of memmove.
* NEWS (Bug fixes): Mention it.
* tests/misc/sort: Add tests to exercise the offending code.
* THANKS: Update.
Reported by Otavio Salvador in http://bugs.debian.org/525048.
2009-04-23 21:03:14 +02:00
Pádraig Brady
bf87a2c8ea id: fix infinite loop on some systems
Steven Parkes reported that `id -G $USER` went into an infinite loop
on Darwin systems for users in more than 10 groups:
http://bugs.gentoo.org/show_bug.cgi?id=264007
* gl/lib/mgetgroups.c (mgetgroups): Work around buggy getgrouplist
implementations that don't update the required size correctly,
by doubling the result buffer and retrying. Also return the
parameter updated by getgrouplist rather than its return value,
as the documentation doesn't actually state the number of groups
stored is returned by getgrouplist.
* tests/misc/id-groups: Add test to exercise this logic
* tests/Makefile.am: Reference new test
* NEWS: Mention the fix
* THANKS: Update
2009-04-09 14:07:29 +01:00
Pádraig Brady
af5723c71e shred,sort,shuf: don't use /dev/urandom by default
Suggestion from Steven Schveighoffer at:
http://savannah.gnu.org/patch/?6797
to greatly speed up the random passes done by shred.
* gl/lib/randread.c: Default to using the internal
pseudorandom generator, rather than reading /dev/urandom
* src/shred.c (usage): remove mention of /dev/urandom
* src/shuf.c (usage); ditto
* src/sort.c (usage): ditto
* doc/coreutils.text: Document the new behaviour
for aquiring random data.
2009-04-07 19:01:46 +01:00
Jim Meyering
4145a1e54c tests: skip mv/i-3 if /dev/stdin is unreadable
* tests/mv/i-3: Skip if /dev/stdin is unreadable.
Reported by Sergei Steshenko.
2009-04-02 08:44:12 +02:00
Eric Blake
9b4aa5e268 pwd: support -L and -P
* src/pwd.c (longopts): New variable.
(logical_getcwd): New function.
(main): Use it.
(usage): Document new options.
* doc/coreutils.texi (pwd invocation): Likewise.
* NEWS: Likewise.
* TODO (pwd): Mark it done.
* tests/misc/pwd-option: New file.
* tests/Makefile.am (TESTS): Add test.
* THANKS: Update.
Reported by Paul D. Smith, in savannah bug 24949.
2009-03-25 06:33:32 -06:00
Paul Eggert
f31ea18146 tests: add another sort/nmerge test
* tests/Makefile.am (TESTS): Add sort-merge-fdlimit.
* tests/misc/sort-merge-fdlimit: New file.
* doc/coreutils.texi (sort invocation): Document that we now silently
lower nmerge if necessary.
Patch by Paul Eggert, Nima Nikzad, Max Chang, Alexander Nguyen,
Sahil Amoli, and Nick Graham.
2009-03-18 21:44:45 +01:00
Paul Eggert
8f7fae5972 sort: handle fd exhaustion better when merging
This is an alternative to my 9 March patch labeled "Silently lower
nmerge; don't (sometimes incorrectly) range-check"
<http://lists.gnu.org/archive/html/bug-coreutils/2009-03/msg00070.html>.
It differs by not using 'dup' to probe for extra file descriptors;
instead, it simply calls 'open' (and 'pipe') to open files and pipes,
until one of these calls fails due to file descriptor exhaustion; it
then backs off by 1, does a merge with the files that it has opened,
and then retries with the (now-smaller) number of files.

This patch requires quite a few more changes to the source code than
the earlier patch, but it is in some sense "better" because it doesn't
need to call "dup" ahead of time in order to decide whether "open" or
"pipe" will fail.  Also, it's more robust in the case where "open" or
"pipe" fails with errno==EMFILE because some system-wide limit is
exhausted.

* src/sort.c (create_temp_file): New arg SURVIVE_FD_EXHAUSTION.
(stream_open): New function, containing guts of xfopen.
(xfopen): Use it.
(pipe_fork): Set errno on failure.
(maybe_create_temp): New function, containing guts of create_temp.
(create_temp): Use it.
(open_temp): Distinguish failures due to file descriptor exhaustion
from other failures, and on fd exhaustion return a notice to caller
rather than dying.  Don't test execlp's return value; when it returns,
it *always* returns -1.
(open_input_files): New function.
(mergefps): New arg FPS. It's now the caller's responsibility to open
the input and output files.  All callers changed.
(mergefiles): New function.
(avoid_trashing_input, merge): Handle the case where a single merge
can't merge as much as we wanted due to file descriptor exhaustion, by
merging as much as we can and then retrying.
* tests/Makefile.am (TESTS): Add misc/sort-continue.
* tests/misc/sort-continue: New file.
* THANKS: Add Glen Lenker and Matt Pham who coauthored this patch.
2009-03-18 21:44:37 +01:00
Jim Meyering
a4780e67f4 system.h: correct compilation error: MAX not defined
* src/system.h (io_blksize): Move definition down, so it follows that
of MAX -- to avoid compilation failure on OpenSolaris.  Reported by
David Bartley.  Details in
http://lists.gnu.org/archive/html/bug-coreutils/2009-03/msg00190.html
2009-03-14 21:46:35 +01:00
Jim Meyering
df2e983677 tests: ls -v: exercise the bug fixed by gnulib's new filevercmp
* tests/misc/ls-misc (version-sort): New test.
(mk_file): New function.
Reported by Josh Triplett in <http://bugs.debian.org/517558>.
Details in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16902
* NEWS (Bug fixes): Mention it.
2009-03-08 21:18:47 +01:00
Jim Meyering
a4053c5291 pr: fix a bug whereby --indent=N (-o) did not indent header lines
* src/pr.c (print_header): Honor chars_per_margin also for the header.
Inspired by a patch from C de-Avillez.
This change also adjusts two other %*s directives to be %*.*s instead,
(for the padding on either side of "file_text") to correct a bug that
could make pr print one space of padding instead of none.
* NEWS (Bug fixes): Mention it.
* tests/pr/o3Jml24f-lm-lo: Adjust for new expected output.
* tests/pr/o3a3Sl24f-tn: Likewise.
* tests/pr/o3a3Snl24f-tn: Likewise.
* tests/pr/o3a3l24f-tn: Likewise.
* tests/pr/o3b3Sl24f-tn: Likewise.
* tests/pr/o3b3Snl24f-tn: Likewise.
* tests/pr/o3b3l24f-tn: Likewise.
* tests/pr/o3mSl24f-bl-tn: Likewise.
* tests/pr/o3mSnl24fbltn: Likewise.
* tests/pr/o3ml24f-bl-tn: Likewise.
2009-03-07 23:52:08 +01:00