Wim Hueskes
459db47c2b
od: implement --skip-bytes and --read-bytes
2016-09-01 00:14:25 +02:00
Wim Hueskes
2b10cc47ff
od: implement Read for MultifileReader
...
also add tests and fix error handling
2016-09-01 00:14:02 +02:00
Wim Hueskes
c15936ad68
od: fix performance issue with large values of -w
...
like -w100000000 or larger
2016-09-01 00:13:39 +02:00
Wim Hueskes
bd0424fa0c
od: start with multi-byte support
2016-09-01 00:13:21 +02:00
Wim Hueskes
1164b9e118
od: fix file byte offset for non-octal types
...
removed binary offset, added no offset.
2016-09-01 00:12:59 +02:00
Wim Hueskes
24fb6d66c4
od: proper align different sized output
2016-09-01 00:12:37 +02:00
Wim Hueskes
45895be96d
od: use structs to specify possible dump formats
...
remove extra padding too - preparing proper allignment
2016-09-01 00:12:11 +02:00
Wim Hueskes
f7d7beb79b
od: implement --endian
2016-09-01 00:11:52 +02:00
Wim Hueskes
4770690823
od: suppress duplicates
2016-09-01 00:11:23 +02:00
Wim Hueskes
80386ef04f
od: split odfunc()
2016-09-01 00:11:02 +02:00
Wim Hueskes
e006a84136
od: refactor: do all printing in odfunc
2016-09-01 00:10:40 +02:00
Wim Hueskes
36b88f268d
od: enable hexadecimal output
2016-09-01 00:10:23 +02:00
Wim Hueskes
e905c2ec71
od: do not panic on invalid user input
...
use macros from uucore where possible
2016-09-01 00:10:02 +02:00
Wim Hueskes
167d7d3ca9
od: implement -w (width)
2016-09-01 00:09:45 +02:00
Wim Hueskes
1b01f02e9e
od: remove trailing spaces in output
...
can't find documentation confirming this behaviour
besides it does not work correctly on all formats
see also uutils/coreutils#922
2016-09-01 00:09:25 +02:00
Wim Hueskes
f45169d37c
od: refactor: split into modules
2016-09-01 00:09:04 +02:00
Wim Hueskes
104f8eb509
od: implement 64-bit floating point output
2016-09-01 00:08:41 +02:00
Wim Hueskes
f53aefa7e9
od: implement 32-bit floating point output
2016-09-01 00:08:25 +02:00
Wim Hueskes
5c495359c1
od: refactor: convert bytes using byteorder crate
2016-09-01 00:08:00 +02:00
Wim Hueskes
3e143217a9
od: refactor sign_extend
...
easier to understand algoritm which does not use unsafe
2016-09-01 00:01:55 +02:00
Wim Hueskes
e0b7ff1953
od: implement --help and --version
2016-09-01 00:01:35 +02:00
Christopher Ian Stern
e909e665f0
od: take more format options, respect their order.
2016-05-22 15:46:20 -05:00
modelorganism
3f356a4190
od: take input from stdin, as well as files.
2016-04-26 23:17:00 -05:00
modelorganism
e6cf167d1d
od: Accept multiple files names as input
2016-04-25 21:55:34 -05:00
modelorganism
1fbda9663d
Add extra spaces to output to match formating of origial od
2016-04-25 21:47:24 -05:00
Michael Gehring
77d1c309cd
od: fix infinite loop at EOF
...
Fixes #866
2016-04-15 07:41:03 +02:00
Joseph Crail
b90d253584
Refactor and simplify build for utilities.
...
For coreutils, there are two build artifacts:
1. multicall executable (each utility is a separate static library)
2. individual utilities (still separate library with main wrapper)
To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.
Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Nathan Ross
502957dc3e
use cargo idioms to manage dependency resolution and compilation
2015-11-23 02:04:15 -05:00
Joseph Crail
b4b08de42c
Switch to external getopts cargo (part 1).
...
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.
I'm splitting the updates into several commits for better reviewing.
2015-05-20 22:47:30 -04:00
Joseph Crail
b20bde94cb
Fix od.
...
I upgraded to the nightly build and replaced the unstable BYTES constant
with mem::size_of().
2015-05-11 00:48:36 -04:00
Michael Gehring
9f8fd55b4a
Integer type changes
2015-03-08 19:06:30 +01:00
Michael Gehring
9ae9a48387
feature io -> old_io, path -> old_path
2015-02-22 13:59:12 +01:00
Michael Gehring
e7b647171f
os::set_exit_status(isize) -> env::set_exit_status(i32)
2015-02-22 13:59:12 +01:00
Michael Gehring
3eb5a814a3
Fix most unstable feature warnings
2015-02-03 23:54:37 +01:00
Michael Gehring
db8506532e
derive(Show) -> derive(Debug)
2015-02-03 22:42:36 +01:00
Alex Lyon
9c0ed7236c
Merge pull request #517 from keunwoo/keunwoo-fix-address-radix-20150127
...
od: fix --address-radix interpretation and minor cleanups
2015-02-01 12:13:37 -08:00
Michael Gehring
d187dc574b
std::io -> std::old_io
2015-01-29 08:45:37 +01:00
Keunwoo Lee
f6a07663e8
od: proper interpretation of -A flag
...
Prior to this CL, --address-radix was being used to determine the format
of the output bytes. This was wrong: this flag controls the printing of
the address (in the POSIX spec for od, this is called the "input offset
base"), not the printing of the content bytes.
2015-01-27 21:51:28 -08:00
Keunwoo Lee
55be34a2c4
od: clean up fname usage
...
+ rm superfluous clone
+ rm superfluous mut variable
2015-01-27 21:51:28 -08:00
Keunwoo Lee
71bc68a987
od: rm -v alias for --version
...
This shortflag conflicts with --output-duplicates.
2015-01-27 21:51:28 -08:00
Keunwoo Lee
b756a57345
od: clean up parse_radix code and use site
...
+ Make parse_radix terser and clearer.
+ Make purpose of radix clearer at use site
(note that the code currently completely misuses the --address-radix
flag; this is inherited from the previous code)
+ Don't panic! inside parse_radix; instead return Result<> and let the
caller handle errors (currently we panic, but probably we'll want to use
some less alarming error routine); this will be more testable later as
well.
2015-01-27 21:51:28 -08:00
Keunwoo Lee
288179be49
address Arcterus comments on uutils/coreutils PR 515
...
Mostly style things.
2015-01-27 19:32:26 -08:00
Keunwoo Lee
1954274700
od: fix warnings
2015-01-25 00:17:38 -08:00
Keunwoo Lee
a6e5deaa16
od: whitespace fix (4-space indents, 99-column)
2015-01-25 00:03:14 -08:00
Keunwoo Lee
2d8e7f6dec
od: fix build
...
Just the minimal stuff needed to make od build again. I have restrained
myself from making more invasive changes.
2015-01-24 23:56:10 -08:00
Keunwoo Lee
3739c82c95
mv od/ -> src/
2015-01-24 23:16:13 -08:00