%% $Id: pst-key.tex 446 2017-04-19 11:40:55Z herbert $
%%
%% This is file `pst-key.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% keyval.dtx  (with options: `package,plain,pstricks')
%% 
%% This file is based on keyval.dtx from the LaTeX tools distribution.
%% It may be distributed and used with the conditions applying to the
%% PSTricks distribution. See the comments in pstricks.tex for details.
%% 
%% File: keyval.dtx Copyright (C) 1993 1994 1995 1997 1998 David Carlisle
\def\next[#1]{\catcode`\@=11
       \expandafter\let\csname ver@keyval.sty\endcsname\empty
       \wlog{keyval: #1}}\next
                 [1998/07/23 v1.11 key=value parser (DPC)]
\def\setkeys{%
  \@ifnextchar[%
    \KV@list
    {\let\KV@undefined\KV@error
     \KV@setkeys}}
\def\KV@psset{psset}
\def\KV@setkeys#1#2{%
  \def\@tempa{#1}%
  \edef\KV@prefix{%
  \ifx\@tempa\KV@psset\else
                  KV@%
  \fi
                  #1@}%
  \KV@do#2,\relax,}
\def\psset#1{%
  \def\KV@prefix{psset@}%
  \KV@do#1,\relax,}
\def\use@par{\expandafter\psset\expandafter{\pst@par}%
             \let\pst@par\@empty}
\def\KV@list[#1]{%
  \def\KV@undefined{\KV@add#1}%
   \ifx#1\@undefined
    \let#1\@empty
   \fi
  \KV@setkeys}
\def\KV@do#1,{%
 \ifx\relax#1\empty\else
  \KV@split#1==\relax
  \expandafter\KV@do\fi}
\def\KV@split#1=#2=#3\relax{%
  \KV@@sp@def\@tempa{#1}%
  \ifx\@tempa\@empty\else
    \expandafter\let\expandafter\@tempc
      \csname\KV@prefix\@tempa\endcsname
    \ifx\@tempc\relax
      \KV@undefined{#2}{#3}%
    \else
      \ifx\@empty#3\@empty
        \KV@default
      \else
        \KV@@sp@def\@tempb{#2}%
        \expandafter\@tempc\expandafter{\@tempb}\relax
      \fi
    \fi
  \fi}
\def\KV@default{%
  \expandafter\let\expandafter\@tempb
    \csname\KV@prefix\@tempa @default\endcsname
  \ifx\@tempb\relax
    \KV@err{No value specified for \@tempa}%
  \else
    \@tempb\relax
  \fi}
\def\KV@add#1#2#3{%
  \toks2\expandafter{#1}%
  \KV@@sp@def\@tempb{#2}%
  \toks4\expandafter{\@tempb}%
  \edef#1{\the\toks2
          \ifx#1\@empty\else,\fi
          \@tempa
          \ifx\KV@add#3\KV@add\else={\the\toks4}\fi}}
\def\KV@err#1{\errmessage{keyval: #1}}
\def\KV@error#1#2{\KV@err{\@tempa\space undefined}}
\def\@tempa#1{%
\def\KV@@sp@def##1##2{\KV@@sp@b##2\@nil\@nil#1\@nil\relax##1}}
\@tempa{ }
\def\KV@@sp@b#1#2 \@nil{\KV@@sp@c#1#2}
\def\KV@@sp@c#1\@nil#2\relax#3{\def#3{#1}}
\def\define@key#1#2{%
  \def\KV@prefix{#1}%
  \edef\KV@prefix{%
    \ifx\KV@prefix\KV@psset\else
        KV@%
     \fi
        #1@#2}%
  \@ifnextchar[\KV@def{\@namedef\KV@prefix####1}}
\def\KV@def[#1]{%
  \@namedef{\KV@prefix @default\expandafter}\expandafter
    {\csname \KV@prefix\endcsname{#1}}%
  \@namedef\KV@prefix##1}
\endinput
%%
%% End of file `pst-key.tex'.
