Changeset 97454d in git
- Timestamp:
- Apr 7, 1998, 8:35:28 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 37e22dccbc1d4231d5dd6c765a95b61021b1266c
- Parents:
- 80ad5e767969bf7b39d2bf33f65964782429ecb1
- Location:
- Singular
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ChangeLog
r80ad5e r97454d 1 1998-04-07 Olaf Bachmann <obachman@mathematik.uni-kl.de> 2 3 * mpsr_Put.cc (mpsr_PutDump): dump does not dump LIB string any more 4 5 * extra.cc (jjSYSTEM): added System("whoami") to return full 6 executable pathname of running Singular 7 1 8 Tue Apr 7 10:27:50 MET DST 1998 hannes 2 9 * fixed scanner bug: ignoring { and } in <block> (scanner.l) -
Singular/extra.cc
r80ad5e r97454d 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: extra.cc,v 1.3 3 1998-04-06 17:59:27obachman Exp $ */4 /* $Id: extra.cc,v 1.34 1998-04-07 18:35:21 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: general interface to internals of Singular ("system" command) … … 245 245 #endif 246 246 #endif 247 #if 0248 247 /*==================== whoami ==================================*/ 249 248 if (strcmp((char*)(h->data), "whoami") == 0) 250 249 { 251 res->rtype=STRING_CMD; 252 } 253 #endif 250 res->rtyp=STRING_CMD; 251 res->data=(void*)feGetExpandedExecutable(); 252 if (res->data != NULL) 253 res->data = mstrdup((char*) res->data); 254 else 255 res->data = mstrdup(""); 256 return FALSE; 257 } 254 258 /*==================== HC ==================================*/ 255 259 if (strcmp((char*)(h->data),"HC")==0) -
Singular/febase.cc
r80ad5e r97454d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.cc,v 1.2 7 1998-04-06 17:59:27obachman Exp $ */4 /* $Id: febase.cc,v 1.28 1998-04-07 18:35:22 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: i/o system … … 103 103 #endif /* macintosh */ 104 104 105 extern "C" char* find_executable _path(const char* argv0);105 extern "C" char* find_executable(const char* argv0); 106 106 107 107 #define SINGULAR_RELATIVE_DATA_DIR "LIB" 108 108 109 109 static char* SearchPath = NULL; 110 static char* ExpandedExecutable = NULL; 111 112 char* feGetExpandedExecutable(const char* argv0) 113 { 114 if (ExpandedExecutable == NULL) 115 { 116 if (argv0 != NULL) 117 ExpandedExecutable = find_executable(argv0); 118 } 119 return ExpandedExecutable; 120 } 121 122 static char* feRemovePathnameHead(const char* ef) 123 { 124 if (ef != NULL) 125 { 126 char *temp, *temp2, *temp3; 127 128 temp2 = mstrdup(ef); 129 temp3 = temp2; 130 temp = NULL; 131 while (*temp3 != '\0') 132 { 133 if (*temp3 == DIR_SEP) temp = temp3; 134 temp3++; 135 } 136 if (temp != NULL) 137 { 138 *temp = '\0'; 139 } 140 return temp2; 141 } 142 else 143 return NULL; 144 } 145 110 146 111 147 // Return the file search path for singular w.r.t. the following priorities: … … 125 161 126 162 if (argv0 != NULL) 127 sibbling = f ind_executable_path(argv0);163 sibbling = feRemovePathnameHead(feGetExpandedExecutable(argv0)); 128 164 129 165 if (env != NULL) -
Singular/febase.h
r80ad5e r97454d 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: febase.h,v 1.1 0 1998-04-06 17:59:28obachman Exp $ */6 /* $Id: febase.h,v 1.11 1998-04-07 18:35:23 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 66 66 67 67 char* feGetSearchPath(const char* argv0 = NULL); 68 char* feGetExpandedExecutable(const char* argv0 = NULL); 68 69 FILE * feFopen(char *path, char *mode, char *where=NULL, int useWerror=FALSE); 69 70 void fePause(void); -
Singular/find_exec.c
r80ad5e r97454d 171 171 } 172 172 173 char* find_executable_path(const char *name)174 {175 char *ef = find_executable(name);176 char *temp, *temp2;177 178 temp2 = ef;179 if (ef != NULL)180 {181 temp = NULL;182 while (*ef != '\0')183 {184 if (*ef == '/') temp = ef;185 ef++;186 }187 if (temp != NULL)188 {189 *temp = '\0';190 }191 }192 return temp2;193 }194 195 196 173 #else 197 174 … … 201 178 } 202 179 203 char* find_executable_path(const char *name)204 {205 return NULL;206 }207 208 180 #endif /* #if ! defined(MSDOS) && ! defined(macintosh) && defined(HAVE_SYS_TYPES_H) && defined(HAVE_PWD_H)&&defined(HAVE_SYS_PARAM_H) */ 209 181 -
Singular/misc.cc
r80ad5e r97454d 675 675 StringSet("\t"); 676 676 #ifdef HAVE_FACTORY 677 StringAppend("factory 677 StringAppend("factory(%s),", factoryVersion); 678 678 #endif 679 679 #ifdef HAVE_LIBFAC_P -
Singular/mpsr_Get.cc
r80ad5e r97454d 3 3 ****************************************/ 4 4 5 /* $Id: mpsr_Get.cc,v 1.1 4 1997-12-03 16:58:54obachman Exp $ */5 /* $Id: mpsr_Get.cc,v 1.15 1998-04-07 18:35:25 obachman Exp $ */ 6 6 /*************************************************************** 7 7 * … … 171 171 { 172 172 number n = (number) Alloc(sizeof(rnumber)); 173 173 #ifdef LDEBUG 174 n->debug=123456; 175 #endif 174 176 mlv->r = mpsr_rDefault(0); 175 177 n->s = 3; … … 846 848 mpsr_Status_t status = mpsr_Success; 847 849 848 MP_SkipMsg(link);849 while (( ! MP_TestEofMsg(link)) && (status == mpsr_Success))850 status = (MP_InitMsg(link) == MP_Success ? mpsr_Success : mpsr_MP_Failure); 851 while ((status == mpsr_Success) && (! MP_TestEofMsg(link))) 850 852 { 851 853 status=mpsr_GetLeftv(link, &mlv, 0); -
Singular/mpsr_GetPoly.cc
r80ad5e r97454d 3 3 ****************************************/ 4 4 5 /* $Id: mpsr_GetPoly.cc,v 1.1 4 1998-03-27 14:44:25obachman Exp $ */5 /* $Id: mpsr_GetPoly.cc,v 1.15 1998-04-07 18:35:26 obachman Exp $ */ 6 6 7 7 /*************************************************************** … … 242 242 mpz_ptr gnum; 243 243 y = (number) Alloc0(sizeof(rnumber)); 244 #ifdef LDEBUG 245 y->debug = 123456; 246 #endif 244 247 y->s = 3; 245 248 gnum = &(y->z); … … 260 263 *x = (number) Alloc0(sizeof(rnumber)); 261 264 y = (number) *x; 265 #ifdef LDEBUG 266 y->debug = 123456; 267 #endif 262 268 y->s = 1; 263 269 failr(GetApInt(link, &(y->z))); … … 282 288 *x = (number) Alloc0(sizeof(rnumber)); 283 289 y = (number) *x; 290 #ifdef LDEBUG 291 y->debug = 123456; 292 #endif 284 293 mpz_init_set_ui(&(y->z), ui); 285 294 y->s = 3; -
Singular/mpsr_Put.cc
r80ad5e r97454d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: mpsr_Put.cc,v 1. 7 1998-01-16 14:29:55 kruegerExp $ */4 /* $Id: mpsr_Put.cc,v 1.8 1998-04-07 18:35:27 obachman Exp $ */ 5 5 6 6 … … 534 534 #endif 535 535 } 536 else if (IDTYP(h) != LINK_CMD) 536 // do not dump LIB string and Links 537 else if (!(IDTYP(h) == STRING_CMD && strcmp("LIB", IDID(h)) == 0) && 538 IDTYP(h) != LINK_CMD) 537 539 { 538 540 cmd.arg1.name = IDID(h); -
Singular/silink.cc
r80ad5e r97454d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: silink.cc,v 1.1 5 1998-02-27 16:28:01 SingularExp $ */4 /* $Id: silink.cc,v 1.16 1998-04-07 18:35:27 obachman Exp $ */ 5 5 6 6 /* … … 459 459 460 460 if (currRingHdl != rh) rSetHdl(rh, TRUE); 461 f write("RETURN();\n",1,10,fd);461 fprintf(fd, "RETURN();\n"); 462 462 fflush(fd); 463 463 … … 526 526 if (type_id == QRING_CMD) return DumpQring(fd, h, type_str); 527 527 528 // do not dump LIB string 528 529 if (type_id == STRING_CMD && strcmp("LIB", IDID(h)) == 0) 529 530 { 530 if (fprintf(fd, "LIB \"%s\";\n", IDSTRING(h)) == EOF) return TRUE; 531 else return FALSE; 531 return FALSE; 532 532 } 533 533 … … 646 646 while (*pstr != '\0') 647 647 { 648 if (*pstr == '"' )fputc('\\', fd);648 if (*pstr == '"' || *pstr == '\\') fputc('\\', fd); 649 649 fputc(*pstr, fd); 650 650 pstr++; … … 660 660 fputc('"', fd); 661 661 while (*pstr != '\0') { 662 if (*pstr == '"') fputc('\\', fd);663 664 662 if (*pstr == '"' || *pstr == '\\') fputc('\\', fd); 663 fputc(*pstr, fd); 664 pstr++; 665 665 } 666 666 fputc('"', fd); -
Singular/spSpolyLoop.inc
r80ad5e r97454d 1525 1525 { 1526 1526 assume(pComp0(b, a2) == 1); 1527 assume(pComp0(b,a2) == 1);1528 1527 pSetCoeff0(b,npMultM(pGetCoeff(a1), tneg)); 1529 1528 a = pNext(a) = b; // append b to result and advance a1
Note: See TracChangeset
for help on using the changeset viewer.