| 3 |
|
#include <string.h> |
| 4 |
|
|
| 5 |
|
#include "BASS_parse.h" |
| 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 |
|
|
| 11 |
– |
|
| 16 |
|
//*** Global functions, variables, and structures ************ |
| 17 |
|
|
| 18 |
|
unsigned short is_initialized = 0; // tells whether to init the linked list |
| 88 |
|
|
| 89 |
|
int res_word( char* text ){ |
| 90 |
|
|
| 87 |
– |
register unsigned short int i; // loop counter |
| 91 |
|
int matched = 0; |
| 92 |
|
int key; // the hash key |
| 93 |
|
struct res_element* current_ptr; // points to the current hash element |
| 183 |
|
|
| 184 |
|
// search failed, therefore there is an error |
| 185 |
|
|
| 186 |
< |
fprintf( stderr, "%s was not found in the defined list\n", defined ); |
| 187 |
< |
exit(1); |
| 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 |
|
|
| 193 |
|
/* |
| 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 |
< |
exit(0); |
| 271 |
> |
sprintf( 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; |