Changeset d8b0f69 in git
- Timestamp:
- Feb 28, 2012, 7:14:51 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- f323dd1d5224b28e86385dbae25bbc736620b24c
- Parents:
- 52d4806a5a94e095e70d7f1fb00cc88836d13e0f8db30eef10dd120583257c43df0c2cb4d8cbd028
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r52d480 rd8b0f69 984 984 if(strcmp(sys_cmd,"neworder")==0) 985 985 { 986 #if 1 986 #if defined(HAVE_LIBFAC) 987 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD)) 988 { 989 res->rtyp=STRING_CMD; 990 res->data=(void *)singclap_neworder((ideal)h->Data(), currRing); 991 return FALSE; 992 } 993 else 994 WerrorS("ideal expected"); 995 #else 987 996 Werror("Sorry: not yet re-factored: see libpolys/polys/clapsing.cc"); 988 997 return FALSE; 989 #else990 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))991 {992 res->rtyp=STRING_CMD;993 res->data=(void *)singclap_neworder((ideal)h->Data(), currRing);994 return FALSE;995 }996 else997 WerrorS("ideal expected");998 998 #endif 999 999 } -
Singular/ipassign.cc
r8db30e rd8b0f69 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id$ */5 6 4 /* 7 5 * ABSTRACT: interpreter: … … 189 187 WarnS("Set minpoly over non-transcendental ground field to 0?!"); 190 188 #endif 191 return FALSE; 192 } 193 194 189 return FALSE; 190 } 191 192 195 193 if ( !nCoeff_is_transExt(currRing->cf) ) 196 194 { … … 204 202 { 205 203 // return TRUE; 206 #ifndef NDEBUG 204 #ifndef NDEBUG 207 205 idhdl p = currRing->idroot; 208 206 … … 213 211 Print(p->String(TRUE)); PrintLn(); 214 212 p = p->next; 215 } 213 } 216 214 #endif 217 215 } 218 216 219 217 assume (currRing->idroot==NULL); 220 218 221 219 number p = (number)a->CopyD(NUMBER_CMD); 222 220 … … 225 223 n_Delete(&p, currRing); 226 224 227 225 228 226 if( nCoeff_is_transExt(currRing->cf) ) 229 227 { 230 #ifndef NDEBUG 228 #ifndef NDEBUG 231 229 WarnS("minpoly is already 0..."); 232 230 #endif … … 235 233 236 234 WarnS("cannot set minpoly to 0 / alg. extension?"); 237 235 238 236 // return TRUE; 239 237 } … … 247 245 killhdl2(currRing->idroot,&(currRing->idroot),currRing); 248 246 } 249 247 250 248 n_Normalize(p, currRing->cf); 251 249 252 250 AlgExtInfo A; 253 251 254 252 A.r = currRing->cf->extRing; // Use the same ground field! 255 253 A.i = idInit(1,1); 256 254 257 255 assume( DEN((fractionObject *)(p)) == NULL ); // minpoly must be a poly...!? 258 256 259 257 A.i->m[0] = NUM((fractionObject *)p); 260 258 … … 268 266 269 267 NUM((fractionObject *)p) = NULL; n_Delete(&p, currRing->cf); 270 268 271 269 coeffs new_cf = nInitChar(n_algExt, &A); 272 270 273 271 if (new_cf==NULL) 274 272 { … … 692 690 if (rField_is_Ring(currRing)) 693 691 { 694 int constIndex = idPosConstant(id); 695 if (constIndex != -1) 696 WerrorS("ideal contains constant; please modify ground field/ring instead"); 697 return TRUE; 692 if (idPosConstant(id) != -1) 693 { 694 WerrorS("constant in q-ideal; please modify ground field/ring instead"); 695 return TRUE; 696 } 698 697 } 699 698 #endif … … 1748 1747 { 1749 1748 case IDEAL_CMD: 1750 1749 case MODUL_CMD: 1751 1750 { 1752 1751 ideal F=idInit(1,1); -
Singular/ssiLink.cc
r8db30e rd8b0f69 5 5 * File: ssiLink.h 6 6 * Purpose: declaration of sl_link routines for ssi 7 * Version: $Id$8 7 ***************************************************************/ 9 8 #include <stdio.h> … … 65 64 //#endif 66 65 67 #define SSI_VERSION 266 #define SSI_VERSION 3 68 67 69 68 typedef struct … … 220 219 { 221 220 fprintf(d->f_write,"%d %d %d ",r->order[i],r->block0[i], r->block1[i]); 221 switch(r->order[i]) 222 { 223 case ringorder_a: 224 case ringorder_wp: 225 case ringorder_Wp: 226 case ringorder_ws: 227 case ringorder_Ws: 228 case ringorder_aa: 229 { 230 int ii; 231 for(ii=r->block0[i];ii<=r->block1[i];ii++) 232 fprintf(d->f_write,"%d ",r->wvhdl[i][ii-r->block0[i]]); 233 } 234 break; 235 case ringorder_a64: 236 case ringorder_M: 237 case ringorder_L: 238 case ringorder_IS: 239 Werror("ring oder not implemented for ssi:%d",r->order[i]); 240 break; 241 242 default: break; 243 } 222 244 i++; 223 245 } … … 469 491 int *block1=(int *)omAlloc0((num_ord+1)*sizeof(int)); 470 492 SSI_BLOCK_CHLD; 493 int **wvhdl=(int**)omAlloc0((num_ord+1)*sizeof(int*)); 471 494 for(i=0;i<num_ord;i++) 472 495 { 473 fscanf(d->f_read,"%d %d %d",&ord[i],&block0[i],&block1[i]); 474 } 475 SSI_UNBLOCK_CHLD; 476 return rDefault(ch,N,names,num_ord,ord,block0,block1); 496 fscanf(d->f_read,"%d %d %d",&ord[i],&block0[i],&block1[i]); 497 switch(ord[i]) 498 { 499 case ringorder_a: 500 case ringorder_wp: 501 case ringorder_Wp: 502 case ringorder_ws: 503 case ringorder_Ws: 504 case ringorder_aa: 505 { 506 wvhdl[i]=(int*)omAlloc((block1[i]-block0[i]+1)*sizeof(int)); 507 int ii; 508 for(ii=block0[i];ii<=block1[i];ii++) 509 fscanf(d->f_read,"%d",&(wvhdl[i][ii-block0[i]])); 510 } 511 break; 512 513 case ringorder_a64: 514 case ringorder_M: 515 case ringorder_L: 516 case ringorder_IS: 517 Werror("ring oder not implemented for ssi:%d",ord[i]); 518 break; 519 520 default: break; 521 } 522 } 523 SSI_UNBLOCK_CHLD; 524 return rDefault(ch,N,names,num_ord,ord,block0,block1,wvhdl); 477 525 } 478 526 … … 922 970 struct sockaddr_in serv_addr; 923 971 struct hostent *server; 924 972 925 973 sscanf(l->name,"%255[^:]:%d",host,&portno); 926 974 //Print("connect to host %s, port %d\n",host,portno);mflush(); … … 945 993 d->fd_write=sockfd; 946 994 SI_LINK_SET_RW_OPEN_P(l); 947 995 d->send_quit_at_exit=1; 948 996 omFree(host); 949 997 } … … 961 1009 FILE *outfile; 962 1010 char *filename=l->name; 963 1011 964 1012 if(filename[0]=='>') 965 1013 { … … 1031 1079 } 1032 1080 if (d->send_quit_at_exit) 1033 { 1081 { 1034 1082 fputs("99\n",d->f_write);fflush(d->f_write); 1035 1083 } … … 1418 1466 1419 1467 /* check the links and fill in fdmask */ 1468 /* check ssi links for ungetc_buf */ 1420 1469 for(i=L->nr; i>=0; i--) 1421 1470 { … … 1440 1489 d=(ssiInfo*)l->data; 1441 1490 d_fd=d->fd_read; 1491 if (d->ungetc_buf=='\0') 1492 { 1493 FD_SET(d_fd, &fdmask); 1494 if (d_fd > max_fd) max_fd=d_fd; 1495 } 1496 else 1497 return i+1; 1442 1498 } 1443 1499 else … … 1445 1501 dd=(MP_Link_pt)l->data; 1446 1502 d_fd=((MP_TCP_t *)dd->transp.private1)->sock; 1503 FD_SET(d_fd, &fdmask); 1504 if (d_fd > max_fd) max_fd=d_fd; 1447 1505 } 1448 1506 #else 1449 1507 d=(ssiInfo*)l->data; 1450 1508 d_fd=d->fd_read; 1509 if (d->ungetc_buf=='\0') 1510 { 1511 FD_SET(d_fd, &fdmask); 1512 if (d_fd > max_fd) max_fd=d_fd; 1513 } 1514 else 1515 return i+1; 1451 1516 #endif 1452 FD_SET(d_fd, &fdmask);1453 if (d_fd > max_fd) max_fd=d_fd;1454 1517 } 1455 1518 } … … 1516 1579 } 1517 1580 // only ssi links: 1518 if (d->ungetc_buf) return i+1;1519 1581 loop 1520 1582 { -
kernel/shiftgb.cc
r8db30e rd8b0f69 252 252 j = currRing->N; 253 253 while ( (!e[j]) && (j>=1) ) j--; 254 freeT(e, currRing->N); 254 255 if (j==0) 255 256 { -
libpolys/coeffs/coeffs.h
r8db30e rd8b0f69 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id$ */7 6 /* 8 7 * ABSTRACT -
libpolys/polys/monomials/ring.cc
r8db30e rd8b0f69 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id$ */5 6 4 /* 7 5 * ABSTRACT - the interpreter related ring operations … … 108 106 //} 109 107 110 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1 )108 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int** wvhdl) 111 109 { 112 110 assume( cf != NULL); … … 123 121 } 124 122 /*weights: entries for 2 blocks: NULL*/ 125 r->wvhdl = (int **)omAlloc0((ord_size+1) * sizeof(int *)); 123 if (wvhdl==NULL) 124 r->wvhdl = (int **)omAlloc0((ord_size+1) * sizeof(int *)); 125 else 126 r->wvhdl=wvhdl; 126 127 r->order = ord; 127 128 r->block0 = block0; … … 134 135 return r; 135 136 } 136 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1 )137 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1,int ** wvhdl) 137 138 { 138 139 coeffs cf; … … 140 141 else cf=nInitChar(n_Zp,(void*)(long)ch); 141 142 assume( cf != NULL); 142 return rDefault(cf,N,n,ord_size,ord,block0,block1 );143 return rDefault(cf,N,n,ord_size,ord,block0,block1,wvhdl); 143 144 } 144 145 ring rDefault(const coeffs cf, int N, char **n) -
libpolys/polys/monomials/ring.h
r8db30e rd8b0f69 317 317 ring rDefault(int ch, int N, char **n); 318 318 ring rDefault(const coeffs cf, int N, char **n); 319 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1 );320 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1 );319 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL); 320 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL); 321 321 322 322 // #define rIsRingVar(A) r_IsRingVar(A,currRing) … … 603 603 // the following are only used internally 604 604 ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it 605 ringorder_rs, ///< ???605 ringorder_rs, ///< opposite of ls 606 606 ringorder_IS, ///< Induced (Schreyer) ordering 607 607 ringorder_unspec
Note: See TracChangeset
for help on using the changeset viewer.