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

Comparing:
branches/mmeineke/mdtools/BASS_parse/BASS_parse.c (file contents), Revision 10 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
trunk/mdtools/BASS_parse/BASS_parse.c (file contents), Revision 160 by mmeineke, Wed Oct 30 22:38:22 2002 UTC

# Line 3 | Line 3
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
# Line 84 | Line 88 | int res_word( char* text ){
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
# Line 180 | 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 <  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   /*
# Line 262 | 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 <    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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines