%%
%% This is file `makecmds.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% makecmds.dtx  (with options: `usc')
%% 
%%  Copyright 2000 Peter R. Wilson
%% 
%%  This program is provided under the terms of the
%%  LaTeX Project Public License distributed from CTAN
%%  archives in directory macros/latex/base/lppl.txt.
%% 
%% Author: Peter Wilson (CUA)
%%         now at: peter.r.wilson@boeing.com
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{makecmds}[2000/05/27 v1.0 extra command making commands]

\newif\ifm@kwarn
  \m@kwarnfalse
\DeclareOption{warn}{\m@kwarntrue}
\ProcessOptions\relax

\def\makecommand{\@star@or@long\m@ke@command}
\def\m@ke@command#1{%
  \ifx #1\undefined\else
    \ifm@kwarn
      \PackageWarning{makecmds}{Redefining command `\protect#1'}
    \fi
  \fi
  \let\@ifdefinable\@rc@ifdefinable
  \new@command#1}

\def\provideenvironment{%
  \@star@or@long\m@kprovide@environment}
\def\m@kprovide@environment#1{%
  \@ifundefined{#1}{%
    \expandafter\let\csname#1\endcsname\relax
    \expandafter\let\csname end#1\endcsname\relax
    \new@environment{#1}}{\m@kdiscardenvargs{#1}}
}
\def\m@kdiscardenvargs#1{%
  \@testopt{\m@kenva#1}0}
\def\m@kenva#1[#2]{%
  \@ifnextchar [{\m@kenvb#1[#2]}{\m@kthrowenv{#1}{[#2]}}}
\def\m@kenvb#1[#2][#3]{\m@kthrowenv{#1}{[#2][#3]}}
\def\m@kthrowenv#1#2#3#4{}

\def\makeenvironment{\@star@or@long\m@ke@environment}
\def\m@ke@environment#1{%
  \@ifundefined{#1}{\new@environment{#1}}{%
    \ifm@kwarn
      \PackageWarning{makecmds}{Redefining environment `#1'}
    \fi
    \renew@environment{#1}}
}

\def\providelength#1{%
  \ifx #1\undefined
    \newlength{#1}
  \fi
}
\def\makelength#1{%
  \ifx #1\undefined
    \newlength{#1}
  \else
    \ifm@kwarn
      \PackageWarning{makecmds}{Redefining length `\protect#1'}
    \fi
    \newskip#1
  \fi
}

\def\providecounter#1{%
  \@ifundefined{c@#1}{\newcounter{#1}}{%
    \@ifnextchar[{\m@k@gobbleendoptarg}{}}%
}
\def\makecounter#1{%
  \expandafter\ifx \csname c@#1\endcsname \undefined
  \else
    \ifm@kwarn
      \PackageWarning{makecmds}{Redefining counter `#1'}
    \fi
  \fi
  \@definecounter{#1}%
  \@ifnextchar[{\@newctr{#1}}{}
}

\def\m@k@gobbleendoptarg[#1]{}

\endinput
%%
%% End of file `makecmds.sty'.
