simon-git: halibut (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat May 13 18:37:27 BST 2017
TL;DR:
715a3be Factor LZ77 and Huffman routines out of deflate.c.
cf30118 Reorganise prefix-independence in htmlconfig().
7e330bc New output mode to write CHM files directly.
Repository: https://git.tartarus.org/simon/halibut.git
On the web: https://git.tartarus.org/?p=simon/halibut.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-05-13 18:37:27
commit 715a3bef377aeee898c427be99b1acf440b4a5e5
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=715a3bef377aeee898c427be99b1acf440b4a5e5;hp=e446ba3cf1f72dca390e9c9a5fe987f3dcccd440
Author: Simon Tatham <anakin at pobox.com>
Date: Wed May 10 07:10:14 2017 +0100
Factor LZ77 and Huffman routines out of deflate.c.
The general routines for analysing a buffer into an LZ77ish stream of
literals and matches, and for constructing a Huffman tree in canonical
format, now live in their own source files so that they can be reused
for other similar compression formats. Deflate-specific details like
the exact file encoding are left in deflate.c.
Makefile | 2 +-
deflate.c | 644 +++-----------------------------------------------------------
huffman.c | 345 +++++++++++++++++++++++++++++++++
huffman.h | 33 ++++
lz77.c | 263 +++++++++++++++++++++++++
lz77.h | 35 ++++
6 files changed, 702 insertions(+), 620 deletions(-)
commit cf30118640f67342e287e6d609869e4416bc4b91
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=cf30118640f67342e287e6d609869e4416bc4b91;hp=715a3bef377aeee898c427be99b1acf440b4a5e5
Author: Simon Tatham <anakin at pobox.com>
Date: Sat May 13 15:15:33 2017 +0100
Reorganise prefix-independence in htmlconfig().
No functional change, but this opens the way to have further sets of
config directives that parallel the \cfg{html-foo} family but with
different prefixes in place of 'html'. The previous code to treat
prefixes 'html' and 'xhtml' the same was not general enough because it
depended on the coincidence that the former is a suffix of the latter.
bk_html.c | 109 ++++++++++++++++++++++++++++++++------------------------------
1 file changed, 57 insertions(+), 52 deletions(-)
commit 7e330bca5bc45fa7feb6c31da5c3f1b6b44c208c
web diff https://git.tartarus.org/?p=simon/halibut.git;a=commitdiff;h=7e330bca5bc45fa7feb6c31da5c3f1b6b44c208c;hp=cf30118640f67342e287e6d609869e4416bc4b91
Author: Simon Tatham <anakin at pobox.com>
Date: Sat May 13 18:33:51 2017 +0100
New output mode to write CHM files directly.
I became aware a few months ago that enough is known about CHM files
that free software _can_ write them without benefit of the MS HTML
Help compiler - in particular there's a thing called 'chmcmd' in the
Free Pascal Compiler software distribution which is more or less a
drop-in replacement for hhc.exe itself.
But although depending on chmcmd would be a bit nicer than depending
on hhc.exe, Halibut has always preferred to do the whole job itself if
it can. So here's my own from-scratch code to generate CHM directly
from Halibut source.
The new output mode is presented as a completely separate top-level
thing independent of HTML mode. Of course, in reality, the two back
ends share all of the HTML-generation code, differing only in a few
configuration defaults and the minor detail of what will be _done_
with each chunk of HTML as it's generated (this is what the recent
refactoring in b3db1cce3 was in aid of). But even so, the output modes
are properly independent from a user-visible-behaviour perspective:
they use parallel sets of config directives rather than sharing the
same ones (you can set \cfg{html-foo} and \cfg{chm-foo} independently,
for a great many values of 'foo'), and you can run either or neither
or both as you choose in a given run of Halibut.
The old HTML Help support, in the form of some config directives for
HTML mode to output the auxiliary files needed by hhc.exe, is still
around and should still work the same as it always did. I have no real
intention of removing it, partly for the reasons stated in the manual
(someone might find it useful to have Halibut generate the .HHP file
once and then make manual adjustments to it, so that they can change
styling options that the direct CHM output doesn't permit), and mostly
because it wouldn't save a great deal of code or complexity in any
case - the big two of the three auxiliary files (the HHC and HHK) have
to be generated _anyway_ to go inside the .CHM, so all the code would
have to stay around regardless.
Buildscr | 1 +
Makefile | 2 +-
bk_html.c | 393 +++++++++++++--
doc/Makefile | 8 +-
doc/chm.but | 17 -
doc/intro.but | 5 +-
doc/manpage.but | 18 +-
doc/output.but | 291 +++++++----
doc/running.but | 24 +-
error.c | 6 +
halibut.h | 4 +
lzx.c | 697 +++++++++++++++++++++++++++
lzx.h | 24 +
main.c | 1 +
winchm.c | 1436 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
winchm.h | 21 +
16 files changed, 2768 insertions(+), 180 deletions(-)
More information about the tartarus-commits
mailing list