[NTG-pdftex] Version numbering

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jun 8 17:55:32 CEST 2005


On Wed, Jun 08, 2005 at 10:23:21AM +0200, Hans Hagen wrote:

> >% now the code for \pdftexversion and \pdftexrevision follows.
> >% It should probably go into pdftexconfig.tex
> >\begingroup
> >  % * definition of \pdftexversion
> >  \count0=\pdftexmainversion
> >  \multiply\count0 by 100\relax
> >  \advance\count0 by \pdftexsubversion
> >  % using \chardef to avoid count register
> >  % and \the\pdftexversion must work
> >  \global\chardef\pdftexversion=\count0\relax
> >  %
> >  % definition of \pdftexrevision
> >  \count0=\pdftexbugfixversion
> >  \advance\count0 by `a\relax
> >  % the revision letter must have catcode 12
> >  \lccode`0=\count0\relax
> >  \lowercase{\xdef\pdftexrevision{0}}%
> >\endgroup

> sounds ok to me
> 
> (some \ifx\undefined\pdftexversion is needed as wrapper so that we don't 
> get problems due to mixups with older versions)

You mean some security check in the final version:

\begingroup
  \expandafter\ifx\csname pdftexmainversion\endcsname\relax
    % do nothing because of older pdfTeX version
  \else
    % * definition of \pdftexversion
    \count0=\pdftexmainversion
    \multiply\count0 by 100\relax
    \advance\count0 by \pdftexsubversion
    % using \chardef to avoid count register
    % and \the\pdftexversion must work
    \global\chardef\pdftexversion=\count0\relax
    %
    % definition of \pdftexrevision
    \count0=\pdftexbugfixversion   
    \advance\count0 by `a\relax    
    % the revision letter must have catcode 12
    \lccode`0=\count0\relax
    \lowercase{\xdef\pdftexrevision{0}}%
  \fi
\endgroup

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 


More information about the ntg-pdftex mailing list