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

19 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

19 years agoRemove the svn:externals property that pulls a copy of libcharset
simon [Wed, 17 Nov 2004 20:39:17 +0000 (20:39 +0000)]
Remove the svn:externals property that pulls a copy of libcharset
into a subdirectory of `halibut'. It wasn't very good anyway (since
it insisted on loading via an unauthenticated svn:// URL). The
Halibut makefile now expects _either_ a subdir `charset', _or_ a
directory called `charset' as a sibling of `halibut', and will work
with the first of those that it finds. A new release script arranges
to provide the former in source tarballs (so that building if you're
an ordinary user is just as simple as it always was).

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

19 years agoAllow macros to work (a) at the very start of a paragraph, and (b)
simon [Wed, 17 Nov 2004 18:11:12 +0000 (18:11 +0000)]
Allow macros to work (a) at the very start of a paragraph, and (b)
across files (defining a macro in one source file and invoking it in
a later one).

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

19 years agoI often symlink `build/halibut' into the top level. svn:ignore it.
simon [Wed, 17 Nov 2004 08:04:06 +0000 (08:04 +0000)]
I often symlink `build/halibut' into the top level. svn:ignore it.

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

19 years agoRemove .cvsignore files on all active branches.
simon [Tue, 16 Nov 2004 15:29:14 +0000 (15:29 +0000)]
Remove .cvsignore files on all active branches.

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

19 years agoCVS revision numbers, stored as `cvs2svn:cvs-rev' properties, are a
simon [Tue, 16 Nov 2004 15:27:00 +0000 (15:27 +0000)]
CVS revision numbers, stored as `cvs2svn:cvs-rev' properties, are a
useful piece of history in this repository but we don't want to
preserve their latest values on future commits. Accordingly, I'm
deleting them from all active development (though not from past
release branches).

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

19 years agoman supports `.SS' for subsection headings. Use it.
simon [Sat, 6 Nov 2004 09:11:55 +0000 (09:11 +0000)]
man supports `.SS' for subsection headings. Use it.

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

19 years agoAdd kerning support to paper backends, embedding the kerning tables from
ben [Tue, 28 Sep 2004 23:09:41 +0000 (23:09 +0000)]
Add kerning support to paper backends, embedding the kerning tables from
the AFM files in psdata.c.  Also fix a couple of bugs that this revealed.

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

19 years agoDon't bother overriding the metrics of PostScript fonts. If the metrics
ben [Sat, 25 Sep 2004 18:03:19 +0000 (18:03 +0000)]
Don't bother overriding the metrics of PostScript fonts.  If the metrics
we've got are wrong, things are going to look horrible either way, so
we may as well apply minimal effort.

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

19 years agoIf you're going to change the metrics of a font, it's necessary to leave space
ben [Fri, 24 Sep 2004 18:47:35 +0000 (18:47 +0000)]
If you're going to change the metrics of a font, it's necessary to leave space
in the new font dictionary for the Metrics entry.  This is mentioned in the
first edition of the Red Book, but not the second.

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

19 years agoReplace the empirical GhostScript-derived font metrics with ones derived
ben [Fri, 24 Sep 2004 18:02:07 +0000 (18:02 +0000)]
Replace the empirical GhostScript-derived font metrics with ones derived
from Adobe's official AFM files.  These are expressed in integer multiples
of 1/1000 pt (well, 1/1000 of the design size of the font, actually, but that's
always a whole number of points), so use that as our internal unit rather
than 1/4096 pt.  This doesn't seem to make a significant difference to
Halibut's output.

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

19 years agoPage-break penalties were calculated by taking the amount of spare space
ben [Fri, 24 Sep 2004 17:56:58 +0000 (17:56 +0000)]
Page-break penalties were calculated by taking the amount of spare space
on the page (in internal units) and squaring it.  This was fine except that
fixed penalties weren't scaled by the size of an internal unit, so the page-
breaking changed when the units were changed.  Rather than scaling all the
fixed penalties, scale the space into 1/4096 point units before squaring it.

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

19 years agoStupid bug: "t" was leaving the y-coordinate on the stack, which confused
ben [Tue, 21 Sep 2004 19:00:43 +0000 (19:00 +0000)]
Stupid bug: "t" was leaving the y-coordinate on the stack, which confused
"restore".  Quite how GhostScript managed not to give an error on this I
don't know.

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

19 years agoReplace the hardcoded instances of "4096" and "4096.0" in the paper backends
ben [Tue, 21 Sep 2004 18:09:35 +0000 (18:09 +0000)]
Replace the hardcoded instances of "4096" and "4096.0" in the paper backends
with a macro.  halibut.ps and halibut.pdf are identical (modulo dates) over
this change.

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

19 years agoBracket each page in a save/restore pair. This is suggested by the Red Book,
ben [Tue, 21 Sep 2004 15:23:22 +0000 (15:23 +0000)]
Bracket each page in a save/restore pair.  This is suggested by the Red Book,
enforces page independence, avoids leaking VM on level 1 interpreters, and
speeds things up to boot.

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

19 years agoMake the PostScript prologue look less like it was written by a C programmer.
ben [Mon, 20 Sep 2004 15:52:46 +0000 (15:52 +0000)]
Make the PostScript prologue look less like it was written by a C programmer.
In particular, use the operand stack to hold "x" and "y", and use a dictionary
lookup to switch based on the type of "x".  This also seems to give a slight
speed increase.

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

19 years agoTwo small tweaks to the prologue:
ben [Mon, 20 Sep 2004 14:04:07 +0000 (14:04 +0000)]
Two small tweaks to the prologue:
* Use "/arraytype" etc rather than "[] type" etc.  Should be faster and not fill
  local VM with empty arrays.
* Use "bind" on the procedure, since it's conventional and will probably
  help speed too.

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

19 years agoAdd lots of DSC comments, and change the DSC version to 3.0, which has been
ben [Mon, 20 Sep 2004 13:22:17 +0000 (13:22 +0000)]
Add lots of DSC comments, and change the DSC version to 3.0, which has been
current since 1990.  The only obvious change from this is that gv now displays
the document title.

There's a slight bug here at the moment in that the backend emits
%%DocumentNeededResource and %%IncludeResource for each subfont of a
PostScript font, even if that PostScript font has been requested already.
This is wasteful but, as far as I can see, not actually disallowed, and
is easier than de-duping the font list.

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

19 years agoUse "$(MAKE)" for sub-makes, so as to handle systems whose default "make"
ben [Sun, 19 Sep 2004 13:50:36 +0000 (13:50 +0000)]
Use "$(MAKE)" for sub-makes, so as to handle systems whose default "make"
isn't GNU Make.

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

19 years agoForgot to set a file position on characters being returned from
simon [Fri, 20 Aug 2004 09:20:38 +0000 (09:20 +0000)]
Forgot to set a file position on characters being returned from
macro expansions.

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

19 years agoRemove a \#{FIXME} comment in \cfg{paper-chapter-top-space}; the checkin
jacob [Mon, 9 Aug 2004 21:09:28 +0000 (21:09 +0000)]
Remove a \#{FIXME} comment in \cfg{paper-chapter-top-space}; the checkin
of bk_paper.c 1.29 [r4330] appears to have fixed this.

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

19 years ago`make release' tweak to prevent tarball containing trailing NULs (fix from
jacob [Mon, 9 Aug 2004 17:09:40 +0000 (17:09 +0000)]
`make release' tweak to prevent tarball containing trailing NULs (fix from
putty/mkunxarc.sh) - apparently this upsets some older gzips (1.2.4).

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

19 years agoExplicitly bless in the documentation, and fix in the man backend,
simon [Fri, 6 Aug 2004 12:17:56 +0000 (12:17 +0000)]
Explicitly bless in the documentation, and fix in the man backend,
the practice of using \dt and \dd in anything other than the obvious
interleaving.

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

19 years agoMake sure (paragraph)->private_data is defined in all cases, on general
jacob [Fri, 6 Aug 2004 01:34:58 +0000 (01:34 +0000)]
Make sure (paragraph)->private_data is defined in all cases, on general
principles (it may be unnecessary). Perhaps we should do this for
(word)->private_data too.

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

19 years agoFix crash in Info backend: if a \[Kk] to a \B or \n was followed in a
jacob [Fri, 6 Aug 2004 01:33:10 +0000 (01:33 +0000)]
Fix crash in Info backend: if a \[Kk] to a \B or \n was followed in a
paragraph by another \[Kk], Bad Things would happen.

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

19 years agodup_word_list() does the right thing if passed NULL (on general principles)
jacob [Fri, 6 Aug 2004 00:31:35 +0000 (00:31 +0000)]
dup_word_list() does the right thing if passed NULL (on general principles)

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

19 years agoFix for an uninitialised structure member spotted by valgrind (probably didn't
jacob [Wed, 4 Aug 2004 16:44:38 +0000 (16:44 +0000)]
Fix for an uninitialised structure member spotted by valgrind (probably didn't
have any real effect).

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

19 years agoExplicit bounds checking on the bmp[] array.
simon [Wed, 4 Aug 2004 16:27:28 +0000 (16:27 +0000)]
Explicit bounds checking on the bmp[] array.

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

19 years agoAdd an explicit cast to prevent a compiler warning.
simon [Wed, 4 Aug 2004 16:26:02 +0000 (16:26 +0000)]
Add an explicit cast to prevent a compiler warning.

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

19 years agoColin spotted a sizeof/lenof confusion which we think has been
simon [Wed, 4 Aug 2004 16:25:06 +0000 (16:25 +0000)]
Colin spotted a sizeof/lenof confusion which we think has been
causing segfaults on strange architectures.

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

19 years agoMore careful context hash calculation which doesn't depend on size
simon [Fri, 30 Jul 2004 13:21:40 +0000 (13:21 +0000)]
More careful context hash calculation which doesn't depend on size
of `unsigned long'. Should help Debian build problems (bug#259504).

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

19 years agoDivision by zero (which criminally failed to give rise to any kind
simon [Sat, 17 Jul 2004 15:47:22 +0000 (15:47 +0000)]
Division by zero (which criminally failed to give rise to any kind
of signal!) was causing massive misplacement of the single line of
text on a one-line page in PS and PDF.

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

19 years agoCut-and-paste error was preventing PS and PDF filename config
simon [Sat, 17 Jul 2004 15:29:16 +0000 (15:29 +0000)]
Cut-and-paste error was preventing PS and PDF filename config
options from being processed in some circumstances.

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

19 years agoTweak for \cq (probably unnecessary)
jacob [Fri, 16 Jul 2004 12:54:59 +0000 (12:54 +0000)]
Tweak for \cq (probably unnecessary)

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

19 years agoRight; I'm finally sick of typing \q{\cw{foo}}, so I've invented a
simon [Fri, 16 Jul 2004 11:54:04 +0000 (11:54 +0000)]
Right; I'm finally sick of typing \q{\cw{foo}}, so I've invented a
shorthand command \cq{foo}.

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

19 years agoFailed to initialise state.curr_topic early enough, causing
simon [Tue, 13 Jul 2004 08:40:20 +0000 (08:40 +0000)]
Failed to initialise state.curr_topic early enough, causing
uninitialised-memory references and a segfault. Quite why this never
happened when I tested it at home, I have no idea!

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

19 years agoApparently (according to a user) WinZip complains of `trailing
simon [Mon, 5 Jul 2004 14:23:03 +0000 (14:23 +0000)]
Apparently (according to a user) WinZip complains of `trailing
garbage' when handling a GNU tar archive. Using the -o flag when
building the tar file creates an archive which the user said WinZip
had no trouble with, and GNU tar seems just as happy with that, so
`make release' now uses -o.

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

19 years agoAvoid generating an index section if there actually is no index.
simon [Fri, 2 Jul 2004 18:45:05 +0000 (18:45 +0000)]
Avoid generating an index section if there actually is no index.

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

19 years agoSort out error handling everywhere a charset name is converted into
simon [Sun, 27 Jun 2004 13:18:32 +0000 (13:18 +0000)]
Sort out error handling everywhere a charset name is converted into
an integer charset ID.

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

19 years agoFree up all the data we allocated during the HTML backend.
simon [Sun, 27 Jun 2004 13:04:24 +0000 (13:04 +0000)]
Free up all the data we allocated during the HTML backend.

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

19 years agoSupport non-breaking spaces.
simon [Sun, 27 Jun 2004 12:47:04 +0000 (12:47 +0000)]
Support non-breaking spaces.

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

19 years agoConfig directives for all the extra configurable things in the new
simon [Sun, 27 Jun 2004 12:38:19 +0000 (12:38 +0000)]
Config directives for all the extra configurable things in the new
HTML backend.

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

19 years agoFix up the restrict_charset and output_charset configuration for the
simon [Sun, 27 Jun 2004 12:23:38 +0000 (12:23 +0000)]
Fix up the restrict_charset and output_charset configuration for the
HTML backend. After an argument with James in which it transpired
that we each thought it was absolutely obvious which one
\cfg{html-charset} ought to map to, and each of us was thinking of a
different one, I've decided that this implies it _isn't_ obvious,
and hence there is no single \cfg{html-charset} directive at all.
Instead, we have \cfg{html-restrict-charset} and \cfg{html-output-
charset}, and any naive user who `just wants to change character
set' is just going to have to RTFM and figure out which one they
mean.

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

19 years agonit: s/case-sensitive/case-insensitive/ in comment about nasty indexing
jacob [Mon, 21 Jun 2004 00:28:44 +0000 (00:28 +0000)]
nit: s/case-sensitive/case-insensitive/ in comment about nasty indexing
hack.

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

19 years agoVarious HTML backend cleanups.
simon [Sun, 20 Jun 2004 13:44:30 +0000 (13:44 +0000)]
Various HTML backend cleanups.

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

19 years agoIntroduce a configurable option to select the HTML flavour. Also
simon [Sun, 20 Jun 2004 13:11:34 +0000 (13:11 +0000)]
Introduce a configurable option to select the HTML flavour. Also
fiddle with various small aspects of the output so that it actually
validates in all supported flavours.

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

19 years agoImprove the naming of fragment IDs for numbered list elements and
simon [Sun, 20 Jun 2004 12:20:44 +0000 (12:20 +0000)]
Improve the naming of fragment IDs for numbered list elements and
bibliography entries.

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

19 years agoMinimal documentation of all the new paper backend \cfg{} directives.
jacob [Sun, 20 Jun 2004 00:01:42 +0000 (00:01 +0000)]
Minimal documentation of all the new paper backend \cfg{} directives.

Contains many FIXMEs, both for incomplete documentation and incomplete
code.

Couple of other minor tweaks elsewhere.

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

19 years agoWe seem to have ended up with duplicate documentation of --man. Gone.
jacob [Sat, 19 Jun 2004 20:26:41 +0000 (20:26 +0000)]
We seem to have ended up with duplicate documentation of --man. Gone.

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

19 years agoEnsure that every \cfg{} directive documented so far has appropriate \IM
jacob [Sat, 19 Jun 2004 17:54:33 +0000 (17:54 +0000)]
Ensure that every \cfg{} directive documented so far has appropriate \IM
directives.

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

19 years agoFairly wholesale reorganisation of the \cfg{} documentation for the text,
jacob [Sat, 19 Jun 2004 17:40:25 +0000 (17:40 +0000)]
Fairly wholesale reorganisation of the \cfg{} documentation for the text,
WinHelp, man, and info backends, and organisation into sections (now that
we have rather more directives documented). I've not changed the actual
text much if at all.

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

19 years agoIn the text backend, multiple characters can now be used for underlining.
jacob [Sat, 19 Jun 2004 17:11:37 +0000 (17:11 +0000)]
In the text backend, multiple characters can now be used for underlining.

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

19 years agoThe Unicode OVERLINE in the text backend documentation was probably supposed
jacob [Sat, 19 Jun 2004 17:08:59 +0000 (17:08 +0000)]
The Unicode OVERLINE in the text backend documentation was probably supposed
to be quoted.

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

19 years agoNote that \cfg{quotes} and friends apply to the output in its entirety and
jacob [Sat, 19 Jun 2004 17:05:40 +0000 (17:05 +0000)]
Note that \cfg{quotes} and friends apply to the output in its entirety and
can't be changed partway through. Also, add a cross-reference from \q{}.

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

19 years agoNote that no index is generated by the text backend.
jacob [Sat, 19 Jun 2004 17:04:51 +0000 (17:04 +0000)]
Note that no index is generated by the text backend.

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

19 years agoMinor correction to --ps and --pdf descriptions.
jacob [Sat, 19 Jun 2004 16:35:14 +0000 (16:35 +0000)]
Minor correction to --ps and --pdf descriptions.

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

19 years agoInitial rough documentation of some of the newer \cfg{} directives, namely:
jacob [Sat, 19 Jun 2004 16:10:16 +0000 (16:10 +0000)]
Initial rough documentation of some of the newer \cfg{} directives, namely:
 - \cfg{quotes}
 - text, info, man, and winhelp backends:
   - charset
   - quotes and bullets
   - various WinHelp miscellanea
Could stand some rearrangement and expansion, plus I've yet to address the
paper or HTML backends.

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

19 years agoModerately nasty workaround for the fact that Windows Help's index
simon [Sat, 19 Jun 2004 16:04:39 +0000 (16:04 +0000)]
Moderately nasty workaround for the fact that Windows Help's index
mechanism is case-insensitive with respect to sorting the list of
index entries. We now append nonbreaking spaces to the ends of some
index terms to ensure they are considered distinct. (Nasty, but it
seems to work.)

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

19 years agoAdd a batch of assertions to ensure no more index terms fail to have
simon [Sat, 19 Jun 2004 15:04:07 +0000 (15:04 +0000)]
Add a batch of assertions to ensure no more index terms fail to have
their anchors generated. Index bugs of this type can be terribly
subtle and go unnoticed for ages; I'm lucky Jacob spotted the first
one of the type, but I'm now going to be careful to avoid any
further ones.

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

19 years agoI had somehow managed to leave index entry anchors out of section
simon [Sat, 19 Jun 2004 14:55:35 +0000 (14:55 +0000)]
I had somehow managed to leave index entry anchors out of section
titles. Ahem.

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

19 years agoAdd a clash-checking mechanism to ensure we never generate the same
simon [Sat, 19 Jun 2004 14:44:47 +0000 (14:44 +0000)]
Add a clash-checking mechanism to ensure we never generate the same
fragment name twice for any reason.

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

19 years agoSupport \I\c, \I\cw. (Haven't bothered with \I\e since the emphasis may as
jacob [Sat, 19 Jun 2004 13:27:52 +0000 (13:27 +0000)]
Support \I\c, \I\cw. (Haven't bothered with \I\e since the emphasis may as
well outweigh the "invisibility".)

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

19 years agos/text-quotes/man-quotes/. Damn cut and paste. Thanks Jacob.
simon [Wed, 16 Jun 2004 09:43:28 +0000 (09:43 +0000)]
s/text-quotes/man-quotes/. Damn cut and paste. Thanks Jacob.

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

19 years agoThe Halibut manual contained at least one instance of two index
simon [Sun, 13 Jun 2004 14:57:25 +0000 (14:57 +0000)]
The Halibut manual contained at least one instance of two index
terms (intentionally) differing only in case, which were being
silently folded into one by the case-insensitive index tag
comparison. Halibut now warns in this situation (but then folds them
anyway, which I think is better than silently generating an index
containing many case-distinct forms of the same word - I imagine
it's very easy to do that by mistake). The manual has been fixed to
explicitly define distinct keywords (in the case I spotted and in
five other cases picked up by the new warning!), and also documents
this issue and how to work with it.

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

19 years agoEr, don't forget to document the disallowing of \q within \c. Ahem.
simon [Sat, 12 Jun 2004 21:57:29 +0000 (21:57 +0000)]
Er, don't forget to document the disallowing of \q within \c. Ahem.

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

19 years agoEnforce that \q may not be used anywhere within \c. It shouldn't be
simon [Sat, 12 Jun 2004 21:53:26 +0000 (21:53 +0000)]
Enforce that \q may not be used anywhere within \c. It shouldn't be
necessary since the whole point of \c should be that the user wants
to exercise exact control over the glyphs used, and forbidding it
has the useful effect of relieving some backends of having to make
difficult decisions: it means the text backend doesn't have to nest
two pairs of identical quotes, and the paper backends don't have to
downgrade their quote characters if (as is perfectly plausible) the
fixed-pitch font doesn't support the same range as the body text
fonts.

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

19 years agoSwitch the memory allocation macros from the Halibut ones
simon [Sat, 12 Jun 2004 20:31:03 +0000 (20:31 +0000)]
Switch the memory allocation macros from the Halibut ones
(mknew/mknewa/resize) to the PuTTY ones (snew/snewn/sresize). snewn
and mknewa have their arguments opposite ways round; this may make
the change initially painful but in the long term will free me of a
nasty context switch every time I move between codebases. Also
sresize takes an explicit type operand which is used to cast the
return value from realloc, thus enforcing that it must be correct,
and arranging that if anyone tries to compile Halibut with a C++
compiler there should be a lot less pain.

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

19 years agoInitial checkin of the shiny new rewritten-from-scratch HTML back
simon [Sat, 12 Jun 2004 20:09:40 +0000 (20:09 +0000)]
Initial checkin of the shiny new rewritten-from-scratch HTML back
end. There's a lot more _potentiality_ for new features than there
are actual new features just yet, but future highlights include:
configurable flavour of HTML (3.2, 4, XHTML Transitional or Strict),
proper character set support (this is half way there already), and
more flexible allocation of sections between multiple HTML files.
Meanwhile, immediate benefits include correct handling of special
characters within `author' and `description' strings, omission of
the filename part in hyperlinks within the same HTML file (in
particular, this means a single output file is now totally
independent of its filename), and hyperlinks to the index from the
top-level contents page (I'm amazed nobody has complained at the
lack of this yet!). There are no doubt some shiny new bugs as well,
but I'll never find them unless people start using the thing...

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