New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 774 for trunk/AGRIF/LIB/dependfile.c – NEMO

Ignore:
Timestamp:
2007-12-18T17:45:53+01:00 (17 years ago)
Author:
rblod
Message:

Update Agrif, see ticket:#39

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AGRIF/LIB/dependfile.c

    r663 r774  
    3131/* knowledge of the CeCILL-C license and that you accept its terms.           */ 
    3232/******************************************************************************/ 
    33 /* version 1.6                                                                */ 
     33/* version 1.7                                                                */ 
    3434/******************************************************************************/ 
    3535#include <stdio.h> 
     
    9292     } 
    9393  } 
     94  NbMailleXDefined = 0; 
    9495  if ( out == 1 ) 
    9596  { 
     97     NbMailleXDefined = 1; 
    9698     dependfileoutput = fopen(".dependnbxnby","w"); 
    9799     fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars); 
     
    194196  FILE *dependfileoutput; 
    195197  listusemodule *parcours; 
    196   char ligne[LONGNOM]; 
     198  char ligne[LONG_C]; 
    197199 
    198200 
     
    236238  FILE *dependfileoutput; 
    237239  listusemodule *parcours; 
    238   char ligne[LONGNOM]; 
     240  char ligne[LONG_C]; 
    239241 
    240242  convert2lower(NameTampon); 
     
    279281  FILE *dependfileoutput; 
    280282  listvar *parcours; 
    281   char ligne[LONGNOM]; 
     283  char ligne[LONG_C]; 
    282284 
    283285  if ( List_GlobalParameter_Var ) 
     
    318320  FILE *dependfileoutput; 
    319321  listparameter *parcours; 
    320   char ligne[LONGNOM]; 
     322  char ligne[LONG_C]; 
    321323 
    322324  convert2lower(NameTampon); 
     
    370372  listvar *parcours; 
    371373  listdim *dims; 
    372   char ligne[LONGNOM]; 
    373   char listdimension[LONGNOM]; 
    374   char curname[LONGNOM]; 
     374  char ligne[LONG_C]; 
     375  char listdimension[LONG_C]; 
     376  char curname[LONG_C]; 
    375377  int out; 
    376378 
     
    511513listvar *Readthedependfile( char *NameTampon , listvar *listout) 
    512514{ 
    513   char ligne[LONGNOM]; 
     515  char ligne[LONG_C]; 
    514516  FILE *dependfileoutput; 
    515517  listvar *parcours0; 
    516518  listvar *parcours; 
    517519  listvar *parcoursprec; 
    518   char nothing[LONGNOM]; 
     520  char nothing[LONG_C]; 
    519521  int i; 
    520522 
     
    675677  listnom *ref; 
    676678 
     679  ref = (listnom *)NULL; 
    677680  if ((dependfileoutput=fopen(".dependAllocAgrif","r"))!=NULL) 
    678681  { 
     
    681684     { 
    682685        parcours=(listnom *)malloc(sizeof(listnom)); 
     686        strcpy(parcours->o_nom,""); 
     687 
    683688        fscanf(dependfileoutput,"%s\n",&parcours->o_nom); 
    684689        parcours->suiv = NULL; 
     
    791796{ 
    792797  FILE *dependfileoutput; 
    793   char ligne[LONGNOM]; 
     798  char ligne[LONG_C]; 
    794799  int out; 
    795800 
     
    820825{ 
    821826  FILE *dependfileoutput; 
    822   char ligne[LONGNOM]; 
     827  char ligne[LONG_C]; 
    823828  int out; 
    824829 
     
    836841  return out; 
    837842} 
     843 
     844 
     845 
     846void Write_val_max() 
     847{ 
     848  FILE *dependfileoutput; 
     849 
     850  if ((dependfileoutput=fopen(".dependvalmax","w"))!=NULL) 
     851  { 
     852     fprintf(dependfileoutput,"length_last\n"); 
     853     fprintf(dependfileoutput,"%d\n",length_last); 
     854     fprintf(dependfileoutput,"length_first\n"); 
     855     fprintf(dependfileoutput,"%d\n",length_first); 
     856     fprintf(dependfileoutput,"length_v_typevar\n"); 
     857     fprintf(dependfileoutput,"%d\n",length_v_typevar); 
     858     fprintf(dependfileoutput,"length_v_nomvar\n"); 
     859     fprintf(dependfileoutput,"%d\n",length_v_nomvar); 
     860     fprintf(dependfileoutput,"length_v_dimchar\n"); 
     861     fprintf(dependfileoutput,"%d\n",length_v_dimchar); 
     862     fprintf(dependfileoutput,"length_v_modulename\n"); 
     863     fprintf(dependfileoutput,"%d\n",length_v_modulename); 
     864     fprintf(dependfileoutput,"length_v_commonname\n"); 
     865     fprintf(dependfileoutput,"%d\n",length_v_commonname); 
     866     fprintf(dependfileoutput,"length_v_vallengspec\n"); 
     867     fprintf(dependfileoutput,"%d\n",length_v_vallengspec); 
     868     fprintf(dependfileoutput,"length_v_nameinttypename\n"); 
     869     fprintf(dependfileoutput,"%d\n",length_v_nameinttypename); 
     870     fprintf(dependfileoutput,"length_v_commoninfile\n"); 
     871     fprintf(dependfileoutput,"%d\n",length_v_commoninfile); 
     872     fprintf(dependfileoutput,"length_v_subroutinename\n"); 
     873     fprintf(dependfileoutput,"%d\n",length_v_subroutinename); 
     874     fprintf(dependfileoutput,"length_v_precision\n"); 
     875     fprintf(dependfileoutput,"%d\n",length_v_precision); 
     876     fprintf(dependfileoutput,"length_v_IntentSpec\n"); 
     877     fprintf(dependfileoutput,"%d\n",length_v_IntentSpec); 
     878     fprintf(dependfileoutput,"length_v_initialvalue\n"); 
     879     fprintf(dependfileoutput,"%d\n",length_v_initialvalue); 
     880     fprintf(dependfileoutput,"length_v_readedlistdimension\n"); 
     881     fprintf(dependfileoutput,"%d\n",length_v_readedlistdimension); 
     882     fprintf(dependfileoutput,"length_u_usemodule\n"); 
     883     fprintf(dependfileoutput,"%d\n",length_u_usemodule); 
     884     fprintf(dependfileoutput,"length_u_charusemodule\n"); 
     885     fprintf(dependfileoutput,"%d\n",length_u_charusemodule); 
     886     fprintf(dependfileoutput,"length_u_cursubroutine\n"); 
     887     fprintf(dependfileoutput,"%d\n",length_u_cursubroutine); 
     888     fprintf(dependfileoutput,"length_u_modulename\n"); 
     889     fprintf(dependfileoutput,"%d\n",length_u_modulename); 
     890     fprintf(dependfileoutput,"length_n_name\n"); 
     891     fprintf(dependfileoutput,"%d\n",length_n_name); 
     892     fprintf(dependfileoutput,"length_c_namevar\n"); 
     893     fprintf(dependfileoutput,"%d\n",length_c_namevar); 
     894     fprintf(dependfileoutput,"length_c_namepointedvar\n"); 
     895     fprintf(dependfileoutput,"%d\n",length_c_namepointedvar); 
     896     fprintf(dependfileoutput,"length_o_nom\n"); 
     897     fprintf(dependfileoutput,"%d\n",length_o_nom); 
     898     fprintf(dependfileoutput,"length_o_module\n"); 
     899     fprintf(dependfileoutput,"%d\n",length_o_module); 
     900     fprintf(dependfileoutput,"length_a_nomvar\n"); 
     901     fprintf(dependfileoutput,"%d\n",length_a_nomvar); 
     902     fprintf(dependfileoutput,"length_a_subroutine\n"); 
     903     fprintf(dependfileoutput,"%d\n",length_a_subroutine); 
     904     fprintf(dependfileoutput,"length_a_module\n"); 
     905     fprintf(dependfileoutput,"%d\n",length_a_module); 
     906     fprintf(dependfileoutput,"length_usemodule\n"); 
     907     fprintf(dependfileoutput,"%d\n",length_t_usemodule); 
     908     fprintf(dependfileoutput,"length_cursubroutine\n"); 
     909     fprintf(dependfileoutput,"%d\n",length_t_cursubroutine); 
     910     fprintf(dependfileoutput,"length_curfilename\n"); 
     911     fprintf(dependfileoutput,"%d\n",length_curfilename); 
     912     fprintf(dependfileoutput,"length_nomfileoutput\n"); 
     913     fprintf(dependfileoutput,"%d\n",length_nomfileoutput); 
     914     fprintf(dependfileoutput,"length_motparse\n"); 
     915     fprintf(dependfileoutput,"%d\n",length_motparse); 
     916     fprintf(dependfileoutput,"length_mainfile\n"); 
     917     fprintf(dependfileoutput,"%d\n",length_mainfile); 
     918     fprintf(dependfileoutput,"length_nomdir\n"); 
     919     fprintf(dependfileoutput,"%d\n",length_nomdir); 
     920     fprintf(dependfileoutput,"length_commondirout\n"); 
     921     fprintf(dependfileoutput,"%d\n",length_commondirout); 
     922     fprintf(dependfileoutput,"length_commondirin\n"); 
     923     fprintf(dependfileoutput,"%d\n",length_commondirin); 
     924     fprintf(dependfileoutput,"length_filetoparse\n"); 
     925     fprintf(dependfileoutput,"%d\n",length_filetoparse); 
     926     fprintf(dependfileoutput,"length_curbuf\n"); 
     927     fprintf(dependfileoutput,"%d\n",length_curbuf); 
     928     fprintf(dependfileoutput,"length_toprintglob\n"); 
     929     fprintf(dependfileoutput,"%d\n",length_toprintglob); 
     930     fprintf(dependfileoutput,"Size_char0d\n"); 
     931     fprintf(dependfileoutput,"%d\n",value_char_size); 
     932     fprintf(dependfileoutput,"Size_char1d\n"); 
     933     fprintf(dependfileoutput,"%d\n",value_char_size1); 
     934     fprintf(dependfileoutput,"Size_char2d\n"); 
     935     fprintf(dependfileoutput,"%d\n",value_char_size2); 
     936     fprintf(dependfileoutput,"Size_char3d\n"); 
     937     fprintf(dependfileoutput,"%d\n",value_char_size3); 
     938     fprintf(dependfileoutput,"length_tmpvargridname\n"); 
     939     fprintf(dependfileoutput,"%d\n",length_tmpvargridname); 
     940     fprintf(dependfileoutput,"length_ligne_Subloop\n"); 
     941     fprintf(dependfileoutput,"%d\n",length_ligne_Subloop); 
     942     fprintf(dependfileoutput,"length_lvargridname_toamr\n"); 
     943     fprintf(dependfileoutput,"%d\n",length_lvargridname_toamr); 
     944     fprintf(dependfileoutput,"length_toprint_toamr\n"); 
     945     fprintf(dependfileoutput,"%d\n",length_toprint_utilagrif); 
     946     fprintf(dependfileoutput,"length_toprinttmp_utilchar\n"); 
     947     fprintf(dependfileoutput,"%d\n",length_toprinttmp_utilchar); 
     948     fprintf(dependfileoutput,"length_ligne_writedecl\n"); 
     949     fprintf(dependfileoutput,"%d\n",length_ligne_writedecl); 
     950     fprintf(dependfileoutput,"length_newname_toamr\n"); 
     951     fprintf(dependfileoutput,"%d\n",length_newname_toamr); 
     952     fprintf(dependfileoutput,"length_newname_writedecl\n"); 
     953     fprintf(dependfileoutput,"%d\n",length_newname_writedecl); 
     954     fprintf(dependfileoutput,"length_ligne_toamr\n"); 
     955     fprintf(dependfileoutput,"%d\n",length_ligne_toamr); 
     956     fprintf(dependfileoutput,"length_tmpligne_writedecl\n"); 
     957     fprintf(dependfileoutput,"%d\n",length_tmpligne_writedecl); 
     958/*     fprintf(dependfileoutput,"\n"); 
     959     fprintf(dependfileoutput,"%d\n",); 
     960     fprintf(dependfileoutput,"\n"); 
     961     fprintf(dependfileoutput,"%d\n",); 
     962     fprintf(dependfileoutput,"\n"); 
     963     fprintf(dependfileoutput,"%d\n",); 
     964     fprintf(dependfileoutput,"\n"); 
     965     fprintf(dependfileoutput,"%d\n",); 
     966     fprintf(dependfileoutput,"\n"); 
     967     fprintf(dependfileoutput,"%d\n",); 
     968     fprintf(dependfileoutput,"\n"); 
     969     fprintf(dependfileoutput,"%d\n",); 
     970     fprintf(dependfileoutput,"\n"); 
     971     fprintf(dependfileoutput,"%d\n",); 
     972     fprintf(dependfileoutput,"\n"); 
     973     fprintf(dependfileoutput,"%d\n",); 
     974     fprintf(dependfileoutput,"\n"); 
     975     fprintf(dependfileoutput,"%d\n",);*/ 
     976 
     977     fclose(dependfileoutput); 
     978  } 
     979} 
     980 
     981 
     982void Read_val_max() 
     983{ 
     984  char nothing[LONG_C]; 
     985  FILE *dependfileoutput; 
     986 
     987  if ((dependfileoutput=fopen(".dependvalmax","r"))!=NULL) 
     988  { 
     989     fscanf(dependfileoutput,"%s\n",nothing); 
     990     fscanf(dependfileoutput,"%d\n",&length_last); 
     991     fscanf(dependfileoutput,"%s\n",nothing); 
     992     fscanf(dependfileoutput,"%d\n",&length_first); 
     993     fscanf(dependfileoutput,"%s\n",nothing); 
     994     fscanf(dependfileoutput,"%d\n",&length_v_typevar); 
     995     fscanf(dependfileoutput,"%s\n",nothing); 
     996     fscanf(dependfileoutput,"%d\n",&length_v_nomvar); 
     997     fscanf(dependfileoutput,"%s\n",nothing); 
     998     fscanf(dependfileoutput,"%d\n",&length_v_dimchar); 
     999     fscanf(dependfileoutput,"%s\n",nothing); 
     1000     fscanf(dependfileoutput,"%d\n",&length_v_modulename); 
     1001     fscanf(dependfileoutput,"%s\n",nothing); 
     1002     fscanf(dependfileoutput,"%d\n",&length_v_commonname); 
     1003     fscanf(dependfileoutput,"%s\n",nothing); 
     1004     fscanf(dependfileoutput,"%d\n",&length_v_vallengspec); 
     1005     fscanf(dependfileoutput,"%s\n",nothing); 
     1006     fscanf(dependfileoutput,"%d\n",&length_v_nameinttypename); 
     1007     fscanf(dependfileoutput,"%s\n",nothing); 
     1008     fscanf(dependfileoutput,"%d\n",&length_v_commoninfile); 
     1009     fscanf(dependfileoutput,"%s\n",nothing); 
     1010     fscanf(dependfileoutput,"%d\n",&length_v_subroutinename); 
     1011     fscanf(dependfileoutput,"%s\n",nothing); 
     1012     fscanf(dependfileoutput,"%d\n",&length_v_precision); 
     1013     fscanf(dependfileoutput,"%s\n",nothing); 
     1014     fscanf(dependfileoutput,"%d\n",&length_v_IntentSpec); 
     1015     fscanf(dependfileoutput,"%s\n",nothing); 
     1016     fscanf(dependfileoutput,"%d\n",&length_v_initialvalue); 
     1017     fscanf(dependfileoutput,"%s\n",nothing); 
     1018     fscanf(dependfileoutput,"%d\n",&length_v_readedlistdimension); 
     1019     fscanf(dependfileoutput,"%s\n",nothing); 
     1020     fscanf(dependfileoutput,"%d\n",&length_u_usemodule); 
     1021     fscanf(dependfileoutput,"%s\n",nothing); 
     1022     fscanf(dependfileoutput,"%d\n",&length_u_charusemodule); 
     1023     fscanf(dependfileoutput,"%s\n",nothing); 
     1024     fscanf(dependfileoutput,"%d\n",&length_u_cursubroutine); 
     1025     fscanf(dependfileoutput,"%s\n",nothing); 
     1026     fscanf(dependfileoutput,"%d\n",&length_u_modulename); 
     1027     fscanf(dependfileoutput,"%s\n",nothing); 
     1028     fscanf(dependfileoutput,"%d\n",&length_n_name); 
     1029     fscanf(dependfileoutput,"%s\n",nothing); 
     1030     fscanf(dependfileoutput,"%d\n",&length_c_namevar); 
     1031     fscanf(dependfileoutput,"%s\n",nothing); 
     1032     fscanf(dependfileoutput,"%d\n",&length_c_namepointedvar); 
     1033     fscanf(dependfileoutput,"%s\n",nothing); 
     1034     fscanf(dependfileoutput,"%d\n",&length_o_nom); 
     1035     fscanf(dependfileoutput,"%s\n",nothing); 
     1036     fscanf(dependfileoutput,"%d\n",&length_o_module); 
     1037     fscanf(dependfileoutput,"%s\n",nothing); 
     1038     fscanf(dependfileoutput,"%d\n",&length_a_nomvar); 
     1039     fscanf(dependfileoutput,"%s\n",nothing); 
     1040     fscanf(dependfileoutput,"%d\n",&length_a_subroutine); 
     1041     fscanf(dependfileoutput,"%s\n",nothing); 
     1042     fscanf(dependfileoutput,"%d\n",&length_a_module); 
     1043     fscanf(dependfileoutput,"%s\n",nothing); 
     1044     fscanf(dependfileoutput,"%d\n",&length_t_usemodule); 
     1045     fscanf(dependfileoutput,"%s\n",nothing); 
     1046     fscanf(dependfileoutput,"%d\n",&length_t_cursubroutine); 
     1047     fscanf(dependfileoutput,"%s\n",nothing); 
     1048     fscanf(dependfileoutput,"%d\n",&length_curfilename); 
     1049     fscanf(dependfileoutput,"%s\n",nothing); 
     1050     fscanf(dependfileoutput,"%d\n",&length_nomfileoutput); 
     1051     fscanf(dependfileoutput,"%s\n",nothing); 
     1052     fscanf(dependfileoutput,"%d\n",&length_motparse); 
     1053     fscanf(dependfileoutput,"%s\n",nothing); 
     1054     fscanf(dependfileoutput,"%d\n",&length_mainfile); 
     1055     fscanf(dependfileoutput,"%s\n",nothing); 
     1056     fscanf(dependfileoutput,"%d\n",&length_nomdir); 
     1057     fscanf(dependfileoutput,"%s\n",nothing); 
     1058     fscanf(dependfileoutput,"%d\n",&length_commondirout); 
     1059     fscanf(dependfileoutput,"%s\n",nothing); 
     1060     fscanf(dependfileoutput,"%d\n",&length_commondirin); 
     1061     fscanf(dependfileoutput,"%s\n",nothing); 
     1062     fscanf(dependfileoutput,"%d\n",&length_filetoparse); 
     1063     fscanf(dependfileoutput,"%s\n",nothing); 
     1064     fscanf(dependfileoutput,"%d\n",&length_curbuf); 
     1065     fscanf(dependfileoutput,"%s\n",nothing); 
     1066     fscanf(dependfileoutput,"%d\n",&length_toprintglob); 
     1067     fscanf(dependfileoutput,"%s\n",nothing); 
     1068     fscanf(dependfileoutput,"%d\n",&value_char_size); 
     1069     fscanf(dependfileoutput,"%s\n",nothing); 
     1070     fscanf(dependfileoutput,"%d\n",&value_char_size1); 
     1071     fscanf(dependfileoutput,"%s\n",nothing); 
     1072     fscanf(dependfileoutput,"%d\n",&value_char_size2); 
     1073     fscanf(dependfileoutput,"%s\n",nothing); 
     1074     fscanf(dependfileoutput,"%d\n",&value_char_size3); 
     1075     fscanf(dependfileoutput,"%s\n",nothing); 
     1076     fscanf(dependfileoutput,"%d\n",&length_tmpvargridname); 
     1077     fscanf(dependfileoutput,"%s\n",nothing); 
     1078     fscanf(dependfileoutput,"%d\n",&length_ligne_Subloop); 
     1079     fscanf(dependfileoutput,"%s\n",nothing); 
     1080     fscanf(dependfileoutput,"%d\n",&length_lvargridname_toamr); 
     1081     fscanf(dependfileoutput,"%s\n",nothing); 
     1082     fscanf(dependfileoutput,"%d\n",&length_toprint_utilagrif); 
     1083     fscanf(dependfileoutput,"%s\n",nothing); 
     1084     fscanf(dependfileoutput,"%d\n",&length_toprinttmp_utilchar); 
     1085     fscanf(dependfileoutput,"%s\n",nothing); 
     1086     fscanf(dependfileoutput,"%d\n",&length_ligne_writedecl); 
     1087     fscanf(dependfileoutput,"%s\n",nothing); 
     1088     fscanf(dependfileoutput,"%d\n",&length_newname_toamr); 
     1089     fscanf(dependfileoutput,"%s\n",nothing); 
     1090     fscanf(dependfileoutput,"%d\n",&length_newname_writedecl); 
     1091     fscanf(dependfileoutput,"%s\n",nothing); 
     1092     fscanf(dependfileoutput,"%d\n",&length_ligne_toamr); 
     1093     fscanf(dependfileoutput,"%s\n",nothing); 
     1094     fscanf(dependfileoutput,"%d\n",&length_tmpligne_writedecl); 
     1095/*     fscanf(dependfileoutput,"%s\n",nothing); 
     1096     fscanf(dependfileoutput,"%d\n",&); 
     1097     fscanf(dependfileoutput,"%s\n",nothing); 
     1098     fscanf(dependfileoutput,"%d\n",&); 
     1099     fscanf(dependfileoutput,"%s\n",nothing); 
     1100     fscanf(dependfileoutput,"%d\n",&); 
     1101     fscanf(dependfileoutput,"%s\n",nothing); 
     1102     fscanf(dependfileoutput,"%d\n",&); 
     1103     fscanf(dependfileoutput,"%s\n",nothing); 
     1104     fscanf(dependfileoutput,"%d\n",&); 
     1105     fscanf(dependfileoutput,"%s\n",nothing); 
     1106     fscanf(dependfileoutput,"%d\n",&); 
     1107     fscanf(dependfileoutput,"%s\n",nothing); 
     1108     fscanf(dependfileoutput,"%d\n",&); 
     1109     fscanf(dependfileoutput,"%s\n",nothing); 
     1110     fscanf(dependfileoutput,"%d\n",&); 
     1111     fscanf(dependfileoutput,"%s\n",nothing); 
     1112     fscanf(dependfileoutput,"%d\n",&);*/ 
     1113 
     1114     fclose(dependfileoutput); 
     1115  } 
     1116} 
Note: See TracChangeset for help on using the changeset viewer.