From 927fa3837641ccc42d6203a2704356f24b9c1ea9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Thu, 26 Apr 2012 10:43:27 +0000 Subject: [PATCH] renamed fct --- src/graph.c | 12 ++++++------ src/lib/psensor.c | 5 ++--- src/lib/psensor.h | 6 +++--- src/ui_sensorlist.c | 12 ++++++------ 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/graph.c b/src/graph.c index a52b69e..679b9c6 100644 --- a/src/graph.c +++ b/src/graph.c @@ -241,14 +241,14 @@ graph_update(struct psensor **sensors, mint = get_min_temp(sensors); - strmin = psensor_value_to_string(SENSOR_TYPE_TEMP, - mint, - config->temperature_unit == CELCIUS); + strmin = psensor_value_to_str(SENSOR_TYPE_TEMP, + mint, + config->temperature_unit == CELCIUS); maxt = get_max_temp(sensors); - strmax = psensor_value_to_string(SENSOR_TYPE_TEMP, - maxt, - config->temperature_unit == CELCIUS); + strmax = psensor_value_to_str(SENSOR_TYPE_TEMP, + maxt, + config->temperature_unit == CELCIUS); str_btime = time_to_str(get_graph_begin_time_s(config)); str_etime = time_to_str(get_graph_end_time_s()); diff --git a/src/lib/psensor.c b/src/lib/psensor.c index 4efbdc6..b01c81b 100644 --- a/src/lib/psensor.c +++ b/src/lib/psensor.c @@ -210,9 +210,8 @@ double fahrenheit_to_celcius(double f) return (f - 32) * (5.0/9.0); } -char *psensor_value_to_string(unsigned int type, - double value, - int use_celcius) +char * +psensor_value_to_str(unsigned int type, double value, int use_celcius) { /* should not be possible to exceed 20 characters with temp or rpm values the .x part is never displayed */ diff --git a/src/lib/psensor.h b/src/lib/psensor.h index 7e0c0d6..30c9925 100644 --- a/src/lib/psensor.h +++ b/src/lib/psensor.h @@ -156,9 +156,9 @@ psensor_get_max_current_value(struct psensor **sensors, unsigned int type); parameter 'type' is SENSOR_TYPE_LMSENSOR_TEMP, SENSOR_TYPE_NVIDIA, or SENSOR_TYPE_LMSENSOR_FAN */ -char *psensor_value_to_string(unsigned int type, - double value, - int use_celcius); +char *psensor_value_to_str(unsigned int type, + double value, + int use_celcius); struct psensor **get_all_sensors(int use_libatasmart, int values_max_length); diff --git a/src/ui_sensorlist.c b/src/ui_sensorlist.c index 2809b51..f4eae39 100644 --- a/src/ui_sensorlist.c +++ b/src/ui_sensorlist.c @@ -71,21 +71,21 @@ void ui_sensorlist_update(struct ui_psensor *ui) while (valid && *sensor) { s = *sensor; - str = psensor_value_to_string(s->type, - s->measures[s->values_max_length - - 1].value, - use_celcius); + str = psensor_value_to_str(s->type, + s->measures[s->values_max_length - + 1].value, + use_celcius); gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TEMP, str, -1); free(str); - str = psensor_value_to_string(s->type, s->min, use_celcius); + str = psensor_value_to_str(s->type, s->min, use_celcius); gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TEMP_MIN, str, -1); free(str); - str = psensor_value_to_string(s->type, s->max, use_celcius); + str = psensor_value_to_str(s->type, s->max, use_celcius); gtk_list_store_set(GTK_LIST_STORE(model), &iter, COL_TEMP_MAX, str, -1); free(str); -- 2.7.4