sgt/halibut
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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

18 years agobetter para_Rule implementation for "man" backend, using TROFF's built-in
ben [Sat, 6 May 2006 13:59:03 +0000 (13:59 +0000)]
better para_Rule implementation for "man" backend, using TROFF's built-in
line-drawing function.

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

18 years agoIt's a new year.
jacob [Sun, 8 Jan 2006 18:18:11 +0000 (18:18 +0000)]
It's a new year.

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

18 years agoJust to be on the safe side about avoiding other portability hazards
simon [Sun, 13 Nov 2005 13:07:52 +0000 (13:07 +0000)]
Just to be on the safe side about avoiding other portability hazards
in future, add `-ansi -pedantic' to the Halibut default compile
options and fix the few resulting warnings (mostly signed/unsigned
char mismatches and commas at the ends of enums). The one remaining
warning I'm still seeing is `missing initializer' for the big table
in charset/iso2022.c, but I think the code genuinely is more
readable this way, and I haven't found a gcc option to disable that
specific warning.

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

18 years ago`version' needs to be declared `extern'.
simon [Sun, 13 Nov 2005 12:56:10 +0000 (12:56 +0000)]
`version' needs to be declared `extern'.

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

18 years agoRevert to "C" locale for LC_NUMERIC, so that PDFs won't be corrupted
simon [Sun, 13 Nov 2005 12:52:13 +0000 (12:52 +0000)]
Revert to "C" locale for LC_NUMERIC, so that PDFs won't be corrupted
by the use of a comma as a decimal separator.

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

18 years ago`style.c' appears to have been around since 1999 and never had
simon [Sat, 12 Nov 2005 15:17:53 +0000 (15:17 +0000)]
`style.c' appears to have been around since 1999 and never had
anything in it! In its current form it presents the portability
hazards of an empty structure and an empty source file. Therefore,
I'm removing it; if I ever have a clear idea of what a user style
mechanism ought to look like, it might make a reappearance, but
don't hold your breath.

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

18 years agoRemove the error message `no text found in paragraph'. Aaron Brown
simon [Thu, 29 Sep 2005 13:04:26 +0000 (13:04 +0000)]
Remove the error message `no text found in paragraph'. Aaron Brown
points out that it's perfectly possible to generate an empty
paragraph using legal Halibut syntax: a paragraph containing nothing
but a \#{...} comment will do the job, and is quite likely to happen
if you've commented out a load of Halibut code. Therefore, an empty
paragraph is now silently ignored rather than being an error
condition in itself; if you create an empty paragraph due to it
containing an unrecognised directive, then you'll get an error for
_that_ and only that.

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

18 years agoBen Hutchings points out that `.UC', which I think I must have
simon [Fri, 29 Jul 2005 11:23:52 +0000 (11:23 +0000)]
Ben Hutchings points out that `.UC', which I think I must have
copied mindlessly from whatever man page I read when working out the
format of man pages, has the function of putting `3rd Berkely
Distribution' in one of the footer slots and therefore is probably
inaccurate...

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

18 years agoThe heading depth of a para_Subsect is p->aux+1, not p->aux+2.
ben [Wed, 18 May 2005 12:09:06 +0000 (12:09 +0000)]
The heading depth of a para_Subsect is p->aux+1, not p->aux+2.
Spotted (indirectly) by Damien Miller.

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

19 years agoinput.c was capable of generating a paragraph structure with no text
simon [Tue, 12 Apr 2005 08:38:28 +0000 (08:38 +0000)]
input.c was capable of generating a paragraph structure with no text
in it, if the input paragraph contained (say) an unrecognised
control command and nothing else. Such paragraphs can confuse back
ends later on, so input.c should refrain from generating them. Added
a check and a polite error message (just in case the user manages to
generate an empty paragraph using otherwise legal syntax).

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

19 years agoAlso, while I'm wandering past here, I've just noticed that
simon [Thu, 10 Mar 2005 10:42:18 +0000 (10:42 +0000)]
Also, while I'm wandering past here, I've just noticed that
`anonfrag' should be a char[] rather than a char *, or else lenof()
will give the wrong answer.

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

19 years agoExplicitly constify a bunch of static data declarations which were
simon [Thu, 10 Mar 2005 10:20:36 +0000 (10:20 +0000)]
Explicitly constify a bunch of static data declarations which were
conceptually const but not declared as such. Halibut is now back to
the practically-speaking-pointless but rather satisfying status of
having no global writable data whatsoever :-)

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

19 years agoAbility to specify multiple arguments to \cfg{html-template-fragment};
jacob [Tue, 8 Mar 2005 01:55:34 +0000 (01:55 +0000)]
Ability to specify multiple arguments to \cfg{html-template-fragment};
Halibut will output fragment names in all specified formats. (I forget now
precisely why I thought this was necessary, but it seems potentially useful.)

Also ensure that legal fragment names are generated even if none of the
characters from the original turn out to be legal (e.g., %k with an entirely
numeric keyword), and correct an untruth I inserted in the documentation of
this.

(This commit hits more than just the HTML backend as I've generalised an error
message, and fixed a fault in the info backend's error handling while there.)

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

19 years agoMove contact details inside <address> to make validator.w3.org happy.
jacob [Mon, 7 Mar 2005 20:08:55 +0000 (20:08 +0000)]
Move contact details inside <address> to make validator.w3.org happy.

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

19 years agoIn contents lists, put <ul> inside <li> to make validator.w3.org happier (for
jacob [Mon, 7 Mar 2005 20:00:18 +0000 (20:00 +0000)]
In contents lists, put <ul> inside <li> to make validator.w3.org happier (for
all HTML flavours).
Also add newlines to the contents output so that the source is vaguely
legible.
Couple of extra comments in the code.

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

19 years agoFormatting fix if no index
jacob [Fri, 18 Feb 2005 20:44:05 +0000 (20:44 +0000)]
Formatting fix if no index

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

19 years agoOops, overzealous search-and-replace
jacob [Fri, 18 Feb 2005 20:40:49 +0000 (20:40 +0000)]
Oops, overzealous search-and-replace

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

19 years agoComment in template code
jacob [Fri, 18 Feb 2005 20:38:59 +0000 (20:38 +0000)]
Comment in template code

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

19 years agoMissing index modifiers
jacob [Fri, 18 Feb 2005 20:37:55 +0000 (20:37 +0000)]
Missing index modifiers

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

19 years agoUpdate the documentation of the HTML backend to match reality.
jacob [Fri, 18 Feb 2005 20:23:58 +0000 (20:23 +0000)]
Update the documentation of the HTML backend to match reality.

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

19 years agoAdd a `--list-charsets' option to Halibut to enumerate canonical names of known
jacob [Fri, 18 Feb 2005 13:17:28 +0000 (13:17 +0000)]
Add a `--list-charsets' option to Halibut to enumerate canonical names of known
character sets.

(Also make libcharset `return_in_enum' values saner.)

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

19 years agoIndexing tweaks for recent changes.
jacob [Fri, 18 Feb 2005 00:16:33 +0000 (00:16 +0000)]
Indexing tweaks for recent changes.

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

19 years agoAdd \versionid.
jacob [Thu, 17 Feb 2005 22:20:32 +0000 (22:20 +0000)]
Add \versionid.

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

19 years agoIt's been a new year for a while.
jacob [Thu, 17 Feb 2005 22:16:51 +0000 (22:16 +0000)]
It's been a new year for a while.

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

19 years agoReplace crash with assertion failure if we attempt to xref a non-existent
jacob [Thu, 17 Feb 2005 21:41:59 +0000 (21:41 +0000)]
Replace crash with assertion failure if we attempt to xref a non-existent
name.

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

19 years agoNote that we'd appreciate help re charsets in WinHelp
jacob [Thu, 17 Feb 2005 19:04:46 +0000 (19:04 +0000)]
Note that we'd appreciate help re charsets in WinHelp

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

19 years agoNote visibly that HTML docs are out of date.
jacob [Thu, 17 Feb 2005 19:02:44 +0000 (19:02 +0000)]
Note visibly that HTML docs are out of date.

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

19 years agoChanges/additions to input character set handling:
jacob [Thu, 17 Feb 2005 19:00:48 +0000 (19:00 +0000)]
Changes/additions to input character set handling:

 - After discussion with Simon, change the default input charset back to ASCII,
   rather than trying to work it out from the locale, for the sake of promoting
   .but file portability.

 - Add a new command-line option "--input-charset=csname", which overrides the
   ASCII default for all input files (since there's no other way to use a
   non-ASCII-compatible input file).

 - Output a warning if -Cinput-charset:foo is specified that it has no effect.

 - Update the docs to match all this. Also try to clarify some other things in
   this area that caught me out.

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

19 years agoShouldn't consider para_Title to be a heading when going through
simon [Mon, 24 Jan 2005 13:35:34 +0000 (13:35 +0000)]
Shouldn't consider para_Title to be a heading when going through
sections looking for local configuration data.

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

19 years ago`origtext' was not getting set correctly for escaped tokens (\\, \{,
simon [Mon, 24 Jan 2005 12:52:42 +0000 (12:52 +0000)]
`origtext' was not getting set correctly for escaped tokens (\\, \{,
\}), making it difficult to put CSS fragments in HTML configuration.

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

19 years agoAdded a new config directive `html-local-head', which permits me to
simon [Mon, 24 Jan 2005 12:37:04 +0000 (12:37 +0000)]
Added a new config directive `html-local-head', which permits me to
put an AppleTitle tag in only one of a set of output HTML files.

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

19 years agoUse .PHONY to ensure the various fake make targets (`all', `clean',
simon [Mon, 24 Jan 2005 11:06:31 +0000 (11:06 +0000)]
Use .PHONY to ensure the various fake make targets (`all', `clean',
`install' etc) don't get confused by the existence of a file with
the same name. Required in particular for `make install' on OS X,
since otherwise its case-insensitive fs gets confused by INSTALL.

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

19 years agoMac OS X gcc warns about a signed/unsigned comparison here. Explicit cast.
simon [Mon, 24 Jan 2005 10:59:19 +0000 (10:59 +0000)]
Mac OS X gcc warns about a signed/unsigned comparison here. Explicit cast.

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

19 years agoHalibut highlighting mode for GNU enscript. This allows our ViewCVS
simon [Wed, 8 Dec 2004 17:58:17 +0000 (17:58 +0000)]
Halibut highlighting mode for GNU enscript. This allows our ViewCVS
installation to syntax-highlight the numerous .but files kicking
around the Subversion repository.

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

19 years agoIt turns out that the man format requires the \& sequence (to
simon [Sun, 21 Nov 2004 13:54:09 +0000 (13:54 +0000)]
It turns out that the man format requires the \& sequence (to
neutralise a dot at the start of a line) even if there's been an
\fB-type sequence on the line before the dot.

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

19 years agoMove MODULE files out of individual project directories into a
simon [Thu, 18 Nov 2004 11:30:39 +0000 (11:30 +0000)]
Move MODULE files out of individual project directories into a
MODULES top-level directory, which is where the Tartarus website
scripts will (hopefully) start reading them from.

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

19 years agoDavid Leonard has contributed an RPM spec file for building RedHat
simon [Thu, 18 Nov 2004 09:47:02 +0000 (09:47 +0000)]
David Leonard has contributed an RPM spec file for building RedHat
packages of Halibut. I can't conveniently test it, but it's here if
anyone needs it.

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