Changeset 9ea9c6 in git
- Timestamp:
- Jul 11, 1997, 4:27:57 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 78e2fd353351fad2ced81920069a197077b3eef3
- Parents:
- f2b175c3ca843efa6cb54c3b7d3e27e9a8a9f39b
- Location:
- Singular
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
rf2b175c r9ea9c6 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: extra.cc,v 1.1 5 1997-07-10 13:02:35Singular Exp $ */4 /* $Id: extra.cc,v 1.16 1997-07-11 14:27:52 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: general interface to internals of Singular ("system" command) … … 123 123 if (h->next==NULL) 124 124 { 125 char with_str[]=""126 #ifdef DRING127 "DRING "128 #endif129 #ifdef HAVE_DBM130 "DBM "131 #endif132 #ifdef HAVE_DLD133 "DLD "134 #endif135 #ifdef HAVE_GMP136 "gmp "137 #endif138 #ifdef HAVE_FACTORY139 "factory "140 #endif141 #ifdef HAVE_LIBFAC_P142 "libfac "143 #endif144 #ifdef HAVE_MPSR145 "MP "146 #endif147 #ifdef HAVE_READLINE148 "readline "149 #endif150 #ifdef HAVE_TCL151 "tcl "152 #endif153 #ifdef SRING154 "SRING "155 #endif156 ;157 125 res->rtyp=STRING_CMD; 158 char *s=mstrdup(with_str); 159 s[strlen(s)-1]='\0'; 160 res->data=(void *)s; 126 res->data=(void *)mstrdup(versionString()); 161 127 return FALSE; 162 128 } -
Singular/iparith.cc
rf2b175c r9ea9c6 1165 1165 pDelete1(&p); 1166 1166 if (p==NULL) break; 1167 } 1167 } 1168 1168 } 1169 1169 pDelete1(&r); … … 2004 2004 ,{fglmProc, FGLM_CMD, IDEAL_CMD, RING_CMD, DEF_CMD PROFILER} 2005 2005 ,{fglmProc, FGLM_CMD, IDEAL_CMD, QRING_CMD, DEF_CMD PROFILER} 2006 #else 2006 #else 2007 2007 ,{jjWRONG2, FGLM_CMD, IDEAL_CMD, RING_CMD, DEF_CMD PROFILER} 2008 2008 ,{jjWRONG2, FGLM_CMD, IDEAL_CMD, QRING_CMD, DEF_CMD PROFILER} … … 2298 2298 if(i==j) 2299 2299 res->data = (char *)singclap_det_i(m); 2300 else 2300 else 2301 2301 { 2302 2302 Werror("det of %d x %d intmat",i,j); 2303 2303 return TRUE; 2304 } 2304 } 2305 2305 return FALSE; 2306 2306 } … … 2475 2475 res->data=(char *)syConvList((lists)v->Data()); 2476 2476 return FALSE; 2477 } 2477 } 2478 2478 static BOOLEAN jjLEADCOEF(leftv res, leftv v) 2479 2479 { … … 3384 3384 memcpy(v->next,w,sizeof(sleftv)); 3385 3385 BOOLEAN r=iiExprArith2(res,u,'(',v); 3386 v->rtyp=0; v->data=NULL; 3386 v->rtyp=0; v->data=NULL; 3387 3387 w->rtyp=0; w->data=NULL; 3388 3388 return r; … … 4009 4009 int i; 4010 4010 int rt; 4011 4011 4012 4012 L->Init(sl); 4013 4013 for (i=0;i<sl;i++) … … 4038 4038 L->m[i].Copy(h); 4039 4039 } 4040 } 4040 } 4041 4041 res->data=(char *)L; 4042 4042 return FALSE; … … 4063 4063 Print("%-20s",cmds[i].name); 4064 4064 i++; 4065 if(cmds[i].name==NULL) 4065 if(cmds[i].name==NULL) 4066 4066 break; 4067 4067 if ((i%3)==1) PrintLn(); -
Singular/ipshell.h
rf2b175c r9ea9c6 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ipshell.h,v 1. 8 1997-07-09 15:54:02Singular Exp $ */6 /* $Id: ipshell.h,v 1.9 1997-07-11 14:27:55 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 149 149 BOOLEAN setOption(leftv res, leftv v); 150 150 /* ================================================================== */ 151 char * versionString(); 151 152 #endif 152 153 -
Singular/misc.cc
rf2b175c r9ea9c6 33 33 #endif 34 34 35 /* version strings */ 36 #ifdef HAVE_LIBFAC_P 37 extern const char * libfac_version; 38 extern const char * libfac_date; 39 #endif 40 #ifdef HAVE_GMP 41 extern "C" { 42 #include <gmp.h> 43 } 44 #endif 45 #ifdef HAVE_MPSR 46 #include <MP_Config.h> 47 #endif 48 35 49 /*0 implementation*/ 36 50 … … 57 71 #ifdef HAVE_FACTORY 58 72 factoryseed(t); 59 #endif 73 #endif 60 74 /*4 private data of other modules*/ 61 75 I_FEbase(); … … 382 396 strstr[0]='\0'; 383 397 else 384 sprintf(strstr," Index \"%s\"",str); 398 sprintf(strstr," Index \"%s\"",str); 385 399 if (!access(tmp, R_OK)) 386 400 { … … 493 507 { 494 508 v=v->next; 495 intvec *w=(intvec*)v->Data(); 509 intvec *w=(intvec*)v->Data(); 496 510 test=(*w)[0]; 497 511 verbose=(*w)[1]; 498 512 499 513 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) && (currRing->ch>=2)) 500 514 { … … 502 516 } 503 517 goto okay; 504 } 518 } 505 519 } 506 520 if(strcmp(n,"none")==0) … … 509 523 verbose=0; 510 524 goto okay; 511 } 525 } 512 526 for (i=0; (i==0) || (optionStruct[i-1].setval!=0); i++) 513 527 { … … 566 580 FreeL((ADDRESS)n); 567 581 v=v->next; 568 } while (v!=NULL); 582 } while (v!=NULL); 569 583 return FALSE; 570 584 } … … 630 644 } 631 645 #endif 646 647 char * versionString() 648 { 649 StringSet(""); 650 #ifdef HAVE_FACTORY 651 StringAppend("\tfactory (%s),\n", factoryVersion); 652 #endif 653 #ifdef HAVE_LIBFAC_P 654 StringAppend("\tlibfac(%s,%s),\n",libfac_version,libfac_date); 655 #endif 656 #ifdef SRING 657 StringAppend("\tsuper algebra,\n"); 658 #endif 659 #ifdef DRING 660 StringAppend("\tWeyl algebra,\n"); 661 #endif 662 #ifdef HAVE_GMP 663 #if defined (__GNU_MP_VERSION) && defined (__GNU_MP_VERSION_MINOR) 664 StringAppend("\tGMP(%d.%d),\n",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR); 665 #elif defined (HAVE_SMALLGMP) 666 StringAppend("\tSmallGMP(2.0.2.0),\n"); 667 #else 668 StringAppend("\tGMP(1.3),\n"); 669 #endif 670 #endif 671 #ifdef HAVE_DBM 672 StringAppend("\tDBM,\n"); 673 #endif 674 #ifdef HAVE_MPSR 675 StringAppend("\tMP(%s),\n",MP_VERSION); 676 #endif 677 #if defined(HAVE_READLINE) && !defined(FEREAD) 678 StringAppend("\tlibreadline,\n"); 679 #endif 680 #ifdef HAVE_FEREAD 681 StringAppend("\temulated libreadline,\n"); 682 #endif 683 #ifdef HAVE_INFO 684 StringAppend("\tinfo,\n"); 685 #else 686 StringAppend("\twithout info,\n"); 687 #endif 688 #ifdef TEST 689 StringAppend("\tTESTs,\n"); 690 #endif 691 #if YYDEBUG 692 StringAppend("\tYYDEBUG=1,\n"); 693 #endif 694 #ifdef MDEBUG 695 StringAppend("\tMDEBUG=%d,\n",MDEBUG); 696 #endif 697 #ifndef __OPTIMIZE__ 698 StringAppend("\t-g,\n"); 699 #endif 700 StringAppend("\trandom=%d\n",siRandomStart); 701 #ifdef MSDOS 702 char *p=getenv("SPATH"); 703 #else 704 char *p=getenv("SINGULARPATH"); 705 #endif 706 if (p!=NULL) 707 return StringAppend("search path:%s:%s",p,SINGULAR_DATADIR); 708 else 709 return StringAppend("search path:%s", SINGULAR_DATADIR); 710 } -
Singular/tesths.cc
rf2b175c r9ea9c6 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: tesths.cc,v 1.2 4 1997-07-11 11:10:12 obachmanExp $ */4 /* $Id: tesths.cc,v 1.25 1997-07-11 14:27:57 Singular Exp $ */ 5 5 6 6 /* … … 27 27 #include "silink.h" 28 28 #include "timer.h" 29 30 /* version strings */31 29 #ifdef HAVE_FACTORY 32 30 #define SI_DONT_HAVE_GLOBAL_VARS 33 31 #include <factory.h> 34 32 #endif 35 #ifdef HAVE_LIBFAC_P 36 extern const char * libfac_version; 37 extern const char * libfac_date; 38 #endif 39 #ifdef HAVE_GMP 40 extern "C" { 41 #include <gmp.h> 42 } 43 #endif 44 #ifdef HAVE_MPSR 45 #include <MP_Config.h> 46 #endif 33 47 34 48 35 /*0 implementation*/ … … 69 56 int i; 70 57 thisfile = argv[0]; 58 BOOLEAN load_std_lib=TRUE; 71 59 /*. process parameters */ 72 60 for (;(argc > 1) && (!feBatch); --argc, ++argv) … … 78 66 { 79 67 char* ptr = NULL; 80 #ifdef HAVE_STRTOD 68 #ifdef HAVE_STRTOD 81 69 double mintime = strtod(argv[2], &ptr); 82 70 if (errno != ERANGE && ptr != argv[2]) … … 102 90 else 103 91 { 104 92 105 93 if ((argv[1][0] != '-') ||(argv[1][1] == '-')) 106 94 break; … … 115 103 SINGULAR_VERSION_ID,__DATE__,__TIME__); 116 104 printf("with\n"); 117 #ifdef HAVE_FACTORY 118 printf("\tfactory (%s),\n", factoryVersion); 119 #endif 120 #ifdef HAVE_LIBFAC_P 121 printf("\tlibfac(%s,%s),\n",libfac_version,libfac_date); 122 #endif 123 #ifdef SRING 124 printf("\tsuper algebra,\n"); 125 #endif 126 #ifdef DRING 127 printf("\tWeyl algebra,\n"); 128 #endif 129 #ifdef HAVE_GMP 130 #if defined (__GNU_MP_VERSION) && defined (__GNU_MP_VERSION_MINOR) 131 printf("\tGMP(%d.%d),\n",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR); 132 #elif defined (HAVE_SMALLGMP) 133 printf("\tSmallGMP(2.0.2.0),\n"); 134 #else 135 printf("\tGMP(1.3),\n"); 136 #endif 137 #endif 138 #ifdef HAVE_DBM 139 printf("\tDBM,\n"); 140 #endif 141 #ifdef HAVE_MPSR 142 printf("\tMP(%s),\n",MP_VERSION); 143 #endif 144 #if defined(HAVE_READLINE) && !defined(FEREAD) 145 printf("\tlibreadline,\n"); 146 #endif 147 #ifdef HAVE_FEREAD 148 printf("\temulated libreadline,\n"); 149 #endif 150 #ifdef HAVE_INFO 151 printf("\tinfo,\n"); 152 #else 153 printf("\twithout info,\n"); 154 #endif 155 #ifdef TEST 156 printf("\tTESTs,\n"); 157 #endif 158 #if YYDEBUG 159 printf("\tYYDEBUG=1,\n"); 160 #endif 161 #ifdef MDEBUG 162 printf("\tMDEBUG=%d,\n",MDEBUG); 163 #endif 164 #ifndef __OPTIMIZE__ 165 printf("\t-g,\n"); 166 #endif 167 printf("\trandom=%d\n",siRandomStart); 168 #ifdef MSDOS 169 char *p=getenv("SPATH"); 170 #else 171 char *p=getenv("SINGULARPATH"); 172 #endif 173 if (p!=NULL) 174 printf("search path:%s:%s\n\n",p,SINGULAR_DATADIR); 175 else 176 printf("search path:%s\n\n", SINGULAR_DATADIR); 105 printf(versionString()); 106 printf("\n\n"); 177 107 break; 178 108 } … … 182 112 { 183 113 char* ptr = NULL; 184 #ifdef HAVE_STRTOL 114 #ifdef HAVE_STRTOL 185 115 long res = strtol(argv[2], &ptr, 10); 186 116 if (errno != ERANGE && ptr != argv[2] && res > 0) … … 189 119 sscanf(argv[2],"%d", &res); 190 120 if (res > 0) 191 #endif 121 #endif 192 122 { 193 123 argc--; … … 224 154 #ifdef HAVE_FACTORY 225 155 factoryseed(siRandomStart); 226 #endif 156 #endif 227 157 break; 228 158 case 'x': tclmode=TRUE; … … 237 167 fe_use_fgets=TRUE; 238 168 #endif 169 break; 170 case 'n': 171 load_std_lib=FALSE; 239 172 break; 240 173 default : printf("Unknown option -%c\n",argv[1][i]); … … 245 178 } 246 179 } 247 180 248 181 249 182 /*. say hello */ … … 275 208 dlInit(thisfile); 276 209 myynest=0; 277 iiLibCmd(mstrdup("standard.lib"),TRUE); 210 if (load_std_lib) 211 iiLibCmd(mstrdup("standard.lib"),TRUE); 212 errorreported = 0; 278 213 #ifndef macintosh 279 214 #if defined(HAVE_FEREAD) || defined(HAVE_READLINE)
Note: See TracChangeset
for help on using the changeset viewer.