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

Comparing trunk/mdtools/interface_implementation/Globals.cpp (file contents):
Revision 11 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
Revision 178 by mmeineke, Mon Nov 18 21:24:02 2002 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines