From: <enl...@li...> - 2005-04-14 10:52:19
|
Enlightenment CVS committal Author : sebastid Project : e17 Module : apps/e Dir : e17/apps/e/src/modules/temperature Modified Files: e_mod_main.c Log Message: Evas_List -> Ecore_List =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- e_mod_main.c 12 Apr 2005 03:34:28 -0000 1.21 +++ e_mod_main.c 14 Apr 2005 10:52:13 -0000 1.22 @@ -776,13 +776,14 @@ Temperature *ef; Temperature_Face *face; int ret = 0; - Evas_List *therms, *l; + Ecore_List *therms; + Evas_List *l; int temp = 0; char buf[4096]; ef = data; therms = ecore_file_ls("/proc/acpi/thermal_zone"); - if (!therms) + if (ecore_list_is_empty(therms)) { FILE *f; @@ -797,14 +798,12 @@ } else { - while (therms) + char *name; + while ((name = ecore_list_next(therms))) { char units[32]; - char *name; FILE *f; - name = therms->data; - therms = evas_list_remove_list(therms, therms); snprintf(buf, sizeof(buf), "/proc/acpi/thermal_zone/%s/temperature", name); f = fopen(buf, "rb"); if (f) @@ -818,6 +817,7 @@ free(name); } } + ecore_list_destroy(therms); if (ret) { if (ef->have_temp != 1) |