X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-guile.cc;h=f37380f024fc4b65fc9b368564c26dd3dd4a3190;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=3c033d70f53445f2212d411d55d3456e71aaaa88;hpb=cb0b407e567feca71cbc5f9479a06b266c69a26c;p=lilypond.git diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 3c033d70f5..f37380f024 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -25,6 +25,7 @@ #include /* strdup, strchr */ #include +using namespace std; #include "dimensions.hh" #include "direction.hh" @@ -41,9 +42,6 @@ #include "warn.hh" #include "lily-imports.hh" -using std::string; -using std::vector; - /* symbols/strings. */ @@ -531,6 +529,18 @@ display_list (SCM s) return SCM_UNSPECIFIED; } +// Needed as complement to int_list_to_slice since scm_c_memq refuses +// to work with dotted lists. + +SCM +ly_memv (SCM v, SCM l) +{ + for (; scm_is_pair (l); l = scm_cdr (l)) + if (scm_is_true (scm_eqv_p (v, scm_car (l)))) + return l; + return SCM_BOOL_F; +} + Slice int_list_to_slice (SCM l) {