Changeset 769 for trunk/src/core


Ignore:
Timestamp:
Jun 10, 2007, 11:09:09 PM (17 years ago)
Author:
dkearney
Message:

updated result function for all language bindings to automatically include the output.user data in xml on unix systems based on the USER environment variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/RpLibrary.cc

    r759 r769  
    22052205    struct tm* timeinfo = NULL;
    22062206    std::string timestamp = "";
     2207    std::string username = "";
    22072208
    22082209    if (this->root) {
     
    22252226#ifdef _WIN32
    22262227        timestamp.append(_tzname[_daylight]);
     2228        // username is left blank for windows because i dont know
     2229        // how to retrieve username on win32 environment.
     2230        username = "";
    22272231#else
    22282232        timestamp.append(timeinfo->tm_zone);
     2233        username = std::string(getenv("USER"));
    22292234#endif
    22302235
     
    22322237        put("output.time", timestamp);
    22332238        put("output.status",exitStatus);
     2239        put("output.user",username);
    22342240
    22352241        if ( file.is_open() ) {
Note: See TracChangeset for help on using the changeset viewer.