Changeset 636c28 in git for dyn_modules/bigintm/mod_main.cc
- Timestamp:
- Mar 24, 2011, 6:36:10 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- de4e64a426712523b3ba44188f1f75f4bb4aad7d
- Parents:
- e5a4ba6cad9681dda18e8cc54544efb5003d053b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/bigintm/mod_main.cc
re5a4ba r636c28 26 26 27 27 /// listing all blackbox types (debug stuff) 28 static BOOLEAN printBlackboxTypes0(leftv __res, leftv __v)28 static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/) 29 29 { 30 30 NoReturn(__res); … … 34 34 35 35 /// init the bigintm (a sample blackbox) type 36 static BOOLEAN bigintm_setup0(leftv __res, leftv __v)36 static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/) 37 37 { 38 38 NoReturn(__res); … … 40 40 } 41 41 42 static long int load_counter = -1;43 44 /// init the bigintm (a sample blackbox) type45 static BOOLEAN print_load_counter(leftv __res, leftv __v)46 {47 Print("print_load_counter: load counter: %ld", load_counter);48 Print(", printBlackboxTypes: %p", (void*)(printBlackboxTypes0));49 Print(", bigintm_setup: %p", (void*)(bigintm_setup0));50 PrintLn();51 52 NoReturn(__res);53 return FALSE;54 42 } 55 56 };57 43 58 44 … … 61 47 int mod_init(SModulFunctions* psModulFunctions) 62 48 { 63 load_counter++; 64 65 if( !load_counter) 66 { 67 68 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 69 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 70 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_print_load_counter",FALSE, print_load_counter); 49 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 50 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 71 51 72 // Q: should we call 'bigintm_setup' here??!?!? 73 return 0; 74 } 75 else 76 { 77 PrintS("ERROR: Sorry this dynamic module was already loaded...!!!"); 78 PrintLn(); 79 // Q: what about loading this module multipple times...? 80 return 0; // -1? - No difference!!! 81 82 } 83 52 // Q: should we call 'bigintm_setup' here??!?!? 53 return 0; 84 54 } 85 55 }
Note: See TracChangeset
for help on using the changeset viewer.