Changeset 4ad0d6 in git for Singular/ipid.cc
- Timestamp:
- Jul 21, 1998, 7:18:19 PM (26 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 0d09b74c44f80a4e38a69d9155eb393b81538ee7
- Parents:
- 14236163c0be8d199836dd2bdc6edc8b993636d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipid.cc
r142361 r4ad0d6 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipid.cc,v 1.1 2 1998-06-13 12:44:40 krueger Exp $ */4 /* $Id: ipid.cc,v 1.13 1998-07-21 17:18:19 Singular Exp $ */ 5 5 6 6 /* … … 123 123 case RESOLUTION_CMD: 124 124 len=sizeof(ssyStrategy); 125 break; 125 break; 126 case PROC_CMD: 127 len=sizeof(procinfo); 128 break; 126 129 //other types: without init (int,script,poly,def,package) 127 130 } … … 131 134 } 132 135 } 133 if(t == PROC_CMD) 134 { 135 IDPROC(h) = (procinfo *)Alloc(sizeof(procinfo)); 136 memset(IDPROC(h),0,sizeof(*IDPROC(h))); 136 // additional settings:-------------------------------------- 137 if (t == QRING_CMD) 138 { 139 IDRING(h)=rCopy(currRing); 140 /* QRING_CMD is ring dep => currRing !=NULL */ 141 } 142 else if (t == PROC_CMD) 143 { 137 144 IDPROC(h)->language=LANG_NONE; 138 145 } 146 // -------------------------------------------------------- 139 147 return h; 140 148 } … … 570 578 FreeL((ADDRESS)pi->libname); 571 579 FreeL((ADDRESS)pi->procname); 572 if( pi->language == LANG_SINGULAR) { 580 if( pi->language == LANG_SINGULAR) 581 { 573 582 FreeL((ADDRESS)pi->data.s.body); 574 583 } 575 if( pi->language == LANG_C) { 584 if( pi->language == LANG_C) 585 { 576 586 } 577 587 memset((void *) pi, 0, sizeof(procinfo)); … … 600 610 namehdl ns = (namerec *)Alloc0(sizeof(namerec)); 601 611 ns->next = this; 602 if(this==NULL && !init) { 612 if(this==NULL && !init) 613 { 603 614 printf("PUSH: this is NULL and init not set.\n"); 604 615 init=TRUE; 605 616 } 606 if(init) { 617 if(init) 618 { 607 619 ns->pack = (ip_package *)Alloc0(sizeof(ip_package)); 608 620 ns->isroot = TRUE; 609 621 ns->lev = 1; 610 } else { 622 } 623 elses 624 { 611 625 ns->pack = pack; 612 626 ns->lev = this->lev+1; … … 618 632 if(ns->isroot) ns->root=ns; else ns->root = this->root; 619 633 namespaceroot = ns; 620 if(init && ns->isroot) { 621 idhdl pl = enterid( mstrdup("toplevel"),0, PACKAGE_CMD, 634 if(init && ns->isroot) 635 { 636 idhdl pl = enterid( mstrdup("toplevel"),0, PACKAGE_CMD, 622 637 &NSROOT(namespaceroot), TRUE ); 623 624 638 } 625 639 return(namespaceroot);
Note: See TracChangeset
for help on using the changeset viewer.