Index: /Makefile
===================================================================
--- /Makefile	(revision 167)
+++ /Makefile	(revision 168)
@@ -8,5 +8,5 @@
 
 FILES=$(REGLOOKUP)
-.PHONY: all $(SUB_DIRS) clean
+.PHONY: all $(SUB_DIRS) clean doc
 export
 
@@ -31,4 +31,8 @@
 
 
+doc:
+	doxygen doc/Doxyfile.regfi
+
 clean:
 	rm -rf .release
+	rm -rf doc/regfi
Index: /doc/Doxyfile.regfi
===================================================================
--- /doc/Doxyfile.regfi	(revision 168)
+++ /doc/Doxyfile.regfi	(revision 168)
@@ -0,0 +1,1551 @@
+# Doxyfile 1.6.2-20100208
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = reglookup
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = doc/regfi
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = YES
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE            =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  = trunk/lib trunk/include
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = talloc* REGFI_DATA::*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = .
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+#  plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = NO
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES
Index: /trunk/include/byteorder.h
===================================================================
--- /trunk/include/byteorder.h	(revision 167)
+++ /trunk/include/byteorder.h	(revision 168)
@@ -1,3 +1,3 @@
-/* 
+/*
  * Branched from Samba project Subversion repository, version #2:
  *  http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/include/byteorder.h
@@ -28,7 +28,11 @@
 #define _BYTEORDER_H
 
-/*
-   This file implements macros for machine independent short and 
-   int manipulation
+/**
+ * @file
+ *
+ * This file implements macros for machine independent short and 
+ * int manipulation
+
+@verbatim
 
 Here is a description of this file that I emailed to the samba list once:
@@ -54,6 +58,6 @@
 Ok, now to the macros themselves. I'll take a simple example, say we
 want to extract a 2 byte integer from a SMB packet and put it into a
-type called uint16 that is in the local machines byte order, and you
-want to do it with only the assumption that uint16 is _at_least_ 16
+type called uint16_t that is in the local machines byte order, and you
+want to do it with only the assumption that uint16_t is _at_least_ 16
 bits long (this last condition is very important for architectures
 that don't have any int types that are 2 bytes long)
@@ -65,8 +69,8 @@
 #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
 
-then to extract a uint16 value at offset 25 in a buffer you do this:
+then to extract a uint16_t value at offset 25 in a buffer you do this:
 
 char *buffer = foo_bar();
-uint16 xx = SVAL(buffer,25);
+uint16_t xx = SVAL(buffer,25);
 
 We are using the byteoder independence of the ANSI C bitshifts to do
@@ -98,4 +102,6 @@
 it also defines lots of intermediate macros, just ignore those :-)
 
+@endverbatim
+
 */
 
@@ -124,10 +130,10 @@
 #define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
 #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
-#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
-#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
-#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
-#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
+#define SVALS(buf,pos) ((int16_t)SVAL(buf,pos))
+#define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
+#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16_t)(val)))
+#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
+#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16_t)(val)))
+#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
 
 #else /* CAREFUL_ALIGNMENT */
@@ -136,23 +142,23 @@
    alignment errors */
 /*
-   WARNING: This section is dependent on the length of int16 and int32
+   WARNING: This section is dependent on the length of int16_t and int32_t
    being correct 
 */
 
 /* get single value from an SMB buffer */
-#define SVAL(buf,pos) (*(const uint16 *)((const char *)(buf) + (pos)))
-#define SVAL_NC(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define IVAL(buf,pos) (*(const uint32 *)((const char *)(buf) + (pos)))
-#define IVAL_NC(buf,pos) (*(uint32 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define SVALS(buf,pos) (*(const int16 *)((const char *)(buf) + (pos)))
-#define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define IVALS(buf,pos) (*(const int32 *)((const char *)(buf) + (pos)))
-#define IVALS_NC(buf,pos) (*(int32 *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define SVAL(buf,pos) (*(const uint16_t *)((const char *)(buf) + (pos)))
+#define SVAL_NC(buf,pos) (*(uint16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos)))
+#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define SVALS(buf,pos) (*(const int16_t *)((const char *)(buf) + (pos)))
+#define SVALS_NC(buf,pos) (*(int16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos)))
+#define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
 
 /* store single value in an SMB buffer */
-#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val))
-#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32)(val))
-#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
-#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32)(val))
+#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16_t)(val))
+#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32_t)(val))
+#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16_t)(val))
+#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32_t)(val))
 
 #endif /* CAREFUL_ALIGNMENT */
Index: /trunk/include/lru_cache.h
===================================================================
--- /trunk/include/lru_cache.h	(revision 167)
+++ /trunk/include/lru_cache.h	(revision 168)
@@ -1,3 +1,5 @@
-/*
+/**
+ * @file
+ *
  * Copyright (C) 2008-2009 Timothy D. Morgan
  *
Index: /trunk/include/range_list.h
===================================================================
--- /trunk/include/range_list.h	(revision 167)
+++ /trunk/include/range_list.h	(revision 168)
@@ -1,3 +1,5 @@
-/*
+/**
+ * @file 
+ *
  * Copyright (C) 2008-2009 Timothy D. Morgan
  *
Index: /trunk/include/regfi.h
===================================================================
--- /trunk/include/regfi.h	(revision 167)
+++ /trunk/include/regfi.h	(revision 168)
@@ -1,9 +1,9 @@
-/*
+/** @file
+ * Windows NT (and later) registry parsing library
+ *
  * Branched from Samba project Subversion repository, version #6903:
  *   http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/trunk/source/include/regfio.h?rev=6903&view=auto
  *
- * Windows NT (and later) registry parsing library
- *
- * Copyright (C) 2005-2009 Timothy D. Morgan
+ * Copyright (C) 2005-2010 Timothy D. Morgan
  * Copyright (C) 2005 Gerald (Jerry) Carter
  *
@@ -29,4 +29,10 @@
  * Thanks Nigel!
  ***********************************************************/
+
+/**
+ * @mainpage Home
+ *
+ * See \ref regfiTopLayer
+ */
 
 #ifndef _REGFI_H
@@ -47,6 +53,6 @@
 #include <iconv.h>
 
+#include "byteorder.h"
 #include "talloc.h"
-#include "smb_deps.h"
 #include "winsec.h"
 #include "void_stack.h"
@@ -61,5 +67,5 @@
 #define REGFI_MSG_ERROR 0x0010
 
-typedef uint8 REGFI_ENCODING;
+typedef uint8_t REGFI_ENCODING;
 /* regfi library supported character encodings */
 #define REGFI_ENCODING_ASCII   0
@@ -210,21 +216,35 @@
                                     | REGFI_NK_FLAG_UNKNOWN3)
 
+
+#define CHAR_BIT 8
+#define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \
+		    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
+#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
+#define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
+
+typedef struct _regfi_nttime
+{
+  uint32_t low;
+  uint32_t high;
+} REGFI_NTTIME;
+
+
 /* HBIN block */
 typedef struct _regfi_hbin 
 {
-  uint32 file_off;       /* my offset in the registry file */
-  uint32 ref_count;      /* how many active records are pointing to this
+  uint32_t file_off;       /* my offset in the registry file */
+  uint32_t ref_count;      /* how many active records are pointing to this
                           * block (not used currently) 
 			  */
   
-  uint32 first_hbin_off; /* offset from first hbin block */
-  uint32 block_size;     /* block size of this block 
+  uint32_t first_hbin_off; /* offset from first hbin block */
+  uint32_t block_size;     /* block size of this block 
                           * Should be a multiple of 4096 (0x1000)
 			  */
-  uint32 next_block;     /* relative offset to next block.  
+  uint32_t next_block;     /* relative offset to next block.  
 			  * NOTE: This value may be unreliable!
 			  */
 
-  uint8 magic[REGFI_HBIN_MAGIC_SIZE]; /* "hbin" */
+  uint8_t magic[REGFI_HBIN_MAGIC_SIZE]; /* "hbin" */
 } REGFI_HBIN;
 
@@ -236,7 +256,7 @@
    * depending on this list's type. 
    */
-  uint32 offset;
-
-  uint32 hash;
+  uint32_t offset;
+
+  uint32_t hash;
 } REGFI_SUBKEY_LIST_ELEM;
 
@@ -245,16 +265,16 @@
 {
   /* Real offset of this record's cell in the file */
-  uint32 offset;
-
-  uint32 cell_size;
+  uint32_t offset;
+
+  uint32_t cell_size;
   
   /* Number of immediate children */
-  uint32 num_children;  
+  uint32_t num_children;  
 
   /* Total number of keys referenced by this list and it's children */
-  uint32 num_keys;      
+  uint32_t num_keys;      
 
   REGFI_SUBKEY_LIST_ELEM* elements;
-  uint8 magic[REGFI_CELL_MAGIC_SIZE];
+  uint8_t magic[REGFI_CELL_MAGIC_SIZE];
 
   /* Set if the magic indicates this subkey list points to child subkey lists */
@@ -263,5 +283,5 @@
 
 
-typedef uint32 REGFI_VALUE_LIST_ELEM;
+typedef uint32_t REGFI_VALUE_LIST_ELEM;
 typedef struct _regfi_value_list
 {
@@ -269,5 +289,5 @@
    * May differ from parent key's num_values if there were parsing errors. 
    */
-  uint32 num_values;
+  uint32_t num_values;
 
   REGFI_VALUE_LIST_ELEM* elements;
@@ -281,8 +301,8 @@
 
   /* Represents raw buffer read from classname cell. */
-  uint8* raw;
+  uint8_t* raw;
 
   /* Length of the raw data. May be shorter than that indicated by parent key.*/
-  uint16 size;
+  uint16_t size;
 } REGFI_CLASSNAME;
 
@@ -290,14 +310,14 @@
 typedef struct _regfi_data
 {
-  uint32 type;
+  uint32_t type;
 
   /* Length of the raw data. */
-  uint32 size;
+  uint32_t size;
 
   /* This is always present, representing the raw data cell contents. */
-  uint8* raw;
+  uint8_t* raw;
 
   /* Represents the length of the interpreted value. Meaning is type-specific.*/
-  uint32 interpreted_size;
+  uint32_t interpreted_size;
 
   /* These items represent interpreted versions of the raw attribute above. 
@@ -307,20 +327,20 @@
   union _regfi_data_interpreted
   {
-    uint8* none; /* */
-    uint8* string;
-    uint8* expand_string;
-    uint8* binary; /* */
-    uint32 dword;
-    uint32 dword_be;
-    uint8* link;
-    uint8** multiple_string;
-    uint64 qword;
+    uint8_t* none; /* */
+    uint8_t* string;
+    uint8_t* expand_string;
+    uint8_t* binary; /* */
+    uint32_t dword;
+    uint32_t dword_be;
+    uint8_t* link;
+    uint8_t** multiple_string;
+    uint64_t qword;
 
     /* The following are treated as binary currently, but this may change in
      * the future as the formats become better understood.
      */
-    uint8* resource_list;
-    uint8* full_resource_descriptor;
-    uint8* resource_requirements_list;
+    uint8_t* resource_list;
+    uint8_t* full_resource_descriptor;
+    uint8_t* resource_requirements_list;
   } interpreted;
 } REGFI_DATA;
@@ -330,21 +350,21 @@
 typedef struct 
 {
-  uint32 offset;	/* Real offset of this record's cell in the file */
-  uint32 cell_size;	/* ((start_offset - end_offset) & 0xfffffff8) */
+  uint32_t offset;	/* Real offset of this record's cell in the file */
+  uint32_t cell_size;	/* ((start_offset - end_offset) & 0xfffffff8) */
 
   REGFI_DATA* data;     /* XXX: deprecated */
 
   char*  valuename;
-  uint8* valuename_raw;
-  uint16 name_length;
-  uint32 hbin_off;	/* offset from beginning of this hbin block */
+  uint8_t* valuename_raw;
+  uint16_t name_length;
+  uint32_t hbin_off;	/* offset from beginning of this hbin block */
   
-  uint32 data_size;     /* As reported in the VK record.  May be different than
+  uint32_t data_size;     /* As reported in the VK record.  May be different than
 			 * That obtained while parsing the data cell itself. */
-  uint32 data_off;      /* Offset of data cell (virtual) */
-  uint32 type;
-  uint8  magic[REGFI_CELL_MAGIC_SIZE];
-  uint16 flags;
-  uint16 unknown1;
+  uint32_t data_off;      /* Offset of data cell (virtual) */
+  uint32_t type;
+  uint8_t  magic[REGFI_CELL_MAGIC_SIZE];
+  uint16_t flags;
+  uint16_t unknown1;
   bool data_in_offset;
 } REGFI_VK_REC;
@@ -356,16 +376,16 @@
 typedef struct _regfi_sk_rec 
 {
-  uint32 offset;        /* Real file offset of this record */
-  uint32 cell_size;	/* ((start_offset - end_offset) & 0xfffffff8) */
+  uint32_t offset;        /* Real file offset of this record */
+  uint32_t cell_size;	/* ((start_offset - end_offset) & 0xfffffff8) */
 
   WINSEC_DESC* sec_desc;
-  uint32 hbin_off;	/* offset from beginning of this hbin block */
+  uint32_t hbin_off;	/* offset from beginning of this hbin block */
   
-  uint32 prev_sk_off;
-  uint32 next_sk_off;
-  uint32 ref_count;
-  uint32 desc_size;     /* size of security descriptor */
-  uint16 unknown_tag;
-  uint8  magic[REGFI_CELL_MAGIC_SIZE];
+  uint32_t prev_sk_off;
+  uint32_t next_sk_off;
+  uint32_t ref_count;
+  uint32_t desc_size;     /* size of security descriptor */
+  uint16_t unknown_tag;
+  uint8_t  magic[REGFI_CELL_MAGIC_SIZE];
 } REGFI_SK_REC;
 
@@ -374,6 +394,6 @@
 typedef struct
 {
-  uint32 offset;	/* Real offset of this record's cell in the file */
-  uint32 cell_size;	/* Actual or estimated length of the cell.  
+  uint32_t offset;	/* Real offset of this record's cell in the file */
+  uint32_t cell_size;	/* Actual or estimated length of the cell.  
 			 * Always in multiples of 8. 
 			 */
@@ -384,32 +404,32 @@
   
   /* header information */
-  uint16 flags;
-  uint8  magic[REGFI_CELL_MAGIC_SIZE];
-  NTTIME mtime;
-  uint16 name_length;
-  uint16 classname_length;
+  uint16_t flags;
+  uint8_t  magic[REGFI_CELL_MAGIC_SIZE];
+  REGFI_NTTIME mtime;
+  uint16_t name_length;
+  uint16_t classname_length;
   char* keyname;
-  uint8* keyname_raw;
-  uint32 parent_off;	            /* pointer to parent key */
-  uint32 classname_off;
+  uint8_t* keyname_raw;
+  uint32_t parent_off;	            /* pointer to parent key */
+  uint32_t classname_off;
   
   /* max lengths */
-  uint32 max_bytes_subkeyname;	    /* max subkey name * 2 */
-  uint32 max_bytes_subkeyclassname; /* max subkey classname length (as if) */
-  uint32 max_bytes_valuename;	    /* max valuename * 2 */
-  uint32 max_bytes_value;           /* max value data size */
+  uint32_t max_bytes_subkeyname;	    /* max subkey name * 2 */
+  uint32_t max_bytes_subkeyclassname; /* max subkey classname length (as if) */
+  uint32_t max_bytes_valuename;	    /* max valuename * 2 */
+  uint32_t max_bytes_value;           /* max value data size */
   
   /* unknowns */
-  uint32 unknown1;
-  uint32 unknown2;
-  uint32 unknown3;
-  uint32 unk_index;		    /* nigel says run time index ? */
+  uint32_t unknown1;
+  uint32_t unknown2;
+  uint32_t unknown3;
+  uint32_t unk_index;		    /* nigel says run time index ? */
   
   /* children */
-  uint32 num_subkeys;
-  uint32 subkeys_off;	/* offset of subkey list that points to NK records */
-  uint32 num_values;
-  uint32 values_off;	/* value lists which point to VK records */
-  uint32 sk_off;	/* offset to SK record */
+  uint32_t num_subkeys;
+  uint32_t subkeys_off;	/* offset of subkey list that points to NK records */
+  uint32_t num_values;
+  uint32_t values_off;	/* value lists which point to VK records */
+  uint32_t sk_off;	/* offset to SK record */
 } REGFI_NK_REC;
 
@@ -425,5 +445,5 @@
 
   /* For sanity checking (not part of the registry header) */
-  uint32 file_length;
+  uint32_t file_length;
 
   /* Metadata about hbins */
@@ -437,39 +457,39 @@
 
   /* Mask for error message types that will be stored. */
-  uint16 msg_mask;
+  uint16_t msg_mask;
 
 
   /* Data parsed from file header */
   /********************************/
-  uint8  magic[REGFI_REGF_MAGIC_SIZE];/* "regf" */
+  uint8_t  magic[REGFI_REGF_MAGIC_SIZE];/* "regf" */
 
  /* These sequence numbers should match if
   * the hive was properly synced to disk.
   */
-  uint32 sequence1;            
-  uint32 sequence2;
-
-  NTTIME mtime;
-  uint32 major_version;  /* Set to 1 in all known hives */
-  uint32 minor_version;  /* Set to 3 or 5 in all known hives */
-  uint32 type;           /* XXX: Unverified.  Set to 0 in all known hives */
-  uint32 format;         /* XXX: Unverified.  Set to 1 in all known hives */
-
-  uint32 root_cell;  /* Offset to root cell in the first (or any?) hbin block */
-  uint32 last_block; /* Offset to last hbin block in file */
-
-  uint32 cluster;    /* XXX: Unverified. Set to 1 in all known hives */
+  uint32_t sequence1;            
+  uint32_t sequence2;
+
+  REGFI_NTTIME mtime;
+  uint32_t major_version;  /* Set to 1 in all known hives */
+  uint32_t minor_version;  /* Set to 3 or 5 in all known hives */
+  uint32_t type;           /* XXX: Unverified.  Set to 0 in all known hives */
+  uint32_t format;         /* XXX: Unverified.  Set to 1 in all known hives */
+
+  uint32_t root_cell;  /* Offset to root cell in the first (or any?) hbin block */
+  uint32_t last_block; /* Offset to last hbin block in file */
+
+  uint32_t cluster;    /* XXX: Unverified. Set to 1 in all known hives */
 
   /* Matches hive's base file name. Stored in UTF-16LE */
-  uint8 file_name[REGFI_REGF_NAME_SIZE];
+  uint8_t file_name[REGFI_REGF_NAME_SIZE];
 
   WINSEC_UUID* rm_id;       /* XXX: Unverified. */
   WINSEC_UUID* log_id;      /* XXX: Unverified. */
   WINSEC_UUID* tm_id;       /* XXX: Unverified. */
-  uint32 flags;             /* XXX: Unverified. */
-  uint32 guid_signature;    /* XXX: Unverified. */
-
-  uint32 checksum;          /* Stored checksum from file */
-  uint32 computed_checksum; /* Our own calculation of the checksum. 
+  uint32_t flags;             /* XXX: Unverified. */
+  uint32_t guid_signature;    /* XXX: Unverified. */
+
+  uint32_t checksum;          /* Stored checksum from file */
+  uint32_t computed_checksum; /* Our own calculation of the checksum. 
 			     * (XOR of bytes 0x0000 - 0x01FB) */
 
@@ -477,16 +497,16 @@
   WINSEC_UUID* thaw_rm_id;  /* XXX: Unverified. */
   WINSEC_UUID* thaw_log_id; /* XXX: Unverified. */
-  uint32 boot_type;         /* XXX: Unverified. */
-  uint32 boot_recover;      /* XXX: Unverified. */
+  uint32_t boot_type;         /* XXX: Unverified. */
+  uint32_t boot_recover;      /* XXX: Unverified. */
 
   /* This seems to include random junk.  Possibly unsanitized memory left over
    * from when header block was written.  For instance, chunks of nk records 
    * can be found, though often it's all 0s. */
-  uint8 reserved1[REGFI_REGF_RESERVED1_SIZE];
+  uint8_t reserved1[REGFI_REGF_RESERVED1_SIZE];
 
   /* This is likely reserved and unusued currently.  (Should be all 0s.)
    * Included here for easier access in looking for hidden data 
    * or doing research. */
-  uint8 reserved2[REGFI_REGF_RESERVED2_SIZE];
+  uint8_t reserved2[REGFI_REGF_RESERVED2_SIZE];
 
 } REGFI_FILE;
@@ -499,6 +519,6 @@
   REGFI_NK_REC* cur_key;
   REGFI_ENCODING string_encoding;
-  uint32 cur_subkey;
-  uint32 cur_value;
+  uint32_t cur_subkey;
+  uint32_t cur_value;
 } REGFI_ITERATOR;
 
@@ -507,5 +527,5 @@
 {
   REGFI_NK_REC* nk;
-  uint32 cur_subkey;
+  uint32_t cur_subkey;
   /* We could store a cur_value here as well, but didn't see 
    * the use in it right now.
@@ -516,82 +536,86 @@
 typedef struct _regfi_buffer
 {
-  uint8* buf;
+  uint8_t* buf;
   uint32_t len;
 } REGFI_BUFFER;
 
 
-
-
 /******************************************************************************/
-/*                         Main iterator API                                  */
+/** 
+ * @defgroup regfiBase Base Functions: Usable with Any Layer
+ *
+ * These functions don't fit particularly well in any of the other layers or
+ * are intended for use with any of the API layers.
+ */
 /******************************************************************************/
 
-/* regfi_open: Attempts to open a registry hive and allocate related data
- *             structures.
- *
- * Arguments:
- *   filename -- A string containing the relative or absolute path of the
+
+/** Attempts to open a registry hive and allocate related data structures.
+ * 
+ * @param filename A string containing the relative or absolute path of the
  *               registry hive to be opened.
  *
- * Returns:
- *   A reference to a newly allocated REGFI_FILE structure, if successful. 
- *   NULL on error.
+ * @return A reference to a newly allocated REGFI_FILE structure, 
+ *         if successful;  NULL on error.
+ *
+ * @ingroup regfiBase
  */
 REGFI_FILE*           regfi_open(const char* filename);
 
 
-/* regfi_alloc: Parses file headers of an already open registry hive file and 
- *              allocates related structures for further parsing.
- *
- * Arguments:
- *   fd       -- A file descriptor of an already open file.  Must be seekable.
- *
- * Returns:
- *   A reference to a newly allocated REGFI_FILE structure, if successful. 
- *   NULL on error.
+/** Parses file headers of an already open registry hive file and 
+ *  allocates related structures for further parsing.
+ *
+ * @param fd A file descriptor of an already open file.  Must be seekable.
+ *
+ * @return A reference to a newly allocated REGFI_FILE structure, if successful;
+ *         NULL on error.
+ *
+ * @ingroup regfiBase
  */
 REGFI_FILE*           regfi_alloc(int fd);
 
 
-/* regfi_close: Closes and frees an open registry hive.
- *
- * Arguments:
- *   file     -- The registry structure to close.
- *
- * Returns:
- *   0 on success, -1 on failure with errno set.  
- *   errno codes are similar to those of close(2).
+/** Closes and frees an open registry hive.
+ *
+ * @param file The registry structure to close.
+ *
+ * @return 0 on success, -1 on failure with errno set.  
+ *         errno codes are similar to those of close(2).
+ *
+ * @ingroup regfiBase
  */
 int                   regfi_close(REGFI_FILE* file);
 
 
-/* regfi_free: Frees a hive's data structures without closing the underlying
- *             file.
- *
- * Arguments:
- *   file     -- The registry structure to free.
+/** Frees a hive's data structures without closing the underlying file.
+ *
+ * @param file The registry structure to free.
+ *
+ * @ingroup regfiBase
  */
 void                  regfi_free(REGFI_FILE* file);
 
 
-/* regfi_get_messages: Get errors, warnings, and/or verbose information
- *                     relating to processing of the given registry file.
- *
- * Arguments:
- *   file     -- the structure for the registry file
- *
- * Returns:
- *   A newly allocated char* which must be free()d by the caller.
+/** Get errors, warnings, and/or verbose information relating to processing of
+ *  the given registry file.
+ *
+ * @param file the structure for the registry file
+ *
+ * @return A newly allocated char* which must be free()d by the caller.
+ *
+ * @ingroup regfiBase
  */
 char*                 regfi_get_messages(REGFI_FILE* file);
 
 
-/* regfi_set_message_mask: Set the verbosity level of errors and warnings
- *                         generated by the library 
- *                         (as accessible via regfi_get_messages).
- *
- * Arguments:
- *   file     -- the structure for the registry file
- *   mask     -- an integer representing the types of messages desired.
+/** Set the verbosity level of errors and warnings generated by the library
+ *  (as accessible via regfi_get_messages).
+ *
+ * This may be called at any time and will take effect immediately.
+ *
+ * @param file   the structure for the registry file
+ *
+ * @param mask   an integer representing the types of messages desired.
  *               Acceptable values are created through bitwise ORs of 
  *               REGFI_MSG_* values.  For instance, if only errors and
@@ -606,24 +630,56 @@
  *               will prevent message accumulation.  
  *
- * This may be called at any time and will take effect immediately.
- */
-void                  regfi_set_message_mask(REGFI_FILE* file, uint16 mask);
-
-
-/* regfi_iterator_new: Creates a new iterator for the provided registry file.
- *
- * Arguments:
- *   file            -- The opened registry file the iterator should be
- *                      created for.
- *   output_encoding -- Character encoding that strings should be returned in.
- *                      Only supply the REGFI_ENCODING_* constants, as others 
- *                      will be rejected.
- *                      The following values are currently accepted:
- *                      REGFI_ENCODING_DEFAULT (currently REGFI_ENCODING_ASCII)
- *                      REGFI_ENCODING_ASCII
- *                      REGFI_ENCODING_UTF8
- *
- * Returns:
- *   A newly allocated REGFI_ITERATOR. Must be free()d with regfi_iterator_free.
+ * @ingroup regfiBase
+ */
+void                  regfi_set_message_mask(REGFI_FILE* file, uint16_t mask);
+
+
+/* Dispose of previously parsed records */
+
+/** Frees a key structure previously returned by one of the API functions
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBase
+ */
+void                  regfi_free_key(REGFI_NK_REC* nk);
+
+
+/** Frees a value structure previously returned by one of the API functions
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBase
+ */
+void                  regfi_free_value(REGFI_VK_REC* vk);
+
+
+
+/******************************************************************************/
+/** 
+ * @defgroup regfiTopLayer Top Layer: Primary regfi Library Interface
+ *
+ * This top layer of API functions provides an iterator interface which makes
+ * traversing registry data structures easy in both single-threaded and 
+ * multi-threaded scenarios.
+ */
+/******************************************************************************/
+
+/** Creates a new iterator for the provided registry file.
+ *
+ * @param file The opened registry file the iterator should be created for.
+ *
+ * @param output_encoding Character encoding that strings should be returned in.
+ *                        Only supply the REGFI_ENCODING_* constants, as others 
+ *                        will be rejected.
+ *                        The following values are currently accepted:
+ *                        REGFI_ENCODING_DEFAULT (currently REGFI_ENCODING_ASCII)
+ *                        REGFI_ENCODING_ASCII
+ *                        REGFI_ENCODING_UTF8
+ *
+ * @return A newly allocated REGFI_ITERATOR. 
+ *         Must be free()d with regfi_iterator_free.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_ITERATOR*       regfi_iterator_new(REGFI_FILE* file,
@@ -631,224 +687,216 @@
 
 
-/* regfi_iterator_free: Frees a registry file iterator previously created by 
- *                      regfi_iterator_new.
+/** Frees a registry file iterator previously created by regfi_iterator_new.
  *
  * This does not affect the underlying registry file's allocation status.
  *
- * Arguments:
- *   file            -- the iterator to be freed
+ * @param i the iterator to be freed
+ *
+ * @ingroup regfiTopLayer
  */
 void                  regfi_iterator_free(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_down: Traverse deeper into the registry tree at the
- *                      current subkey.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   true on success, false on failure.  Note that subkey and value indexes
- *   are preserved.  That is, if a regfi_iterator_up call occurs later
- *   (reversing the effect of this call) then the subkey and value referenced
- *   prior to the regfi_iterator_down call will still be referenced.  This 
- *   makes depth-first iteration particularly easy.
+/** Traverse deeper into the registry tree at the current subkey.
+ *
+ * @param i the iterator
+ *
+ * @return  true on success, false on failure.  
+ *          Note that subkey and value indexes are preserved.  That is, if a
+ *          regfi_iterator_up call occurs later (reversing the effect of this
+ *          call) then the subkey and value referenced prior to the
+ *          regfi_iterator_down call will still be referenced.  This  makes
+ *          depth-first iteration particularly easy.
+ *
+ * @ingroup regfiTopLayer
  */
 bool                  regfi_iterator_down(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_up: Traverse up to the current key's parent key.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   true on success, false on failure.  Any subkey or value state
- *   associated with the current key is lost.
+/** Traverse up to the current key's parent key.
+ *
+ * @param i the iterator
+ *
+ * @return  true on success, false on failure.  Any subkey or value state
+ *          associated with the current key is lost.
+ *
+ * @ingroup regfiTopLayer
  */
 bool                  regfi_iterator_up(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_to_root: Traverse up to the root key of the hive.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   true on success, false on failure.
+/** Traverse up to the root key of the hive.
+ *
+ * @param i the iterator
+ *
+ * @return true on success, false on failure.
+ *
+ * @ingroup regfiTopLayer
  */
 bool                  regfi_iterator_to_root(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_walk_path: Traverse down multiple levels in the registry hive.
- *
- * Arguments:
- *   i            -- the iterator
- *   path         -- a list of key names representing the path.  This list must
- *                   contain NUL terminated strings.  The list itself is
- *                   terminated with a NULL pointer.  All path elements must be
- *                   keys; value names are not accepted (even as the last
- *                   element).
+/** Traverse down multiple levels in the registry hive.
  *
  * XXX: This currently only accepts ASCII key names.  Need to look into
  *      accepting other encodings.
  *
- * Returns:
- *   true on success, false on failure.  If any element of path is not found,
- *   false will be returned and the iterator will remain in its original
- *   position.
- */
-bool                  regfi_iterator_walk_path(REGFI_ITERATOR* i, 
-					       const char** path);
-
-
-/* regfi_iterator_cur_key: Returns the currently referenced key.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A read-only key structure for the current key, or NULL on failure.
+ * @param i    the iterator
+ * @param path a list of key names representing the path.  This list must
+ *             contain NUL terminated strings.  The list itself is
+ *             terminated with a NULL pointer.  All path elements must be
+ *             keys; value names are not accepted (even as the last
+ *             element).
+ *
+ * @return true on success, false on failure.  If any element of path is not
+ *                 found, false will be returned and the iterator will remain
+ *                 in its original position.
+ *
+ * @ingroup regfiTopLayer
+ */
+bool regfi_iterator_walk_path(REGFI_ITERATOR* i, const char** path);
+
+
+/** Returns the currently referenced key.
+ *
+ * @param i the iterator
+ *
+ * @return A read-only key structure for the current key, or NULL on failure.
+ *
+ * @ingroup regfiTopLayer
  */
 const REGFI_NK_REC*   regfi_iterator_cur_key(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_cur_sk: Returns the SK (security) record referenced by the 
- *                        current key.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A read-only SK structure, or NULL on failure.
+/** Returns the SK (security) record referenced by the current key.
+ *
+ * @param i the iterator
+ *
+ * @return A read-only SK structure, or NULL on failure.
+ *
+ * @ingroup regfiTopLayer
  */
 const REGFI_SK_REC*   regfi_iterator_cur_sk(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_first_subkey: Sets the internal subkey index to the first
- *                              subkey referenced by the current key and returns
- *                              that key.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated key structure for the newly referenced first subkey, or
- *   NULL on failure.  Failure may be due to a lack of any subkeys or other
- *   errors.  Newly allocated keys must be freed with regfi_free_key.
+/** Sets the internal subkey index to the first subkey referenced by the current
+ *  key and returns that key.
+ *
+ * @param i the iterator
+ *
+ * @return A newly allocated key structure for the newly referenced first 
+ *         subkey, or NULL on failure.  Failure may be due to a lack of any
+ *         subkeys or other errors.  Newly allocated keys must be freed with
+ *         regfi_free_key.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_NK_REC*         regfi_iterator_first_subkey(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_cur_subkey: Returns the currently indexed subkey.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated key structure for the currently referenced subkey,
- *   or NULL on failure.  Newly allocated keys must be freed with 
- *   regfi_free_key.
+/** Returns the currently indexed subkey.
+ *
+ * @param i the iterator
+ *
+ * @return A newly allocated key structure for the currently referenced subkey,
+ *         or NULL on failure.  Newly allocated keys must be freed with 
+ *         regfi_free_key.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_NK_REC*         regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_next_subkey: Increments the internal subkey index to the next
- *                             key in the subkey-list and returns the subkey
- *                             for that index.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated key structure for the next subkey or NULL on
- *   failure.  Newly allocated keys must be freed with
- *   regfi_free_key.
+/** Increments the internal subkey index to the next key in the subkey-list and
+ *  returns the subkey for that index.
+ *
+ * @param i the iterator
+ *
+ * @return A newly allocated key structure for the next subkey or NULL on
+ *         failure.  Newly allocated keys must be freed with regfi_free_key.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_NK_REC*         regfi_iterator_next_subkey(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_find_subkey: Searches for a subkey with a given name under the
- *                             current key.
- *
- * Arguments:
- *   i            -- the iterator
- *   subkey_name  -- subkey name to search for
- *
- * Returns:
- *   True if such a subkey was found, false otherwise.  If a subkey is found,
- *   the current subkey index is set to that subkey.  Otherwise, the subkey
- *   index remains at the same location as before the call.
+/** Searches for a subkey with a given name under the current key.
+ *
+ * @param i           the iterator
+ * @param subkey_name subkey name to search for
+ *
+ * @return True if such a subkey was found, false otherwise.  If a subkey is
+ *         found, the current subkey index is set to that subkey.  Otherwise,
+ *         the subkey index remains at the same location as before the call.
+ *
+ * @ingroup regfiTopLayer
  */
 bool                  regfi_iterator_find_subkey(REGFI_ITERATOR* i, 
 						 const char* subkey_name);
 
-/* regfi_iterator_first_value: Sets the internal value index to the first
- *                             value referenced by the current key and returns
- *                             that value.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated value structure for the newly referenced first value, 
- *   or NULL on failure.  Failure may be due to a lack of any values or other
- *   errors.  Newly allocated keys must be freed with regfi_free_value.
+/** Sets the internal value index to the first value referenced by the current
+ *  key and returns that value.
+ *
+ * @param i the iterator
+ *
+ * @return  A newly allocated value structure for the newly referenced first
+ *          value, or NULL on failure.  Failure may be due to a lack of any
+ *          values or other errors.  Newly allocated keys must be freed with
+ *          regfi_free_value.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_VK_REC*         regfi_iterator_first_value(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_cur_value: Returns the currently indexed value.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated value structure for the currently referenced value, 
- *   or NULL on failure.  Newly allocated values must be freed with 
- *   regfi_free_value.
+/** Returns the currently indexed value.
+ *
+ * @param i the iterator
+ *
+ * @return A newly allocated value structure for the currently referenced value,
+ *         or NULL on failure.  Newly allocated values must be freed with 
+ *         regfi_free_value.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_VK_REC*         regfi_iterator_cur_value(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_next_value: Increments the internal value index to the next
- *                            value in the value-list and returns the value
- *                            for that index.
- *
- * Arguments:
- *   i            -- the iterator
- *
- * Returns:
- *   A newly allocated key structure for the next value or NULL on failure.
- *   Newly allocated keys must be freed with regfi_free_value.
+/** Increments the internal value index to the next value in the value-list and
+ *  returns the value for that index.
+ *
+ * @param i the iterator
+ *
+ * @return  A newly allocated key structure for the next value or NULL on 
+ *          failure.  Newly allocated keys must be freed with regfi_free_value.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_VK_REC*         regfi_iterator_next_value(REGFI_ITERATOR* i);
 
 
-/* regfi_iterator_find_value: Searches for a value with a given name under the
- *                            current key.
- *
- * Arguments:
- *   i            -- the iterator
- *   value_name   -- value name to search for
- *
- * Returns:
- *   True if such a value was found, false otherwise.  If a value is found,
- *   the current value index is set to that value.  Otherwise, the value
- *   index remains at the same location as before the call.
+/** Searches for a value with a given name under the current key.
+ *
+ * @param i          the iterator
+ * @param value_name value name to search for
+ *
+ * @return True if such a value was found, false otherwise.  If a value is 
+ *         found, the current value index is set to that value.  Otherwise,
+ *         the value index remains at the same location as before the call.
+ *
+ * @ingroup regfiTopLayer
  */
 bool                  regfi_iterator_find_value(REGFI_ITERATOR* i, 
 						const char* value_name);
 
-
-/* regfi_iterator_fetch_classname: Retrieves classname for a given key.
- *
- * Arguments:
- *   i            -- the iterator
- *   key          -- the key whose classname is desired
- *
- * Returns:
- *   Returns a newly allocated classname structure, or NULL on failure.
- *   Classname structures must be freed with regfi_free_classname.
+/** Retrieves classname for a given key.
+ *
+ * @param i   the iterator
+ * @param key the key whose classname is desired
+ *
+ * @return Returns a newly allocated classname structure, or NULL on failure.
+ *         Classname structures must be freed with regfi_free_classname.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_CLASSNAME*      regfi_iterator_fetch_classname(REGFI_ITERATOR* i, 
@@ -856,13 +904,13 @@
 
 
-/* regfi_iterator_fetch_data: Retrieves data for a given value.
- *
- * Arguments:
- *   i            -- the iterator
- *   value        -- the value whose data is desired
- *
- * Returns:
- *   Returns a newly allocated data structure, or NULL on failure.
- *   Data structures must be freed with regfi_free_data.
+/** Retrieves data for a given value.
+ *
+ * @param i     the iterator
+ * @param value the value whose data is desired
+ *
+ * @return Returns a newly allocated data structure, or NULL on failure.
+ *         Data structures must be freed with regfi_free_data.
+ *
+ * @ingroup regfiTopLayer
  */
 REGFI_DATA*           regfi_iterator_fetch_data(REGFI_ITERATOR* i, 
@@ -870,102 +918,250 @@
 
 
-/********************************************************/
-/* Middle-layer structure loading, linking, and caching */
-/********************************************************/
-REGFI_NK_REC*         regfi_load_key(REGFI_FILE* file, uint32 offset, 
+
+/******************************************************************************/
+/** 
+ * @defgroup regfiMiddleLayer Middle Layer: Logical Data Structure Loading 
+ */
+/******************************************************************************/
+
+/** Loads a key at a given file offset along with associated data structures.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_NK_REC*         regfi_load_key(REGFI_FILE* file, uint32_t offset, 
 				     REGFI_ENCODING output_encoding, 
 				     bool strict);
-REGFI_VK_REC*         regfi_load_value(REGFI_FILE* file, uint32 offset, 
+
+
+/** Loads a value at a given file offset alng with associated data structures.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_VK_REC*         regfi_load_value(REGFI_FILE* file, uint32_t offset, 
 				       REGFI_ENCODING output_encoding, 
 				       bool strict);
-REGFI_SUBKEY_LIST*    regfi_load_subkeylist(REGFI_FILE* file, uint32 offset,
-					    uint32 num_keys, uint32 max_size,
+
+
+/** Loads a logical subkey list in its entirety which may span multiple records.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_SUBKEY_LIST*    regfi_load_subkeylist(REGFI_FILE* file, uint32_t offset,
+					    uint32_t num_keys, uint32_t max_size,
 					    bool strict);
-REGFI_VALUE_LIST*     regfi_load_valuelist(REGFI_FILE* file, uint32 offset, 
-					   uint32 num_values, uint32 max_size,
+
+
+/** Loads a valuelist.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_VALUE_LIST*     regfi_load_valuelist(REGFI_FILE* file, uint32_t offset, 
+					   uint32_t num_values, uint32_t max_size,
 					   bool strict);
 
-REGFI_BUFFER          regfi_load_data(REGFI_FILE* file, uint32 voffset,
-				      uint32 length, bool data_in_offset,
+
+/** Loads a data record which may be contained in the virtual offset, in a
+ *  single cell, or in multiple cells through big data records.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_BUFFER          regfi_load_data(REGFI_FILE* file, uint32_t voffset,
+				      uint32_t length, bool data_in_offset,
 				      bool strict);
 
-REGFI_BUFFER          regfi_load_big_data(REGFI_FILE* file, uint32 offset, 
-					  uint32 data_length,uint32 cell_length,
+
+/** Loads the data associated with a big data record at the specified offset.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+REGFI_BUFFER          regfi_load_big_data(REGFI_FILE* file, uint32_t offset, 
+					  uint32_t data_length,uint32_t cell_length,
 					  range_list* used_ranges,
 					  bool strict);
+
+
+/** Given raw data, attempts to interpret the data based on a specified registry
+ *  data type.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
 bool                  regfi_interpret_data(REGFI_FILE* file, 
 					   REGFI_ENCODING string_encoding,
-					   uint32 type, REGFI_DATA* data);
+					   uint32_t type, REGFI_DATA* data);
+
+
+/** Frees the memory associated with a REGFI_CLASSNAME data structure.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
 void                  regfi_free_classname(REGFI_CLASSNAME* classname);
+
+
+/** Frees the memory associated with a REGFI_DATA data structure.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
 void                  regfi_free_data(REGFI_DATA* data);
 
 
 /* These are cached so return values don't need to be freed. */
-const REGFI_SK_REC*   regfi_load_sk(REGFI_FILE* file, uint32 offset,
+
+/** Loads an "sk" security record at the specified offset.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+const REGFI_SK_REC*   regfi_load_sk(REGFI_FILE* file, uint32_t offset,
 				    bool strict);
-const REGFI_HBIN*     regfi_lookup_hbin(REGFI_FILE* file, uint32 offset);
-
-
-/************************************/
-/*  Low-layer data structure access */
-/************************************/
+
+
+/** Retrieves the HBIN data structure stored at the specified offset.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiMiddleLayer
+ */
+const REGFI_HBIN*     regfi_lookup_hbin(REGFI_FILE* file, uint32_t offset);
+
+
+
+/******************************************************************************/
+/**
+ * @defgroup regfiBottomLayer Bottom Layer: Direct Data Structure Access 
+ */
+/******************************************************************************/
+
 REGFI_FILE*           regfi_parse_regf(int fd, bool strict);
-REGFI_HBIN*           regfi_parse_hbin(REGFI_FILE* file, uint32 offset, 
+REGFI_HBIN*           regfi_parse_hbin(REGFI_FILE* file, uint32_t offset, 
 				       bool strict);
 
 
-/* regfi_parse_nk: Parses an NK record.
- *
- * Arguments:
- *   f        -- the registry file structure
- *   offset   -- the offset of the cell (not the record) to be parsed.
- *   max_size -- the maximum size the NK cell could be. (for validation)
- *   strict   -- if true, rejects any malformed records.  Otherwise,
- *               tries to minimally validate integrity.
- * Returns:
- *   A newly allocated NK record structure, or NULL on failure.
- */
-REGFI_NK_REC*         regfi_parse_nk(REGFI_FILE* file, uint32 offset,
-				     uint32 max_size, bool strict);
-
-REGFI_SUBKEY_LIST*    regfi_parse_subkeylist(REGFI_FILE* file, uint32 offset,
-					     uint32 max_size, bool strict);
-
-REGFI_VK_REC*         regfi_parse_vk(REGFI_FILE* file, uint32 offset, 
-				     uint32 max_size, bool strict);
-
-REGFI_SK_REC*         regfi_parse_sk(REGFI_FILE* file, uint32 offset, 
-				     uint32 max_size, bool strict);
-
+/** Parses an NK record at the specified offset
+ *
+ * @param file     the registry file structure
+ * @param offset   the offset of the cell (not the record) to be parsed.
+ * @param max_size the maximum size the NK cell could be. (for validation)
+ * @param strict   if true, rejects any malformed records.  Otherwise,
+ *                 tries to minimally validate integrity.
+ *
+ * @return A newly allocated NK record structure, or NULL on failure.
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_NK_REC*         regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
+				     uint32_t max_size, bool strict);
+
+
+/** Parses a single cell containing a subkey-list record.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_SUBKEY_LIST*    regfi_parse_subkeylist(REGFI_FILE* file, uint32_t offset,
+					     uint32_t max_size, bool strict);
+
+
+/** Parses a VK (value) record at the specified offset
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_VK_REC*         regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
+				     uint32_t max_size, bool strict);
+
+
+/** Parses an SK (security) record at the specified offset
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_SK_REC*         regfi_parse_sk(REGFI_FILE* file, uint32_t offset, 
+				     uint32_t max_size, bool strict);
+
+
+/** Retrieves information on all cells in the registry hive which are 
+ *  currently in the unallocated status.  
+ *
+ * The unallocated status is determined based soley on the cell length sign.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
 range_list*           regfi_parse_unalloc_cells(REGFI_FILE* file);
 
-bool                  regfi_parse_cell(int fd, uint32 offset, 
-				       uint8* hdr, uint32 hdr_len,
-				       uint32* cell_length, bool* unalloc);
-
-uint8*                regfi_parse_classname(REGFI_FILE* file, uint32 offset,
-					    uint16* name_length, 
-					    uint32 max_size, bool strict);
-
-REGFI_BUFFER          regfi_parse_data(REGFI_FILE* file, uint32 offset,
-				       uint32 length, bool strict);
-
-REGFI_BUFFER          regfi_parse_little_data(REGFI_FILE* file, uint32 voffset, 
-					      uint32 length, bool strict);
-
-
-/* Dispose of previously parsed records */
-void                  regfi_free_key(REGFI_NK_REC* nk);
-void                  regfi_free_value(REGFI_VK_REC* vk);
-
-
-
-/************************************/
-/*    Private Functions             */
-/************************************/
+
+/** Helper function to parse a cell
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+bool                  regfi_parse_cell(int fd, uint32_t offset, 
+				       uint8_t* hdr, uint32_t hdr_len,
+				       uint32_t* cell_length, bool* unalloc);
+
+
+/** Parses a classname cell
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+uint8_t*                regfi_parse_classname(REGFI_FILE* file, uint32_t offset,
+					    uint16_t* name_length, 
+					    uint32_t max_size, bool strict);
+
+
+/** Parses a single-cell data record
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_BUFFER          regfi_parse_data(REGFI_FILE* file, uint32_t offset,
+				       uint32_t length, bool strict);
+
+
+/** Parses a "little data" record which is stored entirely within the 
+ *  provided virtual offset.
+ *
+ * XXX: finish documenting
+ *
+ * @ingroup regfiBottomLayer
+ */
+REGFI_BUFFER          regfi_parse_little_data(REGFI_FILE* file, uint32_t voffset, 
+					      uint32_t length, bool strict);
+
+
+/******************************************************************************/
+/*    Private Functions                                                       */
+/******************************************************************************/
 REGFI_NK_REC*         regfi_rootkey(REGFI_FILE* file, 
 				    REGFI_ENCODING output_encoding);
 void                  regfi_subkeylist_free(REGFI_SUBKEY_LIST* list);
-uint32                regfi_read(int fd, uint8* buf, uint32* length);
+uint32_t                regfi_read(int fd, uint8_t* buf, uint32_t* length);
 
 const char*           regfi_type_val2str(unsigned int val);
@@ -977,20 +1173,25 @@
 char*                 regfi_get_group(WINSEC_DESC* sec_desc);
 
-REGFI_SUBKEY_LIST*    regfi_merge_subkeylists(uint16 num_lists, 
+REGFI_SUBKEY_LIST*    regfi_merge_subkeylists(uint16_t num_lists, 
 					      REGFI_SUBKEY_LIST** lists,
 					      bool strict);
-REGFI_SUBKEY_LIST*    regfi_load_subkeylist_aux(REGFI_FILE* file, uint32 offset,
-						uint32 max_size, bool strict,
-						uint8 depth_left);
-void                  regfi_add_message(REGFI_FILE* file, uint16 msg_type, 
+REGFI_SUBKEY_LIST*    regfi_load_subkeylist_aux(REGFI_FILE* file, uint32_t offset,
+						uint32_t max_size, bool strict,
+						uint8_t depth_left);
+void                  regfi_add_message(REGFI_FILE* file, uint16_t msg_type, 
 					const char* fmt, ...);
 REGFI_NK_REC*         regfi_copy_nk(const REGFI_NK_REC* nk);
 REGFI_VK_REC*         regfi_copy_vk(const REGFI_VK_REC* vk);
-int32                 regfi_calc_maxsize(REGFI_FILE* file, uint32 offset);
-int32                 regfi_conv_charset(const char* input_charset, 
+int32_t               regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset);
+int32_t               regfi_conv_charset(const char* input_charset, 
 					 const char* output_charset,
-					 uint8* input, char* output, 
-					 uint32 input_len, uint32 output_max);
+					 uint8_t* input, char* output, 
+					 uint32_t input_len, uint32_t output_max);
 REGFI_DATA*           regfi_buffer_to_data(REGFI_BUFFER raw_data);
 
+/* XXX: move to base API and document */
+void                  regfi_unix2nt_time(REGFI_NTTIME* nt, time_t t);
+time_t                regfi_nt2unix_time(const REGFI_NTTIME* nt);
+
+
 #endif	/* _REGFI_H */
Index: unk/include/smb_deps.h
===================================================================
--- /trunk/include/smb_deps.h	(revision 167)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- * This file contains miscellaneous pieces of code which regfio.c
- * depends upon, from the Samba Subversion tree.  See:
- *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/
- *
- * Copyright (C) 2005,2009 Timothy D. Morgan
- * Copyright (C) 1992-2005 Samba development team 
- *               (see individual files under Subversion for details.)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 3 of the License.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- */
-
-#ifndef _SMB_DEPS_H
-#define _SMB_DEPS_H
-
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "byteorder.h"
-
-/* From includes.h */
-
-/* XXX: convert all code to use the more standard "*_t" types */
-#define uint8  uint8_t
-#define int16  int8_t
-#define uint16 uint16_t
-#define int32  int32_t
-#define uint32 uint32_t
-#define int64  int64_t
-#define uint64 uint64_t
-
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#define MAX(a,b) ((a)>(b)?(a):(b))
-
-/* End of stuff from includes.h */
-
-/* From smb.h */
-
-typedef struct nttime_info
-{
-  uint32 low;
-  uint32 high;
-} NTTIME;
-
-/* End of stuff from smb.h */
-
-/* From lib/time.c */
-
-#define CHAR_BIT 8
-#define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \
-		    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
-#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
-#define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
-
-void unix_to_nt_time(NTTIME* nt, time_t t);
-time_t nt_time_to_unix(const NTTIME* nt);
-
-/* End of stuff from lib/time.c */
-
-#endif /* _SMB_DEPS_H */
Index: /trunk/include/talloc.h
===================================================================
--- /trunk/include/talloc.h	(revision 167)
+++ /trunk/include/talloc.h	(revision 168)
@@ -33,5 +33,12 @@
 #include <string.h>
 #include <stdbool.h>
-#include "smb_deps.h" /* MAX macro */
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifndef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#endif
 
 /*
Index: /trunk/include/void_stack.h
===================================================================
--- /trunk/include/void_stack.h	(revision 167)
+++ /trunk/include/void_stack.h	(revision 168)
@@ -1,3 +1,5 @@
-/*
+/**
+ * @file
+ *
  * Copyright (C) 2005,2007,2009 Timothy D. Morgan
  *
Index: /trunk/include/winsec.h
===================================================================
--- /trunk/include/winsec.h	(revision 167)
+++ /trunk/include/winsec.h	(revision 168)
@@ -1,3 +1,3 @@
-/*
+/** @file
  * This file contains refactored Samba code used to interpret Windows
  * Security Descriptors. See:
@@ -41,6 +41,6 @@
 #include <unistd.h>
 
-#include "smb_deps.h"
 #include "talloc.h"
+#include "byteorder.h"
 
 
@@ -72,9 +72,9 @@
 typedef struct _winsec_uuid
 {
-       uint32 time_low;
-       uint16 time_mid;
-       uint16 time_hi_and_version;
-       uint8  clock_seq[2];
-       uint8  node[6];
+       uint32_t time_low;
+       uint16_t time_mid;
+       uint16_t time_hi_and_version;
+       uint8_t  clock_seq[2];
+       uint8_t  node[6];
 } WINSEC_UUID;
 
Index: /trunk/lib/Makefile
===================================================================
--- /trunk/lib/Makefile	(revision 167)
+++ /trunk/lib/Makefile	(revision 168)
@@ -3,5 +3,5 @@
 ################################################################################
 
-FILES=regfi.o smb_deps.o winsec.o void_stack.o range_list.o lru_cache.o talloc.o
+FILES=regfi.o winsec.o void_stack.o range_list.o lru_cache.o talloc.o
 
 all: $(FILES)
@@ -9,7 +9,4 @@
 regfi.o: regfi.c
 	$(CC) $(CFLAGS) $(OPTS) $(INC) -c -o $@ regfi.c
-
-smb_deps.o: smb_deps.c
-	$(CC) $(CFLAGS) $(OPTS) $(INC) -c -o $@ smb_deps.c
 
 winsec.o: winsec.c
Index: /trunk/lib/lru_cache.c
===================================================================
--- /trunk/lib/lru_cache.c	(revision 167)
+++ /trunk/lib/lru_cache.c	(revision 168)
@@ -1,3 +1,5 @@
-/*
+/**
+ * @file
+ *
  * Copyright (C) 2008-2009 Timothy D. Morgan
  *
Index: /trunk/lib/range_list.c
===================================================================
--- /trunk/lib/range_list.c	(revision 167)
+++ /trunk/lib/range_list.c	(revision 168)
@@ -1,3 +1,5 @@
-/*
+/**
+ * @file
+ *
  * Copyright (C) 2008-2009 Timothy D. Morgan
  *
Index: /trunk/lib/regfi.c
===================================================================
--- /trunk/lib/regfi.c	(revision 167)
+++ /trunk/lib/regfi.c	(revision 168)
@@ -24,4 +24,6 @@
  */
 
+/** @file */
+
 #include "regfi.h"
 
@@ -39,10 +41,10 @@
 /******************************************************************************
  ******************************************************************************/
-void regfi_add_message(REGFI_FILE* file, uint16 msg_type, const char* fmt, ...)
+void regfi_add_message(REGFI_FILE* file, uint16_t msg_type, const char* fmt, ...)
 {
   /* XXX: This function is not particularly efficient,
    *      but then it is mostly used during errors. 
    */
-  uint32 buf_size, buf_used;
+  uint32_t buf_size, buf_used;
   char* new_msg;
   va_list args;
@@ -98,5 +100,5 @@
 
 
-void regfi_set_message_mask(REGFI_FILE* file, uint16 mask)
+void regfi_set_message_mask(REGFI_FILE* file, uint16_t mask)
 {
   file->msg_mask = mask;
@@ -154,5 +156,5 @@
 /* Security descriptor formatting functions  */
 
-const char* regfi_ace_type2str(uint8 type)
+const char* regfi_ace_type2str(uint8_t type)
 {
   static const char* map[7] 
@@ -174,5 +176,5 @@
  *   http://msdn2.microsoft.com/en-us/library/aa772242.aspx
  */
-char* regfi_ace_flags2str(uint8 flags)
+char* regfi_ace_flags2str(uint8_t flags)
 {
   static const char* flag_map[32] = 
@@ -189,6 +191,6 @@
   char* ret_val = malloc(35*sizeof(char));
   char* fo = ret_val;
-  uint32 i;
-  uint8 f;
+  uint32_t i;
+  uint8_t f;
 
   if(ret_val == NULL)
@@ -223,7 +225,7 @@
 
 
-char* regfi_ace_perms2str(uint32 perms)
-{
-  uint32 i, p;
+char* regfi_ace_perms2str(uint32_t perms)
+{
+  uint32_t i, p;
   /* This is more than is needed by a fair margin. */
   char* ret_val = malloc(350*sizeof(char));
@@ -304,7 +306,7 @@
 char* regfi_sid2str(WINSEC_DOM_SID* sid)
 {
-  uint32 i, size = WINSEC_MAX_SUBAUTHS*11 + 24;
-  uint32 left = size;
-  uint8 comps = sid->num_auths;
+  uint32_t i, size = WINSEC_MAX_SUBAUTHS*11 + 24;
+  uint32_t left = size;
+  uint8_t comps = sid->num_auths;
   char* ret_val = malloc(size);
   
@@ -326,5 +328,5 @@
 char* regfi_get_acl(WINSEC_ACL* acl)
 {
-  uint32 i, extra, size = 0;
+  uint32_t i, extra, size = 0;
   const char* type_str;
   char* flags_str;
@@ -425,8 +427,8 @@
  * returned as 0, then EOF was encountered immediately
  *****************************************************************************/
-uint32 regfi_read(int fd, uint8* buf, uint32* length)
-{
-  uint32 rsize = 0;
-  uint32 rret = 0;
+uint32_t regfi_read(int fd, uint8_t* buf, uint32_t* length)
+{
+  uint32_t rsize = 0;
+  uint32_t rret = 0;
 
   do
@@ -449,10 +451,10 @@
  *
  *****************************************************************************/
-bool regfi_parse_cell(int fd, uint32 offset, uint8* hdr, uint32 hdr_len,
-		      uint32* cell_length, bool* unalloc)
-{
-  uint32 length;
-  int32 raw_length;
-  uint8 tmp[4];
+bool regfi_parse_cell(int fd, uint32_t offset, uint8_t* hdr, uint32_t hdr_len,
+		      uint32_t* cell_length, bool* unalloc)
+{
+  uint32_t length;
+  int32_t raw_length;
+  uint8_t tmp[4];
 
   if(lseek(fd, offset, SEEK_SET) == -1)
@@ -493,5 +495,5 @@
  * The offset is a virtual file offset.
  ******************************************************************************/
-static bool regfi_offset_in_hbin(const REGFI_HBIN* hbin, uint32 voffset)
+static bool regfi_offset_in_hbin(const REGFI_HBIN* hbin, uint32_t voffset)
 {
   if(!hbin)
@@ -511,5 +513,5 @@
  * block for it.  NULL if one doesn't exist.
  ******************************************************************************/
-const REGFI_HBIN* regfi_lookup_hbin(REGFI_FILE* file, uint32 offset)
+const REGFI_HBIN* regfi_lookup_hbin(REGFI_FILE* file, uint32_t offset)
 {
   return (const REGFI_HBIN*)range_list_find_data(file->hbins, offset);
@@ -523,5 +525,5 @@
  * (Since cells can only be ~2^31 in size, this works out.)
  ******************************************************************************/
-int32 regfi_calc_maxsize(REGFI_FILE* file, uint32 offset)
+int32_t regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset)
 {
   const REGFI_HBIN* hbin = regfi_lookup_hbin(file, offset);
@@ -535,6 +537,6 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_SUBKEY_LIST* regfi_load_subkeylist(REGFI_FILE* file, uint32 offset, 
-					 uint32 num_keys, uint32 max_size, 
+REGFI_SUBKEY_LIST* regfi_load_subkeylist(REGFI_FILE* file, uint32_t offset, 
+					 uint32_t num_keys, uint32_t max_size, 
 					 bool strict)
 {
@@ -568,12 +570,12 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_SUBKEY_LIST* regfi_load_subkeylist_aux(REGFI_FILE* file, uint32 offset, 
-					     uint32 max_size, bool strict,
-					     uint8 depth_left)
+REGFI_SUBKEY_LIST* regfi_load_subkeylist_aux(REGFI_FILE* file, uint32_t offset, 
+					     uint32_t max_size, bool strict,
+					     uint8_t depth_left)
 {
   REGFI_SUBKEY_LIST* ret_val;
   REGFI_SUBKEY_LIST** sublists;
-  uint32 i, num_sublists, off;
-  int32 sublist_maxsize;
+  uint32_t i, num_sublists, off;
+  int32_t sublist_maxsize;
 
   if(depth_left == 0)
@@ -616,11 +618,11 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_SUBKEY_LIST* regfi_parse_subkeylist(REGFI_FILE* file, uint32 offset, 
-					  uint32 max_size, bool strict)
+REGFI_SUBKEY_LIST* regfi_parse_subkeylist(REGFI_FILE* file, uint32_t offset, 
+					  uint32_t max_size, bool strict)
 {
   REGFI_SUBKEY_LIST* ret_val;
-  uint32 i, cell_length, length, elem_size, read_len;
-  uint8* elements = NULL;
-  uint8 buf[REGFI_SUBKEY_LIST_MIN_LEN];
+  uint32_t i, cell_length, length, elem_size, read_len;
+  uint8_t* elements = NULL;
+  uint8_t buf[REGFI_SUBKEY_LIST_MIN_LEN];
   bool unalloc;
   bool recursive_type;
@@ -647,8 +649,8 @@
   {
     recursive_type = true;
-    elem_size = sizeof(uint32);
+    elem_size = sizeof(uint32_t);
   }
   else if(buf[0] == 'l' && buf[1] == 'i')
-    elem_size = sizeof(uint32);
+    elem_size = sizeof(uint32_t);
   else if((buf[0] == 'l') && (buf[1] == 'f' || buf[1] == 'h'))
     elem_size = sizeof(REGFI_SUBKEY_LIST_ELEM);
@@ -676,5 +678,5 @@
 
   length = elem_size*ret_val->num_children;
-  if(cell_length - REGFI_SUBKEY_LIST_MIN_LEN - sizeof(uint32) < length)
+  if(cell_length - REGFI_SUBKEY_LIST_MIN_LEN - sizeof(uint32_t) < length)
   {
     regfi_add_message(file, REGFI_MSG_WARN, "Number of elements too large for"
@@ -683,5 +685,5 @@
     if(strict)
       goto fail;
-    length = cell_length - REGFI_SUBKEY_LIST_MIN_LEN - sizeof(uint32);
+    length = cell_length - REGFI_SUBKEY_LIST_MIN_LEN - sizeof(uint32_t);
   }
 
@@ -691,5 +693,5 @@
     goto fail;
 
-  elements = (uint8*)malloc(length);
+  elements = (uint8_t*)malloc(length);
   if(elements == NULL)
     goto fail;
@@ -699,5 +701,5 @@
     goto fail;
 
-  if(elem_size == sizeof(uint32))
+  if(elem_size == sizeof(uint32_t))
   {
     for (i=0; i < ret_val->num_children; i++)
@@ -729,9 +731,9 @@
 /*******************************************************************
  *******************************************************************/
-REGFI_SUBKEY_LIST* regfi_merge_subkeylists(uint16 num_lists, 
+REGFI_SUBKEY_LIST* regfi_merge_subkeylists(uint16_t num_lists, 
 					   REGFI_SUBKEY_LIST** lists,
 					   bool strict)
 {
-  uint32 i,j,k;
+  uint32_t i,j,k;
   REGFI_SUBKEY_LIST* ret_val;
 
@@ -785,11 +787,11 @@
  *
  ******************************************************************************/
-REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32 offset, uint32 max_size, 
+REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset, uint32_t max_size, 
 			     bool strict)
 {
   REGFI_SK_REC* ret_val;
-  uint8* sec_desc_buf = NULL;
-  uint32 cell_length, length;
-  uint8 sk_header[REGFI_SK_MIN_LENGTH];
+  uint8_t* sec_desc_buf = NULL;
+  uint32_t cell_length, length;
+  uint8_t sk_header[REGFI_SK_MIN_LENGTH];
   bool unalloc = false;
 
@@ -855,5 +857,5 @@
   }
 
-  sec_desc_buf = (uint8*)malloc(ret_val->desc_size);
+  sec_desc_buf = (uint8_t*)malloc(ret_val->desc_size);
   if(sec_desc_buf == NULL)
     goto fail;
@@ -889,9 +891,9 @@
 
 
-REGFI_VALUE_LIST* regfi_parse_valuelist(REGFI_FILE* file, uint32 offset, 
-					uint32 num_values, bool strict)
+REGFI_VALUE_LIST* regfi_parse_valuelist(REGFI_FILE* file, uint32_t offset, 
+					uint32_t num_values, bool strict)
 {
   REGFI_VALUE_LIST* ret_val;
-  uint32 i, cell_length, length, read_len;
+  uint32_t i, cell_length, length, read_len;
   bool unalloc;
 
@@ -912,5 +914,5 @@
   }
 
-  if((num_values * sizeof(uint32)) > cell_length-sizeof(uint32))
+  if((num_values * sizeof(uint32_t)) > cell_length-sizeof(uint32_t))
   {
     regfi_add_message(file, REGFI_MSG_WARN, "Too many values found"
@@ -918,8 +920,8 @@
     if(strict)
       return NULL;
-    num_values = cell_length/sizeof(uint32) - sizeof(uint32);
-  }
-
-  read_len = num_values*sizeof(uint32);
+    num_values = cell_length/sizeof(uint32_t) - sizeof(uint32_t);
+  }
+
+  read_len = num_values*sizeof(uint32_t);
   ret_val = talloc(NULL, REGFI_VALUE_LIST);
   if(ret_val == NULL)
@@ -935,5 +937,5 @@
 
   length = read_len;
-  if((regfi_read(file->fd, (uint8*)ret_val->elements, &length) != 0) 
+  if((regfi_read(file->fd, (uint8_t*)ret_val->elements, &length) != 0) 
      || length != read_len)
   {
@@ -973,9 +975,9 @@
 /******************************************************************************
  ******************************************************************************/
-REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32 offset, 
+REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset, 
 			       REGFI_ENCODING output_encoding, bool strict)
 {
   REGFI_VK_REC* ret_val = NULL;
-  int32 max_size, tmp_size;
+  int32_t max_size, tmp_size;
   REGFI_ENCODING from_encoding;
 
@@ -1003,5 +1005,5 @@
   {
     ret_val->valuename_raw = talloc_realloc(ret_val, ret_val->valuename_raw,
-					    uint8, ret_val->name_length+1);
+					    uint8_t, ret_val->name_length+1);
     ret_val->valuename_raw[ret_val->name_length] = '\0';
     ret_val->valuename = (char*)ret_val->valuename_raw;
@@ -1038,11 +1040,11 @@
  * If !strict, the list may contain NULLs, VK records may point to NULL.
  ******************************************************************************/
-REGFI_VALUE_LIST* regfi_load_valuelist(REGFI_FILE* file, uint32 offset, 
-				       uint32 num_values, uint32 max_size,
+REGFI_VALUE_LIST* regfi_load_valuelist(REGFI_FILE* file, uint32_t offset, 
+				       uint32_t num_values, uint32_t max_size,
 				       bool strict)
 {
-  uint32 usable_num_values;
-
-  if((num_values+1) * sizeof(uint32) > max_size)
+  uint32_t usable_num_values;
+
+  if((num_values+1) * sizeof(uint32_t) > max_size)
   {
     regfi_add_message(file, REGFI_MSG_WARN, "Number of values indicated by"
@@ -1052,5 +1054,5 @@
     if(strict)
       return NULL;
-    usable_num_values = max_size/sizeof(uint32) - sizeof(uint32);
+    usable_num_values = max_size/sizeof(uint32_t) - sizeof(uint32_t);
   }
   else
@@ -1065,10 +1067,10 @@
  *
  ******************************************************************************/
-REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32 offset, 
+REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset, 
 			     REGFI_ENCODING output_encoding, bool strict)
 {
   REGFI_NK_REC* nk;
-  uint32 off;
-  int32 max_size, tmp_size;
+  uint32_t off;
+  int32_t max_size, tmp_size;
   REGFI_ENCODING from_encoding;
 
@@ -1097,5 +1099,5 @@
   if(from_encoding == output_encoding)
   {
-    nk->keyname_raw = talloc_realloc(nk, nk->keyname_raw, uint8, nk->name_length+1);
+    nk->keyname_raw = talloc_realloc(nk, nk->keyname_raw, uint8_t, nk->name_length+1);
     nk->keyname_raw[nk->name_length] = '\0';
     nk->keyname = (char*)nk->keyname_raw;
@@ -1196,8 +1198,8 @@
 /******************************************************************************
  ******************************************************************************/
-const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32 offset, bool strict)
+const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset, bool strict)
 {
   REGFI_SK_REC* ret_val = NULL;
-  int32 max_size;
+  int32_t max_size;
   void* failure_ptr = NULL;
   
@@ -1240,7 +1242,7 @@
 {
   REGFI_NK_REC* nk = NULL;
-  uint32 cell_length;
-  uint32 cur_offset = hbin->file_off+REGFI_HBIN_HEADER_SIZE;
-  uint32 hbin_end = hbin->file_off+hbin->block_size;
+  uint32_t cell_length;
+  uint32_t cur_offset = hbin->file_off+REGFI_HBIN_HEADER_SIZE;
+  uint32_t hbin_end = hbin->file_off+hbin->block_size;
   bool unalloc;
 
@@ -1301,5 +1303,5 @@
   REGFI_FILE* rb;
   REGFI_HBIN* hbin = NULL;
-  uint32 hbin_off, file_length, cache_secret;
+  uint32_t hbin_off, file_length, cache_secret;
   bool rla;
 
@@ -1397,5 +1399,5 @@
   REGFI_NK_REC* nk = NULL;
   REGFI_HBIN* hbin;
-  uint32 root_offset, i, num_hbins;
+  uint32_t root_offset, i, num_hbins;
   
   if(!file)
@@ -1584,5 +1586,5 @@
   REGFI_NK_REC* subkey;
   bool found = false;
-  uint32 old_subkey = i->cur_subkey;
+  uint32_t old_subkey = i->cur_subkey;
 
   if(subkey_name == NULL)
@@ -1618,5 +1620,5 @@
 bool regfi_iterator_walk_path(REGFI_ITERATOR* i, const char** path)
 {
-  uint32 x;
+  uint32_t x;
   if(path == NULL)
     return false;
@@ -1671,5 +1673,5 @@
 REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
 {
-  uint32 nk_offset;
+  uint32_t nk_offset;
 
   /* see if there is anything left to report */
@@ -1708,5 +1710,5 @@
   REGFI_VK_REC* cur;
   bool found = false;
-  uint32 old_value = i->cur_value;
+  uint32_t old_value = i->cur_value;
 
   /* XXX: cur->valuename can be NULL in the registry.  
@@ -1754,5 +1756,5 @@
 {
   REGFI_VK_REC* ret_val = NULL;
-  uint32 voffset;
+  uint32_t voffset;
 
   if(i->cur_key->values != NULL && i->cur_key->values->elements != NULL)
@@ -1791,9 +1793,9 @@
 {
   REGFI_CLASSNAME* ret_val;
-  uint8* raw;
+  uint8_t* raw;
   char* interpreted;
-  uint32 offset;
-  int32 conv_size, max_size;
-  uint16 parse_length;
+  uint32_t offset;
+  int32_t conv_size, max_size;
+  uint16_t parse_length;
 
   if(key->classname_off == REGFI_OFFSET_NONE || key->classname_length == 0)
@@ -1935,10 +1937,10 @@
  *****************************************************************************/
 bool regfi_interpret_data(REGFI_FILE* file, REGFI_ENCODING string_encoding,
-			  uint32 type, REGFI_DATA* data)
-{
-  uint8** tmp_array;
-  uint8* tmp_str;
-  int32 tmp_size;
-  uint32 i, j, array_size;
+			  uint32_t type, REGFI_DATA* data)
+{
+  uint8_t** tmp_array;
+  uint8_t* tmp_str;
+  int32_t tmp_size;
+  uint32_t i, j, array_size;
 
   if(data == NULL)
@@ -1951,5 +1953,5 @@
   /* REG_LINK is a symbolic link, stored as a unicode string. */
   case REG_LINK:
-    tmp_str = talloc_array(NULL, uint8, data->size);
+    tmp_str = talloc_array(NULL, uint8_t, data->size);
     if(tmp_str == NULL)
     {
@@ -1974,5 +1976,5 @@
     }
 
-    tmp_str = talloc_realloc(NULL, tmp_str, uint8, tmp_size);
+    tmp_str = talloc_realloc(NULL, tmp_str, uint8_t, tmp_size);
     data->interpreted.string = tmp_str;
     data->interpreted_size = tmp_size;
@@ -2010,10 +2012,10 @@
     }
     data->interpreted.qword = 
-      (uint64)IVAL(data->raw, 0) + (((uint64)IVAL(data->raw, 4))<<32);
+      (uint64_t)IVAL(data->raw, 0) + (((uint64_t)IVAL(data->raw, 4))<<32);
     data->interpreted_size = 8;
     break;
     
   case REG_MULTI_SZ:
-    tmp_str = talloc_array(NULL, uint8, data->size);
+    tmp_str = talloc_array(NULL, uint8_t, data->size);
     if(tmp_str == NULL)
     {
@@ -2042,5 +2044,5 @@
 
     array_size = tmp_size+1;
-    tmp_array = talloc_array(NULL, uint8*, array_size);
+    tmp_array = talloc_array(NULL, uint8_t*, array_size);
     if(tmp_array == NULL)
     {
@@ -2058,5 +2060,5 @@
     }
     tmp_array[j] = NULL;
-    tmp_array = talloc_realloc(NULL, tmp_array, uint8*, j+1);
+    tmp_array = talloc_realloc(NULL, tmp_array, uint8_t*, j+1);
     data->interpreted.multiple_string = tmp_array;
     /* XXX: how meaningful is this?  should we store number of strings instead? */
@@ -2107,7 +2109,7 @@
  * On error, returns a negative errno code.
  *****************************************************************************/
-int32 regfi_conv_charset(const char* input_charset, const char* output_charset,
-			 uint8* input, char* output, 
-			 uint32 input_len, uint32 output_max)
+int32_t regfi_conv_charset(const char* input_charset, const char* output_charset,
+			 uint8_t* input, char* output, 
+			 uint32_t input_len, uint32_t output_max)
 {
   iconv_t conv_desc;
@@ -2144,7 +2146,7 @@
  * buffer must be at least the size of a regf header (4096 bytes).
  *******************************************************************/
-static uint32 regfi_compute_header_checksum(uint8* buffer)
-{
-  uint32 checksum, x;
+static uint32_t regfi_compute_header_checksum(uint8_t* buffer)
+{
+  uint32_t checksum, x;
   int i;
 
@@ -2167,6 +2169,6 @@
 REGFI_FILE* regfi_parse_regf(int fd, bool strict)
 {
-  uint8 file_header[REGFI_REGF_SIZE];
-  uint32 length;
+  uint8_t file_header[REGFI_REGF_SIZE];
+  uint32_t length;
   REGFI_FILE* ret_val;
 
@@ -2243,9 +2245,9 @@
  * along with it's associated cells.
  ******************************************************************************/
-REGFI_HBIN* regfi_parse_hbin(REGFI_FILE* file, uint32 offset, bool strict)
+REGFI_HBIN* regfi_parse_hbin(REGFI_FILE* file, uint32_t offset, bool strict)
 {
   REGFI_HBIN *hbin;
-  uint8 hbin_header[REGFI_HBIN_HEADER_SIZE];
-  uint32 length;
+  uint8_t hbin_header[REGFI_HBIN_HEADER_SIZE];
+  uint32_t length;
   
   if(offset >= file->file_length)
@@ -2315,10 +2317,10 @@
 /*******************************************************************
  *******************************************************************/
-REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32 offset, 
-			     uint32 max_size, bool strict)
-{
-  uint8 nk_header[REGFI_NK_MIN_LENGTH];
+REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset, 
+			     uint32_t max_size, bool strict)
+{
+  uint8_t nk_header[REGFI_NK_MIN_LENGTH];
   REGFI_NK_REC* ret_val;
-  uint32 length,cell_length;
+  uint32_t length,cell_length;
   bool unalloc = false;
 
@@ -2432,5 +2434,5 @@
   }
 
-  ret_val->keyname_raw = talloc_array(ret_val, uint8, ret_val->name_length);
+  ret_val->keyname_raw = talloc_array(ret_val, uint8_t, ret_val->name_length);
   if(ret_val->keyname_raw == NULL)
   {
@@ -2441,5 +2443,5 @@
   /* Don't need to seek, should be at the right offset */
   length = ret_val->name_length;
-  if((regfi_read(file->fd, (uint8*)ret_val->keyname_raw, &length) != 0)
+  if((regfi_read(file->fd, (uint8_t*)ret_val->keyname_raw, &length) != 0)
      || length != ret_val->name_length)
   {
@@ -2454,10 +2456,10 @@
 
 
-uint8* regfi_parse_classname(REGFI_FILE* file, uint32 offset, 
-			     uint16* name_length, uint32 max_size, bool strict)
-{
-  uint8* ret_val = NULL;
-  uint32 length;
-  uint32 cell_length;
+uint8_t* regfi_parse_classname(REGFI_FILE* file, uint32_t offset, 
+			     uint16_t* name_length, uint32_t max_size, bool strict)
+{
+  uint8_t* ret_val = NULL;
+  uint32_t length;
+  uint32_t cell_length;
   bool unalloc = false;
 
@@ -2499,5 +2501,5 @@
     }
     
-    ret_val = talloc_array(NULL, uint8, *name_length);
+    ret_val = talloc_array(NULL, uint8_t, *name_length);
     if(ret_val != NULL)
     {
@@ -2520,10 +2522,10 @@
 /******************************************************************************
 *******************************************************************************/
-REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32 offset, 
-			     uint32 max_size, bool strict)
+REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset, 
+			     uint32_t max_size, bool strict)
 {
   REGFI_VK_REC* ret_val;
-  uint8 vk_header[REGFI_VK_MIN_LENGTH];
-  uint32 raw_data_size, length, cell_length;
+  uint8_t vk_header[REGFI_VK_MIN_LENGTH];
+  uint32_t raw_data_size, length, cell_length;
   bool unalloc = false;
 
@@ -2604,5 +2606,5 @@
       cell_length+=8;
 
-    ret_val->valuename_raw = talloc_array(ret_val, uint8, ret_val->name_length);
+    ret_val->valuename_raw = talloc_array(ret_val, uint8_t, ret_val->name_length);
     if(ret_val->valuename_raw == NULL)
     {
@@ -2612,5 +2614,5 @@
 
     length = ret_val->name_length;
-    if((regfi_read(file->fd, (uint8*)ret_val->valuename_raw, &length) != 0)
+    if((regfi_read(file->fd, (uint8_t*)ret_val->valuename_raw, &length) != 0)
        || length != ret_val->name_length)
     {
@@ -2638,11 +2640,11 @@
  *
  ******************************************************************************/
-REGFI_BUFFER regfi_load_data(REGFI_FILE* file, uint32 voffset,
-			     uint32 length, bool data_in_offset,
+REGFI_BUFFER regfi_load_data(REGFI_FILE* file, uint32_t voffset,
+			     uint32_t length, bool data_in_offset,
 			     bool strict)
 {
   REGFI_BUFFER ret_val;
-  uint32 cell_length, offset;
-  int32 max_size;
+  uint32_t cell_length, offset;
+  int32_t max_size;
   bool unalloc;
   
@@ -2744,9 +2746,9 @@
  * Parses the common case data records stored in a single cell.
  ******************************************************************************/
-REGFI_BUFFER regfi_parse_data(REGFI_FILE* file, uint32 offset,
-			      uint32 length, bool strict)
+REGFI_BUFFER regfi_parse_data(REGFI_FILE* file, uint32_t offset,
+			      uint32_t length, bool strict)
 {
   REGFI_BUFFER ret_val;
-  uint32 read_length;
+  uint32_t read_length;
 
   ret_val.buf = NULL;
@@ -2760,5 +2762,5 @@
   }
 
-  if((ret_val.buf = talloc_array(NULL, uint8, length)) == NULL)
+  if((ret_val.buf = talloc_array(NULL, uint8_t, length)) == NULL)
     return ret_val;
   ret_val.len = length;
@@ -2783,9 +2785,9 @@
  *
  ******************************************************************************/
-REGFI_BUFFER regfi_parse_little_data(REGFI_FILE* file, uint32 voffset,
-				     uint32 length, bool strict)
+REGFI_BUFFER regfi_parse_little_data(REGFI_FILE* file, uint32_t voffset,
+				     uint32_t length, bool strict)
 {
   REGFI_BUFFER ret_val;
-  uint8 i;
+  uint8_t i;
 
   ret_val.buf = NULL;
@@ -2800,10 +2802,10 @@
   }
 
-  if((ret_val.buf = talloc_array(NULL, uint8, length)) == NULL)
+  if((ret_val.buf = talloc_array(NULL, uint8_t, length)) == NULL)
     return ret_val;
   ret_val.len = length;
   
   for(i = 0; i < length; i++)
-    ret_val.buf[i] = (uint8)((voffset >> i*8) & 0xFF);
+    ret_val.buf[i] = (uint8_t)((voffset >> i*8) & 0xFF);
 
   return ret_val;
@@ -2812,13 +2814,13 @@
 /******************************************************************************
 *******************************************************************************/
-REGFI_BUFFER regfi_parse_big_data_header(REGFI_FILE* file, uint32 offset, 
-					 uint32 max_size, bool strict)
+REGFI_BUFFER regfi_parse_big_data_header(REGFI_FILE* file, uint32_t offset, 
+					 uint32_t max_size, bool strict)
 {
   REGFI_BUFFER ret_val;
-  uint32 cell_length;
+  uint32_t cell_length;
   bool unalloc;
 
   /* XXX: do something with unalloc? */
-  ret_val.buf = (uint8*)talloc_array(NULL, uint8, REGFI_BIG_DATA_MIN_LENGTH);
+  ret_val.buf = (uint8_t*)talloc_array(NULL, uint8_t, REGFI_BIG_DATA_MIN_LENGTH);
   if(ret_val.buf == NULL)
     goto fail;
@@ -2866,11 +2868,11 @@
  *
  ******************************************************************************/
-uint32* regfi_parse_big_data_indirect(REGFI_FILE* file, uint32 offset,
-				      uint16 num_chunks, bool strict)
-{
-  uint32* ret_val;
-  uint32 indirect_length;
-  int32 max_size;
-  uint16 i;
+uint32_t* regfi_parse_big_data_indirect(REGFI_FILE* file, uint32_t offset,
+				      uint16_t num_chunks, bool strict)
+{
+  uint32_t* ret_val;
+  uint32_t indirect_length;
+  int32_t max_size;
+  uint16_t i;
   bool unalloc;
 
@@ -2878,13 +2880,13 @@
 
   max_size = regfi_calc_maxsize(file, offset);
-  if((max_size < 0) || (num_chunks*sizeof(uint32) + 4 > max_size))
-    return NULL;
-
-  ret_val = (uint32*)talloc_array(NULL, uint32, num_chunks);
+  if((max_size < 0) || (num_chunks*sizeof(uint32_t) + 4 > max_size))
+    return NULL;
+
+  ret_val = (uint32_t*)talloc_array(NULL, uint32_t, num_chunks);
   if(ret_val == NULL)
     goto fail;
 
-  if(!regfi_parse_cell(file->fd, offset, (uint8*)ret_val,
-		       num_chunks*sizeof(uint32),
+  if(!regfi_parse_cell(file->fd, offset, (uint8_t*)ret_val,
+		       num_chunks*sizeof(uint32_t),
 		       &indirect_length, &unalloc))
   {
@@ -2898,5 +2900,5 @@
   for(i=0; i<num_chunks; i++)
   {
-    ret_val[i] = IVAL(ret_val, i*sizeof(uint32));
+    ret_val[i] = IVAL(ret_val, i*sizeof(uint32_t));
     if((ret_val[i] & 0x00000007) != 0)
       goto fail;
@@ -2924,10 +2926,10 @@
  *  No data in range_list elements.
  ******************************************************************************/
-range_list* regfi_parse_big_data_cells(REGFI_FILE* file, uint32* offsets,
-				       uint16 num_chunks, bool strict)
-{
-  uint32 cell_length, chunk_offset;
+range_list* regfi_parse_big_data_cells(REGFI_FILE* file, uint32_t* offsets,
+				       uint16_t num_chunks, bool strict)
+{
+  uint32_t cell_length, chunk_offset;
   range_list* ret_val;
-  uint16 i;
+  uint16_t i;
   bool unalloc;
   
@@ -2965,12 +2967,12 @@
 *******************************************************************************/
 REGFI_BUFFER regfi_load_big_data(REGFI_FILE* file, 
-				 uint32 offset, uint32 data_length, 
-				 uint32 cell_length, range_list* used_ranges,
+				 uint32_t offset, uint32_t data_length, 
+				 uint32_t cell_length, range_list* used_ranges,
 				 bool strict)
 {
   REGFI_BUFFER ret_val;
-  uint16 num_chunks, i;
-  uint32 read_length, data_left, tmp_len, indirect_offset;
-  uint32* indirect_ptrs = NULL;
+  uint16_t num_chunks, i;
+  uint32_t read_length, data_left, tmp_len, indirect_offset;
+  uint32_t* indirect_ptrs = NULL;
   REGFI_BUFFER bd_header;
   range_list* bd_cells = NULL;
@@ -3048,5 +3050,5 @@
     }
 
-    if(lseek(file->fd, cell_info->offset+sizeof(uint32), SEEK_SET) == -1)
+    if(lseek(file->fd, cell_info->offset+sizeof(uint32_t), SEEK_SET) == -1)
     {
       regfi_add_message(file, REGFI_MSG_WARN, "Could not seek to chunk while "
@@ -3095,5 +3097,5 @@
   REGFI_HBIN* hbin;
   const range_list_element* hbins_elem;
-  uint32 i, num_hbins, curr_off, cell_len;
+  uint32_t i, num_hbins, curr_off, cell_len;
   bool is_unalloc;
 
@@ -3142,2 +3144,103 @@
   return ret_val;
 }
+
+
+/* From lib/time.c */
+
+/****************************************************************************
+ Put a 8 byte filetime from a time_t
+ This takes real GMT as input and converts to kludge-GMT
+****************************************************************************/
+void regfi_unix2nt_time(REGFI_NTTIME *nt, time_t t)
+{
+  double d;
+  
+  if (t==0) 
+  {
+    nt->low = 0;
+    nt->high = 0;
+    return;
+  }
+  
+  if (t == TIME_T_MAX) 
+  {
+    nt->low = 0xffffffff;
+    nt->high = 0x7fffffff;
+    return;
+  }		
+  
+  if (t == -1) 
+  {
+    nt->low = 0xffffffff;
+    nt->high = 0xffffffff;
+    return;
+  }		
+  
+  /* this converts GMT to kludge-GMT */
+  /* XXX: This was removed due to difficult dependency requirements.  
+   *      So far, times appear to be correct without this adjustment, but 
+   *      that may be proven wrong with adequate testing. 
+   */
+  /* t -= TimeDiff(t) - get_serverzone(); */
+  
+  d = (double)(t);
+  d += TIME_FIXUP_CONSTANT;
+  d *= 1.0e7;
+  
+  nt->high = (uint32_t)(d * (1.0/(4.0*(double)(1<<30))));
+  nt->low  = (uint32_t)(d - ((double)nt->high)*4.0*(double)(1<<30));
+}
+
+
+/****************************************************************************
+ Interpret an 8 byte "filetime" structure to a time_t
+ It's originally in "100ns units since jan 1st 1601"
+
+ An 8 byte value of 0xffffffffffffffff will be returned as (time_t)0.
+
+ It appears to be kludge-GMT (at least for file listings). This means
+ its the GMT you get by taking a localtime and adding the
+ serverzone. This is NOT the same as GMT in some cases. This routine
+ converts this to real GMT.
+****************************************************************************/
+time_t regfi_nt2unix_time(const REGFI_NTTIME* nt)
+{
+  double d;
+  time_t ret;
+  /* The next two lines are a fix needed for the 
+     broken SCO compiler. JRA. */
+  time_t l_time_min = TIME_T_MIN;
+  time_t l_time_max = TIME_T_MAX;
+  
+  if (nt->high == 0 || (nt->high == 0xffffffff && nt->low == 0xffffffff))
+    return(0);
+  
+  d = ((double)nt->high)*4.0*(double)(1<<30);
+  d += (nt->low&0xFFF00000);
+  d *= 1.0e-7;
+  
+  /* now adjust by 369 years to make the secs since 1970 */
+  d -= TIME_FIXUP_CONSTANT;
+  
+  if (d <= l_time_min)
+    return (l_time_min);
+  
+  if (d >= l_time_max)
+    return (l_time_max);
+  
+  ret = (time_t)(d+0.5);
+  
+  /* this takes us from kludge-GMT to real GMT */
+  /* XXX: This was removed due to difficult dependency requirements.  
+   *      So far, times appear to be correct without this adjustment, but 
+   *      that may be proven wrong with adequate testing. 
+   */
+  /*
+    ret -= get_serverzone();
+    ret += LocTimeDiff(ret);
+  */
+
+  return(ret);
+}
+
+/* End of stuff from lib/time.c */
Index: unk/lib/smb_deps.c
===================================================================
--- /trunk/lib/smb_deps.c	(revision 167)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/*
- * This file contains miscellaneous pieces of code which regfio.c
- * depends upon, from the Samba Subversion tree.  See:
- *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/
- *
- * Copyright (C) 2005-2006,2009 Timothy D. Morgan
- * Copyright (C) 1992-2005 Samba development team 
- *               (see individual files under Subversion for details.)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 3 of the License.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- */
-
-#include "smb_deps.h"
-
-
-/* From lib/time.c */
-
-/****************************************************************************
- Put a 8 byte filetime from a time_t
- This takes real GMT as input and converts to kludge-GMT
-****************************************************************************/
-void unix_to_nt_time(NTTIME *nt, time_t t)
-{
-  double d;
-  
-  if (t==0) 
-  {
-    nt->low = 0;
-    nt->high = 0;
-    return;
-  }
-  
-  if (t == TIME_T_MAX) 
-  {
-    nt->low = 0xffffffff;
-    nt->high = 0x7fffffff;
-    return;
-  }		
-  
-  if (t == -1) 
-  {
-    nt->low = 0xffffffff;
-    nt->high = 0xffffffff;
-    return;
-  }		
-  
-  /* this converts GMT to kludge-GMT */
-  /* XXX: This was removed due to difficult dependency requirements.  
-   *      So far, times appear to be correct without this adjustment, but 
-   *      that may be proven wrong with adequate testing. 
-   */
-  /* t -= TimeDiff(t) - get_serverzone(); */
-  
-  d = (double)(t);
-  d += TIME_FIXUP_CONSTANT;
-  d *= 1.0e7;
-  
-  nt->high = (uint32)(d * (1.0/(4.0*(double)(1<<30))));
-  nt->low  = (uint32)(d - ((double)nt->high)*4.0*(double)(1<<30));
-}
-
-
-/****************************************************************************
- Interpret an 8 byte "filetime" structure to a time_t
- It's originally in "100ns units since jan 1st 1601"
-
- An 8 byte value of 0xffffffffffffffff will be returned as (time_t)0.
-
- It appears to be kludge-GMT (at least for file listings). This means
- its the GMT you get by taking a localtime and adding the
- serverzone. This is NOT the same as GMT in some cases. This routine
- converts this to real GMT.
-****************************************************************************/
-time_t nt_time_to_unix(const NTTIME* nt)
-{
-  double d;
-  time_t ret;
-  /* The next two lines are a fix needed for the 
-     broken SCO compiler. JRA. */
-  time_t l_time_min = TIME_T_MIN;
-  time_t l_time_max = TIME_T_MAX;
-  
-  if (nt->high == 0 || (nt->high == 0xffffffff && nt->low == 0xffffffff))
-    return(0);
-  
-  d = ((double)nt->high)*4.0*(double)(1<<30);
-  d += (nt->low&0xFFF00000);
-  d *= 1.0e-7;
-  
-  /* now adjust by 369 years to make the secs since 1970 */
-  d -= TIME_FIXUP_CONSTANT;
-  
-  if (d <= l_time_min)
-    return (l_time_min);
-  
-  if (d >= l_time_max)
-    return (l_time_max);
-  
-  ret = (time_t)(d+0.5);
-  
-  /* this takes us from kludge-GMT to real GMT */
-  /* XXX: This was removed due to difficult dependency requirements.  
-   *      So far, times appear to be correct without this adjustment, but 
-   *      that may be proven wrong with adequate testing. 
-   */
-  /*
-    ret -= get_serverzone();
-    ret += LocTimeDiff(ret);
-  */
-
-  return(ret);
-}
-
-/* End of stuff from lib/time.c */
Index: /trunk/lib/void_stack.c
===================================================================
--- /trunk/lib/void_stack.c	(revision 167)
+++ /trunk/lib/void_stack.c	(revision 168)
@@ -1,6 +1,7 @@
-/*
+/**
+ * @file
+ *
  * This is a really simple implementation of a stack which stores chunks
- * of memory of any type.  It still needs work to eliminate memory
- * leaks. 
+ * of memory of any type.
  *
  * Copyright (C) 2005,2007,2009 Timothy D. Morgan
Index: /trunk/lib/winsec.c
===================================================================
--- /trunk/lib/winsec.c	(revision 167)
+++ /trunk/lib/winsec.c	(revision 168)
@@ -1,3 +1,4 @@
-/*
+/**
+ * @file
  * This file contains refactored Samba code used to interpret Windows
  * Security Descriptors. See:
Index: /trunk/src/common.c
===================================================================
--- /trunk/src/common.c	(revision 167)
+++ /trunk/src/common.c	(revision 168)
@@ -160,5 +160,5 @@
   char* tmp_ptr;
   char* delim;
-  uint32 ret_val_left, i, tmp_len;
+  uint32_t ret_val_left, i, tmp_len;
 
   if(data == NULL || data->size == 0)
Index: /trunk/src/reglookup-recover.c
===================================================================
--- /trunk/src/reglookup-recover.c	(revision 167)
+++ /trunk/src/reglookup-recover.c	(revision 168)
@@ -40,14 +40,14 @@
 
 
-char* getQuotedData(int fd, uint32 offset, uint32 length)
-{
-  uint8* buf;
+char* getQuotedData(int fd, uint32_t offset, uint32_t length)
+{
+  uint8_t* buf;
   char* quoted_buf;
-  uint32 len;
+  uint32_t len;
 
   if((lseek(fd, offset, SEEK_SET)) == -1)
     return NULL;
 
-  buf = (uint8*)malloc(length);
+  buf = (uint8_t*)malloc(length);
   if(buf == NULL)
     return NULL;
@@ -75,5 +75,5 @@
   char* quoted_raw = "";
 
-  *tmp_time = nt_time_to_unix(&nk->mtime);
+  *tmp_time = regfi_nt2unix_time(&nk->mtime);
   tmp_time_s = gmtime(tmp_time);
   strftime(mtime, sizeof(mtime), "%Y-%m-%d %H:%M:%S", tmp_time_s);
@@ -217,8 +217,8 @@
 
 
-int printCell(REGFI_FILE* f, uint32 offset)
+int printCell(REGFI_FILE* f, uint32_t offset)
 {
   char* quoted_buf;
-  uint32 cell_length;
+  uint32_t cell_length;
   bool unalloc;
 
@@ -249,6 +249,6 @@
   REGFI_NK_REC* cur_ancestor;
   char* ret_val;
-  uint32 virt_offset, i, stack_size, ret_val_size, ret_val_used, offset;
-  int32 max_size;
+  uint32_t virt_offset, i, stack_size, ret_val_size, ret_val_used, offset;
+  int32_t max_size;
   REGFI_BUFFER* path_element;
   
@@ -278,5 +278,5 @@
 	path_element = talloc(path_stack, REGFI_BUFFER);
 	if(path_element != NULL)
-	  path_element->buf = (uint8*)quote_string(cur_ancestor->keyname, 
+	  path_element->buf = (uint8_t*)quote_string(cur_ancestor->keyname, 
 						   key_special_chars);
 	  
@@ -343,7 +343,7 @@
 
 
-bool removeRange(range_list* rl, uint32 offset, uint32 length)
-{
-  int32 rm_idx;
+bool removeRange(range_list* rl, uint32_t offset, uint32_t length)
+{
+  int32_t rm_idx;
   const range_list_element* cur_elem;
 
@@ -405,5 +405,5 @@
   const range_list_element* cur_elem;
   REGFI_VK_REC* vk;
-  uint32 i, j;
+  uint32_t i, j;
 
   for(i=0; i < range_list_size(unalloc_cells); i++)
@@ -450,6 +450,6 @@
   range_list* bd_cells;
   REGFI_BUFFER data;
-  uint32 i, j, offset, cell_length, length;
-  int32 max_size;
+  uint32_t i, j, offset, cell_length, length;
+  int32_t max_size;
   bool unalloc;
 
@@ -583,5 +583,5 @@
   const range_list_element* cur_elem;
   REGFI_NK_REC* key;
-  uint32 i, j;
+  uint32_t i, j;
   int error_code = 0;
 
@@ -637,6 +637,6 @@
   REGFI_VK_REC* vk;
   const range_list_element* cur_elem;
-  uint32 i, j, num_keys, off, values_length;
-  int32 max_size;
+  uint32_t i, j, num_keys, off, values_length;
+  int32_t max_size;
 
   num_keys=range_list_size(unalloc_keys);
@@ -663,5 +663,5 @@
 	   * parsed structure.
 	   */
-	  values_length = (nk->values->num_values+1)*sizeof(uint32);
+	  values_length = (nk->values->num_values+1)*sizeof(uint32_t);
 	  if(values_length != (values_length & 0xFFFFFFF8))
 	    values_length = (values_length & 0xFFFFFFF8) + 8;
@@ -727,5 +727,5 @@
   const range_list_element* cur_elem;
   REGFI_SK_REC* sk;
-  uint32 i, j;
+  uint32_t i, j;
 
   for(i=0; i < range_list_size(unalloc_cells); i++)
@@ -778,5 +778,5 @@
   REGFI_NK_REC* tmp_key;
   REGFI_VK_REC* tmp_value;
-  uint32 argi, arge, i, j, ret, num_unalloc_keys;
+  uint32_t argi, arge, i, j, ret, num_unalloc_keys;
   
   /* Process command line arguments */
Index: /trunk/src/reglookup.c
===================================================================
--- /trunk/src/reglookup.c	(revision 167)
+++ /trunk/src/reglookup.c	(revision 168)
@@ -132,5 +132,5 @@
   char* next = NULL;
   char* copy;
-  uint32 ret_cur = 0;
+  uint32_t ret_cur = 0;
 
   ret_val = (char**)malloc((REGFI_MAX_DEPTH+1+1)*sizeof(char**));
@@ -179,5 +179,5 @@
 void freePath(char** path)
 {
-  uint32 i;
+  uint32_t i;
 
   if(path == NULL)
@@ -196,8 +196,8 @@
   const REGFI_ITER_POSITION* cur;
   const REGFI_NK_REC* tmp_key;
-  uint32 buf_left = 127;
-  uint32 buf_len = buf_left+1;
-  uint32 name_len = 0;
-  uint32 grow_amt;
+  uint32_t buf_left = 127;
+  uint32_t buf_len = buf_left+1;
+  uint32_t name_len = 0;
+  uint32_t grow_amt;
   char* buf;
   char* new_buf;
@@ -245,5 +245,5 @@
     if(name_len+1 > buf_left)
     {
-      grow_amt = (uint32)(buf_len/2);
+      grow_amt = (uint32_t)(buf_len/2);
       buf_len += name_len+1+grow_amt-buf_left;
       if((new_buf = realloc(buf, buf_len)) == NULL)
@@ -298,5 +298,5 @@
   REGFI_CLASSNAME* classname;
 
-  *tmp_time = nt_time_to_unix(&k->mtime);
+  *tmp_time = regfi_nt2unix_time(&k->mtime);
   tmp_time_s = gmtime(tmp_time);
   strftime(mtime, sizeof(mtime), "%Y-%m-%d %H:%M:%S", tmp_time_s);
@@ -454,5 +454,5 @@
   char* tmp_path_joined;
   const char** tmp_path;
-  uint32 i;
+  uint32_t i;
   
   if(path == NULL)
@@ -557,5 +557,5 @@
   REGFI_ITERATOR* iter;
   int retr_path_ret;
-  uint32 argi, arge;
+  uint32_t argi, arge;
 
   /* Process command line arguments */
