summaryrefslogtreecommitdiff
path: root/src/notename.cc
blob: 8ebc4df2442a6bc0ffaab666259ccf31970d4a41 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "glob.hh"
#include "string.hh"


/// change this along with lex file for other notenames.
const char *notetab[] = 
{
"ceses", "ces", "c", "cis", "cisis",
"deses", "des", "d", "dis", "disis",
"eses", "es", "e", "eis", "eisis",
"feses", "fes", "f", "fis", "fisis",
"geses", "ges", "g", "gis", "gisis",
"ases", "as", "a", "ais", "aisis",
"beses", "bes", "b", "bis", "bisis",
0
};

void
lookup_notename(int &large, int &small, String s)
{
    int i;
    for (i =0; notetab[i]; i++)
	if (s == notetab[i]) 
	    {
	    large = i /5;
	    small = i %5 - 2;
	    return;	    
	    }
    assert(false);    
}