Changeset 774 for trunk/AGRIF/LIB/dependfile.c
- Timestamp:
- 2007-12-18T17:45:53+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AGRIF/LIB/dependfile.c
r663 r774 31 31 /* knowledge of the CeCILL-C license and that you accept its terms. */ 32 32 /******************************************************************************/ 33 /* version 1. 6*/33 /* version 1.7 */ 34 34 /******************************************************************************/ 35 35 #include <stdio.h> … … 92 92 } 93 93 } 94 NbMailleXDefined = 0; 94 95 if ( out == 1 ) 95 96 { 97 NbMailleXDefined = 1; 96 98 dependfileoutput = fopen(".dependnbxnby","w"); 97 99 fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars); … … 194 196 FILE *dependfileoutput; 195 197 listusemodule *parcours; 196 char ligne[LONG NOM];198 char ligne[LONG_C]; 197 199 198 200 … … 236 238 FILE *dependfileoutput; 237 239 listusemodule *parcours; 238 char ligne[LONG NOM];240 char ligne[LONG_C]; 239 241 240 242 convert2lower(NameTampon); … … 279 281 FILE *dependfileoutput; 280 282 listvar *parcours; 281 char ligne[LONG NOM];283 char ligne[LONG_C]; 282 284 283 285 if ( List_GlobalParameter_Var ) … … 318 320 FILE *dependfileoutput; 319 321 listparameter *parcours; 320 char ligne[LONG NOM];322 char ligne[LONG_C]; 321 323 322 324 convert2lower(NameTampon); … … 370 372 listvar *parcours; 371 373 listdim *dims; 372 char ligne[LONG NOM];373 char listdimension[LONG NOM];374 char curname[LONG NOM];374 char ligne[LONG_C]; 375 char listdimension[LONG_C]; 376 char curname[LONG_C]; 375 377 int out; 376 378 … … 511 513 listvar *Readthedependfile( char *NameTampon , listvar *listout) 512 514 { 513 char ligne[LONG NOM];515 char ligne[LONG_C]; 514 516 FILE *dependfileoutput; 515 517 listvar *parcours0; 516 518 listvar *parcours; 517 519 listvar *parcoursprec; 518 char nothing[LONG NOM];520 char nothing[LONG_C]; 519 521 int i; 520 522 … … 675 677 listnom *ref; 676 678 679 ref = (listnom *)NULL; 677 680 if ((dependfileoutput=fopen(".dependAllocAgrif","r"))!=NULL) 678 681 { … … 681 684 { 682 685 parcours=(listnom *)malloc(sizeof(listnom)); 686 strcpy(parcours->o_nom,""); 687 683 688 fscanf(dependfileoutput,"%s\n",&parcours->o_nom); 684 689 parcours->suiv = NULL; … … 791 796 { 792 797 FILE *dependfileoutput; 793 char ligne[LONG NOM];798 char ligne[LONG_C]; 794 799 int out; 795 800 … … 820 825 { 821 826 FILE *dependfileoutput; 822 char ligne[LONG NOM];827 char ligne[LONG_C]; 823 828 int out; 824 829 … … 836 841 return out; 837 842 } 843 844 845 846 void 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 982 void 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.