ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/BASS_parse/BASS_parse.c
(Generate patch)

Comparing trunk/mdtools/BASS_parse/BASS_parse.c (file contents):
Revision 138 by chuckv, Wed Oct 16 21:07:02 2002 UTC vs.
Revision 157 by mmeineke, Tue Oct 29 21:48:25 2002 UTC

# Line 3 | Line 3
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
# Line 184 | Line 183 | char* get_definition( char* defined ){
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  
# Line 270 | Line 268 | int hash ( char* text ){
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines