Your message dated Sun, 25 Apr 2010 15:32:37 +0000
with message-id <[email protected]>
and subject line Bug#565412: fixed in aldo 0.7.6-1
has caused the Debian Bug report #565412,
regarding aldo: Aldo doesn't know about punctuation and doesn't handle upper 
case characters or punctuation gracefully when reading a text file
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 [email protected]
immediately.)


-- 
565412: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565412
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: aldo
Version: 0.7.5-1
Severity: important
Tags: patch


Aldo doesn't make any attempt to teach or understand punctuation marks.
Additionally, when reading a text file and translating in to morse, it
completely omits not only punctuation but also capital letters.

This patch adds punctuation and upper-case characters. (currently the
changes only affect reading a file which contains uppercase letters or
punctuation - i.e.  pretty much any real world text!)

C++ is far from my first language, and I had a little difficulty discerning
the proper coding style from the existing code, so please forgive me if my
code isn't the style expected!

TODO: add punctuation to the list of characters taught in Koch / Block
methods. I may attempt this if I have a moment spare.

Cheers & God bless
    Sam "SammyTheSnake" Penny

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (10, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-vserver-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages aldo depends on:
ii  libao2                       0.8.8-4     Cross Platform Audio Output Librar
ii  libc6                        2.7-18      GNU C Library: Shared libraries
ii  libgcc1                      1:4.3.2-1.1 GCC support library
ii  libstdc++6                   4.3.2-1.1   The GNU Standard C++ Library v3

aldo recommends no packages.

aldo suggests no packages.

-- no debconf information
diff -U3 aldo-0.7.5.orig/src/keyer.cc aldo-0.7.5-sammy/src/keyer.cc
--- aldo-0.7.5.orig/src/keyer.cc	2007-11-05 08:58:46.000000000 +0000
+++ aldo-0.7.5-sammy/src/keyer.cc	2010-01-15 15:00:30.000000000 +0000
@@ -30,21 +30,39 @@
 using namespace libaudiostream;
 using namespace std;
 
-// Scrivere qui qualcosa che spieghi...
-
 typedef unsigned int morse_symbol;
 
+// the first two nybles are the dits/dahs 1 for a dit, 0 for a dah, the last nyble is the number of dits & dahs
 static const morse_symbol map[] = 
 {
-// Letters
+// Letters from map[0] to map[25]
     0x8002, 0x7004, 0x5004, 0x6003, 0x8001, 0xD004, 0x2003,
     0xF004, 0xC002, 0x8004, 0x4003, 0xB004, 0x0002, 0x4002,
     0x0003, 0x9004, 0x2004, 0xA003, 0xE003, 0x0001, 0xC003,
     0xE004, 0x8003, 0x6004, 0x4004, 0x3004,
-   
-// Numbers in morse code from map[26]
+// Numbers from map[26] to map[35]
     0x0005, 0x8005, 0xC005, 0xE005, 0xF005, 0xF805, 0x7805,
-    0x3805, 0x1805, 0x0805
+    0x3805, 0x1805, 0x0805,
+// punctuation from map[36] to map[52]
+    0x5006, // !  -.-.--
+    0xB406, // "  .-..-.
+    0xA805, // &  .-...
+    0x8406, // '  .----.
+    0x4805, // (  -.--.
+    0x4806, // )  -.--.-
+    0xA805, // +  .-.-.
+    0x3006, // ,  --..--
+    0x7806, // -  -....-
+    0xA806, // .  .-.-.-
+    0x6805, // /  -..-.
+    0x1C06, // :  ---...
+    0x5406, // ;  -.-.-.
+    0x7005, // =  -...-
+    0xCF06, // ?  ..--.. (seems to be playing as ..--.-, which is wrong!)
+    0x9406, // @  .--.-.
+    0xC806, // _  ..--.-
+    0,0,0,0,
+    0xFF08
 };
 
 Keyer::Keyer(AudioWorkSpace& aws, unsigned int speed, unsigned int ch, unsigned int wd, unsigned int d, unsigned int l)
@@ -99,7 +117,7 @@
 
 Keyer& Keyer::operator<<(const morse_symbol& input)
 {
-    unsigned int data = input & 0xF800;
+    unsigned int data = input & 0xFF00;
     unsigned int size = input & 0x000F;
     
     while(size != 0)
@@ -121,13 +139,47 @@
 Keyer& Keyer::operator<<(unsigned char ch)
 {
     if( (ch > 96) && (ch < 123))
-	ch -= 97;
-    
-    if( (ch >47) && (ch < 58))
-	ch -= 22;               // -48 + 26 = -22
+    {
+        // lower case characters
+        ch -= 97;
+    }
+    else if( (ch > 64) && (ch < 91))
+    {
+        // upper case characters
+        ch -= 65;
+    }
+    else if( (ch >47) && (ch < 58))
+    {
+        // digits
+        ch -= 22;               // -48 + 26 = -22
+    }
+    else
+    {
+        // punctuation
+        switch( ch ) {
+            case 33: ch = 36; break; // !
+            case 34: ch = 37; break; // "
+            case 38: ch = 38; break; // &
+            case 39: ch = 39; break; // '
+            case 40: ch = 40; break; // (
+            case 41: ch = 41; break; // )
+            case 43: ch = 42; break; // +
+            case 44: ch = 43; break; // ,
+            case 45: ch = 44; break; // -
+            case 46: ch = 45; break; // .
+            case 47: ch = 46; break; // /
+            case 58: ch = 47; break; // :
+            case 59: ch = 48; break; // ;
+            case 61: ch = 49; break; // =
+            case 63: ch = 50; break; // ?
+            case 64: ch = 51; break; // @
+            case 95: ch = 52; break; // _
+            default: ch = 255; break; // no morse for this character
+        }
+    }
 
-    if(ch < 36) // bound of array
-	*this<<morse_symbol(map[ch]);
+    if(ch != 255)
+        *this<<morse_symbol(map[ch]);
 
     return *this;
 }
diff -U3 aldo-0.7.5.orig/src/textfile.cc aldo-0.7.5-sammy/src/textfile.cc
--- aldo-0.7.5.orig/src/textfile.cc	2007-11-05 08:58:46.000000000 +0000
+++ aldo-0.7.5-sammy/src/textfile.cc	2010-01-15 11:41:41.000000000 +0000
@@ -54,10 +54,10 @@
 	    m_strings += tmp_string;
 	    m_strings += "|";
 	    tmp_string.clear();
-	}
-
-	if(isalnum(ch))
+	} else {
+	  if(isalnum(ch) || ispunct(ch))
 	    tmp_string += ch;
+        }
     }
     
     if(!tmp_string.empty())

--- End Message ---
--- Begin Message ---
Source: aldo
Source-Version: 0.7.6-1

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

aldo_0.7.6-1.diff.gz
  to main/a/aldo/aldo_0.7.6-1.diff.gz
aldo_0.7.6-1.dsc
  to main/a/aldo/aldo_0.7.6-1.dsc
aldo_0.7.6-1_amd64.deb
  to main/a/aldo/aldo_0.7.6-1_amd64.deb
aldo_0.7.6.orig.tar.gz
  to main/a/aldo/aldo_0.7.6.orig.tar.gz



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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Giuseppe Martino (denever) <[email protected]> (supplier of updated aldo 
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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 16 Jan 2010 18:48:58 +0100
Source: aldo
Binary: aldo
Architecture: source amd64
Version: 0.7.6-1
Distribution: unstable
Urgency: low
Maintainer: Giuseppe Martino (denever) <[email protected]>
Changed-By: Giuseppe Martino (denever) <[email protected]>
Description: 
 aldo       - Morse code training program
Closes: 565412
Changes: 
 aldo (0.7.6-1) unstable; urgency=low
 .
   * New upstream release Closes: #565412
Checksums-Sha1: 
 f22aa18b8cec01af739ad6fe4a1058f56e8839b6 1603 aldo_0.7.6-1.dsc
 54340e88242da5743c4dfa9e912b61ed61bc96d8 136879 aldo_0.7.6.orig.tar.gz
 901635af27913fb569ab161d80c3c34bde6927fc 2256 aldo_0.7.6-1.diff.gz
 d4328e6b25b0d8372d051d8b31caa0d7101c1ffd 71266 aldo_0.7.6-1_amd64.deb
Checksums-Sha256: 
 905ed36fd01065a9aebd98057339041abd5894d490ddeaa641e4b67f463ab8f0 1603 
aldo_0.7.6-1.dsc
 992ef91bf4f9d7cdeb70dd3cd50339935c2c318b41069ec54f3dc7db1833ad9b 136879 
aldo_0.7.6.orig.tar.gz
 9909b2367cd12b550a5eb46f673a4971818b660681ee038376911251509998ee 2256 
aldo_0.7.6-1.diff.gz
 073652f70dec8d244fe8c352d4b7eee0266f165438603bd20ac67f597badeb8f 71266 
aldo_0.7.6-1_amd64.deb
Files: 
 394c67d3ebbd2434bf654b2eeb87aa3d 1603 hamradio optional aldo_0.7.6-1.dsc
 0e173f995b7b500d6c5cd8d50acd93cb 136879 hamradio optional 
aldo_0.7.6.orig.tar.gz
 dec6a14750b6c749f4f0306d4f050985 2256 hamradio optional aldo_0.7.6-1.diff.gz
 355b84a909dd83f18fdab3578a34b371 71266 hamradio optional aldo_0.7.6-1_amd64.deb

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

iQIcBAEBCAAGBQJL1EtYAAoJEDNV9NY7WCHMWv4P/2qmRGxqj7QuzamAxkf33VVI
dvXiLiFRfNDSUM8aXZvcC7x7P2ID40IKkRYb3Y8zaqy4JUe9BMAFV0jEmIujRJxo
jF/kBsUX3TZ8ORINP20va8GuaV6R4pVD/C8GtTX8dE3j35GBTd0RGnrxS5c+sj4u
LmfNafqU+BgNuaAbNwLdX4W0ElgHxSZmHwG6NpjXJqRxQW7HjaKFGzBEV6E3vNtg
QsN1GTpCZYKURp4+1uFHlB7aC24SePXxyt2XFnk1zwVu5JSsb8F1Up/7n7tQw53Q
H85yQkLYYh1j24QAsaRVyuwGk1LgfRg3kwlUl+eIcqyttcAFyV7nBsJGsn82WhrZ
XFwaRwL1F6nah7jA6lOtaw9EH9eJqElj+yvfSWhzkSRBzBkt63rf4w8olxCkqA22
Zb1XGGXXvRbtpcMZVx+jPwn/FMofSued00NLpReITMU3BQ9w92uuKHZR1QdE0U3u
TIVdMZl9tTSR7wZNT9Uh2nGBeZtazjeo15JbUmQWM3f6Qv7Ti4zHVNghTBZ3c/cy
FbdC+SLxf7nfsUHrl1KI10F5yGH5sMHu7d3ElOmqT3isM5GcFiMX/ybs3I7haqCl
kNS+Ch0Tm3W/6jP3BvjiXu2mgGQWmK7vx7q7diu9TYgL0Y9X9cNdB6SRM2gskMRN
iO1UfvD8QhJoIdRMiTBJ
=GHHK
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to