* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
+
+/* Part of the code in this file is based on GNOME sensors applet code
+ * hddtemp-plugin.c see http://sensors-applet.sourceforge.net/
+ */
+
#include <locale.h>
#include <libintl.h>
#define _(str) gettext(str)
-/*
- * Following code is based on GNOME sensors applet code
- * hddtemp-plugin.c see http://sensors-applet.sourceforge.net/
- */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
static const char *PROVIDER_NAME = "hddtemp";
-#define HDDTEMP_SERVER_IP_ADDRESS "127.0.0.1"
-#define HDDTEMP_PORT_NUMBER 7634
-#define HDDTEMP_OUTPUT_BUFFER_LENGTH 4048
+static const char *HDDTEMP_SERVER_IP_ADDRESS = "127.0.0.1";
+static const int HDDTEMP_PORT_NUMBER = 7634;
+static const int HDDTEMP_OUTPUT_BUFFER_LENGTH = 4048;
struct hdd_info {
char *name;
&& (*sensor_cur)->type & SENSOR_TYPE_HDDTEMP
&& !strcmp((*sensor_cur)->id + 8, info->name))
psensor_set_current_value(*sensor_cur,
- (float)info->temp);
+ (double)info->temp);
sensor_cur++;
}