Changeset 05bcd5 in git
- Timestamp:
- Jun 14, 1999, 6:35:34 PM (24 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 3c8e50bcc6eb720109f4b83d71567c36d48d8ae1
- Parents:
- 07f20e1f2be7d445106e822d1dd8fdc8cac35e88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r07f20e1 r05bcd5 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.15 0 1999-06-07 15:46:05 obachmanExp $ */4 /* $Id: iparith.cc,v 1.151 1999-06-14 16:35:34 Singular Exp $ */ 5 5 6 6 /* … … 618 618 if (iiOp=='-') /* u==NULL, v<>NULL, iiOp=='-'*/ 619 619 { 620 if (res->next==NULL) 621 res->next = (leftv)Alloc(sizeof(sleftv)); 622 return iiExprArith1(res->next,v,'-'); 620 do 621 { 622 if (res->next==NULL) 623 res->next = (leftv)Alloc0(sizeof(sleftv)); 624 leftv tmp_v=v->next; 625 v->next=NULL; 626 BOOLEAN b=iiExprArith1(res->next,v,'-'); 627 v->next=tmp_v; 628 if (b) 629 return TRUE; 630 v=tmp_v; 631 res=res->next; 632 } while (v!=NULL); 633 return FALSE; 623 634 } 624 635 loop /* u==NULL, v<>NULL, iiOp=='+' */ … … 634 645 if (v!=NULL) /* u<>NULL, v<>NULL */ 635 646 { 636 res->next = (leftv)Alloc(sizeof(sleftv)); 637 return iiExprArith2(res->next,u,iiOp,v); 647 do 648 { 649 res->next = (leftv)Alloc0(sizeof(sleftv)); 650 leftv tmp_u=u->next; u->next=NULL; 651 leftv tmp_v=v->next; v->next=NULL; 652 BOOLEAN b=iiExprArith2(res->next,u,iiOp,v); 653 u->next=tmp_u; 654 v->next=tmp_v; 655 if (b) 656 return TRUE; 657 u=tmp_u; 658 v=tmp_v; 659 res=res->next; 660 } while ((u!=NULL) && (v!=NULL)); 661 return FALSE; 638 662 } 639 663 loop /* u<>NULL, v==NULL */ … … 3897 3921 intvec* arg = (intvec*) u->Data(); 3898 3922 int i, n = min(im->cols()*im->rows(), arg->cols()*arg->rows()); 3899 3923 3900 3924 for (i=0; i<n; i++) 3901 3925 { 3902 3926 (*im)[i] = (*arg)[i]; 3903 3927 } 3904 3928 3905 3929 res->data = (char *)im; 3906 3930 return FALSE; … … 4579 4603 return FALSE; 4580 4604 } 4581 4605 4582 4606 char** slist = (char**) Alloc(n*sizeof(char*)); 4583 4607 int i, j; 4584 4608 4585 4609 for (i=0, j=0; i<n; i++, v = v ->next) 4586 4610 {
Note: See TracChangeset
for help on using the changeset viewer.