mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
Change Default Buffer to usize::MAX
This commit is contained in:
parent
1a407c2328
commit
e5c19734c8
1 changed files with 6 additions and 7 deletions
|
@ -93,8 +93,7 @@ static NEGATIVE: char = '-';
|
||||||
static POSITIVE: char = '+';
|
static POSITIVE: char = '+';
|
||||||
|
|
||||||
static DEFAULT_TMPDIR: &str = r"/tmp";
|
static DEFAULT_TMPDIR: &str = r"/tmp";
|
||||||
// 4GB buffer for Vec<Line> before we dump to disk, never used
|
static DEFAULT_BUF_SIZE: usize = usize::MAX;
|
||||||
static DEFAULT_BUF_SIZE: usize = 4000000000;
|
|
||||||
|
|
||||||
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Copy)]
|
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Copy)]
|
||||||
enum SortMode {
|
enum SortMode {
|
||||||
|
@ -142,11 +141,11 @@ impl GlobalSettings {
|
||||||
let suf_usize: usize = match suf_str.to_uppercase().as_str() {
|
let suf_usize: usize = match suf_str.to_uppercase().as_str() {
|
||||||
// SI Units
|
// SI Units
|
||||||
"B" => 1usize,
|
"B" => 1usize,
|
||||||
"K" => 1024usize,
|
"K" => 1000usize,
|
||||||
"M" => 1024000usize,
|
"M" => 1000000usize,
|
||||||
"G" => 1024000000usize,
|
"G" => 1000000000usize,
|
||||||
// GNU regards empty human numeric value as 1024 bytes
|
// GNU regards empty human numeric values as K by default
|
||||||
_ => 1024usize,
|
_ => 1000usize,
|
||||||
};
|
};
|
||||||
num_usize * suf_usize
|
num_usize * suf_usize
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue