diff --git a/src/core.c b/src/core.c index 04cdd0c2..cc89502d 100644 --- a/src/core.c +++ b/src/core.c @@ -1449,7 +1449,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->callbacks.print = &print_lua_parse; obj->callbacks.free = &gen_free_opaque; END OBJ_ARG(lua_bar, 0, "lua_bar needs arguments: , [function parameters]") - arg = scan_bar(obj, arg, 255); + arg = scan_bar(obj, arg, 100); if(arg) { obj->data.s = strndup(arg, text_buffer_size); } else { @@ -1460,7 +1460,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long #ifdef X11 END OBJ_ARG(lua_graph, 0, "lua_graph needs arguments: [height],[width] [gradient colour 1] [gradient colour 2] [scale] [-t] [-l]") char *buf = 0; - buf = scan_graph(obj, arg, 255); + buf = scan_graph(obj, arg, 100); if (buf) { obj->data.s = buf; } else { @@ -1470,7 +1470,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long obj->callbacks.free = &gen_free_opaque; #endif /* X11 */ END OBJ_ARG(lua_gauge, 0, "lua_gauge needs arguments: , [function parameters]") - arg = scan_gauge(obj, arg, 255); + arg = scan_gauge(obj, arg, 100); if (arg) { obj->data.s = strndup(arg, text_buffer_size); } else { diff --git a/src/llua.c b/src/llua.c index 4b4edf44..20568713 100644 --- a/src/llua.c +++ b/src/llua.c @@ -546,11 +546,11 @@ void print_lua_parse(struct text_object *obj, char *p, int p_max_size) } } -uint8_t lua_barval(struct text_object *obj) +double lua_barval(struct text_object *obj) { double per; if (llua_getnumber(obj->data.s, &per)) { - return round_to_int(per * 2.55); + return per; } return 0; } diff --git a/src/llua.h b/src/llua.h index 55cdc0f7..c4e16ad8 100644 --- a/src/llua.h +++ b/src/llua.h @@ -67,6 +67,6 @@ void llua_update_info(struct information *i, double u_interval); void print_lua(struct text_object *, char *, int); void print_lua_parse(struct text_object *, char *, int); -uint8_t lua_barval(struct text_object *); +double lua_barval(struct text_object *); #endif /* LUA_H_*/