doc makefile
authorBrenden Matthews <brenden1@rty.ca>
Wed, 24 Aug 2005 20:35:25 +0000 (20:35 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Wed, 24 Aug 2005 20:35:25 +0000 (20:35 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@163 7f574dfc-610e-0410-a909-a81674777703

doc/Makefile.am
src/conky.c
src/conky.h
src/linux.c

index fae8388..0f98d79 100644 (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
index dc0bc16..31b457a 100644 (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);
                        }
index 87ac921..264f3e9 100644 (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);
index 561ca01..f25e8e9 100644 (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
 }