* grub-core/term/morse.c: Macroify dih and dah.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-28 13:27:51 +02:00
parent b2d7470c15
commit f97ec54645
2 changed files with 43 additions and 36 deletions

View file

@ -1,3 +1,7 @@
2013-04-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/term/morse.c: Macroify dih and dah.
2013-04-27 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
* include/grub/macho.h: Set GRUB_MACHO_FAT_EFI_MAGIC as unsigned.

View file

@ -27,45 +27,48 @@
GRUB_MOD_LICENSE ("GPLv3+");
#define BASE_TIME 250
#define DIH 1
#define DAH 3
#define END 0
static const char codes[0x80][6] =
{
['0'] = { 3, 3, 3, 3, 3, 0 },
['1'] = { 1, 3, 3, 3, 3, 0 },
['2'] = { 1, 1, 3, 3, 3, 0 },
['3'] = { 1, 1, 1, 3, 3, 0 },
['4'] = { 1, 1, 1, 1, 3, 0 },
['5'] = { 1, 1, 1, 1, 1, 0 },
['6'] = { 3, 1, 1, 1, 1, 0 },
['7'] = { 3, 3, 1, 1, 1, 0 },
['8'] = { 3, 3, 3, 1, 1, 0 },
['9'] = { 3, 3, 3, 3, 1, 0 },
['a'] = { 1, 3, 0 },
['b'] = { 3, 1, 1, 1, 0 },
['c'] = { 3, 1, 3, 1, 0 },
['d'] = { 3, 1, 1, 0 },
['e'] = { 1, 0 },
['f'] = { 1, 1, 3, 1, 0 },
['g'] = { 3, 3, 1, 0 },
['h'] = { 1, 1, 1, 1, 0 },
['i'] = { 1, 1, 0 },
['j'] = { 1, 3, 3, 3, 0 },
['k'] = { 3, 1, 3, 0 },
['l'] = { 1, 3, 1, 1, 0 },
['m'] = { 3, 3, 0 },
['n'] = { 3, 1, 0 },
['o'] = { 3, 3, 3, 0 },
['p'] = { 1, 3, 3, 1, 0 },
['q'] = { 3, 3, 1, 3, 0 },
['r'] = { 1, 3, 1, 0 },
['s'] = { 1, 1, 1, 0 },
['t'] = { 3, 0 },
['u'] = { 1, 1, 3, 0 },
['v'] = { 1, 1, 1, 3, 0 },
['w'] = { 1, 3, 3, 0 },
['x'] = { 3, 1, 1, 3, 0 },
['y'] = { 3, 1, 3, 3, 0 },
['z'] = { 3, 3, 1, 1, 0 }
['0'] = { DAH, DAH, DAH, DAH, DAH, END },
['1'] = { DIH, DAH, DAH, DAH, DAH, END },
['2'] = { DIH, DIH, DAH, DAH, DAH, END },
['3'] = { DIH, DIH, DIH, DAH, DAH, END },
['4'] = { DIH, DIH, DIH, DIH, DAH, END },
['5'] = { DIH, DIH, DIH, DIH, DIH, END },
['6'] = { DAH, DIH, DIH, DIH, DIH, END },
['7'] = { DAH, DAH, DIH, DIH, DIH, END },
['8'] = { DAH, DAH, DAH, DIH, DIH, END },
['9'] = { DAH, DAH, DAH, DAH, DIH, END },
['a'] = { DIH, DAH, END },
['b'] = { DAH, DIH, DIH, DIH, END },
['c'] = { DAH, DIH, DAH, DIH, END },
['d'] = { DAH, DIH, DIH, END },
['e'] = { DIH, END },
['f'] = { DIH, DIH, DAH, DIH, END },
['g'] = { DAH, DAH, DIH, END },
['h'] = { DIH, DIH, DIH, DIH, END },
['i'] = { DIH, DIH, END },
['j'] = { DIH, DAH, DAH, DAH, END },
['k'] = { DAH, DIH, DAH, END },
['l'] = { DIH, DAH, DIH, DIH, END },
['m'] = { DAH, DAH, END },
['n'] = { DAH, DIH, END },
['o'] = { DAH, DAH, DAH, END },
['p'] = { DIH, DAH, DAH, DIH, END },
['q'] = { DAH, DAH, DIH, DAH, END },
['r'] = { DIH, DAH, DIH, END },
['s'] = { DIH, DIH, DIH, END },
['t'] = { DAH, END },
['u'] = { DIH, DIH, DAH, END },
['v'] = { DIH, DIH, DIH, DAH, END },
['w'] = { DIH, DAH, DAH, END },
['x'] = { DAH, DIH, DIH, DAH, END },
['y'] = { DAH, DIH, DAH, DAH, END },
['z'] = { DAH, DAH, DIH, DIH, END }
};
static void