1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 13:37:48 +00:00

od: whitespace fix (4-space indents, 99-column)

This commit is contained in:
Keunwoo Lee 2015-01-25 00:03:14 -08:00
parent 2d8e7f6dec
commit a6e5deaa16

View file

@ -20,13 +20,22 @@ enum Radix { Decimal, Hexadecimal, Octal, Binary }
pub fn uumain(args: Vec<String>) -> isize { pub fn uumain(args: Vec<String>) -> isize {
let opts = [ let opts = [
getopts::optopt("A", "address-radix", "Select the base in which file offsets are printed.", "RADIX"), getopts::optopt("A", "address-radix",
getopts::optopt("j", "skip-bytes", "Skip bytes input bytes before formatting and writing.", "BYTES"), "Select the base in which file offsets are printed.", "RADIX"),
getopts::optopt("N", "read-bytes", "limit dump to BYTES input bytes", "BYTES"), getopts::optopt("j", "skip-bytes",
getopts::optopt("S", "strings", "output strings of at least BYTES graphic chars. 3 is assumed when BYTES is not specified.", "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::optopt("t", "format", "select output format or formats", "TYPE"),
getopts::optflag("v", "output-duplicates", "do not use * to mark line suppression"), 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("h", "help", "display this help and exit."),
getopts::optflag("v", "version", "output version information 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"); 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' { if radix == 'd' {
Radix::Decimal Radix::Decimal
} else if radix == 'x' { } else if radix == 'x' {