Changeset b5f276e in git


Ignore:
Timestamp:
Sep 20, 2010, 3:05:09 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
Children:
3f46965e1ad849ccb6d39d9e57cca2ecbbf10d86
Parents:
5d651dc1723c0ceef3e8c472352840a2c713d8a4
Message:
additional parameter for slOpen: make fork links global

git-svn-id: file:///usr/local/Singular/svn/trunk@13227 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r5d651d rb5f276e  
    27012701#else
    27022702  si_link l=(si_link)u->Data();
    2703   if (slOpen(l,SI_LINK_WRITE)) return TRUE;
     2703  if (slOpen(l,SI_LINK_WRITE,u)) return TRUE;
    27042704  if(strcmp(l->m->type,"ASCII")!=0)
    27052705  {
     
    48994899{
    49004900  si_link l=(si_link)v->Data();
    4901   if (iiOp==OPEN_CMD) return slOpen(l, SI_LINK_OPEN);
     4901  if (iiOp==OPEN_CMD) return slOpen(l, SI_LINK_OPEN,v);
    49024902  else                return slClose(l);
    49034903}
  • Singular/mpsr_sl.cc

    r5d651d rb5f276e  
    558558  omFree(istr);
    559559  // open link
    560   if (slOpen(silink, SI_LINK_OPEN))
     560  if (slOpen(silink, SI_LINK_OPEN,NULL))
    561561  {
    562562    fprintf(stderr, "Batch side could not connect on port %s and host %s\n",
  • Singular/pipeLink.cc

    r5d651d rb5f276e  
    3838
    3939//**************************************************************************/
    40 BOOLEAN pipeOpen(si_link l, short flag)
     40BOOLEAN pipeOpen(si_link l, short flag, leftv u)
    4141{
    4242  pipeInfo *d=(pipeInfo*)omAlloc0(sizeof(pipeInfo));
     
    128128LINKAGE BOOLEAN pipeWrite(si_link l, leftv data)
    129129{
    130   if(!SI_LINK_W_OPEN_P(l)) slOpen(l,SI_LINK_OPEN|SI_LINK_WRITE);
     130  if(!SI_LINK_W_OPEN_P(l)) slOpen(l,SI_LINK_OPEN|SI_LINK_WRITE,NULL);
    131131  pipeInfo *d = (pipeInfo *)l->data;
    132132  FILE *outfile=d->f_write;;
     
    195195si_link_extension slInitPipeExtension(si_link_extension s)
    196196{
    197   s->Open=(slOpenProc)pipeOpen;
    198   s->Close=(slCloseProc)pipeClose;
    199   s->Kill=(slKillProc)pipeKill;
    200   s->Read=(slReadProc)pipeRead1;
     197  s->Open=pipeOpen;
     198  s->Close=pipeClose;
     199  s->Kill=pipeKill;
     200  s->Read=pipeRead1;
    201201  s->Read2=(slRead2Proc)NULL;
    202   s->Write=(slWriteProc)pipeWrite;
     202  s->Write=pipeWrite;
    203203
    204204  s->Status=slStatusPipe;
  • Singular/silink.cc

    r5d651d rb5f276e  
    189189
    190190//--------------------------------------------------------------------------
    191 BOOLEAN slOpen(si_link l, short flag)
     191BOOLEAN slOpen(si_link l, short flag, leftv h)
    192192{
    193193  BOOLEAN res;
     
    202202  }
    203203  else if (l->m->Open != NULL)
    204     res = l->m->Open(l, flag);
     204    res = l->m->Open(l, flag, h);
    205205  else
    206206    res = TRUE;
    207207
     208  const char *c="_";;
     209  if (h!=NULL) c=h->Name();
     210
    208211  if (res)
    209     Werror("open: Error for link of type: %s, mode: %s, name: %s",
    210            l->m->type, l->mode, l->name);
     212    Werror("open: Error for link %s of type: %s, mode: %s, name: %s",
     213           c, l->m->type, l->mode, l->name);
    211214  return res;
    212215}
     
    243246#endif
    244247#endif
    245     if (slOpen(l, SI_LINK_READ)) return NULL;
     248    if (slOpen(l, SI_LINK_READ,NULL)) return NULL;
    246249  }
    247250
     
    290293#endif
    291294#endif
    292     if (slOpen(l, SI_LINK_WRITE)) return TRUE;
     295    if (slOpen(l, SI_LINK_WRITE,NULL)) return TRUE;
    293296  }
    294297
     
    319322  if(! SI_LINK_W_OPEN_P(l)) // open w ?
    320323  {
    321     if (slOpen(l, SI_LINK_WRITE)) return TRUE;
     324    if (slOpen(l, SI_LINK_WRITE,NULL)) return TRUE;
    322325  }
    323326
     
    348351  if(! SI_LINK_R_OPEN_P(l)) // open r ?
    349352  {
    350     if (slOpen(l, SI_LINK_READ)) return TRUE;
     353    if (slOpen(l, SI_LINK_READ,NULL)) return TRUE;
    351354  }
    352355
     
    374377
    375378/* =============== ASCII ============================================= */
    376 BOOLEAN slOpenAscii(si_link l, short flag)
     379BOOLEAN slOpenAscii(si_link l, short flag, leftv h)
    377380{
    378381  const char *mode;
  • Singular/silink.h

    r5d651d rb5f276e  
    1313
    1414// extension links:
    15 typedef BOOLEAN    (*slOpenProc)(si_link l, short flag);
     15typedef BOOLEAN    (*slOpenProc)(si_link l, short flag, leftv h);
    1616typedef BOOLEAN    (*slWriteProc)(si_link l, leftv lv);
    1717typedef BOOLEAN    (*slCloseProc)(si_link l);
     
    6767#define SI_LINK_SET_RW_OPEN_P(l) ((l)->flags |= (SI_LINK_OPEN | SI_LINK_READ | SI_LINK_WRITE))
    6868
    69 BOOLEAN slOpen(si_link l, short flag);
     69BOOLEAN slOpen(si_link l, short flag, leftv h);
    7070BOOLEAN slClose(si_link l);
    7171leftv   slRead(si_link l,leftv a=NULL);
  • Singular/ssiLink.cc

    r5d651d rb5f276e  
    464464
    465465//**************************************************************************/
    466 BOOLEAN ssiOpen(si_link l, short flag)
     466BOOLEAN ssiOpen(si_link l, short flag, leftv u)
    467467{
    468468  const char *mode;
     
    505505        myynest=0;
    506506        fe_fgets_stdin=fe_fgets_dummy;
     507        if ((u!=NULL)&&(u->rtyp==IDHDL))
     508        {
     509          idhdl h=(idhdl)u->data;
     510          h->lev=0;
     511        }
    507512        loop
    508513        {
     
    845850LINKAGE BOOLEAN ssiWrite(si_link l, leftv data)
    846851{
    847   if(!SI_LINK_W_OPEN_P(l)) slOpen(l,SI_LINK_OPEN|SI_LINK_WRITE);
     852  if(!SI_LINK_W_OPEN_P(l)) slOpen(l,SI_LINK_OPEN|SI_LINK_WRITE,NULL);
    848853  ssiInfo *d = (ssiInfo *)l->data;
    849854  d->level++;
     
    935940si_link_extension slInitSsiExtension(si_link_extension s)
    936941{
    937   s->Open=(slOpenProc)ssiOpen;
    938   s->Close=(slCloseProc)ssiClose;
    939   s->Kill=(slKillProc)ssiClose;
    940   s->Read=(slReadProc)ssiRead1;
     942  s->Open=ssiOpen;
     943  s->Close=ssiClose;
     944  s->Kill=ssiClose;
     945  s->Read=ssiRead1;
    941946  s->Read2=(slRead2Proc)NULL;
    942   s->Write=(slWriteProc)ssiWrite;
     947  s->Write=ssiWrite;
    943948
    944949  s->Status=slStatusSsi;
     
    10761081  sprintf(buf,"ssi:connect %s:%s",host,port);
    10771082  slInit(l, buf);
    1078   slOpen(l,SI_LINK_OPEN);
     1083  slOpen(l,SI_LINK_OPEN,NULL);
    10791084  SI_LINK_SET_RW_OPEN_P(l);
    10801085  loop
  • Singular/ssiLink.h

    r5d651d rb5f276e  
    99 #ifndef SSILINK_H
    1010 #define SSILINK_H
    11 BOOLEAN ssiOpen(si_link l, short flag);
     11BOOLEAN ssiOpen(si_link l, short flag, leftv u);
    1212BOOLEAN ssiWrite(si_link l, leftv v);
    1313leftv ssiRead1(si_link l);
Note: See TracChangeset for help on using the changeset viewer.