Commit graph

65 commits

Author SHA1 Message Date
Wim Hueskes
829ea9f445 od: fix od --help 2016-12-04 22:24:36 +01:00
Joseph Crail
78d2e8db27 Fix comment spelling 2016-11-25 14:36:56 -05:00
Wim Hueskes
2550e0f3c7 od: several small changes after review
* update status in README.md
* enable busybox tests
  Adding `CONFIG_DESKTOP` and `CONFIG_LONG_OPTS` to busybox config.
  These flags also enable other tests, but those utilities are not
  included in `TEST_PROGS`. (eg. awk)
* fix whitespace and small issues
* fix Eq imp for FormatWriter on nightly + beta
* fix indention in multifilereader.rs
* fix intermittent errors in tests
2016-11-09 20:26:55 +01:00
Wim Hueskes
99f70ba648 od: implement 16-bit floating point type 2016-09-03 21:47:36 +02:00
Wim Hueskes
184c4af76d od: fix zero width user input (-w0) 2016-09-02 21:27:06 +02:00
Wim Hueskes
92fc286b0e od: refactor uumain into smaller functions 2016-09-02 21:26:43 +02:00
Wim Hueskes
2c24911d9c od: refactor: create struct for formatting info
also properly document the alignment algorithm.
2016-09-02 21:26:22 +02:00
Wim Hueskes
83a1ff404f od: refactor: create InputDecoder to convert input
It reads from the input and provides data conversion functions.
2016-09-02 21:26:00 +02:00
Wim Hueskes
283a29fd2c od: refactor IntWriter, do not require parameters
use macros to define a function for each format so byte_size
and print_width do not have to be provided by the caller.
2016-09-02 21:25:38 +02:00
Wim Hueskes
f2db897c47 od: refactor: reduce arguments of odfunc
Pass the input stream itself instead of the parameters required to
open it. Create InputOffset to handle functionality required for
the byte offset.
2016-09-02 21:25:17 +02:00
Wim Hueskes
d705dc46ce od: improve/extend --help text 2016-09-02 21:24:56 +02:00
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
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