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.
decl.h in branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/EXTERNAL/AGRIF/LIB – NEMO

source: branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/EXTERNAL/AGRIF/LIB/decl.h @ 5989

Last change on this file since 5989 was 5989, checked in by deazer, 8 years ago

Merging TMB and 25h diagnostics to head of trunk
added brief documentation

  • Property svn:keywords set to Id
File size: 31.6 KB
Line 
1/******************************************************************************/
2/*                                                                            */
3/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
4/*                                                                            */
5/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
6/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
7/* This software is governed by the CeCILL-C license under French law and     */
8/* abiding by the rules of distribution of free software.  You can  use,      */
9/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
10/* license as circulated by CEA, CNRS and INRIA at the following URL          */
11/* "http://www.cecill.info".                                                  */
12/*                                                                            */
13/* As a counterpart to the access to the source code and  rights to copy,     */
14/* modify and redistribute granted by the license, users are provided only    */
15/* with a limited warranty  and the software's author,  the holder of the     */
16/* economic rights,  and the successive licensors  have only  limited         */
17/* liability.                                                                 */
18/*                                                                            */
19/* In this respect, the user's attention is drawn to the risks associated     */
20/* with loading,  using,  modifying and/or developing or reproducing the      */
21/* software by the user in light of its specific status of free software,     */
22/* that may mean  that it is complicated to manipulate,  and  that  also      */
23/* therefore means  that it is reserved for developers  and  experienced      */
24/* professionals having in-depth computer knowledge. Users are therefore      */
25/* encouraged to load and test the software's suitability as regards their    */
26/* requirements in conditions enabling the security of their systems and/or   */
27/* data to be ensured and,  more generally, to use and operate it in the      */
28/* same conditions as regards security.                                       */
29/*                                                                            */
30/* The fact that you are presently reading this means that you have had       */
31/* knowledge of the CeCILL-C license and that you accept its terms.           */
32/******************************************************************************/
33/* version 1.7                                                                */
34/******************************************************************************/
35#define LONG_VNAME 80      // Max length for a variable name
36#define LONG_FNAME 1000    // Max length for a file name
37#define LONG_C     200
38#define LONG_M     1500
39
40#define NB_CAT_VARIABLES 5
41
42/******************************************************************************/
43/*********** Declaration of structures used in conv ***************************/
44/******************************************************************************/
45
46typedef struct
47{
48   char first[LONG_M];
49   char last[LONG_M];
50} typedim ;                /* fortran dimension as 'ndeb:nfin'                */
51
52typedef struct listdim
53{
54   typedim dim;
55   struct listdim *suiv;
56} listdim;                 /* list of the dimensions of a variable            */
57
58typedef struct variable
59{
60   char v_typevar[LONG_VNAME];
61   char v_nomvar[LONG_VNAME] ;
62   char v_oldname[LONG_VNAME] ;
63   char v_dimchar[LONG_VNAME];
64   char v_modulename[LONG_VNAME];
65   char v_commonname[LONG_VNAME];
66   char v_vallengspec[LONG_VNAME];
67   char v_nameinttypename[LONG_VNAME];
68   char v_commoninfile[LONG_FNAME];
69   char v_subroutinename[LONG_VNAME];
70   char v_precision[LONG_C];
71   char v_initialvalue[LONG_M];
72   char v_IntentSpec[LONG_M];
73   char v_readedlistdimension[LONG_M];
74   int  v_nbdim;
75   int  v_common;
76   int  v_positioninblock;
77   int  v_module;
78   int  v_save;
79   int  v_catvar;
80   int  v_VariableIsParameter;
81   int  v_PublicDeclare;
82   int  v_PrivateDeclare;
83   int  v_ExternalDeclare;
84   int  v_pointedvar;
85   int  v_notgrid;
86   int  v_dimensiongiven;
87   int  v_c_star;
88   int  v_indicetabvars;
89   int  v_pointerdeclare;
90   int  v_optionaldeclare;
91   int  v_allocatable;
92   int  v_target;
93   int  v_dimsempty;
94   listdim *v_dimension;
95} variable ;               /* type of a variable                              */
96                           /* v_typevar : type (integer, real, ...)           */
97                           /* v_nomvar : name of the variable                 */
98                           /* v_dimension : list of dimensions of the variable*/
99                           /* v_nbdim: 1 if the variable is 1d, etc ...       */
100                           /* precision : Name of the variable which          */
101                           /* determine the precision. example : wp in the    */
102                           /* case where REAL(wp)                             */
103
104typedef struct listvar
105{
106   variable *var ;
107   struct listvar * suiv;
108} listvar ;                /* list of variables                               */
109
110
111typedef struct listusemodule
112{
113   char u_usemodule[LONG_VNAME];
114   char u_charusemodule[LONG_VNAME];
115   char u_cursubroutine[LONG_VNAME];
116   char u_modulename[LONG_VNAME];
117   int  u_firstuse;
118   struct listusemodule * suiv;
119} listusemodule;           /* list of names                                   */
120
121typedef struct listparameter
122{
123   char p_name[LONG_M];
124   char p_modulename[LONG_M];
125   struct listparameter * suiv;
126} listparameter ;           /* list of names                                  */
127
128typedef struct listname
129{
130   char n_name[LONG_VNAME];
131   struct  listname* suiv;
132} listname ;            /* list of names                                  */
133
134typedef struct listcouple
135{
136   char c_namevar[LONG_VNAME];
137   char c_namepointedvar[LONG_VNAME];
138   struct listcouple * suiv;
139} listcouple;              /* list of names                                   */
140
141
142typedef struct listnom
143{
144   char o_nom[LONG_C];
145   char o_module[LONG_VNAME];
146   char o_subroutinename[LONG_M];
147   int  o_val;
148   listcouple *couple;
149   struct listnom * suiv;
150} listnom;                 /* list of names                                   */
151
152
153typedef struct listallocate
154{
155   char a_nomvar[LONG_C];
156   char a_subroutine[LONG_VNAME];
157   char a_module[LONG_VNAME];
158   struct listallocate * suiv;
159} listallocate ;
160
161
162typedef struct listvarpointtovar
163{
164   char t_usemodule[LONG_VNAME];
165   char t_cursubroutine[LONG_VNAME];
166   listcouple *t_couple;
167   struct  listvarpointtovar* suiv;
168}listvarpointtovar ;       /* list of names                                   */
169
170
171typedef struct listindice
172{
173   int i_indice;
174   struct  listindice * suiv;
175} listindice;              /* list of indiced                                 */
176
177 variable *curvar;
178
179 listvar *List_ModuleUsedInModuleUsed_Var;
180 listvar *List_ModuleUsed_Var;
181 listvar *listduplicated;
182
183 listvar *List_GlobalParameter_Var;
184 listvar *List_Global_Var;
185 listvar *List_Data_Var;
186 listvar *List_Data_Var_Cur;
187 listvar *List_Save_Var;
188 listvar *List_SubroutineArgument_Var;
189 listvar *List_SubroutineDeclaration_Var;
190 listvar *List_UsedInSubroutine_Var;
191 listvar *List_Parameter_Var;
192 listvar *List_Dimension_Var;
193 listvar *List_FunctionType_Var;
194 listvar *List_NotGridDepend_Var;
195 listvar *List_Common_Var;
196
197
198 listname *List_Pointer_Var;
199 listname *List_ImplicitNoneSubroutine;
200
201 listusemodule *List_NameOfModuleUsed;
202 listusemodule *List_Include;
203 listusemodule *listofmoduletmp;
204 listusemodule *tmpuselocallist;
205
206 listparameter *List_GlobParamModuleUsedInModuleUsed_Var;
207 listparameter *List_GlobParamModuleUsed_Var;
208
209 listnom *List_ContainsSubroutine;
210 listnom *List_Subroutine_For_Alloc;
211 listnom *listofmodules;
212 listnom *listofkind;
213 listnom *List_NameOfModule;
214 listnom *List_NameOfCommon;
215 listnom *List_SubroutineWhereAgrifUsed;
216
217 listallocate *List_Allocate_Var;
218
219 listvarpointtovar *List_CouplePointed_Var;
220                           /*  variables which are pointed to an other one    */
221
222 listindice *Listofavailableindices;
223                           /* List of available indices in the tabvars table  */
224 listindice **Listofavailableindices_glob;
225
226 listdim *curdim;
227 listdim *commondim;
228
229/******************************************************************************/
230/****************   *** COMMON Variables ***  *********************************/
231/******************************************************************************/
232
233 int positioninblock;
234 char commonvar[LONG_VNAME];
235 char commonblockname[LONG_VNAME];
236
237/******************************************************************************/
238/****************   *** AGRIF Variables ***   *********************************/
239/******************************************************************************/
240 int inagrifcallargument;
241 int afterpercent;
242 int sameagrifargument;
243 int InAgrifParentDef;
244 char sameagrifname[LONG_VNAME];
245/******************************************************************************/
246/****************   *** VAR DEF Variables ***   *******************************/
247/******************************************************************************/
248 int indicemaxtabvars[NB_CAT_VARIABLES];     /* Number of variables in the model i.e. last      */
249                           /*    indice used in  the tabvars table            */
250 int PublicDeclare;        /* Variable has been declared as PUBLIC */
251 int PrivateDeclare;       /* Variable has been declared as PRIVATE */
252 int ExternalDeclare;      /* Variable has been declared as EXTERNAL */
253 int InitialValueGiven;    /* An initial value has been given */
254 int Allocatabledeclare;
255 int Targetdeclare;
256 int SaveDeclare;
257 int functiondeclarationisdone;
258 int pointerdeclare;
259 int optionaldeclare;
260 int inside_type_declare;
261 int VariableIsParameter;
262 int dimsgiven;
263 int shouldincludempif;
264 int c_star;
265 char DeclType[LONG_VNAME];
266 char nameinttypename[LONG_VNAME];
267 char nameinttypenameback[LONG_VNAME];
268 int GlobalDeclaration;
269 int GlobalDeclarationType;
270 char InitValue[LONG_M];
271 char IntentSpec[LONG_M];
272 char NamePrecision[LONG_C];
273 char CharacterSize[LONG_VNAME];
274 char vallengspec[LONG_VNAME];
275 int isrecursive;
276 int is_result_present;
277
278/******************************************************************************/
279/****************   *** CONV Variables ***   **********************************/
280/******************************************************************************/
281 int dimprob ;             /* dimension of the problem : 1 for 1D,2 for 2D,   */
282                           /*    3 for 3D                                     */
283 int onlyfixedgrids;       /* = 1 if onlyfixedgrids is true                   */
284 int todebug;
285 int fixedgrids;           /* = 1 if fixedgrids is true                       */
286 char nbmaillesX[LONG_VNAME]; // number of cells in the x direction
287 char nbmaillesY[LONG_VNAME]; // number of cells in the y direction
288 char nbmaillesZ[LONG_VNAME]; // number of cells in the z direction
289 int IndicenbmaillesX;
290 int IndicenbmaillesY;
291 int IndicenbmaillesZ;
292
293 int inmodulemeet;
294 int incalldeclare;
295 int aftercontainsdeclare; /* Signale si l'on vient d'un contains ou non */
296 int retour77;
297 int callagrifinitgrids;
298 int callmpiinit;
299 int firstpass;
300 int pointedvar;
301 int NbMailleXDefined;
302 int agrif_parentcall;
303 int didvariableadded;
304 int SubloopScalar;        /* = 1 we should put in argument of sub_loop       */
305                           /*    only                                         */
306                           /*    scalar and not table u(1,1,1) in place of u  */
307 int inprogramdeclare;
308 int insubroutinedeclare;
309 int inmoduledeclare;
310 int dimsempty;
311 int created_dimensionlist;
312 int incontainssubroutine;
313
314 char meetagrifinitgrids[LONG_M];
315 char mpiinitvar[LONG_M];
316 char toprintglob[LONG_M];
317 char tmpvargridname[LONG_M];
318 char dependfilename[LONG_FNAME];
319 char charusemodule[LONG_VNAME];
320 char subofagrifinitgrids[LONG_M];
321 char curmodulename[LONG_VNAME];
322 char subroutinename[LONG_VNAME];
323 char cur_filename[LONG_FNAME];     // Name of the current parsed Fortran file
324 char config_file[LONG_FNAME];      // Name of conv configuration file (ex: amr.in)
325 char work_dir[LONG_FNAME];         // Work directory         (default: './')
326 char include_dir[LONG_FNAME];      // Include directory      (default: './AGRIF_INC')
327 char output_dir[LONG_FNAME];    // output directory       (default: './AGRIF_MODELFILES')
328 char input_dir[LONG_FNAME];     // source input directory (default: './')
329
330 FILE *fortran_out;          /* Output File                                    */
331 FILE *fortran_in;           /* Input File                                     */
332 FILE *oldfortran_out;
333 FILE *subloop;
334 FILE *module_declar;
335 FILE *allocationagrif;
336
337 long int pos_cur;         /* current position in the output file             */
338 long int pos_curagrifparent;
339                           /* current position in the output file             */
340 long int pos_curcall;     /* current position in the output file             */
341 long int pos_curuse;      /* current position in the output file             */
342 long int pos_curuseold;   /* current position in the output file             */
343 long int pos_curfunction; /* current position in the output file             */
344 long int pos_cur_decl;    /* current position in the output file             */
345 long int pos_curdata;     /* current position in the output file             */
346 long int pos_curparameter;/* current position in the output file             */
347 long int pos_curcommon;   /* current position in the output file             */
348 long int pos_cursave;     /* current position in the output file             */
349 long int pos_curdimension;/* current position in the output file             */
350 long int pos_curinclude;  /* final position of a line in file                */
351 long int pos_end;         /* final position of a line in file                */
352 long int pos_endsubroutine;
353                           /* final position of a line in file                */
354
355size_t length_last;
356size_t length_first;
357size_t length_v_vallengspec;
358size_t length_v_commoninfile;
359size_t length_v_precision;
360size_t length_v_IntentSpec;
361size_t length_v_initialvalue;
362size_t length_v_readedlistdimension;
363size_t length_a_nomvar;
364size_t length_toprintglob;
365size_t length_tmpvargridname;
366size_t length_ligne_Subloop;
367size_t length_toprint_utilagrif;
368size_t length_toprinttmp_utilchar;
369size_t length_ligne_writedecl;
370size_t length_newname_toamr;
371size_t length_newname_writedecl;
372size_t length_ligne_toamr;
373size_t length_tmpligne_writedecl;
374 int value_char_size;
375 int value_char_size1;
376 int value_char_size2;
377 int value_char_size3;
378
379
380 int inallocate;
381 int infixed;
382 int infree;
383/******************************************************************************/
384/*********** Declaration of externals subroutines *****************************/
385/***************************************************** ************************/
386extern char *fortran_text;
387/******************************************************************************/
388/*********** convert.y ********************************************************/
389/******************************************************************************/
390extern int main(int argc,char *argv[]);
391extern int convert_error(const char *s);
392/******************************************************************************/
393/*********** fortran.y ********************************************************/
394/******************************************************************************/
395extern void process_fortran(const char *input_file);
396extern int fortran_error(const char *s);
397/******************************************************************************/
398/*********** dependfile.c *****************************************************/
399/******************************************************************************/
400extern void Writethedependnbxnbyfile();
401extern void Readthedependnbxnbyfile();
402extern void Writethedependlistofmoduleused(const char *NameTampon );
403extern void Readthedependlistofmoduleused(const char *NameTampon);
404extern void WritedependParameterList(const char *NameTampon );
405extern listparameter *ReaddependParameterList(const char *NameTampon, listparameter *listout);
406extern void Writethedependfile(const char *NameTampon, listvar *input );
407extern listvar *Readthedependfile(const char *NameTampon , listvar *listout);
408extern void Write_Subroutine_For_Alloc();
409extern void Read_Subroutine_For_Alloc();
410extern void Writethedependavailablefile();
411extern void Readthedependavailablefile();
412extern int is_dependfile_created(const char *NameTampon);
413extern void Write_val_max();
414extern void Read_val_max();
415/******************************************************************************/
416/*********** DiversListe.c ****************************************************/
417/******************************************************************************/
418extern void Add_Common_var_1();
419extern listnom  *Addtolistnom(const char *nom, listnom *listin, int value);
420extern listname *Addtolistname(const char *nom, listname *input);
421extern int ModuleIsDefineInInputFile(const char *name);
422extern void Addmoduletothelisttmp(const char *name);
423extern void Add_NameOfModule_1(const char *nom);
424extern void Add_NameOfCommon_1(const char *nom, const char *cursubroutinename);
425extern void Add_CouplePointed_Var_1(const char *namemodule, listcouple *couple);
426extern void Add_Include_1(const char *name);
427extern void Add_ImplicitNoneSubroutine_1();
428extern void WriteIncludeDeclaration(FILE* tofile);
429extern void Add_Save_Var_1 (const char *name,listdim *d);
430extern void Add_Save_Var_dcl_1 (listvar *var);
431/******************************************************************************/
432/*********** SubLoopCreation.c ************************************************/
433/******************************************************************************/
434extern void WriteBeginof_SubLoop();
435extern void WriteVariablelist_subloop(char *ligne);
436extern void WriteVariablelist_subloop_Call(char **ligne, size_t line_length);
437extern void WriteVariablelist_subloop_Def(char *ligne);
438extern void WriteHeadofSubroutineLoop();
439extern void closeandcallsubloopandincludeit_0(int suborfun);
440extern void closeandcallsubloop_contains_0();
441/******************************************************************************/
442/*********** toamr.c **********************************************************/
443/******************************************************************************/
444extern void WARNING_CharSize(const variable *var);
445extern const char * tabvarsname(const variable *var);
446extern const char * variablecurgridtabvars(int which_grid);
447extern const char * vargridnametabvars(const variable *var, int iorindice);
448extern const char * vargridcurgridtabvars(const variable *var, int which_grid);
449extern const char * vargridcurgridtabvarswithoutAgrif_Gr(const variable *var);
450extern const char * vargridparam(const variable *var);
451extern void write_probdimagrif_file();
452extern void write_keysagrif_file();
453extern void write_modtypeagrif_file();
454extern void write_createvarnameagrif_file(variable *v,FILE *createvarname,int *InitEmpty);
455extern void write_initialisationsagrif_file(variable *v,FILE *initproc,int *VarnameEmpty);
456extern void write_Setnumberofcells_file();
457extern void write_Getnumberofcells_file();
458extern void Write_Alloc_Agrif_Files();
459extern int IndiceInlist(int indic, listindice *listin);
460extern void write_allocation_Common_0();
461extern void write_allocation_Global_0();
462extern void creefichieramr();
463/******************************************************************************/
464/*********** UtilAgrif.c ******************************************************/
465/******************************************************************************/
466extern int Vartonumber(const char *tokname);
467extern int Agrif_in_Tok_NAME(const char *tokname);
468extern void ModifyTheVariableName_0(const char *ident,int lengthname);
469extern void Add_SubroutineWhereAgrifUsed_1(const char *sub, const char *mod);
470extern void AddUseAgrifUtil_0(FILE *fileout);
471extern void AddUseAgrifUtilBeforeCall_0(FILE *fileout);
472extern void NotifyAgrifFunction_0(const char *ident);
473extern void ModifyTheAgrifFunction_0(const char *ident);
474extern void AgriffunctionModify_0(const char *ident,int whichone);
475extern void Instanciation_0(const char *ident);
476/******************************************************************************/
477/*********** UtilCharacter.c **************************************************/
478/******************************************************************************/
479extern void FindAndChangeNameToTabvars(const char name[LONG_M],char toprint[LONG_M],
480                                             listvar * listtosee, int whichone);
481extern const char *ChangeTheInitalvaluebyTabvarsName(const char *nom,listvar *listtoread);
482extern int IsVariableReal(const char *nom);
483extern void IsVarInUseFile(const char *nom);
484extern listnom *DecomposeTheNameinlistnom(const char *nom, listnom * listout);
485extern void DecomposeTheName(const char *nom);
486extern void convert2lower(char *lowername, const char* inputname);
487extern int convert2int(const char *name);
488/******************************************************************************/
489/*********** UtilFile.c *******************************************************/
490/******************************************************************************/
491extern FILE * open_for_write (const char *filename);
492extern FILE * open_for_append (const char *filename);
493extern long int setposcur();
494extern long int setposcurname(FILE *fileout);
495extern void copyuse_0(const char *namemodule);
496extern void copyuseonly_0(const char *namemodule);
497/******************************************************************************/
498/*********** UtilFortran.c ****************************************************/
499/******************************************************************************/
500extern void initdimprob(int dimprobmod, const char *nx, const char *ny, const char *nz);
501extern int Variableshouldberemoved(const char *nom);
502extern int variableisglobal(listvar *curvar, listvar *listin);
503extern int VariableIsInListCommon(listvar *curvar,listvar *listin);
504extern int VariableIsInList(listvar *curvar,listvar *listin);
505extern void variableisglobalinmodule(listcouple *listin, const char *module,
506                                                                 FILE *fileout,long int oldposcuruse);
507extern void Write_Word_end_module_0();
508extern void Add_Subroutine_For_Alloc(const char *nom);
509extern void Write_Closing_Module();
510extern int IsTabvarsUseInArgument_0();
511extern int ImplicitNoneInSubroutine();
512extern void Add_Pointer_Var_From_List_1(listvar *listin);
513extern void Add_Pointer_Var_1(char *nom);
514extern int varispointer_0(char *ident);
515extern int VariableIsFunction(const char *ident);
516extern int varistyped_0(char *ident);
517extern void dump_var(const variable* var);
518/******************************************************************************/
519/*********** UtilListe.c ******************************************************/
520/******************************************************************************/
521extern void Init_Variable(variable *var);
522extern listvar * AddListvarToListvar(listvar *l,listvar *glob, int ValueFirstpass);
523extern void CreateAndFillin_Curvar(const char *type, variable *curvar);
524// extern void duplicatelistvar(listvar *orig);
525extern listdim * insertdim(listdim *lin,typedim nom);
526extern void change_dim_char(listdim *lin,listvar * l);
527extern int get_num_dims(const listdim *d);
528extern variable * createvar(const char *nom, listdim *d);
529extern listvar * insertvar(listvar *lin,variable *v);
530extern listvar * settype(const char *nom,listvar *lin);
531extern void printliste(listvar * lin);
532extern int IsinListe(listvar *lin,char *nom);
533extern listname *Insertname(listname *lin,char *nom,int sens);
534extern listname *concat_listname(listname *l1, listname *l2);
535extern void createstringfromlistname(char *ligne, listname *lin);
536extern void printname(listname * lin);
537extern void removeglobfromlist(listname **lin);
538extern void writelistpublic(listname *lin);
539extern void Init_List_Data_Var();
540extern void  addprecision_derivedfromkind(variable *curvar);
541extern int get_cat_var(variable *var);
542/******************************************************************************/
543/*********** UtilNotGridDep.c *************************************************/
544/******************************************************************************/
545extern void Add_NotGridDepend_Var_1 (char *name);
546extern int VarIsNonGridDepend(char *name);
547/******************************************************************************/
548/*********** WorkWithAllocatelist.c *******************************************/
549/******************************************************************************/
550extern void Add_Allocate_Var_1(const char *nom, const char *nommodule);
551extern int IsVarAllocatable_0(const char *ident);
552/******************************************************************************/
553/*********** WorkWithglobliste.c **********************************************/
554/******************************************************************************/
555extern void Add_Globliste_1(listvar *listtoadd);
556extern void Add_SubroutineDeclarationSave_Var_1(listvar *listtoadd);
557extern void checkandchangedims(listvar *listsecondpass);
558/******************************************************************************/
559/*********** WorkWithlistdatavariable.c ***************************************/
560/******************************************************************************/
561extern void Add_Data_Var_1 (listvar **curlist,char *name,char *values);
562extern void Add_Data_Var_Names_01 (listvar **curlist,listname *l1, listname *l2);
563/******************************************************************************/
564/*********** WorkWithlistmoduleinfile.c ***************************************/
565/******************************************************************************/
566extern void Save_Length(const char *nom, int whichone);
567extern void Save_Length_int(int val, int whichone);
568/******************************************************************************/
569/*********** WorkWithlistofmodulebysubroutine.c *******************************/
570/******************************************************************************/
571extern void RecordUseModulesVariables();
572extern void  RecordUseModulesUseModulesVariables();
573extern void Add_NameOfModuleUsed_1(char *name);
574extern void Addmoduletothelist(const char *name);
575extern void WriteUsemoduleDeclaration(const char *cursubroutinename);
576/******************************************************************************/
577/*********** WorkWithlistvarindoloop.c ****************************************/
578/******************************************************************************/
579extern void Add_UsedInSubroutine_Var_1 (const char *ident);
580extern void ajoutevarindoloop_definedimension (char *name);
581extern void  ModifyThelistvarindoloop();
582extern void  CompleteThelistvarindoloop();
583extern void Merge_Variables(variable *var1,variable *var2);
584extern void Update_List_Subroutine_Var(listvar *list_to_modify);
585extern void Update_List_Global_Var_From_List_Save_Var();
586extern void Update_List_From_Common_Var(listvar *list_to_modify);
587extern void Update_List_Var(listvar *list_to_modify);
588extern void List_UsedInSubroutine_Var_Update_From_Module_Used();
589extern void Update_NotGridDepend_Var(listvar *list_to_modify);
590extern int LookingForVariableInList(listvar *listin,variable *var);
591extern int LookingForVariableInListGlobal(listvar *listin,variable *var);
592extern int LookingForVariableInListName(listvar *listin,const char *var);
593extern int LookingForVariableInListGlob(listvar *listin,variable *var);
594extern int LookingForVariableInListParamGlob(listparameter *listin, variable *var);
595extern variable *get_variable_in_list_from_name(listvar *listin, const char *name);
596extern void UpdateListDeclarationWithDimensionList();
597extern void Clean_List_UsedInSubroutine_Var();
598extern void Clean_List_ModuleUsed_Var();
599extern void Clean_List_SubroutineDeclaration_Var();
600extern void Clean_List_Global_Var();
601extern void ListClean();
602extern void ListUpdate();
603extern void GiveTypeOfVariables();
604extern void Sort_List_SubroutineArgument_Var();
605extern void IndiceTabvars_Global_Var_Treated(char *nom);
606extern void IndiceTabvars_Global_Var_No_Treated(char *nom);
607extern void UpdateTheRemainingList(listvar *record);
608extern void IndiceTabvars_Common_Var_Treated(char *nom);
609extern void IndiceTabvars_Common_Var_No_Treated(char *nom);
610extern void IndiceTabvarsIdentification();
611extern void New_Allocate_Subroutine_Is_Necessary();
612extern void New_Allocate_Subroutine_For_Common_Is_Necessary();
613extern void NewModule_Creation_0();
614extern void UpdateList_SubroutineWhereAgrifUsed();
615extern void UpdateList_UsedInSubroutine_With_dimension();
616extern void Affiche(listvar *parcours);
617extern int SubInList_ContainsSubroutine();
618extern void update_indicemaxtabvars(variable *var,listindice **Listofindices);
619/******************************************************************************/
620/*********** WorkWithParameterlist.c ******************************************/
621/******************************************************************************/
622extern void Add_GlobalParameter_Var_1(listvar *listin);
623extern void Add_Parameter_Var_1(listvar *listin);
624extern void Add_Dimension_Var_1(listvar *listin);
625/******************************************************************************/
626/*********** WorkWithvarofsubroutineliste.c ***********************************/
627/******************************************************************************/
628extern void Add_SubroutineArgument_Var_1(listvar *listtoadd);
629extern void Add_FunctionType_Var_1(const char *nom);
630// extern void Add_SubroutineDeclaration_Var_1 (listvar *listtoadd);
631/******************************************************************************/
632/*********** Writedeclarations.c **********************************************/
633/******************************************************************************/
634extern void WriteBeginDeclaration(variable *v,char ligne[LONG_M],int visibility);
635extern void WriteScalarDeclaration(variable *v,char ligne[LONG_M]);
636extern void WriteTableDeclaration(variable * v,char ligne[LONG_M],int tmpok);
637extern void WriteVarDeclaration( variable *v, FILE *fileout, int value, int visibility );
638extern void WriteLocalParamDeclaration(FILE* tofile);
639extern void WriteFunctionDeclaration(FILE* tofile, int value);
640extern void WriteSubroutineDeclaration(int value);
641extern void WriteArgumentDeclaration_beforecall();
642extern void WriteArgumentDeclaration_Sort(FILE* tofile);
643extern listnom * writedeclarationintoamr(listvar *deb_common, FILE *fileout, variable *var,
644                  const char *commonname, listnom *neededparameter, const char *name_common);
645extern void writesub_loopdeclaration_scalar(listvar *deb_common, FILE *fileout);
646extern void writesub_loopdeclaration_tab(listvar *deb_common, FILE *fileout);
647extern void ReWriteDeclarationAndAddTosubroutine_01(listvar *listdecl);
648extern void ReWriteDataStatement_0(FILE * filout);
649/******************************************************************************/
650/*********** WriteInFile.c ****************************************************/
651/******************************************************************************/
652extern void tofich_reste (FILE * filout, const char *s, int do_returnline);
653extern void tofich (FILE * filout, const char *s, int do_returnline);
654extern void tofich_blanc (FILE * filout, int size);
655extern void RemoveWordSET_0(FILE * filout, long int position, int sizetoremove);
656extern void RemoveWordCUR_0(FILE * filout, int sizetoremove);
657
658/******************************************************************************/
659/*********** WorkWithlistofcoupled.c **********************************************/
660/******************************************************************************/
661extern int variscoupled_0(const char *ident) ;
662extern const char * getcoupledname_0(const char *ident);
Note: See TracBrowser for help on using the repository browser.