Changeset f17cd1 in git for modules/modgen
- Timestamp:
- Jun 18, 2002, 5:09:16 PM (22 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- 8d0ebb05ab67ecb2a04fea0b9f2de8d43a9a0aac
- Parents:
- d36ac2f0dc68d5175d2da41e14b758395a5e14a6
- Location:
- modules/modgen
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/modgen/creat_top.cc
rd36ac2 rf17cd1 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: creat_top.cc,v 1.1 3 2001-05-23 20:14:20anne Exp $ */4 /* $Id: creat_top.cc,v 1.14 2002-06-18 15:09:15 anne Exp $ */ 5 5 /* 6 6 * ABSTRACT: lib parsing … … 51 51 fprintf(fp, " idhdl h;\n"); 52 52 fprintf(fp, "\n"); 53 fprintf(fp, " h=enterid(omStrDup(name),0, t, & IDROOT, TRUE/*FALSE*/);\n");53 fprintf(fp, " h=enterid(omStrDup(name),0, t, &(basePack->idroot), TRUE/*FALSE*/);\n"); 54 54 fprintf(fp, " if(h!=NULL) {\n"); 55 55 fprintf(fp, " switch(t) {\n"); 56 fprintf(fp, " case STRING_CMD: IDSTRING(h) = omStrDup(value);break;\n"); 56 fprintf(fp, " case STRING_CMD: \n"); 57 fprintf(fp, " omFree(IDSTRING(h));\n"); 58 fprintf(fp, " IDSTRING(h) = omStrDup(value);\n"); 59 fprintf(fp, " break;\n"); 57 60 fprintf(fp, " case PACKAGE_CMD: break;\n"); 58 61 fprintf(fp, " case PROC_CMD: break;\n"); … … 66 69 67 70 /*========================================================================*/ 71 /* SINGULAR procedures sollen nicht in modules geladen werden!! 72 DAS HIER FLIEGT RAUS 68 73 void write_add_singular_proc(FILE *fp) 69 74 { … … 75 80 fprintf(fp, " h = enter_id(procname, NULL, PROC_CMD);\n"); 76 81 fprintf(fp, " if(h == NULL) return NULL;\n"); 82 fprintf(fp, "\n"); 83 fprintf(fp, " IDDATA(h)=(char *) pi;\n"); 77 84 fprintf(fp, "\n"); 78 85 // fprintf(fp, " pi->libname = omStrDup(libname);\n"); … … 99 106 modlineno+=30; 100 107 } 108 BIS HIERHIN FLIEGT ES RAUS 109 */ 101 110 102 111 /*========================================================================*/ … … 111 120 fprintf(fp, "int mod_init(int(*iiAddCproc)())\n{\n"); 112 121 fprintf(fp, " idhdl h;\n"); 122 /* HIER MUSS ERST ZUARBEIT VON HANS KOMMEN 113 123 fprintf(fp, " idhdl helphdl = enter_id(\"Help\", NULL, PACKAGE_CMD);\n"); 114 124 fprintf(fp, " idhdl examplehdl = enter_id(\"Example\", NULL, PACKAGE_CMD);\n\n"); … … 121 131 fprintf(fp, " Warn(\"Cannot create example-package\\n\");\n"); 122 132 fprintf(fp, " else fill_example_package(examplehdl);\n"); 133 BIS HIERHIN ZUARBEIT VON HANS NOETIG 134 */ 123 135 } 124 136 -
modules/modgen/grammar.y
rd36ac2 rf17cd1 1 1 /* 2 * $Id: grammar.y,v 1.1 5 2000-11-09 21:58:13 kruegerExp $2 * $Id: grammar.y,v 1.16 2002-06-18 15:09:15 anne Exp $ 3 3 */ 4 4 … … 10 10 #include <stdarg.h> 11 11 #include <string.h> 12 #include < limits.h>12 #include <mylimits.h> 13 13 14 14 #include <mod2.h> -
modules/modgen/main.cc
rd36ac2 rf17cd1 8 8 #include <stdarg.h> 9 9 #include <string.h> 10 #include < limits.h>10 #include <mylimits.h> 11 11 #include <unistd.h> 12 12 #include <getopt.h> -
modules/modgen/misc.cc
rd36ac2 rf17cd1 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: misc.cc,v 1.1 3 2001-05-23 20:13:02anne Exp $ */4 /* $Id: misc.cc,v 1.14 2002-06-18 15:09:16 anne Exp $ */ 5 5 /* 6 6 * ABSTRACT: lib parsing … … 462 462 write_header(fp, module); 463 463 fprintf(fp, "#line %d \"%s.cc\"\n", modlineno++, module); 464 fprintf(fp, "#include <stdlib.h>\n");465 fprintf(fp, "#include <stdio.h>\n");466 fprintf(fp, "#include <string.h>\n");467 fprintf(fp, "#include <ctype.h>\n");468 fprintf(fp, "%s\n", DYNAinclude[systyp]);469 fprintf(fp, "\n");470 fprintf(fp, "#include <locals.h>\n");471 fprintf(fp, "#include <omalloc.h>\n");472 464 if(what != 'h') { 465 fprintf(fp, "#include <stdlib.h>\n"); 466 fprintf(fp, "#include <stdio.h>\n"); 467 fprintf(fp, "#include <string.h>\n"); 468 fprintf(fp, "#include <ctype.h>\n"); 469 fprintf(fp, "%s\n", DYNAinclude[systyp]); 470 fprintf(fp, "\n"); 471 fprintf(fp, "#include <mod2.h>\n"); 472 fprintf(fp, "#include <tok.h>\n"); 473 fprintf(fp, "#include <structs.h>\n"); 474 fprintf(fp, "#include <ipid.h>\n\n"); 475 fprintf(fp, "#include <locals.h>\n"); 476 fprintf(fp, "#include <omalloc.h>\n"); 473 477 fprintf(fp, "#include \"%s.h\"\n", module); 474 478 modlineno+=8; … … 478 482 fprintf(fp, "\n"); modlineno+=1; 479 483 fprintf(fp, "#line %d \"%s.cc\"\n", modlineno++, module); 484 /* DAS HIER FLIEGT RAUS 480 485 write_add_singular_proc(fp); 481 486 fprintf(fp, "\n"); 487 BIS HIER HIN 488 */ 482 489 490 /* HIER FEHLT ZUARBEIT VON HANS 483 491 fprintf(fp, "void fill_help_package(idhdl pl);\n"); 484 492 fprintf(fp, "void fill_example_package(idhdl pl);\n"); 493 BIS HIER 494 */ 485 495 modlineno+=3; 486 496 } … … 492 502 void write_header(FILE *fp, char *module, char *comment) 493 503 { 494 fprintf(fp, "%s/*\n%s * This was automatic ly generated by modgen\n",504 fprintf(fp, "%s/*\n%s * This was automatically generated by modgen\n", 495 505 comment, comment); 496 506 fprintf(fp, "%s * version %s\n", comment, MOD_GEN_VERSION); -
modules/modgen/proc.cc
rd36ac2 rf17cd1 1 1 /* 2 * $Id: proc.cc,v 1.1 6 2001-02-01 13:05:03 kruegerExp $2 * $Id: proc.cc,v 1.17 2002-06-18 15:09:16 anne Exp $ 3 3 */ 4 4 … … 364 364 fprintf(module->modfp, "#line %d \"%s.cc\"\n", modlineno++, module->name); 365 365 fprintf(module->modfp, "/* Help section */\n"); 366 fprintf(module->modfp, "void fill_help_package(idhdl pl) {\n");367 fprintf(module->modfp, " namespaceroot->push(IDPACKAGE(pl), IDID(pl));\n");368 modlineno+=3;369 mod_copy_tmp(module->modfp, module->fmtfp2);370 fprintf(module->modfp, "#line %d \"%s.cc\"\n", modlineno++, module->name);371 fprintf(module->modfp, " namespaceroot->pop();\n");372 fprintf(module->modfp, "} /* End of Help section */\n\n");373 modlineno+=3;374 375 fprintf(module->modfp, "/* Example section */\n");376 fprintf(module->modfp, "void fill_example_package(idhdl pl) {\n");377 fprintf(module->modfp, " namespaceroot->push(IDPACKAGE(pl), IDID(pl));\n");378 modlineno+=3;379 mod_copy_tmp(module->modfp, module->fmtfp3);380 fprintf(module->modfp, "#line %d \"%s.cc\"\n", modlineno++, module->name);381 fprintf(module->modfp, " namespaceroot->pop();\n");382 fprintf(module->modfp, "} /* End of Example section */\n\n");383 modlineno+=2;366 // fprintf(module->modfp, "void fill_help_package(idhdl pl) {\n"); 367 // fprintf(module->modfp, " namespaceroot->push(IDPACKAGE(pl), IDID(pl));\n"); 368 // modlineno+=3; 369 // mod_copy_tmp(module->modfp, module->fmtfp2); 370 // fprintf(module->modfp, "#line %d \"%s.cc\"\n", modlineno++, module->name); 371 // fprintf(module->modfp, " namespaceroot->pop();\n"); 372 // fprintf(module->modfp, "} /* End of Help section */\n\n"); 373 // modlineno+=3; 374 375 // fprintf(module->modfp, "/* Example section */\n"); 376 // fprintf(module->modfp, "void fill_example_package(idhdl pl) {\n"); 377 // fprintf(module->modfp, " namespaceroot->push(IDPACKAGE(pl), IDID(pl));\n"); 378 // modlineno+=3; 379 // mod_copy_tmp(module->modfp, module->fmtfp3); 380 // fprintf(module->modfp, "#line %d \"%s.cc\"\n", modlineno++, module->name); 381 // fprintf(module->modfp, " namespaceroot->pop();\n"); 382 // fprintf(module->modfp, "} /* End of Example section */\n\n"); 383 // modlineno+=2; 384 384 385 385 mod_copy_tmp(module->modfp, module->fmtfp);
Note: See TracChangeset
for help on using the changeset viewer.