1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

doc makefile

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@163 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-24 20:35:25 +00:00
parent e618a49cf4
commit c85fa7a089
4 changed files with 15 additions and 11 deletions

View File

@ -1,21 +1,25 @@
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

View File

@ -1615,10 +1615,10 @@ static void generate_text()
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);
}

View File

@ -266,7 +266,7 @@ void update_wifi_stats(void);
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);

View File

@ -663,7 +663,7 @@ static char *buffer = NULL;
static char *frequency;
#endif
char *get_freq()
float get_freq()
{
#if defined(__i386) || defined(__x86_64)
if (buffer == NULL)
@ -689,7 +689,7 @@ char *get_freq()
sprintf(buffer, "%lld", (cycles[1] - cycles[0]) / microseconds);
return buffer;
return strtod(buffer, (char **)NULL);
#else
FILE *f;
char s[1000];
@ -711,7 +711,7 @@ char *get_freq()
}
fclose(f);
//printf("%s\n", frequency);
return frequency;
return strtod(frequency, (char **)NULL);
#endif
}