Commit graph

1242 commits

Author SHA1 Message Date
kwantam
e1dac4695e improved Sieve implementation ; add cargo update
This commit adds `cargo update` to the distclean target in the
makefile. This updates the Cargo.lock file when clearing the
deps directory.

In addition, it adds a faster implementation of the Sieve of
Eratosthenes for use by `src/factor/gen_table.rs` and `test/factor.rs`.
2015-05-15 19:39:43 -04:00
Heather
9bc58bbdda Merge pull request #600 from jbcrail/fix-du
Fix du.
2015-05-15 07:30:30 +03:00
Joseph Crail
349622a05b Fix du.
In addition to upgrading the nightly build, I flattened the Stat struct
to embed the metadata fields. This simplified access to the values, but
needed a constructor method for ergonomic reasons.
2015-05-14 18:35:55 -04:00
Heather
94cd6eb543 usernames can only be up to 104 characters in windows, fix #565 2015-05-14 08:27:47 +04:00
Heather
f0e5c19ed4 Merge pull request #597 from jbcrail/update-mkdir
Update mkdir.
2015-05-14 07:16:11 +03:00
Heather
aca7775926 Merge pull request #598 from jbcrail/fix-mv
Fix mv.
2015-05-14 07:14:54 +03:00
Heather
18a99f5bd5 Merge pull request #599 from jbcrail/fix-mkfifo
Fix mkfifo.
2015-05-14 07:14:27 +03:00
Joseph Crail
46bd77c3c2 Fix mkfifo. 2015-05-13 22:22:13 -04:00
Joseph Crail
18da32f394 Fix mv. 2015-05-13 21:05:36 -04:00
Joseph Crail
7f3d4ebf5b Update mkdir.
In addition to upgrading to the nightly build, I refactored the method
that creates the directories by switching from a recursive approach to
an iterative one. I also replaced the obsolete fs::mkdir() with a custom
method using fs::create_dir() and libc::chmod(). I added several
diagnostic messages that match the GNU implementation.
2015-05-13 16:38:11 -04:00
Heather
9b193d8d8a Merge pull request #594 from jbcrail/update-fold
Update fold to replace vector concatenation.
2015-05-13 07:22:47 +03:00
Heather
e078092c80 Merge pull request #595 from jbcrail/update-readlink
Update readlink.
2015-05-13 07:22:21 +03:00
Heather
eba90561f6 Merge pull request #596 from jbcrail/remove-returns
Remove tail return statements.
2015-05-13 07:21:55 +03:00
Joseph Crail
f502b187a7 Remove tail return statements. 2015-05-12 19:54:12 -04:00
Joseph Crail
481fdd744a Add tests for readlink. 2015-05-12 17:09:41 -04:00
Joseph Crail
b2063d6d73 Update readlink.
I updated to the nightly build, completed support for the verbose flag,
and refactored the canonicalization method to simplify and add support
for Windows paths.
2015-05-12 17:07:31 -04:00
Joseph Crail
66a7dc8cb7 Update fold to replace vector concatenation.
The syntax for concatenating a vector and a slice use the '+' operator
was removed from Rust.
2015-05-12 16:52:15 -04:00
Heather
57050517f9 Merge pull request #593 from kwantam/master
fix `cut`
2015-05-12 07:10:02 +03:00
Heather
60e3603410 Merge pull request #592 from jbcrail/fix-nice
Fix nice.
2015-05-12 07:06:43 +03:00
kwantam
aabbf83d88 fix cut
This commit updates `cut` to build on rust nightly.

In addition, it adds support for null input and output delimiters,
and fixes a bug in the `cut_characters()` function that would cause
incorrect output when two adjacent fields were specified in the range
list.
2015-05-11 21:15:39 -04:00
Joseph Crail
1ee57fa229 Fix nice. 2015-05-11 17:40:45 -04:00
Heather
c94a5ce808 Merge pull request #589 from jbcrail/fix-nl
Fix nl.
2015-05-11 08:08:50 +03:00
Heather
cf1723892d Merge pull request #590 from jbcrail/fix-nproc
Fix nproc.
2015-05-11 08:08:21 +03:00
Heather
c8dbe036e5 Merge pull request #591 from jbcrail/fix-od
Fix od.
2015-05-11 08:07:17 +03:00
Joseph Crail
b20bde94cb Fix od.
I upgraded to the nightly build and replaced the unstable BYTES constant
with mem::size_of().
2015-05-11 00:48:36 -04:00
Joseph Crail
58de022ed4 Fix nproc.
Since std::os::num_cpus() was removed from the library, I added the
num_cpus crate to the dependencies.
2015-05-10 22:20:20 -04:00
Joseph Crail
28c21902c5 Fix nl.
Aside from the usual upgrades to sync with the nightly build, I fixed an
unwrap() panic when reading lines with only a newline. I also refactored
the repeated command calls to use helper functions.
2015-05-10 18:59:37 -04:00
Heather
8deb9a8dc1 Merge pull request #588 from jbcrail/cleanup-pwd
Cleanup pwd.
2015-05-10 12:35:22 +03:00
Heather
93a96abcae Merge pull request #587 from jbcrail/add-tsort-test
Add initial test for tsort.
2015-05-10 12:35:05 +03:00
Joseph Crail
aa6a9c6fd7 Cleanup pwd.
I removed an unused argument from the usage documentation. I also
removed the redundant return calls.
2015-05-09 23:45:43 -04:00
Joseph Crail
82dbd02c03 Add initial test for tsort. 2015-05-09 23:38:48 -04:00
Heather
1f67aaaf8c Merge pull request #585 from jbcrail/add-basename-split-tests
Add initial tests for basename/split.
2015-05-09 22:20:23 +03:00
Heather
7300624a50 Merge pull request #586 from jbcrail/add-more-tests
Add more tests.
2015-05-09 22:20:19 +03:00
Heather
478fe40d3b Merge pull request #584 from jbcrail/fix-basename-bug
Fix basename when trailing slashes are present.
2015-05-09 22:19:06 +03:00
Joseph Crail
08aea6d549 Add initial test for pwd. 2015-05-09 15:17:26 -04:00
Joseph Crail
9172bb9bd8 Add initial tests for false/true. 2015-05-09 15:17:16 -04:00
Joseph Crail
87e7cc9b44 Add initial tests for echo. 2015-05-09 15:17:01 -04:00
Joseph Crail
e700e0d2f4 Add initial tests for dirname. 2015-05-09 15:16:45 -04:00
Joseph Crail
646285f684 Add initial tests for basename. 2015-05-09 13:32:47 -04:00
Joseph Crail
234c81311f Add initial tests for split.
I created random data to test several cases. I verified that the data is
split into the correct number of files and can also be reassembled into
the original file.
2015-05-09 13:32:30 -04:00
Joseph Crail
3abf19a595 Fix basename when trailing slashes are present.
The GNU implementation first strips all trailing slashes before deleting
the directory portion. This case wasn't handled.

I also rewrote the method that strips the directory to use the PathBuf
methods for improved platform-indepedence.
2015-05-09 13:23:48 -04:00
Heather
39de3f7b71 Merge pull request #581 from kwantam/master
fix `rm` and `rmdir`
2015-05-09 08:11:28 +03:00
Heather
df27f5035c Merge pull request #582 from jbcrail/fix-split
Fix split.
2015-05-09 08:10:50 +03:00
Joseph Crail
10339e6c32 Fix split.
I upgraded to the nightly build.
2015-05-08 23:11:15 -04:00
kwantam
a3acb00394 fix rmdir 2015-05-08 20:24:03 -04:00
kwantam
4854eb238d fix rm
In addition, this commit brings the behavior of `rm` better in line
with the behavior of GNU Coreutils rm, especially as regarding recursive
interactive deletion of directories. This version asks to delete files
in a different order from GNU rm, but it now gives the option of stopping
the recursion at each new directory that is reached.
2015-05-08 19:42:19 -04:00
Heather
7cb74885c4 Merge pull request #579 from jbcrail/update-fold
Update fold and add tests.
2015-05-08 08:05:38 +03:00
Joseph Crail
5878d9904e Add tests for fold. 2015-05-08 00:58:43 -04:00
Joseph Crail
dd19bc27c1 Update fold to nightly build. 2015-05-08 00:57:41 -04:00
Heather
b4c106b004 Merge pull request #578 from jbcrail/fix-broken-seq-tests
Fix broken seq tests.
2015-05-08 07:47:25 +03:00