lkml.org 
[lkml]   [2002]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -ac] Panicking in morse code
On Fri, 19 Jul 2002 20:35:15 -0400 (EDT)
Alan Cox <alan@redhat.com> wrote:

> > +static const char * morse[] = {
> > + ".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", /* A-H
> > */+ "..", ".---.", "-.-", ".-..", "--", "-.", "---", ".--.", /* I-P
> > */+ "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", /* Q-X
> > */+ "-.--", "--..", /* Y-Z
> > */+ "-----", ".----", "..---", "...--", "....-", /* 0-4 */
> > + ".....", "-....", "--...", "---..", "----." /* 5-9 */
>
> How about using bitmasks here. Say top five bits being the length,
> lower 5 bits being 1 for dash 0 for dit ?
>
v2 uses an algorithm suggested to me in private that allows you to fit
7 bits of morse into 8 bits. Very clever method.

>
> But very nice
>

Thanks. :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.259 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site