#ident "$Header$"
#include <string.h>
+#include <stdlib.h>
#include <expat.h>
#include "trio.h"
c->attrsGlobal = NULL;
c->errCode = 0;
c->bound = 0;
+ c->statsFunction = NULL;
+ c->statsConditions = NULL;
+ c->statsMajor = EDG_WLL_JOB_UNDEF;
+ c->statsMinor = 0;
+ c->statsRate = 0;
+ c->statsDuration = 0;
+ c->statsFrom = 0;
+ c->statsTo = 0;
+ c->statsResFrom = 0;
+ c->statsResTo = 0;
c->errDesc = NULL;
c->stat_begin = 0;
c->jobQueryRec_begin = 0;
}
+/* edg_wll_add_float_to_XMLBody(&body, rate, "rate", 0) */
+
+void edg_wll_add_float_to_XMLBody(char **body, const float toAdd, const char *tag, const float null)
+{
+ if (toAdd != null) {
+ char *newBody;
+
+ trio_asprintf(&newBody,"%s\t\t\t<%s>%|Xf</%s>\r\n", *body, tag, toAdd, tag);
+
+ free(*body);
+ *body = newBody;
+ }
+}
+
+
+
/* edg_wll_add_timeval_to_XMLBody(&body, eventsOut[i].any.tv, "timestamp", -1) */
void edg_wll_add_timeval_to_XMLBody(char **body, struct timeval toAdd, const char *tag, const struct timeval null)
}
+
+/* XMLCtx->eventsOutGlobal[XMLCtx->position].jobClear.clearReason =
+ edg_wll_from_string_to_int(XMLCtx); */
+float edg_wll_from_string_to_float(edg_wll_XML_ctx *XMLCtx)
+{
+ float out;
+
+ out = strtof(XMLCtx->char_buf, (char **) NULL);
+ edg_wll_freeBuf(XMLCtx);
+
+ return(out);
+}
+
+
+
long edg_wll_from_string_to_long(edg_wll_XML_ctx *XMLCtx)
{
long out;