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 vendors/AGRIF/dev/LIB – NEMO

source: vendors/AGRIF/dev/LIB/decl.h

Last change on this file was 14431, checked in by smasson, 3 years ago

agrif: merge AGRIF/dev_r14312_MPI_Interface into AGRIF/dev, ticket:2598#comment:21

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