Changeset c94cbe in git
- Timestamp:
- Feb 14, 2019, 10:42:52 AM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 5c308a04175b4dba05979a7000554c8cdaf451cd
- Parents:
- 4063070e6e1a1e17016b69b4af52ab449f9bde45e26df3f314b9946ffef7f945cbe5c66517600b92
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/interval/interval.cc
r4063070 rc94cbe 1221 1221 extern "C" int SI_MOD_INIT(interval)(SModulFunctions* psModulFunctions) 1222 1222 { 1223 VARblackbox *b_iv = (blackbox*) omAlloc0(sizeof(blackbox)),1223 blackbox *b_iv = (blackbox*) omAlloc0(sizeof(blackbox)), 1224 1224 *b_bx = (blackbox*) omAlloc0(sizeof(blackbox)); 1225 1225 -
Singular/walk.cc
r4063070 rc94cbe 3731 3731 mpz_clear(ndeg); 3732 3732 3733 VARreturn repr_vector;3733 return repr_vector; 3734 3734 } 3735 3735 #endif … … 3827 3827 mpz_clear(sing_int); 3828 3828 3829 VARreturn repr_vector;3829 return repr_vector; 3830 3830 } 3831 3831 #endif -
misc/intset.cc
r4063070 rc94cbe 209 209 psModulFunctions->iiAddCproc((currPack->libname? currPack->libname: ""),"insert_set",FALSE,insert_set); 210 210 psModulFunctions->iiAddCproc((currPack->libname? currPack->libname: ""),"equal_set",FALSE,equal_set); 211 VARreturn MAX_TOK;212 } 211 return MAX_TOK; 212 } -
misc/lt.cc
r4063070 rc94cbe 40 40 { 41 41 psModulFunctions->iiAddCproc((currPack->libname? currPack->libname: ""),"same_lt",FALSE,same_lt); 42 VARreturn MAX_TOK;42 return MAX_TOK; 43 43 } -
misc/lt2.cc
r4063070 rc94cbe 74 74 psModulFunctions->iiAddCproc((currPack->libname? currPack->libname: ""),"same_lt2",FALSE,same_lt2); 75 75 psModulFunctions->iiAddCproc((currPack->libname? currPack->libname: ""),"cf_at",FALSE,cf_at); 76 VARreturn MAX_TOK;76 return MAX_TOK; 77 77 } -
misc/partition.cc
r4063070 rc94cbe 90 90 (currPack->libname? currPack->libname: ""),// the library name, 91 91 "partition"); // the help string for the module 92 VARreturn MAX_TOK;92 return MAX_TOK; 93 93 } 94 94 -
ppcc/src/parser.cc
r4063070 rc94cbe 56 56 class Parser : public GC { 57 57 public: 58 TokenList *input, *output ;58 TokenList *input, *output, *prologue; 59 59 SourceFile *source; 60 60 Int pos, marker; … … 66 66 input->add(eof); 67 67 output = new TokenList(); 68 prologue = new TokenList(); 68 69 pos = 0; 69 70 marker = 0; … … 274 275 parser->init_count++; 275 276 parser->emit(Token(SymGen, S( 276 "void pSingular_register_init_var(void *, void *, long);"277 277 "class %s__CONSTR__ {\n" 278 278 " public: %s__CONSTR__() {\n" 279 " pSingular_register_init_var( &%s,&%s__INIT__, sizeof(%s));\n"279 " pSingular_register_init_var((void *)&%s, (void *)&%s__INIT__, sizeof(%s));\n" 280 280 " }\n" 281 281 "} %s__AUX__;\n" … … 286 286 287 287 void EmitEpilogue(Parser *parser) { 288 if ( init_list->len() == 0 && class_vars->count() == 0)288 if (parser->init_count == 0 && init_list->len() == 0 && class_vars->count() == 0) 289 289 return; 290 290 Str *modulename = parser->source->modulename; … … 300 300 } 301 301 } 302 if ( init_list->len() == 0)302 if (parser->init_count == 0 && init_list->len() == 0) 303 303 return; 304 304 Str *init_part; … … 350 350 } 351 351 init_part->add("}\n"); 352 if (parser->init_count) { 353 parser->prologue->add(Token(SymGen, 354 S("static void pSingular_register_init_var(void *, void *, long);\n"))); 355 } 352 356 init_part = init_part->replace_all(S("%n"), S(parser->init_count+1)); 353 357 parser->emit(Token(SymGen, init_part)); … … 512 516 } 513 517 EmitEpilogue(parser); 514 return parser-> output;518 return parser->prologue->clone()->add(parser->output); 515 519 } 516 520 … … 531 535 SourceFile *source = ReadSource(filename, filedata); 532 536 TokenList *tokens = Transform(source); 533 Str *result = new Str(); for (Int i = 0; i < tokens->len(); i++) { 537 Str *result = new Str(); 538 for (Int i = 0; i < tokens->len(); i++) { 534 539 result->add(tokens->at(i).str); 535 540 }
Note: See TracChangeset
for help on using the changeset viewer.