<feed xmlns='http://www.w3.org/2005/Atom'>
<title>halibut/error.c, branch master</title>
<subtitle>My halibut tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/'/>
<entry>
<title>New output mode to write CHM files directly.</title>
<updated>2017-05-13T17:37:04+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2017-05-13T17:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=7e330bca5bc45fa7feb6c31da5c3f1b6b44c208c'/>
<id>7e330bca5bc45fa7feb6c31da5c3f1b6b44c208c</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamp of the Halibut error handling mechanism.</title>
<updated>2012-08-29T18:13:11+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2012-08-29T18:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=1489dc15967970576d08f3f2b22c6e1c939bcbcf'/>
<id>1489dc15967970576d08f3f2b22c6e1c939bcbcf</id>
<content type='text'>
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.

[originally from svn r9639]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

[originally from svn r9639]
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable Halibut to read a .but file from standard input, by supplying</title>
<updated>2009-10-24T09:08:26+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2009-10-24T09:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=ccb035ab284dcce968d948a5f04eef96c9cc541d'/>
<id>ccb035ab284dcce968d948a5f04eef96c9cc541d</id>
<content type='text'>
the special filename '-'.

[originally from svn r8728]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the special filename '-'.

[originally from svn r8728]
</pre>
</div>
</content>
</entry>
<entry>
<title>Turn the numeric parameter to err_sfntbadglyph from wchar_t to</title>
<updated>2008-07-09T17:06:29+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2008-07-09T17:06:29+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=c35b288fccdbd17dd88f57c665d0b71739e8fc6c'/>
<id>c35b288fccdbd17dd88f57c665d0b71739e8fc6c</id>
<content type='text'>
unsigned int, after a correspondent mentioned that DJGPP produces a
very scary warning about integer promotion making use of the former
in va_arg non-portable. Whether or not that's standards-justifiable,
it's certainly the case that we were casting _to_ wchar_t from
unsigned int in all cases of this error actually being used, so the
simplest thing is just to transfer the number through va_arg as
unsigned.

[originally from svn r8112]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unsigned int, after a correspondent mentioned that DJGPP produces a
very scary warning about integer promotion making use of the former
in va_arg non-portable. Whether or not that's standards-justifiable,
it's certainly the case that we were casting _to_ wchar_t from
unsigned int in all cases of this error actually being used, so the
simplest thing is just to transfer the number through va_arg as
unsigned.

[originally from svn r8112]
</pre>
</div>
</content>
</entry>
<entry>
<title>Cope with TrueType fonts with slightly broken cmaps, just ignoring code points</title>
<updated>2007-12-02T18:38:31+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2007-12-02T18:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=5527360cf7e5b68a1954874c82128690ed7df488'/>
<id>5527360cf7e5b68a1954874c82128690ed7df488</id>
<content type='text'>
that can't be resolved (apart from warning about it).

[originally from svn r7800]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
that can't be resolved (apart from warning about it).

[originally from svn r7800]
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved error handling in sfnt support.  No more calls to abort()!</title>
<updated>2007-02-11T15:19:10+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2007-02-11T15:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=6c660b39aeae18c4652a48318bff3373bb535d92'/>
<id>6c660b39aeae18c4652a48318bff3373bb535d92</id>
<content type='text'>
[originally from svn r7269]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[originally from svn r7269]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix segfault in info backend when invoked with inputs/test.but</title>
<updated>2006-12-31T18:01:08+00:00</updated>
<author>
<name>Jacob Nevins</name>
<email>jacobn@chiark.greenend.org.uk</email>
</author>
<published>2006-12-31T18:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=db26c259e5ecd9db2b9c914854b12f8ac7d7a558'/>
<id>db26c259e5ecd9db2b9c914854b12f8ac7d7a558</id>
<content type='text'>
(which triggers err_infonodechar with fpos==NULL).

[originally from svn r7044]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(which triggers err_infonodechar with fpos==NULL).

[originally from svn r7044]
</pre>
</div>
</content>
</entry>
<entry>
<title>Support for the MS HTML Help system in the HTML back end. As yet I</title>
<updated>2006-12-11T19:43:10+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2006-12-11T19:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=7a4700f5f5afcea1580ec4fcfb628afe6beb3e6b'/>
<id>7a4700f5f5afcea1580ec4fcfb628afe6beb3e6b</id>
<content type='text'>
don't know how to write out a .CHM directly, but I am at least able
to have the HTML back end write out the three auxiliary files which
enable a .CHM to be generated using the MS HTML Help compiler.

[originally from svn r6991]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
don't know how to write out a .CHM directly, but I am at least able
to have the HTML back end write out the three auxiliary files which
enable a .CHM to be generated using the MS HTML Help compiler.

[originally from svn r6991]
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct embedding of Type 1 fonts in PDF.  Error cases (e.g. invalid Type 1</title>
<updated>2006-12-09T14:44:47+00:00</updated>
<author>
<name>Ben Harris</name>
<email>bjh21@bjh21.me.uk</email>
</author>
<published>2006-12-09T14:44:47+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=76b522bc5aac82f7d1c0e3433f1620a7a192bdad'/>
<id>76b522bc5aac82f7d1c0e3433f1620a7a192bdad</id>
<content type='text'>
fonts) may not be well handled, and may emit invalid PDF.

[originally from svn r6974]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fonts) may not be well handled, and may emit invalid PDF.

[originally from svn r6974]
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce global (cross-backend) \cfg{contents} and \cfg{index}</title>
<updated>2006-06-02T19:19:12+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>anakin@pobox.com</email>
</author>
<published>2006-06-02T19:19:12+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/halibut/commit/?id=9e8ca006788e2148154711e1e67b88f495d94e26'/>
<id>9e8ca006788e2148154711e1e67b88f495d94e26</id>
<content type='text'>
commands, allowing the fixed words "Contents" and "Index" generated
in various output formats to be reconfigured into other languages.

[originally from svn r6724]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commands, allowing the fixed words "Contents" and "Index" generated
in various output formats to be reconfigured into other languages.

[originally from svn r6724]
</pre>
</div>
</content>
</entry>
</feed>
