From fd35c1854983063501a1152c3827530e866dcde3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 20 Oct 1997 02:10:10 +0200 Subject: [PATCH] release: 0.1.24 --- AUTHORS.text | 2 +- BUGS | 13 ++ Documentation/INSTALL.pod | 2 +- Documentation/gnu-music.pod | 18 +-- Documentation/links.pod | 5 +- Documentation/literature.pod | 8 +- Documentation/mudela-course.doc | 2 +- Documentation/other-packages.pod | 11 +- INSTALL.text | 14 +- NEWS | 9 ++ TODO | 3 +- VERSION | 2 +- bin/lily-python.py | 63 --------- bin/lilypython.py | 114 ++++++++++++++++ bin/make-patch.py | 144 ++++++++++++++++++++ bin/make-patch.sh | 57 -------- bin/rel.py | 5 + bin/release.sh | 2 +- flower/data-file.cc | 119 +++++++++-------- flower/dstream.cc | 42 +++--- flower/flower-debug.cc | 5 +- flower/include/international.hh | 16 +++ flower/include/string.hh | 7 + flower/lgetopt.cc | 86 ++++++------ flower/path.cc | 30 ++--- flower/text-stream.cc | 17 ++- init/font-en-tja16.ly | 8 +- init/font-en-tja20.ly | 8 +- input/font.ly | 6 +- lib/includable-lexer.cc | 26 ++-- lib/input.cc | 16 +-- lib/mapped-file-storage.cc | 16 +-- lib/simple-file-storage.cc | 20 +-- lib/source-file.cc | 26 ++-- lib/warn.cc | 6 +- lily/VERSION | 2 +- lily/abbreviation-beam-engraver.cc | 18 +-- lily/atom.cc | 14 +- lily/beam-grav.cc | 24 ++-- lily/beam.cc | 80 +++++------ lily/break.cc | 47 ++++--- lily/clef-grav.cc | 28 ++-- lily/collision.cc | 74 +++++------ lily/command-request.cc | 29 ++-- lily/crescendo.cc | 14 +- lily/debug.cc | 14 +- lily/dimen.cc | 4 +- lily/dynamic-grav.cc | 40 +++--- lily/identifier.cc | 8 +- lily/ineq-constrained-qp.cc | 84 ++++++------ lily/lookup.cc | 44 +++--- lily/main.cc | 53 ++++---- lily/midi-stream.cc | 8 +- lily/musical-request.cc | 40 +++--- lily/my-lily-lexer.cc | 22 +-- lily/my-lily-parser.cc | 52 ++++---- lily/p-score.cc | 68 +++++----- lily/paper-def.cc | 10 +- lily/performance.cc | 20 +-- lily/qlpsolve.cc | 25 ++-- lily/request-iterator.cc | 14 +- lily/score.cc | 39 +++--- lily/scores.cc | 11 +- lily/script.cc | 21 ++- lily/slur-grav.cc | 20 +-- lily/spring-spacer.cc | 172 ++++++++++++------------ lily/staff-side.cc | 26 ++-- lily/stem.cc | 78 +++++------ lily/symtable.cc | 26 ++-- lily/tex-beam.cc | 30 ++--- lily/tex-slur.cc | 82 ++++++------ lily/tex-stream.cc | 41 +++--- lily/tie-grav.cc | 20 +-- lily/tie.cc | 14 +- lily/time-description.cc | 17 ++- lily/timing-translator.cc | 45 +++---- lily/translator-ctors.cc | 4 +- lily/translator-group.cc | 52 ++++---- lily/word-wrap.cc | 30 ++--- make/lelievijver.lsm | 8 +- make/lilypond.lsm | 10 +- make/lilypond.lsm.in | 6 +- make/lilypond.spec | 4 +- mf/feta-banier.mf | 206 ++++++++++++++++++++++------- mf/feta-bolletjes.mf | 8 +- mf/feta-generic.mf | 6 +- mf/feta-schrift.mf | 7 +- mf/feta-test16.mf | 20 +++ mf/font-en-tja16.mf | 2 + mf/font-en-tja20.mf | 1 + mf/foo.mf | 22 --- mi2mu/main.cc | 32 ++--- mi2mu/midi-parser.cc | 10 +- mi2mu/midi-score-parser.cc | 29 ++-- mi2mu/midi-track-parser.cc | 45 +++---- mi2mu/mudela-item.cc | 29 ++-- mi2mu/mudela-score.cc | 51 ++++--- mi2mu/mudela-staff.cc | 41 +++--- mi2mu/mudela-stream.cc | 32 +++-- tex/font-en-tja16.tex | 4 +- tex/font-en-tja20.tex | 4 +- 101 files changed, 1683 insertions(+), 1386 deletions(-) delete mode 100644 bin/lily-python.py create mode 100644 bin/lilypython.py create mode 100644 bin/make-patch.py delete mode 100644 bin/make-patch.sh create mode 100644 bin/rel.py create mode 100644 flower/include/international.hh create mode 100644 mf/feta-test16.mf delete mode 100644 mf/foo.mf diff --git a/AUTHORS.text b/AUTHORS.text index 22eb7acff0..ac30e62162 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -61,6 +61,6 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS -10/Oct/97 LilyPond 0.1.23 1 +10/Oct/97 LilyPond 0.1.24 1 diff --git a/BUGS b/BUGS index 40be3fcf28..80cf443194 100644 --- a/BUGS +++ b/BUGS @@ -30,4 +30,17 @@ in hints what might be wrong. This problem has only been identified with libc-5.3 and libc-5.4 platforms, so you might try upgrading to 6.0, ie. GNU libc-2. +[Linux Intel] + +A problem resembling the previous: usage of libg++.2.8.x with the +wrong version of libc results in a coredump from the scanner while +reading the init files. Stacktrace: + + ios::eof (this=0x0) + + yyFlexLexer::LexerInput (this=0x8294848, buf=0x82955f0 "", max_size=8192) + yyFlexLexer::yy_get_next_buffer (this=0x8294848) + My_lily_lexer::yylex (this=0x8294848) +Fix: follow the install instructions of libg++: match the right +library versions. diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index 44c6bf621b..5823a5622a 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -193,7 +193,7 @@ Set then directory TeX input is in (detected as a subdir of tex-prefix) =item --enable-mf-dir -Set the directory mf input is in (idem) [obsolete] +Set the directory mf input is in (idem) =item --enable-out-dir diff --git a/Documentation/gnu-music.pod b/Documentation/gnu-music.pod index 3a34a5dfac..3f3daf2efc 100644 --- a/Documentation/gnu-music.pod +++ b/Documentation/gnu-music.pod @@ -32,12 +32,6 @@ sequencing interchanging music -=back - -and possibly for - -=over 4 - =item * arranging @@ -198,9 +192,9 @@ core team of four members (Bryan Ford , David Linn Neil Jerram ) and in January '93 Robert Strandh joined. -After serious disputes with Robert Strandh - and the FSF staff in '94, the -project core team got divided. The development efforts of GMP stopped. +After serious disputes with Robert Strandh and the FSF staff in '94, +the project core team got divided. The development efforts of GMP +stopped. Independently, I (HWN) started LilyPond. When I showed it to RMS, he was very enthousiastic about having LilyPond in the GNU @@ -217,8 +211,8 @@ Only later did I discover the previous quarrels about the GMP-"take gets me wrong or is angry at me because I stole a project or a project's name, I wrote this note. -In summary, LilyPond is now the only substantial embodiment of the GNU Music -Project, and it is part of the GNU project. +In summary, LilyPond is now the only substantial embodiment of the GNU +Music Project, and it is part of the GNU project. For completeness' sake, I will mention the other efforts here: @@ -227,7 +221,7 @@ For completeness' sake, I will mention the other efforts here: =item G Sharp, http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp An alpha version notation editor for X in Scheme. Source available on -request. +request from Robert Strandh. =item GNU music, diff --git a/Documentation/links.pod b/Documentation/links.pod index 955f9f3ec6..23acec4e39 100644 --- a/Documentation/links.pod +++ b/Documentation/links.pod @@ -20,6 +20,9 @@ Foundation to create a system of free software for the world-community The documentation system for C++ sources, which the LilyPond sources use. +=item http://www.iat.unc.edu/technology/music/music.html + +An enormous collection of music related URLs =back @@ -135,7 +138,7 @@ LilyPond =item http://www.redhat.com/ -develops and markets a GNU/Linux distribution (of +RedHat Software Inc. develops and markets a GNU/Linux distribution (of which we are avid users) diff --git a/Documentation/literature.pod b/Documentation/literature.pod index a085af6c6a..bbb68635ff 100644 --- a/Documentation/literature.pod +++ b/Documentation/literature.pod @@ -29,12 +29,16 @@ Association of the United States Inc., 1993. Ted Ross. ``Teach yourself the art of music engraving and processing'' (3rd edition). Hansen House, Miami Beach, FLorida. -[This is about I i.e. professional music typesetting, and -includes some good spacing tables MB] +[This is about engraving, i.e. the real thing with metal plates, but +it also contains directions on good typesetting. It includes some good +spacing tables HWN] Gardner Read. ``Modern Rhythmic Notation.'' Indiana University Press, 1978. +[Sound (boring) review of the various hairy rhythmic notations used by +avant-garde composers HWN] + Gardner Read. ``Music Notation'' (2nd edition). Taplinger Publishing, New York. diff --git a/Documentation/mudela-course.doc b/Documentation/mudela-course.doc index 3b0d0f8dcd..a648e29e90 100644 --- a/Documentation/mudela-course.doc +++ b/Documentation/mudela-course.doc @@ -98,7 +98,7 @@ command When LilyPond starts working it will produce various ``operator pacification'' messages, which you can safely ignore for now. The run should have left a file called \file{lelie.tex} in your working -directory. You can process that file with TeX, and it will look like +directory. You can process that file with \TeX, and it will look like this: \begin{mudela} diff --git a/Documentation/other-packages.pod b/Documentation/other-packages.pod index c0acbb555e..4ca3a2b004 100644 --- a/Documentation/other-packages.pod +++ b/Documentation/other-packages.pod @@ -119,7 +119,11 @@ notation program available''. =item Ikarus, -The music-engraving system described by [Wanske] +URW's music-engraving system described by [Wanske] + +=item Logic, + +=item Personal Composer =item Finale @@ -159,5 +163,8 @@ Sun boxen. A project at Ohio State university, which was discontinued in 1987. -=item Berlioz, http://www.bsi.fr/~montel/ +=item Berlioz, http://www.?.fr/ + +Dominique Montel (a professional music typesetter) is now working together with +computer scientists on his own software for music publishing, called "Berlioz". diff --git a/INSTALL.text b/INSTALL.text index 215a2e2509..fdf183ed07 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -61,7 +61,7 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG -8/Oct/97 LilyPond 0.1.23 1 +20/Oct/97 LilyPond 0.1.24 1 @@ -127,7 +127,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a -8/Oct/97 LilyPond 0.1.23 2 +20/Oct/97 LilyPond 0.1.24 2 @@ -189,11 +189,11 @@ INSTALL(1) LilyPond documentation INSTALL(1) --enable-mf-dir Set the directory mf input is in (idem) - [obsolete] -8/Oct/97 LilyPond 0.1.23 3 + +20/Oct/97 LilyPond 0.1.24 3 @@ -259,7 +259,7 @@ IIIINNNNSSSSTTTTAAAALLLLLLLLIIIINNNNGGGG -8/Oct/97 LilyPond 0.1.23 4 +20/Oct/97 LilyPond 0.1.24 4 @@ -325,7 +325,7 @@ RRRREEEEDDDDHHHHAAAATTTT LLLLIIIINNNNUUUUXXXX -8/Oct/97 LilyPond 0.1.23 5 +20/Oct/97 LilyPond 0.1.24 5 @@ -391,6 +391,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS -8/Oct/97 LilyPond 0.1.23 6 +20/Oct/97 LilyPond 0.1.24 6 diff --git a/NEWS b/NEWS index e73a035807..eb4082d5f5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +pl 24 + - internationalization preps (FP) + - rewrote make-patch in python + - BUGS: added another flex/libio crash explanation + - feta: flags + + +******** pl 23 - feta changes: 1/4 rest, flat, bf 8-128 rest - bf: cadenza @@ -5,6 +13,7 @@ pl 23 - bf: rest-collision - bf: meter placement - junked cpgento.sh + ********* pl 22 diff --git a/TODO b/TODO index b8615af6f3..96a9fa16a3 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,6 @@ grep for TODO and ugh/ugr * standchen: warning: Excentric column (Meter dims?) - * optimal pagebreaking. * put errorlevel in Input class @@ -69,7 +68,7 @@ PROJECTS - examples to go with it. * Spring_spacer: - - write a faster Spring_spacer ( without matrices if possible ) + - write a faster Spring_spacer (without matrices if possible) - use straight QP to find minimal "fitting force" - relate energybound to linelen unitspace fontsize etc. - used fixed point fp diff --git a/VERSION b/VERSION index b337cd5d37..5cdf9560bc 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 23 +TOPLEVEL_PATCH_LEVEL = 24 TOPLEVEL_MY_PATCH_LEVEL = # use the above to send patches, always empty for released version: diff --git a/bin/lily-python.py b/bin/lily-python.py deleted file mode 100644 index 6f85149b50..0000000000 --- a/bin/lily-python.py +++ /dev/null @@ -1,63 +0,0 @@ -#!@PYTHON@ - -# -# lily-python.py -- implement general LilyPond-wide python stuff -# -# source file of the GNU LilyPond music typesetter -# -# (c) 1997 Han-Wen Nienhuys -# - -import posix -import pwd -import regex -import regsub -import string -import sys -import os -import getopt - - - - - -make_assign_re = regex.compile('^\([A-Z_]*\) *= *\(.*\)$') - -def version_str_tuple(file): - lines = file.readlines() - - mi = pa = mp = mj = '' - - for l in lines: - if make_assign_re.search(l) <> -1: - nm = make_assign_re.group(1) - val = make_assign_re.group(2) - if nm == 'TOPLEVEL_MAJOR_VERSION': - mj = val - elif nm == 'TOPLEVEL_MINOR_VERSION': - mi = val - elif nm == 'TOPLEVEL_PATCH_LEVEL': - pa = val - elif nm == 'TOPLEVEL_MY_PATCH_LEVEL': - mp = val - return (mj,mi,pa,mp) - -class Lilydirs: - def __init__(self): - try: - self.topdir = os.environ['LILYPOND_SOURCEDIR'] + '/' - except IndexError: - self.topdir = os.environ['HOME'] + 'musix/current' - - self.release_dir = self.topdir + '../releases/' - self.patch_dir = self.topdir + '../patches/' - - def version_str_tuple(self): - f = open (self.topdir + 'VERSION') - v = version_str_tuple(f) - f.close () - return v - -lilydirs = Lilydirs() - -print lilydirs.version_str_tuple() diff --git a/bin/lilypython.py b/bin/lilypython.py new file mode 100644 index 0000000000..1b62c2833d --- /dev/null +++ b/bin/lilypython.py @@ -0,0 +1,114 @@ +#!@PYTHON@ + +# +# lily-python.py -- implement general LilyPond-wide python stuff +# +# source file of the GNU LilyPond music typesetter +# +# (c) 1997 Han-Wen Nienhuys +# + +import posix +import pwd +import regex +import regsub +from string import * +import sys +import os +import getopt + + + + +version_re = regex.compile('\\version *\"\(.*\)\"') +make_assign_re = regex.compile('^\([A-Z_]*\) *= *\(.*\)$') + +def version_tuple(file): + lines = file.readlines() + + mi = pa = mj = 0 + mp = '' + + for l in lines: + if make_assign_re.search(l) <> -1: + nm = make_assign_re.group(1) + val = make_assign_re.group(2) + if nm == 'TOPLEVEL_MAJOR_VERSION': + mj = atoi(val) + elif nm == 'TOPLEVEL_MINOR_VERSION': + mi = atoi(val) + elif nm == 'TOPLEVEL_PATCH_LEVEL': + pa = atoi(val) + elif nm == 'TOPLEVEL_MY_PATCH_LEVEL': + mp = val + return (mj,mi,pa,mp) + +def next_version(tup): + return (tup[0], tup[1], tup[2] + 1, tup[3]); + +def prev_version(tup): + t = tup + if t[3]: + return (tup[0], tup[1], tup[2], ''); + elif t[2] == 0 : + return (tup[0], tup[1] -1, tup[2], ''); + else: + return (tup[0], tup[1], tup[2] - 1, ''); + + +def tuple_to_list(tup): + l=[] + for x in tup: + l.append[x] + return l + +def version_str_to_tuple(str): + t = split(str, '.') + try: + mypatch = t[3] + except IndexError: + mypatch = '' + + return (atoi(t[0]), atoi(t[1]), atoi(t[2]), mypatch) + + + +def guess_mudela_version(filename): + f = open (filename) + lines = f.readlines() + f.close() + for l in lines: + if version_re.search(l) <> -1: + return version_re.group(1) + + return '' + +def version_tuple_to_str(tup): + return '%d.%d.%d%s' % tup + +class Lilydirs: + def __init__(self): + try: + self.topdir = os.environ['LILYPOND_SOURCEDIR'] + '/' + except IndexError: + self.topdir = os.environ['HOME'] + 'musix/current' + + self.release_dir = self.topdir + '../releases/' + self.patch_dir = self.topdir + '../patches/' + + def version_tuple(self): + f = open (self.topdir + 'VERSION') + v = version_tuple(f) + f.close () + return v + + +lilydirs = Lilydirs() + +if __name__ == '__main__': + v= lilydirs.version_tuple() + print v, prev_version(v), next_version(v) + + mv = guess_mudela_version(lilydirs.topdir + 'init/symbol.ly') + + print version_str_to_tuple(mv) diff --git a/bin/make-patch.py b/bin/make-patch.py new file mode 100644 index 0000000000..ff070acdf7 --- /dev/null +++ b/bin/make-patch.py @@ -0,0 +1,144 @@ +#!@PYTHON@ +from lilypython import * +import getopt +import pipes + + +mp_version = '2' + +class Options: + def __init__(self): + self.to_version = lilydirs.version_tuple() + self.from_version = prev_version(self.to_version) + +options = Options() + + +def help(): + sys.stdout.write( + 'Generate a patch to go to this version.\n' + ' --from=FROM, -f FROM old is FROM\n' + ' --to=TO, -t TO to version TO\n' + + ) + + +def dirname(v): + return 'lilypond-' + version_tuple_to_str(v) + +def tarball(v): + return lilydirs.release_dir + dirname(v) + '.tar.gz' + +def untar(fn): + sys.stderr.write('untarring ' + fn) + os.system ('tar xzf ' + fn) + sys.stderr.write('\n') + sys.stderr.flush() + + +header = 'Generated by make-patch, old = %s, new = %s\n\ +\n\ +usage \n\ +\n\ + cd lilypond-source-dir; patch -E -p0 < patch-$new\n\ +\n\ +Patches do not contain automatically generated files, \n\ +i.e. you should rerun configure\n\n' + +import fnmatch +import os + +_debug = 0 + +_prune = ['(*)'] + + +def my_find(patterns, dir = os.curdir): + list = [] + names = os.listdir(dir) + names.sort() + for name in names: + if name in (os.curdir, os.pardir): + continue + fullname = os.path.join(dir, name) + for pat in patterns: + if fnmatch.fnmatch(name, pat): + list.append(fullname) + if os.path.isdir(fullname) and not os.path.islink(fullname): + for p in _prune: + if fnmatch.fnmatch(name, p): + if _debug: print "skip", `fullname` + break + else: + if _debug: print "descend into", `fullname` + found = my_find(patterns, fullname) + if found: + list = list + found + return list + +def multiple_find(pats, dirnames): + from find import find + l = [] + for d in dirnames: + l = l + my_find(pats, d) + return l + +pats = ['*.lsm', 'configure', '*.text', 'lilypond.spec'] +def remove_automatic(dirnames): + files = [] + files = files + multiple_find(pats, dirnames) + + for f in files: + os.remove(f) + +def makepatch(fv, tv, patfile_nm): + import tempfile + os.chdir ('/tmp') + untar(tarball(fv)) + untar(tarball(tv)) + remove_automatic([dirname(fv), dirname(tv)]) + + os.chdir(dirname(tv)) + + if not patfile_nm: + patfile_nm = '../patch-%s' % version_tuple_to_str(tv) + + f = open(patfile_nm, 'w') + f.write(header % (version_tuple_to_str(fv), version_tuple_to_str(tv))) + f.close() + + sys.stderr.write('diffing ... ') + os.system('diff -urN ../%s . >> %s' % (dirname(fv), patfile_nm)) + #os.system('gzip -9f %s' % patfile_nm) + os.chdir('/tmp') + + sys.stderr.write('cleaning ... ') + os.system('rm -fr %s %s' % (dirname(tv), dirname(fv))) + sys.stderr.write('\n') + +def main(): + sys.stderr.write('This is make-patch version %s\n' % mp_version) + (cl_options, files) = getopt.getopt(sys.argv[1:], + 'hf:o:t:', ['output=', 'help=', 'from=', 'to=']) + outfn = '' + for opt in cl_options: + o = opt[0] + a = opt[1] + if o == '--from' or o == '-f': + options.from_version = version_str_to_tuple(a) + elif o == '--to' or o == '-t': + options.to_version = version_str_to_tuple(a) + elif o== '--help' or o == '-h': + help() + elif o == '--output' or o == '-o': + outfn = os.path.join(os.getcwd(), a) + else: + raise getopt.error + + if not outfn: + pn = 'patch-%s' % version_tuple_to_str(options.to_version) + outfn = os.path.join(os.getcwd(), pn) + + makepatch(options.from_version, options.to_version, outfn) + +main() diff --git a/bin/make-patch.sh b/bin/make-patch.sh deleted file mode 100644 index e11d7b8533..0000000000 --- a/bin/make-patch.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -case $# in -0) echo make_patch old new name - exit 1;; -esac - -old=$1 -new=$2 -nm=$3- - -newarc=../releases/$nm$new.tar.gz -oldarc=../releases/$nm$old.tar.gz - - -if [ ! -x $nm$new ] -then - echo untarring .. - if [ ! -f $newarc ] - then - echo "can't find $newarc" - exit - fi - tar zfx $newarc -fi -if [ ! -x $nm$old ] -then - echo untarring - - if [ ! -f $oldarc ] - then - echo "can't find $oldarc" - exit - fi - tar zfx $oldarc -fi - -# not interested in auto generated files. -for a in lilypond.lsm INSTALL.text AUTHORS.text lilypond.spec configure; do - rm `find $nm$old $nm$new -name $a` -done - -cat < patch-$new -Generated with - - make_patch $1 $2 $3 - -usage - - cd lilypond-source-dir; patch -E -p0 < patch-$new - -Patches do not contain automatically generated files, -i.e. you should rerun configure -EOF - -(cd $nm$new; diff -urN ../$nm$old . >> ../patch-$new) -rm -rf $nm$old $nm$new diff --git a/bin/rel.py b/bin/rel.py new file mode 100644 index 0000000000..d0efcb8c55 --- /dev/null +++ b/bin/rel.py @@ -0,0 +1,5 @@ + +from lilypython import * + + +os.system('make dist') diff --git a/bin/release.sh b/bin/release.sh index e6e3b679ef..6d64b34268 100644 --- a/bin/release.sh +++ b/bin/release.sh @@ -50,7 +50,7 @@ patch=patch-$LILYVER.gz mv $tarball $releasedir/ cd ../test -sh $heredir/bin/make-patch.sh $LASTVER $NEWVER lilypond +python $heredir/bin/make-patch.py gzip -f9 patch-$NEWVER mv $patch $patchdir// diff --git a/flower/data-file.cc b/flower/data-file.cc index 251380d3c8..5a273c5dbb 100644 --- a/flower/data-file.cc +++ b/flower/data-file.cc @@ -1,97 +1,104 @@ +/* + data-file.cc -- implement Data_file + + source file of the Flower Library + + (c) '95, '96, '97 Han-Wen Nienhuys + + */ #include #include +#include "international.hh" #include "data-file.hh" -void +void Data_file::gobble_white() { char c; - + while ((c=data_get()) == ' ' ||c == '\t') - if (eof()) - break; + if (eof()) + break; data_unget (c); } String -Data_file::get_word() +Data_file::get_word() {// should handle escape seq's String s; - while (1) + while (1) + { + char c = data_get(); + + if (isspace (c) || eof()) { - char c = data_get(); - - if (isspace (c) || eof()) - { - data_unget (c); - break; - } - - - if (c == '\"') - { - rawmode= true; - - while ((c = data_get()) != '\"') - if (eof()) - error ("EOF in a string"); - else - s += c; - - - rawmode= false; - } - else - s += c; - } - - return s; + data_unget (c); + break; + } + + + if (c == '\"') + { + rawmode= true; + + while ((c = data_get()) != '\"') + if (eof()) + error (_("EOF in a string")); + else + s += c; + + + rawmode= false; + } + else + s += c; + } + + return s; } -/** get a char +/** get a char Only class member who uses text_file::get */ char Data_file::data_get() { - char c = get(); + char c = get(); if (!rawmode && c == '#') // gobble comment - { - while ((c = get()) != '\n' && !eof ()) - ; - return '\n'; - } + { + while ((c = get()) != '\n' && !eof ()) + ; + return '\n'; + } return c; } -/// read line, gobble '\n' -String Data_file::get_line() +/// read line, gobble '\n' +String Data_file::get_line() { - char c; + char c; String s; while ((c = data_get()) != '\n' && !eof ()) - s += c; - return s; + s += c; + return s; } -/// gobble stuff before first entry on a line. +/// gobble stuff before first entry on a line. void -Data_file::gobble_leading_white() +Data_file::gobble_leading_white() { // eat blank lines. - while (!eof()) + while (!eof()) { - char c = data_get(); - if (!isspace (c)) - { - data_unget (c); - break; - } + char c = data_get(); + if (!isspace (c)) + { + data_unget (c); + break; + } } } - - diff --git a/flower/dstream.cc b/flower/dstream.cc index 533cd13a7c..4d7ec7e7a9 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -14,7 +14,7 @@ #include "string-convert.hh" #include "assoc-iter.hh" -/// indent of each level +/// indent of each level const INDTAB = 2; /* @@ -26,7 +26,7 @@ strip_pretty (String pretty_str) int i = pretty_str.index_i ('('); if (i>=0) pretty_str = pretty_str.left_str (i); - + int l = pretty_str.index_last_i (' '); // strip until last ' ' if (l>=0) pretty_str = pretty_str.nomid_str (0,l+1); @@ -47,21 +47,21 @@ Dstream::identify_as (String name) { if (!os_l_) return *this; - + String mem (strip_pretty (name)); String cl (strip_member (mem)); String idx = cl; - + if (silent_assoc_p_->elt_b (mem)) idx = mem; else if (silent_assoc_p_->elt_b (cl)) idx = cl; - else + else { (*silent_assoc_p_)[idx] = false; } local_silence_b_ = (*silent_assoc_p_)[idx]; - if (current_classname_str_ != idx && !local_silence_b_) + if (current_classname_str_ != idx && !local_silence_b_) { current_classname_str_=idx; if (!(*silent_assoc_p_)["Dstream"]) @@ -104,33 +104,33 @@ Dstream::output (String s) { if (local_silence_b_|| !os_l_) return ; - + for (char const *cp = s.ch_C (); *cp; cp++) - switch (*cp) + switch (*cp) { case '{': case '[': case '(': indent_level_i_ += INDTAB; - *os_l_ << *cp; + *os_l_ << *cp; break; - + case ')': case ']': case '}': indent_level_i_ -= INDTAB; *os_l_ << *cp ; - + assert (indent_level_i_>=0) ; break; - + case '\n': *os_l_ << '\n' << String (' ', indent_level_i_) << flush; - break; + break; default: *os_l_ << *cp; break; } - return ; + return ; } @@ -141,7 +141,7 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) indent_level_i_ = 0; if (!os_l_) return; - + char const * fn =cfg_nm ? cfg_nm : ".dstreamrc"; { ifstream ifs (fn); // can't open @@ -150,11 +150,11 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) } Text_db cfg (fn); - while (! cfg.eof()){ + while (! cfg.eof()){ Text_record r (cfg++); - if (r.size() != 2) + if (r.size() != 2) { - r.message ("not enough fields in Dstream init."); + r.message (_("not enough fields in Dstream init.")); continue; } (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1])); @@ -164,15 +164,15 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) Dstream::~Dstream() -{ +{ delete silent_assoc_p_; assert (!indent_level_i_) ; } void -Dstream::clear_silence() +Dstream::clear_silence() { - for (Assoc_iter i (*silent_assoc_p_); i.ok(); i++) + for (Assoc_iter i (*silent_assoc_p_); i.ok(); i++) { i.val() = false; } diff --git a/flower/flower-debug.cc b/flower/flower-debug.cc index 86a9abb9f0..5728b8a95c 100644 --- a/flower/flower-debug.cc +++ b/flower/flower-debug.cc @@ -14,10 +14,9 @@ void set_flower_debug (Dstream&ds, bool b) { #ifdef NPRINT if (b) - cout << "Debug printout disabled, see the installation guide." << endl; + cout << _("Debug printout disabled, see the installation guide.") << endl; #endif - + flower_check_debug = b; flower_dstream = &ds; } - diff --git a/flower/include/international.hh b/flower/include/international.hh new file mode 100644 index 0000000000..b14cc3bfaf --- /dev/null +++ b/flower/include/international.hh @@ -0,0 +1,16 @@ +/* + international.hh -- declare stuff for internationalization + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys + + */ + +#ifndef INTERNATIONAL_HH +#define INTERNATIONAL_HH + +#define _(str) str + +#endif /* INTERNATIONAL_HH */ + diff --git a/flower/include/string.hh b/flower/include/string.hh index 69226f075b..91342a1de3 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -17,6 +17,13 @@ #include "string-handle.hh" +/** + technically incorrect, but lets keep it here: this is a + catch all place for this stuff. + */ + +#include "international.hh" + /** Intuitive string class. provides diff --git a/flower/lgetopt.cc b/flower/lgetopt.cc index 8e9fd408dd..5aabe5f682 100644 --- a/flower/lgetopt.cc +++ b/flower/lgetopt.cc @@ -3,19 +3,21 @@ this is (Copyleft) 1996, Han-Wen Nienhuys, */ + #include #include #include #include "lgetopt.hh" +#include "international.hh" long Getopt_long::argument_to_i() { long l; - if (!optional_argument_ch_C_ + if (!optional_argument_ch_C_ || sscanf (optional_argument_ch_C_, "%ld", &l) != 1) report (E_ILLEGALARG); - + return l; } @@ -24,23 +26,23 @@ Getopt_long::parselong() { char const *optnm = arg_value_ch_a_a_[array_index_i_] + 2 ; assert (*optnm); - + char const *endopt = strchr (optnm, '='); int searchlen = (endopt) ? endopt - optnm : strlen (optnm); - + found_option_l_=0; - for (int i=0; i< table_len_i_; i++) + for (int i=0; i< table_len_i_; i++) { char const *ln = option_a_[i].longname; - if (ln && !strncmp (ln, optnm, searchlen)) + if (ln && !strncmp (ln, optnm, searchlen)) { found_option_l_ = option_a_+i; break; } - } + } - if (!found_option_l_) + if (!found_option_l_) { report (E_UNKNOWNOPTION); return 0; @@ -48,12 +50,12 @@ Getopt_long::parselong() array_index_i_++; argument_index_i_ = 0; - - if (found_option_l_->take_arg) + + if (found_option_l_->take_arg) { if (endopt) optional_argument_ch_C_ = endopt +1; // a '=' - else + else { optional_argument_ch_C_ = arg_value_ch_a_a_[array_index_i_]; array_index_i_++; @@ -62,13 +64,13 @@ Getopt_long::parselong() report (E_ARGEXPECT); } - else + else { optional_argument_ch_C_ = 0; if (endopt) report (E_NOARGEXPECT); } - + return found_option_l_; } @@ -76,11 +78,11 @@ Getopt_long::parselong() void Long_option_init::printon (ostream &errorout) const { - if (shortname) + if (shortname) errorout <<"-" << shortname; if (shortname && longname) errorout << ", "; - if (longname) + if (longname) errorout << "`--" << longname << "'"; } @@ -93,20 +95,20 @@ Getopt_long::report (Errorcod c) return; *error_ostream_l_ << arg_value_ch_a_a_[0] << ": "; - switch (c) + switch (c) { case E_ARGEXPECT: - *error_ostream_l_<< "option "; + *error_ostream_l_<< _("option "); found_option_l_->printon (*error_ostream_l_); - *error_ostream_l_ << "requires an argument"<longname << "' does not allow an argument"<longname << _("' does not allow an argument")<printon (*error_ostream_l_); *error_ostream_l_ << '\n'; default: assert (false); } - exit (2); + exit (2); } - + const Long_option_init * Getopt_long::parseshort() { char c=arg_value_ch_a_a_[array_index_i_][argument_index_i_]; found_option_l_=0; assert (c); - + for (int i=0; i < table_len_i_; i++) - if (option_a_[i].shortname == c) + if (option_a_[i].shortname == c) { found_option_l_ = option_a_+i; break; @@ -153,35 +155,35 @@ Getopt_long::parseshort() array_index_i_ ++; argument_index_i_ = 0; - - if (!optional_argument_ch_C_[0]) + + if (!optional_argument_ch_C_[0]) { optional_argument_ch_C_ = arg_value_ch_a_a_[array_index_i_]; array_index_i_ ++; } - if (!optional_argument_ch_C_) + if (!optional_argument_ch_C_) { report (E_ARGEXPECT); } - + return found_option_l_; } const Long_option_init * -Getopt_long::operator()() +Getopt_long::operator()() { if (!ok()) return 0; - + next(); if (!ok ()) return 0; - + if (argument_index_i_) return parseshort(); - + const char * argument_C = arg_value_ch_a_a_[array_index_i_]; - + if (argument_C[0] != '-') return 0; @@ -191,14 +193,14 @@ Getopt_long::operator()() else return 0; } - else + else { - if (argument_C[ 1 ]) + if (argument_C[ 1 ]) { argument_index_i_ = 1; return parseshort(); } - else + else { return 0; } @@ -231,13 +233,13 @@ Getopt_long::next() { error_ = E_NOERROR; while (array_index_i_ < argument_count_i_ - && !arg_value_ch_a_a_[array_index_i_][argument_index_i_]) + && !arg_value_ch_a_a_[array_index_i_][argument_index_i_]) { array_index_i_++; argument_index_i_ = 0; } } - + char const * Getopt_long::current_arg() { @@ -251,7 +253,7 @@ char const * Getopt_long::get_next_arg() { char const * a = current_arg(); - if (a) + if (a) { array_index_i_ ++; argument_index_i_= 0; diff --git a/flower/path.cc b/flower/path.cc index 6625864f6e..b69d85d77a 100644 --- a/flower/path.cc +++ b/flower/path.cc @@ -14,42 +14,42 @@ @return 4 components of the path. They can be empty */ void -split_path (String path, +split_path (String path, String &drive, String &dirs, String &filebase, String &extension) { // peel off components, one by one. int di = path.index_i (':'); - if (di >= 0) + if (di >= 0) { drive = path.left_str (di + 1); path = path.right_str (path.len() - di -1); } else drive = ""; - + di = path.index_last_i (PATHSEP); - if (di >=0) + if (di >=0) { dirs = path.left_str (di + 1); path = path.right_str (path.len()-di -1); } else dirs = ""; - + di = path.index_last_i ('.'); - if (di >= 0) + if (di >= 0) { filebase = path.left_str (di); - extension =path.right_str (path.len()-di); + extension =path.right_str (path.len()-di); } - else + else { - extension = ""; + extension = ""; filebase = path; } } -/** find a file. +/** find a file. It will search in the current dir, in the construction-arg, and in any other added path, in this order. */ @@ -57,23 +57,23 @@ String File_path::find (String nm) const { - fdebug << "looking for " << nm << ": "; + fdebug << _("looking for ") << nm << ": "; if (!nm.length_i() || (nm == "-") ) return nm; - for (int i=0; i < size(); i++) + for (int i=0; i < size(); i++) { String path = elem(i); if (path.length_i() ) path += "/"; - + path += nm; fdebug << path << "? "; FILE *f = fopen (path.ch_C(), "r"); // ugh! - if (f) + if (f) { - fdebug << "found\n"; + fdebug << _("found\n"); fclose (f); return path; } diff --git a/flower/text-stream.cc b/flower/text-stream.cc index f9a8307226..01d2e8ef5c 100644 --- a/flower/text-stream.cc +++ b/flower/text-stream.cc @@ -3,21 +3,21 @@ Text_stream::Text_stream (String fn) { ios::sync_with_stdio(); - if (fn == "") + if (fn == "") { - name = ""; + name = _(""); f = stdin; } - - else + + else { - name = fn; + name = fn; f = fopen (fn.ch_C (), "r"); } - - if (!f) + + if (!f) { - cerr <<__FUNCTION__<< ": can't open `" << fn << "'\n"; + cerr <<__FUNCTION__<< _(": can't open `") << fn << "'\n"; exit (1); } @@ -29,4 +29,3 @@ Text_stream::message (String s) { cerr << "\n"< \stemboth - c8_. c''8-> c16^^ c16_^ - c32 _| c32^| g''32-\ltoe g''32-\lheel + e8_. g'8-> e16^^ g'16_^ + e32 _| g'32^| g''32-\ltoe g''32-\lheel } \paper{ gourlay_maxmeasures =5.; @@ -42,6 +42,6 @@ TestedFeatures = "This file tests the Feta music-font" \output "lelie20.tex"; } % oeps - \midi{ } +% \midi{ } } diff --git a/lib/includable-lexer.cc b/lib/includable-lexer.cc index fbb5c920d2..ca103a9c9e 100644 --- a/lib/includable-lexer.cc +++ b/lib/includable-lexer.cc @@ -24,28 +24,28 @@ void Includable_lexer::new_input(String s, Sources * global_sources) { Source_file * sl = global_sources->get_file_l(s); - if (!sl) + if (!sl) { - String msg ="Can't find file `" + s+ "'"; + String msg =_("Can't find file `") + s+ "'"; LexerError(msg.ch_C ()); - return; + return; } - + char_count_stack_.push(0); - if (yy_current_buffer) + if (yy_current_buffer) state_stack_.push(yy_current_buffer); cout << "[" << s<istream_l(), YY_BUF_SIZE)); + yy_switch_to_buffer(yy_create_buffer(sl->istream_l(), YY_BUF_SIZE)); } /** pop the inputstack. conceptually this is a destructor, but it @@ -58,11 +58,11 @@ Includable_lexer::close_input() cout << "]"<error_str(defined_ch_C_); @@ -57,19 +57,19 @@ Input::message(String message_str) const void Input::warning(String message_str) const { - message("warning: " + message_str); + message(_("warning: ") + message_str); } void Input::error(String s) const { - message("error: "+ s); + message(_("error: ")+ s); } String Input::location_str() const { - if (source_file_l_) + if (source_file_l_) return source_file_l_->file_line_no_str(defined_ch_C_); else - return "(location unknown)"; + return _("(location unknown)"); } diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc index d260569570..ad39630b37 100644 --- a/lib/mapped-file-storage.cc +++ b/lib/mapped-file-storage.cc @@ -10,7 +10,7 @@ #include // open #include // mmap #include // INT_MAX -#include // open +#include // open #include // close, stat #include // fdopen #include // strerror @@ -46,18 +46,18 @@ Mapped_file_storage::map() data_caddr_ = (caddr_t)mmap((void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_i_, 0); if ((int)data_caddr_ == -1) - warning(String("can't map: error no: ") + strerror(errno)); + warning(String(_("can't map: error no: ")) + strerror(errno)); } void Mapped_file_storage::open(String name_str) { - fildes_i_ = ::open(name_str.ch_C (), O_RDONLY); - - if (fildes_i_ == -1) + fildes_i_ = ::open(name_str.ch_C (), O_RDONLY); + + if (fildes_i_ == -1) { - warning(String("can't open: ") + name_str + String(": ") + strerror(errno)); + warning(String(_("can't open: ")) + name_str + String(": ") + strerror(errno)); return; } @@ -70,7 +70,7 @@ Mapped_file_storage::open(String name_str) void Mapped_file_storage::unmap() { - if (data_caddr_) + if (data_caddr_) { munmap(data_caddr_, size_off_); data_caddr_ = 0; @@ -82,7 +82,7 @@ void Mapped_file_storage::close() { unmap(); - if (fildes_i_) + if (fildes_i_) { ::close(fildes_i_); fildes_i_ = 0; diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index 3ef231a3e4..e09bb1699a 100644 --- a/lib/simple-file-storage.cc +++ b/lib/simple-file-storage.cc @@ -16,13 +16,13 @@ /** Stupid but foolproof way of opening files. - TODO + TODO Should check IO status This is of course a build it yourself version of mmap, so we should have been using that... (see Mapped_file_storage) But we noticed some problems with this (unexplained lexer crashes) - + [Some versions later] The crashes aren't caused by the mmap code. But no reason to take it out, is there? */ @@ -31,14 +31,14 @@ Simple_file_storage::Simple_file_storage(String s) data_p_ =0; /* - let's hope that "b" opens anything binary, and does not apply + let's hope that "b" opens anything binary, and does not apply CR/LF translation */ FILE * f = (s.length_i ()) ? fopen (s.ch_C(), "rb") : stdin; - - if (!f) + + if (!f) { - warning("can't open file `" + s + "'"); + warning(_("can't open file `") + s + "'"); return ; } @@ -49,10 +49,10 @@ Simple_file_storage::Simple_file_storage(String s) data_p_[len_i_] = 0; ret = fread(data_p_, sizeof(char), len_i_, f); - + if (ret!=len_i_) - warning ("Huh? got " + String(ret) + ", expected " - + String(len_i_) + " characters"); + warning (_("Huh? got ") + String(ret) + _(", expected ") + + String(len_i_) + _(" characters")); if (f != stdin) fclose(f); @@ -69,7 +69,7 @@ Simple_file_storage::length_i() const { return len_i_; } - + Simple_file_storage::~Simple_file_storage() { diff --git a/lib/source-file.cc b/lib/source-file.cc index dc6c092519..8ad4784259 100644 --- a/lib/source-file.cc +++ b/lib/source-file.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997 Jan Nieuwenhuizen & Han-Wen Nienhuys */ @@ -33,12 +33,12 @@ Source_file::istream_l() if (!name_str_.length_i()) return &cin; */ - - if (!istream_p_) + + if (!istream_p_) { if (length_i()) // can-t this be done without such a hack? istream_p_ = new istrstream(ch_C(), length_i()); - else + else { istream_p_ = new istrstream("", 0); istream_p_->set(ios::eofbit); @@ -51,7 +51,7 @@ String Source_file::file_line_no_str(char const *context_ch_C) const { if (!ch_C()) - return "(unknown)"; + return _("(unknown)"); else return name_str() + ": " + String(line_i(context_ch_C)); @@ -76,14 +76,14 @@ Source_file::error_str(char const* pos_ch_C) const char const* data_ch_C = ch_C(); char const * eof_C_ = data_ch_C + length_i(); if (!in_b(pos_ch_C)) - return "(position unknown)"; + return _("(position unknown)"); + - if (pos_ch_C == eof_C_) pos_ch_C --; char const* begin_ch_C = pos_ch_C; while (begin_ch_C > data_ch_C) - if (*--begin_ch_C == '\n') + if (*--begin_ch_C == '\n') { begin_ch_C++; break; @@ -91,12 +91,12 @@ Source_file::error_str(char const* pos_ch_C) const char const* end_ch_C = pos_ch_C; while (end_ch_C < eof_C_) - if (*end_ch_C++ == '\n') + if (*end_ch_C++ == '\n') { end_ch_C--; break; } - + // String(char const* p, int length) is missing!? String line_str((Byte const*)begin_ch_C, end_ch_C - begin_ch_C); @@ -108,9 +108,9 @@ Source_file::error_str(char const* pos_ch_C) const else error_col_i++; - String str = line_str.left_str(pos_ch_C - begin_ch_C) + String str = line_str.left_str(pos_ch_C - begin_ch_C) + String('\n') - + String(' ', error_col_i) + + String(' ', error_col_i) + line_str.mid_str(pos_ch_C - begin_ch_C, INT_MAX); // String::mid should take 0 arg.. return str; } @@ -132,7 +132,7 @@ Source_file::line_i(char const* pos_ch_C) const char const* scan_ch_C = ch_C(); if (!scan_ch_C) return 0; - + while (scan_ch_C < pos_ch_C) if (*scan_ch_C++ == '\n') i++; diff --git a/lib/warn.cc b/lib/warn.cc index 9fdf7219a1..ade821a64f 100644 --- a/lib/warn.cc +++ b/lib/warn.cc @@ -4,8 +4,8 @@ void error(String s) { - cerr << "error: " << s << "\n"; - + cerr << _("error: ") << s << "\n"; + exit(1); } @@ -13,7 +13,7 @@ error(String s) void warning(String m) { - cerr << "warning: " <musical (); if (!mus_l) return false; - + Abbreviation_beam_req * b = mus_l->abbrev_beam (); if (!b) return false; - + if (bool (abeam_p_) == bool (b->spantype == Span_req::START)) return false; - + Direction d = (!abeam_p_) ? LEFT : RIGHT; if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (mus_l)) return false; - + span_reqs_drul_[d] = b; return true; } @@ -71,9 +71,9 @@ Abbreviation_beam_engraver::do_pre_move_processing () void Abbreviation_beam_engraver::do_removal_processing () { - if (abeam_p_) + if (abeam_p_) { - span_reqs_drul_[LEFT]->warning ("unterminated beam"); + span_reqs_drul_[LEFT]->warning (_("unterminated beam")); typeset_element (abeam_p_); abeam_p_ = 0; } @@ -86,7 +86,7 @@ Abbreviation_beam_engraver::acknowledge_element (Score_elem_info i) return; Stem* s = (Stem*)i.elem_l_->item (); - + int type_i = span_reqs_drul_[LEFT]->type_i_; s->flag_i_ = intlog2 (type_i) - 2; if (span_reqs_drul_[RIGHT]) @@ -96,6 +96,6 @@ Abbreviation_beam_engraver::acknowledge_element (Score_elem_info i) if (s->type_i () != 1) // no abbrev gaps on half note s->beam_gap_i_ = s->flag_i_ - ((s->type_i () >? 2) - 2); - + abeam_p_->add (s); -} +} diff --git a/lily/atom.cc b/lily/atom.cc index 870c6bece9..090cad2b19 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -17,8 +17,8 @@ void Atom::print() const { #ifndef NPRINT - DOUT << "texstring: " <= 100 CM) { - warning ("ridiculous dimension " + axis_name_str (ax) + ", " + warning (_("ridiculous dimension ") + axis_name_str (ax) + ", " +print_dimen(off[ax])); off[ax] = 0.0; - tex_str += "\errormark"; + tex_str += "\errormark"; } } // whugh.. Hard coded... @@ -85,7 +85,7 @@ Atom::TeX_string() const void Atom::translate_axis (Real r, Axis a) { - off_[a] += r; + off_[a] += r; } void diff --git a/lily/beam-grav.cc b/lily/beam-grav.cc index 68d798ae25..6df1fc6e7f 100644 --- a/lily/beam-grav.cc +++ b/lily/beam-grav.cc @@ -28,19 +28,19 @@ Beam_engraver::do_try_request(Request*r) Musical_req* mus_l = r->musical(); if (!mus_l) return false; - + Beam_req * b = mus_l->beam(); if (!b) return false; - + if (bool (beam_p_) == bool (b->spantype == Span_req::START)) return false; - + Direction d = (!beam_p_) ? LEFT : RIGHT; if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (mus_l)) return false; - + span_reqs_drul_[d] = b; return true; } @@ -51,7 +51,7 @@ Beam_engraver::do_process_requests() if ( !beam_p_ && span_reqs_drul_[LEFT]) { current_grouping_p_ = new Rhythmic_grouping; beam_p_ = new Beam; - if (span_reqs_drul_[LEFT]->nplet) + if (span_reqs_drul_[LEFT]->nplet) { Text_spanner* t = new Text_spanner(); Text_def *defp = new Text_def; @@ -88,9 +88,9 @@ Beam_engraver::do_pre_move_processing() void Beam_engraver::do_removal_processing() { - if (beam_p_) + if (beam_p_) { - span_reqs_drul_[LEFT]->warning ("unterminated beam"); + span_reqs_drul_[LEFT]->warning (_("unterminated beam")); typeset_element (beam_p_); beam_p_ =0; } @@ -105,12 +105,12 @@ Beam_engraver::acknowledge_element (Score_elem_info i) Stem* s = (Stem*)i.elem_l_->item(); Rhythmic_req *rhythmic_req = i.req_l_->musical ()->rhythmic (); - if (rhythmic_req->duration_.durlog_i_<= 2) + if (rhythmic_req->duration_.durlog_i_<= 2) { - rhythmic_req->warning ("Stem doesn't fit in Beam"); + rhythmic_req->warning (_("Stem doesn't fit in Beam")); return; } - + /* TODO: do something sensible if it doesn't fit in the beam. */ @@ -118,7 +118,7 @@ Beam_engraver::acknowledge_element (Score_elem_info i) rhythmic_req->duration ()); s->flag_i_ = rhythmic_req->duration_.durlog_i_; beam_p_->add (s); -} - +} + IMPLEMENT_IS_TYPE_B1(Beam_engraver, Engraver); ADD_THIS_TRANSLATOR(Beam_engraver); diff --git a/lily/beam.cc b/lily/beam.cc index b1dae43061..ea102e4457 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -8,7 +8,7 @@ TODO Less hairy code. knee: ([\stem 1; c8 \stem -1; c8] - + */ #include @@ -53,14 +53,14 @@ Beam::add (Stem*s) } Molecule* -Beam::brew_molecule_p() const +Beam::brew_molecule_p() const { Molecule *mol_p = new Molecule; // huh? inter-what // Real inter_f = paper()->interbeam_f (); Real inter_f = paper()->internote_f (); Real x0 = stems[0]->hpos_f(); - for (int j=0; j 0)? stems[j-1] : 0; @@ -101,20 +101,20 @@ Beam::do_print() const void Beam::do_post_processing() { - if (stems.size() < 2) + if (stems.size() < 2) { - warning ("Beam with less than 2 stems"); + warning (_("Beam with less than 2 stems")); transparent_b_ = true; return ; } - solve_slope(); + solve_slope(); set_stemlens(); } void Beam::do_substitute_dependent (Score_elem*o,Score_elem*n) { - if (o->is_type_b (Stem::static_name())) + if (o->is_type_b (Stem::static_name())) stems.substitute ((Stem*)o->item(), n?(Stem*) n->item ():0); } @@ -131,17 +131,17 @@ Beam::set_default_dir() int up = 0, down = 0; int up_count = 0, down_count = 0; - for (int i=0; i get_center_distance_from_top(); int cur_up = sl->get_center_distance_from_bottom(); - if (cur_down) + if (cur_down) { down += cur_down; down_count++; } - if (cur_up) + if (cur_up) { up += cur_up; up_count++; @@ -156,7 +156,7 @@ Beam::set_default_dir() // up / up_count > down / down_count dir_ = (up * down_count > down * up_count) ? UP : DOWN; - for (int i=0; i dir_ = dir_; @@ -175,30 +175,30 @@ void Beam::solve_slope() { Array sinfo; - for (int j=0; j set_default_extents(); if (i->invisible_b()) continue; - + Stem_info info (i); sinfo.push (info); } if (! sinfo.size()) slope = left_pos = 0; - else if (sinfo.size() == 1) + else if (sinfo.size() == 1) { slope = 0; left_pos = sinfo[0].idealy_f_; } - else + else { - + Real leftx = sinfo[0].x; Least_squares l; - for (int i=0; i < sinfo.size(); i++) + for (int i=0; i < sinfo.size(); i++) { sinfo[i].x -= leftx; l.input.push (Offset (sinfo[i].x, sinfo[i].idealy_f_)); @@ -206,18 +206,18 @@ Beam::solve_slope() l.minimise (slope, left_pos); } - + Real dy = 0.0; - for (int i=0; i < sinfo.size(); i++) + for (int i=0; i < sinfo.size(); i++) { Real y = sinfo[i].x * slope + left_pos; Real my = sinfo[i].miny_f_; if (my - y > dy) - dy = my -y; + dy = my -y; } left_pos += dy; - left_pos *= dir_; + left_pos *= dir_; slope *= dir_; @@ -225,7 +225,7 @@ Beam::solve_slope() This neat trick is by Werner Lemberg, damped = tanh (slope) corresponds with some tables in [Wanske] */ - slope = 0.6 * tanh (slope); + slope = 0.6 * tanh (slope); // ugh Real sl = slope*paper()->internote_f (); @@ -236,13 +236,13 @@ Beam::solve_slope() void Beam::set_stemlens() { - Real x0 = stems[0]->hpos_f(); - for (int j=0; j hpos_f(); + for (int j=0; j hpos_f()-x0; - s->set_stemend (left_pos + slope * x); + s->set_stemend (left_pos + slope * x); } } @@ -252,13 +252,13 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) def.OK(); cur.OK(); assert (cur.children.size() == stems.size ()); - + cur.split (def); Array b; { Array flags; - for (int j=0; j beams_left_i_ = b[i]; @@ -299,7 +299,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const Molecule rightbeams; /* half beams extending to the left. */ - if (prev) + if (prev) { int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ; int lwholebeams= here->beams_left_i_ beams_right_i_ ; @@ -308,18 +308,18 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const if (lhalfs) // generates warnings if not a = paper()->lookup_l ()->beam (sl, w); a.translate (Offset (-w, -w * sl)); - for (int j = 0; j < lhalfs; j++) + for (int j = 0; j < lhalfs; j++) { Atom b (a); b.translate_axis (-dir_ * dy * (lwholebeams+j), Y_AXIS); leftbeams.add (b); } } - + if (next) { int rhalfs = here->beams_right_i_ - next->beams_left_i_; - int rwholebeams = here->beams_right_i_ beams_left_i_; + int rwholebeams = here->beams_right_i_ beams_left_i_; Real w = next->hpos_f() - here->hpos_f (); Atom a = paper()->lookup_l ()->beam (sl, w + stemdx); @@ -329,11 +329,11 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const if (here->beam_gap_i_) { int nogap = rwholebeams - here->beam_gap_i_; - for (; j < nogap; j++) + for (; j < nogap; j++) { Atom b (a); b.translate_axis (-dir_ * dy * j, Y_AXIS); - rightbeams.add (b); + rightbeams.add (b); } // TODO: notehead widths differ for different types gap_f = paper()->note_width () / 2; @@ -341,24 +341,24 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const a = paper()->lookup_l ()->beam (sl, w + stemdx); } - for (; j < rwholebeams; j++) + for (; j < rwholebeams; j++) { Atom b (a); b.translate (Offset (gap_f, -dir_ * dy * j)); - rightbeams.add (b); + rightbeams.add (b); } w /= 4; if (rhalfs) a = paper()->lookup_l ()->beam (sl, w); - - for (; j < rwholebeams + rhalfs; j++) + + for (; j < rwholebeams + rhalfs; j++) { Atom b (a); b.translate_axis (-dir_ * dy * j, Y_AXIS); - rightbeams.add (b); + rightbeams.add (b); } - + } leftbeams.add (rightbeams); return leftbeams; diff --git a/lily/break.cc b/lily/break.cc index 5ee9de0a0b..8b6241732b 100644 --- a/lily/break.cc +++ b/lily/break.cc @@ -17,12 +17,12 @@ #include "cpu-timer.hh" String -Col_stats::str() const { +Col_stats::str() const { String s (count_i_); - s += " lines"; + s += _(" lines"); if (count_i_) - s += String (Real (cols_i_)/count_i_, ", (with an average of %.1f columns)"); - + s += String (Real (cols_i_)/count_i_, _(", (with an average of %.1f columns)")); + return s; } @@ -46,25 +46,25 @@ Line_of_cols Break_algorithm::all_cols() const { Line_of_cols retval; - for (PCursor c (pscore_l_->col_p_list_.top()); - c.ok(); c++) + for (PCursor c (pscore_l_->col_p_list_.top()); + c.ok(); c++) { - + retval.push (c); } return retval; } -Array +Array Break_algorithm::find_break_indices() const { Line_of_cols all (all_cols()); Array retval; - + for (int i=0; i < all.size(); i++) if (all[i]->breakable_b_) retval.push (i); - + if (linelength <=0) while (retval.size() >2) retval.del (1); @@ -78,7 +78,7 @@ Break_algorithm::find_breaks() const { Line_of_cols all (all_cols()); Line_of_cols retval; - + for (int i=0; i < all.size(); i++) if (all[i]->breakable_b_) retval.push (all[i]); @@ -93,7 +93,7 @@ Break_algorithm::find_breaks() const - + Line_spacer* Break_algorithm::generate_spacing_problem (Line_of_cols curline) const @@ -134,18 +134,18 @@ Break_algorithm::feasible (Line_of_cols curline) const { if (linelength <= 0) return true; - + Real l =0; for (int i=0; i < curline.size(); i++) l +=curline[i]->width().length (); - return l < linelength; + return l < linelength; } void Break_algorithm::problem_OK() const { if (!pscore_l_->col_p_list_.size()) - error ("Score does not have any columns"); + error (_("Score does not have any columns")); OK(); } @@ -155,8 +155,8 @@ Break_algorithm::OK() const #ifndef NDEBUG iter_top (pscore_l_->col_p_list_,start); PCursor end (pscore_l_->col_p_list_.bottom()); - - assert (start->breakable_b_); + + assert (start->breakable_b_); assert (end->breakable_b_); #endif } @@ -167,19 +167,18 @@ Break_algorithm::solve() const Cpu_timer timer; Array h= do_solve(); - + if (approx_stats_.count_i_) - *mlog << "\nApproximated: " << approx_stats_.str() << "\n"; + *mlog << _("\nApproximated: ") << approx_stats_.str() << "\n"; if (exact_stats_.count_i_) - *mlog << "Calculated exactly: " << exact_stats_.str() << "\n"; - *mlog << "Time: " << String(timer.read (), "%.2f") << " seconds\n"; - + *mlog << _("Calculated exactly: ") << exact_stats_.str() << "\n"; + *mlog << _("Time: ") << String(timer.read (), "%.2f") << _(" seconds\n"); + return h; } void Break_algorithm::do_set_pscore() { - -} +} diff --git a/lily/clef-grav.cc b/lily/clef-grav.cc index a8837f2cc1..cf63067597 100644 --- a/lily/clef-grav.cc +++ b/lily/clef-grav.cc @@ -26,25 +26,25 @@ bool Clef_engraver::set_type (String s) { clef_type_str_ = s; - if (clef_type_str_ == "violin") + if (clef_type_str_ == "violin") { c0_position_i_= -6; } - else if (clef_type_str_ == "alto") + else if (clef_type_str_ == "alto") { c0_position_i_= 0; } - else if (clef_type_str_ == "tenor") + else if (clef_type_str_ == "tenor") { c0_position_i_= 2; } - else if (clef_type_str_ == "bass") + else if (clef_type_str_ == "bass") { c0_position_i_= 6; } - else + else return false; - + return true; } @@ -54,16 +54,16 @@ Clef_engraver::fill_staff_info (Staff_info &i) i.c0_position_i_l_ = &c0_position_i_; } -void +void Clef_engraver::read_req (Clef_change_req*c_l) { if (!set_type (c_l->clef_str_)) - c_l->error ("unknown clef type "); + c_l->error (_("unknown clef type ")); } void Clef_engraver::acknowledge_element (Score_elem_info info) { - if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i()) + if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i()) { create_clef(); if (!clef_req_l_) @@ -89,15 +89,15 @@ Clef_engraver::do_try_request (Request * r_l) if (!creq_l || !creq_l->clefchange()) return false; - clef_req_l_ = creq_l->clefchange(); - read_req (clef_req_l_); + clef_req_l_ = creq_l->clefchange(); + read_req (clef_req_l_); return true; } -void +void Clef_engraver::create_clef() { - if (!clef_p_) + if (!clef_p_) { clef_p_ = new Clef_item; announce_element (Score_elem_info (clef_p_,clef_req_l_)); @@ -108,7 +108,7 @@ Clef_engraver::create_clef() void Clef_engraver::do_process_requests() { - if (clef_req_l_) + if (clef_req_l_) { create_clef(); clef_p_->default_b_ = false; diff --git a/lily/collision.cc b/lily/collision.cc index 9d9cf84e58..17c57cf338 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -25,20 +25,20 @@ Collision::add (Note_column* ncol_l) /** should derive of Array. */ -static +static int idx (int dir, bool h_shift_b) { assert (abs (dir) == 1); int j = dir > 0 ? 0 : 3; - if (h_shift_b) + if (h_shift_b) j += dir; return j; } /** This complicated routine moves note columns around horizontally - (and rests vertically) to ensure that notes don't clash. + (and rests vertically) to ensure that notes don't clash. - This should be done better, probably. + This should be done better, probably. This routine is dedicated to Stine Randmael :-) @@ -48,36 +48,36 @@ Collision::do_pre_processing() { if (clash_l_arr_.size() <= 1) return; - + /* [stem up, stem up shifted, stem down shifted, stem down] */ Array clash_group_arr_a[4]; - - for (int i=0; i < clash_l_arr_.size(); i++) + + for (int i=0; i < clash_l_arr_.size(); i++) { Note_column* c_l = clash_l_arr_[i]; - if (! c_l->dir_) + if (! c_l->dir_) { - warning ("No stem direction set. Ignoring column in clash. "); + warning (_("No stem direction set. Ignoring column in clash. ")); continue; } int d = (c_l->dir_); - + clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l); } - - - for (int j=0; j < 4; j++) + + + for (int j=0; j < 4; j++) { - if (clash_group_arr_a[j].size() > 1) + if (clash_group_arr_a[j].size() > 1) { - warning ("Too many clashing notecolumns. Ignoring them."); + warning (_("Too many clashing notecolumns. Ignoring them.")); return; } } int d = 1; - do + do { if (!clash_group_arr_a[idx (d, false)].size()) { @@ -86,21 +86,21 @@ Collision::do_pre_processing() } } while ((d *= -1) != 1); - + Interval_t y_extent[4]; Note_column * col_l_a[4]; Real x_off [4]; int y_off[4]; - - for (int j =0 ; j < 4; j++) + + for (int j =0 ; j < 4; j++) { - if (clash_group_arr_a[j].size()) + if (clash_group_arr_a[j].size()) col_l_a[j] = clash_group_arr_a[j][0]; else col_l_a[j] = 0; - - if (col_l_a[j]) + + if (col_l_a[j]) { y_extent[j] = col_l_a[j]->head_positions_interval(); } @@ -109,16 +109,16 @@ Collision::do_pre_processing() x_off [j] = 0.0; y_off[j] = 0; } - - do + + do { x_off[idx (d, true)] = d*0.5; } while ((d *= -1) != 1); - + // y_extent: smallest y-pos noteball interval containing all balls - // 4 (0..3) groups: stem up/down; shift on/off; + // 4 (0..3) groups: stem up/down; shift on/off; Interval_t middle (y_extent[idx (-1,0)].max(), y_extent[idx (1,0)].min()); Interval_t open_middle (y_extent[idx (-1,0)].max()+1, y_extent[idx (1,0)].min ()-1); @@ -127,30 +127,30 @@ Collision::do_pre_processing() if (!open_middle.contains_b (y_extent[idx (d,true)])) x_off[idx (d, true)] = d *1.0 ; } while ((d *= -1) != 1); - - if (!middle.empty_b() - && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) { + + if (!middle.empty_b() + && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) { // reproduction of bugfix at 3am ? Note_head * nu_l= col_l_a[idx (1,0)]->head_l_arr_[0]; Note_head * nd_l = col_l_a[idx (-1,0)]->head_l_arr_.top(); - if (! (nu_l->balltype_i_ == nd_l->balltype_i_ - && nu_l->dots_i_ == nd_l->dots_i_ && middle.length() == 0)) + if (! (nu_l->balltype_i_ == nd_l->balltype_i_ + && nu_l->dots_i_ == nd_l->dots_i_ && middle.length() == 0)) { x_off[idx (1,0)] -= 0.5; x_off[idx (1,1)] -= 0.5; x_off[idx (-1,1)] += 0.5; x_off[idx (-1,0)] += 0.5; } - + } Real inter_f = paper()->internote_f (); Real wid_f = paper()->note_width (); - for (int j=0; j < 4; j++) + for (int j=0; j < 4; j++) { - if (col_l_a[j]) + if (col_l_a[j]) { - /* collision.cc:138: request for method `translate' is ambiguous - + /* collision.cc:138: request for method `translate' is ambiguous + (shaddup) */ Offset o (x_off[j] * wid_f, y_off[j] * inter_f); @@ -165,6 +165,6 @@ IMPLEMENT_IS_TYPE_B1(Collision, Item); void Collision::do_substitute_dependency (Score_elem*o_l,Score_elem*n_l) { - clash_l_arr_.substitute ((Note_column*)o_l->item(), + clash_l_arr_.substitute ((Note_column*)o_l->item(), (Note_column*)(n_l?n_l->item():0)); } diff --git a/lily/command-request.cc b/lily/command-request.cc index 0a655351fb..d6edd2cca0 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -32,7 +32,7 @@ bool Cadenza_req::do_equal_b (Request*r) const { Cadenza_req*cad = r->command()->timing ()->cadenza (); - + return cad->on_b_ == on_b_; } @@ -150,8 +150,8 @@ bool Meter_change_req::do_equal_b (Request * r) const { Meter_change_req * m = r->command()->timing ()->meterchange (); - - return m->beats_i_ == beats_i_ + + return m->beats_i_ == beats_i_ && one_beat_i_ == m->one_beat_i_; } @@ -186,7 +186,7 @@ bool Tempo_req::do_equal_b (Request *r) const { Tempo_req *t = r->command()->timing ()->tempo (); - + return t->dur_.length()== dur_.length () && metronome_i_ == t->metronome_i_; } @@ -198,14 +198,14 @@ IMPLEMENT_IS_TYPE_B1(Measure_grouping_req,Timing_req); void Measure_grouping_req::do_print() const { - for (int i=0; i < elt_length_arr_.size(); i++) + for (int i=0; i < elt_length_arr_.size(); i++) { DOUT << beat_i_arr_[i] <<"*" << elt_length_arr_[i]<<" "; } } -bool +bool Measure_grouping_req::do_equal_b (Request*) const { return false; // todo @@ -216,8 +216,8 @@ Measure_grouping_req::do_equal_b (Request*) const void Key_change_req::transpose (Melodic_req const & d) const { - WARN << "don't know how to transpose a key. \n"; - for (int i=0; i < melodic_p_arr_.size(); i++) + WARN << _("don't know how to transpose a key. \n"); + for (int i=0; i < melodic_p_arr_.size(); i++) { melodic_p_arr_[i]->transpose (d); } @@ -228,7 +228,7 @@ IMPLEMENT_IS_TYPE_B1(Key_change_req,Command_req); void Key_change_req::squash_octaves() { - for (int i=0; i < melodic_p_arr_.size(); i++) + for (int i=0; i < melodic_p_arr_.size(); i++) { melodic_p_arr_[i]->octave_i_ = 0; } @@ -238,7 +238,7 @@ void Key_change_req::do_print() const { #ifndef NPRINT - for (int i=0; i < melodic_p_arr_.size(); i++) + for (int i=0; i < melodic_p_arr_.size(); i++) { melodic_p_arr_[i]->print(); } @@ -253,7 +253,7 @@ Key_change_req::Key_change_req() Key_change_req::Key_change_req (Key_change_req const&c) { - for (int i=0; i < c.melodic_p_arr_.size(); i++) + for (int i=0; i < c.melodic_p_arr_.size(); i++) melodic_p_arr_.push (c.melodic_p_arr_[i]->clone()->musical ()->melodic ()); minor_b_ = c.minor_b_; multi_octave_b_ = c.multi_octave_b_; @@ -269,7 +269,7 @@ int Key_change_req::flats_i() { int flats_i = 0; - for (int i = 0; i < melodic_p_arr_.size(); i++) + for (int i = 0; i < melodic_p_arr_.size(); i++) { Melodic_req* mel_l = melodic_p_arr_[i]->melodic(); assert (mel_l); @@ -282,14 +282,14 @@ Key_change_req::flats_i() int Key_change_req::minor_b() { - return minor_b_; + return minor_b_; } int Key_change_req::sharps_i() { int sharps_i = 0; - for (int i = 0; i < melodic_p_arr_.size(); i++) + for (int i = 0; i < melodic_p_arr_.size(); i++) { Melodic_req* mel_l = melodic_p_arr_[i]->melodic(); assert (mel_l); @@ -298,4 +298,3 @@ Key_change_req::sharps_i() } return sharps_i; } - diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 1bd91d0f0c..acb8a5bdf3 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -31,20 +31,20 @@ static Real absdyn_dim = 10 PT; // ugh Atom Crescendo::get_symbol() const -{ +{ Real w_dim = width().length (); - if (dyn_b_drul_[LEFT]) + if (dyn_b_drul_[LEFT]) { w_dim -= absdyn_dim; } - if (dyn_b_drul_[RIGHT]) + if (dyn_b_drul_[RIGHT]) { w_dim -= absdyn_dim; } - - if (w_dim < 0) + + if (w_dim < 0) { - warning ("Crescendo too small"); + warning (_("Crescendo too small")); w_dim = 0; } @@ -58,7 +58,7 @@ Crescendo::brew_molecule_p() const Real x_off_dim=0.0; if (dyn_b_drul_[LEFT]) x_off_dim += absdyn_dim; - + m_p = new Molecule; Atom s (get_symbol()); m_p->add (Atom (s)); diff --git a/lily/debug.cc b/lily/debug.cc index 2141be63a4..d4082d494b 100644 --- a/lily/debug.cc +++ b/lily/debug.cc @@ -13,12 +13,12 @@ ostream * nulldev =0; // ugh struct _Dinit { - _Dinit() + _Dinit() { nulldev = new ofstream ("/dev/null"); monitor = new Dstream (&cout,".dstreamrc"); } - ~_Dinit() + ~_Dinit() { delete nulldev; delete monitor; @@ -39,7 +39,7 @@ mynewhandler() void float_handler (int) { - cerr << "Floating point exception .. \n"<< flush; + cerr << _("Floating point exception .. \n")<< flush; assert (false); } @@ -49,14 +49,14 @@ static void (*rat_printer)(Moment const&); void debug_init() { - rat_printer = print_rat; + rat_printer = print_rat; #ifndef NDEBUG set_new_handler (&mynewhandler); #endif set_flower_debug (*monitor, check_debug); - + signal (SIGFPE, float_handler); -} +} bool check_debug=false; @@ -66,5 +66,3 @@ set_debug (bool b) check_debug =b; set_flower_debug (*monitor, check_debug); } - - diff --git a/lily/dimen.cc b/lily/dimen.cc index 4665221692..5e85f4992d 100644 --- a/lily/dimen.cc +++ b/lily/dimen.cc @@ -13,7 +13,7 @@ parse_dimen (String dim) i--; } String unit (s + i+1); - return convert_dimen (dim.value_f(), unit); + return convert_dimen (dim.value_f(), unit); } @@ -28,7 +28,7 @@ convert_dimen (Real quant, String unit) return quant*CM_TO_PT/10; if (unit == "in") return quant * INCH_TO_PT; - error ("unknown length unit: `" + unit+"'"); + error (_("unknown length unit: `") + unit+"'"); } String diff --git a/lily/dynamic-grav.cc b/lily/dynamic-grav.cc index bd875bd839..7a62123f83 100644 --- a/lily/dynamic-grav.cc +++ b/lily/dynamic-grav.cc @@ -31,7 +31,7 @@ Dynamic_engraver::do_post_move_processing() dynamic_req_l_arr_.clear(); } -bool +bool Dynamic_engraver::do_try_request (Request * r) { Musical_req * m = r->musical(); @@ -43,41 +43,41 @@ Dynamic_engraver::do_try_request (Request * r) void Dynamic_engraver::do_process_requests() { - Crescendo* new_cresc_p=0; - for (int i=0; i < dynamic_req_l_arr_.size(); i++) + Crescendo* new_cresc_p=0; + for (int i=0; i < dynamic_req_l_arr_.size(); i++) { Dynamic_req *dreq_l = dynamic_req_l_arr_[i]; - if (dreq_l->absdynamic()) + if (dreq_l->absdynamic()) { Text_def * td_p = new Text_def; td_p->align_i_ = 0; - String loud = dreq_l->absdynamic()->loudness_str (); + String loud = dreq_l->absdynamic()->loudness_str (); td_p->text_str_ = paper()->lookup_l ()->dynamic (loud).tex_; td_p->style_str_ = "dynamic"; assert (!dynamic_p_) ; // TODO - + dynamic_p_ = new Text_item (td_p); announce_element (Score_elem_info (dynamic_p_, dreq_l)); } - else if (dreq_l->span_dynamic()) + else if (dreq_l->span_dynamic()) { Span_dynamic_req* span_l = dreq_l->span_dynamic(); - if (span_l->spantype == Span_req::STOP) + if (span_l->spantype == Span_req::STOP) { - if (!cresc_p_) + if (!cresc_p_) { - span_l->warning ("Can't find cresc to end "); + span_l->warning (_("Can't find cresc to end ")); } - else + else { assert (!to_end_cresc_p_); to_end_cresc_p_ =cresc_p_; cresc_p_ = 0; } } - else if (span_l->spantype == Span_req::START) + else if (span_l->spantype == Span_req::START) { cresc_req_l_ = span_l; assert (!new_cresc_p); @@ -88,11 +88,11 @@ Dynamic_engraver::do_process_requests() } } - if (new_cresc_p) + if (new_cresc_p) { cresc_p_ = new_cresc_p; cresc_p_->set_bounds(LEFT,get_staff_info().musical_l ()); - if (dynamic_p_) + if (dynamic_p_) { cresc_p_->dyn_b_drul_[LEFT] = true; } @@ -103,17 +103,17 @@ void Dynamic_engraver::do_pre_move_processing() { Staff_symbol* s_l = get_staff_info().staff_sym_l_; - if (dynamic_p_) + if (dynamic_p_) { dynamic_p_->set_staffsym (s_l); typeset_element (dynamic_p_); dynamic_p_ = 0; } - if (to_end_cresc_p_) + if (to_end_cresc_p_) { if (dynamic_p_) to_end_cresc_p_->dyn_b_drul_[RIGHT]=true; - + to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_l ()); to_end_cresc_p_->set_staffsym (s_l); typeset_element (to_end_cresc_p_); @@ -136,7 +136,7 @@ Dynamic_engraver::do_removal_processing () if (to_end_cresc_p_) { typeset_element (to_end_cresc_p_); - cresc_req_l_->warning ("unended crescendo"); + cresc_req_l_->warning (_("unended crescendo")); to_end_cresc_p_ =0; } if (dynamic_p_) @@ -149,12 +149,12 @@ Dynamic_engraver::do_removal_processing () void Dynamic_engraver::acknowledge_element (Score_elem_info i) { - if (i.elem_l_->name() == Note_column::static_name ()) + if (i.elem_l_->name() == Note_column::static_name ()) { if (dynamic_p_) dynamic_p_->add_support (i.elem_l_); if (to_end_cresc_p_) to_end_cresc_p_->add_support (i.elem_l_); - if (cresc_p_) + if (cresc_p_) cresc_p_->add_support (i.elem_l_); } } diff --git a/lily/identifier.cc b/lily/identifier.cc index 921f13d90e..62f0a3a840 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -25,19 +25,19 @@ IMPLEMENT_IS_TYPE_B(Identifier); Identifier::~Identifier() { if (!accessed_b_ && !init_b_) - warning ("Variable not used"); + warning (_("Variable not used")); } void Identifier::error (String expect) { - String e ("Wrong identifier type: "); - e += String (name()) + "(expected " + expect + ")"; + String e (_("Wrong identifier type: ")); + e += String (name()) + _("(expected ") + expect + ")"; ::error (e); } Identifier::Identifier (int code) { - token_code_i_ = code; + token_code_i_ = code; accessed_b_ = 0; init_b_ = 0; } diff --git a/lily/ineq-constrained-qp.cc b/lily/ineq-constrained-qp.cc index 4455a195b4..f14697dbb6 100644 --- a/lily/ineq-constrained-qp.cc +++ b/lily/ineq-constrained-qp.cc @@ -35,7 +35,7 @@ Ineq_constrained_qp::eliminate_var (int idx, Real value) row.del (idx); lin +=row ; - for (int i=0; i < cons.size(); i++) + for (int i=0; i < cons.size(); i++) { consrhs[i] -= cons[i](idx) *value; cons[i].del (idx); @@ -63,9 +63,9 @@ Ineq_constrained_qp::OK() const assert (cons.size() == consrhs.size ()); Matrix Qdif= quad - quad.transposed(); assert (Qdif.norm()/quad.norm () < EPS); -#endif +#endif } - + Real Ineq_constrained_qp::eval (Vector v) @@ -77,11 +77,11 @@ Ineq_constrained_qp::eval (Vector v) int min_elt_index (Vector v) { - Real m=infinity_f; + Real m=infinity_f; int idx=-1; for (int i = 0; i < v.dim(); i++) { - if (v (i) < m) + if (v (i) < m) { idx = i; m = v (i); @@ -106,19 +106,19 @@ min_elt_index (Vector v) */ Vector -Ineq_constrained_qp::constraint_solve (Vector start) const -{ +Ineq_constrained_qp::constraint_solve (Vector start) const +{ if (!dim()) return Vector (0); - + // experimental if (quad.dim() > 10) quad.try_set_band(); - + Active_constraints act (this); - act.OK(); + act.OK(); + - Vector x (start); Vector gradient=quad*x+lin; // Real fvalue = x*quad*x/2 + lin*x + const_term; @@ -126,17 +126,17 @@ Ineq_constrained_qp::constraint_solve (Vector start) const Vector last_gradient (gradient); int iterations=0; - - while (iterations++ < MAXITER) + + while (iterations++ < MAXITER) { Vector direction= - act.find_active_optimum (gradient); - + DOUT << "gradient "<< gradient<< "\ndirection " << direction<<"\n"; - - if (direction.norm() > EPS) + + if (direction.norm() > EPS) { DOUT << act.status() << '\n'; - + Real minalf = infinity_f; Inactive_iter minidx (act); @@ -146,16 +146,16 @@ Ineq_constrained_qp::constraint_solve (Vector start) const we know the optimum on this "hyperplane". Check if we bump into the edges of the simplex */ - - for (Inactive_iter ia (act); ia.ok(); ia++) + + for (Inactive_iter ia (act); ia.ok(); ia++) { if (ia.vec() * direction >= 0) continue; Real alfa= - (ia.vec()*x - ia.rhs ())/ (ia.vec()*direction); - - if (minalf > alfa) + + if (minalf > alfa) { minidx = ia; minalf = alfa; @@ -165,13 +165,13 @@ Ineq_constrained_qp::constraint_solve (Vector start) const Real optimal_step = min (minalf, unbounded_alfa); Vector deltax=direction * optimal_step; - x += deltax; + x += deltax; gradient += optimal_step * (quad * deltax); - + DOUT << "step = " << optimal_step<< " (|dx| = " << - deltax.norm() << ")\n"; - - if (minalf < unbounded_alfa) + deltax.norm() << ")\n"; + + if (minalf < unbounded_alfa) { /* bumped into an edge. try again, in smaller space. */ act.add (minidx.idx()); @@ -179,46 +179,46 @@ Ineq_constrained_qp::constraint_solve (Vector start) const continue; } /*ASSERT: we are at optimal solution for this "plane"*/ - - + + } - - Vector lagrange_mult=act.get_lagrange (gradient); + + Vector lagrange_mult=act.get_lagrange (gradient); int m= min_elt_index (lagrange_mult); - - if (m>=0 && lagrange_mult (m) > 0) + + if (m>=0 && lagrange_mult (m) > 0) { break; // optimal sol. } - else if (m<0) + else if (m<0) { assert (gradient.norm() < EPS) ; - + break; } - + DOUT << "dropping cons " << m<<'\n'; act.drop (m); } if (iterations >= MAXITER) - WARN<<"didn't converge!\n"; - + WARN<<_("didn't converge!\n"); + DOUT << ": found " << x<<" in " << iterations <<" iterations\n"; assert_solution (x); return x; -} +} + - Vector Ineq_constrained_qp::solve (Vector start) const -{ +{ /* no hassle if no constraints*/ - if (! cons.size()) + if (! cons.size()) { Choleski_decomposition chol (quad); return - chol.solve (lin); } - else + else { return constraint_solve (start); } diff --git a/lily/lookup.cc b/lily/lookup.cc index 333072ad2f..9b7ec861c4 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -7,9 +7,9 @@ TODO This doth suck. We should have PS output, and read spacing info from TFMs - + Glissando, bracket - + */ #include "lookup.hh" @@ -58,7 +58,7 @@ Atom Lookup::text (String style, String text, int dir) const { Array a; - + a.push (text); Atom tsym = (*symtables_)("style")->lookup (style); a[0] = substitute_args (tsym.tex_,a); @@ -130,7 +130,7 @@ Lookup::clef (String s) const { return (*symtables_)("clefs")->lookup (s); } - + Atom Lookup::dots () const { @@ -148,16 +148,16 @@ Atom Lookup::streepjes (int type, int i) const { assert (i); - + int arg; String idx; - - if (i < 0) + + if (i < 0) { idx = "botlines"; arg = -i; } - else + else { arg = i; idx = "toplines"; @@ -167,7 +167,7 @@ Lookup::streepjes (int type, int i) const Real w = ball (type).dim_[X_AXIS].length (); Atom ret = (*symtables_)("streepjes")->lookup (idx); - + Array a; a.push (String (w) + "pt"); a.push (arg); @@ -184,7 +184,7 @@ Lookup::hairpin (Real &wid, bool decresc) const wid = idx*6 PT; String idxstr = (decresc)? "decrescendosym" : "crescendosym"; Atom ret=(*symtables_)("param")->lookup (idxstr); - + Array a; a.push (idx); ret.tex_ = substitute_args (ret.tex_, a); @@ -218,28 +218,28 @@ Lookup::meter (Array a) const { Atom s((*symtables_)("param")->lookup ("meter")); s.tex_ = substitute_args (s.tex_,a); - return s; + return s; } Atom Lookup::stem (Real y1,Real y2) const { - if (y1 > y2) + if (y1 > y2) { Real t = y1; y1 = y2; y2 = t; } Atom s; - + s.dim_.x() = Interval (0,0); s.dim_.y() = Interval (y1,y2); - + Array a; a.push (print_dimen (y1)); a.push (print_dimen (y2)); - + String src = (*symtables_)("param")->lookup ("stem").tex_; s.tex_ = substitute_args (src,a); return s; @@ -251,19 +251,19 @@ Lookup::stem (Real y1,Real y2) const Atom Lookup::vbrace (Real &y) const { - if (y < 2* 20 PT) + if (y < 2* 20 PT) { - warning ("piano brace too small (" + print_dimen (y)+ ")"); + warning (_("piano brace too small (") + print_dimen (y)+ ")"); y = 2*20 PT; } - if (y > 67 * 2 PT) + if (y > 67 * 2 PT) { - warning ("piano brace too big (" + print_dimen (y)+ ")"); + warning (_("piano brace too big (") + print_dimen (y)+ ")"); y = 67 *2 PT; } - + int idx = int (rint ((y/2.0 - 20) + 148)); - + Atom s = (*symtables_)("param")->lookup ("brace"); { Array a; @@ -279,6 +279,6 @@ Lookup::vbrace (Real &y) const s.tex_ = substitute_args ("\\placebox{%}{%}{%}", a); } - + return s; } diff --git a/lily/main.cc b/lily/main.cc index 4727f337d6..0f250ceba1 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -43,7 +43,7 @@ void usage() { cout << - "Usage: lilypond [options] [mudela-file]\n" + _("Usage: lilypond [options] [mudela-file]\n" "Typeset and or produce midi output from mudela-file or stdin\n" "\n" "Options:\n" @@ -56,9 +56,9 @@ usage() " -M, --midi produce midi output only\n" " -V, --ignore-version ignore mudela version\n" "\n" - "GNU LilyPond was compiled with the following settings:\n" + "GNU LilyPond was compiled with the following settings:\n") #ifdef NDEBUG - "NDEBUG " + "NDEBUG " #endif #ifdef NPRINT "NPRINT " @@ -66,20 +66,20 @@ usage() #ifdef STRING_UTILS_INLINED "STRING_UTILS_INLINED " #endif - "datadir= " DIR_DATADIR + "datadir= " DIR_DATADIR "\n"; - + ; - - + + } -void +void notice() { cout << - "\n" + _("\n" "GNU LilyPond -- The GNU Project music typesetter.\n" "Copyright 1996,97 by\n" " Han-Wen Nienhuys \n" @@ -97,7 +97,7 @@ notice() " You should have received a copy (refer to the file COPYING) of the\n" "GNU General Public License along with this program; if not, write to\n" "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n" - "USA.\n"; + "USA.\n"); } @@ -106,19 +106,19 @@ static File_path path; void do_one_file (String init_str, String file_str) { - if (init_str.length_i () && path.find (init_str).empty_b ()) + if (init_str.length_i () && path.find (init_str).empty_b ()) { - error ("Can not find `" + init_str +"\'"); + error (_("Can not find `") + init_str +"\'"); return ; } if (file_str.length_i () && path.find (file_str).empty_b ()) { - error ("Can not find `" + file_str + "'"); + error (_("Can not find `") + file_str + "'"); return ; } - + Sources sources; - source_l_g = &sources; + source_l_g = &sources; source_l_g->set_path (&path); { My_lily_parser parser (source_l_g); @@ -132,26 +132,26 @@ do_one_file (String init_str, String file_str) int main (int argc, char **argv) -{ +{ debug_init(); // should be first // must override (come before) "/usr/local/share/lilypond"! char const * env_l=getenv ("LILYINCLUDE"); - if (env_l) + if (env_l) { path.add (env_l); } path.add (""); path.add (String (DIR_DATADIR) + "/init/"); - + path.push (DIR_DATADIR); Getopt_long oparser (argc, argv,theopts); cout << get_version_str() << endl; String init_str ("symbol.ly"); - - while (Long_option_init const * opt = oparser()) + + while (Long_option_init const * opt = oparser()) { switch (opt->shortname) { @@ -189,16 +189,16 @@ main (int argc, char **argv) int p=0; const char *arg ; - while ((arg= oparser.get_next_arg())) + while ((arg= oparser.get_next_arg())) { String f (arg); destill_inname (f); do_one_file (init_str,f); p++; } - if (!p) + if (!p) { - do_one_file (init_str, ""); + do_one_file (init_str, ""); } return exit_status_i_; @@ -210,17 +210,16 @@ destill_inname (String &name_str_r) { if (name_str_r.length_i()) { - if (name_str_r[ 0 ] != '-') + if (name_str_r[ 0 ] != '-') { String a,b,c,d; split_path (name_str_r,a,b,c,d); // add extension if not present. - if (d.empty_b ()) + if (d.empty_b ()) d = ".ly"; name_str_r = a+b+c+d; } } - else name_str_r = ""; + else name_str_r = ""; } - diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 9f9008dfed..6d2cb2699a 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -27,9 +27,9 @@ Midi_stream::~Midi_stream() *os_p_ << flush; // ugh. Share with tex_stream. if (!*os_p_) { - warning("error syncing file (disk full?)"); + warning(_("error syncing file (disk full?)")); exit_status_i_ = 1; - } + } delete os_p_; } @@ -38,7 +38,7 @@ Midi_stream::operator <<(String str) { if (check_debug && !monitor->silence("Midistrings")) str = String_convert::bin2hex_str (str); - + *os_p_ << str; if (check_debug && !monitor->silence("Midistrings")) @@ -70,5 +70,5 @@ Midi_stream::open() { os_p_ = new ofstream (filename_str_.ch_C ()); if (!*os_p_) - error ("can't open `" + filename_str_ + "\'"); + error (_("can't open `") + filename_str_ + "\'"); } diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 4c6ce789de..4247e7e559 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -23,14 +23,14 @@ Tie_req::do_print() const{} /* *************** */ - + IMPLEMENT_IS_TYPE_B1(Span_req,Musical_req); void -Span_req::do_print() const +Span_req::do_print() const { #ifndef NPRINT DOUT << spantype ; @@ -93,7 +93,7 @@ Melodic_req::transpose (Melodic_req const & delta) int delta_pitch = delta.pitch(); octave_i_ += delta.octave_i_; notename_i_ += delta.notename_i_; - while (notename_i_ >= 7) + while (notename_i_ >= 7) { notename_i_ -= 7; octave_i_ ++; @@ -101,11 +101,11 @@ Melodic_req::transpose (Melodic_req const & delta) int new_pitch = pitch(); int delta_acc = new_pitch - old_pitch - delta_pitch; - + accidental_i_ -= delta_acc; - if (abs (accidental_i_) > 2) + if (abs (accidental_i_) > 2) { - delta.warning ("transposition makes accidental larger than 2"); + delta.warning (_("transposition makes accidental larger than 2")); } } @@ -124,7 +124,7 @@ Melodic_req::compare (Melodic_req const &m1 , Melodic_req const&m2) int o= m1.octave_i_ - m2.octave_i_; int n = m1.notename_i_ - m2.notename_i_; int a = m1.accidental_i_ - m2.accidental_i_; - + if (o) return o; if (n) @@ -138,7 +138,7 @@ void Melodic_req::do_print() const { #ifndef NPRINT - DOUT << "notename: " << notename_i_ + DOUT << "notename: " << notename_i_ << " acc: " <script(); - + return scriptdef_p_->equal_b (*s->scriptdef_p_); } @@ -373,7 +373,7 @@ Text_req::Text_req (Text_req const& src) dir_ = src.dir_; } -Text_req::Text_req (int dir_i, Text_def* tdef_p) +Text_req::Text_req (int dir_i, Text_def* tdef_p) { dir_ = Direction(dir_i); tdef_p_ = tdef_p; @@ -428,9 +428,9 @@ Absolute_dynamic_req::do_print() const } String -Dynamic_req::loudness_static_str (Loudness l) +Dynamic_req::loudness_static_str (Loudness l) { - switch (l) + switch (l) { case FFF: return "fff"; case FF: return "ff"; @@ -454,8 +454,8 @@ Absolute_dynamic_req::loudness_str () const if (s.empty_b ()) { s = "mf"; - warning (String ("Never heard of dynamic scale ") - + loudness_ + " assuming mf"); + warning (String (_("Never heard of dynamic scale ")) + + loudness_ + _(" assuming mf")); } return s; } @@ -486,5 +486,3 @@ Span_dynamic_req::do_print() const IMPLEMENT_IS_TYPE_B1(Tie_req,Musical_req); - - diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 8abc8beb46..7bddf702d1 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -56,7 +56,7 @@ static Keyword_ent the_key_tab[]={ {"skip", SKIP}, {"staff", STAFF}, {"table", TABLE}, - {"spandynamic", SPANDYNAMIC}, + {"spandynamic", SPANDYNAMIC}, {"symboltables", SYMBOLTABLES}, {"tempo", TEMPO}, {"texid", TEXID}, @@ -87,7 +87,7 @@ My_lily_lexer::lookup_identifier (String s) { if (!identifier_p_dict_p_->elt_b (s)) return 0; - + return (*identifier_p_dict_p_)[s]; } @@ -96,9 +96,9 @@ void My_lily_lexer::set_identifier (String name_str, Identifier*i) { Identifier *old = lookup_identifier (name_str); - if (old) + if (old) { - old->warning("redeclaration of \\" + name_str); + old->warning(_("redeclaration of \\") + name_str); delete old; } (*identifier_p_dict_p_)[name_str] = i; @@ -109,7 +109,7 @@ My_lily_lexer::~My_lily_lexer() delete keytable_p_; for (Assoc_iter - ai (*identifier_p_dict_p_); ai.ok(); ai++) + ai (*identifier_p_dict_p_); ai.ok(); ai++) { DOUT << "deleting: " << ai.key()<<'\n'; delete ai.val(); @@ -121,9 +121,9 @@ void My_lily_lexer::print_declarations (bool init_b) const { for (Assoc_iter ai (*identifier_p_dict_p_); - ai.ok(); ai++) + ai.ok(); ai++) { - if (ai.val()->init_b_ == init_b) + if (ai.val()->init_b_ == init_b) { DOUT << ai.key() << '='; ai.val()->print (); @@ -134,11 +134,11 @@ My_lily_lexer::print_declarations (bool init_b) const void My_lily_lexer::LexerError (char const *s) { - if (include_stack_.empty()) + if (include_stack_.empty()) { - *mlog << "error at EOF" << s << '\n'; + *mlog << _("error at EOF") << s << '\n'; } - else + else { errorlevel_i_ |= 1; Input spot (source_file_l(),here_ch_C()); @@ -174,7 +174,7 @@ My_lily_lexer::escaped_char(char c) const return '\n'; case 't': return '\t'; - + case '\'': case '\"': case '\\': diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index e2dd943b3a..e323034c0e 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -37,7 +37,7 @@ My_lily_parser::~My_lily_parser() delete lexer_p_; delete default_header_p_; } - + void My_lily_parser::clear_notenames() @@ -55,7 +55,7 @@ My_lily_parser::set_debug() { #ifndef NPRINT String s = ""; - if (init_parse_b_) + if (init_parse_b_) s = "Init"; set_yydebug (!monitor->silence (s+"Parser") && check_debug); lexer_p_->set_debug (!monitor->silence (s+"Lexer") && check_debug); @@ -67,14 +67,14 @@ My_lily_parser::print_declarations() { #ifndef NPRINT String s = ""; - - if (init_parse_b_) + + if (init_parse_b_) s = "Init"; - if (!monitor->silence (s+"Declarations") && check_debug) + if (!monitor->silence (s+"Declarations") && check_debug) { lexer_p_->print_declarations (init_parse_b_); } -#endif +#endif } void @@ -82,9 +82,9 @@ My_lily_parser::parse_file (String init, String s) { lexer_p_ = new My_lily_lexer; init_str_ = init; - - *mlog << "Parsing ... "; - + + *mlog << _("Parsing ... "); + init_parse_b_ = true; set_debug(); lexer_p_->new_input (init, source_l_); @@ -92,7 +92,7 @@ My_lily_parser::parse_file (String init, String s) if (error_level_i_) { - error ("Found errors in init files"); + error (_("Found errors in init files")); } print_declarations(); @@ -102,10 +102,10 @@ My_lily_parser::parse_file (String init, String s) do_yyparse(); print_declarations(); - + if (!define_spot_array_.empty()) { - warning ("Braces don't match."); + warning (_("Braces don't match.")); error_level_i_ = 1; } } @@ -116,7 +116,7 @@ My_lily_parser::remember_spot() define_spot_array_.push (here_input()); } -char const * +char const * My_lily_parser::here_ch_C() const { return lexer_p_->here_ch_C(); @@ -165,7 +165,7 @@ Chord* My_lily_parser::get_word_element (Text_def* tdef_p, Duration * duration_p) { Chord* velt_p = new Request_chord; - + Lyric_req* lreq_p = new Lyric_req (tdef_p); lreq_p->duration_ = *duration_p; @@ -179,7 +179,7 @@ My_lily_parser::get_word_element (Text_def* tdef_p, Duration * duration_p) Chord * My_lily_parser::get_rest_element (String s, Duration * duration_p) -{ +{ Chord* velt_p = new Request_chord; velt_p->set_spot (here_input()); @@ -191,12 +191,12 @@ My_lily_parser::get_rest_element (String s, Duration * duration_p) skip_p->set_spot (here_input()); velt_p->add (skip_p); } - else + else { Rest_req * rest_req_p = new Rest_req; rest_req_p->duration_ = *duration_p; rest_req_p->set_spot (here_input()); - + velt_p->add (rest_req_p); } @@ -211,7 +211,7 @@ My_lily_parser::get_note_element (Note_req *rq, Duration * duration_p) v->set_spot (here_input ()); v->add (rq); - + // too bad parser reads (default) duration via member access, // this hack will do for now.. if (abbrev_beam_type_i_) @@ -229,7 +229,7 @@ Request* My_lily_parser::get_parens_request (char c) { Request* req_p=0; - switch (c) + switch (c) { case '~': @@ -262,7 +262,7 @@ My_lily_parser::get_parens_request (char c) case '<': req_p = new Span_dynamic_req; break; - + case ')': case '(': req_p = new Slur_req; @@ -271,8 +271,8 @@ My_lily_parser::get_parens_request (char c) assert (false); break; } - - switch (c) + + switch (c) { case '<': case '>': @@ -285,12 +285,12 @@ My_lily_parser::get_parens_request (char c) case ']': req_p->span()->spantype = Span_req::STOP; break; - + default: break; } - if (req_p->musical()->span_dynamic ()) + if (req_p->musical()->span_dynamic ()) { Span_dynamic_req* s_l= (req_p->musical()->span_dynamic ()) ; s_l->dynamic_dir_ = (c == '<') ? UP:DOWN; @@ -303,12 +303,12 @@ My_lily_parser::get_parens_request (char c) void My_lily_parser::add_requests (Chord*v) { - for (int i = 0; i < pre_reqs.size(); i++) + for (int i = 0; i < pre_reqs.size(); i++) { v->add (pre_reqs[i]); } pre_reqs.clear(); - for (int i = 0; i add (post_reqs[i]); } diff --git a/lily/p-score.cc b/lily/p-score.cc index 39de484d98..3b5cb72f7e 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -83,27 +83,27 @@ Paper_score::add_column (Paper_column *p) void Paper_score::print () const -{ +{ #ifndef NPRINT if (!check_debug) return ; DOUT << "Paper_score { "; DOUT << "\n elements: "; - for (iter_top (elem_p_list_,cc); cc.ok (); cc++) + for (iter_top (elem_p_list_,cc); cc.ok (); cc++) cc->print (); DOUT << "\n unbroken spanners: "; for (iter (span_p_list_.top (), i); i.ok (); i++) i->print (); - + DOUT << "}\n"; -#endif +#endif } PCursor Paper_score::find_col (Paper_column const *c) const { Paper_column const *what = c; - + return col_p_list_.find ((Paper_column*)what); } @@ -115,10 +115,10 @@ Paper_score::set_breaking (Array const &breaking) super_elem_l_->break_processing (); - for (iter (span_p_list_.top (),i); i.ok ();) + for (iter (span_p_list_.top (),i); i.ok ();) { Spanner *span_p = i.remove_p (); - if (span_p->broken_b ()) + if (span_p->broken_b ()) { span_p->unlink (); delete span_p; @@ -127,10 +127,10 @@ Paper_score::set_breaking (Array const &breaking) typeset_broken_spanner (span_p); } } - for (iter (elem_p_list_.top (),i); i.ok () ;) + for (iter (elem_p_list_.top (),i); i.ok () ;) { Item *i_l =i->item (); - if (i_l && !i_l->line_l ()) + if (i_l && !i_l->line_l ()) { i_l->unlink (); delete i.remove_p (); @@ -147,21 +147,21 @@ Paper_score::calc_breaking () Array sol; bool try_wrap = ! paper_l_->get_var ("castingalgorithm"); - if (!try_wrap) + if (!try_wrap) { algorithm_p = new Gourlay_breaking ; algorithm_p->set_pscore (this); sol = algorithm_p->solve (); delete algorithm_p; - if (! sol.size ()) + if (! sol.size ()) { - warning ("Can not solve this casting problem exactly; revert to Word_wrap"); + warning (_("Can not solve this casting problem exactly; revert to Word_wrap")); try_wrap = true; } } - if (try_wrap) + if (try_wrap) { - algorithm_p = new Word_wrap; + algorithm_p = new Word_wrap; algorithm_p->set_pscore (this); sol = algorithm_p->solve (); delete algorithm_p; @@ -174,12 +174,12 @@ Paper_score::process () { clean_cols (); print (); - *mlog << "Preprocessing elements... " <breakable_col_processing (); super_elem_l_->pre_processing (); - *mlog << "\nCalculating column positions ... " <post_processing (); tex_output (); } @@ -192,20 +192,20 @@ Paper_score::tex_output () String outname = paper_l_->outfile_str_ ; if (outname.empty_b ()) outname = default_out_str_+ ".tex"; - - *mlog << "TeX output to " << outname << " ...\n"; - + + *mlog << _("TeX output to ") << outname << " ...\n"; + Tex_stream tex_out (outname); Tex_outputter interfees (&tex_out); outputter_l_ = &interfees; - - tex_out << "% outputting Score, defined at: " << origin_str_ << "\n"; - if (header_l_) + + tex_out << _("% outputting Score, defined at: ") << origin_str_ << "\n"; + if (header_l_) { tex_out << header_l_->TeX_string(); } - + tex_out << "\n "<< paper_l_->lookup_l ()->texsetting << "%(Tex id)\n"; super_elem_l_->output_all (); tex_out << "\n\\EndLilyPondOutput"; @@ -224,7 +224,7 @@ Paper_score::breakable_col_range (Paper_column*l,Paper_column*r) const /* ugh! windows-suck-suck-suck. */ - while (PCursor::compare (start,stop) < 0) + while (PCursor::compare (start,stop) < 0) { if (start->breakable_b_) ret.push (start); @@ -237,11 +237,11 @@ Link_array Paper_score::col_range (Paper_column*l, Paper_column*r) const { Link_array ret; - + PCursor start (l ? find_col (l)+1 : col_p_list_.top ()); PCursor stop (r ? find_col (r) : col_p_list_.bottom ()); ret.push (l); - + /* ugh! windows-suck-suck-suck. */ @@ -257,20 +257,20 @@ Paper_score::broken_col_range (Item const*l_item_l, Item const*r_item_l) const Link_array ret; Item const*l=l_item_l; Item const*r=r_item_l; - - while (! l->is_type_b(Paper_column::static_name ())) + + while (! l->is_type_b(Paper_column::static_name ())) l = l->axis_group_l_a_[X_AXIS]->item (); - - while (! r->is_type_b(Paper_column::static_name ())) + + while (! r->is_type_b(Paper_column::static_name ())) r = r->axis_group_l_a_[X_AXIS]->item (); - + PCursor start (l ? find_col ((Paper_column*)l)+1 : col_p_list_.top ()); PCursor stop (r ? find_col ((Paper_column*)r) : col_p_list_.bottom ()); - + /* ugh! windows-suck-suck-suck. */ - while (PCursor::compare (start,stop) < 0) + while (PCursor::compare (start,stop) < 0) { if (start->breakable_b_ && !start->line_l_) ret.push (start); diff --git a/lily/paper-def.cc b/lily/paper-def.cc index d55e3b740d..3056dc6a21 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -46,12 +46,12 @@ Paper_def::set_var (String s, Real r) { real_vars_p_->elem (s) = r; } - + Real Paper_def::get_var (String s) const { if (! real_vars_p_->elt_b (s)) - error ("unknown paper variable `" + s+"'"); + error (_("unknown paper variable `") + s+"'"); return real_vars_p_->elem (s); } @@ -73,7 +73,7 @@ Paper_def::duration_to_dist (Moment d,Real k) const /** Get the measure wide constant for arithmetic. - @see + @see John S. Gourlay. ``Spacing a Line of Music,'' Technical Report OSU-CISRC-10/87-TR35, Department of Computer and Information Science, The Ohio State University, 1987. @@ -128,7 +128,7 @@ Paper_def::interbeam_f() const Real Paper_def::internote_f() const { - return interline_f() / 2; + return interline_f() / 2; } Real @@ -145,7 +145,7 @@ Paper_def::print() const DOUT << "Paper {"; DOUT << "out: " <print(); - for (Assoc_iter i (*real_vars_p_); i.ok(); i++) + for (Assoc_iter i (*real_vars_p_); i.ok(); i++) { DOUT << i.key() << "= " << i.val () << "\n"; } diff --git a/lily/performance.cc b/lily/performance.cc index ed74df07b4..8d05ec325d 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -48,29 +48,29 @@ void Performance::output_header_track (Midi_stream& midi_stream_r) { Midi_track midi_track; - + time_t t = time (0); // perhaps multiple text events? - String str = String ("Creator: ") + get_version_str() + "\n"; + String str = String (_("Creator: ")) + get_version_str() + "\n"; Midi_text creator (Midi_text::TEXT, str); midi_track.add (Moment (0), &creator); - str = "Automatically generated at "; + str = _("Automatically generated at "); str += ctime (&t); str = str.left_str (str.length_i() - 1); str += "\n"; Midi_text generate (Midi_text::TEXT, str); midi_track.add (Moment (0), &generate); - str = "from musical definition: "; + str = _("from musical definition: "); str += origin_str_; Midi_text from (Midi_text::TEXT, str); midi_track.add (Moment (0), &from); - Midi_text track_name (Midi_text::TRACK_NAME, "Track " + Midi_text track_name (Midi_text::TRACK_NAME, "Track " + String_convert::i2dec_str (0, 0, '0')); midi_track.add (Moment (0), &track_name); @@ -94,31 +94,31 @@ Performance::add (Audio_element *p) void Performance::print() const -{ +{ #ifndef NPRINT DOUT << "Performance { "; DOUT << "Items: "; for (PCursor i (audio_elem_p_list_.top ()); i.ok (); i++) i->print (); - + DOUT << "\ncolumns: "; for (PCursor i (audio_column_p_list_); i.ok(); i++) i->print(); DOUT << "}\n"; -#endif +#endif } void Performance::process() { print (); - + String out=midi_l_->outfile_str_; if (out.empty_b ()) out = default_out_str_ + ".midi"; Midi_stream midi_stream (out); - *mlog << "MIDI output to " << out<< " ..." << endl; + *mlog << _("MIDI output to ") << out<< " ..." << endl; output (midi_stream); *mlog << endl; diff --git a/lily/qlpsolve.cc b/lily/qlpsolve.cc index b863a63f67..7baa0a1a4a 100644 --- a/lily/qlpsolve.cc +++ b/lily/qlpsolve.cc @@ -20,13 +20,13 @@ String Active_constraints::status() const { String s ("Active|Inactive ["); - for (int i=0; i< active.size(); i++) + for (int i=0; i< active.size(); i++) { s += String (active[i]) + " "; } s+="| "; - for (int i=0; i< inactive.size(); i++) + for (int i=0; i< inactive.size(); i++) { s += String (inactive[i]) + " "; } @@ -48,12 +48,12 @@ Active_constraints::OK() for (int i=0; i < opt->cons.size(); i++) allcons.push (0); - for (int i=0; i < active.size(); i++) + for (int i=0; i < active.size(); i++) { int j = active[i]; allcons[j]++; } - for (int i=0; i < inactive.size(); i++) + for (int i=0; i < inactive.size(); i++) { int j = inactive[i]; allcons[j]++; @@ -84,7 +84,7 @@ Active_constraints::add (int k) Vector Ha = H*a; Real aHa = a*Ha; Vector addrow (Ha.dim()); - if (abs (aHa) > EPS) + if (abs (aHa) > EPS) { /* a != 0, so if Ha = O(EPS), then @@ -93,7 +93,7 @@ Active_constraints::add (int k) if H*a == 0, the constraints are dependent. */ H -= Matrix (Ha/aHa , Ha); - + /* sorry, don't know how to justify this. .. @@ -103,7 +103,7 @@ Active_constraints::add (int k) A -= Matrix (A*a, addrow); A.insert_row (addrow,A.rows()); }else - WARN << "degenerate constraints"; + WARN << _("degenerate constraints"); } void @@ -118,22 +118,22 @@ Active_constraints::drop (int k) active.pop(); Vector a (A.row (q)); - if (a.norm() > EPS) + if (a.norm() > EPS) { /* - + */ Real q = a*opt->quad*a; Matrix aaq (a,a/q); H += aaq; A -= A*opt->quad*aaq; }else - WARN << "degenerate constraints"; + WARN << _("degenerate constraints"); #ifndef NDEBUG Vector rem_row (A.row (q)); assert (rem_row.norm() < EPS); #endif - + A.delete_row (q); } @@ -155,11 +155,10 @@ Active_constraints::Active_constraints (Ineq_constrained_qp const *op) } /** Find the optimum which is in the planes generated by the active - constraints. + constraints. */ Vector Active_constraints::find_active_optimum (Vector g) { return H*g; } - diff --git a/lily/request-iterator.cc b/lily/request-iterator.cc index f9cf8f0046..3d833b94d1 100644 --- a/lily/request-iterator.cc +++ b/lily/request-iterator.cc @@ -24,7 +24,7 @@ Request_chord_iterator::Request_chord_iterator (Request_chord*el_l) { elt_l_ = el_l; MInterval elt_dur =el_l->time_int(); - elt_duration_ = elt_dur.length (); + elt_duration_ = elt_dur.length (); last_b_ = false; } @@ -32,7 +32,7 @@ Request_chord_iterator::Request_chord_iterator (Request_chord*el_l) bool Request_chord_iterator::ok() const { - return (elt_duration_ && !last_b_) || first_b_; + return (elt_duration_ && !last_b_) || first_b_; } @@ -41,7 +41,7 @@ Moment Request_chord_iterator::next_moment() const { Moment m (0); - if (!first_b_) + if (!first_b_) m = elt_duration_; return m; } @@ -56,20 +56,20 @@ Request_chord_iterator::do_print() const void Request_chord_iterator::process_and_next (Moment mom) { - if (first_b_) + if (first_b_) { - for (PCursor i (elt_l_->music_p_list_); i.ok(); i++) + for (PCursor i (elt_l_->music_p_list_); i.ok(); i++) { assert (i->is_type_b (Request::static_name())); Request * req_l = (Request*)i.ptr(); bool gotcha = report_to_l()->try_request (req_l); if (!gotcha) - req_l->warning ("Junking request: " + String (req_l->name())); + req_l->warning (_("Junking request: ") + String (req_l->name())); } first_b_ = false; } if (mom >= elt_duration_) - last_b_ = true; + last_b_ = true; } diff --git a/lily/score.cc b/lily/score.cc index 5e8fa7e7f1..135ebf9821 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -50,28 +50,28 @@ Score::run_translator (Music_output_def *odef_l) Global_translator * trans_p = odef_l->get_global_translator_p(); if (!trans_p) return ; - - *mlog << "\nInterpreting music ..."; + + *mlog << _("\nInterpreting music ..."); trans_p->last_mom_ = music_p_->time_int().max (); - Music_iterator * iter = Music_iterator::static_get_iterator_p (music_p_, + Music_iterator * iter = Music_iterator::static_get_iterator_p (music_p_, trans_p); iter->construct_children(); - if (! iter->ok()) + if (! iter->ok()) { delete iter; - warning ("Need music in a score"); + warning (_("Need music in a score")); errorlevel_i_ =1; return ; } - + trans_p->start(); - - while (iter->ok() || trans_p->moments_left_i ()) + + while (iter->ok() || trans_p->moments_left_i ()) { Moment w = infinity_mom; - if (iter->ok()) + if (iter->ok()) { w = iter->next_moment(); DOUT << "proccing: " << w <<"\n"; @@ -87,22 +87,22 @@ Score::run_translator (Music_output_def *odef_l) delete iter; trans_p->finish(); - - if (errorlevel_i_) + + if (errorlevel_i_) { - // should we? hampers debugging. - warning ("Errors found, /*not processing score*/"); + // should we? hampers debugging. + warning (_("Errors found, /*not processing score*/")); } - + Music_output * output = trans_p->get_output_p(); delete trans_p; - *mlog << " (time: " << String(timer.read (), "%.2f") << " seconds)"; + *mlog << _(" (time: ") << String(timer.read (), "%.2f") << _(" seconds)"); + - output->header_l_ = header_p_; output->default_out_str_ = default_out_fn; output->origin_str_ = location_str(); - + *mlog << endl; output->process(); delete output ; @@ -126,7 +126,7 @@ void Score::print() const { #ifndef NPRINT - DOUT << "score {\n"; + DOUT << "score {\n"; music_p_ -> print (); for (int i=0; i < def_p_arr_.size (); i++) def_p_arr_[i]->print(); @@ -139,6 +139,3 @@ Score::add (Music_output_def *pap_p) { def_p_arr_.push(pap_p); } - - - diff --git a/lily/scores.cc b/lily/scores.cc index 90fbcf17a7..81ac087765 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -20,18 +20,18 @@ String default_out_fn = "lelie"; void do_scores() { - for (int i=0; i < global_score_array.size(); i++) + for (int i=0; i < global_score_array.size(); i++) { Score *&is_p = global_score_array[i]; if (is_p->header_p_) - is_p->header_p_->lily_id_str_ = "Lily was here, " + + is_p->header_p_->lily_id_str_ = "Lily was here, " + get_version_number_str(); - if (is_p->errorlevel_i_) + if (is_p->errorlevel_i_) { - is_p->warning ("Score contains errors. Will not process it. "); + is_p->warning (_("Score contains errors. Will not process it. ")); exit_status_i_ |= 1; } - else + else { is_p->process(); } @@ -53,4 +53,3 @@ set_default_output (String s) { default_out_fn = s; } - diff --git a/lily/script.cc b/lily/script.cc index 2ac9930199..ceaeacd4c3 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -25,7 +25,7 @@ void Script::do_substitute_dependency (Score_elem*o,Score_elem*n) { Staff_side::do_substitute_dependency (o,n); - if (o == stem_l_) + if (o == stem_l_) { stem_l_ = n ? (Stem*)n->item() : 0; } @@ -40,7 +40,7 @@ Script::set_stem (Stem*st_l) Script::Script() -{ +{ specs_l_ = 0; inside_staff_b_ = false; stem_l_ = 0; @@ -51,17 +51,17 @@ void Script::set_default_dir() { int s_i=specs_l_->rel_stem_dir(); - if (s_i) + if (s_i) { if (stem_l_) dir_ = stem_l_->dir_ * s_i; else { - specs_l_->warning ("Script needs stem direction"); + specs_l_->warning (_("Script needs stem direction")); dir_ = DOWN; } } - else + else { dir_ =specs_l_->staff_dir(); } @@ -78,12 +78,12 @@ Script::do_width() const void Script::do_pre_processing() { - if (breakable_b_ && break_status_i() != 1) + if (breakable_b_ && break_status_i() != 1) { transparent_b_ = true; set_empty (true); } - + if (!dir_) set_default_dir(); inside_staff_b_ = specs_l_->inside_b(); @@ -100,7 +100,7 @@ Script::brew_molecule_p() const { Real dy = paper()->internote_f (); Real dx = paper()->note_width()/2; - + Molecule*out = new Molecule (specs_l_->get_atom (paper(), dir_)); out->translate_axis (dy * pos_i_, Y_AXIS); out->translate_axis (dx, X_AXIS); // FIXME! ugh @@ -110,9 +110,8 @@ Script::brew_molecule_p() const IMPLEMENT_IS_TYPE_B2(Script,Item,Staff_side); -int -Script::compare (Script *const&l1, Script *const&l2) +int +Script::compare (Script *const&l1, Script *const&l2) { return l1->specs_l_->priority_i() - l2->specs_l_->priority_i (); } - diff --git a/lily/slur-grav.cc b/lily/slur-grav.cc index 14fea917f6..83da2c3166 100644 --- a/lily/slur-grav.cc +++ b/lily/slur-grav.cc @@ -26,7 +26,7 @@ Slur_engraver::do_try_request (Request *req_l) void Slur_engraver::acknowledge_element (Score_elem_info info) { - if (info.elem_l_->name() == Note_column::static_name ()) + if (info.elem_l_->name() == Note_column::static_name ()) { Note_column *col_l =(Note_column*) info.elem_l_->item() ;// ugh for (int i = 0; i < slur_l_stack_.size(); i++) @@ -47,22 +47,22 @@ void Slur_engraver::do_process_requests() { Array start_slur_l_arr_; - for (int i=0; i< new_slur_req_l_arr_.size(); i++) + for (int i=0; i< new_slur_req_l_arr_.size(); i++) { Slur_req* slur_req_l = new_slur_req_l_arr_[i]; // end slur: move the slur to other array - if (slur_req_l->spantype == Span_req::STOP) + if (slur_req_l->spantype == Span_req::STOP) { if (slur_l_stack_.empty()) - - slur_req_l->warning ("can't find slur to end"); - else + + slur_req_l->warning (_("can't find slur to end")); + else { end_slur_l_arr_.push (slur_l_stack_.pop()); requests_arr_.pop(); } } - else if (slur_req_l->spantype == Span_req::START) + else if (slur_req_l->spantype == Span_req::START) { // push a new slur onto stack. //(use temp. array to wait for all slur STOPs) @@ -80,7 +80,7 @@ void Slur_engraver::do_pre_move_processing() { dir_ = (Direction) int(get_property ("ydirection")); - for (int i = 0; i < end_slur_l_arr_.size(); i++) + for (int i = 0; i < end_slur_l_arr_.size(); i++) { if (dir_) end_slur_l_arr_[i]->dir_ = dir_; @@ -96,9 +96,9 @@ Slur_engraver::do_post_move_processing() } Slur_engraver::~Slur_engraver() { - for (int i=0; i < requests_arr_.size(); i++) + for (int i=0; i < requests_arr_.size(); i++) { - requests_arr_[i]->warning ("unterminated slur"); + requests_arr_[i]->warning (_("unterminated slur")); } } diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index fc730f3965..6ae908c2af 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -25,11 +25,11 @@ Vector Spring_spacer::default_solution() const { - return try_initial_solution() ; + return try_initial_solution() ; } Score_column* -Spring_spacer::scol_l (int i) +Spring_spacer::scol_l (int i) { return (Score_column*)cols[i].pcol_l_; } @@ -55,20 +55,20 @@ Spring_spacer::OK() const assert (cols[i].rank_i_ > cols[i-1].rank_i_); for (int i = 1; i < loose_col_arr_.size(); i++) assert (loose_col_arr_[i].rank_i_ > loose_col_arr_[i-1].rank_i_); -#endif +#endif } /** - Make sure no unconnected columns happen. + Make sure no unconnected columns happen. */ void -Spring_spacer::handle_loose_cols() +Spring_spacer::handle_loose_cols() { Union_find connected (cols.size()); Array fixed; for (PCursor i (ideal_p_list_.top()); i.ok (); i++) { - connected.connect (i->left_i_,i->right_i_); + connected.connect (i->left_i_,i->right_i_); } for (int i = 0; i < cols.size(); i++) if (cols[i].fixed()) @@ -76,11 +76,11 @@ Spring_spacer::handle_loose_cols() for (int i=1; i < fixed.size(); i++) connected.connect (fixed[i-1], fixed[i]); - for (int i = cols.size(); i--;) + for (int i = cols.size(); i--;) { - if (! connected.equiv (fixed[0], i)) + if (! connected.equiv (fixed[0], i)) { - warning ("unconnected column: " + String (i)); + warning (_("unconnected column: ") + String (i)); loosen_column (i); } } @@ -90,23 +90,23 @@ Spring_spacer::handle_loose_cols() /** Guess a stupid position for loose columns. Put loose columns at - regular distances from enclosing calced columns + regular distances from enclosing calced columns */ void Spring_spacer::position_loose_cols (Vector &sol_vec) const { if (!loose_col_arr_.size()) - return ; + return ; assert (sol_vec.dim()); Array fix_b_arr; fix_b_arr.set_size (cols.size() + loose_col_arr_.size ()); Real utter_right_f=-infinity_f; Real utter_left_f =infinity_f; - for (int i=0; i < loose_col_arr_.size(); i++) + for (int i=0; i < loose_col_arr_.size(); i++) { fix_b_arr[loose_col_arr_[i].rank_i_] = false; } - for (int i=0; i < cols.size(); i++) + for (int i=0; i < cols.size(); i++) { int r= cols[i].rank_i_; fix_b_arr[r] = true; @@ -116,18 +116,18 @@ Spring_spacer::position_loose_cols (Vector &sol_vec) const Vector v (fix_b_arr.size()); int j =0; int k =0; - for (int i=0; i < v.dim(); i++) + for (int i=0; i < v.dim(); i++) { - if (fix_b_arr[i]) + if (fix_b_arr[i]) { assert (cols[j].rank_i_ == i); v (i) = sol_vec (j++); } - else + else { - Real left_pos_f = + Real left_pos_f = (j>0) ?sol_vec (j-1) : utter_left_f; - Real right_pos_f = + Real right_pos_f = (j < sol_vec.dim()) ? sol_vec (j) : utter_right_f; int left_rank = (j>0) ? cols[j-1].rank_i_ : 0; int right_rank = (j left_rank && r < right_rank); - v (i) = (r - left_rank)*left_pos_f/ d_r + + v (i) = (r - left_rank)*left_pos_f/ d_r + (right_rank - r) *right_pos_f /d_r; } } sol_vec = v; } - + bool -Spring_spacer::check_constraints (Vector v) const +Spring_spacer::check_constraints (Vector v) const { int dim=v.dim(); assert (dim == cols.size()); - - for (int i=0; i < dim; i++) + + for (int i=0; i < dim; i++) { if (cols[i].fixed()&& - abs (cols[i].fixed_position() - v (i)) > COLFUDGE) + abs (cols[i].fixed_position() - v (i)) > COLFUDGE) return false; - - if (!i) + + if (!i) continue; - + Real mindist=cols[i-1].width_[RIGHT] -cols[i].width_[LEFT]; // ugh... compares Real dif =v (i) - v (i-1)- mindist; bool b = (dif > - COLFUDGE); - + if (!b) return false; @@ -179,7 +179,7 @@ bool Spring_spacer::check_feasible() const { Vector sol (try_initial_solution()); - return check_constraints (sol); + return check_constraints (sol); } /// generate a solution which obeys the min distances and fixed positions @@ -188,31 +188,31 @@ Spring_spacer::try_initial_solution() const { int dim=cols.size(); Vector initsol (dim); - for (int i=0; i < dim; i++) + for (int i=0; i < dim; i++) { - if (cols[i].fixed()) + if (cols[i].fixed()) { - initsol (i)=cols[i].fixed_position(); + initsol (i)=cols[i].fixed_position(); - if (i > 0) + if (i > 0) { Real r =initsol (i-1) + cols[i-1].width_[RIGHT]; - if (initsol (i) < r) + if (initsol (i) < r) { - warning ("overriding fixed position"); + warning (_("overriding fixed position")); initsol (i) =r; } } - + } - else + else { Real mindist=cols[i-1].width_[RIGHT] - cols[i].width_[LEFT]; if (mindist < 0.0) - warning ("Excentric column"); + warning (_("Excentric column")); initsol (i)=initsol (i-1)+mindist; - } + } } return initsol; @@ -223,7 +223,7 @@ Spring_spacer::try_initial_solution() const Vector Spring_spacer::find_initial_solution() const { - Vector v (try_initial_solution()); + Vector v (try_initial_solution()); assert (check_constraints (v)); return v; } @@ -235,8 +235,8 @@ Spring_spacer::make_matrices (Matrix &quad, Vector &lin, Real &c) const quad.fill (0); lin.fill (0); c = 0; - - for (PCursor i (ideal_p_list_.top()); i.ok (); i++) + + for (PCursor i (ideal_p_list_.top()); i.ok (); i++) { int l = i->left_i_; int r = i->right_i_; @@ -256,28 +256,28 @@ Spring_spacer::make_matrices (Matrix &quad, Vector &lin, Real &c) const void Spring_spacer::set_fixed_cols (Mixed_qp &qp) const { - for (int j=0; j < cols.size(); j++) - if (cols[j].fixed()) - qp.add_fixed_var (j,cols[j].fixed_position()); - - + for (int j=0; j < cols.size(); j++) + if (cols[j].fixed()) + qp.add_fixed_var (j,cols[j].fixed_position()); + + } // put the constraints into the LP problem void Spring_spacer::make_constraints (Mixed_qp& lp) const -{ +{ int dim=cols.size(); - for (int j=0; j < dim; j++) + for (int j=0; j < dim; j++) { Colinfo c=cols[j]; if (j > 0) { Vector c1(dim); - + c1(j)=1.0 ; c1(j-1)=-1.0 ; - lp.add_inequality_cons (c1, + lp.add_inequality_cons (c1, cols[j-1].width_[RIGHT] - cols[j].width_[LEFT]); } } @@ -288,11 +288,11 @@ Real Spring_spacer::calculate_energy_f (Vector solution) const { Real e = 0.0; - for (PCursor i (ideal_p_list_.top()); i.ok(); i++) + for (PCursor i (ideal_p_list_.top()); i.ok(); i++) { e += i->energy_f(solution(i->right_i_) - solution(i->left_i_)); } - + return e; } void @@ -318,27 +318,27 @@ Spring_spacer::solve (Col_hpositions*positions) const Mixed_qp lp (cols.size()); make_matrices (lp.quad,lp.lin, lp.const_term); - make_constraints (lp); + make_constraints (lp); set_fixed_cols (lp); - Vector start=find_initial_solution(); + Vector start=find_initial_solution(); Vector solution_vec (lp.solve (start)); positions->satisfies_constraints_b_ = check_constraints (solution_vec); - if (!positions->satisfies_constraints_b_) + if (!positions->satisfies_constraints_b_) { - WARN << "solution doesn't satisfy constraints.\n" ; + WARN << _("solution doesn't satisfy constraints.\n") ; } - position_loose_cols (solution_vec); + position_loose_cols (solution_vec); positions->energy_f_ = calculate_energy_f (solution_vec); positions->config = solution_vec; positions->error_col_l_arr_ = error_pcol_l_arr(); - + } /** add one column to the problem. -*/ +*/ void Spring_spacer::add_column (Paper_column *col, bool fixed, Real fixpos) { @@ -357,7 +357,7 @@ Spring_spacer::error_pcol_l_arr() const for (int i=0; i< cols.size(); i++) if (cols[i].ugh_b_) retval.push (cols[i].pcol_l_); - for (int i=0; i < loose_col_arr_.size(); i++) + for (int i=0; i < loose_col_arr_.size(); i++) { retval.push (loose_col_arr_[i].pcol_l_); } @@ -376,9 +376,9 @@ Spring_spacer::loosen_column (int i) j++; } c.ugh_b_ = true; - + int j=0; - for (; j < loose_col_arr_.size(); j++) + for (; j < loose_col_arr_.size(); j++) { if (loose_col_arr_[j].rank_i_ > c.rank_i_) break; @@ -391,7 +391,7 @@ void Spring_spacer::print() const { #ifndef NPRINT - for (int i=0; i < cols.size(); i++) + for (int i=0; i < cols.size(); i++) { DOUT << "col " << i<<' '; cols[i].print(); @@ -409,13 +409,13 @@ Spring_spacer::connect (int i, int j, Real d, Real h) { assert(d >= 0 && d <= 100 CM); assert(h >=0); - + Idealspacing * s = new Idealspacing; s->left_i_ = i; s->right_i_ = j; s->space_f_ = d; s->hooke_f_ = h; - + ideal_p_list_.bottom().add (s); } @@ -431,11 +431,11 @@ Spring_spacer::prepare() } Line_spacer* -Spring_spacer::constructor() +Spring_spacer::constructor() { return new Spring_spacer; } - + /** @@ -444,7 +444,7 @@ void Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, Array &context_shortest_arr) { - for (int i=0; i < cols.size(); i++) + for (int i=0; i < cols.size(); i++) scol_l (i)->preprocess(); int start_context_i=0; @@ -458,7 +458,7 @@ Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, if (scol_l (i)->breakable_b_) { - for (int ji=i; ji >= start_context_i; ji--) + for (int ji=i; ji >= start_context_i; ji--) context_shortest_arr[ji] = context_shortest; start_context_i = i; context_shortest = infinity_mom; @@ -473,22 +473,22 @@ Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, if (scol_l(ji)->durations.size() && now - scol_l(ji)->when() >= shortest_playing) break; - - for (int k = scol_l (ji)->durations.size(); - k-- && scol_l(ji)->durations[k] + scol_l(ji)->when() > now; - ) + + for (int k = scol_l (ji)->durations.size(); + k-- && scol_l(ji)->durations[k] + scol_l(ji)->when() > now; + ) { shortest_playing = shortest_playing durations[k]; } } shortest_playing_arr.push(shortest_playing); } - + #ifndef NPRINT DOUT << "shortest_playing/:[ "; for (int i=0; i < shortest_playing_arr.size(); i++) { - DOUT << shortest_playing_arr[i] << " "; + DOUT << shortest_playing_arr[i] << " "; DOUT << context_shortest_arr[i] << ", "; } DOUT << "]\n"; @@ -499,16 +499,16 @@ Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, generate springs between columns. UNDER DESTRUCTION - + TODO: This needs rethinking. Spacing should take optical effects into account, and should be local (measure wide) - The algorithm is taken from : + The algorithm is taken from : John S. Gourlay. ``Spacing a Line of Music,'' Technical Report OSU-CISRC-10/87-TR35, Department of Computer and Information Science, The Ohio State University, 1987. - + */ void Spring_spacer::calc_idealspacing() @@ -517,14 +517,14 @@ Spring_spacer::calc_idealspacing() Array context_shortest_arr; get_ruling_durations(shortest_playing_arr, context_shortest_arr); - + Array ideal_arr_; - Array hooke_arr_; + Array hooke_arr_; for (int i=0; i < cols.size(); i++){ ideal_arr_.push (-1.0); hooke_arr_.push (1.0); } - + for (int i=0; i < cols.size(); i++) { if (!scol_l (i)->musical_b()) @@ -544,7 +544,7 @@ Spring_spacer::calc_idealspacing() durational_distance = paper_l()->duration_to_dist (delta_t,k); symbol_distance += -cols[i+1].width_[LEFT]; } - + ideal_arr_[i] = symbol_distance >? durational_distance; hooke_arr_[i] = 2.0; } @@ -557,13 +557,13 @@ Spring_spacer::calc_idealspacing() Moment context_shortest = context_shortest_arr[i]; if (! shortest_playing_len) { - warning ("Can't find a ruling note at " + warning (_("Can't find a ruling note at ") +String (scol_l (i)->when())); shortest_playing_len = 1; } if (! context_shortest) { - warning("No minimum in measure at " + warning(_("No minimum in measure at ") + String (scol_l (i)->when())); context_shortest = 1; } @@ -571,7 +571,7 @@ Spring_spacer::calc_idealspacing() Real k= paper_l()->arithmetic_constant(context_shortest); Real dist = paper_l()->duration_to_dist (shortest_playing_len, k); dist *= delta_t / shortest_playing_len; - + /* all sorts of ugliness to avoid running into bars/clefs, but not taking extra space if this is not needed */ if (!scol_l (i+1)->musical_b()) diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 28df70b255..7f9abeeb83 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -43,10 +43,10 @@ Interval Staff_side::support_height() const { Interval r; - + for (int i=0; i < support_l_arr_.size(); i++) r.unite (support_l_arr_[i]->height()); - if (r.empty_b()) + if (r.empty_b()) { r = Interval (0,0); } @@ -63,33 +63,33 @@ Staff_side::add_support (Score_elem*i) int Staff_side::get_position_i() const { - if (!dir_) + if (!dir_) { - warning ("Staff_side::get_position_i(): " - "somebody forgot to set my vertical direction, returning -20"); + warning (_("Staff_side::get_position_i(): " + "somebody forgot to set my vertical direction, returning -20")); return -20; } - + Real y=0; Real inter_f = paper()-> internote_f (); - if (!inside_staff_b_) + if (!inside_staff_b_) { - y = (staff_sym_l_) ? dir_ * (staff_sym_l_->steps_i()/2 + 2) : -2; + y = (staff_sym_l_) ? dir_ * (staff_sym_l_->steps_i()/2 + 2) : -2; y *=inter_f; - + Interval v= support_height(); - if (dir_ > 0) + if (dir_ > 0) { y = y >? (v.max() + 2*inter_f); } - else if (dir_ < 0) + else if (dir_ < 0) { y = y spanner():0; diff --git a/lily/stem.cc b/lily/stem.cc index 324624b15a..64b737b93f 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -9,7 +9,7 @@ */ #include "stem.hh" -#include "dimen.hh" +#include "dimen.hh" #include "debug.hh" #include "paper-def.hh" #include "note-head.hh" @@ -24,7 +24,7 @@ const int STEMLEN=7; IMPLEMENT_IS_TYPE_B1 (Stem,Item); -Stem::Stem () +Stem::Stem () { /* TODO: staff-size @@ -59,7 +59,7 @@ Stem::max_head_i () const for (int i =0; i < head_l_arr_.size (); i++) m = m >? head_l_arr_[i]->position_i_; return m; - + } void @@ -72,7 +72,7 @@ Stem::do_print () const #endif } -Real +Real Stem::stem_length_f () const { return yextent_drul_[UP]-yextent_drul_[DOWN] ; @@ -95,9 +95,9 @@ void Stem::set_stemend (Real se) { // todo: margins - if (! ((dir_ > 0 && se >= max_head_i ()) || - (se <= min_head_i () && dir_ <0))) - warning ("Weird stem size; check for narrow beams"); + if (! ((dir_ > 0 && se >= max_head_i ()) || + (se <= min_head_i () && dir_ <0))) + warning (_("Weird stem size; check for narrow beams")); yextent_drul_[UP] = (dir_ < 0) ? max_head_i () : se; yextent_drul_[DOWN] = (dir_ < 0) ? se : min_head_i (); @@ -120,14 +120,14 @@ Stem::add (Rhythmic_head *n) else if (n->is_type_b (Rest::static_name ())) { rest_l_arr_.push ((Rest*)n); - } + } } bool Stem::invisible_b () const { - - return (!head_l_arr_.size () || + + return (!head_l_arr_.size () || head_l_arr_[0]->balltype_i_ <= 0); } @@ -162,7 +162,7 @@ Stem::get_default_dir () if (dir_) return dir_; return (get_center_distance_from_top () >= - get_center_distance_from_bottom ()) ? + get_center_distance_from_bottom ()) ? (Direction)-1 : (Direction)1; } @@ -179,7 +179,7 @@ Stem::set_default_stemlen () if (!dir_) set_default_dir (); - + Real dy = paper ()->interbeam_f (); Real len = STEMLEN; // ugh, should get nice *rule* for this @@ -187,14 +187,14 @@ Stem::set_default_stemlen () len += (abbrev_flag_i_ - 1)* dy / 2; set_stemend ((dir_ > 0) ? max_head_i () + len : min_head_i () - len); - + if (dir_ * stem_end_f () < 0) { set_stemend (0); } - - + + } void @@ -203,9 +203,9 @@ Stem::set_default_extents () if (!stem_length_f ()) set_default_stemlen (); - set_stemend ((dir_< 0) ? + set_stemend ((dir_< 0) ? max_head_i ()-stem_length_f (): min_head_i () + stem_length_f ()); - + if (dir_ == UP) stem_xdir_ = RIGHT; if (invisible_b ()) @@ -214,7 +214,7 @@ Stem::set_default_extents () /* TODO - + move into note_column.cc */ @@ -224,18 +224,18 @@ Stem::set_noteheads () if (!head_l_arr_.size ()) return; head_l_arr_.sort (Note_head::compare); - if (dir_ < 0) + if (dir_ < 0) head_l_arr_.reverse (); - + head_l_arr_[0]->extremal_i_ = -1; head_l_arr_.top ()->extremal_i_ = 1; int parity=1; int lastpos = head_l_arr_[0]->position_i_; - for (int i=1; i < head_l_arr_.size (); i ++) + for (int i=1; i < head_l_arr_.size (); i ++) { int dy =abs (lastpos- head_l_arr_[i]->position_i_); - - if (dy <= 1) + + if (dy <= 1) { if (parity) head_l_arr_[i]->x_dir_ = (stem_xdir_ == LEFT) ? LEFT : RIGHT; @@ -279,25 +279,25 @@ Stem::do_width () const } - + Molecule Stem::abbrev_mol () const { Real dy = paper ()->interbeam_f (); Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim_.x ().length (); Real beamdy = paper ()->interline_f () / 2; - + int beams_i = 0; Real slope = paper ()->internote_f () / 4; - + if (beam_l_) { // huh? slope = 2 * beam_l_->slope; // ugh, rather calc from Abbreviation_req - beams_i = beams_right_i_ >? beams_left_i_; + beams_i = beams_right_i_ >? beams_left_i_; } paper ()->lookup_l ()->beam (slope, 20 PT); - + Molecule beams; Atom a (paper ()->lookup_l ()->beam (slope, w)); a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope))); @@ -306,43 +306,43 @@ Stem::abbrev_mol () const a.translate_axis (dy + beamdy - dir_ * dy, Y_AXIS); else a.translate_axis (2 * beamdy - dir_ * (beamdy - dy), Y_AXIS); - - for (int i = 0; i < abbrev_flag_i_; i++) + + for (int i = 0; i < abbrev_flag_i_; i++) { Atom b (a); b.translate_axis (-dir_ * dy * (beams_i + i), Y_AXIS); beams.add (b); } - + return beams; } Molecule* -Stem::brew_molecule_p () const +Stem::brew_molecule_p () const { Molecule *mol_p =new Molecule; - + Real bot = yextent_drul_[DOWN]; Real top = yextent_drul_[UP]; - + assert (bot!=top); - + Paper_def *p =paper (); - + Real dy = p->internote_f (); if (!invisible_b ()) { Atom ss =p->lookup_l ()->stem (bot*dy,top*dy); mol_p->add (Atom (ss)); } - + if (!beam_l_ &&abs (flag_i_) > 2) { Atom fl = p->lookup_l ()->flag (flag_i_, dir_); mol_p->add_at_edge (Y_AXIS, dir_, Molecule (Atom (fl))); assert (!abbrev_flag_i_); } - + if (abbrev_flag_i_) mol_p->add (abbrev_mol ()); @@ -353,7 +353,7 @@ Stem::brew_molecule_p () const return mol_p; } -Real +Real Stem::note_delta_f () const { Real r=0; diff --git a/lily/symtable.cc b/lily/symtable.cc index f04ac53df5..16c48dfb5f 100644 --- a/lily/symtable.cc +++ b/lily/symtable.cc @@ -21,7 +21,7 @@ Symtables::Symtables() Symtables::Symtables (Symtables const &s) { - for (Assoc_iter i (s); i.ok(); i++) + for (Assoc_iter i (s); i.ok(); i++) { add (i.key(), new Symtable (*i.val ())); } @@ -29,40 +29,40 @@ Symtables::Symtables (Symtables const &s) Symtables::~Symtables() { - for (Assoc_iter i (*this); i.ok(); i++) + for (Assoc_iter i (*this); i.ok(); i++) { delete i.val(); } } -Atom +Atom Symtable::lookup (String s) const { if (elt_b (s)) return (*this)[s]; - else + else { - warning ("Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n"); - Atom sy; + warning ("Symtable `" + id_str+ _("\': unknown symbol `") +s+"'\n"); + Atom sy; return sy; } } -Symtable* -Symtables::operator()(String s) +Symtable* +Symtables::operator()(String s) { if (!elt_b (s)) { - warning ("Symtables `" + s + "\' unknown"); + warning ("Symtables `" + s + _("\' unknown")); return 0; } else return Dictionary::operator[](s); -} +} void Symtables::print() const { - for (Assoc_iter i (*this); i.ok(); i++) + for (Assoc_iter i (*this); i.ok(); i++) { DOUT << "table \'" << i.key() << "\' {\n"; i.val()->print (); @@ -72,12 +72,12 @@ Symtables::print() const void Symtable::print() const { - for (Assoc_iter i (*this); i.ok(); i++) + for (Assoc_iter i (*this); i.ok(); i++) { DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n"; } } - + void Symtables::add (String s, Symtable*p) { diff --git a/lily/tex-beam.cc b/lily/tex-beam.cc index c5b356a604..6553e17868 100644 --- a/lily/tex-beam.cc +++ b/lily/tex-beam.cc @@ -25,7 +25,7 @@ Lookup::beam_element (int sidx, int widx, Real slope) const { String name = String("slope"); Atom bs=(*symtables_)("beamslopes")->lookup (name); - + Array args; args.push (sidx); args.push (widx); @@ -41,7 +41,7 @@ Lookup::beam_element (int sidx, int widx, Real slope) const Atom Lookup::rule_symbol (Real height, Real width) const { - Atom bs=(*symtables_)("beamslopes")->lookup ("horizontal"); + Atom bs=(*symtables_)("beamslopes")->lookup ("horizontal"); Array args; args.push (print_dimen (height)); args.push (print_dimen (width)); @@ -53,34 +53,34 @@ Lookup::rule_symbol (Real height, Real width) const Atom Lookup::beam (Real &slope, Real width) const -{ +{ int sidx = 0; if (abs (slope) > 1.0) { - WARN << "beam steeper than 1.0 (" << slope << ")\n"; + WARN << _("beam steeper than 1.0 (") << slope << ")\n"; slope = sign (slope); } sidx = int (rint (slope * 20.0)); slope = sidx / 20.0; - + Interval xdims = (*symtables_)("beamslopes")->lookup ("slope").dim_[X_AXIS]; Real min_wid = xdims[LEFT]; Real max_wid = xdims[RIGHT]; assert(max_wid > 0); int widths = intlog2 (int (max_wid/min_wid)) + 1; - - if (width < min_wid) + + if (width < min_wid) { - WARN<<"Beam too narrow. (" << print_dimen (width) <<")\n"; + WARN<<_("Beam too narrow. (") << print_dimen (width) <<")\n"; width = min_wid; } - + Real elemwidth = max_wid; - + int widx =widths - 1; Molecule m; - while (elemwidth > width) + while (elemwidth > width) { widx --; elemwidth /= 2.0; @@ -90,7 +90,7 @@ Lookup::beam (Real &slope, Real width) const Real x = overlap; Atom elem (beam_element (sidx * widths, widx, slope)); m.add (elem); - while (x < last_x) + while (x < last_x) { Atom a(elem); a.translate (Offset (x-overlap, (x-overlap)*slope)); @@ -100,13 +100,11 @@ Lookup::beam (Real &slope, Real width) const Atom a(elem); a.translate (Offset (last_x, (last_x) * slope)); m.add (a); - + Atom ret; ret.tex_ = m.TeX_string(); ret.dim_.y() = Interval (0,width*slope); ret.dim_.x() = Interval (0,width); - + return ret; } - - diff --git a/lily/tex-slur.cc b/lily/tex-slur.cc index 8ea4ba4a5d..34cd12d5ef 100644 --- a/lily/tex-slur.cc +++ b/lily/tex-slur.cc @@ -42,19 +42,19 @@ Lookup::half_slur_middlepart (Real &dx, Direction dir) const // todo if (dx >= 400 PT) { - WARN<<"halfslur too large" <= 96 PT) + + if (dx >= 96 PT) { - WARN << "Slur half too wide." << print_dimen (orig_dx) << " shrinking (ugh)\n"; + WARN << _("Slur half too wide.") << print_dimen (orig_dx) << _(" shrinking (ugh)\n"); dx = 96 PT; } @@ -98,11 +98,11 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const dx = widx*12.0; if (widx) widx --; - else + else { - WARN << "slur too narrow " << print_dimen (orig_dx)<<"\n"; + WARN << _("slur too narrow ") << print_dimen (orig_dx)<<"\n"; } - + Atom s; s.dim_[X_AXIS] = Interval (0, dx); s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy)); @@ -121,38 +121,38 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const idx = widx * 16 + hidx; if (xpart < 0) idx += 128; - + assert (idx < 256); f+=String ("{") + String (idx) + "}"; - + s.tex_ = f; - + return s; } Atom Lookup::slur (int dy , Real &dx, Direction dir) const { - + assert (abs (dir) <= 1); if (dx < 0) { - warning ("Negative slur/tie length: " + print_dimen (dx)); + warning (_("Negative slur/tie length: ") + print_dimen (dx)); dx = 4.0 PT; } Direction y_sign = (Direction) sign (dy); bool large = abs (dy) > 8; - if (y_sign) + if (y_sign) { large |= dx>= 4*16 PT; } else large |= dx>= 4*54 PT; - - if (large) + + if (large) { return big_slur (dy, dx, dir); } @@ -161,20 +161,20 @@ Lookup::slur (int dy , Real &dx, Direction dir) const dx = 4.0 * widx; if (widx) widx --; - else + else { - WARN << "slur too narrow: " << print_dimen (orig_dx) << "\n"; + WARN << _("slur too narrow: ") << print_dimen (orig_dx) << "\n"; } int hidx = dy; if (hidx <0) hidx = -hidx; - hidx --; - if (hidx > 8) + hidx --; + if (hidx > 8) { - WARN<<"slur to steep: " << dy << " shrinking (ugh)\n"; + WARN<<_("slur to steep: ") << dy << _(" shrinking (ugh)\n"); } - + Atom s; s.dim_[X_AXIS] = Interval (0, dx); s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy)); @@ -182,44 +182,44 @@ Lookup::slur (int dy , Real &dx, Direction dir) const String f = String ("\\slurchar") + String (direction_char (y_sign)); int idx=-1; - if (y_sign) - { + if (y_sign) + { idx = hidx * 16 + widx; if (dir < 0) idx += 128; } - else + else { - if (dx >= 4*54 PT) + if (dx >= 4*54 PT) { - WARN << "slur too wide: " << print_dimen (dx) << - " shrinking (ugh)\n"; + WARN << _("slur too wide: ") << print_dimen (dx) << + _(" shrinking (ugh)\n"); dx = 4*54 PT; } idx = widx; if (dir < 0) - idx += 54; + idx += 54; } - + assert (idx < 256); f+=String ("{") + String (idx) + "}"; s.tex_ = f; s.translate_axis (dx/2, X_AXIS); - return s; + return s; } Atom Lookup::big_slur (int dy , Real &dx, Direction dir) const { - if (dx < 24 PT) + if (dx < 24 PT) { - warning ("big_slur too small " + print_dimen (dx) + " (stretching)"); + warning (_("big_slur too small ") + print_dimen (dx) + _(" (stretching)")); dx = 24 PT; } - - Real slur_extra =abs (dy) /2.0 + 2; + + Real slur_extra =abs (dy) /2.0 + 2; int l_dy = int (Real (dy)/2 + slur_extra*dir); int r_dy = dy - l_dy; @@ -228,8 +228,8 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const Real right_wid = left_wid; Atom l = half_slur (l_dy, left_wid, dir, -1); - - + + Atom r = half_slur (r_dy, right_wid, dir, 1); Real mid_wid = dx - left_wid - right_wid; @@ -245,5 +245,3 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const s.dim_ = mol.extent(); return s; } - - diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index 71ac2f6e2a..02c33a8707 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter (c) 1997 Han-Wen Nienhuys - + */ #include @@ -17,11 +17,11 @@ const int MAXLINELEN = 200; -Tex_stream::Tex_stream (String filename) +Tex_stream::Tex_stream (String filename) { os = new ofstream (filename.ch_C ()); if (!*os) - error ("can't open `" + filename+"\'"); + error (_("can't open `") + filename+"\'"); nest_level = 0; line_len_i_ = 0; outputting_comment=false; @@ -30,8 +30,8 @@ Tex_stream::Tex_stream (String filename) void Tex_stream::header() { - *os << "% Creator: " << get_version_str() << "\n"; - *os << "% Automatically generated, at "; + *os << _("% Creator: ") << get_version_str() << "\n"; + *os << _("% Automatically generated, at "); time_t t (time (0)); *os << ctime (&t)<<"\n"; } @@ -40,7 +40,7 @@ Tex_stream::~Tex_stream() *os << flush; if (!*os) { - warning("error syncing file (disk full?)"); + warning(_("error syncing file (disk full?)")); exit_status_i_ = 1; } delete os; @@ -51,13 +51,13 @@ Tex_stream::~Tex_stream() Tex_stream & Tex_stream::operator<<(String s) { - - for (char const *cp = s.ch_C (); *cp; cp++) + + for (char const *cp = s.ch_C (); *cp; cp++) { - if (outputting_comment) + if (outputting_comment) { *os << *cp; - if (*cp == '\n') + if (*cp == '\n') { outputting_comment=false; @@ -65,7 +65,7 @@ Tex_stream::operator<<(String s) continue; } line_len_i_ ++; - switch (*cp) + switch (*cp) { case '%': outputting_comment = true; @@ -73,27 +73,27 @@ Tex_stream::operator<<(String s) break; case '{': nest_level++; - *os << *cp; + *os << *cp; break; case '}': - nest_level--; + nest_level--; *os << *cp; - - if (nest_level < 0) + + if (nest_level < 0) { delete os; // we want to see the remains. assert (nest_level>=0); } /* FALLTHROUGH */ - + case '\n': break_line(); - break; + break; case ' ': *os << ' '; - if (line_len_i_ > MAXLINELEN) - break_line(); - + if (line_len_i_ > MAXLINELEN) + break_line(); + break; default: *os << *cp; @@ -110,4 +110,3 @@ Tex_stream::break_line() *os << String (' ', nest_level); line_len_i_ = 0; } - diff --git a/lily/tie-grav.cc b/lily/tie-grav.cc index 385de4ab05..ac7f776b50 100644 --- a/lily/tie-grav.cc +++ b/lily/tie-grav.cc @@ -27,7 +27,7 @@ Tie_engraver::Tie_engraver() void Tie_engraver::do_post_move_processing() { - if (tie_p_ && now_moment () == end_mom_) + if (tie_p_ && now_moment () == end_mom_) { end_tie_p_ = tie_p_; end_req_l_ = req_l_; @@ -49,7 +49,7 @@ Tie_engraver::do_try_request (Request*r) { if (!acceptable_request_b (r)) return false; - if (req_l_) + if (req_l_) { return false; } @@ -63,7 +63,7 @@ void Tie_engraver::do_process_requests() { dir_ = (Direction) int (get_property ("ydirection")); - if (req_l_ && ! tie_p_) + if (req_l_ && ! tie_p_) { tie_p_ = new Tie; } @@ -72,15 +72,15 @@ Tie_engraver::do_process_requests() void Tie_engraver::acknowledge_element (Score_elem_info i) { - if (i.elem_l_->name() == Note_head::static_name ()) + if (i.elem_l_->name() == Note_head::static_name ()) { - if (tie_p_) + if (tie_p_) { tie_p_->set_head (LEFT, (Note_head*)i.elem_l_->item()); melodic_req_l_ = i.req_l_->musical()->melodic (); } - if (end_tie_p_) + if (end_tie_p_) { end_tie_p_->set_head (RIGHT, (Note_head*)i.elem_l_->item()); if (!Melodic_req::compare (*end_melodic_req_l_, *melodic_req_l_)) @@ -93,11 +93,11 @@ Tie_engraver::acknowledge_element (Score_elem_info i) void Tie_engraver::do_pre_move_processing() { - if (end_tie_p_) + if (end_tie_p_) { if (dir_) end_tie_p_->dir_ = dir_; - + typeset_element (end_tie_p_); end_tie_p_ =0; end_req_l_ =0; @@ -108,9 +108,9 @@ void Tie_engraver::do_removal_processing () { do_pre_move_processing (); - if (tie_p_) + if (tie_p_) { - req_l_->warning ("unended Tie"); + req_l_->warning (_("unended Tie")); tie_p_->unlink (); delete tie_p_; } diff --git a/lily/tie.cc b/lily/tie.cc index c0564a0b97..f7ad34fea4 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -40,8 +40,8 @@ void Tie::do_add_processing() { if (!(head_l_drul_[LEFT] && head_l_drul_[RIGHT])) - warning ("Lonely tie.. "); - + warning (_("Lonely tie.. ")); + set_bounds(LEFT,head_l_drul_[LEFT]); set_bounds(RIGHT,head_l_drul_[RIGHT]); } @@ -53,16 +53,16 @@ Tie::do_post_processing() assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]); Direction d = LEFT; - do + do { - pos_i_drul_[d] = (head_l_drul_[d])? + pos_i_drul_[d] = (head_l_drul_[d])? head_l_drul_[d]->position_i_ : head_l_drul_[(Direction)-d]->position_i_; } while ((d *= -1) != LEFT); - do + do { - if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_) + if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_) { pos_i_drul_[d] += 2*dir_; dx_f_drul_[d] += d * 0.25; @@ -72,7 +72,7 @@ Tie::do_post_processing() else { pos_i_drul_[d] = pos_i_drul_[(Direction) -d]; - dx_f_drul_[d] = -d + dx_f_drul_[d] = -d *(spanned_drul_[d]->width ().length ()/nw_f -0.5); } } diff --git a/lily/time-description.cc b/lily/time-description.cc index 76e05b5f20..1294c6ca98 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -44,9 +44,9 @@ Time_description::OK() const void Time_description::set_cadenza (bool b) { - if (cadenza_b_ && !b) + if (cadenza_b_ && !b) { - if (whole_in_measure_) + if (whole_in_measure_) { bars_i_ ++; // should do? whole_in_measure_ = 0; @@ -72,8 +72,8 @@ Time_description::add (Moment dt) assert (dt >= Rational (0)); when_ += dt; whole_in_measure_ += dt; - - while (!cadenza_b_ && whole_in_measure_ >= whole_per_measure_) + + while (!cadenza_b_ && whole_in_measure_ >= whole_per_measure_) { whole_in_measure_ -= whole_per_measure_; bars_i_ ++; @@ -96,16 +96,16 @@ Time_description::allow_meter_change_b() /** retrieve error messages. - @return + @return error messages if not possible, "" if possible */ String Time_description::try_set_partial_str (Moment p) const { if (p whole_per_measure_) - return ("Partial measure too large"); + return (_("Partial measure too large")); return ""; } @@ -127,7 +127,7 @@ Time_description::compare (Time_description const &t1, Time_description const&t { int i = sign (t1.when_-t2.when_); - if (!i) + if (!i) { assert (t1.bars_i_==t2.bars_i_); assert (t1.one_beat_ == t2.one_beat_); @@ -143,4 +143,3 @@ Time_description::next_bar_moment() const { return when_ + barleft(); } - diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 8bb57faf35..44a61739f3 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -23,17 +23,17 @@ Timing_translator::do_try_request(Request*r) Command_req * c = r->command(); if (!(c && c->timing())) return false; - for (int i=0; i < timing_req_l_arr_.size (); i++) + for (int i=0; i < timing_req_l_arr_.size (); i++) { if (timing_req_l_arr_[i]->equal_b(r)) return true; - if (timing_req_l_arr_[i]->name() == r->name()) + if (timing_req_l_arr_[i]->name() == r->name()) { - r->warning ("conflicting timing request"); + r->warning (_("conflicting timing request")); return false; } } - + timing_req_l_arr_.push(c->timing()); return true; } @@ -42,63 +42,63 @@ Meter_change_req* Timing_translator::meter_req_l() const { Meter_change_req *m_l=0; - for (int i=0; !m_l && i < timing_req_l_arr_.size (); i++) + for (int i=0; !m_l && i < timing_req_l_arr_.size (); i++) { m_l=timing_req_l_arr_[i]->meterchange(); } - return m_l; + return m_l; } void Timing_translator::do_process_requests() { - for (int i=0; i < timing_req_l_arr_.size (); i++) + for (int i=0; i < timing_req_l_arr_.size (); i++) { Timing_req * tr_l = timing_req_l_arr_[i]; Meter_change_req *m_l = tr_l->meterchange(); - if (m_l) + if (m_l) { int b_i= m_l->beats_i_; int o_i = m_l->one_beat_i_; if (! time_.allow_meter_change_b()) - tr_l->warning ("Meter change not allowed here"); + tr_l->warning (_("Meter change not allowed here")); else { time_.set_meter (b_i, o_i); - default_grouping_ = + default_grouping_ = Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), b_i); } } - else if (tr_l->partial()) + else if (tr_l->partial()) { Moment m = tr_l->partial()->duration_; String error = time_.try_set_partial_str (m); - if (error.length_i ()) + if (error.length_i ()) { tr_l->warning (error); } - else + else time_.setpartial (m); } - else if (tr_l->barcheck()) + else if (tr_l->barcheck()) { - if (time_.whole_in_measure_) + if (time_.whole_in_measure_) { - tr_l ->warning ("Barcheck failed"); - + tr_l ->warning (_("Barcheck failed")); + time_.whole_in_measure_ = 0; // resync time_.error_b_ = true; } } - else if (tr_l->cadenza()) + else if (tr_l->cadenza()) { time_.set_cadenza (tr_l->cadenza()->on_b_); } - else if (tr_l->measuregrouping()) + else if (tr_l->measuregrouping()) { - default_grouping_ = + default_grouping_ = parse_grouping (tr_l->measuregrouping()->beat_i_arr_, tr_l->measuregrouping()->elt_length_arr_); @@ -111,9 +111,9 @@ void Timing_translator::do_pre_move_processing() { timing_req_l_arr_.set_size (0); - Global_translator *global_l = + Global_translator *global_l = daddy_trans_l_->ancestor_l (100)->global_l (); // ugh 100. - + if (!time_.cadenza_b_) global_l->add_moment_to_process (time_.next_bar_moment ()); } @@ -132,4 +132,3 @@ Timing_translator::do_post_move_processing() { time_.add (now_moment () - time_.when_); } - diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index b313340e5a..f39604f9ca 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -19,7 +19,7 @@ add_translator (Translator *t) { if (!global_translator_dict_p) global_translator_dict_p = new Dictionary; - + global_translator_dict_p->elem (t->name ()) = t; } @@ -31,6 +31,6 @@ get_translator_l (String s) return (*global_translator_dict_p)[s]; } - error ("Unknown translator `" + s +"\'"); + error (_("Unknown translator `") + s +"\'"); return 0; } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 5725a028c3..dfd31f8469 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -34,12 +34,12 @@ Translator_group::Translator_group() void Translator_group::check_removal() { - for (int i =0; i < group_l_arr ().size();) + for (int i =0; i < group_l_arr ().size();) { group_l_arr ()[i]->check_removal(); if (group_l_arr ()[i]->removable_b()) terminate_translator (group_l_arr ()[i]); - else + else i++; } } @@ -63,17 +63,17 @@ Translator_group::removable_b() const return !(iterator_count_ || group_l_arr ().size()); } -Translator_group * +Translator_group * Translator_group::find_existing_translator_l (String n, String id) { - if (is_alias_b (n) && (id_str_ == id || id.empty_b ())) + if (is_alias_b (n) && (id_str_ == id || id.empty_b ())) return this; Translator_group* r = 0; - for (int i =0; !r && i < group_l_arr ().size(); i++) + for (int i =0; !r && i < group_l_arr ().size(); i++) { r = group_l_arr ()[i]->find_existing_translator_l (n,id); } - + return r; } @@ -89,21 +89,21 @@ Translator_group::path_to_acceptable_translator (String type) const accepted_arr.push (t->group_l()); } - + for (int i=0; i < accepted_arr.size (); i++) if (accepted_arr[i]->type_str_ == type) { - Link_array retval; + Link_array retval; retval.push (accepted_arr[i]); return retval; } - - Link_array best_result; + + Link_array best_result; int best_depth= INT_MAX; for (int i=0; i < accepted_arr.size (); i++) { Translator_group * g = accepted_arr[i]; - + Link_array result = g->path_to_acceptable_translator (type); if (result.size () && result.size () < best_depth) @@ -122,15 +122,15 @@ Translator_group::find_create_translator_l (String n, String id) Translator_group * existing = find_existing_translator_l (n,id); if (existing) return existing; - + Link_array path = path_to_acceptable_translator (n); - + if (path.size ()) { Translator_group * current = this; // start at 1. The first one (index 0) will be us. - for (int i=0; i < path.size (); i++) + for (int i=0; i < path.size (); i++) { Translator_group * new_group = path[i]->clone ()->group_l (); current->add (new_group); @@ -139,13 +139,13 @@ Translator_group::find_create_translator_l (String n, String id) current->id_str_ = id; return current; } - + Translator_group *ret = 0; if (daddy_trans_l_) ret = daddy_trans_l_->find_create_translator_l (n,id); - else + else { - warning ("Can't find or create `" + n + "' called `" + id + "'\n"); + warning (_("Can't find or create `") + n + _("' called `") + id + "'\n"); ret =0; } return ret; @@ -174,7 +174,7 @@ Translator_group::ancestor_l (int level) { if (!level || !daddy_trans_l_) return this; - + return daddy_trans_l_->ancestor_l (level-1); } @@ -208,7 +208,7 @@ Translator_group::terminate_translator (Translator*r_l) DOUT << "Removing " << r_l->name() << " at " << now_moment () << "\n"; r_l->removal_processing(); Translator * trans_p =remove_translator_p (r_l); - + delete trans_p; } @@ -219,7 +219,7 @@ Translator_group::remove_translator_p (Translator*trans_l) Translator * t = trans_cur.remove_p(); /* For elegant design, we would do this too. Alas, it does not work yet.. - + t-> removal_processing (); */ t-> daddy_trans_l_ = 0; @@ -230,7 +230,7 @@ Translator_group::remove_translator_p (Translator*trans_l) Translator* Translator_group::get_simple_translator (char const *type) const { - for (int i=0; i < nongroup_l_arr ().size(); i++) + for (int i=0; i < nongroup_l_arr ().size(); i++) { if (nongroup_l_arr ()[i]->name() == type) return nongroup_l_arr ()[i]; @@ -257,7 +257,7 @@ Translator_group::get_default_interpreter() Translator*t = output_def_l ()->find_translator_l (accepts_str_arr_[0]); Translator_group * g= t->clone ()->group_l (); add (g); - + if (!g->is_bottom_translator_b ()) return g->get_default_interpreter (); else @@ -270,14 +270,14 @@ void Translator_group::each (Method_pointer method) { for (PCursor i (trans_p_list_.top ()); i.ok (); i++) - (i.ptr()->*method) (); + (i.ptr()->*method) (); } void Translator_group::each (Const_method_pointer method) const { for (PCursor i (trans_p_list_.top ()); i.ok (); i++) - (i.ptr()->*method) (); + (i.ptr()->*method) (); } void @@ -338,11 +338,11 @@ Translator_group::do_removal_processing () void Translator_group::do_add_processing () { - for (int i=0; i < consists_str_arr_.size(); i++) + for (int i=0; i < consists_str_arr_.size(); i++) { Translator * t = output_def_l ()->find_translator_l (consists_str_arr_[i]); if (!t) - warning ("Could not find `" +consists_str_arr_[i]+ "'"); + warning (_("Could not find `") +consists_str_arr_[i]+ "'"); else add (t->clone ()); } diff --git a/lily/word-wrap.cc b/lily/word-wrap.cc index 5f61be35d3..cc8710501e 100644 --- a/lily/word-wrap.cc +++ b/lily/word-wrap.cc @@ -13,9 +13,9 @@ #include "spring-spacer.hh" -/** el stupido. - - +/** el stupido. + + A Dynamic Programming type of algorithm similar to TeX's is in Gourlay_breaking @@ -24,14 +24,14 @@ Array Word_wrap::do_solve() const { problem_OK(); - + PCursor curcol (pscore_l_->col_p_list_.top()); Array breaking; Line_of_cols breakpoints (find_breaks()); assert (breakpoints.size()>=2); - int break_idx_i=0; - while (break_idx_i < breakpoints.size() -1) + int break_idx_i=0; + while (break_idx_i < breakpoints.size() -1) { Col_hpositions minimum; Col_hpositions current; @@ -42,9 +42,9 @@ Word_wrap::do_solve() const curcol++; // skip the breakable. break_idx_i++; - while (break_idx_i < breakpoints.size()) + while (break_idx_i < breakpoints.size()) { - + // add another measure. while (breakpoints[break_idx_i] != curcol.ptr()) { @@ -56,22 +56,22 @@ Word_wrap::do_solve() const current.spacer_l_ = generate_spacing_problem (current.cols); // try to solve - if (!feasible (current.cols)) + if (!feasible (current.cols)) { - if (!minimum.cols.size()) + if (!minimum.cols.size()) { - warning ("Ugh, this measure is too long, breakpoint: " + warning (_("Ugh, this measure is too long, breakpoint: ") + String (break_idx_i) + - " (generating stupido solution)"); + _(" (generating stupido solution)")); current.stupid_solution(); current.energy_f_ = - 1; // make sure we break out. } else current.energy_f_ = infinity_f; // make sure we go back } - else + else { - + current.solve_line(); current.print(); } @@ -80,7 +80,7 @@ Word_wrap::do_solve() const current.spacer_l_ =0; // update minimum, or backup. - if (current.energy_f_ < minimum.energy_f_ || current.energy_f_ < 0) + if (current.energy_f_ < minimum.energy_f_ || current.energy_f_ < 0) { minimum = current; } diff --git a/make/lelievijver.lsm b/make/lelievijver.lsm index 0ea5e5d258..a9d7d16bae 100644 --- a/make/lelievijver.lsm +++ b/make/lelievijver.lsm @@ -1,7 +1,7 @@ Begin3 Titel: LilyPond -Versie: 0.1.23 -Inschrijf datum: 15OCT97 +Versie: 0.1.24 +Inschrijf datum: 20OCT97 Beschrijving: LilyPond is de muziek typesetter van het GNU Project. Het programma genereert muziek in zichtbare of hoorbare vorm uit uit een muzikale definitie file: @@ -16,8 +16,8 @@ Auteur: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 395k lilypond-0.1.23.tar.gz + 395k lilypond-0.1.24.tar.gz Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/ - 395k lilypond-0.1.23.tar.gz + 395k lilypond-0.1.24.tar.gz Copi"eer politie: GPL End diff --git a/make/lilypond.lsm b/make/lilypond.lsm index d38fbdc838..95fbefe271 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 0.1.23 -Entered-date: 15OCT97 +Version: 0.1.24 +Entered-date: 20OCT97 Description: LilyPond is the GNU Project music typesetter. The program generates visual or auditive output from a music definition file: it can typeset formatted sheet music @@ -9,13 +9,13 @@ Description: LilyPond is the GNU Project music typesetter. The program MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -Keywords: music typesetting midi notation +Keywords: music notation typesetting midi Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps - 395k lilypond-0.1.23.tar.gz + 430k lilypond-0.1.24.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/ - 395k lilypond-0.1.23.tar.gz + 430k lilypond-0.1.24.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.lsm.in b/make/lilypond.lsm.in index 0b0c6355e4..fe77c29887 100644 --- a/make/lilypond.lsm.in +++ b/make/lilypond.lsm.in @@ -9,13 +9,13 @@ Description: LilyPond is the GNU Project music typesetter. The program MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -Keywords: music typesetting midi notation +Keywords: music notation typesetting midi Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps - 395k lilypond-@TOPLEVEL_VERSION@.tar.gz + 430k lilypond-@TOPLEVEL_VERSION@.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/ - 395k lilypond-@TOPLEVEL_VERSION@.tar.gz + 430k lilypond-@TOPLEVEL_VERSION@.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.spec b/make/lilypond.spec index ee21c49a31..147b27640a 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.1.23 +Version: 0.1.24 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.23.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.24.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index a7995d6ee1..575c4943fc 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -1,51 +1,47 @@ % flags % - fet_begingroup("floogbars") -save flag_angle, flare; -save hip_thickness, hip_depth, hip_width; -save foot_thickness, foot_depth, foot_width; - -flag_angle = 32; - -hip_thickness# = 1.2 stafflinethickness#; -foot_thickness# = blot_diameter#; -flare# = 1.0 interline#; - -hip_depth# = 15/7 interline#; -hip_width# = 7/8 interline# + hip_thickness# /2 + stemthickness#/2; +% Flags pointing down overlap with the notehead (in x-direction), so +% the down-flag can be bigger +upflag_width# = .750 black_notehead_width#; +downflag_width# = .833 black_notehead_width#; -foot_depth# = flare# + 15/7 interline#; -foot_width# = .8 hip_width#; - - -define_pixels(flare, - hip_depth, hip_width, hip_thickness, - foot_depth, foot_width, foot_thickness -); +% +% Flags pointing down cannot overlap with the notehead in y-direction, +% so they have less slant. -%treq; +% +% Because of optical illusion, the utmost flag +% (bottom for down-pointing, top +% for up-pointing) should be smaller than the other flags +% +save hip_thickness, foot_thickness; +hip_thickness# = 1.3 stemthickness#; +foot_thickness# = hip_thickness#; % -% Inspired by Adobe Sonata, +% Inspired by Adobe Sonata and [Wanske] % for example, see POSTSCRIPT Language -- program design, -% page 119 +% page 119, and [Wanske], p 41,42 % -def draw_eight_flag = - penpos0(stemthickness, 0); +def draw_flag(expr center, flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness, flagcut) = + clearxy; + penpos1(flare, 90); - penpos2(hip_thickness, 0); + penpos2(whatever, 40); + x2r - x2l = hip_thickness; penpos3(foot_thickness, 0) ; - penpos4(stemthickness, 0); - z0r = z1r; - z0 = (0,0); - z2 = (hip_width, -hip_depth); - z3 = (foot_width, -foot_depth); - z4r = z1l; + z1r = center; + z2 = center + (hip_width, -flare - hip_depth); + z3orig = center + (foot_width, -flare - foot_depth); + z3 = (1-flagcut) [z2, z3orig]; + save bot_dir, bot_path; pair bot_dir; @@ -53,30 +49,146 @@ def draw_eight_flag = bot_path := z2{down} .. z3; bot_dir := direction 1 of bot_path; - fill z1l{dir -flag_angle} .. z2l{down} .. + fill z1l{curl 0} + ..tension 1.1 .. z2l .. z3l{bot_dir} .. z3r{-bot_dir} .. - {up}z2r .. {up}z1r .. - z0l{down} -- z4l -- cycle; - - ; - + z2r .. {up}z1r & z1r -- cycle; enddef; + +% godbewaarme, wat een kutsymbolen fet_beginchar("8th Flag (up)", "3u", "eighthflag") - set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2, - foot_depth# + foot_thickness#/2, stemthickness#/2) - draw_eight_flag; - penlabels(0, 1, 2, 3, 4); + save flare, + hip_depth, hip_width, + foot_depth, foot_width; + + flare# = 1.0 interline#; + hip_depth# = 8/15 foot_depth#; + hip_width# = upflag_width# - hip_thickness#/2; + + foot_depth# = 15/7 interline#; + foot_width# = .8 hip_width#; + + set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2 + + stemthickness#/2, + flare# + foot_depth# + foot_thickness#/2, stemthickness#/2) + + define_pixels(flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness); + draw_flag((stemthickness/2,0), flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness, 0) + ; + penlabels(1, 2, 3); + pickup pencircle scaled stemthickness; + draw (0, 0) .. (0,-2 interline); fet_endchar; fet_beginchar("8th Flag (down)", "3d", "deighthflag") - set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2, - foot_depth# + foot_thickness#/2, stemthickness#/2) + save flare, + hip_depth, hip_width, + foot_depth, foot_width; + + flare# = 1.0 interline#; + + hip_depth# = 8/15 foot_depth#; + hip_width# = downflag_width# - hip_thickness#/2; + foot_depth# = 15/7 interline#; + foot_width# = .8 hip_width#; + + set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2 + + stemthickness#/2, + flare# + foot_depth# + foot_thickness#/2, stemthickness#/2) + + define_pixels(flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness); + + draw_flag((stemthickness/2,0),flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness, 0); + pickup pencircle scaled stemthickness; + draw (0, 0) .. (0,-2 interline); + + y_mirror_char; +fet_endchar; + + +fet_beginchar("16th Flag (up)", "4u", "sixteenthflag") + save flare, flagspace, + hip_depth, hip_width, + foot_depth, foot_width; + + flare# = 0.85 interline#; + flagspace# = .85 interline#; + hip_depth# = 8/15 foot_depth#; + + flagspace# + flare# + foot_depth# = 3.25 interline#; + + hip_width# = upflag_width# - hip_thickness#/2; + foot_width# = .8 hip_width#; + + set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2 + + stemthickness#/2, + 3.25 interline#, stemthickness#/2) + + define_pixels(flagspace); + define_pixels(flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness); + + draw_flag((stemthickness/2, 0),flare, + 1.2 hip_depth, .97 hip_width, hip_thickness, + foot_depth, .9 foot_width, foot_thickness, 0.37); + draw_flag((stemthickness/2, -flagspace),flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness, 0); + + pickup pencircle scaled stemthickness; + draw (0, 0) .. (0,-2 interline); + +fet_endchar; + + +fet_beginchar("16th Flag (up)", "4d", "dsixteenthflag") + save flare, flagspace, + hip_depth, hip_width, + foot_depth, foot_width; + + flare# = 0.87 interline#; + flagspace# = .9 interline#; + hip_depth# = .7 foot_depth#; + + flagspace# + flare# + foot_depth# = 3 interline#; + + hip_width# = downflag_width# - hip_thickness#/2; + + foot_width# = 1.00 hip_width#; + + set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2 + + stemthickness#/2, + 3 interline#, stemthickness#/2) + + define_pixels(flagspace); + define_pixels(flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness); + + draw_flag((stemthickness/2, 0),flare, + hip_depth, .97 hip_width, hip_thickness, + 1.2 foot_depth, .95 foot_width, foot_thickness, 0.0); + + draw_flag((stemthickness/2, -flagspace),flare, + hip_depth, hip_width, hip_thickness, + foot_depth, foot_width, foot_thickness, 0); + + pickup pencircle scaled stemthickness; + draw (0, 0) .. (0,-2 interline); - draw_eight_flag; y_mirror_char; fet_endchar; -fet_endgroup("floogbars") +fet_endgroup("floogbars"); diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index d558cf751a..c9ffb7ca37 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -6,14 +6,14 @@ % These examples are inspired by [Wanske], see literature list +save black_notehead_width; +numeric black_notehead_width; + fet_begingroup("balls"); noteheight#:=interline#+ (1 + overdone_heads) *stafflinethickness#; - define_pixels(noteheight); - - def draw_brevis = save beamheight, head_width; save holeheight, stem_width; @@ -191,6 +191,7 @@ fet_beginchar("Quart notehead", "2", "quartball") a_w:=1.09; notehead_calc; + black_notehead_width# := wd#; notehead_draw; fet_endchar; @@ -199,3 +200,4 @@ fet_endchar; fet_endgroup("balls"); +define_pixels(black_notehead_width); diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 47c8223f98..798782d5d4 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -1,7 +1,5 @@ -test:=0; - if test = -1: mode := smoke; fi @@ -26,6 +24,6 @@ if test = 0: input feta-schrift; input feta-banier; else: - - input feta-schrift; + input feta-bolletjes; + input feta-banier; fi diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 8c9d7d795d..d6127a7678 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -359,7 +359,7 @@ enddef; fet_beginchar("Trill (`tr')","trill","trill") - save start_angle, ascender_extra, ex, hair_thick, fatness, + save start_nib_angle, ascender_extra, ex, hair_thick, fatness, slant_angle, slant, t_fatness, r_fatness, kerning, t_overshoot, uitschieter, bulb_size; ; @@ -369,6 +369,7 @@ fet_beginchar("Trill (`tr')","trill","trill") ascender# = ascender_extra# + ex#; ex# = 1.5 interline#; kerning# = .75 ex#; + start_nib_angle = 20; define_pixels(ex, ascender_extra, ascender, kerning); @@ -387,10 +388,10 @@ fet_beginchar("Trill (`tr')","trill","trill") y1 = ascender; x1l = 0; x1r = t_fatness; - penpos1(start_nib_wid, 25); + penpos1(start_nib_wid, start_nib_angle); z2 = (x1, 7/18 ex); - penpos2(start_nib_wid, 25); + penpos2(start_nib_wid, start_nib_angle); z3l = (11/10 t_fatness, - t_overshoot); diff --git a/mf/feta-test16.mf b/mf/feta-test16.mf new file mode 100644 index 0000000000..8ae67312f7 --- /dev/null +++ b/mf/feta-test16.mf @@ -0,0 +1,20 @@ +% feta-test16 +% part of LilyPond's pretty-but-neat music font + +% font_identifier:="font-en-tja16"; +% font_size 16pt#; + +input autometric; +fet_beginfont("feta-test", 16); +staffsize#:=16pt#; +test:=1; + +% smoked cheese +%test := -1; + +input feta-generic; + +fet_endfont("font-en-tja"); + +end. + diff --git a/mf/font-en-tja16.mf b/mf/font-en-tja16.mf index 8cd1246313..7f6f13f37b 100644 --- a/mf/font-en-tja16.mf +++ b/mf/font-en-tja16.mf @@ -7,6 +7,8 @@ input autometric; fet_beginfont("font-en-tja", 16); staffsize#:=16pt#; +test:=0; + input feta-generic; diff --git a/mf/font-en-tja20.mf b/mf/font-en-tja20.mf index d1f600ff46..739ed09657 100644 --- a/mf/font-en-tja20.mf +++ b/mf/font-en-tja20.mf @@ -6,6 +6,7 @@ staffsize#:=20pt#; input autometric; fet_beginfont("font-en-tja", 20); +test := 0; input feta-generic; diff --git a/mf/foo.mf b/mf/foo.mf deleted file mode 100644 index 6bd9b647f7..0000000000 --- a/mf/foo.mf +++ /dev/null @@ -1,22 +0,0 @@ - -def simple_serif(expr p,q, a)= - p{dir(angle(q-p) -a)} .. q{ - dir(angle(p -q) + a)} -enddef; -% -% Accidentals from various sources, notably -% -% Baerenreiter edition of Schuberts `Auf dem Strom' (sharp, natural, flat) -% F Hofmeister edition of Muellers `Etueden fuer Horn' (double sharp) -% - - -%tracingall; -%proofing := 2; -%\tracingequations:= tracingonline := 1; - -fet_begingroup("accidentals"); - - - -fet_endgroup("accidentals"); - diff --git a/mi2mu/main.cc b/mi2mu/main.cc index fd9bcdc0c7..28cf48688a 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -36,7 +36,7 @@ void usage() { LOGOUT(NORMAL_ver) << - "Usage: mi2mu [options] midi-file\n" + _("Usage: mi2mu [options] midi-file\n" "Translate midi-file to mudela\n" "\n" "Options:\n" @@ -52,7 +52,7 @@ usage() " -s, --smallest=N assume no shorter (reciprocal) durations than N\n" " -v, --verbose be verbose\n" " -w, --warranty show warranty and copyright\n" - " -x, --no-double-dots assume no double dotted notes\n" + " -x, --no-double-dots assume no double dotted notes\n") ; } @@ -61,12 +61,12 @@ identify() { LOGOUT(NORMAL_ver) << mi2mu_version_str() << endl; } - -void + +void notice() { LOGOUT(NORMAL_ver) << - "\n" + _("\n" "Mi2mu, translate midi to mudela.\n" "Copyright (C) 1997 by\n" " Jan Nieuwenhuizen \n" @@ -84,16 +84,16 @@ notice() " You should have received a copy (refer to the file COPYING) of the\n" "GNU General Public License along with this program; if not, write to\n" "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n" - "USA.\n"; + "USA.\n"); } int main (int argc_i, char* argv_sz_a[]) { Mudela_key key (0, 0); - rat_printer = print_rat; + rat_printer = print_rat; - Long_option_init long_option_init_a[] = + Long_option_init long_option_init_a[] = { {0, "no-quantify", 'b'}, {0, "debug", 'd'}, @@ -113,7 +113,7 @@ main (int argc_i, char* argv_sz_a[]) String output_str; while (Long_option_init const* long_option_init_p = getopt_long()) - switch (long_option_init_p->shortname) + switch (long_option_init_p->shortname) { case 'b': Duration_convert::no_quantify_b_s = true; @@ -130,7 +130,7 @@ main (int argc_i, char* argv_sz_a[]) // path->push (getopt_long.optional_argument_ch_C_); // break; case 'k': - { + { String str = getopt_long.optional_argument_ch_C_; int i = str.index_i (':'); i = (i >=0 ? i : str.length_i ()); @@ -152,16 +152,16 @@ main (int argc_i, char* argv_sz_a[]) case 'q': level_ver = QUIET_ver; break; - case 's': + case 's': { int i = String_convert::dec2_i (getopt_long.optional_argument_ch_C_); - if (!i) + if (!i) { identify(); usage(); exit (2); //usage } - Duration_convert::no_smaller_than_i_s = + Duration_convert::no_smaller_than_i_s = Duration_convert::i2_type(i); } break; @@ -180,7 +180,7 @@ main (int argc_i, char* argv_sz_a[]) assert (0); break; } - + // flag -q must be checked first identify(); @@ -189,7 +189,7 @@ main (int argc_i, char* argv_sz_a[]) source.set_path (&path); char const* arg_sz = 0; - while ( (arg_sz = getopt_long.get_next_arg ())) + while ( (arg_sz = getopt_long.get_next_arg ())) { filename_str_g = arg_sz; Midi_score_parser midi_parser; @@ -203,7 +203,7 @@ main (int argc_i, char* argv_sz_a[]) mudela_score_l_g = score_p; score_p->process(); - if (!output_str.length_i ()) + if (!output_str.length_i ()) { String d, dir, base, ext; split_path (arg_sz, d, dir, base, ext); diff --git a/mi2mu/midi-parser.cc b/mi2mu/midi-parser.cc index 7eb350dbdc..f1b71122e1 100644 --- a/mi2mu/midi-parser.cc +++ b/mi2mu/midi-parser.cc @@ -60,9 +60,9 @@ String Midi_parser::get_str (int n) { assert (n >= 0); - if (!n) - warning ("Zero length string encountered"); - + if (!n) + warning (_("Zero length string encountered")); + Byte const* p = forward_byte_L (n); return String (p, n); } @@ -87,7 +87,7 @@ Midi_parser::get_var_i () String Midi_parser::message (String str) { - return String ("mi2mu: ") + return String ("mi2mu: ") + info_l_->source_l_->name_str () + ": " + String_convert::i2dec_str (info_l_->source_l_->line_i ((char const*)info_l_->byte_L_), 0, 0) + ": " + str + "\n" @@ -97,5 +97,5 @@ Midi_parser::message (String str) void Midi_parser::warning (String str) { - ::message (message (String ("warning: ") + str)); + ::message (message (String (_("warning: ")) + str)); } diff --git a/mi2mu/midi-score-parser.cc b/mi2mu/midi-score-parser.cc index a12c135cb0..7a787d062f 100644 --- a/mi2mu/midi-score-parser.cc +++ b/mi2mu/midi-score-parser.cc @@ -1,5 +1,5 @@ /* - midi-score-parser.cc -- implement + midi-score-parser.cc -- implement source file of the GNU LilyPond music typesetter @@ -21,7 +21,7 @@ Midi_score_parser::open (String filename_str, Sources* sources_l) { info_l_->source_l_ = sources_l->get_file_l (filename_str); if (!info_l_->source_l_) - ::error ("can't find: `" + filename_str + "'"); + ::error (_("can't find: `") + filename_str + "'"); info_l_->byte_L_ = (Byte const*)info_l_->source_l_->ch_C (); // info_l_->end_byte_L_ = info_l_->byte_L_ + info_l_->source_l_->length_i (); info_l_->end_byte_L_ = info_l_->byte_L_ + info_l_->source_l_->length_i () + 1; @@ -42,21 +42,21 @@ Midi_score_parser::parse_header () { String str = get_str (4); if ( str != "MThd" ) - exit ("MIDI header expected"); + exit (_("MIDI header expected")); int length_i = get_i (4); // is this signed? if (length_i < 6) - exit ("Invalid header length"); + exit (_("Invalid header length")); info_l_->format_i_ = get_i (2); if (info_l_->format_i_ != 0 && info_l_->format_i_ != 1) - exit ("Invalid midi format"); + exit (_("Invalid midi format")); info_l_->tracks_i_ = get_i (2); if (info_l_->tracks_i_ < 0 || info_l_->tracks_i_ > 32 ) - exit ("Invalid number of tracks"); + exit (_("Invalid number of tracks")); info_l_->division_1_i_ = get_i (2) * 4; if (info_l_->division_1_i_ < 0) - exit ("Cannot handle non-metrical time"); + exit (_("Cannot handle non-metrical time")); // ugh Duration::division_1_i_s = info_l_->division_1_i_; forward_byte_L (length_i - 6); @@ -77,7 +77,7 @@ Midi_score_parser::find_earliest_i (Link_array& tracks) } return earliest_i; } - + Mudela_score* Midi_score_parser::parse_score () { @@ -92,14 +92,14 @@ Midi_score_parser::parse_score () for (int i = 0; i < info_l_->tracks_i_; i++) tracks.push (new Midi_track_parser (info_l_, i)); - LOGOUT (NORMAL_ver) << "Parsing...\n"; + LOGOUT (NORMAL_ver) << _("Parsing...\n"); while (tracks.size ()) { int i = find_earliest_i (tracks); Moment at_mom = tracks [i]->at_mom (); Mudela_column* column_l = score_p->get_column_l (at_mom); Mudela_staff* staff_p = tracks [i]->parse (column_l); - if ( staff_p ) + if ( staff_p ) { score_p->add_staff (staff_p); delete tracks [i]; @@ -109,15 +109,14 @@ Midi_score_parser::parse_score () // brr, musta have some progress for (int ii = 0; !info_l_->bar_mom_ && ii < tracks.size (); ii++) info_l_->bar_mom_ = tracks [ii]->info_l_->bar_mom_; - - int bar_i = (int) (at_mom + + int bar_i = (int) (at_mom / (info_l_->bar_mom_ ? info_l_->bar_mom_ : bar4_mom)) + 1; - if (bar_i > current_bar_i) + if (bar_i > current_bar_i) { - LOGOUT (NORMAL_ver) << '[' << bar_i << ']' << flush; + LOGOUT (NORMAL_ver) << '[' << bar_i << ']' << flush; current_bar_i = bar_i; } } return score_p; } - diff --git a/mi2mu/midi-track-parser.cc b/mi2mu/midi-track-parser.cc index d38e57e97d..fd87d2a7e9 100644 --- a/mi2mu/midi-track-parser.cc +++ b/mi2mu/midi-track-parser.cc @@ -1,5 +1,5 @@ /* - midi-track-parser.cc -- implement + midi-track-parser.cc -- implement source file of the GNU LilyPond music typesetter @@ -53,9 +53,9 @@ Midi_track_parser::note_end (Mudela_column* col_l, int channel_i, int pitch_i, i assert (col_l); - for (PCursor i (open_note_l_list_.top ()); i.ok (); ) + for (PCursor i (open_note_l_list_.top ()); i.ok (); ) { - if ((i->pitch_i_ == pitch_i) && (i->channel_i_ == channel_i)) + if ((i->pitch_i_ == pitch_i) && (i->channel_i_ == channel_i)) { i->end_column_l_ = col_l; // LOGOUT(DEBUG_ver) << "Note: " << pitch_i; @@ -67,17 +67,17 @@ Midi_track_parser::note_end (Mudela_column* col_l, int channel_i, int pitch_i, i else i++; } - warning (String ("junking note-end event: ") - + " channel = " + String_convert::i2dec_str (channel_i, 0, ' ') - + ", pitch = " + String_convert::i2dec_str (pitch_i, 0, ' ')); + warning (String (_("junking note-end event: ")) + + _(" channel = ") + String_convert::i2dec_str (channel_i, 0, ' ') + + _(", pitch = ") + String_convert::i2dec_str (pitch_i, 0, ' ')); } void -Midi_track_parser::note_end_all (Mudela_column* col_l) +Midi_track_parser::note_end_all (Mudela_column* col_l) { - // find + // find assert (col_l); - for (PCursor i (open_note_l_list_.top ()); i.ok (); ) + for (PCursor i (open_note_l_list_.top ()); i.ok (); ) { i->end_column_l_ = col_l; i.remove_p (); @@ -112,18 +112,18 @@ Midi_track_parser::parse_delta_time () if (eot ()) return; int delta_i = get_var_i (); - at_mom_ += Moment (delta_i, info_l_->division_1_i_); + at_mom_ += Moment (delta_i, info_l_->division_1_i_); } Mudela_item* Midi_track_parser::parse_event (Mudela_column* col_l) -{ +{ Byte byte = peek_byte (); // RUNNING_STATUS [\x00-\x5f] - if (byte <= 0x5f) + if (byte <= 0x5f) { - if (running_byte_ <= 0x5f) - exit ("Invalid running status"); + if (running_byte_ <= 0x5f) + exit (_("Invalid running status")); /* 'running status' rather means 'missing status'. we'll just pretend we read the running status byte. @@ -163,7 +163,7 @@ Midi_track_parser::parse_event (Mudela_column* col_l) int pitch_i = (int)next_byte (); int dyn_i = (int)next_byte (); /* - sss: some broken devices encode NOTE_OFF as + sss: some broken devices encode NOTE_OFF as NOTE_ON with zero volume */ if (dyn_i) @@ -233,7 +233,7 @@ Midi_track_parser::parse_event (Mudela_column* col_l) next_byte (); get_i (2); } - // YYTEXT [\x01] + // YYTEXT [\x01] // YYCOPYRIGHT [\x02] // YYTRACK_NAME [\x03] // YYINSTRUMENT_NAME [\x04] @@ -249,7 +249,7 @@ Midi_track_parser::parse_event (Mudela_column* col_l) Mudela_text::Type t = (Mudela_text::Type)byte; Mudela_text* p = new Mudela_text (t, str); item_p = p; - if (t == Mudela_text::COPYRIGHT) + if (t == Mudela_text::COPYRIGHT) mudela_staff_p_->copyright_str_ = p->text_str_; else if (t == Mudela_text::TRACK_NAME) mudela_staff_p_->name_str_ = p->text_str_; @@ -324,12 +324,12 @@ Midi_track_parser::parse_event (Mudela_column* col_l) { next_byte (); next_byte (); - warning ("Unimplemented MIDI meta-event"); + warning (_("Unimplemented MIDI meta-event")); } } } else - exit ("Invalid MIDI event"); + exit (_("Invalid MIDI event")); if (item_p) item_p->mudela_column_l_ = col_l; @@ -341,15 +341,15 @@ Midi_track_parser::parse_event (Mudela_column* col_l) void Midi_track_parser::parse_header () -{ +{ String str = get_str (4); if ( str != "MTrk" ) - exit ("MIDI track expected"); + exit (_("MIDI track expected")); int length_i = get_i (4); // is this signed? if (length_i < 0) - exit ("Invalid track length"); + exit (_("Invalid track length")); assert (!track_info_p_); track_info_p_ = new Midi_parser_info (*info_l_); track_info_p_->end_byte_L_ = track_info_p_->byte_L_ + length_i; @@ -357,4 +357,3 @@ Midi_track_parser::parse_header () // forward_byte_L (length_i-1); info_l_ = track_info_p_; } - diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index 4e3e3f0b43..b21d2acc2f 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -51,12 +51,12 @@ Mudela_key::str () else key_i = ((-accidentals_i_ % 7)[ "cfbeadg" ] - 'a' - 2) % 7; String str = "\\key "; - if (!minor_i_) + if (!minor_i_) str += String ((char) ((key_i + 2) % 7 + 'A')); else // heu, -2: should be - 1 1/2: A -> fis str += String ((char) ((key_i + 2 - 2) % 7 + 'a')); str = String ("% \"") + str - + String ('"') + "; % not supported yet\n"; + + String ('"') + _("; % not supported yet\n"); return str; } @@ -70,10 +70,10 @@ Mudela_key::notename_str (int pitch_i) // minor scale: la-la (= + 5) static int notename_i_a[ 12 ] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 }; int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; - + static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; - if (accidental_i && (accidentals_i_ < 0)) + if (accidental_i && (accidentals_i_ < 0)) { accidental_i = - accidental_i; notename_i = (notename_i + 1) % 7; @@ -101,10 +101,10 @@ Mudela_meter::Mudela_meter (int num_i, int den_i, int clocks_4_i, int count_32_i sync_dur_.durlog_i_ = 3; sync_f_ = 1.0; if (count_32_i != 8) - warning (String ("#32 in quarter: ") + String (count_32_i)); + warning (String (_("#32 in quarter: ")) + String (count_32_i)); num_i_ = num_i; den_i_ = den_i; - clocks_1_i_ = clocks_4_i * 4; + clocks_1_i_ = clocks_4_i * 4; } Moment @@ -137,7 +137,7 @@ String Mudela_meter::str () { String str = "\\meter " - + String (num_i_) + "/" + String (1 << den_i_) + + String (num_i_) + "/" + String (1 << den_i_) + ";\n"; return str; } @@ -145,9 +145,9 @@ Mudela_meter::str () // statics Mudela_note /* - this switch can be used to write simple plets like - c4*2/3 - as + this switch can be used to write simple plets like + c4*2/3 + as \plet 2/3; c4 \plet 1/1; */ bool const Mudela_note::simple_plet_b_s = true; @@ -158,7 +158,7 @@ Mudela_note::Mudela_note (Mudela_column* mudela_column_l, int channel_i, int pit // junk dynamics (void)dyn_i; channel_i_ = channel_i; - pitch_i_ = pitch_i; + pitch_i_ = pitch_i; end_column_l_ = 0; } @@ -186,7 +186,7 @@ Mudela_note::str () if (dur.durlog_i_ < -10) return ""; - String name_str + String name_str = mudela_column_l_->mudela_score_l_->mudela_key_l_->notename_str (pitch_i_); if (simple_plet_b_s) @@ -263,7 +263,7 @@ Mudela_tempo::str () return str; } -int +int Mudela_tempo::useconds_per_4_i () { return useconds_per_4_i_; @@ -285,10 +285,9 @@ Mudela_text::Mudela_text (Mudela_text::Type type, String text_str) String Mudela_text::str () { - if (!text_str_.length_i () + if (!text_str_.length_i () || (text_str_.length_i () != (int)strlen (text_str_.ch_C ()))) return ""; return "% " + text_str_ + "\n"; } - diff --git a/mi2mu/mudela-score.cc b/mi2mu/mudela-score.cc index 0e8beb1750..bf025d7ca0 100644 --- a/mi2mu/mudela-score.cc +++ b/mi2mu/mudela-score.cc @@ -35,7 +35,7 @@ Mudela_score::~Mudela_score() { } -void +void Mudela_score::add_item (Mudela_item* mudela_item_p) { mudela_staff_p_list_.bottom()->add_item (mudela_item_p); @@ -60,7 +60,7 @@ Mudela_score::find_column_l (Moment mom) int upper_i = max (0, column_l_array_.size () - 1); int lower_i = 0; int i = 0; //upper_i; - while (1) + while (1) { Moment i_mom = column_l_array_ [i]->at_mom (); if (i_mom == mom) @@ -69,7 +69,7 @@ Mudela_score::find_column_l (Moment mom) upper_i = i; else lower_i = i; - if ((upper_i == lower_i) || (i == column_l_array_.size () - 1)) + if ((upper_i == lower_i) || (i == column_l_array_.size () - 1)) { // we don't do inserts assert (0); @@ -89,7 +89,7 @@ Mudela_score::get_column_l (Moment mom) { if ( column_l_array_ [column_l_array_.size() - 1]->at_mom () > mom ) { - error ("ugh"); + error (_("ugh")); exit (1); } if ( column_l_array_[column_l_array_.size() - 1]->at_mom () < mom ) @@ -101,17 +101,17 @@ Mudela_score::get_column_l (Moment mom) void Mudela_score::output (String filename_str) { - LOGOUT(NORMAL_ver) << "Lily output to " << filename_str << " ..." << endl; - + LOGOUT(NORMAL_ver) << _("Lily output to ") << filename_str << " ..." << endl; + // ugh, ugly midi type 1 fix if ( (mudela_staff_p_list_.size() == 1) && !mudela_staff_p_list_.top()->number_i_) mudela_staff_p_list_.top()->number_i_ = 1; int track_i = 0; Mudela_stream mudela_stream (filename_str); - for (PCursor i (mudela_staff_p_list_); i.ok(); i++) + for (PCursor i (mudela_staff_p_list_); i.ok(); i++) { - LOGOUT(NORMAL_ver) << "track " << track_i++ << ": " << flush; + LOGOUT(NORMAL_ver) << _("track ") << track_i++ << ": " << flush; i->output (mudela_stream); mudela_stream << "\n"; LOGOUT(NORMAL_ver) << endl; @@ -120,9 +120,9 @@ Mudela_score::output (String filename_str) mudela_stream << "\\score{\n"; if (mudela_staff_p_list_.size() > 1) mudela_stream << "\\multi 3 < \\type Staff\n"; - for (PCursor i (mudela_staff_p_list_); i.ok(); i++) + for (PCursor i (mudela_staff_p_list_); i.ok(); i++) { - if ( (mudela_staff_p_list_.size() != 1) + if ( (mudela_staff_p_list_.size() != 1) && (i == mudela_staff_p_list_.top())) continue; mudela_stream << "< \\melodic{ "; @@ -145,8 +145,8 @@ Mudela_score::output (String filename_str) void Mudela_score::process() { - LOGOUT(NORMAL_ver) << "\nProcessing..." << endl; - + LOGOUT(NORMAL_ver) << _("\nProcessing...") << endl; + LOGOUT(DEBUG_ver) << "columns\n"; // for (PCursor i (mudela_column_p_list_); i.ok(); i++) // LOGOUT(DEBUG_ver) << "At: " << i->at_mom() << "\n"; @@ -156,11 +156,11 @@ Mudela_score::process() quantify_columns(); quantify_durations(); - LOGOUT(NORMAL_ver) << "\nCreating voices..." << endl; + LOGOUT(NORMAL_ver) << _("\nCreating voices...") << endl; int track_i = 0; - for (PCursor i (mudela_staff_p_list_); i.ok(); i++) + for (PCursor i (mudela_staff_p_list_); i.ok(); i++) { - LOGOUT(NORMAL_ver) << "track " << track_i++ << ": " << flush; + LOGOUT(NORMAL_ver) << _("track ") << track_i++ << ": " << flush; i->process(); LOGOUT(NORMAL_ver) << endl; } @@ -169,20 +169,20 @@ Mudela_score::process() void Mudela_score::filter_tempo() { - LOGOUT(NORMAL_ver) << "\nNOT Filtering tempo..." << endl; + LOGOUT(NORMAL_ver) << _("\nNOT Filtering tempo...") << endl; } void Mudela_score::quantify_columns() { // ugh - if (Duration_convert::no_quantify_b_s) + if (Duration_convert::no_quantify_b_s) { - LOGOUT(NORMAL_ver) << "\nNOT Quantifying columns..." << endl; + LOGOUT(NORMAL_ver) << _("\nNOT Quantifying columns...") << endl; return; } - LOGOUT(NORMAL_ver) << "\nQuantifying columns..." << endl; + LOGOUT(NORMAL_ver) << _("\nQuantifying columns...") << endl; int current_bar_i = 0; Moment bar_mom = mudela_meter_l_->bar_mom(); @@ -191,15 +191,15 @@ Mudela_score::quantify_columns() n = Duration_convert::type2_i (n); Moment s = Moment (1, n); Moment sh = Moment (1, 2 * n); - for (int i = 0; i < column_l_array_.size(); i++) + for (int i = 0; i < column_l_array_.size(); i++) { column_l_array_ [i]->at_mom_ = s * Moment( (int) ( (column_l_array_ [i]->at_mom()) / s)); int bar_i = (int) (column_l_array_ [i]->at_mom () / bar_mom) + 1; - if (bar_i > current_bar_i) + if (bar_i > current_bar_i) { - LOGOUT (NORMAL_ver) << '[' << bar_i << ']' << flush; + LOGOUT (NORMAL_ver) << '[' << bar_i << ']' << flush; current_bar_i = bar_i; } } @@ -217,7 +217,7 @@ Mudela_score::settle_columns() { // LOGOUT(NORMAL_ver) << "\nNOT Settling columns..." << endl; // return; - LOGOUT(NORMAL_ver) << "\nSettling columns..." << endl; + LOGOUT(NORMAL_ver) << _("\nSettling columns...") << endl; #if 0 assert (!column_l_array_.size()); @@ -237,9 +237,9 @@ Mudela_score::settle_columns() smallest_dur.durlog_i_ = 6; Moment const noise_mom = Duration_convert::dur2_mom (smallest_dur) / Moment (2); - for (int i = 0; i < n; i++) + for (int i = 0; i < n; i++) { - if (!start_i) + if (!start_i) { start_i = end_i = i; start_mom = column_l_array_ [i]->at_mom(); @@ -258,4 +258,3 @@ Mudela_score::settle_columns() start_i = end_i = 0; } } - diff --git a/mi2mu/mudela-staff.cc b/mi2mu/mudela-staff.cc index a3e966ca6e..86972df41b 100644 --- a/mi2mu/mudela-staff.cc +++ b/mi2mu/mudela-staff.cc @@ -47,12 +47,12 @@ Mudela_staff::eat_voice (Link_list& items) // Moment mom = items.top()->at_mom(); Moment mom = 0; - for (PCursor i (items); i.ok();) + for (PCursor i (items); i.ok();) { LOGOUT(DEBUG_ver) << "At: " << i->at_mom() << "; "; LOGOUT(DEBUG_ver) << "dur: " << i->duration_mom() << "; "; LOGOUT(DEBUG_ver) << "mom: " << mom << " -> "; - if (i->at_mom() > mom) + if (i->at_mom() > mom) { Moment dur = i->at_mom() - mom; // ugh, need score @@ -60,7 +60,7 @@ Mudela_staff::eat_voice (Link_list& items) voice_p->add_item (new Mudela_skip (start, dur)); mom = i->at_mom(); } - if (i->at_mom() == mom) + if (i->at_mom() == mom) { mom = i->at_mom() + i->duration_mom(); voice_p->add_item (i.remove_p()); @@ -97,13 +97,13 @@ Mudela_staff::output (Mudela_stream& mudela_stream_r) mudela_stream_r << "$" << id_str() << " = \\melodic"; mudela_stream_r << (mudela_voice_p_list_.size() > 1 ? "<" : "{"); mudela_stream_r << "\n"; - mudela_stream_r << "% midi copyright:" << copyright_str_ << "\n"; - mudela_stream_r << "% instrument:" << instrument_str_ << "\n"; + mudela_stream_r << _("% midi copyright:") << copyright_str_ << "\n"; + mudela_stream_r << _("% instrument:") << instrument_str_ << "\n"; if (mudela_voice_p_list_.size() == 1) mudela_voice_p_list_.top()->output (mudela_stream_r); else - for (PCursor i (mudela_voice_p_list_); i.ok(); i++) + for (PCursor i (mudela_voice_p_list_); i.ok(); i++) { mudela_stream_r << "{ "; i->output (mudela_stream_r); @@ -119,7 +119,7 @@ Mudela_staff::output_mudela_begin_bar (Mudela_stream& mudela_stream_r, Moment no { Moment bar_mom = mudela_meter_l_->bar_mom(); Moment into_bar_mom = now_mom - Moment (bar_i - 1) * bar_mom; - if (bar_i > 1) + if (bar_i > 1) { if (!into_bar_mom) mudela_stream_r << "|\n"; @@ -132,16 +132,16 @@ Mudela_staff::output_mudela_begin_bar (Mudela_stream& mudela_stream_r, Moment no #if 0 // not used for now -void +void Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_mom, Moment end_mom) { Moment bar_mom = mudela_meter_l_->bar_mom(); Moment now_mom = begin_mom; - int begin_bar_i = (int) (now_mom / bar_mom) + 1; + int begin_bar_i = (int) (now_mom / bar_mom) + 1; int end_bar_i = (int) (end_mom / bar_mom) + 1; - if (end_bar_i == begin_bar_i) + if (end_bar_i == begin_bar_i) { output_mudela_rest_remain (mudela_stream_r, end_mom - begin_mom); return; @@ -152,14 +152,14 @@ Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_m //fill current bar Moment begin_bar_mom = Moment (begin_bar_i - 1) * bar_mom; - if (now_mom > begin_bar_mom) + if (now_mom > begin_bar_mom) { - int next_bar_i = (int) (now_mom / bar_mom) + 2; + int next_bar_i = (int) (now_mom / bar_mom) + 2; Moment next_bar_mom = Moment (next_bar_i - 1) * bar_mom; assert (next_bar_mom <= end_mom); Moment remain_mom = next_bar_mom - now_mom; - if (remain_mom > Moment (0)) + if (remain_mom > Moment (0)) { output_mudela_rest_remain (mudela_stream_r, remain_mom); now_mom += remain_mom; @@ -170,7 +170,7 @@ Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_m // fill whole bars int count_i = end_bar_i - bar_i; - for (int i = 0; i < count_i; i++) + for (int i = 0; i < count_i; i++) { int begin_bar_i = check_begin_bar_i (now_mom, bar_i); if (begin_bar_i) @@ -178,7 +178,7 @@ Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_m mudela_stream_r << "r1 "; // *mudela_stream_r.os_p_ << flush; if (begin_bar_i) - LOGOUT(NORMAL_ver) << begin_bar_i << flush; + LOGOUT(NORMAL_ver) << begin_bar_i << flush; bar_i = check_end_bar_i (now_mom, bar_i); now_mom += bar_mom; } @@ -191,7 +191,7 @@ Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_m // bar_i = check_end_bar_i (now_mom, bar_i); Moment remain_mom = end_mom - Moment (end_bar_i - 1) * bar_mom; - if (remain_mom > Moment (0)) + if (remain_mom > Moment (0)) { output_mudela_rest_remain (mudela_stream_r, remain_mom); now_mom += remain_mom; @@ -202,7 +202,7 @@ Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_m void Mudela_staff::output_mudela_rest_remain (Mudela_stream& mudela_stream_r, Moment mom) { - if (Duration_convert::no_quantify_b_s) + if (Duration_convert::no_quantify_b_s) { Duration dur = Duration_convert::mom2_dur (mom); mudela_stream_r << "r" << dur.str() << " "; @@ -210,7 +210,7 @@ Mudela_staff::output_mudela_rest_remain (Mudela_stream& mudela_stream_r, Moment assert (mom == dur.length()); return; } - + Duration dur = Duration_convert::mom2standardised_dur (mom); if (dur.type_i_>-10) mudela_stream_r << "r" << dur.str() << " "; @@ -221,7 +221,7 @@ Mudela_staff::output_mudela_rest_remain (Mudela_stream& mudela_stream_r, Moment void Mudela_staff::process() { - /* + /* group items into voices */ @@ -233,8 +233,7 @@ Mudela_staff::process() Link_list items; for (PCursor i (mudela_item_p_list_); i.ok(); i++) items.bottom().add (*i); - + while (items.size()) eat_voice (items); } - diff --git a/mi2mu/mudela-stream.cc b/mi2mu/mudela-stream.cc index fb8da88d60..647a595db1 100644 --- a/mi2mu/mudela-stream.cc +++ b/mi2mu/mudela-stream.cc @@ -33,14 +33,14 @@ Mudela_stream::~Mudela_stream() { delete os_p_; if (indent_i_) - warning ("lily indent level: " + String (indent_i_)); + warning (_("lily indent level: ") + String (indent_i_)); } Mudela_stream& Mudela_stream::operator << (String str) { static String word_sep_str = "{} \t\n"; - while (str.length_i()) + while (str.length_i()) { int i = str.index_any_i (word_sep_str) + 1; if (!i) @@ -71,15 +71,15 @@ Mudela_stream::handle_pending_indent() void Mudela_stream::header() { - *os_p_ << "% Creator: " << mi2mu_version_str() << "\n"; - *os_p_ << "% Automatically generated, at "; + *os_p_ << _("% Creator: ") << mi2mu_version_str() << "\n"; + *os_p_ << _("% Automatically generated, at "); time_t t (time (0)); *os_p_ << ctime (&t); - *os_p_ << "% from input file: "; + *os_p_ << _("% from input file: "); // *os_p_ << midi_parser_l_g->filename_str_; // ugh *os_p_ << filename_str_g; - *os_p_ << "\n\n"; + *os_p_ << "\n\n"; // ugh *os_p_ << "\\version \"0.1.6\";\n"; } @@ -89,16 +89,16 @@ Mudela_stream::open() { os_p_ = new ofstream (filename_str_.ch_C ()); if (!*os_p_) - error ("can't open: `" + filename_str_ + "\'"); + error (_("can't open: `") + filename_str_ + "\'"); } void Mudela_stream::output (String str) { - for (int i = 0; i < str.length_i(); i++) + for (int i = 0; i < str.length_i(); i++) { char c = str[ i ]; - switch (c) + switch (c) { case '{' : case '<' : @@ -141,7 +141,7 @@ Mudela_stream::output (String str) *os_p_ << c; column_i_++; break; - } + } } } @@ -149,27 +149,25 @@ void Mudela_stream::output_wrapped (String str) { // enough room left -> doit - if (column_i_ + str.length_i() <= wrap_column_i_) + if (column_i_ + str.length_i() <= wrap_column_i_) { output (str); return; } // we're at BOL already; this will never fit -> doit - if (column_i_ == indent_i_ * INDENT_i) + if (column_i_ == indent_i_ * INDENT_i) { output (str); return; } - + // ok, let's wrap // preserve comment mode if (comment_mode_b_) output (String ("\n%")); - else + else output (String ("\n")); - + output (str); } - - diff --git a/tex/font-en-tja16.tex b/tex/font-en-tja16.tex index b941882ea8..d7c1698b2c 100644 --- a/tex/font-en-tja16.tex +++ b/tex/font-en-tja16.tex @@ -1,5 +1,5 @@ % generated automatically by mf-to-table.py version 0.4 -% on Tue Oct 14 23:56:57 1997 +% on Mon Oct 20 01:50:48 1997 % Do not edit % input from out/font-en-tja16.log % name @@ -54,4 +54,6 @@ % floogbars \fetdef\eighthflag{38} \fetdef\deighthflag{39} +\fetdef\sixteenthflag{40} +\fetdef\dsixteenthflag{41} diff --git a/tex/font-en-tja20.tex b/tex/font-en-tja20.tex index e105c51ff3..6e2125afd1 100644 --- a/tex/font-en-tja20.tex +++ b/tex/font-en-tja20.tex @@ -1,5 +1,5 @@ % generated automatically by mf-to-table.py version 0.4 -% on Tue Oct 14 23:57:04 1997 +% on Mon Oct 20 01:50:55 1997 % Do not edit % input from out/font-en-tja20.log % name @@ -54,4 +54,6 @@ % floogbars \fetdef\eighthflag{38} \fetdef\deighthflag{39} +\fetdef\sixteenthflag{40} +\fetdef\dsixteenthflag{41} -- 2.39.2