%N fullname %F $MIR/src/subs/fullname.for
%D Expand an environment variable in front of a filename
%P bpw
%: files
%B
      character*(*) function fullname( filename )
      character*(*) filename

 This takes a filename consisting of two parts separated by a ':' and
 expands the environment variable indicated by the first half. If no ':'
 occurs, it checks for the occurrence of a '$' and tries to expand the
 environment variable indicated by that (the characters between "$" and
 "/"). If still nothing is found the original input is returned.

 Input:
   filename:    name of a file containing an environment variable
