Changeset 7ee1907 in git


Ignore:
Timestamp:
Feb 28, 2012, 3:13:36 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d901095118d1ee38940016e9b6c108a54485ac2a
Parents:
e8086733d77deaf0656dc33bc685bcc08f6a96ab
Message:
chg: update to ssi-3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/ssiLink.cc

    re80867 r7ee1907  
    55 * File:    ssiLink.h
    66 *  Purpose: declaration of sl_link routines for ssi
    7  *  Version: $Id$
    87 ***************************************************************/
    98#include <stdio.h>
     
    6564//#endif
    6665
    67 #define SSI_VERSION 2
     66#define SSI_VERSION 3
    6867
    6968typedef struct
     
    220219  {
    221220    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    }
    222244    i++;
    223245  }
     
    469491  int *block1=(int *)omAlloc0((num_ord+1)*sizeof(int));
    470492  SSI_BLOCK_CHLD;
     493  int **wvhdl=(int**)omAlloc0((num_ord+1)*sizeof(int*));
    471494  for(i=0;i<num_ord;i++)
    472495  {
    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);
    477525}
    478526
     
    922970        struct sockaddr_in serv_addr;
    923971        struct hostent *server;
    924  
     972
    925973        sscanf(l->name,"%255[^:]:%d",host,&portno);
    926974        //Print("connect to host %s, port %d\n",host,portno);mflush();
     
    945993          d->fd_write=sockfd;
    946994          SI_LINK_SET_RW_OPEN_P(l);
    947           d->send_quit_at_exit=1;
     995          d->send_quit_at_exit=1;
    948996          omFree(host);
    949997        }
     
    9611009        FILE *outfile;
    9621010        char *filename=l->name;
    963  
     1011
    9641012        if(filename[0]=='>')
    9651013        {
     
    10311079        }
    10321080        if (d->send_quit_at_exit)
    1033         { 
     1081        {
    10341082          fputs("99\n",d->f_write);fflush(d->f_write);
    10351083        }
     
    14181466
    14191467  /* check the links and fill in fdmask */
     1468  /* check ssi links for ungetc_buf */
    14201469  for(i=L->nr; i>=0; i--)
    14211470  {
     
    14401489        d=(ssiInfo*)l->data;
    14411490        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;
    14421498      }
    14431499      else
     
    14451501        dd=(MP_Link_pt)l->data;
    14461502        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;
    14471505      }
    14481506    #else
    14491507      d=(ssiInfo*)l->data;
    14501508      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;
    14511516    #endif
    1452       FD_SET(d_fd, &fdmask);
    1453       if (d_fd > max_fd) max_fd=d_fd;
    14541517    }
    14551518  }
     
    15161579    }
    15171580    // only ssi links:
    1518     if (d->ungetc_buf) return i+1;
    15191581    loop
    15201582    {
  • libpolys/coeffs/coeffs.h

    re80867 r7ee1907  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id$ */
    76/*
    87* ABSTRACT
  • libpolys/polys/monomials/ring.cc

    re80867 r7ee1907  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id$ */
    5 
    64/*
    75* ABSTRACT - the interpreter related ring operations
     
    108106//}
    109107
    110 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1)
     108ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int** wvhdl)
    111109{
    112110  assume( cf != NULL);
     
    123121  }
    124122  /*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;
    126127  r->order = ord;
    127128  r->block0 = block0;
     
    134135  return r;
    135136}
    136 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1)
     137ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1,int ** wvhdl)
    137138{
    138139  coeffs cf;
     
    140141  else       cf=nInitChar(n_Zp,(void*)(long)ch);
    141142  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);
    143144}
    144145ring   rDefault(const coeffs cf, int N, char **n)
  • libpolys/polys/monomials/ring.h

    re80867 r7ee1907  
    317317ring   rDefault(int ch, int N, char **n);
    318318ring   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);
     319ring   rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL);
     320ring   rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL);
    321321
    322322// #define rIsRingVar(A) r_IsRingVar(A,currRing)
     
    603603  // the following are only used internally
    604604  ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it
    605   ringorder_rs, ///< ???
     605  ringorder_rs, ///< opposite of ls
    606606  ringorder_IS, ///< Induced (Schreyer) ordering
    607607  ringorder_unspec
Note: See TracChangeset for help on using the changeset viewer.