
(# This file contains the source code for the virtual machine program
in exf.c. It needs the fun compiler to be compiled, which is
distributed separately, but an already compiled version of exf.c
generated by this code is distributed with the avram source. #)

#import std
#import nat
#import def  # from the fun compiler source tree, for the word_wrap function

#output * file$[
   stamp: &!,
   path: ~&iNC+ --'.c'+ ~&n,
   contents: ~&m; -+
      //-- ~&NiC --<''> <
         '/* a quick virtual machine program to list the available library functions;',
         '   source code is in exfsrc.fun */'>,
      --<''>+ ^lrNCT(~&y; * --'\',~&z)+ ~&a^& ^JalPfarPRC/~&f ~&a; ^(take/79,skip/79); ->~&lyPlzPrCX ~&l&& ~&lz==`\,
      'char *exf_code = "'--+ --'";'+ `\?=(~&iiNCC,~&iNC)*=+ ~&xttx+ ~&tt+ ~=` *~+ ~&L+ %xP+-]

#optimize+

exf =

have('*','*'); :/''+ --<'',''>+ ~&?\<'no library functions found'>! |=&l; -<&hl; -+
   (*= ^HlrTS\~&lNCrX zipp+ ` !*+ ~&l)^T(
      ~&rhthPNCC; \/~&plrNCXS ~&H\'functions' ^lrNCC/~& `-!*,
      ^p/~&rtt ^H\~&l *+ -<&;+ word_wrap+ difference/79+ length+ ~&rh),
   ^/~&rSS ~&hlPS;  --' '*+ take/*40+ ~&rSS+ zipp` ^*D(leql$^,~&)+ (~&H\'library' ^lrNCC/~& `-!*)--+-
