| 1371 | */ |
| 1372 | static void callWerrorS(const char *s) { WerrorS(s); } |
| 1373 | void siInit(char *name) |
| 1374 | { |
| 1375 | // memory initialization: ----------------------------------------------- |
| 1376 | om_Opts.OutOfMemoryFunc = omSingOutOfMemoryFunc; |
| 1377 | #ifndef OM_NDEBUG |
| 1378 | #ifndef __OPTIMIZE__ |
| 1379 | om_Opts.ErrorHook = dErrorBreak; |
| 1380 | #else |
| 1381 | om_Opts.Keep = 0; /* !OM_NDEBUG, __OPTIMIZE__*/ |
| 1382 | #endif |
| 1383 | #else |
| 1384 | om_Opts.Keep = 0; /* OM_NDEBUG */ |
| 1385 | #endif |
| 1386 | omInitInfo(); |
| 1387 | // factory |
| 1388 | #ifndef HAVE_NTL |
| 1389 | extern void initPT(); |
| 1390 | initPT(); |
| 1391 | #endif |
| 1392 | // options --------------------------------------------------------------- |
| 1393 | si_opt_1=0; |
| 1394 | // interpreter tables etc.: ----------------------------------------------- |
| 1395 | memset(&sLastPrinted,0,sizeof(sleftv)); |
| 1396 | sLastPrinted.rtyp=NONE; |
| 1397 | |
| 1398 | extern int iiInitArithmetic(); iiInitArithmetic(); // iparith.cc |
| 1399 | |
| 1400 | basePack=(package)omAlloc0(sizeof(*basePack)); |
| 1401 | currPack=basePack; |
| 1402 | idhdl h; |
| 1403 | h=enterid("Top", 0, PACKAGE_CMD, &IDROOT, FALSE); |
| 1404 | IDPACKAGE(h)=basePack; |
| 1405 | IDPACKAGE(h)->language = LANG_TOP; |
| 1406 | currPackHdl=h; |
| 1407 | basePackHdl=h; |
| 1408 | |
| 1409 | coeffs_BIGINT = nInitChar(n_Q,(void*)1); |
| 1410 | |
| 1411 | #if 1 |
| 1412 | // def HAVE_POLYEXTENSIONS |
| 1413 | if(TRUE) |
| 1414 | { |
| 1415 | n_coeffType type; |
| 1416 | #ifdef SINGULAR_4_2 |
| 1417 | type = nRegister(n_polyExt, n2pInitChar); |
| 1418 | assume(type == n_polyExt); |
| 1419 | #endif |
| 1420 | |
| 1421 | type = nRegister(n_algExt, naInitChar); |
| 1422 | assume(type == n_algExt); |
| 1423 | |
| 1424 | type = nRegister(n_transExt, ntInitChar); |
| 1425 | assume(type == n_transExt); |
| 1426 | |
| 1427 | (void)type; |
| 1428 | } |
| 1429 | #endif |
| 1430 | |