#!/usr/local/bin/perl

#  Extracts Fortran 90 interface block

$off = '!ifndef INTERFACE';
$on  = '!endif INTERFACE';

$out=1;
while (<>) {
  $out=0 if ( /^\s*$off\s*$/  );
  if ( /^\s*$on\s*$/  ) {
    $out=1;
    next;
  }
  print $_ if $out;
}
