%D \module
%D   [       file=minifun.mp,
%D        version=2018.06.02,
%D          title=\CONTEXT\ \METAPOST\ graphics,
%D       subtitle=format generation file,
%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 mreadme.pdf for
%C details.

%D This is a minimal \METAFUN\ instance which can be handy for isolated
%D subruns.

prologues := 0 ;
mpprocset := 1 ;

input "mp-base.mpiv" ;
input "mp-tool.mpiv" ;
input "mp-mlib.mpiv" ;
input "mp-luas.mpiv" ;
input "mp-page.mpiv" ;

string minifunversion ; minifunversion =
    "minifun iv"                        & " " &
    decimal year                        & "-" &
    decimal month                       & "-" &
    decimal day                         & " " &
    if ((time div 60) < 10)           :   "0" & fi
    decimal (time div 60)               & ":" &
    if ((time-(time div 60)*60) < 10) :   "0" & fi
    decimal (time-(time div 60)*60)   ;

let normalend = end ;

if known mplib :
    def end = ; message "" ; message minifunversion ; message "" ; endinput  ; enddef ;
    def bye = ; message "" ; message minifunversion ; message "" ; endinput  ; enddef ;
else :
    def end = ; message "" ; message minifunversion ; message "" ; normalend ; enddef ;
fi ;

% dump ; % obsolete in mplib
