source: lmdz_wrf/trunk/WRFV3/tools/CodeBase/nocontf90.c @ 14

Last change on this file since 14 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 954 bytes
Line 
1#include <stdio.h>
2#include <string.h>
3
4#define INLINELEN 8092
5
6char inln[INLINELEN] ;
7
8int protex_state = 0 ;
9
10main()
11{
12  while( fgets( inln, INLINELEN, stdin ) != NULL )
13  {
14    remove_nl( inln ) ;
15    if ( contains_str ( inln , "<DESCRIPTION>" ) ) {
16       protex_state = 1 ;
17       printf("%s\n",inln) ;
18       continue ;
19    }
20    if ( contains_str ( inln , "</DESCRIPTION>" ) ) {
21       protex_state = 0 ;
22       printf("%s\n",inln) ;
23       continue ;
24    }
25    if ( ! contains_str( inln , "SCALAR DEREFS" ) && 
26         ! ( contains_str( inln , "STARTOFREGISTRYGENERATEDINCLUDE" ) && contains_str( inln , "i1_decl.inc" ) ) &&
27         ! protex_state ) {
28      remove_comments ( inln ) ;
29    }
30    if ( ! protex_state ) { 
31      lower_case_str ( inln ) ;
32      remove_chars ( inln, ";", '\n' ) ;
33    }
34    if ( empty ( inln ) ) continue ;
35    if ( remove_ampersands ( inln ) )
36      printf("%s",inln) ;
37    else
38      printf("%s\n",inln) ;
39  }
40}
41
Note: See TracBrowser for help on using the repository browser.