OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2002--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2002--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 char const *descr, | 30 char const *descr, |
31 char const *vars) | 31 char const *vars) |
32 { | 32 { |
33 string suffix ("-interface"); | 33 string suffix ("-interface"); |
34 string lispy_name = camel_case_to_lisp_identifier (cxx_name); | 34 string lispy_name = camel_case_to_lisp_identifier (cxx_name); |
35 vsize end = max (int (0), int (lispy_name.length () - suffix.length ())); | 35 vsize end = max (int (0), int (lispy_name.length () - suffix.length ())); |
36 if (lispy_name.substr (end) != suffix) | 36 if (lispy_name.substr (end) != suffix) |
37 lispy_name += suffix; | 37 lispy_name += suffix; |
38 | 38 |
39 SCM s = ly_symbol2scm (lispy_name.c_str ()); | 39 SCM s = ly_symbol2scm (lispy_name.c_str ()); |
40 SCM d = scm_from_locale_string (descr); | 40 SCM d = scm_from_utf8_string (descr); |
41 SCM l = parse_symbol_list (vars); | 41 SCM l = parse_symbol_list (vars); |
42 | 42 |
43 internal_add_interface (s, d, l); | 43 internal_add_interface (s, d, l); |
44 | 44 |
45 return s; | 45 return s; |
46 } | 46 } |
47 | 47 |
48 void | 48 void |
49 check_interfaces_for_property (Grob const *me, SCM sym) | 49 check_interfaces_for_property (Grob const *me, SCM sym) |
50 { | 50 { |
(...skipping 24 matching lines...) Expand all Loading... |
75 } | 75 } |
76 | 76 |
77 if (!found) | 77 if (!found) |
78 { | 78 { |
79 string str = to_string (_f ("Grob `%s' has no interface for property `%s'"
, | 79 string str = to_string (_f ("Grob `%s' has no interface for property `%s'"
, |
80 me->name ().c_str (), | 80 me->name ().c_str (), |
81 ly_symbol2string (sym).c_str ())); | 81 ly_symbol2string (sym).c_str ())); |
82 programming_error (str); | 82 programming_error (str); |
83 } | 83 } |
84 } | 84 } |
OLD | NEW |