Fix code formatting.
authorChristopher Michael <cpmichael1@comcast.net>
Sat, 22 May 2010 03:05:45 +0000 (03:05 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Sat, 22 May 2010 03:05:45 +0000 (03:05 +0000)
SVN revision: 49123

src/modules/temperature/e_mod_main.c
src/modules/temperature/e_mod_udev.c

index 16f4d22..9d56fe1 100644 (file)
@@ -326,24 +326,30 @@ temperature_face_update_config(Config_Face *inst)
           }
 #endif
         snprintf(buf, sizeof(buf),
-          "%s/%s/tempget %i \"%s\" %i", 
-          e_module_dir_get(temperature_config->module), MODULE_ARCH, 
-          inst->sensor_type,
-          (inst->sensor_name != NULL ? inst->sensor_name : "(null)"),
-          inst->poll_interval);
-        inst->tempget_exe = ecore_exe_pipe_run(buf, 
-            ECORE_EXE_PIPE_READ | 
-            ECORE_EXE_PIPE_READ_LINE_BUFFERED |
-            ECORE_EXE_NOT_LEADER,
-            inst);
+                "%s/%s/tempget %i \"%s\" %i", 
+                e_module_dir_get(temperature_config->module), MODULE_ARCH, 
+                inst->sensor_type,
+                (inst->sensor_name != NULL ? inst->sensor_name : "(null)"),
+                inst->poll_interval);
+        inst->tempget_exe = 
+         ecore_exe_pipe_run(buf, 
+                            ECORE_EXE_PIPE_READ | 
+                            ECORE_EXE_PIPE_READ_LINE_BUFFERED |
+                            ECORE_EXE_NOT_LEADER, inst);
 #ifdef HAVE_EEZE_UDEV
      }
    else
-     {/*avoid creating a new poller if possible*/
+     {
+       /*avoid creating a new poller if possible*/
         if (inst->temp_poller)
-          ecore_poller_poller_interval_set(inst->temp_poller, inst->poll_interval);
-        else
-          inst->temp_poller = ecore_poller_add(ECORE_POLLER_CORE, inst->poll_interval, temperature_udev_update_poll, inst);
+          ecore_poller_poller_interval_set(inst->temp_poller, 
+                                          inst->poll_interval);
+        else 
+         {
+            inst->temp_poller = 
+              ecore_poller_add(ECORE_POLLER_CORE, inst->poll_interval, 
+                               temperature_udev_update_poll, inst);
+         }
      }
 #endif
 }
@@ -369,26 +375,25 @@ temperature_get_bus_files(const char* bus)
               {
                  Eina_List *files;
                  char *file;
-                 
+
                  /* Search each device for temp*_input, these should be 
                   * temperature devices. */
                  snprintf(path, sizeof(path), "%s/%s", busdir, name);
                  files = ecore_file_ls(path);
                  EINA_LIST_FREE(files, file)
+                   {
+                      if ((!strncmp("temp", file, 4)) && 
+                          (!strcmp("_input", &file[strlen(file) - 6])))
                         {
-                           if ((!strncmp("temp", file, 4)) && 
-                               (!strcmp("_input", &file[strlen(file) - 6])))
-                             {
-                                char *f;
-
-                                snprintf(path, sizeof(path),
-                                         "%s/%s/%s", busdir, name, file);
-                                f = strdup(path);
+                           char *f;
+
+                           snprintf(path, sizeof(path),
+                                    "%s/%s/%s", busdir, name, file);
+                           f = strdup(path);
                            if (f) result = eina_list_append(result, f);
                         }
                       free(file);
                    }
-
                  free(name);
               }
          }
index aa6fa87..22bbd69 100644 (file)
@@ -28,7 +28,7 @@ temperature_udev_update(void *data)
         EINA_LIST_FOREACH_SAFE(inst->tempdevs, l, l2, syspath)
           {
              if ((eeze_udev_syspath_get_sysattr(syspath, "fan1_input")) ||
-               (eeze_udev_syspath_get_sysattr(syspath, "pwm1_stop_time")))
+                (eeze_udev_syspath_get_sysattr(syspath, "pwm1_stop_time")))
                {
                   eina_stringshare_del(syspath);
                   inst->tempdevs = eina_list_remove_list(inst->tempdevs, l);
@@ -39,7 +39,8 @@ temperature_udev_update(void *data)
      {
         temp = 0;
         EINA_LIST_FOREACH(inst->tempdevs, l, syspath)
-          {/*FIXME: probably should make a function to count the cpus and loop this */
+          {
+            /*FIXME: probably should make a function to count the cpus and loop this */
              if ((test = eeze_udev_syspath_get_sysattr(syspath, "temp1_input")))
                {
                   temp += (strtod(test, NULL) / 1000); /* udev reports temp in (celcius * 1000) for some reason */
@@ -60,8 +61,8 @@ temperature_udev_update(void *data)
      }
    if (temp != -999)
      {
-        if (inst->units == FAHRENHEIT)
-          temp = (temp * 9.0 / 5.0) + 32;
+        if (inst->units == FAHRENHEIT) 
+         temp = (temp * 9.0 / 5.0) + 32;
 
         if (!inst->have_temp)
           {
@@ -76,8 +77,8 @@ temperature_udev_update(void *data)
           snprintf(buf, sizeof(buf), "%3.2f°C", temp);  
 
         _temperature_face_level_set(inst,
-               (double)(temp - inst->low) /
-               (double)(inst->high - inst->low));
+                                   (double)(temp - inst->low) /
+                                   (double)(inst->high - inst->low));
         edje_object_part_text_set(inst->o_temp, "e.text.reading", buf);
      }
    else