Changeset 3645fc in git


Ignore:
Timestamp:
Jun 8, 2011, 6:45:40 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
b9a4477dffa95152122f8354bb7633b5a708918e
Parents:
ac8e1a6fb7da54fe20dd3b5cb75e2f2cdd68dc06
Message:
init via siInit

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

Legend:

Unmodified
Added
Removed
  • Singular/misc_ip.cc

    rac8e1a r3645fc  
    2121#include <kernel/longrat.h>
    2222#include <Singular/misc_ip.h>
    23 #ifdef LIBSINGULAR
     23#include <Singular/feOpt.h>
    2424#include <Singular/silink.h>
    25 #include <Singular/feOpt.h>
    26 #endif
    2725
    2826void number2mpz(number n, mpz_t m)
     
    11261124}
    11271125
    1128 #ifdef LIBSINGULAR
    11291126int siInit(char *name)
    11301127{
    1131 
     1128#ifdef HAVE_FACTORY
     1129  On(SW_USE_NTL);
     1130  Off(SW_USE_GCD_P);
     1131  On(SW_USE_NTL_GCD_0); // On -> seg11 in Old/algnorm, Old/factor...
     1132  On(SW_USE_NTL_GCD_P); // On -> cyle in Short/brnoeth_s: fixed
     1133  On(SW_USE_EZGCD);
     1134  On(SW_USE_CHINREM_GCD);
     1135  //On(SW_USE_FF_MOD_GCD);
     1136  //On(SW_USE_fieldGCD);
     1137  On(SW_USE_EZGCD_P);
     1138  On(SW_USE_QGCD);
     1139  Off(SW_USE_NTL_SORT); // may be changed by an command line option
     1140#endif
     1141
     1142#ifdef INIT_BUG
     1143  jjInitTab1();
     1144#endif
     1145  /* initialize components */
     1146  factoryError=WerrorS;
     1147  siRandomStart=inits();
     1148  feOptSpec[FE_OPT_RANDOM].value = (void*) ((long)siRandomStart);
     1149
     1150  // Don't worry: ifdef OM_NDEBUG, then all these calls are undef'ed
    11321151  // hack such that all shared' libs in the bindir are loaded correctly
    11331152  feInitResources(name);
     
    11351154  iiInitArithmetic();
    11361155
    1137 #if 0
    1138   SingularBuilder::Ptr SingularInstance = SingularBuilder::instance();
    1139 #else
    11401156  basePack=(package)omAlloc0(sizeof(*basePack));
    11411157  currPack=basePack;
     
    11491165  slStandardInit();
    11501166  myynest=0;
    1151 #endif
     1167
    11521168  if (! feOptValue(FE_OPT_NO_STDLIB))
    11531169  {
     
    11591175  errorreported = 0;
    11601176}
    1161 #endif
    1162 
     1177
  • Singular/tesths.cc

    rac8e1a r3645fc  
    4343#endif
    4444
    45 extern int iiInitArithmetic();
     45extern int siInit(char *);
    4646
    4747#if ! defined(LIBSINGULAR)
     
    5151    char** argv)   /* parameter array */
    5252{
    53 #ifdef HAVE_FACTORY
    54   On(SW_USE_NTL);
    55   Off(SW_USE_GCD_P);
    56   On(SW_USE_NTL_GCD_0); // On -> seg11 in Old/algnorm, Old/factor...
    57   On(SW_USE_NTL_GCD_P); // On -> cyle in Short/brnoeth_s: fixed
    58   On(SW_USE_EZGCD);
    59   On(SW_USE_CHINREM_GCD);
    60   //On(SW_USE_FF_MOD_GCD);
    61   //On(SW_USE_fieldGCD);
    62   On(SW_USE_EZGCD_P);
    63   On(SW_USE_QGCD);
    64   Off(SW_USE_NTL_SORT); // may be changed by an command line option
    65 #endif
    66 
    67 #ifdef INIT_BUG
    68   jjInitTab1();
    69 #endif
    7053  // Don't worry: ifdef OM_NDEBUG, then all these calls are undef'ed
    7154  omInitRet_2_Info(argv[0]);
    7255  omInitGetBackTrace();
    7356
    74   /* initialize components */
    75   factoryError=WerrorS;
    76   siRandomStart=inits();
    77   feOptSpec[FE_OPT_RANDOM].value = (void*) ((long)siRandomStart);
     57  siInit(argv[0]);
     58
     59  // parse command line options
    7860  int optc, option_index;
    7961  const char* errormsg;
    80 
    81   // do this first, because -v might print version path
    82   feInitResources(argv[0]);
    83   iiInitArithmetic();
    84 
    85   // parse command line options
    8662  while((optc = fe_getopt_long(argc, argv,
    8763                               SHORT_OPTS_STRING, feOptSpec, &option_index))
     
    12197
    12298  /* say hello */
    123 #if 0
    124   SingularBuilder::Ptr SingularInstance = SingularBuilder::instance();
    125 #else
    126   {
    127     basePack=(package)omAlloc0(sizeof(*basePack));
    128     currPack=basePack;
    129     idhdl h;
    130     h=enterid("Top", 0, PACKAGE_CMD, &IDROOT, TRUE);
    131     IDPACKAGE(h)->language = LANG_TOP;
    132     IDPACKAGE(h)=basePack;
    133     currPackHdl=h;
    134     basePackHdl=h;
    13599#ifdef HAVE_FANS
    136     bbcone_setup();
    137     bbfan_setup();
     100  bbcone_setup();
     101  bbfan_setup();
    138102#endif /* HAVE_FANS */
    139     //for official version: not active
    140     //bigintm_setup();
    141   }
    142 #endif
     103  //for official version: not active
     104  //bigintm_setup();
     105
    143106  if (TEST_V_QUIET)
    144107  {
     
    168131    */
    169132  }
    170   slStandardInit();
    171   myynest=0;
    172   if (! feOptValue(FE_OPT_NO_STDLIB))
    173   {
    174     int vv=verbose;
    175     verbose &= ~Sy_bit(V_LOAD_LIB);
    176     iiLibCmd(omStrDup("standard.lib"), TRUE,TRUE,TRUE);
    177     verbose=vv;
    178   }
    179133  pyobject_setup();
    180134  errorreported = 0;
    181 
    182   // and again, ifdef OM_NDEBUG this call is undef'ed
    183   // otherwise, it marks all memory allocated so far as static
    184   // i.e. as memory which is not mention on omPrintUsedAddr:
    185   //omMarkMemoryAsStatic();
    186135
    187136  setjmp(si_start_jmpbuf);
Note: See TracChangeset for help on using the changeset viewer.