commit 7d971f6f37af7a420f873808562d0677aca97594 Author: xamidev <121681048+xamidev@users.noreply.github.com> Date: Sun Jun 2 09:48:26 2024 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d62ae0 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# minihex + +A minimalist, single-file hexadecimal editor written in C with no dependencies (except the standard library). The program tries to be as simple as possible. Many bugs exist. diff --git a/hex.c b/hex.c new file mode 100644 index 0000000..7f13d06 --- /dev/null +++ b/hex.c @@ -0,0 +1,43 @@ +#include + +// TODO: Error checking + +#define BYTES 1024 +#define BYTES_PER_LINE 10 + +void print_hex(unsigned char* buf, int byteno) +{ + for (int i=0; i