From: Don Armstrong Date: Sat, 30 Jul 2011 01:21:36 +0000 (-0700) Subject: resolve merge X-Git-Tag: debian/2.16.0-1_exp+1~56 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=941dff9d2a67080e0dd8474f1e70f0c72ace6424;hp=-c;p=lilypond.git resolve merge --- 941dff9d2a67080e0dd8474f1e70f0c72ace6424 diff --combined lily/midi-stream.cc index ca7e24141c,c7a48ad706..dc232cb085 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@@ -1,13 -1,24 +1,24 @@@ /* - midi-stream.cc -- implement Midi_stream + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1997--2011 Jan Nieuwenhuizen - (c) 1997--2009 Jan Nieuwenhuizen + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "midi-stream.hh" - +#include #include using namespace std; diff --combined lily/piano-pedal-engraver.cc index f30442db54,43666efbdd..4c1e52206d --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@@ -1,13 -1,24 +1,24 @@@ /* - piano-pedal-engraver.cc -- implement Piano_pedal_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter - - (c) 2000--2009 Jan Nieuwenhuizen , + Copyright (C) 2000--2011 Jan Nieuwenhuizen , Erik Sandberg Chris Jackson - extended to support bracketed pedals. + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "engraver.hh" @@@ -27,7 -38,6 +38,7 @@@ #include "item.hh" #include "translator.icc" +#include #include @@@ -158,9 -168,9 +169,9 @@@ init_pedal_types ( be careful, as we don't want to loose references to the _sym_ members. */ Pedal_type_info info; - info.event_class_sym_ = scm_str2symbol ((base_ident + "-event").c_str ()); - info.style_sym_ = scm_str2symbol (("pedal" + base_name + "Style").c_str ()); - info.strings_sym_ = scm_str2symbol (("pedal" + base_name + "Strings").c_str ()); + info.event_class_sym_ = scm_from_locale_symbol ((base_ident + "-event").c_str ()); + info.style_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Style").c_str ()); + info.strings_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Strings").c_str ()); info.base_name_ = name; info.pedal_c_str_ = strdup ((base_name + "Pedal").c_str ()); diff --combined lily/prob.cc index 53ce8f72be,233c5b6d5f..ba7cd5635c --- a/lily/prob.cc +++ b/lily/prob.cc @@@ -1,9 -1,20 +1,20 @@@ /* - prob.cc -- implement Prob + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2004--2011 Jan Nieuwenhuizen - (c) 2004--2009 Jan Nieuwenhuizen + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "prob.hh" @@@ -11,7 -22,7 +22,7 @@@ #include "item.hh" #include "input.hh" #include "profile.hh" - +#include #include "ly-smobs.icc" IMPLEMENT_SMOBS (Prob); @@@ -24,7 -35,7 +35,7 @@@ Prob::equal_p (SCM sa, SCM sb constructor preserve equality. Perhaps it would be better to use a more strict definition of - equality; e.g., that that two probs are equal iff they can be + equality; e.g., that two probs are equal iff they can be distinguished by calls to ly:prob-property. */ Prob *probs[2] = {unsmob_prob (sa), unsmob_prob (sb)}; @@@ -55,7 -66,7 +66,7 @@@ if (scm_caar (aprop) != scm_caar (bprop) || ( !(unsmob_input (aval) && unsmob_input (bval)) - && + && !to_boolean (scm_equal_p (aval, bval)))) return SCM_BOOL_F; } @@@ -112,11 -123,11 +123,11 @@@ SC Prob::mark_smob (SCM smob) { ASSERT_LIVE_IS_ALLOWED (); - + Prob *system = (Prob *) SCM_CELL_WORD_1 (smob); scm_gc_mark (system->mutable_property_alist_); system->derived_mark (); - + return system->immutable_property_alist_; } @@@ -131,7 -142,7 +142,7 @@@ Prob::print_smob (SCM smob, SCM port, s scm_puts (p->class_name (), port); scm_display (p->mutable_property_alist_, port); scm_display (p->immutable_property_alist_, port); - + scm_puts (" >\n", port); return 1; } @@@ -165,11 -176,11 +176,11 @@@ Prob::instrumented_set_property (SCM sy } void - Prob::internal_set_property (SCM sym, SCM val) + Prob::internal_set_property (SCM sym, SCM val) { if (do_internal_type_checking_global) type_check_assignment (sym, val); - + mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, sym, val); } diff --combined lily/relocate.cc index 67926e531c,628187363b..e5f38d1f90 --- a/lily/relocate.cc +++ b/lily/relocate.cc @@@ -1,10 -1,20 +1,20 @@@ /* - relocate.cc -- implement relocation based on argv0 + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2009 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "relocate.hh" @@@ -14,10 -24,8 +24,10 @@@ /* TODO: autoconf support */ +#include #include #include +#include #if HAVE_GETTEXT #include @@@ -193,17 -201,18 +203,18 @@@ setup_paths (char const *argv0_ptr File_path path; path.parse_path (getenv ("PATH")); - if (be_verbose_global) - warning (_f ("Relocation: from PATH=%s\nargv0=%s", - path.to_string ().c_str (), argv0_ptr)); - #ifndef __MINGW32__ argv0_abs = path.find (argv0_filename.to_string ()); #else /* __MINGW32__ */ + path.prepend (get_working_directory ()); char const *ext[] = {"exe", "", 0 }; argv0_abs = path.find (argv0_filename.to_string (), ext); #endif /* __MINGW32__ */ + if (be_verbose_global) + warning (_f ("Relocation: from PATH=%s\nargv0=%s", + path.to_string ().c_str (), argv0_ptr)); + if (argv0_abs.empty ()) programming_error ("cannot find absolute argv0"); } diff --combined lily/source-file.cc index d5e4bcf676,b016763558..82c13fc45b --- a/lily/source-file.cc +++ b/lily/source-file.cc @@@ -1,10 -1,21 +1,21 @@@ /* - source-file.cc -- implement Source_file + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter - - (c) 1997--2009 Jan Nieuwenhuizen + Copyright (C) 1997--2011 Jan Nieuwenhuizen Han-Wen Nienhuys + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #if GCC_MAJOR < 4 @@@ -13,15 -24,9 +24,9 @@@ #endif /* GCC_MAJOR < 4 */ #include "source-file.hh" - +#include #include "config.hh" - #if HAVE_UTF8_WCHAR_H - #include /* mbrtowc */ - #else /* !HAVE_UTF8_WCHAR_H */ - #include /* mbrtowc */ - #endif /* HAVE_UTF8_WCHAR_H */ - #include #if HAVE_SSTREAM @@@ -34,6 -39,7 +39,7 @@@ using namespace std #include "file-name-map.hh" #include "international.hh" + #include "misc.hh" #include "warn.hh" void @@@ -42,7 -48,7 +48,7 @@@ Source_file::load_stdin ( characters_.clear (); int c; while ((c = fgetc (stdin)) != EOF) - characters_.push_back (c); + characters_.push_back ((char)c); } /* @@@ -173,8 -179,8 +179,8 @@@ Source_file::file_line_column_string (c return " (" + _ ("position unknown") + ")"; else { - int l, ch, col; - get_counts (context_str0, &l, &ch, &col); + int l, ch, col, offset; + get_counts (context_str0, &l, &ch, &col, &offset); return name_string () + ":" + to_string (l) + ":" + to_string (col); @@@ -187,13 -193,13 +193,13 @@@ Source_file::quote_input (char const *p if (!contains (pos_str0)) return " (" + _ ("position unknown") + ")"; - int l, ch, col; - get_counts (pos_str0, &l, &ch, &col); + int l, ch, col, offset; + get_counts (pos_str0, &l, &ch, &col, &offset); string line = line_string (pos_str0); - string context = line.substr (0, ch) + string context = line.substr (0, offset) + to_string ('\n') + to_string (' ', col) - + line.substr (ch, line.length ()-ch); + + line.substr (offset, line.length () - offset); return context; } @@@ -253,11 -259,10 +259,10 @@@ voi Source_file::get_counts (char const *pos_str0, int *line_number, int *line_char, - int *column) const + int *column, + int *byte_offset) const { *line_number = 0; - *line_char = 0; - *column = 0; if (!contains (pos_str0)) return; @@@ -272,36 -277,13 +277,13 @@@ string line_begin (line_start, left); char const *line_chars = line_begin.c_str (); - *column = 0; *line_char = 0; - - mbstate_t state; - - /* Initialize the state. */ - memset (&state, '\0', sizeof (state)); + *column = 0; + *byte_offset = 0; while (left > 0) { - /* - FIXME, this is apparently locale dependent. - */ - #if HAVE_MBRTOWC - wchar_t multibyte[2]; - size_t thislen = mbrtowc (multibyte, line_chars, left, &state); - #else - size_t thislen = 1; - #endif /* !HAVE_MBRTOWC */ - - /* Stop converting at invalid character; - this can mean we have read just the first part - of a valid character. */ - if (thislen == (size_t) -1) - break; - - /* We want to handle embedded NUL bytes - but the return value is 0. Correct this. */ - if (thislen == 0) - thislen = 1; + size_t thislen = utf8_char_len (*line_chars); if (thislen == 1 && line_chars[0] == '\t') (*column) = (*column / 8 + 1) * 8; @@@ -309,6 -291,14 +291,14 @@@ (*column)++; (*line_char)++; + + /* + To have decent output in UTF-8 aware terminals, + we must keep track of the number of bytes from + the left edge of the terminal. + */ + *byte_offset += thislen; + /* Advance past this character. */ line_chars += thislen; left -= thislen; diff --combined lily/translator.cc index 68320f1fe0,3020006f83..821705c8cf --- a/lily/translator.cc +++ b/lily/translator.cc @@@ -1,13 -1,24 +1,24 @@@ /* - translator.cc -- implement Translator + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1997--2011 Han-Wen Nienhuys - (c) 1997--2009 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "translator.hh" - +#include #include "context-def.hh" #include "dispatcher.hh" #include "global-context.hh" @@@ -25,7 -36,6 +36,6 @@@ Translator::~Translator ( void Translator::init () { - must_be_last_ = false; self_scm_ = SCM_EOL; daddy_context_ = 0; smobify_self (); @@@ -48,8 -58,8 +58,8 @@@ Translator::Translator ( Translator::Translator (Translator const &src) { + (void) src; init (); - must_be_last_ = src.must_be_last_; } Moment @@@ -110,15 -120,17 +120,17 @@@ Translator::finalize ( void Translator::connect_to_context (Context *c) { - for (translator_listener_record *r = get_listener_list (); r; r=r->next_) - c->events_below ()->add_listener (r->get_listener_ (this), r->event_class_); + for (translator_listener_record *r = get_listener_list (); r; r = r->next_) + c->events_below ()->add_listener (r->get_listener_ (this, r->event_class_), + r->event_class_); } void Translator::disconnect_from_context (Context *c) { - for (translator_listener_record *r = get_listener_list (); r; r=r->next_) - c->events_below ()->remove_listener (r->get_listener_ (this), r->event_class_); + for (translator_listener_record *r = get_listener_list (); r; r = r->next_) + c->events_below ()->remove_listener (r->get_listener_ (this, r->event_class_), + r->event_class_); } static SCM listened_event_class_table; @@@ -166,7 -178,7 +178,7 @@@ add_listened_event_class (SCM sym void Translator::add_translator_listener (translator_listener_record **listener_list, translator_listener_record *r, - Listener (*get_listener) (void *), + Listener (*get_listener) (void *, SCM), const char *ev_class) { /* ev_class is the C++ identifier name. Convert to scm symbol */ @@@ -174,7 -186,7 +186,7 @@@ name = replace_all (&name, '_', '-'); name += "-event"; - SCM class_sym = scm_str2symbol (name.c_str ()); + SCM class_sym = scm_from_locale_symbol (name.c_str ()); add_listened_event_class (class_sym); @@@ -247,7 -259,7 +259,7 @@@ IMPLEMENT_TYPE_P (Translator, "ly:trans bool Translator::must_be_last () const { - return must_be_last_; + return false; } void diff --combined scm/ps-to-png.scm index 6c53f07849,17f822247b..1f567aae88 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@@ -1,8 -1,19 +1,19 @@@ - ;;;; ps-to-png.scm -- + ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; - ;;;; source file of the GNU LilyPond music typesetter - ;;;; - ;;;; (c) 2005--2009 Jan Nieuwenhuizen + ;;;; Copyright (C) 2005--2011 Jan Nieuwenhuizen + ;;;; + ;;;; LilyPond is free software: you can redistribute it and/or modify + ;;;; it under the terms of the GNU General Public License as published by + ;;;; the Free Software Foundation, either version 3 of the License, or + ;;;; (at your option) any later version. + ;;;; + ;;;; LilyPond is distributed in the hope that it will be useful, + ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;;;; GNU General Public License for more details. + ;;;; + ;;;; You should have received a copy of the GNU General Public License + ;;;; along with LilyPond. If not, see . (define-module (scm ps-to-png)) @@@ -16,10 -27,9 +27,9 @@@ (lily) ) - ;; gettext wrapper for guile < 1.7.2 - (if (defined? 'gettext) - (define-public _ gettext) - (define-public (_ x) x)) + ;; FIXME: use backend-library for duplicates and stubs; lilypond-ps2png.scm is no more + + (define-public _ gettext) (define PLATFORM (string->symbol @@@ -116,20 -126,19 +126,20 @@@ (output-file (if multi-page? pngn png1)) (gs-variable-options - (if multi-page? - (format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f" - page-width page-height) - "-dEPSCrop")) - (cmd (format #f "~a\ + (if (string-suffix-ci? ".eps" ps-name) + "-dEPSCrop" + (format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f" + page-width page-height))) + (cmd (ly:format "~a\ ~a\ ~a\ -dGraphicsAlphaBits=4\ + -q\ -dTextAlphaBits=4\ -dNOPAUSE\ -sDEVICE=~a\ -sOutputFile=~S\ - -r~S\ + -r~a\ ~S\ -c quit" (search-gs) diff --combined stepmake/bin/config.sub index 6759825a5b,204218c073..c5138c45ab --- a/stepmake/bin/config.sub +++ b/stepmake/bin/config.sub @@@ -1,10 -1,10 +1,10 @@@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. - timestamp='2008-01-16' + timestamp='2010-05-21' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@@ -32,13 -32,16 +32,16 @@@ # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. + # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. + # You can get the latest version of this script from: + # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@@ -72,8 -75,9 +75,9 @@@ Report bugs and patches to