]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
make update_cdp usable from other modules
authorPeter Stamfest <peter@stamfest.at>
Tue, 4 Mar 2014 20:46:49 +0000 (21:46 +0100)
committerPeter Stamfest <peter@stamfest.at>
Tue, 4 Mar 2014 20:46:49 +0000 (21:46 +0100)
src/rrd_update.c
src/rrd_update.h [new file with mode: 0644]

index 48ba7e47b603f6087e5b3af24feb43558298522c..5c4a6fb6f7242264fab63bc4c0dd5762ef782957 100644 (file)
@@ -25,6 +25,7 @@
 #include "unused.h"
 
 #include "rrd_client.h"
+#include "rrd_update.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 
@@ -192,18 +193,6 @@ static int update_cdp_prep(
     rrd_value_t *seasonal_coef,
     int current_cf);
 
-static void update_cdp(
-    unival *scratch,
-    int current_cf,
-    rrd_value_t pdp_temp_val,
-    unsigned long rra_step_cnt,
-    unsigned long elapsed_pdp_st,
-    unsigned long start_pdp_offset,
-    unsigned long pdp_cnt,
-    rrd_value_t xff,
-    int i,
-    int ii);
-
 static void initialize_cdp_val(
     unival *scratch,
     int current_cf,
@@ -1607,7 +1596,7 @@ static int update_cdp_prep(
  * Given the new reading (pdp_temp_val), update or initialize the CDP value,
  * primary value, secondary value, and # of unknowns.
  */
-static void update_cdp(
+void update_cdp(
     unival *scratch,
     int current_cf,
     rrd_value_t pdp_temp_val,
diff --git a/src/rrd_update.h b/src/rrd_update.h
new file mode 100644 (file)
index 0000000..29bc429
--- /dev/null
@@ -0,0 +1,33 @@
+/****************************************************************************
+ * RRDtool 1.4.8  Copyright by Tobi Oetiker, 1997-2013
+ ****************************************************************************
+ * rrd_restore.h
+ ****************************************************************************/
+#ifdef  __cplusplus
+extern    "C" {
+#endif
+
+#ifndef _RRD_UPDATE_H
+#define _RRD_UPDATE_H
+
+#include <stdio.h>
+#include "rrd.h"
+
+void update_cdp(
+    unival *scratch,
+    int current_cf,
+    rrd_value_t pdp_temp_val,
+    unsigned long rra_step_cnt,
+    unsigned long elapsed_pdp_st,
+    unsigned long start_pdp_offset,
+    unsigned long pdp_cnt,
+    rrd_value_t xff,
+    int i,
+    int ii);
+
+#endif
+
+
+#ifdef  __cplusplus
+}
+#endif