Changeset 872


Ignore:
Timestamp:
Feb 8, 2008 2:01:38 PM (16 years ago)
Author:
dkearney
Message:

mainly code cleanups that i've made and stored in my repository over time.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r833 r872  
    17501750
    17511751if test "${libdir}" != "${prefix}/lib"; then
    1752     LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
    1753 else
    1754     LIB_SEARCH_DIRS="-L ${libdir}"
     1752    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
     1753else
     1754    LIB_SEARCH_DIRS="-L${libdir}"
    17551755fi
    17561756
     
    51985198echo "${ECHO_T}${MEXEXT}" >&6; }
    51995199        else
    5200             echo "can't find the matlab compiler \"mex\""
     5200                                    echo "can't find the matlab compiler \"mex\""
    52015201            echo "use --with-matlab=DIR to specify the location of a matlab installation"
    5202             exit 1
    5203         fi
     5202                    fi
    52045203    fi
    52055204fi
     
    52275226        if test -x "$with_octave/bin/mkoctfile"
    52285227        then
    5229             echo Found octave in $with_octave/bin/mkoctfile
    5230             MKOCTFILE="$with_octave/bin/mkoctfile"
     5228                        MKOCTFILE="$with_octave/bin/mkoctfile"
    52315229        else
    52325230            if test -x "$with_octave"
     
    52755273
    52765274
     5275                if test "x$MKOCTFILE" == "x" ; then
     5276                                                            echo "can't find the matlab compiler \"mkoctfile\""
     5277                    echo "use --with-octave=DIR to specify the location of a mkoctfile installation"
     5278                                    fi
    52775279            fi
    52785280        fi
  • trunk/configure.in

    r833 r872  
    1616
    1717if test "${libdir}" != "${prefix}/lib"; then
    18     LIB_SEARCH_DIRS="-L ${prefix}/lib -L ${libdir}"
     18    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
    1919else
    20     LIB_SEARCH_DIRS="-L ${libdir}"
     20    LIB_SEARCH_DIRS="-L${libdir}"
    2121fi
    2222
  • trunk/examples/c-example/compress.c

    r597 r872  
    1313
    1414    RpLibrary* lib = NULL;
     15    RapptureBuffer buf;
    1516
    1617    const char* xmlFilePath = NULL;
     
    3940        dxFilePath,RPLIB_COMPRESS,RPLIB_OVERWRITE);
    4041
     42    RapptureBufferInit(&buf);
     43    rpGetData(lib,"output.field(dxFile1).component.dx",&buf);
     44    RapptureBufferDecode(&buf,1,1);
     45    RapptureBufferDump(&buf,"bufferDump.txt");
     46    RapptureBufferFree(&buf);
     47
    4148    // write output to run file and signal
    4249    rpResult(lib);
    4350
     51    rpFreeLibrary(&lib);
     52
    4453    return 0;
    4554}
  • trunk/examples/c-example/compress.cc

    r597 r872  
    4343    // write output to run file and signal
    4444    lib->result();
     45    delete lib;
    4546
    4647    return 0;
  • trunk/examples/c-example/plot.cc

    r561 r872  
    5858    else {
    5959        printf("lib->xml() failed\n");
     60        delete lib;
    6061        exit(1);
    6162    }
     
    6667    if ( xmltext.empty() ) {
    6768        std::cout << "lib->getString(input.number(xmin).current) returns null" << std::endl;
     69        delete lib;
    6870        exit(1);
    6971    }
     
    109111    lib->result();
    110112
     113    delete lib;
     114
    111115    return 0;
    112116}
  • trunk/gui/scripts/field.tcl

    r839 r872  
    287287            }
    288288            2D - 3D {
    289                 if {[info exists _comp2unirect2d($comp)]} {
    290                     set limits [$_comp2unirect2d($comp) limits $which]
    291                     foreach {vmin vmax} $limits break
    292                     set axis vaxis
     289                if {[info exists _comp2unirect2d($comp)]} {
     290                    set limits [$_comp2unirect2d($comp) limits $which]
     291                    foreach {vmin vmax} $limits break
     292                    set axis vaxis
    293293                } elseif {[info exists _comp2vtk($comp)]} {
    294294                    foreach {xv yv} $_comp2vtk($comp) break
  • trunk/gui/scripts/field2dresult.tcl

    r839 r872  
    6262    array set flags $args
    6363    if { $flags(-mode) == "heightmap" } {
    64         set servers [Rappture::NanovisServer::getServer]
    65         if { $servers == "" } {
    66             error "No nanovis servers available"
    67         }
     64        set servers [Rappture::NanovisServer::getServer]
     65        if { $servers == "" } {
     66            error "No nanovis servers available"
     67        }
    6868        itk_component add renderer {
    6969            Rappture::HeightmapViewer $itk_interior.ren $servers
  • trunk/perl/Makefile.PL.in

    r718 r872  
    2222                     );
    2323    }
     24    @RAPPTURE_INC_SEARCHPATH = ( "@prefix@/include",
     25        "../include", "/usr/local/include", "/opt/include");
     26    $RAPPTURE_INC = "rappture.h";
    2427    @EXPAT_INC_SEARCHPATH = ( "@prefix@/include",
    2528        "/usr/local/include", "/opt/include", "../../expat-2.0.0/lib",
     
    2730        "/opt/expat-2.0.0/lib", "/opt/expat/lib" );
    2831    $EXPAT_INC="expat.h";
    29     @RAPPTURE_INC_SEARCHPATH = ( "@prefix@/include",
    30         "../include", "/usr/local/include", "/opt/include");
    31     $RAPPTURE_INC = "rappture.h";
     32    @RAPPTURE_LIB_SEARCHPATH = ( "@prefix@/lib",
     33        "@libdir@",
     34        "../src", "/usr/local/lib", "/opt/lib" );
     35    @RAPPTURE_LIBS=("librappture.so","librappture.a");
    3236    @EXPAT_LIB_SEARCHPATH = ( "@prefix@/lib",
    3337        "@libdir@",
     
    3640        "/opt/expat-2.0.0/lib", "/opt/expat/lib" );
    3741    @EXPAT_LIBS=("libexpat.so", "libexpat.a");
    38     @RAPPTURE_LIB_SEARCHPATH = ( "@prefix@/lib",
    39         "@libdir@",
    40         "../src", "/usr/local/lib", "/opt/lib" );
    41     @RAPPTURE_LIBS=("librappture.so","librappture.a");
    4242}
    4343else {
     
    115115}
    116116
     117find_include(\@RAPPTURE_INC_SEARCHPATH, $RAPPTURE_INC, \@INCLUDES);
    117118find_include(\@EXPAT_INC_SEARCHPATH, $EXPAT_INC, \@INCLUDES);
    118 find_include(\@RAPPTURE_INC_SEARCHPATH, $RAPPTURE_INC, \@INCLUDES);
     119find_lib(\@RAPPTURE_LIB_SEARCHPATH, \@RAPPTURE_LIBS, \@LIBS);
    119120find_lib(\@EXPAT_LIB_SEARCHPATH, \@EXPAT_LIBS, \@LIBS);
    120 find_lib(\@RAPPTURE_LIB_SEARCHPATH, \@RAPPTURE_LIBS, \@LIBS);
    121121
    122122WriteMakefile(
  • trunk/perl/Rappture.xs

    r665 r872  
    6767void
    6868RpLibrary::result()
     69        CODE:
     70                THIS->put("tool.version.rappture.language", "perl");
     71                THIS->result();
    6972
    7073MODULE = Rappture               PACKAGE = Rappture::RpUnits
  • trunk/src/core/RpLibrary.cc

    r857 r872  
    22422242        if (user != NULL) {
    22432243            username = std::string(user);
    2244         }
    2245         host = getenv("HOST");
    2246         if (host != NULL) {
    2247             hostname = std::string(host);
     2244        } else {
     2245            user = getenv("LOGNAME");
     2246            if (user != NULL) {
     2247                username = std::string(user);
     2248            }
    22482249        }
    22492250#endif
  • trunk/tcl/scripts/result.tcl

    • Property svn:keywords set to Date Rev
    r766 r872  
    4040    }
    4141
     42    $libobj put tool.version.rappture.revision "$LastChangedRevision$"
     43    $libobj put tool.version.rappture.modified "$LastChangedDate$"
     44    $libobj put tool.version.rappture.language "tcl"
     45
    4246    if {[info exists tcl_platform(user)]} {
    4347        $libobj put output.user $tcl_platform(user)
Note: See TracChangeset for help on using the changeset viewer.