Re: [PATCH -ac] Panicking in morse code

From: Alan Cox (alan@redhat.com)
Date: Fri Jul 19 2002 - 19:35:15 EST


> +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 ?

But very nice
-
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/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:32 EST