Index: /trunk/src/cee/RpLibraryCInterface.h
===================================================================
--- /trunk/src/cee/RpLibraryCInterface.h	(revision 553)
+++ /trunk/src/cee/RpLibraryCInterface.h	(revision 554)
@@ -13,7 +13,10 @@
 
 
+#ifndef _RpLIBRARY_C_H
+#define _RpLIBRARY_C_H
+
 #ifdef __cplusplus
-extern "C" {
-#endif
+    extern "C" {
+#endif // ifdef __cplusplus
 
 typedef struct RpLibrary RpLibrary;
@@ -80,4 +83,6 @@
 
 #ifdef __cplusplus
-}
-#endif
+    }
+#endif // ifdef __cplusplus
+
+#endif // ifndef _RpLIBRARY_C_H
Index: /trunk/src/cee/RpUnitsCInterface.h
===================================================================
--- /trunk/src/cee/RpUnitsCInterface.h	(revision 553)
+++ /trunk/src/cee/RpUnitsCInterface.h	(revision 554)
@@ -12,7 +12,10 @@
  */
 
+#ifndef _RpUNITS_C_H
+#define _RpUNITS_C_H
+
 #ifdef __cplusplus
-extern "C" {
-#endif
+    extern "C" {
+#endif // ifdef __cplusplus
 
     typedef struct RpUnits RpUnits;
@@ -71,4 +74,6 @@
 
 #ifdef __cplusplus
-}
-#endif
+    }
+#endif // ifdef __cplusplus
+
+#endif // ifndef _RpUNITS_C_H
Index: /trunk/src/core/RpLibrary.cc
===================================================================
--- /trunk/src/core/RpLibrary.cc	(revision 553)
+++ /trunk/src/core/RpLibrary.cc	(revision 554)
@@ -1205,5 +1205,5 @@
     }
 
-    if (translateFlag == TRANSLATE) {
+    if (translateFlag == RPLIB_TRANSLATE) {
         // translatedContents = new char[strlen(retCStr)+1];
         len = strlen(retCStr);
@@ -1356,5 +1356,5 @@
     if (retNode) {
 
-        if (append) {
+        if (append == RPLIB_APPEND) {
             if ( (contents = scew_element_contents(retNode)) ) {
                 tmpVal = std::string(contents);
@@ -1363,5 +1363,5 @@
         }
 
-        if (translateFlag == TRANSLATE) {
+        if (translateFlag == RPLIB_TRANSLATE) {
             _translateIn(value,translatedContents);
             scew_element_set_contents(retNode,translatedContents.c_str());
@@ -1429,5 +1429,5 @@
     // old_elem = _find(path+"."+nodeName,NO_CREATE_PATH);
 
-    if (!append) {
+    if (append == RPLIB_OVERWRITE) {
         retNode = _find(path,NO_CREATE_PATH);
         if (retNode) {
@@ -1621,4 +1621,6 @@
     std::string xmlText = "";
     time_t t = 0;
+    struct tm* timeinfo = NULL;
+    std::string timestamp = "";
 
     if (this->root) {
@@ -1629,4 +1631,16 @@
         put("tool.repository.rappture.revision","$Rev$");
         put("tool.repository.rappture.url","$URL$");
+
+        // generate a timestamp for the run file
+        timeinfo = localtime(&t);
+        timestamp = std::string(ctime(&t));
+        // erase the 24th character because it is a newline
+        timestamp.erase(24);
+        // concatinate the timezone
+        timestamp.append(" ");
+        timestamp.append(timeinfo->tm_zone);
+
+        // add the timestamp to the run file
+        put("output.time", timestamp);
 
         if ( file.is_open() ) {
Index: /trunk/src/core/RpLibrary.h
===================================================================
--- /trunk/src/core/RpLibrary.h	(revision 553)
+++ /trunk/src/core/RpLibrary.h	(revision 554)
@@ -12,4 +12,17 @@
  */
 
+#ifndef _RpLIBRARY_H
+#define _RpLIBRARY_H
+
+enum RP_LIBRARY_CONSTS {
+    RPLIB_OVERWRITE     = 0,
+    RPLIB_APPEND        = 1,
+    RPLIB_NO_TRANSLATE  = 0,
+    RPLIB_TRANSLATE     = 1,
+};
+
+
+#ifdef __cplusplus
+
 #include "scew/scew.h"
 #include "scew_extras.h"
@@ -27,4 +40,5 @@
 
 /* indentation size (in whitespaces) */
+
 #define INDENT_SIZE 4
 #define CREATE_PATH 1
@@ -35,8 +49,4 @@
 #define NO_TRANSLATE 0
 
-#ifndef _RpLIBRARY_H 
-#define _RpLIBRARY_H
-
-
 class RpLibrary
 {
@@ -71,7 +81,7 @@
 
         std::string get       ( std::string path = "",
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
         std::string getString ( std::string path = "",
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
 
         double      getDouble ( std::string path = "");
@@ -83,17 +93,17 @@
         RpLibrary&  get       ( std::string path = "",
                                 std::string retVal = "",
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
 
         RpLibrary&  get       ( std::string path = "",
                                 double retVal = 0.0,
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
 
         RpLibrary&  get       ( std::string path = "",
                                 int retVal = 0,
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
 
         RpLibrary&  get       ( std::string path = "",
                                 bool retVal = false,
-                                int translateFlag = TRANSLATE);
+                                int translateFlag = RPLIB_TRANSLATE);
         */
 
@@ -101,16 +111,16 @@
                             std::string value,
                             std::string id = "",
-                            int append = 0,
-                            int translateFlag = TRANSLATE);
+                            int append = RPLIB_OVERWRITE,
+                            int translateFlag = RPLIB_TRANSLATE   );
 
         RpLibrary& put (    std::string path,
                             double value,
                             std::string id = "",
-                            int append = 0  );
+                            int append = RPLIB_OVERWRITE    );
 
         RpLibrary& put (    std::string path,
                             RpLibrary* value,
                             std::string id = "",
-                            int append = 0  );
+                            int append = RPLIB_OVERWRITE    );
 
         RpLibrary* remove (std::string path = "");
@@ -443,3 +453,5 @@
 /*--------------------------------------------------------------------------*/
 
-#endif
+#endif // ifdef __cplusplus
+
+#endif // ifndef _RpLIBRARY_H
Index: /trunk/src/core/RpUnits.cc
===================================================================
--- /trunk/src/core/RpUnits.cc	(revision 553)
+++ /trunk/src/core/RpUnits.cc	(revision 554)
@@ -19,12 +19,9 @@
 // set the dictionary to be case insensitive for seaches and storage
 RpDict<std::string,RpUnits*,RpUnits::_key_compare>* RpUnits::dict =
-    new RpDict<std::string,RpUnits*,RpUnits::_key_compare>(true);
+    new RpDict<std::string,RpUnits*,RpUnits::_key_compare>(
+        RPUNITS_CASE_INSENSITIVE);
 
 // install predefined units
 static RpUnitsPreset loader;
-
-// convert function flags
-const int RpUnits::UNITS_OFF = 0;
-const int RpUnits::UNITS_ON  = 1;
 
 /**********************************************************************/
@@ -646,5 +643,6 @@
 
     name = "m" + basisName;
-    RpUnits * milli = RpUnits::define(name, basis, basis->type,!RPUNITS_CI);
+    RpUnits * milli = RpUnits::define(name, basis, basis->type,
+        !RPUNITS_CASE_INSENSITIVE);
     RpUnits::define(milli, basis, milli2base, base2milli);
 
@@ -658,5 +656,6 @@
 
     name = "p" + basisName;
-    RpUnits * pico  = RpUnits::define(name, basis, basis->type,!RPUNITS_CI);
+    RpUnits * pico  = RpUnits::define(name, basis, basis->type,
+        !RPUNITS_CASE_INSENSITIVE);
     RpUnits::define(pico, basis, pico2base, base2pico);
 
@@ -682,5 +681,6 @@
 
     name = "M" + basisName;
-    RpUnits * mega  = RpUnits::define(name, basis, basis->type,!RPUNITS_CI);
+    RpUnits * mega  = RpUnits::define(name, basis, basis->type,
+        !RPUNITS_CASE_INSENSITIVE);
     RpUnits::define(mega, basis, mega2base, base2mega);
 
@@ -694,5 +694,6 @@
 
     name = "P" + basisName;
-    RpUnits * peta  = RpUnits::define(name, basis, basis->type,!RPUNITS_CI);
+    RpUnits * peta  = RpUnits::define(name, basis, basis->type,
+        !RPUNITS_CASE_INSENSITIVE);
     RpUnits::define(peta, basis, peta2base, base2peta);
 
@@ -1201,5 +1202,5 @@
         }
 
-        if (showUnits) {
+        if (showUnits == RPUNITS_UNITS_ON) {
             outVal << numVal << fromUnitsName;
         }
@@ -1223,5 +1224,5 @@
         }
 
-        if (showUnits) {
+        if (showUnits == RPUNITS_UNITS_ON) {
             outVal << numVal << toUnitsName;
         }
@@ -1395,5 +1396,5 @@
                 // outVal.flags(std::ios::fixed);
                 // outVal.precision(10);
-                if (showUnits) {
+                if (showUnits == RPUNITS_UNITS_ON) {
                     outVal << numVal << toUnitsName;
                 }
@@ -1434,5 +1435,5 @@
 
 
-    if (showUnits) {
+    if (showUnits == RPUNITS_UNITS_ON) {
         unitText << retVal << toUnits->getUnitsName();
     }
Index: /trunk/src/core/RpUnits.h
===================================================================
--- /trunk/src/core/RpUnits.h	(revision 553)
+++ /trunk/src/core/RpUnits.h	(revision 554)
@@ -13,23 +13,16 @@
  * ======================================================================
  */
-#include <iostream>
-#include <string>
-#include <list>
-#include <sstream>
-#include <stdlib.h>
-#include <errno.h>
-#include <math.h>
-
-#include "RpDict.h"
-#include "RpUnitsStd.h"
 
 #ifndef _RpUNITS_H
 #define _RpUNITS_H
 
-#define LIST_TEMPLATE RpUnitsListEntry
+enum RP_UNITS_CONSTS {
+    RPUNITS_UNITS_OFF           = 0,
+    RPUNITS_UNITS_ON            = 1
+};
 
 // RpUnits Case Insensitivity define
-#define RPUNITS_CI true
-
+#define RPUNITS_CASE_INSENSITIVE true
+//
 //define our different types of units
 #define RP_TYPE_ENERGY      "energy"
@@ -44,12 +37,19 @@
 #define RP_TYPE_MISC        "misc"
 
-// should the define function:
-// 1. compare portions of inStr to unit names that have previously 
-//    been defined (you must parse in order for this option to work)
-#define COMPARE_MASK    1
-// 2. create a unit if no unit by the name exists.
-#define CREATE_MASK     2
-// 3. parse the unit name to try to find previously defined units.
-#define PARSE_MASK      4
+
+#ifdef __cplusplus
+
+#include <iostream>
+#include <string>
+#include <list>
+#include <sstream>
+#include <stdlib.h>
+#include <errno.h>
+#include <math.h>
+
+#include "RpDict.h"
+#include "RpUnitsStd.h"
+
+#define LIST_TEMPLATE RpUnitsListEntry
 
 class RpUnits;
@@ -329,9 +329,4 @@
     public:
 
-        // constant static class variables
-        // flags to tell how convert should return the value
-        static const int UNITS_OFF;
-        static const int UNITS_ON;
-
         // users member fxns
         std::string getUnits() const;
@@ -364,23 +359,11 @@
         std::string convert (   const RpUnits* toUnits,
                                 double val,
-                                int showUnits = 0,
+                                int showUnits = RPUNITS_UNITS_OFF,
                                 int* result = NULL  ) const;
-
-        static std::string convert1 ( std::string val,
-                                     std::string toUnits,
-                                     int showUnits,
-                                     int* result = NULL );
 
         static std::string convert ( std::string val,
                                      std::string toUnits,
-                                     int showUnits,
+                                     int showUnits = RPUNITS_UNITS_OFF,
                                      int* result = NULL );
-
-        /*
-        static std::string convert ( std::string val,
-                                     std::string toUnits,
-                                     int showUnits,
-                                     int* result = NULL );
-        */
 
         // turn the current unit to the metric system
@@ -414,5 +397,5 @@
                                 const RpUnits* basis=NULL,
                                 const std::string type="",
-                                bool caseInsensitive=RPUNITS_CI);
+                                bool caseInsensitive=RPUNITS_CASE_INSENSITIVE);
 
         // add relation rule
@@ -713,3 +696,5 @@
 /*--------------------------------------------------------------------------*/
 
-#endif
+#endif // ifdef __cplusplus
+
+#endif // ifndef _RpUNITS_H
Index: /trunk/src/fortran/RpLibraryFInterface.h
===================================================================
--- /trunk/src/fortran/RpLibraryFInterface.h	(revision 553)
+++ /trunk/src/fortran/RpLibraryFInterface.h	(revision 554)
@@ -12,13 +12,16 @@
  */
 
-#include "RpLibrary.h"
-#include <string.h>
-#include <fstream>
-#include "RpFortranCommon.h"
-#include "RpLibraryFStubs.h"
+#ifndef _RpLIBRARY_F_H
+#define _RpLIBRARY_F_H
 
 #ifdef __cplusplus
+    #include "RpLibrary.h"
+    #include <string.h>
+    #include <fstream>
+    #include "RpFortranCommon.h"
+    #include "RpLibraryFStubs.h"
+
     extern "C" {
-#endif
+#endif // ifdef __cplusplus
 
 int rp_lib ( const char* filePath, int filePath_len );
@@ -154,3 +157,5 @@
 #ifdef __cplusplus
     }
-#endif
+#endif // ifdef __cplusplus
+
+#endif // ifndef _RpLIBRARY_F_H
Index: /trunk/src/fortran/RpUnitsFInterface.h
===================================================================
--- /trunk/src/fortran/RpUnitsFInterface.h	(revision 553)
+++ /trunk/src/fortran/RpUnitsFInterface.h	(revision 554)
@@ -15,9 +15,9 @@
 #define _RpUNITS_F_H
 
-#include "RpFortranCommon.h"
-#include "RpUnitsFStubs.h"
+#ifdef __cplusplus
+    #include "RpFortranCommon.h"
+    #include "RpUnitsFStubs.h"
 
-#ifdef __cplusplus
-extern "C" {
+    extern "C" {
 #endif
 
@@ -50,6 +50,6 @@
 
 #ifdef __cplusplus
-}
-#endif
+    }
+#endif // ifdef __cplusplus
 
-#endif
+#endif // ifndef _RpUNITS_F_H
