Changeset 82063a in git
- Timestamp:
- Sep 19, 2000, 2:43:32 PM (24 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 0bf7dff98e17f7166a35a042e1aede1cff4b9fe8
- Parents:
- f18d15f939265cfd33d45466cb593f6c5b1ad49f
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rf18d15f r82063a 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.22 5 2000-09-18 09:19:02 obachmanExp $ */4 /* $Id: iparith.cc,v 1.226 2000-09-19 12:43:28 Singular Exp $ */ 5 5 6 6 /* … … 16 16 17 17 #include "mod2.h" 18 19 18 #include "tok.h" 20 19 #include "ipid.h" -
Singular/ipassign.cc
rf18d15f r82063a 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipassign.cc,v 1. 59 2000-09-18 09:19:04 obachmanExp $ */4 /* $Id: ipassign.cc,v 1.60 2000-09-19 12:43:29 Singular Exp $ */ 5 5 6 6 /* … … 39 39 40 40 /*=================== proc =================*/ 41 #ifdef SRING42 static BOOLEAN jjALTVARS(leftv res, leftv a)43 {44 pAltVars=(int)a->Data();45 pSRING=(pAltVars<=pVariables);46 pSDRING=pSDRING||pSRING;47 currRing->partN=pAltVars;48 return FALSE;49 }50 #endif51 41 static BOOLEAN jjECHO(leftv res, leftv a) 52 42 { … … 546 536 // sysvars: 547 537 {jjECHO, VECHO, INT_CMD } 548 #ifdef SRING549 ,{jjALTVARS, VALTVARS, INT_CMD }550 #endif551 538 ,{jjPAGELENGTH, VPAGELENGTH, INT_CMD } 552 539 ,{jjPRINTLEVEL, VPRINTLEVEL, INT_CMD } -
Singular/subexpr.cc
rf18d15f r82063a 5 5 * ABSTRACT: handling of leftv 6 6 */ 7 /* $Id: subexpr.cc,v 1.6 7 2000-09-18 14:31:37Singular Exp $ */7 /* $Id: subexpr.cc,v 1.68 2000-09-19 12:43:32 Singular Exp $ */ 8 8 9 9 #include <stdlib.h> … … 14 14 15 15 #include "mod2.h" 16 #define OM_TRACK 517 #define OM_CHECK 318 #define OM_KEEP 119 16 #include "tok.h" 20 17 #include "ipid.h" … … 1003 1000 switch (rtyp) 1004 1001 { 1005 #ifdef SRING1006 case VALTVARS: return (void *)pAltVars;1007 #endif1008 1002 case VECHO: return (void *)si_echo; 1009 1003 case VPAGELENGTH:return (void *)pagelength; … … 1118 1112 { 1119 1113 tmp.next=next; next=NULL; 1114 data=NULL; d=NULL; 1120 1115 CleanUp(); 1121 1116 memcpy(this,&tmp,sizeof(tmp)); … … 1126 1121 // ??? 1127 1122 // here we still have a memory leak... 1128 1129 1130 1131 1132 1133 1123 // example: list L="123","456"; 1124 // L[1][2]; 1125 // therefore, it should never happen: 1126 assume(0); 1127 // but if it happens: here is the temporary fix: 1128 // omMarkAsStaticAddr(r); 1134 1129 } 1135 1130 break; … … 1158 1153 if ((e->next!=NULL) 1159 1154 && (l->m[index-1].rtyp==STRING_CMD)) 1160 1161 1162 char *dd=l->m[index-1].data;1163 1164 1165 if ((j>=0) && (j<(int)strlen((char *)dd)))1166 1167 r[0]=*(((char *)dd)+j);1168 1169 1170 1171 1172 1173 1174 1155 // string[..].Data() modifies sleftv, so let's do it ourself 1156 { 1157 char *dd=(char *)l->m[index-1].data; 1158 int j=e->next->start-1; 1159 r=(char *)omAllocBin(size_two_bin); 1160 if ((j>=0) && (j<(int)strlen(dd))) 1161 { 1162 r[0]=*(dd+j); 1163 r[1]='\0'; 1164 } 1165 else 1166 { 1167 r[0]='\0'; 1168 } 1169 } 1175 1170 else 1176 1177 1171 { 1172 l->m[index-1].e=e->next; 1178 1173 r=(char *)l->m[index-1].Data(); 1179 1174 l->m[index-1].e=NULL; 1180 1175 } 1181 1176 } 1182 1177 else //if (!errorreported)
Note: See TracChangeset
for help on using the changeset viewer.