Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/cat_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/cat/
// Source: uutils/coreutils@8b16a3dca src/uu/cat/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> cat <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/extendedbigdecimal.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/extendedbigdecimal.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/argument.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/argument.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/argument.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/escape.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/escape.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/escape.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/human.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/human.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/human.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/mod.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/mod.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/num_format.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/num_format.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/num_format.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/format/spec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/format/spec.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/format/spec.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/ls_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/ls/
// Source: uutils/coreutils@8b16a3dca src/uu/ls/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> ls <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/mktemp_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/mktemp/
// Source: uutils/coreutils@8b16a3dca src/uu/mktemp/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> mktemp <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// and at test time (the invariant assertion). Nothing in the lib's
// runtime path needs it, hence `allow(dead_code)`.
#[allow(dead_code)]
pub const UUTILS_REVISION: &str = "3e2c890eb";
pub const UUTILS_REVISION: &str = "8b16a3dca";

pub mod cat_args;
#[allow(clippy::collapsible_if, clippy::unwrap_used)]
Expand Down
16 changes: 14 additions & 2 deletions crates/bashkit/src/builtins/generated/num_parser.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uucore/src/lib/features/parser/num_parser.rs
// Source: uutils/coreutils@8b16a3dca src/uucore/src/lib/features/parser/num_parser.rs
// Regenerate: cargo run -p bashkit-coreutils-port -- port-module <UUTILS_DIR> format <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down Expand Up @@ -294,7 +294,17 @@ fn parse_special_value(
if negative {
special = -special;
}
let (_, rest) = parse_suffix_multiplier(&input[str.len()..], allowed_suffixes);
let mut rest = &input[str.len()..];
if matches!(ebd, ExtendedBigDecimal::Nan)
&& let Some((payload, after)) =
rest.strip_prefix('(').and_then(|r| r.split_once(')'))
&& payload
.bytes()
.all(|b| b.is_ascii_alphanumeric() || b == b'_')
{
rest = after;
}
let (_, rest) = parse_suffix_multiplier(rest, allowed_suffixes);
return if rest.is_empty() {
Ok(special)
} else {
Expand All @@ -319,6 +329,7 @@ fn make_error(overflow: bool, negative: bool) -> ExtendedParserError<ExtendedBig
ExtendedParserError::Underflow(v)
}
}
const MAX_HEX_EXPONENT: u64 = (i32::MAX as f64 * std::f64::consts::LOG2_10) as u64;
fn construct_extended_big_decimal(
digits: BigUint,
negative: bool,
Expand Down Expand Up @@ -356,6 +367,7 @@ fn construct_extended_big_decimal(
/ BigDecimal::from_bigint(BigInt::from(16).pow(scale as u32), 0);
let exponent = exponent
.to_i64()
.filter(|e| e.unsigned_abs() <= MAX_HEX_EXPONENT)
.ok_or_else(|| make_error(exponent.is_positive(), negative))?;
let base: BigDecimal = 2.into();
let pow2 = base.powi(exponent);
Expand Down
8 changes: 5 additions & 3 deletions crates/bashkit/src/builtins/generated/od_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/od/
// Source: uutils/coreutils@8b16a3dca src/uu/od/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> od <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down Expand Up @@ -28,6 +28,8 @@ pub(crate) mod options {
pub const WIDTH: &str = "width";
pub const FILENAME: &str = "FILENAME";
}
const DEFAULT_MISSING_WIDTH: &str = "32";
const DEFAULT_MISSING_STRING_LENGTH: &str = "3";
#[allow(unused_imports)]
use options::*;
/// Vendored stand-in for `uucore::format_usage`.
Expand Down Expand Up @@ -124,7 +126,7 @@ pub fn od_command() -> Command {
),
)
.num_args(0..=1)
.default_missing_value("3")
.default_missing_value(DEFAULT_MISSING_STRING_LENGTH)
.value_name("BYTES"),
)
.arg(
Expand Down Expand Up @@ -287,7 +289,7 @@ pub fn od_command() -> Command {
"output BYTES bytes per output line. 32 is implied when BYTES is not\nspecified.",
),
)
.default_missing_value("32")
.default_missing_value(DEFAULT_MISSING_WIDTH)
.value_name("BYTES")
.num_args(..=1),
)
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/readlink_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/readlink/
// Source: uutils/coreutils@8b16a3dca src/uu/readlink/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> readlink <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/realpath_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/realpath/
// Source: uutils/coreutils@8b16a3dca src/uu/realpath/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> realpath <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/shuf_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/shuf/
// Source: uutils/coreutils@8b16a3dca src/uu/shuf/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> shuf <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/stat_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/stat/
// Source: uutils/coreutils@8b16a3dca src/uu/stat/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> stat <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/tac_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/tac/
// Source: uutils/coreutils@8b16a3dca src/uu/tac/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> tac <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/tee_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/tee/
// Source: uutils/coreutils@8b16a3dca src/uu/tee/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> tee <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
2 changes: 1 addition & 1 deletion crates/bashkit/src/builtins/generated/truncate_args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED by bashkit-coreutils-port. DO NOT EDIT.
//
// Source: uutils/coreutils@3e2c890eb src/uu/truncate/
// Source: uutils/coreutils@8b16a3dca src/uu/truncate/
// Regenerate: cargo run -p bashkit-coreutils-port -- <UUTILS_DIR> truncate <REV>
//
// Original uutils licensed MIT; see THIRD_PARTY_LICENSES.
Expand Down
Loading