} else if(obj->is_double) {
if (notag)
- buffer_fadd(buf,"%lf",tag,obj->double_value,tag);
+ buffer_fadd(buf,"%f",tag,obj->double_value,tag);
else
- buffer_fadd(buf,"<%s>%lf</%s>",tag,obj->double_value,tag);
+ buffer_fadd(buf,"<%s>%f</%s>",tag,obj->double_value,tag);
} else if (obj->is_array) {
}
double duration = get_timestamp_millis() - starttime;
- osrfLogDebug(OSRF_LOG_MARK, "gateway request took %lf seconds", duration);
+ osrfLogDebug(OSRF_LOG_MARK, "gateway request took %f seconds", duration);
if (isXML)
char id[256];
memset(id,0,256);
- sprintf(id, "%lf.%d%d", get_timestamp_millis(), (int)time(NULL), getpid());
+ sprintf(id, "%f.%d%d", get_timestamp_millis(), (int)time(NULL), getpid());
session->session_id = strdup(id);
osrfLogDebug( OSRF_LOG_MARK, "Building a new client session with id [%s] [%s]",
session->remote_service, session->session_id );
}
double duration = get_timestamp_millis() - starttime;
- osrfLogInfo(OSRF_LOG_MARK, "Message processing duration %lf", duration);
+ osrfLogInfo(OSRF_LOG_MARK, "Message processing duration %f", duration);
message_free( msg );
osrfLogDebug( OSRF_LOG_MARK, "after msg delete");
char tbuf[32];
memset(tbuf, 0x0, 32);
- snprintf(tbuf, 32, "%lf", get_timestamp_millis());
+ snprintf(tbuf, 32, "%f", get_timestamp_millis());
if(!host) host = "";
if(!resource) resource = "";
if (x == (int)x)
buffer_fadd(res_xml,"<number class_hint=\"%s\">%d</number>", hint, (int)x);
else
- buffer_fadd(res_xml,"<number class_hint=\"%s\">%lf</number>", hint, x);
+ buffer_fadd(res_xml,"<number class_hint=\"%s\">%f</number>", hint, x);
} else {
if (x == (int)x)
buffer_fadd(res_xml,"<number>%d</number>", (int)x);
else
- buffer_fadd(res_xml,"<number>%lf</number>", x);
+ buffer_fadd(res_xml,"<number>%f</number>", x);
}
} else if (obj->type == JSON_ARRAY) {
/* number, double, and 'null' parsing... */
printf("------------------------------------------------------------------\n");
o = jsonParseString("1");
- printf("\nParsed number: %lf\n", jsonObjectGetNumber(o));
+ printf("\nParsed number: %f\n", jsonObjectGetNumber(o));
jsonObjectFree(o);
}
else login_session = NULL;
- printf("Login Session: %s. Session timeout: %lf\n", login_session, authtime );
+ printf("Login Session: %s. Session timeout: %f\n", login_session, authtime );
return 1;
memset(buf, 0, RBUFSIZE);
set_fl(sock_fd, O_NONBLOCK);
- osrfLogInternal( OSRF_LOG_MARK, "%d : Received data at %lf\n", getpid(), get_timestamp_millis());
+ osrfLogInternal( OSRF_LOG_MARK, "%d : Received data at %f\n", getpid(), get_timestamp_millis());
while( (read_bytes = recv(sock_fd, buf, RBUFSIZE-1, 0) ) > 0 ) {
osrfLogInternal( OSRF_LOG_MARK, "Socket %d Read %d bytes and data: %s", sock_fd, read_bytes, buf);
char* LONGSTR = __b;
#define DOUBLE_TO_STRING(l) \
- unsigned int __len = snprintf(NULL, 0, "%lf", l) + 2; \
+ unsigned int __len = snprintf(NULL, 0, "%f", l) + 2; \
char __b[__len]; \
bzero(__b, __len); \
- snprintf(__b, __len - 1, "%lf", l); \
+ snprintf(__b, __len - 1, "%f", l); \
char* DOUBLESTR = __b;
#define LONG_DOUBLE_TO_STRING(l) \