Ignore:
Timestamp:
Mar 24, 2011, 6:36:10 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
de4e64a426712523b3ba44188f1f75f4bb4aad7d
Parents:
e5a4ba6cad9681dda18e8cc54544efb5003d053b
Message:
ADD: "scons debug=1" for debug version
UPD: updated bigintm to support correct (debug/release) version
FIX: some minor warnings (thanks to debug version)

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14066 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • dyn_modules/bigintm/mod_main.cc

    re5a4ba r636c28  
    2626
    2727/// listing all blackbox types (debug stuff)
    28 static BOOLEAN printBlackboxTypes0(leftv __res, leftv __v)
     28static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/)
    2929{
    3030  NoReturn(__res);
     
    3434
    3535/// init the bigintm (a sample blackbox) type
    36 static BOOLEAN bigintm_setup0(leftv __res, leftv __v)
     36static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/)
    3737{
    3838  NoReturn(__res);
     
    4040}
    4141
    42 static long int load_counter = -1;
    43 
    44 /// init the bigintm (a sample blackbox) type
    45 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;
    5442}
    55 
    56 };
    5743
    5844
     
    6147  int mod_init(SModulFunctions* psModulFunctions)
    6248  {
    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);
    7151
    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;
    8454  }
    8555}
Note: See TracChangeset for help on using the changeset viewer.