1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

address Arcterus comments on uutils/coreutils PR 515

Mostly style things.
This commit is contained in:
Keunwoo Lee 2015-01-27 19:31:11 -08:00
parent 1954274700
commit 288179be49
2 changed files with 7 additions and 7 deletions

View file

@ -146,6 +146,7 @@ To do
- mktemp - mktemp
- mv (almost done, one more option) - mv (almost done, one more option)
- numfmt - numfmt
- od (in progress, needs lots of work)
- pathchk - pathchk
- pinky - pinky
- pr - pr

View file

@ -78,11 +78,10 @@ fn main(radix: Radix, fname: String) {
Ok(n) => { Ok(n) => {
print!("{:07o}", addr); print!("{:07o}", addr);
match radix { match radix {
Radix::Decimal => { Radix::Decimal => {},
},
Radix::Octal => { Radix::Octal => {
for b in range(0, n / std::u16::BYTES) { for b in range(0, n / std::u16::BYTES) {
let bs = &bytes[2*b .. 2*b+2]; let bs = &bytes[(2 * b) .. (2 * b + 2)];
let p: u16 = (bs[1] as u16) << 8 | bs[0] as u16; let p: u16 = (bs[1] as u16) << 8 | bs[0] as u16;
print!(" {:06o}", p); print!(" {:06o}", p);
} }