Merge remote-tracking branch 'origin/release-v4.5'
[WRF.git] / tools / CodeBase / nocontf90.c
blob2892fdbf54eca52c40b33b3c9900c6174c14709a
1 #include <stdio.h>
2 #include <string.h>
4 #define INLINELEN 8092
6 char inln[INLINELEN] ;
8 int protex_state = 0 ;
10 main()
12 while( fgets( inln, INLINELEN, stdin ) != NULL )
14 remove_nl( inln ) ;
15 if ( contains_str ( inln , "<DESCRIPTION>" ) ) {
16 protex_state = 1 ;
17 printf("%s\n",inln) ;
18 continue ;
20 if ( contains_str ( inln , "</DESCRIPTION>" ) ) {
21 protex_state = 0 ;
22 printf("%s\n",inln) ;
23 continue ;
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 ) ;
30 if ( ! protex_state ) {
31 lower_case_str ( inln ) ;
32 remove_chars ( inln, ";", '\n' ) ;
34 if ( empty ( inln ) ) continue ;
35 if ( remove_ampersands ( inln ) )
36 printf("%s",inln) ;
37 else
38 printf("%s\n",inln) ;