Changeset 157


Ignore:
Timestamp:
Jan 28, 2006 2:05:44 PM (18 years ago)
Author:
dkearney
Message:

added adjustments for new rappture libray c api which returns error information describing function success or failure

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/cee/RpLibraryCInterface.h

    r125 r157  
    1515#ifdef __cplusplus
    1616extern "C" {
    17 #endif 
     17#endif
    1818
    1919typedef struct RpLibrary RpLibrary;
     
    2121// lib definition functions
    2222//
    23 RpLibrary*  rpLibrary             (const char* path);
    24 void rpFreeLibrary                (RpLibrary** lib);
     23RpLibrary* rpLibrary  (const char* path);
     24int rpFreeLibrary     (RpLibrary** lib);
    2525
    2626// RpLibrary member functions
    27 RpLibrary*  rpElement            (RpLibrary* lib, const char* path);
    28 RpLibrary*  rpElementAsObject    (RpLibrary* lib, const char* path);
    29 const char* rpElementAsType       (RpLibrary* lib, const char* path);
    30 const char* rpElementAsComp       (RpLibrary* lib, const char* path);
    31 const char* rpElementAsId         (RpLibrary* lib, const char* path);
     27RpLibrary* rpElement (RpLibrary* lib, const char* path);
     28RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path);
     29int rpElementAsType  (RpLibrary* lib, const char* path, const char** retCStr);
     30int rpElementAsComp  (RpLibrary* lib, const char* path, const char** retCStr);
     31int rpElementAsId    (RpLibrary* lib, const char* path, const char** retCStr);
    3232
    33 RpLibrary* rpChildren             (RpLibrary* lib,
    34                                  const char* path,
    35                                  RpLibrary* childEle);
    36 RpLibrary* rpChildrenByType       (RpLibrary* lib,
    37                                  const char* path,
    38                                  RpLibrary* childEle,
    39                                  const char* type   );
     33RpLibrary* rpChildren (RpLibrary* lib,
     34                            const char* path,
     35                            RpLibrary* childEle  );
     36RpLibrary* rpChildrenByType  (RpLibrary* lib,
     37                            const char* path,
     38                            RpLibrary* childEle,
     39                            const char* type     );
     40
     41int rpGet            (RpLibrary* lib, const char* path, const char** retCStr);
     42int rpGetString      (RpLibrary* lib, const char* path, const char** retCStr);
     43int rpGetDouble      (RpLibrary* lib, const char* path, double* retDVal);
     44
     45int rpPut             (RpLibrary* lib,
     46                            const char* path,
     47                            const char* value,
     48                            const char* id,
     49                            int append         );
    4050/*
    41 RpLibrary* rpChildrenAsObject     (RpLibrary* lib,
    42                                  const char* path,
    43                                  const char* type   );
    44 const char* rpChildrenAsType      (RpLibrary* lib,
    45                                  const char* path,
    46                                  const char* type   );
    47 const char* rpChildrenAsComp      (RpLibrary* lib,
    48                                  const char* path,
    49                                  const char* type   );
    50 const char* rpChildrenAsId        (RpLibrary* lib,
    51                                  const char* path,
    52                                  const char* type   );
    53  */
     51int rpPutStringId     (RpLibrary* lib,
     52                            const char* path,
     53                            const char* value,
     54                            const char* id,
     55                            int append         );
     56*/
     57int rpPutString       (RpLibrary* lib,
     58                            const char* path,
     59                            const char* value,
     60                            int append         );
     61/*
     62int rpPutDoubleId     (RpLibrary* lib,
     63                            const char* path,
     64                            double value,
     65                            const char* id,
     66                            int append         );
     67*/
     68int rpPutDouble       (RpLibrary* lib,
     69                            const char* path,
     70                            double value,
     71                            int append         );
    5472
    55 const char* rpGet                 (RpLibrary* lib, const char* path);
    56 const char* rpGetString           (RpLibrary* lib, const char* path);
    57 double      rpGetDouble           (RpLibrary* lib, const char* path);
     73int rpXml             (RpLibrary* lib, const char** retCStr);
    5874
    59 void        rpPut                 (RpLibrary* lib,
    60                                  const char* path,
    61                                  const char* value,
    62                                  const char* id,
    63                                  int append         );
    64 void        rpPutStringId         (RpLibrary* lib,
    65                                  const char* path,
    66                                  const char* value,
    67                                  const char* id,
    68                                  int append         );
    69 void        rpPutString           (RpLibrary* lib,
    70                                  const char* path,
    71                                  const char* value,
    72                                  int append         );
    73 void        rpPutDoubleId         (RpLibrary* lib,
    74                                  const char* path,
    75                                  double value,
    76                                  const char* id,
    77                                  int append         );
    78 void        rpPutDouble           (RpLibrary* lib,
    79                                  const char* path,
    80                                  double value,
    81                                  int append         );
     75int rpNodeComp        (RpLibrary* node, const char** retCStr);
     76int rpNodeType        (RpLibrary* node, const char** retCStr);
     77int rpNodeId          (RpLibrary* node, const char** retCStr);
    8278
    83 const char* rpXml                 (RpLibrary* lib);
    84 
    85 const char* rpNodeComp            (RpLibrary* node);
    86 const char* rpNodeType            (RpLibrary* node);
    87 const char* rpNodeId              (RpLibrary* node);
    88 
    89 void        rpResult              (RpLibrary* lib);
     79int rpResult          (RpLibrary* lib);
    9080
    9181#ifdef __cplusplus
  • trunk/src/cee/RpLibraryCInterface.cc

    r125 r157  
    1919#endif
    2020
    21     RpLibrary*
    22     rpLibrary (const char* path)
    23     {
    24         return new RpLibrary(path);
    25     }
    26 
    27     void
    28     rpFreeLibrary (RpLibrary** lib)
    29     {
    30         if (lib && (*lib)) {
    31             delete (*lib);
    32             (*lib) = NULL;
    33         }
    34     }
    35 
    36     RpLibrary*
    37     rpElement (RpLibrary* lib, const char* path)
    38     {
    39         return lib->element(path);
    40     }
    41 
    42     RpLibrary*
    43     rpElementAsObject (RpLibrary* lib, const char* path)
    44     {
    45         return rpElement(lib,path);
    46     }
    47 
    48     const char*
    49     rpElementAsType (RpLibrary* lib, const char* path)
    50     {
    51         static std::string retStr = "";
    52         RpLibrary* retLib = lib->element(path);
    53 
    54         if (retLib) {
    55             retStr = retLib->nodeType();
    56         }
    57 
    58         return retStr.c_str();
    59     }
    60 
    61     const char*
    62     rpElementAsComp (RpLibrary* lib, const char* path)
    63     {
    64         static std::string retStr = "";
    65         RpLibrary* retLib = lib->element(path);
    66 
    67         if (retLib) {
    68             retStr = retLib->nodeComp();
    69         }
    70 
    71         return retStr.c_str();
    72     }
    73 
    74     const char*
    75     rpElementAsId (RpLibrary* lib, const char* path)
    76     {
    77         static std::string retStr = "";
    78         RpLibrary* retLib = lib->element(path);
    79 
    80         if (retLib) {
    81             retStr = retLib->nodeId();
    82         }
    83 
    84         return retStr.c_str();
    85     }
    86 
    87 
    88     RpLibrary*
    89     rpChildren (RpLibrary* lib, const char* path, RpLibrary* childEle   )
    90     {
    91         return lib->children(path,childEle);
    92     }
    93 
    94     RpLibrary*
    95     rpChildrenByType( RpLibrary* lib,
    96                     const char* path,
    97                     RpLibrary* childEle,
    98                     const char* type    )
    99     {
    100         return lib->children(path,childEle,type);
    101     }
    102 
    103     const char*
    104     rpGet (RpLibrary* lib, const char* path)
    105     {
    106         static std::string retStr = "";
    107         retStr = lib->getString(path);
    108         return retStr.c_str();
    109     }
    110 
    111     const char*
    112     rpGetString (RpLibrary* lib, const char* path)
    113     {
    114         static std::string retStr = "";
    115         retStr = lib->getString(path);
    116         return retStr.c_str();
    117     }
    118 
    119     double
    120     rpGetDouble (RpLibrary* lib, const char* path)
    121     {
    122         return lib->getDouble(path);
    123     }
    124 
    125     void
    126     rpPut         (RpLibrary* lib,
    127                  const char* path,
    128                  const char* value,
    129                  const char* id,
    130                  int append         )
    131     {
    132         lib->put(path,value,id,append);
    133     }
    134 
    135     void
    136     rpPutStringId (RpLibrary* lib,
    137                  const char* path,
    138                  const char* value,
    139                  const char* id,
    140                  int append          )
    141     {
    142         lib->put(path,value,id,append);
    143     }
    144 
    145     void
    146     rpPutString ( RpLibrary* lib,
     21RpLibrary*
     22rpLibrary (const char* path)
     23{
     24    return (new RpLibrary(path));
     25}
     26
     27int
     28rpFreeLibrary (RpLibrary** lib)
     29{
     30    int retVal = 1;
     31
     32    if (lib && (*lib)) {
     33        delete (*lib);
     34        (*lib) = NULL;
     35        retVal =  0;
     36    }
     37
     38    return retVal;
     39}
     40
     41RpLibrary*
     42rpElement (RpLibrary* lib, const char* path)
     43{
     44    return (lib->element(path));
     45}
     46
     47RpLibrary*
     48rpElementAsObject (RpLibrary* lib, const char* path)
     49{
     50    return rpElement(lib,path);
     51}
     52
     53
     54int
     55rpElementAsType (RpLibrary* lib, const char* path, const char** retCStr)
     56{
     57    int retVal = 1;
     58    static std::string retStr = "";
     59    RpLibrary* retLib = lib->element(path);
     60
     61    if (retLib) {
     62        retStr = retLib->nodeType();
     63        // check to see if retStr is empty
     64        retVal = 0;
     65    }
     66
     67    *retCStr = retStr.c_str();
     68
     69    return retVal;
     70}
     71
     72int
     73rpElementAsComp (RpLibrary* lib, const char* path, const char** retCStr)
     74{
     75    int retVal = 1;
     76    static std::string retStr = "";
     77    RpLibrary* retLib = lib->element(path);
     78
     79    if (retLib) {
     80        retStr = retLib->nodeComp();
     81        // check to see if retStr is empty
     82        retVal = 0;
     83    }
     84
     85    *retCStr = retStr.c_str();
     86    return retVal;
     87}
     88
     89int
     90rpElementAsId (RpLibrary* lib, const char* path, const char** retCStr)
     91{
     92    int retVal = 1;
     93    static std::string retStr = "";
     94    RpLibrary* retLib = lib->element(path);
     95
     96    if (retLib) {
     97        retStr = retLib->nodeId();
     98        // check to see if retStr is empty
     99        retVal = 0;
     100    }
     101
     102    *retCStr = retStr.c_str();
     103    return retVal;
     104}
     105
     106RpLibrary*
     107rpChildren (RpLibrary* lib, const char* path, RpLibrary* childEle )
     108{
     109    return ( lib->children(path,childEle) );
     110}
     111
     112RpLibrary*
     113rpChildrenByType( RpLibrary* lib,
    147114                const char* path,
    148                 const char* value,
    149                 int append          )
    150     {
    151         lib->put(path,value,"",append);
    152     }
    153 
    154     void
    155     rpPutDoubleId (RpLibrary* lib,
    156                  const char* path,
    157                  double value,
    158                  const char* id,
    159                  int append         )
    160     {
    161         lib->put(path,value,id,append);
    162     }
    163 
    164     void
    165     rpPutDouble   (RpLibrary* lib,
    166                  const char* path,
    167                  double value,
    168                  int append         )
    169     {
    170         lib->put(path,value,"",append);
    171     }
    172 
    173     const char*
    174     rpXml (RpLibrary* lib)
    175     {
    176         static std::string retStr = "";
     115                RpLibrary* childEle,
     116                const char* type )
     117{
     118    return ( lib->children(path,childEle,type) );
     119}
     120
     121int
     122rpGet (RpLibrary* lib, const char* path, const char** retCStr)
     123{
     124    return rpGetString(lib,path,retCStr);
     125}
     126
     127int
     128rpGetString (RpLibrary* lib, const char* path, const char** retCStr)
     129{
     130    int retVal = 0;
     131    static std::string retStr = "";
     132
     133    retStr = lib->getString(path);
     134
     135    *retCStr = retStr.c_str();
     136    return retVal;
     137}
     138
     139int
     140rpGetDouble (RpLibrary* lib, const char* path, double* retDVal)
     141{
     142    int retVal = 0;
     143    *retDVal = lib->getDouble(path);
     144    return retVal;
     145}
     146
     147int
     148rpPut         (RpLibrary* lib,
     149             const char* path,
     150             const char* value,
     151             const char* id,
     152             int append         )
     153{
     154    int retVal = 0;
     155    lib->put(path,value,id,append);
     156    return retVal;
     157}
     158
     159/*
     160int
     161rpPutStringId (RpLibrary* lib,
     162             const char* path,
     163             const char* value,
     164             const char* id,
     165             int append          )
     166{
     167    int retVal = 0;
     168    lib->put(path,value,id,append);
     169    return retVal;
     170}
     171*/
     172
     173int
     174rpPutString ( RpLibrary* lib,
     175            const char* path,
     176            const char* value,
     177            int append          )
     178{
     179    int retVal = 0;
     180    lib->put(path,value,"",append);
     181    return retVal;
     182}
     183
     184/*
     185int
     186rpPutDoubleId (RpLibrary* lib,
     187             const char* path,
     188             double value,
     189             const char* id,
     190             int append         )
     191{
     192    int retVal = 0;
     193    lib->put(path,value,id,append);
     194    return retVal;
     195}
     196*/
     197
     198int
     199rpPutDouble   (RpLibrary* lib,
     200             const char* path,
     201             double value,
     202             int append         )
     203{
     204    int retVal = 0;
     205    lib->put(path,value,"",append);
     206    return retVal;
     207}
     208
     209int
     210rpXml (RpLibrary* lib, const char** retCStr)
     211{
     212    int retVal = 1;
     213    static std::string retStr = "";
     214
     215    if (lib != NULL) {
     216        retStr = "";
    177217        retStr = lib->xml();
    178         return retStr.c_str();
    179     }
    180 
    181     const char*
    182     rpNodeComp (RpLibrary* node)
    183     {
    184         static std::string retStr = "";
     218
     219        // string should never be empty after lib->xml fxn call
     220        // lib->xml returns xml header at the very least.
     221        if ( !retStr.empty() ) {
     222            retVal = 0;
     223        }
     224    }
     225
     226    *retCStr = retStr.c_str();
     227    return retVal;
     228}
     229
     230int
     231rpNodeComp (RpLibrary* node, const char** retCStr)
     232{
     233    int retVal = 1;
     234    static std::string retStr = "";
     235
     236    if (node != NULL) {
     237        retStr = "";
    185238        retStr = node->nodeComp();
    186         return retStr.c_str();
    187     }
    188 
    189     const char*
    190     rpNodeType (RpLibrary* node)
    191     {
    192         static std::string retStr = "";
     239        if ( !retStr.empty() ) {
     240            retVal = 0;
     241        }
     242        *retCStr = retStr.c_str();
     243    }
     244
     245    return retVal;
     246}
     247
     248int
     249rpNodeType (RpLibrary* node, const char** retCStr)
     250{
     251    int retVal = 1;
     252    static std::string retStr = "";
     253
     254    if (node != NULL) {
     255        retStr = "";
    193256        retStr = node->nodeType();
    194         return retStr.c_str();
    195     }
    196 
    197     const char*
    198     rpNodeId (RpLibrary* node)
    199     {
    200         static std::string retStr = "";
     257        if ( !retStr.empty() ) {
     258            retVal = 0;
     259        }
     260        *retCStr = retStr.c_str();
     261    }
     262
     263    return retVal;
     264}
     265
     266int
     267rpNodeId (RpLibrary* node, const char** retCStr)
     268{
     269    int retVal = 0;
     270    static std::string retStr = "";
     271
     272    if (node != NULL) {
     273        retStr = "";
    201274        retStr = node->nodeId();
    202         return retStr.c_str();
    203     }
    204 
    205     void
    206     rpResult (RpLibrary* lib)
    207     {
    208         // signal the processing is complete
    209         lib->result();
    210     }
     275        if ( !retStr.empty() ) {
     276            retVal = 0;
     277        }
     278        *retCStr = retStr.c_str();
     279    }
     280
     281    return retVal;
     282}
     283
     284int
     285rpResult (RpLibrary* lib)
     286{
     287    int retVal = 0;
     288    // signal the processing is complete
     289    lib->result();
     290    return retVal;
     291}
    211292
    212293#ifdef __cplusplus
  • trunk/test/src/RpLibraryC_test.c

    r142 r157  
    1010#include "RpLibraryCInterface.h"
    1111
    12 
     12int test_lib(RpLibrary** lib, const char* path);
    1313int test_element (RpLibrary* lib, const char* path );
    1414int test_get (RpLibrary* lib, const char* path );
     
    2626int test_childrenByType (RpLibrary* lib, const char* path, const char* type );
    2727
     28int test_lib (RpLibrary** lib, const char* path) {
     29
     30    int retVal = 0;
     31
     32    *lib = NULL;
     33    *lib = rpLibrary(path);
     34
     35    printf("TESTING LIBRARY: path = %s\n", path);
     36
     37    if (*lib != NULL) {
     38        printf("creation of library successful\n");
     39    }
     40    else {
     41        printf("creation of library failed\n");
     42        retVal += 1;
     43    }
     44
     45    printf ("lib = %x\n",(unsigned int)(*lib));
     46
     47    return retVal;
     48}
     49
    2850int test_element (RpLibrary* lib, const char* path )
    2951{
    30     int retVal = 1;
     52    int retVal = 0;
    3153    RpLibrary* searchEle = NULL;
    3254    const char* type = NULL;
     
    3759
    3860    searchEle = rpElement(lib,path);
    39     type = rpElementAsType(lib,path);
    40     comp = rpElementAsComp(lib,path);
    41     id = rpElementAsId(lib,path);
     61    retVal += rpElementAsType(lib,path,&type);
     62    retVal += rpElementAsComp(lib,path,&comp);
     63    retVal += rpElementAsId(lib,path,&id);
    4264
    4365    if (!searchEle) {
    4466        printf("searchEle is NULL\n");
    45         retVal = 1;
     67        retVal += 1;
    4668    }
    4769    else {
     
    5072        printf("searchEle type = :%s:\n", type);
    5173
    52         comp = rpNodeComp(searchEle);
    53         id   = rpNodeId(searchEle);
    54         type = rpNodeType(searchEle);
     74        retVal += rpNodeComp(searchEle,&comp);
     75        retVal += rpNodeId(searchEle,&id);
     76        retVal += rpNodeType(searchEle,&type);
    5577
    5678        printf("searchEle comp = :%s:\n", comp);
     
    5880        printf("searchEle type = :%s:\n", type);
    5981
    60         retVal = 0;
    6182    }
    6283
     
    6687int test_getString (RpLibrary* lib, const char* path )
    6788{
    68     int retVal = 1;
     89    int retVal = 0;
    6990    const char* searchVal = NULL;
    7091
    7192    printf("TESTING GET String: path = %s\n", path);
    7293
    73     searchVal = rpGetString(lib,path);
    74 
    75     if (!searchVal || *searchVal == '\0') {
     94    retVal += rpGetString(lib,path,&searchVal);
     95
     96    if ( (retVal) || !searchVal || *searchVal == '\0') {
    7697        printf("searchVal is EMPTY STRING\n");
    77         retVal = 1;
     98        retVal += 1;
    7899    }
    79100    else {
     
    87108int test_getDouble (RpLibrary* lib, const char* path )
    88109{
    89     int retVal = 1;
     110    int retVal = 0;
    90111    double searchVal = 0.0;
    91112
    92113    printf("TESTING GET Double: path = %s\n", path);
    93114
    94     searchVal = rpGetDouble(lib,path);
    95 
    96     printf("searchVal = :%f:\n", searchVal);
    97     retVal = 0;
     115    retVal = rpGetDouble(lib,path,&searchVal);
     116
     117    if (!retVal) {
     118        printf("searchVal = :%f:\n", searchVal);
     119    }
     120    else {
     121        printf("GET Double: FAILED\n");
     122    }
    98123
    99124    return retVal;
     
    102127int test_children (RpLibrary* lib, const char* path)
    103128{
    104     int retVal = 1;
     129    int retVal = 0;
    105130    RpLibrary* childEle = NULL;
    106131    const char* id = NULL;
     
    111136
    112137    while ( (childEle = rpChildren(lib,path,childEle)) ) {
    113         comp = rpNodeComp(childEle);
    114         id   = rpNodeId(childEle);
    115         type = rpNodeType(childEle);
     138        retVal += rpNodeComp(childEle,&comp);
     139        retVal += rpNodeId(childEle,&id);
     140        retVal += rpNodeType(childEle,&type);
    116141
    117142        printf("childEle comp = :%s:\n",comp);
    118143        printf("childEle   id = :%s:\n",id);
    119144        printf("childEle type = :%s:\n",type);
    120 
    121     }
    122 
    123     retVal = 0;
     145    }
    124146
    125147    return retVal;
     
    128150int test_childrenByType (RpLibrary* lib, const char* path, const char* searchType )
    129151{
    130     int retVal = 1;
     152    int retVal = 0;
    131153    RpLibrary* childEle = NULL;
    132154    const char* id = NULL;
     
    137159
    138160    while ( (childEle = rpChildrenByType(lib,path,childEle,searchType)) ) {
    139         comp = rpNodeComp(childEle);
    140         id   = rpNodeId(childEle);
    141         type = rpNodeType(childEle);
     161        retVal += rpNodeComp(childEle,&comp);
     162        retVal += rpNodeId(childEle,&id);
     163        retVal += rpNodeType(childEle,&type);
    142164
    143165        printf("childEle comp = :%s:\n",comp);
    144166        printf("childEle   id = :%s:\n",id);
    145167        printf("childEle type = :%s:\n",type);
    146 
    147     }
    148 
    149     retVal = 0;
     168    }
    150169
    151170    return retVal;
     
    154173int test_putString (RpLibrary* lib, const char* path, const char* value, int append)
    155174{
    156     int retVal = 1;
     175    int retVal = 0;
    157176    const char* searchVal = NULL;
    158177
    159178    printf("TESTING PUT String: path = %s\n", path);
    160179
    161     rpPutString(lib,path,value,append);
    162     searchVal = rpGetString(lib, path);
    163 
    164     if (!searchVal || *searchVal == '\0') {
    165         printf("searchVal is EMPTY STRING\n");
    166         retVal = 1;
     180    retVal += rpPutString(lib,path,value,append);
     181    if (!retVal) {
     182        retVal += rpGetString(lib, path, &searchVal);
     183    }
     184
     185    if (retVal || !searchVal || *searchVal == '\0') {
     186        printf("searchVal is EMPTY STRING, or there was an error\n");
    167187    }
    168188    else {
    169189        printf("searchVal = :%s:\n", searchVal);
    170         retVal = 0;
    171190    }
    172191
     
    176195int test_putDouble (RpLibrary* lib, const char* path, double value, int append)
    177196{
    178     int retVal = 1;
     197    int retVal = 0;
    179198    double searchVal = 0.0;
    180199
    181200    printf("TESTING PUT String: path = %s\n", path);
    182201
    183     rpPutDouble(lib,path,value,append);
    184     searchVal = rpGetDouble(lib, path);
    185     printf("searchVal = :%f:\n", searchVal);
    186     retVal = 0;
     202    retVal += rpPutDouble(lib,path,value,append);
     203    if (!retVal) {
     204        retVal += rpGetDouble(lib, path,&searchVal);
     205    }
     206
     207    if ( retVal ){
     208        printf("ERROR while retrieving searchVal\n");
     209    }
     210    else {
     211        printf("searchVal = :%f:\n", searchVal);
     212    }
    187213
    188214    return retVal;
     
    193219{
    194220    RpLibrary* lib = NULL;
     221    int err = 0;
     222    const char* retStr = NULL;
    195223
    196224    if (argc < 2)
     
    200228    }
    201229
    202     lib = rpLibrary(argv[1]);
     230    test_lib(&lib,argv[1]);
    203231
    204232    test_element(lib,"input.number(min)");
     
    225253    test_childrenByType(lib,"input.number(test)","preset");
    226254
    227     printf("XML = \n%s\n",rpXml(lib));
     255    err = rpXml(lib,&retStr);
     256
     257    if ( !err ) {
     258        printf("XML = \n%s\n",retStr);
     259    }
     260    else {
     261        printf("rpXML failed\n");
     262    }
    228263
    229264    rpFreeLibrary(&lib);
Note: See TracChangeset for help on using the changeset viewer.