Changeset 7ee1907 in git
- Timestamp:
- Feb 28, 2012, 3:13:36 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d901095118d1ee38940016e9b6c108a54485ac2a
- Parents:
- e8086733d77deaf0656dc33bc685bcc08f6a96ab
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ssiLink.cc
re80867 r7ee1907 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 { -
libpolys/coeffs/coeffs.h
re80867 r7ee1907 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id$ */7 6 /* 8 7 * ABSTRACT -
libpolys/polys/monomials/ring.cc
re80867 r7ee1907 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
re80867 r7ee1907 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.