[PATCH 08/16] wmtv: Fix frequency sent to external program.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
Need to divide by 16 or 16000 depending on whether using kHz or MHz.

Patch by Nicolas Boullis <[email protected]> for Debian package version
0.6.5-14 or 15.  (Not mentioned in debian/changelog.)
---
 wmtv/src/wmtv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wmtv/src/wmtv.c b/wmtv/src/wmtv.c
index 8a06cfe..354a6dd 100644
--- a/wmtv/src/wmtv.c
+++ b/wmtv/src/wmtv.c
@@ -547,7 +547,7 @@ main(int argc, char *argv[])
 														snprintf(expansions[0], 3, "%d", cchannel+1);
 														expansions[1] = comment[cchannel];
 														expansions[2] = malloc(15*sizeof(char));
-														snprintf(expansions[2], 15, "%ld", rfreq);
+														snprintf(expansions[2], 15, "%.3f", (double)rfreq/(double)st);
 														command = expand_format(exe, letters, expansions);
 														/* system(exe); */
 														child_pid = fork();
-- 
2.5.0


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.