%D \module
%D   [       file=core-02d,
%D        version=1997.03.31,
%D          title=\CONTEXT\ Core Macros,
%D       subtitle=2D (to be split),
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
%C details.

\writestatus{loading}{Context Extra Macros (d)}

\unprotect

\def\definieerfilegroep%
  {\dodoubleargument\dodefinieerfilegroep}

\def\dodefinieerfilegroep[#1][#2]%
  {\getparameters
     [\??fp#1]
     [\c!file=#1,
      \c!voor=,
      \c!na=,
      #2]%
   \setvalue{\e!start#1}{\dostartfilegroep[#1]}}

\def\dostartfilegroep%
  {\dodoubleargument\dodostartfilegroep}

\def\dodostartfilegroep[#1][#2]%
  {\getvalue{\??fp#1\c!voor}%
   \setvalue{\e!stop#1}{\dostopfilegroep[#1][#2]}%
   \edef\!!stringa{\getvalue{\??fp#1\c!file}-#2}%
   \@EA\dolaadfilegroep\@EA[\!!stringa]%
   \getvalue{\e!start#1#2}}

\def\dolaadfilegroep[#1-#2#3#4#5]%
  {\readsysfile{#1-#2#3#4}{}{}}

\def\dostopfilegroep[#1][#2]%
  {\getvalue{\e!stop#1#2}%
   \getvalue{\??fp#1\c!na}}

\protect

\endinput
