Add 128th flags
[lilypond.git] / lily / file-name-map.cc
blob6adb1e586336a05ce5ffd1433065682f671d0ed7
1 /*
2 file-name-map.cc -- implement map_file_name ()
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include <map>
10 using namespace std;
12 #include "file-name-map.hh"
13 #include "lily-guile.hh"
15 map<string, string> file_name_map_global;
17 string
18 map_file_name (string s)
20 if (file_name_map_global.find (s) != file_name_map_global.end ())
21 s = file_name_map_global[s];
22 return s;
25 LY_DEFINE (ly_add_file_name_alist, "ly:add-file-name-alist",
26 1, 0, 0, (SCM alist),
27 "Add mappings for error messages from @var{alist}.")
29 for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
31 SCM key = scm_caar (s);
32 SCM val = scm_cdar (s);
34 file_name_map_global[ly_scm2string (key)] = ly_scm2string (val);
36 return SCM_UNSPECIFIED;