Fix device name parsing for diskio variables.
[monky] / src / exec.c
index 575297e..286079a 100644 (file)
@@ -10,7 +10,7 @@
  * Please see COPYING for details
  *
  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
  *     (see AUTHORS)
  * All rights reserved.
  *
@@ -361,7 +361,6 @@ void print_texeci(struct text_object *obj, char *p, int p_max_size)
        }
 }
 
-#ifdef X11
 void print_execgauge(struct text_object *obj, char *p, int p_max_size)
 {
        double barnum;
@@ -371,10 +370,11 @@ void print_execgauge(struct text_object *obj, char *p, int p_max_size)
 
        if (barnum >= 0.0) {
                barnum /= 100;
-               new_gauge(obj, p, round_to_int(barnum * 255.0));
+               new_gauge(obj, p, p_max_size, round_to_int(barnum * 255.0));
        }
 }
 
+#ifdef X11
 void print_execgraph(struct text_object *obj, char *p, int p_max_size)
 {
        double barnum;
@@ -387,7 +387,7 @@ void print_execgraph(struct text_object *obj, char *p, int p_max_size)
        barnum = get_barnum(p);
 
        if (barnum > 0) {
-               new_graph(obj, p, round_to_int(barnum));
+               new_graph(obj, p, p_max_size, round_to_int(barnum));
        }
 }
 
@@ -409,8 +409,9 @@ void print_execigraph(struct text_object *obj, char *p, int p_max_size)
                }
                ed->last_update = current_update_time;
        }
-       new_graph(obj, p, (int) (ed->barnum));
+       new_graph(obj, p, p_max_size, (int) (ed->barnum));
 }
+#endif /* X11 */
 
 void print_execigauge(struct text_object *obj, char *p, int p_max_size)
 {
@@ -430,9 +431,8 @@ void print_execigauge(struct text_object *obj, char *p, int p_max_size)
                }
                ed->last_update = current_update_time;
        }
-       new_gauge(obj, p, round_to_int(ed->barnum));
+       new_gauge(obj, p, p_max_size, round_to_int(ed->barnum));
 }
-#endif /* X11 */
 
 void print_execbar(struct text_object *obj, char *p, int p_max_size)
 {
@@ -441,13 +441,8 @@ void print_execbar(struct text_object *obj, char *p, int p_max_size)
        barnum = get_barnum(p);
 
        if (barnum >= 0.0) {
-#ifdef X11
-               if(output_methods & TO_X) {
-                       barnum /= 100;
-                       new_bar(obj, p, round_to_int(barnum * 255.0));
-               }else
-#endif /* X11 */
-                       new_bar_in_shell(obj, p, p_max_size, barnum);
+               barnum /= 100;
+               new_bar(obj, p, p_max_size, round_to_int(barnum * 255.0));
        }
 }
 
@@ -468,12 +463,7 @@ void print_execibar(struct text_object *obj, char *p, int p_max_size)
                }
                ed->last_update = current_update_time;
        }
-#ifdef X11
-       if(output_methods & TO_X) {
-               new_bar(obj, p, round_to_int(ed->barnum * 2.55));
-       } else
-#endif /* X11 */
-               new_bar_in_shell(obj, p, p_max_size, round_to_int(ed->barnum));
+       new_bar(obj, p, p_max_size, round_to_int(ed->barnum * 2.55));
 }
 
 void free_exec(struct text_object *obj)