Index: /trunk/SConstruct
===================================================================
--- /trunk/SConstruct	(revision 192)
+++ /trunk/SConstruct	(revision 193)
@@ -44,4 +44,5 @@
 env.Install(prefix+'bin', [reglookup, reglookup_recover, 'bin/reglookup-timeline'])
 env.Install(prefix+'lib', [libregfi, libregfi_static])
+env.Install(prefix+'include/regfi', Glob('include/*.h'))
 env.Install(prefix+'man/man1', [man_reglookup, man_reglookup_recover,
                                 man_reglookup_timeline])
Index: /trunk/include/regfi.h
===================================================================
--- /trunk/include/regfi.h	(revision 192)
+++ /trunk/include/regfi.h	(revision 193)
@@ -1,4 +1,5 @@
 /*
  * Copyright (C) 2005-2010 Timothy D. Morgan
+ * Copyright (C) 2010 Michael Cohen
  * Copyright (C) 2005 Gerald (Jerry) Carter
  *
@@ -71,10 +72,11 @@
 #include <pthread.h>
 
-#include "byteorder.h"
-#include "talloc.h"
-#include "winsec.h"
-#include "void_stack.h"
-#include "range_list.h"
-#include "lru_cache.h"
+/* regfi headers */
+#include <byteorder.h>
+#include <talloc.h>
+#include <winsec.h>
+#include <void_stack.h>
+#include <range_list.h>
+#include <lru_cache.h>
 
 
@@ -91,32 +93,33 @@
 #define REGFI_DEFAULT_LOG_MASK REGFI_LOG_ERROR|REGFI_LOG_WARN
 
-typedef uint8_t REGFI_ENCODING;
 /* regfi library supported character encodings */
-#define REGFI_ENCODING_ASCII   0
-#define REGFI_ENCODING_UTF8    1
-#define REGFI_ENCODING_DEFAULT REGFI_ENCODING_ASCII
 /* UTF16LE is not supported for output */
-#define REGFI_ENCODING_UTF16LE 2
-
-#define REGFI_NUM_ENCODINGS    3
+typedef enum {
+  REGFI_ENCODING_DEFAULT  = 0,
+  REGFI_ENCODING_ASCII =   0,
+  REGFI_ENCODING_UTF8  =  1,
+  REGFI_ENCODING_UTF16LE = 2,
+  REGFI_NUM_ENCODINGS  =  3
+} REGFI_ENCODING;
 
 /* Registry data types */
-#define REG_NONE                       0
-#define REG_SZ		               1
-#define REG_EXPAND_SZ                  2
-#define REG_BINARY 	               3
-#define REG_DWORD	               4
-#define REG_DWORD_LE	               4  /* DWORD, little endian */
-#define REG_DWORD_BE	               5  /* DWORD, big endian */
-#define REG_LINK                       6
-#define REG_MULTI_SZ  	               7
-#define REG_RESOURCE_LIST              8
-#define REG_FULL_RESOURCE_DESCRIPTOR   9
-#define REG_RESOURCE_REQUIREMENTS_LIST 10
-#define REG_QWORD                      11 /* 64-bit little endian */
+typedef enum {
+  REG_NONE                   =    0,
+  REG_SZ		     =    1,
+  REG_EXPAND_SZ              =    2,
+  REG_BINARY 	             =    3,
+  REG_DWORD	             =    4,
+  REG_DWORD_LE	             =    4 , /* DWORD, little endian */
+  REG_DWORD_BE	             =    5 , /* DWORD, big endian */
+  REG_LINK                   =    6,
+  REG_MULTI_SZ  	     =    7,
+  REG_RESOURCE_LIST          =    8,
+  REG_FULL_RESOURCE_DESCRIPTOR=   9,
+  REG_RESOURCE_REQUIREMENTS_LIST= 10,
+  REG_QWORD                     = 11, /* 64-bit little endian */
 /* XXX: Has MS defined a REG_QWORD_BE? */
 /* Not a real type in the registry */
-#define REG_KEY                    0x7FFFFFFF
-
+  REG_KEY                 =   0x7FFFFFFF
+} REGFI_DATA_TYPE;
 #define REGFI_OFFSET_NONE          0xffffffff
 
@@ -248,5 +251,8 @@
 
 
+#ifndef CHAR_BIT
 #define CHAR_BIT 8
+#endif
+
 #define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \
 		    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
@@ -385,5 +391,5 @@
 {
   /** Data type of this data, as indicated by the referencing VK record. */
-  uint32_t type;
+  REGFI_DATA_TYPE type;
 
   /** Length of the raw data. */
@@ -526,5 +532,5 @@
 
   /** Value's data type */
-  uint32_t type;
+  REGFI_DATA_TYPE type;
 
   /** VK record's magic number (should be "vk") */
Index: /trunk/lib/regfi.c
===================================================================
--- /trunk/lib/regfi.c	(revision 192)
+++ /trunk/lib/regfi.c	(revision 193)
@@ -2209,5 +2209,5 @@
     {
       regfi_log_add(REGFI_LOG_INFO, "Error occurred while"
-		    " converting data of type %d to %s.  Error message: %s",
+		    " converting data of type %d to %d.  Error message: %s",
 		    type, string_encoding, strerror(-tmp_size));
       talloc_free(tmp_str);
