Changeset 962 for trunk/src/matlab


Ignore:
Timestamp:
Mar 25, 2008 12:19:50 PM (15 years ago)
Author:
dkearney
Message:

code cleanups.
adjusted gague.tcl to check the length of the string it receives for integers and reals.
modified c, matlab, and octave's lib function to handle empty string for creation of empty library.
modified matlab and octave's lib result function to handle status as a parameter.
fixed core library code to deal with incorrect order of translating xml entity references.

Location:
trunk/src/matlab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matlab/rpLib.cc

    r162 r962  
    4040
    4141    /* Call the C++ subroutine. */
    42     if (!path.empty()) {
    43         lib = new RpLibrary(path);
    44         if (lib) {
    45             // store the library and return a dictionary key
    46             libIndex = storeObject_Lib(lib);
    47             if (libIndex) {
    48                 err = 0;
    49             }
     42    lib = new RpLibrary(path);
     43    if (lib) {
     44        // store the library and return a dictionary key
     45        libIndex = storeObject_Lib(lib);
     46        if (libIndex) {
     47            err = 0;
    5048        }
    5149    }
  • trunk/src/matlab/rpLibResult.cc

    r789 r962  
    1717
    1818/**********************************************************************/
    19 // METHOD: [err] = rpLibResult (libHandle)
     19// METHOD: [err] = rpLibResult (libHandle,status)
    2020/// Write Rappture Library to run.xml and signal end of processing.
    2121/**
     
    3030    int libIndex = 0;
    3131    int err = 1;
     32    int status = 0;
    3233    RpLibrary* lib = NULL;
    3334
    3435    /* Check for proper number of arguments. */
    35     if (nrhs != 1) {
     36    if (nrhs > 2) {
     37        mexErrMsgTxt("At most two input allowed.");
     38    }
     39
     40    if (nrhs < 1) {
    3641        mexErrMsgTxt("One input required.");
    3742    }
     
    4045    libIndex = getIntInput(prhs[0]);
    4146
     47    if (nrhs == 2) {
     48        status = getIntInput(prhs[1]);
     49    }
     50
    4251    /* Call the C subroutine. */
    4352    if (libIndex > 0) {
     
    4554        if (lib) {
    4655            lib->put("tool.version.rappture.language", "matlab");
    47             lib->result();
     56            lib->result(status);
    4857            err = 0;
    4958            // cleanLibDict();
Note: See TracChangeset for help on using the changeset viewer.