Changeset 165 for trunk/src/fortran


Ignore:
Timestamp:
Jan 31, 2006, 2:49:49 PM (19 years ago)
Author:
dkearney
Message:

1) removing matlab and octave tests for put*id functions
2) adding old fortran examples
3) minor changes to matlab and octave to fix rpUnitsGetBasis
4) rpUnitsMakeMetric does not work in matlab
5) changes to fortran bindings to return proper error codes.
6) added debugging to matlab compiling options and changed outdir location in Makefile

Location:
trunk/src/fortran
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/fortran/RpLibraryFInterface.cc

    r125 r165  
    177177        lib = getObject_Lib(*handle);
    178178        if (lib) {
    179             if (*childHandle < 1) {
     179
     180            if (*childHandle > 0) {
    180181                // check to see if there were any previously returned children
    181182                childNode = getObject_Lib(*childHandle);
     
    183184
    184185            // call the children base method
    185             childNode = lib->children(path,childNode);
     186            childNode = lib->children(inPath,childNode);
    186187
    187188            // store the childNode in the dictionary.
    188189            //
    189190            // because the base method is using static memory to get store the
    190             // children we should be able to chekc and see if the childHandle
    191             // was valud.
     191            // children we should be able to check and see if the childHandle
     192            // was valid.
    192193            // if so, then we can just return the childHandle back to the user
    193194            // if not, store the object in the dictionary and return the new
     
    199200                }
    200201                else {
    201                     newObjHandle = *childHandle;
     202                    newObjHandle = storeObject_Lib(childNode,*childHandle);
    202203                }
    203204            }
  • trunk/src/fortran/RpUnitsFInterface.cc

    r119 r165  
    3333
    3434    if (basisName && *basisName) {
    35         // basisStrName = fortObjDictUnits.find(*basisName);
    3635        basisStrName = ObjDictUnits.find(*basisName);
    3736
     
    4140    }
    4241
    43     // newUnit = RpUnits::define(unitName, basis);
    4442    newUnit = RpUnits::define(inText, basis);
    4543
     
    6563    inText = null_terminate(searchName,searchName_len);
    6664
    67     // RpUnits* searchUnit = RpUnits::find(searchName);
    6865    const RpUnits* searchUnit = RpUnits::find(inText);
    6966
     
    8986
    9087        if (newBasis) {
     88            // make the metric extensions and retrieve the error code
    9189            result = RpUnits::makeMetric(newBasis);
    9290        }
    9391    }
    9492
     93    // return the error code
    9594    return result;
    9695}
     
    101100    const RpUnits* unitObj = NULL;
    102101    std::string unitNameText = "";
    103     int result = 0;
     102    int result = 1;
    104103
    105104    if (unitRefVal && *unitRefVal) {
     
    108107            unitNameText = unitObj->getUnits();
    109108            fortranify(unitNameText.c_str(), retText, retText_len);
     109            result = 0;
    110110        }
    111111    }
     
    119119    const RpUnits* unitObj = NULL;
    120120    std::string unitNameText = "";
    121     int result = 0;
     121    int result = 1;
    122122
    123123    if (unitRefVal && *unitRefVal) {
     
    126126            unitNameText = unitObj->getUnitsName();
    127127            fortranify(unitNameText.c_str(), retText, retText_len);
     128            result = 0;
    128129        }
    129130    }
     
    136137{
    137138    const RpUnits* unitObj = NULL;
    138     int result = 0;
     139    int result = 1;
    139140
    140141    if (unitRefVal && *unitRefVal) {
     
    142143        if (unitObj) {
    143144            *retExponent = unitObj->getExponent();
     145            result = 0;
    144146        }
    145147    }
Note: See TracChangeset for help on using the changeset viewer.