-man_MANS = conky.1.gz ../README docs.html
-
clean-am: clean-generic mostlyclean-am
rm -f docs.mxml
- rm -f conky.1.gz
+ rm -f conky.1
if HAVE_DOCSTUFF
+
+man_MANS = conky.1 ../README docs.html
+
conky.1.gz: command_options.xml config_settings.xml docs.xml variables.xml
${DB2X_XSLPROC} -s man ${srcdir}/docs.xml -o docs.mxml
${DB2X_MANXML} docs.mxml
- gzip -f conky.1
docs.html: command_options.xml config_settings.xml docs.xml variables.xml
${XSLPROC} http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl ${srcdir}/docs.xml > docs.html
../README: conky.1.gz
- man ./conky.1.gz | col -b > README
+ man ./conky.1 | col -b > README
mv README ${top_srcdir}
+else
+
+man_MANS = ../README
+
endif
EXTRA_DIST = conkyrc.sample conky.1.gz docs.html command_options.xml config_settings.xml docgen.sh docs.xml variables.xml
i)+ 40) * 9.0 / 5 - 40));
}
OBJ(freq) {
- snprintf(p, n, "%sMhz", get_freq());
+ snprintf(p, n, "%.0fMhz", get_freq());
}
OBJ(freq_g) {
- float ghz = (float)(atof(get_freq())/1000);
+ float ghz = (float)(get_freq()/1000);
//printf("%f\n", ghz);
snprintf(p, n, "%'.2fGhz", ghz);
}
void update_cpu_usage(void);
void update_total_processes(void);
void update_running_processes(void);
-char *get_freq();
+float get_freq();
void update_load_average();
int open_i2c_sensor(const char *dev, const char *type, int n, int *div,
char *devtype);
static char *frequency;
#endif
-char *get_freq()
+float get_freq()
{
#if defined(__i386) || defined(__x86_64)
if (buffer == NULL)
sprintf(buffer, "%lld", (cycles[1] - cycles[0]) / microseconds);
- return buffer;
+ return strtod(buffer, (char **)NULL);
#else
FILE *f;
char s[1000];
}
fclose(f);
//printf("%s\n", frequency);
- return frequency;
+ return strtod(frequency, (char **)NULL);
#endif
}