summaryrefslogtreecommitdiff
path: root/Userland/Utilities/hexdump.cpp
AgeCommit message (Collapse)Author
2022-11-26hexdump: Replace Core::File with Core::Stream::FileEli Youngs
Previously, hexdump used Core::File to read input into a fixed buffer. This PR rewrites the file handling to use the more modern Core::Stream::File, which reads data into spans. By using spans, we can also simplify the rest of the code, which previously used memcpy for array manipulation and relied on manual bookkeeping to keep track of offsets.
2022-11-14hexdump: Support truncating output with -nEli Youngs
2022-11-14hexdump: Pledge stdio and rpathEli Youngs
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-14hexdump: Port to LibMainLucas CHOLLET
2021-11-19Hexdump: Add verbose optionPankaj Raghav
Verbose option overrides the default coalescing behaviour by displaying the complete output.
2021-11-19Hexdump: Allow identical lines to coalescePankaj Raghav
Coalesce feature is enabled by default when using the program. Any number of lines identical to the preceding line will be replaced by a single asterik.
2021-11-08LibCore: Use ErrorOr<T> for Core::File::open()Andreas Kling
2021-11-08hexdump: Improve error handlingBen Wiederhake
In particular, hexdump can now handle read errors and reads that completely fill up the buffer.
2021-11-01hexdump: Avoid using read_allBen Wiederhake
I like using hexdump to 'have a look' at binary files, for example /dev/random or /dev/hda. Obviously, this usecase requires that hexdump tries not to buffer the 'entire' device.
2021-11-01hexdump: Make non-ASCII output easier to readBen Wiederhake
Enclose the ASCII-interpretation in pipes, show non-ASCII bytes as a dot, and fix the length of the last line. Note that this makes it more similar to the behavior of many other implementations.
2021-06-01Userland: Replace most printf-style APIs with AK::Format APIs :^)Linus Groh
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling