Changeset daa036 in git
- Timestamp:
- Jun 10, 2014, 4:37:04 PM (10 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 9b0e1a1147ae276a71f7e5bce7beb59c9ef90534
- Parents:
- c12ec63afae5364ad41ce47666ac5ea44c9feccb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/gentable.cc
rc12ec6 rdaa036 564 564 fclose(outfile); 565 565 } 566 int is_ref_cmd(cmdnames *c) 567 { 568 if( c->tokval==0) return 0; 569 if (c->alias > 0) return 0; 570 if ((c->toktype==CMD_1) 571 || (c->toktype==CMD_2) 572 || (c->toktype==CMD_3) 573 || (c->toktype==CMD_M) 574 || (c->toktype==CMD_12) 575 || (c->toktype==CMD_13) 576 || (c->toktype==CMD_23) 577 || (c->toktype==CMD_123)) return 1; 578 return 0; 579 } 566 580 void ttGen2c() 567 581 { … … 577 591 { 578 592 // assume that cmds[0].tokval== -1 and all others with tokval -1 at the end 579 if( cmds[m].tokval>0)593 if(is_ref_cmd(&(cmds[m]))) 580 594 { 581 595 fprintf(outfile,"* %s::\n",cmds[m].name); … … 586 600 { 587 601 // assume that cmds[0].tokval== -1 and all others with tokval -1 at the end 588 if( cmds[m].tokval>0)602 if(is_ref_cmd(&(cmds[m]))) 589 603 { 590 604 fprintf(outfile,"@node %s,",cmds[m].name); 591 605 // next: 592 if (cmds[m+1].tokval>0) 593 fprintf(outfile,"%s,",cmds[m+1].name); 606 int mm=m-1; 607 while((mm>0)&& (is_ref_cmd(&cmds[mm]))) mm--; 608 if((mm>0)&& (is_ref_cmd(&cmds[mm]))) 609 fprintf(outfile,"%s,",cmds[mm].name); 594 610 else 595 611 fprintf(outfile,","); 596 612 // prev: 597 if (cmds[m-1].tokval>0) 613 mm=m+1; 614 while((mm>0)&& (is_ref_cmd(&cmds[mm]))) mm++; 615 if((mm>0)&& (is_ref_cmd(&cmds[mm]))) 598 616 fprintf(outfile,"%s,",cmds[m-1].name); 599 617 else … … 871 889 /*-------------------------------------------------------------------*/ 872 890 873 int main() 874 { 875 //ttGen4(); 876 ttGen1(); 877 ttGen2b(); 878 //ttGen2c(); 879 rename(iparith_inc,"iparith.inc"); 891 int main(int argc, char** argv) 892 { 893 if (argc>1) 894 { 895 ttGen4(); 896 ttGen2c(); 897 } 898 else 899 { 900 ttGen1(); 901 ttGen2b(); 902 rename(iparith_inc,"iparith.inc"); 903 } 880 904 return 0; 881 905 }
Note: See TracChangeset
for help on using the changeset viewer.