use atof_spice() instead of atof() to read cursor position data from graph attributes
This commit is contained in:
parent
a94e0363fd
commit
27c0fd1622
|
|
@ -242,7 +242,7 @@ void backannotate_at_cursor_b_pos(xRect *r, Graph_ctx *gr)
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0);
|
||||
if(s[0]) {
|
||||
cursor2 = atof(s);
|
||||
cursor2 = atof_spice(s);
|
||||
} else {
|
||||
cursor2 = xctx->graph_cursor2_x;
|
||||
}
|
||||
|
|
@ -462,7 +462,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0);
|
||||
if(s[0]) {
|
||||
cursor2 = atof(s);
|
||||
cursor2 = atof_spice(s);
|
||||
} else {
|
||||
cursor2 = xctx->graph_cursor2_x;
|
||||
}
|
||||
|
|
@ -484,7 +484,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0);
|
||||
if(s[0]) {
|
||||
cursor1 = atof(s);
|
||||
cursor1 = atof_spice(s);
|
||||
} else {
|
||||
cursor1 = xctx->graph_cursor1_x;
|
||||
}
|
||||
|
|
@ -515,7 +515,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0);
|
||||
if(s[0]) {
|
||||
cursor2 = atof(s);
|
||||
cursor2 = atof_spice(s);
|
||||
} else {
|
||||
cursor2 = xctx->graph_cursor2_x;
|
||||
}
|
||||
|
|
@ -599,7 +599,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0);
|
||||
if(s[0]) {
|
||||
cursor1 = atof(s);
|
||||
cursor1 = atof_spice(s);
|
||||
} else {
|
||||
cursor1 = xctx->graph_cursor1_x;
|
||||
}
|
||||
|
|
@ -610,7 +610,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0);
|
||||
if(s[0]) {
|
||||
cursor2 = atof(s);
|
||||
cursor2 = atof_spice(s);
|
||||
} else {
|
||||
cursor2 = xctx->graph_cursor2_x;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3605,7 +3605,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct)
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0);
|
||||
if(s[0]) {
|
||||
cursor1 = atof(s);
|
||||
cursor1 = atof_spice(s);
|
||||
} else {
|
||||
cursor1 = xctx->graph_cursor1_x;
|
||||
}
|
||||
|
|
@ -3616,7 +3616,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct)
|
|||
if(r->flags & 4) { /* private_cursor */
|
||||
const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0);
|
||||
if(s[0]) {
|
||||
cursor2 = atof(s);
|
||||
cursor2 = atof_spice(s);
|
||||
} else {
|
||||
cursor2 = xctx->graph_cursor2_x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue