FREE(graph);
}
-void
+static void strcat_without_spaces(char *dst, const char *src)
+{
+ dst += strlen(dst);
+ while (*src) {
+ if (*src == ' ')
+ *dst++ = '_';
+ else
+ *dst++ = *src;
+ src++;
+ }
+ *dst = 0;
+}
+
+static void
hud_graph_set_dump_file(struct hud_graph *gr)
{
#ifndef PIPE_OS_WINDOWS
if (dump_file) {
strcpy(dump_file, hud_dump_dir);
strcat(dump_file, "/");
- strcat(dump_file, gr->name);
+ strcat_without_spaces(dump_file, gr->name);
gr->fd = fopen(dump_file, "w+");
free(dump_file);
}
FREE(pane);
}
}
+
+ LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) {
+ struct hud_graph *gr;
+
+ LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
+ hud_graph_set_dump_file(gr);
+ }
+ }
}
static void
info = gr->query_data;
info->cpu_index = cpu_index;
- hud_graph_set_dump_file(gr);
-
hud_pane_add_graph(pane, gr);
hud_pane_set_max_value(pane, 100);
}
*/
gr->free_query_data = free_query_data;
- hud_graph_set_dump_file(gr);
-
hud_pane_add_graph(pane, gr);
hud_pane_set_max_value(pane, 100);
}
info->result_index = result_index;
}
- hud_graph_set_dump_file(gr);
-
hud_pane_add_graph(pane, gr);
pane->type = type; /* must be set before updating the max_value */
*/
gr->free_query_data = free_query_data;
- hud_graph_set_dump_file(gr);
-
hud_pane_add_graph(pane, gr);
}
void hud_batch_query_update(struct hud_batch_query_context *bq);
void hud_batch_query_cleanup(struct hud_batch_query_context **pbq);
-void hud_graph_set_dump_file(struct hud_graph *gr);
-
#if HAVE_GALLIUM_EXTRA_HUD
int hud_get_num_nics(bool displayhelp);
#define NIC_DIRECTION_RX 1