Changeset 7b9b8e5 in git


Ignore:
Timestamp:
Jul 27, 2016, 5:32:43 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
f9b0bddbfb9793b47a94a5d2aace6da9918e3c70
Parents:
e642218a429036f2f457d8045880dc747c8200a7
Message:
fix: Werror -> WerrorS if possible
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/polymake/polymake_wrapper.cc

    re64221 r7b9b8e5  
    7676        if (d1 != d2)
    7777        {
    78           Werror("mismatching ambient dimensions");
     78          WerrorS("mismatching ambient dimensions");
    7979          return TRUE;
    8080        }
     
    9797        if (d1 != d2)
    9898        {
    99           Werror("mismatching ambient dimensions");
     99          WerrorS("mismatching ambient dimensions");
    100100          return TRUE;
    101101        }
  • Singular/dyn_modules/pyobject/pyobject.cc

    re64221 r7b9b8e5  
    202202      IDTYP(handle) =  PythonInterpreter::id();
    203203    }
    204     else { Werror("Importing pyobject to Singular failed"); }
     204    else { WerrorS("Importing pyobject to Singular failed"); }
    205205  }
    206206
     
    422422
    423423/// Evaluate string in python
    424 PythonObject python_eval(const char* arg) {
    425 
     424PythonObject python_eval(const char* arg)
     425{
    426426  PyObject* globals = PyModule_GetDict(PyImport_Import(PyString_FromString("__main__")));
    427427  return PyRun_String(arg, Py_eval_input, globals, globals);
     
    429429
    430430/// Evaluate string in python from Singular
    431 BOOLEAN python_eval(leftv result, leftv arg) {
    432   if ( !arg || (arg->Typ() != STRING_CMD) ) {
    433     Werror("expected python_eval('string')");
     431BOOLEAN python_eval(leftv result, leftv arg)
     432{
     433  if ( !arg || (arg->Typ() != STRING_CMD) )
     434  {
     435    WerrorS("expected python_eval('string')");
    434436    return TRUE;
    435437  }
     
    442444BOOLEAN python_run(leftv result, leftv arg)
    443445{
    444   if ( !arg || (arg->Typ() != STRING_CMD) ) {
    445     Werror("expected python_run('string')");
     446  if ( !arg || (arg->Typ() != STRING_CMD) )
     447  {
     448    WerrorS("expected python_run('string')");
    446449    return TRUE;
    447450  }
     
    473476
    474477/// import python module and export identifiers in Singular namespace
    475 BOOLEAN python_import(leftv result, leftv value) {
    476 
    477   if ((value == NULL) || (value->Typ()!= STRING_CMD)) {
    478     Werror("expected python_import('string')");
     478BOOLEAN python_import(leftv result, leftv value)
     479{
     480  if ((value == NULL) || (value->Typ()!= STRING_CMD))
     481  {
     482    WerrorS("expected python_import('string')");
    479483    return TRUE;
    480484  }
     
    531535    {
    532536      long value = PyInt_AsLong(PythonCastStatic<>(head));
    533       if( (value == -1) &&  PyErr_Occurred() ) {
    534         Werror("'pyobject` cannot be converted to integer");
     537      if( (value == -1) &&  PyErr_Occurred() )
     538      {
     539        WerrorS("'pyobject` cannot be converted to integer");
    535540        PyErr_Clear();
    536541        return TRUE;
     
    612617
    613618      intvec* vec = new intvec(len);
    614       for(unsigned long idx = 0; idx != len; ++idx) {
     619      for(unsigned long idx = 0; idx != len; ++idx)
     620      {
    615621        long value = PyInt_AsLong(obj[idx]);
    616622        (*vec)[idx] = static_cast<int>(value);
    617623
    618         if ((value == -1) &&  PyErr_Occurred()) {
     624        if ((value == -1) &&  PyErr_Occurred())
     625        {
    619626          value = 0;
    620627          PyErr_Clear();
    621628        }
    622         if (value != long((*vec)[idx])) {
     629        if (value != long((*vec)[idx]))
     630        {
    623631          delete vec;
    624           Werror("'pyobject` cannot be converted to intvec");
     632          WerrorS("'pyobject` cannot be converted to intvec");
    625633          return TRUE;
    626634        }
     
    696704  {
    697705    tok = setBlackboxStuff((blackbox*)omAlloc0(sizeof(blackbox)),
    698                            "pyobject");
     706                           "pyobject");
    699707  }
    700708  return getBlackboxStuff(tok);
  • Singular/dyn_modules/syzextra/singularxx_defs.h

    re64221 r7b9b8e5  
    5858#  define SINGULARXX_THROW(type) throw type();
    5959#else
    60 #  define SINGULARXX_THROW(type) Werror(type().what());
     60#  define SINGULARXX_THROW(type) WerrorS(type().what());
    6161#endif
    6262
  • Singular/fehelp.cc

    re64221 r7b9b8e5  
    10191019static void heDummyHelp(heEntry /*hentry*/, int /*br*/)
    10201020{
    1021   Werror("No functioning help browser available.");
     1021  WerrorS("No functioning help browser available.");
    10221022}
    10231023
  • Singular/ipassign.cc

    re64221 r7b9b8e5  
    260260  if ((p==NULL) ||(NUM((fraction)p)==NULL))
    261261  {
    262     Werror("Could not construct the alg. extension: minpoly==0");
     262    WerrorS("Could not construct the alg. extension: minpoly==0");
    263263    // cleanup A: TODO
    264264    rDelete( A.r );
     
    301301  if (new_cf==NULL)
    302302  {
    303     Werror("Could not construct the alg. extension: llegal minpoly?");
     303    WerrorS("Could not construct the alg. extension: llegal minpoly?");
    304304    // cleanup A: TODO
    305305    rDelete( A.r );
  • Singular/ipid.cc

    re64221 r7b9b8e5  
    367367  }
    368368  else
    369     Werror("kill what ?");
     369    WerrorS("kill what ?");
    370370}
    371371
  • Singular/iplib.cc

    re64221 r7b9b8e5  
    834834    else
    835835      Werror(yylp_errlist[yylp_errno], yylplineno);
    836     Werror("Cannot load library,... aborting.");
     836    WerrorS("Cannot load library,... aborting.");
    837837    reinit_yylp();
    838838    fclose( yylpin );
  • Singular/ipshell.cc

    re64221 r7b9b8e5  
    22192219  if ((L->m[0].rtyp!=INT_CMD) || (L->m[0].data!=(char *)0))
    22202220  {
    2221     Werror("invald coeff. field description, expecting 0");
     2221    WerrorS("invalid coeff. field description, expecting 0");
    22222222    return;
    22232223  }
     
    22272227  if (L->m[1].rtyp!=LIST_CMD)
    22282228  {
    2229     Werror("invald coeff. field description, expecting precision list");
     2229    WerrorS("invalid coeff. field description, expecting precision list");
    22302230    return;
    22312231  }
     
    22372237    || (LL->m[0].rtyp!=INT_CMD)))
    22382238  {
    2239     Werror("invald coeff. field description list");
     2239    WerrorS("invalid coeff. field description list");
    22402240    return;
    22412241  }
     
    22732273    if (L->m[2].rtyp!=STRING_CMD)
    22742274    {
    2275       Werror("invald coeff. field description, expecting parameter name");
     2275      WerrorS("invalid coeff. field description, expecting parameter name");
    22762276      return;
    22772277    }
     
    23022302  else
    23032303  {
    2304     if (L->m[1].rtyp!=LIST_CMD) Werror("invald data, expecting list of numbers");
     2304    if (L->m[1].rtyp!=LIST_CMD) WerrorS("invalid data, expecting list of numbers");
    23052305    lists LL=(lists)L->m[1].data;
    23062306    if ((LL->nr >= 0) && LL->m[0].rtyp == BIGINT_CMD)
     
    23302330  if ((mpz_cmp_ui(modBase, 1) == 0) && (mpz_cmp_ui(modBase, 0) < 0))
    23312331  {
    2332     Werror("Wrong ground ring specification (module is 1)");
     2332    WerrorS("Wrong ground ring specification (module is 1)");
    23332333    return;
    23342334  }
    23352335  if (modExponent < 1)
    23362336  {
    2337     Werror("Wrong ground ring specification (exponent smaller than 1");
     2337    WerrorS("Wrong ground ring specification (exponent smaller than 1)");
    23382338    return;
    23392339  }
     
    57165716    if ((mpz_cmp_ui(modBase, 1) == 0) && (mpz_cmp_ui(modBase, 0) < 0))
    57175717    {
    5718       Werror("Wrong ground ring specification (module is 1)");
     5718      WerrorS("Wrong ground ring specification (module is 1)");
    57195719      goto rInitError;
    57205720    }
    57215721    if (modExponent < 1)
    57225722    {
    5723       Werror("Wrong ground ring specification (exponent smaller than 1");
     5723      WerrorS("Wrong ground ring specification (exponent smaller than 1");
    57245724      goto rInitError;
    57255725    }
     
    58125812  if (cf==NULL)
    58135813  {
    5814     Werror("Invalid ground field specification");
     5814    WerrorS("Invalid ground field specification");
    58155815    goto rInitError;
    58165816//    const int ch=32003;
  • Singular/links/asciiLink.cc

    re64221 r7b9b8e5  
    184184      else
    185185      {
    186         Werror("cannot convert to string");
     186        WerrorS("cannot convert to string");
    187187        err=TRUE;
    188188      }
     
    531531  if (l->name[0] == '\0')
    532532  {
    533     Werror("getdump: Can not get dump from stdin");
     533    WerrorS("getdump: Can not get dump from stdin");
    534534    return TRUE;
    535535  }
  • Singular/links/pipeLink.cc

    re64221 r7b9b8e5  
    146146    else
    147147    {
    148       Werror("cannot convert to string");
     148      WerrorS("cannot convert to string");
    149149      err=TRUE;
    150150    }
  • Singular/links/ssiLink.cc

    re64221 r7b9b8e5  
    408408    return (number)ssiReadPoly_R(d,cf->extRing);
    409409  }
    410   else Werror("coeffs not implemented in ssiReadNumber");
     410  else WerrorS("coeffs not implemented in ssiReadNumber");
    411411  return NULL;
    412412}
  • Singular/newstruct.cc

    re64221 r7b9b8e5  
    375375              res->data=(void *)currRing; r=currRing;
    376376              if (r!=NULL) r->ref++;
    377               else Werror("ring of this member is not set and no basering found");
     377              else WerrorS("ring of this member is not set and no basering found");
    378378            }
    379379            return r==NULL;
  • Singular/pyobject_setup.cc

    re64221 r7b9b8e5  
    3333void pyobject_default_destroy(blackbox  */*b*/, void */*d*/)
    3434{
    35   Werror("Python-based functionality not available!");
     35  WerrorS("Python-based functionality not available!");
    3636}
    3737
  • Singular/walk.cc

    re64221 r7b9b8e5  
    55315531  if(weight_rad < 0)
    55325532  {
    5533     Werror("Invalid radius.\n");
     5533    WerrorS("Invalid radius.\n");
    55345534    return NULL;
    55355535  }
     
    55385538  if(pert_deg > nV || pert_deg < 1)
    55395539  {
    5540     Werror("Invalid perturbation degree.\n");
     5540    WerrorS("Invalid perturbation degree.\n");
    55415541    return NULL;
    55425542  }
     
    58765876  if(op_deg < 1 || tp_deg < 1 || op_deg > nV || tp_deg > nV)
    58775877  {
    5878     Werror("Invalid perturbation degree.\n");
     5878    WerrorS("Invalid perturbation degree.\n");
    58795879    return NULL;
    58805880  }
     
    63116311  if(weight_rad < 0)
    63126312  {
    6313     Werror("Invalid radius.\n");
     6313    WerrorS("Invalid radius.\n");
    63146314    return NULL;
    63156315  }
     
    63186318  if(op_deg < 1 || tp_deg < 1 || op_deg > nV || tp_deg > nV)
    63196319  {
    6320     Werror("Invalid perturbation degree.\n");
     6320    WerrorS("Invalid perturbation degree.\n");
    63216321    return NULL;
    63226322  }
     
    81138113  if(weight_rad < 0)
    81148114  {
    8115     Werror("Invalid radius.\n");
     8115    WerrorS("Invalid radius.\n");
    81168116    return NULL;
    81178117  }
     
    92199219  if(tp_deg < 1 || tp_deg > nV)
    92209220  {
    9221     Werror("Invalid perturbation degree.\n");
     9221    WerrorS("Invalid perturbation degree.\n");
    92229222    return NULL;
    92239223  }
  • Singular/walk_ip.cc

    re64221 r7b9b8e5  
    124124
    125125        case WalkIncompatibleDestRing:
    126           Werror( "Order of basering not allowed,\n must be a combination of a,A,lp,dp,Dp,wp,Wp,M and C.\n");
     126          WerrorS( "Order of basering not allowed,\n must be a combination of a,A,lp,dp,Dp,wp,Wp,M and C.\n");
    127127          destIdeal= NULL;
    128128          break;
     
    141141
    142142        case WalkOverFlowError:
    143           Werror( "Overflow occurred.\n");
     143          WerrorS( "Overflow occurred.\n");
    144144          destIdeal= NULL;
    145145          break;
  • kernel/GBEngine/kstd2.cc

    re64221 r7b9b8e5  
    16211621    if (strat->overflow)
    16221622    {
    1623       if (!kStratChangeTailRing(strat)) { Werror("OVERFLOW.."); break;}
     1623      if (!kStratChangeTailRing(strat)) { WerrorS("OVERFLOW.."); break;}
    16241624    }
    16251625
     
    20782078    if (strat->overflow)
    20792079    {
    2080         if (!kStratChangeTailRing(strat)) { Werror("OVERFLOW.."); break;}
     2080        if (!kStratChangeTailRing(strat)) { WerrorS("OVERFLOW.."); break;}
    20812081    }
    20822082
     
    27982798    if (strat->overflow)
    27992799    {
    2800       if (!kStratChangeTailRing(strat)) { Werror("OVERFLOW.."); break;}
     2800      if (!kStratChangeTailRing(strat)) { WerrorS("OVERFLOW.."); break;}
    28012801    }
    28022802
  • kernel/GBEngine/ratgring.cc

    re64221 r7b9b8e5  
    351351  {
    352352#ifdef PDEBUG
    353     Werror("nc_rat_CreateSpoly: different non-zero components!");
     353    WerrorS("nc_rat_CreateSpoly: different non-zero components!");
    354354#endif
    355355    return(NULL);
     
    472472  {
    473473#ifdef PDEBUG
    474     Werror("nc_rat_ReduceSpolyNew: different non-zero components!");
     474    WerrorS("nc_rat_ReduceSpolyNew: different non-zero components!");
    475475#endif
    476476    return(NULL);
  • kernel/GBEngine/syz3.cc

    re64221 r7b9b8e5  
    10041004  if ((idIs0(new_generators)) || (new_generators->m[0]==NULL))
    10051005  {
    1006     Werror("Hier ist was faul!\n");
     1006    WerrorS("Hier ist was faul!\n");
    10071007    return NULL;
    10081008  }
  • kernel/combinatorics/hilb.cc

    re64221 r7b9b8e5  
    7070      if (z>(MAX_INT_VAL)/2)
    7171      {
    72        Werror("interal arrays too big");
     72       WerrorS("interal arrays too big");
    7373       return;
    7474      }
     
    258258        {
    259259            idPrint(I);
    260             Werror("Ideal is not deg sorted!!");
     260            WerrorS("Ideal is not deg sorted!!");
    261261            return(FALSE);
    262262        }
  • kernel/fast_mult.cc

    re64221 r7b9b8e5  
    591591
    592592  if(rChar(r)!=0)
    593     Werror("Char not 0, pFastPowerMC not implemented for this case");
     593    WerrorS("Char not 0, pFastPowerMC not implemented for this case");
    594594  if (n<=1)
    595     Werror("not implemented for so small n, recursion fails");//should be length(f)
     595    WerrorS("not implemented for so small n, recursion fails");//should be length(f)
    596596   if (pLength(f)<=1)
    597     Werror("not implemented for so small length of f, recursion fails");
     597    WerrorS("not implemented for so small length of f, recursion fails");
    598598  //  number null_number=n_Init(0,r);
    599599  number* facult=(number*) omAlloc((n+1)*sizeof(number));
  • kernel/ideals.cc

    re64221 r7b9b8e5  
    15201520    if ( nc_rComplete(origR, tmpR, false) ) // no quotient ideal!
    15211521    {
    1522       Werror("no elimination is possible: ordering condition is violated");
     1522      WerrorS("no elimination is possible: ordering condition is violated");
    15231523      // cleanup
    15241524      rDelete(tmpR);
  • kernel/maps/subst_maps.cc

    re64221 r7b9b8e5  
    4646    ||(preimage_r!=currRing))
    4747    {
    48       Werror("not implemented");
     48      WerrorS("not implemented");
    4949      return NULL;
    5050    }
  • kernel/old/old.Number.h

    re64221 r7b9b8e5  
    7272  Number& operator+=(const Number & n2){
    7373    if (r!=n2.r){
    74       Werror("not the same ring");
     74      WerrorS("not the same ring");
    7575      return *this;
    7676    }
     
    8282  Number& operator*=(const Number & n2){
    8383    if (r!=n2.r){
    84       Werror("not the same ring");
     84      WerrorS("not the same ring");
    8585      return *this;
    8686    }
     
    9292  Number& operator-=(const Number & n2){
    9393    if (r!=n2.r){
    94       Werror("not the same ring");
     94      WerrorS("not the same ring");
    9595      return *this;
    9696    }
     
    102102  Number& operator/=(const Number & n2){
    103103    if (r!=n2.r){
    104       Werror("not the same ring");
     104      WerrorS("not the same ring");
    105105      return *this;
    106106    }
  • kernel/old/old.Poly.h

    re64221 r7b9b8e5  
    9090  PolyImpl& operator+=(const PolyImpl & p2){
    9191    if (r!=p2.r){
    92       Werror("not the same ring");
     92      WerrorS("not the same ring");
    9393      return *this;
    9494    }
     
    104104  PolyImpl& operator*=(const PolyImpl & p2){
    105105    if (r!=p2.r){
    106       Werror("not the same ring");
     106      WerrorS("not the same ring");
    107107      return *this;
    108108    }
     
    117117  PolyImpl& operator*=(const Number & n){
    118118    if (r!=n.r){
    119       Werror("not the same ring");
     119      WerrorS("not the same ring");
    120120      return *this;
    121121    }
     
    126126  PolyImpl& operator-=(const PolyImpl & p2){
    127127    if (r!=p2.r){
    128       Werror("not the same ring");
     128      WerrorS("not the same ring");
    129129      return *this;
    130130    }
  • kernel/preimage.cc

    re64221 r7b9b8e5  
    7070    if ((rIsPluralRing(sourcering)) && (ncRingType(sourcering)!=nc_comm))
    7171    {
    72       Werror("Sorry, not yet implemented for noncomm. rings");
     72      WerrorS("Sorry, not yet implemented for noncomm. rings");
    7373      return NULL;
    7474    }
     
    9696  {
    9797    /// TODO: there might be extreme cases where this doesn't hold...
    98     Werror("Coefficient fields/rings must be equal");
     98    WerrorS("Coefficient fields/rings must be equal");
    9999    return NULL;
    100100  }
  • libpolys/coeffs/numbers.cc

    re64221 r7b9b8e5  
    261261{
    262262  CanonicalForm term(0);
    263   Werror("no conversion to factory");
     263  WerrorS("no conversion to factory");
    264264  return term;
    265265}
     
    267267static number ndConvFactoryNSingN( const CanonicalForm, const coeffs)
    268268{
    269   Werror("no conversion from factory");
     269  WerrorS("no conversion from factory");
    270270  return NULL;
    271271}
  • libpolys/polys/monomials/p_polys.cc

    re64221 r7b9b8e5  
    38783878  {
    38793879    assume (FALSE);
    3880     Werror("Number permutation is not implemented for this data yet!");
     3880    WerrorS("Number permutation is not implemented for this data yet!");
    38813881    return NULL;
    38823882  }
  • libpolys/polys/nc/old.gring.cc

    re64221 r7b9b8e5  
    14651465  {
    14661466#ifdef PDEBUG
    1467     Werror("gnc_ReduceSpolyNew: different non-zero components!");
     1467    WerrorS("gnc_ReduceSpolyNew: different non-zero components!");
    14681468#endif
    14691469    return(NULL);
     
    16331633  {
    16341634#ifdef PDEBUG
    1635     Werror("gnc_CreateSpolyNew: different non-zero components!");
     1635    WerrorS("gnc_CreateSpolyNew: different non-zero components!");
    16361636    assume(0);
    16371637#endif
     
    17431743       p_Write(m2, r);
    17441744
    1745        Werror("ERROR in nc_CreateSpoly: result of multiplication is Zero!\n");
     1745       WerrorS("ERROR in nc_CreateSpoly: result of multiplication is Zero!\n");
    17461746#endif
    17471747       return(NULL);
     
    19501950  {
    19511951#ifdef PDEBUG
    1952     Werror("nc_CreateShortSpoly: wrong module components!"); // !!!!
     1952    WerrorS("nc_CreateShortSpoly: wrong module components!"); // !!!!
    19531953#endif
    19541954    return(NULL);
     
    20192019
    20202020#ifdef KDEBUG
    2021   if( !kbTest(b) )Werror("nc_kBucketPolyRed: broken bucket!");
     2021  if( !kbTest(b) ) WerrorS("nc_kBucketPolyRed: broken bucket!");
    20222022#endif
    20232023
     
    25982598//  {
    25992599//#ifdef PDEBUF
    2600 //    Werror("nc_p_CopyGet call not in currRing");
     2600//    WerrorS("nc_p_CopyGet call not in currRing");
    26012601//#endif
    26022602//    return(NULL);
     
    26192619//  {
    26202620//#ifdef PDEBUF
    2621 //    Werror("nc_p_CopyGet call not in currRing");
     2621//    WerrorS("nc_p_CopyGet call not in currRing");
    26222622//#endif
    26232623//    return(NULL);
     
    28792879    if (!p_IsConstant(CN,curr))
    28802880    {
    2881       Werror("Incorrect input : non-constants are not allowed as coefficients (first argument)");
     2881      WerrorS("Incorrect input : non-constants are not allowed as coefficients (first argument)");
    28822882      return TRUE;
    28832883    }
     
    28872887    if (n_IsZero(nN, curr))
    28882888    {
    2889       Werror("Incorrect input : zero coefficients are not allowed");
     2889      WerrorS("Incorrect input : zero coefficients are not allowed");
    28902890
    28912891//      if( currRing != save )
     
    29452945        // find also illegal pN
    29462946        {
    2947           Werror("Incorrect input : matrix of coefficients contains zeros in the upper triangle");
     2947          WerrorS("Incorrect input : matrix of coefficients contains zeros in the upper triangle");
    29482948
    29492949//        if( currRing != save )
     
    30463046    if( bDnew ) mp_Delete( &D, r );
    30473047
    3048     Werror("Matrix of polynomials violates the ordering condition");
     3048    WerrorS("Matrix of polynomials violates the ordering condition");
    30493049
    30503050//    if( currRing != save )
     
    33863386    if ((shift<0) || (shift > rVar(srcRing))) // ???
    33873387    {
    3388       Werror("bad shifts in p_CopyEmbed");
     3388      WerrorS("bad shifts in p_CopyEmbed");
    33893389      return(0);
    33903390    }
Note: See TracChangeset for help on using the changeset viewer.