1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #1053 from millerjs/pin-dependencies

pin dependencies
This commit is contained in:
Alex Lyon 2017-07-15 19:19:02 -07:00 committed by GitHub
commit f331412ab0
86 changed files with 466 additions and 368 deletions

445
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -238,17 +238,17 @@ whoami = { optional=true, path="src/whoami" }
yes = { optional=true, path="src/yes" } yes = { optional=true, path="src/yes" }
[dev-dependencies] [dev-dependencies]
time = "*" time = "0.1.38"
filetime = "*" filetime = "0.1.10"
libc = "*" libc = "0.2.26"
regex="*" regex = "0.1.80"
rand="*" rand = "0.3.15"
tempdir="*" tempdir = "0.3.5"
unindent="*" unindent = "0.1.0"
lazy_static = "*" lazy_static = "0.2.2"
[target.'cfg(unix)'.dev-dependencies] [target.'cfg(unix)'.dev-dependencies]
unix_socket = "*" unix_socket = "0.5.0"
[[bin]] [[bin]]
name = "uutils" name = "uutils"

View file

@ -11,7 +11,7 @@ path = "base32.rs"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[dependencies.clippy] [dependencies.clippy]
version = "*" version = "0.0.143"
optional = true optional = true
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_chgrp"
path = "chgrp.rs" path = "chgrp.rs"
[dependencies] [dependencies]
walkdir = "*" walkdir = "1.0.7"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,9 +8,9 @@ name = "uu_chmod"
path = "chmod.rs" path = "chmod.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
walker = "*" walker = "1.0.0"
[[bin]] [[bin]]
name = "chmod" name = "chmod"

View file

@ -8,7 +8,7 @@ name = "uu_chown"
path = "chown.rs" path = "chown.rs"
[dependencies] [dependencies]
glob = "*" glob = "0.2.11"
walkdir = "0.1" walkdir = "0.1"
[dependencies.uucore] [dependencies.uucore]
@ -17,7 +17,7 @@ default-features = false
features = ["entries", "fs"] features = ["entries", "fs"]
[dependencies.clippy] [dependencies.clippy]
version = "*" version = "0.0.143"
optional = true optional = true
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_chroot"
path = "chroot.rs" path = "chroot.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,7 +8,7 @@ name = "uu_cksum"
path = "cksum.rs" path = "cksum.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_comm"
path = "comm.rs" path = "comm.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,10 +8,10 @@ name = "uu_cp"
path = "cp.rs" path = "cp.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
walkdir = "*" walkdir = "1.0.7"
[[bin]] [[bin]]
name = "cp" name = "cp"

View file

@ -8,8 +8,8 @@ name = "uu_date"
path = "date.rs" path = "date.rs"
[dependencies] [dependencies]
chrono = "*" chrono = "0.3.0"
clap = "*" clap = "2.24.1"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -1,4 +1,4 @@
extern crate uu_echo; extern crate uu_date;
fn main() { fn main() {
std::process::exit(uu_date::uumain(std::env::args().collect())); std::process::exit(uu_date::uumain(std::env::args().collect()));

View file

@ -8,7 +8,7 @@ name = "uu_dircolors"
path = "dircolors.rs" path = "dircolors.rs"
[dependencies] [dependencies]
glob = "*" glob = "0.2.11"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_dirname"
path = "dirname.rs" path = "dirname.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_du"
path = "du.rs" path = "du.rs"
[dependencies] [dependencies]
time = "*" time = "0.1.38"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

2
src/env/Cargo.toml vendored
View file

@ -8,7 +8,7 @@ name = "uu_env"
path = "env.rs" path = "env.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_expand"
path = "expand.rs" path = "expand.rs"
[dependencies] [dependencies]
unicode-width = "*" unicode-width = "0.1.4"
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_expr"
path = "expr.rs" path = "expr.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_factor"
path = "factor.rs" path = "factor.rs"
[dependencies] [dependencies]
rand = "*" rand = "0.3.15"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_fmt"
path = "fmt.rs" path = "fmt.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
unicode-width = "*" unicode-width = "0.1.4"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,12 +8,12 @@ name = "uu_hashsum"
path = "hashsum.rs" path = "hashsum.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
regex = "*" regex = "0.1.80"
regex-syntax = "*" regex-syntax = "0.4.1"
rust-crypto = "*" rust-crypto = "0.2.36"
rustc-serialize = "*" rustc-serialize = "0.3.24"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_head"
path = "head.rs" path = "head.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_hostid"
path = "hostid.rs" path = "hostid.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_hostname"
path = "hostname.rs" path = "hostname.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,12 +8,12 @@ name = "uu_install"
path = "install.rs" path = "install.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = ">= 0.2" libc = ">= 0.2"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[dev-dependencies] [dev-dependencies]
time = "*" time = "0.1.38"
[[bin]] [[bin]]
name = "install" name = "install"

View file

@ -8,7 +8,7 @@ name = "uu_kill"
path = "kill.rs" path = "kill.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_link"
path = "link.rs" path = "link.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_ln"
path = "ln.rs" path = "ln.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_logname"
path = "logname.rs" path = "logname.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,13 +8,13 @@ name = "uu_ls"
path = "ls.rs" path = "ls.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
pretty-bytes = "*" pretty-bytes = "0.2.1"
term_grid = "*" term_grid = "0.1.5"
termsize = "*" termsize = "0.1.4"
time = "*" time = "0.1.38"
lazy_static = "*" lazy_static = "0.2.8"
unicode-width = "*" unicode-width = "0.1.4"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,8 +8,8 @@ name = "uu_mkdir"
path = "mkdir.rs" path = "mkdir.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_mkfifo"
path = "mkfifo.rs" path = "mkfifo.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_mknod"
path = "mknod.rs" path = "mknod.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "^0.2.4" libc = "^0.2.4"
uucore = { path="../uucore" } uucore = { path="../uucore" }

View file

@ -9,9 +9,9 @@ path = "mktemp.rs"
[dependencies] [dependencies]
uucore = { path="../uucore" } uucore = { path="../uucore" }
getopts = "*" getopts = "0.2.14"
rand = "0.3" rand = "0.3"
tempfile = "*" tempfile = "2.1.5"
[[bin]] [[bin]]
name = "mktemp" name = "mktemp"

View file

@ -8,11 +8,11 @@ name = "uu_more"
path = "more.rs" path = "more.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies] [target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
nix = "*" nix = "0.8.1"
[[bin]] [[bin]]
name = "more" name = "more"

View file

@ -8,7 +8,7 @@ name = "uu_mv"
path = "mv.rs" path = "mv.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_nice"
path = "nice.rs" path = "nice.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,12 +8,12 @@ name = "uu_nl"
path = "nl.rs" path = "nl.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
aho-corasick = "*" aho-corasick = "0.6.3"
memchr = "*" memchr = "1.0.1"
regex = "*" regex = "0.2.2"
regex-syntax = "*" regex-syntax = "0.4.1"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_nohup"
path = "nohup.rs" path = "nohup.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_nproc"
path = "nproc.rs" path = "nproc.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
num_cpus = "1.5" num_cpus = "1.5"
uucore = { path="../uucore" } uucore = { path="../uucore" }

View file

@ -8,10 +8,10 @@ name = "uu_od"
path = "od.rs" path = "od.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
byteorder = "*" byteorder = "1.1.0"
half = "*" half = "1.0.0"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_paste"
path = "paste.rs" path = "paste.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_pathchk"
path = "pathchk.rs" path = "pathchk.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_printenv"
path = "printenv.rs" path = "printenv.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_printf"
path = "printf.rs" path = "printf.rs"
[dependencies] [dependencies]
"itertools" = "*" "itertools" = "0.6.0"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -3,13 +3,12 @@
#![allow(dead_code)] #![allow(dead_code)]
extern crate itertools; extern crate itertools;
extern crate uucore;
mod cli; mod cli;
mod memo; mod memo;
mod tokenize; mod tokenize;
#[macro_use]
extern crate uucore;
static NAME: &'static str = "printf"; static NAME: &'static str = "printf";
static VERSION: &'static str = "0.0.1"; static VERSION: &'static str = "0.0.1";
@ -39,12 +38,12 @@ static LONGHELP_BODY: &'static str = "
ESCAPE SEQUENCES ESCAPE SEQUENCES
The following escape sequences, organized here in alphabetical order, The following escape sequences, organized here in alphabetical order,
will print the corresponding character literal: will print the corresponding character literal:
\" double quote \" double quote
\\\\ backslash \\\\ backslash
\\a alert (BEL) \\a alert (BEL)
\\b backspace \\b backspace
@ -64,7 +63,7 @@ static LONGHELP_BODY: &'static str = "
\\v vertical tab \\v vertical tab
\\NNN byte with value expressed in octal value NNN (1 to 3 digits) \\NNN byte with value expressed in octal value NNN (1 to 3 digits)
values greater than 256 will be treated values greater than 256 will be treated
\\xHH byte with value expressed in hexadecimal value NN (1 to 2 digits) \\xHH byte with value expressed in hexadecimal value NN (1 to 2 digits)
@ -80,14 +79,14 @@ static LONGHELP_BODY: &'static str = "
Fields Fields
%s - string %s - string
%b - string parsed for literals %b - string parsed for literals
second parameter is max length second parameter is max length
%c - char %c - char
no second parameter no second parameter
%i or %d - 64-bit integer %i or %d - 64-bit integer
%u - 64 bit unsigned integer %u - 64 bit unsigned integer
%x or %X - 64-bit unsigned integer as hex %x or %X - 64-bit unsigned integer as hex
%o - 64-bit unsigned integer as octal %o - 64-bit unsigned integer as octal
@ -97,7 +96,7 @@ static LONGHELP_BODY: &'static str = "
%f or %F - decimal floating point value %f or %F - decimal floating point value
%e or %E - scientific notation floating point value %e or %E - scientific notation floating point value
%g or %G - shorter of specially interpreted decimal or SciNote floating point value. %g or %G - shorter of specially interpreted decimal or SciNote floating point value.
second parameter is second parameter is
-max places after decimal point for floating point output -max places after decimal point for floating point output
-max number of significant digits for scientific notation output -max number of significant digits for scientific notation output
@ -108,7 +107,7 @@ static LONGHELP_BODY: &'static str = "
printf '%4.3i' 7 printf '%4.3i' 7
has a first parameter of 4 has a first parameter of 4
and a second parameter of 3 and a second parameter of 3
will result in ' 007' will result in ' 007'
printf '%.1s' abcde printf '%.1s' abcde
has no first parameter has no first parameter
@ -121,7 +120,7 @@ static LONGHELP_BODY: &'static str = "
will result in ' q' will result in ' q'
The first parameter of a field is the minimum width to pad the output to The first parameter of a field is the minimum width to pad the output to
if the output is less than this absolute value of this width, if the output is less than this absolute value of this width,
it will be padded with leading spaces, or, if the argument is negative, it will be padded with leading spaces, or, if the argument is negative,
with trailing spaces. the default is zero. with trailing spaces. the default is zero.
@ -132,7 +131,7 @@ static LONGHELP_BODY: &'static str = "
0 (e.g. 010) - interpret argument as octal (integer output fields only) 0 (e.g. 010) - interpret argument as octal (integer output fields only)
0x (e.g. 0xABC) - interpret argument as hex (numeric output fields only) 0x (e.g. 0xABC) - interpret argument as hex (numeric output fields only)
\' (e.g. \'a) - interpret argument as a character constant \' (e.g. \'a) - interpret argument as a character constant
HOW TO USE SUBSTITUTIONS HOW TO USE SUBSTITUTIONS
Substitutions are used to pass additional argument(s) into the FORMAT string, to be formatted a Substitutions are used to pass additional argument(s) into the FORMAT string, to be formatted a
@ -140,14 +139,14 @@ static LONGHELP_BODY: &'static str = "
printf 'the letter %X comes before the letter %X' 10 11 printf 'the letter %X comes before the letter %X' 10 11
will print will print
'the letter A comes before the letter B' 'the letter A comes before the letter B'
because the substitution field %X means because the substitution field %X means
'take an integer argument and write it as a hexadecimal number' 'take an integer argument and write it as a hexadecimal number'
Passing more arguments than are in the format string will cause the format string to be Passing more arguments than are in the format string will cause the format string to be
repeated for the remaining substitutions repeated for the remaining substitutions
printf 'it is %i F in %s \n' 22 Portland 25 Boston 27 New York printf 'it is %i F in %s \n' 22 Portland 25 Boston 27 New York
@ -160,18 +159,18 @@ static LONGHELP_BODY: &'static str = "
' '
If a format string is printed but there are less arguments remaining If a format string is printed but there are less arguments remaining
than there are substitution fields, substitution fields without than there are substitution fields, substitution fields without
an argument will default to empty strings, or for numeric fields an argument will default to empty strings, or for numeric fields
the value 0 the value 0
AVAILABLE SUBSTITUTIONS AVAILABLE SUBSTITUTIONS
This program, like GNU coreutils printf, This program, like GNU coreutils printf,
interprets a modified subset of the POSIX C printf spec, interprets a modified subset of the POSIX C printf spec,
a quick reference to substitutions is below. a quick reference to substitutions is below.
STRING SUBSTITUTIONS STRING SUBSTITUTIONS
All string fields have a 'max width' parameter All string fields have a 'max width' parameter
%.3s means 'print no more than three characters of the original input' %.3s means 'print no more than three characters of the original input'
%s - string %s - string
@ -193,7 +192,7 @@ static LONGHELP_BODY: &'static str = "
%.4i means an integer which if it is less than 4 digits in length, %.4i means an integer which if it is less than 4 digits in length,
is padded with leading zeros until it is 4 digits in length. is padded with leading zeros until it is 4 digits in length.
%d or %i - 64-bit integer %d or %i - 64-bit integer
%u - 64 bit unsigned integer %u - 64 bit unsigned integer
@ -202,7 +201,7 @@ static LONGHELP_BODY: &'static str = "
%o - 64 bit unsigned integer printed in octal (base 8) %o - 64 bit unsigned integer printed in octal (base 8)
FLOATING POINT SUBSTITUTIONS FLOATING POINT SUBSTITUTIONS
All floating point fields have a 'max decimal places / max significant digits' parameter All floating point fields have a 'max decimal places / max significant digits' parameter
%.10f means a decimal floating point with 7 decimal places past 0 %.10f means a decimal floating point with 7 decimal places past 0
@ -212,7 +211,7 @@ static LONGHELP_BODY: &'static str = "
Like with GNU coreutils, the value after the decimal point is these outputs is parsed as a double first before being rendered to text. For both implementations do not expect meaningful precision past the 18th decimal place. When using a number of decimal places that is 18 or higher, you can expect variation in output between GNU coreutils printf and this printf at the 18th decimal place of +/- 1 Like with GNU coreutils, the value after the decimal point is these outputs is parsed as a double first before being rendered to text. For both implementations do not expect meaningful precision past the 18th decimal place. When using a number of decimal places that is 18 or higher, you can expect variation in output between GNU coreutils printf and this printf at the 18th decimal place of +/- 1
%f - floating point value presented in decimal, truncated and displayed to 6 decimal places by default. %f - floating point value presented in decimal, truncated and displayed to 6 decimal places by default.
There is not past-double behavior parity with Coreutils printf, values are not estimated or adjusted beyond input values. There is not past-double behavior parity with Coreutils printf, values are not estimated or adjusted beyond input values.
%e or %E - floating point value presented in scientific notation %e or %E - floating point value presented in scientific notation
7 significant digits by default 7 significant digits by default
@ -225,9 +224,9 @@ static LONGHELP_BODY: &'static str = "
Sci Note has 6 significant digits by default Sci Note has 6 significant digits by default
Trailing zeroes are removed Trailing zeroes are removed
Instead of being truncated, digit after last is rounded Instead of being truncated, digit after last is rounded
Like other behavior in this utility, the design choices of floating point Like other behavior in this utility, the design choices of floating point
behavior in this utility is selected to reproduce in exact behavior in this utility is selected to reproduce in exact
the behavior of GNU coreutils' printf from an inputs and outputs standpoint. the behavior of GNU coreutils' printf from an inputs and outputs standpoint.
USING PARAMETERS USING PARAMETERS
@ -239,8 +238,8 @@ static LONGHELP_BODY: &'static str = "
leading spaces leading spaces
The 2nd parameter is proceeded by a dot. The 2nd parameter is proceeded by a dot.
You do not have to use parameters You do not have to use parameters
SPECIAL FORMS OF INPUT SPECIAL FORMS OF INPUT
For numeric input, the following additional forms of input are accepted besides decimal: For numeric input, the following additional forms of input are accepted besides decimal:
Octal (only with integer): if the argument begins with a 0 the proceeding characters Octal (only with integer): if the argument begins with a 0 the proceeding characters
@ -255,13 +254,13 @@ static LONGHELP_BODY: &'static str = "
of the next character will be interpreted as an 8-bit unsigned integer. If there are of the next character will be interpreted as an 8-bit unsigned integer. If there are
additional bytes, they will throw an error (unless the environment variable POSIXLY_CORRECt is set) additional bytes, they will throw an error (unless the environment variable POSIXLY_CORRECt is set)
WRITTEN BY : WRITTEN BY :
Nathan E. Ross, et al. for the uutils project Nathan E. Ross, et al. for the uutils project
MORE INFO : MORE INFO :
https://github.com/uutils/coreutils https://github.com/uutils/coreutils
COPYRIGHT : COPYRIGHT :
Copyright 2015 uutils project. Copyright 2015 uutils project.
Licensed under the MIT License, please see LICENSE file for details Licensed under the MIT License, please see LICENSE file for details
@ -279,7 +278,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
if formatstr == "--help" { if formatstr == "--help" {
print!("{} {}", LONGHELP_LEAD, LONGHELP_BODY); print!("{} {}", LONGHELP_LEAD, LONGHELP_BODY);
} else if formatstr == "--version" { } else if formatstr == "--version" {
println!("{} {}", NAME, VERSION); println!("{} {}", NAME, VERSION);
} else { } else {
let printf_args = &args[2..]; let printf_args = &args[2..];
memo::Memo::run_all(formatstr, printf_args); memo::Memo::run_all(formatstr, printf_args);

View file

@ -8,12 +8,12 @@ name = "uu_ptx"
path = "ptx.rs" path = "ptx.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
aho-corasick = "*" aho-corasick = "0.6.3"
memchr = "*" memchr = "1.0.1"
regex-syntax = "*" regex-syntax = "0.4.1"
regex = "*" regex = "0.1.80"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_pwd"
path = "pwd.rs" path = "pwd.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_readlink"
path = "readlink.rs" path = "readlink.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_realpath"
path = "realpath.rs" path = "realpath.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_relpath"
path = "relpath.rs" path = "relpath.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_rm"
path = "rm.rs" path = "rm.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_rmdir"
path = "rmdir.rs" path = "rmdir.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_seq"
path = "seq.rs" path = "seq.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -9,10 +9,10 @@ path = "shred.rs"
[dependencies] [dependencies]
rand = "0.3" rand = "0.3"
filetime = "*" filetime = "0.1.10"
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
time = "*" time = "0.1.38"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_shuf"
path = "shuf.rs" path = "shuf.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
rand = "*" rand = "0.3.15"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_sleep"
path = "sleep.rs" path = "sleep.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,9 +8,9 @@ name = "uu_sort"
path = "sort.rs" path = "sort.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
semver = "*" semver = "0.7.0"
itertools = "*" itertools = "0.6.0"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -16,7 +16,6 @@ extern crate semver;
#[macro_use] #[macro_use]
extern crate uucore; extern crate uucore;
#[macro_use]
extern crate itertools; extern crate itertools;
use std::cmp::Ordering; use std::cmp::Ordering;

View file

@ -8,7 +8,7 @@ name = "uu_split"
path = "split.rs" path = "split.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_stat"
path = "stat.rs" path = "stat.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
time = "*" time = "0.1.38"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,7 +8,7 @@ name = "uu_stdbuf"
path = "stdbuf.rs" path = "stdbuf.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_sum"
path = "sum.rs" path = "sum.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,10 +8,10 @@ name = "uu_sync"
path = "sync.rs" path = "sync.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
winapi = "*" winapi = "0.2.8"
kernel32-sys = "*" kernel32-sys = "0.2.2"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -14,9 +14,13 @@
extern crate getopts; extern crate getopts;
extern crate libc; extern crate libc;
#[cfg(windows)]
#[macro_use] #[macro_use]
extern crate uucore; extern crate uucore;
#[cfg(not(windows))]
extern crate uucore;
static NAME: &'static str = "sync"; static NAME: &'static str = "sync";
static VERSION: &'static str = env!("CARGO_PKG_VERSION"); static VERSION: &'static str = env!("CARGO_PKG_VERSION");

View file

@ -8,7 +8,7 @@ name = "uu_tac"
path = "tac.rs" path = "tac.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,10 +8,10 @@ name = "uu_tail"
path = "tail.rs" path = "tail.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
kernel32-sys = "*" kernel32-sys = "0.2.2"
libc = "*" libc = "0.2.26"
winapi = "*" winapi = "0.2.8"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_tee"
path = "tee.rs" path = "tee.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_test"
path = "test.rs" path = "test.rs"
[dependencies] [dependencies]
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,9 +8,9 @@ name = "uu_timeout"
path = "timeout.rs" path = "timeout.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
time = "*" time = "0.1.38"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,9 +8,9 @@ name = "uu_touch"
path = "touch.rs" path = "touch.rs"
[dependencies] [dependencies]
filetime = "*" filetime = "0.1.10"
getopts = "*" getopts = "0.2.14"
time = "*" time = "0.1.38"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,9 +8,9 @@ name = "uu_tr"
path = "tr.rs" path = "tr.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
bit-set = "*" bit-set = "0.4.0"
fnv = "*" fnv = "1.0.5"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,7 +8,7 @@ name = "uu_truncate"
path = "truncate.rs" path = "truncate.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_tsort"
path = "tsort.rs" path = "tsort.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_tty"
path = "tty.rs" path = "tty.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,8 +8,8 @@ name = "uu_unexpand"
path = "unexpand.rs" path = "unexpand.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
unicode-width = "*" unicode-width = "0.1.4"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_uniq"
path = "uniq.rs" path = "uniq.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
[dependencies.uucore] [dependencies.uucore]
path="../uucore" path="../uucore"

View file

@ -8,8 +8,8 @@ name = "uu_unlink"
path = "unlink.rs" path = "unlink.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
libc = "*" libc = "0.2.26"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -8,7 +8,7 @@ name = "uu_uptime"
path = "uptime.rs" path = "uptime.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,7 +8,7 @@ name = "uu_users"
path = "users.rs" path = "users.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
[dependencies.uucore] [dependencies.uucore]
default-features = false default-features = false

View file

@ -16,9 +16,8 @@
#![allow(dead_code)] #![allow(dead_code)]
extern crate getopts; extern crate getopts;
#[macro_use]
extern crate uucore; extern crate uucore;
use uucore::utmpx::*; use uucore::utmpx::*;
use getopts::Options; use getopts::Options;

View file

@ -4,8 +4,8 @@ version = "0.0.1"
authors = [] authors = []
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
time = { version = "*", optional = true } time = { version = "0.1.38", optional = true }
data-encoding = { version = "^1.1", optional = true } data-encoding = { version = "^1.1", optional = true }
[dependencies.libc] [dependencies.libc]

View file

@ -8,7 +8,7 @@ name = "uu_wc"
path = "wc.rs" path = "wc.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]

View file

@ -13,7 +13,7 @@ default-features = false
features = ["utmpx"] features = ["utmpx"]
[dependencies.clippy] [dependencies.clippy]
version = "*" version = "0.0.143"
optional = true optional = true
[[bin]] [[bin]]

View file

@ -8,9 +8,9 @@ name = "uu_whoami"
path = "whoami.rs" path = "whoami.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
winapi = "*" winapi = "0.2.8"
advapi32-sys = "*" advapi32-sys = "0.2.0"
[dependencies.uucore] [dependencies.uucore]
path = "../uucore" path = "../uucore"

View file

@ -8,7 +8,7 @@ name = "uu_yes"
path = "yes.rs" path = "yes.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "0.2.14"
uucore = { path="../uucore" } uucore = { path="../uucore" }
[[bin]] [[bin]]