mirror of
https://github.com/uutils/coreutils
synced 2024-07-22 10:24:54 +00:00
pin dependencies
This commit is contained in:
parent
7ef27acb05
commit
e8073d2596
445
Cargo.lock
generated
445
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
18
Cargo.toml
18
Cargo.toml
|
@ -238,17 +238,17 @@ whoami = { optional=true, path="src/whoami" }
|
|||
yes = { optional=true, path="src/yes" }
|
||||
|
||||
[dev-dependencies]
|
||||
time = "*"
|
||||
filetime = "*"
|
||||
libc = "*"
|
||||
regex="*"
|
||||
rand="*"
|
||||
tempdir="*"
|
||||
unindent="*"
|
||||
lazy_static = "*"
|
||||
time = "0.1.38"
|
||||
filetime = "0.1.10"
|
||||
libc = "0.2.26"
|
||||
regex = "0.1.80"
|
||||
rand = "0.3.15"
|
||||
tempdir = "0.3.5"
|
||||
unindent = "0.1.0"
|
||||
lazy_static = "0.2.2"
|
||||
|
||||
[target.'cfg(unix)'.dev-dependencies]
|
||||
unix_socket = "*"
|
||||
unix_socket = "0.5.0"
|
||||
|
||||
[[bin]]
|
||||
name = "uutils"
|
||||
|
|
|
@ -11,7 +11,7 @@ path = "base32.rs"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[dependencies.clippy]
|
||||
version = "*"
|
||||
version = "0.0.143"
|
||||
optional = true
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_chgrp"
|
|||
path = "chgrp.rs"
|
||||
|
||||
[dependencies]
|
||||
walkdir = "*"
|
||||
walkdir = "1.0.7"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_chmod"
|
|||
path = "chmod.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
walker = "*"
|
||||
walker = "1.0.0"
|
||||
|
||||
[[bin]]
|
||||
name = "chmod"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_chown"
|
|||
path = "chown.rs"
|
||||
|
||||
[dependencies]
|
||||
glob = "*"
|
||||
glob = "0.2.11"
|
||||
walkdir = "0.1"
|
||||
|
||||
[dependencies.uucore]
|
||||
|
@ -17,7 +17,7 @@ default-features = false
|
|||
features = ["entries", "fs"]
|
||||
|
||||
[dependencies.clippy]
|
||||
version = "*"
|
||||
version = "0.0.143"
|
||||
optional = true
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_chroot"
|
|||
path = "chroot.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_cksum"
|
|||
path = "cksum.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_comm"
|
|||
path = "comm.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
getopts = "*"
|
||||
libc = "0.2.26"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,10 +8,10 @@ name = "uu_cp"
|
|||
path = "cp.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
walkdir = "*"
|
||||
walkdir = "1.0.7"
|
||||
|
||||
[[bin]]
|
||||
name = "cp"
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_date"
|
|||
path = "date.rs"
|
||||
|
||||
[dependencies]
|
||||
chrono = "*"
|
||||
clap = "*"
|
||||
chrono = "0.3.0"
|
||||
clap = "2.24.1"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extern crate uu_echo;
|
||||
extern crate uu_date;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_date::uumain(std::env::args().collect()));
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_dircolors"
|
|||
path = "dircolors.rs"
|
||||
|
||||
[dependencies]
|
||||
glob = "*"
|
||||
glob = "0.2.11"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_dirname"
|
|||
path = "dirname.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_du"
|
|||
path = "du.rs"
|
||||
|
||||
[dependencies]
|
||||
time = "*"
|
||||
time = "0.1.38"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
2
src/env/Cargo.toml
vendored
2
src/env/Cargo.toml
vendored
|
@ -8,7 +8,7 @@ name = "uu_env"
|
|||
path = "env.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_expand"
|
|||
path = "expand.rs"
|
||||
|
||||
[dependencies]
|
||||
unicode-width = "*"
|
||||
getopts = "*"
|
||||
unicode-width = "0.1.4"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_expr"
|
|||
path = "expr.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_factor"
|
|||
path = "factor.rs"
|
||||
|
||||
[dependencies]
|
||||
rand = "*"
|
||||
rand = "0.3.15"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_fmt"
|
|||
path = "fmt.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
unicode-width = "*"
|
||||
libc = "0.2.26"
|
||||
unicode-width = "0.1.4"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,12 +8,12 @@ name = "uu_hashsum"
|
|||
path = "hashsum.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
regex = "*"
|
||||
regex-syntax = "*"
|
||||
rust-crypto = "*"
|
||||
rustc-serialize = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
regex = "0.1.80"
|
||||
regex-syntax = "0.4.1"
|
||||
rust-crypto = "0.2.36"
|
||||
rustc-serialize = "0.3.24"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_head"
|
|||
path = "head.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_hostid"
|
|||
path = "hostid.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_hostname"
|
|||
path = "hostname.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,12 +8,12 @@ name = "uu_install"
|
|||
path = "install.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = ">= 0.2"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[dev-dependencies]
|
||||
time = "*"
|
||||
time = "0.1.38"
|
||||
|
||||
[[bin]]
|
||||
name = "install"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_kill"
|
|||
path = "kill.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_link"
|
|||
path = "link.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_ln"
|
|||
path = "ln.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_logname"
|
|||
path = "logname.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,13 +8,13 @@ name = "uu_ls"
|
|||
path = "ls.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
pretty-bytes = "*"
|
||||
term_grid = "*"
|
||||
termsize = "*"
|
||||
time = "*"
|
||||
lazy_static = "*"
|
||||
unicode-width = "*"
|
||||
getopts = "0.2.14"
|
||||
pretty-bytes = "0.2.1"
|
||||
term_grid = "0.1.5"
|
||||
termsize = "0.1.4"
|
||||
time = "0.1.38"
|
||||
lazy_static = "0.2.8"
|
||||
unicode-width = "0.1.4"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_mkdir"
|
|||
path = "mkdir.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_mkfifo"
|
|||
path = "mkfifo.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_mknod"
|
|||
path = "mknod.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "^0.2.4"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ path = "mktemp.rs"
|
|||
|
||||
[dependencies]
|
||||
uucore = { path="../uucore" }
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
rand = "0.3"
|
||||
tempfile = "*"
|
||||
tempfile = "2.1.5"
|
||||
|
||||
[[bin]]
|
||||
name = "mktemp"
|
||||
|
|
|
@ -8,11 +8,11 @@ name = "uu_more"
|
|||
path = "more.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
|
||||
nix = "*"
|
||||
nix = "0.8.1"
|
||||
|
||||
[[bin]]
|
||||
name = "more"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_mv"
|
|||
path = "mv.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_nice"
|
|||
path = "nice.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,12 +8,12 @@ name = "uu_nl"
|
|||
path = "nl.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
aho-corasick = "*"
|
||||
memchr = "*"
|
||||
regex = "*"
|
||||
regex-syntax = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
aho-corasick = "0.6.3"
|
||||
memchr = "1.0.1"
|
||||
regex = "0.2.2"
|
||||
regex-syntax = "0.4.1"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_nohup"
|
|||
path = "nohup.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_nproc"
|
|||
path = "nproc.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
num_cpus = "1.5"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ name = "uu_od"
|
|||
path = "od.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
byteorder = "*"
|
||||
half = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
byteorder = "1.1.0"
|
||||
half = "1.0.0"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_paste"
|
|||
path = "paste.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_pathchk"
|
|||
path = "pathchk.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_printenv"
|
|||
path = "printenv.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_printf"
|
|||
path = "printf.rs"
|
||||
|
||||
[dependencies]
|
||||
"itertools" = "*"
|
||||
"itertools" = "0.6.0"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
#![allow(dead_code)]
|
||||
|
||||
extern crate itertools;
|
||||
extern crate uucore;
|
||||
|
||||
mod cli;
|
||||
mod memo;
|
||||
mod tokenize;
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
static NAME: &'static str = "printf";
|
||||
static VERSION: &'static str = "0.0.1";
|
||||
|
@ -39,12 +38,12 @@ static LONGHELP_BODY: &'static str = "
|
|||
ESCAPE SEQUENCES
|
||||
|
||||
The following escape sequences, organized here in alphabetical order,
|
||||
will print the corresponding character literal:
|
||||
will print the corresponding character literal:
|
||||
|
||||
\" double quote
|
||||
|
||||
\\\\ backslash
|
||||
|
||||
|
||||
\\a alert (BEL)
|
||||
|
||||
\\b backspace
|
||||
|
@ -64,7 +63,7 @@ static LONGHELP_BODY: &'static str = "
|
|||
\\v vertical tab
|
||||
|
||||
\\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)
|
||||
|
||||
|
@ -80,14 +79,14 @@ static LONGHELP_BODY: &'static str = "
|
|||
|
||||
Fields
|
||||
|
||||
%s - string
|
||||
%b - string parsed for literals
|
||||
%s - string
|
||||
%b - string parsed for literals
|
||||
second parameter is max length
|
||||
|
||||
%c - char
|
||||
no second parameter
|
||||
|
||||
%i or %d - 64-bit integer
|
||||
%i or %d - 64-bit integer
|
||||
%u - 64 bit unsigned integer
|
||||
%x or %X - 64-bit unsigned integer as hex
|
||||
%o - 64-bit unsigned integer as octal
|
||||
|
@ -97,7 +96,7 @@ static LONGHELP_BODY: &'static str = "
|
|||
%f or %F - decimal floating point value
|
||||
%e or %E - scientific notation 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 number of significant digits for scientific notation output
|
||||
|
||||
|
@ -108,7 +107,7 @@ static LONGHELP_BODY: &'static str = "
|
|||
printf '%4.3i' 7
|
||||
has a first parameter of 4
|
||||
and a second parameter of 3
|
||||
will result in ' 007'
|
||||
will result in ' 007'
|
||||
|
||||
printf '%.1s' abcde
|
||||
has no first parameter
|
||||
|
@ -121,7 +120,7 @@ static LONGHELP_BODY: &'static str = "
|
|||
will result in ' q'
|
||||
|
||||
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,
|
||||
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)
|
||||
0x (e.g. 0xABC) - interpret argument as hex (numeric output fields only)
|
||||
\' (e.g. \'a) - interpret argument as a character constant
|
||||
|
||||
|
||||
HOW TO USE SUBSTITUTIONS
|
||||
|
||||
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
|
||||
|
||||
will print
|
||||
|
||||
'the letter A comes before the letter B'
|
||||
will print
|
||||
|
||||
'the letter A comes before the letter B'
|
||||
|
||||
because the substitution field %X means
|
||||
'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
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
AVAILABLE SUBSTITUTIONS
|
||||
|
||||
This program, like GNU coreutils printf,
|
||||
interprets a modified subset of the POSIX C printf spec,
|
||||
a quick reference to substitutions is below.
|
||||
This program, like GNU coreutils printf,
|
||||
interprets a modified subset of the POSIX C printf spec,
|
||||
a quick reference to substitutions is below.
|
||||
|
||||
STRING SUBSTITUTIONS
|
||||
All string fields have a 'max width' parameter
|
||||
%.3s means 'print no more than three characters of the original input'
|
||||
All string fields have a 'max width' parameter
|
||||
%.3s means 'print no more than three characters of the original input'
|
||||
|
||||
%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,
|
||||
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
|
||||
|
||||
|
@ -202,7 +201,7 @@ static LONGHELP_BODY: &'static str = "
|
|||
|
||||
%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
|
||||
%.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
|
||||
|
||||
%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
|
||||
7 significant digits by default
|
||||
|
@ -225,9 +224,9 @@ static LONGHELP_BODY: &'static str = "
|
|||
Sci Note has 6 significant digits by default
|
||||
Trailing zeroes are removed
|
||||
Instead of being truncated, digit after last is rounded
|
||||
|
||||
Like other behavior in this utility, the design choices of floating point
|
||||
behavior in this utility is selected to reproduce in exact
|
||||
|
||||
Like other behavior in this utility, the design choices of floating point
|
||||
behavior in this utility is selected to reproduce in exact
|
||||
the behavior of GNU coreutils' printf from an inputs and outputs standpoint.
|
||||
|
||||
USING PARAMETERS
|
||||
|
@ -239,8 +238,8 @@ static LONGHELP_BODY: &'static str = "
|
|||
leading spaces
|
||||
The 2nd parameter is proceeded by a dot.
|
||||
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:
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
MORE INFO :
|
||||
MORE INFO :
|
||||
https://github.com/uutils/coreutils
|
||||
|
||||
COPYRIGHT :
|
||||
COPYRIGHT :
|
||||
Copyright 2015 uutils project.
|
||||
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" {
|
||||
print!("{} {}", LONGHELP_LEAD, LONGHELP_BODY);
|
||||
} else if formatstr == "--version" {
|
||||
println!("{} {}", NAME, VERSION);
|
||||
println!("{} {}", NAME, VERSION);
|
||||
} else {
|
||||
let printf_args = &args[2..];
|
||||
memo::Memo::run_all(formatstr, printf_args);
|
||||
|
|
|
@ -8,12 +8,12 @@ name = "uu_ptx"
|
|||
path = "ptx.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
aho-corasick = "*"
|
||||
memchr = "*"
|
||||
regex-syntax = "*"
|
||||
regex = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
aho-corasick = "0.6.3"
|
||||
memchr = "1.0.1"
|
||||
regex-syntax = "0.4.1"
|
||||
regex = "0.1.80"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_pwd"
|
|||
path = "pwd.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_readlink"
|
|||
path = "readlink.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_realpath"
|
|||
path = "realpath.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_relpath"
|
|||
path = "relpath.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_rm"
|
|||
path = "rm.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_rmdir"
|
|||
path = "rmdir.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_seq"
|
|||
path = "seq.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -9,10 +9,10 @@ path = "shred.rs"
|
|||
|
||||
[dependencies]
|
||||
rand = "0.3"
|
||||
filetime = "*"
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
time = "*"
|
||||
filetime = "0.1.10"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
time = "0.1.38"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_shuf"
|
|||
path = "shuf.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
rand = "*"
|
||||
getopts = "0.2.14"
|
||||
rand = "0.3.15"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_sleep"
|
|||
path = "sleep.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_sort"
|
|||
path = "sort.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
semver = "*"
|
||||
itertools = "*"
|
||||
getopts = "0.2.14"
|
||||
semver = "0.7.0"
|
||||
itertools = "0.6.0"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -16,7 +16,6 @@ extern crate semver;
|
|||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
#[macro_use]
|
||||
extern crate itertools;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_split"
|
|||
path = "split.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_stat"
|
|||
path = "stat.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
time = "*"
|
||||
getopts = "0.2.14"
|
||||
time = "0.1.38"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_stdbuf"
|
|||
path = "stdbuf.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_sum"
|
|||
path = "sum.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,10 +8,10 @@ name = "uu_sync"
|
|||
path = "sync.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
winapi = "*"
|
||||
kernel32-sys = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
winapi = "0.2.8"
|
||||
kernel32-sys = "0.2.2"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -14,9 +14,13 @@
|
|||
extern crate getopts;
|
||||
extern crate libc;
|
||||
|
||||
#[cfg(windows)]
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
extern crate uucore;
|
||||
|
||||
static NAME: &'static str = "sync";
|
||||
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_tac"
|
|||
path = "tac.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,10 +8,10 @@ name = "uu_tail"
|
|||
path = "tail.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
kernel32-sys = "*"
|
||||
libc = "*"
|
||||
winapi = "*"
|
||||
getopts = "0.2.14"
|
||||
kernel32-sys = "0.2.2"
|
||||
libc = "0.2.26"
|
||||
winapi = "0.2.8"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_tee"
|
|||
path = "tee.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_test"
|
|||
path = "test.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "*"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_timeout"
|
|||
path = "timeout.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
time = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
time = "0.1.38"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_touch"
|
|||
path = "touch.rs"
|
||||
|
||||
[dependencies]
|
||||
filetime = "*"
|
||||
getopts = "*"
|
||||
time = "*"
|
||||
filetime = "0.1.10"
|
||||
getopts = "0.2.14"
|
||||
time = "0.1.38"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_tr"
|
|||
path = "tr.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
bit-set = "*"
|
||||
fnv = "*"
|
||||
getopts = "0.2.14"
|
||||
bit-set = "0.4.0"
|
||||
fnv = "1.0.5"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_truncate"
|
|||
path = "truncate.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_tsort"
|
|||
path = "tsort.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_tty"
|
|||
path = "tty.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_unexpand"
|
|||
path = "unexpand.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
unicode-width = "*"
|
||||
getopts = "0.2.14"
|
||||
unicode-width = "0.1.4"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_uniq"
|
|||
path = "uniq.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
path="../uucore"
|
||||
|
|
|
@ -8,8 +8,8 @@ name = "uu_unlink"
|
|||
path = "unlink.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
libc = "*"
|
||||
getopts = "0.2.14"
|
||||
libc = "0.2.26"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_uptime"
|
|||
path = "uptime.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_users"
|
|||
path = "users.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
|
||||
[dependencies.uucore]
|
||||
default-features = false
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
#![allow(dead_code)]
|
||||
|
||||
extern crate getopts;
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
use uucore::utmpx::*;
|
||||
|
||||
use getopts::Options;
|
||||
|
|
|
@ -4,8 +4,8 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
time = { version = "*", optional = true }
|
||||
getopts = "0.2.14"
|
||||
time = { version = "0.1.38", optional = true }
|
||||
data-encoding = { version = "^1.1", optional = true }
|
||||
|
||||
[dependencies.libc]
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_wc"
|
|||
path = "wc.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -13,7 +13,7 @@ default-features = false
|
|||
features = ["utmpx"]
|
||||
|
||||
[dependencies.clippy]
|
||||
version = "*"
|
||||
version = "0.0.143"
|
||||
optional = true
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -8,9 +8,9 @@ name = "uu_whoami"
|
|||
path = "whoami.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
winapi = "*"
|
||||
advapi32-sys = "*"
|
||||
getopts = "0.2.14"
|
||||
winapi = "0.2.8"
|
||||
advapi32-sys = "0.2.0"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "uu_yes"
|
|||
path = "yes.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
getopts = "0.2.14"
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
|
|
Loading…
Reference in a new issue