]> SALOME platform Git repositories - modules/homard.git/blob - src/tool/Utilitaire/utinla.F
Salome HOME
Homard executable
[modules/homard.git] / src / tool / Utilitaire / utinla.F
1       subroutine utinla ( nfconf, lfconf,
2      >                    ulsort, langue, codret )
3 c ______________________________________________________________________
4 c
5 c                             H O M A R D
6 c
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
8 c
9 c Version originale enregistree le 18 juin 1996 sous le numero 96036
10 c aupres des huissiers de justice Simart et Lavoir a Clamart
11 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
12 c aupres des huissiers de justice
13 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
14 c
15 c    HOMARD est une marque deposee d'Electricite de France
16 c
17 c Copyright EDF 1996
18 c Copyright EDF 1998
19 c Copyright EDF 2002
20 c Copyright EDF 2020
21 c ______________________________________________________________________
22 c
23 c       UTilitaire : INitialisation de la LAngue
24 c       --           --                   --
25 c ______________________________________________________________________
26 c .        .     .        .                                            .
27 c .  nom   . e/s . taille .           description                      .
28 c .____________________________________________________________________.
29 c . nfconf . e   . ch<200 . nom du fichier de configuration            .
30 c . lfconf . e   .    1   . longueur du nom du fichier                 .
31 c . ulsort .  s  .   1    . numero d'unite logique de la liste standard.
32 c . langue . es  .    1   . langue des messages                        .
33 c .        .     .        . 1 : francais, 2 : anglais                  .
34 c ______________________________________________________________________
35 c
36 c====
37 c 0. declarations et dimensionnement
38 c====
39 c
40 c 0.1. ==> generalites
41 c
42       implicit none
43       save
44 c
45       character*6 nompro
46       parameter ( nompro = 'UTINLA' )
47 c
48 #include "motcle.h"
49 #include "nblang.h"
50 c
51 c 0.2. ==> communs
52 c
53 c 0.3. ==> arguments
54 c
55       character*(*) nfconf
56 c
57       integer lfconf
58 c
59       integer ulsort, langue, codret
60 c
61 c 0.4. ==> variables locales
62 c
63 #ifdef _DEBUG_HOMARD_
64       integer iaux
65 #endif
66 c
67       integer loptio
68 c
69       character*8 motcle
70       character*200 noptio
71 c
72       integer nbmess
73       parameter ( nbmess = 20 )
74       character*80 texte(nblang,nbmess)
75 c
76 c 0.5. ==> initialisations
77 c ______________________________________________________________________
78 c
79       if ( langue.le.0 .or. langue.gt.nblang ) then
80         langue = 1
81       endif
82 c
83 c====
84 c 1. les messages
85 c====
86 c
87 #include "impr01.h"
88 c
89 #ifdef _DEBUG_HOMARD_
90       write (ulsort,texte(langue,1)) 'Entree', nompro
91       call dmflsh (iaux)
92 #endif
93 c
94       texte(1,20) = '(/,''Fichier de configuration :'')'
95       texte(1,4) = '(''Decodage du parametre : '',a8)'
96       texte(1,5) = '(''La langue par defaut est utilisee.'')'
97       texte(1,6) = '(''Erreur de decodage.'')'
98       texte(1,7) = '(''Aucune langue n''''est associe.'')'
99       texte(1,8) = '(''Plusieurs langues sont definies.'')'
100       texte(1,9) = '(''Il est absent du fichier.'')'
101       texte(1,10) = '(''Desole, cette langue est inconnue :'')'
102 c
103       texte(2,20) = '(/,''Configuration file :'')'
104       texte(2,4) = '(''Uncoding of parameter '',a8)'
105       texte(2,5) = '(''The default language is used.'')'
106       texte(2,6) = '(''Error during uncoding.'')'
107       texte(2,7) = '(''No language is connected to.'')'
108       texte(2,8) = '(''Several languages are defined.'')'
109       texte(2,9) = '(''It is missing.'')'
110       texte(2,10) = '(''Sorry, this language is unknown.'')'
111 c
112 c====
113 c 2. decodage de la langue choisie
114 c====
115 c
116 c 2.1. ==> recherche du mot-cle
117 c
118       motcle = mclang
119       call ugfino ( motcle, noptio, loptio,
120      >              nfconf, lfconf,
121      >              ulsort, langue, codret)
122 c
123 c 2.2. ==> recherche du type de langue
124 c
125       if ( codret.eq.0 ) then
126 c
127         if ( loptio.eq.6 ) then
128 c
129           if ( noptio(1:loptio).eq.'French' .or.
130      >         noptio(1:loptio).eq.'french' .or.
131      >         noptio(1:loptio).eq.'FRENCH' ) then
132 c
133             langue = 1
134 c
135           else
136             codret = 10
137 c
138           endif
139 c
140         elseif ( loptio.eq.8 ) then
141 c
142           if ( noptio(1:loptio).eq.'Francais' .or.
143      >         noptio(1:loptio).eq.'francais' .or.
144      >         noptio(1:loptio).eq.'FRANCAIS' ) then
145 c
146             langue = 1
147 c
148           else
149             codret = 10
150 c
151           endif
152 c
153         elseif ( loptio.eq.7 ) then
154 c
155           if ( noptio(1:loptio).eq.'Anglais' .or.
156      >         noptio(1:loptio).eq.'anglais' .or.
157      >         noptio(1:loptio).eq.'ANGLAIS' .or.
158      >         noptio(1:loptio).eq.'English' .or.
159      >         noptio(1:loptio).eq.'english' .or.
160      >         noptio(1:loptio).eq.'ENGLISH' ) then
161 c
162             langue = 2
163 c
164           else
165             codret = 10
166 c
167           endif
168 c
169         endif
170 c
171       elseif ( codret.eq.1 ) then
172         codret = 9
173 c
174       elseif ( codret.eq.2 ) then
175         codret = 8
176 c
177       elseif ( codret.eq.3 ) then
178         codret = 7
179 c
180       else
181         codret = 6
182 c
183       endif
184 c
185 c 2.3. ==> messages d'erreur eventuels
186 c
187 #ifdef _DEBUG_HOMARD_
188       write (ulsort,texte(langue,2)) codret
189 #endif
190 c
191       if ( codret.ne.0 ) then
192 c
193 #ifdef _DEBUG_HOMARD_
194         write (ulsort,texte(langue,20))
195         if ( lfconf.gt.0 .and. len(nfconf).gt.0 ) then
196           write (ulsort,*) nfconf(1:lfconf)
197         else
198           write (ulsort,*)
199         endif
200         write (ulsort,texte(langue,4)) motcle
201         write (ulsort,texte(langue,codret))
202         if ( codret.eq.9 ) then
203           if ( loptio.gt.0 ) then
204             write (ulsort,*) noptio(1:loptio)
205           else
206             write (ulsort,*)
207           endif
208         endif
209         write (ulsort,texte(langue,5))
210 #endif
211         codret = 0
212 c
213       endif
214 c
215       end