Repository navigation
Refactor dump commands into a shared streaming implementation - #85
Merged
Merged
Conversation
Move dump command handling and incremental formatting into libtoolshed so decb dump, os9 dump, cecb dump, and cecb dumpblock share the same formatting code. Keep formatting options and offsets in per-dump state instead of globals, and preserve hexadecimal, assembler hexadecimal/binary, and C output modes. Read files in bounded chunks rather than scanning for their size, rewinding, and allocating the entire contents. Decode DECB binary records incrementally, reject truncated headers and payloads, and preserve load addresses, execution addresses, and trailing-byte reporting. Propagate read, close, and output errors. Give dumpblock the shared formatting options while retaining cassette block metadata, per-block offsets, and nonfatal checksum warnings. Highlight printable ASCII byte values and characters in green only when output is a terminal, leaving redirected output free of color codes. Remove the abandoned coco source directory, its copied OS-9 commands, obsolete Makefile, and unused cocoutil header. Update command tables, declarations, library builds, and dumpblock documentation. Keep dump verification as manual smoke checks rather than adding output-format unit tests. Validation: make -C build/unix completed and all 32 existing tests passed. Manually checked all four commands across hex, assembler hex/binary, C, and ASCII-suppressed output using terminal and redirected output; stripping terminal color codes preserves plain output and alignment. HTML documentation generation requires the unavailable markdown executable.
DrPitre
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move dump command handling and incremental formatting into libtoolshed so decb dump, os9 dump, cecb dump, and cecb dumpblock share the same formatting code. Keep formatting options and offsets in per-dump state instead of globals, and preserve hexadecimal, assembler hexadecimal/binary, and C output modes.
Read files in bounded chunks rather than scanning for their size, rewinding, and allocating the entire contents. Decode DECB binary records incrementally, reject truncated headers and payloads, and preserve load addresses, execution addresses, and trailing-byte reporting. Propagate read, close, and output errors.
Give dumpblock the shared formatting options while retaining cassette block metadata, per-block offsets, and nonfatal checksum warnings. Highlight printable ASCII byte values and characters in green only when output is a terminal, leaving redirected output free of color codes.
Remove the abandoned coco source directory, its copied OS-9 commands, obsolete Makefile, and unused cocoutil header. Update command tables, declarations, library builds, and dumpblock documentation. Keep dump verification as manual smoke checks rather than adding output-format unit tests.
Validation: make -C build/unix completed and all 32 existing tests passed. Manually checked all four commands across hex, assembler hex/binary, C, and ASCII-suppressed output using terminal and redirected output; stripping terminal color codes preserves plain output and alignment. HTML documentation generation requires the unavailable markdown executable.