/[MITgcm]/MITgcm_contrib/ESMF/mytools/print_func.awk
ViewVC logotype

Annotation of /MITgcm_contrib/ESMF/mytools/print_func.awk

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Feb 16 01:07:15 2004 UTC (21 years, 5 months ago) by cnh
Branch: MAIN
CVS Tags: adoption_1_0_pre_A, HEAD
Files from work with Erik

1 cnh 1.1 # AWK script to print out END FUNCTION at the end of all the FUNCTIONS.
2     # For some reason F90 standard specifies this, instead of just END and so
3     # some compilers choke if its not there - not sure why anyone would put
4     # this in the standard!
5     #
6     BEGIN{isub=0}
7     /^ .*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]/,/^ *[Ee][Nn][Dd] *$/ {printf("%s",$0); isub=1}
8     /^ *[Ee][Nn][Dd] *$/{if (isub==1){isub=2}}
9     { if ( isub==0 ) {}
10     else if ( isub==1 ) {printf("\n")}
11     else if ( isub==2 ) {printf(" FUNCTION\n");isub=0;printf(".") | "cat >&2" }
12     }
13     END{printf("\n") | "cat >&2"}

  ViewVC Help
Powered by ViewVC 1.1.22