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

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

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines