Nathan Ross
5f88dfe12b
printf: rustfmt pass
2016-02-15 00:48:08 -05:00
Nathan Ross
9242ba1db6
printf: scaffolding for C99 hex float
2016-02-15 00:17:11 -05:00
Nathan Ross
0892ad3cde
printf: add (spare C99 hex floats)
2016-02-15 00:10:30 -05:00
Joseph Crail
53c60e2990
Fix type mismatch error.
2016-01-22 22:02:10 -05:00
Arcterus
0d3cc86936
uucore: don't follow symlinks when examining them ( fixes #799 )
2016-01-10 03:39:31 -08:00
Arcterus
d9ad0b185a
tests: fix tests that were failing on OS X
2016-01-10 00:09:05 -08:00
Heather
27c77db122
Merge pull request #795 from ebfe/ptx-stable
...
ptx: fix build on stable
2016-01-06 19:56:14 +04:00
Michael Gehring
26280d9083
expand, unexpand: fix build on stable
2016-01-06 16:35:33 +01:00
Michael Gehring
9cd7d03eff
ptx: fix build on stable
2016-01-06 16:20:59 +01:00
Alex Lyon
027e02db8b
Merge pull request #793 from ebfe/clippy
...
Fix clippy warnings
2016-01-06 00:56:07 -08:00
Michael Gehring
a2944e06db
Fix clippy warnings
2016-01-06 09:36:20 +01:00
Arcterus
bc40f93f7e
chmod: implement --verbose, --changes, and --quiet
2016-01-05 14:08:24 -08:00
Arcterus
ee669ab55b
chmod: rewrite mode parser
2016-01-04 20:00:34 -08:00
Michael Gehring
73cd23ca71
Merge pull request #781 from KeenS/mktemp
...
Mktemp
2016-01-04 18:40:08 +01:00
Arcterus
96817dfbc5
Fix #784
2016-01-03 23:15:19 -08:00
Sunrin SHIMURA (keen)
e733ffb936
[mktemp] allow empty argument
2016-01-03 22:40:21 +09:00
Sunrin SHIMURA (keen)
a09abc63a0
[mktemp] remove old comment
2016-01-03 19:13:01 +09:00
Sunrin SHIMURA (keen)
58d1d66d16
[mktemp] implement mktemp
2016-01-03 19:10:47 +09:00
Fort
cf1204b2b3
Fix copyright line
2015-12-31 08:56:11 -08:00
Fort
649aa2693d
pattern name generating function handles random as well
2015-12-30 13:53:59 -08:00
Fort
67698a9f2e
Creating pattern string works correctly now
2015-12-30 13:30:20 -08:00
Fort
4a42b981f9
Open file once for all passes, seek back to start between passes. Do not use File::create, because it truncates existing files
2015-12-30 11:27:59 -08:00
Fort
04d2134856
Skip creating a new File object when getting file size
2015-12-30 10:06:24 -08:00
Fort
6c3917e123
Add caution about effectiveness to help text
2015-12-30 09:22:21 -08:00
Fort
eb6453013e
Implement shred
2015-12-29 13:30:05 -08:00
Michael Gehring
74a5869d21
du: fix default symlink handling
...
Fixes #776
2015-12-26 18:36:36 +01:00
Nick Herman
5958354b01
Fix busybox seq formatting test
2015-12-26 16:23:06 +03:00
Nathan Ross
a3196319c5
support busybox newer tests through multicall
2015-12-25 00:45:23 -05:00
Heather
97793313c0
Merge pull request #766 from nathanross/install
...
*nix install script and appveyor script
2015-12-25 08:28:28 +04:00
Nathan Ross
d99d5c1338
fixes for linux install see notes
...
calling install goal overrides utility build settings with utility install settings
calling install goal defaults profile to --release
PROG_PREFIX is now applied to all utilities
modify uutils.rs to make symbolic link bins possible
binary install paths rmd first to prevent errors due to lns
simplify vars for more readable install target
other minor fixes
2015-12-24 00:13:16 -05:00
Joseph Crail
3b4baeb1e7
Fix "private type in public interface" warnings.
2015-12-23 20:08:53 -05:00
Michael Gehring
519802bdf9
expr: add '|' and '&' operators
2015-12-22 13:41:30 +01:00
Michael Gehring
3d94dea397
hostname: fix '-i'
2015-12-21 21:08:17 +01:00
Michael Gehring
bcaa859ca7
fmt: fix warnings
2015-12-21 20:23:55 +01:00
Heather
f16ce871c6
Merge pull request #754 from ebfe/fix-dirname
...
dirname: fix "/" "." ""
2015-12-21 14:55:57 +04:00
Michael Gehring
c918fb6a6b
dirname: fix "/" "." ""
2015-12-21 11:14:08 +01:00
Michael Gehring
cf8a86ca2d
id: fix '-u'
...
Some cases printed gid instead of uid.
2015-12-21 10:45:49 +01:00
Nathan Ross
5ee7b5b8fc
rm recognition of "busybox" bin name in uutils.rs
2015-12-20 21:06:05 -05:00
Michael Gehring
ab0639d88a
Fix arm build
...
Fixes #719
2015-12-19 08:53:28 +01:00
Michael Gehring
bc0dd2006c
Merge pull request #749 from jbcrail/refactor-tail-2
...
tail: use read_line/read instead of lines/bytes
2015-12-19 08:43:43 +01:00
Joseph Crail
23202f5aef
Remove unused imports
2015-12-19 01:32:05 -05:00
Joseph Crail
aa0ce61b3f
tail: use read_line/read instead of lines/bytes
...
In order to work around lines() removing the newline byte and CRLF, I
switched from the iterator methods (lines/bytes) to the direct methods
(read_line/read). I also manually skipped lines/bytes.
Fixes #744 .
2015-12-18 23:52:09 -05:00
Joseph Crail
77abd58be7
Refactor settings into dedicated struct
2015-12-12 18:37:17 -05:00
Joseph Crail
b6abe56357
Fix whitespace
2015-12-12 15:29:45 -05:00
Joseph Crail
8fa09b2004
Remove trait shim needed before Path stabilized
...
Now that Path has stabilized in Rust 1.5, I removed the UUPathExt trait
needed to support stable, beta, and nightly.
2015-12-10 14:20:01 -05:00
Joseph Crail
58d6add8d1
Add macro to properly find program name.
2015-12-07 21:56:46 -05:00
Joseph Crail
b90d253584
Refactor and simplify build for utilities.
...
For coreutils, there are two build artifacts:
1. multicall executable (each utility is a separate static library)
2. individual utilities (still separate library with main wrapper)
To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.
Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Joseph Crail
cbce549de7
More import fixes for Windows.
2015-12-01 01:27:20 -05:00
Joseph Crail
e8aa7241fa
Fix errors with bools represented as ints.
2015-12-01 01:27:08 -05:00
Heather
614044cff0
Merge pull request #736 from jbcrail/refactor-interactive
...
Refactor check for standard stream interactivity.
2015-11-30 08:39:18 +04:00
Heather
b18c558d6c
Merge pull request #735 from jbcrail/update-windows
...
Update Windows support.
2015-11-30 08:38:32 +04:00
Joseph Crail
9a4c1aa7fa
Refactor check for standard stream interactivity.
...
Since several utilities check if the standard streams are interactive, I
moved this into the uucore::fs library as is_std*_interactive(). I also
added Windows support for these methods, which only return false (or at
least until someone finds a way to support this).
2015-11-29 21:03:53 -05:00
Joseph Crail
1c7da36f76
Remove unused imports and macro attribute.
2015-11-29 20:23:01 -05:00
Joseph Crail
b46050460e
uucore: specify a few modules to be Unix-only
2015-11-29 17:27:43 -05:00
Michael Gehring
8a6768e9bd
comm: clear buffers between read_line calls
2015-11-28 20:35:43 +01:00
Michael Gehring
14b1313eaf
comm: fix EOF detection
2015-11-28 20:25:16 +01:00
Joseph Crail
e3eb633ac9
cut: fix off-by-one error for range calculation
...
When determining the range from which to select portions of a line, the
upper limit of the range is a usize. The maximum upper value is
usize::MAX, but at one point this value is incremented, causing an
overflow. By setting the maximum upper value to usize::MAX-1, the bug is
averted. Since the upper limit of the range is an index (thus, ranging
from 0 to 2^64-1 for 64-bit platforms), the maximum usize should not be
reached.
2015-11-28 00:42:35 -05:00
Michael Gehring
a773db7325
Remove deprecated lint
2015-11-27 22:23:06 +01:00
Joseph Crail
012414c49f
test: fix namespace and broken test
...
I separated test's main() into a separate file to override Cargo's
requirement for matching crate names. I had to update the build command
to use a special extern reference for test.
Fixes issues caused by #728 .
2015-11-27 15:35:20 -05:00
Joseph Crail
d4e0ea41a3
Fix namespace collision for test.
...
To avoid linking issues with Rust's libtest, the crate for the test
utility was changed to 'uutest'. However, the user doesn't need to see
this so a few hoops were jumped through to make this transparent.
I also updated the make rules to build the individual features first and
then uutils. This makes 'make && make test' look more organized.
2015-11-27 01:54:18 -05:00
Michael Gehring
ca16e66a55
switch to cargo version numbers
2015-11-25 10:58:49 +01:00
Michael Gehring
9365e100d9
Merge pull request #723 from jbcrail/cleanup
...
Fix whitespace, unused file, and warnings.
2015-11-25 10:20:46 +01:00
Joseph Crail
55e5327573
Use name/version when showing hostname's usage.
2015-11-25 04:05:12 -05:00
Michael Gehring
cdbae736f1
sum: use wrapping_add to avoid overflow panics
2015-11-25 09:58:58 +01:00
Joseph Crail
ca1074201f
Split utility files into separate library.
...
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.
Fixes #717 .
2015-11-24 22:20:27 -05:00
Nathan Ross
502957dc3e
use cargo idioms to manage dependency resolution and compilation
2015-11-23 02:04:15 -05:00
Nathan Ross
b20b2cca19
update uses of libc 0.1.x and deprecated stdlib uses
2015-11-23 02:04:15 -05:00
Joseph Crail
3b5c776675
Add tests for rmdir.
...
I also adjusted error message to conform to GNU implementation.
2015-11-01 15:31:48 -05:00
Joseph Crail
4121d1e25d
Remove unnecessary parentheses.
2015-10-31 02:32:55 -04:00
Roman Gafiyatullin
7b54410557
expr: prefix operators length/1, index/3 and substr/3
2015-10-09 19:26:51 +03:00
Roman Gafiyatullin
092e4d1ed4
Implement expr.
...
Implemented as follows:
Usage: expr EXPRESSION
or: expr OPTION
--help display this help and exit
--version output version information and exit
Print the value of EXPRESSION to standard output. A blank line below
separates increasing precedence groups. EXPRESSION may be:
ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0
ARG1 < ARG2 ARG1 is less than ARG2
ARG1 <= ARG2 ARG1 is less than or equal to ARG2
ARG1 = ARG2 ARG1 is equal to ARG2
ARG1 != ARG2 ARG1 is unequal to ARG2
ARG1 >= ARG2 ARG1 is greater than or equal to ARG2
ARG1 > ARG2 ARG1 is greater than ARG2
ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
ARG1 * ARG2 arithmetic product of ARG1 and ARG2
ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
STRING : REGEXP [NOT IMPLEMENTED] anchored pattern match of REGEXP in STRING
match STRING REGEXP [NOT IMPLEMENTED] same as STRING : REGEXP
substr STRING POS LENGTH [NOT IMPLEMENTED] substring of STRING, POS counted from 1
index STRING CHARS [NOT IMPLEMENTED] index in STRING where any CHARS is found, or 0
length STRING [NOT IMPLEMENTED] length of STRING
+ TOKEN interpret TOKEN as a string, even if it is a
keyword like 'match' or an operator like '/'
( EXPRESSION ) value of EXPRESSION
Beware that many operators need to be escaped or quoted for shells.
Comparisons are arithmetic if both ARGs are numbers, else lexicographical.
Pattern matches return the string matched between \( and \) or null; if
\( and \) are not used, they return the number of characters matched or 0.
Exit status is 0 if EXPRESSION is neither null nor 0, 1 if EXPRESSION is null
or 0, 2 if EXPRESSION is syntactically invalid, and 3 if an error occurred.
Environment variables:
* EXPR_DEBUG_TOKENS=1 dump expression's tokens
* EXPR_DEBUG_RPN=1 dump expression represented in reverse polish notation
* EXPR_DEBUG_SYA_STEP=1 dump each parser step
* EXPR_DEBUG_AST=1 dump expression represented abstract syntax tree
2015-10-09 12:31:25 +03:00
Carlos Liam
87d14978e9
Clean whitespace
...
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
d167674ba7
Fix nightly build
2015-09-29 22:37:24 +02:00
Roman Gafiyatullin
b4dd12104f
factor: panic running againts power of two.
...
No further calculations required in case 'num' is already 1.
2015-10-02 20:30:35 +03:00
Steve Klabnik
0c117eb8a8
initial work
2015-09-27 23:55:28 -04:00
Steve Klabnik
ac7e289d29
Fix the build
2015-09-27 23:34:23 -04:00
Danilo Bargen
3e1c6e7e71
Use system error codes
2015-09-18 11:51:59 +02:00
Danilo Bargen
0e7223cfb0
Handle null pointer return value for getpwuid on Linux
2015-09-18 11:12:39 +02:00
Danilo Bargen
a8f9b40674
Return Result<String, String> from getusername
2015-09-18 11:12:39 +02:00
Heather
fe0a49f7a4
Merge pull request #671 from ebfe/cargo-build
...
Basic Cargo based build
2015-09-17 16:42:43 +03:00
Christian Zinck
f31192d46a
enhanced numeric sort and new human readable sort
2015-08-30 20:06:33 -04:00
Michael Gehring
5411252d3a
touch: add filetime dependency
2015-08-28 21:12:30 +02:00
Michael Gehring
9d8abbcb06
Basic Cargo build
...
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
`cargo --no-default-features --features <utils>`
can be used.
Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02:00
Gustavo Hexsel
f8df842dfb
Moved code officially to run on nightly since it's a dependency
2015-08-26 12:50:07 -04:00
Sam Gibson
c06b8218f7
Fix build by making du not use futures
...
Use channels and push them into a vector instead. Code remains largely the same.
2015-08-24 18:57:09 +12:00
Joseph Crail
26f0ec8379
Fix difference w/ GNU coreutils' sum.
...
When using the SYSV algorithm and reading from standard input, the GNU
coreutils implementation does not output the filename, in this case "-".
2015-08-14 00:10:15 -04:00
Heather
809affff6c
Merge pull request #678 from jbcrail/stabilize-4
...
Remove unstable features from mv/touch.
2015-08-12 08:13:40 +03:00
Joseph Crail
e9b008cf70
Remove unstable features from ptx.
...
I cleaned up string references, whitespace, and use of unstable
features. I also added a comment about reverting to connect, making
others aware that the method should be replaced by join after 1.3.
2015-08-12 00:01:10 -04:00
Joseph Crail
eff8851cf9
Fix bug when setting time w/o year.
2015-08-11 21:45:11 -04:00
Joseph Crail
e455ba5de1
Replace unstable set_file_times w/ external crate.
2015-08-11 21:45:11 -04:00
Joseph Crail
9d84890c89
Convert to byte vec w/o using deprecated methods.
2015-08-11 21:45:11 -04:00
Joseph Crail
480019f5b3
Add comments for deprecated connect().
...
We are using connect() instead of join() until Rust 1.3 is stable.
Currently, connect() is just a thin wrapper over join(). Keeping the
deprecated method allows us to build on all releases.
2015-08-09 23:12:23 -04:00
Joseph Crail
43d3834880
Backport and/or replace unstable features.
...
I removed the unstable slice_patterns and str_char features. I also used
the deprecated connect() method, instead of join().
2015-08-08 03:53:21 -04:00
Joseph Crail
b089831ea0
Switch over to internal canonicalize().
...
The method, fs::canonicalize(), is unstable and can't be used for stable
builds. We already have our own implementation of canonicalize(), which
supports more options than the Rust library implementation.
2015-07-31 18:55:33 -04:00
Joseph Crail
4a331897cb
Replace unstable VecMap w/ external crate.
2015-07-31 17:05:22 -04:00
Joseph Crail
4300cd5a48
Replace unstable init() method.
2015-07-31 16:21:06 -04:00
Joseph Crail
047d963a26
Remove unused feature attribute.
2015-07-31 16:21:06 -04:00
Joseph Crail
f41d5b3f8f
Replace unstable fs:walk_dir() w/ external crate.
2015-07-31 16:21:06 -04:00
Joseph Crail
6ff576e300
Use non-PathExt canonicalize().
2015-07-31 16:21:06 -04:00
Joseph Crail
f03b22a65c
Stabilize several PathExt methods.
2015-07-31 16:21:06 -04:00
Karol Rozycki
b025b44806
-f flag for uniq
2015-07-31 19:37:40 +02:00
Joseph Crail
9bc6eb4e7b
Replace deprecated methods.
...
I replaced position_elem() and slice_chars(). I also removed an unused
feature attribute.
2015-07-30 22:21:18 -04:00
Joseph Crail
157c20c7d3
Replace deprecated methods.
2015-07-27 00:35:34 -04:00
Peter Atashian
010bda9df2
Fix build on non-windows
...
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-20 16:40:29 -04:00
Peter Atashian
47f82f0de2
Various Windows fixes
...
Improve handling of unicode on Windows
Disable a few crates on Windows that abuse unix APIs too much
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-19 20:25:48 -04:00
Joseph Crail
49d9de17fe
Fix deprecation warnings for tr.
...
I switched over to the bit-vec/bit-set cargos.
2015-07-09 18:30:03 -04:00
Alex Lyon
8f6d13df5f
Merge pull request #647 from jbcrail/fix-osx-stdbuf
...
Fix OS X build errors for stdbuf.
2015-07-09 14:58:07 -07:00
Alex Lyon
7c2ed679ab
Merge pull request #649 from jbcrail/fix-stdbuf-regression
...
Fix stdbuf regression.
2015-07-09 12:58:13 -07:00
Joseph Crail
b8ab2c125f
Fix stdbuf regression.
...
When replacing range_inclusive(), I introduced a bug when parsing
arguments. I added a smoke test to prevent basic regressions in the
future.
2015-07-09 15:23:14 -04:00
Joseph Crail
3fa2e89a7a
Fix OS X build errors for stdbuf.
...
I removed unused linker flags, added platform-specific linker flags, and
used DYLD_LIBRARY_PATH (instead of DYLD_INSERT_LIBRARIES) for loading
the dynamic library. I also removed an unused variable mutation.
2015-07-09 13:04:04 -04:00
Joseph Crail
3270040778
Remove unused mutation from variables.
2015-07-08 22:24:02 -04:00
Joseph Crail
01b0d5da1c
Remove unused attribute.
2015-07-05 22:36:34 -04:00
Joseph Crail
9f1dc98925
Add initial implementation for ln.
...
There are several areas needing improvement:
1) add tests for hard links
2) add implementation for uncommon flags (-d, -L, -n, -P, -r)
3) align error messages more closely with GNU implementation
2015-07-05 14:52:31 -04:00
Joseph Crail
951be1bfaa
Fix alignment of mv help.
2015-07-01 22:09:33 -04:00
Joseph Crail
dd97629a0e
Merge pull request #640 from remram44/mv-strip-trailing-slashes
...
Implement mv's --strip-trailing-slashes
2015-06-30 23:31:03 -04:00
Remi Rampin
0691965d63
Use ChildExt to wait from timeout.rs
2015-06-30 18:45:13 -04:00
Remi Rampin
dc40480e6e
Switch wait_or_timeout() to f64
2015-06-30 18:44:32 -04:00
Remi Rampin
d806ab4809
Use ChildExt to kill from timeout.rs
2015-06-30 18:44:30 -04:00
Remi Rampin
cce3d5171d
ChildExt for send_signal() and wait_or_timeout()
2015-06-30 18:42:51 -04:00
Remi Rampin
13f5994e15
Rename time.rs to parse_time.rs
...
Conflicts with crate time.
2015-06-30 18:42:51 -04:00
Remi Rampin
28302555b8
Replace missing signal() by libc kill() directly
2015-06-30 18:42:50 -04:00
Remi Rampin
66a40d555d
Update timeout.rs to new io
2015-06-30 18:42:19 -04:00
Remi Rampin
0ed57b3896
Fix simple typo in mv.rs
2015-06-30 15:21:40 -04:00
Remi Rampin
b8d5602655
Implement mv's --strip-trailing-slashes
2015-06-30 13:24:19 -04:00
Joseph Crail
690a483a8a
Update to nightly build.
...
I updated the library dependencies, features, and deprecated methods.
2015-06-23 23:00:00 -04:00
Joseph Crail
cf7db989e7
Update dependencies.
...
I added the regex-syntax crate to the dependencies for hashsum, nl, and
ptx.
2015-06-04 22:37:51 -04:00
Joseph Crail
0df4918f2d
Fix split tests.
...
I added an additional regex dependency and converted strings to
Vec<u8>'s for the assertions.
2015-06-04 13:57:17 -04:00
Joseph Crail
1e22455032
Align formatting with GNU implementation.
2015-06-03 01:41:56 -04:00
Joseph Crail
ac8d972ed9
Refactor wc settings into dedicated struct.
2015-06-03 01:41:56 -04:00
Joseph Crail
b25a344566
Add quiet and verbose flags to head.
2015-05-31 20:26:57 -04:00
Joseph Crail
1580daea7c
Refactor utility settings into dedicated struct.
...
This will make it easier to add support for additional options, such as
verbosity and negative byte/line counts.
2015-05-30 19:10:15 -04:00
Joseph Crail
b008ed103d
Improve descriptions of available options.
2015-05-30 19:10:15 -04:00
Joseph Crail
826d8a6530
Add newline when printing lines.
2015-05-30 19:10:15 -04:00
dokaptur
5aa68eb716
printing version unified and tests
2015-05-30 13:48:53 +02:00
dokaptur
ea7df03c0a
initial ptx commit
2015-05-30 09:35:28 +02:00
Joseph Crail
17e732f0fd
Flush pending stdout writes.
2015-05-29 13:51:11 -04:00
Heather
f84d5462a3
Merge pull request #625 from jbcrail/add-base64-tests
...
Add tests for base64.
2015-05-29 07:57:35 +03:00
Joseph Crail
1be9c41105
Upgrade regex cargo.
2015-05-29 00:50:32 -04:00
Joseph Crail
1c405d9c91
Remove duplicate header in error messages.
2015-05-28 23:23:54 -04:00
Camille TJHOA
72d8ab0506
Fix hostname
2015-05-27 23:55:25 +02:00
Nikita Ofitserov
abd3e1e8e4
Fix 'env -' case
2015-05-27 00:51:14 +03:00
Joseph Crail
28e00cbd78
Standardize display of utility name and version.
2015-05-25 14:50:15 -04:00
Joseph Crail
d558e37288
Add macro to manually flush a writer.
...
I built upon the pipe_* macros, adding pipe_flush!() to flush an
optional writer (default to stdout if no writer is given).
2015-05-23 03:31:42 -04:00
Heather
9ee7d96e5b
Merge pull request #619 from jbcrail/replace-utf8-ellipsis
...
Replace UTF-8 ellipsis character w/ ASCII periods.
2015-05-23 09:06:56 +03:00
Joseph Crail
2ef14832dc
Replace UTF-8 ellipsis character w/ ASCII periods.
2015-05-23 01:56:33 -04:00
Joseph Crail
07d57ac109
Fix failure to print stdout for echo.
...
Upon program termination, pending stdout writes were not automatically
flushed. When newlines are disabled, I force a flush to stdout.
2015-05-22 21:49:33 -04:00
Vinícius dos Santos Oliveira
c17f925b11
cat.rs: removing need for mut variable
2015-05-22 13:53:13 -03:00
Joseph Crail
496d5883a4
Switch to external getopts cargo (part 3).
...
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.
I'm splitting the updates into several commits for easier reviewing.
2015-05-21 21:32:55 -04:00
Joseph Crail
509a35ff7a
Switch to external getopts cargo (part 2).
...
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.
I'm splitting the updates into several commits for better reviewing.
2015-05-21 15:00:34 -04:00
Joseph Crail
b4b08de42c
Switch to external getopts cargo (part 1).
...
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.
I'm splitting the updates into several commits for better reviewing.
2015-05-20 22:47:30 -04:00
Joseph Crail
a94bd0bd35
Remove unstable regex macros.
...
This will allow coreutils to get further along when building against
Rust 1.0.
2015-05-19 21:40:03 -04:00
Heather
e7518b3eae
Merge pull request #608 from jbcrail/rm-unstable-exit-status
...
Replace unstable set_exit_status() with exit().
2015-05-19 07:15:14 +03:00
Joseph Crail
7d1d307b92
Replace unstable set_exit_status() with exit().
...
With the 1.0 release, unstable features are causing build errors. I
replaced references to std::env::set_exit_status() with
std::process::exit().
2015-05-18 21:22:51 -04:00
Joseph Crail
430e9530d4
Fix nohup.
...
I upgraded to the nightly build.
2015-05-18 20:27:32 -04:00
Heather
37f35cd3f8
Merge pull request #605 from jbcrail/fix-stdbuf
...
Fix stdbuf.
2015-05-18 08:45:17 +03:00
Joseph Crail
c4d8312e6b
Fix mkfifo on Linux.
...
The build failed because of type mismatch errors for the mode
permission.
2015-05-18 00:53:37 -04:00
Joseph Crail
a2400a272f
Fix stdbuf.
...
The build only works on Linux at the moment.
2015-05-17 23:27:57 -04:00
Joseph Crail
7d71dfbbf4
Fix kill.
2015-05-17 15:26:52 -04:00
Joseph Crail
c93440170d
Fix id.
2015-05-17 14:59:04 -04:00
Joseph Crail
1837146134
Update hashsum.
...
Most of the work centered around fixing lifetime issues.
2015-05-16 13:28:36 -04:00
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
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
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
Joseph Crail
f502b187a7
Remove tail return statements.
2015-05-12 19:54:12 -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
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
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
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
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
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
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
Joseph Crail
dd19bc27c1
Update fold to nightly build.
2015-05-08 00:57:41 -04:00
Heather
4e2cd4dd24
Merge pull request #580 from jbcrail/remove-unused-feature
...
Remove unused feature from cat.
2015-05-08 07:46:21 +03:00
kwantam
ff24d48e73
modify factor
impl to eliminate overflow issue
...
This change does the following:
1. Updates the arithmetic functions in `src/factor/numeric.rs` to
correctly handle all cases up to 2^64. When numbers are larger
than 2^63, we fall back to slightly slower routines that check
for and handle overflow.
2. Since the arithmetic functions will now not overflow, we no longer
need the safety net trial division implementation. We now always
use Pollard's rho after eliminating small (<=13 bit) primes.
3. Slight tweak in `src/factor/gen_table.rs` to generate the first
1027 primes, which means we test every prime of 13 or fewer bits
before going into Pollard's rho. Includes corresponding update in
`src/factor/prime_table.rs` and the Makefile to reflect this.
4. Add a new test that generates random numbers with exclusively
large (14 to 50 bit) prime factors. This exercises the possible
overflow paths.
5. Add another new test that checks the `is_prime()` function against
a few dozen 64-bit primes. Again this is to exercise possible
overflow paths.
2015-05-08 00:06:35 -04:00
Joseph Crail
dfaee63cd3
Remove unused feature from cat.
2015-05-07 23:02:47 -04:00
kwantam
7565c27c00
fixed sleep
2015-05-07 18:13:40 -04:00
Camille TJHOA
d8f58305d6
new io cksum (includes BufReader fix)
...
closes kwantam/coreutils#1 via cherry-pick
2015-05-07 18:13:40 -04:00
kwantam
d89fbedf12
fix shuf
2015-05-07 18:13:39 -04:00
kwantam
4390e4ffa6
fix tac
2015-05-07 18:13:39 -04:00
kwantam
9a806346a9
add test for factor
...
Add a test for `factor`.
This commit also pulls factor's Sieve implementation into its own module
so that the factor test can use it.
Finally, slight refactoring for clarity in gen_table.rs.
2015-05-07 18:13:39 -04:00
kwantam
cab4f8d570
fix test
2015-05-07 18:12:32 -04:00
kwantam
1c93a793e9
fix touch
2015-05-07 18:12:32 -04:00
kwantam
6c4e967fc6
fix and slight optimization for factor
...
This commit builds upon @wikol's Pollard rho implementation.
It adds the following:
1. A generator for prime inverse tables. With these, we can do
very fast divisibility tests (a single multiply and comparison)
for small primes (presently, the first 1000 primes are in the
table, which means all numbers of ~26 bits or less can be
factored very quickly.
2. Always try prime inverse tables before jumping into Pollard's
rho method or using trial division.
3. Since we have eliminated all small factors by the time we're
done with the table division, only use slow trial division when
the number is big enough to cause overflow issues in Pollard's
rho, and jump out of trial division and into Pollard's rho as
soon as the number is small enough.
4. Updates the Makefile to regenerate the prime table if it's not
up-to-date.
2015-05-07 18:12:32 -04:00
Wiktor Kuropatwa
06b70877db
factor: Rho-Pollard factorization implementation
2015-05-07 18:12:32 -04:00
kwantam
cee1837879
slight clarification / refactoring in unexpand
...
This keeps equivalent functionality but makes the code slightly cleaner.
Also added one more test case.
2015-05-07 18:12:32 -04:00
Joseph Crail
b00a49eab2
Unescape all special characters in delimiter list.
2015-05-07 16:50:54 -04:00
Joseph Crail
773eeb6d5e
Update paste to nightly build.
2015-05-07 16:49:07 -04:00
Heather
22093d1e5a
Merge pull request #574 from ctjhoa/master
...
Update comm to new_io
2015-05-07 07:42:23 +03:00
Joseph Crail
500bbbfa83
Fix env and add tests.
...
I updated env to use the nightly build. I also added several tests.
2015-05-06 23:59:58 -04:00
Camille TJHOA
53f62cdd6f
Update comm to new_io
2015-05-07 01:05:30 +02:00
Heather
1f2b68251f
Merge pull request #573 from jbcrail/fix-link-sum
...
Fix link and sum.
2015-05-07 00:21:09 +03:00
Heather
5ec1c7bea4
Merge pull request #570 from jbcrail/fix-sort-test
...
Fix failing test for sort.
2015-05-07 00:19:53 +03:00
Joseph Crail
0c883155f5
Fix sum.
2015-05-06 14:12:30 -04:00
Joseph Crail
6911c7e2ce
Fix link.
2015-05-06 13:38:45 -04:00
Heather
7c732bcefe
Merge pull request #571 from jbcrail/fix-cp
...
Fix cp.
2015-05-06 07:43:16 +03:00
Joseph Crail
b854a3161a
Fix realpath and relpath.
...
I used the new Path/PathBuf/PathExt libraries.
2015-05-06 00:14:13 -04:00
Joseph Crail
c31ad75226
Fix cp.
...
I used the new File/Path libraries. The canonicalize method made much of
paths_refer_to_same_file() redundant.
2015-05-05 19:42:38 -04:00
Joseph Crail
b809af601a
Fix failing test for sort.
...
The sorted values were not outputted using a newline.
2015-05-05 19:39:30 -04:00
Joseph Crail
cec0a29b93
Rewrite tee.
...
The utility need a substantial rewrite due to library changes and
lifetime issues. I needed to implement the MultiWriter struct since it
was no longer available.
2015-05-05 00:08:54 -04:00
Heather
15acf2a2b5
Merge pull request #566 from jbcrail/update-tty
...
Update tty and ignore build directories.
2015-05-04 08:32:26 +03:00
Joseph Crail
b0f531c7a3
Fix sort.
...
Minor corrections: upgrade to new libraries, remove unused features, use
new slicing syntax.
2015-05-03 17:42:01 -04:00
Joseph Crail
6de22f91a9
Update tty's options to conform to GNU version.
2015-05-03 17:11:42 -04:00
Michael Gehring
88ab6cfff7
Merge pull request #563 from jbcrail/fix-printenv
...
Fix printenv.
2015-05-03 11:49:13 +02:00
Joseph Crail
965a770841
Remove quotes from current directory.
2015-05-02 21:05:30 -04:00
Joseph Crail
c4ae971e8c
Fix hostid and pwd.
...
Minor library upgrades and whitespace corrections.
2015-05-01 22:00:53 -04:00
Joseph Crail
930896bac1
Fix printenv.
...
Minor corrections and upgrade to new env variable module.
2015-05-01 15:54:49 -04:00
Joseph Crail
c7d07315b8
Fix groups and logname.
...
Minor upgrades and whitespace corrections.
2015-04-30 17:56:35 -04:00
Joseph Crail
3465525d55
Fix tty.
...
I made minor corrections to upgrade to Rust nightly build.
2015-04-30 17:06:38 -04:00
Alex Lyon
4a6b7d33cb
Merge pull request #557 from jbcrail/fix-truncate
...
Fix truncate and related tests.
2015-04-29 18:50:05 -07:00
Joseph Crail
27947c9d2d
Fix dirname.
2015-04-29 21:20:08 -04:00
Joseph Crail
5ec7f28625
Fix truncate and related tests.
2015-04-29 19:23:50 -04:00
Joseph Crail
c6cfca8366
Remove redundant length checks.
2015-04-29 02:37:29 -04:00
Joseph Crail
3b09af815d
Fix head and tail.
...
I upgraded to the recent Rust release. The only major change was the
reduction of the sleep millisecond resolution from u64 to u32 (this
matches the thread::sleep_ms() method).
2015-04-29 02:37:29 -04:00
kwantam
91827a594a
fix tr
and its test
...
In addition, this commit substantially reduces the number
of allocations that tr does when building the substitution
tables.
2015-04-29 01:31:16 -04:00
kwantam
8e2788bd39
fix/rewrite expand
...
This is a reworked version of expand. I did this for two main
reasons:
1. The previous version assumed the input was UTF-8. This
version is compatible with both UTF-8 and non-UTF-8 inputs.
2. This version has a new flag, -U, which forces expand to
treat input as 8-bit ASCII rather than interpreting it
as UTF-8. This might be handy in some cases.
2015-04-29 01:09:27 -04:00
kwantam
feee266b20
fix/rewrite unexpand
and its tests
...
This is a reworked version of unexpand. I did this for two main
reasons:
1. The previous version of unexpand had issues correctly computing
tabstops when the `-a` flag was supplied.
2. The previous version assumed the input was UTF-8. This version works
with non-UTF-8 inputs.
3. This version has a new flag, -U, which forces unexpand to
treat input as 8-bit ASCII rather than interpreting it
as UTF-8. This might be handy in some cases.
2015-04-29 01:09:27 -04:00
kwantam
ec4e3a60e4
fix unlink
2015-04-29 01:09:26 -04:00
kwantam
d1f594eb68
remove box_syntax feature from fmt
, base64
, cat
2015-04-29 01:09:26 -04:00
Joseph Crail
2c4fd7ae23
Fix tsort.
...
I upgraded to the recent Rust release.
2015-04-29 00:01:46 -04:00
kwantam
2e237dd6bb
fix uname
2015-04-27 22:06:19 -04:00
kwantam
1d62f35b45
fix uptime
2015-04-27 22:00:19 -04:00
kwantam
a122849e7c
fix wc
2015-04-27 18:19:56 -04:00
kwantam
143aea72ee
fix users
2015-04-27 17:38:39 -04:00
kwantam
09937b66b9
fix whoami
2015-04-27 17:31:53 -04:00
kwantam
8cd81ec418
update uniq
2015-04-27 15:27:15 -04:00
kwantam
05520e69cb
clean up #![features]
...
For the most part, this commit removes the `collections` feature.
In some places I've removed other features where the effort to do
so was pretty low.
2015-04-27 15:27:15 -04:00
kwantam
de28072140
update yes
...
This commit makes `yes` build on recent nightly.
2015-04-27 15:27:15 -04:00
kwantam
970857ccbe
working chroot implementation
2015-04-27 00:06:12 -04:00
kwantam
664f7d474e
update chroot (not quite working yet)
2015-04-26 16:12:19 -04:00
kwantam
06f1b38c91
update chmod for latest stdlib changes
2015-04-26 16:12:19 -04:00
Camille TJHOA
c8365f78b4
chroot new_io
2015-04-26 20:23:29 +02:00
Camille TJHOA
d990efff83
chmod new_io
2015-04-26 20:03:37 +02:00
kwantam
d4f39e1638
dependency builds use Cargo
...
With this change, individual submodules can specify their dependencies with
an additional file called "deps.mk" in the subdir. When building, only
the dependencies that are necessary are built, using cargo, and then linked.
This greatly simplifies adding new dependencies: add the package in
deps/Cargo.toml, and add the appropriate line in "deps.mk" in the
src/utilname/ directory, and the dependency will be built automatically
as needed.
This also removes the need to use git submodules.
2015-04-25 22:18:03 -04:00
kwantam
c6585b7086
make seq build on nightly
2015-04-25 22:09:06 -04:00
kwantam
cc48e83e98
update cat, cat tests to new API
...
This commit updates the `cat` utility as well as its testbench
to work with the latest APIs.
2015-04-25 03:28:06 -04:00
Joseph Crail
7c0eb246a0
Upgrade echo to use recent Rust nightly build.
...
I removed unused features, switched to the new range syntax, and other
minor updates.
2015-04-24 22:31:47 -04:00
Camille TJHOA
7332d7d827
Basename new_io
2015-04-24 00:10:18 +02:00
Camille TJHOA
a7caf3c86a
Cksum new_io
2015-04-23 23:52:45 +02:00
Joseph Crail
92bbd7b2ce
Upgrade base64 to use recent Rust nightly build.
2015-04-23 01:03:35 -04:00
kwantam
ecf248c5e3
fix build infrastructure ; modernize library use
...
This patch begins the work of modernizing uutils to work with 1.0-ish
Rust. In particular, it
1. Updates to the latest submodules.
2. Convert mkmain.rs, mkuutils.rs, and src/uutils/uutils.rs
to new slice syntax and use of new io, fs, and path APIs.
3. Convert src/common/util.rs to new io, fs, and path APIs.
4. Convert fmt to use new APIs.
2015-04-18 19:55:32 -04:00
Michael Gehring
3529c5d809
Update feature flags
2015-03-08 19:09:41 +01:00
Michael Gehring
9f8fd55b4a
Integer type changes
2015-03-08 19:06:30 +01:00
Michael Gehring
bce3382fd2
Closure syntax
2015-03-08 19:06:04 +01:00
Michael Gehring
a5547507af
c_str_to_bytes -> CStr::from_ptr
2015-02-22 13:59:57 +01:00
Michael Gehring
eb6594cc91
CString::from_slice -> CString::new
2015-02-22 13:59:57 +01:00
Michael Gehring
3993a2bf90
Update feature flags
2015-02-22 13:59:57 +01:00
Michael Gehring
26568d2021
Update to the new integer suffixes
2015-02-22 13:59:57 +01:00
Michael Gehring
8098d172d7
Update slicing syntax ([] -> [..])
2015-02-22 13:59:12 +01:00
Michael Gehring
9ae9a48387
feature io -> old_io, path -> old_path
2015-02-22 13:59:12 +01:00
Michael Gehring
4e79a82f46
fix feature warnings
2015-02-22 13:59:12 +01:00
Michael Gehring
50301e63ee
env::args return Strings now
2015-02-22 13:59:12 +01:00
Michael Gehring
ec9c8659ea
Drop unused imports
2015-02-22 13:59:12 +01:00
Michael Gehring
910fd61070
os::args -> env::args
2015-02-22 13:59:12 +01:00
Michael Gehring
e7b647171f
os::set_exit_status(isize) -> env::set_exit_status(i32)
2015-02-22 13:59:12 +01:00
Michael Gehring
4d62e8289a
collections::BitvSet -> collections::BitSet
2015-02-22 10:31:49 +01:00
Michael Gehring
b6ff2aeeae
collections::RingBuf -> collections::VecDeque
2015-02-22 10:29:28 +01:00
Michael Gehring
80f9ef08d2
various integer type changes
2015-02-22 10:27:16 +01:00
Michael Gehring
09b1162912
CString::as_slice_with_nul -> CString::as_bytes_with_nul
2015-02-22 10:06:26 +01:00
Michael Gehring
e78900e56a
new plugin attribute syntax
2015-02-13 16:45:01 +01:00
Michael Gehring
7c617f524b
Fix closure syntax
2015-02-07 10:15:16 +01:00
Michael Gehring
d3ff46d0c7
Drop deprecated 'libc' feature flag
2015-02-06 14:10:07 +01:00
Michael Gehring
8021b491f6
fmt: iter::Peekable changes
2015-02-06 14:10:07 +01:00
Michael Gehring
5e70473a2b
std::path -> std::old_path
2015-02-06 13:45:45 +01:00
Michael Gehring
25232c3697
Fix warnings
2015-02-03 23:59:48 +01:00
Michael Gehring
3eb5a814a3
Fix most unstable feature warnings
2015-02-03 23:54:37 +01:00
Michael Gehring
db8506532e
derive(Show) -> derive(Debug)
2015-02-03 22:42:36 +01:00
Michael Gehring
d89d9ca73b
Various functions in std::str return Result instead of Option now
2015-02-03 22:32:30 +01:00
Alex Lyon
9c0ed7236c
Merge pull request #517 from keunwoo/keunwoo-fix-address-radix-20150127
...
od: fix --address-radix interpretation and minor cleanups
2015-02-01 12:13:37 -08:00
Michael Gehring
906d3e4ec5
write -> write_all
2015-01-29 08:47:43 +01:00
Michael Gehring
d187dc574b
std::io -> std::old_io
2015-01-29 08:45:37 +01:00
Keunwoo Lee
f6a07663e8
od: proper interpretation of -A flag
...
Prior to this CL, --address-radix was being used to determine the format
of the output bytes. This was wrong: this flag controls the printing of
the address (in the POSIX spec for od, this is called the "input offset
base"), not the printing of the content bytes.
2015-01-27 21:51:28 -08:00
Keunwoo Lee
55be34a2c4
od: clean up fname usage
...
+ rm superfluous clone
+ rm superfluous mut variable
2015-01-27 21:51:28 -08:00
Keunwoo Lee
71bc68a987
od: rm -v alias for --version
...
This shortflag conflicts with --output-duplicates.
2015-01-27 21:51:28 -08:00
Keunwoo Lee
b756a57345
od: clean up parse_radix code and use site
...
+ Make parse_radix terser and clearer.
+ Make purpose of radix clearer at use site
(note that the code currently completely misuses the --address-radix
flag; this is inherited from the previous code)
+ Don't panic! inside parse_radix; instead return Result<> and let the
caller handle errors (currently we panic, but probably we'll want to use
some less alarming error routine); this will be more testable later as
well.
2015-01-27 21:51:28 -08:00
Alex Lyon
2f0d8c89c9
Merge pull request #515 from keunwoo/merge-benhirsch-od-20150125
...
Merge benhirsch24 work on od
2015-01-27 21:24:42 -08:00
Keunwoo Lee
288179be49
address Arcterus comments on uutils/coreutils PR 515
...
Mostly style things.
2015-01-27 19:32:26 -08:00
dokaptur
fecc81f270
stdbuf - fix issue 512
2015-01-25 15:06:41 +01:00
Alex Lyon
333e58283f
Merge pull request #509 from Stebalien/cleanup-wc
...
Cleanup wc
2015-01-25 00:27:31 -08:00
Keunwoo Lee
1954274700
od: fix warnings
2015-01-25 00:17:38 -08:00
Alex Lyon
80d79d6053
Merge pull request #508 from Stebalien/cleanup-sync
...
Cleanup sync.
2015-01-25 00:12:35 -08:00
Alex Lyon
5766a0f6eb
Merge pull request #507 from Stebalien/cleanup-cat
...
Cleanup cat
2015-01-25 00:10:07 -08:00
Keunwoo Lee
a6e5deaa16
od: whitespace fix (4-space indents, 99-column)
2015-01-25 00:03:14 -08:00
Alex Lyon
bfc6d2e288
Merge pull request #469 from dokaptur/stdbuf
...
stdbuf - basic version
2015-01-25 00:02:43 -08:00
Keunwoo Lee
2d8e7f6dec
od: fix build
...
Just the minimal stuff needed to make od build again. I have restrained
myself from making more invasive changes.
2015-01-24 23:56:10 -08:00
Steven Allen
03312d0bb1
Cleanup wc.
...
* Avoid cloning.
* Use slicing syntax.
* Use while let.
* Misc cleanup.
2015-01-25 02:29:06 -05:00
Steven Allen
be117de7e7
wc: reset current_char_count after each line.
2015-01-25 02:20:08 -05:00
Keunwoo Lee
3739c82c95
mv od/ -> src/
2015-01-24 23:16:13 -08:00
Steven Allen
903bb00189
Cleanup sync.
...
* Use slicing syntax.
* Don't unnecessarily use the match binding syntax.
2015-01-25 01:46:55 -05:00
Steven Allen
7647a37bf8
Cleanup cat: use slicing syntax.
2015-01-25 01:21:31 -05:00
Steven Allen
8a101b2203
Cleanup cat: use while let instead of loop then match.
2015-01-24 22:53:27 -05:00
Steven Allen
9326dbc3de
Cleanup cat: open files in for loop header.
2015-01-24 22:52:40 -05:00
Steven Allen
e7f80e9826
Cleanup yes
...
Mostly avoid copying where not needed.
2015-01-24 22:42:16 -05:00
dokaptur
ec4182fcf1
stdbuf - install multicall
2015-01-25 00:39:30 +01:00
dokaptur
b71df2fd78
prepare_libs in Makefile
2015-01-25 00:39:30 +01:00
dokaptur
563c9ab34e
preloading improvement
2015-01-25 00:39:06 +01:00
dokaptur
32259aadda
basic version 1
2015-01-25 00:38:20 +01:00
Heather
6c897dc76c
Merge pull request #504 from ebfe/slice
...
Replace deprecated slice_{to,from} with slicing syntax
2015-01-24 18:47:46 +03:00
Michael Gehring
fbdf04c072
Replace deprecated slice_{to,from} with slicing syntax
2015-01-24 10:46:28 +01:00
Michael Gehring
78408fda78
sort: fix build
2015-01-24 09:50:33 +01:00
Michael Gehring
cb1dd390bb
base64, cp: fix build
2015-01-24 03:56:37 +01:00
Tom Genco
406735e6f2
uname: change trim_left() to trim()
...
Otherwise all options have a space at the end, causing a warning in grml zsh config, and who knows what else.
2015-01-13 15:04:21 -07:00
Haitao Li
a6750e90a7
Implement readlink
...
Fixes #111
2015-01-13 22:21:23 +11:00
Arcterus
41cc268df8
Make dependency info usable for test, sync, true, and false
2015-01-10 13:00:15 -08:00
Michael Gehring
58bd009a9e
Remove unused imports
2015-01-10 20:44:57 +01:00
Michael Gehring
6aef8cc38c
Don't link to regex_macros
2015-01-10 20:44:56 +01:00
Michael Gehring
4d6cbfa393
Disable unstable warnings for now
2015-01-10 20:44:56 +01:00
Arcterus
e142b4f23e
env, expand, fmt: fix build
2015-01-10 20:40:38 +01:00
Michael Gehring
8e430d6952
nl: fix build
2015-01-10 20:40:38 +01:00
Michael Gehring
782fad4667
int/uint -> isize/usize
2015-01-10 20:40:37 +01:00
Michael Gehring
cc854698d7
relpath, tee, split, unexpand: fix build
2015-01-10 20:40:37 +01:00
Michael Gehring
8d889fc5c9
uptime, users, whoami: fix build
2015-01-10 20:40:37 +01:00
Michael Gehring
8cd7295a19
test, tr, tsort: fix build
2015-01-10 20:40:37 +01:00
Michael Gehring
fecd3433cb
id, nice, nohup: fix build
2015-01-10 16:54:45 +01:00
Michael Gehring
f2d49f4bb6
Make uumain return isize everywhere
2015-01-10 14:07:39 +01:00
Michael Gehring
c223e28fac
uniq, wc: fix build
2015-01-10 13:49:40 +01:00
Michael Gehring
7860ef275c
sort, sum tac: fix build
2015-01-10 13:49:18 +01:00
Michael Gehring
5402e69923
mkfifo, paste, shuf: fix build
2015-01-10 13:48:42 +01:00
Michael Gehring
c62bacb9fa
hashsum: fix build
2015-01-10 13:18:15 +01:00
Arcterus
a12fd89cb2
chmod, chroot, comm: fix build
2015-01-09 16:51:51 -08:00
Arcterus
4e0360c495
base64, cat: fix build for Rust alpha
2015-01-09 16:16:05 -08:00
Michael Gehring
b50a2639a9
base64, du, realpath: fix build
2015-01-10 00:13:16 +01:00
Michael Gehring
cb87309e92
cut: fix build
2015-01-09 14:09:12 +01:00
Michael Gehring
0a757b957f
Partially fixed build with rust master
...
String::from_raw_buf removal
Deprecated closure syntax
cmp::Ord -> cmp::Ordering
Vec::from_{elem,fn} removal
rand::TaskRng -> rand::ThreadRng
PtrExt::is_not_null removal
to_c_str removal
2015-01-09 09:41:49 +01:00
Michael Gehring
9aef41b8f6
<< precedence
2015-01-08 14:50:03 +01:00
Michael Gehring
f580275ef8
s/mod/self/ in imports
2015-01-08 14:50:03 +01:00
Michael Gehring
48f129ea49
std::char::UnicodeChar removal
2015-01-08 14:50:03 +01:00
Michael Gehring
b8a96da278
into_string -> to_string
2015-01-08 14:50:03 +01:00
Michael Gehring
fd69e7fa4a
str::from_str removal/changes
2015-01-08 14:50:03 +01:00
Michael Gehring
7d8053561e
Use new array syntax
2015-01-08 14:50:03 +01:00
Michael Gehring
074a58eafd
deriving is now called derive
2015-01-08 14:50:03 +01:00
Michael Gehring
1b381f49fa
Use new macro feature flags/attributes
2015-01-08 14:50:02 +01:00
Timofey Misarenkov
59710d5ff8
NULL-pointer check.
2015-01-08 00:32:30 +03:00
Michal Piekarz
61c2086310
Added verbose for split - prints created file name
2015-01-04 23:33:32 +01:00
Michal Piekarz
93c3f02600
C flag for split
2015-01-04 23:33:32 +01:00
Michal Piekarz
7945e3d51c
Removed deprecated calls.
2015-01-04 23:33:32 +01:00
Michal Piekarz
dbd1d34ba3
Added SIZE multiplier suffixes.
2015-01-04 23:33:32 +01:00
Stephan Jaensch
605c107258
Fix deprecation warnings with latest rust nightly
...
- from_str() -> parse()
- into_string() -> to_owned()
2015-01-01 12:14:28 +01:00
Florian Hahn
aff936da99
Update for recent std::ascii changes
2014-12-30 20:11:06 +01:00
Headless
0f2e20cc49
fix char_len warnings
...
3c60bc02ce/src/libcollections/str.rs (L1101)
2014-12-28 14:09:50 +03:00
Santiago Lapresta
d142168365
Fix deprecation warnings on latest nightlies
2014-12-25 19:55:32 +01:00
Haitao Li
b9e0ce0b1c
Fix build with rustc master
...
* core::slice::Items renamd to core::slice::Iter
* from_utf8 returns Result instead of Option
* Unique type per fn item. Rust Issue #19891
2014-12-24 20:55:32 +11:00
Haitao Li
75425f1fe8
Fix build with rust nightly Dec-20-2014
2014-12-22 12:27:03 +11:00
Haitao Li
8cb5d03d0c
Fix a mismatched types compilation error
2014-12-22 10:54:29 +11:00
Haitao Li
872bb0010a
regex::Captures::{at,name} returns Option
2014-12-22 10:54:29 +11:00
Haitao Li
5cfde0dcb9
Avoid shadowing lifetime names
2014-12-22 10:54:29 +11:00
Haitao Li
9b67c372b2
Add semicolons to item macros
2014-12-22 10:54:29 +11:00
Haitao Li
0a64dbfe8b
Bump rust-crypto to v0.2.2
2014-12-22 10:54:26 +11:00
Arcterus
9ef8ea486b
Implement nice ( resolves #215 )
2014-12-15 21:00:16 -08:00
Arcterus
b8d67ea672
Update for latest Rust
2014-12-15 15:45:31 -08:00
Michael Gehring
842cc8b14c
Fix build with rust master
2014-12-11 07:51:37 +01:00
Cynede
9aec1611df
Merge pull request #466 from Arcterus/master
...
base64: fix build (assuming rust-lang/rust#19594 is merged)
2014-12-10 08:19:20 +03:00
Arcterus
798a873b59
Fix build for latest Rust
2014-12-08 23:45:03 -08:00
Arcterus
3f90b75ffc
base64: don't try to remove LF when decoding
2014-12-06 16:35:32 -08:00
Arcterus
9b638d99a7
base64: fix build (assuming rust-lang/rust#19594 is merged)
2014-12-06 10:59:56 -08:00
Arcterus
75b992feac
nohup: fix build on Macs ( closes #463 )
2014-12-05 16:32:45 -08:00
Arcterus
1c2b7fc160
tail: rewrite tail_bytes and tail_lines as one macro
2014-12-03 11:06:53 -08:00
Arcterus
db48d109e7
Use -O instead of --opt-level 3 ( closes #194 )
2014-12-03 10:13:10 -08:00
Arcterus
68fd0971d0
Fix build for latest Rust
2014-12-02 21:29:53 -08:00
Alex Lyon
23a4bc2d08
Merge pull request #454 from wikol/master
...
tail: added size suffixes handling
2014-12-02 20:45:28 -08:00
Wiktor Kuropatwa
0611a22cc2
tail: added size suffixes handling
2014-12-01 11:55:39 +01:00
Arcterus
f628e70d4a
tr: improve speed slightly
2014-11-30 20:03:44 -08:00
skv
388f6e3cf8
fix 32-bit kernel uptime error
...
error: mismatched types: expected `i64`, found `i32` (expected i64,
found i32)
2014-11-30 16:20:18 +03:00
Arcterus
31111ac199
Fix most deprecation warnings and remove hacky nohup code
2014-11-28 14:49:22 -08:00
dokaptur
e149be492d
tail: print bytes as char instead of u8
2014-11-25 19:13:21 +01:00
Arcterus
9a281adc1e
wc: boost speed to be nearly as fast as GNU
2014-11-23 21:57:33 -08:00
Arcterus
9b068aafee
sort: implement --reverse
2014-11-22 13:41:57 -08:00
Arcterus
ca82145f95
seq: allow inputs to have a unary plus
2014-11-22 13:20:23 -08:00
Arcterus
d47a174954
fold: actually print out empty lines
2014-11-22 13:18:14 -08:00
Arcterus
d50d4f54b9
Fix build as well as most deprecation warnings
2014-11-22 13:00:42 -08:00
Michael Gehring
2027a7a981
fix *write*! macro args
2014-11-22 07:30:18 +01:00
Michael Gehring
ab344d8e7c
remove references to the native crate
2014-11-22 07:30:18 +01:00
Michael Gehring
cb4b5bce29
Remove now invalid format specifiers
2014-11-22 07:30:18 +01:00
Michael Gehring
92093644bb
chmod: fix build on freebsd
2014-11-20 20:36:50 +01:00
Michael Gehring
e874d09216
std:num::pow -> std::num::Int::pow
2014-11-19 21:58:16 +01:00
Michael Gehring
fd2b464a6d
std::os changes
2014-11-19 21:58:16 +01:00
Michael Gehring
09f223fdb1
Update for new coercion rules
2014-11-19 21:58:16 +01:00
Michael Gehring
cd409c6d3f
Update for namespaced enums
2014-11-19 21:58:16 +01:00
skv
737db500a3
update from string for new api
2014-11-17 17:56:00 +03:00
Michael Gehring
d675ec75af
du, fmt: fix build
2014-11-16 16:12:01 +01:00
Arcterus
fc76684f08
nohup: fix for latest Rust using terrible hacks
2014-11-12 11:03:07 -08:00
Arcterus
a672f5c768
chmod: update for latest Rust
2014-11-10 20:11:48 -08:00
Michael Gehring
00af7faee8
du: fix build
2014-11-09 16:30:05 +01:00
Michael Gehring
f3fc1b72ff
os::errno returns uint now
2014-11-09 16:30:01 +01:00
Michael Gehring
e7b247de0b
Fix deprecation warnings
2014-11-08 07:45:33 +01:00
Michael Gehring
bb69e46def
basename: fix build
2014-11-07 12:10:33 +01:00
Michael Gehring
47d4b69c8a
std::num::parse_bytes has been removed
2014-11-05 12:18:43 +01:00
Michael Gehring
241c8d0f55
Update collection paths/names
2014-11-04 07:30:39 +01:00
Michael Gehring
51d84b85cb
shuf: fix build
...
It's no longer possible to have a Box<rand::Rng> due to the new object
safety rules. Wrap in an enum as a workaround.
2014-11-03 19:59:23 +01:00
Michael Gehring
f141f8b043
comm: fix build
...
It's no longer possible to have a Box<Buffer> due to the new object
safety rules. Wrap in an enum as a workaround.
Fixes #437
2014-11-03 18:07:14 +01:00
Michael Gehring
71c9797bd7
Fix get_mut deprecation warnings
2014-11-02 17:10:35 +01:00
Michael Gehring
476bdcd9d2
head, tail, uutils: fix build
2014-11-02 16:56:00 +01:00
Alex Lyon
03f26845d7
Merge pull request #432 from awestroke/more_mv_test_cases
...
More mv tests and use cases
2014-10-31 01:30:54 -07:00
Michael Gehring
3244416b19
fail! -> panic!
2014-10-30 10:06:47 +01:00
Orvar Segerström
019abb993e
More mv tests and use cases
2014-10-30 08:47:26 +01:00
Alex Lyon
3ee7627c6c
Merge pull request #427 from awestroke/feature_mv
...
MV implementation
2014-10-26 13:27:10 -07:00
Orvar Segerström
beba02757e
MV implementation
...
Support for all commandline options except one, see src/mv/mv.rs
Many tests, included a todo list of more tests too, see tests/mv.rs
2014-10-26 11:27:28 +01:00
Heather
e3873904a9
Merge pull request #430 from Arcterus/nproc
...
nproc: support --all and --ignore and respect OMP_NUM_THREADS
2014-10-26 09:22:19 +04:00
Heather
b02f9a9671
Merge pull request #428 from Arcterus/chmod
...
Implement most of chmod
2014-10-26 09:21:20 +04:00
Arcterus
58f158de97
nproc: support --all and --ignore and respect OMP_NUM_THREADS
2014-10-25 22:10:47 -07:00
Heather
2ad86775d8
Merge pull request #429 from Arcterus/fix-master
...
cut: fix deprecation warnings
2014-10-26 07:47:00 +03:00
Arcterus
894daea5c1
cut: fix deprecation warnings
2014-10-25 21:28:24 -07:00
Arcterus
7abc6c007a
Implement most of chmod
2014-10-25 20:32:40 -07:00
Michael Gehring
09af3ecaa2
add nproc
2014-10-25 17:33:09 +02:00
Michael Gehring
3ecf41cffe
Drop BigInt support from test
2014-10-21 14:13:44 +02:00
Michael Gehring
5051a231dc
uniq: fix build
2014-10-21 13:39:36 +02:00
Michael Gehring
f771d5dbc3
tee: fix build
2014-10-21 13:36:10 +02:00
Arcterus
053bad9a25
Get rid of warnings
2014-10-19 11:54:17 -07:00
Alex Lyon
ea5d67f8dc
Merge pull request #420 from skv-headless/move_util
...
move utility
2014-10-19 11:50:15 -07:00
skv
9f20647984
move_util
2014-10-19 22:41:11 +04:00
Michael Yin
bde6d8d643
basic byte and numeric sort
...
tests for numeric sort
2014-10-18 18:33:18 -04:00
Arcterus
88ad6710f5
test: fix -a and -o by using operator precedence
2014-10-17 17:08:18 -07:00
Michael Gehring
ff8275a3cc
uniq: crate_id -> crate_name
2014-10-11 18:02:51 +02:00
Michael Gehring
e482abb630
static -> const
2014-10-10 18:36:35 +02:00
Michael Gehring
861baaf584
'final' is a keyword now
2014-10-10 18:36:15 +02:00
Arcterus
0e4e8f14d6
Make test pass all of the Busybox tests
2014-10-06 22:16:07 -07:00
ssirai
681022a2ca
Change tab to spaces
2014-10-05 10:09:52 +09:00
Michael Gehring
7eefe7003b
Update to the new cfg syntax
2014-10-02 19:55:06 +02:00
NODA, Kai
c41250f69e
cat: range pattern now should use three dots.
2014-10-02 22:42:30 +08:00
Arcterus
8ede3fa0dc
Pass the Busybox's Unicode test for fold
2014-09-28 22:51:24 -07:00
Arcterus
573ca2931b
Fix fold for Busybox tests (other than unicode)
2014-09-28 18:12:47 -07:00
Arcterus
ba0177c824
Allow test to be checked by the Busybox test suite
2014-09-27 20:17:34 -07:00
Arcterus
afabebe432
Fix wc output for bytes
2014-09-27 15:24:10 -07:00
Michael Gehring
5af66af015
Fix deprecation warnings
2014-09-27 21:05:36 +02:00
Arcterus
d17d388e2b
Modify tail to pass some Busybox tests
2014-09-25 23:16:58 -07:00
Michael Gehring
d159acff2e
Fix typo (and macos build?)
2014-09-25 09:45:49 +02:00
Heather
e3b8754919
update deprecated parts of sync
2014-09-24 09:28:31 +04:00
Heather
4e1aab25c3
update whoami syntax for windows
2014-09-24 08:58:54 +04:00
Michael Gehring
4618aa99bc
id: add missing repr(C)
2014-09-24 00:42:25 +02:00
Michael Gehring
1dc57eb329
Fix deprecation warnings
2014-09-24 00:41:15 +02:00
Michael Gehring
029293ad0e
fmt: fix build
2014-09-23 19:56:06 +02:00
Michael Gehring
78c6d0b383
FreeBSD support
2014-09-23 15:40:31 +02:00
Heather
421ad316b5
Merge pull request #393 from ebfe/rfc-52
...
Update for rust RFC 52 changes
2014-09-18 02:23:35 +04:00
Michael Gehring
2ef74e2783
Update for rust RFC 52 changes
2014-09-17 17:16:21 +02:00
Arcterus
01c2a0b9ff
Remove all warnings (at least on Linux)
2014-09-16 20:08:40 -07:00
Arcterus
01c681ecb3
Update for latest Rust
2014-09-16 19:10:27 -07:00
Michael Gehring
6b9831a091
Update for rust master
2014-09-16 16:59:00 +02:00
Michael Gehring
f9e99c0c26
Fix non_snake_case warnings
2014-09-02 09:49:39 +02:00
Michael Gehring
1c8e9161cc
Add explicit lifetimes
2014-08-31 20:01:41 +02:00
Michael Gehring
cdacaaa648
time::Duration::{milli}seconds now takes i64 arg
2014-08-31 19:45:03 +02:00
Heather
056175c0af
Merge pull request #384 from ebfe/repr_c
...
Add repr(C) to c structs
2014-08-22 14:48:18 +04:00
Michael Gehring
1134e8b9c9
Update for new import syntax
2014-08-22 12:22:31 +02:00
Michael Gehring
83974be06f
Add repr(C) to c structs
2014-08-22 12:21:30 +02:00
Xander Masotto
4414d95b6b
Fix sync and whoami on windows.
2014-08-18 07:29:48 +01:00
Michael Gehring
81264a5d6a
Fix build with rust master
2014-08-17 10:27:22 +02:00
Ivan Ukhov
dd1f0df69f
Replace deprecated from_c_str with from_buf in id
2014-08-09 06:55:12 +02:00
Heather
b65719638d
Merge pull request #377 from Arcterus/fix-pipe_writeln
...
common/util: make pipe_writeln! use writeln! instead of write!
2014-08-05 08:18:52 +04:00
Arcterus
7e00000098
common/util: make pipe_writeln! use writeln! instead of write!
2014-08-04 20:17:10 -07:00
polyphemus
2a238e3c0f
Get rid of unsafe indexing
...
Unsafe indexing is replaced by ImmutableEqVector::position_elem() and a
few branches have been eliminated.
The performance is about the same as for unsafe indexing.
2014-07-31 22:43:31 +02:00
Michael Gehring
ac77c6da17
Fix deprecation warnings
2014-07-29 08:52:58 +02:00
Virgile Andreani
49a733a864
Implement unexpand
2014-07-28 19:36:33 +02:00
Virgile Andreani
69cb8da6ed
Implement expand
2014-07-26 12:57:26 +02:00
Arcterus
e80af55700
Fix more bugs to pass Busybox tests
2014-07-24 22:20:03 -07:00
Arcterus
a38ee8a007
Implement timeout ( resolves #364 )
2014-07-21 18:55:52 -07:00
Arcterus
439a8cadd1
Move tests out of src and into test
2014-07-21 14:44:30 -07:00
Arcterus
b7f4bd01bc
Move all of the utils into src
2014-07-20 20:20:55 -07:00