Changeset bdda8c2 in git for libpolys/coeffs/ffields.cc


Ignore:
Timestamp:
Apr 9, 2013, 4:39:42 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
2d5ff537ab672bcbb2ca73df6830672f38b1ea63
Parents:
bc0d32def5d3461a77eed40c1e1a3d254811858a
Message:
add: handling signals in system calls, p2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/ffields.cc

    rbc0d32 rbdda8c2  
    2222#include <string.h>
    2323#include <math.h>
     24#include <errno.h>
    2425
    2526BOOLEAN nfGreaterZero (number k, const coeffs r);
     
    225226{
    226227  assume(i==1);
    227  
     228
    228229  if( i == 1 )
    229230    return (number)1;
     
    655656    /*this field is already set*/  return;
    656657  int i=0;
    657  
    658   while ((fftable[i]!=c) && (fftable[i]!=0)) 
     658
     659  while ((fftable[i]!=c) && (fftable[i]!=0))
    659660    i++;
    660  
     661
    661662  if (fftable[i]==0)
    662663  {
     
    693694    }
    694695    int q;
    695     sscanf(buf,"%d %d",&r->m_nfCharP,&q);
     696    int res = -1;
     697    do
     698    {
     699      res = sscanf(buf,"%d %d",&r->m_nfCharP,&q);
     700    }
     701    while((res < 0) and (errno == EINTR));
     702
    696703    nfReadMipo(buf);
    697704    r->m_nfCharQ1=r->m_nfCharQ-1;
     
    829836
    830837  const int P = n_NumberOfParameters(r);
    831  
     838
    832839  for( int i = 1; i <= P; i++ )
    833     if (p[i-1] != NULL) 
     840    if (p[i-1] != NULL)
    834841      omFree( (ADDRESS)p[i-1] );
    835  
    836   omFreeSize((ADDRESS)p, P * sizeof(char*)); 
     842
     843  omFreeSize((ADDRESS)p, P * sizeof(char*));
    837844}
    838845
     
    865872  //r->cfRePart = ndCopy;
    866873  //r->cfImPart = ndReturn0;
    867  
     874
    868875  r->cfWriteLong = nfWriteLong;
    869876  r->cfInit_bigint = nlModP;
     
    884891  // debug stuff
    885892  r->cfCoeffWrite=nfCoeffWrite;
    886    
     893
    887894  r->cfParDeg = nfParDeg;
    888895
     
    890897  r->cfDBTest=nfDBTest;
    891898#endif
    892  
     899
    893900  // the variables:
    894901  r->nNULL = (number)0;
     
    900907
    901908  const char * name = p->GFPar_name;
    902  
     909
    903910  r->m_nfCharQ = 0;
    904911  r->m_nfCharP = p->GFChar;
     
    913920  assume( pParameterNames != NULL );
    914921  assume( pParameterNames[0] != NULL );
    915  
     922
    916923  r->pParameterNames = pParameterNames;
    917924  // NOTE: r->m_nfParameter was replaced by n_ParameterNames(r)[0]
     
    937944  }
    938945
    939   const double check= log ((double) (p->GFChar)); 
     946  const double check= log ((double) (p->GFChar));
    940947
    941948  if( (p->GFDegree * check) > sixteenlog2 )
     
    950957
    951958  nfReadTable(c, r);
    952  
     959
    953960  if( r->m_nfPlus1Table == NULL )
    954961  {
     
    958965    return TRUE;
    959966  }
    960  
    961  
     967
     968
    962969  assume (r -> m_nfCharQ > 0);
    963970
    964   r->ch = r->m_nfCharP; 
     971  r->ch = r->m_nfCharP;
    965972  assume( r->m_nfPlus1Table != NULL );
    966  
     973
    967974  return FALSE;
    968  
     975
    969976}
    970977
     
    981988    char *s=StringEndS(); PrintS(s); omFree(s);
    982989  }
    983   else PrintS("//   minpoly        : ...\n"); 
     990  else PrintS("//   minpoly        : ...\n");
    984991}
    985992
Note: See TracChangeset for help on using the changeset viewer.