2 file-name-map.cc -- implement map_file_name()
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "file-name-map.hh"
13 #include "lily-guile.hh"
15 std::map<String, String> file_name_map_global;
18 map_file_name (String s)
20 if (file_name_map_global.find (s) != file_name_map_global.end ())
22 s = file_name_map_global[s];
27 LY_DEFINE (ly_add_file_name_alist, "ly:add-file-name-alist",
29 "Add mappings for error messages from specified alist")
31 for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
33 SCM key = scm_caar (s);
34 SCM val = scm_cdar (s);
36 file_name_map_global[ly_scm2string (key)] = ly_scm2string (val);
38 return SCM_UNSPECIFIED;