Changeset cc0296 in git
- Timestamp:
- Mar 20, 1997, 5:59:58 PM (26 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 577d19f4587e2341d9a42d6800fc5576fceed84d
- Parents:
- 0e184696d061294efc7e95f66a996a5d96f19738
- Location:
- Singular
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/cntrlc.cc
r0e1846 rcc0296 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/cntrlc.cc,v 1. 1.1.1 1997-03-19 13:18:44obachman Exp $";4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/cntrlc.cc,v 1.2 1997-03-20 16:59:30 obachman Exp $"; 5 5 /* $Log: not supported by cvs2svn $ 6 // Revision 1.1.1.1 1997/03/19 13:18:44 obachman 7 // Imported Singular sources 8 // 6 9 */ 7 10 /* … … 25 28 26 29 #ifdef unix 27 #ifndef hpux28 30 #include <unistd.h> 29 31 #include <sys/types.h> … … 32 34 #define INTERACTIVE 0 33 35 #define STACK_TRACE 1 36 #undef __OPTIMIZE__ 34 37 #ifndef __OPTIMIZE__ 35 staticvoid debug (int);38 void debug (int); 36 39 static void debug_stop (char **); 37 40 static void stack_trace (char **); 38 41 static void stack_trace_sigchld (int); 39 #endif40 42 #endif 41 43 #endif … … 375 377 376 378 #ifdef unix 377 #ifndef hpux378 379 #ifndef __OPTIMIZE__ 379 380 #ifndef MSDOS 380 381 int si_stop_stack_trace_x; 381 382 382 staticvoid debug (int method)383 void debug (int method) 383 384 { 384 385 int pid; 385 386 char buf[16]; 387 388 #define HANNES 389 #ifdef HANNES 386 390 char *args[4] = { "gdb", "Singularg", NULL, NULL }; 387 391 #else 392 char *args[4] = { "ddd", "Singularg", NULL, NULL }; 393 #endif 388 394 sprintf (buf, "%d", getpid ()); 389 395 … … 535 541 #endif 536 542 #endif 537 #endif -
Singular/ffields.cc
r0e1846 rcc0296 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/ffields.cc,v 1. 1.1.1 1997-03-19 13:18:44obachman Exp $";4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/ffields.cc,v 1.2 1997-03-20 16:59:31 obachman Exp $"; 5 5 /* $Log: not supported by cvs2svn $ 6 // Revision 1.1.1.1 1997/03/19 13:18:44 obachman 7 // Imported Singular sources 8 // 6 9 */ 7 10 … … 473 476 if (fp==NULL) 474 477 { 475 Werror("cannot open %s",buf); 476 return; 478 sprintf(buf,"../gftables/%d",nfCharQ); 479 fp = feFopen(buf,"r",NULL,TRUE); 480 if (fp == NULL) 481 { 482 Werror("cannot find gftables/%d", nfCharQ); 483 return; 484 } 477 485 } 478 486 if(!fgets( buf, sizeof(buf), fp)) return; -
Singular/fglm.cc
r0e1846 rcc0296 1 1 // emacs edit mode for this file is -*- C++ -*- 2 // $Id: fglm.cc,v 1. 1.1.1 1997-03-19 13:18:45obachman Exp $2 // $Id: fglm.cc,v 1.2 1997-03-20 16:59:33 obachman Exp $ 3 3 //============================================= 4 4 // FGLM - Algorithm … … 1621 1621 //. check if rings are compatible: 1622 1622 if ( currRing->N == destRing->N ) { 1623 maFindPerm( currRing->names, pVariables, NULL, destRing->names, pVariables, NULL, perm, NULL );1623 maFindPerm( currRing->names, pVariables, NULL, destRing->names, pVariables, NULL, 0, perm, NULL ); 1624 1624 for ( int k = 1; state == FglmOk && k <= pVariables; k++ ) 1625 1625 if ( perm[k] <= 0 ) state= FglmIncompatibleRings; -
Singular/iparith.cc
r0e1846 rcc0296 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/iparith.cc,v 1. 1.1.1 1997-03-19 13:18:46 obachman Exp $";4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/iparith.cc,v 1.2 1997-03-20 16:59:36 obachman Exp $"; 5 5 /* $Log: not supported by cvs2svn $ 6 6 */ … … 1409 1409 par_perm=(int *)Alloc0(par_perm_size*sizeof(int)); 1410 1410 maFindPerm(r->names, r->N, r->parameter, 1411 currRing->names,currRing->N,currRing->parameter, 1411 currRing->names,currRing->N,currRing->parameter, currRing->P, 1412 1412 perm,par_perm); 1413 1413 } -
Singular/maps.cc
r0e1846 rcc0296 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/maps.cc,v 1. 1.1.1 1997-03-19 13:18:49 obachman Exp $";4 static char rcsid[] = "$Header: /exports/cvsroot-2/cvsroot/Singular/maps.cc,v 1.2 1997-03-20 16:59:39 obachman Exp $"; 5 5 /* $Log: not supported by cvs2svn $ 6 6 */ … … 271 271 272 272 void maFindPerm(char **preim_names, int preim_n, char **preim_par, 273 char **names, int n, char **par, 273 char **names, int n, char **par, int nop, 274 274 int * perm, int *par_perm) 275 275 { … … 291 291 if ((perm[i+1]==0)&&(par!=NULL)) 292 292 { 293 for(j=0; par[j]!='\0'; j++)293 for(j=0; j<nop; j++) 294 294 { 295 295 if (strcmp(preim_names[i],par[j])==0) … … 320 320 if ((par!=NULL) && (par_perm[i]==0)) 321 321 { 322 for(j=0; par[j]!='\0'; j++)322 for(j=0; j<nop; j++) 323 323 { 324 324 if (strcmp(preim_par[i],par[j])==0) … … 346 346 //int *par_perm=(int *)Alloc0(rPar(r)*sizeof(int)); 347 347 maFindPerm(r->names,r->N, r->parameter, 348 currRing->names,currRing->N,currRing->parameter, 348 currRing->names,currRing->N,currRing->parameter, currRing->P, 349 349 perm,NULL/*par_perm*/); 350 350 poly res=pPermPoly(p,perm,r->N/*,par_perm,rPar(r)*/); -
Singular/maps.h
r0e1846 rcc0296 21 21 int *perm,int N, 22 22 int *par_perm,int P); 23 void maFindPerm(char ** npi, int lpi, char **spi,24 char **n i, int li, char ** si,23 void maFindPerm(char **preim_names, int preim_n, char **preim_par, 24 char **names, int n, char ** par, int nop, 25 25 int * perm, int *par_perm); 26 26 #endif -
Singular/mpsr_Get.cc
r0e1846 rcc0296 283 283 mpsr_sleftv mlv, mlv1; 284 284 mpsr_Status_t status = mpsr_Success; 285 mlv.lv = NULL; 286 mlv.r = NULL; 287 mlv1.lv = NULL; 288 mlv1.r = NULL; 285 289 286 290 MP_SkipMsg(link); … … 819 823 #ifdef MPSR_DEBUG 820 824 command cmd = (command) mlv.lv->data; 821 Print("Dump got %s ", cmd->arg1.name);825 Print("Dump got %s \n", cmd->arg1.name); 822 826 #endif 823 827 mpsr_SetCurrRingHdl(mlv.r); -
Singular/mpsr_Put.cc
r0e1846 rcc0296 123 123 return mpsr_PutMapLeftv(link, v, cring); 124 124 125 case NONE: 126 return mpsr_Success; 127 125 128 default: 126 129 return mpsr_SetError(mpsr_UnknownLeftvType); … … 514 517 while (h != NULL && h2 == NULL) 515 518 { 519 516 520 if (IDTYP(h) == PROC_CMD) 517 521 { … … 521 525 #endif 522 526 } 523 else 527 else if (IDTYP(h) != LINK_CMD) 524 528 { 525 529 cmd.arg1.name = IDID(h); -
Singular/mpsr_PutPoly.cc
r0e1846 rcc0296 571 571 572 572 // find out the length of the weight-vector 573 if (r->wvhdl [index] != NULL)573 if (r->wvhdl && r->wvhdl[index] != NULL) 574 574 vlength = r->block1[index] - r->block0[index] + 1; 575 575 -
Singular/mptest2.sr
r0e1846 rcc0296 18 18 list l1 = i,iv,im,i1,iv1,im1; 19 19 list l2 = l1, iv2, l, im2; 20 21 22 string s;23 string s1 = "Hello World";24 20 25 21 -
Singular/sing_mp.cc
r0e1846 rcc0296 6 6 */ 7 7 /* $Log: not supported by cvs2svn $ 8 // Revision 1.1.1.1 1997/03/19 13:18:41 obachman 9 // Imported Singular sources 10 // 8 11 */ 9 12 10 13 #include <stdio.h> 11 14 #include <string.h> 15 #include <unistd.h> 12 16 #include "mod2.h" 13 17 #include "tok.h" … … 49 53 { 50 54 int i; 51 l->argv = (char **) Alloc0(argc * sizeof(char *)); 52 for (i=0; i<argc; i++) 55 l->argv = (char **) Alloc0((argc +1) * sizeof(char *)); 56 l->argv[0] = mstrdup("MP:connect"); 57 for (i=1; i<=argc; i++) 53 58 l->argv[i] = mstrdup(argv[i]); 54 l->argc = argc ;59 l->argc = argc + 1; 55 60 l->name = mstrdup("MP:connect"); 56 61 slInit(l,NULL); … … 191 196 char **argv; 192 197 int argc; 193 MP_Link_pt link ;198 MP_Link_pt link = NULL; 194 199 195 200 GetCmdArgs(&argc, &argv, argvstr); … … 204 209 205 210 if (host == NULL) 206 Warn("No host specified for MP:connect; We try localhost"); 211 { 212 char *hn = (char *) AllocL(64*sizeof(char*)); 213 FreeL(argv[7]); 214 gethostname(hn, 64); 215 argv[7] = hn; 216 Warn("No host specified for MP:connect; We try %s", hn); 217 } 207 218 else 208 219 { … … 250 261 char **argv; 251 262 int argc; 252 MP_Link_pt link ;263 MP_Link_pt link=NULL; 253 264 254 265 GetCmdArgs(&argc, &argv, 255 "-MPtransp TCP -MPmode launch -MPhost r-MPapplication s");266 "-MPtransp TCP -MPmode launch -MPhost localhost -MPapplication s"); 256 267 257 268 FreeL(argv[5]); 258 269 if (host == NULL) 259 270 { 260 Warn("No host specified for MP:launch; We try: localhost"); 261 argv[5] = mstrdup("localhost"); 271 char *hn = (char *) AllocL(64*sizeof(char*)); 272 FreeL(argv[7]); 273 gethostname(hn, 64); 274 argv[5] = hn; 275 Warn("No host specified for MP:connect; We try %s", hn); 262 276 } 263 277 else … … 287 301 BOOLEAN slOpenMPTcp(si_link l) 288 302 { 289 MP_Link_pt link ;303 MP_Link_pt link = NULL; 290 304 291 305 if (l->argc < 1) … … 410 424 BOOLEAN mpsr_IsMPLink(si_link l) 411 425 { 412 return strcmp(l->name, "MP:tcp") == 0 || 413 strcmp(l->name, "MP:file") == 0; 414 } 426 return strcmp(l->name, "MP") > 0; 427 } 428 #endif 429 430 #define MPSR_BATCH_DEBUG 431 #ifdef MPSR_BATCH_DEBUG 432 BOOLEAN stop = 1; 415 433 #endif 416 434 … … 421 439 leftv v = NULL; 422 440 441 #ifdef MPSR_BATCH_DEBUG 442 fprintf(stderr, "Was started with pid %d\n", getpid()); 443 while (stop){}; 444 #endif 445 423 446 // connect to a listening application 424 447 slInitBatchLink(silink, argc, argv); … … 444 467 } 445 468 446 if (v == NULL)447 v = mpsr_InitLeftv(STRING_CMD, (void *) mstrdup("MPSR_DONE"));448 449 469 slWriteMP(silink, v); 450 v->CleanUp(); 451 Free(v, sizeof(sleftv)); 470 471 if (v != NULL) 472 { 473 v->CleanUp(); 474 Free(v, sizeof(sleftv)); 475 v = NULL; 476 } 452 477 } 453 478 // should never get here
Note: See TracChangeset
for help on using the changeset viewer.