[rrd-developers] [PATCH] Moved all public function definitions from rrd_tool.h to rrd.h.

Sebastian Harl sh at tokkee.org
Mon Jun 9 11:03:19 CEST 2008


The header file "rrd.h" is the only interface definition that is available to
the user (i.e. the only header that is installed). So, all exported functions
should be listed there.
---
 program/src/rrd.h      |   21 +++++++++++++++++++++
 program/src/rrd_tool.h |   18 ------------------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/program/src/rrd.h b/program/src/rrd.h
index fc3efd6..c013b26 100644
--- a/program/src/rrd.h
+++ b/program/src/rrd.h
@@ -199,6 +199,9 @@ extern    "C" {
     char ***,
     rrd_value_t **);
 
+    void      rrd_freemem(
+    void *mem);
+
 /* thread-safe (hopefully) */
     int       rrd_create_r(
     const char *filename,
@@ -296,6 +299,24 @@ extern    "C" {
 /* int    rrd_test_error_r (rrd_context_t *); */
 /* char  *rrd_get_error_r  (rrd_context_t *); */
 
+/* low level file access */
+    rrd_file_t *rrd_open(
+    const char *const file_name,
+    rrd_t *rrd,
+    unsigned rdwr);
+    int       rrd_close(
+    rrd_file_t *rrd_file);
+    ssize_t   rrd_read(
+    rrd_file_t *rrd_file,
+    void *buf,
+    size_t count);
+    ssize_t   rrd_write(
+    rrd_file_t *rrd_file,
+    const void *buf,
+    size_t count);
+    off_t     rrd_tell(
+    rrd_file_t *rrd_file);
+
 #endif                  /* _RRDLIB_H */
 
 #ifdef  __cplusplus
diff --git a/program/src/rrd_tool.h b/program/src/rrd_tool.h
index a8a01fa..18d0657 100644
--- a/program/src/rrd_tool.h
+++ b/program/src/rrd_tool.h
@@ -89,36 +89,18 @@ extern    "C" {
 
     void      rrd_free(
     rrd_t *rrd);
-    void      rrd_freemem(
-    void *mem);
     void      rrd_init(
     rrd_t *rrd);
 
-    rrd_file_t *rrd_open(
-    const char *const file_name,
-    rrd_t *rrd,
-    unsigned rdwr);
     void      rrd_dontneed(
     rrd_file_t *rrd_file,
     rrd_t *rrd);
-    int       rrd_close(
-    rrd_file_t *rrd_file);
-    ssize_t   rrd_read(
-    rrd_file_t *rrd_file,
-    void *buf,
-    size_t count);
-    ssize_t   rrd_write(
-    rrd_file_t *rrd_file,
-    const void *buf,
-    size_t count);
     void      rrd_flush(
     rrd_file_t *rrd_file);
     off_t     rrd_seek(
     rrd_file_t *rrd_file,
     off_t off,
     int whence);
-    off_t     rrd_tell(
-    rrd_file_t *rrd_file);
     int       rrd_lock(
     rrd_file_t *file);
 
-- 
1.5.5.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20080609/87ce8ca0/attachment.bin 


More information about the rrd-developers mailing list