summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d85c66)
raw | patch | inline | side by side (parent: 9d85c66)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 17:04:03 +0000 (17:04 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 27 Oct 2009 17:04:03 +0000 (17:04 +0000) |
program/src/rrd_client.c | patch | blob | history | |
program/src/rrd_graph.h | patch | blob | history | |
program/src/rrd_restore.c | patch | blob | history |
index b018ee0aa4fc1d86c4c35a2eec47efdb9d5cb2af..034beca9471a6a9ed7899e6c6f65d8b3322d386b 100644 (file)
--- a/program/src/rrd_client.c
+++ b/program/src/rrd_client.c
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include <assert.h>
#include <pthread.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netdb.h>
+#include <limits.h>
#ifndef ENODATA
#define ENODATA ENOENT
index d3de4cf05fc6e215e10312adf2e3d9a555f7e3d7..c11ac2fea851dc921420c1f6a07d9d21578483f0 100644 (file)
--- a/program/src/rrd_graph.h
+++ b/program/src/rrd_graph.h
#include <cairo-pdf.h>
#include <cairo-svg.h>
#include <cairo-ps.h>
+
+/* without this will not compile on solaris */
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__
+#endif
#include <pango/pangocairo.h>
index d75247dc9e299943ad44bbfa05841ff62105abbe..d351cba169c6f8152bac6b7e9b3544107c20a9e6 100644 (file)
double *value)
{
- char *text;
+ xmlChar *text;
double temp;
if ((text = (char *)get_xml_text(reader))!= NULL){
- if (strcasestr(text,"nan")){
+ char *c = text;
+ while (c){
+ *c=tolower((unsigned char)(*c));
+ c++;
+ }
+ if (xmlStrcasestr(text,(xmlChar *)"nan")){
*value = DNAN;
xmlFree(text);
return 0;
}
- else if (strcasestr(text,"-inf")){
+ else if (xmlStrcasestr(text,(xmlChar *)"-inf")){
*value = -DINF;
xmlFree(text);
return 0;
}
- else if (strcasestr(text,"+inf")
- || strcasestr(text,"inf")){
+ else if (xmlStrcasestr(text,(xmlChar *)"+inf")
+ || xmlStrcasestr(text,(xmlChar *)"inf")){
*value = DINF;
xmlFree(text);
return 0;