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>
12 #include "file-name-map.hh"
13 #include "lily-guile.hh"
15 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 ())
21 s
= file_name_map_global
[s
];
25 LY_DEFINE (ly_add_file_name_alist
, "ly:add-file-name-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
;