Changeset c45b2a5 in git


Ignore:
Timestamp:
Dec 2, 2010, 1:46:01 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
f343015c91960d681861b1b16bf04e3afbbece9e
Parents:
2f2562016613663d129949817c3520b92f72c095
Message:
fix ungetc and select stuff for ssiStatus

git-svn-id: file:///usr/local/Singular/svn/trunk@13689 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ssiLink.cc

    r2f2562 rc45b2a5  
    4646  int fd_read,fd_write; /* only valid for fork/tcp mode*/
    4747  char level;
     48  char ungetc_buf; /* status sets to !=0, if ungetc was used, ssiRead* set to 0*/
     49
    4850} ssiInfo;
    4951
     
    883885{
    884886  ssiInfo *d = (ssiInfo *)l->data;
     887  d->ungetc_buf='\0';
    885888  leftv res=(leftv)omAlloc0(sizeof(sleftv));
    886889  int t=0;
     
    10831086  return s;
    10841087}
     1088
    10851089const char* slStatusSsi(si_link l, const char* request)
    10861090{
     
    10921096    fd_set  mask, fdmask;
    10931097    struct timeval wt;
     1098    if (d->ungetc_buf) return "ready";
    10941099    loop
    10951100    {
     
    11141119      if (c== -1) return "eof";
    11151120      else if (isdigit(c))
    1116       { ungetc(c,d->f_read); return "ready"; }
     1121      { ungetc(c,d->f_read); d->ungetc_buf='\1'; return "ready"; }
    11171122      else if (c>' ')
    11181123      {
     
    11351140  else return "unknown status request";
    11361141}
    1137 
    11381142int slStatusSsiL(lists L, int timeout)
    11391143{
     
    11871191      if(j==d->fd_read) break;
    11881192    }
     1193    if (d->ungetc_buf) return i+1;
    11891194    loop
    11901195    {
     
    11961201      if (c== -1) return 0;
    11971202      else if (isdigit(c))
    1198       { ungetc(c,d->f_read); return i+1; }
     1203      { ungetc(c,d->f_read); d->ungetc_buf='\1'; return i+1; }
    11991204      else if (c>' ')
    12001205      {
Note: See TracChangeset for help on using the changeset viewer.