Changeset 58b151c in git
- Timestamp:
- Apr 28, 1997, 11:57:56 AM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c0d3de967ae65902159cbfdc8db9a2fd0ca46287
- Parents:
- 1cb558b9e3a25bad17969f3fb3d94440b04a1d51
- Location:
- Singular
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.in
r1cb558 r58b151c 118 118 .y.cc: 119 119 ${BISON} -d -t -o grammar.cc $< 120 chmod +x testgh 120 121 ./testgh 121 122 -
Singular/iparith.cc
r1cb558 r58b151c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.2 3 1997-04-25 15:03:58 obachmanExp $ */4 /* $Id: iparith.cc,v 1.24 1997-04-28 09:57:54 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: table driven kernel interface, used by interpreter … … 274 274 { "vdim", 0, VDIM_CMD , CMD_1}, 275 275 { "vector", 0, VECTOR_CMD , RING_DECL}, 276 { "verbose", 0, VERBOSE_CMD , CMD_M},277 276 { "wedge", 0, WEDGE_CMD , CMD_2}, 278 277 { "weight", 0, WEIGHT_CMD , CMD_1}, … … 283 282 { "NF", 1, REDUCE_CMD , CMD_23}, 284 283 { "multiplicity",1, MULTIPLICITY_CMD , CMD_1}, 284 { "verbose", 1, OPTION_CMD , CMD_M}, 285 285 // { "rank", 1, ROWS_CMD , CMD_1}, 286 286 … … 3987 3987 if(v==NULL) 3988 3988 { 3989 showOption( iiOp);3989 showOption(); 3990 3990 return FALSE; 3991 3991 } … … 4091 4091 ,{jjSYSTEM, SYSTEM_CMD, NONE/*or set by p*/,-2 } 4092 4092 ,{jjTEST, TEST_CMD, NONE, -2 } 4093 ,{jjOPTION_PL, VERBOSE_CMD, NONE/*or set by p*/,-1 }4094 4093 ,{iiWRITE, WRITE_CMD, NONE, -2 } 4095 4094 ,{NULL, 0, 0, 0 } -
Singular/ipshell.h
r1cb558 r58b151c 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ipshell.h,v 1. 3 1997-04-09 12:19:51Singular Exp $ */6 /* $Id: ipshell.h,v 1.4 1997-04-28 09:57:55 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 141 141 sleftv * iiMake_proc(idhdl pn, sleftv* sl); 142 142 // from misc.cc: 143 void showOption( int cmd);143 void showOption(); 144 144 BOOLEAN setOption(leftv res, leftv v); 145 145 /* ================================================================== */ -
Singular/misc.cc
r1cb558 r58b151c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: misc.cc,v 1. 7 1997-04-25 15:04:03 obachmanExp $ */4 /* $Id: misc.cc,v 1.8 1997-04-28 09:57:56 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 31 31 #include "subexpr.h" 32 32 #include "timer.h" 33 #include "intvec.h" 33 34 34 35 /*0 implementation*/ … … 453 454 int i; 454 455 455 if (iiOp==OPTION_CMD) 456 { 457 if(strcmp(n,"get")==0) 458 { 459 res->rtyp=INT_CMD; 460 res->data=(void *)test; 456 if(strcmp(n,"get")==0) 457 { 458 intvec *w=new intvec(2); 459 (*w)[0]=test; 460 (*w)[1]=verbose; 461 res->rtyp=INTVEC_CMD; 462 res->data=(void *)w; 463 goto okay; 464 } 465 if(strcmp(n,"set")==0) 466 { 467 if((v->next!=NULL) 468 &&(v->next->Typ()==INTVEC_CMD)) 469 { 470 v=v->next; 471 intvec *w=(intvec*)v->Data(); 472 test=(*w)[0]; 473 verbose=(*w)[1]; 474 475 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) && (currRing->ch>=2)) 476 { 477 test &=~Sy_bit(OPT_INTSTRATEGY); 478 } 461 479 goto okay; 462 } 463 if(strcmp(n,"set")==0) 464 { 465 if((v->next!=NULL) 466 &&(v->next->Typ()==INT_CMD)) 467 { 468 v=v->next; 469 test=(int)v->Data(); 470 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) && (currRing->ch>=2)) 471 { 472 test &=~Sy_bit(OPT_INTSTRATEGY); 473 } 474 goto okay; 475 } 476 } 477 for (i=0; (i==0) || (optionStruct[i-1].setval!=0); i++) 478 { 479 if (strcmp(n,optionStruct[i].name)==0) 480 { 481 if (optionStruct[i].setval & validOpts) 482 test |= optionStruct[i].setval; 483 else 484 Warn("cannot set option"); 485 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) && (currRing->ch>=2)) 486 { 487 test &=~Sy_bit(OPT_INTSTRATEGY); 488 } 489 goto okay; 490 } 491 else if ((strncmp(n,"no",2)==0) 492 && (strcmp(n+2,optionStruct[i].name)==0)) 493 { 494 if ((optionStruct[i].setval & validOpts) 495 || (strcmp(n+2,"ne")==0)) 496 { 497 test &= optionStruct[i].resetval; 498 } 499 else 500 Warn("cannot clear option"); 501 goto okay; 502 } 503 } 504 if(v->Typ()==INT_CMD) 505 { 506 test=(int)v->Data(); 507 return FALSE; 508 } 509 } 510 else 511 { 512 if(strcmp(n,"get")==0) 513 { 514 res->rtyp=INT_CMD; 515 res->data=(void *)verbose; 480 } 481 } 482 for (i=0; (i==0) || (optionStruct[i-1].setval!=0); i++) 483 { 484 if (strcmp(n,optionStruct[i].name)==0) 485 { 486 if (optionStruct[i].setval & validOpts) 487 test |= optionStruct[i].setval; 488 else 489 Warn("cannot set option"); 490 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) && (currRing->ch>=2)) 491 { 492 test &=~Sy_bit(OPT_INTSTRATEGY); 493 } 516 494 goto okay; 517 495 } 518 if(strcmp(n,"set")==0) 519 { 520 if((v->next!=NULL) 521 &&(v->next->Typ()==INT_CMD)) 522 { 523 v=v->next; 524 verbose=(int)v->Data(); 525 goto okay; 526 } 527 } 528 for (i=0; (i==0) || (verboseStruct[i-1].setval!=0); i++) 529 { 530 if (strcmp(n,verboseStruct[i].name)==0) 531 { 532 verbose |= verboseStruct[i].setval; 533 #ifdef YYDEBUG 534 #if YYDEBUG 535 if (BVERBOSE(V_YACC)) yydebug=1; 536 else yydebug=0; 537 #endif 538 #endif 539 goto okay; 540 } 541 else if ((strncmp(n,"no",2)==0) 542 && (strcmp(n+2,verboseStruct[i].name)==0)) 543 { 544 verbose &= verboseStruct[i].resetval; 545 #ifdef YYDEBUG 546 #if YYDEBUG 547 if (BVERBOSE(V_YACC)) yydebug=1; 548 else yydebug=0; 549 #endif 550 #endif 551 goto okay; 552 } 553 } 554 } 555 Werror("unknown option `%s`",n); 496 else if ((strncmp(n,"no",2)==0) 497 && (strcmp(n+2,optionStruct[i].name)==0)) 498 { 499 if ((optionStruct[i].setval & validOpts) 500 || (strcmp(n+2,"ne")==0)) 501 { 502 test &= optionStruct[i].resetval; 503 } 504 else 505 Warn("cannot clear option"); 506 goto okay; 507 } 508 } 509 for (i=0; (i==0) || (verboseStruct[i-1].setval!=0); i++) 510 { 511 if (strcmp(n,verboseStruct[i].name)==0) 512 { 513 verbose |= verboseStruct[i].setval; 514 #ifdef YYDEBUG 515 #if YYDEBUG 516 if (BVERBOSE(V_YACC)) yydebug=1; 517 else yydebug=0; 518 #endif 519 #endif 520 goto okay; 521 } 522 else if ((strncmp(n,"no",2)==0) 523 && (strcmp(n+2,verboseStruct[i].name)==0)) 524 { 525 verbose &= verboseStruct[i].resetval; 526 #ifdef YYDEBUG 527 #if YYDEBUG 528 if (BVERBOSE(V_YACC)) yydebug=1; 529 else yydebug=0; 530 #endif 531 #endif 532 goto okay; 533 } 534 } 535 Werror("unknown option `%s`",n); 556 536 okay: 557 537 FreeL((ADDRESS)n); … … 561 541 } 562 542 563 void showOption( int cmd)543 void showOption() 564 544 { 565 545 int i; 566 546 BITSET tmp; 567 547 568 if (cmd==OPTION_CMD) 548 PrintS("//options:"); 549 if ((test!=0)||(verbose!=0)) 569 550 { 570 551 tmp=test; 571 PrintS("//options for 'std'-command:"); 572 if (tmp) 552 if(tmp) 573 553 { 574 554 for (i=0; optionStruct[i].setval!=0; i++) … … 584 564 if (tmp & Sy_bit(i)) Print(" %d",i); 585 565 } 586 PrintLn(); 587 } 588 else 589 PrintS(" none\n"); 590 } 591 else 592 { 566 } 593 567 tmp=verbose; 594 PrintS("//verbose:");595 568 if (tmp) 596 569 { … … 605 578 for (i=1; i<32; i++) 606 579 { 607 if (tmp & Sy_bit(i)) Print(" %d",i );608 } 609 PrintLn();610 }611 else612 PrintS(" minimum\n");613 }580 if (tmp & Sy_bit(i)) Print(" %d",i+32); 581 } 582 } 583 PrintLn(); 584 } 585 else 586 PrintS(" none\n"); 614 587 } 615 588
Note: See TracChangeset
for help on using the changeset viewer.