<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/truncate.c, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-05-31T09:02:21Z</updated>
<entry>
<title>maint: make spacing around "=" consistent, even in IF_LINT</title>
<updated>2010-05-31T09:02:21Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-15T17:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c0cfa0defe06fa750530f08d6e0a54521f83292d'/>
<id>urn:sha1:c0cfa0defe06fa750530f08d6e0a54521f83292d</id>
<content type='text'>
E.g.,
  -  size_t desired_width IF_LINT (= 0);
  +  size_t desired_width IF_LINT ( = 0);
Use this command:
  g grep -l IF_LINT | grep '\.[ch]$' \
    | xargs perl -pi -e 's/(IF_LINT \()= /$1 = /'
</content>
</entry>
<entry>
<title>truncate: improve handling of non regular files</title>
<updated>2010-05-29T09:45:13Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-05-28T18:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=200501052edde61747a16cd0af60fa925ef87bfb'/>
<id>urn:sha1:200501052edde61747a16cd0af60fa925ef87bfb</id>
<content type='text'>
Previously we copied `dd` and suppressed error messages
when truncating neither regular files or shared mem objects.
This was valid for `dd`, as truncation is ancillary to copying
it may also do, but for `truncate` we should display all errors.
Also we used the st_size from non regular files which is undefined,
so we display an error when the user tries this.

* src/truncate (do_truncate):  Error when referencing the size
of non regular files or non shared memory objects.  Display all
errors returned by ftruncate().
(main): Error when referencing the size of non regular files or
non shared memory objects.  Don't suppress error messages for
any file types that can't be opened for writing.
* tests/misc/truncate-dir-fail: Check that referencing the
size of a directory is not supported.
* tests/misc/truncate-fifo: Ensure the test doesn't hang
by using the `timeout` command.  Don't test the return from
running ftruncate on the fifo as it's system dependent as
to whether this fails or not.
NEWS: Mention the change in behavior.
Reported by Jim Meyering.
</content>
</entry>
<entry>
<title>truncate: support sizes relative to an existing file</title>
<updated>2010-05-28T13:23:04Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-05-26T08:27:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=81b7585ad19e1ee0a1a43dda44dd21f11bfd6e86'/>
<id>urn:sha1:81b7585ad19e1ee0a1a43dda44dd21f11bfd6e86</id>
<content type='text'>
* doc/coreutils.texi (truncate invocation): Mention that --reference
bases the --size rather than just setting it.
* src/truncate.c (usage): Likewise. Also remove the clause
describing --size and --reference as being mutually exclusive.
(do_truncate): Add an extra parameter to hold the size
of a referenced file, and use it if positive.
(main): Pass the size of a referenced file to do_truncate().
* tests/misc/truncate-parameters: Adjust for the new combinations.
* NEWS: Mention the change
Suggested by Richard W.M. Jones
</content>
</entry>
<entry>
<title>maint: ftruncate is always available, even without gnulib</title>
<updated>2010-04-09T08:50:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-04-09T08:49:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ef5758c3282b3325340d8b601deed5ab5e7ade64'/>
<id>urn:sha1:ef5758c3282b3325340d8b601deed5ab5e7ade64</id>
<content type='text'>
Now that even MinGW provides ftruncate, we know that all
reasonable portability targets provide this function.
Remove the workaround code.  We nearly removed the gnulib
module three years ago:
  http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203
and it is now officially "obsolete".
* bootstrap.conf (gnulib_modules): Remove ftruncate.
* src/copy.c (copy_reg): Remove use of HAVE_FTRUNCATE and its
no-longer-used workaround code.
* src/truncate.c: Remove a comment about handling missing ftruncate.
</content>
</entry>
<entry>
<title>doc: fix inconsistent capitalization in --help output</title>
<updated>2010-02-15T23:42:49Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-02-12T15:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=11d84c10ce88772482c4b99b0bfd730778c437a0'/>
<id>urn:sha1:11d84c10ce88772482c4b99b0bfd730778c437a0</id>
<content type='text'>
* src/base64.c (usage): Don't capitalize the first character
in an --option description.
* src/stdbuf.c (usage): Likewise.
* src/truncate.c (usage): Likewise.
* cfg.mk (sc_option_desc_uppercase): A new syntax check to
stop this happening in future.
* man/Makefile.am (sc_option_desc_uppercase): Ensure all
man pages are generated, then search for erroneous uppercase chars.
* src/Makefile.am (all_programs): Ensure all
commands are built so that all man pages can be generated.
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>doc: mention the texinfo documentation in --help</title>
<updated>2009-09-21T11:37:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-18T22:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5d4f09d83a7c69110b4db97443759e9046c149e1'/>
<id>urn:sha1:5d4f09d83a7c69110b4db97443759e9046c149e1</id>
<content type='text'>
* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
</content>
</entry>
<entry>
<title>doc: improve various BLOCKSIZE and SIZE help</title>
<updated>2009-09-10T14:28:50Z</updated>
<author>
<name>Ondřej Vašík</name>
<email>ovasik@redhat.com</email>
</author>
<published>2009-09-10T11:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b64d9b6d9e7fdc96614e3cbef001f8e078fe9588'/>
<id>urn:sha1:b64d9b6d9e7fdc96614e3cbef001f8e078fe9588</id>
<content type='text'>
* doc/coreutils.texi (multiplierSuffixes): Mention that
the suffix can be specified without a leading number
* src/split.c (usage): Refactor SIZE help to within a function
* src/truncate.c (usage): Likewise
* src/ls.c (usage): Likewise
* src/df.c (usage): Likewise. Also add a function with BLOCKSIZE help
* src/du.c (usage): Likewise.
* src/system.h: Define 2 functions to emit common help text
This was prompted by https://bugzilla.redhat.com/show_bug.cgi?id=511188
</content>
</entry>
<entry>
<title>maint: remove Local Variables: indent-tabs-mode: nil from all sources</title>
<updated>2009-08-25T07:21:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-02-27T16:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e2808a3999233c7186ee349278dbff5a046250db'/>
<id>urn:sha1:e2808a3999233c7186ee349278dbff5a046250db</id>
<content type='text'>
* src/getlimits.c: Likewise.
* src/group-list.c: Likewise.
* src/groups.c: Likewise.
* src/mktemp.c: Likewise.
* src/setuidgid.c: Likewise.
* src/stdbuf.c: Likewise.
* src/timeout.c: Likewise.
* src/truncate.c: Likewise.
* gl/lib/mbsalign.c: Likewise.
* tests/test-lib.sh: Likewise.
* bootstrap: Likewise.
* README-hacking: Likewise.
</content>
</entry>
<entry>
<title>truncate: fix bug in use of isspace</title>
<updated>2009-05-11T11:52:50Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-05-07T20:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=60e7332dc08eb0a52822ec192aad5dc50feca7fd'/>
<id>urn:sha1:60e7332dc08eb0a52822ec192aad5dc50feca7fd</id>
<content type='text'>
* src/truncate.c (main): Pass unsigned characters to isspace.
* NEWS: Mention this.
</content>
</entry>
</feed>
