+
+ setlocale(LC_NUMERIC, old_locale);
+
+ return rrd_close(rrd_file);
+
+//Undefining the previously defined shortcuts
+//See start of this function
+#undef CB_PUTS
+#undef CB_FMTS
+//End of macro undefining
+
+}
+
+size_t rrd_dump_opt_cb_fileout(
+ const void *data,
+ size_t len,
+ void *user)
+{
+ return fwrite(data, 1, len, (FILE *)user);
+}
+
+int rrd_dump_opt_r(
+ const char *filename,
+ char *outname,
+ int opt_noheader)
+{
+ FILE *out_file;
+ int res;
+
+ out_file = NULL;
+ if (outname) {
+ if (!(out_file = fopen(outname, "w"))) {
+ return (-1);
+ }
+ } else {
+ out_file = stdout;
+ }
+
+ res = rrd_dump_cb_r(filename, opt_noheader, rrd_dump_opt_cb_fileout, (void *)out_file);
+