Initial checkin of AXE files


git-svn-id: svn://svn.tartarus.org/sgt@458 cda61777-01e9-0310-a592-d414129be87e
First draft of revised AXE which uses B-trees internally. Unaffected
file data is now stored as a (stream,offset,length) tuple rather
than longhand and moved about in that form as far as possible,
meaning that a file can be `loaded' instantaneously no matter how
large. Downside is that the file must be unchanged on disk
throughout the editing session, or editing and saving will fail.
Testing is so far minimal, but it looks OK so far. Oh, except that
file offsets are currently `int' and so the ability to handle
stupidly big files is not yet _really_ stupid.


git-svn-id: svn://svn.tartarus.org/sgt@4740 cda61777-01e9-0310-a592-d414129be87e
Add a TODO.


git-svn-id: svn://svn.tartarus.org/sgt@4741 cda61777-01e9-0310-a592-d414129be87e
Added an additional element-free function to bt_new().


git-svn-id: svn://svn.tartarus.org/sgt@4742 cda61777-01e9-0310-a592-d414129be87e
Remove free-function from TODO.


git-svn-id: svn://svn.tartarus.org/sgt@4743 cda61777-01e9-0310-a592-d414129be87e
Replace the `FILE *' in a bufblk with a pointer to a separate file
structure, which we ref-count so as to be able to close the file
when the last link to it disappears. (This is currently unlikely to
happen since you wouldn't normally read in a file and alter _all_ of
it, but will become more plausible when I introduce multiple buffers
and closing one while continuing to work on another.)


git-svn-id: svn://svn.tartarus.org/sgt@4744 cda61777-01e9-0310-a592-d414129be87e
Fix bug in finding a splitpoint at the very RH edge of a tree.


git-svn-id: svn://svn.tartarus.org/sgt@4745 cda61777-01e9-0310-a592-d414129be87e
File blocks below a certain size (perhaps even BLKMAX!) are now
automatically translated into literal blocks by the cleanup
function. This keeps the maximum overhead down (prevents lots of
size-1 literal blocks interspersed with size-1 file blocks) and also
improves the ability to close files when no longer needed.


git-svn-id: svn://svn.tartarus.org/sgt@4746 cda61777-01e9-0310-a592-d414129be87e
Various bug fixes.


git-svn-id: svn://svn.tartarus.org/sgt@4748 cda61777-01e9-0310-a592-d414129be87e
Add `-e' option to enable eager loading (as we previously had).


git-svn-id: svn://svn.tartarus.org/sgt@4749 cda61777-01e9-0310-a592-d414129be87e
More fiddly bug fixes in the new buffer code. Also introduced an
optional (compilable-in) diagnostics command, which causes a dump of
the current B-tree state when you press ^X^D.


git-svn-id: svn://svn.tartarus.org/sgt@4750 cda61777-01e9-0310-a592-d414129be87e
Introduce a display abstraction which allows me to compile against
either of curses and slang. curses is far superior, partly because
it's more widely available, and mostly because in modern versions
getch() returns me either a keystroke or the magic value KEY_RESIZE,
enabling me to deal with SIGWINCH without having to do the hideous
signal handling myself, for which I love it forever.

Also, while I'm here, I've arranged that the arguments to -w and -o
are processed using strtol rather than atoi, meaning that hex
arguments with a leading 0x are automatically parsed. One can argue
back and forth about _default_ number base, but there's no real
excuse for a hex editor not to at least be _able_ to accept numbers
in hex where possible!


git-svn-id: svn://svn.tartarus.org/sgt@4751 cda61777-01e9-0310-a592-d414129be87e
Add a man page (Halibut source).


git-svn-id: svn://svn.tartarus.org/sgt@4752 cda61777-01e9-0310-a592-d414129be87e
Update TODO.


git-svn-id: svn://svn.tartarus.org/sgt@4753 cda61777-01e9-0310-a592-d414129be87e
Add a Makefile rule for building the man page.


git-svn-id: svn://svn.tartarus.org/sgt@4756 cda61777-01e9-0310-a592-d414129be87e
Now that Halibut supports subsections in man pages, the man page
can be written much more clearly.


git-svn-id: svn://svn.tartarus.org/sgt@4759 cda61777-01e9-0310-a592-d414129be87e
Some more ideas for the TODO list.


git-svn-id: svn://svn.tartarus.org/sgt@4760 cda61777-01e9-0310-a592-d414129be87e
Charlie has helpfully let me know of a (reasonably) portable way to
determine the alignment of a type. This allows me to stop requiring
node properties to be arrays of `nodecomponent', in favour of
allowing them to be any type whatsoever. All the horrid
`nodecomponent' stuff is now back in the innards of btree.c, where
it should be. This opens the way (although I haven't done it yet)
for axe to handle >2Gb files without complete doom in the B-tree
property handlers.


git-svn-id: svn://svn.tartarus.org/sgt@4773 cda61777-01e9-0310-a592-d414129be87e
My hex editor `axe' has existed in prototype for about ten years,
but since I never published it, someone else has grabbed the name
out from under me in the meantime. Hence, I'm renaming it `tweak'.


git-svn-id: svn://svn.tartarus.org/sgt@4823 cda61777-01e9-0310-a592-d414129be87e
Fix compiler warnings (missing #includes etc) thrown up by RedHat.


git-svn-id: svn://svn.tartarus.org/sgt@4824 cda61777-01e9-0310-a592-d414129be87e