summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lcg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-09-15 00:42:56 +0000
committerKarl Berry <karl@freefriends.org>2008-09-15 00:42:56 +0000
commit7a75873d73817a30e904cdb9903e94f67bc02490 (patch)
tree26f62093c7d47ac20ba6a745014e34b2d6e33a83 /Master/texmf-dist/tex/latex/lcg
parentd0c1973e2a0b6ecebd5b4571c959ef8b32fd6ca8 (diff)
lcg update (11sep08)
git-svn-id: svn://tug.org/texlive/trunk@10600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lcg')
-rw-r--r--Master/texmf-dist/tex/latex/lcg/lcg.sty32
1 files changed, 16 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/lcg/lcg.sty b/Master/texmf-dist/tex/latex/lcg/lcg.sty
index 87edb68f8e1..0a7b330c74d 100644
--- a/Master/texmf-dist/tex/latex/lcg/lcg.sty
+++ b/Master/texmf-dist/tex/latex/lcg/lcg.sty
@@ -6,7 +6,7 @@
%%
%% lcg.dtx (with options: `lcg')
%%
-%% Copyright (C) 2001 Erich Janka (janka@utanet.at)
+%% Copyright (c) 2001, 2003, 2008 Erich Janka -- Das Vollpreiskind (janka@utanet.at)
%%
%% This package may be distributed and/or modified under the terms of the
%% LaTeX Project Public License, as described in lppl.txt in the base
@@ -17,7 +17,7 @@
%%
%% This program consits of the files lcg.dtx and lcg.ins
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lcg}[2001/03/03 v1.0 generating random numbers]
+\ProvidesPackage{lcg}[2008/09/10 v1.2 generating random numbers]
\RequirePackage{keyval}
\@ifundefined{rand}{}
{\PackageWarning{lcg}{Command `rand' already defined}}
@@ -104,7 +104,7 @@
}
\define@key{Init}{quiet}[y]{
\def\qui@t{\expandafter\firstletterr@nd #1\delimiter}
- \if\qui@t y % nothing to do
+ \if \qui@t y% nothing to do
\else\if\qui@t Y \def\qui@t{y}
\else\if\qui@t j \def\qui@t{y}
\else\if\qui@t J \def\qui@t{y}
@@ -136,8 +136,7 @@
} % end of \def\p@stkeysr@nd
\def\firstletterr@nd#1#2\delimiter{#1}
\def\@utputr@nd{%
- \if\qui@t y
- % do nothing
+ \if \qui@t y% do nothing
\else
\typeout{Smallest possible random number: \the\f@rst}%
\typeout{Largest possible random number: \the\l@st}%
@@ -155,17 +154,18 @@
\fi%
}% end of \def\@rderr@nd
\def\cutr@nger@nd{%
- \@tempcntb = -2147483646 % -2^31 + 2
- \@tempcnta = \f@rst
- \advance \@tempcntb \l@st
- \multiply \@tempcntb \m@ne
- \advance \@tempcnta \@tempcntb
- \ifnum \@tempcnta < \z@%
- \PackageWarning{lcg}{Range contains too many numbers
+ \ifnum\l@st<\z@\else
+ \@tempcntb = -2147483646 % -2^31 + 2
+ \@tempcnta = \f@rst
+ \advance \@tempcntb \l@st
+ \multiply \@tempcntb \m@ne
+ \advance \@tempcnta \@tempcntb
+ \ifnum \@tempcnta < \z@%
+ \PackageWarning{lcg}{Range contains too many numbers
-- right border reset to largest possible value}%
- \advance \l@st \@tempcnta
- \fi%
-
+ \advance \l@st \@tempcnta
+ \fi%
+ \fi%
}% end of \checkr@ange
\def\rand{%
\r@nd%
@@ -200,7 +200,7 @@
\multiply \cr@nd \the\month
\multiply \cr@nd \the\day
\advance \cr@nd \inputlineno
- \if\qui@t y
+ \if \qui@t y%
\else
\typeout{Random number generator initialized to \the\cr@nd}%
\fi