Changeset 26 for trunk/orca/ovalue.c

Show
Ignore:
Timestamp:
02/07/06 00:52:42 (3 years ago)
Author:
krobillard
Message:

Atom names are now stored in a single string.
Maximum word length is now 32.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/ovalue.c

    r25 r26  
    101101 
    102102extern OBlock* orTokenize( const char*, const char* ); 
     103extern const char* orAtomCString( OAtom ); 
    103104 
    104105extern void orBindNative( OValue* ); 
     
    336337    orInitAGC( &env->freeIntArr ); 
    337338#endif 
     339 
     340    orMakeString( 2048 );     // BIN_ATOM_NAMES 
    338341 
    339342    makeGlobalContext(); 
     
    13661369        if( val->type == OT_UNSET ) 
    13671370        { 
    1368             OString* str = orAtomString( a1->word.atom ); 
    1369             orError( "%s has no value", str->charArray ); 
     1371            orError( "%s has no value", orAtomCString( a1->word.atom ) ); 
    13701372        } 
    13711373        else 
     
    19961998 
    19971999unset: 
    1998     { 
    1999     OString* str; 
    2000     str = orAtomString( pit->word.atom ); 
    2001     orError( "Path word %s has no value", str->charArray ); 
    2002     } 
     2000    orError( "Path word %s has no value", orAtomCString( pit->word.atom ) ); 
    20032001    return -1; 
    20042002 
     
    22202218            { 
    22212219                case OT_UNSET: 
    2222                     { 
    2223                     OString* str = orAtomString( pc->word.atom ); 
    2224                     orError( "%s has no value", str->charArray ); 
    2225                     } 
     2220                    orError( "%s has no value", orAtomCString(pc->word.atom) ); 
    22262221                    return -1; 
    22272222 
     
    23172312                if( wblk->values[ pc->word.index ].flags & OR_WORD_PROT ) 
    23182313                { 
    2319                     OString* str = orAtomString( pc->word.atom ); 
    2320                     orError( "Word %s is protected", str->charArray ); 
     2314                    orError( "Word %s is protected",  
     2315                             orAtomCString( pc->word.atom ) ); 
    23212316                    goto sThrown; 
    23222317                } 
    23232318            } 
    23242319#ifdef TRACE 
    2325             cprint( "TR> %s:\n", orAtomString(pc->word.atom)->charArray ); 
     2320            cprint( "TR> %s:\n", orAtomCString( pc->word.atom ) ); 
    23262321#endif 
    23272322            PUSH_CALL( wval, OC_SETWORD, 0 ); 
     
    27682763    if( si == send ) 
    27692764    { 
    2770         OString* str = orAtomString( pp->word.atom ); 
    2771         orError( "Function has no refinement %s", str->charArray );  
     2765        orError( "Function has no refinement %s",  
     2766                 orAtomCString( pp->word.atom ) ); 
    27722767        goto sThrown; 
    27732768    } 
     
    30933088                (it->type == OT_LITWORD) ) 
    30943089            { 
    3095                 OString* str = orAtomString( it->word.atom ); 
    30963090                dprint( " %d %d %s\n", it->word.context, it->word.index, 
    3097                         str->charArray ); 
     3091                        orAtomCString( it->word.atom ) ); 
    30983092            } 
    30993093            else if( it->type == OT_DATATYPE ) 
     
    39383932            orDatatypeName(type), 
    39393933            (orSTRINGS + wrd->str)->charArray, 
    3940             orAtomString(wrd->atom)->charArray, 
     3934            orAtomCString( wrd->atom ), 
    39413935            val->word.atom ); 
    39423936#endif 
     
    42864280        { 
    42874281#if 0 
    4288             OString* str = orAtomString( it->word.atom ); 
    4289             dprint( "orFuncNative - intern %s\n", str->charArray ); 
     4282            dprint( "orFuncNative - intern %s\n", 
     4283                    orAtomCString( it->word.atom ) ); 
    42904284#endif 
    42914285            prevWord = 1;