[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#462545: marked as done (tqsllib1c2a: Locale dependent failure of frequency conversion)



Your message dated Sun, 17 Feb 2008 16:02:04 +0000
with message-id <E1JQlxs-0004Yr-CS@ries.debian.org>
and subject line Bug#462545: fixed in tqsllib 2.0-7
has caused the Debian Bug report #462545,
regarding tqsllib1c2a: Locale dependent failure of frequency conversion
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
462545: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462545
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tqsllib1c2a
Version: 2.0-5
Tags: patch l10n

Converting a frequency from an ADIF input file to a band may fail with
locales which define something different than '.' as decimal separator
(e.g. de_DE).

ADIF always uses '.' as separator, but the conversion by atof() in
tqsl_infer_band() in tqslconvert.cpp depends on the locale and cuts the
frequency to an integer when a different separator is used. This leads to
errors with 3.5 and 1.8MHz (atof("3.5") == 3), which result in out-of-band
frequencies (as defined in config.xml).

Example error message (from 'tqsl', which is using tqsllib):

01:57:35: Error: Invalid BAND () on line 10
call: DJ1YFK
freq: 3.5
mode: CW
qso_date: 20071209
time_on: 0035


One way to fix this would be:

--- tqslconvert.cpp-orig        2008-01-24 21:43:37.000000000 +0100
+++ tqslconvert.cpp     2008-01-24 21:44:11.000000000 +0100
@@ -23,6 +23,7 @@
 #include <string>
 #include <ctype.h>
 #include <set>
+#include <locale.h>

 //#include <iostream>

@@ -264,6 +265,7 @@

 static const char *
 tqsl_infer_band(const char* infreq) {
+	setlocale(LC_NUMERIC, "C");
 	double freq = atof(infreq);
 	double freq_khz = freq * 1000.0;
 	int nband = 0;



-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)



--- End Message ---
--- Begin Message ---
Source: tqsllib
Source-Version: 2.0-7

We believe that the bug you reported is fixed in the latest version of
tqsllib, which is due to be installed in the Debian FTP archive:

tqsllib-dev_2.0-7_i386.deb
  to pool/main/t/tqsllib/tqsllib-dev_2.0-7_i386.deb
tqsllib1c2a_2.0-7_i386.deb
  to pool/main/t/tqsllib/tqsllib1c2a_2.0-7_i386.deb
tqsllib_2.0-7.diff.gz
  to pool/main/t/tqsllib/tqsllib_2.0-7.diff.gz
tqsllib_2.0-7.dsc
  to pool/main/t/tqsllib/tqsllib_2.0-7.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 462545@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joop Stakenborg <pa3aba@debian.org> (supplier of updated tqsllib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 17 Feb 2008 16:50:35 +0100
Source: tqsllib
Binary: tqsllib1c2a tqsllib-dev
Architecture: source i386
Version: 2.0-7
Distribution: unstable
Urgency: low
Maintainer: Debian Hamradio Maintainers <debian-hams@lists.debian.org>
Changed-By: Joop Stakenborg <pa3aba@debian.org>
Description: 
 tqsllib-dev - QSL signing library development files
 tqsllib1c2a - QSL signing routines for the Logbook of the World (LoTW)
Closes: 462545
Changes: 
 tqsllib (2.0-7) unstable; urgency=low
 .
   * Fix frequency conversion due to locale settings, thanks Fabian Kurz.
     Closes: #462545.
Files: 
 3c95a02d559340b893503aa7b51c42d0 819 libs optional tqsllib_2.0-7.dsc
 b8ec78d5eea5a89eac86630fa7e5cb85 47478 libs optional tqsllib_2.0-7.diff.gz
 9063cdb08e6602493897fc0bb1286a4b 165584 libs optional tqsllib1c2a_2.0-7_i386.deb
 d2103702e993ed564f43d2fe40eaef71 220224 devel optional tqsllib-dev_2.0-7_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHuFln/CqtjGLxpX8RAhydAJ9DmEqPpB0LQCkXkzf7bwDjeayaLQCfWnvm
v7v5i1LZVOb6Az+BdcvzL+A=
=XTre
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: