+ old_locale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
+
+
+ if (opt_header == 1) {
+ CB_PUTS("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
+ CB_PUTS("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n");
+ CB_PUTS("<!-- Round Robin Database Dump -->\n");
+ CB_PUTS("<rrd>\n");
+ } else if (opt_header == 2) {
+ CB_PUTS("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
+ CB_PUTS("<!-- Round Robin Database Dump -->\n");
+ CB_PUTS("<rrd xmlns=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml\" "
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
+ CB_PUTS("\txsi:schemaLocation=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml "
+ "http://oss.oetiker.ch/rrdtool/rrdtool-dump.xsd\">\n");