File 0006-Move-some-private-functions-to-public.patch of Package libght

From bd24a840216ad56293e3a375998425e47cef26a5 Mon Sep 17 00:00:00 2001
From: Paul Ramsey <pramsey@cleverelephant.ca>
Date: Mon, 21 Oct 2013 17:00:37 -0700
Subject: [PATCH 6/7] Move some private functions to public.

---
 src/ght.h     | 21 +++++++++++++++++++++
 src/ght_mem.h |  5 -----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/ght.h b/src/ght.h
index 0a3e35d..660af16 100644
--- a/src/ght.h
+++ b/src/ght.h
@@ -25,6 +25,21 @@ typedef GhtConfig* GhtConfigPtr;
 
 
 /***********************************************************************
+*   MEMORY MANAGEMENT
+*/
+
+/* Global function signatures for memory/logging handlers. */
+typedef void* (*GhtAllocator)(size_t size);
+typedef void* (*GhtReallocator)(void *mem, size_t size);
+typedef void  (*GhtDeallocator)(void *mem);
+typedef void  (*GhtMessageHandler)(const char *string, va_list ap);
+
+/** Initialize memory/message handling */
+void ght_set_handlers(GhtAllocator allocator, GhtReallocator reallocator,
+                      GhtDeallocator deallocator, GhtMessageHandler error_handler,
+                      GhtMessageHandler info_handler, GhtMessageHandler warn_handler);
+
+/***********************************************************************
 *   NODE
 */
 
@@ -80,6 +95,9 @@ GhtErr ght_attribute_get_next(const GhtAttributePtr attr, GhtAttributePtr *nexta
 /** Get the dimension associated with a GhtAttribute */
 GhtErr ght_attribute_get_dimension(const GhtAttributePtr attr, const GhtDimensionPtr *dim);
 
+/** Return the scaled and offset version of the packed attribute value */
+GhtErr ght_attribute_get_value(const GhtAttributePtr attr, double *val);
+
 /***********************************************************************
 *   DIMENSION
 */
@@ -181,6 +199,9 @@ GhtErr ght_tree_read(GhtReaderPtr reader, GhtTreePtr *tree);
 /** Set up a tree configuration with defaults */
 GhtErr ght_config_init(GhtConfigPtr config);
 
+/** Take in a tree and output a populated GhtNodeList, creates complete copy of data */
+GhtErr ght_tree_to_nodelist(const GhtTreePtr tree, GhtNodeListPtr nodelist);
+
 
 /***********************************************************************
 *   WRITER
diff --git a/src/ght_mem.h b/src/ght_mem.h
index 2299dd1..be6c76c 100644
--- a/src/ght_mem.h
+++ b/src/ght_mem.h
@@ -17,11 +17,6 @@ typedef void* (*GhtReallocator)(void *mem, size_t size);
 typedef void  (*GhtDeallocator)(void *mem);
 typedef void  (*GhtMessageHandler)(const char *string, va_list ap);
 
-/** Initialize memory/message handling */
-void ght_set_handlers(GhtAllocator allocator, GhtReallocator reallocator,
-                      GhtDeallocator deallocator, GhtMessageHandler error_handler,
-                      GhtMessageHandler info_handler, GhtMessageHandler warn_handler);
-
 /** Set the malloc handler */
 void   ght_set_allocator(GhtAllocator allocator);
 
-- 
1.8.4.5
openSUSE Build Service is sponsored by