Changeset 5c5b5f in git
- Timestamp:
- Oct 7, 2014, 4:13:45 PM (10 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 2455ae6fe3bbd5214d1e2de1edd1ff163ac16d75
- Parents:
- df34b172db2946b2ec01ead72293e38991e6bc087a979beb4fba275a95a03fbc0afbbfaa3aea04e4
- Files:
-
- 12 added
- 4 deleted
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
COPYING
r7a979b r5c5b5f 14 14 15 15 Some single files have a copyright given within the file: 16 Singular/links/ndbm.* (BSD) , Singular/htmlhelp.h (LGPL 2.1+)16 Singular/links/ndbm.* (BSD) 17 17 18 18 The following software modules shipped with SINGULAR have their own -
Singular/COPYING
r7a979b r5c5b5f 18 18 19 19 Some single files have a copyright given within the file: 20 Singular/ndbm.* (BSD) , Singular/htmlhelp.h (LGPL 2.1+)20 Singular/ndbm.* (BSD). 21 21 22 22 This program is distributed in the hope that it will be useful, but -
Singular/LIB/help.cnf
r7a979b r5c5b5f 9 9 # h- requires html dir 10 10 # D- requires the enviroment variable DISPLAY 11 # C- requires Windows-help: Manual.chm12 11 # E:executable:- requires the named exectable 13 12 # O:`uname -m`-`uname -s`:- requires the named uname … … 25 24 # the default help browsers builtin, dummy and emacs are always 26 25 # available and should NOT be mentioned here 27 # ix86_Win: has additional default browsers: htmlhelp, html and winhlp28 # also not mentioned here29 26 #---------------------------------------------------- 30 27 htmlview!xDhE:htmlview:!htmlview %h & … … 36 33 galeon!xDhE:galeon:!galeon -n %h & 37 34 netscape!xDhE:netscape:!(netscape -remote "openURL(%h)")||(netscape %h) & 35 cygwin!xhE:cygstart:!cygstart "%h" & 36 cygwin-www!E:cygstart:!cygstart "%H" & 38 37 safari!xhE:/Applications/Safari.app:!open /Applications/Safari.app %h 39 38 tkinfo!xDiE:tkinfo:!tkinfo '(%i)%n' & -
Singular/LIB/normal.lib
rdf34b17 r5c5b5f 4018 4018 for ( jj = n(ii-1)+1; jj<=n(ii); jj++) 4019 4019 { 4020 if( Le[4][jj] !=0 ) //jj=index of var which was not substituted 4020 if( Le[4][jj] !=0 or // jj=index of var which was not substituted 4021 ( (ii==n3-1) and ( jj==n(ii) ) and (size(newg2)==0) ) // or we have no variables yet in the new ring and 4022 // want to keep at least the last one! 4023 ) 4021 4024 { 4022 4025 kk=kk+1; … … 4083 4086 export(normap); 4084 4087 list L = newBAS; 4088 setring BAS; 4085 4089 return(L); 4086 4090 -
Singular/LIB/primdecint.lib
r7a979b r5c5b5f 67 67 68 68 69 if( deg(I[1]) == 0)69 if(size(I)==1 && deg(I[1]) == 0) 70 70 { 71 71 ideal J = I; … … 95 95 number q=imap(R,q); 96 96 //=== computes the primes occuring in a generator of I intersect Z 97 98 97 list L = primefactors(q); 99 98 … … 171 170 i_sleep = system("sh", "sleep "+string(t)); 172 171 } 173 174 172 } 175 173 else … … 177 175 for(j=1;j<=size(L[2]);j++) 178 176 { 179 A[size(A)+1] = modp(J, L[1][j], L[2][j]); 177 p=int(L[1][j]); 178 nu=int(L[2][j]); 179 A[size(A)+1] = modp(J, p,nu ); 180 180 } 181 181 } -
Singular/LIB/schreyer.lib
r7a979b r5c5b5f 135 135 def @save = basering; 136 136 137 int @DEBUG = !system("with", "ndebug");137 int @DEBUG = 0; // !system("with", "ndebug"); 138 138 if( @DEBUG ) 139 139 { … … 223 223 static proc Sstep() 224 224 { 225 int @DEBUG = !system("with", "ndebug");225 int @DEBUG = 0; // !system("with", "ndebug"); 226 226 227 227 if( @DEBUG ) … … 566 566 def @save = basering; 567 567 568 int @DEBUG = !system("with", "ndebug");568 int @DEBUG = 0; // !system("with", "ndebug"); 569 569 570 570 if( typeof( attrib(SSinit, "DEBUG") ) == "int" ) … … 573 573 } 574 574 575 int @SYZCHECK = @DEBUG;575 int @SYZCHECK = 0; // @DEBUG; 576 576 577 577 if( typeof( attrib(SSinit, "SYZCHECK") ) == "int" ) … … 767 767 } else 768 768 { 769 attrib(S, "LEAD2SYZ", 1);769 attrib(S, "LEAD2SYZ", 0); 770 770 } 771 771 … … 784 784 } else 785 785 { 786 attrib(S, "HYBRIDNF", 2);786 attrib(S, "HYBRIDNF", 0); 787 787 } 788 788 … … 848 848 } else 849 849 { 850 int @DEBUG = !system("with", "ndebug");850 int @DEBUG = 0; // !system("with", "ndebug"); 851 851 } 852 852 … … 967 967 } else 968 968 { 969 int @DEBUG = !system("with", "ndebug");969 int @DEBUG = 0; // !system("with", "ndebug"); 970 970 } 971 971 … … 1190 1190 } else 1191 1191 { 1192 int @DEBUG = !system("with", "ndebug");1192 int @DEBUG = 0; // !system("with", "ndebug"); 1193 1193 } 1194 1194 … … 1321 1321 } else 1322 1322 { 1323 int @DEBUG = !system("with", "ndebug");1323 int @DEBUG = 0; // !system("with", "ndebug"); 1324 1324 } 1325 1325 … … 1431 1431 } else 1432 1432 { 1433 int @DEBUG = !system("with", "ndebug");1433 int @DEBUG = 0; // !system("with", "ndebug"); 1434 1434 } 1435 1435 … … 1512 1512 } else 1513 1513 { 1514 int @DEBUG = !system("with", "ndebug");1514 int @DEBUG = 0; // !system("with", "ndebug"); 1515 1515 } 1516 1516 … … 2117 2117 static proc loadme() 2118 2118 { 2119 int @DEBUG = !system("with", "ndebug");2119 int @DEBUG = 0; // !system("with", "ndebug"); 2120 2120 2121 2121 if( @DEBUG ) 2122 2122 { 2123 2123 2124 "ndebug?: ", system("with", "ndebug");2125 "om_ndebug?: ", system("with", "om_ndebug");2124 // "ndebug?: ", system("with", "ndebug"); 2125 // "om_ndebug?: ", system("with", "om_ndebug"); 2126 2126 2127 2127 listvar(Top); … … 2134 2134 if( 1 ) 2135 2135 { 2136 2136 /* 2137 2137 if( @DEBUG ) 2138 2138 { … … 2142 2142 "Loading the Release version!"; 2143 2143 } 2144 2144 */ 2145 2145 load("syzextra.so"); 2146 2146 … … 2190 2190 exportto(Schreyer, Syzextra::ComputeResolution); 2191 2191 } 2192 /*2193 else2194 {2195 2196 load("syzextra.so");2197 2198 if( @DEBUG )2199 {2200 listvar(Syzextra_g);2201 }2202 2203 exportto(Top, Syzextra_g::ClearContent);2204 exportto(Top, Syzextra_g::ClearDenominators);2205 2206 exportto(Schreyer, Syzextra_g::m2_end);2207 2208 // export Syzextra_g;2209 // exportto(Schreyer, Syzextra_g::noop);2210 exportto(Schreyer, Syzextra_g::DetailedPrint);2211 exportto(Schreyer, Syzextra_g::leadmonomial);2212 exportto(Schreyer, Syzextra_g::leadcomp);2213 // exportto(Schreyer, Syzextra_g::leadrawexp);2214 // exportto(Schreyer, Syzextra_g::ISUpdateComponents);2215 exportto(Schreyer, Syzextra_g::SetInducedReferrence);2216 exportto(Schreyer, Syzextra_g::GetInducedData);2217 // exportto(Schreyer, Syzextra_g::GetAMData);2218 // exportto(Schreyer, Syzextra_g::SetSyzComp);2219 exportto(Schreyer, Syzextra_g::MakeInducedSchreyerOrdering);2220 // exportto(Schreyer, Syzextra_g::MakeSyzCompOrdering);2221 exportto(Schreyer, Syzextra_g::idPrepare);2222 // exportto(Schreyer, Syzextra_g::reduce_syz);2223 // exportto(Schreyer, Syzextra_g::p_Content);2224 2225 exportto(Schreyer, Syzextra_g::ProfilerStart); exportto(Schreyer, Syzextra_g::ProfilerStop);2226 2227 exportto(Schreyer, Syzextra_g::Tail);2228 exportto(Schreyer, Syzextra_g::ComputeLeadingSyzygyTerms);2229 exportto(Schreyer, Syzextra_g::Compute2LeadingSyzygyTerms);2230 exportto(Schreyer, Syzextra_g::Sort_c_ds);2231 2232 exportto(Schreyer, Syzextra_g::FindReducer);2233 2234 exportto(Schreyer, Syzextra_g::ReduceTerm);2235 exportto(Schreyer, Syzextra_g::TraverseTail);2236 2237 exportto(Schreyer, Syzextra_g::SchreyerSyzygyNF);2238 exportto(Schreyer, Syzextra_g::ComputeSyzygy);2239 2240 exportto(Schreyer, Syzextra_g::ComputeResolution);2241 }2242 */2243 2192 2244 2193 exportto(Top, DetailedPrint); -
Singular/Makefile.am
r7a979b r5c5b5f 55 55 links/silink.cc\ 56 56 links/sing_dbm.cc\ 57 sing_win.cc\58 57 links/slInit_Static.cc\ 59 58 links/ssiLink.cc\ … … 108 107 links/silink.h \ 109 108 links/sing_dbm.h \ 110 sing_win.h \111 109 links/slInit.h \ 112 110 links/ssiLink.h \ -
Singular/cntrlc.h
r7a979b r5c5b5f 8 8 */ 9 9 #include <setjmp.h> 10 #include <misc/auxiliary.h> 10 11 #include <kernel/structs.h> 11 12 -
Singular/dyn_modules/gfanlib/Makefile.am
r7a979b r5c5b5f 23 23 gfanlib_la_SOURCES = $(SOURCES) 24 24 25 gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON} 25 gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON} ${CDDGMPCPPFLAGS} 26 26 gfanlib_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 27 27 -
Singular/emacs.cc
r7a979b r5c5b5f 9 9 10 10 11 #ifdef __CYGWIN__ 12 #define BOOLEAN boolean 13 #endif 11 14 #include <kernel/mod2.h> 12 15 … … 23 26 #include <string.h> 24 27 25 #ifdef ix86_Win28 #ifdef __CYGWIN__ 26 29 #include <windows.h> 27 30 #endif … … 39 42 #endif 40 43 41 #ifndef BOOLEAN42 #define BOOLEAN int43 #endif44 44 #ifndef FALSE 45 45 #define FALSE 0 … … 55 55 # define UP_DIR ".." 56 56 57 #ifndef ix86_Win57 #ifndef __CYGWIN__ 58 58 void error(const char *fmt, ...) 59 59 { … … 212 212 } 213 213 214 #ifdef ix86_Win214 #ifdef __CYGWIN__ 215 215 #define EXTRA_XTERM_ARGS "+vb -sl 2000 -fb Courier-bold-12 -tn xterm -cr Red3" 216 216 #else … … 269 269 // look in home-dir 270 270 emacs_load = getenv("HOME"); 271 #ifdef ix86_Win271 #ifdef __CYGWIN__ 272 272 if ((emacs_load==NULL)||(!access(emacs_load,X_OK))) 273 273 emacs_load = getenv("SINGHOME"); -
Singular/extra.cc
-
Property
mode
changed from
100644
to100755
r7a979b r5c5b5f 8 8 #define HAVE_WALK 1 9 9 10 11 12 13 10 #include <kernel/mod2.h> 14 11 #include <misc/auxiliary.h> … … 16 13 17 14 #include <factory/factory.h> 18 19 15 20 16 #include <stdlib.h> … … 120 116 #endif 121 117 122 123 118 #ifdef HAVE_SPECTRUM 124 119 #include <kernel/spectrum/spectrum.h> … … 136 131 #endif 137 132 138 #ifdef ix86_Win/* only for the DLLTest */133 #ifdef __CYGWIN__ /* only for the DLLTest */ 139 134 /* #include "WinDllTest.h" */ 140 135 #ifdef HAVE_DL … … 145 140 146 141 // Define to enable many more system commands 147 #undef MAKE_DISTRIBUTION142 //#undef MAKE_DISTRIBUTION 148 143 #ifndef MAKE_DISTRIBUTION 149 144 #define HAVE_EXTENDED_SYSTEM 1 … … 181 176 //#endif /* not HAVE_DYNAMIC_LOADING */ 182 177 183 #ifdef ix86_Win178 #ifdef __CYGWIN__ 184 179 //#include <Python.h> 185 180 //#include <python_wrapper.h> … … 190 185 #endif 191 186 192 #ifdef ix86_Win/* PySingular initialized? */187 #ifdef __CYGWIN__ /* PySingular initialized? */ 193 188 static int PyInitialized = 0; 194 189 #endif … … 314 309 else 315 310 316 317 318 319 311 /*==================== gen ==================================*/ 320 312 // // This seems to be obsolette...?! … … 330 322 if(strcmp(sys_cmd,"sh")==0) 331 323 { 332 if (feOptValue(FE_OPT_NO_SHELL)) { 333 WerrorS("shell execution is disallowed in restricted mode"); 334 return TRUE; 335 } 324 if (feOptValue(FE_OPT_NO_SHELL)) 325 { 326 WerrorS("shell execution is disallowed in restricted mode"); 327 return TRUE; 328 } 336 329 res->rtyp=INT_CMD; 337 330 if (h==NULL) res->data = (void *)(long) system("sh"); … … 420 413 else if (h->Typ()==STRING_CMD) 421 414 { 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 415 #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else 416 char *s=(char *)h->Data(); 417 res->rtyp=INT_CMD; 418 #ifdef HAVE_DBM 419 TEST_FOR("DBM") 420 #endif 421 #ifdef HAVE_DLD 422 TEST_FOR("DLD") 423 #endif 424 //TEST_FOR("factory") 425 //TEST_FOR("libfac") 426 #ifdef HAVE_READLINE 427 TEST_FOR("readline") 428 #endif 429 #ifdef TEST_MAC_ORDER 430 TEST_FOR("MAC_ORDER") 431 #endif 432 // unconditional since 3-1-0-6 433 TEST_FOR("Namespaces") 434 #ifdef HAVE_DYNAMIC_LOADING 435 TEST_FOR("DynamicLoading") 436 #endif 437 #ifdef HAVE_EIGENVAL 438 TEST_FOR("eigenval") 439 #endif 440 #ifdef HAVE_GMS 441 TEST_FOR("gms") 442 #endif 443 #ifdef OM_NDEBUG 444 TEST_FOR("om_ndebug") 445 #endif 446 #ifdef SING_NDEBUG 447 TEST_FOR("ndebug") 448 #endif 449 {}; 457 450 return FALSE; 458 #undef TEST_FOR 459 } 451 #undef TEST_FOR 452 } 453 return TRUE; 454 } 455 else 456 /*==================== browsers ==================================*/ 457 if (strcmp(sys_cmd,"browsers")==0) 458 { 459 res->rtyp = STRING_CMD; 460 StringSetS(""); 461 feStringAppendBrowsers(0); 462 res->data = StringEndS(); 463 return FALSE; 464 } 465 else 466 /*==================== pid ==================================*/ 467 if (strcmp(sys_cmd,"pid")==0) 468 { 469 res->rtyp=INT_CMD; 470 res->data=(void *)(long) getpid(); 471 return FALSE; 472 } 473 else 474 /*==================== getenv ==================================*/ 475 if (strcmp(sys_cmd,"getenv")==0) 476 { 477 if ((h!=NULL) && (h->Typ()==STRING_CMD)) 478 { 479 res->rtyp=STRING_CMD; 480 const char *r=getenv((char *)h->Data()); 481 if (r==NULL) r=""; 482 res->data=(void *)omStrDup(r); 483 return FALSE; 484 } 485 else 486 { 487 WerrorS("string expected"); 460 488 return TRUE; 461 489 } 462 else 463 /*==================== browsers ==================================*/ 464 if (strcmp(sys_cmd,"browsers")==0) 465 { 466 res->rtyp = STRING_CMD; 467 StringSetS(""); 468 feStringAppendBrowsers(0); 469 res->data = StringEndS(); 470 return FALSE; 471 } 472 else 473 /*==================== pid ==================================*/ 474 if (strcmp(sys_cmd,"pid")==0) 475 { 476 res->rtyp=INT_CMD; 477 res->data=(void *)(long) getpid(); 478 return FALSE; 479 } 480 else 481 /*==================== getenv ==================================*/ 482 if (strcmp(sys_cmd,"getenv")==0) 483 { 484 if ((h!=NULL) && (h->Typ()==STRING_CMD)) 485 { 486 res->rtyp=STRING_CMD; 487 const char *r=getenv((char *)h->Data()); 488 if (r==NULL) r=""; 489 res->data=(void *)omStrDup(r); 490 } 491 else 492 /*==================== setenv ==================================*/ 493 if (strcmp(sys_cmd,"setenv")==0) 494 { 495 #ifdef HAVE_SETENV 496 if (h!=NULL && h->Typ()==STRING_CMD && h->Data() != NULL && 497 h->next != NULL && h->next->Typ() == STRING_CMD 498 && h->next->Data() != NULL) 499 { 500 res->rtyp=STRING_CMD; 501 setenv((char *)h->Data(), (char *)h->next->Data(), 1); 502 res->data=(void *)omStrDup((char *)h->next->Data()); 503 feReInitResources(); 504 return FALSE; 505 } 506 else 507 { 508 WerrorS("two strings expected"); 509 return TRUE; 510 } 511 #else 512 WerrorS("setenv not supported on this platform"); 513 return TRUE; 514 #endif 515 } 516 else 517 /*==================== Singular ==================================*/ 518 if (strcmp(sys_cmd, "Singular") == 0) 519 { 520 res->rtyp=STRING_CMD; 521 const char *r=feResource("Singular"); 522 if (r == NULL) r=""; 523 res->data = (void*) omStrDup( r ); 524 return FALSE; 525 } 526 else 527 if (strcmp(sys_cmd, "SingularLib") == 0) 528 { 529 res->rtyp=STRING_CMD; 530 const char *r=feResource("SearchPath"); 531 if (r == NULL) r=""; 532 res->data = (void*) omStrDup( r ); 533 return FALSE; 534 } 535 else 536 /*==================== options ==================================*/ 537 if (strstr(sys_cmd, "--") == sys_cmd) 538 { 539 if (strcmp(sys_cmd, "--") == 0) 540 { 541 fePrintOptValues(); 542 return FALSE; 543 } 544 feOptIndex opt = feGetOptIndex(&sys_cmd[2]); 545 if (opt == FE_OPT_UNDEF) 546 { 547 Werror("Unknown option %s", sys_cmd); 548 WerrorS("Use 'system(\"--\");' for listing of available options"); 549 return TRUE; 550 } 551 // for Untyped Options (help version), 552 // setting it just triggers action 553 if (feOptSpec[opt].type == feOptUntyped) 554 { 555 feSetOptValue(opt,0); 556 return FALSE; 557 } 558 if (h == NULL) 559 { 560 if (feOptSpec[opt].type == feOptString) 561 { 562 res->rtyp = STRING_CMD; 563 const char *r=(const char*)feOptSpec[opt].value; 564 if (r == NULL) r=""; 565 res->data = omStrDup(r); 566 } 567 else 568 { 569 res->rtyp = INT_CMD; 570 res->data = feOptSpec[opt].value; 571 } 572 return FALSE; 573 } 574 if (h->Typ() != STRING_CMD && 575 h->Typ() != INT_CMD) 576 { 577 WerrorS("Need string or int argument to set option value"); 578 return TRUE; 579 } 580 const char* errormsg; 581 if (h->Typ() == INT_CMD) 582 { 583 if (feOptSpec[opt].type == feOptString) 584 { 585 Werror("Need string argument to set value of option %s", sys_cmd); 586 return TRUE; 587 } 588 errormsg = feSetOptValue(opt, (int)((long) h->Data())); 589 if (errormsg != NULL) 590 Werror("Option '--%s=%d' %s", sys_cmd, (int) ((long)h->Data()), errormsg); 591 } 592 else 593 { 594 errormsg = feSetOptValue(opt, (char*) h->Data()); 595 if (errormsg != NULL) 596 Werror("Option '--%s=%s' %s", sys_cmd, (char*) h->Data(), errormsg); 597 } 598 if (errormsg != NULL) return TRUE; 599 return FALSE; 600 } 601 else 602 /*==================== HC ==================================*/ 603 if (strcmp(sys_cmd,"HC")==0) 604 { 605 res->rtyp=INT_CMD; 606 res->data=(void *)(long) HCord; 607 return FALSE; 608 } 609 else 610 /*==================== random ==================================*/ 611 if(strcmp(sys_cmd,"random")==0) 612 { 613 if ((h!=NULL) &&(h->Typ()==INT_CMD)) 614 { 615 siRandomStart=(int)((long)h->Data()); 616 siSeed=siRandomStart; 617 factoryseed(siRandomStart); 618 return FALSE; 619 } 620 else if (h != NULL) 621 { 622 WerrorS("int expected"); 623 return TRUE; 624 } 625 res->rtyp=INT_CMD; 626 res->data=(void*)(long) siRandomStart; 627 return FALSE; 628 } 629 else 630 /*==================== complexNearZero ======================*/ 631 if(strcmp(sys_cmd,"complexNearZero")==0) 632 { 633 if (h->Typ()==NUMBER_CMD ) 634 { 635 if ( h->next!=NULL && h->next->Typ()==INT_CMD ) 636 { 637 if ( !rField_is_long_C(currRing) ) 638 { 639 WerrorS( "unsupported ground field!"); 640 return TRUE; 641 } 642 else 643 { 644 res->rtyp=INT_CMD; 645 res->data=(void*)complexNearZero((gmp_complex*)h->Data(), 646 (int)((long)(h->next->Data()))); 647 return FALSE; 648 } 649 } 650 else 651 { 652 WerrorS( "expected <int> as third parameter!"); 653 return TRUE; 654 } 655 } 656 else 657 { 658 WerrorS( "expected <number> as second parameter!"); 659 return TRUE; 660 } 661 } 662 else 663 /*==================== getPrecDigits ======================*/ 664 if(strcmp(sys_cmd,"getPrecDigits")==0) 665 { 666 if ( !rField_is_long_C(currRing) && !rField_is_long_R(currRing) ) 667 { 668 WerrorS( "unsupported ground field!"); 669 return TRUE; 670 } 671 res->rtyp=INT_CMD; 672 res->data=(void*)(long)gmp_output_digits; 673 //if (gmp_output_digits!=getGMPFloatDigits()) 674 //{ Print("%d, %d\n",getGMPFloatDigits(),gmp_output_digits);} 675 return FALSE; 676 } 677 else 678 /*==================== mpz_t loader ======================*/ 679 if(strcmp(sys_cmd, "GNUmpLoad")==0) 680 { 681 if ((h != NULL) && (h->Typ() == STRING_CMD)) 682 { 683 char* filename = (char*)h->Data(); 684 FILE* f = fopen(filename, "r"); 685 if (f == NULL) 686 { 687 WerrorS( "invalid file name (in paths use '/')"); 490 688 return FALSE; 491 689 } 492 else 493 { 494 WerrorS("string expected"); 495 return TRUE; 496 } 497 } 498 else 499 /*==================== setenv ==================================*/ 500 if (strcmp(sys_cmd,"setenv")==0) 501 { 502 #ifdef HAVE_SETENV 503 if (h!=NULL && h->Typ()==STRING_CMD && h->Data() != NULL && 504 h->next != NULL && h->next->Typ() == STRING_CMD 505 && h->next->Data() != NULL) 506 { 507 res->rtyp=STRING_CMD; 508 setenv((char *)h->Data(), (char *)h->next->Data(), 1); 509 res->data=(void *)omStrDup((char *)h->next->Data()); 510 feReInitResources(); 511 return FALSE; 512 } 513 else 514 { 515 WerrorS("two strings expected"); 516 return TRUE; 517 } 518 #else 519 WerrorS("setenv not supported on this platform"); 690 mpz_t m; mpz_init(m); 691 mpz_inp_str(m, f, 10); 692 fclose(f); 693 number n = n_InitMPZ(m, coeffs_BIGINT); 694 res->rtyp = BIGINT_CMD; 695 res->data = (void*)n; 696 return FALSE; 697 } 698 else 699 { 700 WerrorS( "expected valid file name as a string"); 520 701 return TRUE; 521 #endif 522 } 523 else 524 /*==================== Singular ==================================*/ 525 if (strcmp(sys_cmd, "Singular") == 0) 526 { 527 res->rtyp=STRING_CMD; 528 const char *r=feResource("Singular"); 529 if (r == NULL) r=""; 530 res->data = (void*) omStrDup( r ); 531 return FALSE; 532 } 533 else 534 if (strcmp(sys_cmd, "SingularLib") == 0) 535 { 536 res->rtyp=STRING_CMD; 537 const char *r=feResource("SearchPath"); 538 if (r == NULL) r=""; 539 res->data = (void*) omStrDup( r ); 540 return FALSE; 541 } 542 else 543 /*==================== options ==================================*/ 544 if (strstr(sys_cmd, "--") == sys_cmd) 545 { 546 if (strcmp(sys_cmd, "--") == 0) 547 { 548 fePrintOptValues(); 549 return FALSE; 550 } 551 552 feOptIndex opt = feGetOptIndex(&sys_cmd[2]); 553 if (opt == FE_OPT_UNDEF) 554 { 555 Werror("Unknown option %s", sys_cmd); 556 Werror("Use 'system(\"--\");' for listing of available options"); 557 return TRUE; 558 } 559 560 // for Untyped Options (help version), 561 // setting it just triggers action 562 if (feOptSpec[opt].type == feOptUntyped) 563 { 564 feSetOptValue(opt,0); 565 return FALSE; 566 } 567 568 if (h == NULL) 569 { 570 if (feOptSpec[opt].type == feOptString) 571 { 572 res->rtyp = STRING_CMD; 573 const char *r=(const char*)feOptSpec[opt].value; 574 if (r == NULL) r=""; 575 res->data = omStrDup(r); 576 } 577 else 578 { 579 res->rtyp = INT_CMD; 580 res->data = feOptSpec[opt].value; 581 } 582 return FALSE; 583 } 584 585 if (h->Typ() != STRING_CMD && 586 h->Typ() != INT_CMD) 587 { 588 Werror("Need string or int argument to set option value"); 589 return TRUE; 590 } 591 const char* errormsg; 592 if (h->Typ() == INT_CMD) 593 { 594 if (feOptSpec[opt].type == feOptString) 595 { 596 Werror("Need string argument to set value of option %s", sys_cmd); 597 return TRUE; 598 } 599 errormsg = feSetOptValue(opt, (int)((long) h->Data())); 600 if (errormsg != NULL) 601 Werror("Option '--%s=%d' %s", sys_cmd, (int) ((long)h->Data()), errormsg); 602 } 603 else 604 { 605 errormsg = feSetOptValue(opt, (char*) h->Data()); 606 if (errormsg != NULL) 607 Werror("Option '--%s=%s' %s", sys_cmd, (char*) h->Data(), errormsg); 608 } 609 if (errormsg != NULL) return TRUE; 610 return FALSE; 611 } 612 else 613 /*==================== HC ==================================*/ 614 if (strcmp(sys_cmd,"HC")==0) 615 { 616 res->rtyp=INT_CMD; 617 res->data=(void *)(long) HCord; 618 return FALSE; 619 } 620 else 621 /*==================== random ==================================*/ 622 if(strcmp(sys_cmd,"random")==0) 623 { 624 if ((h!=NULL) &&(h->Typ()==INT_CMD)) 625 { 626 siRandomStart=(int)((long)h->Data()); 627 siSeed=siRandomStart; 628 factoryseed(siRandomStart); 629 return FALSE; 630 } 631 else if (h != NULL) 632 { 633 WerrorS("int expected"); 634 return TRUE; 635 } 636 res->rtyp=INT_CMD; 637 res->data=(void*)(long) siRandomStart; 638 return FALSE; 639 } 640 /*==================== complexNearZero ======================*/ 641 if(strcmp(sys_cmd,"complexNearZero")==0) 642 { 643 if (h->Typ()==NUMBER_CMD ) 644 { 645 if ( h->next!=NULL && h->next->Typ()==INT_CMD ) 646 { 647 if ( !rField_is_long_C(currRing) ) 648 { 649 Werror( "unsupported ground field!"); 650 return TRUE; 651 } 652 else 653 { 654 res->rtyp=INT_CMD; 655 res->data=(void*)complexNearZero((gmp_complex*)h->Data(), 656 (int)((long)(h->next->Data()))); 657 return FALSE; 658 } 659 } 660 else 661 { 662 Werror( "expected <int> as third parameter!"); 663 return TRUE; 664 } 665 } 666 else 667 { 668 Werror( "expected <number> as second parameter!"); 669 return TRUE; 670 } 671 } 672 /*==================== getPrecDigits ======================*/ 673 if(strcmp(sys_cmd,"getPrecDigits")==0) 674 { 675 if ( !rField_is_long_C(currRing) && !rField_is_long_R(currRing) ) 676 { 677 Werror( "unsupported ground field!"); 678 return TRUE; 679 } 680 res->rtyp=INT_CMD; 681 res->data=(void*)(long)gmp_output_digits; 682 //if (gmp_output_digits!=getGMPFloatDigits()) 683 //{ Print("%d, %d\n",getGMPFloatDigits(),gmp_output_digits);} 684 return FALSE; 685 } 686 /*==================== mpz_t loader ======================*/ 687 if(strcmp(sys_cmd, "GNUmpLoad")==0) 688 { 689 if ((h != NULL) && (h->Typ() == STRING_CMD)) 690 { 691 char* filename = (char*)h->Data(); 692 FILE* f = fopen(filename, "r"); 693 if (f == NULL) 694 { 695 Werror( "invalid file name (in paths use '/')"); 696 return FALSE; 697 } 698 mpz_t m; mpz_init(m); 699 mpz_inp_str(m, f, 10); 700 fclose(f); 701 number n = n_InitMPZ(m, coeffs_BIGINT); 702 res->rtyp = BIGINT_CMD; 703 res->data = (void*)n; 704 return FALSE; 705 } 706 else 707 { 708 Werror( "expected valid file name as a string"); 709 return TRUE; 710 } 711 } 702 } 703 } 704 else 712 705 /*==================== intvec matching ======================*/ 713 706 /* Given two non-empty intvecs, the call 714 707 'system("intvecMatchingSegments", ivec, jvec);' 715 708 computes all occurences of jvec in ivec, i.e., it returns … … 717 710 If no such k exists (e.g. when ivec is shorter than jvec), an 718 711 intvec with the single entry 0 is being returned. */ 719 720 721 722 723 724 725 726 727 728 729 730 731 712 if(strcmp(sys_cmd, "intvecMatchingSegments")==0) 713 { 714 if ((h != NULL) && (h->Typ() == INTVEC_CMD) && 715 (h->next != NULL) && (h->next->Typ() == INTVEC_CMD) && 716 (h->next->next == NULL)) 717 { 718 intvec* ivec = (intvec*)h->Data(); 719 intvec* jvec = (intvec*)h->next->Data(); 720 intvec* r = new intvec(1); (*r)[0] = 0; 721 int validEntries = 0; 722 for (int k = 0; k <= ivec->rows() - jvec->rows(); k++) 723 { 724 if (memcmp(&(*ivec)[k], &(*jvec)[0], 732 725 sizeof(int) * jvec->rows()) == 0) 726 { 727 if (validEntries == 0) 728 (*r)[0] = k + 1; 729 else 733 730 { 734 if (validEntries == 0) 735 (*r)[0] = k + 1; 736 else 737 { 738 r->resize(validEntries + 1); 739 (*r)[validEntries] = k + 1; 740 } 741 validEntries++; 731 r->resize(validEntries + 1); 732 (*r)[validEntries] = k + 1; 742 733 } 743 } 744 res->rtyp = INTVEC_CMD; 745 res->data = (void*)r; 746 return FALSE; 747 } 748 else 749 { 750 Werror("expected two non-empty intvecs as arguments"); 751 return TRUE; 752 } 753 } 754 /* Given two non-empty intvecs, the call 734 validEntries++; 735 } 736 } 737 res->rtyp = INTVEC_CMD; 738 res->data = (void*)r; 739 return FALSE; 740 } 741 else 742 { 743 WerrorS("expected two non-empty intvecs as arguments"); 744 return TRUE; 745 } 746 } 747 else 748 /* ================== intvecOverlap ======================= */ 749 /* Given two non-empty intvecs, the call 755 750 'system("intvecOverlap", ivec, jvec);' 756 751 computes the longest intvec kvec such that ivec ends with kvec 757 752 and jvec starts with kvec. The length of this overlap is being 758 753 returned. If there is no overlap at all, then 0 is being returned. */ 759 760 761 754 if(strcmp(sys_cmd, "intvecOverlap")==0) 755 { 756 if ((h != NULL) && (h->Typ() == INTVEC_CMD) && 762 757 (h->next != NULL) && (h->next->Typ() == INTVEC_CMD) && 763 758 (h->next->next == NULL)) 764 765 766 767 768 769 759 { 760 intvec* ivec = (intvec*)h->Data(); 761 intvec* jvec = (intvec*)h->next->Data(); 762 int ir = ivec->rows(); int jr = jvec->rows(); 763 int r = jr; if (ir < jr) r = ir; /* r = min{ir, jr} */ 764 while ((r >= 1) && (memcmp(&(*ivec)[ir - r], &(*jvec)[0], 770 765 sizeof(int) * r) != 0)) 771 r--; 772 res->rtyp = INT_CMD; 773 res->data = (void*)(long)r; 774 return FALSE; 775 } 776 else 777 { 778 Werror("expected two non-empty intvecs as arguments"); 779 return TRUE; 780 } 781 } 766 r--; 767 res->rtyp = INT_CMD; 768 res->data = (void*)(long)r; 769 return FALSE; 770 } 771 else 772 { 773 WerrorS("expected two non-empty intvecs as arguments"); 774 return TRUE; 775 } 776 } 777 else 782 778 /*==================== Hensel's lemma ======================*/ 783 if(strcmp(sys_cmd, "henselfactors")==0) 784 { 785 if ((h != NULL) && (h->Typ() == INT_CMD) && 786 (h->next != NULL) && (h->next->Typ() == INT_CMD) && 787 (h->next->next != NULL) && (h->next->next->Typ() == POLY_CMD) && 788 (h->next->next->next != NULL) && 789 (h->next->next->next->Typ() == POLY_CMD) && 790 (h->next->next->next->next != NULL) && 791 (h->next->next->next->next->Typ() == POLY_CMD) && 792 (h->next->next->next->next->next != NULL) && 793 (h->next->next->next->next->next->Typ() == INT_CMD) && 794 (h->next->next->next->next->next->next == NULL)) 795 { 796 int xIndex = (int)(long)h->Data(); 797 int yIndex = (int)(long)h->next->Data(); 798 poly hh = (poly)h->next->next->Data(); 799 poly f0 = (poly)h->next->next->next->Data(); 800 poly g0 = (poly)h->next->next->next->next->Data(); 801 int d = (int)(long)h->next->next->next->next->next->Data(); 802 poly f; poly g; 803 henselFactors(xIndex, yIndex, hh, f0, g0, d, f, g); 804 lists L = (lists)omAllocBin(slists_bin); 805 L->Init(2); 806 L->m[0].rtyp = POLY_CMD; L->m[0].data=(void*)f; 807 L->m[1].rtyp = POLY_CMD; L->m[1].data=(void*)g; 808 res->rtyp = LIST_CMD; 809 res->data = (char *)L; 810 return FALSE; 811 } 812 else 813 { 814 Werror( "expected argument list (int, int, poly, poly, poly, int)"); 815 return TRUE; 816 } 817 } 779 if(strcmp(sys_cmd, "henselfactors")==0) 780 { 781 if ((h != NULL) && (h->Typ() == INT_CMD) && 782 (h->next != NULL) && (h->next->Typ() == INT_CMD) && 783 (h->next->next != NULL) && (h->next->next->Typ() == POLY_CMD) && 784 (h->next->next->next != NULL) && 785 (h->next->next->next->Typ() == POLY_CMD) && 786 (h->next->next->next->next != NULL) && 787 (h->next->next->next->next->Typ() == POLY_CMD) && 788 (h->next->next->next->next->next != NULL) && 789 (h->next->next->next->next->next->Typ() == INT_CMD) && 790 (h->next->next->next->next->next->next == NULL)) 791 { 792 int xIndex = (int)(long)h->Data(); 793 int yIndex = (int)(long)h->next->Data(); 794 poly hh = (poly)h->next->next->Data(); 795 poly f0 = (poly)h->next->next->next->Data(); 796 poly g0 = (poly)h->next->next->next->next->Data(); 797 int d = (int)(long)h->next->next->next->next->next->Data(); 798 poly f; poly g; 799 henselFactors(xIndex, yIndex, hh, f0, g0, d, f, g); 800 lists L = (lists)omAllocBin(slists_bin); 801 L->Init(2); 802 L->m[0].rtyp = POLY_CMD; L->m[0].data=(void*)f; 803 L->m[1].rtyp = POLY_CMD; L->m[1].data=(void*)g; 804 res->rtyp = LIST_CMD; 805 res->data = (char *)L; 806 return FALSE; 807 } 808 else 809 { 810 WerrorS( "expected argument list (int, int, poly, poly, poly, int)"); 811 return TRUE; 812 } 813 } 814 else 818 815 /*==================== lduDecomp ======================*/ 819 if(strcmp(sys_cmd, "lduDecomp")==0) 820 { 821 if ((h != NULL) && (h->Typ() == MATRIX_CMD) && (h->next == NULL)) 822 { 823 matrix aMat = (matrix)h->Data(); 824 matrix pMat; matrix lMat; matrix dMat; matrix uMat; 825 poly l; poly u; poly prodLU; 826 lduDecomp(aMat, pMat, lMat, dMat, uMat, l, u, prodLU); 827 lists L = (lists)omAllocBin(slists_bin); 828 L->Init(7); 829 L->m[0].rtyp = MATRIX_CMD; L->m[0].data=(void*)pMat; 830 L->m[1].rtyp = MATRIX_CMD; L->m[1].data=(void*)lMat; 831 L->m[2].rtyp = MATRIX_CMD; L->m[2].data=(void*)dMat; 832 L->m[3].rtyp = MATRIX_CMD; L->m[3].data=(void*)uMat; 833 L->m[4].rtyp = POLY_CMD; L->m[4].data=(void*)l; 834 L->m[5].rtyp = POLY_CMD; L->m[5].data=(void*)u; 835 L->m[6].rtyp = POLY_CMD; L->m[6].data=(void*)prodLU; 836 res->rtyp = LIST_CMD; 837 res->data = (char *)L; 838 return FALSE; 839 } 840 else 841 { 842 Werror( "expected argument list (int, int, poly, poly, poly, int)"); 843 return TRUE; 844 } 845 } 816 if(strcmp(sys_cmd, "lduDecomp")==0) 817 { 818 if ((h != NULL) && (h->Typ() == MATRIX_CMD) && (h->next == NULL)) 819 { 820 matrix aMat = (matrix)h->Data(); 821 matrix pMat; matrix lMat; matrix dMat; matrix uMat; 822 poly l; poly u; poly prodLU; 823 lduDecomp(aMat, pMat, lMat, dMat, uMat, l, u, prodLU); 824 lists L = (lists)omAllocBin(slists_bin); 825 L->Init(7); 826 L->m[0].rtyp = MATRIX_CMD; L->m[0].data=(void*)pMat; 827 L->m[1].rtyp = MATRIX_CMD; L->m[1].data=(void*)lMat; 828 L->m[2].rtyp = MATRIX_CMD; L->m[2].data=(void*)dMat; 829 L->m[3].rtyp = MATRIX_CMD; L->m[3].data=(void*)uMat; 830 L->m[4].rtyp = POLY_CMD; L->m[4].data=(void*)l; 831 L->m[5].rtyp = POLY_CMD; L->m[5].data=(void*)u; 832 L->m[6].rtyp = POLY_CMD; L->m[6].data=(void*)prodLU; 833 res->rtyp = LIST_CMD; 834 res->data = (char *)L; 835 return FALSE; 836 } 837 else 838 { 839 WerrorS( "expected argument list (int, int, poly, poly, poly, int)"); 840 return TRUE; 841 } 842 } 843 else 846 844 /*==================== lduSolve ======================*/ 847 848 849 845 if(strcmp(sys_cmd, "lduSolve")==0) 846 { 847 /* for solving a linear equation system A * x = b, via the 850 848 given LDU-decomposition of the matrix A; 851 849 There is one valid parametrisation: … … 865 863 The method produces an error if matrix and vector sizes do not 866 864 fit. */ 867 if ((h == NULL) || (h->Typ() != MATRIX_CMD) || 868 (h->next == NULL) || (h->next->Typ() != MATRIX_CMD) || 869 (h->next->next == NULL) || (h->next->next->Typ() != MATRIX_CMD) || 870 (h->next->next->next == NULL) || 871 (h->next->next->next->Typ() != MATRIX_CMD) || 872 (h->next->next->next->next == NULL) || 873 (h->next->next->next->next->Typ() != POLY_CMD) || 874 (h->next->next->next->next->next == NULL) || 875 (h->next->next->next->next->next->Typ() != POLY_CMD) || 876 (h->next->next->next->next->next->next == NULL) || 877 (h->next->next->next->next->next->next->Typ() != POLY_CMD) || 878 (h->next->next->next->next->next->next->next == NULL) || 879 (h->next->next->next->next->next->next->next->Typ() 880 != MATRIX_CMD) || 881 (h->next->next->next->next->next->next->next->next != NULL)) 882 { 883 Werror("expected input (matrix, matrix, matrix, matrix, %s", 865 if ((h == NULL) || (h->Typ() != MATRIX_CMD) || 866 (h->next == NULL) || (h->next->Typ() != MATRIX_CMD) || 867 (h->next->next == NULL) || (h->next->next->Typ() != MATRIX_CMD) || 868 (h->next->next->next == NULL) || 869 (h->next->next->next->Typ() != MATRIX_CMD) || 870 (h->next->next->next->next == NULL) || 871 (h->next->next->next->next->Typ() != POLY_CMD) || 872 (h->next->next->next->next->next == NULL) || 873 (h->next->next->next->next->next->Typ() != POLY_CMD) || 874 (h->next->next->next->next->next->next == NULL) || 875 (h->next->next->next->next->next->next->Typ() != POLY_CMD) || 876 (h->next->next->next->next->next->next->next == NULL) || 877 (h->next->next->next->next->next->next->next->Typ() != MATRIX_CMD) || 878 (h->next->next->next->next->next->next->next->next != NULL)) 879 { 880 WerrorS("expected input (matrix, matrix, matrix, matrix, " 884 881 "poly, poly, poly, matrix)"); 885 return TRUE; 886 } 887 matrix pMat = (matrix)h->Data(); 888 matrix lMat = (matrix)h->next->Data(); 889 matrix dMat = (matrix)h->next->next->Data(); 890 matrix uMat = (matrix)h->next->next->next->Data(); 891 poly l = (poly) h->next->next->next->next->Data(); 892 poly u = (poly) h->next->next->next->next->next->Data(); 893 poly lTimesU = (poly) h->next->next->next->next->next->next 894 ->Data(); 895 matrix bVec = (matrix)h->next->next->next->next->next->next 896 ->next->Data(); 897 matrix xVec; int solvable; matrix homogSolSpace; 898 if (pMat->rows() != pMat->cols()) 899 { 900 Werror("first matrix (%d x %d) is not quadratic", 882 return TRUE; 883 } 884 matrix pMat = (matrix)h->Data(); 885 matrix lMat = (matrix)h->next->Data(); 886 matrix dMat = (matrix)h->next->next->Data(); 887 matrix uMat = (matrix)h->next->next->next->Data(); 888 poly l = (poly) h->next->next->next->next->Data(); 889 poly u = (poly) h->next->next->next->next->next->Data(); 890 poly lTimesU = (poly) h->next->next->next->next->next->next->Data(); 891 matrix bVec = (matrix)h->next->next->next->next->next->next->next->Data(); 892 matrix xVec; int solvable; matrix homogSolSpace; 893 if (pMat->rows() != pMat->cols()) 894 { 895 Werror("first matrix (%d x %d) is not quadratic", 901 896 pMat->rows(), pMat->cols()); 902 903 904 905 906 897 return TRUE; 898 } 899 if (lMat->rows() != lMat->cols()) 900 { 901 Werror("second matrix (%d x %d) is not quadratic", 907 902 lMat->rows(), lMat->cols()); 908 909 910 911 912 903 return TRUE; 904 } 905 if (dMat->rows() != dMat->cols()) 906 { 907 Werror("third matrix (%d x %d) is not quadratic", 913 908 dMat->rows(), dMat->cols()); 914 915 916 917 918 909 return TRUE; 910 } 911 if (dMat->cols() != uMat->rows()) 912 { 913 Werror("third matrix (%d x %d) and fourth matrix (%d x %d) %s", 919 914 dMat->rows(), dMat->cols(), uMat->rows(), uMat->cols(), 920 915 "do not t"); 921 922 923 924 925 916 return TRUE; 917 } 918 if (uMat->rows() != bVec->rows()) 919 { 920 Werror("fourth matrix (%d x %d) and vector (%d x 1) do not fit", 926 921 uMat->rows(), uMat->cols(), bVec->rows()); 927 928 929 922 return TRUE; 923 } 924 solvable = luSolveViaLDUDecomp(pMat, lMat, dMat, uMat, l, u, lTimesU, 930 925 bVec, xVec, homogSolSpace); 931 926 932 927 /* build the return structure; a list with either one or 933 928 three entries */ 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 929 lists ll = (lists)omAllocBin(slists_bin); 930 if (solvable) 931 { 932 ll->Init(3); 933 ll->m[0].rtyp=INT_CMD; ll->m[0].data=(void *)(long)solvable; 934 ll->m[1].rtyp=MATRIX_CMD; ll->m[1].data=(void *)xVec; 935 ll->m[2].rtyp=MATRIX_CMD; ll->m[2].data=(void *)homogSolSpace; 936 } 937 else 938 { 939 ll->Init(1); 940 ll->m[0].rtyp=INT_CMD; ll->m[0].data=(void *)(long)solvable; 941 } 942 res->rtyp = LIST_CMD; 943 res->data=(char*)ll; 944 return FALSE; 945 } 946 else 952 947 /*==================== neworder =============================*/ 953 948 // should go below 954 if(strcmp(sys_cmd,"neworder")==0) 955 { 956 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD)) 957 { 958 res->rtyp=STRING_CMD; 959 res->data=(void *)singclap_neworder((ideal)h->Data(), currRing); 949 if(strcmp(sys_cmd,"neworder")==0) 950 { 951 if ((h!=NULL) &&(h->Typ()==IDEAL_CMD)) 952 { 953 res->rtyp=STRING_CMD; 954 res->data=(void *)singclap_neworder((ideal)h->Data(), currRing); 955 return FALSE; 956 } 957 else 958 WerrorS("ideal expected"); 959 } 960 else 961 /*==== countedref: reference and shared ====*/ 962 if (strcmp(sys_cmd, "shared") == 0) 963 { 964 #ifndef SI_COUNTEDREF_AUTOLOAD 965 void countedref_shared_load(); 966 countedref_shared_load(); 967 #endif 968 res->rtyp = NONE; 969 return FALSE; 970 } 971 else if (strcmp(sys_cmd, "reference") == 0) 972 { 973 #ifndef SI_COUNTEDREF_AUTOLOAD 974 void countedref_reference_load(); 975 countedref_reference_load(); 976 #endif 977 res->rtyp = NONE; 978 return FALSE; 979 } 980 else 981 /*==================== semaphore =================*/ 982 #ifdef HAVE_SIMPLEIPC 983 if (strcmp(sys_cmd,"semaphore")==0) 984 { 985 if((h!=NULL) && (h->Typ()==STRING_CMD) && (h->next!=NULL) && (h->next->Typ()==INT_CMD)) 986 { 987 int v=1; 988 if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD)) 989 v=(int)(long)h->next->next->Data(); 990 res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v); 991 res->rtyp=INT_CMD; 992 return FALSE; 993 } 994 else 995 { 996 WerrorS("Usage: system(\"semaphore\",<cmd>,int)"); 997 return TRUE; 998 } 999 } 1000 else 1001 #endif 1002 /*==================== reserved port =================*/ 1003 if (strcmp(sys_cmd,"reserve")==0) 1004 { 1005 int ssiReservePort(int clients); 1006 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1007 { 1008 res->rtyp=INT_CMD; 1009 int p=ssiReservePort((int)(long)h->Data()); 1010 res->data=(void*)(long)p; 1011 return (p==0); 1012 } 1013 else 1014 { 1015 WerrorS("system(\"reserve\",<int>)"); 1016 } 1017 return TRUE; 1018 } 1019 else 1020 /*==================== reserved link =================*/ 1021 if (strcmp(sys_cmd,"reservedLink")==0) 1022 { 1023 extern si_link ssiCommandLink(); 1024 res->rtyp=LINK_CMD; 1025 si_link p=ssiCommandLink(); 1026 res->data=(void*)p; 1027 return (p==NULL); 1028 } 1029 else 1030 /*==================== install newstruct =================*/ 1031 if (strcmp(sys_cmd,"install")==0) 1032 { 1033 if ((h!=NULL) && (h->Typ()==STRING_CMD) 1034 && (h->next!=NULL) && (h->next->Typ()==STRING_CMD) 1035 && (h->next->next!=NULL) && (h->next->next->Typ()==PROC_CMD) 1036 && (h->next->next->next!=NULL) && (h->next->next->next->Typ()==INT_CMD)) 1037 { 1038 return newstruct_set_proc((char*)h->Data(),(char*)h->next->Data(), 1039 (int)(long)h->next->next->next->Data(), 1040 (procinfov)h->next->next->Data()); 1041 } 1042 return TRUE; 1043 } 1044 else 1045 /*==================== newstruct =================*/ 1046 if (strcmp(sys_cmd,"newstruct")==0) 1047 { 1048 if ((h!=NULL) && (h->Typ()==STRING_CMD)) 1049 { 1050 int id=0; 1051 blackboxIsCmd((char*)h->Data(),id); 1052 if (id>0) 1053 { 1054 blackbox *bb=getBlackboxStuff(id); 1055 if (BB_LIKE_LIST(bb)) 1056 { 1057 newstruct_desc desc=(newstruct_desc)bb->data; 1058 newstructShow(desc); 1059 return FALSE; 1060 } 1061 } 1062 } 1063 return TRUE; 1064 } 1065 else 1066 /*==================== blackbox =================*/ 1067 if (strcmp(sys_cmd,"blackbox")==0) 1068 { 1069 printBlackboxTypes(); 1070 return FALSE; 1071 } 1072 else 1073 /*================= absBiFact ======================*/ 1074 if (strcmp(sys_cmd, "absFact") == 0) 1075 { 1076 if (h!=NULL) 1077 { 1078 res->rtyp=LIST_CMD; 1079 if (h->Typ()==POLY_CMD) 1080 { 1081 intvec *v=NULL; 1082 ideal mipos= NULL; 1083 int n= 0; 1084 ideal f=singclap_absFactorize((poly)(h->Data()), mipos, &v, n, currRing); 1085 if (f==NULL) return TRUE; 1086 ivTest(v); 1087 lists l=(lists)omAllocBin(slists_bin); 1088 l->Init(4); 1089 l->m[0].rtyp=IDEAL_CMD; 1090 l->m[0].data=(void *)f; 1091 l->m[1].rtyp=INTVEC_CMD; 1092 l->m[1].data=(void *)v; 1093 l->m[2].rtyp=IDEAL_CMD; 1094 l->m[2].data=(void*) mipos; 1095 l->m[3].rtyp=INT_CMD; 1096 l->m[3].data=(void*) (long) n; 1097 res->data=(void *)l; 960 1098 return FALSE; 961 1099 } 962 else 963 WerrorS("ideal expected"); 964 } 965 else 1100 else return TRUE; 1101 } 1102 else return TRUE; 1103 } 1104 else 1105 /* =================== LLL via NTL ==============================*/ 1106 #ifdef HAVE_NTL 1107 if (strcmp(sys_cmd, "LLL") == 0) 1108 { 1109 if (h!=NULL) 1110 { 1111 res->rtyp=h->Typ(); 1112 if (h->Typ()==MATRIX_CMD) 1113 { 1114 res->data=(char *)singntl_LLL((matrix)h->Data(), currRing); 1115 return FALSE; 1116 } 1117 else if (h->Typ()==INTMAT_CMD) 1118 { 1119 res->data=(char *)singntl_LLL((intvec*)h->Data(), currRing); 1120 return FALSE; 1121 } 1122 else return TRUE; 1123 } 1124 else return TRUE; 1125 } 1126 else 1127 #endif 1128 /*==================== shift-test for freeGB =================*/ 1129 #ifdef HAVE_SHIFTBBA 1130 if (strcmp(sys_cmd, "stest") == 0) 1131 { 1132 poly p; 1133 int sh,uptodeg, lVblock; 1134 if ((h!=NULL) && (h->Typ()==POLY_CMD)) 1135 { 1136 p=(poly)h->CopyD(); 1137 h=h->next; 1138 } 1139 else return TRUE; 1140 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1141 { 1142 sh=(int)((long)(h->Data())); 1143 h=h->next; 1144 } 1145 else return TRUE; 1146 1147 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1148 { 1149 uptodeg=(int)((long)(h->Data())); 1150 h=h->next; 1151 } 1152 else return TRUE; 1153 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1154 { 1155 lVblock=(int)((long)(h->Data())); 1156 res->data = pLPshift(p,sh,uptodeg,lVblock); 1157 res->rtyp = POLY_CMD; 1158 } 1159 else return TRUE; 1160 return FALSE; 1161 } 1162 else 1163 #endif 1164 /*==================== block-test for freeGB =================*/ 1165 #ifdef HAVE_SHIFTBBA 1166 if (strcmp(sys_cmd, "btest") == 0) 1167 { 1168 poly p; 1169 int lV; 1170 if ((h!=NULL) && (h->Typ()==POLY_CMD)) 1171 { 1172 p=(poly)h->CopyD(); 1173 h=h->next; 1174 } 1175 else return TRUE; 1176 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1177 { 1178 lV=(int)((long)(h->Data())); 1179 res->rtyp = INT_CMD; 1180 res->data = (void*)(long)pLastVblock(p, lV); 1181 } 1182 else return TRUE; 1183 return FALSE; 1184 } 1185 else 1186 #endif 1187 /*==================== shrink-test for freeGB =================*/ 1188 #ifdef HAVE_SHIFTBBA 1189 if (strcmp(sys_cmd, "shrinktest") == 0) 1190 { 1191 poly p; 1192 int lV; 1193 if ((h!=NULL) && (h->Typ()==POLY_CMD)) 1194 { 1195 p=(poly)h->CopyD(); 1196 h=h->next; 1197 } 1198 else return TRUE; 1199 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1200 { 1201 lV=(int)((long)(h->Data())); 1202 res->rtyp = POLY_CMD; 1203 // res->data = p_mShrink(p, lV, currRing); 1204 // kStrategy strat=new skStrategy; 1205 // strat->tailRing = currRing; 1206 res->data = p_Shrink(p, lV, currRing); 1207 } 1208 else return TRUE; 1209 return FALSE; 1210 } 1211 else 1212 #endif 966 1213 //#ifndef HAVE_DYNAMIC_LOADING 967 1214 /*==================== pcv ==================================*/ 968 1215 #ifdef HAVE_PCV 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1216 if(strcmp(sys_cmd,"pcvLAddL")==0) 1217 { 1218 return pcvLAddL(res,h); 1219 } 1220 else 1221 if(strcmp(sys_cmd,"pcvPMulL")==0) 1222 { 1223 return pcvPMulL(res,h); 1224 } 1225 else 1226 if(strcmp(sys_cmd,"pcvMinDeg")==0) 1227 { 1228 return pcvMinDeg(res,h); 1229 } 1230 else 1231 if(strcmp(sys_cmd,"pcvP2CV")==0) 1232 { 1233 return pcvP2CV(res,h); 1234 } 1235 else 1236 if(strcmp(sys_cmd,"pcvCV2P")==0) 1237 { 1238 return pcvCV2P(res,h); 1239 } 1240 else 1241 if(strcmp(sys_cmd,"pcvDim")==0) 1242 { 1243 return pcvDim(res,h); 1244 } 1245 else 1246 if(strcmp(sys_cmd,"pcvBasis")==0) 1247 { 1248 return pcvBasis(res,h); 1249 } 1250 else 1004 1251 #endif 1005 1252 /*==================== eigenvalues ==================================*/ 1006 1253 #ifdef HAVE_EIGENVAL 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1254 if(strcmp(sys_cmd,"hessenberg")==0) 1255 { 1256 return evHessenberg(res,h); 1257 } 1258 else 1259 if(strcmp(sys_cmd,"eigenvals")==0) 1260 { 1261 return evEigenvals(res,h); 1262 } 1263 else 1017 1264 #endif 1018 1265 /*==================== Gauss-Manin system ==================================*/ 1019 1266 #ifdef HAVE_GMS 1020 1021 1022 1023 1024 1267 if(strcmp(sys_cmd,"gmsnf")==0) 1268 { 1269 return gmsNF(res,h); 1270 } 1271 else 1025 1272 #endif 1026 1273 //#endif /* HAVE_DYNAMIC_LOADING */ 1027 1274 /*==================== contributors =============================*/ 1028 1029 1030 1031 1275 if(strcmp(sys_cmd,"contributors") == 0) 1276 { 1277 res->rtyp=STRING_CMD; 1278 res->data=(void *)omStrDup( 1032 1279 "Olaf Bachmann, Michael Brickenstein, Hubert Grassmann, Kai Krueger, Victor Levandovskyy, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Mathias Schulze, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann"); 1033 1034 1035 1280 return FALSE; 1281 } 1282 else 1036 1283 /*==================== spectrum =============================*/ 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1284 #ifdef HAVE_SPECTRUM 1285 if(strcmp(sys_cmd,"spectrum") == 0) 1286 { 1287 if (h->Typ()!=POLY_CMD) 1288 { 1289 WerrorS("poly expected"); 1290 return TRUE; 1291 } 1292 if (h->next==NULL) 1293 return spectrumProc(res,h); 1294 if (h->next->Typ()!=INT_CMD) 1295 { 1296 WerrorS("poly,int expected"); 1297 return TRUE; 1298 } 1299 if(((long)h->next->Data())==1L) 1053 1300 return spectrumfProc(res,h); 1054 1055 1056 1301 return spectrumProc(res,h); 1302 } 1303 else 1057 1304 /*==================== semic =============================*/ 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1305 if(strcmp(sys_cmd,"semic") == 0) 1306 { 1307 if ((h->next!=NULL) 1308 && (h->Typ()==LIST_CMD) 1309 && (h->next->Typ()==LIST_CMD)) 1310 { 1311 if (h->next->next==NULL) 1312 return semicProc(res,h,h->next); 1313 else if (h->next->next->Typ()==INT_CMD) 1314 return semicProc3(res,h,h->next,h->next->next); 1315 } 1316 return TRUE; 1317 } 1318 else 1072 1319 /*==================== spadd =============================*/ 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1320 if(strcmp(sys_cmd,"spadd") == 0) 1321 { 1322 if ((h->next!=NULL) 1323 && (h->Typ()==LIST_CMD) 1324 && (h->next->Typ()==LIST_CMD)) 1325 { 1326 if (h->next->next==NULL) 1327 return spaddProc(res,h,h->next); 1328 } 1329 return TRUE; 1330 } 1331 else 1085 1332 /*==================== spmul =============================*/ 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 #endif 1099 1333 if(strcmp(sys_cmd,"spmul") == 0) 1334 { 1335 if ((h->next!=NULL) 1336 && (h->Typ()==LIST_CMD) 1337 && (h->next->Typ()==INT_CMD)) 1338 { 1339 if (h->next->next==NULL) 1340 return spmulProc(res,h,h->next); 1341 } 1342 return TRUE; 1343 } 1344 else 1345 #endif 1346 /*==================== tensorModuleMult ========================= */ 1100 1347 #define HAVE_SHEAFCOH_TRICKS 1 1101 1348 1102 1349 #ifdef HAVE_SHEAFCOH_TRICKS 1103 1104 1350 if(strcmp(sys_cmd,"tensorModuleMult")==0) 1351 { 1105 1352 // WarnS("tensorModuleMult!"); 1106 1353 if (h!=NULL && h->Typ()==INT_CMD && h->Data() != NULL && 1107 1354 h->next != NULL && h->next->Typ() == MODUL_CMD 1108 1355 && h->next->Data() != NULL) 1109 { 1110 int m = (int)( (long)h->Data() ); 1111 ideal M = (ideal)h->next->Data(); 1112 1113 res->rtyp=MODUL_CMD; 1114 res->data=(void *)id_TensorModuleMult(m, M, currRing); 1115 return FALSE; 1116 } 1117 WerrorS("system(\"tensorModuleMult\", int, module) expected"); 1118 return TRUE; 1119 } else 1120 #endif 1121 1356 { 1357 int m = (int)( (long)h->Data() ); 1358 ideal M = (ideal)h->next->Data(); 1359 res->rtyp=MODUL_CMD; 1360 res->data=(void *)id_TensorModuleMult(m, M, currRing); 1361 return FALSE; 1362 } 1363 WerrorS("system(\"tensorModuleMult\", int, module) expected"); 1364 return TRUE; 1365 } 1366 else 1367 #endif 1122 1368 //////////////////////////////////////////////////////////////////////// 1123 1369 /// Additional interface functions to non-commutative subsystem (PLURAL) … … 1125 1371 1126 1372 1373 /*==================== Approx_Step =================*/ 1127 1374 #ifdef HAVE_PLURAL 1128 /*==================== Approx_Step =================*/ 1129 if (strcmp(sys_cmd, "astep") == 0) 1130 { 1375 if (strcmp(sys_cmd, "astep") == 0) 1376 { 1131 1377 ideal I; 1132 1378 if ((h!=NULL) && (h->Typ()==IDEAL_CMD)) … … 1140 1386 else return TRUE; 1141 1387 return FALSE; 1142 } 1388 } 1389 else 1390 #endif 1143 1391 /*==================== PrintMat =================*/ 1144 if (strcmp(sys_cmd, "PrintMat") == 0) 1145 { 1392 #ifdef HAVE_PLURAL 1393 if (strcmp(sys_cmd, "PrintMat") == 0) 1394 { 1146 1395 int a; 1147 1396 int b; … … 1173 1422 else res->data=NULL; 1174 1423 return FALSE; 1175 } 1424 } 1425 else 1426 #endif 1176 1427 /*==================== twostd =================*/ 1177 if (strcmp(sys_cmd, "twostd") == 0) 1178 { 1428 #ifdef HAVE_PLURAL 1429 if (strcmp(sys_cmd, "twostd") == 0) 1430 { 1179 1431 ideal I; 1180 1432 if ((h!=NULL) && (h->Typ()==IDEAL_CMD)) … … 1189 1441 else return TRUE; 1190 1442 return FALSE; 1191 } 1443 } 1444 else 1445 #endif 1192 1446 /*==================== lie bracket =================*/ 1193 if (strcmp(sys_cmd, "bracket") == 0) 1194 { 1447 #ifdef HAVE_PLURAL 1448 if (strcmp(sys_cmd, "bracket") == 0) 1449 { 1195 1450 poly p; 1196 1451 poly q; … … 1210 1465 else res->data=NULL; 1211 1466 return FALSE; 1212 } 1213 if(strcmp(sys_cmd,"NCUseExtensions")==0) 1214 { 1215 1467 } 1468 else 1469 #endif 1470 /* ============ NCUseExtensions ======================== */ 1471 #ifdef HAVE_PLURAL 1472 if(strcmp(sys_cmd,"NCUseExtensions")==0) 1473 { 1216 1474 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1217 1475 res->data=(void *)(long)setNCExtensions( (int)((long)(h->Data())) ); 1218 1476 else 1219 1477 res->data=(void *)(long)getNCExtensions(); 1220 1221 1478 res->rtyp=INT_CMD; 1222 1479 return FALSE; 1223 } 1224 1225 1226 if(strcmp(sys_cmd,"NCGetType")==0) 1227 { 1480 } 1481 else 1482 #endif 1483 /* ============ NCGetType ======================== */ 1484 #ifdef HAVE_PLURAL 1485 if(strcmp(sys_cmd,"NCGetType")==0) 1486 { 1228 1487 res->rtyp=INT_CMD; 1229 1230 1488 if( rIsPluralRing(currRing) ) 1231 1489 res->data=(void *)(long)ncRingType(currRing); 1232 1490 else 1233 1491 res->data=(void *)(-1L); 1234 1235 return FALSE; 1236 } 1237 1238 1239 if(strcmp(sys_cmd,"ForceSCA")==0) 1240 { 1492 return FALSE; 1493 } 1494 else 1495 #endif 1496 /* ============ ForceSCA ======================== */ 1497 #ifdef HAVE_PLURAL 1498 if(strcmp(sys_cmd,"ForceSCA")==0) 1499 { 1241 1500 if( !rIsPluralRing(currRing) ) 1242 1501 return TRUE; 1243 1244 1502 int b, e; 1245 1246 1503 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1247 1504 { … … 1250 1507 } 1251 1508 else return TRUE; 1252 1253 1509 if ((h!=NULL) && (h->Typ()==INT_CMD)) 1254 1510 { … … 1256 1512 } 1257 1513 else return TRUE; 1258 1259 1260 1514 if( !sca_Force(currRing, b, e) ) 1261 1515 return TRUE; 1262 1263 return FALSE; 1264 } 1265 1266 if(strcmp(sys_cmd,"ForceNewNCMultiplication")==0) 1267 { 1516 return FALSE; 1517 } 1518 else 1519 #endif 1520 /* ============ ForceNewNCMultiplication ======================== */ 1521 #ifdef HAVE_PLURAL 1522 if(strcmp(sys_cmd,"ForceNewNCMultiplication")==0) 1523 { 1268 1524 if( !rIsPluralRing(currRing) ) 1269 1525 return TRUE; 1270 1271 1526 if( !ncInitSpecialPairMultiplication(currRing) ) // No Plural! 1272 1527 return TRUE; 1273 1528 1274 1529 return FALSE; 1275 } 1276 1277 if(strcmp(sys_cmd,"ForceNewOldNCMultiplication")==0) 1278 { 1530 } 1531 else 1532 #endif 1533 /* ============ ForceNewOldNCMultiplication ======================== */ 1534 #ifdef HAVE_PLURAL 1535 if(strcmp(sys_cmd,"ForceNewOldNCMultiplication")==0) 1536 { 1279 1537 if( !rIsPluralRing(currRing) ) 1280 1538 return TRUE; 1281 1282 1539 if( !ncInitSpecialPowersMultiplication(currRing) ) // Enable Formula for Plural (depends on swiches)! 1283 1540 return TRUE; 1284 1285 return FALSE; 1286 } 1287 1288 1289 1290 1291 /*==================== PLURAL =================*/ 1292 /*==================== opp ==================================*/ 1293 if (strcmp(sys_cmd, "opp")==0) 1294 { 1295 if ((h!=NULL) && (h->Typ()==RING_CMD)) 1296 { 1297 ring r=(ring)h->Data(); 1298 res->data=rOpposite(r); 1299 res->rtyp=RING_CMD; 1300 return FALSE; 1301 } 1302 else 1303 { 1304 WerrorS("`system(\"opp\",<ring>)` expected"); 1305 return TRUE; 1306 } 1307 } 1308 else 1541 return FALSE; 1542 } 1543 else 1544 #endif 1545 /* ============ opp ======================== */ 1546 #ifdef HAVE_PLURAL 1547 if (strcmp(sys_cmd, "opp")==0) 1548 { 1549 if ((h!=NULL) && (h->Typ()==RING_CMD)) 1550 { 1551 ring r=(ring)h->Data(); 1552 res->data=rOpposite(r); 1553 res->rtyp=RING_CMD; 1554 return FALSE; 1555 } 1556 else 1557 { 1558 WerrorS("`system(\"opp\",<ring>)` expected"); 1559 return TRUE; 1560 } 1561 } 1562 else 1563 #endif 1309 1564 /*==================== env ==================================*/ 1310 if (strcmp(sys_cmd, "env")==0) 1311 { 1565 #ifdef HAVE_PLURAL 1566 if (strcmp(sys_cmd, "env")==0) 1567 { 1312 1568 if ((h!=NULL) && (h->Typ()==RING_CMD)) 1313 1569 { … … 1322 1578 return TRUE; 1323 1579 } 1324 } 1325 else 1580 } 1581 else 1582 #endif 1326 1583 /*==================== oppose ==================================*/ 1327 if (strcmp(sys_cmd, "oppose")==0) 1328 { 1329 if ((h!=NULL) && (h->Typ()==RING_CMD) 1330 && (h->next!= NULL)) 1331 { 1332 ring Rop = (ring)h->Data(); 1333 h = h->next; 1334 idhdl w; 1335 if ((w=Rop->idroot->get(h->Name(),myynest))!=NULL) 1336 { 1337 poly p = (poly)IDDATA(w); 1338 res->data = pOppose(Rop, p, currRing); // into CurrRing? 1339 res->rtyp = POLY_CMD; 1340 return FALSE; 1341 } 1342 } 1343 else 1344 { 1345 WerrorS("`system(\"oppose\",<ring>,<poly>)` expected"); 1346 return TRUE; 1347 } 1348 } 1349 else 1584 #ifdef HAVE_PLURAL 1585 if (strcmp(sys_cmd, "oppose")==0) 1586 { 1587 if ((h!=NULL) && (h->Typ()==RING_CMD) 1588 && (h->next!= NULL)) 1589 { 1590 ring Rop = (ring)h->Data(); 1591 h = h->next; 1592 idhdl w; 1593 if ((w=Rop->idroot->get(h->Name(),myynest))!=NULL) 1594 { 1595 poly p = (poly)IDDATA(w); 1596 res->data = pOppose(Rop, p, currRing); // into CurrRing? 1597 res->rtyp = POLY_CMD; 1598 return FALSE; 1599 } 1600 } 1601 else 1602 { 1603 WerrorS("`system(\"oppose\",<ring>,<poly>)` expected"); 1604 return TRUE; 1605 } 1606 } 1607 else 1608 #endif 1350 1609 /*==================== freeGB, twosided GB in free algebra =================*/ 1610 #ifdef HAVE_PLURAL 1351 1611 #ifdef HAVE_SHIFTBBA 1352 1353 1612 if (strcmp(sys_cmd, "freegb") == 0) 1613 { 1354 1614 ideal I; 1355 1615 int uptodeg, lVblock; … … 1379 1639 else return TRUE; 1380 1640 return FALSE; 1381 1382 1641 } 1642 else 1383 1643 #endif /*SHIFTBBA*/ 1384 1644 #endif /*PLURAL*/ 1385 1645 /*==================== walk stuff =================*/ 1646 /*==================== walkNextWeight =================*/ 1386 1647 #ifdef HAVE_WALK 1387 1648 #ifdef OWNW 1388 1389 1649 if (strcmp(sys_cmd, "walkNextWeight") == 0) 1650 { 1390 1651 if (h == NULL || h->Typ() != INTVEC_CMD || 1391 1652 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1392 1653 h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD) 1393 1654 { 1394 Werror ("system(\"walkNextWeight\", intvec, intvec, ideal) expected");1655 WerrorS("system(\"walkNextWeight\", intvec, intvec, ideal) expected"); 1395 1656 return TRUE; 1396 1657 } … … 1415 1676 } 1416 1677 return FALSE; 1417 } 1418 else if (strcmp(sys_cmd, "walkInitials") == 0) 1419 { 1678 } 1679 else 1680 /*==================== walkNextWeight =================*/ 1681 if (strcmp(sys_cmd, "walkInitials") == 0) 1682 { 1420 1683 if (h == NULL || h->Typ() != IDEAL_CMD) 1421 1684 { … … 1427 1690 res->rtyp = IDEAL_CMD; 1428 1691 return FALSE; 1429 } 1430 else 1431 #endif 1692 } 1693 else 1694 #endif 1695 /*==================== walkAddIntVec =================*/ 1432 1696 #ifdef WAIV 1433 1434 1697 if (strcmp(sys_cmd, "walkAddIntVec") == 0) 1698 { 1435 1699 if (h == NULL || h->Typ() != INTVEC_CMD || 1436 1700 h->next == NULL || h->next->Typ() != INTVEC_CMD) … … 1446 1710 res->rtyp = INTVEC_CMD; 1447 1711 return FALSE; 1448 } 1449 else 1450 #endif 1712 } 1713 else 1714 #endif 1715 /*==================== MwalkNextWeight =================*/ 1451 1716 #ifdef MwaklNextWeight 1452 1453 1717 if (strcmp(sys_cmd, "MwalkNextWeight") == 0) 1718 { 1454 1719 if (h == NULL || h->Typ() != INTVEC_CMD || 1455 1720 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1456 1721 h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD) 1457 1722 { 1458 Werror ("system(\"MwalkNextWeight\", intvec, intvec, ideal) expected");1723 WerrorS("system(\"MwalkNextWeight\", intvec, intvec, ideal) expected"); 1459 1724 return TRUE; 1460 1725 } … … 1477 1742 1478 1743 return FALSE; 1479 1480 1744 } 1745 else 1481 1746 #endif //MWalkNextWeight 1482 if(strcmp(sys_cmd, "Mivdp") == 0) 1483 { 1747 /*==================== Mivdp =================*/ 1748 if(strcmp(sys_cmd, "Mivdp") == 0) 1749 { 1484 1750 if (h == NULL || h->Typ() != INT_CMD) 1485 1751 { 1486 Werror ("system(\"Mivdp\", int) expected");1752 WerrorS("system(\"Mivdp\", int) expected"); 1487 1753 return TRUE; 1488 1754 } … … 1501 1767 1502 1768 return FALSE; 1503 } 1504 1505 else if(strcmp(sys_cmd, "Mivlp") == 0) 1506 { 1769 } 1770 else 1771 /*==================== Mivlp =================*/ 1772 if(strcmp(sys_cmd, "Mivlp") == 0) 1773 { 1507 1774 if (h == NULL || h->Typ() != INT_CMD) 1508 1775 { 1509 Werror ("system(\"Mivlp\", int) expected");1776 WerrorS("system(\"Mivlp\", int) expected"); 1510 1777 return TRUE; 1511 1778 } … … 1524 1791 1525 1792 return FALSE; 1526 } 1527 else 1793 } 1794 else 1795 /*==================== MpDiv =================*/ 1528 1796 #ifdef MpDiv 1529 1530 1797 if(strcmp(sys_cmd, "MpDiv") == 0) 1798 { 1531 1799 if(h==NULL || h->Typ() != POLY_CMD || 1532 1800 h->next == NULL || h->next->Typ() != POLY_CMD) 1533 1801 { 1534 Werror ("system(\"MpDiv\",poly, poly) expected");1802 WerrorS("system(\"MpDiv\",poly, poly) expected"); 1535 1803 return TRUE; 1536 1804 } … … 1543 1811 res->data = result; 1544 1812 return FALSE; 1545 } 1546 else 1547 #endif 1813 } 1814 else 1815 #endif 1816 /*==================== MpMult =================*/ 1548 1817 #ifdef MpMult 1549 1550 1818 if(strcmp(sys_cmd, "MpMult") == 0) 1819 { 1551 1820 if(h==NULL || h->Typ() != POLY_CMD || 1552 1821 h->next == NULL || h->next->Typ() != POLY_CMD) 1553 1822 { 1554 Werror ("system(\"MpMult\",poly, poly) expected");1823 WerrorS("system(\"MpMult\",poly, poly) expected"); 1555 1824 return TRUE; 1556 1825 } … … 1562 1831 res->data = result; 1563 1832 return FALSE; 1564 } 1565 else 1566 #endif 1567 if (strcmp(sys_cmd, "MivSame") == 0) 1568 { 1833 } 1834 else 1835 #endif 1836 /*==================== MivSame =================*/ 1837 if (strcmp(sys_cmd, "MivSame") == 0) 1838 { 1569 1839 if(h == NULL || h->Typ() != INTVEC_CMD || 1570 1840 h->next == NULL || h->next->Typ() != INTVEC_CMD ) 1571 1841 { 1572 Werror ("system(\"MivSame\", intvec, intvec) expected");1842 WerrorS("system(\"MivSame\", intvec, intvec) expected"); 1573 1843 return TRUE; 1574 1844 } … … 1593 1863 res->data = (void*)(long) MivSame(arg1, arg2); 1594 1864 return FALSE; 1595 } 1596 else 1597 if (strcmp(sys_cmd, "M3ivSame") == 0) 1598 { 1865 } 1866 else 1867 /*==================== M3ivSame =================*/ 1868 if (strcmp(sys_cmd, "M3ivSame") == 0) 1869 { 1599 1870 if(h == NULL || h->Typ() != INTVEC_CMD || 1600 1871 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1601 1872 h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD ) 1602 1873 { 1603 Werror ("system(\"M3ivSame\", intvec, intvec, intvec) expected");1874 WerrorS("system(\"M3ivSame\", intvec, intvec, intvec) expected"); 1604 1875 return TRUE; 1605 1876 } … … 1626 1897 res->data = (void*)(long) M3ivSame(arg1, arg2, arg3); 1627 1898 return FALSE; 1628 } 1629 else 1630 if(strcmp(sys_cmd, "MwalkInitialForm") == 0) 1631 { 1899 } 1900 else 1901 /*==================== MwalkInitialForm =================*/ 1902 if(strcmp(sys_cmd, "MwalkInitialForm") == 0) 1903 { 1632 1904 if(h == NULL || h->Typ() != IDEAL_CMD || 1633 1905 h->next == NULL || h->next->Typ() != INTVEC_CMD) 1634 1906 { 1635 Werror ("system(\"MwalkInitialForm\", ideal, intvec) expected");1907 WerrorS("system(\"MwalkInitialForm\", ideal, intvec) expected"); 1636 1908 return TRUE; 1637 1909 } … … 1649 1921 res->data = result; 1650 1922 return FALSE; 1651 } 1652 else 1653 /************** Perturbation walk **********/ 1654 if(strcmp(sys_cmd, "MivMatrixOrder") == 0) 1655 { 1923 } 1924 else 1925 /*==================== MivMatrixOrder =================*/ 1926 /************** Perturbation walk **********/ 1927 if(strcmp(sys_cmd, "MivMatrixOrder") == 0) 1928 { 1656 1929 if(h==NULL || h->Typ() != INTVEC_CMD) 1657 1930 { 1658 Werror ("system(\"MivMatrixOrder\",intvec) expected");1931 WerrorS("system(\"MivMatrixOrder\",intvec) expected"); 1659 1932 return TRUE; 1660 1933 } … … 1666 1939 res->data = result; 1667 1940 return FALSE; 1668 } 1669 else 1670 if(strcmp(sys_cmd, "MivMatrixOrderdp") == 0) 1671 { 1941 } 1942 else 1943 /*==================== MivMatrixOrderdp =================*/ 1944 if(strcmp(sys_cmd, "MivMatrixOrderdp") == 0) 1945 { 1672 1946 if(h==NULL || h->Typ() != INT_CMD) 1673 1947 { 1674 Werror ("system(\"MivMatrixOrderdp\",intvec) expected");1948 WerrorS("system(\"MivMatrixOrderdp\",intvec) expected"); 1675 1949 return TRUE; 1676 1950 } … … 1683 1957 return FALSE; 1684 1958 } 1685 1686 if(strcmp(sys_cmd, "MPertVectors") == 0)1687 {1688 1959 else 1960 /*==================== MPertVectors =================*/ 1961 if(strcmp(sys_cmd, "MPertVectors") == 0) 1962 { 1689 1963 if(h==NULL || h->Typ() != IDEAL_CMD || 1690 1964 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1691 1965 h->next->next == NULL || h->next->next->Typ() != INT_CMD) 1692 1966 { 1693 Werror ("system(\"MPertVectors\",ideal, intvec, int) expected");1967 WerrorS("system(\"MPertVectors\",ideal, intvec, int) expected"); 1694 1968 return TRUE; 1695 1969 } … … 1704 1978 res->data = result; 1705 1979 return FALSE; 1706 1707 1708 if(strcmp(sys_cmd, "MPertVectorslp") == 0)1709 {1710 1980 } 1981 else 1982 /*==================== MPertVectorslp =================*/ 1983 if(strcmp(sys_cmd, "MPertVectorslp") == 0) 1984 { 1711 1985 if(h==NULL || h->Typ() != IDEAL_CMD || 1712 1986 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1713 1987 h->next->next == NULL || h->next->next->Typ() != INT_CMD) 1714 1988 { 1715 Werror ("system(\"MPertVectorslp\",ideal, intvec, int) expected");1989 WerrorS("system(\"MPertVectorslp\",ideal, intvec, int) expected"); 1716 1990 return TRUE; 1717 1991 } … … 1726 2000 res->data = result; 1727 2001 return FALSE; 1728 1729 1730 1731 1732 2002 } 2003 /************** fractal walk **********/ 2004 else 2005 if(strcmp(sys_cmd, "Mfpertvector") == 0) 2006 { 1733 2007 if(h==NULL || h->Typ() != IDEAL_CMD || 1734 2008 h->next==NULL || h->next->Typ() != INTVEC_CMD ) 1735 2009 { 1736 Werror ("system(\"Mfpertvector\", ideal,intvec) expected");2010 WerrorS("system(\"Mfpertvector\", ideal,intvec) expected"); 1737 2011 return TRUE; 1738 2012 } … … 1744 2018 res->data = result; 1745 2019 return FALSE; 1746 1747 1748 1749 2020 } 2021 else 2022 if(strcmp(sys_cmd, "MivUnit") == 0) 2023 { 1750 2024 int arg1 = (int) ((long)(h->Data())); 1751 2025 … … 1755 2029 res->data = result; 1756 2030 return FALSE; 1757 1758 1759 1760 2031 } 2032 else 2033 if(strcmp(sys_cmd, "MivWeightOrderlp") == 0) 2034 { 1761 2035 if(h==NULL || h->Typ() != INTVEC_CMD) 1762 2036 { 1763 Werror ("system(\"MivWeightOrderlp\",intvec) expected");2037 WerrorS("system(\"MivWeightOrderlp\",intvec) expected"); 1764 2038 return TRUE; 1765 2039 } … … 1770 2044 res->data = result; 1771 2045 return FALSE; 1772 1773 1774 1775 2046 } 2047 else 2048 if(strcmp(sys_cmd, "MivWeightOrderdp") == 0) 2049 { 1776 2050 if(h==NULL || h->Typ() != INTVEC_CMD) 1777 2051 { 1778 Werror ("system(\"MivWeightOrderdp\",intvec) expected");2052 WerrorS("system(\"MivWeightOrderdp\",intvec) expected"); 1779 2053 return TRUE; 1780 2054 } … … 1787 2061 res->data = result; 1788 2062 return FALSE; 1789 1790 1791 1792 2063 } 2064 else 2065 if(strcmp(sys_cmd, "MivMatrixOrderlp") == 0) 2066 { 1793 2067 if(h==NULL || h->Typ() != INT_CMD) 1794 2068 { 1795 Werror ("system(\"MivMatrixOrderlp\",int) expected");2069 WerrorS("system(\"MivMatrixOrderlp\",int) expected"); 1796 2070 return TRUE; 1797 2071 } … … 1803 2077 res->data = result; 1804 2078 return FALSE; 1805 1806 1807 1808 2079 } 2080 else 2081 if (strcmp(sys_cmd, "MkInterRedNextWeight") == 0) 2082 { 1809 2083 if (h == NULL || h->Typ() != INTVEC_CMD || 1810 2084 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1811 2085 h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD) 1812 2086 { 1813 Werror ("system(\"MkInterRedNextWeight\", intvec, intvec, ideal) expected");2087 WerrorS("system(\"MkInterRedNextWeight\", intvec, intvec, ideal) expected"); 1814 2088 return TRUE; 1815 2089 } … … 1832 2106 1833 2107 return FALSE; 1834 1835 2108 } 2109 else 1836 2110 #ifdef MPertNextWeight 1837 1838 2111 if (strcmp(sys_cmd, "MPertNextWeight") == 0) 2112 { 1839 2113 if (h == NULL || h->Typ() != INTVEC_CMD || 1840 2114 h->next == NULL || h->next->Typ() != IDEAL_CMD || 1841 2115 h->next->next == NULL || h->next->next->Typ() != INT_CMD) 1842 2116 { 1843 Werror ("system(\"MPertNextWeight\", intvec, ideal, int) expected");2117 WerrorS("system(\"MPertNextWeight\", intvec, ideal, int) expected"); 1844 2118 return TRUE; 1845 2119 } … … 1861 2135 1862 2136 return FALSE; 1863 1864 2137 } 2138 else 1865 2139 #endif //MPertNextWeight 1866 2140 #ifdef Mivperttarget 1867 2141 if (strcmp(sys_cmd, "Mivperttarget") == 0) 1868 2142 { 1869 2143 if (h == NULL || h->Typ() != IDEAL_CMD || 1870 2144 h->next == NULL || h->next->Typ() != INT_CMD ) 1871 2145 { 1872 Werror ("system(\"Mivperttarget\", ideal, int) expected");2146 WerrorS("system(\"Mivperttarget\", ideal, int) expected"); 1873 2147 return TRUE; 1874 2148 } … … 1883 2157 1884 2158 return FALSE; 1885 1886 2159 } 2160 else 1887 2161 #endif //Mivperttarget 1888 1889 2162 if (strcmp(sys_cmd, "Mwalk") == 0) 2163 { 1890 2164 if (h == NULL || h->Typ() != IDEAL_CMD || 1891 2165 h->next == NULL || h->next->Typ() != INTVEC_CMD || 1892 2166 h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD) 1893 2167 { 1894 Werror ("system(\"Mwalk\", ideal, intvec, intvec) expected");2168 WerrorS("system(\"Mwalk\", ideal, intvec, intvec) expected"); 1895 2169 return TRUE; 1896 2170 } … … 1914 2188 1915 2189 return FALSE; 1916 1917 2190 } 2191 else 1918 2192 #ifdef MPWALK_ORIG 1919 1920 2193 if (strcmp(sys_cmd, "Mpwalk") == 0) 2194 { 1921 2195 if (h == NULL || h->Typ() != IDEAL_CMD || 1922 2196 h->next == NULL || h->next->Typ() != INT_CMD || … … 1927 2201 h->next->next->next->next->Typ() != INTVEC_CMD) 1928 2202 { 1929 Werror ("system(\"Mpwalk\", ideal, int, int, intvec, intvec) expected");2203 WerrorS("system(\"Mpwalk\", ideal, int, int, intvec, intvec) expected"); 1930 2204 return TRUE; 1931 2205 } … … 1951 2225 1952 2226 return FALSE; 1953 1954 1955 #endif 1956 1957 2227 } 2228 else 2229 #endif 2230 if (strcmp(sys_cmd, "Mpwalk") == 0) 2231 { 1958 2232 if (h == NULL || h->Typ() != IDEAL_CMD || 1959 2233 h->next == NULL || h->next->Typ() != INT_CMD || … … 1966 2240 h->next->next->next->next->next->Typ() != INT_CMD) 1967 2241 { 1968 Werror ("system(\"Mpwalk\", ideal, int, int, intvec, intvec, int) expected");2242 WerrorS("system(\"Mpwalk\", ideal, int, int, intvec, intvec, int) expected"); 1969 2243 return TRUE; 1970 2244 } … … 1991 2265 1992 2266 return FALSE; 1993 1994 1995 1996 2267 } 2268 else 2269 if (strcmp(sys_cmd, "Mrwalk") == 0) 2270 { // Random Walk 1997 2271 if (h == NULL || h->Typ() != IDEAL_CMD || 1998 2272 h->next == NULL || h->next->Typ() != INTVEC_CMD || … … 2001 2275 h->next->next->next->next == NULL || h->next->next->next->next->Typ() != INT_CMD) 2002 2276 { 2003 Werror ("system(\"Mrwalk\", ideal, intvec, intvec, int, int) expected");2277 WerrorS("system(\"Mrwalk\", ideal, intvec, intvec, int, int) expected"); 2004 2278 return TRUE; 2005 2279 } … … 2025 2299 2026 2300 return FALSE; 2027 2028 2029 2030 2301 } 2302 else 2303 if (strcmp(sys_cmd, "MAltwalk1") == 0) 2304 { 2031 2305 if (h == NULL || h->Typ() != IDEAL_CMD || 2032 2306 h->next == NULL || h->next->Typ() != INT_CMD || … … 2037 2311 h->next->next->next->next->Typ() != INTVEC_CMD) 2038 2312 { 2039 Werror ("system(\"MAltwalk1\", ideal, int, int, intvec, intvec) expected");2313 WerrorS("system(\"MAltwalk1\", ideal, int, int, intvec, intvec) expected"); 2040 2314 return TRUE; 2041 2315 } … … 2061 2335 2062 2336 return FALSE; 2063 2337 } 2064 2338 #ifdef MFWALK_ALT 2065 2066 2067 2339 else 2340 if (strcmp(sys_cmd, "Mfwalk_alt") == 0) 2341 { 2068 2342 if (h == NULL || h->Typ() != IDEAL_CMD || 2069 2343 h->next == NULL || h->next->Typ() != INTVEC_CMD || … … 2071 2345 h->next->next->next == NULL || h->next->next->next->Typ() !=INT_CMD) 2072 2346 { 2073 Werror ("system(\"Mfwalk\", ideal, intvec, intvec,int) expected");2347 WerrorS("system(\"Mfwalk\", ideal, intvec, intvec,int) expected"); 2074 2348 return TRUE; 2075 2349 } … … 2093 2367 2094 2368 return FALSE; 2095 2096 #endif 2097 2098 2099 2369 } 2370 #endif 2371 else 2372 if (strcmp(sys_cmd, "Mfwalk") == 0) 2373 { 2100 2374 if (h == NULL || h->Typ() != IDEAL_CMD || 2101 2375 h->next == NULL || h->next->Typ() != INTVEC_CMD || 2102 2376 h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD) 2103 2377 { 2104 Werror ("system(\"Mfwalk\", ideal, intvec, intvec) expected");2378 WerrorS("system(\"Mfwalk\", ideal, intvec, intvec) expected"); 2105 2379 return TRUE; 2106 2380 } … … 2123 2397 2124 2398 return FALSE; 2125 2126 2127 2128 2399 } 2400 else 2401 if (strcmp(sys_cmd, "Mfrwalk") == 0) 2402 { 2129 2403 if (h == NULL || h->Typ() != IDEAL_CMD || 2130 2404 h->next == NULL || h->next->Typ() != INTVEC_CMD || … … 2132 2406 h->next->next->next == NULL || h->next->next->next->Typ() != INT_CMD) 2133 2407 { 2134 Werror ("system(\"Mfrwalk\", ideal, intvec, intvec, int) expected");2408 WerrorS("system(\"Mfrwalk\", ideal, intvec, intvec, int) expected"); 2135 2409 return TRUE; 2136 2410 } … … 2154 2428 2155 2429 return FALSE; 2156 2157 2430 } 2431 else 2158 2432 2159 2433 #ifdef TRAN_Orig 2160 2161 2434 if (strcmp(sys_cmd, "TranMImprovwalk") == 0) 2435 { 2162 2436 if (h == NULL || h->Typ() != IDEAL_CMD || 2163 2437 h->next == NULL || h->next->Typ() != INTVEC_CMD || 2164 2438 h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD) 2165 2439 { 2166 Werror ("system(\"TranMImprovwalk\", ideal, intvec, intvec) expected");2440 WerrorS("system(\"TranMImprovwalk\", ideal, intvec, intvec) expected"); 2167 2441 return TRUE; 2168 2442 } … … 2186 2460 2187 2461 return FALSE; 2188 2189 2190 #endif 2191 2192 2462 } 2463 else 2464 #endif 2465 if (strcmp(sys_cmd, "MAltwalk2") == 0) 2466 { 2193 2467 if (h == NULL || h->Typ() != IDEAL_CMD || 2194 2468 h->next == NULL || h->next->Typ() != INTVEC_CMD || 2195 2469 h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD) 2196 2470 { 2197 Werror ("system(\"MAltwalk2\", ideal, intvec, intvec) expected");2471 WerrorS("system(\"MAltwalk2\", ideal, intvec, intvec) expected"); 2198 2472 return TRUE; 2199 2473 } … … 2217 2491 2218 2492 return FALSE; 2219 2220 2221 2222 2493 } 2494 else 2495 if (strcmp(sys_cmd, "TranMImprovwalk") == 0) 2496 { 2223 2497 if (h == NULL || h->Typ() != IDEAL_CMD || 2224 2498 h->next == NULL || h->next->Typ() != INTVEC_CMD || … … 2226 2500 h->next->next->next == NULL || h->next->next->next->Typ() != INT_CMD) 2227 2501 { 2228 Werror ("system(\"TranMImprovwalk\", ideal, intvec, intvec, int) expected");2502 WerrorS("system(\"TranMImprovwalk\", ideal, intvec, intvec, int) expected"); 2229 2503 return TRUE; 2230 2504 } … … 2248 2522 2249 2523 return FALSE; 2250 2251 2252 2253 2524 } 2525 else 2526 if (strcmp(sys_cmd, "TranMrImprovwalk") == 0) 2527 { 2254 2528 if (h == NULL || h->Typ() != IDEAL_CMD || 2255 2529 h->next == NULL || h->next->Typ() != INTVEC_CMD || … … 2259 2533 h->next->next->next == NULL || h->next->next->next->next->next->Typ() != INT_CMD) 2260 2534 { 2261 Werror ("system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");2535 WerrorS("system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected"); 2262 2536 return TRUE; 2263 2537 } … … 2282 2556 2283 2557 return FALSE; 2284 } 2285 else 2286 2558 } 2559 else 2287 2560 #endif 2288 2561 /*================= Extended system call ========================*/ 2289 2562 { 2290 2563 #ifndef MAKE_DISTRIBUTION 2291 2564 return(jjEXTENDED_SYSTEM(res, args)); … … 2293 2566 Werror( "system(\"%s\",...) %s", sys_cmd, feNotImplemented ); 2294 2567 #endif 2295 2296 2297 2298 2568 } 2569 } /* typ==string */ 2570 return TRUE; 2571 } 2299 2572 2300 2573 … … 2878 3151 if (n != m->cols()) 2879 3152 { 2880 Werror ("expected exactly one argument: %s",3153 WerrorS("expected exactly one argument: " 2881 3154 "a square matrix with number entries"); 2882 3155 return TRUE; … … 2942 3215 return FALSE; 2943 3216 } 2944 else { Werror ("wrong typ"); return TRUE;}3217 else { WerrorS("wrong typ"); return TRUE;} 2945 3218 } 2946 3219 else … … 2979 3252 #endif 2980 3253 2981 /*==== countedref: reference and shared ====*/2982 if (strcmp(sys_cmd, "shared") == 0)2983 {2984 #ifndef SI_COUNTEDREF_AUTOLOAD2985 void countedref_shared_load();2986 countedref_shared_load();2987 #endif2988 res->rtyp = NONE;2989 return FALSE;2990 }2991 else if (strcmp(sys_cmd, "reference") == 0)2992 {2993 #ifndef SI_COUNTEDREF_AUTOLOAD2994 void countedref_reference_load();2995 countedref_reference_load();2996 #endif2997 res->rtyp = NONE;2998 return FALSE;2999 }3000 else3001 3254 3002 3255 /*==================== DLL =================*/ 3003 #ifdef ix86_Win3256 #ifdef __CYGWIN__ 3004 3257 #ifdef HAVE_DL 3005 3258 /* testing the DLL functionality under Win32 */ … … 3230 3483 #endif 3231 3484 /*==================== RatNF, noncomm rational coeffs =================*/ 3232 #ifdef HAVE_PLURAL3233 3485 #ifdef HAVE_RATGRING 3234 3486 if (strcmp(sys_cmd, "intratNF") == 0) … … 3373 3625 } 3374 3626 else 3375 /*==================== shift-test for freeGB =================*/3376 #ifdef HAVE_SHIFTBBA3377 if (strcmp(sys_cmd, "stest") == 0)3378 {3379 poly p;3380 int sh,uptodeg, lVblock;3381 if ((h!=NULL) && (h->Typ()==POLY_CMD))3382 {3383 p=(poly)h->CopyD();3384 h=h->next;3385 }3386 else return TRUE;3387 if ((h!=NULL) && (h->Typ()==INT_CMD))3388 {3389 sh=(int)((long)(h->Data()));3390 h=h->next;3391 }3392 else return TRUE;3393 3394 if ((h!=NULL) && (h->Typ()==INT_CMD))3395 {3396 uptodeg=(int)((long)(h->Data()));3397 h=h->next;3398 }3399 else return TRUE;3400 if ((h!=NULL) && (h->Typ()==INT_CMD))3401 {3402 lVblock=(int)((long)(h->Data()));3403 res->data = pLPshift(p,sh,uptodeg,lVblock);3404 res->rtyp = POLY_CMD;3405 }3406 else return TRUE;3407 return FALSE;3408 }3409 else3410 #endif3411 /*==================== block-test for freeGB =================*/3412 #ifdef HAVE_SHIFTBBA3413 if (strcmp(sys_cmd, "btest") == 0)3414 {3415 poly p;3416 int lV;3417 if ((h!=NULL) && (h->Typ()==POLY_CMD))3418 {3419 p=(poly)h->CopyD();3420 h=h->next;3421 }3422 else return TRUE;3423 if ((h!=NULL) && (h->Typ()==INT_CMD))3424 {3425 lV=(int)((long)(h->Data()));3426 res->rtyp = INT_CMD;3427 res->data = (void*)(long)pLastVblock(p, lV);3428 }3429 else return TRUE;3430 return FALSE;3431 }3432 else3433 /*==================== shrink-test for freeGB =================*/3434 if (strcmp(sys_cmd, "shrinktest") == 0)3435 {3436 poly p;3437 int lV;3438 if ((h!=NULL) && (h->Typ()==POLY_CMD))3439 {3440 p=(poly)h->CopyD();3441 h=h->next;3442 }3443 else return TRUE;3444 if ((h!=NULL) && (h->Typ()==INT_CMD))3445 {3446 lV=(int)((long)(h->Data()));3447 res->rtyp = POLY_CMD;3448 // res->data = p_mShrink(p, lV, currRing);3449 // kStrategy strat=new skStrategy;3450 // strat->tailRing = currRing;3451 res->data = p_Shrink(p, lV, currRing);3452 }3453 else return TRUE;3454 return FALSE;3455 }3456 else3457 #endif3458 #endif3459 3627 /*==================== t-rep-GB ==================================*/ 3460 3628 if (strcmp(sys_cmd, "unifastmult")==0) … … 3596 3764 } 3597 3765 else 3598 if (strcmp(sys_cmd, "LLL") == 0)3599 {3600 if (h!=NULL)3601 {3602 res->rtyp=h->Typ();3603 if (h->Typ()==MATRIX_CMD)3604 {3605 res->data=(char *)singntl_LLL((matrix)h->Data(), currRing);3606 return FALSE;3607 }3608 else if (h->Typ()==INTMAT_CMD)3609 {3610 res->data=(char *)singntl_LLL((intvec*)h->Data(), currRing);3611 return FALSE;3612 }3613 else return TRUE;3614 }3615 else return TRUE;3616 }3617 else3618 /*================= absBiFact ======================*/3619 if (strcmp(sys_cmd, "absFact") == 0)3620 {3621 if (h!=NULL)3622 {3623 res->rtyp=LIST_CMD;3624 if (h->Typ()==POLY_CMD)3625 {3626 intvec *v=NULL;3627 ideal mipos= NULL;3628 int n= 0;3629 ideal f=singclap_absFactorize((poly)(h->Data()), mipos, &v, n, currRing);3630 if (f==NULL) return TRUE;3631 ivTest(v);3632 lists l=(lists)omAllocBin(slists_bin);3633 l->Init(4);3634 l->m[0].rtyp=IDEAL_CMD;3635 l->m[0].data=(void *)f;3636 l->m[1].rtyp=INTVEC_CMD;3637 l->m[1].data=(void *)v;3638 l->m[2].rtyp=IDEAL_CMD;3639 l->m[2].data=(void*) mipos;3640 l->m[3].rtyp=INT_CMD;3641 l->m[3].data=(void*) (long) n;3642 res->data=(void *)l;3643 return FALSE;3644 }3645 else return TRUE;3646 }3647 else return TRUE;3648 }3649 else3650 3766 /*================= probIrredTest ======================*/ 3651 3767 if (strcmp (sys_cmd, "probIrredTest") == 0) … … 3665 3781 else 3666 3782 #endif 3667 #ifdef ix86_Win3783 #ifdef __CYGWIN__ 3668 3784 /*==================== Python Singular =================*/ 3669 3785 if (strcmp(sys_cmd, "python") == 0) … … 3720 3836 3721 3837 #endif 3722 /*==================== semaphore =================*/3723 #ifdef HAVE_SIMPLEIPC3724 if (strcmp(sys_cmd,"semaphore")==0)3725 {3726 if((h!=NULL) && (h->Typ()==STRING_CMD) && (h->next!=NULL) && (h->next->Typ()==INT_CMD))3727 {3728 int v=1;3729 if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD))3730 v=(int)(long)h->next->next->Data();3731 res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);3732 res->rtyp=INT_CMD;3733 return FALSE;3734 }3735 else3736 {3737 WerrorS("Usage: system(\"semaphore\",<cmd>,int)");3738 return TRUE;3739 }3740 }3741 else3742 #endif3743 3838 /*======================= demon_list =====================*/ 3744 3839 if (strcmp(sys_cmd,"denom_list")==0) … … 3750 3845 } 3751 3846 else 3752 /*==================== install newstruct =================*/3753 if (strcmp(sys_cmd,"install")==0)3754 {3755 if ((h!=NULL) && (h->Typ()==STRING_CMD)3756 && (h->next!=NULL) && (h->next->Typ()==STRING_CMD)3757 && (h->next->next!=NULL) && (h->next->next->Typ()==PROC_CMD)3758 && (h->next->next->next!=NULL) && (h->next->next->next->Typ()==INT_CMD))3759 {3760 return newstruct_set_proc((char*)h->Data(),(char*)h->next->Data(),3761 (int)(long)h->next->next->next->Data(),3762 (procinfov)h->next->next->Data());3763 }3764 return TRUE;3765 }3766 else3767 if (strcmp(sys_cmd,"newstruct")==0)3768 {3769 if ((h!=NULL) && (h->Typ()==STRING_CMD))3770 {3771 int id=0;3772 blackboxIsCmd((char*)h->Data(),id);3773 if (id>0)3774 {3775 blackbox *bb=getBlackboxStuff(id);3776 if (BB_LIKE_LIST(bb))3777 {3778 newstruct_desc desc=(newstruct_desc)bb->data;3779 newstructShow(desc);3780 return FALSE;3781 }3782 }3783 }3784 return TRUE;3785 }3786 else3787 if (strcmp(sys_cmd,"blackbox")==0)3788 {3789 printBlackboxTypes();3790 return FALSE;3791 }3792 else3793 /*==================== reserved port =================*/3794 if (strcmp(sys_cmd,"reserve")==0)3795 {3796 int ssiReservePort(int clients);3797 if ((h!=NULL) && (h->Typ()==INT_CMD))3798 {3799 res->rtyp=INT_CMD;3800 int p=ssiReservePort((int)(long)h->Data());3801 res->data=(void*)(long)p;3802 return (p==0);3803 }3804 else3805 {3806 WerrorS("system(\"reserve\",<int>)");3807 }3808 return TRUE;3809 }3810 else3811 if (strcmp(sys_cmd,"reservedLink")==0)3812 {3813 extern si_link ssiCommandLink();3814 res->rtyp=LINK_CMD;3815 si_link p=ssiCommandLink();3816 res->data=(void*)p;3817 return (p==NULL);3818 }3819 else3820 3847 /*==================== Error =================*/ 3821 3848 Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented ); -
Property
mode
changed from
-
Singular/fehelp.cc
r7a979b r5c5b5f 83 83 static BOOLEAN heEmacsInit(int,int); static void heEmacsHelp(heEntry hentry,int); 84 84 85 #ifdef ix86_Win86 static void heHtmlHelp(heEntry hentry,int);87 static void heWinHelp(heEntry hentry,int);88 static void heWinHtmlHelp(heEntry hentry,int);89 #include "sing_win.h"90 #endif91 92 85 static heBrowser heCurrentHelpBrowser = NULL; 93 86 static int heCurrentHelpBrowserIndex= -1; … … 137 130 if (heCurrentHelpBrowser == NULL) feHelpBrowser(NULL, 0); 138 131 assume(heCurrentHelpBrowser != NULL); 139 #ifdef ix86_Win140 if (strcmp(heCurrentHelpBrowser->browser,"htmlhelp")==0)141 {142 // In Windows always let htmlhelp handle request, if standard143 strcpy(hentry.key, str);144 *hentry.node = '\0';145 *hentry.url = '\0';146 hentry.chksum = 0;147 heBrowserHelp(&hentry);148 }149 #endif150 132 151 133 StringSetS(""); … … 216 198 } 217 199 fseek(f,0,SEEK_SET); 218 #ifdef ix86_Win219 // for the 7(!) default browsers and make htmlhelp the default default220 heHelpBrowsers=(heBrowser_s*)omAlloc0((br+7)*sizeof(heBrowser_s));221 br = 0;222 heHelpBrowsers[br].browser="htmlhelp";223 heHelpBrowsers[br].init_proc=heGenInit;224 heHelpBrowsers[br].help_proc=heWinHtmlHelp;225 heHelpBrowsers[br].required="C";226 // heHelpBrowsers[br].action=NULL;227 br++;228 #else229 200 // for the 4(!) default browsers 230 201 heHelpBrowsers=(heBrowser_s*)omAlloc0((br+4)*sizeof(heBrowser_s)); 231 202 br = 0; 232 #endif233 203 while (fgets( buf, sizeof(buf), f)) 234 204 { … … 260 230 else 261 231 { 262 #ifdef ix86_Win263 // for the 7(!) default browsers264 heHelpBrowsers=(heBrowser_s*)omAlloc0(7*sizeof(heBrowser_s));265 heHelpBrowsers[br].browser="htmlhelp";266 heHelpBrowsers[br].init_proc=heGenInit;267 heHelpBrowsers[br].help_proc=heWinHtmlHelp;268 heHelpBrowsers[br].required="C";269 // heHelpBrowsers[br].action=NULL;270 br++;271 #else272 232 // for the 4(!) default browsers 273 233 heHelpBrowsers=(heBrowser_s*)omAlloc0(4*sizeof(heBrowser_s)); 274 #endif 275 } 276 #ifdef ix86_Win 277 heHelpBrowsers[br].browser="winhlp"; 278 heHelpBrowsers[br].init_proc=heGenInit; 279 heHelpBrowsers[br].help_proc=heWinHelp; 280 heHelpBrowsers[br].required="h"; 281 //heHelpBrowsers[br].action=NULL; 282 br++; 283 heHelpBrowsers[br].browser="html"; 284 heHelpBrowsers[br].init_proc=heGenInit; 285 heHelpBrowsers[br].help_proc=heHtmlHelp; 286 heHelpBrowsers[br].required="h"; 287 //heHelpBrowsers[br].action=NULL; 288 br++; 289 #endif 234 } 290 235 heHelpBrowsers[br].browser="builtin"; 291 236 heHelpBrowsers[br].init_proc=heGenInit; … … 326 271 327 272 // First, try emacs, if emacs-option is set 328 // Under Win, always use html329 #ifndef ix86_Win330 273 if (feOptValue(FE_OPT_EMACS) != NULL) 331 274 { … … 343 286 i=0; 344 287 } 345 #endif346 288 while (heHelpBrowsers[i].browser != NULL) 347 289 { … … 887 829 case 'i': /* singular.hlp */ 888 830 case 'x': /* singular.idx */ 889 case 'C': /* chm file Manual.chm */890 831 case 'h': /* html dir */ 891 832 if (feResource(*p, warn) == NULL) … … 935 876 } 936 877 937 #ifdef ix86_Win938 939 static void heHtmlHelp(heEntry hentry, int br)940 {941 char url[MAXPATHLEN];942 char* html_dir = feResource('h' /*"HtmlDir"*/);943 sprintf(url, "%s/%s",944 (html_dir != NULL ? html_dir : feResource('u' /*"ManualUrl"*/)),945 (hentry!=NULL && *(hentry->url)!='\0' ? hentry->url : "index.htm"));946 947 heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0));948 }949 950 static void heWinHtmlHelp(heEntry hentry, int br)951 // Function to call the Microsoft HTML Help System952 // Uses API Call Function in sing_win.cc953 {954 char keyw[MAX_HE_ENTRY_LENGTH];955 if ((hentry!=NULL)&&(hentry->key!=NULL))956 strcpy(keyw,hentry->key);957 else958 strcpy(keyw," ");959 char* helppath = feResource('C' /*"CHM Datei"*/);960 heOpenWinHtmlHelp(keyw,helppath);961 }962 963 static void heWinHelp(heEntry hentry, int br)964 {965 char keyw[MAX_HE_ENTRY_LENGTH];966 if ((hentry!=NULL)&&(hentry->key!=NULL))967 strcpy(keyw,hentry->key);968 else969 strcpy(keyw," ");970 char* helppath = feResource('h' /*"HtmlDir"*/);971 const char *filename="/Manual.hlp";972 int helppath_len=0;973 if (helppath!=NULL) helppath_len=strlen(helppath);974 char *callpath=(char *)omAlloc0(helppath_len+strlen(filename)+1);975 if ((helppath!=NULL) && (*helppath>' '))976 strcpy(callpath,helppath);977 strcat(callpath,filename);978 heOpenWinntHlp(keyw,callpath);979 omfree(callpath);980 }981 #endif982 878 static void heGenHelp(heEntry hentry, int br) 983 879 { … … 1094 990 } 1095 991 1096 #ifdef ix86_Win1097 static void heHtmlHelp(heEntry hentry)1098 {1099 char url[MAXPATHLEN];1100 char* html_dir = feResource('h' /*"HtmlDir"*/);1101 sprintf(url, "%s/%s",1102 (html_dir != NULL ? html_dir : feResource('u' /*"ManualUrl"*/)),1103 (hentry!=NULL && *(hentry->url)!='\0' ? hentry->url : "index.htm"));1104 1105 heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0));1106 }1107 1108 static void heWinHelp(heEntry hentry)1109 {1110 char keyw[MAX_HE_ENTRY_LENGTH];1111 if ((hentry!=NULL)&&(hentry->key!=NULL))1112 strcpy(keyw,hentry->key);1113 else1114 strcpy(keyw," ");1115 char* helppath = feResource('h' /*"HtmlDir"*/);1116 const char *filename="/Manual.hlp";1117 int helppath_len=0;1118 if (helppath!=NULL) helppath_len=strlen(helppath);1119 char *callpath=(char *)omAlloc0(helppath_len+strlen(filename)+1);1120 if ((helppath!=NULL) && (*helppath>' '))1121 strcpy(callpath,helppath);1122 strcat(callpath,filename);1123 heOpenWinntHlp(keyw,callpath);1124 omfree(callpath);1125 }1126 #endif1127 1128 992 static BOOLEAN heDummyInit(int /*warn*/, int /*br*/) 1129 993 { -
Singular/iplib.cc
r7a979b r5c5b5f 31 31 #if SIZEOF_LONG == 8 32 32 #define SI_MAX_NEST 500 33 #elif defined( ix86_Win)33 #elif defined(__CYGWIN__) 34 34 #define SI_MAX_NEST 480 35 35 #else … … 39 39 #if defined(ix86Mac_darwin) || defined(x86_64Mac_darwin) || defined(ppcMac_darwin) 40 40 # define MODULE_SUFFIX bundle 41 #elif defined( ix86_Win)41 #elif defined(__CYGWIN__) 42 42 # define MODULE_SUFFIX dll 43 43 #else -
Singular/links/silink.cc
r7a979b r5c5b5f 38 38 39 39 // #ifdef HAVE_DBM 40 // #ifdef ix86_Win40 // #ifdef __CYGWIN__ 41 41 // #define USE_GDBM 42 42 // #endif -
Singular/links/sing_dbm.cc
r7a979b r5c5b5f 23 23 # include <Singular/links/sing_dbm.h> 24 24 25 // #ifdef ix86_Win25 // #ifdef __CYGWIN__ 26 26 // # define USE_GDBM 27 27 // # define BLOCKSIZE 1 -
Singular/misc_ip.cc
r7a979b r5c5b5f 785 785 { 786 786 StringSetS(""); 787 StringAppend("Singular for %s version %s (% s, %d bit) %s #%s",787 StringAppend("Singular for %s version %s (%d, %d bit) %s #%s", 788 788 S_UNAME, VERSION, // SINGULAR_VERSION, 789 PACKAGE_VERSION, SIZEOF_VOIDP*8, singular_date, GIT_VERSION);789 SINGULAR_VERSION, SIZEOF_VOIDP*8, singular_date, GIT_VERSION); 790 790 StringAppendS("\nwith\n\t"); 791 791 -
Singular/subexpr.cc
r7a979b r5c5b5f 1429 1429 BOOLEAN assumeStdFlag(leftv h) 1430 1430 { 1431 if ((h->e!=NULL)&&(h->LTyp()==LIST_CMD)) 1432 { 1433 return assumeStdFlag(h->LData()); 1431 if (h->e!=NULL) 1432 { 1433 leftv hh=h->LData(); 1434 if (h!=hh) return assumeStdFlag(h->LData()); 1434 1435 } 1435 1436 if (!hasFlag(h,FLAG_STD)) -
Singular/test.cc
r7a979b r5c5b5f 118 118 #include <kernel/spectrum/GMPrat.h> 119 119 120 // #include "htmlhelp.h" // For Windows //121 120 #include <kernel/combinatorics/hutil.h> 122 121 // #include <kernel/Ideal.h> // Too old? … … 202 201 #include <Singular/links/silink.h> 203 202 #include <Singular/links/sing_dbm.h> 204 #include <Singular/sing_win.h>205 203 #include <Singular/links/slInit.h> 206 204 #include <Singular/links/ssiLink.h> -
Tst/Short.lst
rdf34b17 r5c5b5f 137 137 Short/bug_tr489.tst 138 138 Short/bug_tr549.tst 139 Short/bug_tr595.tst 139 140 Short/bug_tr628.tst 140 141 Short/bug_x_i_j.tst -
Tst/Short/bug_613.res.gz.uu
r7a979b r5c5b5f 1 begin 6 44 bug_613.res.gz2 M'XL(" &KQVU,``V)U9U\V,3,N<F5S`(5476^;,!1]SZ\XBO8`"Z&8KZ2C1-JT3 M /53:JJE9GRNG(=G5P$2.LRZJ^M]G`[6I5FE(@(VOC\_'%>L?GZ]O`+`5OEY_4 M PE0=55C39EI,UL-*O(+^>$^"E.<7$_/&:H7-:7^?LR04U6-X5%S9^J1#\J:25 M Q+Z#\AU6NH(=9Z$;YR$.LGT`'6_4S^^2&E+TN[IM6^6)4[.I)*0>!R"A('R[6 M ;1'BR4Z6H7Z`=O`@RI+!QQ-DI4Y2>*PLS7Z_P/-+.8NZ\@&]Z=8M3Q;W6/HT7 M *G!Q\<!/BEKQP:"3)@E>RXIOS]C7[8;7]1G;:D>BV@80+1ZY%$9[&%J\M,/;8 M M1(>E7%!5Z*@V<P*87FW;K6P7HNY&I1HWK]B%T=VU:AMM%BM=9`:^875&/<R9 M W+RGT5?"8RZ86!-P90N74KQT*<67;IQ$0V*J.BJ34[N[TXUQ]JRFA(W"27HF10 M ,#T!J>\27A1P/_@3;`^61=+S0T/BT&I3=1%?SOEBQK,Y3V<\F?/9B'32NX:/11 M Z_7=MR\:3YNOWFHA'B21/]HWN#O$^_(YC9R\=."K$_-(\V`%Z(I%D7Z-8DL'12 M OE9FFMMD\(OJVDBUQZ8NU/_XD+F`1U[(D<ODU&2Q*W9.O&T#^1AM'-C;W+-Q13 I$V2C)L@T\W]R=CB7KC(?>9CK!C`_#O-S.!U-M^%=,?D+?2[*('`$````1 begin 664 bug_613.res.gz 2 M'XL("!0/X%,``V)U9U\V,3,N<F5S`(547V_;(!!_SZ>X67O`<V(9@VDE%TN; 3 MMH=(6S4MZW/E;$Z'%N,(DVU5U>\^,!10IVJ6;,#<';\_9^^^OM]>`P#NX./V 4 M'61ZUN51[+-VM?,[=0?FY:V00J.\7=D1N@[VY[M;ADDIA]_EK'L=XLE2"65* 5 MR+NE5!YKT0["O"GCG)5P4M,W./5J.U_K'Y^5&(46OX8OTZ21D!ID'H(O2G@( 6 MB\O2/$`<`$G.JQP>`-2@STHB&(4\3<=[SN5YW`\*F=V\A<>G5%PMJ6]WNYM/ 7 M'U"UAJS*X!6'65ODR&<O.2&E7E)</1@Y#LPP=3@,4I'$L^7M85*`A(D65[(5 8 M11&H8(<^L*D=)'N-P&%\8_1`..I7UV'?,AXYQX:QYUOE;>!6.SAQS9YQQ<!C 9 M?4A.<(A<24C/)@9;J$=P-)+4T4A"DCGUINIAUM;'Z7!C>N<>!?JD29PD#B)8 10 M\4&9FX,!VN?K/^OOIXC"X7ORU@;UEYO^HNB;34^+GFSZ(@%-O:"1N)ST"UU& 11 MJCQ)]$H_,Y32R(]ZP,9=)`R0J@5QA2L[)!93#SCP;*+'\%,<CY9K.+:)!O]' 12 MB(;&R"B&2F06D4W#8G"4XJ6O+>V'QL,/SK.T#5C2!LQ`_\?I4(>1)#(1D9D6 13 6L'\7^P<YS[;?X'6[^@NK.FULE00````` 14 14 ` 15 15 end -
Tst/Short/bug_613.stat
r7a979b r5c5b5f 1 1 >> tst_memory_0 :: 140 6923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:2811842 1 >> tst_memory_1 :: 140 6923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:23633923 1 >> tst_memory_2 :: 140 6923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:23633924 1 >> tst_timer_1 :: 140 6923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:621 1 >> tst_memory_0 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:283252 2 1 >> tst_memory_1 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2322432 3 1 >> tst_memory_2 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2322432 4 1 >> tst_timer_1 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:98 -
Tst/Short/bug_613.tst
r7a979b r5c5b5f 4 4 5 5 6 proc isNthPrimitiveRoot(number root,int n)6 proc parIsNthPrimitiveRoot(int n) 7 7 { 8 if ( n==1 ) { return(1==root); } 9 number m=root; 10 int i; //caution: if i is already globally defined, no warning... 11 for (i=2;i<n;i++) 8 if (n==0) { return( minpoly==number(0) ); } 9 ASSUME(0, "0" != string(minpoly) ); 10 number m=1; 11 int i; 12 for (i=1;i<n;i++) 12 13 { 13 m = m* root;14 m = m*par(1); 14 15 if (m==1) {return(0);} 15 16 } 17 ASSUME(0, 1 == m*par(1) ); 16 18 return (1); 17 19 } … … 23 25 ring rng = (0,a),x,dp; 24 26 minpoly = (a8-a7+a5-a4+a3-a+1); 25 ASSUME(0, not isNthPrimitiveRoot(a,30));27 ASSUME(0, not parIsNthPrimitiveRoot(30)); 26 28 int i; 27 29 28 for(i = 1; i<100; i++)30 for(i = 0; i<100; i++) 29 31 { 30 32 kill rng; 31 33 ring rng = (0,a),x,dp; 32 34 minpoly = rootofUnity(i); 33 ASSUME(0, isNthPrimitiveRoot(a,i) );35 ASSUME(0, parIsNthPrimitiveRoot(i) ); 34 36 } 35 37 } -
Tst/Short/ok_s.lst
r7a979b r5c5b5f 15 15 bug_tr630 16 16 bug_tr640 17 bug_tr650 17 18 bug_genus_etc 18 19 facstd -
doc/COPYING.texi
r7a979b r5c5b5f 34 34 35 35 Some single files have a copyright given within the file: 36 Singular/ndbm.* (BSD) , Singular/htmlhelp.h (LGPL 2.1+)36 Singular/ndbm.* (BSD) 37 37 38 38 The following software modules shipped with @sc{Singular} have their own copyright: -
doc/NEWS.texi
r7a979b r5c5b5f 23 23 24 24 Version 4-0-1 is a bug fix release. 25 New feature: attribute @code{ring_cf} for @code{ring}. 25 26 26 27 @heading News for version 4-0-0 -
doc/changes_in_singular4.texi
r7a979b r5c5b5f 6 6 7 7 @menu 8 * Version schema for Singular:: 8 9 * Notes for Singular users:: 9 10 * Notes for developers:: … … 11 12 @end menu 12 13 13 14 @c --------------------------------------------------------------------------- 15 @node Notes for Singular users, Notes for developers, , Singular 3 and Singular 4 14 @c --------------------------------------------------------------------------- 15 @node Version schema for Singular, Notes for Singular users, , Singular 3 and Singular 4 16 @subsection Version schema for Singular 17 @cindex Version schema for Singular 18 @cindex Version number 19 20 @sc{Singular} version is of the form @code{a.b.c.d} which may also be written 21 as @code{a-b-c-d} where a,b,c and d are numbers: 22 @itemize 23 @item a is changed with major, incompatible changes 24 @item b is changed with incompatible changes (of some commands/libraries) 25 @item c is changed with compatible chnages (i.e. new commands, 26 extended options, new algorithms, etc.) 27 @item d is changed with each release (i.e. with bug fixes, etc.) 28 @end itemize 29 @sc{Singular} does also have "inofficiall" build orginating from 30 a code version between "officiall" version: such builds display 31 "Development version a.b.c" in the header while "official" versions 32 show "version a.b.c". Also the manual describes version a-b-c. 33 To get the complete version number, use 34 @code{system("version");} or use @code{SINGULAR_VERSION} in C. 35 36 @c --------------------------------------------------------------------------- 37 @node Notes for Singular users, Notes for developers, Version schema for Singular, Singular 3 and Singular 4 16 38 @subsection Notes for Singular users 17 39 @cindex Notes for Singular users -
factory/cfCharSets.cc
r7a979b r5c5b5f 550 550 { // search for a non linear elem 551 551 qs= facAlgFunc2 (i.getItem(), as); 552 if (qs.getFirst().factor().inCoeffDomain()) 553 qs.removeFirst(); 554 if (qs.length() > 1 || qs.getFirst().exp() > 1) 555 { //found elem is reducible 556 reducible= i.getItem(); 557 indexRed= nr + 1; 558 break; 559 } 552 if (qs.length() > 0) 553 { 554 if (qs.getFirst().factor().inCoeffDomain()) 555 qs.removeFirst(); 556 if (qs.length() > 1 || qs.getFirst().exp() > 1) 557 { //found elem is reducible 558 reducible= i.getItem(); 559 indexRed= nr + 1; 560 break; 561 } 562 } 560 563 } 561 564 } -
kernel/mod2.h
r7a979b r5c5b5f 13 13 # include <singularconfig.h> 14 14 15 # include <misc/auxiliary.h>15 //# include <misc/auxiliary.h> 16 16 17 17 #define SINGULAR_MAJOR_VERSION 4 … … 24 24 #else 25 25 #define SINGULAR_MINOR_VERSION 0 26 #define SINGULAR_SUB_VERSION 026 #define SINGULAR_SUB_VERSION 1 27 27 #endif 28 28 #define S_ROOT_DIR "" -
kernel/oswrapper/feread.cc
r7a979b r5c5b5f 14 14 15 15 //---------------------------------------- 16 #ifdef ix86_Win16 #ifdef __CYGWIN__ 17 17 #define READLINE_STATIC 18 18 #endif -
kernel/oswrapper/fereadl.c
r7a979b r5c5b5f 190 190 else 191 191 { 192 #ifndef ix86_Win192 #ifndef __CYGWIN__ 193 193 extern char *BC; 194 194 extern char *UP; -
kernel/spectrum/semic.cc
r7a979b r5c5b5f 24 24 25 25 #include <string.h> 26 27 #ifndef ix86_Win28 //#include<values.h>29 #endif30 26 31 27 #include <misc/intvec.h> -
libpolys/COPYING
r7a979b r5c5b5f 18 18 19 19 Some single files have a copyright given within the file: 20 Singular/ndbm.* (BSD) , Singular/htmlhelp.h (LGPL 2.1+)20 Singular/ndbm.* (BSD) 21 21 22 22 The following software used with SINGULAR have their own copyright: the -
m4/gfanlib-check.m4
r7a979b r5c5b5f 25 25 BACKUP_LIBS=$LIBS 26 26 27 LIBS=" -lcddgmp $GMP_LIBS $LIBS"27 LIBS="$LIBS -lcddgmp $GMP_LIBS " 28 28 29 AC_LANG_PUSH(C ++)29 AC_LANG_PUSH(C) 30 30 AC_LINK_IFELSE( 31 31 [ 32 32 AC_LANG_PROGRAM( 33 33 [ 34 #define GMPRATIONAL 34 35 #ifdef HAVE_SETOPER_H 35 36 # include <setoper.h> … … 44 45 # include <cddlib/cdd.h> 45 46 #endif 46 ], [dd_set_global_constants()] ) 47 ], [dd_set_global_constants(); dd_log=dd_FALSE; ] 48 ) 47 49 ], 48 [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp "],50 [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp $GMP_LIBS"] [CDDGMPCPPFLAGS="-DGMPRATIONAL"], 49 51 [PASSED_ALL_TESTS_FOR_GFANLIB="0"] 50 52 ) … … 53 55 LIBS=$BACKUP_LIBS 54 56 55 AC_MSG_RESULT(no)56 57 AC_SUBST(CDDGMPLDFLAGS)58 57 else 59 AC_MSG_RESULT(no)60 58 PASSED_ALL_TESTS_FOR_GFANLIB="0" 61 59 fi 62 60 61 if test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1; then 62 AC_MSG_RESULT(yes) 63 AC_SUBST(CDDGMPLDFLAGS) 64 AC_SUBST(CDDGMPCPPFLAGS) 65 else 66 AC_MSG_RESULT(no) 67 fi 63 68 64 69 AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1) -
resources/feFopen.cc
r7a979b r5c5b5f 53 53 { 54 54 const char* home = getenv("HOME"); 55 #ifdef ix86_Win55 #ifdef __CUGWIN__ 56 56 if ((home==NULL)||(!access(home,X_OK))) 57 57 home = getenv("SINGHOME"); … … 166 166 FILE* myfopen(const char *path, const char *mode) 167 167 { 168 #if (defined( CYGWIN) || defined(ix86_Win))168 #if (defined(__CUGWIN__)) 169 169 char mmode[4]; 170 170 int i; -
resources/feResource.cc
r7a979b r5c5b5f 87 87 {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%D/doc/singular.idx", (char *)""}, 88 88 {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%D/singular/html", (char *)""}, 89 #ifdef ix86_Win90 {"HtmlHelpFile",'C', feResFile, "SINGULAR_CHM_FILE", "%r/doc/Manual.chm", (char *)""},91 #endif92 89 {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "http://www.singular.uni-kl.de/Manual/", (char *)""}, 93 90 {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""}, … … 100 97 {"EmacsDir", 'e', feResDir, "ESINGULAR_EMACS_DIR", "%D/singular/emacs", (char *)""}, 101 98 {"SingularXterm",'M', feResBinary,"TSINGULAR_SINGULAR", "%b/Singular", (char *)""}, 102 #ifdef ix86_Win99 #ifdef __CYGWIN__ 103 100 {"rxvt", 'X', feResBinary,"RXVT", "%b/rxvt", (char *)""}, 104 101 #else … … 130 127 static void mystrcpy(char* d, char* s); 131 128 static char* feSprintf(char* s, const char* fmt, int warn = -1); 132 #if defined( ix86_Win) && defined(__GNUC__)129 #if defined(__CYGWIN__) && defined(__GNUC__) 133 130 // utility function of Cygwin32: 134 131 extern "C" int cygwin32_posix_path_list_p (const char *path); … … 167 164 void feInitResources(const char* argv0) 168 165 { 169 #if defined(ix86_Win) && defined(__GNUC__)170 if (cygwin32_posix_path_list_p (getenv("PATH")))171 fePathSep = ':';172 #endif173 166 if (argv0==NULL) 174 167 { … … 407 400 return NULL; 408 401 } 409 #ifdef ix86_Win// stupid WINNT sometimes gives you argv[0] within ""402 #ifdef __CYGWIN__ // stupid WINNT sometimes gives you argv[0] within "" 410 403 if (*feArgv0 == '"') 411 404 { … … 471 464 printf("Clean value:%s\n", value); 472 465 #endif 473 #ifdef ix86_Win466 #ifdef __CYGWIN__ 474 467 #ifdef RESOURCE_DEBUG 475 468 printf("Clean WINNT value:%s\n", value); -
resources/feResource.h
r7a979b r5c5b5f 55 55 extern char* feArgv0; 56 56 57 const char fePathSep = 58 /* not really cygwin, applies to all windows systems:*/ 59 #if (defined(CYGWIN) || defined(ix86_Win)) 60 ';' 61 #else 62 ':' 63 #endif 64 ; 65 66 57 const char fePathSep = ':' ; 67 58 68 59 #endif
Note: See TracChangeset
for help on using the changeset viewer.