mirror of
https://github.com/PoetryInCode/ViewBin.git
synced 2026-08-13 11:24:38 -04:00
added readme
This commit is contained in:
parent
37265430dc
commit
1551612a6b
16
README.md
Normal file
16
README.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# ViewBin
|
||||||
|
|
||||||
|
This really is just a slightly prettier version of hexdump. There isn't much to say about it.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
On Linux you can clone the repository and just run `make` inside the cloned directory. No dependencies, only a compiler and Gnu Make.
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
The Makefile may, or may not work on windows, I'm not sure.
|
||||||
|
If it doesn't there are no dependencies. You can just run it through a compiler.
|
||||||
@ -104,7 +104,7 @@ int main(int argc, char **argv) {
|
|||||||
fread(text,sizeof(char),length,file);
|
fread(text,sizeof(char),length,file);
|
||||||
int i=0,byte_index=0,bytes_shown=0;
|
int i=0,byte_index=0,bytes_shown=0;
|
||||||
while(i < lines) {
|
while(i < lines) {
|
||||||
printf("\033[33m[%08x]>\033[39m ",byte_index);
|
printf("\033[32m[%08x]>\033[39m ",byte_index);
|
||||||
int a=0;
|
int a=0;
|
||||||
bytes_shown=0;
|
bytes_shown=0;
|
||||||
while(a<max_per_row) {
|
while(a<max_per_row) {
|
||||||
@ -147,9 +147,9 @@ int main(int argc, char **argv) {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if((12+(bytes_shown*chunk_size)+11) < width) {
|
if((12+(bytes_shown*chunk_size)+11) < width) {
|
||||||
printf("\033[33m<[%08x]\033[39m",byte_index);
|
printf("\033[32m<[%08x]\033[39m",byte_index);
|
||||||
} else {
|
} else {
|
||||||
printf("\n\033[33m<[%08x]\033[39m",byte_index);
|
printf("\n\033[32m<[%08x]\033[39m",byte_index);
|
||||||
}
|
}
|
||||||
free((void *)original);
|
free((void *)original);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user