From: Han-Wen Nienhuys Date: Sun, 24 Dec 2006 22:04:21 +0000 (+0100) Subject: kill some dead code. X-Git-Tag: release/2.11.6-1~62^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9dfb4f967d78ae8b8f8508205cd35172aeb185d;p=lilypond.git kill some dead code. --- diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 6e497fa8fa..dd5080b367 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -450,26 +450,6 @@ ly_truncate_list (int k, SCM lst) -/* Appendable list L: the cdr contains the list, the car the last cons - in the list. */ -SCM -appendable_list () -{ - SCM s = scm_cons (SCM_EOL, SCM_EOL); - scm_set_car_x (s, s); - - return s; -} - -void -appendable_list_append (SCM l, SCM elt) -{ - SCM newcons = scm_cons (elt, SCM_EOL); - - scm_set_cdr_x (scm_car (l), newcons); - scm_set_car_x (l, newcons); -} - string print_scm_val (SCM val) @@ -566,45 +546,6 @@ ly_unique (SCM list) } -static int -scm_default_compare (void const *a, void const *b) -{ - SCM pa = *(SCM *) a; - SCM pb = *(SCM *) b; - if (pa == pb) - return 0; - return pa < pb ? -1 : 1; -} - -/* Modify LST in place: qsort it. - -FIXME: unused, junk? */ -SCM -ly_list_qsort_uniq_x (SCM lst) -{ - int len = scm_ilength (lst); - SCM *arr = new SCM[len]; - int k = 0; - for (SCM s = lst; SCM_NNULLP (s); s = scm_cdr (s)) - arr[k++] = scm_car (s); - - assert (k == len); - qsort (arr, len, sizeof (SCM), &scm_default_compare); - - SCM *tail = &lst; - for (int i = 0; i < len; i++) - if (!i || arr[i] != arr[i - 1]) - { - SCM_SETCAR (*tail, arr[i]); - tail = SCM_CDRLOC (*tail); - } - - *tail = SCM_EOL; - delete[] arr; - - return lst; -} - /* Split list at member s, removing s. Return (BEFORE . AFTER) */ SCM