Commit graph

57 commits

Author SHA1 Message Date
Wim Hueskes
2f12b06ba1 od: implement --traditional 2016-09-02 21:24:29 +02:00
Wim Hueskes
26ec46835c od: implement +size to skip bytes 2016-09-01 00:24:29 +02:00
Wim Hueskes
9e33c3a48c od: fix command-line parsing of file names 2016-09-01 00:23:34 +02:00
Wim Hueskes
e8eab8d3e8 od: implement ascii dump 2016-09-01 00:23:11 +02:00
Wim Hueskes
cea4297fdf od: implement --format / -t 2016-09-01 00:20:02 +02:00
Wim Hueskes
d15604b2e4 od: fix and add tests for simple format args 2016-09-01 00:19:37 +02:00
Wim Hueskes
c2d61a294e od: refactor: separate mod for parse_format_flags 2016-09-01 00:19:15 +02:00
Wim Hueskes
69bde1170d od: finish multi-byte support 2016-09-01 00:14:50 +02:00
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
Vladimir Matveev
d18be30c8a od: add byteorder_io
copied from: https://github.com/netvl/immeta/blob/4460ee/src/utils.rs
workaround for: https://github.com/BurntSushi/byteorder/issues/41
2016-09-01 00:11:42 +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
Carlos Liam
87d14978e9 Clean whitespace
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
9d8abbcb06 Basic Cargo build
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
    `cargo --no-default-features --features <utils>`
can be used.

Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02: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