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/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB – NEMO

source: branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB/decl.h @ 8139

Last change on this file since 8139 was 8139, checked in by timgraham, 7 years ago

Updates to conv library as received from Laurent - required for vertical refinement

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