1 /***********************************************************************
2 *
3 *               *****   ***    ***
4 *                  *   *   *  *   *
5 *                 *     ***    ***
6 *                *     *   *  *   *
7 *               *****   ***    ***
8 *
9 * A FREE Finite Elements Analysis Program in ANSI C for the Windows OS.
10 *
11 * Composed and edited and copyright by
12 * Professor Dr.-Ing. Frank Rieg, University of Bayreuth, Germany
13 *
14 * eMail:
15 * frank.rieg@uni-bayreuth.de
16 * dr.frank.rieg@t-online.de
17 *
18 * V15.0  November 18 2015
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2, or (at your option)
23 * any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; see the file COPYING.  If not, write to
32 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
33 ***********************************************************************/
34 /***********************************************************************
35 * Function ale88n gibt Fehlermeldungen aus
36 * 3.8.2011 Rieg
37 ***********************************************************************/
38 
39 /***********************************************************************
40 * Fuer Windows
41 ***********************************************************************/
42 #ifdef FR_WIN
43 #include <z88n.h>
44 #include <windows.h>
45 #include <stdio.h>    /* printf */
46 #endif
47 
48 /***********************************************************************
49 * Formate
50 ***********************************************************************/
51 #ifdef FR_XINT
52 #define PD "%d"
53 #endif
54 
55 #ifdef FR_XLONG
56 #define PD "%ld"
57 #endif
58 
59 #ifdef FR_XLOLO
60 #define PD "%lld"
61 #endif
62 
63 /***********************************************************************
64 * hier beginnt Function ale88n
65 ***********************************************************************/
ale88n(int ialert)66 int ale88n(int ialert)
67 {
68 extern FR_INT4 MAXKSS,MAXESS,LANG;
69 
70 char cmess[256];
71 
72 switch(ialert)
73   {
74   case AL_NOLOG:
75     if(LANG == 1) strcpy(cmess,"Kann Z88N.LOG nicht oeffnen !   STOP");
76     if(LANG == 2) strcpy(cmess,"Cannot open Z88N.LOG !    STOP");
77     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
78   break;
79 
80   case AL_NOACROBAT:
81     if(LANG == 1) strcpy(cmess,"Kann PDF-Viewer nicht oeffnen !");
82     if(LANG == 2) strcpy(cmess,"Cannot open PDF Viewer !");
83     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
84   break;
85 
86   case AL_NODYN:
87     if(LANG == 1) strcpy(cmess,"Kann Z88.DYN nicht oeffnen !    STOP");
88     if(LANG == 2) strcpy(cmess,"Cannot open Z88.DYN !    STOP");
89     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
90   break;
91 
92   case AL_WRONGDYN:
93     if(LANG == 1) strcpy(cmess,"Z88.DYN ist nicht korrekt !    STOP");
94     if(LANG == 2) strcpy(cmess,"Z88.DYN is invalid or wrong !    STOP");
95     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
96   break;
97 
98   case AL_NOMEMY:
99     if(LANG == 1) strcpy(cmess,"Nicht genug dynamischer Speicher !    STOP\
100     Abhilfe: Eintraege in Z88.DYN erhoehen");
101     if(LANG == 2) strcpy(cmess,"Dynamic memory exhausted !    STOP\
102     Recover: increase entries in Z88.DYN");
103     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
104   break;
105 
106   case AL_NONI:
107     if(LANG == 1) strcpy(cmess,"Kann Z88NI.TXT nicht oeffnen !    STOP");
108     if(LANG == 2) strcpy(cmess,"Cannot open Z88NI.TXT !    STOP");
109     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
110   break;
111 
112   case AL_NOI1:
113     if(LANG == 1) strcpy(cmess,"Kann Z88I1.TXT nicht oeffnen !    STOP");
114     if(LANG == 2) strcpy(cmess,"Cannot open Z88I1.TXT !    STOP");
115     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
116   break;
117 
118   case AL_EXSUPERK:
119     if(LANG==1)sprintf(cmess,"Nur " PD " Superknoten zulaessig    STOP",MAXKSS);
120     if(LANG==2)sprintf(cmess,"Only " PD " super nodes allowed    STOP",MAXKSS);
121     MessageBox(NULL, cmess, "Z88N", MB_OK | MB_ICONHAND);
122   break;
123 
124   case AL_EXSUPERE:
125     if(LANG==1)sprintf(cmess,"Nur " PD " Superelemente zulaessig    STOP",MAXKSS);
126     if(LANG==2)sprintf(cmess,"Only " PD " super elements allowed    STOP",MAXKSS);
127     MessageBox(NULL, cmess, "Z88N", MB_OK | MB_ICONHAND);
128   break;
129 
130   case AL_TOBIG1:
131     if(LANG == 1) strcpy(cmess,
132       "Zuwenig Speicher !    STOP    Abhilfe: MAXSE in Z88.DYN erhoehen");
133     if(LANG == 2) strcpy(cmess,
134       "Out of Memory !    STOP    Recover: Increase MAXSE in Z88.DYN");
135     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONHAND);
136   break;
137 
138   case AL_FEEXID:
139     if(LANG == 1) strcpy(cmess,"Erzeugte Struktur zu gross fuer FE-Lauf !\
140     ACHTUNG    Abhilfe: MAXK,MAXE,MAXNFG pruefen,ggf. in Z88.DYN erhoehen");
141     if(LANG == 2) strcpy(cmess,"Generated mesh too large for a FEA run !\
142     CAUTION    Recover: Check MAXSK,MAXE,MAXNFG and increase in Z88.DYN");
143     MessageBox(NULL,cmess, "Z88N",MB_OK | MB_ICONINFORMATION);
144   break;
145 
146   }
147 return(0);
148 }
149 
150