Changeset 550b4c in git for Singular/mpsr_PutPoly.cc
- Timestamp:
- Apr 21, 1998, 12:59:29 PM (26 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 559a4bf0a3b03fde23553e3ceb0d6c6ff9e2d4e3
- Parents:
- aaafeb24812a2fa1306280482a08f65373287b7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/mpsr_PutPoly.cc
raaafeb r550b4c 3 3 ****************************************/ 4 4 5 /* $Id: mpsr_PutPoly.cc,v 1.1 1 1998-04-16 16:10:22obachman Exp $ */5 /* $Id: mpsr_PutPoly.cc,v 1.12 1998-04-21 10:59:29 obachman Exp $ */ 6 6 7 7 /*************************************************************** … … 49 49 ***************************************************************/ 50 50 51 mpsr_Status_t (*PutCoeff)(MP_Link_pt link, number x); 52 mpsr_Status_t (*PutAlgAlgNumber)(MP_Link_pt link, number x); 53 MP_Uint32_t gNalgvars = 0; 54 MP_Sint32_t gNvars = 0; 51 static mpsr_Status_t (*PutCoeff)(MP_Link_pt link, number x); 52 static mpsr_Status_t (*PutAlgAlgNumber)(MP_Link_pt link, number x); 53 static MP_Uint32_t gNalgvars = 0; 54 static MP_Sint32_t gNvars = 0; 55 static ring CurrPutRing = NULL; 56 55 57 MP_Sint32_t *gTa = NULL; 56 ring CurrPutRing = NULL; 57 58 MP_Sint32_t gTa_Length = 0; 58 59 59 60 /*************************************************************** … … 77 78 static mpsr_Status_t PutDefRelsAnnot(MP_Link_pt link, ring r); 78 79 80 79 81 /*************************************************************** 80 82 * … … 86 88 CurrPutRing = r; 87 89 // first, we set the PutNumber function 88 if (r->N != gNvars) 89 { 90 if (gTa != NULL) 91 Free(gTa, (gNvars+1)*sizeof(MP_Sint32_t)); 92 93 gNvars = r->N; 94 if (gNvars > 1) 95 gTa = (MP_Sint32_t *) Alloc((gNvars+1)*sizeof(MP_Sint32_t)); 96 else 97 gTa = NULL; 98 } 90 gNvars = r->N; 91 mpsr_InitTempArray(gNvars+1); 99 92 100 93 if ((r->ch) == 0) … … 111 104 // now we come to algebraic numbers 112 105 gNalgvars = rPar(r); 106 mpsr_InitTempArray(gNalgvars); 113 107 PutCoeff = PutAlgNumber; 114 108 if ((r->ch) < 0) … … 223 217 static mpsr_Status_t PutAlgPoly(MP_Link_pt link, alg a) 224 218 { 225 int i;219 unsigned int i; 226 220 int *exp; 227 221 … … 230 224 { 231 225 failr(PutAlgAlgNumber(link, a->ko)); 226 #if (SIZEOF_INT == SIZEOF_PARAMETER) 232 227 mp_failr(IMP_PutSint32Vector(link, (MP_Sint32_t *) a->e, gNalgvars)); 228 #else 229 for (i=0; i<gNalgvars; i++) 230 gTa[i] = a->e[i]; 231 mp_failr(IMP_PutSint32Vector(link, gTa, gNalgvars)); 232 #endif 233 233 a = a->ne; 234 234 }
Note: See TracChangeset
for help on using the changeset viewer.