# | Line 3 | Line 3 | |
---|---|---|
3 | #include <cstring> | |
4 | ||
5 | #include "Globals.hpp" | |
6 | + | #include "mpiBASS.h" |
7 | + | #include "simError.h" |
8 | ||
9 | /* | |
10 | * The following section lists all of the defined tokens for the | |
# | Line 138 | Line 140 | int Globals::componentAssign( event* the_event ){ | |
140 | switch( the_event->evt.asmt.asmt_type ){ | |
141 | ||
142 | case STRING: | |
143 | < | current_component->assignString( the_event->evt.asmt.lhs, |
144 | < | the_event->evt.asmt.rhs.sval ); |
145 | < | return 1; |
143 | > | return current_component->assignString( the_event->evt.asmt.lhs, |
144 | > | the_event->evt.asmt.rhs.sval, |
145 | > | &(the_event->err_msg)); |
146 | break; | |
147 | ||
148 | case DOUBLE: | |
149 | < | current_component->assignDouble( the_event->evt.asmt.lhs, |
150 | < | the_event->evt.asmt.rhs.dval ); |
151 | < | return 1; |
149 | > | return current_component->assignDouble( the_event->evt.asmt.lhs, |
150 | > | the_event->evt.asmt.rhs.dval, |
151 | > | &(the_event->err_msg)); |
152 | break; | |
153 | ||
154 | case INT: | |
155 | < | current_component->assignInt( the_event->evt.asmt.lhs, |
156 | < | the_event->evt.asmt.rhs.ival ); |
157 | < | return 1; |
155 | > | return current_component->assignInt( the_event->evt.asmt.lhs, |
156 | > | the_event->evt.asmt.rhs.ival, |
157 | > | &(the_event->err_msg)); |
158 | break; | |
159 | ||
160 | default: | |
# | Line 793 | Line 795 | int Globals::hash( char* text ){ | |
795 | ||
796 | // if the key is less than zero, we've had an overflow error | |
797 | ||
798 | < | fprintf( stderr, |
798 | > | sprintf( painCave.errMsg, |
799 | "There has been an overflow error in the Globals' hash key."); | |
800 | < | exit(0); |
800 | > | painCave.isFatal = 1; |
801 | > | simError(); |
802 | > | #ifdef IS_MPI |
803 | > | if( painCave.isEventLoop ){ |
804 | > | if( worldRank == 0 ) mpiInterfaceExit(); |
805 | > | } |
806 | > | #endif //is_mpi |
807 | } | |
808 | ||
809 | return key; | |
# | Line 812 | Line 820 | void Globals::addHash( char* text, int token ){ | |
820 | key = hash( text ); | |
821 | the_element->setNext( command_table[key] ); | |
822 | command_table[key] = the_element; | |
823 | < | }; |
823 | > | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |