Changing the pdfTeX banner for Debian-specific changes
Hi,
this might already be resolved - we're still dealing with pdfTeX 1.21a
in teTeX -, but also not, and therefore interest you.
Julian Gilbey
as requested by Martin Schr?der, the pdfTeX maintainer, I'd like to add something about libpoppler to the "pdeftex --version" output or the general banner, but I don't manage. According to him, it should be sufficient to change texk/web2c/pdfetexdir/pdfetexextra.in, but that doesn't have any effect here - probably we have such an ancient version (1.20 instead of 1.40 in which he is thinking...).
Just modifying the #define BANNER=... line in that file does it for me.
Strange - I tried and got funny results, e.g. after changing
#define BANNER "This is pdfeTeX, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION"
to
#define BANNER "This is not pdfeTeX, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION"
it printed "not pdfeTeX..." instead of "This is pdfeTeX..."
With the normal version, compare:
burnside:~ $ pdfetex --version pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4) kpathsea version 3.5.4 Copyright (C) 1997-2004 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Kpathsea is copyright (C) 1997-2004 Free Software Foundation, Inc. [...]
with:
burnside:~ $ pdfetex This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) **
It turns out that when producing the version string for --version in lib/printversion.c, function printversionandexit, the leading prefix "This is " is stripped off from the banner name. Furthermore, the banner string is parsed like this:
"This is pdfeTeX, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION" ^^^^^^^^------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stripped name progversion
where "This is " is stripped, the prog name goes up to the first comma, and the progversion is everything after the final space; then the first line of the --version output is:
name progversion (Web2C-version)
Therefore it is indeed hard to add information about local changes, which naturally would be at the end (after an additional space).
So if all is wanted is to tweak the banner line, there are two ways to do it:
(1) Hackish: define BANNER to be something like: "This is pdfeTeX with Debian tweaks, Version 3.141592-PDFTEX-VERSION-ETEX-VERSION"
I'll go that way, but I'd appreciate if in future versions it would be possible to just add a "local_changes_remark" at an appropriate place (either the end of the line, or an additional line.
(2) Actually modify the printversionandexit code in lib/printversion.c to output something like:
string debianversion = "(Debian version blah)";
len = prog_name_end - banner - sizeof ("This is") + sizeof(debianversion); prog_name = (string)xmalloc (len + 1); strncpy (prog_name, banner + sizeof ("This is"), len); prog_name[len] = 0;
/* The Web2c version string starts with a space. */ printf ("%s %s%s %s\n", prog_name, prog_version, versionstring, debianversion);
and a similar change in one of the change files.
But the latter seems like hard work :/
Should I open a feature request? Regards, Frank -- Frank Küster Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich Debian Developer (teTeX)
participants (1)
-
Frank Küster