diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/lcg/lcg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/lcg/lcg.dtx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/lcg/lcg.dtx b/Master/texmf-dist/source/latex/lcg/lcg.dtx index eb44e9041d6..f9f706e4763 100644 --- a/Master/texmf-dist/source/latex/lcg/lcg.dtx +++ b/Master/texmf-dist/source/latex/lcg/lcg.dtx @@ -1,6 +1,6 @@ % \iffalse % File: lcg.dtx -%% 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 @@ -12,7 +12,7 @@ %% This program consits of the files lcg.dtx and lcg.ins % %<lcg>\NeedsTeXFormat{LaTeX2e} -%<lcg>\ProvidesPackage{lcg}[2001/03/03 v1.0 generating random numbers] +%<lcg>\ProvidesPackage{lcg}[2008/09/10 v1.2 generating random numbers] %<lcg>\RequirePackage{keyval} % %<*driver> @@ -21,8 +21,8 @@ \begin{document} \GetFileInfo{lcg.sty} \title{The \texttt{lcg} package} - \author{Erich Janka\\ \texttt{janka@utanet.at}} - \date{2001/03/03 (v1.0)} + \author{Erich Janka -- Das Vollpreiskind\\ \texttt{janka@utanet.at}} + \date{2008/09/10 (v1.2)} \maketitle \DocInput{lcg.dtx} \end{document} @@ -405,7 +405,7 @@ % \begin{macrocode} \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} @@ -479,8 +479,7 @@ % Output to log-file/screen % \begin{macrocode} \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}% @@ -513,17 +512,18 @@ % \cntr{@tempcnta} will be less than zero and the right border will be adjusted. % \begin{macrocode} \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 % \end{macrocode} % \end{macro} @@ -595,7 +595,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 |