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.
WorkWithvarofsubroutineliste.c in trunk/AGRIF/LIB – NEMO

source: trunk/AGRIF/LIB/WorkWithvarofsubroutineliste.c @ 1780

Last change on this file since 1780 was 774, checked in by rblod, 17 years ago

Update Agrif, see ticket:#39

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
RevLine 
[396]1/******************************************************************************/
2/*                                                                            */
3/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
4/*                                                                            */
[663]5/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
6/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
[530]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".                                                  */
[396]12/*                                                                            */
[530]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.                                                                 */
[396]18/*                                                                            */
[530]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.                                       */
[396]29/*                                                                            */
[530]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.           */
[396]32/******************************************************************************/
[774]33/* version 1.7                                                                */
[530]34/******************************************************************************/
[396]35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38#include "decl.h"
39
40/******************************************************************************/
[663]41/*                      Add_SubroutineArgument_Var_1                          */
[396]42/******************************************************************************/
43/* Firstpass 1                                                                */
[663]44/* We should complete the                                                     */
[396]45/******************************************************************************/
46/*                                                                            */
47/*                                                                            */
48/******************************************************************************/
[663]49void Add_SubroutineArgument_Var_1(listvar *listtoadd)
[396]50{
[530]51
[663]52   if ( firstpass == 1 )
[396]53   {
[663]54       List_SubroutineArgument_Var = AddListvarToListvar
55                              (listtoadd,List_SubroutineArgument_Var,1);
[396]56   }
57}
58
59/******************************************************************************/
[663]60/*                             Add_FunctionType_Var_1                         */
[396]61/******************************************************************************/
[663]62/* Firstpass 1                                                                */
63/* We should complete the                                                     */
[396]64/******************************************************************************/
65/*                                                                            */
[663]66/*                                                                            */
[396]67/******************************************************************************/
[663]68void Add_FunctionType_Var_1(char *nom)
[396]69{
[663]70   listvar *newvar;
71
72   if ( firstpass == 1 )
[396]73   {
[663]74      curvar=createvar(nom,NULL);
75      strcpy(curvar->v_typevar,DeclType);
76      newvar = insertvar(NULL,curvar);
77      List_FunctionType_Var = AddListvarToListvar
78                              (newvar,List_FunctionType_Var,1);
[396]79   }
80}
81
82
83/******************************************************************************/
[663]84/*                      Add_SubroutineDeclaration_Var_1                       */
[396]85/******************************************************************************/
[663]86/* Firstpass 1                                                                */
87/* We should complete the listvarofsubroutine                                 */
[396]88/******************************************************************************/
89/*                                                                            */
[663]90/*                                                                            */
[396]91/******************************************************************************/
[663]92void Add_SubroutineDeclaration_Var_1 (listvar *listtoadd)
[396]93{
[663]94   if ( firstpass == 1 )
[396]95   {
[663]96      if ( VariableIsParameter == 0 &&
97           SaveDeclare         == 0 )
[396]98      {
[663]99         listduplicated = (listvar *)NULL;
100         duplicatelistvar(listtoadd);
101         List_SubroutineDeclaration_Var = AddListvarToListvar
102                              (listduplicated,List_SubroutineDeclaration_Var,1);
[396]103      }
104   }
105}
Note: See TracBrowser for help on using the repository browser.