Changeset 141 for trunk/thune/make.c
- Timestamp:
- 05/06/06 04:54:25 (3 years ago)
- Files:
-
- 1 modified
-
trunk/thune/make.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thune/make.c
r129 r141 25 25 #include "os.h" 26 26 #include "internal.h" 27 28 29 extern int ur_stringToInt( const char*, const char*, const char** ); 30 extern double ur_stringToDec( const char*, const char*, const char** ); 27 31 28 32 … … 472 476 473 477 478 int ur_makeSelector( UCell* res, const char* spA, const char* end ) 479 { 480 const char* cp; 481 const char* sep = spA; 482 while( sep != end ) 483 { 484 if( *sep == '/' ) 485 break; 486 ++sep; 487 } 488 if( sep == end ) 489 return 0; 490 491 ur_setType( res, UT_SELECTOR ); 492 493 cp = sep + 1; 494 if( *cp >= '0' && *cp <= '9' ) 495 { 496 ur_selector(res) = ur_stringToInt( cp, end, 0 ); 497 } 498 else 499 { 500 res->id.flags |= UR_FLAG_SEL_ATOM; 501 ur_selector(res) = ur_intern( cp, end - cp ); 502 } 503 504 res->word.valBlk = GLOBAL_VAL_BLKN; 505 res->word.atom = ur_intern( spA, sep - spA ); 506 res->word.index = ur_internWord( &ur_global, res->word.atom ); 507 508 return 1; 509 } 510 511 512 /*--------------------------------------------------------------------------*/ 513 514 474 515 static void _makeContextProto( UContext* ctx, const UCell* proto ) 475 516 { … … 580 621 581 622 /*--------------------------------------------------------------------------*/ 582 583 584 extern int ur_stringToInt( const char*, const char*, const char** );585 extern double ur_stringToDec( const char*, const char*, const char** );586 623 587 624 … … 649 686 res->word.atom = ur_intern( spA, spB - spA ); 650 687 res->word.index = ur_internWord( &ur_global, res->word.atom ); 688 } 689 break; 690 691 case UT_SELECTOR: 692 if( ur_stringSlice(tos, &spA, &spB) && spA ) 693 { 694 if( ! ur_makeSelector( res, spA, spB ) ) 695 goto error; 651 696 } 652 697 break;
