First attempt at an Emacs mode that syntax-highlights Halibut markup.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9259 cda61777-01e9-0310-a592-d414129be87e
Allow macro definitions to be terminated by tok_eof as well as
tok_eop, to prevent Halibut tight-looping when a definition is the
last thing in a file.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9419 cda61777-01e9-0310-a592-d414129be87e
Bug in utoi(), which made it ignore a leading minus sign when
converting a number! Oops. Now you can do things like

\cfg{text-list-indent}{-2}
\cfg{text-listitem-indent}{2}

to get your bullets placed in the left margin rather than indenting
the paragraphs of your list.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9474 cda61777-01e9-0310-a592-d414129be87e
Add an error check for correct formatting in Deflate uncompressed
block headers. (Ubuntu 12.04's gcc spotted that nlen was unused, which
it shouldn't have been.)


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9475 cda61777-01e9-0310-a592-d414129be87e
Ahem. Don't invert the length _twice_.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9476 cda61777-01e9-0310-a592-d414129be87e
Remove a bunch of unused variables spotted by Ubuntu 12.04's gcc.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9478 cda61777-01e9-0310-a592-d414129be87e
Apply r6972 from my other copy of deflate.c: don't lose the BFINAL bit
on an uncompressed block.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9482 cda61777-01e9-0310-a592-d414129be87e
Now that you can specify negative indents in Halibut text mode, it's
possible to specify an indent which is _overall_ negative, i.e.
intended to be off the left-hand side of the text file. There's no
nice way to handle this, but printing O(2^32) spaces in a while (n--)
loop is particularly bad. Fix the loop to read while (n-- > 0), so
that at least it doesn't get _that_ badly confused.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9491 cda61777-01e9-0310-a592-d414129be87e
OS X Lion's compiler spotted two missing casts, where we use %hu and
pass something that isn't necessarily an unsigned short.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9493 cda61777-01e9-0310-a592-d414129be87e
Make the Deflate decoder correctly handle the special case of a
dynamic block in which the backward-distances Huffman table contains
no entries at all. (In this situation it's impossible to use the
distance table, and therefore the block must contain nothing but
Huffman-coded literals.)


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9550 cda61777-01e9-0310-a592-d414129be87e
Patch from Maciej Adamczyk to set standard output to binary mode in
the standalone deflate utility modes, so you can redirect output to a
file and end up with correct data in that file.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9552 cda61777-01e9-0310-a592-d414129be87e
Revamp of the Halibut error handling mechanism.

I'm not quite sure why I ever thought it was a good idea to have a
central variadic error() function taking an integer error code
followed by some list of arguments that depend on that code. It now
seems obvious to me that it's a much more sensible idea to have a
separate function per error, so that we can check at compile time that
the arguments to each error call are of the right number and type! So
I've done that instead.

A side effect is that the errors are no longer formatted into a
fixed-size buffer before going to stderr, so I can remove all the
%.200s precautions in the format strings.


git-svn-id: svn://svn.tartarus.org/sgt/halibut@9639 cda61777-01e9-0310-a592-d414129be87e
Merge remote branch 'remotes/trunk'