Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utlo00.F
1       subroutine utlo00 ( motcle, option, ulsort, langue, codret )
2 c ______________________________________________________________________
3 c
4 c                             H O M A R D
5 c
6 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
7 c
8 c Version originale enregistree le 18 juin 1996 sous le numero 96036
9 c aupres des huissiers de justice Simart et Lavoir a Clamart
10 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
11 c aupres des huissiers de justice
12 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
13 c
14 c    HOMARD est une marque deposee d'Electricite de France
15 c
16 c Copyright EDF 1996
17 c Copyright EDF 1998
18 c Copyright EDF 2002
19 c Copyright EDF 2020
20 c ______________________________________________________________________
21 c
22 c   UTilitaire : Lectures des Options - 00
23 c   --           -            -         --
24 c ______________________________________________________________________
25 c
26 c but : transformer les choix de type oui/non en entier 1/0
27 c ______________________________________________________________________
28 c .        .     .        .                                            .
29 c .  nom   . e/s . taille .           description                      .
30 c .____________________________________________________________________.
31 c . motcle . e   . char*8 . mot-cle a decoder                          .
32 c . option .  s  .   1    . 0 : non, 1 : oui                           .
33 c . ulsort . e   .   1    . numero d'unite logique de la liste standard.
34 c . langue . e   .    1   . langue des messages                        .
35 c .        .     .        . 1 : francais, 2 : anglais                  .
36 c . codret . es  .    1   . code de retour des modules                 .
37 c .        .     .        . 0 : pas de probleme                        .
38 c .        .     .        . 6 : impossible de decoder les options      .
39 c ______________________________________________________________________
40 c
41 c====
42 c 0. declarations et dimensionnement
43 c====
44 c
45 c 0.1. ==> generalites
46 c
47       implicit none
48       save
49 c
50       character*6 nompro
51       parameter ( nompro = 'UTLO00' )
52 c
53 #include "nblang.h"
54 c
55 c 0.2. ==> communs
56 c
57 #include "envex1.h"
58 c
59 c 0.3. ==> arguments
60 c
61       character*8 motcle
62 c
63       integer option
64 c
65       integer ulsort, langue, codret
66 c
67 c 0.4. ==> variables locales
68 c
69       integer iaux
70       integer codre0
71       integer loptio
72       integer nbrmin, nbrmax
73 c
74       character*200 noptio
75 c
76       integer nbmess
77       parameter ( nbmess = 15 )
78       character*80 texte(nblang,nbmess)
79 c
80 c 0.5. ==> initialisations
81 c ______________________________________________________________________
82 c
83 c====
84 c 1. messages
85 c====
86 c
87 c 1.1. ==> tout va bien
88 c
89       codret = 0
90 c
91 c 1.2. ==> les messages
92 c
93 #include "impr01.h"
94 c
95 #ifdef _DEBUG_HOMARD_
96       write (ulsort,texte(langue,1)) 'Entree', nompro
97       call dmflsh (iaux)
98 #endif
99 c
100 #include "utlo00.h"
101 #include "utlo02.h"
102 c
103       nbrmin = 0
104       nbrmax = 1
105 c
106 c====
107 c 2. options textuelles
108 c====
109 c
110 c 2.1. ==> recherche du texte associe au mot-cle
111 c          code de retour de utfino :
112 c             0 : pas de probleme
113 c             1 : la configuration est perdue
114 c             2 : pas de nom dans la base
115 c     remarque : on recupere le texte en majuscule
116 c
117       iaux = 1
118 #ifdef _DEBUG_HOMARD_
119       write (ulsort,texte(langue,3)) 'UTFIN2', nompro
120 #endif
121       call utfin2 ( motcle, iaux, noptio, loptio,
122      >              nbrmin, nbrmax,
123      >              ulsort, langue, codre0 )
124 c
125 c 2.2. ==> decodage de l'option
126 c
127       if ( codre0.eq.0 ) then
128 c
129 #include "utlo03.h"
130 c
131         if ( loptio.eq.2 ) then
132 c
133           if ( noptio(1:loptio).eq.'NO' ) then
134             option = 0
135 c
136           else
137             codre0 = 5
138           endif
139 c
140         elseif ( loptio.eq.3 ) then
141 c
142           if ( noptio(1:loptio).eq.'NON' ) then
143             option = 0
144 c
145           elseif ( noptio(1:loptio).eq.'OUI' .or.
146      >             noptio(1:loptio).eq.'YES' ) then
147             option = 1
148 c
149           else
150             codre0 = 5
151           endif
152 c
153         else
154           codre0 = 5
155         endif
156 c
157       elseif ( codre0.eq.2 ) then
158         codre0 = 0
159 c
160       else
161         codre0 = 6
162 c
163       endif
164 c
165 #include "utlo01.h"
166 c
167 c====
168 c 3. la fin
169 c====
170 c
171       if ( codret.ne.0 ) then
172 c
173 #include "envex2.h"
174 c
175       write (ulsort,texte(langue,1)) 'Sortie', nompro
176       write (ulsort,texte(langue,2)) codret
177 c
178       endif
179 c
180 #ifdef _DEBUG_HOMARD_
181       write (ulsort,texte(langue,1)) 'Sortie', nompro
182       call dmflsh (iaux)
183 #endif
184 c
185       end