Changeset 597 for trunk/src/octave


Ignore:
Timestamp:
Mar 1, 2007 11:24:02 AM (17 years ago)
Author:
dkearney
Message:

adjusted core makefile to not remove setup.py when doing a make clean
adjusted putFile and putData commands and flags in matlab, octave,fortran,perl
changed the RPLIB_[TEXT,BINARY] flags to RPLIB_COMPRESS and RPLIB_NO_COMPRESS flags
adjusted the c-example for compress to incorporate newly named flags.
adjusted rappture library header to find rappture buffer header files in rappture2 directory.

Location:
trunk/src/octave
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/octave/rpLibPutFile.cc

    r591 r597  
    33 *  INTERFACE: Octave Rappture Library Source
    44 *
    5  *    [err] = rpLibPutFile(libHandle,path,fileName,fileType,append)
     5 *    [err] = rpLibPutFile(libHandle,path,fileName,compress,append)
    66 *
    77 * ======================================================================
     
    2525 *
    2626 * FileName is the name of the file to import into the rappture object
    27  * FileType is an integer representing the type of file to include, text
    28  * (use 0) or binary (use 1).
     27 * Compress is an integer telling if the provided data should be compressed
     28 * (use 1) or left uncompressed (use 0).
    2929 * Append is an integer telling if this new data should overwrite
    3030 * (use 0) or be appended (use 1) to previous data in this node.
     
    3434DEFUN_DLD (rpLibPutString, args, ,
    3535"-*- texinfo -*-\n\
    36 [err] = rpLibPutString(@var{libHandle},@var{path},@var{value},@var{append})\n\
     36[err] = rpLibPutString(@var{libHandle},@var{path},@var{fileName},@var{compress},@var{append})\n\
    3737\n\
    3838Clients use this to set the value of a node.  If the @var{path}\n\
    3939is not specified (ie. empty string ""), it sets the value for the\n\
    4040root node.  Otherwise, it sets the value for the element specified\n\
    41 by the path.  The @var{value} is treated as the text within the \n\
     41by the path.  The added data is treated as the text within the \n\
    4242tag at the tail of the @var{path}.\n\
    4343\n\
    4444@var{fileName} is the name of the file to import into the rappture object\n\
    45 @var{fileType} is an integer representing the type of file to include, text\n\
    46 (use 0) or binary (use 1).\n\
     45@var{compress} is an integer telling if the provided data should be compressed\n\
     46(use 1) or left uncompressed (use 0).\n\
    4747@var{append} is an integer telling if this new data should overwrite\n\
    4848(use 0) or be appended (use 1) to previous data in this node.\n\
     
    5050Error Codes: err = 0 is success, anything else is failure.")
    5151{
    52     static std::string who = "rpLibPutString";
     52    static std::string who = "rpLibPutFile";
    5353
    5454    // The list of values to return.
     
    5959    std::string path      = "";
    6060    std::string fileName  = "";
    61     unsigned int fileType = 0;
     61    unsigned int compress = 0;
    6262    unsigned int append   = 0;
    6363    RpLibrary* lib        = NULL;
    6464
    65     if (nargin == 4) {
     65    if (nargin == 5) {
    6666
    6767        if ( args(0).is_real_scalar() &&
     
    6969             args(2).is_string()      &&
    7070             args(3).is_real_scalar() &&
    71              args(3).is_real_scalar()   ) {
     71             args(4).is_real_scalar()   ) {
    7272
    7373            libHandle = args(0).int_value ();
    7474            path      = args(1).string_value ();
    7575            fileName  = args(2).string_value ();
    76             fileType  = (unsigned int) args(3).int_value ();
    77             append    = (unsigned int) args(3).int_value ();
     76            compress  = (unsigned int) args(3).int_value ();
     77            append    = (unsigned int) args(4).int_value ();
    7878
    7979            /* Call the C subroutine. */
     
    8484                lib = getObject_Lib(libHandle);
    8585                if (lib) {
    86                     lib->putFile(path,fileName,fileType,append);
     86                    lib->putFile(path,fileName,compress,append);
    8787                    err = 0;
    8888                }
Note: See TracChangeset for help on using the changeset viewer.