openbsd-ports/print/lilypond/patches/patch-lily_pango-font_cc
kili d5d63af4d9 Update to lilypond-2.14.1.
This still uses the downloaded documentation instead of building
it, because it's no fun do build the documentation on low-memory
and/or slow systems like arm (it ran for a couple of days on my
armish, and then it failed with a segfault, which i then couldn't
reproduce for the specific file the segfaults happend on).

It also doesn't depend on the texinfo-4.13 port I sent to ports@
(but not yet committed) recently.

Running it on some of my (rather oldish, i.e. written for lilypond-2.10
and older) files produces mixed results -- simple stuff still works,
some stuff reports failure (yet creates correct output, which is
strange).  Complicated music like my (never finished) work on the
Busoni transcription of BWV-1004/Partita II doesn't work at all
(but iirc, it didn't with lilypond-2.12, either).

make regress currently fails with this version, because it would
need the texinfo port and a new test-baseline, which I didn't yet
create.

Some work to build the documentation for real (possibly shielded by a
pseudo flavor) will follow.
2011-07-06 14:14:06 +00:00

47 lines
1.3 KiB
Plaintext

$OpenBSD: patch-lily_pango-font_cc,v 1.2 2011/07/06 14:14:06 kili Exp $
--- lily/pango-font.cc.orig Sun Jun 12 16:05:50 2011
+++ lily/pango-font.cc Sun Jun 19 13:45:40 2011
@@ -95,19 +95,21 @@ Pango_font::derived_mark () const
void
get_glyph_index_name (char *s,
+ size_t size,
FT_ULong code)
{
- sprintf (s, "glyphIndex%lX", code);
+ snprintf (s, size, "glyphIndex%lX", code);
}
void
get_unicode_name (char *s,
+ size_t size,
FT_ULong code)
{
if (code > 0xFFFF)
- sprintf (s, "u%lX", code);
+ snprintf (s, size, "u%lX", code);
else
- sprintf (s, "uni%04lX", code);
+ snprintf (s, size, "uni%04lX", code);
}
Stencil
@@ -195,7 +197,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem
&& cmap->find (pg) != cmap->end ())
{
FT_ULong char_code = cmap->find (pg)->second;
- get_unicode_name (glyph_name, char_code);
+ get_unicode_name (glyph_name, sizeof(glyph_name), char_code);
}
if (glyph_name[0] == '\0' && has_glyph_names)
@@ -212,7 +214,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem
if (glyph_name[0] == '\0' && is_ttf)
// Access by glyph index directly.
- get_glyph_index_name (glyph_name, pg);
+ get_glyph_index_name (glyph_name, sizeof(glyph_name), pg);
if (glyph_name[0] == '\0')
{