* 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> 2013-04-27 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
* include/grub/macho.h: Set GRUB_MACHO_FAT_EFI_MAGIC as unsigned. * include/grub/macho.h: Set GRUB_MACHO_FAT_EFI_MAGIC as unsigned.

View file

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