/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad/cb2m1.awk
ViewVC logotype

Contents of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad/cb2m1.awk

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


Revision 1.2 - (show annotations) (download)
Thu Jul 6 18:25:27 2006 UTC (20 years, 4 months ago) by utke
Branch: MAIN
Changes since 1.1: +2 -1 lines
mixed preprocessor directives with common block definitions,
tries to block out a bit better the continued common block parts interspersed with
preprocessor directives but still get them all out because
ifdef my be outside of the /COMMON/ while endif may be inside

1 BEGIN { commonDecl = 0}
2 /^ .*/ {commonDecl = 0 }
3 /^[^ ]/ && !/^#ifdef / && !/^#endif/ && !/^#if / && !/^#else/ {commonDecl = 0 }
4 /^ *COMMON/ || /^ *common/ { commonDecl = 1 }
5 / &/ { if (commonDecl != 1) {print} }
6 /^#ifdef / || /^#endif/ || /^#if / || /^#else/ { if (commonDecl == 1) {print} }
7 {if (commonDecl ==0 ) print }
8 END {}

  ViewVC Help
Powered by ViewVC 1.1.22