#344698 enscript: [PATCH] option --footer does nothing

Package:
enscript
Source:
enscript
Description:
converts text to Postscript, HTML or RTF with syntax highlighting
Submitter:
Paolo
Date:
2011-07-11 10:27:30 UTC
Severity:
normal
#344698#5
Date:
2005-12-24 21:18:18 UTC
From:
To:
I wanted to print both header and footer, but no way to get the latter.
Actually, I found the footer is completely missing from .hdr lib files,
and code isn't ready to deal with that (or I just screwed uo a lot ;) ).

Anyway, also the opts logic wouldn't allow to print just the footer,
either (default)header, (default)header+footer or nothing at all.

I needed the 3rd option, ie just the footer, hence hacked up a solution
which WFM (and bumped up version to 1.6.5-1 for my own ref).

I'd rather change the logic for -b/-B/--footer, ie
  default = no hdr,no ftr
  -b = default header
  -b header
  --footer footer
thus dropping -B, but guess some flame would arise ;)

So I tried to keep the same logic, ie
  default = default header in .hdr
  -b header = user's header
  --footer footer = default header in .hdr + user's footer
  -B --footer footer = just user's footer

pls see diff against 1.6.4-7 below - I set the footer proc in simple.hdr
only, since that's the one I use. Doing the same for the other/fancy one
should be nearly a matter of c&p (nearly what I did from header proc).
I did not define a do_footer so that other .hdr need no mods.

#344698#16
Date:
2009-04-14 14:03:23 UTC
From:
To:
I was wondering why this patch hasn't been applied yet.



Thanks a lot,
Rodrigo

#344698#21
Date:
2011-06-09 09:45:39 UTC
From:
To:
It's now 2011. This bug was submitted 5.5 years ago with a patch, which
still applies just fine and works as advertised for me. Would somebody
pretty please just patch the thing?

#344698#26
Date:
2011-07-11 10:23:44 UTC
From:
To:
Hi Bart,

I'm taking a look at this patch.  It comes in two parts:

- changing the command-line options so that it's possible to have just a footer
- editing simple.hdr to support footers

Also relevant is the fact that simple.hdr is apparently the default,
rather than 'enscript.hdr'.

Technically the '--footer' option does work - it's just that the
header template doesn't have any place for the footer to go.  This
sort of implies that the other .hdr files would ideally need patching
too at some point to support footers.

The reason I've been reluctant to apply it in Debian is that I'm
trying to reduce the diff between Debian and upstream - so I'll
probably include it upstream first.