From 600c572174a8a909ca5d10a7a28dcbbe978d2532 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 17 May 2002 13:01:21 +0000 Subject: [PATCH] '' --- ChangeLog | 10 ++++ Documentation/user/invoking.itexi | 3 -- flower/include/pointer.hh | 76 -------------------------- flower/include/pointer.tcc | 88 ------------------------------- flower/include/tuple.hh | 34 ------------ lily/lily-guile.cc | 9 ++++ lily/main.cc | 4 -- scm/lily.scm | 14 +++-- 8 files changed, 28 insertions(+), 210 deletions(-) delete mode 100644 flower/include/pointer.hh delete mode 100644 flower/include/pointer.tcc delete mode 100644 flower/include/tuple.hh diff --git a/ChangeLog b/ChangeLog index 12e8f899a1..e61a6645f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,16 @@ 2002-05-17 Han-Wen + * scm/lily.scm (ly-load): show SCM filenames if verbose. + + * lily/lily-guile.cc (init_functions): add ly-verbose function. + + * lily/main.cc (setup_paths): remove LILYINCLUDE support. + + * flower/include/{pointer,tuple}*: removed. + + * VERSION: released 1.5.56 + * scm/music-functions.scm (check-start-chords): function to check for chords without \context. Apply automatically from parser. diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 23099a43f1..36a219557f 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -97,9 +97,6 @@ settings from within Scheme .} @section Environment variables @table @code -@item LILYINCLUDE -additional directories for finding lilypond data. The -format is like the format of @file{PATH}. @item LILYPONDPREFIX This specifies a directory where locale messages and data files will be looked up by default. The directory should contain diff --git a/flower/include/pointer.hh b/flower/include/pointer.hh deleted file mode 100644 index 5ff3582712..0000000000 --- a/flower/include/pointer.hh +++ /dev/null @@ -1,76 +0,0 @@ -/* - pointer.hh -- declare P - - source file of the Flower Library - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef POINTER_HH -#define POINTER_HH - -#error - -/** P is a handy template to use iso T*. It inits to 0, deletes on - destruction, deep copies upon copying - - It is probably not feasible to use P as template argument, since - a lot of auto conversion wouldn't work. new T would be called too - much anyway. - - Sorry for the silly naming */ -template -class P { - /** - Set contents to a copy of #t_l# - */ - void copy (T const*t_l); - T* t_p; - - /** - junk contents and set to 0 - */ - void junk (); -public: - - P (P const &src); - /** - Remove the pointer, and return it. - */ - - T *get_p () { T*p = t_p; t_p=0; return p; } - /** - return the pointer - */ - T *get_l () { return t_p; } - - T const *get_C () const { return t_p; } - /** - copy the contents of pointer, and return it - */ - T *copy_p () const; - /** - swallow new_p, and set contents t new_p - */ - void set_p (T *new_p); - /** - junk contents, and copy contents of t_l - */ - void set_l (T const *t_C); - - P &operator = (P const &); - ~P (); - P () { t_p = 0; } - //P (T *p) { t_p = p; } - - T *operator -> () { return t_p; } - operator T * () { return t_p; } - const T *operator -> () const { return t_p ; } - T &operator * () { return *t_p; } - T const &operator * () const { return *t_p; } - operator const T * () const { return t_p; } -}; -#endif // POINTER_HH - - diff --git a/flower/include/pointer.tcc b/flower/include/pointer.tcc deleted file mode 100644 index cd4aac565e..0000000000 --- a/flower/include/pointer.tcc +++ /dev/null @@ -1,88 +0,0 @@ -/* - pointer.tcc -- implement P - - source file of the Flower Library - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef POINTER_TCC -#define POINTER_TCC - -template -inline -T * -P::copy_p () const -{ - return t_p? new T (*t_p) : 0; -} - -template -inline -void -P::copy (T const *l_C) -{ - t_p = l_C ? new T (*l_C) : 0; -} - -template -inline -void -P::junk () -{ - delete t_p; - t_p =0; -} - -template -inline -P::P (P const &s) -{ - t_p = s.copy_p (); -} - -template -inline -P & -P::operator = (P const&s) -{ - junk (); - copy (s.t_p); - return *this; -} - -template -inline -P::~P () { - junk (); -} - -template -inline -void -P::set_p (T * np) -{ - if (np == t_p) - return; - delete t_p; - - t_p = np; -} - - -template -inline -void -P::set_l (T const * l_C) -{ - if (t_p == l_C) - return; - - junk (); - copy (l_C); -} - - - -#endif // POINTER_TCC diff --git a/flower/include/tuple.hh b/flower/include/tuple.hh deleted file mode 100644 index 1adf194f1a..0000000000 --- a/flower/include/tuple.hh +++ /dev/null @@ -1,34 +0,0 @@ -/* - tuple.hh -- declare Tuple - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef TUPLET_HH -#define TUPLET_HH -#error - - -template -struct Tuple -{ - T e1_; - U e2_; - - Tuple (T t, U u) - { - e1_ = t; - e2_ = u; - } - Tuple () - { - } -}; - - - -#endif /* TUPLET_HH */ - diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 9065c09358..b9915bcc6f 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -470,11 +470,20 @@ ly_unit () return ly_str02scm (INTERNAL_UNIT); } + +SCM +ly_verbose () +{ + return gh_bool2scm (verbose_global_b); +} + static void init_functions () { scm_c_define_gsubr ("ly-warn", 1, 0, 0, (Scheme_function_unknown)ly_warning); + scm_c_define_gsubr ("ly-verbose", 0, 0, 0, + (Scheme_function_unknown)ly_verbose); scm_c_define_gsubr ("ly-version", 0, 0, 0, (Scheme_function_unknown)ly_version); scm_c_define_gsubr ("ly-unit", 0, 0, 0, diff --git a/lily/main.cc b/lily/main.cc index a78bcf89cd..0e789e75c9 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -247,10 +247,6 @@ setup_paths () #endif global_path.add (""); - // must override (come before) "/usr/local/share/lilypond"! - char const *env_sz = getenv ("LILYINCLUDE"); - if (env_sz) - global_path.parse_path (env_sz); /* Adding mf/out make lilypond unchanged source directory, when setting diff --git a/scm/lily.scm b/scm/lily.scm index 2108e99262..656c8a7bd6 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -114,11 +114,15 @@ (define (ly-load x) - ;; should check verbose -;; (format (current-error-port) "[~s]" x) - (primitive-load (%search-load-path x)) - - ) + (let* + ( + (fn (%search-load-path x)) + ) + (if (ly-verbose) + (format (current-error-port) "[~A]" fn)) + (primitive-load fn) + + )) -- 2.39.2