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@4548 cda61777-01e9-0310-a592-d414129be87e
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@4551 cda61777-01e9-0310-a592-d414129be87e
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@4552 cda61777-01e9-0310-a592-d414129be87e
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@4553 cda61777-01e9-0310-a592-d414129be87e
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@4561 cda61777-01e9-0310-a592-d414129be87e
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@4564 cda61777-01e9-0310-a592-d414129be87e
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@4565 cda61777-01e9-0310-a592-d414129be87e
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@4575 cda61777-01e9-0310-a592-d414129be87e
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@4576 cda61777-01e9-0310-a592-d414129be87e
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@4577 cda61777-01e9-0310-a592-d414129be87e
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@4580 cda61777-01e9-0310-a592-d414129be87e
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@4588 cda61777-01e9-0310-a592-d414129be87e
man supports `.SS' for subsection headings. Use it.


git-svn-id: svn://svn.tartarus.org/sgt@4758 cda61777-01e9-0310-a592-d414129be87e
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@4803 cda61777-01e9-0310-a592-d414129be87e
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@4808 cda61777-01e9-0310-a592-d414129be87e
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@4812 cda61777-01e9-0310-a592-d414129be87e
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@4867 cda61777-01e9-0310-a592-d414129be87e
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@4962 cda61777-01e9-0310-a592-d414129be87e
Mac OS X gcc warns about a signed/unsigned comparison here. Explicit cast.


git-svn-id: svn://svn.tartarus.org/sgt@5188 cda61777-01e9-0310-a592-d414129be87e
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@5189 cda61777-01e9-0310-a592-d414129be87e