3 |
|
#include <string.h> |
4 |
|
|
5 |
|
#include "BASS_parse.h" |
6 |
< |
|
6 |
> |
#include "../headers/simError.h" |
7 |
|
#ifdef IS_MPI |
8 |
|
#define __is_lex__ |
9 |
|
#include "../headers/mpiBASS.h" |
10 |
|
#endif |
11 |
|
|
12 |
|
#define HASH_SIZE 211 // the size of the hash table |
13 |
< |
#define SHIFT 4 // the bit shift for the hash index calculation |
13 |
> |
#define SHIFT 4 // the bit shift for the hash index |
14 |
|
|
15 |
|
|
16 |
– |
|
16 |
|
//*** Global functions, variables, and structures ************ |
17 |
|
|
18 |
|
unsigned short is_initialized = 0; // tells whether to init the linked list |
183 |
|
|
184 |
|
// search failed, therefore there is an error |
185 |
|
|
186 |
< |
fprintf( stderr, "%s was not found in the defined list\n", defined ); |
187 |
< |
#ifdef IS_MPI |
188 |
< |
mpiInterfaceExit(); |
189 |
< |
#endif |
191 |
< |
exit(0); |
186 |
> |
sprintf( painCave.errMsg, "%s was not found in the defined list\n", |
187 |
> |
defined ); |
188 |
> |
painCave.isFatal = 1; |
189 |
> |
simError(); |
190 |
|
return NULL; |
191 |
|
} |
192 |
|
|
268 |
|
|
269 |
|
// if the key is less than zero, we've had an overflow error |
270 |
|
|
271 |
< |
fprintf( stderr, |
272 |
< |
"There has been an overflow error in the hash key."); |
273 |
< |
#ifdef IS_MPI |
274 |
< |
mpiInterfaceExit(); |
277 |
< |
#endif |
278 |
< |
exit(0); |
271 |
> |
fprintf( painCave.errMsg, |
272 |
> |
"Bass Parse: There has been an overflow error in the hash key."); |
273 |
> |
painCave.isFatal =1; |
274 |
> |
simError(); |
275 |
|
} |
276 |
|
|
277 |
|
return key; |