*** DHEX
*** (C)opyleft 2004 by Thomas Dettbarn
*** dettus@dettus.net (Include DHEX in the subject)

Hello and welcome to DHEX! 
It is just another Hexeditor with a diff-mode for ncurses. It makes heavy use of
colors, so you should set your TERM-environment variable to something color-
capable.

-- COMPILATION AND INSTALLATION
Compilation: 
1.) Edit the Makefile
2.) Run "make" oder "gmake"

Installation:
1.) Become root
2.) Copy DHEX somewhere where everybody can find it

-- CONFIGURATION
When you run DHEX for the first time, it will try to create a .dhexrc in your
home-directory. Open it with any Texteditor you like and you can change the 
colors of its appearance. 
This is useful if you try to run DHEX in a monochrome terminal.

-- MODES
There are two different modes in DHEX. If you run it with just one filename, 
like "./dhex [inputfile]", it opens up in the editmode. If you use two filenames
"./dhex [inputfile] [diffile]" it opens up in the diffmode. Here you can see the
difference between two files.

-- USAGE
When you start DHEX with "dhex [inputfile]" it will show you the contents of the
inputfile via hexadezimal numbers on the left, and its ASCII-content on the 
right. On the bottom you can see the Mainmenu.
-- USAGE.HEX AND ASCII
  To switch your cursor between the hex- and ASCII-values, just hit the TAB-key.

-- USAGE.MOVEMENT
  To move around in the file you can use the cursorkeys, and also PageUp and
  PageDown. In Diff-mode the Tab-key lets you jump to the next difference.
  If your terminal doesn't support cursorkeys, you are free to use the <h,j,k,l>
  keys while your cursor is on the hex-side of your screen.

-- USAGE.EDITING
  While you are on the hex-side of your screen you can type in digits between
  0..F to change the value inside the file. While you are on the ascii-side you
  can use any printable character. Changes will be shown in a different color.
  Anyhow, if you do not like the changes you made, just hit F9 (or '(') to undo
  your change.
  Changes will only be saved when you are exiting DHEX.

-- USAGE.MENU
  The menu at the bottom is accessible by the F1-F10-keys. 
  If your terminal doesn't support them, just press Shift+1...Shift+0 while your
  cursor is on the hex-side of your screen. 

-- USAGE.SEARCH
  To search a specific pattern inside your inputfile hit F1 (or !). This will 
  open up the Search-Menu for you.
  Enter your searchpattern on top of the window.
  If you want to write your results into a file, just check the "Write Result
  to file" item and type in a filename underneath.
  If you want to reuse old results, check the "Read Searchpos. from file" item
  and type in the filename underneath. IT MUST BE DIFFERENT FROM THE NAME ABOVE!
  This will allow you to find specific changes in your file. 
  When satisfied, use the "Search Forward" Button, the "Backward" won't work.
  Later use F5 (or %) to search on.

-- USAGE.GOTO
  Press F2 (or @) to open up the GOTO-Menu. Hit Enter on "To:" to type in the
  offset you want to jump to. After that hit Enter on "Goto".

-- USAGE.HEXCALC
  Press F3 (or #) to open up the HexCalc Menu. Here you can enter any value you
  want in binary-, octal-, dezimal- and hexadezimal representation. The others 
  will be calculated.

-- USAGE.EXIT
  Press F10 (or ')') to exit DHEX. It'll ask you if you want to save the changes
  you made.

-- LICENSE
DHEX is published under the GPL. Run "dhex -gpl" or read the "gpl.txt" for more
details.

-- KNOWN BUGS
This is my initial release, so i got to warn you: It comes totally without any
kind of warranty! Not every feature has been implemented yet, for example you
can only search forward in a file, there is not replace-function yet and I have
never tested it with bigger files (>=2GB). Anyhow, i thought to myself "Release
early, release early" ;-)

So have fun!

The known bugs are:
- No backwardsearching whatsoever
- It crashes when you try to write searchfiles in a write-protected directory
- It crashes when you try to read searchfiles that aren't existing
- It crashes when you try to edit bigger files
- It crashes when you try to change more than 524288 positions in the file
- It crashes when the inputfile changes through another program, while dhex is
  still open.
- Some graphical glitches
- No searching in the Diff-Mode
- No editing in the Diff-Mode
