From 848183ea222747f189fe5b9add0aad253c947a0a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 11 Aug 2012 22:15:57 +0000
Subject: new old latex package ktv-texdata

git-svn-id: svn://tug.org/texlive/trunk@27369 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/ktv-texdata/ktv-buildnum.sty         | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/ktv-texdata/ktv-buildnum.sty

(limited to 'Master/texmf-dist/tex/latex/ktv-texdata/ktv-buildnum.sty')

diff --git a/Master/texmf-dist/tex/latex/ktv-texdata/ktv-buildnum.sty b/Master/texmf-dist/tex/latex/ktv-texdata/ktv-buildnum.sty
new file mode 100644
index 00000000000..d97925ffee1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ktv-texdata/ktv-buildnum.sty
@@ -0,0 +1,26 @@
+\ProvidesPackage{ktv-buildnum}[2003/10/10 v1.5  KTV, Build Number]
+\def\bld@ext{.ktvnum}
+\def\bld@ext@old{.xka}
+\def\builnumfile{\jobname}
+\AtBeginDocument{
+  \newwrite\bld@ostream
+  \newcount\buildnum
+  \IfFileExists{\builnumfile\bld@ext}%
+    {\@@input\builnumfile\bld@ext\relax}%
+    {\buildnum=0}
+  \IfFileExists{\builnumfile\bld@ext@old}
+    {%\begingroup
+      \newcount\tmp@cnt \tmp@cnt=\buildnum
+      \@@input\builnumfile\bld@ext@old\relax
+      \ifnum\tmp@cnt>\buildnum        
+        \global\buildnum=\tmp@cnt
+      \fi
+    %\endgroup
+    }{}  
+  \advance\buildnum1 %
+  \immediate\openout\bld@ostream\builnumfile\bld@ext %
+  \immediate\write\bld@ostream{\string\buildnum=\the\buildnum}%
+  \immediate\closeout\bld@ostream{}%
+}
+\endinput
+% END OF FILE
\ No newline at end of file
-- 
cgit v1.2.3

