1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-29 03:50:45 +02:00
Commit Graph

22614 Commits

Author SHA1 Message Date
Paul Eggert 9df4b20557 (sort invocation): Clarify explanation of
--random-sort, and use a simpler example.
2005-12-12 22:42:16 +00:00
Paul Eggert 1f20820f7e Clarify sort -R. 2005-12-12 22:41:56 +00:00
Paul Eggert 6078d7175d Add src/rand-isaac.c. 2005-12-12 22:41:42 +00:00
Paul Eggert 0abb871873 Remove. All uses now simply include rand-isaac.c. 2005-12-12 22:16:30 +00:00
Paul Eggert 021921a712 Mention shred_SOURCES and sort_SOURCES, too. 2005-12-12 22:16:02 +00:00
Paul Eggert 55173eaa9e Use a more-conservative but slower approach for sort -R. 2005-12-12 22:09:56 +00:00
Paul Eggert dee72c1194 Include rand-isaac.c rather than rand-isaac.h.
Don't include md5.h; it wasn't needed.
(struct keyfield): Rename random_hash to random, for consistency
with the other member names.  All uses changed.
(usage): Tweak wording to mention STRING for --seed option.
(short_options): Rorder for consistency with other programs.
(rand_state): Now a struct, not a pointer to one.  All uses changed.
(HASH_WORDS, HASH_SIZE): Remove.
(get_hash): Remove comments around resbuf size, since we can assume C89.
Use a "more-kosher" (but slower) approach of invoking isaac_refill.
(keycompare): Adjust to the new get_hash.
Add a FIXME.
(badfieldspec): Omit recently-introduced comment; it isn't needed.
(main): Don't set need_random simply because gkey has it set; that
doesn't necessarily mean we'll need random numbers.
Redo seeding to match new get_hash approach.
2005-12-12 22:09:27 +00:00
Paul Eggert 30e44dd014 Include rand-isaac.c rather than rand-isaac.h.
(fillrand, dopass, main): Undo previous change.
2005-12-12 22:08:50 +00:00
Paul Eggert f7a86b7734 Revert to what used to be in shred.c, without
changing it to allow for varying numbers of words in the state.
Alter so that we include rand-isaac.c directly rather than
compiling it and linking to it.  Don't include config.h or
system.h; that's the includer's responsibility.
(ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
(isaac_step, struct irand_state):
Resurrect these, with the same defns that used to be in shred.c.
(ISAAC_SIZE, isaac_new, isaac_copy): Remove.
(isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
static again.
(struct isaac_state, isaac_refill, isaac_mix, isaac_init):
(isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
(irand_init, irand32, irand_mod):
Number of words is constant again.
2005-12-12 22:08:14 +00:00
Paul Eggert 67ee303724 (noinst_HEADERS): Remove rand-isaac.h. 2005-12-12 22:07:51 +00:00
Jim Meyering 8340fb2805 *** empty log message *** 2005-12-10 22:54:40 +00:00
Jim Meyering 09227c31dd (noinst_HEADERS): Add rand-isaac.h. 2005-12-10 22:54:31 +00:00
Jim Meyering 2a6eef20f5 *** empty log message *** 2005-12-10 22:10:59 +00:00
Jim Meyering d5978ad190 Cleaner:
Make the local an `int' instead.
2005-12-10 22:10:53 +00:00
Jim Meyering 437a569c53 *** empty log message *** 2005-12-10 21:58:28 +00:00
Jim Meyering dfacfaf971 Avoid shred segfault on 64-bit systems.
(isaac_refill): Don't try to negate a
local of type uint32_t.  Convert it to int32_t first.
2005-12-10 21:58:23 +00:00
Jim Meyering 3199892488 *** empty log message *** 2005-12-10 21:10:26 +00:00
Jim Meyering 2f33661051 Mention sort's new options. 2005-12-10 21:10:21 +00:00
Jim Meyering df4dc0666d *** empty log message *** 2005-12-10 10:18:18 +00:00
Jim Meyering 41c0ee3fe4 * src/rand-isaac.h (isaac_mix): Remove declaration. 2005-12-10 10:18:10 +00:00
Jim Meyering dbfc16effb * src/rand-isaac.c (isaac_mix): Declare to be static.
Mark all other functions as `extern' so the tight-scope
part of `make distcheck' passes once again.
* src/rand-isaac.h (isaac_mix): Remove declaration.
2005-12-10 10:18:01 +00:00
Jim Meyering c4666a397d *** empty log message *** 2005-12-10 10:05:27 +00:00
Jim Meyering ea947bc7f0 *** empty log message *** 2005-12-10 10:04:18 +00:00
Jim Meyering fbaa8e9719 (get_hash): Change position of `*' in parameter type to conform with convention.
(main): Split a long line so it fits in 80 columns.
2005-12-10 10:04:12 +00:00
Jim Meyering beb862ee9c *** empty log message *** 2005-12-10 10:02:32 +00:00
Jim Meyering d6482a9ac2 Don't include gethrxtime.h. No longer needed. 2005-12-10 10:02:24 +00:00
Jim Meyering a2b661352b (keycompare): Remove stray SPACE before TAB that was
causing `make distcheck' to fail.
2005-12-10 09:44:00 +00:00
Jim Meyering e2b9d79b9c *** empty log message *** 2005-12-10 09:38:17 +00:00
Jim Meyering d65090198c (TESTS): Add sort-rand. 2005-12-10 09:38:07 +00:00
Jim Meyering 9967cd6a63 *** empty log message *** 2005-12-10 09:37:46 +00:00
Jim Meyering 7de48ccced Add a basic test of the new options. 2005-12-10 09:37:21 +00:00
Paul Eggert f9b90d0739 Add sort -R. 2005-12-10 09:08:55 +00:00
Paul Eggert e076a77851 (sort invocation): Add --random-sort (-R) and --seed. 2005-12-10 08:10:20 +00:00
Paul Eggert 569c4876bc (short_options, long_options, WORDS, keycompare, main):
(usage): Add options --random-sort and --seed to implement a random
shuffle.
Include md5.h and rand-isaac.h.
(get_hash): New function.
(rand_state): New var.
(HASH_WORDS, HASH_SIZE): New macros.
2005-12-10 08:09:42 +00:00
Paul Eggert 4013c49f1b Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
(fillrand, main): Adjust to the fact that the state size is now
runtime-configurable.
2005-12-10 08:09:20 +00:00
Paul Eggert 7c2beeafd7 (sort_LDADD): Add $(LIB_GETHRXTIME).
(shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
2005-12-10 08:08:52 +00:00
Paul Eggert 71bc739b35 New file, containing ISAAC code that was in shred.c.
Make state size runtime-configurable.
(isaac_new, isaac_copy): New functions.
2005-12-10 08:08:05 +00:00
Paul Eggert a237792d66 Move ISAAC code out of shred.c. 2005-12-10 08:07:36 +00:00
Jim Meyering 078b4f861c add comments 2005-12-09 21:52:50 +00:00
Paul Eggert 4713202758 Add test for dd iflags=noatime. 2005-12-09 21:48:38 +00:00
Jim Meyering 467d73aac9 *** empty log message *** 2005-12-09 16:28:28 +00:00
Jim Meyering 99f35425a7 (usage): Mention white space vs -b and -t options.
From The Wanderer.
2005-12-09 16:28:17 +00:00
Jim Meyering 55897502a6 *** empty log message *** 2005-12-09 16:27:26 +00:00
Jim Meyering e83af19449 *** empty log message *** 2005-12-09 16:22:27 +00:00
Jim Meyering 843efb8e3b (main): Fix misleading comment. 2005-12-09 16:22:24 +00:00
Jim Meyering bbfe621405 . 2005-12-08 18:34:21 +00:00
Paul Eggert 8b43cfcc59 Add dd noatime. 2005-12-07 21:12:38 +00:00
Paul Eggert 88afdc99f2 (flags, usage): Add support for noatime flag. 2005-12-07 21:12:12 +00:00
Paul Eggert cb65d67c2a (O_NOATIME): Define to 0 if not already defined. 2005-12-07 21:11:45 +00:00
Paul Eggert f2ced93400 * coreutils.texi (dd invocation): New noatime flag. 2005-12-07 21:11:27 +00:00