Changeset 54 for trunk/orca/context.c
- Timestamp:
- 02/17/06 15:30:01 (3 years ago)
- Files:
-
- 1 modified
-
trunk/orca/context.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/context.c
r45 r54 158 158 while( it != end ) 159 159 { 160 if( it->word.atom== atom )160 if( orAtom(it) == atom ) 161 161 return it - wordBlk->values; 162 162 ++it; … … 232 232 while( it != end ) 233 233 { 234 if( it->word.atom== atom )234 if( orAtom(it) == atom ) 235 235 return it - wblk->values; 236 236 ++it; … … 264 264 // Word might be redefined mulitple times so we have to 265 265 // orLookup() first. 266 wrdN = orLookup( ctx, it->word.atom);266 wrdN = orLookup( ctx, orAtom(it) ); 267 267 if( wrdN < 0 ) 268 wrdN = orInternA( wordBlk, it->word.atom);268 wrdN = orInternA( wordBlk, orAtom(it) ); 269 269 } 270 270 ++it; … … 444 444 if( it->type == OT_SETWORD ) 445 445 { 446 if( orLookup( orig, it->word.atom) < 0 )446 if( orLookup( orig, orAtom(it) ) < 0 ) 447 447 ++wcount; 448 448 } … … 506 506 { 507 507 int wrdN; 508 wrdN = orLookup( ctx, val->word.atom);508 wrdN = orLookup( ctx, orAtom(val) ); 509 509 if( wrdN > -1 ) 510 510 { … … 571 571 (it->type == OT_GETWORD) ) 572 572 { 573 if( ( it->word.atom== orEnv->atom_func) ||574 ( it->word.atom== orEnv->atom_does) )573 if( (orAtom(it) == orEnv->atom_func) || 574 (orAtom(it) == orEnv->atom_does) ) 575 575 return 1; 576 576 } … … 681 681 vblk = orBlockPtr( ctx.wblkN ); 682 682 683 if( a1->type == OT_WORD)684 { 685 wrdN = orLookup( &ctx, a1->word.atom);683 if( orIs(a1, OT_WORD) ) 684 { 685 wrdN = orLookup( &ctx, orAtom(a1) ); 686 686 if( wrdN > -1 ) 687 687 { … … 689 689 } 690 690 } 691 else if( a1->type == OT_BLOCK)691 else if( orIs(a1, OT_BLOCK) ) 692 692 { 693 693 OBlock* blk = orBLOCK( a1 ); … … 696 696 while( it != end ) 697 697 { 698 if( it->type == OT_WORD)699 { 700 wrdN = orLookup( &ctx, a1->word.atom);698 if( orIs(it, OT_WORD) ) 699 { 700 wrdN = orLookup( &ctx, orAtom(a1) ); 701 701 if( wrdN > -1 ) 702 702 { … … 720 720 OIndex wrdN; 721 721 722 wrdN = orLookup( &a1->ctx, a2->word.atom);722 wrdN = orLookup( &a1->ctx, orAtom(a2) ); 723 723 if( wrdN < 0 ) 724 724 { … … 730 730 // a1->context remains unchanged. 731 731 a1->word.index = wrdN; 732 a1->word.atom = a2->word.atom;732 orAtom(a1) = orAtom(a2); 733 733 } 734 734 } … … 754 754 { 755 755 orMakeContext( &ctx, 1 ); 756 orInternA( orBlockPtr( ctx.wblkN ), a1->word.atom);756 orInternA( orBlockPtr( ctx.wblkN ), orAtom(a1) ); 757 757 } 758 758 else … … 770 770 { 771 771 if( it->type == OT_WORD ) 772 orInternA( blk, it->word.atom);772 orInternA( blk, orAtom(it) ); 773 773 ++it; 774 774 } … … 846 846 if( it->type == OT_WORD ) 847 847 { 848 orInternA( blk, it->word.atom);848 orInternA( blk, orAtom(it) ); 849 849 } 850 850 else … … 861 861 { 862 862 orMakeContext( &ctx, 1 ); 863 orInternA( orBlockPtr( ctx.wblkN ), a1->word.atom);863 orInternA( orBlockPtr( ctx.wblkN ), orAtom(a1) ); 864 864 } 865 865 … … 942 942 { 943 943 for( rlen = 0; rlen < vlen; ++rlen ) 944 (wval + rlen)->integer= str->charArray[ si++ ];944 orInt(wval + rlen) = str->charArray[ si++ ]; 945 945 946 946 orEvalBlock( orBlockPtr( body ), bi ); … … 956 956 while( si < str->used ) 957 957 { 958 wval->integer= str->charArray[ si++ ];958 orInt(wval) = str->charArray[ si++ ]; 959 959 ++wval; 960 960 } … … 1127 1127 { 1128 1128 orSetTF( val, OT_CHAR ); 1129 val->integer= str->charArray[ si ];1129 orInt(val) = str->charArray[ si ]; 1130 1130 } 1131 1131 else
