-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathREADME
More file actions
175 lines (136 loc) Β· 7.03 KB
/
Copy pathREADME
File metadata and controls
175 lines (136 loc) Β· 7.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
β βββ βββ ββββ ββ ββββ β
β ββββ ββ ββββ ββ ββββ βββ ββ ββ
β ββββ ββ ββββ ββ ββββ βββ
β ββββ ββ ββββ ββ ββββ βββ ββ ββ
β βββ βββ ββββ ββ ββββ β
+------------------------------------------------------------------------------+
hex 0 1 2 3 4 5 6 7 8 9 a b c d e f
0 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 MZ..............
10 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30 00 00 00 00 00 00 00 00 00 00 00 00 f0 00 00 00 ................
40 0e 1f ba 0e 00 b4 09 cd 21 b8 01 4c cd 21 54 68 ........!..L.!Th
50 69 73 20 70 72 6f 67 72 61 6d 20 63 61 6e 6e 6f is program canno
60 74 20 62 65 20 72 75 6e 20 69 6e 20 44 4f 53 20 t be run in DOS
70 6d 6f 64 65 2e 0d 0d 0a 24 00 00 00 00 00 00 00 mode....$.......
80 41 b8 1d c5 05 d9 73 96 05 d9 73 96 05 d9 73 96 A.....s...s...s.
90 11 b2 77 97 09 d9 73 96 11 b2 70 97 03 d9 73 96 ..w...s...p...s.
a0 11 b2 76 97 c4 d9 73 96 11 b2 72 97 02 d9 73 96 ..v...s...r...s.
b0 05 d9 72 96 ad d9 73 96 63 b6 8e 96 0d d9 73 96 ..r...s.c.....s.
c0 57 ac 77 97 14 d9 73 96 57 ac 70 97 0f d9 73 96 W.w...s.W.p...s.
d0 57 ac 76 97 2c d9 73 96 05 d9 73 96 e0 df 73 96 W.v.,.s...s...s.
e0 ca ac 71 97 04 d9 73 96 52 69 63 68 05 d9 73 96 ..q...s.Rich..s.
f0 50 45 00 00 64 86 0d 00 02 7c bc 68 00 00 00 00 PE..d....|.h....
100 00 00 00 00 f0 00 22 00 0b 02 0e 1d 00 c8 21 00 ......".......!.
110 00 9e 0b 00 00 00 00 00 e2 7d 00 00 00 10 00 00 .........}......
120 00 00 00 40 01 00 00 00 00 10 00 00 00 02 00 00 ...@............
130 06 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 ................
140 00 e0 2d 00 00 04 00 00 00 00 00 00 03 00 60 81 ..-...........`.
150 00 00 10 00 00 00 00 00 00 10 00 00 00 00 00 00 ................
160 00 00 10 00 00 00 00 00 00 10 00 00 00 00 00 00 ................
OVR | x8 | ascii | 6c
+------------------------------------------------------------------------------+
ddhx is a simple byte-oriented multi-platform modal TUI hex editor.
Currently available for Windows, macOS, Linux, and BSDs.
License: MIT
Title font: Shaded Blocky (FIGlet)
// FEATURES
* Supports insert, overwrite, and delete operations
* Unlimited undo/redo, even with new buffers
* Large file support: up to 8 EiB
* Visual selection and range commands
* Character sets: ascii, mac, cp437, ebcdic
* Search data with a powerful pattern syntax
* Skip identical data or repeating patterns by selection
* Customizable with configuration file
* Copy, Cut, and Paste data at will
////////////////////////////////////////////////////////////////////////////////
// Roadmap
This list may change at any given time without notice.
0.9: Released!
- [x] Color theming
- [x] In-place saving (Fast Save Optimization)
- [x] Piece Coalescing
- [x] View: Other data types (d8, o8, d16, f32, etc.)
0.10: WIP
- [ ] Diff view (vs. opened document)
- [x] Bookmark system
- [x] Data inspector panel
Wishlist:
- [ ] Charset-specific pattern prefixes (e.g., ebcdic:)
- [ ] Document: Disk
- [ ] Document: Process memory
- [ ] Endian-specific pattern prefixes (e.g., u32le:)
- [ ] Layout system
////////////////////////////////////////////////////////////////////////////////
// Getting Started
Create a new empty buffer:
$ ddhx
Open a file:
$ ddhx file.bin
Read from a pipe:
$ curl -s https://example.com/file | ddhx
Navigate with arrow keys, Page Up/Down, and Home/End. Edit by typing hex
digits (0-9, a-f). Undo with Ctrl+U, redo with Ctrl+R. Press Enter to
open the command prompt. Select data using Shift and navigation keys. Quit
with Ctrl+Q.
For full documentation, see the manpage:
$ man ddhx
Or use the built-in help pages:
$ ddhx --help
$ ddhx --help-keys
$ ddhx --help-commands
$ ddhx --help-config
////////////////////////////////////////////////////////////////////////////////
// Compiling
To compile this project, you'll need a D compiler and DUB.
All major compilers are supported (DMD, GDC, and LDC).
DUB is used for project management and building. It is typically available in
system repositories as 'dub'.
DMD is typically available in system repositories and on https://dlang.org/.
GDC is typically available in system repositories as 'gdc', 'gdc-*', 'gcc-gdc',
'gcc*-gdc', 'gcc-d', or 'gcc-d-*'. For example, on Ubuntu 24.04, 'gdc-9' to
'gdc-14' are available. This project doesn't use 'gdmd', the dmd wrapper.
LDC is typically available in system repositories as 'ldc', and is typically
invoked using 'ldc2'. This project doesn't use 'ldmd2', the dmd wrapper.
Minimum version should be a compiler with DMD front-end version 2.081 and
later. Project successfully compiles on Ubuntu 16.04 using dmd-2.082.0,
using the deb package from dlang.org.
Compile a debug build:
$ dub build
Compile a release build using a specified compiler:
$ dub build -b release --compiler=ldc2
// Makefile
If DUB is unavailable, a Makefile is also available.
Default target is 'release', meaning an optimized release will be created.
Other targets include 'debug', 'debugv', 'native', 'debug-static',
'release-static', and 'native-static'.
////////////////////////////////////////////////////////////////////////////////
// Debugging
Since things might break, there are unit testing and logging facilities.
Run unit tests (useful for new platforms):
$ dub test
Run unit tests with log traces to stderr:
$ dub test --d-version=Trace
Run a specific system integration test:
$ dub test -b TYPE
TYPE: input (terminal input), color (terminal colors), size (terminal size)
The Makefile also accepts 'test', 'test-input', 'test-size', and 'test-size'.
Environment variables:
- DDHX_LOG=PATH
- If set, enables logging debugging information into this file.
- Version: Since 0.7
- DDHX_BACKEND=BACKEND
- Forces BACKEND to be selected.
- Version: Since 0.7
- Default: "piecev3" (since 0.9)
- Backends: "piecev3" (>=0.9), "piecev2" (>=0.8), "piece" (>=0.7 <0.9)
- DDHX_NO_INPLACE_SAVE
- If set to 1, avoid the use of the newer "in-place" saving mechanic.
- Version: Since 0.9
********************************************************************************
* NOTICE *
********************************************************************************
This software is provided with NO WARRANTY as it is marked as EXPERIMENTAL.
Major progress has been made since version 0.5! It should be good enough for
regular use.