<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/cat.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-07-22T00:04:47Z</updated>
<entry>
<title>provide POSIX_FADV_SEQUENTIAL hint to appropriate utils</title>
<updated>2010-07-22T00:04:47Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-07-20T17:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=47076e3c7c22fc7557f388ad3d47228b922da71e'/>
<id>urn:sha1:47076e3c7c22fc7557f388ad3d47228b922da71e</id>
<content type='text'>
Following on from commit dae35bac, 01-03-2010,
"sort: inform the system about our input access pattern"
apply the same hint to all appropriate utils.
This currently gives around a 5% speedup for reading
large files from fast flash devices on GNU/Linux.

* src/base64.c: Call fadvise (..., FADVISE_SEQUENTIAL);
* src/cat.c: Likewise.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/cut.c: Likewise.
* src/expand.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/join.c: Likewise.
* src/md5sum.c: Likewise.
* src/nl.c: Likewise.
* src/paste.c: Likewise.
* src/pr.c: Likewise.
* src/ptx.c: Likewise.
* src/shuf.c: Likewise.
* src/sum.c: Likewise.
* src/tee.c: Likewise.
* src/tr.c: Likewise.
* src/tsort.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/wc.c: Likewise, unless we don't actually read().
</content>
</entry>
<entry>
<title>cat: improve documentation</title>
<updated>2010-06-14T21:42:24Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-06-09T17:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=879e8261bbc7cc42f620778155b1e1c9e5ae3ef2'/>
<id>urn:sha1:879e8261bbc7cc42f620778155b1e1c9e5ae3ef2</id>
<content type='text'>
* src/cat.c (usage): Clarify that -b overrides -n.
* doc/coreutils.texi (cat invocation): Likewise.
* THANKS: Update.
Suggested by Chas. Owens, in bug 6383.
</content>
</entry>
<entry>
<title>maint: replace each "for (;;)" with "while (true)"</title>
<updated>2010-05-31T09:02:21Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-01T12:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=da7a704cd36e1d2015d14247e5139fb1999b2211'/>
<id>urn:sha1:da7a704cd36e1d2015d14247e5139fb1999b2211</id>
<content type='text'>
Run this command:
  git ls-files | grep '\.[ch]$' \
    | xargs perl -pi -e 's/for \(;;\)/while (true)/g'
...except for randint.c, which does not include stdbool.h.
In that case, use "while (1)".
* gl/lib/randint.c (randint_genmax): Use "while (1)" for infloops.
* src/cat.c (simple_cat, cat): Use "while (true)" for infloops.
* gl/lib/randread.c (readsource, readisaac): Likewise.
* src/copy.c (copy_reg): Likewise.
* src/csplit.c (record_line_starts, process_regexp): Likewise.
* src/cut.c (set_fields): Likewise.
* src/dd.c (iread, parse_symbols): Likewise.
* src/df.c (find_mount_point, main): Likewise.
* src/du.c (main): Likewise.
* src/expand.c (expand): Likewise.
* src/factor.c (factor_using_division, do_stdin): Likewise.
* src/fmt.c (get_space): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (main): Likewise.
* src/pr.c (main, read_line): Likewise.
* src/shred.c (dopass, genpattern): Likewise.
* src/sort.c (initbuf, fillbuf, getmonth, keycompare): Likewise.
* src/split.c (bytes_split, lines_split): Likewise.
* src/tac.c (tac_seekable): Likewise.
* src/test.c (and, or): Likewise.
* src/tr.c (squeeze_filter, main): Likewise.
* src/tsort.c (search_item): Likewise.
* src/unexpand.c (unexpand): Likewise.
* src/uniq.c (main): Likewise.
* src/yes.c (main): Likewise.
</content>
</entry>
<entry>
<title>maint: remove now-unnecessary #if HAVE_header_H tests.</title>
<updated>2010-04-24T15:44:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-04-24T15:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2191fe8f8d84e39f8c4b861cde28d395639393e1'/>
<id>urn:sha1:2191fe8f8d84e39f8c4b861cde28d395639393e1</id>
<content type='text'>
* .x-sc_prohibit_always_true_header_tests: New file.
* Makefile.am (syntax_check_exceptions): Add it.
* src/cat.c: Remove #if HAVE_SYS_IOCTL_H test.
* src/copy.c: Likewise.
* src/ls.c: Likewise.
* src/stty.c: Likewise.
* src/install.c: Remove #if HAVE_SYS_WAIT_H test.
* src/kill.c: Likewise.
* src/operand2sig.c: Likewise.
* src/timeout.c: Likewise.
* src/pathchk.c: Remove #if HAVE_WCHAR_H test.
* src/stat.c: Remove #if HAVE_NETINET_IN_H test.
</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>maint: Use logical rather than bitwise operators on bools</title>
<updated>2009-09-23T13:33:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-23T09:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a037e838e15c9a698f1634398e0fe2726398d575'/>
<id>urn:sha1:a037e838e15c9a698f1634398e0fe2726398d575</id>
<content type='text'>
This is because bitwise operators are:
- confusing and inconsistent in a boolean context
- non short circuiting
- brittle in C89 where bool can be an int (so &gt; 1)
</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>global: convert indentation-TABs to spaces</title>
<updated>2009-08-25T07:21:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-22T16:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5e778f7c8d1ecf3d8f11385db013af2ba026e2a5'/>
<id>urn:sha1:5e778f7c8d1ecf3d8f11385db013af2ba026e2a5</id>
<content type='text'>
Transformed via this shell code:
t=$'\t'
git ls-files \
  | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
  | grep -vE 'tests/pr/|help2man' \
  | xargs grep -lE "^ *$t" \
  | xargs perl -MText::Tabs -ni -le \
    '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
</content>
</entry>
<entry>
<title>cat: Fix immediate output of processed data</title>
<updated>2009-03-11T14:27:39Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-03-11T11:39:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1644e589050ddfce4bbd5ebbe10a4e041499e386'/>
<id>urn:sha1:1644e589050ddfce4bbd5ebbe10a4e041499e386</id>
<content type='text'>
Introduced by commit 790892db, 2006-06-08 "Ensure that cat works ...".
* NEWS: Mention the bugfix.
* src/cat.c (cat): Fix the typo which stopped the writing
of processed data before a blocking read() is done.
* tests/misc/cat-buf: Add to ensure processed data is not buffered.
* tests/Makefile.am: Reference the new test.
</content>
</entry>
<entry>
<title>cat,cp,mv,install,split: Set the minimum IO block size used to 32KiB</title>
<updated>2009-03-11T14:19:08Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-03-06T22:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=55efc5f3ee485b3e31a91c331f07c89aeccc4e89'/>
<id>urn:sha1:55efc5f3ee485b3e31a91c331f07c89aeccc4e89</id>
<content type='text'>
This is following on from this change:
[02c3dc9d 2008-03-06 cat: use larger buffer sizes ...]
which increased the IO block size used by cat by 8 times,
but also capped it at 32KiB.
* NEWS: Mention the change in behavior.
* src/system.h: Add a new io_blksize() function that
returns the max of ST_BLKSIZE or 32KiB, as this was
seen as a good value for a minimum block size to use
to get good performance while minimizing system call overhead.
* src/cat.c: Use it.
* src/copy.c: ditto
* src/split.c: ditto
</content>
</entry>
</feed>
