Changeset 0d84792 in git
- Timestamp:
- Jan 22, 1999, 7:23:21 PM (25 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 8e012379f6186bcc208b49f8710913df381eb5e3
- Parents:
- 31b8436f979efbf98c360c7279f6ef542bf0c26f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipconv.cc
r31b843 r0d84792 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipconv.cc,v 1.1 5 1998-11-12 14:44:37 siebertExp $ */4 /* $Id: ipconv.cc,v 1.16 1999-01-22 18:23:21 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: automatic type conversions … … 153 153 //{ 154 154 // nDelete((number *)&data); 155 //} 155 //} 156 156 return (void *)p; 157 157 } … … 169 169 //{ 170 170 // nDelete((number *)&data); 171 //} 171 //} 172 172 return (void *)I; 173 173 } … … 290 290 else if ((input->rtyp==POLY_CMD) && (input->name==NULL)) 291 291 { 292 int nr=pIsPurePower((poly)input->data); 293 if (nr!=0) 292 if (input->data!=NULL) 294 293 { 295 if (pGetExp((poly)input->data,nr)==1) 294 int nr=pIsPurePower((poly)input->data); 295 if (nr!=0) 296 296 { 297 output->name=mstrdup(currRing->names[nr-1]); 297 if (pGetExp((poly)input->data,nr)==1) 298 { 299 output->name=mstrdup(currRing->names[nr-1]); 300 } 301 else 302 { 303 output->name=(char *)AllocL(4); 304 sprintf(output->name,"%c%d",*(currRing->names[nr-1]), 305 pGetExp((poly)input->data,nr)); 306 } 298 307 } 308 else if(pIsConstant((poly)input->data)) 309 { 310 output->name=nName(pGetCoeff((poly)input->data)); 311 } 312 #ifdef TEST 299 313 else 300 314 { 301 output->name=(char *)AllocL(4); 302 sprintf(output->name,"%c%d",*(currRing->names[nr-1]), 303 pGetExp((poly)input->data,nr)); 315 WerrorS("wrong name, should not happen"); 316 output->name=mstrdup("?"); 304 317 } 318 #endif 305 319 } 306 else if(pIsConstant((poly)input->data))307 {308 output->name=nName(pGetCoeff((poly)input->data));309 }310 #ifdef TEST311 else312 {313 WerrorS("wrong name, should not happen");314 output->name=mstrdup("?");315 }316 #endif317 320 } 318 321 else if ((input->rtyp==NUMBER_CMD) && (input->name==NULL))
Note: See TracChangeset
for help on using the changeset viewer.