mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 21:17:46 +00:00
od: whitespace fix (4-space indents, 99-column)
This commit is contained in:
parent
2d8e7f6dec
commit
a6e5deaa16
1 changed files with 91 additions and 81 deletions
22
src/od/od.rs
22
src/od/od.rs
|
@ -20,13 +20,22 @@ enum Radix { Decimal, Hexadecimal, Octal, Binary }
|
|||
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optopt("A", "address-radix", "Select the base in which file offsets are printed.", "RADIX"),
|
||||
getopts::optopt("j", "skip-bytes", "Skip bytes input bytes before formatting and writing.", "BYTES"),
|
||||
getopts::optopt("N", "read-bytes", "limit dump to BYTES input bytes", "BYTES"),
|
||||
getopts::optopt("S", "strings", "output strings of at least BYTES graphic chars. 3 is assumed when BYTES is not specified.", "BYTES"),
|
||||
getopts::optopt("A", "address-radix",
|
||||
"Select the base in which file offsets are printed.", "RADIX"),
|
||||
getopts::optopt("j", "skip-bytes",
|
||||
"Skip bytes input bytes before formatting and writing.", "BYTES"),
|
||||
getopts::optopt("N", "read-bytes",
|
||||
"limit dump to BYTES input bytes", "BYTES"),
|
||||
getopts::optopt("S", "strings",
|
||||
("output strings of at least BYTES graphic chars. 3 is assumed when \
|
||||
BYTES is not specified."),
|
||||
"BYTES"),
|
||||
getopts::optopt("t", "format", "select output format or formats", "TYPE"),
|
||||
getopts::optflag("v", "output-duplicates", "do not use * to mark line suppression"),
|
||||
getopts::optopt("w", "width", "output BYTES bytes per output line. 32 is implied when BYTES is not specified.", "BYTES"),
|
||||
getopts::optopt("w", "width",
|
||||
("output BYTES bytes per output line. 32 is implied when BYTES is not \
|
||||
specified."),
|
||||
"BYTES"),
|
||||
getopts::optflag("h", "help", "display this help and exit."),
|
||||
getopts::optflag("v", "version", "output version information and exit."),
|
||||
];
|
||||
|
@ -98,7 +107,8 @@ fn parse_radix(radix_str: Option<String>) -> Radix {
|
|||
panic!("Radix must be one of [d, o, b, x]\n");
|
||||
}
|
||||
|
||||
let radix: char = *(st.get(0).expect("byte string of length 1 lacks a 0th elem")) as char;
|
||||
let radix: char = *(st.get(0)
|
||||
.expect("byte string of length 1 lacks a 0th elem")) as char;
|
||||
if radix == 'd' {
|
||||
Radix::Decimal
|
||||
} else if radix == 'x' {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue