<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/factor.c, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-10-16T11:23:55Z</updated>
<entry>
<title>all: use die() rather than error(EXIT_FAILURE)</title>
<updated>2016-10-16T11:23:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-10-15T22:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=492dcb2eb191b844a2fd5e51db3eed85289bea1f'/>
<id>urn:sha1:492dcb2eb191b844a2fd5e51db3eed85289bea1f</id>
<content type='text'>
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
</content>
</entry>
<entry>
<title>factor: reinstate immediate output with interactive use</title>
<updated>2016-09-07T09:20:39Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-09-06T14:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6643842bad2e0ed9f9249f2039d2a30c3b7fb38d'/>
<id>urn:sha1:6643842bad2e0ed9f9249f2039d2a30c3b7fb38d</id>
<content type='text'>
* src/factor.c (lbuf_putc): Only buffer more than a line
when not using the tool interactively.
* NEWS: Mention the bug fix.
Fixes http://pad.lv/1620139
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2016-01-01T14:10:41Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-01T14:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b16e999f553b682e74e0a56750f649da05130c4f'/>
<id>urn:sha1:b16e999f553b682e74e0a56750f649da05130c4f</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: fix incorrect spellings etc</title>
<updated>2015-12-14T13:36:23Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-10-15T14:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c609cd960d5cc309fe32ab315efe8dde79504d14'/>
<id>urn:sha1:c609cd960d5cc309fe32ab315efe8dde79504d14</id>
<content type='text'>
* NEWS: Use a standard version specification.
* doc/coreutils.texi: Fix incorrect grammar.
* src/df.c: Update a stale comment.
* src/copy.c: Fix incorrect spellings.
* src/factor.c: Likewise.
* src/ls.c: Likewise.
* src/pr.c: Likewise.
* src/relpath.c: Likewise.
* src/shred.c: Likewise.
* src/sort.c: Likewise.
* src/split.c: Likewise.
* src/stdbuf.c: Likewise.
* tests/misc/seq-precision.sh: Likewise.
</content>
</entry>
<entry>
<title>copy,dd: simplify and optimize NUL bytes detection</title>
<updated>2015-10-27T17:25:12Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-10-22T13:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9459d9d8112fe7816022665b5016c2014bb625f3'/>
<id>urn:sha1:9459d9d8112fe7816022665b5016c2014bb625f3</id>
<content type='text'>
* src/factor.c: Move LIKELY() definition to...
* src/system.h: ...here.
(is_nul): Reimplement with a version that doesn't
require a sentinel after the buffer, and which calls
down to (the system optimized) memcmp.
Performance analyzed at http://rusty.ozlabs.org/?p=560
* src/dd.c (alloc_obuf): Simplify the is_nul() call by
not needing to write the sentinel.
* src/copy.c (sparse_copy): Likewise.
(copy_reg): Simplify the buffer allocation by avoiding
consideration of the sentinel in the buffer size calculation.
</content>
</entry>
<entry>
<title>factor: remove unreachable SQUFOF code at compile time</title>
<updated>2015-10-19T09:24:12Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-10-17T10:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=07b73c689d77612d23f9539e706fd7725f9cf2a5'/>
<id>urn:sha1:07b73c689d77612d23f9539e706fd7725f9cf2a5</id>
<content type='text'>
It was a little confusing as to whether the SQUFOF algorithm was
enabled, and in fact there were no options available to enable it.
Therefore clarify the 3 configurable behaviors for the code to
3 defines at the top of the program, and only include the SQUFOF
code if enabled at compile time.

$ size src/factor-before
   text    data     bss
  93997    1412    2504
$ size src/factor-after
   text    data     bss
  87885    1404    2504

* src/factor.c: Only include the SQUFOF factor code
when enabled via the USE_SQUFOF define.
* doc/coreutils.texi (factor invocation): Update note about
factor limits, as we can factor 128 bit numbers without GMP.
</content>
</entry>
<entry>
<title>factor: ensure atomic output through pipes</title>
<updated>2015-07-01T11:27:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-30T05:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f2db30e676c2f124a318b2313946b450fb9de79f'/>
<id>urn:sha1:f2db30e676c2f124a318b2313946b450fb9de79f</id>
<content type='text'>
The new tests/misc/factor-parallel.sh test was
seen to fail on FreeBSD (derived) systems, which was
due to split(1) --filter reading partial lines
through pipes, as factor(1) was writing a little
over PIPE_BUF each time.

* src/factor.c (lbuf): A new structure to internally buffer lines.
(lbuf_alloc): A new function to allocate enough at program start.
(lbuf_putint): A new function to buffer a uintmax_t.
(lbuf_flush): A new function to write directly to standard output.
(lbuf_putc): A new function to buffer a character and if enough
lines are buffered, then output complete lines &lt;= PIPE_BUF,
and continue to buffer the rest.
(main): Call the internal buffer allocator, and register
the final flush from the internal buffer at program exit.
</content>
</entry>
<entry>
<title>maint: clarify integer operations in recent commit</title>
<updated>2015-06-25T17:59:39Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-25T15:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f3a0e9ebb26d92368238f6700fa973198c563968'/>
<id>urn:sha1:f3a0e9ebb26d92368238f6700fa973198c563968</id>
<content type='text'>
* src/factor.c (print_uintmaxes): Comment that the
value of n_out doesn't matter on error, and add an
explicit cast to avoid any future warnings.
Suggested by Jim Meyering RE commit v8.23-229-g4d2d6c5
</content>
</entry>
<entry>
<title>factor: avoid interspersed lines for parallel runs</title>
<updated>2015-06-24T16:04:01Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2014-10-15T01:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4d2d6c5b7c455392617609ae21b6b21879e12975'/>
<id>urn:sha1:4d2d6c5b7c455392617609ae21b6b21879e12975</id>
<content type='text'>
* src/factor.c (n_out): A new global variable to track
how much data has been written to stdout.
(print_factors_single): Use n_out to determine whether
to flush the current (and previous) lines.
* tests/misc/factor-parallel.sh: Add a new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
</content>
</entry>
<entry>
<title>maint: avoid new coverity warnings</title>
<updated>2015-05-29T23:41:09Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-05-29T14:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b9842a615366b47cbd0739d97f2dd2679dfbb3a8'/>
<id>urn:sha1:b9842a615366b47cbd0739d97f2dd2679dfbb3a8</id>
<content type='text'>
* src/sync.c (sync_arg): Initialise variable to avoid
unitialized access if assert is disabled.
* src/head.c (elide_tail_bytes_file): Support this function
with ---presume-input-pipe and larger files,
which regressed with commit v8.23-47-g2662702.
(elide_tail_lines_file): Likewise.
* src/dd.c (dd_copy): Explicitly don't try to ftruncate()
upon failure to lseek() (the existing check against
st_size was already protecting that).
* src/factor.c (factor_using_squfof): Assert (only when
linting due to performance) to avoid the implication of
divide by zero.
* src/od.c (read_block): Remove dead code.
* src/tac.c (tac_seekable): Likewise.
* src/ls.c (gobble_file): Likewise.
</content>
</entry>
</feed>
