Changeset 6237 for branches/UKMO/nemo_v3_6_STABLE_copy/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithlistofcoupled.c
- Timestamp:
- 2016-01-13T15:47:26+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/nemo_v3_6_STABLE_copy/NEMOGCM/EXTERNAL/AGRIF/LIB/WorkWithlistofcoupled.c
r5781 r6237 40 40 41 41 /******************************************************************************/ 42 /* varis allocatable_0*/42 /* variscoupled_0 */ 43 43 /******************************************************************************/ 44 44 /* Firstpass 0 */ … … 46 46 /* */ 47 47 /******************************************************************************/ 48 int variscoupled_0(c har *ident)48 int variscoupled_0(const char *ident) 49 49 { 50 listallocate *newvaralloc; 51 listvarpointtovar *pointtmplist; 52 listcouple *coupletmp; 53 int out; 54 55 out =0; 56 if (firstpass == 0 ) 57 { 58 pointtmplist = List_CouplePointed_Var; 59 while ( pointtmplist && out == 0) 60 { 61 coupletmp = pointtmplist->t_couple; 62 while ( coupletmp && out == 0) 63 { 64 /* we should find the same variable name in the same subroutine */ 65 if ( !strcasecmp(ident,coupletmp->c_namevar) && 66 !strcasecmp(subroutinename, 67 pointtmplist->t_cursubroutine) && 68 strcasecmp(coupletmp->c_namepointedvar,"") 69 ) 70 { 71 out = 1; 72 } 73 coupletmp = coupletmp->suiv; 74 } 75 pointtmplist = pointtmplist->suiv; 76 } 77 } 78 return out; 50 listvarpointtovar *pointtmplist; 51 listcouple *coupletmp; 52 int out = 0; 53 54 if (firstpass == 0 ) 55 { 56 pointtmplist = List_CouplePointed_Var; 57 while ( pointtmplist && out == 0) 58 { 59 coupletmp = pointtmplist->t_couple; 60 while ( coupletmp && out == 0) 61 { 62 /* we should find the same variable name in the same subroutine */ 63 if ( !strcasecmp(ident, coupletmp->c_namevar) && 64 !strcasecmp(subroutinename, pointtmplist->t_cursubroutine) && 65 strcasecmp(coupletmp->c_namepointedvar, "") ) 66 { 67 out = 1; 68 } 69 coupletmp = coupletmp->suiv; 70 } 71 pointtmplist = pointtmplist->suiv; 72 } 73 } 74 return out; 79 75 } 80 76 81 c har * getcoupledname_0(char *ident)77 const char * getcoupledname_0(const char *ident) 82 78 { 83 listallocate *newvaralloc; 84 listvarpointtovar *pointtmplist; 85 listcouple *coupletmp; 86 int out; 87 88 out =0; 89 if (firstpass == 0 ) 90 { 91 pointtmplist = List_CouplePointed_Var; 92 while ( pointtmplist && out == 0) 93 { 94 coupletmp = pointtmplist->t_couple; 95 while ( coupletmp && out == 0) 96 { 97 /* we should find the same variable name in the same subroutine */ 98 if ( !strcasecmp(ident,coupletmp->c_namevar) && 99 !strcasecmp(subroutinename, 100 pointtmplist->t_cursubroutine) && 101 strcasecmp(coupletmp->c_namepointedvar,"") 102 ) 103 { 104 return(coupletmp->c_namepointedvar); 105 } 106 coupletmp = coupletmp->suiv; 107 } 108 pointtmplist = pointtmplist->suiv; 109 } 110 } 79 listvarpointtovar *pointtmplist; 80 listcouple *coupletmp; 81 int out = 0; 82 83 if (firstpass == 0 ) 84 { 85 pointtmplist = List_CouplePointed_Var; 86 while ( pointtmplist && out == 0) 87 { 88 coupletmp = pointtmplist->t_couple; 89 while ( coupletmp && out == 0) 90 { 91 /* we should find the same variable name in the same subroutine */ 92 if ( !strcasecmp(coupletmp->c_namevar,ident) && 93 !strcasecmp(pointtmplist->t_cursubroutine,subroutinename) && 94 strcasecmp(coupletmp->c_namepointedvar,"") ) 95 { 96 return coupletmp->c_namepointedvar; 97 } 98 coupletmp = coupletmp->suiv; 99 } 100 pointtmplist = pointtmplist->suiv; 101 } 102 } 103 printf("end of getcoupledname_0 -- you should not be there !!! \n"); 104 return NULL; 111 105 }
Note: See TracChangeset
for help on using the changeset viewer.