Changeset 271d25 in git


Ignore:
Timestamp:
Jan 18, 2013, 6:16:24 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
5b32a17feb4f0be885f1224b99e80004ed814aab74933e8be0f1a44b1a852b2fc14f6ef25a2d5c4c
Parents:
e6c3d1d6650b98221c24b2534d58726bcbded950
Message:
fix: warning for option changes does not work for libsingular

(from master, currently unused as options are in libsingular, not main)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iplib.cc

    re6c3d1 r271d25  
    298298  newBuffer( omStrDup(p /*pi->data.s.body*/), t /*BT_proc*/,
    299299               pi, l );
     300  #ifndef LIBSINGULAR
     301  // see below:
     302  BITSET save1=(test & ~TEST_RINGDEP_OPTS);
     303  BITSET save2=verbose;
     304  #endif
    300305  BOOLEAN err=yyparse();
    301306  if (sLastPrinted.rtyp!=0)
     
    303308    sLastPrinted.CleanUp();
    304309  }
     310  #ifndef LIBSINGULAR
     311  // the access to optionStruct and verboseStruct do not work
     312  // on x86_64-Linux for pic-code
     313  BITSET save11= ( test & ~TEST_RINGDEP_OPTS);
     314  if ((TEST_V_ALLWARN) &&
     315  (t==BT_proc) &&
     316  ((save1!=save11)||(save2!=verbose)) &&
     317  (pi->libname!=NULL) && (pi->libname[0]!='\0'))
     318  {
     319    Warn("option changed in proc %s from %s",pi->procname,pi->libname);
     320    int i;
     321    for (i=0; optionStruct[i].setval!=0; i++)
     322    {
     323      if ((optionStruct[i].setval & save11)
     324      && (!(optionStruct[i].setval & save1)))
     325      {
     326          Print(" +%s",optionStruct[i].name);
     327      }
     328      if (!(optionStruct[i].setval & save11)
     329      && ((optionStruct[i].setval & save1)))
     330      {
     331          Print(" -%s",optionStruct[i].name);
     332      }
     333    }
     334    for (i=0; verboseStruct[i].setval!=0; i++)
     335    {
     336      if ((verboseStruct[i].setval & verbose)
     337      && (!(verboseStruct[i].setval & save2)))
     338      {
     339          Print(" +%s",verboseStruct[i].name);
     340      }
     341      if (!(verboseStruct[i].setval & verbose)
     342      && ((verboseStruct[i].setval & save2)))
     343      {
     344          Print(" -%s",verboseStruct[i].name);
     345      }
     346    }
     347    PrintLn();
     348  }
     349  #endif
    305350  return err;
    306351}
Note: See TracChangeset for help on using the changeset viewer.