- Timestamp:
- Dec 2, 2021, 3:25:27 PM (2 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 273a2f1fd6fae79d6cfdd19dacabce628fa15ee6
- Parents:
- b67904c91e15359f47b0d5e377ffe945a966c8ff
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/intprog.lib
rb67904 rc31a71 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="version intprog.lib 4.2.1. 0Nov_2021 "; // $Id$2 version="version intprog.lib 4.2.1.2 Nov_2021 "; // $Id$ 3 3 category="Commutative Algebra"; 4 4 info=" … … 96 96 97 97 // call external program 98 int dummy=system("sh",system("SingularBin")+" /solve_IP -alg "+alg+" "+matrixfile+" "+problemfile);98 int dummy=system("sh",system("SingularBin")+"solve_IP -alg "+alg+" "+matrixfile+" "+problemfile); 99 99 100 100 // read solution from created file … … 259 259 260 260 // call external program 261 int dummy=system("sh",system("SingularBin")+" /solve_IP -alg "+alg+" "+matrixfile+" "+problemfile);261 int dummy=system("sh",system("SingularBin")+"solve_IP -alg "+alg+" "+matrixfile+" "+problemfile); 262 262 263 263 // read solution from created file … … 406 406 407 407 // call external program 408 int dummy=system("sh",system("SingularBin")+" /solve_IP -alg "+alg+" "+matrixfile+" "+problemfile);408 int dummy=system("sh",system("SingularBin")+"solve_IP -alg "+alg+" "+matrixfile+" "+problemfile); 409 409 410 410 // read solution from created file … … 552 552 553 553 // call external program 554 int dummy=system("sh",system("SingularBin")+" /solve_IP -alg "+alg+" "+matrixfile+" "+problemfile);554 int dummy=system("sh",system("SingularBin")+"solve_IP -alg "+alg+" "+matrixfile+" "+problemfile); 555 555 556 556 // read solution from created file -
Singular/LIB/toric.lib
rb67904 rc31a71 1 1 /////////////////////////////////////////////////////////////////////////// 2 version="version toric.lib 4.2.1. 0Nov_2021 "; // $Id$2 version="version toric.lib 4.2.1.2 Nov_2021 "; // $Id$ 3 3 category="Commutative Algebra"; 4 4 info=" … … 274 274 275 275 // call external program 276 dummy=system("sh",system("SingularBin")+" /toric_ideal -alg "+alg+" "+matrixfile);276 dummy=system("sh",system("SingularBin")+"toric_ideal -alg "+alg+" "+matrixfile); 277 277 if (dummy!=0) { ERROR("toric_ideal failed with error code "+string(dummy)); } 278 278 … … 587 587 588 588 // call external program 589 dummy=system("sh",system("SingularBin")+" /toric_ideal -alg "+alg+" "+matrixfile);589 dummy=system("sh",system("SingularBin")+"toric_ideal -alg "+alg+" "+matrixfile); 590 590 if (dummy!=0) { ERROR("toric_ideal failed with error code "+string(dummy)); } 591 591 … … 1000 1000 1001 1001 // call external program 1002 dummy=system("sh",system("SingularBin")+" /change_cost "+groebnerfile+" "+newcostfile);1002 dummy=system("sh",system("SingularBin")+"change_cost "+groebnerfile+" "+newcostfile); 1003 1003 if (dummy!=0) { ERROR("change_cost failed with error code "+string(dummy)); } 1004 1004 -
Singular/extra.cc
rb67904 rc31a71 663 663 if (r == NULL) r="/usr/local"; 664 664 int l=strlen(r); 665 /* where to find Singular's programs: */ 666 #define SINGULAR_PROCS_DIR "/libexec/singular/MOD" 667 int ll=si_max(strlen(SINGULAR_PROCS_DIR),strlen(LIBEXEC_DIR)); 668 char *s=(char*)omAlloc(l+ll+2); 665 669 if ((strstr(r,".libs/..")==NULL) /*not installed Singular (libtool)*/ 666 670 &&(strstr(r,"Singular/..")==NULL)) /*not installed Singular (static)*/ 667 671 { 668 /* where to find Singular's programs: */669 #define SINGULAR_PROCS_DIR "/libexec/singular/MOD"670 char *s=(char*)omAlloc(l+strlen(SINGULAR_PROCS_DIR)+1);671 672 strcpy(s,r); 672 673 strcat(s,SINGULAR_PROCS_DIR); 673 674 if (access(s,X_OK)==0) 674 res->data = (void*)s; 675 { 676 strcat(s,"/"); 677 } 675 678 else 676 679 { 677 680 /*second try: LIBEXEC_DIR*/ 678 omFree(s); s=omStrDup(LIBEXEC_DIR);681 strcpy(s,LIBEXEC_DIR); 679 682 if (access(s,X_OK)==0) 680 res->data = (void*)s; 683 { 684 strcat(s,"/"); 685 } 681 686 else 682 687 { 683 688 s[0]='\0'; 684 res->data = (void*)s;685 689 } 686 690 } … … 689 693 { 690 694 const char *r=feResource('b'); 691 if (r == NULL) r=""; 692 res->data = (void*) omStrDup( r ); 693 } 695 if (r == NULL) 696 { 697 s[0]='\0'; 698 } 699 else 700 { 701 strcpy(s,r); 702 strcat(s,"/"); 703 } 704 } 705 res->data = (void*)s; 694 706 return FALSE; 695 707 }
Note: See TracChangeset
for help on using the changeset viewer.