sgt/halibut
17 years agoNow we have the new `module' command, use it.
simon [Mon, 5 Feb 2007 12:43:17 +0000 (12:43 +0000)]
Now we have the new `module' command, use it.

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

17 years agoQuell warnings about declared but undefined static functions by not declaring
ben [Sun, 4 Feb 2007 23:41:42 +0000 (23:41 +0000)]
Quell warnings about declared but undefined static functions by not declaring
them either.

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

17 years agoAdd a "const" to the argument of dupstr() so that GCC doesn't complain when
ben [Sun, 4 Feb 2007 23:39:47 +0000 (23:39 +0000)]
Add a "const" to the argument of dupstr() so that GCC doesn't complain when
we pass it a constant string.

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

17 years agoTidy up the handling of non-standard glyphs by defining glyph_extern()
ben [Sun, 4 Feb 2007 14:16:26 +0000 (14:16 +0000)]
Tidy up the handling of non-standard glyphs by defining glyph_extern()
early and using it whenever we need the name of a non-standard glyph.

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

17 years agoBuild script for building Halibut using bob.
simon [Sun, 4 Feb 2007 11:13:43 +0000 (11:13 +0000)]
Build script for building Halibut using bob.

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

17 years agoCorrect a comment.
ben [Sat, 3 Feb 2007 14:40:40 +0000 (14:40 +0000)]
Correct a comment.

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

17 years agoQuell some warnings from GCC.
ben [Sat, 3 Feb 2007 14:14:32 +0000 (14:14 +0000)]
Quell some warnings from GCC.

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

17 years agoWhen adding a new file, it helps to "svn add" it.
ben [Sat, 3 Feb 2007 14:08:09 +0000 (14:08 +0000)]
When adding a new file, it helps to "svn add" it.

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

17 years agoWhen loading a Type 1 font, remember to terminate the linked list we load
ben [Sat, 3 Feb 2007 14:05:32 +0000 (14:05 +0000)]
When loading a Type 1 font, remember to terminate the linked list we load
it into.

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

17 years agoAdd support for using TrueType fonts, including embedding in PostScript but
ben [Sat, 3 Feb 2007 14:02:21 +0000 (14:02 +0000)]
Add support for using TrueType fonts, including embedding in PostScript but
not yet in PDF.  There's a lot of cleaning up to be done, especially in the
area of error, but I think it would be better committed gradually.

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

17 years agoAdd an `Up' link to the HTML navigation bar of sufficiently deep documents.
jacob [Wed, 31 Jan 2007 23:32:12 +0000 (23:32 +0000)]
Add an `Up' link to the HTML navigation bar of sufficiently deep documents.
(This doesn't affect any of the source texts I know about.)
Also add <link rel="up">, even in the cases where it's just the same as
<link rel="ToC">. (This does.)

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

17 years agoI haven't found any browsers that do anything disgusting with
jacob [Wed, 31 Jan 2007 22:23:09 +0000 (22:23 +0000)]
I haven't found any browsers that do anything disgusting with
\cfg{html-rellinks}, and it generally seems to be a Good Thing, so I've
turned it on by default. (The lurkers support me in u2u.)

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

17 years agoUse consistent capitalisation for HTML tags.
jacob [Sun, 28 Jan 2007 18:42:50 +0000 (18:42 +0000)]
Use consistent capitalisation for HTML tags.

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

17 years agoMinimal support for <LINK REL="next"> etc machine-readable navigation links.
jacob [Sun, 28 Jan 2007 17:16:48 +0000 (17:16 +0000)]
Minimal support for <LINK REL="next"> etc machine-readable navigation links.

Off by default for now, but I don't intend that it should stay this way; they
seem useful and harmless. I just want to check a few more browsers to ensure
they don't do anything obnoxious with them.

So far I've only seen lynx and links do something with them (provide toolbars).
iCab and some Mozilla derivatives/extensions are also alleged to do this; Opera
is said to allow PgDn type browsing through the entire set of pages; and
Mozilla is rumoured to use the "next" link for prefetching.

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

17 years agoTweak the HTML Help output to enable Previous/Next navigation in the generated
jacob [Sun, 28 Jan 2007 16:22:43 +0000 (16:22 +0000)]
Tweak the HTML Help output to enable Previous/Next navigation in the generated
CHM, and added the toolbar buttons for this.

Also rationalised the other options a bit:
 - added Forward button (since we have Back);
 - removed Locate/Sync (since we have auto-sync enabled for the ToC);
 - removed Stop and Refresh (mostly a waste of space for help, but still
   available from the Options menu if users really want them);
 - enabled advanced facilities on the Search tab (search within results, etc).

All this seems to have had no obvious ill effects (tested on Win98), although
the resulting CHM file is slightly bigger (~3kbyte, <1%).

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

17 years agoAdd support for PFB files. This seems to have caused me to completely
ben [Sat, 27 Jan 2007 20:47:41 +0000 (20:47 +0000)]
Add support for PFB files.  This seems to have caused me to completely
rewrite the Type 1 font support, and I'm sure the result is more complex
than it needs to be, but it seems to work correctly, so I shouldn't
complain.

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

17 years agoDuplicate fix of Kevin Lyles's bug from r7092.
simon [Thu, 11 Jan 2007 09:39:35 +0000 (09:39 +0000)]
Duplicate fix of Kevin Lyles's bug from r7092.

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

17 years agoUpdate the TODO list to match the current state of the world.
ben [Sun, 7 Jan 2007 11:51:18 +0000 (11:51 +0000)]
Update the TODO list to match the current state of the world.

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

17 years agoAdd a mechanism for disabling ligature substitution for an entire paragraph
ben [Sun, 7 Jan 2007 11:48:58 +0000 (11:48 +0000)]
Add a mechanism for disabling ligature substitution for an entire paragraph
and apply it to code paragraphs.

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

17 years agoOur standard mapping for the first font should start at 0x20, not 0x21.
ben [Sun, 7 Jan 2007 00:20:25 +0000 (00:20 +0000)]
Our standard mapping for the first font should start at 0x20, not 0x21.

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

17 years agoSupport for getting ligature information from AFM files, which was the
ben [Sun, 7 Jan 2007 00:15:52 +0000 (00:15 +0000)]
Support for getting ligature information from AFM files, which was the
whole point of the glyph renumbering.

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

17 years agoMake ps_glyph_to_unicode() take a glyph index instead of a glyph name.
ben [Sat, 6 Jan 2007 17:47:34 +0000 (17:47 +0000)]
Make ps_glyph_to_unicode() take a glyph index instead of a glyph name.

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

17 years agoOverhaul of glyph-name handling in the paper backends. Before, we had
ben [Sat, 6 Jan 2007 17:32:34 +0000 (17:32 +0000)]
Overhaul of glyph-name handling in the paper backends.  Before, we had
a separate dense array of glyph names for each font, and referenced glyphs
by indicies into that array, which meant that the array had to be set
up before we could generate any indices.  Now we have an overall array of
glyph names, and use the same glyph indicies for all fonts.  Some arrays
have had to turn into tree234s as a result.

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

17 years agoI've worked out why ligation was being (correctly) suppressed in code
ben [Sat, 6 Jan 2007 16:05:28 +0000 (16:05 +0000)]
I've worked out why ligation was being (correctly) suppressed in code
paragraphs and found some cases where it isn't.  Add test cases for these
to remind me to deal with them later.

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

17 years agoJames should apparently have been removed from this file years ago. Fix that.
ben [Tue, 2 Jan 2007 22:38:23 +0000 (22:38 +0000)]
James should apparently have been removed from this file years ago.  Fix that.

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

17 years agoFix the behaviour of constructions like \e{index \i{term}} -- the index tag
jacob [Mon, 1 Jan 2007 21:27:39 +0000 (21:27 +0000)]
Fix the behaviour of constructions like \e{index \i{term}} -- the index tag
was causing emphasis to be broken (particularly noticeable in text-like
backends). There are some instances of this in the PuTTY manual, for instance.

Unfortunately, \k references in similar situations still aren't quite right,
but fixing that will be more involved, and I haven't found any instances
yet.

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

17 years agoBump copyright dates, and change the one at the start of the manual to be
ben [Mon, 1 Jan 2007 15:40:57 +0000 (15:40 +0000)]
Bump copyright dates, and change the one at the start of the manual to be
a range rather than a single year.

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

17 years agoGenerate ligature information from the standard AFM files rather than
ben [Mon, 1 Jan 2007 15:32:32 +0000 (15:32 +0000)]
Generate ligature information from the standard AFM files rather than
hard-coding it.  No practical gain, since the hard-coded entries were correct,
but aesthetically better.

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

17 years agoInitial ligature support. This adds support for emitting ligatures, and adds
ben [Sun, 31 Dec 2006 21:38:46 +0000 (21:38 +0000)]
Initial ligature support.  This adds support for emitting ligatures, and adds
the "fi" and "fl" ligatures to the built-in fonts, but doesn't add support
for reading ligature information from AFM files because that requires coping
with forward references to glyph names, which is tricky.

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

17 years agoFix segfault in info backend when invoked with inputs/test.but
jacob [Sun, 31 Dec 2006 18:01:08 +0000 (18:01 +0000)]
Fix segfault in info backend when invoked with inputs/test.but
(which triggers err_infonodechar with fpos==NULL).

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

17 years agoEmit lots of odd characters so as to test the paper backends' ability to
ben [Sun, 31 Dec 2006 14:36:13 +0000 (14:36 +0000)]
Emit lots of odd characters so as to test the paper backends' ability to
use two encodings of the same font.

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

17 years agoTweak /OUT pdfmark generation -- PLRM suggests that constructing a large
ben [Tue, 12 Dec 2006 21:51:33 +0000 (21:51 +0000)]
Tweak /OUT pdfmark generation -- PLRM suggests that constructing a large
executable array is likely to use lots of stack space, which might be bad on
Level 1 interpreters, so use the same mechanism as for other pdfmarks and
have a procedure that does nothing if pdfmark isn't defined.

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

17 years agoThese HHP window dimensions seem to be rubbish. Better off without
simon [Tue, 12 Dec 2006 21:36:08 +0000 (21:36 +0000)]
These HHP window dimensions seem to be rubbish. Better off without
any, I reckon.

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

17 years agoRough-and-ready line wrapping for PostScript, to keep us below the DSC-mandated
ben [Tue, 12 Dec 2006 00:13:59 +0000 (00:13 +0000)]
Rough-and-ready line wrapping for PostScript, to keep us below the DSC-mandated
255 characters per line (excluding newline characters).  In fact, it tries to
keep us below 80 characters so as to make the PostScript more readable (and
demonstrate that it's working).

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

17 years agoActually, the separator in the "NAME" section really ought to be an
ben [Mon, 11 Dec 2006 23:28:51 +0000 (23:28 +0000)]
Actually, the separator in the "NAME" section really ought to be an
EN DASH, falling back to MINUS and then HYPHEN-MINUS.  Make it so.

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

17 years agoSupport for the MS HTML Help system in the HTML back end. As yet I
simon [Mon, 11 Dec 2006 19:43:10 +0000 (19:43 +0000)]
Support for the MS HTML Help system in the HTML back end. As yet I
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.

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

17 years agoJust noticed that Ben missed another PostScript/PDF inversion.
simon [Mon, 11 Dec 2006 14:15:15 +0000 (14:15 +0000)]
Just noticed that Ben missed another PostScript/PDF inversion.

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

17 years agoFix amusing cut-and-paste error in section keywords :-)
simon [Mon, 11 Dec 2006 09:54:06 +0000 (09:54 +0000)]
Fix amusing cut-and-paste error in section keywords :-)

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

17 years agoMake the title a bit scarier to test the PostScript backend some more,
ben [Sun, 10 Dec 2006 23:18:15 +0000 (23:18 +0000)]
Make the title a bit scarier to test the PostScript backend some more,
including testing some bug fixes it doesn't have yet.

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

17 years agoExplicitly set the title via pdfmark, since that allows us to put
ben [Sun, 10 Dec 2006 22:11:35 +0000 (22:11 +0000)]
Explicitly set the title via pdfmark, since that allows us to put
in Unicode, which we can't (reliably) in %%Title.

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

17 years agoRemove accidentally-committed deflate-debugging code.
ben [Sun, 10 Dec 2006 00:34:21 +0000 (00:34 +0000)]
Remove accidentally-committed deflate-debugging code.

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

17 years agoPut all the pieces together: introduce a secondary test mode for
simon [Sat, 9 Dec 2006 20:25:00 +0000 (20:25 +0000)]
Put all the pieces together: introduce a secondary test mode for
winhelp.c which uses all my new library code to import an arbitrary
PNG and embed it into the test help file.

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

17 years agoRemember to initialise the bmp array for AFM fonts, or Unicode fallbacks
ben [Sat, 9 Dec 2006 20:12:30 +0000 (20:12 +0000)]
Remember to initialise the bmp array for AFM fonts, or Unicode fallbacks
won't work properly.

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

17 years agoSupport, in the winhelp module only, for adding pictures to .HLP
simon [Sat, 9 Dec 2006 18:03:18 +0000 (18:03 +0000)]
Support, in the winhelp module only, for adding pictures to .HLP
files. Halibut does not make use of this feature, but I hope that
one day it might.

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

17 years agoUpdate copyright dates.
ben [Sat, 9 Dec 2006 16:11:21 +0000 (16:11 +0000)]
Update copyright dates.

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

17 years agoSome documentation of Halibut's font-embedding support, now that it works.
ben [Sat, 9 Dec 2006 15:21:53 +0000 (15:21 +0000)]
Some documentation of Halibut's font-embedding support, now that it works.

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

17 years agoThis somehow got missed in my "put PDF before PostScript" sweep.
ben [Sat, 9 Dec 2006 15:21:07 +0000 (15:21 +0000)]
This somehow got missed in my "put PDF before PostScript" sweep.

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

17 years agoMention PDF before PostScript everywhere, partly because PDF is the
ben [Sat, 9 Dec 2006 15:02:32 +0000 (15:02 +0000)]
Mention PDF before PostScript everywhere, partly because PDF is the
dominant format for print-oriented documents, but mostly because it's
hard to mention pdfmark without having mentioned PDF already.

Also mention pdfmark.

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

17 years agoCorrect embedding of Type 1 fonts in PDF. Error cases (e.g. invalid Type 1
ben [Sat, 9 Dec 2006 14:44:47 +0000 (14:44 +0000)]
Correct embedding of Type 1 fonts in PDF.  Error cases (e.g. invalid Type 1
fonts) may not be well handled, and may emit invalid PDF.

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

17 years agoI've just noticed some unacceptably long lines in code paragraphs in
simon [Thu, 7 Dec 2006 18:09:37 +0000 (18:09 +0000)]
I've just noticed some unacceptably long lines in code paragraphs in
the Halibut manual. They turn out to be \cfg directives with
multiple braced sections after them. The obvious thing to do for
legibility would be to wrap those sections by putting newlines
between } and {, but that isn't legal in the Halibut syntax.

Therefore, it is now :-) For paragraph types which don't have any
body text (such as \cfg), we are now lenient about whitespace
between multiple keywords. So I can fix the docs so they don't go
over the limit, and be confident that the fixed version is still
technically accurate.

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

17 years agoFix typo in limit test in deflate_buildhuf(). (The only two limit
simon [Thu, 7 Dec 2006 18:07:45 +0000 (18:07 +0000)]
Fix typo in limit test in deflate_buildhuf(). (The only two limit
values ever used are 15 and 7, so testing against 16 is silly.)

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

17 years agoSpecify the /Border of /ANN pdfmarks correctly.
ben [Thu, 7 Dec 2006 14:00:12 +0000 (14:00 +0000)]
Specify the /Border of /ANN pdfmarks correctly.

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

17 years agoUpdate deflate.c to include nearly all the changes I've been making
simon [Wed, 6 Dec 2006 19:12:44 +0000 (19:12 +0000)]
Update deflate.c to include nearly all the changes I've been making
in the main version. The one missing thing is the fancy new LZ77
compressor in misc/libcode/lz77.c, in whose stability I'm not yet
confident enough to consider it ready for prime-time.

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

17 years agoDistingush font files from other input by magic number rather than name.
ben [Tue, 5 Dec 2006 00:04:18 +0000 (00:04 +0000)]
Distingush font files from other input by magic number rather than name.
This prevents one having Halibut files that begin "StartFontMetrics",
"%!FontType1-", or "%!PS-AdobeFont-", but I doubt that will be a great
hardship.

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

17 years agoTwo of the bugs listed in the man page are out of date: Unicode and
simon [Mon, 4 Dec 2006 14:51:39 +0000 (14:51 +0000)]
Two of the bugs listed in the man page are out of date: Unicode and
character set support, and the HTML back end, have both been
extensively revamped since that section was written, and I think
neither of them is shoddy enough to warrant this sort of
self-disparagement any more.

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

17 years agoPaging through the newly compressed PDF manual to make sure it
simon [Mon, 4 Dec 2006 14:50:36 +0000 (14:50 +0000)]
Paging through the newly compressed PDF manual to make sure it
worked, I happened to notice this typo. I think Wikipedia might have
permanently removed my ability to read any document for any purpose
without spotting at least one error in it.

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

17 years agoTweak prologue so that it works correctly on interpreters that don't support
ben [Sun, 3 Dec 2006 13:23:55 +0000 (13:23 +0000)]
Tweak prologue so that it works correctly on interpreters that don't support
pdfmark, specifically by having the dummy versions of "p", "x", and "u" pop
their arguments rather than leaving them on the stack to cause trouble.

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

17 years agoSupport for emitting outlines using pdfmark.
ben [Sat, 2 Dec 2006 16:33:22 +0000 (16:33 +0000)]
Support for emitting outlines using pdfmark.

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

17 years agoPDF outlines already do use PDFDocEncoding or Unicode, so remove that from
ben [Sat, 2 Dec 2006 14:23:17 +0000 (14:23 +0000)]
PDF outlines already do use PDFDocEncoding or Unicode, so remove that from
the TODO list.

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

17 years agoAdjust ps_string so that it escapes characters above 126. This makes
ben [Sat, 2 Dec 2006 14:02:35 +0000 (14:02 +0000)]
Adjust ps_string so that it escapes characters above 126.  This makes
Halibut's output 7-bit clean, which seems the best approach in PostScript.

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

17 years agoRough pdfmark support. Links are implemented, but not outlines.
ben [Sat, 2 Dec 2006 13:25:23 +0000 (13:25 +0000)]
Rough pdfmark support.  Links are implemented, but not outlines.

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

17 years agoAdd a procedure to our prologue to draw filled rectangles, and use it.
ben [Fri, 1 Dec 2006 23:43:55 +0000 (23:43 +0000)]
Add a procedure to our prologue to draw filled rectangles, and use it.

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

17 years agoFactor out printing a destination (in either an annotation or an outline)
ben [Fri, 1 Dec 2006 22:15:36 +0000 (22:15 +0000)]
Factor out printing a destination (in either an annotation or an outline)
into its own function.

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

17 years agoIncrease page-tree branching factor from two to eight, since two was obviously
ben [Fri, 1 Dec 2006 21:15:51 +0000 (21:15 +0000)]
Increase page-tree branching factor from two to eight, since two was obviously
silly, and eight isn't.

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

17 years agoAdd support for compressed PDF streams, using Simon's new deflate library.
ben [Thu, 30 Nov 2006 23:19:00 +0000 (23:19 +0000)]
Add support for compressed PDF streams, using Simon's new deflate library.

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

17 years agoSmall tweak: add a /ProcSet array to the top-level /Resources dictionary,
ben [Sun, 26 Nov 2006 00:24:09 +0000 (00:24 +0000)]
Small tweak: add a /ProcSet array to the top-level /Resources dictionary,
as recommended by the PDF spec.

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

17 years agoExplicitly explain the meaning of each HTML variant.
ben [Sat, 18 Nov 2006 21:39:58 +0000 (21:39 +0000)]
Explicitly explain the meaning of each HTML variant.

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

17 years agoEmit a PageLabels dictionary to make it clear what page numbering scheme
ben [Sat, 18 Nov 2006 21:26:04 +0000 (21:26 +0000)]
Emit a PageLabels dictionary to make it clear what page numbering scheme
Halibut uses.

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

17 years ago`man', at least on Debian 3.1, will treat a paragraph beginning with
simon [Wed, 11 Oct 2006 11:13:30 +0000 (11:13 +0000)]
`man', at least on Debian 3.1, will treat a paragraph beginning with
a period specially _even_ if there's an \fB or similar escape
sequence before the period. Therefore, man_rdaddctrl() now doesn't
clear the QUOTE_INITCTRL flag just because it generated some text;
instead, its call sites clear the flag when the _type_ of generated
text is appropriate for this. This should remove an error from the
`lns' man page (utils/lns/lns.but), which was where I noticed the
problem.

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

17 years agoIntroduce global (cross-backend) \cfg{contents} and \cfg{index}
simon [Fri, 2 Jun 2006 19:19:12 +0000 (19:19 +0000)]
Introduce global (cross-backend) \cfg{contents} and \cfg{index}
commands, allowing the fixed words "Contents" and "Index" generated
in various output formats to be reconfigured into other languages.

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

18 years agoAbout time I fixed this: allow for some people's md5sum utilities
simon [Fri, 19 May 2006 13:08:29 +0000 (13:08 +0000)]
About time I fixed this: allow for some people's md5sum utilities
producing output on stdout even in -c mode.

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

18 years agoMissing error handling: the HTML and WinHelp back ends would both
simon [Thu, 18 May 2006 08:38:41 +0000 (08:38 +0000)]
Missing error handling: the HTML and WinHelp back ends would both
segfault if they were unable to open their output files.

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

18 years agoOn Level 2 implementations, use setpagedevice to select the correct page size.
ben [Tue, 16 May 2006 22:55:46 +0000 (22:55 +0000)]
On Level 2 implementations, use setpagedevice to select the correct page size.

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

18 years agoTighten formatting of PDF annotations, making them direct rather than indirect
ben [Sun, 14 May 2006 23:00:13 +0000 (23:00 +0000)]
Tighten formatting of PDF annotations, making them direct rather than indirect
objects and removing some surplus whitespace.  This saves 40K in the Halibut
manual.

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

18 years agoGenerate rather more compact /Differences tables for font encodings, mostly
ben [Sun, 14 May 2006 18:32:08 +0000 (18:32 +0000)]
Generate rather more compact /Differences tables for font encodings, mostly
so I don't have to press SPACE so much to get to the interesting part of the
file.

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

18 years agoThere's no need to reset the font every line if it hasn't changed. This saves
ben [Sun, 14 May 2006 18:27:34 +0000 (18:27 +0000)]
There's no need to reset the font every line if it hasn't changed.  This saves
a few K and a lot of calls to scalefont and setfont, which is probably good.

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

18 years agoFairly ropey font-embedding support. In particular, the PDF output is
ben [Sun, 14 May 2006 13:42:48 +0000 (13:42 +0000)]
Fairly ropey font-embedding support.  In particular, the PDF output is
technically incorrect, though it works perfectly well with xpdf.  To do
it properly requires actually parsing the unencrypted part of a Type 1
font, which will be a bit tedious in C.

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

18 years agoGenerate a more-or-less valid /FontDescriptor dictionary for non-standard
ben [Sat, 13 May 2006 15:52:03 +0000 (15:52 +0000)]
Generate a more-or-less valid /FontDescriptor dictionary for non-standard
fonts in PDF output.

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

18 years agoNow that we've got definitive metrics for the standard fonts, there's no need
ben [Sat, 13 May 2006 14:36:15 +0000 (14:36 +0000)]
Now that we've got definitive metrics for the standard fonts, there's no need
to embed /FirstChar, /LastChar, /Widths or (soon) /FontDescriptor for them.

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

18 years agoAdd Adobe copyright notice and licence text here too.
ben [Sat, 13 May 2006 14:21:00 +0000 (14:21 +0000)]
Add Adobe copyright notice and licence text here too.

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

18 years agoInitial support for adding fonts at run-time. Currently we only support
ben [Sat, 13 May 2006 13:56:05 +0000 (13:56 +0000)]
Initial support for adding fonts at run-time.  Currently we only support
loading AFM files, we recognise them by name, and we can't embed fonts in
the output (which is also invalid, though accepted by xpdf, in the PDF case).
Oh, and there's no documentation.  Still, it's a start.

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

18 years agoMake /Widths arrays for fonts more compact by using FirstChar and LastChar
ben [Wed, 10 May 2006 19:30:21 +0000 (19:30 +0000)]
Make /Widths arrays for fonts more compact by using FirstChar and LastChar
to skip unused code points.

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

18 years agoAdd a /Info dictionary to PDF output, containing the title and producer
ben [Wed, 10 May 2006 18:31:07 +0000 (18:31 +0000)]
Add a /Info dictionary to PDF output, containing the title and producer
of the document.  This means that (e.g.) gv displays the title correctly.

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

18 years agoA page's MediaBox, like its Resources, is inheritable, so rather than
ben [Wed, 10 May 2006 12:55:16 +0000 (12:55 +0000)]
A page's MediaBox, like its Resources, is inheritable, so rather than
putting one in each page, put a single one in the top-level page tree node.
This saves us all a few kilobytes in the Halibut manual.

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

18 years ago297mm is closer to 842pt than to 841pt, and the former seems to be the
ben [Tue, 9 May 2006 22:43:09 +0000 (22:43 +0000)]
297mm is closer to 842pt than to 841pt, and the former seems to be the
accepted length of A4 paper in the PostScript/PDF world, so use it as
our default.

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

18 years agoWhen setting up a font, if we've done that font already, return the
ben [Tue, 9 May 2006 22:13:58 +0000 (22:13 +0000)]
When setting up a font, if we've done that font already, return the
existing instance.  This saves outputting each font several times.

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

18 years agoAdd font-selection mechanism to the paper backend. Since we have no way to
ben [Mon, 8 May 2006 22:54:19 +0000 (22:54 +0000)]
Add font-selection mechanism to the paper backend.  Since we have no way to
load font metrics dynamically, we're restricted to the fonts whose metrics
are compiled into Halibut.  Font structures aren't reused when the same
font is specified twice, nor are unused fonts removed from the output.
Finally, the default configuration overflows lines in the manual, but this
would need a change to Halibut's grammar to fix.

Still, what's there works.

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

18 years agoNow that I've found the core AFMs, I notice that they have a perfectly
ben [Mon, 8 May 2006 20:25:21 +0000 (20:25 +0000)]
Now that I've found the core AFMs, I notice that they have a perfectly
good free licence.  Abide by its terms even though I'm not sure Halibut
is a derived work in law.

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

18 years agoUpdate URLs for PostScript data files.
ben [Mon, 8 May 2006 18:11:59 +0000 (18:11 +0000)]
Update URLs for PostScript data files.

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

18 years agoIt's conventional to use a minus sign rather than a hyphen to separate
ben [Mon, 8 May 2006 00:08:48 +0000 (00:08 +0000)]
It's conventional to use a minus sign rather than a hyphen to separate
the description from the name in the NAME section of a manpage.  Halibut
can do that now, so make use of that ability.

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

18 years agoNew configuration directives need new aliases in the index too.
ben [Sun, 7 May 2006 23:59:02 +0000 (23:59 +0000)]
New configuration directives need new aliases in the index too.

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

18 years agoFactor out another routine from man_rdaddwc(), this one to add a control
ben [Sun, 7 May 2006 12:55:32 +0000 (12:55 +0000)]
Factor out another routine from man_rdaddwc(), this one to add a control
string to the output.  This incidentally fixes a bug whereby font changes
at the start of a line weren't resetting QUOTE_INITCTRL.

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

18 years agoPull the code to reset the output charset state out of man_rdaddwc() into
ben [Sun, 7 May 2006 12:44:53 +0000 (12:44 +0000)]
Pull the code to reset the output charset state out of man_rdaddwc() into
its own function, since it's called so many times.  Also call it in two places
I'd missed.

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

18 years agoWhen we want a printed backslash, use \e rather than \\, since the former
ben [Sun, 7 May 2006 11:35:51 +0000 (11:35 +0000)]
When we want a printed backslash, use \e rather than \\, since the former
works correctly inside macro arguments.

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

18 years agoAdd support for nonbreaking hyphens to the "man" backend. man_rdaddwc() is beginning
ben [Sat, 6 May 2006 22:58:26 +0000 (22:58 +0000)]
Add support for nonbreaking hyphens to the "man" backend.  man_rdaddwc() is beginning
to get ugly.

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

18 years agoDisplay the "breaks" flag when generating a debugging dump.
ben [Sat, 6 May 2006 22:16:38 +0000 (22:16 +0000)]
Display the "breaks" flag when generating a debugging dump.

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

18 years agoSupport for non-breaking spaces in the "man" backend. This has the odd side-effect
ben [Sat, 6 May 2006 22:04:29 +0000 (22:04 +0000)]
Support for non-breaking spaces in the "man" backend.  This has the odd side-effect
that breaking spaces are now forces to be ASCII spaces in output, whatever output
charset is in force.  I doubt this will inconvenience anyone.

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

18 years agoImprove rule generation in the "man" backend so that if the output
ben [Sat, 6 May 2006 20:01:09 +0000 (20:01 +0000)]
Improve rule generation in the "man" backend so that if the output
is processed by nroff, the rule is made up of \cfg{man-rule}
characters (same defaults as \cfg{text-rule}).

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

18 years agoSupport for TROFF named characters, so we can have proper bullets in our lists,
ben [Sat, 6 May 2006 19:24:29 +0000 (19:24 +0000)]
Support for TROFF named characters, so we can have proper bullets in our lists,
and incidentally proper (single) quotation marks too.  This reworks a lot of
man_convert, but I think the result is correct.

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

18 years agoAdd tests of ` and ' characters, since they need special handling in the man backend.
ben [Sat, 6 May 2006 19:18:52 +0000 (19:18 +0000)]
Add tests of ` and ' characters, since they need special handling in the man backend.

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