summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/gregorio/gregorio-src
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-src')
-rw-r--r--Build/source/texk/gregorio/gregorio-src/CHANGELOG.md706
-rw-r--r--Build/source/texk/gregorio/gregorio-src/CONTRIBUTING.md99
-rw-r--r--Build/source/texk/gregorio/gregorio-src/CONTRIBUTORS.md49
-rw-r--r--Build/source/texk/gregorio/gregorio-src/COPYING.md698
-rw-r--r--Build/source/texk/gregorio/gregorio-src/Makefile.am49
-rw-r--r--Build/source/texk/gregorio/gregorio-src/README.md41
-rw-r--r--Build/source/texk/gregorio/gregorio-src/UPGRADE.md454
-rw-r--r--Build/source/texk/gregorio/gregorio-src/VersionManager.py528
-rwxr-xr-xBuild/source/texk/gregorio/gregorio-src/build.sh132
-rw-r--r--Build/source/texk/gregorio/gregorio-src/configure.ac130
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/900_gregorio.xml111
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/Makefile.am20
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaLaTeX+se.engine8
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaTeX+se.engine8
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/Makefile.am18
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/auto-configure.command58
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/checkSyllabation.py156
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/config-texworks.command93
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/contrib_README.md92
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gabc-syntax.plist82
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gabc.lang96
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gabc.vim93
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gabc.xml40
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gprocess183
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/gregorio.pngbin0 -> 916 bytes
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/system-setup.bat247
-rw-r--r--Build/source/texk/gregorio/gregorio-src/contrib/system-setup.command232
-rwxr-xr-xBuild/source/texk/gregorio/gregorio-src/install-gtex.sh288
-rwxr-xr-xBuild/source/texk/gregorio/gregorio-src/install.sh43
-rw-r--r--Build/source/texk/gregorio/gregorio-src/m4/ax_check_compile_flag.m475
-rw-r--r--Build/source/texk/gregorio/gregorio-src/m4/ax_check_link_flag.m475
-rw-r--r--Build/source/texk/gregorio/gregorio-src/m4/canonicalize.m4124
-rw-r--r--Build/source/texk/gregorio/gregorio-src/m4/nocrash.m4130
-rw-r--r--Build/source/texk/gregorio/gregorio-src/m4/pkg.m4287
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/Makefile.am142
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/bool.h30
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/characters.c1329
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/characters.h89
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/config.h36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/dump/dump.c546
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c75
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/enum_generator.h80
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c337
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c1303
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c15127
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l1503
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c2987
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h721
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c3178
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h202
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c659
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h64
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l430
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y1124
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c1171
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h86
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c721
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c1750
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c4539
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h151
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/messages.c172
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/messages.h90
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/plugins.h40
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/sha1.c346
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/sha1.h85
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct.c1609
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct.h984
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct_iter.h191
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.c282
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.h76
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/unicode.c174
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/unicode.h69
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/utf8strings.h36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in36
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c2166
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h714
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c1610
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h90
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h28
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l95
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y146
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c447
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h52
-rw-r--r--Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc25
-rw-r--r--Build/source/texk/gregorio/gregorio-src/windows/gregorio.icobin0 -> 282350 bytes
85 files changed, 53388 insertions, 0 deletions
diff --git a/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md b/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md
new file mode 100644
index 00000000000..89d74a76d61
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md
@@ -0,0 +1,706 @@
+# Change Log
+All notable changes to this project will be documented in this file.
+As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/). It follows [some conventions](http://keepachangelog.com/).
+
+## [5.2.1] - 2019-04-06
+### Fixed
+- Project names with quotes in them no longer cause GregorioTeX to not be able to find the executable. See [#1416](https://github.com/gregorio-project/gregorio/issues/1416).
+- Eliminated implicit casting from float to integer in string formatting (something no longer allowed in Lua 5.3)
+
+
+## [5.2.0] - 2019-03-10
+### Fixed
+- `latin` is now supported as a valid language name. This brings Latin into line with other languages where both titlecased and lowercased version of the language name (e.g. `English` and `english`) are both allowed.
+
+### Added
+- Added support for two and three letter language codes for supported languages. [This list of codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (and language names) was used for this support. No new languages are supported as a result of this change, just different ways of specifying the existing names.
+- A non-rotated diamond-shaped variant of the punctum inclinatum. Append a `2` in gabc to the capitalized note pitch letter to force gregorio to use this shape. Otherwise, gregorio will try to use it when a string of these notes is at the unison within a syllable. See [#1425](https://github.com/gregorio-project/gregorio/issues/1425).
+- Support for an eighth bar (nicknamed divisio "minimis") by using `^` in gabc (see [#1424](https://github.com/gregorio-project/gregorio/issues/1424)).
+- 8 new St. Gall neume glyphs have been added to the `gregall` font.
+
+## [5.1.1] - 2018-03-25
+### Fixed
+- Various issues with the documentation.
+
+## [5.1.0] - 2018-03-11
+### Added
+- Added support for virgula (gabc: `` `0``) and divisio minima (gabc: `,0`) on the ledger line above the staff (see [#1370](https://github.com/gregorio-project/gregorio/issues/1370)).
+- Added support for a dotted bar (gabc: `:?`) (See [#1360](https://github.com/gregorio-project/gregorio/issues/1360) and [#1387](https://github.com/gregorio-project/gregorio/issues/1387))
+- 10 new St. Gall neume glyphs have been added to the `gregall` font (see [#1328](https://github.com/gregorio-project/gregorio/issues/1328), [#1330](https://github.com/gregorio-project/gregorio/issues/1330), [#1337](https://github.com/gregorio-project/gregorio/issues/1337), [#1340](https://github.com/gregorio-project/gregorio/issues/1340), [#1341](https://github.com/gregorio-project/gregorio/issues/1341), [#1342](https://github.com/gregorio-project/gregorio/issues/1342), [#1343](https://github.com/gregorio-project/gregorio/issues/1343), [#1345](https://github.com/gregorio-project/gregorio/issues/1345)).
+- 4 new Laon neume glyphs have been added to the `grelaon` font.
+- A more modern-looking sharp symbol has been added to the `greciliae` font. To switch to this, use `\grechangeglyph{Sharp}{greciliae}{.modern}\grechangeglyph{SharpHole}{greciliae}{.modern}` in your TeX file. See [#1399](https://github.com/gregorio-project/gregorio/issues/1399).
+- Added documentation note about loading microtype after gregoriotex (see [#1364](https://github.com/gregorio-project/gregorio/issues/1364)).
+
+### Fixed
+- Fixed issue with Tex Live 2017 latexmk not detecting auto-compiled gabc files as dependencies (see [#1367](https://github.com/gregorio-project/gregorio/issues/1367)).
+- Fixed issue where an altered note (glyph) throws off the position of an episema in the glyph that immediately precedes it (see [#1379](https://github.com/gregorio-project/gregorio/issues/1379)).
+
+## [5.0.2] - 2017-05-24
+### Fixed
+- Worked around an issue discovered during the TeX Live 2017 pre-test. See [#1362](https://github.com/gregorio-project/gregorio/issues/1362).
+
+## [5.0.1] - 2017-04-16
+### Fixed
+- Fixed a bug in the TeX Live compatibility code for Windows users. Thanks to Akira Kakuto for the catch.
+
+## [5.0.0] - 2017-04-15
+### Fixed
+- The printing of the commentary box is no longer tied to the printing of the inital. As a result it is now possible to have a score which has a commentary but not an initial. See [this thread on the user list](http://www.mail-archive.com/gregorio-users@gna.org/msg03911.html).
+- Elisions after a vowel centering prefix will no longer cause the center to be placed on the vowel in the prefix. Since prefixes are unvoiced vowels, this makes more sense than the previous behavior. As usual, you may use the manual centering features to force the centering where you want if this does not produce what you want. See [#1320](https://github.com/gregorio-project/gregorio/issues/1320).
+- Dynmanic line spacing when a clef change occurs at the end of a line is fixed so that the line after the clef change is spaced appropriately. See [#1285](https://github.com/gregorio-project/gregorio/issues/1285).
+- Spaces in the filename of a score no longer cause Gregoriotex to fail. See [#1224](https://github.com/gregorio-project/gregorio/issues/1224).
+- Glyphs for pes quadratum shapes with initio debilis are no longer missing. Use `-fqg` to engrave them. See [#1310](https://github.com/gregorio-project/gregorio/issues/1310).
+- Horizontal episemata bridge spaces more correctly. As mentioned earlier, you can prevent this by appending `2` to the `_` on the note before the space you do not want bridged. See [#1216](https://github.com/gregorio-project/gregorio/issues/1216).
+- A rising note after an oriscus flexus will no longer generate a porrectus (see [#1220](https://github.com/gregorio-project/gregorio/issues/1220)).
+- The Scribus external tool script now uses latexmk in order to handle the multi-pass features of Gregorio (see [#1236](https://github.com/gregorio-project/gregorio/issues/1236)).
+- Translation text in a syllable with a trailing (forced) hyphen is no longer truncated to its first character (see [#1254](https://github.com/gregorio-project/gregorio/issues/1254)).
+- A trailing (forced) hyphen in a syllable no longer generates a forced hyphen in the previous syllable (see [#1255](https://github.com/gregorio-project/gregorio/issues/1255)).
+- A trailing space on a header line is now ignored (see [#1269](https://github.com/gregorio-project/gregorio/issues/1269)).
+- A pes whose second note is an oriscus now obeys the oriscus orientation rules (see [#1272](https://github.com/gregorio-project/gregorio/issues/1272))
+
+### Changed
+- The default behaviour of `\gregorioscore` has been changed to autocompile.
+- When the note after an oriscus is at the same pitch, the oriscus direction now depends on the first non-unison, non-oriscus note after the oriscus (see [#1179](https://github.com/gregorio-project/gregorio/issues/1179)).
+- 6 new St. Gall neume glyphs have been added to the `gregall` font and glyph for nabc `to!ciG` has been changed (see [#1303](https://github.com/gregorio-project/gregorio/issues/1303), [#1305](https://github.com/gregorio-project/gregorio/issues/1305), [#1313](https://github.com/gregorio-project/gregorio/issues/1313), [#1314](https://github.com/gregorio-project/gregorio/issues/1314), [#1315](https://github.com/gregorio-project/gregorio/issues/1315)).
+- Notes are now left-aligned as if all clefs had the same width as the largest clef in the score. You can get previous behavior back with `\grebolshiftcleftype{current}`, or temporary force alignment until the end of a score with `\grelocalbolshiftcleftype`. See Documentation of these functions and [#1189](https://github.com/gregorio-project/gregorio/issues/1189).
+- A clef change immediately before a line break `(z)` will now typeset the new clef at the beginning of the next line. An explicit custos `(z0)` immediately before such a clef change (or separated by only a bar) will be suppressed. See [#1190](https://github.com/gregorio-project/gregorio/issues/1190).
+- Ledger lines are now extended through notes on either side of a ledger line that crosses a stem, as long as the notes are within the same "element." If the algorithm doesn't produce the result you want, you can use `[oll:0]` to suppress an over-the-staff ledger line on a note, `[ull:0]` to suppress an under-the-staff ledger line on a note, `[oll:1]` to force an over-the-line ledger line on a note, or [ull:1] to force an under-the-staff ledger line on a note. Please note that other forms of `[oll:...]` and `[ull:...]` can interfere with these new settings. See [UPGRADE.md](UPGRADE.md) and [#1215](https://github.com/gregorio-project/gregorio/issues/1215) for details.
+- The left stem of Dominican plicae on lines has been shortened (see [#1238](https://github.com/gregorio-project/gregorio/issues/1238)).
+- Clefs on the top or bottom line adjust the spacing as if there were a note above the top line or below the bottom line, respectively (see [#1007](https://github.com/gregorio-project/gregorio/issues/1007)).
+- Default spaces have been adjusted (see [#1182](https://github.com/gregorio-project/gregorio/issues/1182)).
+- `\grechangenextscorelinedim` can now take a comma-separated list of line numbers as its first argument (see [#1280](https://github.com/gregorio-project/gregorio/issues/1280)).
+
+### Added
+- More cavum shapes are now available. To use them, simply add `r` in gabc to any note in a glyph. See [#844](https://github.com/gregorio-project/gregorio/issues/844).
+- Square brackets can be placed around notes by using `[[` and `]]` to surround said notes in gabc (see [#844](https://github.com/gregorio-project/gregorio/issues/844)).
+- a font `grelaon` for Laon style adiastematic notation has been added (see GregorioNabcRef.pdf for details). This is a preview, backward incompatible change are possible in future releases.
+- 9 new St. Gall neume glyphs have been added to the `gregall` font.
+- 5 new St. Gall neume glyphs have been added to the `gresgmodern` font.
+- install-gtex.sh now generates uninstall-gtex.sh, which can be used to uninstall the TeX portion of the installation when GregorioTeX was installed from source.
+- A `<clear>` tag may be added to a syllable to indicate that its text should not overlap any previous syllable (see [#1029](https://github.com/gregorio-project/gregorio/issues/1029)).
+- More general support for protrusions. The `<pr>` tag in gabc indicates where a protrusion should begin. There is an optional argument `<pr:.5>` that allows the protrusion factor to be specified (in this example, `.5`). Additionally, the comma, semicolon, colon, and period are automatically protruded, with configurable protrusion factors. See GregorioRef and [#931](https://github.com/gregorio-project/gregorio/issues/931) for more information.
+- `minimalinitialwidth` space, controlling the minimum amount of space an initial should take require; ignored when `manualinitialwidth` is set to something non-zero (see [#1213](https://github.com/gregorio-project/gregorio/issues/1213)).
+- new scripts in `contrib/` to check the syllabation of a gabc score against hyphenation rules, such as those on [hyphen-la](https://github.com/gregorio-project/hyphen-la)
+- the visibility of a particular nabc voice can now be set by `\gresetnabc{n}{(in)visible}`, where `n` is the number of the nabc voice (see [#1257](https://github.com/gregorio-project/gregorio/issues/1257)).
+- `[nocustos]` may be used in gabc to prevent a custos should the line end at that point (see [#1271](https://github.com/gregorio-project/gregorio/issues/1271)).
+- Musica ficta signs: Add `r6`, `r7`, and `r8` to a note for a flat, natural, or sharp (respectively) above the note (see [#1278](https://github.com/gregorio-project/gregorio/issues/1278)).
+- The spacing added for low notes in the staff is now adjustable by setting dimension `noteadditionalspacelinestext`, with the number of notes settable as count `noteadditionalspacelinestextthreshold`. See GregorioRef and [#1125](https://github.com/gregorio-project/gregorio/issues/1125) for details.
+- Some counts can now be adjusted for a particular line in a score. Use `\grechangenextscorelinecount` prior to including the score to set the desired values. The various spacing thresholds may be changed with this command. See GregorioRef for details.
+
+### Deprecated
+- `\gresethyphenprotrusion{percentage}`, supplanted by `\gresetprotrusionfactor{eolhyphen}{factor}`. Note that the value the new command takes is a factor rather than a percentage.
+
+### Removed
+- `initial-style` gabc header, supplanted by the `\gresetinitiallines` TeX command.
+- `biginitial` style, consolidated into the `initial` style.
+- `\grescorereference`
+- The Gregorio and Grana Padano fonts are no longer distributed with the Gregorio distribution archive. They will now be available for download separately (along with their Dominican "-op" variants) in `supp_fonts-5_0_0.zip` (the version number will change to match future releases). See [UPGRADE.md](UPGRADE.md) and [#844](https://github.com/gregorio-project/gregorio/issues/844) for details.
+
+
+## [4.2.1][Unreleased]
+### Fixed
+- Debian build scripts now use directories compatible with the TeX Live 2016 packaging of Gregorio (see [#1241](https://github.com/gregorio-project/gregorio/issues/1241)).
+
+
+## [4.2.0] - 2016-09-23
+### Fixed
+- When the note after an oriscus is at the same pitch, the oriscus will now point downwards by default (see [#1177](https://github.com/gregorio-project/gregorio/issues/1177)).
+- When the last note in a score is not in the last syllable, it no longer merges into the (no-note) syllable(s) that follow (see [#1205](https://github.com/gregorio-project/gregorio/issues/1205)).
+- A two-line initial on a two-line score no longer generates an error (see [#1139](https://github.com/gregorio-project/gregorio/issues/1139)).
+- Staff lines after a two-line initial should now be sized correctly in a more consistent way (see [#1141](https://github.com/gregorio-project/gregorio/issues/1141)).
+- Space at the end of line was not always correct when a line is cut in the middle of a word (see [#1155](https://github.com/gregorio-project/gregorio/issues/1155)).
+- In rare cases, the very last bar or glyph of a score could appear alone at the beginning of the final line (see [#1152](https://github.com/gregorio-project/gregorio/issues/1152)).
+- In cases of a syllable without note, the space between notes of the previous and next syllables was sometimes not enough (see [#1137](https://github.com/gregorio-project/gregorio/issues/1137)).
+- `moraadjustment` and `moraadjustmentbar` did not scale when changing factor, they do now.
+- The `900_gregorio.xml` file for Scribus now matches `main-lualatex.tex` again (see [#1087](https://github.com/gregorio-project/gregorio/issues/1087)).
+- Multiple subsequent lines in gabc no longer cause TeX to fail (see [#1111](https://github.com/gregorio-project/gregorio/issues/1111)).
+- Old bar spacing algorithm will no longer separate the text and bar when the bar is preceeded by a puncutm mora (see [#1078](https://github.com/gregorio-project/gregorio/issues/1078)).
+- Scores which end with a no-note syllable under the new bar spacing algorithm will no longer have their text pushed out into the right hand margin. See [#1110](https://github.com/gregorio-project/gregorio/issues/1110).
+- PlainTeX will now respect underline requests in gabc.
+- PlainTeX will now raise a warning when small caps are requested but `\sc` has not been defined.
+- A manual custos at the end of the score will now be spaced like regular end of line custos [#1034](https://github.com/gregorio-project/gregorio/issues/1034).
+- Custos glyphs heights are now counted when adjusting line heights (see [#961](https://github.com/gregorio-project/gregorio/issues/961)).
+
+### Added
+- Some vertical spaces can now be adjusted for a particular line in a score. Use `\grechangenextscorelinedim` prior to including the score to set the desired values. `spaceabovelines`, `spacebeneathtext`, and `spacelinestext` may be changed with this command. See GregorioRef and [#1156](https://github.com/gregorio-project/gregorio/issues/1156) for details.
+- Nabc now supports pitches `hn` and `hp` in addition to previously supported `ha` through `hm`.
+- 32 new St. Gall neume glyphs have been added to the `gregall` font and glyphs for nabc `po-1pp2su1sux1` and `po-1su1sux1` have been changed.
+- 31 new St. Gall neume glyphs have been added to the `gresgmodern` font and glyph for nabc `tr-1` has been changed.
+- It is now possible to set `\parskip`, `\lineskip`, `\baselineskip`, and `\lineskiplimit` to have different values within a score using `\grechangedim`. See [#1038](https://github.com/gregorio-project/gregorio/issues/1038).
+- It is now possible to invert the oriscus orientation on pes quassus and oriscus flexus shapes. Use `o0` or `o1` to force the oriscus into the orientation you desire. It is also possible to fuse the oriscus from either direction in either orientation. See [#898](https://github.com/gregorio-project/gregorio/issues/898) and [#972](https://github.com/gregorio-project/gregorio/issues/972).
+- Formerly missing torculus figures starting with an oriscus are now rendered using neume fusion (see [#1013](https://github.com/gregorio-project/gregorio/issues/1013)).
+- Gregorio will keep together (prevent line breaks between) a user-configurable number of notes (by default, 4) at the start and end of the syllable. Further, Gregorio will prevent line breaks in a syllable with fewer than a user-configurable number of notes (by default, 10). These values may be changed by using the `\gresetunbreakablesyllablenotes` command. See GregorioRef for details (for the change request, see [#1044](https://github.com/gregorio-project/gregorio/issues/1044)).
+- The visibility of notes and lyrics can now be toggled on an off using `\gresetlyrics` and `\gresetnotes`. See [#1039](https://github.com/gregorio-project/gregorio/issues/1039).
+- An alteration (flat, natural, or sharp) will now appear on a custos if the next note is so altered. Use `\gresetcustosalteration{invisible}` if you prefer the old behavior. See [#1049](https://github.com/gregorio-project/gregorio/issues/1049).
+- `gregoriosyms.sty` and `gregoriotex.tex` now contain definitions for `gregoriocolor` and `grebackgroundcolor` and the appropriate score commands dealing with color now work under PlainTeX
+
+### Changed
+- In order to facilitate installation alongside TeX Live, the version number is now appended to the gregorio executable file name. If you are running the executable directly in your custom scripts, you will need to change them to include the version number. If you are not using the TeX-Live-packaged version of Gregorio, you will probably need to use the `--shell-escape` option when compiling your `.tex` files. Note that in TeX Live 2016, which includes Gregorio 4.1.1, the executable filename does not include the version number, though that will change starting with TeX Live 2017. See UPGRADE.md and [#1197](https://github.com/gregorio-project/gregorio/issues/1197) for more information.
+- When the clef and the first note are at a reasonable vertical distance, `shortspaceafterlineclef` is used instead of `spaceafterlineclef` (make them equal if you don't want this feature). This is used only on the first line, when there is an initial on one line. See [#1138](https://github.com/gregorio-project/gregorio/issues/1138).
+- When an alteration follows a bar, it is not completely taken into consideration in the new bar spacing algorithm (similarly to the punctum mora), this behavior can be tuned with the newly introduced space `alterationadjustmentbar`. See [#1146](https://github.com/gregorio-project/gregorio/issues/1146).
+- Very small improvement in the design of the porrectus auctus and torculus resupinus auctus (see [#1169](https://github.com/gregorio-project/gregorio/issues/1169)).
+- When the notes around a virgula or divisio minima are lower than two spaces below the top staff line, the spaces used are new shorter spaces with a `@short` suffix. To cancel this feature, make them the same as their normal version. See [#1144](https://github.com/gregorio-project/gregorio/issues/1144).
+- Different glyphs are now used for puncta inclinata in an ascent versus in a descent. A heuristic algorithm is used to ensure that the glyphs match when grouped together. If the algorithm chooses the wrong shape, use `0` (for descending) or `1` (for ascending) to force an orientation. See [UPGRADE.md](UPGRADE.md) and [#856](https://github.com/gregorio-project/gregorio/issues/856) for details.
+- The shape of the fused oriscus at ambitus one in the greciliae font has been tweaked to form a nicer connection (see [#1079](https://github.com/gregorio-project/gregorio/issues/1079)).
+- Syllables are now rewritten to improve ligature rendering. This may be disabled by issuing `\gresetsyllablerewriting{off}`. See GregorioRef for details (for the change request, see [#1098](https://github.com/gregorio-project/gregorio/issues/1098)).
+- Default mode style for PlainTeX no longer tries to invoke small caps since they are not defined by default.
+- Italic, bold, underlined, small capital, teletype, and colored styles now span multiple syllables. Gregorio will also more consistently raise errors when styles are improperly started or ended. See [UPGRADE.md](UPGRADE.md) and [#1121](https://github.com/gregorio-project/gregorio/issues/1121) for details.
+- The stemmed oriscus flexus `(gOe)` is now consistent with the unstemmed oriscus flexus `(goe)` in that the oriscus points downward at the note that follows. If you prefer to have the oriscus point upward, use `(gO1e)` for force upward orientation.
+- Space before a custos appearing in the middle of a line is now set by `spacebeforeinlinecustos`.
+- The space between two puncta inclinata at the unison may be tuned by changing `punctuminclinatumunisonshift` (see [#1042](https://github.com/gregorio-project/gregorio/issues/1042)).
+- A podatus followed by a virga `(eghv)` will now be kept together (no line break between the shapes), If you would like to allow a line break there, use `(eg/hv)` instead (see UPGRADE.md and [#1045](https://github.com/gregorio-project/gregorio/issues/1045)).
+- Penalties must now be changed using the `\grechangecount` command. See GregorioRef and [UPGRADE.md](UPGRADE.md) for details (for the change request, see [#1021](https://github.com/gregorio-project/gregorio/issues/1021)).
+- `\greemergencystretch` must now be set by changing `emergencystretch` using `\grechangedim` instead of redefining the macro.
+- An isolated stropha will now be considered part of the previous neume group and line breaks will be prevented at that point. In order to force a line break there, use a breaking space such as `/` before the stropha in gabc. See [#1056](https://github.com/gregorio-project/gregorio/issues/1056).
+- `interwordspacetext` and it's related distances have been redefined to be smaller and dependent on a font based distance (`ex`). They are also no longer scale with the staff size by default. See [#1036](https://github.com/gregorio-project/gregorio/issues/1036) & [gregoriot-test#208](https://github.com/gregorio-project/gregorio-test/pull/208).
+- `\grecreatedim` and `\grechangedim` can now be used to link two distances. To do this the second argument should be the name of the master distance and the third argument should be `inherited`. See [#962](https://github.com/gregorio-project/gregorio/issues/962).
+
+### Removed
+- `\grescorereference`
+- `\grenewlinepenalty`
+- `\grenobreakpenalty`
+- `\greendofwordpenalty`
+- `\greendofsyllablepenalty`
+- `\greendafterbarpenalty`
+- `\greendafterbaraltpenalty`
+- `\grefinalpenalty`
+- `\greendofelementpenalty`
+- `\grehyphenpenalty`
+- `\grebrokenpenalty`
+- `\grewidowpenalty`
+- `\greclubpenalty`
+- `\grelooseness`
+- `\gretolerance`
+- `\grepretolerance`
+- `\greemergencystretch`
+
+
+## [4.1.5] - 2016-08-18
+### Fixed
+- Use node.travese_id() to find our desired nodes when doing translation centering across syllables, thereby preventing a conflict with other packages which insert nodes (such as luatex-ja). See [#1180](https://github.com/gregorio-project/gregorio/issues/1180).
+- Explicitly communicate the rescaling of `\gre@skip@temp@four` back to TeX, thereby fixing the problem with custom spacings. See [#1199](https://github.com/gregorio-project/gregorio/issues/1199).
+- With thanks to Claudio Beccari (@OldClaudio), adding a commentary no longer generates a bad `\hbox` during TeX processing (see [#1202](https://github.com/gregorio-project/gregorio/issues/1202)).
+
+## [4.1.4] - 2016-05-29
+### Fixed
+- Package conflict with luatex-ja also affected the custos. Have now fixed that problem too. See [this thread](http://www.mail-archive.com/gregorio-users@gna.org/msg03520.html).
+
+## [4.1.3] - 2016-05-26
+### Fixed
+- Package conflict with luatex-ja has been resolved. Notes and lyrics should now appear in documents which use the luatex-ja package. See [#1107](https://github.com/gregorio-project/gregorio/issues/1107).
+
+
+## [4.1.2] - 2016-05-08
+### Changed
+- The parmesan font is now called granapadano. If you were using `\gresetgregoriofont{parmesan}`, you should now use `\gresetgregoriofont{granapadano}`. See [#1075](https://github.com/gregorio-project/gregorio/issues/1075).
+- GregorioTeX is now compatible with TeX Live 2016
+
+
+## [4.1.1] - 2016-03-10
+### Fixed
+- Custos now shouldn't go right of the staff lines (was visible only in edge cases, see [#990](https://github.com/gregorio-project/gregorio/issues/990)).
+- Corrected the end-of-line shift for a ragged line break before `<eu>` blocks (see [#988](https://github.com/gregorio-project/gregorio/issues/988)).
+- Additional space is now added on top of lines with very high notes or signs (see [#883](https://github.com/gregorio-project/gregorio/issues/883)).
+- High notes are now taken into account for vertical placement of above lines test (see [#960](https://github.com/gregorio-project/gregorio/issues/960)).
+- Forced syllable centers can be used in to override alignment issues when lyric centering is set to `syllable` or `firstletter`. This is a restoration of old behavior (pre-4.0), but can be turned off with `\gresetgabcforcecenters{prohibit}`. See [968](https://github.com/gregorio-project/gregorio/issues/968).
+- Deminutus figures in nabc work again (see [#1015](https://github.com/gregorio-project/gregorio/issues/1015)).
+- Orphaned syllables should appear less frequently at end of score (see [1019](https://github.com/gregorio-project/gregorio/issues/1019)).
+
+### Added
+- The macro `\grechangecount` now allows to change some numeric values of the configuration. This version introduces two of them: `additionaltopspacethreshold` and `additionaltopspacealtthreshold`, see GregorioRef for details.
+- The penalty `grefinalpenalty` (0 by default) is added at the end of the score. Be sure you know what you're doing before modifying it.
+
+## [4.1.0] - 2016-03-01
+### Fixed
+- Hyphens now shouldn't go right of the staff lines (see [#845](https://github.com/gregorio-project/gregorio/issues/845)).
+- Horizontal episema on initio debilis is now sized correctly (see [#880](https://github.com/gregorio-project/gregorio/issues/880)).
+- Space between the text of two syllables of the same word when no hyphen is necessary is now strictly 0 (see [#922](https://github.com/gregorio-project/gregorio/issues/922))
+- A horizontal episema on the first note of a torculus deminutus is now placed correctly. See [#926](https://github.com/gregorio-project/gregorio/issues/926).
+- Compilation of documents produced with Gregorio should be slightly faster.
+- The alignment of the vertical episema under a punctum inclinatum deminutus is now correct (see [#742](https://github.com/gregorio-project/gregorio/issues/742)).
+- `<eu>` and `<nlba>` may now be ended on the final divisio maior/finalis (see [#743](https://github.com/gregorio-project/gregorio/issues/743)).
+- Sign positioning on the first note of quadratum figures is now correct (see [#752](https://github.com/gregorio-project/gregorio/issues/752)).
+- Interlinear spacing of annotations when font size was smaller than normal. You should now see just the spacing specified by `annotationseparation`.
+- Spacing is now correct and ledger lines are now typeset for flats, sharps, and naturals above and below the staff (see [#790](https://github.com/gregorio-project/gregorio/issues/790) and [#882](https://github.com/gregorio-project/gregorio/issues/882)).
+- Forced hyphens at the end of words are no longer suppressed (see [#804](https://github.com/gregorio-project/gregorio/issues/804)).
+- Three descending, otherwise unmodified notes are now correctly grouped as a clivis followed by a punctum. If you prefer three notes butted up against each other, separate them with `!`.
+
+### Changed
+- `spacebeforeeolcustos` has been increased, aproximately doubling its size. It's also been made fixed by default, but is still capapble of accepting a rubber value should you so desire.
+- The names of the spaces around bars have changed, see `gsp-default` or GregorioRef for the new names. It is now possible to tune the spacing of the virgula separately from the divisio minima, and the Dominican bar separately from the divisio minor.
+- The stem length determination will use the ledger line below the note with the stem (see [#863](https://github.com/gregorio-project/gregorio/issues/863)).
+- Made the oriscus orientation dependent on the note that follows. Using `1` will force the ascending oriscus and `0` will force the descending oriscus. The old behavior may be restored by setting the `oriscus-orientation` gabc header to `legacy`. See UPGRADE.md for details (for the change request, see [#774](https://github.com/gregorio-project/gregorio/issues/774) and [#898](https://github.com/gregorio-project/gregorio/issues/898)).
+- Add new lines as needed to the gabc output. (see [#905](https://github.com/gregorio-project/gregorio/issues/905)).
+- Command line output (help message, version message, error handling) has been improved, see [#891](https://github.com/gregorio-project/gregorio/issues/891)
+- Windows installer no longer copies the executable into the TeX bin directory. Instead it has the option to add its own bin directory to PATH.
+- `system-setup.sh` has become `system-setup.command` so that it is double click executable on Mac.
+- Post install options for Windows installer have been simplified. There are no longer separate options for MiKTeX and TeX Live. Instead the installer will determine which you have itself and act accordingly.
+- Windows installer will check more locations for old installations to remove.
+- Height of the porrectus have been altered (first note moved up, second also moved up when second ambitus is more than one) so that they are more coherent with the punctum height. The porrectus stroke drawings have also been slightly altered to be slightly thinner and sharper around the bottom note (see [#858](https://github.com/gregorio-project/gregorio/issues/858)).
+- When a syllable is preceeded by a punctum mora, gregorio now ignores the punctum mora in the spacing of the syllables by default, and also adds a custom space (defaulting to 0). You can change this behavior with `\gresetshiftaftermora{}`, see GregorioRef for its arguments. To balance the output, space before a punctum mora has been made slightly thinner, more in line with old Solesmes books. (For the change requests, see [#795](https://github.com/gregorio-project/gregorio/issues/795) and [#871](https://github.com/gregorio-project/gregorio/issues/871)).
+- The `--admin` option is removed from the `initexmf` call for MiKTeX installations, allowing the installer to work better on Windows 10.
+- MiKTeX installations no longer copy files into TEXMFLOCAL but instead registers the texmf folder which the installer creates with MiKTeX, allowing it to use those files in place. See [#884](https://github.com/gregorio-project/gregorio/issues/884)
+- Windows installer now contains an uninstall script which will run as part of the uninstall action and thus should remove the Gregorio executable and TeX files from their copied locations (leaving a clean post-uninstall system).
+- Initial handling has been simplified. The initial style should now be specified from TeX by using the `\gresetinitiallines` command, rather than from a gabc header. Big initials and normal initials are now governed by a single `initial` style, meant to be changed between scores as appropriate. See [UPGRADE.md](UPGRADE.md) and GregorioRef for details (for the change request, see [#632](https://github.com/gregorio-project/gregorio/issues/632)). Deprecations for this change are listed in the Deprecation section, below.
+- `\gresethyphen` no longer manipulates `maximumspacewithoutdash`, allowing for restoration of consistent behavior after this distance has been modified. See [#705](https://github.com/gregorio-project/gregorio/issues/705).
+- The oriscus-based shapes in the greciliae font are more consistent. The shape of a scandicus with a second ambitus of two is more consistent across all score fonts.
+- Minimal space between notes of different syllables (or words) has been reduced when the second syllable starts with an alteration.
+- The space between note and horizontal episema has been tightened for notes at the `c` or `k` height when there is no ledger line. Due to the intricacies of measurement, the system tries to make a best guess as to the existence of the ledger line. If the guess is wrong, you may use the `[hl:n]` and `[ll:n]` notations in gabc to override the guess. See [UPGRADE.md](UPGRADE.md) for details (for aspects of change request, see [#716](https://github.com/gregorio-project/gregorio/issues/716), and [#862](https://github.com/gregorio-project/gregorio/issues/862)).
+- The custos that might appear immediately before a `<eu>` block is now suppressed by default. This behavior is controlled by the `\greseteolcustosbeforeeuouae` command. See GregorioRef and [UPGRADE.md](UPGRADE.md) for details (for the change request, see [#761](https://github.com/gregorio-project/gregorio/issues/761)).
+- Different glyphs will now be used for the liquescent stropha on a line or between lines, if supported by the font. If you prefer the old behavior, use `\grechangeglyph{StrophaAuctaLongtail}{*}{StrophaAucta}` in your TeX file. See [#773](https://github.com/gregorio-project/gregorio/issues/773).
+- Headers not recognized by gregorio, rather than inducing an error, are now simply accepted by gregorio. Most of the old "standard" headers, like `book` and `manuscript-location`, are now handled in this way and thus are no longer limited to one instance. See GregorioRef for details.
+- `mode` will now be converted to Roman numerals in lower case so that it shows up as small capitals using the default `modeline` style. See [UPGRADE.md](UPGRADE.md) for details (for the change request, see [#756](https://github.com/gregorio-project/gregorio/issues/756)).
+- `\grecommentary` is now less restrictive about where it occurs and need not occur directly before the score anymore.
+
+### Added
+- It is now possible to turn off rythmic signs (separately or all together) with `\greprintsigns`, see GregorioRef for details (and [#936](https://github.com/gregorio-project/gregorio/issues/936) for request).
+- Space between the two bars of a divisio finalis is now tunable through `divisiofinalissep`.
+- Added `notesonly` argument to `\gresetshiftaftermora` (see [#948](https://github.com/gregorio-project/gregorio/issues/948)).
+- Controls for tuning horizontal episema vertical position. See GregorioRef for details (for the change request, see [#872](https://github.com/gregorio-project/gregorio/issues/872)).
+- More dimensions are tunable: `overhepisemalowshift`, `overhepisemahighshift`, `underhepisemalowshift`, `underhepisemahighshift`, `hepisemamiddleshift`, `vepisemalowshift`, `vepisemahighshift`, `linepunctummorashift`, `spacepunctummorashift`, `spaceamonepespunctummorashift`, `lineporrectuspunctummorashift`, `spaceporrectuspunctummorashift`, `raresignshift`. See GregorioRef for details (for the change request for most of these, see comments in [#872](https://github.com/gregorio-project/gregorio/issues/872)).
+- A new dimension, `intersyllablespacestretchhyphen` is now available to add stretching in the case of syllables separated by an hyphen (see comments in [#922](https://github.com/gregorio-project/gregorio/issues/922))
+- A new algorithm for placing bar syllables has been added and is now the default. See UPGRADE.md for more details. The old spacing can be activated with `\gresetbarspacing{old}`. See the following for various aspects of the implementation:
+ - [#767](https://github.com/gregorio-project/gregorio/issues/767)
+ - [#919](https://github.com/gregorio-project/gregorio/issues/919)
+ - [#944](https://github.com/gregorio-project/gregorio/issues/944)
+ - [#978](https://github.com/gregorio-project/gregorio/issues/978)
+- It is now possible to generate a font with a different stem length schema (apart from the default one, Solesmes' is available), see [fonts/README.md](fonts/README.md) for details.
+- Some forms (`ed` for example) will have a different stem length if a ledger line is present. Heuristics to determine the presence of a ledger line or not are quite simple and may not always be correct. Gabc now allows you to force a note to act as if a ledger line was present with `[ll:1]`, or as if there was no ledger line, with `[ll:0]`. See Gabc section of GregorioRef for details.
+- The ability to typeset an inter-glyph space using `/!` in gabc (see [#868](https://github.com/gregorio-project/gregorio/issues/868))
+- Support for two-, three-, and five-line staves. Set the `staff-lines` header to `2`, `3`, or `5`. For all values of `staff-lines`, the note below the staff remains 'c'. The two new notes above the staff (for a five-line staff) are `n` and `p`. See [#429](https://github.com/gregorio-project/gregorio/issues/429).
+- Salicus flexus glyphs (see [#631](https://github.com/gregorio-project/gregorio/issues/631)).
+- Neume fusion, activated in gabc by `@`. Use `@` before a clivis or a porrectus to get an unstemmed figure. Use `@` between two notes to fuse them explicitly. Enclose a set of notes within `@[` and `]` to automatically guess their fusion. See GregorioRef for details (for the channge requests, see [#679](https://github.com/gregorio-project/gregorio/issues/679), [#687](https://github.com/gregorio-project/gregorio/issues/687), and [#692](https://github.com/gregorio-project/gregorio/issues/692)).
+- Hollow version of the oriscus, called by adding the `r` modifier to an oriscus, as in `gor` or `gor<` (See [#724](https://github.com/gregorio-project/gregorio/issues/724)).
+- Headers are now passed to TeX and may be captured in TeX by using the `\gresetheadercapture` command. See GregorioRef for details.
+- Support for half-spaces and ad-hoc spaces. Use `/0` in gabc for a half-space between notes. Use `/[factor]` (substituting a positive or negative real number for the scale factor) for an ad-hoc space whose length is `interelementspace` scaled by the desired factor. See [#736](https://github.com/gregorio-project/gregorio/issues/736).
+- Support for custom length ledger lines. See GregorioRef for details (for the change request, see [#598](https://github.com/gregorio-project/gregorio/issues/598)).
+- Support for a secondary clef. Use `@` to join two clefs together, as in `c1@c4`. The first clef is considered the primary one and will be used when computing an automatic custos before a clef change. See [#755](https://github.com/gregorio-project/gregorio/issues/755).
+- New headers for typesetting text after `mode` above the initial: `mode` will be typeset first, using the `modeline` style, then `mode-modifier`, using the `modemodifier` style, then `mode-differentia`, using the `modedifferentia` style. See GregorioRef for details (for the change request, see [#756](https://github.com/gregorio-project/gregorio/issues/756)).
+- Automatic line breaks before a `<eu>` block may be made ragged by using `\gresetbreakbeforeeuouae{ragged}`. See GregorioRef for details (for the change request, see [#764](https://github.com/gregorio-project/gregorio/issues/764)).
+- The ability to typeset simple slurs. See GregorioRef for details (for the change request, see [#776](https://github.com/gregorio-project/gregorio/issues/776)).
+- More control over the alignment of the annotation. You can now set either the first line or the last line of the annotation as the controling line with `\gresetannotationby{firstline}` and `\gresetannotationby{lastline}` respectively. Additionaly, within the line you can specify the top, baseline, or bottom of the line as the alignment point with `\gresetannotationvalign{top}`, `\gresetannotationvalign{baseline}`, and `\gresetannotationvalign{bottom}` respectively. Default behavior is baseline of the top line (as it was before). These alignment controls are applied before `annotationraise` is taken into account. See [#768](https://github.com/gregorio-project/gregorio/issues/768) for details.
+- More control over the placement of the commentary. You can now set the amount of space between the lines of a multi-line commentary with `commentaryseparation` and the distance from the top line of the staff to the baseline of the bottom line of the commentary with `commentaryraise`. See [#662](https://github.com/gregorio-project/gregorio/issues/662) for original request.
+- Styles for the annotation and the commentary. `annotation` has no default styling. `commentary` defaults to footnote sized italics.
+- `\grecommentary` now takes an optional argument which will add extra space between the commentary and the score for just the next score.
+- The custos can now be selectively enabled/disabled at forced line breaks by appending `+` (to enable) or `-` (to disable) after the `z` or `Z` (see [#800](https://github.com/gregorio-project/gregorio/issues/800)).
+- With thanks to an anonymous contributor, the shape of the MetaPost-drawn curly brace has been improved (see [#797](https://github.com/gregorio-project/gregorio/issues/797)).
+- Support for elisions, text between `<e>` and `</e>` in gabc, styled according to the `elision` style, which are excluded when determining where to position the text under its notes (see [#838](https://github.com/gregorio-project/gregorio/issues/838)).
+- Special characters (between `<sp>` and `</sp>` in gabc) may now be customized using the `\gresetspecial` and `\greunsetspecial` commands. See GregorioRef for details (for the change request, see [#846](https://github.com/gregorio-project/gregorio/issues/846)).
+- `\gresetbracerendering` can now take an optional argument to change the rendering of a single type of brace. See GregorioRef for details (for the change request, see [#850](https://github.com/gregorio-project/gregorio/issues/850)).
+
+### Deprecated
+- `initial-style` gabc header, supplanted by the `\gresetinitiallines` TeX command.
+- `biginitial` style, consolidated into the `initial` style.
+- `\grescorereference`
+
+### Removed
+- `\GreSetStaffLinesFormat`, supplanted by `\grechangestyle{normalstafflines}...`
+- `\greinitialformat`, if you were redefining this command, use `\grechangestyle{initial}...` instead
+- `\grebiginitialformat`, if you were redefining this command, use `\grechangestyle{biginitial}...` instead
+- `\gretranslationformat`, if you were redefining this command, use `\grechangestyle{translation}...` instead
+- `\greabovelinestextstyle`, if you were redefining this command, use `\grechangestyle{abovelinestext}...` instead
+- `\grelowchoralsignstyle`, if you were redefining this command, use `\grechangestyle{lowchoralsign}...` instead
+- `\grehighchoralsignstyle`, if you were redefining this command, use `\grechangestyle{highchoralsign}...` instead
+- `\setaboveinitialseparation`, supplanted by `\grechangedim{annotationseparation}...`
+- `\scorereference`
+- `\GreScoreReference`
+- `\commentary`, supplanted by `\grecommentary`
+- `\setgretranslationcenteringscheme`, supplanted by `\gresettranslationcentering`
+- `\englishcentering`, supplanted by `\gresetlyriccentering{syllable}`
+- `\defaultcentering`, supplanted by `\gresetlyriccentering{vowel}`
+- `\setgrefactor`, supplanted by `\grechangestaffsize`
+- `\forcecompilegabc`, supplanted by `\gresetcompilegabc{force}`
+- `\autocompilegabc`, supplanted by `\gresetcompilegabc{auto}`
+- `\nevercompilegabc`, supplanted by `\gresetcompilegabc{never}`
+- `\includescore`, supplanted by `\gregorioscore`
+- `\grenoscaledim`, supplanted by `\grescaledim{...}{no}`
+- `\gresetdim`, supplanted by `\grecreatedim`
+- `\setstafflinethickness`, supplanted by `\grechangestafflinethickness`
+- `\grecoloredlines`, supplanted by `\gresetlinecolor`
+- `\greredlines` and `\redlines`, supplanted by `\gresetlinecolor{gregoriocolor}`
+- `\grenormallines` and `\normallines`, supplanted by `\gresetlinecolor{black}`
+- `\greremovelines`, supplanted by `\gresetlines{invisible}`
+- `\gredonotremovelines`, supplanted by `\gresetlines{visible}`
+- `\GreHidePCLines`, supplanted by `\gresetlinesbehindpunctumcavum{invisible}`
+- `\GreDontHidePCLines`, supplanted by `\gresetlinesbehindpunctumcavum{visible}`
+- `\GreHideAltLines`, supplanted by `\gresetlinesbehindalteration{invisible}`
+- `\GreDontHideAltLines`, supplanted by `\gresetlinesbehindalteration{visible}`
+- `\gresetnlbintranslation`, supplanted by `\gresetbreakintranslation`
+- `\greblockcustos`, supplanted by `\greseteolcustos{manual}`
+- `\greenableeolshifts`, supplanted by `\greseteolshifts{enable}`
+- `\gredisableeolshifts`, supplanted by `\greseteolshifts{disable}`
+- `\GreUseNoramalHyphen`, supplanted by `\greseteolhyphen{normal}`
+- `\GreUseZeroHyphen`, supplanted by `\greseteolhyphen{zero}`
+- `\greremoveclef`, supplanted by `\gresetclef{invisible}`
+- `\grenormalclef`, supplanted by `\gresetclef{visible}`
+- `\AddHEpisemusBridges`, supplanted by `\gresethepisema{bridge}`
+- `\RemoveHEpisemusBridges`, supplanted by `\gresethepisema{break}`
+- `\UseAlternatePunctumCavum`, supplanted by `\gresetpunctumcavum{alternate}`
+- `\UseNormalPunctumCavum`, supplanted by `\gresetpunctumcavum{normal}`
+- `\clivisalignmentalways`, supplanted by `\gresetclivisalignment{always}`
+- `\clivisalignmentnever`, supplanted by `\gresetclivisalignment{never}`
+- `\clivisalignmentspecial`, supplanted by `\gresetclivisalignment{special}`
+- `\greusedefaultstyle`, supplanted by `\gresetglyphsytle{default}`
+- `\greusemedicaeastyle`, supplanted by `\gresetglyphsytle{medicaea}`
+- `\greusehufnagelstyle`, supplanted by `\gresetglyphsytle{hufnagel}`
+- `\greusemensuralstyle`, supplanted by `\gresetglyphsytle{mensural}`
+- `\setspaceafterinitial`, supplanted by `\grechangedim{afterinitialshift}...`
+- `\setspacebeforeinitial`, supplanted by `\grechangedim{beforeinitialshift}...`
+- `\setinitialspacing`, supplanted by `\grechangedim{beforeinitialshift}...`, `\grechangedim{manualinitialwidth}...`, and `\grechangedime{afterinitialshift}...`
+- `centering-scheme` gabc header, supplanted by `\gresetlyriccentering` in TeX. See GregorioRef for syntax.
+- `gregoriotex-font` gabc header, supplanted by `\gresetgregoriofont` in TeX. See GregorioRef for syntax.
+- The meaningless `gabc-version` header in gabc (see [#664](https://github.com/gregorio-project/gregorio/issues/664)).
+
+### Known Bugs
+- When there is no manual break, the spacing around bars at the end of a line in the new spacing algorithm is not perfect, this should be visible only in edge cases. If you encounter such a bad spacing, you are advised to force a line break manually. See [#959](https://github.com/gregorio-project/gregorio/issues/959).
+- Above lines text does not move to account for high notes which occur in the same place. As a result the two may overlap. You can work around this by changing `abovelinestextraise` but this is a global setting, affecting the entire score. See [#960](https://github.com/gregorio-project/gregorio/issues/960).
+- A manual custos in a low note position will not push down the text associated with it, resulting in the two overlapping. See [#961](https://github.com/gregorio-project/gregorio/issues/961).
+
+
+## [4.0.1] - 2015-12-28
+### Fixed
+- `\greseteolcustos` now retains its setting across multiple score inclusions (see [#703](https://github.com/gregorio-project/gregorio/issues/703)).
+- Gregorio now works against luaotfload 2.6 (see [#717](https://github.com/gregorio-project/gregorio/issues/717)).
+- When beginning of line clefs are invisible and bol shifts are enabled, lyric text will no longer stick out into the margin. Further the notes on the first and subsequent lines now align properly. See [#683](https://github.com/gregorio-project/gregorio/issues/683).
+- `\grecross` and `\grealtcross` now print the correct glyphs (see [#713](https://github.com/gregorio-project/gregorio/issues/713)).
+
+
+## [4.0.0] - 2015-12-08
+### Fixed
+- Handling of the first syllable in gabc is now more consistent with the all other syllables. This centers the syllable correctly when using latin syllable centering (see [#42](https://github.com/gregorio-project/gregorio/issues/42)) and makes the use of styles less surprising in the first syllable (see [#135](https://github.com/gregorio-project/gregorio/issues/135)).
+- Handling of manually-placed custos is improved. In particular, a manual custos at the end of the score should no longer be lost when the bar happens to be at the end of the line.
+- Improved rendering of torculus resupinus flexus figures (see [#18](https://github.com/gregorio-project/gregorio/issues/18)).
+- Horizontal episema on the second note of a scandicus is now rendered in the correct place (see [#419](https://github.com/gregorio-project/gregorio/issues/419)).
+- The dot in a space directly above a punctum in a descending neume is now placed slightly higher in the space (see [#386](https://github.com/gregorio-project/gregorio/issues/386) and [Gna! bug 21737](https://gna.org/bugs/?21737)).
+- Choral signs are now positioned correctly around porrectus and torculus resupinus (see [#387](https://github.com/gregorio-project/gregorio/issues/387) and [Gna! bug 22025](https://gna.org/bugs/?22025)).
+- Gregorio will now try harder to select an appropriate pitch for an automatic custos (`z0`) on a clef change (see [#446](https://github.com/gregorio-project/gregorio/issues/446)). If results are not satisfactory, use a manual custos (`+`) to select a pitch manually.
+- The centering of styled text under notes is now correct (See [#509](https://github.com/gregorio-project/gregorio/issues/509)).
+- Space for above lines text is now correctly added as needed, even at the beginning of a score (see [#533](https://github.com/gregorio-project/gregorio/issues/533)).
+- Corrected the rendering of explicit automatic and manual custos at the end of lines when the clef change that follows it is pushed to the next line (see [#569](https://github.com/gregorio-project/gregorio/issues/569)).
+- Distinguished between `eolshift` and `bolshift` giving each their own flag and user commmand for turning them on and off. `\seteolshift{enable}` allows the lyric text to stretch under the custos at the end of the line. `\setbolshift{enable}` aligns the beginning of each line on the notes instead of the text. Both are on by default, but can be turned off with `\seteolshift{disable}` and `\setbolshift{disable}`.
+- The spacing of manual in-line custos (`(f+)` in gabc) is now consistent with the spacing of automatic in-line custos (`(z0)` in gabc). See [#642](https://github.com/gregorio-project/gregorio/issues/642).
+- Signs on the climacus praepunctis deminutus `(ghgf~)` neume are now positioned correctly. See [#650](https://github.com/gregorio-project/gregorio/issues/650)
+- Mac installer has been made SIP compliant (i.e. it now works on El Capitan).
+- Mac installer can now detect installations of TeX Live done with MacPorts or the command-line tool provided by TUG.
+- Windows executable has file version information attached correctly so that the installer can properly recognize and replace the binary during an upgrade process.
+- Spacing was too large when alteration begins a syllable, see [#663](https://github.com/gregorio-project/gregorio/issues/663).
+
+### Changed
+- A new, more systematic naming scheme has been created for GregorioTeX macros. The naming scheme should reduce the chances of naming conflicts with other packages and make it easier to identify what a particular macro is for and how to use it. Most user functions have been renamed in order to bring them into line with this scheme. Please see GregorioRef for a complete list of the new function names. In general, old names will still work, but they will raise a deprecation warning and will be dropped from GregorioTeX in a future relase.
+- The spacing algorithm has completely changed, expect your scores to look quite different (better we hope).
+- Lines are now aligned on the leftmost note instead of the leftmost letter.
+- Some glyph shapes are improved a little in greciliae, it should be noticeable especially for porrectus.
+- The `O` modifier in gabc now has expanded uses beyond the salicus `(egOi)`. A stemmed oriscus will appear on a lone pitch `(gO)` or a followed by a lower pitch `(gOe)` (see [#76](https://github.com/gregorio-project/gregorio/issues/76)). A virga strata will appear on the second note of two ascending pitches `(giO)`.
+- With thanks to *Abbazia Mater Ecclesiae (IT)* for drawing the new shapes, the strophicus, liquescent strophicus, liquescent oriscus, and liquescent punctum inclinatum in greciliae have changed to better differentiate them from other shapes. If you prefer the old shapes use:
+```
+ \grechangeglyph{Stropha}{greciliae}{.caeciliae}
+ \grechangeglyph{StrophaAucta}{greciliae}{.caeciliae}
+ \grechangeglyph{OriscusDeminutus}{greciliae}{.caeciliae}
+ \grechangeglyph{PunctumInclinatumAuctus}{greciliae}{.caeciliae}
+```
+- Default initial sizes have been chosen so that they are more appropriate when an infinitely scaling font is loaded. LaTeX will make an automatic substitution of the closest avaialble size when such a font is not used.
+- Porrectus deminutus and torculus resupinus deminutus glyphs have been updated to more closely match the current Solesmes books (see [#143](https://github.com/gregorio-project/gregorio/issues/143)). If you prefer the old forms, use:
+```
+ \grechangeglyph{Porrectus*}{*}{.alt}
+ \grechangeglyph{TorculusResupinus*}{*}{.alt}
+```
+- New (much) improved drawings for letter bars (for Versicle, Antiphon, etc.). You must fine-tune them if you use a text font other than Linux Libertine, see [UPGRADE.md](UPGRADE.md) for details.
+- The default extension `gregorio` (the executable program) will use when it produces GregorioTeX files has been changed from `.tex` to `.gtex`. Any calls to `\includescore` that use the old extension should be changed appropriately.
+- Horizontal episema improvements:
+ - A horizontal episema on the first two notes of a porrectus is now rendered differently than a horizontal episema on all three notes of a porrectus. It will no longer reach to the right side of the porrectus (see [#70](https://github.com/gregorio-project/gregorio/issues/70)).
+ - Similar to appending `0` to the `_` to force a horizontal episema to appear below a note, `1` may now be appended to the `_` to force a horizontal episema to appear above the note. These may be used simutaneously, by adding both `_0` and `_1` to the same note (see [#40](https://github.com/gregorio-project/gregorio/issues/40)).
+ - It is now possible to render a small horizontal episema. To use it, append `3` (for left-aligned), `4` (for center-aligned), or `5` (for right-aligned) to the `_` used for adding the horizontal episema in gabc (see [#40](https://github.com/gregorio-project/gregorio/issues/40)).
+ - Horizontal episema "bridging" has been made more consistent and is now possible on an episema that is below the note. (see [#389](https://github.com/gregorio-project/gregorio/issues/70)).
+ - It is now possible to suppress the automatic horizontal episema "bridging" across spaces within a syllable. To use it, append `2` to the `_` on the note before the space you do not want bridged (see [#72](https://github.com/gregorio-project/gregorio/issues/72)).
+ - A horizontal episema will no longer overlap with a vertical episema on the same note (see [#395](https://github.com/gregorio-project/gregorio/issues/395)).
+- The dot after a torculus whose last note is on a line will now appear below the line (see [#386](https://github.com/gregorio-project/gregorio/issues/386)). If you do not like the automatic placement of a dot after any note on a line (not just the torculus), you may specify a `0` or `1` after the `.` to force the dot to appear below or above the line, respectively.
+- Choral sign dimensions have been renamed (see [#387](https://github.com/gregorio-project/gregorio/issues/387)):
+ - `beforechoralsignspace` is now `beforelowchoralsignspace`.
+ - `lowchoralsignshift` is now `choralsigndownshift`.
+ - `highchoralsignshift` is now `choralsignupshift` and its sign is now inverted.
+- Style for score elements can now be changed via the `\grechangestyle` command. This replaces the mixed system of styling commands which could be redefined for some elements and specialized commands for applying styles to others. See GregorioRef for details.
+- Annotations with more than two lines are now supported (originally requested [on the user list](http://www.mail-archive.com/gregorio-users%40gna.org/msg00164.html) when two line annoations were made possible). To build the annotation box use `\greannoataion`. See GregorioRef for details.
+- The `annotation` header field in `gabc` now places its value(s) above the inital if no annotation is explicitly given by the user via `\greannotation` (see [#44](https://github.com/gregorio-project/gregorio/issues/44)).
+- `\grescaledim` now takes two arguments to bring it into line with the systemized naming scheme. The second argument should be `scalable` if you want the distance to scale when the staff size changes, `fixed` if you don't.
+- Gregorio is now able to make individual lines of a score taller, when the position of the note require extra space, without affecting the rest of the lines. This is the new default behavior. See [UPGRADE.md](UPGRADE.md) and GregorioRef for details (for the change request, see [#59](https://github.com/gregorio-project/gregorio/issues/59)).
+- Braces are now rendered using MetaPost by default. This allows the line weight to remain more consistent when braces are stretched. The old behavior (which uses the score font instead) can be restored using `\gresetbracerendering{font}`. See [UPGRADE.md](UPGRADE.md) and GregorioRef for details (for the change request, see [#535](https://github.com/gregorio-project/gregorio/issues/535)).
+- `\grecreatedim` and `\grechangedim` now take keywords for their third argument (`scalable` and `fixed`) instead of integers (`1` and `0`) to make the more in keeping with the overall user command conventions.
+- Alterations are partially ignored when aligning lines on the notes (i.e. `\gresetbolshifts{enabled}`). They are not allowed to get any closer to the clef than `beforealterationspace` and the lyrics are not allowed to get any closer to the left-hand margin than `minimalspaceatlinebeginning`, but other than that GregorioTeX will shift them left as much as possible to make the notes align `spaceafterlineclef` away from the clef. Note that for the default values of these distances, only the natural is small enough to acheive true alignment.
+- `gregoriotex.sty` and `gregoriosyms.sty` now check to make sure that they are not both loaded. If `gregoriotex` detects that `gregoriosyms` is loaded, then an error is raised. If `gregoriosyms` detects that `gregoriotex` is loaded, then the loading of `gregoriosyms` is silently aborted and compilation proceeds.
+- Liquescence on a bistropha or tristropha will only appear on the note(s) marked by `<` in gabc, rather than on all notes in the figure. This means that a figure like `(gsss<)` will only have a liquescent "tail" on the final note. If you would like all notes to be liquescent for some reason, you can use a figure like `(gs<gs<gs<)` instead.
+- `alterationspace` is now a fixed dimension, see [UPGRADE.md](UPGRADE.md) for details.
+
+### Added
+- With thanks to Jakub Jelínek, St. Gallen style adiastematic notation is now handled through [nabc syntax](http://gregoriochant.org/dokuwiki/doku.php/language) (see GregorioNabcRef.pdf for details and [the new example](examples/FactusEst.gabc)). Only one line above the notes is currently handled. This is a preview, backward incompatible change are possible in future releases.
+- `<eu>` tag in gabc to delimit *Euouae* block in the score. It prevents linebreaking and makes spaces tighter. See [UPGRADE.md](UPGRADE.md) for details.
+- With thanks to Fr. Jacques Peron, it is now possible to embed short gabc snippets directly into a TeX document. The command is `\gabcsnippet`. See GregorioRef.pdf for full details.
+- `[ub:x:y mm]` tag, similar to `[ob:x:y mm]`, but for braces under notes.
+- `[ob:x{]` and `[ob:x}]` tag pairs for braces where the length is determined by the distance of the opening and closing tags. `[ocb:x{]` with `[ocb:x}]`, `[ocba:x{]` with `[ocba:x}]` and `[ub:x{]` with `[ub:x}]` can be used similarly for other kinds of braces and brackets.
+- The ability to substitute an arbitrary glyph for one used by GregorioTeX. This adds four macros:
+ - `\grechangeglyph` to make a score glyph substitution
+ - `\greresetglyph` to remove a score glyph substitution
+ - `\gredefsymbol` for (re-)defining an arbitrary non-score glyph that scales with the text
+ - `\gredefsizedsymbol` for (re-)defining an arbitary non-score glyph that requires a point-size to be specified.
+See GregorioRef.pdf for full details.
+- Added `--with-kpathsea` option to configure script, to check input and output file against `openout_any` and `openin_any` settings of texmf.cnf (TeX Live only). Necessary to be included in `shell_escape_commands` in TeX Live.
+- Support for `lualatex -recorder`. Autocompiled gabc and gtex files will now be properly recorded so that programs like `latexmk -recorder` can detect the need to rebuild the PDF when a gabc file changes.
+- A vertical episema may now be forced to appear above or below a note. In gabc, use `'0` for the vertical episema to appear below and `'1` for the vertical episema to appear above (see [#385](https://github.com/gregorio-project/gregorio/issues/385)).
+- The first word, first syllable, and first letter of the first syllable that is *not* interpreted as the initial of the score can now be styled from TeX. Use `\grechangestyle` to modify the `firstsyllableinitial`, `firstsyllable`, and `firstword` as desired.
+- The final line of a score may now be forced to be fully justified (rather than ragged) using `\gresetlastline{justified}` before including the score (see [#43](https://github.com/gregorio-project/gregorio/issues/43)). Use `\gresetlastline{ragged}` to switch back to a ragged last line.
+- `\gresethyphen{force}` forces GregorioTeX to put a hyphen between each syllable in a polysyllabic word. `\gresethyphen{auto}` restores behavior to normal.
+- Support for custom vowel centering rules. Put a file called `gregorio-vowels.dat` into your project directory or into a directory accessible from TEXMF and add the header `language: name;` to your gabc file. The `gregorio-vowels.dat` file describes how vowels are to be located in the *name* language. See GregorioRef for details.
+- `\gresetlinecolor` takes a named color as an argument. As a result, the red staff lines can be made consistent with the text, even when the user changes `gregoriocolor` with `\gresetlinecolor{gregoriocolor}`. Addresses [#21787 on the old tracker](https://gna.org/bugs/index.php?21787).
+- Package option `allowdeprecated=false`. Causes all deprecated commands to raise an error and halt TeX.
+- The ability to add LilyPond-like point-and-click textedit links into the PDF file to aid with debugging scores. This must be explicitly enabled and **should be turned off** when producing files for distribution as it embeds path information into the output. To enable this, you must pass the `-p` option to gregorio when compiling gabc files and add `\gresetpointandclick{on}` before including the score. It may be toggled back off with `\gresetpointandclick{off}`. See GregorioRef for details (for the change request, see [#528](https://github.com/gregorio-project/gregorio/issues/528)).
+- New score fonts with glyphs unique to Dominican chant. These fonts replace the epiphonus and the augmented liquescents with corresponding figures from Dominican liturgical books. To use the new fonts, pass the `[op]` option to the `\gresetgregoriofont` command (i.e., `\gresetgregoriofont[op]{greciliae}`). See GregorioRef for details (for the change request, see [#1](https://github.com/gregorio-project/gregorio/issues/1)).
+- Support for "punctum cavum inclinatum" and "punctum cavum inclinatum auctus" figures. The gabc for these are `(Gr)` and `(Gr<)`, where `G` is the capitalized pitch letter.
+- `\greillumination`: allows user to specify arbitrary content (usually an image) to be used as the initial.
+- New distance, `initialraise`, which will lift (or lower, if negative) the initial.
+- A new type of lyric centering, enabled with `\gresetlyriccentering{firstletter}`, which aligns the neume with the first letter of each syllable.
+- `\greornamentation` allows access to the two ornamentation glyphs. The ability to access these two glyphs via `{\gregoriosymbolfont \char 75}` was broken by the new interface to the glyphs in greextra.
+- The missing liquescent salicus glyphs.
+- The ability to force a hyphen after an empty first syllable, enabled by default since this was the behavior prior to 4.0. Version 4.0 has an improved spacing algorithm which will eliminate the hyphen if the notes for the first syllable are too close to the second. To switch to this behavior, use `\gresetemptyfirstsyllablehyphen{auto}`. See [UPGRADE.md](UPGRADE.md) and GregorioRef for details (for the change request, see [#653](https://github.com/gregorio-project/gregorio/issues/653)).
+- Shell scripts for configuring TeXShop and TeXworks on a Mac.
+
+### Deprecated
+- `\GreSetStaffLinesFormat`, supplanted by `\grechangeformat{normalstafflines}...`
+- `\greinitialformat`, if you were redefining this command, use `\grechangeformat{initial}...` instead
+- `\grebiginitialformat`, if you were redefining this command, use `\grechangeformat{biginitial}...` instead
+- `\gretranslationformat`, if you were redefining this command, use `\grechangeformat{translation}...` instead
+- `\greabovelinestextstyle`, if you were redefining this command, use `\grechangeformat{abovelinestext}...` instead
+- `\grelowchoralsignstyle`, if you were redefining this command, use `\grechangeformat{lowchoralsign}...` instead
+- `\grehighchoralsignstyle`, if you were redefining this command, use `\grechangeformat{highchoralsign}...` instead
+- `\setaboveinitialseparation`, supplanted by `\grechangedim{annotationseparation}...`
+- `\scorereference`, supplanted by `\grescorereference`
+- `\GreScoreReference`, supplanted by `\grescorereference`
+- `\commentary`, supplanted by `\grecommentary`
+- `\setgretranslationcenteringscheme`, supplanted by `\gresettranslationcentering`
+- `\englishcentering`, supplanted by `\gresetlyriccentering{syllable}`
+- `\defaultcentering`, supplanted by `\gresetlyriccentering{vowel}`
+- `\setgrefactor`, supplanted by `\grechangestaffsize`
+- `\forcecompilegabc`, supplanted by `\gresetcompilegabc{force}`
+- `\autocompilegabc`, supplanted by `\gresetcompilegabc{auto}`
+- `\nevercompilegabc`, supplanted by `\gresetcompilegabc{never}`
+- `\includescore`, supplanted by `\gregorioscore`
+- `\grenoscaledim`, supplanted by `\grescaledim{...}{no}`
+- `\gresetdim`, supplanted by `\grecreatedim`
+- `\setstafflinethickness`, supplanted by `\grechangestafflinethickness`
+- `\grecoloredlines`, supplanted by `\gresetlinecolor`
+- `\greredlines` and `\redlines`, supplanted by `\gresetlinecolor{gregoriocolor}`
+- `\grenormallines` and `\normallines`, supplanted by `\gresetlinecolor{black}`
+- `\greremovelines`, supplanted by `\gresetlines{invisible}`
+- `\gredonotremovelines`, supplanted by `\gresetlines{visible}`
+- `\GreHidePCLines`, supplanted by `\gresetlinesbehindpunctumcavum{invisible}`
+- `\GreDontHidePCLines`, supplanted by `\gresetlinesbehindpunctumcavum{visible}`
+- `\GreHideAltLines`, supplanted by `\gresetlinesbehindalteration{invisible}`
+- `\GreDontHideAltLines`, supplanted by `\gresetlinesbehindalteration{visible}`
+- `\gresetnlbintranslation`, supplanted by `\gresetbreakintranslation`
+- `\greblockcustos`, supplanted by `\greseteolcustos{manual}`
+- `\greenableeolshifts`, supplanted by `\greseteolshifts{enable}`
+- `\gredisableeolshifts`, supplanted by `\greseteolshifts{disable}`
+- `\GreUseNoramalHyphen`, supplanted by `\greseteolhyphen{normal}`
+- `\GreUseZeroHyphen`, supplanted by `\greseteolhyphen{zero}`
+- `\greremoveclef`, supplanted by `\gresetclef{invisible}`
+- `\grenormalclef`, supplanted by `\gresetclef{visible}`
+- `\AddHEpisemusBridges`, supplanted by `\gresethepisema{bridge}`
+- `\RemoveHEpisemusBridges`, supplanted by `\gresethepisema{break}`
+- `\UseAlternatePunctumCavum`, supplanted by `\gresetpunctumcavum{alternate}`
+- `\UseNormalPunctumCavum`, supplanted by `\gresetpunctumcavum{normal}`
+- `\clivisalignmentalways`, supplanted by `\gresetclivisalignment{always}`
+- `\clivisalignmentnever`, supplanted by `\gresetclivisalignment{never}`
+- `\clivisalignmentspecial`, supplanted by `\gresetclivisalignment{special}`
+- `\greusedefaultstyle`, supplanted by `\gresetglyphsytle{default}`
+- `\greusemedicaeastyle`, supplanted by `\gresetglyphsytle{medicaea}`
+- `\greusehufnagelstyle`, supplanted by `\gresetglyphsytle{hufnagel}`
+- `\greusemensuralstyle`, supplanted by `\gresetglyphsytle{mensural}`
+- `\setspaceafterinitial`, supplanted by `\grechangedim{afterinitialshift}...`
+- `\setspacebeforeinitial`, supplanted by `\grechangedim{beforeinitialshift}...`
+- `\setinitialspacing`, supplanted by `\grechangedim{beforeinitialshift}...`, `\grechangedim{manualinitialwidth}...`, and `\grechangedime{afterinitialshift}...`
+- `centering-scheme` gabc header, supplanted by `\gresetlyriccentering` in TeX. See GregorioRef for syntax.
+- `gregoriotex-font` gabc header, supplanted by `\gresetgregoriofont` in TeX. See GregorioRef for syntax.
+- The meaningless `gabc-version` header in gabc (see [#664](https://github.com/gregorio-project/gregorio/issues/664)).
+
+### Removed
+- GregorioXML and OpusTeX output
+- Support for `lilypond-preamble`, `musixtex-preamble`, and `opustex-preamble` gabc headers.
+- Support for the font Gregoria.
+- Chironomy markings (gabc `u` and `U`), which were not working correctly in the first place.
+- `\Vbarsmall`, `\greletterbar`, and `\greletteraltbar`, supplanted by the new glyph system, see [UPGRADE.md](UPGRADE.md).
+- `\GreSetAboveInitialSeparation`, supplanted by `\grechangedim{annotationseparation}...`
+- `\includetexscore`, supplanted by `\gregorioscore[n]`
+- `\greincludetexscore`, supplanted by `\gregorioscore[n]`
+- `\includegabcscore`, supplanted by `\gregorioscore[f]`
+- `\greincludegabcscore`, supplanted by `\gregorioscore[f]`
+- `\GreSetSpaceBeforeInitial`, supplanted by `\grechangedim{beforeinitialshift}...`
+- `\GreSetSpaceAfterInitial`, supplanted by `\grechangedim{afterinitialshift}...`
+- `\GreSetAboveInitialSeparation`, supplanted by `\grechangedim{annotationseparation}...`
+- `\gresetstafflinefactor`, supplanted by `\grechangestafflinethickness`
+- `greg-book` and `greg-lily-book` engines, supplanted by improved capabilities of `\gregorioscore` for compiling gabc files at time of document compilation.
+- The TeXShop script for compiling gabc files. Supplanted by the new autocompile feature of the package.
+
+### Known Bugs - FIXED IN 4.0.1
+- When beginning of line clefs are invisible and bol shifts are enabled, lyric text will stick out into the margin. Further the notes on the first and subsequent lines do not align properly. See [#683](https://github.com/gregorio-project/gregorio/issues/683).
+
+
+## [3.0.3] - 2015-07-01
+### Fixed
+- Horizontal episemae on salicus figures now render correctly (See [#511](https://github.com/gregorio-project/gregorio/issues/511)).
+
+## [3.0.2] - 2015-06-01
+### Fixed
+- Prevented the default small font of the above lines text from leaking into the lyrics.
+
+## [3.0.1] - 2015-05-17
+### Fixed
+- Windows Installer is now compatible with MiKTeX. See [#355](https://github.com/gregorio-project/gregorio/issues/355).
+
+## [3.0.0] - 2015-05-14
+### Changed
+- [New website](http://gregorio-project.github.io) containing instructions only for new versions of Gregorio starting with this release, in English only.
+- New clean Mac OSX installer (intel only).
+- New incompatible format of space configuration files (`gsp-xxx.tex`). Values are now scaled to the default staff size (see [#50](https://github.com/gregorio-project/gregorio/issues/50). You now need to use `\gresetdim` for setting distances (`\somedistance = 3cm`) can no longer be used). `\gresetdim` takes three arguments: the name of the distance, the desired value, and whether the distance should scale with changes in the staff size or not. See `gsp-default.tex` for an example.
+- All distances can now be set to scale with staff size, as a consequence `\grechangedim` now takes three arguments: the name of the distance, value to change the distance to (which now supports em and ex units), and whether or not this value should be scaled with changes in the staff size. See doc/UserManual.pdf for details.
+- `\setinitalspacing` , `\setspacebeforeinitial`, `\setspaceafterinitial`, and `\setaboveinitialseparation` now take an additional argument. The new argument specifies whether the distance should scale when the staff size changes.
+- Improved `\includescore` capabilities. The `\includescore[f]` parameter has changed to `\includescore[n]` compared to version 2.4.2. See doc/UserManual.pdf for full details and UPGRADING.md for instructions on how to upgrade your score from 2.4.2.
+- Clivis stem length now follow Solesmes' books conventions (see [#31](https://github.com/gregorio-project/gregorio/issues/31)).
+- Windows TeXworks configuration script no longer adds deprecated `greg-book` and `gregorio` engines (see below).
+- `build.sh` and `install.sh` scripts are now used to build and install Gregorio with common options.
+- Clarified post installation options for Windows installer. What was the "Install Fonts" option is now labeled to indicate that this also adds GregorioTeX files to the texmf tree.
+- `\grechangedim` now checks to make sure it only operates on existing distances and doesn't create a new one.
+
+### Fixed
+- `\includescore` not finding files for autocompile under certain circumstances. (see [this thread](http://www.mail-archive.com/gregorio-users@gna.org/msg02346.html)).
+- Spacing between a syllable and a syllable with text and only a bar was too short.
+- Torculus followed by a non-liquescent note is now parsed correctly (see [#284](https://github.com/gregorio-project/gregorio/issues/284).
+- Spacing after a syllable with an flat, sharp, or natural is now correct (see [#246](https://github.com/gregorio-project/gregorio/issues/246).
+
+### Added
+- `\setstafflinethickness` controls the thickness of the staff lines. See GregorioRef.pdf for full details.
+- `\gre@debug`. Writes messages to the log file when the debug flag is set to true (can be done manually via `\debugtrue`, or via the `debug` option when loading the gregoriotex package in LaTeX).
+- New documentation in PDF: GregorioRef.pdf. You can find it in the [release files](https://github.com/gregorio-project/gregorio/releases).
+- A migration guide ([UPGRADE.md](UPGRADE.md))
+- This CHANGELOG.
+- A Windows batch file which will detect the system setup and create a report which can be useful in diagnosing installation problems. Instructions for how to use it appear [under the installation instructions for Windows on the website.](http://gregorio-project.github.io/installation-windows.html)
+
+### Deprecated
+- OpusTeX writing and GregorioXML reading and writing features will disappear in next minor release
+- The [old website](http://home.gna.org/gregorio/) contains instructions for old versions of Gregorio only, and will not be updated anymore.
+- the `-O` option
+- `\includetexscore`, supplanted by `\includescore[n]`
+- `\greincludetexscore`, supplanted by `\includescore[n]`
+- `\includegabcscore`, supplanted by `\includescore[f]`
+- `\greincludegabcscore`, supplanted by `\includescore[f]`
+- `\GreSetSpaceBeforeInitial`, supplanted by `\setspacebeforeinitial`
+- `\GreSetSpaceAfterInitial`, supplanted by `\setspaceafterinitial`
+- `\GreSetAboveInitialSeparation`, supplanted by `\setaboveinitialseparation`
+- `\gresetstafflinefactor`, supplanted by `\setstafflinethickness`
+- `greg-book` and `greg-lily-book` engines, supplanted by improved capabilities of `\includescore` for compiling gabc files at time of document compilation.
+
+## 2.4.3 - 2015-03-14 [YANKED]
+
+## 2.4.2 - 2015-02-27
+### Changed
+- Improved `\includescore` with GregorioTeX API version checking (auto-compiling when possibly breaking Gregorio update).
+- Clivis and pes quadratum alignment now follows Solesmes' conventions more closely (see [#10](https://github.com/gregorio-project/gregorio/issues/10)).
+
+### Fixed
+- Reducing horizontal episema width.
+- Reducing flat stem length.
+- `mode` and `anotation-line` now do their job.
+- Low episema (`_0`) under consecutive notes are now aligned correctly.
+- Quilisma was melting too much with next note when in a second interval.
+- Fixed custo blocking possibility.
+- Fixing glyphs disapearing when importing into Illustrator.
+
+### Added
+- English centering scheme now available as GregorioTeX option.
+- `\setinitialspacing` to control all spaces related to initial with one command.
+- `\gremanualinitialwidth` macro to specify width of all initials.
+- Virga aucta (for liquescent salicus), gabc `iv>`.
+- Torculus liquescent deminutus and quilisma version, gabc `dfec~` and `dwfec~`.
+- Pressus maior liquescens: `hof~`.
+- Rare form of scandicus.
+- Added `<c>` markup in gabc to denote a change of color.
+- Added `<nlba>` markup in gabc to get areas with no line breaks.
+- Possibility to center translation syllable by syllable, see [here](https://www.mail-archive.com/gregorio-users@gna.org/msg01760.html) and [here](https://www.mail-archive.com/gregorio-users@gna.org/msg01783.html).
+
+## 2.0 - 2010-09-27
+### Changed
+- gregorio API changed and GregorioTeX macros prepended with `\gre`, to avoid potential name conflicts
+- updated greciliae font
+- fine-tuning the spacing, and making it easier for users to change the defaults
+- GregorioXML reading is now optional (via `--enable-xml-read` flag)
+
+### Fixed
+- as always, fixing a lot of bugs
+
+### Added
+- Automatic Windows installer
+- adding requested features: Dominican bars, choral signs, text above staff lines
+- enabling comments in gabc files
+- adding ability to write verbatim TeX at {note, glyph, element} level
+- introducing horizontal episema bridges
+- default output is now utf8 directly; the `-O` option allows old-style TeX output, i.e. `\char XXXX`
+- new static build system for packaged distributions
+
+
+## 1.0 - 2009-10-19
+### Changed
+- changing the number of arguments of some TeX function
+- changing the glyph names
+- improving the spacings
+- better management of the penalty in TeX so that the line changes are more consistent
+- changing the markup system in gabc to be more natural
+
+### Fixed
+- fixing a lot of bugs
+
+### Added
+- adding the possibility to put a flat after the clef
+- adding the possibility to put a custo before a clef change
+
+
+## 0.9.2 - 2008-12-27
+### Changed
+- changing the number of arguments of some TeX function
+- changing the glyph names
+
+### Fixed
+- fixing a lot of bugs
+
+### Added
+- LuaTeX additional functionalities
+
+
+## 0.9.1 - 2008-11-23
+### Changed
+- changing the number of arguments of some TeX functions
+
+### Fixed
+- fixing a lot of small bugs
+
+
+## 0.9 - 2008-07-25
+### Changed
+- stabilizing the TeX API
+
+### Added
+- adding support for Cygwin compilation
+- adding too many new features to be listed
+
+
+## 0.3 - 2008-01-18
+### Changed
+- changing the architecture of libraries and plugins
+
+### Added
+- adding support for end of lines
+- adding support for compilation on MAC OSX
+
+
+## 0.2.2 - 2007-06-14
+### Added
+- adding styles and centering in text
+
+[3.0.0-rc1]: https://github.com/gregorio-project/gregorio/compare/v2.4.2...v3.0.0-rc1
+[3.0.0-rc2]: https://github.com/gregorio-project/gregorio/compare/v3.0.0-rc1...v3.0.0-rc2
diff --git a/Build/source/texk/gregorio/gregorio-src/CONTRIBUTING.md b/Build/source/texk/gregorio/gregorio-src/CONTRIBUTING.md
new file mode 100644
index 00000000000..fe6d94a797a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/CONTRIBUTING.md
@@ -0,0 +1,99 @@
+# Contributing guide for Gregorio
+
+## Reporting an issue
+
+You can report a bug and request a new feature on the [bug tracker](https://github.com/gregorio-project/gregorio/issues).
+
+Please search for existing issues before reporting a new one.
+
+Please do not use the issue tracker for personal support requests, instead use the mailing-list (https://groups.google.com/forum/#!forum/gregorio-users) or IRC: #gregorio on freenode.
+
+### Report a bug
+
+When you report a bug, please provide the following information:
+
+ * version of Gregorio
+ * a minimal example (gabc or gabc+tex if relevant) showing the bug
+ * a screenshot of the wrong result
+ * a precise description (if possible with a picture) of the expected output
+
+### Request feature
+
+When requesting a feature, please provide the following informations:
+
+ * a minimal example (gabc or gabc+tex) that currently doesn't work, but would
+ if the feature was done
+ * a precise description (if possible with a picture) of the expected output
+
+## Contributing code
+
+### Development environment
+
+It is not currently possible to compile Gregorio under Windows. The build requirements
+are the same under GNU/Linux and Mac OSX:
+
+ * [git](http://git-scm.com/)
+ * the [GNU Build System](http://www.gnu.org/software/automake/manual/html_node/GNU-Build-System.html#GNU-Build-System) (often referred to as "Autotools")
+ * [gcc](https://gcc.gnu.org/) (and associated tools)
+ * [GNU indent](https://www.gnu.org/software/indent/) (OSX default indent won't work)
+ * [pylint](http://www.pylint.org/) if you work on Python files
+
+### Coding standards
+
+##### C files
+
+Gregorio targets the following:
+
+ * C standard: [ISO C89 Standard](http://en.wikipedia.org/wiki/ANSI_C#C89)
+ * compilers: [gcc](https://gcc.gnu.org/) and [clang](http://clang.llvm.org/)
+ * architectures: `i586`, `amd64`, `arm`, `arm64`
+ * under Linux, only [`glibc`](http://www.gnu.org/software/libc/)
+ * must compile under Mac OSX natively, and under [mingw32](http://www.mingw.org/) and [mingw_w64](https://sourceforge.net/projects/mingw-w64/)
+ * for inclusion with TeX Live, must compile under VisualStudio 2010 for Windows.
+
+Specific C extensions (GNU extensions, etc.) working for all the above targets are allowed on a case-by-case basis. Patches for other compilers, architectures or libraries can be accepted if they are clean, small and non-intrusive.
+
+Use indent on your code before commiting it, with the `.indent.pro` file in the repository: `indent path/to/my/file.c`.
+
+##### Other files
+
+The rest of the code uses two spaces for indentation of `.tex`, `.lua` and other files, and four spaces for `.py` files.
+
+Gregorio provides an [`.editorconfig` file](../.editorconfig), using an [editorconfig plugin](http://editorconfig.org/#download) for your editor will configure it automatically.
+
+Python files must output no error when inspected by `pylint`.
+
+TeX code must use LuaTeX (more than TeX + eTeX + Omega + PDFTeX) primitives as much as possible, and, when not possible, use code compiling under PlainTeX. All lines inside macro definitions must end with `%` to avoid spurious spaces. To check that no line has been forgotten, please check that `grep -nE '^(\s|\\(|g|e|x)def)[^%]+$' tex/*.tex tex/*.sty` returns only Lua and metapost code or other lines where `%` is not needed.
+
+### Tests
+
+Before submitting a change, please run the tests in [gregorio-test](gregorio-project/gregorio-test) against your resulting code.
+
+When your changes are significant, please provide a test demonstrating the change. See [test documentation](https://github.com/gregorio-project/gregorio-test/blob/master/README.md).
+
+If your change breaks some of the existing tests, then please either fix the existing tests or propose the new results be accepted as more "correct" than the old ones.
+
+If you are submitting a new or modified test, please create a new branch in the test repository (preferably with a name which matches the name of the branch your changes are on in the main repository) where you can make these changes. Then create a pull request in the test repository which explains your changes and make sure to reference the corresponding pull request in the main repository. This way those reveiwing your changes can also see what you expect the new test results to be.
+
+### Documentation
+
+If your code has an impact on the user, you must add it to the [changelog file](CHANGELOG.md).
+
+You must also document it in the right places:
+
+ * [User manual](doc/) for changes in GregorioTeX
+ * the [website](http://gregorio-project.github.io/) (in [another repository](https://github.com/gregorio-project/gregorio-project.github.io)) if relevant.
+
+### Git Workflow
+
+The Gregorio team is following the [classical Github workflow](https://guides.github.com/introduction/flow/). More precisely it follows what is sometimes described as "[Gitflow Worflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)", keeping the same branch naming convention.
+
+### Make a pull request
+
+Once you are ready to contribute code:
+
+ * fork the repository and checkout your fork
+ * create a new branch for the pull request you want to make
+ * commit your changes to this new branch
+ * make a pull request from this new branch to the relevant branch (usually `develop`)
+ * the Gregorio developers will inspect and comment your pull request, and finally merge it (or not)
diff --git a/Build/source/texk/gregorio/gregorio-src/CONTRIBUTORS.md b/Build/source/texk/gregorio/gregorio-src/CONTRIBUTORS.md
new file mode 100644
index 00000000000..3fc29b0cbc1
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/CONTRIBUTORS.md
@@ -0,0 +1,49 @@
+## Authors
+
+Gregorio is developed by:
+
+ * [Elie Roux](mailto:elie.roux@telecom-bretagne.eu)
+ * [Olivier Berten](mailto:olivier.berten@gmail.com)
+ * [Henry So Jr](mailto:henryso@panix.com)
+ * [Br. Samuel Springuel](mailto:rpspringuel@gmail.com)
+ * [Rev. Elijah Schwab](mailto:elijahschwab@gmail.com)
+ * [Jakub Jelínek](mailto:jakub@redhat.com)
+ * [Br. Gabriel-Marie](mailto:brgabriel@sspx.com)
+
+The following people also contributed in the past:
+
+ * [Jérémie Corbier](mailto:jeremie.corbier@telecom-bretagne.eu)
+ * [Tracy Llenos](mailto:tllenos@gmail.com)
+
+## Thanks
+
+Gregorio has been developed with valuable help and support from:
+
+ * Yannis Haralambous
+ * [The Abbey Ste Madeleine du Barroux (FR)](http://www.barroux.org/)
+ * [The Monastery of St Benedict in Norcia (IT)](http://osbnorcia.org/)
+ * Matthew Spencer (author of [Caeciliae](http://marello.org/caeciliae/))
+ * Juergen Reuter (author of Parmesan font from [Lilypond](http://www.lilypond.org/index.html))
+ * Nicolas Aupetit
+ * Bertrand Grelot
+ * Patrick Roux
+ * Fr. Jacques Peron
+ * Br. Innocent Smith
+ * [Illuminare Publications](https://www.illuminarepublications.com/)
+ * Richard Chonak
+ * David Gippner
+ * Quentin Lamy
+ * [The Abbey of Solesmes (FR)](http://www.solesmes.com/)
+ * [The Abbey of Flavigny (FR)](http://www.clairval.com)
+ * [Abbazia di Praglia (IT)](http://www.praglia.it)
+ * [Abbazia Mater Ecclesiae (IT)](http://it.wikipedia.org/wiki/Abbazia_Mater_Ecclesiae)
+ * [e-codices](http://www.e-codices.unifr.ch)
+ * [Stiftsbibliothek, St. Gallen (CH)](http://www.stibi.ch/)
+ * [Stiftsbibliothek, Einsiedeln (CH)](http://kloster-einsiedeln.ch/)
+ * [Bibliothèque municipale de Laon (FR)](http://manuscrit.ville-laon.fr/)
+ * [Gna!](http://gna.org)
+ * [Github](https://github.com/)
+
+## Acknowledgments
+
+ * The SHA-1 digest code comes from [GNU coreutils](http://www.gnu.org/software/coreutils/coreutils.html) and has been adapted to suit Gregorio as permitted by the GPL, version 3 or later. Our copyright has been added to theirs in the appropriate source files.
diff --git a/Build/source/texk/gregorio/gregorio-src/COPYING.md b/Build/source/texk/gregorio/gregorio-src/COPYING.md
new file mode 100644
index 00000000000..91abac0e1f8
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/COPYING.md
@@ -0,0 +1,698 @@
+#License of Gregorio
+
+The program Gregorio is Copyright (C) 2007-2019 The Gregorio Project,
+see [CONTRIBUTORS.md](CONTRIBUTORS.md) for authors. It is distributed
+under the GPLv3 license, printed below.
+
+The GPLv3 license applies to all files in the Gregorio sources and
+repository, except:
+
+- the *greciliae* font (C) 2007 Matthew Spencer, under the
+ [SIL Open Font
+ License](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
+- the other fonts, under the GPLv3 license with font exception.
+
+The font exception reads:
+
+ As a special exception, if you create a document which uses this font,
+ and embed this font or unaltered portions of this font into the document,
+ this font does not by itself cause the resulting document to be covered by
+ the GNU General Public License. This exception does not however invalidate
+ any other reasons why the document might be covered by the GNU General
+ Public License. If you modify this font, you may extend this exception
+ to your version of the font, but you are not obligated to do so. If you
+ do not wish to do so, delete this exception statement from your version.
+
+Some files in fonts/ or contrib/ have individual copyright, but are
+distributed under the GPLv3.
+
+
+GNU GENERAL PUBLIC LICENSE
+==========================
+
+*Version 3, 29 June 2007*
+
+*Copyright © 2007 Free Software Foundation, Inc. \<<http://fsf.org/>\>*
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+Preamble
+--------
+
+The GNU General Public License is a free, copyleft license for software
+and other kinds of works.
+
+The licenses for most software and other practical works are designed to
+take away your freedom to share and change the works. By contrast, the
+GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.
+Our General Public Licenses are designed to make sure that you have the
+freedom to distribute copies of free software (and charge for them if
+you wish), that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you these
+rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether gratis
+or for a fee, you must pass on to the recipients the same freedoms that
+you received. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+**(1)** assert copyright on the software, and **(2)** offer you this
+License giving you legal permission to copy, distribute and/or modify
+it.
+
+For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of protecting
+users' freedom to change the software. The systematic pattern of such
+abuse occurs in the area of products for individuals to use, which is
+precisely where it is most unacceptable. Therefore, we have designed
+this version of the GPL to prohibit the practice for those products. If
+such problems arise substantially in other domains, we stand ready to
+extend this provision to those domains in future versions of the GPL, as
+needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+TERMS AND CONDITIONS
+--------------------
+
+### 0. Definitions.
+
+“This License” refers to version 3 of the GNU General Public License.
+
+“Copyright” also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+“The Program” refers to any copyrightable work licensed under this
+License. Each licensee is addressed as “you”. “Licensees” and
+“recipients” may be individuals or organizations.
+
+To “modify” a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a “modified version” of the
+earlier work or a work “based on” the earlier work.
+
+A “covered work” means either the unmodified Program or a work based on
+the Program.
+
+To “propagate” a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+To “convey” a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays “Appropriate Legal Notices” to
+the extent that it includes a convenient and prominently visible feature
+that **(1)** displays an appropriate copyright notice, and **(2)** tells
+the user that there is no warranty for the work (except to the extent
+that warranties are provided), that licensees may convey the work under
+this License, and how to view a copy of this License. If the interface
+presents a list of user commands or options, such as a menu, a prominent
+item in the list meets this criterion.
+
+### 1. Source Code.
+
+The “source code” for a work means the preferred form of the work for
+making modifications to it. “Object code” means any non-source form of a
+work.
+
+A “Standard Interface” means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that is
+widely used among developers working in that language.
+
+The “System Libraries” of an executable work include anything, other
+than the work as a whole, that **(a)** is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and **(b)** serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A “Major
+Component”, in this context, means a major essential component (kernel,
+window system, and so on) of the specific operating system (if any) on
+which the executable work runs, or a compiler used to produce the work,
+or an object code interpreter used to run it.
+
+The “Corresponding Source” for a work in object code form means all the
+source code needed to generate, install, and (for an executable work)
+run the object code and to modify the work, including scripts to control
+those activities. However, it does not include the work's System
+Libraries, or general-purpose tools or generally available free programs
+which are used unmodified in performing those activities but which are
+not part of the work. For example, Corresponding Source includes
+interface definition files associated with source files for the work,
+and the source code for shared libraries and dynamically linked
+subprograms that the work is specifically designed to require, such as
+by intimate data communication or control flow between those subprograms
+and other parts of the work.
+
+The Corresponding Source need not include anything that users can
+regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same
+work.
+
+### 2. Basic Permissions.
+
+All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey,
+without conditions so long as your license otherwise remains in force.
+You may convey covered works to others for the sole purpose of having
+them make modifications exclusively for you, or provide you with
+facilities for running those works, provided that you comply with the
+terms of this License in conveying all material for which you do not
+control copyright. Those thus making or running the covered works for
+you must do so exclusively on your behalf, under your direction and
+control, on terms that prohibit them from making any copies of your
+copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the
+conditions stated below. Sublicensing is not allowed; section 10 makes
+it unnecessary.
+
+### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article 11
+of the WIPO copyright treaty adopted on 20 December 1996, or similar
+laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to the
+covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+### 4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice; keep
+intact all notices stating that this License and any non-permissive
+terms added in accord with section 7 apply to the code; keep intact all
+notices of the absence of any warranty; and give all recipients a copy
+of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and
+you may offer support or warranty protection for a fee.
+
+### 5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the terms
+of section 4, provided that you also meet all of these conditions:
+
+- **a)** The work must carry prominent notices stating that you
+ modified it, and giving a relevant date.
+- **b)** The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section 7.
+ This requirement modifies the requirement in section 4 to “keep
+ intact all notices”.
+- **c)** You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This License
+ will therefore apply, along with any applicable section 7 additional
+ terms, to the whole of the work, and all its parts, regardless of
+ how they are packaged. This License gives no permission to license
+ the work in any other way, but it does not invalidate such
+ permission if you have separately received it.
+- **d)** If the work has interactive user interfaces, each must
+ display Appropriate Legal Notices; however, if the Program has
+ interactive interfaces that do not display Appropriate Legal
+ Notices, your work need not make them do so.
+
+A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work, and
+which are not combined with it such as to form a larger program, in or
+on a volume of a storage or distribution medium, is called an
+“aggregate” if the compilation and its resulting copyright are not used
+to limit the access or legal rights of the compilation's users beyond
+what the individual works permit. Inclusion of a covered work in an
+aggregate does not cause this License to apply to the other parts of the
+aggregate.
+
+### 6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms of
+sections 4 and 5, provided that you also convey the machine-readable
+Corresponding Source under the terms of this License, in one of these
+ways:
+
+- **a)** Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium customarily
+ used for software interchange.
+- **b)** Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a written
+ offer, valid for at least three years and valid for as long as you
+ offer spare parts or customer support for that product model, to
+ give anyone who possesses the object code either **(1)** a copy of
+ the Corresponding Source for all the software in the product that is
+ covered by this License, on a durable physical medium customarily
+ used for software interchange, for a price no more than your
+ reasonable cost of physically performing this conveying of source,
+ or **(2)** access to copy the Corresponding Source from a network
+ server at no charge.
+- **c)** Convey individual copies of the object code with a copy of
+ the written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+- **d)** Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party) that
+ supports equivalent copying facilities, provided you maintain clear
+ directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+- **e)** Convey the object code using peer-to-peer transmission,
+ provided you inform other peers where the object code and
+ Corresponding Source of the work are being offered to the general
+ public at no charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be included
+in conveying the object code work.
+
+A “User Product” is either **(1)** a “consumer product”, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or **(2)** anything designed or sold for
+incorporation into a dwelling. In determining whether a product is a
+consumer product, doubtful cases shall be resolved in favor of coverage.
+For a particular product received by a particular user, “normally used”
+refers to a typical or common use of that class of product, regardless
+of the status of the particular user or of the way in which the
+particular user actually uses, or expects or is expected to use, the
+product. A product is a consumer product regardless of whether the
+product has substantial commercial, industrial or non-consumer uses,
+unless such uses represent the only significant mode of use of the
+product.
+
+“Installation Information” for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product
+from a modified version of its Corresponding Source. The information
+must suffice to ensure that the continued functioning of the modified
+object code is in no case prevented or interfered with solely because
+modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied by
+the Installation Information. But this requirement does not apply if
+neither you nor any third party retains the ability to install modified
+object code on the User Product (for example, the work has been
+installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in
+accord with this section must be in a format that is publicly documented
+(and with an implementation available to the public in source code
+form), and must require no special password or key for unpacking,
+reading or copying.
+
+### 7. Additional Terms.
+
+“Additional permissions” are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by this
+License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove
+any additional permissions from that copy, or from any part of it.
+(Additional permissions may be written to require their own removal in
+certain cases when you modify the work.) You may place additional
+permissions on material, added by you to a covered work, for which you
+have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders
+of that material) supplement the terms of this License with terms:
+
+- **a)** Disclaiming warranty or limiting liability differently from
+ the terms of sections 15 and 16 of this License; or
+- **b)** Requiring preservation of specified reasonable legal notices
+ or author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+- **c)** Prohibiting misrepresentation of the origin of that material,
+ or requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+- **d)** Limiting the use for publicity purposes of names of licensors
+ or authors of the material; or
+- **e)** Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+- **f)** Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+All other non-permissive additional terms are considered “further
+restrictions” within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains a
+further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms of
+that license document, provided that the further restriction does not
+survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must
+place, in the relevant source files, a statement of the additional terms
+that apply to those files, or a notice indicating where to find the
+applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions; the above
+requirements apply either way.
+
+### 8. Termination.
+
+You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated **(a)** provisionally,
+unless and until the copyright holder explicitly and finally terminates
+your license, and **(b)** permanently, if the copyright holder fails to
+notify you of the violation by some reasonable means prior to 60 days
+after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated
+permanently if the copyright holder notifies you of the violation by
+some reasonable means, this is the first time you have received notice
+of violation of this License (for any work) from that copyright holder,
+and you cure the violation prior to 30 days after your receipt of the
+notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+### 9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run a
+copy of the Program. Ancillary propagation of a covered work occurring
+solely as a consequence of using peer-to-peer transmission to receive a
+copy likewise does not require acceptance. However, nothing other than
+this License grants you permission to propagate or modify any covered
+work. These actions infringe copyright if you do not accept this
+License. Therefore, by modifying or propagating a covered work, you
+indicate your acceptance of this License to do so.
+
+### 10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+An “entity transaction” is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered work
+results from an entity transaction, each party to that transaction who
+receives a copy of the work also receives whatever licenses to the work
+the party's predecessor in interest had or could give under the previous
+paragraph, plus a right to possession of the Corresponding Source of the
+work from the predecessor in interest, if the predecessor has it or can
+get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may not
+impose a license fee, royalty, or other charge for exercise of rights
+granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that any
+patent claim is infringed by making, using, selling, offering for sale,
+or importing the Program or any portion of it.
+
+### 11. Patents.
+
+A “contributor” is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The work
+thus licensed is called the contributor's “contributor version”.
+
+A contributor's “essential patent claims” are all patent claims owned or
+controlled by the contributor, whether already acquired or hereafter
+acquired, that would be infringed by some manner, permitted by this
+License, of making, using, or selling its contributor version, but do
+not include claims that would be infringed only as a consequence of
+further modification of the contributor version. For purposes of this
+definition, “control” includes the right to grant patent sublicenses in
+a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to make,
+use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+In the following three paragraphs, a “patent license” is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To “grant” such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and
+the Corresponding Source of the work is not available for anyone to
+copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either **(1)** cause the Corresponding Source to be so
+available, or **(2)** arrange to deprive yourself of the benefit of the
+patent license for this particular work, or **(3)** arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. “Knowingly relying” means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify or
+convey a specific copy of the covered work, then the patent license you
+grant is automatically extended to all recipients of the covered work
+and works based on it.
+
+A patent license is “discriminatory” if it does not include within the
+scope of its coverage, prohibits the exercise of, or is conditioned on
+the non-exercise of one or more of the rights that are specifically
+granted under this License. You may not convey a covered work if you are
+a party to an arrangement with a third party that is in the business of
+distributing software, under which you make payment to the third party
+based on the extent of your activity of conveying the work, and under
+which the third party grants, to any of the parties who would receive
+the covered work from you, a discriminatory patent license **(a)** in
+connection with copies of the covered work conveyed by you (or copies
+made from those copies), or **(b)** primarily for and in connection with
+specific products or compilations that contain the covered work, unless
+you entered into that arrangement, or that patent license was granted,
+prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any
+implied license or other defenses to infringement that may otherwise be
+available to you under applicable patent law.
+
+### 12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not convey it at all. For example, if you agree to terms that
+obligate you to collect a royalty for further conveying from those to
+whom you convey the Program, the only way you could satisfy both those
+terms and this License would be to refrain entirely from conveying the
+Program.
+
+### 13. Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have permission
+to link or combine any covered work with a work licensed under version 3
+of the GNU Affero General Public License into a single combined work,
+and to convey the resulting work. The terms of this License will
+continue to apply to the part which is the covered work, but the special
+requirements of the GNU Affero General Public License, section 13,
+concerning interaction through a network will apply to the combination
+as such.
+
+### 14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies that a certain numbered version of the GNU General Public
+License “or any later version” applies to it, you have the option of
+following the terms and conditions either of that numbered version or of
+any later version published by the Free Software Foundation. If the
+Program does not specify a version number of the GNU General Public
+License, you may choose any version ever published by the Free Software
+Foundation.
+
+If the Program specifies that a proxy can decide which future versions
+of the GNU General Public License can be used, that proxy's public
+statement of acceptance of a version permanently authorizes you to
+choose that version for the Program.
+
+Later license versions may give you additional or different permissions.
+However, no additional obligations are imposed on any author or
+copyright holder as a result of your choosing to follow a later version.
+
+### 15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT
+WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+### 16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
+CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
+NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
+SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE
+WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+### 17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided above
+cannot be given local legal effect according to their terms, reviewing
+courts shall apply local law that most closely approximates an absolute
+waiver of all civil liability in connection with the Program, unless a
+warranty or assumption of liability accompanies a copy of the Program in
+return for a fee.
+
+*END OF TERMS AND CONDITIONS*
+
+How to Apply These Terms to Your New Programs
+---------------------------------------------
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively state
+the exclusion of warranty; and each file should have at least the
+“copyright” line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short notice
+like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type 'show c' for details.
+
+The hypothetical commands `show w` and `show c` should show the
+appropriate parts of the General Public License. Of course, your
+program's commands might be different; for a GUI interface, you would
+use an “about box”.
+
+You should also get your employer (if you work as a programmer) or
+school, if any, to sign a “copyright disclaimer” for the program, if
+necessary. For more information on this, and how to apply and follow the
+GNU GPL, see \<<http://www.gnu.org/licenses/>\>.
+
+The GNU General Public License does not permit incorporating your
+program into proprietary programs. If your program is a subroutine
+library, you may consider it more useful to permit linking proprietary
+applications with the library. If this is what you want to do, use the
+GNU Lesser General Public License instead of this License. But first,
+please read \<<http://www.gnu.org/philosophy/why-not-lgpl.html>\>.
diff --git a/Build/source/texk/gregorio/gregorio-src/Makefile.am b/Build/source/texk/gregorio/gregorio-src/Makefile.am
new file mode 100644
index 00000000000..c62834a9126
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/Makefile.am
@@ -0,0 +1,49 @@
+# Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+SUBDIRS = src examples tex contrib fonts doc
+
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST = README.md CHANGELOG.md CONTRIBUTING.md CONTRIBUTORS.md \
+ UPGRADE.md COPYING.md .gregorio-version VersionManager.py \
+ build.sh install.sh install-gtex.sh
+
+MAINTAINERCLEANFILES = gregoriotex.ctan.zip
+
+export TOP_LEVEL_MAKE = true
+
+gregorio:
+ make -C src all
+
+fonts: make-fonts
+make-fonts:
+ make -C fonts fonts
+
+clean-fonts:
+ make -C fonts clean-fonts
+
+doc: pdf
+clean-pdf: clean-doc
+clean-doc:
+ make -C doc clean-doc
+
+gregoriotex.tds.zip: dist install-gtex.sh
+ ./install-gtex.sh tds
+
+ctan: dist gregoriotex.tds.zip build-ctan.sh
+ ./build-ctan.sh
diff --git a/Build/source/texk/gregorio/gregorio-src/README.md b/Build/source/texk/gregorio/gregorio-src/README.md
new file mode 100644
index 00000000000..215993bdeec
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/README.md
@@ -0,0 +1,41 @@
+# Gregorio
+
+Gregorio is a software application for engraving Gregorian Chant scores on a computer. Gregorio's main job is to convert a [gabc file](http://gregorio-project.github.io/gabc/index.html) (simple text representation of a score) into a [GregorioTeX file](http://gregorio-project.github.io/gregoriotex/index.html), which makes [TeX](http://gregorio-project.github.io/gregoriotex/tex.html) able to create a PDF of your score.
+
+## Usage
+
+Create a `.gabc` file representing your score (see our [tutorial](http://gregorio-project.github.io/tutorial/tutorial-gabc-01.html)), or fetch one from [the database](http://gregobase.selapa.net/).
+
+Create a [LaTeX](http://en.wikipedia.org/wiki/LaTeX) file that will produce the final pdf, and include your score. See [the example](examples/main-lualatex.tex).
+
+Compile the LaTeX file with LuaLaTeX, you get your score in PDF! You can change the LaTeX file to include other scores, create booklets, books, etc.
+
+You can also try it online [here](http://dev.illuminarepublications.com/gregorio/).
+
+## Installation
+
+You need a recent and working [TeX Live](https://www.tug.org/texlive/), on top of which you just need to install latest [Gregorio release](https://github.com/gregorio-project/gregorio/releases). See [the website](http://gregorio-project.github.io/installation.html) for more details.
+
+## Building for inclusion in TeX Live
+
+When building gregorio for inclusion in TeX Live, the gregorio executable must not have the version number suffix that is used for other builds. To make this happen, run `configure` with the `--disable-version-in-exe` option, and the generated Makefile will create a gregorio executable without the version number suffix (i.e., the executable will simply be named `gregorio`).
+
+## Documentation
+
+You can find documentation and useful links in the [documentation](doc/), on [the main website](http://gregorio-project.github.io/) and on [a wiki](http://gregoriochant.org).
+
+## History
+
+See [CHANGELOG.md](CHANGELOG.md).
+
+## Credits
+
+See [CONTRIBUTORS.md](CONTRIBUTORS.md).
+
+## Contributing and bug reporting
+
+See [CONTRIBUTING.md](CONTRIBUTING.md).
+
+## License
+
+The code is mainly under the [GPLv3](https://www.gnu.org/licenses/quick-guide-gplv3.en.html) license, with fonts under the [Open Font License](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL). See [complete license](COPYING.md) for more details.
diff --git a/Build/source/texk/gregorio/gregorio-src/UPGRADE.md b/Build/source/texk/gregorio/gregorio-src/UPGRADE.md
new file mode 100644
index 00000000000..88ec9783243
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/UPGRADE.md
@@ -0,0 +1,454 @@
+# Upgrade Manual
+
+This file contains instructions to upgrade to a new release of Gregorio. These instructions are cumulative; meaning that you should apply the instructions from all versions between the one you are upgrading from and the current version.
+
+## Unreleased
+
+Gregorio will now use an "upright" punctum inclinatum shape for a series of unison punctum inclinatum notes over a given syllable. When there is a single punctum inclinatum, Gregorio will use a heuristic to choose a shape. In any of these cases, if the result is not satisfactory, especially in context with nearby syllables, you may select a different shape by using `0` (for the descending shape) or `1` (for the ascending shape) after the capitalized letter indicating the punctum inclinatum. Forced selection of the upright shape is also possible by using `2` after the capitalized letter indicating the punctum inclinatum.
+
+## 5.1
+
+No additional steps are needed to upgrade from 5.0 to 5.1.
+
+## 5.0
+
+### Auto-compilation
+
+The `autocompile` option is now the default option for the behavior of `\gregorioscore`. If you want to go back to the old, manual behavior, then you should pass the `nevercompile` option when loading `gregoriotex`.
+
+### Additional fonts
+
+With the addition of more cavum shapes, the number of font options which come with Gregorio (the package) by default has been reduced in order to control the download size. From now on only Greciliae (and its "-op" Dominican variant) will be installed by default. The Gregorio and Grana Padano fonts, as well as their "-op" Dominican variants, will now be available as a separate download. If you were using these fonts, either download `supp_fonts-5_0_0.zip` and install them or switch to Greciliae.
+
+To install the new versions of Gregorio (the font) and Grana Padano, unzip `supp_fonts-5_0_0.zip`, navigate to the uncompressed folder in Terminal (or Command Prompt on Windows) and execute `texlua install_supp_fonts.lua` after you have installed the main Gregorio distribution. This script will look for the location of Greciliae and copy the other fonts to that location. If you wish to control the installation of the fonts manually, the script takes an optional argument with one of the following values:
+
+ * `auto` (optional): the same folder as Greciliae
+ * `system`: the appropriate font folder in `$TEXMFLOCAL`
+ * `user`: the appropriate font folder in `$TEXMFHOME`
+ * `<dir>`: the name of an alternate texmf root directory you want to use
+
+Additionally, if you are building the fonts yourself from a git clone, `install-gtex.sh` and `install_supp_fonts.lua` will install all the fonts you have built, not just the ones they are normally distributed with.
+
+**Note:** All the above methods assume you only need to access the fonts from within a TeX document (and thus are designed to put them into the correct folder in a texmf tree). If you want to use the fonts in other programs, then you will need to consult the documentation appropriate to your platform and/or the program and manually move, copy, or link the fonts to the necessary location.
+
+### Ledger lines
+
+As of version 5.0, ledger lines are extended through notes on either side of a ledger line that crosses a stem, as long as the notes are within the same element.
+
+The algorithm for this is simple so it can be predictable, and it cannot take into account spacing adjustments made in TeX. This means it may not produce the exactly desired results. In order to get the results you want, you can override the automatic behavior in gabc:
+
+- `[oll:1]` will force an over-the-staff ledger line on a note.
+- `[oll:0]` will suppress an over-the-staff ledger line on a note.
+- `[ull:1]` will force an under-the-staff ledger line on a note.
+- `[ull:0]` will suppress an under-the-staff ledger line on a note.
+
+The other `oll` and `ull` forms take precendence over and will interfere with the above settings, so if you are using them, you may need to adjust them to get the output you want.
+
+Note: You may need to use a construct such as `/!` to keep notes that are separated in the same element. For example, `abcV` is two elements (`ab` and `cV`), so the ledger line on `b` is not extended to `cV`. In contrast, `ab/!cV` is one element, so the ledger line on `b` is extended to `cV`.
+
+### End-of-line hyphen protrusion factor
+
+As of version 5.0, the `\gresethyphenprotrusion{percentage}` command is deprecated. To set this protrusion factor, use `\gresetprotrusionfactor{eolhyphen}{factor}` instead. Note that the `factor` taken by the new command is a factor rather than the percentage taken by the deprecated command, so for example, use `\gresetprotrusionfactor{eolhyphen}{0.5}` instead of `\gresethyphenprotrusion{50}`.
+
+### Oriscus orientation at the unison
+
+As of version 5.0, when the note after the oriscus is at the same pitch as the oriscus, the oriscus will point towards the first non-unison note after the oriscus or downwards if at the end of the score. Use the `0` (for downwards) `1` (for upwards) modifiers to force a different orientation.
+
+### Elisions in vowel centering
+
+As of version 5.0, elisions after a vowel centering prefix will not cause the center to be placed on the vowel at the end of the prefix. Since elisions are unvoiced vowels, this makes more sense than the previous behavior. However, if this change does not produce your desired output, you may surround the center manually with `{` and `}` in gabc.
+
+## 4.2
+
+### Executable file name
+
+In order to facilitate installation alongside TeX Live, the version number is now appended to the gregorio executable file name. In version 4.2.0, the filename is `gregorio-4_2_0`. If you run the executable directly, you will need to modify your procedures and/or scripts to use the new name. Alternately, creating a symbolic link, if your system supports it, may work for you.
+
+If you auto-compile or force-compile your GABC files and are *not* using the Gregorio packaged with TeX Live, you will probably need to use the `--shell-escape` option when compiling your `.tex` files. Alternately, you can add the new filename to your system's `shell_escape_commands` TeX option.
+
+Unfortunately, there appears to be no easier way to let a user-installed Gregorio coexist with the TeX-Live-packaged Gregorio. Please note: in TeX Live 2016, which includes Gregorio 4.1.1, the executable filename does not include the version number, though that will change starting with TeX Live 2017.
+
+### Stemmed oriscus flexus orientation
+
+As of version 4.2, the orientation of the stemmed oriscus flexus `(gOe)` is consistent with the unstemmed oriscus flexus `(goe)` in that the oriscus points downwards (since the note which follows is of lower pitch). If you prefer the oriscus to point upwards, you will need to use the `1` modifier (as in `(gO1e)`), which will force an upward orientation of the oriscus.
+
+### Podatus followed by a virga
+
+As of version 4.2, a podatus followed by a virga of the same or higher pitch as the second note in the podatus (e.g., `(eghv)`) will be kept together, disallowing a line break between the two shapes. If you would like to allow a line break between the two shapes, use a `/` or some other breakable space between them (e.g., `(eg/hv)`).
+
+### Penalties
+
+As of version 4.2, the penalties should be changed by using `\grechangecount` rather than the old way of redefining macros. The following tunable values are available (they have the same name as their old macro counterparts, minus the `gre`):
+
+- `brokenpenalty`
+- `clubpenalty`
+- `endafterbaraltpenalty`
+- `endafterbarpenalty`
+- `endofelementpenalty`
+- `endofsyllablepenalty`
+- `endofwordpenalty`
+- `finalpenalty`
+- `hyphenpenalty`
+- `looseness`
+- `newlinepenalty`
+- `nobreakpenalty`
+- `pretolerance`
+- `tolerance`
+- `widowpenalty`
+
+See GregorioRef for descriptions.
+
+Additionally, if you were redefining `\greemergencystretch`, you should now be changing the `emergencystretch` dimension using the `\grechangedim` command.
+
+### Custos with alteration
+
+If the note following a custos has an alteration (flat, natural, or sharp), the custos will now also have that alteration typeset before it. If you prefer the old behavior, use `\gresetcustosalteration{invisible}`. This setting may be switched to `visible` and `invisible` between scores.
+
+### Punctum inclinatum orientation
+
+As of version 4.2, a different glyph is used for puncta inclinata in an ascent versus puncta inclinata in a descent. However, because the two shapes clash with each other, Gregorio will attempt to use the same shape for all notes within a string of puncta inclinata. This is accomplished by a heuristic algorithm that determines the glyph to use, but tastes differ, so you may override the shape by appending `0` (to force descending) or `1` (to force ascending) after the letter used for the punctum inclinatum.
+
+Two additional distances have been added to handle strings of puncta inclinata which both ascend and descend. `descendingpunctuminclinatumascendingshift` will be used between two descending punctum inclinatum glyphs which ascend in pitch, and `ascendingpunctuminclinatumdescendingshift` will be used between two ascending punctum inclinatum glyphs which descend in pitch.
+
+### Styles spanning syllables
+
+From version 4.2, gabc styles persist through syllables so you can now, for instance, style an entire verse differently from the rest of the piece by starting the style at the beginning of the verse and ending it at the end of the verse. This covers italics (`<i>`), bold (`<b>`), small capitals (`<sc>`), underlined text (`<ul>`), colored text (`<c>`), and "teletype" text (`<tt>`).
+
+Prior to version 4.2, Gregorio inconsistenly indicated style errors. Now, errors like ending a style that is not started and starting a style that is already started will be caught more consistently. If you are getting errors to this effect, double-check the styles in your score to make sure that styles are started and ended properly.
+
+
+## 4.1.2
+
+### Changes to texmf tree
+
+To better comply with the TeX Live directory structure, the location of `gregoriotex.sty` and `gregoriosyms.sty` have changed.
+
+*Linux and other users installing from source:* `install-gtex.sh` should remove the old versions before installing the new one.
+
+*Mac users installing via pkg installer:* The installer does not attempt to remove the old versions before installing the new ones. Please run Uninstall-Gregorio.pkg before installing 4.2 to ensure that the old versions don't cause any problems.
+
+*Windows users:* Your installer already should remove old versions of GregorioTeX before installing the new ones.
+
+As always, please file a bug report if you have any problems with the update process.
+
+### Parmesan font renamed to Grana Padano
+
+To avoid conflicts with the LilyPond Parmesan font, the Gregorio Parmesan font is now called Grana Padano. If you were using `\gresetgregoriofont{parmesan}`, you should now use `\gresetgregoriofont{granapadano}`.
+
+
+## 4.1.1
+
+### Vertical spacings
+
+High notes are now taken into account in vertical spacings. If you would like to come back to the old way, use `\grechangecount{additionaltopspacethreshold}{6}`. High notes also influence vertical placement of alt text. If you would like to come back to the old way, give a high value to `\grechangecount{additionaltopspacealtthreshold}{6}`.
+
+### Last line of score behavior
+
+`\grelooseness` is now `-1` by default. This should prevent orphaned syllable at end of score. If you prefer the old behavior, use `\def\grelooseness{\looseness}` before including your scores.
+
+## 4.1
+
+### Initial handling
+
+Initial handling has been simplified. This deprecates the `initial-style` gabc header and the `biginitial` style.
+
+Rather than using the `initial-style` gabc header, set the number of lines the initial should use in Tex with the `\gresetinitiallines` command. It currently accepts 0 (for no initial), 1 (for a one-line initial), or 2 (for a two-line initial).
+
+As for the `biginitial` style, the intent is that the `initial` style be changed within the TeX document whenever the initial style should change, regardless of how many lines the initial requires. For example, before including a score that has a two-line initial, you would probably want to redefine the `initial` style to use a larger font. Then, before including a score which requires a one-line initial, you would then redefine the `initial` style back to what it was before.
+
+In order to allow a smoother transition to the new behavior, GregorioTeX will behave differently depending on whether or not deprecated usage is allowed (controlled by the `[allowdeprecated]` package option). If deprecated usage is allowed, GregorioTeX will use the deprecated `biginitial` style for big initials. If not, GregorioTeX will use the `initial` style for big initials.
+
+Since the `biginitial` style will disappear with Gregorio 5.0, please consider disabling deprecated usage (set `[allowdeprecated=false]` when using the `gregoriotex` package) and use the `initial` style as just described.
+
+### Spacing between notes
+
+When the next syllable starts with an alteration, the minimal space between notes of the current syllable and notes of the current syllable is handled by the new spaces `intersyllablespacenotes@alteration` and `interwordspacenotes@alteration`. Set them in your custom spacings file if needed.
+
+When a syllable ends with a punctum mora, Gregorio 4.1 doesn't consider the punctum mora completely in horizontal spacing. This can result in next syllable being closer. To balance the output, `spacebeforesigns` has been made shorter. If you want to go back to the old behavior, use:
+
+- `\gresetshiftaftermora{never}` if you want to remove it completely
+- `\gresetshiftaftermora{barsonly}` if you want to remove it for non-bar syllables but keep it for bar syllables
+- `\grechangedim{spacebeforesigns}{0.05469 cm plus 0.00455 cm minus 0.00455 cm}{scalable}` to go back to the old spacing before punctum mora
+
+The `\gresetshiftaftermora` macro can take other arguments for controlling how this should work, see GregorioRef for details.
+
+### Horizontal episemata on high and low notes
+
+Prior to version 4.1, Gregorio reserved space between notes at the `c` and `k` heights and their horizontal episemata for a "ledger line" that might appear between them. However, if the ledger line did not appear, the episema would appear to be too far from the note.
+
+Starting with version 4.1, Gregorio attempts to reduce the space between the note and its episema if it doesn't think there is a "ledger line" there. However, due to the intricacies of distances and measurement in TeX, Gregorio might guess wrong. In this case, you can override the guess by using the `[hl:n]` (for a line above the staff) and `[ll:n]` (for a line below the staff) notations in gabc. If you put a `0` for `n`, Gregorio will assume there is no ledger line, and if you put a `1` for `n`, Gregorio will assume there is a ledger line. This notation will have to be placed after every note which should be thus modified.
+
+Note: Using `[hl:n]` and `[ll:n]` **will not** add a ledger line if it doesn't exist or remove one if it does. It simply affects whether Gregorio will act as if one is there or not.
+
+If you prefer the old behavior, you may switch this off by issuing `\gresetledgerlineheuristic{disable}` in your TeX document. You may switch it back on with `\gresetledgerlineheuristic{enable}`.
+
+### Custos before EUOUAE blocks
+
+In the past, Gregorio handled the notes of an `<eu>` block like any other, which meant that a custos would appear before the `<eu>` block if it happened to start on a new line. However, the '<eu>' block is not a continuation of the melody, but rather a reminder of the ending to use for the paired psalm tone. As a result, a custos immediately before an EUOUAE block is now suppressed by default. If you desire the old behaviour, use `\greseteolcustosbeforeeuouae{auto}` in your TeX document. To once again suppress the custos, use `\greseteolcustosbeforeeuouae{suppressed}`.
+
+### Spacing around bars
+
+#### New algorithm
+
+A new algorithm has been implemented and is turned on by default. We hope this will be a significant improvement over the previous one. The primary goal of the new algorithm is to place the bar line exactly between the notes which surround it and do the same with the text associated with the bar line. However, it will also keep the text and bar reasonably close together and with sufficent space between the bar syallable and the surrounding syllables (possibly introducing space to meet the competing interests). The new algorithm introduces several new spaces allowing the user to tune the algorithm:
+ - `maxbaroffsettextright`
+ - `maxbaroffsettextleft`
+ - `maxbaroffsettextright@nobar`
+ - `maxbaroffsettextleft@nobar`
+ - `maxbaroffsettextright@eol`
+ - `maxbaroffsettextleft@eol`
+ - `bar@*@standalone@text` (where `*` is the type of bar)
+ - `bar@*@standalone@notext` (where `*` is the type of bar)
+ - `interwordspacetext@bars`
+ - `interwordspacetext@bars@euouae`
+ - `interwordspacetext@bars@notext`
+ - `interwordspacetext@bars@notext@euouae`
+ - `bar@rubber`
+If you prefer the old bar spacing algorithm, you can revert to that with:
+
+```
+\gresetbarspacing{old}
+```
+
+Another big change in this algorithm is that empty syllables, i.e. ones without any notes, are now treated as a 0-width bar, not as a 0-width note. Thus if you were using this sort of syllable to insert space into your score, chances are the results will be different under the new algorithm and will require you to re-tweak your scores.
+
+
+#### Renaming of spaces
+
+The spaces around bars are now:
+
+- `bar@virgula`
+- `bar@minima` (both replacing `spacearoundsmallbars`)
+- `bar@minor` (replacing `spacearoundminor`)
+- `bar@maior` (replacing `spacearoundmaior`)
+- `bar@finalis` (replacing `spacearoundfinalis`)
+- `bar@finalifinalis` (replaceing `spacebeforefinalfinalis`)
+- `bar@dominican` (new)
+
+They have variants for the new bar spacing algorithm only:
+
+- `bar@xxx@standalone@text` (where `xxx` is `virgula` or `minima`, etc.) are used when the bar is in a standalone syllable with text
+- `bar@xxx@standalone@notext` for bars in a standalone syllable without text
+
+### Hyphens going right of staff lines
+
+Hyphens should now not go right of staff lines. If you prefer the old behavior, `\gresethyphenprotrusion{100}` should restore it.
+
+### Oriscus orientation
+
+The oriscus orientation (whether it points up or down) is now dependent on the note the follows, even if the note is not directly connected to the oriscus (as it would be in a salicus or a pressus). Appending a `1` to an unconnected oriscus in gabc will force the oriscus to point upwards and `0` will force the oriscus to point downwards.
+
+Prior to version 4.1, Gregorio automatically oriented the oriscus when it was within a neume, but left the orientation up the user otherwise. If you prefer this behavior, set the `oriscus-orientation` header in gabc to `legacy`. In legacy mode, the orientation of an unconnected oriscus will (by default) point downwards and may be reversed by appending `<` or `>` to the oriscus.
+
+### Mode number
+
+The style for the mode number has been bold and small capitals for a long time, but the number was rendered as upper-case Roman numerals, defeating the nuance of small capitals. As of version 4.1, Gregorio will use lower-case Roman numerals (by default) that will then appear as small capitals. This will change how the mode number appears above the initial if you have been using the `mode` header to typeset them. If you prefer the earlier appearance, use `\gresetmodenumbersystem{roman-majuscule}` in your TeX file for upper-case Roman numerals. The other options available are `roman-minuscule` (the new default), for lower-case Roman numerals, and `arabic`, for Arabic numerals.
+
+### Score reference macros
+
+If you were using `\scorereference`, `\GreScoreReference`, and/or `\grescorereference`, stop using them. If you need to capture the `manuscript-reference` header, use the new header capture feature (see GregorioRef for details).
+
+### Three descending notes
+
+Three descending notes that have no other markings (such as liquescentia) will now be rendered as a clivis followed by a punctum. The older, incorrect behavior was to group them as three punctums joined by `!`. If you prefer this behavior, explicitly separate the notes with `!`.
+
+
+## 4.0
+
+### Font changes
+
+The music fonts (greciliae, gregorio, and parmesan) have changed with this release. If the neumes do not appear or look strange in the output, you may need to clear your LuaTeX font cache by using `luaotfload-tool --cache=erase`.
+
+### GregorioTeX and fontspec
+
+Changes to the LaTeX kernel have made it so that if you use the fontspec and gregoriotex pacakges, you must load the fontspec package first.
+
+### Command Name Systemization
+
+A naming scheme for GregorioTeX commands has been established and so most commands have had their names changed in order to bring them into line with the new scheme. Some have also had their syntax changed. Briefly, user commands all now have a `\gre` prefix (to prevent name colisions with other packages) and groups of commands which altered a single setting have been replaced by a single command which takes an argument specifying the value of the setting. The notable exception to this are the two main commands: `\gregorioscore` (replaces `\includescore`) and `\gabcsnippet`. See GregorioRef for the complete list of new command names and their syntax.
+
+Old command names should still work for now, but will raise a deprecation warning which indicates the name of the correct command to use. Exceptions are noted below:
+
+- `\grescaledim`: This function now takes two arguments. The second should be `yes`, `true`, `on`, or `scalable` to acheive the old behavior.
+
+Additionally a new package option has been added. This option, `allowdeprecated=false`, is helpful if you wish to ensure that your TeX file is compliant with the new naming system. This option causes all deprecated commands to raise an error, halting TeX, thus allowing you to actively find all deprecated commands and update them in your TeX file.
+
+### Barred letters
+
+If you use barred letters and a font other than Linux Libertine in your document, you must adjust the horizontal placement of the bar on the letter. To do so, use the `\gresimpledefbarglyph` macro. For example, use `\gresimpledefbarredsymbol{A}{0.3em}` in your preamble, tweaking the second argument to have a good result (same for R and V). If using LaTeX, you can alternately use the `\grelatexsimpledefbarredsymbol` macro, which allows control over bold and italic versions of the barred letter. See the documentation of `\gresimpledefbarredsymbol` and `\grelatexsimpledefbarredsymbol` in the PDF documentation for more details.
+
+If you were using `\Vbarsmall`, `\greletterbar`, and `\greletteraltbar`, you must use `\gresimpledefbarredsymbol` to redefine your barred letters (see PDF documentation for details).
+
+### .gtex extension
+
+The `gregorio` executable now uses the `.gtex` extension by default (instead of `.tex`, formerly) for GregorioTeX files that it produces. If you use `\includescore{file.tex}`, then you should change this to `\includescore{file.gtex}` or use the newer autocompilation feature.
+
+### Custom spacings
+
+If you are using custom spacings, please update the values of `interwordspacetext`, `intersyllablespacenotes` and `interwordspacenotes` to match their new definitions (in the comments in `gsp-default.tex`). Also note that `alterationspace` is now fixed and cannot take `plus` or `minus` values.
+
+### Euouae blocks
+
+You are advised to surround your *Euouae* blocks by the new `<eu>` tag. For instance,
+
+ E(i) u(i) o(i) u(h) a(h) e(fe..)
+
+can become
+
+ <eu>E(i) u(i) o(i) u(h) a(h) e</eu>(fe..)
+
+This will prevent line breaking, so if you were using so-called *no linebreak areas* (with `{` in gabc) just for Euouae blocks, you can switch to this new tag, which will make things clearer and allow further spacing customization.
+
+### Horizontal episema improvements
+
+Changes to the way the horizontal episema is placed and "bridged" to other notes within the syllable may cause Gregorio to render things differently in the more esoteric (or bug-ridden) cases. If you are depending on the old behavior, you might need to add suffixes to the `_` in gabc to get what you want:
+
+- Add `0` to force the episema to appear below the note.
+- Add `1` to force the episema to appear above the note.
+- Add `2` to prevent Gregorio from attempting to connect this episema to the next.
+- Add `3` to use a small episema, aligned to the left of the note.
+- Add `4` to use a small episema, centered in the middle of the note.
+- Add `5` to use a small episema, aligned to the right of the note.
+
+Note: `3`, `4`, and `5` encompass a new feature and are listed here only for completeness.
+
+### Choral sign dimension renames
+
+- `beforechoralsignspace` has been renamed to `beforelowchoralsignspace`.
+- `lowchoralsignshift` has been renamed to `choralsigndownshift`.
+- `highchoralsignshift` has been renamed to `choralsignupshift` and its sign (direction of shift) inverted.
+
+### Styling score elements
+
+Changing the styling of text elements of the score (the initial, translations, etc.) formerly required the user to redefine a command which took an argument, while changing the styling of the staff lines had a command specialized to that purpose. All formats can now be changed via the `\grechangestyle` command. This command takes two or three arguments. The first argument, required, is the name of the format to be altered. The defined formats are:
+
+- `initial`: normal initials
+- `biginitial`: big (2-line) initials
+- `translation`: translation text
+- `abovelinestext`: above lines text (`alt` in gabc)
+- `normalstafflines`: the full length staff lines
+- `additionalstafflines`: the short lines behind notes above or below the staff. This style defaults to inheriting changes to `normalstafflines`.
+- `lowchoralsign`: low choral signs
+- `highchoralsign`: high choral signs
+- `modeline`: the mode annotation above the initial if the content of the mode header in gabc is rendered.
+- `firstword`: the first word of the score (excluding the score initial)
+- `firstsyllable`: the first syllable of the first word of the score (excluding the score initial).
+- `firstsyllableinitial`: the first letter of the first word of the score which is not the score initial.
+
+The second argument, also required, is the code necessary to turn on the styling. The third argument, optional and enclosed in square braces (`[` and `]`), is the code necessary to turn off the styling (e.g. if the code to turn on the styling contains a `\begin{environment}` then the code to turn it off must have the matching `\end{environment}`). The third argument is optional because not all styling commands have explicit off switches.
+
+While the old way of changing the styles is still supported, you should switch to this new method to future-proof your scores.
+
+Examples: Let's say you previously had the following in your LaTeX document:
+
+ \renewcommand{\greabovelinetextstyle}[1]{{\small\it #1}}
+
+This would have made the text which was wrapped with `<alt></alt>` in your gabc file appear small and italicized in your score. To update this to the new system you would replace the above line with the following:
+
+ \grechangestyle{abovelinetext}{\small\it}
+
+### Centering scheme
+
+The gabc `centering-scheme` header is now deprecated and will disappear soon. Use the `\gresetlyriccentering` command from TeX instead. If you were using `centering-scheme: latine;` in gabc, now use `\gresetlyriccentering{vowel}` in the TeX file that includes the gabc. If you were using `centering-scheme: english;` in gabc, now use `\gresetlyriccentering{syllable}` in the TeX file that includes the gabc.
+
+Using the gabc header will, in this release, do that for you, but it will produce a deprecation warning. This header will no longer be available in the next release.
+
+### Annotations
+
+Support for annotations with an arbitrary number of lines has been added. To facilite this, the old functions which added annotations to specific lines (either the first or the second) are consolidated into a single function `\greannotation` which builds the annotations line by line. If you used the old functions for adding annotations, then you should switch out those functions for the new one.
+
+The distance associated with the annotations has also been renamed (from `aboveinitialseparation` to `annotationseparation`) and supplemented by a new distance (`annotationraise`). The first still controls the spacing between the lines of the annoation. The second controls the position of the annotation relative to the score, and thus replaces the second argument in the old functions. By default, annotations are positioned so that the baseline of the first line is aligned with the top line of the staff. Positive values of `annotationraise` will push the annotation up while negative values will push it down. If you were previously using the second argument to `\gresetfirstlineaboveinitial` to adjust the spacing, you will need to convert this to call:
+
+ \grechangedim{annotationraise}{0.1cm}{1}
+
+Since the baseline position of annotations is a change from the old behavior, you will need to adjust the value of the distance a bit to achieve the desired positioning.
+
+As is normal, calls to the deprecated command names will raise a warning but still work. However, there is one caveat: the old functions will always add the annotations to the bottom of the annotation list, regardless of the order in which they are called. Previously, you could call `\gresetsecondannotation` before `\gresetfirstannotation` and still have the first annotation appear on top. Which annotation appears on top is now determined by the order in which the functions are called.
+
+#### The Annotation Header
+
+The `annotation` header in gabc files now passes its value(s) to GregorioTeX for placement above the inital letter of the score. Up to two `annotation` fields are supported, the first for the first line above the initial, and the second field for the second line.
+
+ annotation: 1 Ant.;
+ annotation: VII a;
+
+Full TeX markup is also accepted:
+
+ annotation: {\color{red}1 Ant.};
+ annotation: {\color{red}VII a};
+
+If you define annotation(s) in the main TeX file via `\greannotation`, then the `annotation` header field in the gabc file will *not* overwrite that definition.
+
+#### Variable Height Line Spacing
+
+GregorioTeX is now able to make individual lines of a score taller when the position of the note requires extra space, without affecting the rest of the lines. This is the new default behavior. If you prefer the uniform line heights of earlier versions, use:
+
+ \gresetlineheightexpansion{uniform}
+
+Within a TeX document, you can switch back to variable line heights by using:
+
+ \gresetlineheightexpansion{variable}
+
+You can freely switch between the two behaviors within a TeX document, but only between scores.
+
+This new behavior requires two passes (two runs of lualatex) in order to do the calculation correctly. On the first pass, lualatex will warn you with the message
+
+ Module gregoriotex warning: Line heights or variable brace lengths may have changed. Rerun to fix.
+
+As you edit your document, lualatex will only show this warning if an extra run is required.
+
+Alternately, you can use something like latexmk to automate this activity. Instructions for using latexmk are outside the scope of this document. Please consult the latexmk documentation for more information on using it.
+
+It should also be noted that this new feature, besides requiring two passes, also imposes a small performance penalty on each pass to do the additional computation. This is negligible for small documents, but may have more noticeable impact as documents get larger.
+
+#### MetaPost brace rendering
+
+GregorioTeX now uses MetaPost (by default) to render braces. This allows fine-tuning to better maintain optical line weight when braces are stretched. Since the shapes are slightly different, you may prefer the old behavior, which may be restored by using:
+
+ \gresetbracerendering{font}
+
+Within a TeX document, you can switch back to MetaPost brace rendering by using:
+
+ \gresetbracerendering{metapost}
+
+You can freely switch between the two behaviors within a TeX document.
+
+#### Keyword argument for `\grecreatedim` and `\grechangedim`
+
+In order to better match the new command naming conventions, the third argument of `\grecreatedim` and `\grechangedim` should now be `scaling` or `fixed` instead of `1` or `0`, respectively.
+
+#### Liquescence on bistropha and tristropha
+
+In order to be more consistent, making a bistropha or tristropha liquescent by adding `<` in gabc will now only affect the note thus marked. This means that a tristropha like `(gsss<)` will only show the final stropha as liquescent, which is different from the older behavior of making every stropha liquescent. If you prefer the old behavior, mark every note explicitly as liquescent with something like `(gs<gs<gs<)`.
+
+### Empty first syllable hyphen
+
+Prior to version 4.0, GregorioTeX would put a hyphen below an empty first syllable (which happens when the first syllable consists only of the initial). The spacing algorithm is improved in 4.0, but that eliminates the hyphen if there is not enough space between the note of the first syllable and the next syllable. The `\gresetemptyfirstsyllablehyphen` command controls this behavior. It defaults to `force`, which restores the pre-4.0 behavior, but may be changed to `auto` (i.e., `\gresetemptyfirstsyllablehyphen{auto}`) if you prefer the space-based behavior.
+
+### gabc-version header
+
+The gabc-version header has become meaningless. It is now deprecated. Please remove it from your gabc files if you had been using it.
+
+## 3.0
+### TeX Live 2013
+
+Because of changes necessary to future-proof the fonts, please upgrade to at least TeX Live 2013 if you are using an older version. If the neumes do not appear or look strange in the output, you may also need to clear your LuaTeX font cache by using `luaotfload-tool --cache=erase`.
+
+### Score inclusion
+
+When migrating to this release, you should start to use the new `\includescore` system, as other ways of score inclusion are deprecated and will start disapear soon. See GregorioRef.pdf for details.
+
+#### For users of version 2.4.2
+
+In version 2.4.2, an early version of the feature to auto-compile gabc score was added. Because of the confusion this caused with old users upgrading to 2.4.2, the `\includescore` command now works in a backwards-compatible way so scores created using this command for versions of Gregorio prior than 2.4.2 should work with no change. However, for users of 2.4.2, the following changes are necessary:
+
+- If you were using `\includescore[f]`, the equivalent command is now `\includescore[n]`, but due to this change, you should be able to just use `\includescore` without the optional parameter.
+- If you were using the auto-compile feature, you should use `\autocompilegabc` in your tex file prior to using `\includescore`. This is only necessary once and **does not need to be used before each use** of `\includescore`.
+
+### Custom dimension changes
+
+If you use custom space definitions (`gsp-foo.tex`), the format have changed, and you must rewrite it completely. See the new `gsp-default.tex` for an example, and GregorioRef.pdf for documentation.
+
+### Color definition
+
+If you want to change color in gabc, using the `<c>` markup is the safest way, and you should migrate to that, as Gregorio introduced mechanisms that may break badly formatted color changes (e.g. `\color{red}foo\color{black}`).
diff --git a/Build/source/texk/gregorio/gregorio-src/VersionManager.py b/Build/source/texk/gregorio/gregorio-src/VersionManager.py
new file mode 100644
index 00000000000..d0d35f89bc2
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/VersionManager.py
@@ -0,0 +1,528 @@
+#! /usr/bin/env python2
+
+"""
+ A script that manages the VERSION of gregorio.
+
+ See VersionUpdate.py -h for help
+
+ Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+
+ This file is part of Gregorio.
+
+ Gregorio is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Gregorio is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from __future__ import print_function
+
+import sys
+import re
+import argparse
+import subprocess
+import time
+import os
+import locale
+import linecache
+from datetime import date
+
+from distutils.util import strtobool
+
+locale.setlocale(locale.LC_TIME, 'C')
+
+os.chdir(sys.path[0])
+
+VERSION_FILE = '.gregorio-version'
+CURRENTYEAR = str(date.today().year)
+GREGORIO_FILES = ["configure.ac",
+ "ctan-o-mat.config",
+ "windows/gregorio-resources.rc",
+ "macosx/Gregorio.pkgproj",
+ "macosx/douninstall.sh",
+ "windows/gregorio.iss",
+ "doc/GregorioRef.tex",
+ "tex/gregoriotex.sty",
+ "tex/gregoriotex.lua",
+ "tex/gregoriotex.tex",
+ "tex/gregoriotex-chars.tex",
+ "tex/gregoriotex-signs.tex",
+ "tex/gregoriotex-signs.lua",
+ "tex/gregoriotex-spaces.tex",
+ "tex/gregoriotex-symbols.tex",
+ "tex/gregoriotex-symbols.lua",
+ "tex/gregoriotex-syllable.tex",
+ "tex/gregoriotex-main.tex",
+ "tex/gregoriotex-nabc.tex",
+ "tex/gregoriotex-nabc.lua",
+ "tex/gregoriosyms.sty",
+ "tex/gregoriotex-common.tex",
+ "fonts/squarize.py",
+ ]
+COPYRIGHT_FILES = ["install-gtex.sh",
+ "build-ctan.sh",
+ "ctan_upload.sh",
+ "tex/gregoriotex-signs.tex",
+ "tex/gregorio-vowels.dat",
+ "tex/gsp-default.tex",
+ "tex/gregoriotex-nabc.lua",
+ "tex/gregoriotex-symbols.lua",
+ "tex/gregoriotex-chars.tex",
+ "tex/gregoriotex-main.tex",
+ "tex/gregoriotex-spaces.tex",
+ "tex/Makefile.am",
+ "tex/gregoriotex-common.tex",
+ "tex/gregoriotex-syllable.tex",
+ "tex/gregoriotex.lua",
+ "tex/gregoriotex.sty",
+ "tex/gregoriosyms.sty",
+ "tex/gregoriotex-nabc.tex",
+ "tex/gregoriotex.tex",
+ "tex/gregoriotex-signs.lua",
+ "tex/gregoriotex-symbols.tex",
+ "contrib/TeXShop/Makefile.am",
+ "contrib/900_gregorio.xml",
+ "contrib/Makefile.am",
+ "contrib/gabc.lang",
+ "contrib/gprocess",
+ "contrib/checkSyllabation.py",
+ "configure.ac",
+ "examples/Makefile.am",
+ "Makefile.am",
+ "install.sh",
+ "debian/copyright",
+ "debian/manpage.xml",
+ "doc/Command_Index_User.tex",
+ "doc/Makefile.am",
+ "doc/GregorioRef.tex",
+ "doc/Command_Index_gregorio.tex",
+ "doc/Command_Index_internal.tex",
+ "doc/GregorioNabcRef.tex",
+ "doc/Gabc.tex",
+ "doc/GregorioRef.lua",
+ "doc/Appendix_Font_Tables.tex",
+ "VersionManager.py",
+ "coverage.sh",
+ "COPYING.md",
+ "src/characters.h",
+ "src/plugins.h",
+ "src/gregoriotex/gregoriotex-write.c",
+ "src/gregoriotex/gregoriotex.h",
+ "src/gregoriotex/gregoriotex-position.c",
+ "src/unicode.c",
+ "src/unicode.h",
+ "src/messages.h",
+ "src/support.c",
+ "src/sha1.h",
+ "src/messages.c",
+ "src/support.h",
+ "src/sha1.c",
+ "src/struct.h",
+ "src/bool.h",
+ "src/struct_iter.h",
+ "src/Makefile.am",
+ "src/dump/dump.c",
+ "src/encode_utf8strings.c",
+ "src/enum_generator.h",
+ "src/gabc/gabc-score-determination.c",
+ "src/gabc/gabc-elements-determination.c",
+ "src/gabc/gabc-write.c",
+ "src/gabc/gabc-notes-determination.l",
+ "src/gabc/gabc.h",
+ "src/gabc/gabc-score-determination.l",
+ "src/gabc/gabc-score-determination.y",
+ "src/gabc/gabc-score-determination.h",
+ "src/gabc/gabc-glyphs-determination.c",
+ "src/utf8strings.h.in",
+ "src/config.h",
+ "src/characters.c",
+ "src/vowel/vowel-rules.y",
+ "src/vowel/vowel.h",
+ "src/vowel/vowel-rules.h",
+ "src/vowel/vowel-rules.l",
+ "src/vowel/vowel.c",
+ "src/gregorio-utils.c",
+ "src/struct.c",
+ "fonts/gregorio-base.sfd",
+ "fonts/granapadano-base.sfd",
+ "fonts/squarize.py",
+ "fonts/convertsfdtottf.py",
+ "fonts/Makefile.am",
+ "fonts/simplify.py",
+ "fonts/stemsschemas.py",
+ "fonts/greciliae-base.sfd",
+ "fonts/gregall.sfd",
+ "fonts/grelaon.sfd",
+ "fonts/gresgmodern.sfd",
+ "fonts/install_supp_fonts.lua",
+ "windows/gregorio.iss",
+ "windows/install.lua",
+ "windows/uninstall.lua",
+ ]
+
+def get_parser():
+ "Return command line parser"
+ parser = argparse.ArgumentParser(
+ description='A script to manage the VERSION of gregorio.')
+ parser.add_argument('-ni', '--not-interactive',
+ help='Do not ask confirmation',
+ action='store_true', default=False)
+ parser.add_argument('-c', '--get-current',
+ help='Prints the current gregorio version',
+ action='store_true', default=False)
+ parser.add_argument('-d', '--get-debian-stable',
+ help='Prints the version for Debian stable package',
+ action='store_true', default=False)
+ parser.add_argument('-dg', '--get-debian-git',
+ help='Prints the version for Debian git package',
+ action='store_true', default=False)
+
+ modify = parser.add_mutually_exclusive_group()
+ modify.add_argument('-b', '--beta',
+ help='Increment -betax+1',
+ action='store_true', default=False,
+ dest='beta')
+ modify.add_argument('--manual=',
+ help='Manually set the version.',
+ action='store',
+ dest='manual_version')
+ modify.add_argument('-m', '--major',
+ help='Increment the major version: x+1.0.0-beta1',
+ action='store_true', default=False,
+ dest='major')
+ modify.add_argument('-e', '--enhancement',
+ help='Increment the minor version: x.y+1.0-beta1',
+ action='store_true', default=False,
+ dest='minor')
+ modify.add_argument('-p', '--patch',
+ help='Increment the patch version: x.y.z+1',
+ action='store_true', default=False,
+ dest='patch')
+ modify.add_argument('-rc', '--release-candidate',
+ help='Change version to a -rc1, or increment -rcx+1',
+ action='store_true', default=False,
+ dest='release_candidate')
+ modify.add_argument('-r', '--release',
+ help='Make a release. Removes -rcx',
+ action='store_true', default=False,
+ dest='release')
+ return parser
+
+class Version(object):
+ "Class for version manipulation."
+
+ def __init__(self, versionfile):
+ self.versionfile = versionfile
+ self.version = linecache.getline(self.versionfile, 1).strip('\n')
+ self.filename_version = self.filename_version_from_version(self.version)
+ self.short_tag = None
+ self.date = None
+ self.binary_version = self.binary_version_from_version(self.version)
+
+ def filename_version_from_version(self, version):
+ "Return filename-compatible version"
+ return version.replace('.', '_')
+
+ def binary_version_from_version(self, version):
+ "Return binary version number for Windows FILEVERSION"
+ binary = version.replace('.', ',')
+ if '-' in binary:
+ binary = binary.replace('-beta', ',1')
+ binary = binary.replace('-rc', ',2')
+ else:
+ binary += ',30'
+ return binary
+
+ def fetch_version(self):
+ "Prints version"
+ print(self.version)
+ sys.exit(0)
+
+ def fetch_version_debian_stable(self):
+ "Prints version for Debian stable package and exits"
+ print(self.version.replace('-', '~'))
+ sys.exit(0)
+
+ def fetch_version_debian_git(self):
+ "Prints version for Debian git package and exits"
+ self.short_tag = subprocess.check_output(
+ ['git', 'rev-parse', '--short', 'HEAD'])
+ self.short_tag = self.short_tag.strip('\n')
+ self.date = time.strftime("%Y%m%d%H%M%S")
+ print("{0}+git{1}+{2}".format(self.version.replace('-', '~'),
+ self.date, self.short_tag))
+ sys.exit(0)
+
+ def update_version(self, newversion):
+ "Update self.version and .gregorio-version with the new version."
+ self.version = newversion
+ self.filename_version = self.filename_version_from_version(newversion)
+ self.binary_version = self.binary_version_from_version(newversion)
+ print('Updating {0} with the new version: {1}\n'.format(
+ self.versionfile, self.version))
+ with open(self.versionfile, 'w') as verfile:
+ verfile.write('{0}\n{1}'.format(self.version, CURRENTYEAR))
+ verfile.write('\n\n*** Do not modify this file. ***\n')
+ verfile.write('Use VersionManager.py to change the version.\n')
+
+def replace_version(version_obj):
+ "Change version in file according to heuristics."
+ newver = version_obj.version
+ newver_filename = version_obj.filename_version
+ newbinver = version_obj.binary_version
+ today = date.today()
+ print('Updating source files to version {0}\n'.format(newver))
+ for myfile in GREGORIO_FILES:
+ result = []
+ following_line_filename = False
+ with open(myfile, 'r') as infile:
+ for line in infile:
+ if 'AC_INIT([' in line:
+ result.append(re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1))
+ elif 'AppVersion' in line:
+ result.append(re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1))
+ elif 'FILENAME_VERSION' in line:
+ result.append(re.sub(r'(\d+\_\d+\_\d+(?:[-+~]\w+)*)', newver_filename, line, 1))
+ elif 'FileVersion' in line:
+ result.append(re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1))
+ elif 'ProductVersion' in line:
+ result.append(re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1))
+ elif 'GREGORIO_VERSION' in line:
+ result.append(re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1))
+ elif 'GREGORIO_DATE_LTX' in line:
+ result.append(re.sub(r'(\d+\/\d+/\d+)', today.strftime("%Y/%m/%d"), line, 1))
+ elif 'PARSE_VERSION_DATE_LTX' in line:
+ newline = re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1)
+ result.append(re.sub(r'(\d+\/\d+/\d+)', today.strftime("%Y/%m/%d"), newline, 1))
+ elif 'PARSE_VERSION_DATE' in line:
+ newline = re.sub(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)', newver, line, 1)
+ result.append(re.sub(r'(\d{1,2} [A-Z][a-z]+ \d{4})', today.strftime("%-d %B %Y"), newline, 1))
+ elif 'FILEVERSION' in line:
+ result.append(re.sub(r'\d+,\d+,\d+,\d+', newbinver, line, 1))
+ elif 'PRODUCTVERSION' in line:
+ result.append(re.sub(r'\d+,\d+,\d+,\d+', newbinver, line, 1))
+ elif 'PARSE_VERSION_FILE_NEXTLINE' in line:
+ result.append(line)
+ following_line_filename = True
+ elif following_line_filename:
+ result.append(re.sub(r'(\d+\_\d+\_\d+(?:[-+~]\w+)*)', newver_filename, line, 1))
+ following_line_filename = False
+ else:
+ result.append(line)
+ with open(myfile, 'w') as outfile:
+ outfile.write(''.join(result))
+ sys.exit(0)
+
+def update_changelog(newver,upgradetype):
+ today = date.today()
+ with open('CHANGELOG.md', 'r') as infile:
+ result = []
+ develop = False
+ for line in infile:
+ if upgradetype == "patch":
+ if '[Unreleased][develop]' in line:
+ print("Found an unreleased develop section.")
+ print("Patch releases should be based on ctan branch.")
+ sys.exit(1)
+ if '[Unreleased][CTAN]' in line:
+ result.append(line)
+ result.append('\n')
+ result.append('\n')
+ newline = '## [' + newver + '] - ' + today.strftime("%Y-%m-%d") + '\n'
+ result.append(newline)
+ else:
+ result.append(line)
+ else:
+ if '[Unreleased][develop]' in line:
+ develop = True
+ result.append(line)
+ result.append('\n')
+ result.append('\n')
+ result.append('## [Unreleased][CTAN]\n')
+ result.append('\n')
+ result.append('\n')
+ newline = '## [' + newver + '] - ' + today.strftime("%Y-%m-%d") + '\n'
+ result.append(newline)
+ elif '[Unreleased][CTAN]' in line and develop:
+ continue
+ else:
+ result.append(line)
+ if not develop and upgradetype != "patch":
+ print("I didn't find a unreleased develop section.")
+ print("Non-patch releases should be based on develop branch.")
+ sys.exit(1)
+ with open('CHANGELOG.md', 'w') as outfile:
+ outfile.write(''.join(result))
+
+def confirm_replace(oldver, newver):
+ "Query the user to confirm action"
+ query = 'Update version from {0} --> {1} [y/n]?'.format(oldver, newver)
+ print(query)
+ consent = None
+ while True:
+ try:
+ consent = strtobool(raw_input().lower())
+ break
+ except ValueError:
+ print('Answer with y or n.')
+ if not consent:
+ print('Aborting.')
+ sys.exit(1)
+
+def release_candidate(version_obj, not_interactive):
+ "Changes x.y.z-beta to x.y.z-rc1 OR increments x.y.z-rcx+1"
+ oldversion = version_obj.version
+ if '-rc' in oldversion:
+ newversion = re.sub(r'\d+$', lambda x: str(int(x.group()) +1),
+ oldversion)
+ elif '-' in oldversion:
+ newversion = re.sub(r'-.*', '-rc1', oldversion)
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"releasecandidate")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def beta(version_obj, not_interactive):
+ "Increments x.y.z-betax+1"
+ oldversion = version_obj.version
+ if '-beta' in oldversion:
+ newversion = re.sub(r'\d+$', lambda x: str(int(x.group()) +1),
+ oldversion)
+ else:
+ print('Version number not in beta stage')
+ print('Use --major (-m) or --enhancement (-e) to start a new beta')
+ sys.exit(1)
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"beta")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def bump_major(version_obj, not_interactive):
+ "Changed the major version number: x.y.z --> x+1.0.0-beta1"
+ oldversion = version_obj.version
+ nums = re.search(r'(\d+)(\.\d+)(\.\d+)', oldversion)
+ newversion = str(int(nums.group(1)) +1) + '.0.0-beta1'
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"major")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def bump_minor(version_obj, not_interactive):
+ "Changed the minor version number: x.y.z --> x.y+1.0-beta1"
+ oldversion = version_obj.version
+ nums = re.search(r'(\d+\.)(\d+)(\.\d+)', oldversion)
+ newversion = nums.group(1) + str(int(nums.group(2)) +1) + '.0-beta1'
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"minor")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def bump_patch(version_obj, not_interactive):
+ "Changed the patch version number: x.y.z --> x.y.z+1"
+ oldversion = version_obj.version
+ nums = re.search(r'(\d+\.\d+\.)(\d+)', oldversion)
+ newversion = nums.group(1) + str(int(nums.group(2)) +1)
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"patch")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def set_manual_version(version_obj, user_version, not_interactive):
+ "Changed the version number to a user supplied value"
+ oldversion = version_obj.version
+ if not re.match(r'(\d+\.\d+\.\d+(?:[-+~]\w+)*)$', user_version):
+ print('Bad version string. Use this style: x.y.z or x.y.z-betax')
+ sys.exit(1)
+ newversion = user_version
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"manual")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def do_release(version_obj, not_interactive):
+ "Strips extra characters from the version leaving x.y.z"
+ oldversion = version_obj.version
+ newversion = re.sub(r'([\d.]+)-?.*', r'\1', oldversion)
+ if (not not_interactive):
+ confirm_replace(oldversion, newversion)
+ update_changelog(newversion,"release")
+ version_obj.update_version(newversion)
+ replace_version(version_obj)
+
+def copyright_year():
+ "Check and update copyright year as needed"
+ fileyear = linecache.getline(VERSION_FILE, 2).strip()
+ def year_range(matchobj):
+ "Check and add a year range to the copyright"
+ if matchobj.group(1) is not None:
+ return re.sub(fileyear, CURRENTYEAR, matchobj.group(0))
+ return re.sub(fileyear, fileyear+'-'+CURRENTYEAR, matchobj.group(0))
+
+ if int(fileyear) != int(CURRENTYEAR):
+ print('Updating copyright year.')
+ for myfile in COPYRIGHT_FILES:
+ result = []
+ with open(myfile, 'r') as infile:
+ for line in infile:
+ if re.search(r'[C|c]opyright.*Gregorio Project', line):
+ result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line))
+ elif re.search(r'[C|c]opyright.*Elie Roux', line):
+ result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line))
+ elif re.search(r'[C|c]opyright.*Richard Chonak', line):
+ result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line))
+ elif re.search(r'[C|c]opyright.*Jakub Jelinek', line):
+ result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line))
+ else:
+ result.append(line)
+ with open(myfile, 'w') as outfile:
+ outfile.write(''.join(result))
+
+def main():
+ "Main function"
+ parser = get_parser()
+ if len(sys.argv) == 1:
+ parser.print_help()
+ sys.exit(1)
+ args = parser.parse_args()
+ gregorio_version = Version(VERSION_FILE)
+ not_interactive = False
+ if args.not_interactive:
+ not_interactive = True
+ if args.get_current:
+ gregorio_version.fetch_version()
+ elif args.get_debian_stable:
+ gregorio_version.fetch_version_debian_stable()
+ elif args.get_debian_git:
+ gregorio_version.fetch_version_debian_git()
+ copyright_year()
+ if args.beta:
+ beta(gregorio_version, not_interactive)
+ elif args.major:
+ bump_major(gregorio_version, not_interactive)
+ elif args.minor:
+ bump_minor(gregorio_version, not_interactive)
+ elif args.patch:
+ bump_patch(gregorio_version, not_interactive)
+ elif args.release_candidate:
+ release_candidate(gregorio_version, not_interactive)
+ elif args.release:
+ do_release(gregorio_version, not_interactive)
+ elif args.manual_version:
+ set_manual_version(gregorio_version, args.manual_version, not_interactive)
+
+if __name__ == "__main__":
+ main()
diff --git a/Build/source/texk/gregorio/gregorio-src/build.sh b/Build/source/texk/gregorio/gregorio-src/build.sh
new file mode 100755
index 00000000000..da98af69de2
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/build.sh
@@ -0,0 +1,132 @@
+#!/usr/bin/env bash
+#
+# Public Domain
+#
+# new script to build gregorio binaries (inspired from LuaTeX's one).
+# ----------
+# Options:
+# --mingw : crosscompile for mingw32 from i-386linux
+# --warn : enables all sorts of warnings
+# --host= : target system for mingw32 cross-compilation
+# --build= : build system for mingw32 cross-compilation
+# --arch= : crosscompile for ARCH on OS X
+# --jobs= : the number of jobs to run simultaneously in the make step
+# --force= : force autoreconf
+# {other) : anything else is passed to configure verbatim
+
+# try to find bash, in case the standard shell is not capable of
+# handling the generated configure's += variable assignments
+if which bash >/dev/null
+then
+ CONFIG_SHELL=`which bash`
+ export CONFIG_SHELL
+fi
+
+# try to find gnu make; we may need it
+MAKE=make
+if make -v 2>&1| grep "GNU Make" >/dev/null
+then
+ echo "Your make is a GNU-make; I will use that"
+elif gmake -v >/dev/null 2>&1
+then
+ MAKE=gmake
+ export MAKE
+ echo "You have a GNU-make installed as gmake; I will use that"
+else
+ echo "I can't find a GNU-make; I'll try to use make and hope that works."
+ echo "If it doesn't, please install GNU-make."
+fi
+
+WARNINGS=yes
+MINGWCROSS=FALSE
+CONFHOST=
+CONFBUILD=
+MACCROSS=FALSE
+MAKEOPTS=
+OTHERARGS=
+FORCE_AUTORECONF=
+
+until [ -z "$1" ]; do
+ case "$1" in
+ --mingw ) MINGWCROSS=TRUE ;;
+ --host=* ) CONFHOST="$1" ;;
+ --build=* ) CONFBUILD="$1" ;;
+ --arch=* ) MACCROSS=TRUE; ARCH=`echo $1 | sed 's/--arch=\(.*\)/\1/' ` ;;
+ -j*|--jobs=*) MAKEOPTS="$MAKEOPTS $1" ;;
+ --force=autoreconf) FORCE_AUTORECONF=TRUE ;;
+ * ) OTHERARGS="$OTHERARGS $1" ;;
+ esac
+ shift
+done
+
+B=build
+
+ARCHFLAGS=
+
+if [ "$MINGWCROSS" = "TRUE" ]
+then
+ MINGWBUILD=$HOSTTYPE-$OSTYPE
+ MINGWSTR=mingw32
+ if [ -d /usr/mingw32 ]; then
+ MINGWSTR=mingw32
+ elif [ -d /usr/i386-mingw32msvc ]; then
+ MINGWSTR=i386-mingw32msvc
+ elif [ -d /usr/i586-mingw32msvc ]; then
+ MINGWSTR=i586-mingw32msvc
+ fi
+ OLDPATH=$PATH
+ PATH=/usr/$MINGWSTR/bin:$PATH
+ CFLAGS="-mtune=pentiumpro -msse2 -g -O2 $CFLAGS"
+ LDFLAGS="-Wl,--large-address-aware $CFLAGS"
+ ARCHFLAGS="--target=\"$MINGWSTR\" \
+ --with-gnu-ld \
+ --host=$MINGWSTR \
+ --build=$MINGWBUILD \
+ --prefix=/usr/$MINGWSTR"
+elif [ "$MACCROSS" = "TRUE" ]
+then
+ # make sure that architecture parameter is valid
+ case $ARCH in
+ i386 | x86_64 | ppc | ppc64 ) ;;
+ * ) echo "ERROR: architecture $ARCH is not supported"; exit 1;;
+ esac
+ ARCHFLAGS="$ARCHFLAGS"
+ CFLAGS="-arch $ARCH -g -O2 $CFLAGS"
+ LDFLAGS="-arch $ARCH $LDFLAGS"
+fi
+
+
+export CFLAGS LDFLAGS
+
+function die {
+ echo "Failed to $1."
+ exit 1
+}
+
+if [ "$FORCE_AUTORECONF" = "TRUE" -o ! -e Makefile.in ]
+then
+ echo "Creating build files using Autotools"
+ autoreconf -f -i || die "create build files"
+ echo
+fi
+
+CONFIGURE_ARGS="$CONFHOST $CONFBUILD $ARCHFLAGS $OTHERARGS"
+echo "Configuring build files; options: $CONFIGURE_ARGS"
+./configure $CONFIGURE_ARGS || die "configure Gregorio"
+echo
+
+echo "Building Gregorio; options:$MAKEOPTS"
+${MAKE} ${MAKEOPTS} all doc || die "build Gregorio"
+echo
+
+if [ "$MINGWCROSS" = "TRUE" ]
+then
+ PATH=$OLDPATH
+fi
+
+echo "Build complete. Next, you may want to run ./install.sh to install."
+echo
+echo "Depending on installation directory, you probably need to run"
+echo "./install.sh using sudo or as root."
+
+exit 0
diff --git a/Build/source/texk/gregorio/gregorio-src/configure.ac b/Build/source/texk/gregorio/gregorio-src/configure.ac
new file mode 100644
index 00000000000..2d2de951df4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/configure.ac
@@ -0,0 +1,130 @@
+dnl Gregorio
+dnl Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+dnl
+dnl This file is part of Gregorio.
+dnl
+dnl Gregorio is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl Gregorio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+AC_INIT([gregorio],[5.2.1],[https://github.com/gregorio-project/gregorio/issues],[gregorio],[http://gregorio-project.github.io/])
+FILENAME_VERSION="5_2_1"
+AC_SUBST(FILENAME_VERSION)
+AC_DEFINE_UNQUOTED(FILENAME_VERSION, "$FILENAME_VERSION", [version suitable for file names])
+MK=""
+AC_SUBST(MK)
+AC_PREREQ(2.59)
+AC_CONFIG_SRCDIR([src/gregorio-utils.c])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([-Wall -Wno-portability subdir-objects foreign dist-bzip2 no-dist-gzip])
+
+AC_PROG_CC
+dnl AM_PROG_CC_C_O is deprecated since Automake 1.14, to be removed in the future
+AM_PROG_CC_C_O
+AC_PROG_CPP
+AM_PROG_LEX
+AC_PROG_YACC
+AC_CHECK_TOOL([RC], [windres], [no])
+AM_CONDITIONAL([HAVE_RC], [test x$RC != xno])
+
+AC_CHECK_ALIGNOF(uint32_t)
+
+AX_CHECK_COMPILE_FLAG([-std=gnu89], [CFLAGS+=" -std=gnu89"])
+dnl until flex gets their act together, use pedantic instead of pedantic-errors
+AX_CHECK_COMPILE_FLAG([-pedantic], [CFLAGS+=" -pedantic"])
+dnl AX_CHECK_COMPILE_FLAG([-pedantic-errors], [CFLAGS+=" -pedantic-errors"])
+AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [CFLAGS+=" -fstack-protector-strong"])
+AX_CHECK_COMPILE_FLAG([-fPIE], [CFLAGS+=" -fPIE"])
+AX_CHECK_COMPILE_FLAG([-Wformat=2], [CFLAGS+=" -Wformat=2"])
+AX_CHECK_COMPILE_FLAG([-Werror=format-security], [CFLAGS+=" -Werror=format-security"])
+AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], [CFLAGS+=" -Wstrict-prototypes"])
+AX_CHECK_COMPILE_FLAG([-Wdeclaration-after-statement], [CFLAGS+=" -Wdeclaration-after-statement"])
+AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS+=" -Wall"])
+AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS+=" -Wextra"])
+AX_CHECK_COMPILE_FLAG([-Wno-gnu-statement-expression], [CFLAGS+=" -Wno-gnu-statement-expression"])
+AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS+=" -Wl,-z,relro"])
+AX_CHECK_LINK_FLAG([-Wl,-z,now], [LDFLAGS+=" -Wl,-z,now"])
+AX_CHECK_LINK_FLAG([-fPIE], [LDFLAGS+=" -fPIE"])
+AX_CHECK_LINK_FLAG([-pie], [LDFLAGS+=" -pie"])
+
+AC_HEADER_STDC
+
+gl_FUNC_REALPATH_WORKS
+
+dnl linux has integer types in stdint.h, solaris, vms in inttypes.h
+AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([stdalign.h])
+
+AC_DEFINE([_GNU_SOURCE], [1], [Always define this.])
+
+AC_C_BIGENDIAN
+
+AC_ARG_WITH([kpathsea], AS_HELP_STRING([--with-kpathsea], [Build with kpathsea.]))
+
+AS_IF([test "x$with_kpathsea" = "xyes"], [
+ PKG_PROG_PKG_CONFIG
+ PKG_CHECK_MODULES([KPSE], [kpathsea], AC_DEFINE([USE_KPSE], [1], [Use kpathsea]),
+ dnl if pkg-config doesn't know kpathsea, try -lkpathsea (the most common case)
+ AC_CHECK_LIB([kpathsea], [kpse_set_program_name], [
+ AC_DEFINE([USE_KPSE], [1], [Use kpathsea])
+ KPSE_LIBS=" -lkpathsea"
+ ], [
+ AC_MSG_ERROR([unable to find the kpathsea library])
+ ])
+ )
+])
+
+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug@<:@=sanitize,coverage@:>@], [Enable debugging options [with additional sanitize options].]), [
+ AS_IF([test "x$enableval" != "xno"], [
+ dnl AX_CHECK_COMPILE_FLAG([-g], [CFLAGS+=" -g"])
+ AX_CHECK_COMPILE_FLAG([-Og], [CFLAGS+=" -Og"], [
+ AX_CHECK_COMPILE_FLAG([-O0], [CFLAGS+=" -O0"])
+ ])
+ AS_IF([test "x$enableval" = "xsanitize"], [
+ AX_CHECK_COMPILE_FLAG([-fsanitize=address,undefined], [CFLAGS+=" -fsanitize=address,undefined"])
+ ])
+ AS_IF([test "x$enableval" = "xcoverage"], [
+ AX_CHECK_COMPILE_FLAG([--coverage], [CFLAGS+=" --coverage"])
+ AX_CHECK_LINK_FLAG([--coverage], [LDFLAGS+=" --coverage"])
+ ])
+ ], [
+ CPPFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 "
+ ])
+], [
+ CPPFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 "
+])
+
+AC_ARG_ENABLE([version-in-exe], AS_HELP_STRING([--disable-version-in-exe], [Disable version in executable name.]), [
+ AS_IF([test "x$enableval" != "xno"], [
+ GREGORIO_EXE_SUFFIX="-$FILENAME_VERSION"
+ ], [
+ GREGORIO_EXE_SUFFIX=""
+ ])
+], [
+ GREGORIO_EXE_SUFFIX="-$FILENAME_VERSION"
+])
+AC_SUBST(GREGORIO_EXE_SUFFIX)
+
+AC_CONFIG_HEADERS([src/config_.h])
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ examples/Makefile
+ contrib/Makefile
+ contrib/TeXShop/Makefile
+ doc/Makefile
+ tex/Makefile
+ fonts/Makefile
+])
+AC_OUTPUT
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/900_gregorio.xml b/Build/source/texk/gregorio/gregorio-src/contrib/900_gregorio.xml
new file mode 100644
index 00000000000..edd28c2682d
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/900_gregorio.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+ XML file for using gregorio inside scribus.
+ Copyright (C) 2009 Pierre Couderc <pierre@couderc.eu>.
+ Copyright (C) 2010 Elie Roux <elie.roux@telecom-bretagne.eu>
+ Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ See the different comments in the file to change the default configuration.
+-->
+<editorsettings description="gregorio" icon="gregorio.png">
+ <executable command="lualatex --shell-escape --interaction nonstopmode" />
+ <imagefile extension=".pdf"/>
+ <highlighter>
+ <rule name="gabc header" regex="[a-zA-Z]+:" color="blue" minimal="true"/>
+ <rule name="gabc delimiter" regex="%%" color="green" minimal="true"/>
+ <rule name="gabc notes" regex="\([^)]*\)" color="red" minimal="true"/>
+ </highlighter>
+ <empty-frame-text>
+ name: myscore;
+ %%
+ (c3) Pó(eh/hi)pu(h)lus(h) Si(hi)on,(hgh.)
+ </empty-frame-text>
+ <!-- you can change the basic headers here -->
+ <preamble>
+ \documentclass[$scribus_grefontsize$]{extarticle}
+ \usepackage[paperwidth=$scribus_realwidth$ pt,
+ paperheight=$scribus_realheight$ pt,
+ left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot]{geometry}
+ \usepackage[autocompile]{gregoriotex}
+ \usepackage{filecontents}
+ \title{Scribus-Latex-File}
+ $scribus_additionalgreheaders$
+ \author{Scribus}
+ \pagestyle{empty}
+ \setlength{\textwidth}{$scribus_realwidth$ pt}
+
+ \begin{filecontents}{scribus_file-score.gabc}
+ </preamble>
+ <postamble>
+ \end{filecontents}
+
+ \begin{document}
+ $scribus_greconf$
+ \gregorioscore{scribus_file-score}
+ \end{document}
+ </postamble>
+ <tab type="settings">
+ <title>
+ <i18n>
+ <en>Headers</en>
+ <fr>En-tête</fr>
+ </i18n>
+ </title>
+ <list name="grefontsize" default="11pt">
+ <title>
+ <i18n>
+ <en>Fontsize:</en>
+ <de>Schriftgröße:</de>
+ <fr>Taille police :</fr>
+ <pl>Stopień pisma:</pl>
+ <ru>Кегль шрифт:</ru>
+ </i18n>
+ </title>
+ <option value="8pt">8pt</option>
+ <option value="9pt">9pt</option>
+ <option value="10pt">10pt</option>
+ <option value="11pt">11pt</option>
+ <option value="12pt">12pt</option>
+ <option value="14pt">14pt</option>
+ <option value="17pt">17pt</option>
+ <option value="20pt">20pt</option>
+ </list>
+ <text name="additionalgreheaders" type="long" default="\usepackage{fontspec}
+\usepackage{libertine}">
+ <i18n>
+ <en>Additional LaTeX Headers:</en>
+ <de>Zusätzliche LaTeX Header:</de>
+ <fr>En-tête LaTeX additionnel :</fr>
+ </i18n>
+ </text>
+ </tab>
+ <tab type="settings">
+ <title>
+ <i18n>
+ <en>Gregorio Options</en>
+ <fr>Conf. gregorio</fr>
+ </i18n>
+ </title>
+ <comment>
+ <i18n>
+ <en>Input here your additional gregorio-specific TeX commands.</en>
+ <fr>Ajoutez ici vos commandes additionelles pour GregorioTeX.</fr>
+ </i18n>
+ </comment>
+ <text name="greconf" type="long" default="\grechangestaffsize{17}"></text>
+ </tab>
+</editorsettings>
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/Makefile.am b/Build/source/texk/gregorio/gregorio-src/contrib/Makefile.am
new file mode 100644
index 00000000000..5cabdb95d3b
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/Makefile.am
@@ -0,0 +1,20 @@
+# Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+SUBDIRS = TeXShop
+
+EXTRA_DIST = gprocess gabc.xml gabc.lang gabc.vim 900_gregorio.xml gregorio.png gabc-syntax.plist contrib_README.md system-setup.command system-setup.bat config-texworks.command checkSyllabation.py
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaLaTeX+se.engine b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaLaTeX+se.engine
new file mode 100644
index 00000000000..2c2642dd8c4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaLaTeX+se.engine
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [[ -n ${2:+x} ]]; then
+ echo "I will add $2 to the input path"
+ export TEXINPUTS="$2//:"
+ export LUAINPUTS="$2//:"
+fi
+lualatex --shell-escape -file-line-error -synctex=1 "$1"
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaTeX+se.engine b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaTeX+se.engine
new file mode 100644
index 00000000000..6da782ed7b4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/LuaTeX+se.engine
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [[ -n ${2:+x} ]]; then
+ echo "I will add $2 to the input path"
+ export TEXINPUTS="$2//:"
+ export LUAINPUTS="$2//:"
+fi
+luatex --shell-escape -file-line-error -synctex=1 "$1"
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/Makefile.am b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/Makefile.am
new file mode 100644
index 00000000000..ff4d5272046
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/Makefile.am
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+EXTRA_DIST = auto-configure.command LuaLaTeX+se.engine LuaTeX+se.engine
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/auto-configure.command b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/auto-configure.command
new file mode 100644
index 00000000000..58f1df2e959
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/TeXShop/auto-configure.command
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+# This script is designed to automatically configure a TeXShop distribution.
+# You should be able to direct it to run by double clicking on it.
+
+#This trap combination allows the window to linger long enough for the user to
+#inspect the output, but still get closed when all is said and done.
+function quit {
+ read -n1 -r -p "Press any key to close window." key
+ osascript -e 'tell application "Terminal" to close front window' > /dev/null 2>&1 &
+}
+
+trap quit EXIT
+
+
+#Copy the engine file from its instalation directory to the TeXShop Engines directory
+ENGINEDIR="$HOME/Library/TeXShop/Engines"
+if [ ! -d "$ENGINEDIR" ]; then
+ echo "Cannot Find TeXShop configuration directory!"
+ echo "Please open and close TeXShop and try running this script again."
+ exit 1
+fi
+SOURCE="/Users/Shared/Gregorio/contrib/TeXShop/LuaLaTeX+se.engine"
+if [ ! -e "$SOURCE" ]; then
+ SOURCE="$PWD/LuaLaTeX+se.engine"
+ if [ ! -e "$SOURCE" ]; then
+ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+ SOURCE="$DIR/LuaLaTeX+se.engine"
+ else
+ echo "Cannot find LuaLaTeX+se.engine"
+ echo "Please try running the Gregorio intaller again"
+ exit 1
+ fi
+fi
+echo "Copying LuaLaTeX+se.engine into TeXShop configuration"
+cp "$SOURCE" "$ENGINEDIR"
+
+SOURCE="/Users/Shared/Gregorio/contrib/TeXShop/LuaTeX+se.engine"
+if [ ! -e "$SOURCE" ]; then
+ SOURCE="$PWD/LuaTeX+se.engine"
+ if [ ! -e "$SOURCE" ]; then
+ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+ SOURCE="$DIR/LuaTeX+se.engine"
+ else
+ echo "Cannot find LuaTeX+se.engine"
+ echo "Please try running the Gregorio intaller again"
+ exit 1
+ fi
+fi
+echo "Copying LuaTeX+se.engine into TeXShop configuration"
+cp "$SOURCE" "$ENGINEDIR"
+
+#double check the execution bits
+chmod +x "$ENGINEDIR/LuaLaTeX+se.engine"
+chmod +x "$ENGINEDIR/LuaTeX+se.engine"
+
+echo "Configuration complete"
+exit 0
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/checkSyllabation.py b/Build/source/texk/gregorio/gregorio-src/contrib/checkSyllabation.py
new file mode 100644
index 00000000000..8fcd6431af4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/checkSyllabation.py
@@ -0,0 +1,156 @@
+#! /usr/bin/env python3
+
+"""
+ A script to check the syllabation of a gabc file
+
+ See checkSyllabation.py -h for help
+
+ Copyright (C) 2016-2019 Elie Roux
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+ Depends on pyphen: http://pyphen.org/
+ You also need the hyph_la_liturgical.dic file. To get it, get the
+ hyphen-la project on https://github.com/gregorio-project/hyphen-la
+ and run "make" in the "patterns" directory.
+
+"""
+
+import sys
+import re
+import argparse
+import pyphen
+import os
+import glob
+
+DEFAULT_OUTFILE = False
+if os.name == 'nt':
+ DEFAULT_OUTFILE = 'check-syllabation.log'
+
+def get_parser():
+ "Return command line parser"
+ parser = argparse.ArgumentParser(
+ description='A script to check the syllabation of gabc files')
+ parser.add_argument('-p', '--pat-path',
+ help='hyphenation pattern file',
+ action='store', default="hyph_la_liturgical.dic")
+ parser.add_argument('-o', '--outfile',
+ help='The file that will contain the report',
+ action='store', default=DEFAULT_OUTFILE)
+ parser.add_argument('-v', '--verbose',
+ help='Report also files without error',
+ action='store_true', default=False)
+ parser.add_argument('path',
+ help='Path to a gabc file or a directory containing gabc files',
+ action='store', default=".")
+ return parser
+
+def deacc(accstr):
+ return accstr.replace('á', 'a').replace('é', 'e').replace('í', 'i').replace('ó', 'o').replace('ú', 'u').replace('ý', 'y').replace('́', '').replace('ǽ', 'æ')
+
+def checkwords(words_list, hyphenator):
+ errors = []
+ for word in words_list:
+ initialword = deacc(word.lower())
+ if initialword.find('-') == -1:
+ # no need for noise
+ continue
+ correctword = hyphenator.inserted(initialword.replace('-',''))
+ if correctword != initialword:
+ errors.append( (initialword,correctword) )
+ return errors
+
+def get_words_list(gabc_content):
+ gabc_content = gabc_content.split('%%\n', 1)[1] # no headers
+ gabc_content = re.sub(r'%.*\n', '', gabc_content)
+ gabc_content = gabc_content.replace('\n', ' ').replace('\r', ' ').replace('{','')
+ gabc_content = gabc_content.replace('}','').replace('<sp>\'ae</sp>', 'ǽ')
+ gabc_content = gabc_content.replace('<sp>oe</sp>', 'œ').replace('<sp>\'oe</sp>', 'œ')
+ gabc_content = gabc_content.replace('<sp>ae</sp>', 'æ').replace('<sp>\'æ</sp>', 'ǽ')
+ gabc_content = gabc_content.replace('<sp>\'œ</sp>', 'œ')
+ gabc_content = re.sub(r'\([^\)]*\)', '-', gabc_content)
+ gabc_content = re.sub(r'<\/?[ibuec]>', '', gabc_content)
+ gabc_content = re.sub(r'<\/?sc>', '', gabc_content)
+ gabc_content = re.sub(r'<\/?eu>', '', gabc_content)
+ gabc_content = re.sub(r'<v>[^<]*<\/v>', '', gabc_content)
+ gabc_content = re.sub(r'<v>[^>]*<\/v>', '', gabc_content)
+ gabc_content = re.sub(r'<sp>[^>]*<\/sp>', '', gabc_content)
+ gabc_content = re.sub(r'<alt>[^>]*<\/alt>', '', gabc_content)
+ gabc_content = re.sub(r'\[[^\]]*\]', '', gabc_content)
+ gabc_content = re.sub(r'-+', '-', gabc_content)
+ gabc_content = re.sub(r'-?(\s+|$)', ' ', gabc_content)
+ gabc_content = re.sub(r'[^a-záéíóæúýœǽ\u0301 -]', '', gabc_content, flags=re.IGNORECASE)
+ gabc_content = re.sub(r'(^|\s+)-', ' ', gabc_content)
+ return gabc_content.split()
+
+def get_file_list(path):
+ if os.path.isfile(path):
+ return [path]
+ elif os.path.isdir(path):
+ files = glob.glob(os.path.join(path, '**/*.gabc'), recursive=True)
+ files = sorted(files)
+ return files
+ else:
+ print('Error! Cannot find '+path, file=sys.stderr)
+ sys.exit(1)
+
+def check_file(filepath, hyphenator, outfd, report_no_error=False):
+ words_list = []
+ with open(filepath, 'r', encoding='utf8') as inputf:
+ words_list = get_words_list(inputf.read())
+ errors = checkwords(words_list, hyphenator)
+ nb_errors = len(errors)
+ if nb_errors > 0 or report_no_error :
+ outfd.write('analyzing '+filepath+':\n')
+ if nb_errors == 0:
+ outfd.write(' no error!\n')
+ else:
+ for t in errors:
+ outfd.write(' '+t[0]+' should be '+t[1]+'\n')
+ outfd.write('\n')
+ return nb_errors
+
+def main():
+ "Main function"
+ parser = get_parser()
+ if len(sys.argv) == 1:
+ parser.print_help()
+ sys.exit(1)
+ args = parser.parse_args()
+ hyphenator = pyphen.Pyphen(filename=args.pat_path,left=1,right=1)
+ outfd = sys.stdout
+ if args.outfile != False:
+ outfd = open(args.outfile, 'w', encoding='utf8')
+ file_list = get_file_list(args.path)
+ nb_errors = 0
+ for f in file_list:
+ nb_errors += check_file(f, hyphenator, outfd, args.verbose)
+ if len(file_list) > 1 and nb_errors > 0:
+ outfd.write('Total errors: '+str(nb_errors)+'\n')
+ elif nb_errors == 0 and not args.verbose:
+ outfd.write('No error!\n')
+ if outfd is not sys.stdout:
+ outfd.close()
+ if nb_errors == 0:
+ sys.exit(0)
+ else:
+ sys.exit(2)
+
+if __name__ == "__main__":
+ main()
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/config-texworks.command b/Build/source/texk/gregorio/gregorio-src/contrib/config-texworks.command
new file mode 100644
index 00000000000..2101b5ea75d
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/config-texworks.command
@@ -0,0 +1,93 @@
+#!/usr/bin/env bash
+
+# This script is designed to automatically configure a TeXworks distribution.
+# You can run it by double clicking on it on a Mac.
+# On Linux this behavior is controlled by a preference. See http://askubuntu.com/questions/286621/how-do-i-run-executable-scripts-in-nautilus for details.
+# If prompted, you need to select "Run in Terminal" to see the output.
+
+
+#This trap combination allows the window to linger long enough for the user to
+#inspect the output, but still get closed when all is said and done.
+function quit {
+ read -n1 -r -p "Press any key to close window." key
+ if $mac; then
+ osascript -e 'tell application "Terminal" to close front window' > /dev/null 2>&1 &
+ else
+ exit
+ fi
+}
+
+trap quit EXIT
+
+case "$(uname -s)" in
+ Darwin)
+ echo 'Mac OS X detected'
+ mac=true
+ ToolsDir="$HOME/Library/TeXworks"
+ ;;
+ Linux)
+ echo 'Linux detected'
+ mac=false
+ ToolsDir="$HOME/.TeXworks"
+ ;;
+ *)
+ echo 'Unsupported OS detected'
+ echo "Please configure TeXworks manually"
+ exit 1
+ ;;
+esac
+
+# Add the typesetting tool
+TOOLS="$ToolsDir/configuration/tools.ini"
+if [ ! -e "$TOOLS" ]; then
+ echo "Cannot find TeXworks configuration"
+ echo "Please open and close TeXworks and try running this script again"
+ echo "If this still does not work, then Add and Remove a dummy typesetting"
+ echo " tool from the Preferences dialog."
+ exit 1
+fi
+echo "Adding LuaLaTeX+se Typesetting tool"
+oldTOOLS="$TOOLS.old"
+cp "$TOOLS" "$oldTOOLS"
+last=`grep -E "^\[[0-9]+\]$" "$TOOLS" | tail -1`
+last=${last:1:-1}
+last=$(expr $last + 0)
+(( last++ ))
+last=`printf "%03d" $last`
+last="[$last]"
+echo "" >> "$TOOLS"
+echo "$last" >> "$TOOLS"
+echo "name=LuaLaTeX+se" >> "$TOOLS"
+echo "program=lualatex" >> "$TOOLS"
+echo "arguments=--shell-escape, \$synctexoption, \$fullname" >> "$TOOLS"
+echo "showPdf=true" >> "$TOOLS"
+
+# Add the file filter and cleanup patterns to the configuration
+CONFIG="$ToolsDir/configuration/texworks-config.txt"
+oldCONFIG="$CONFIG.old"
+mv "$CONFIG" "$oldCONFIG"
+cleanup=false
+echo "Adding Gregorio files to Open dialog and Trash Aux Files list"
+while read line; do
+ if [[ $line == "# file-open-filter:"* ]]; then
+ line=${line:2}
+ fi
+ if [[ $line == *"Auxiliary files"* ]]; then
+ line="${line%?} *.gaux)"
+ fi
+ if [[ $line == *"All files"* ]]; then
+ echo "file-open-filter: Gabc score (*.gabc)" >> "$CONFIG"
+ fi
+ if [[ $line == "cleanup-patterns:"* ]]; then
+ cleanup=true
+ else
+ if $cleanup; then
+ echo "cleanup-patterns: \$jobname.gaux \$jobname.glog *-*_*_*.gtex" >> "$CONFIG"
+ cleanup=false
+ fi
+ fi
+ echo "$line" >> "$CONFIG"
+done < "$oldCONFIG"
+
+echo "Configuration Complete"
+exit 0
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/contrib_README.md b/Build/source/texk/gregorio/gregorio-src/contrib/contrib_README.md
new file mode 100644
index 00000000000..f0089e58e47
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/contrib_README.md
@@ -0,0 +1,92 @@
+# Third party scripts
+
+This folder contains various small scripts or modules for third-party softwares to use Gregorio.
+
+## Scribus
+
+Gregorio can be used in [Scribus](http://wiki.scribus.net/canvas/Scribus) using three files:
+
+ * `gregorio-scribus.lua`
+ * `gregorio.png`
+ * `900_gregorio.xml`
+
+To install Gregorio support in Scribus:
+
+ * copy the three files in the editorconfig folder of scribus (`/usr/share/scribus/editorconfig` under Linux, `C:\Program Files\Scribus\share\editorconfig`
+under Windows).
+ * read the comments in `900_gregorio.xml` and change some variables accordingly
+ * in Scribus:
+ * go in `File->Preferences->External Tools`
+ * click `Add` in the `Render Frames`
+ * select the file `900_gregorio.xml`
+
+After that you can insert a render frame using Gregorio, and simply
+typing gabc (`right-click->edit sources`).
+
+For more details see [the website](http://gregorio-project.github.io/introduction-scribus.html).
+
+## Syllabation checker
+
+The scripts in this folder allow to check the syllabation of a gabc score against syllabation rules that you must provide.
+
+#### Dependencies
+
+The main script, `checkSyllabation.py` is in Python3, so you obviously need it. It uses the [pyphen](http://pyphen.org/) package. You will also need the hyphenation of the text language in the `libhyphen` format in order to run it.
+
+If you want liturgical Latin hyphenation rules, you can pick those from the [hyphen-la](https://github.com/gregorio-project/hyphen-la) project. They are available in `libhyphen` format on the [webpage](http://gregorio-project.github.io/hyphen-la/).
+
+#### Running the scripts
+
+Once you have the hyphenation rules in the `libhyphen` format, you can check one score by running
+
+```
+checkSyllabation.py -p path/to/file.dic my_file.gabc
+```
+
+where `path/to/file.dic` is the path to the hyphenation rules file (default is `hyph_la_liturgical.dic` in the current directory). You can also analyze all gabc scores of a directory (with subdirectories) by replacing `my_file.gabc` by the name of the directory. By default, the script analyzes the current directory. The script outputs the report to `stdout` on Unix systems, and to `check-syllabation.log` on Windows systems.
+
+You can see more options by running
+
+```
+checkSyllabation.py --help
+```
+
+#### Hyphenation problems
+
+If you encounter problems of hyphenation, meaning you disagree with the proposed hyphenation, please contact the author of the hyphenation rules you are using ([here](https://github.com/gregorio-project/hyphen-la/issues) for `hyphen-la` for example).
+
+If you encounter problems because the script got confused by a gabc construct you are using or has bugs not directly related to hyphenation, please report it on the [gregorio tracker](https://github.com/gregorio-project/gregorio/issues).
+
+## Kde editors (Kate, Kedit)
+
+You can use `gabc.xml` for syntax highlighting in kate (and Kedit, etc.). To
+install it, copy the file in `/usr/share/apps/katepart/syntax`. This path
+may vary according to your distribution.
+
+## Gnome editors (Gedit)
+
+You can use `gabc.lang` for syntax highlighting in GtkSourceView (Gedit, etc.). To
+install it, copy the file in `/usr/share/gtksourceview-3.0/language-specs`. This path
+may vary according to your distribution.
+
+## Emacs
+
+To use gregorio in [Emacs](https://www.gnu.org/software/emacs/), see [this script](https://github.com/cajetanus/gregorio-mode.el).
+
+## Vim
+
+To get gabc syntax highlighting in [Vim](http://www.vim.org/):
+
+ * copy `gabc.vim` in `/usr/share/vim/vimcurrent/syntax`
+ * add the line `au BufNewFile,BufRead *.gabc setf gabc`
+somewhere near lines of the same type (near line 100 for example) in
+`/usr/share/vim/vimcurrent/filetype.vim`. This will autodetect the filetypes.
+
+## BBedit and TextWrangler (OSX only)
+
+To get gabc syntax highlight in [BBedit](http://www.barebones.com/products/bbedit/) or [TextWrangler](http://www.barebones.com/products/textwrangler/), copy `gabc-syntax.plist` into `~/Library/Application Support/TextWrangler/Language Modules/` and restart BBEdit or TextWrangler.
+
+## Script to process gabc score
+
+`gprocess` is a perl script to instantly compile and show the result of a gabc
+file. You can modify some variables directly into the script.
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gabc-syntax.plist b/Build/source/texk/gregorio/gregorio-src/contrib/gabc-syntax.plist
new file mode 100644
index 00000000000..39396b46089
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gabc-syntax.plist
@@ -0,0 +1,82 @@
+<!--
+GABC syntax file for BBedit and TextWrangler
+Copyright Tomasz Grabowski <zzzygzak@gmail.com>, 2013
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+--><plist version="1.0">
+<dict>
+<key>BBEditDocumentType</key>
+ <string>CodelessLanguageModule</string>
+<key>BBLMLanguageCode</key>
+ <string>0079</string>
+<key>BBLMLanguageCode</key>
+ <string>GABC</string>
+<key>BBLMLanguageDisplayName</key>
+ <string>Gregorio GABC</string>
+<key>BBLMSuffixMap</key>
+ <array>
+ <dict>
+ <key>BBLMIsSourceKind</key>
+ <true/>
+ <key>BBLMLanguageSuffix</key>
+ <string>.gabc</string>
+ </dict>
+ </array>
+<key>BBLMColorsSyntax</key><true/>
+<key>BBLMIsCaseSensitive</key><true/>
+<key>BBLMScansFunctions</key><false/>
+<key>BBLMSupportsTextCompletion</key><true/>
+<key>BBLMCanSpellCheckCodeRuns</key><false/>
+
+<key>BBLMPredefinedNameList</key>
+ <array>
+ <string>name</string>
+ <string>gabc-copyright</string>
+ <string>score-copyright</string>
+ <string>office-part</string>
+ <string>occasion</string>
+ <string>meter</string>
+ <string>commentary</string>
+ <string>arranger</string>
+ <string>gabc-version</string>
+ <string>author</string>
+ <string>date</string>
+ <string>manuscript</string>
+ <string>manuscript-reference</string>
+ <string>manuscript-storage-place</string>
+ <string>book</string>
+ <string>transcriber</string>
+ <string>transcription-date</string>
+ <string>gregoriotex-font</string>
+ <string>mode</string>
+ <string>initial-style</string>
+ <string>centering-scheme</string>
+ <string>user-notes</string>
+ <string>annotation</string>
+ </array>
+<key>BBLMCommentLineDefault</key><string>%</string>
+<key>Language Features</key>
+ <dict>
+ <key>Open Strings 1</key><string>(</string>
+ <key>Close Strings 1</key><string>)</string>
+ <key>Open Strings 2</key><string> &lt;</string>
+ <key>Close Strings 2</key><string>&gt; </string>
+ <key>End-of-line Ends Strings 1</key> <false/>
+ <key>Identifier and Keyword Characters</key>
+ <string>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-</string>
+ <key>Open Statement Blocks</key> <string>\</string>
+ <key>Close Statement Blocks</key> <string>}</string>
+ </dict>
+</dict>
+</plist>
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gabc.lang b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.lang
new file mode 100644
index 00000000000..eda2860a718
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.lang
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Author: Elie Roux <elie.roux@telecom-bretagne.fr>
+ Copyright (C) 2008-2019 Elie Roux <elie.roux@telecom-bretagne.fr>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<language id="gabc" _name="Gabc" version="2.0" _section="Sources">
+ <metadata>
+ <property name="globs">*.gabc</property>
+ </metadata>
+ <styles>
+ <style id="attribute-name" _name="Attribute Name" map-to="def:keyword"/>
+ <style id="text" _name="Text" map-to="def:keyword"/>
+ <style id="text-markups" _name="Text Markups" map-to="def:statement"/>
+ <style id="translation" _name="Translation" map-to="def:doc-comment-element"/>
+ <style id="comment" _name="Comment" map-to="def:doc-comment-element"/>
+ <style id="notes" _name="Notes"/>
+ <style id="notes-base" _name="Basic Notes" map-to="def:constant"/>
+ <style id="alterations" _name="Alterations" map-to="def:identifier"/>
+ <style id="spaces" _name="Spaces" map-to="def:special-char"/>
+ </styles>
+ <definitions>
+ <context id="gabc">
+ <include>
+ <context id="header">
+ <include>
+ <context id="attribute-name" style-ref="attribute-name">
+ <match>[^:]+:|;</match>
+ </context>
+ </include>
+ </context>
+ <context id="score">
+ <start>%%</start>
+ <end>%%</end>
+ <include>
+ <context id="text" style-ref="text">
+ <match>[^\(\[&lt;]+</match>
+ </context>
+ <context id="comment" style-ref="comment">
+ <!--<start>%</start>
+ <end>&#x0a;</end>-->
+ <match>\%[^%]\n</match>
+ </context>
+ <context id="translation" style-ref="translation">
+ <start>\[</start>
+ <end>\]</end>
+ </context>
+ <context id="specials-symbol" style-ref="text-markups">
+ <prefix>&lt;</prefix>
+ <suffix>&gt;</suffix>
+ <keyword>v</keyword>
+ <keyword>/v</keyword>
+ <keyword>i</keyword>
+ <keyword>/i</keyword>
+ <keyword>b</keyword>
+ <keyword>/b</keyword>
+ <keyword>tt</keyword>
+ <keyword>/tt</keyword>
+ <keyword>sp</keyword>
+ <keyword>/sp</keyword>
+ </context>
+ <context id="notes" style-ref="notes">
+ <start>\(</start>
+ <end>\)</end>
+ <include>
+ <context id="notes-normal" style-ref="notes-base">
+ <match>[a-mA-M]+</match>
+ </context>
+ <context id="alterations" style-ref="alterations">
+ <match>[&gt;&lt;\~xXyYvVoOwWqQ-Ss\._'1234]+</match>
+ </context>
+ <context id="spaces" style-ref="spaces">
+ <match>[`,;!: /zZ]+</match>
+ </context>
+ </include>
+ </context>
+ </include>
+ </context>
+ </include>
+ </context>
+ </definitions>
+</language>
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gabc.vim b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.vim
new file mode 100644
index 00000000000..3d15f41c055
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.vim
@@ -0,0 +1,93 @@
+" Vim syntax file
+" Language: Gabc gregorian chant notation
+" Last Change: 2016 Feb 11
+
+" Quit when a (custom) syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+syn match gabcAttributeName /^[^:]*:/
+syn match gabcAttributeEnd ";"
+syn match gabcNoteError "." contained
+syn match gabcBasicNote "[a-np]" contained
+syn match gabcBasicNote "[A-NP][012]\?" contained
+syn match gabcNoteShape "[\<\>~xy#vVwWqQR\-Ss\.+]" contained
+syn match gabcNoteShape "_[0-5]*" contained
+syn match gabcNoteShape "[oO'\.][01]\?" contained
+syn match gabcNoteShape "r[0-8]\?" contained
+syn match gabcClef "[cf]b\?[1-5]" contained
+syn match gabcTextMarkup "</\?e>" contained
+syn match gabcTextMarkup "</\?b>" contained
+syn match gabcTextMarkup "</\?i>" contained
+syn match gabcTextMarkup "</\?c>" contained
+syn match gabcTextMarkup "</\?ul>" contained
+syn match gabcTextMarkup "</\?tt>" contained
+syn match gabcTextMarkup "</\?sc>" contained
+syn match gabcTextMarkup "</\?eu>" contained
+syn match gabcTextOrNoteMarkup "</\?nlba>" contained
+syn match gabcTextCenter "[{}]" contained
+syn match gabcFuse "@" contained
+syn match gabcFuseEnd "\]" contained
+syn match gabcBar ":?\?" contained
+syn match gabcBar ";[1-8]\?" contained
+syn match gabcBar ",[0-8]\?" contained
+syn match gabcBar "[`^]0\?" contained
+syn match gabcSpace "[! ]" contained
+syn match gabcSpace "/0\?" contained
+syn match gabcSpace "z[-+0]\?" contained
+syn match gabcSpace "Z[-+]\?" contained
+syn match gabcSpace "/\[[^\]]*\]" contained extend
+syn match gabcCommand "@\@<!\[[^\]]*\]" contained extend
+syn match gabcCommand "[{}]" contained extend
+syn match gabcBracket "\[\[" contained
+syn match gabcBracket "\]\]" contained
+
+syn region gabcComment start="%" end="$" keepend extend
+syn region gabcAlt matchgroup=gabcTextMarkup start="<alt>" end="</alt>"
+ \ contained
+syn region gabcSpecial matchgroup=gabcTextMarkup start="<sp>" end="</sp>"
+ \ contained
+syn region gabcVerbatim matchgroup=gabcTextMarkup start="<v>" end="</v>"
+ \ contained
+syn region gabcNabc matchgroup=gabcNabcCut start="|" end="[|)]" keepend
+syn cluster gabcFusible contains=gabcBasicNote,gabcNoteShape,gabcBar,gabcSpace,
+ \gabcComment,gabcCommand,gabcNoteError,gabcFuse,
+ \gabcTextOrNoteMarkup,gabcClef,gabcNabc,gabcBracket
+syn region gabcFuseGroup matchGroup=gabcFuseGroup start="@\[" end="\]"
+ \ contains=@gabcFusible,gabcFuseEnd contained keepend
+syn region gabcNotes matchgroup=gabcNote start="(" end=")"
+ \ contains=@gabcFusible,gabcFuseGroup contained keepend
+syn region gabcTranslation matchgroup=gabcTextMarkup start="\[" end="\]"
+ \ contained extend
+syn region gabcText start="^\(%%\)\@=" end="\%$"
+ \ contains=gabcNotes,gabcTextMarkup,gabcTextOrNoteMarkup,
+ \gabcTextCenter,gabcTranslation,gabcComment,gabcAlt,gabcSpecial,
+ \gabcVerbatim
+
+" Define the default highlighting.
+hi def link gabcAttributeName Statement
+hi def link gabcAttributeEnd Statement
+hi def link gabcText Constant
+hi def link gabcTranslation Constant
+hi def link gabcComment Comment
+hi def link gabcTextMarkup Delimiter
+hi def link gabcTextOrNoteMarkup Delimiter
+hi def link gabcTextCenter Delimiter
+hi def link gabcSpecial Constant
+hi def link gabcVerbatim Constant
+hi def link gabcAlt Constant
+hi def link gabcClef Statement
+hi def link gabcBasicNote Statement
+hi def link gabcNoteShape PreProc
+hi def link gabcCommand Type
+hi def link gabcBar Special
+hi def link gabcSpace Special
+hi def link gabcNabcCut Delimiter
+hi def link gabcBracket Delimiter
+hi def link gabcFuse Constant
+hi def link gabcFuseGroup Constant
+hi def link gabcFuseEnd Constant
+hi def link gabcNoteError Error
+
+let b:current_syntax = "gabc"
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gabc.xml b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.xml
new file mode 100644
index 00000000000..e84ec8975f2
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gabc.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE language SYSTEM "language.dtd">
+<!-- Elie Roux - elie.roux@telecom-bretagne.eu
+ version1.0 - 10 november 2008 -->
+<language name="GABC" version="1.10" kateversion="2.4" section="Other" extensions="*.gabc" mimetype="text/plain" casesensitive="1" author="Elie Roux (elie.roux@telecom-bretagne.eu)" license="GPL">
+ <highlighting>
+ <contexts>
+ <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar attribute="Attribute" context="Attribute" char=":"/>
+ <StringDetect attribute="Separation" context="Score Text" String="%%" insensitive="FALSE"/>
+ </context>
+ <context name="Attribute" attribute="Attribute" lineEndContext="#pop">
+ <DetectChar attribute="Attribute Name" context="Normal" char=";"/>
+ </context>
+ <context name="Score Text" attribute="Score Text" lineEndContext="#stay">
+ <DetectChar attribute="Notes" context="Notes" char="("/>
+ <RangeDetect attribute="Translation" context="#stay" char="[" char1="]"/>
+ <RangeDetect attribute="Text Markups" context="#stay" char="&lt;" char1="&gt;"/>
+ </context>
+ <context name="Notes" attribute="Notes" lineEndContext="#stay">
+ <DetectChar attribute="Notes" context="#pop" char=")"/>
+ <RegExpr attribute="Notes Base" context="#stay" String="[a-mA-M]+"/>
+ <RegExpr attribute="Alterations" context="#stay" String="[&gt;&lt;\~xXyYvVoOwWqQ-Ss\._'1234]+"/>
+ <RegExpr attribute="Space" context="#stay" String="[`,;!: /zZ]+"/>
+ </context>
+ </contexts>
+ <itemDatas>
+ <itemData name="Normal Text" defStyleNum="dsNormal"/>
+ <itemData name="Attribute" defStyleNum="dsNormal" italic="true"/>
+ <itemData name="Separation" defStyleNum="dsNormal" bold="true"/>
+ <itemData name="Score Text" defStyleNum="dsNormal" bold="true"/>
+ <itemData name="Text Markups" defStyleNum="dsFloat" bold="true"/>
+ <itemData name="Translation" defStyleNum="dsNormal" italic="true"/>
+ <itemData name="Notes" defStyleNum="dsNormal"/>
+ <itemData name="Notes Base" defStyleNum="dsNormal"/>
+ <itemData name="Alterations" defStyleNum="dsFloat" italic="true"/>
+ <itemData name="Space" defStyleNum="dsString" bold="true"/>
+ </itemDatas>
+ </highlighting>
+</language>
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gprocess b/Build/source/texk/gregorio/gregorio-src/contrib/gprocess
new file mode 100644
index 00000000000..205acd7540e
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gprocess
@@ -0,0 +1,183 @@
+#!/usr/bin/perl
+
+# gprocess
+# a script for 'compiling' gregorio gabc music files
+# v0.2
+# Copyright (c) 2010 Richard Chonak <chonak@yahoo.com>
+# Changes in v0.2:
+# -- change list of PDF viewers
+# -- invoke LuaLateX instead of lamed/dvipdfm
+# -- drop use of pdftk (it's not available for my system)
+# -- use latin1 character set instead of utf8
+# -- update macro and variable names (with "gre" prefix) as needed
+# -- add 'redlines'
+# --
+#
+# v0.1
+# Copyright (C) 2008-2019 Richard Chonak <chonak@yahoo.com>
+#
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+use strict;
+
+## USER-MODIFIABLE COMMAND PATHS
+
+my $TEXCOMPILER = "lualatex --shell-escape";
+
+## END OF USER-MODIFIABLE COMMAND PATHS
+
+
+# print usage string if no command-line arg specified
+
+if ($#ARGV < 0) {
+ die "usage: $0 <gabc-file-name>\n";
+}
+
+
+my $GABCFILE = $ARGV[0];
+my $GABCNAME = $GABCFILE;
+$GABCNAME =~ s/.gabc//;
+my $SCORENAME;
+my $ANNOTATION;
+my $REFERENCE;
+my $OFFICEPART;
+my $NAMEFOUND = 0;
+my $KEEPSEARCHING = 1;
+my $INLINE = "";
+
+
+my $SCOREWRAPTEX = $GABCFILE;
+$SCOREWRAPTEX =~ s/.gabc$/-main.tex/;
+
+#### GET THE SCORE TITLE FROM THE GABC FILE ####
+
+if ($GABCFILE =~ m#/#) {
+ die "File spec must not contain slashes: $GABCFILE\n";
+};
+
+
+open (GABC,"<".$GABCFILE) or die "No such file: $GABCFILE\n";
+while ($KEEPSEARCHING == 1 && ($INLINE = <GABC>)) {
+ if ($INLINE =~ /^name/) {
+ $SCORENAME = $INLINE;
+ $SCORENAME =~ s/^.*:\s*//;
+ $SCORENAME =~ s/\s*;\s*$//;
+ };
+ if ($INLINE =~ /^anotation/) {
+ $ANNOTATION = $INLINE;
+ $ANNOTATION =~ s/^.*:\s*//;
+ $ANNOTATION =~ s/\s*;\s*$//;
+ };
+ if ($INLINE =~ /^reference/) {
+ $REFERENCE = $INLINE;
+ $REFERENCE =~ s/^.*:\s*//;
+ $REFERENCE =~ s/\s*;\s*$//;
+ };
+ if ($INLINE =~ /^office-part/) {
+ $OFFICEPART = $INLINE;
+ $OFFICEPART =~ s/^.*:\s*//;
+ $OFFICEPART =~ s/\s*;\s*$//;
+ };
+ if ($INLINE =~ /^%%/) { $KEEPSEARCHING = 0; }
+}
+
+close (GABC);
+
+
+
+#### READ IN THE TEMPLATE ####
+
+my @TEMPLATELINES;
+
+
+@TEMPLATELINES = <DATA>;
+
+
+
+#### MAKE SUBSTITUTIONS ####
+
+&do_subst ("XXXX-SCORENAME-XXXX", $SCORENAME);
+&do_subst ("XXXX-GABCFILE-XXXX", $GABCNAME);
+&do_subst ("XXXX-ANNOTATION-XXXX", $ANNOTATION);
+&do_subst ("XXXX-OFFICEPART-XXXX", $OFFICEPART);
+&do_subst ("XXXX-REFERENCE-XXXX", $REFERENCE);
+
+foreach (@TEMPLATELINES){
+ s/^.*XXXX.*$//;
+};
+
+#### WRITE TEX WRAPPER FILE ####
+
+open (TEXWRAP,">".$SCOREWRAPTEX) or die "Cannot write file $SCOREWRAPTEX\n";
+print TEXWRAP @TEMPLATELINES;
+close (TEXWRAP);
+
+#### RUN LATEX ####
+my $PDFFILE = $SCOREWRAPTEX;
+$PDFFILE =~ s/tex$/pdf/;
+my $AUXFILE = $SCOREWRAPTEX;
+$AUXFILE =~ s/tex$/aux/;
+my $GAUXFILE = $SCOREWRAPTEX;
+$GAUXFILE =~ s/tex$/gaux/;
+
+# remove product files so that we don't accidentally view results
+# from a prior run
+unlink $PDFFILE;
+
+do_cmd("$TEXCOMPILER $SCOREWRAPTEX");
+# Run twice to calculate line heights.
+do_cmd("$TEXCOMPILER $SCOREWRAPTEX");
+unlink $AUXFILE;
+unlink $GAUXFILE;
+
+print "\n\nOutput is in $PDFFILE .\n";
+
+exit;
+
+sub do_subst {
+ my $TAG = $_[0];
+ my $VAL = $_[1];
+
+ foreach (@TEMPLATELINES) {
+ s/$TAG/$VAL/g;
+ }
+};
+
+sub do_cmd {
+ my $CMD = $_[0];
+#debugging print "Doing command: \n $CMD\n\n";
+ system ($CMD) == 0
+ or die "\n\nSystem command failed: $CMD : $?\n";
+};
+
+
+# THE LINES AFTER THIS "END" TAG ARE A TEMPLATE FOR THE TEX FILE TO BE GENERATED
+__END__
+
+\documentclass[12pt, letterpaper]{article}
+\usepackage{fullpage}
+\usepackage[T1]{fontenc}
+\usepackage{palatino}
+\usepackage[autocompile,allowdeprecated=false]{gregoriotex}
+\pagestyle{empty}
+\begin{document}
+
+\begin{center}\begin{huge}\textsc{XXXX-SCORENAME-XXXX}\end{huge}\end{center}
+
+\gregorioscore{XXXX-GABCFILE-XXXX}
+
+\end{document}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/gregorio.png b/Build/source/texk/gregorio/gregorio-src/contrib/gregorio.png
new file mode 100644
index 00000000000..d58efff6a27
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/gregorio.png
Binary files differ
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.bat b/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.bat
new file mode 100644
index 00000000000..ad622dc5b9b
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.bat
@@ -0,0 +1,247 @@
+@echo off
+SETLOCAL ENABLEEXTENSIONS EnableDelayedExpansion
+
+set output="%TEMP%\system-setup.log"
+
+echo Gregorio Windows Setup Diagnostic Tool
+echo (C) 2015 The Gregorio Project.
+echo.
+echo Gregorio is free software: you can redistribute it and/or modify
+echo it under the terms of the GNU General Public License as published by
+echo the Free Software Foundation, either version 3 of the License, or
+echo (at your option) any later version.
+echo.
+echo This program is distributed in the hope that it will be useful,
+echo but WITHOUT ANY WARRANTY; without even the implied warranty of
+echo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+echo GNU General Public License for more details.
+echo.
+echo You should have received a copy of the GNU General Public License
+echo along with this program. If not, see http://www.gnu.org/licenses/.
+echo.
+echo Creating system-setup.log...
+
+echo ### Gregorio Windows Setup Results > %output%
+echo #### Created: %date% >> %output%
+echo ----------------------------------------------------------------------------- >> %output%
+echo. >> %output%
+echo. >> %output%
+
+echo ### Windows Version >> %output%
+ver >> %output%
+echo. >> %output%
+echo. >> %output%
+echo ----------------------------------------------------------------------------- >> %output%
+echo. >> %output%
+echo. >> %output%
+
+echo ### LuaTeX Setup >> %output%
+echo #### Version >> %output%
+echo. >> %output%
+luatex -v >> %output% 2>&1
+echo. >> %output%
+echo #### Location >> %output%
+echo. >> %output%
+@for %%e in (%PATHEXT%) do @for %%i in (luatex%%e) do @if NOT "%%~$PATH:i"=="" echo %%~$PATH:i >> %output% 2>&1
+echo. >> %output%
+echo. >> %output%
+echo #### TEXMFDIST >> %output%
+kpsewhich --var-value=TEXMFDIST >> %output% 2>&1
+echo. >> %output%
+echo #### TEXMFLOCAL >> %output%
+echo. >> %output%
+for /f "delims=" %%i in ('kpsewhich --var-value TEXMFLOCAL') do set texmflocal=%%i
+echo %texmflocal% >> %output% 2>&1
+set texmflocal=%texmflocal:/=\%
+IF NOT EXIST %texmflocal% ECHO Folder does not exist >> %output% 2>&1
+echo. >> %output%
+echo #### TEXINPUTS.lualatex >> %output%
+kpsewhich --var-value=TEXINPUTS.lualatex >> %output% 2>&1
+echo. >> %output%
+echo #### LUAINPUTS.lualatex >> %output%
+kpsewhich --var-value=LUAINPUTS.lualatex >> %output% 2>&1
+echo. >> %output%
+echo #### shell_escape >> %output%
+kpsewhich --var-value=shell_escape >> %output% 2>&1
+echo. >> %output%
+echo #### Shell Escape Commands >> %output%
+kpsewhich --var-value=shell_escape_commands >> %output% 2>&1
+echo. >> %output%
+echo #### openout_any >> %output%
+kpsewhich --var-value=openout_any >> %output% 2>&1
+echo. >> %output%
+echo #### openin_any >> %output%
+kpsewhich --var-value=openin_any >> %output% 2>&1
+echo. >> %output%
+echo. >> %output%
+echo ----------------------------------------------------------------------------- >> %output%
+echo. >> %output%
+echo. >> %output%
+
+echo ### Gregorio Setup >> %output%
+echo #### Locations and Versions >> %output%
+for /f "delims=" %%G in ('where /f gregorio*') do (
+ echo %%G >> %output%
+ for /f "delims=" %%H in ('%%G -V') do echo %%H >> %output% 2>&1
+ echo. >> %output%
+)
+echo #### GregorioTeX Locations >> %output%
+echo. >> %output%
+
+:: Files using GREGORIO_VERSION in {}
+set files=gregoriosyms.sty ^
+gregoriotex-chars.tex ^
+gregoriotex-main.tex ^
+gregoriotex-nabc.tex ^
+gregoriotex-signs.tex ^
+gregoriotex-spaces.tex ^
+gregoriotex-syllable.tex ^
+gregoriotex-common.tex ^
+gregoriotex-symbols.tex
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
+ set ver=!ver:*{=!
+ set ver=!ver:*{=!
+ set trash=}!ver:*}=!
+ call set ver=%%ver:!trash!=%%
+ echo !ver! >> %output% 2>&1
+ set ver=
+ )
+)
+
+:: Files using GREGORIO_VERSION in spaces
+set files=gregoriotex-nabc.lua ^
+gregoriotex-signs.lua ^
+gregoriotex-symbols.lua
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
+ set ver=!ver:*N =!
+ echo !ver! >> %output% 2>&1
+ set ver=
+ )
+)
+
+:: Files using GREGORIO_VERSION in ''
+set files=gregoriotex.lua
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ for /f "delims=" %%I in ('findstr /r "GREGORIO_VERSION" "!loc!"') do set ver=%%I
+ set ver=!ver:*'=!
+ set trash='!ver:*'=!
+ call set ver=%%ver:!trash!=%%
+ echo !ver! >> %output% 2>&1
+ set ver=
+ )
+)
+
+:: Files using PARSE_VERSION_DATE_LTX
+set files=gregoriotex.sty ^
+gregoriotex.tex
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ for /f "delims=" %%I in ('findstr /r "PARSE_VERSION_DATE_LTX" "!loc!"') do set ver=%%I
+ set ver=!ver:*v=!
+ set trash=G!ver:*G=!
+ call set ver=%%ver:!trash!=%%
+ echo !ver! >> %output% 2>&1
+ set ver=
+ )
+)
+
+:: Font Files
+set files=greciliae.ttf ^
+greciliae-hollow.ttf ^
+greciliae-hole.ttf ^
+greciliae-op.ttf ^
+greciliae-op-hollow.ttf ^
+greciliae-op-hole.ttf ^
+greextra.ttf ^
+gregorio.ttf ^
+gregorio-hollow.ttf ^
+gregorio-hole.ttf ^
+gregorio-op.ttf ^
+gregorio-op-hollow.ttf ^
+gregorio-op-hole.ttf ^
+granapadano.ttf ^
+granapadano-hollow.ttf ^
+granapadano-hole.ttf ^
+granapadano-op.ttf ^
+granapadano-op-hollow.ttf ^
+granapadano-op-hole.ttf ^
+gregall.ttf
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ otfinfo --font-version "!loc!" >> %output% 2>&1
+ )
+)
+
+:: Unversioned and Obsolete Files
+set files=gregorio-vowels.dat ^
+gsp-default.tex ^
+gregoriotex-ictus.tex ^
+gresym.ttf ^
+parmesan.ttf ^
+parmesan-op.ttf ^
+gregsmodern.ttf
+
+for %%G in (%files%) do (
+ echo ##### %%G >> %output%
+ for /f "delims=" %%H in ('kpsewhich -all %%G') do (
+ set loc=%%H
+ set loc=!loc:/=\!
+ echo !loc! >> %output%
+ )
+)
+
+echo. >> %output%
+echo #### kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty >> %output%
+kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty >> %output% 2>&1
+echo. >> %output%
+echo #### kpsewhich --all -engine luatex gregoriotex.tex >> %output%
+kpsewhich --all -engine luatex gregoriotex.tex >> %output% 2>&1
+echo. >> %output%
+echo. >> %output%
+echo ----------------------------------------------------------------------------- >> %output%
+echo. >> %output%
+echo. >> %output%
+
+echo.
+echo.
+echo system-setup.log created and saved in a temporary location.
+echo Upon exiting this script, the log will be opened in Notepad for you.
+echo Please save the file to a convenient location and email it to
+echo gregorio-users@googlegroups.com as part of your bug report.
+echo.
+echo You can also create an issue at
+echo http://github.com/gregorio-project/gregorio/issues
+echo and copy-paste the content of this file into the description.
+echo.
+pause
+start notepad %output%
diff --git a/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.command b/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.command
new file mode 100644
index 00000000000..13fe833be6a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/contrib/system-setup.command
@@ -0,0 +1,232 @@
+#!/usr/bin/env bash
+
+# This script generates a log detailing information about your computer.
+# You can run it by double clicking on it on a Mac.
+# On Linux this behavior is controlled by a preference. See http://askubuntu.com/questions/286621/how-do-i-run-executable-scripts-in-nautilus for details.
+# If prompted, you need to select "Run in Terminal" to see the output.
+
+#This trap combination allows the window to linger long enough for the user to
+#inspect the output, but still get closed when all is said and done.
+function quit {
+ read -n1 -r -p "Press any key to close window." key
+ if $mac; then
+ osascript -e 'tell application "Terminal" to close front window' > /dev/null 2>&1 &
+ else
+ exit
+ fi
+}
+
+trap quit EXIT
+
+case "$(uname -s)" in
+ Darwin)
+ echo 'Mac OS X detected'
+ mac=true
+ ;;
+ Linux)
+ echo 'Linux detected'
+ mac=false
+ ;;
+ *)
+ echo 'Unsupported OS detected'
+ exit 1
+ ;;
+esac
+
+
+HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+OUTPUT=$HERE/system-setup.log
+
+echo "Gregorio Unix Setup Diagnostic Tool"
+echo "(C) 2015 The Gregorio Project."
+echo ""
+echo "Gregorio is free software: you can redistribute it and/or modify"
+echo "it under the terms of the GNU General Public License as published by"
+echo "the Free Software Foundation, either version 3 of the License, or"
+echo "(at your option) any later version."
+echo ""
+echo "This program is distributed in the hope that it will be useful,"
+echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
+echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
+echo "GNU General Public License for more details."
+echo ""
+echo "You should have received a copy of the GNU General Public License"
+echo "along with this program. If not, see http://www.gnu.org/licenses/."
+echo ""
+echo "Creating system-setup.log..."
+
+echo "### Gregorio Unix Setup Results" > $OUTPUT
+echo "#### Created: `date`" >> $OUTPUT
+echo "-----------------------------------------------------------------------------" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+
+echo "### OS Version" >> $OUTPUT
+uname -v >> $OUTPUT
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "-----------------------------------------------------------------------------" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+
+echo "### LuaTeX Setup" >> $OUTPUT
+echo "#### Version" >> $OUTPUT
+echo "" >> $OUTPUT
+luatex -v >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### Location" >> $OUTPUT
+echo "" >> $OUTPUT
+which -a luatex >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "#### TEXMFLOCAL" >> $OUTPUT
+echo "" >> $OUTPUT
+kpsewhich --var-value TEXMFLOCAL >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### TEXINPUTS.lualatex" >> $OUTPUT
+kpsewhich --var-value=TEXINPUTS.lualatex >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### LUAINPUTS.lualatex" >> $OUTPUT
+kpsewhich --var-value=LUAINPUTS.lualatex >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### shell_escape" >> $OUTPUT
+kpsewhich --var-value=shell_escape >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### Shell Escape Commands" >> $OUTPUT
+kpsewhich --var-value=shell_escape_commands >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### openout_any" >> $OUTPUT
+kpsewhich --var-value=openout_any >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### openin_any" >> $OUTPUT
+kpsewhich --var-value=openin_any >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "-----------------------------------------------------------------------------" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+
+echo "### Gregorio Setup" >> $OUTPUT
+echo "#### Locations and Versions" >> $OUTPUT
+echo "" >> $OUTPUT
+progs=`compgen -cbka -A function 'gregorio'`
+for prog in $progs; do
+ which -a $prog >> $OUTPUT 2>&1
+ $prog -V >> $OUTPUT 2>&1
+ echo "" >> $OUTPUT
+done
+echo "#### GregorioTeX Locations" >> $OUTPUT
+echo "" >> $OUTPUT
+
+# Files using GREGORIO_VERSION
+files="gregoriosyms.sty
+gregoriotex-chars.tex
+gregoriotex-main.tex
+gregoriotex-nabc.lua
+gregoriotex-nabc.tex
+gregoriotex-signs.lua
+gregoriotex-signs.tex
+gregoriotex-spaces.tex
+gregoriotex-syllable.tex
+gregoriotex-symbols.lua
+gregoriotex-symbols.tex
+gregoriotex-common.tex
+gregoriotex.lua"
+
+for f in $files
+do
+ echo "##### $f" >> $OUTPUT
+ locations=`kpsewhich -all $f`
+ for loc in $locations; do
+ echo $loc >> $OUTPUT 2>&1
+ grep -m 1 'GREGORIO_VERSION' $loc | grep -o '[0-9]*\.[0-9]*\.[0-9]*-*[betarc]*[0-9]*' >> $OUTPUT 2>&1
+ done
+done
+
+# Files using PARSE_VERSION_DATE_LTX
+files="gregoriotex.sty
+gregoriotex.tex"
+
+for f in $files
+do
+ echo "##### $f" >> $OUTPUT
+ locations=`kpsewhich -all $f`
+ for loc in $locations; do
+ echo $loc >> $OUTPUT 2>&1
+ grep -m 1 'PARSE_VERSION_DATE_LTX' $loc | grep -o '[0-9]*\.[0-9]*\.[0-9]*-*[betarc]*[0-9]*' >> $OUTPUT 2>&1
+ done
+done
+
+# Font Files
+files="greciliae.ttf
+greciliae-hollow.ttf
+greciliae-hole.ttf
+greciliae-op.ttf
+greciliae-op-hollow.ttf
+greciliae-op-hole.ttf
+greextra.ttf
+gregorio.ttf
+gregorio-hollow.ttf
+gregorio-hole.ttf
+gregorio-op.ttf
+gregorio-op-hollow.ttf
+gregorio-op-hole.ttf
+granapadano.ttf
+granapadano-hollow.ttf
+granapadano-hole.ttf
+granapadano-op.ttf
+granapadano-op-hollow.ttf
+granapadano-op-hole.ttf
+gregall.ttf"
+
+for f in $files
+do
+ echo "##### $f" >> $OUTPUT
+ locations=`kpsewhich -all $f`
+ for loc in $locations; do
+ echo $loc >> $OUTPUT 2>&1
+ otfinfo --font-version $loc >> $OUTPUT 2>&1
+ done
+done
+
+# Unversioned and Obsolete Files
+files="gregorio-vowels.dat
+gsp-default.tex
+gregoriotex-ictus.tex
+gresym.ttf
+parmesan.ttf
+parmesan-op.ttf
+gregsmodern.ttf"
+
+for f in $files
+do
+ echo "##### $f" >> $OUTPUT
+ kpsewhich -all $f >> $OUTPUT 2>&1
+done
+
+
+echo "" >> $OUTPUT
+echo "### LuaTeX Double Checks" >> $OUTPUT
+echo "#### kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty" >> $OUTPUT
+kpsewhich --all -engine luatex -progname lualatex gregoriotex.sty >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "#### kpsewhich --all -engine luatex gregoriotex.tex" >> $OUTPUT
+kpsewhich --all -engine luatex gregoriotex.tex >> $OUTPUT 2>&1
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "-----------------------------------------------------------------------------" >> $OUTPUT
+echo "" >> $OUTPUT
+echo "" >> $OUTPUT
+
+echo ""
+echo ""
+echo "system-setup.log created and saved the working directory from which you"
+echo "ran this script. Please email it to gregorio-users@googlegroups.com as"
+echo "part of your bug report."
+echo ""
+echo "You can also create an issue at "
+echo "http://github.com/gregorio-project/gregorio/issues"
+echo "and copy-paste the content of this file into the description."
+echo ""
+exit 0
+
diff --git a/Build/source/texk/gregorio/gregorio-src/install-gtex.sh b/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
new file mode 100755
index 00000000000..29c910edc35
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/install-gtex.sh
@@ -0,0 +1,288 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+# This script installs the GregorioTeX portion of Gregorio.
+#
+# There are four ways to use this script:
+#
+# install-gtex.sh var:{tex-variable}
+#
+# Installs GregorioTeX into the directory named by the given {tex-variable}.
+# If the DESTDIR environment variable is set, it will be prepended.
+#
+# Example: install-gtex.sh var:TEXMFLOCAL
+# - Installs GregorioTeX into the system-wide TEXMF directory
+#
+# Example: install-gtex.sh var:TEXMFHOME
+# - Installs GregorioTeX into the user's personal TEXMF directory
+#
+# install-gtex.sh system|user
+#
+# Installs GregorioTeX into one of two common install locations. If the
+# DESTDIR environment variable is set, it will be prepended.
+#
+# Example: install-gtex.sh system
+# - Installs GregorioTeX into the system-wide TEXMF directory; an alias for
+# install-gtex.sh var:TEXMFLOCAL
+#
+# Example: install-gtex.sh user
+# - Installs GregorioTeX into the user's personal TEXMF directory; an alias
+# for install-gtex.sh var:TEXMFHOME
+#
+# install-gtex.sh dir:{directory}
+#
+# Installs GregorioTeX into the {directory} directory.
+#
+# Example: install-gtex.sh dir:/tmp/gtex
+# - Installs GregorioTeX into /tmp/gtex
+#
+# install-gtex.sh tds
+#
+# Creates a TDS-ready archive named gregoriotex.tds.zip
+#
+# In special situations, you may want to skip some parts of the installation.
+# To do this, set the SKIP environment variable to a comma-separated list of
+# the parts you want don't want installed: tex, latex, fonts, docs, examples,
+# and/or font-sources
+#
+# Setting the GENERATE_UNINSTALL environment variable to "false" will bypass
+# uninstall script generation and any existing uninstall script will be left
+# alone.
+
+VERSION=`head -1 .gregorio-version`
+FILEVERSION=`echo $VERSION | sed 's/\./_/g'`
+
+TEXFILES=(tex/gregoriotex*.tex tex/gsp-default.tex tex/gregoriotex*.lua
+ tex/*.dat)
+LATEXFILES=(tex/gregorio*.sty)
+TTFFILES=(fonts/*.ttf)
+DOCFILES=(doc/*.tex doc/*.lua doc/*.gabc doc/*.pdf doc/doc_README.md)
+EXAMPLEFILES=(examples/FactusEst.gabc examples/PopulusSion.gabc
+ examples/main-lualatex.tex examples/debugging.tex)
+FONTSRCFILES=(greextra.sfd squarize.py convertsfdtottf.py gregall.sfd
+ gresgmodern.sfd fonts_README.md)
+FONTSRCFILES=("${FONTSRCFILES[@]/#/fonts/}")
+FONTSRCFILES+=(fonts/*-base.sfd)
+# Files which have been eliminated, or whose installation location have been
+# changed. We will remove existing versions of these files in the target texmf
+# tree before installing.
+LEGACYFILES=(tex/luatex/gregoriotex/gregoriotex.sty
+ tex/luatex/gregoriotex/gregoriosyms.sty
+ tex/luatex/gregoriotex/gregoriotex-ictus.tex
+ fonts/truetype/public/gregoriotex/parmesan.ttf
+ fonts/truetype/public/gregoriotex/parmesan-op.ttf
+ fonts/source/gregoriotex/parmesan-base.sfd
+ fonts/truetype/public/gregoriotex/gresym.ttf
+ fonts/truetype/public/gregoriotex/gregorio.ttf
+ fonts/truetype/public/gregoriotex/gregorio-op.ttf
+ fonts/source/gregoriotex/gregorio-base.sfd
+ fonts/truetype/public/gregoriotex/granapadano.ttf
+ fonts/truetype/public/gregoriotex/granapadano-op.ttf
+ fonts/source/gregoriotex/granapadano-base.sfd)
+
+NAME=${NAME:-gregoriotex}
+FORMAT=${FORMAT:-luatex}
+LATEXFORMAT=${LATEXFORMAT:-lualatex}
+TEXHASH=${TEXHASH:-texhash}
+KPSEWHICH=${KPSEWHICH:-kpsewhich}
+CP=${CP:-cp}
+RM=${RM:-rm}
+
+GENERATE_UNINSTALL=${GENERATE_UNINSTALL:-true}
+AUTO_UNINSTALL=${AUTO_UNINSTALL:-false}
+REMOVE_OLD_FILES=${REMOVE_OLD_FILES:-true}
+
+arg="$1"
+case "$arg" in
+ system)
+ arg='var:TEXMFLOCAL'
+ ;;
+ user)
+ arg='var:TEXMFHOME'
+ ;;
+esac
+
+case "$arg" in
+ "")
+ ;;
+ tds)
+ TDS_ZIP="${NAME}.tds.zip"
+ TEXMFROOT=./tmp-texmf
+ ;;
+ var:*)
+ TEXMFROOT=`${KPSEWHICH} -expand-path "\$${arg#var:}"`
+ if [ "$TEXMFROOT" = "" ]
+ then
+ TEXMFROOT=`${KPSEWHICH} -var-value "${arg#var:}"`
+ fi
+ if [ "$TEXMFROOT" = "" ]
+ then
+ echo "Invalid TeX variable: '${arg#var:}'"
+ echo
+ else
+ sep=`${KPSEWHICH} -expand-path "{.,.}"`
+ sep="${sep#.}"
+ sep="${sep%.}"
+ TEXMFROOT="${DESTDIR}${TEXMFROOT/${sep}*/}"
+ fi
+ ;;
+ dir:*)
+ TEXMFROOT="${arg#dir:}"
+ ;;
+ *)
+ echo "Invalid argument: '$arg'"
+ echo
+ ;;
+esac
+
+if [ "$TEXMFROOT" = "" ]
+then
+ echo "Usage: $0 var:{tex-variable}"
+ echo " $0 dir:{directory}"
+ echo " $0 system|user|tds"
+ echo
+ echo "Please read the documentation in the script for additional options"
+ exit 1
+fi
+
+UNINSTALL_SCRIPT_DIR="scripts/gregoriotex"
+UNINSTALL_SCRIPT_FILE="uninstall-gtex.sh"
+UNINSTALL_SCRIPT="${TEXMFROOT}/${UNINSTALL_SCRIPT_DIR}/${UNINSTALL_SCRIPT_FILE}"
+
+function die {
+ echo 'Failed.'
+ exit 1
+}
+
+function install_to {
+ dir="$1"
+ shift
+ mkdir -p "${TEXMFROOT}/$dir" || die
+ $CP "$@" "${TEXMFROOT}/$dir" || die
+
+ if ${GENERATE_UNINSTALL}
+ then
+ for name in "$@"
+ do
+ echo '$RM'" $dir/$(basename $name)" >> "${UNINSTALL_SCRIPT}"
+ done
+ echo "rmdir -p $dir 2> /dev/null || true" >> "${UNINSTALL_SCRIPT}"
+ echo >> "${UNINSTALL_SCRIPT}"
+ fi
+}
+
+function find_and_remove {
+ for files in "$@"; do
+ target="${TEXMFROOT}/${files}"
+# echo "Looking for $target"
+ if [ -e "$target" ]; then
+# echo "Removing $target"
+ $RM -f "$target"
+ fi
+ done
+}
+
+function not_installing {
+ echo "install-gtex.sh: not installing $@"
+}
+
+if ${GENERATE_UNINSTALL}
+then
+ if [ -e "${UNINSTALL_SCRIPT}" ]
+ then
+ echo "${UNINSTALL_SCRIPT} exists."
+ echo "This suggests that some version of GregorioTeX is already installed."
+ if ${AUTO_UNINSTALL}
+ then
+ echo "AUTO_UNINSTALL=true, so uninstalling the old version of GregorioTeX."
+ bash "${UNINSTALL_SCRIPT}"
+ else
+ echo "Re-run this script setting the environment variable AUTO_UNINSTALL=true"
+ echo "to automatically uninstall the other version before installing the new one,"
+ echo "or clean up the old installation files manually."
+ exit 1
+ fi
+ fi
+
+ mkdir -p "${TEXMFROOT}/${UNINSTALL_SCRIPT_DIR}" || die
+ echo '# This script uninstalls GregorioTeX.' > "${UNINSTALL_SCRIPT}"
+ echo '# Run it with "bash /path/to/uninstall-gtex.sh".' >> "${UNINSTALL_SCRIPT}"
+ echo >> "${UNINSTALL_SCRIPT}"
+ echo 'RM=${RM:-rm}' >> "${UNINSTALL_SCRIPT}"
+ echo 'TEXHASH=${TEXHASH:-texhash}' >> "${UNINSTALL_SCRIPT}"
+ echo >> "${UNINSTALL_SCRIPT}"
+ echo 'cd $(dirname ${BASH_SOURCE[0]})/../..' >> "${UNINSTALL_SCRIPT}"
+ echo >> "${UNINSTALL_SCRIPT}"
+elif [ "$arg" != 'tds' ]
+then
+ echo "Not generating "${UNINSTALL_SCRIPT}""
+fi
+
+if ${REMOVE_OLD_FILES}
+then
+ echo "Removing old files."
+ find_and_remove "${LEGACYFILES[@]}"
+fi
+
+declare -A skip_install
+if [ -n "$SKIP" ]
+then
+ IFS=, read -r -a skip <<< "$SKIP"
+ for skipped in "${skip[@]}"
+ do
+ # trim spaces
+ skipped="${skipped#"${skipped%%[![:space:]]*}"}"
+ skipped="${skipped%"${skipped##*[![:space:]]}"}"
+ skip_install[$skipped]=true
+ done
+fi
+
+echo "Installing in '${TEXMFROOT}'."
+${skip_install[tex]:-false} && not_installing tex files ||
+ install_to "tex/${FORMAT}/${NAME}" "${TEXFILES[@]}"
+${skip_install[latex]:-false} && not_installing latex files ||
+ install_to "tex/${LATEXFORMAT}/${NAME}" "${LATEXFILES[@]}"
+${skip_install[fonts]:-false} && not_installing fonts ||
+ install_to "fonts/truetype/public/${NAME}" "${TTFFILES[@]}"
+${skip_install[docs]:-false} && not_installing docs ||
+ install_to "doc/${FORMAT}/${NAME}" "${DOCFILES[@]}"
+${skip_install[examples]:-false} && not_installing examples ||
+ install_to "doc/${FORMAT}/${NAME}/examples" "${EXAMPLEFILES[@]}"
+${skip_install[font-sources]:-false} && not_installing font sources ||
+ install_to "fonts/source/${NAME}" "${FONTSRCFILES[@]}"
+
+if ${GENERATE_UNINSTALL}
+then
+ echo '$RM'" ${UNINSTALL_SCRIPT_DIR}/${UNINSTALL_SCRIPT_FILE}" >> "${UNINSTALL_SCRIPT}"
+ echo "rmdir -p ${UNINSTALL_SCRIPT_DIR} 2> /dev/null || true" >> "${UNINSTALL_SCRIPT}"
+ echo >> "${UNINSTALL_SCRIPT}"
+
+ echo '${TEXHASH}' >> "${UNINSTALL_SCRIPT}"
+fi
+
+if [ "$arg" = 'tds' ]
+then
+ echo "Making TDS-ready archive ${TDS_ZIP}."
+ rm -f ${TDS_ZIP}
+ (rm ${TEXMFROOT}/fonts/source/gregoriotex/gregorio-base.sfd ${TEXMFROOT}/fonts/source/gregoriotex/granapadano-base.sfd ) || die
+ (cd ${TEXMFROOT} && zip -9 ../${TDS_ZIP} -q -r .) || die
+ rm -r ${TEXMFROOT} || die
+else
+ ${TEXHASH} || die
+fi
diff --git a/Build/source/texk/gregorio/gregorio-src/install.sh b/Build/source/texk/gregorio/gregorio-src/install.sh
new file mode 100755
index 00000000000..e7c6e884785
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/install.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+# This script installs Gregorio and GregorioTeX as cloned from GitHub and built
+# using build.sh for a GNU system (like GNU/Linux), using default options.
+#
+# For now, it passes its argument to install-gtex.sh, defaulting to system.
+#
+# If you need something more complex, you probably know more than we do, so run
+# the commands manually.
+
+function die {
+ echo "Failed to $1. Did you forget to run as root?"
+ exit 1
+}
+
+echo "Installing Gregorio"
+make install || die "install Gregorio"
+echo
+
+echo "Installing GregorioTeX"
+./install-gtex.sh "${1:-system}" || die "install GregorioTeX"
+echo
+
+echo "Installation complete."
+
+exit 0
diff --git a/Build/source/texk/gregorio/gregorio-src/m4/ax_check_compile_flag.m4 b/Build/source/texk/gregorio/gregorio-src/m4/ax_check_compile_flag.m4
new file mode 100644
index 00000000000..a7680d72ef8
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/m4/ax_check_compile_flag.m4
@@ -0,0 +1,75 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
+
diff --git a/Build/source/texk/gregorio/gregorio-src/m4/ax_check_link_flag.m4 b/Build/source/texk/gregorio/gregorio-src/m4/ax_check_link_flag.m4
new file mode 100644
index 00000000000..9352950ed58
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/m4/ax_check_link_flag.m4
@@ -0,0 +1,75 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the linker or gives an error.
+# (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_LINK_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $4 $1"
+ AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ LDFLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
+
diff --git a/Build/source/texk/gregorio/gregorio-src/m4/canonicalize.m4 b/Build/source/texk/gregorio/gregorio-src/m4/canonicalize.m4
new file mode 100644
index 00000000000..d8f52830026
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/m4/canonicalize.m4
@@ -0,0 +1,124 @@
+# canonicalize.m4 serial 26
+
+dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Provides canonicalize_file_name and canonicalize_filename_mode, but does
+# not provide or fix realpath.
+AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes) ;;
+ *) REPLACE_CANONICALIZE_FILE_NAME=1 ;;
+ esac
+ fi
+])
+
+# Provides canonicalize_file_name and realpath.
+AC_DEFUN([gl_CANONICALIZE_LGPL],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
+ esac
+ fi
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes)
+ ;;
+ *)
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ REPLACE_REALPATH=1
+ ;;
+ esac
+ fi
+])
+
+# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
+# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ).
+AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
+
+# Check whether realpath works. Assume that if a platform has both
+# realpath and canonicalize_file_name, but the former is broken, then
+# so is the latter.
+AC_DEFUN([gl_FUNC_REALPATH_WORKS],
+[
+ AC_CHECK_FUNCS_ONCE([realpath])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
+ touch conftest.a
+ mkdir conftest.d
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+ ]GL_NOCRASH[
+ #include <stdlib.h>
+ #include <string.h>
+ ]], [[
+ int result = 0;
+ {
+ char *name = realpath ("conftest.a", NULL);
+ if (!(name && *name == '/'))
+ result |= 1;
+ }
+ {
+ char *name = realpath ("conftest.b/../conftest.a", NULL);
+ if (name != NULL)
+ result |= 2;
+ }
+ {
+ char *name = realpath ("conftest.a/", NULL);
+ if (name != NULL)
+ result |= 4;
+ }
+ {
+ char *name1 = realpath (".", NULL);
+ char *name2 = realpath ("conftest.d//./..", NULL);
+ if (strcmp (name1, name2) != 0)
+ result |= 8;
+ }
+ return result;
+ ]])
+ ],
+ [gl_cv_func_realpath_works=yes],
+ [gl_cv_func_realpath_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_realpath_works="guessing no" ;;
+ esac
+ ])
+ rm -rf conftest.a conftest.d
+ ])
+ case "$gl_cv_func_realpath_works" in
+ *yes)
+ AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+ can malloc memory, always gives an absolute path, and handles
+ trailing slash correctly.])
+ ;;
+ esac
+])
diff --git a/Build/source/texk/gregorio/gregorio-src/m4/nocrash.m4 b/Build/source/texk/gregorio/gregorio-src/m4/nocrash.m4
new file mode 100644
index 00000000000..ecc55c6172d
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/m4/nocrash.m4
@@ -0,0 +1,130 @@
+# nocrash.m4 serial 4
+dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
+
+AC_PREREQ([2.13])
+
+dnl Expands to some code for use in .c programs that will cause the configure
+dnl test to exit instead of crashing. This is useful to avoid triggering
+dnl action from a background debugger and to avoid core dumps.
+dnl Usage: ...
+dnl ]GL_NOCRASH[
+dnl ...
+dnl int main() { nocrash_init(); ... }
+AC_DEFUN([GL_NOCRASH],[[
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on Mac OS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Avoid a crash on native Windows. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winerror.h>
+static LONG WINAPI
+exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
+{
+ switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION:
+ case EXCEPTION_IN_PAGE_ERROR:
+ case EXCEPTION_STACK_OVERFLOW:
+ case EXCEPTION_GUARD_PAGE:
+ case EXCEPTION_PRIV_INSTRUCTION:
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+ exit (1);
+ }
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+static void
+nocrash_init (void)
+{
+ SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+]])
diff --git a/Build/source/texk/gregorio/gregorio-src/m4/pkg.m4 b/Build/source/texk/gregorio/gregorio-src/m4/pkg.m4
new file mode 100644
index 00000000000..75a89ecfe73
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/m4/pkg.m4
@@ -0,0 +1,287 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+# [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
+# [DESCRIPTION], [DEFAULT])
+#
+# Prepare a "--with-" configure option using the lowercase [VARIABLE-PREFIX]
+# name, merging the behaviour of AC_ARG_WITH and PKG_CHECK_MODULES in a single
+# macro
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_WITH_MODULES],
+[
+m4_pushdef([with_arg], m4_tolower([$1]))
+
+m4_pushdef([description],
+ [m4_default([$5], [build with ]with_arg[ support])])
+
+m4_pushdef([def_arg], [m4_default([$6], [auto])])
+m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
+m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
+
+m4_case(def_arg,
+ [yes],[m4_pushdef([with_without], [--without-]with_arg)],
+ [m4_pushdef([with_without],[--with-]with_arg)])
+
+AC_ARG_WITH(with_arg,
+ AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
+ [AS_TR_SH([with_]with_arg)=def_arg])
+
+AS_CASE([$AS_TR_SH([with_]with_arg)],
+ [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
+ [auto],[PKG_CHECK_MODULES([$1],[$2],
+ [m4_n([def_action_if_found]) $3],
+ [m4_n([def_action_if_not_found]) $4])])
+
+m4_popdef([with_arg])
+m4_popdef([description])
+m4_popdef([def_arg])
+
+]) dnl PKG_WITH_MODULES
+
+# PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+# [DESCRIPTION], [DEFAULT])
+#
+# Convenience macro to trigger AM_CONDITIONAL after
+# PKG_WITH_MODULES check.
+#
+# HAVE_[VARIABLE-PREFIX] is exported as make variable.
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_HAVE_WITH_MODULES],
+[
+PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
+
+AM_CONDITIONAL([HAVE_][$1],
+ [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
+])
+
+# PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+# [DESCRIPTION], [DEFAULT])
+#
+# Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
+# PKG_WITH_MODULES check.
+#
+# HAVE_[VARIABLE-PREFIX] is exported as make and preprocessor variable.
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
+[
+PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
+
+AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
+ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
+])
diff --git a/Build/source/texk/gregorio/gregorio-src/src/Makefile.am b/Build/source/texk/gregorio/gregorio-src/src/Makefile.am
new file mode 100644
index 00000000000..9728a64c205
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/Makefile.am
@@ -0,0 +1,142 @@
+# Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+#
+# This file is part of Gregorio.
+#
+# Gregorio is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Gregorio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/gabc -I$(top_srcdir)/src/dump -I$(top_srcdir)/src/gregoriotex
+AM_CFLAGS = $(KPSE_CFLAGS)
+LDADD = $(KPSE_LIBS)
+
+bin_PROGRAMS = gregorio$(GREGORIO_EXE_SUFFIX)
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES = \
+ gregorio-utils.c characters.c characters.h messages.c messages.h struct.c \
+ struct.h struct_iter.h enum_generator.h unicode.c unicode.h sha1.c sha1.h \
+ support.c support.h config.h bool.h plugins.h utf8strings.h dump/dump.c \
+ gregoriotex/gregoriotex-write.c gregoriotex/gregoriotex-position.c \
+ gregoriotex/gregoriotex.h
+
+@MK@ifneq ($(wildcard ../.git),)
+@MK@ _tag_ = $(shell git describe --exact-match HEAD 2>/dev/null)
+@MK@ ifeq ($(_tag_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)-$(shell git rev-list HEAD --count)"'
+@MK@ endif
+@MK@else
+@MK@ ifneq ($(wildcard ../.hg/git),)
+@MK@ _gitnode_ = $(shell hg log --template='{gitnode}' -r .)
+@MK@ ifeq ($(_gitnode_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell hg log --template='{activebookmark}-hg:{manifest}' -r .)"'
+@MK@ else
+@MK@ _tag_ = $(shell git --git-dir=../.hg/git describe --exact-match '$(_gitnode_)' 2>/dev/null)
+@MK@ ifeq ($(_tag_),)
+@MK@ DEFS += -DBRANCH_VERSION='"$(shell hg log --template='{activebookmark}' -r .)-$(shell git --git-dir=../.hg/git rev-parse --short '$(_gitnode_)')-$(shell git --git-dir=../.hg/git rev-list '$(_gitnode_)' --count)"'
+@MK@ endif
+@MK@ endif
+@MK@ endif
+@MK@endif
+
+# gabc files
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES += \
+ gabc/gabc-elements-determination.c gabc/gabc-write.c \
+ gabc/gabc-glyphs-determination.c gabc/gabc.h \
+ gabc/gabc-score-determination.h gabc/gabc-score-determination.c \
+ gabc/gabc-score-determination-y.h gabc/gabc-score-determination-y.c \
+ gabc/gabc-score-determination-l.h gabc/gabc-score-determination-l.c \
+ gabc/gabc-notes-determination-l.c vowel/vowel.h vowel/vowel.c \
+ vowel/vowel-rules.h vowel/vowel-rules-l.h vowel/vowel-rules-l.c \
+ vowel/vowel-rules-y.h vowel/vowel-rules-y.c
+
+EXTRA_DIST = encode_utf8strings.c utf8strings.h.in utf8strings.h \
+ gabc/gabc-notes-determination.l gabc/gabc-notes-determination-l.c \
+ gabc/gabc-score-determination.h gabc/gabc-score-determination.y \
+ gabc/gabc-score-determination-y.h \
+ gabc/gabc-score-determination-y.c gabc/gabc-score-determination.l \
+ gabc/gabc-score-determination-l.h \
+ gabc/gabc-score-determination-l.c vowel/vowel-rules.l \
+ vowel/vowel-rules-l.h vowel/vowel-rules-l.c vowel/vowel-rules.y \
+ vowel/vowel-rules-y.h vowel/vowel-rules-y.c
+
+if HAVE_RC
+# Windows resources (see windows/README.md)
+gregorio-resources.o: ../windows/gregorio-resources.rc ../windows/gregorio.ico
+ $(RC) $(RCFLAGS) $< -o $@
+
+gregorio__GREGORIO_EXE_SUFFIX__SOURCES += ../windows/gregorio-resources.rc ../windows/gregorio.ico
+LDADD += gregorio-resources.o
+endif
+
+gabc/gabc-score-determination-y.c: gabc/gabc-score-determination.y
+ $(YACC) -v -d -p "gabc_score_determination_" -o $@ $<
+gabc/gabc-score-determination-y.h: gabc/gabc-score-determination-y.c
+ ## Recover from the removal of gabc/gabc-score-determination-y.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f gabc/gabc-score-determination-y.c; \
+ $(MAKE) $(AM_MAKEFLAGS) gabc/gabc-score-determination-y.c; \
+ fi
+
+gabc/gabc-score-determination-l.c: gabc/gabc-score-determination.l
+ $(LEX) -o $@ --header-file=gabc/gabc-score-determination-l.h $<
+gabc/gabc-score-determination-l.h: gabc/gabc-score-determination-l.c
+ ## Recover from the removal of gabc/gabc-score-determination-l.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f gabc/gabc-score-determination-l.c; \
+ $(MAKE) $(AM_MAKEFLAGS) gabc/gabc-score-determination-l.c; \
+ fi
+
+gabc/gabc-notes-determination-l.c: gabc/gabc-notes-determination.l
+ $(LEX) -o $@ $<
+
+vowel/vowel-rules-y.c: vowel/vowel-rules.y
+ $(YACC) -v -d -o $@ $<
+vowel/vowel-rules-y.h: vowel/vowel-rules-y.c
+ ## Recover from the removal of vowel/vowel-rules-y.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f vowel/vowel-rules-y.c; \
+ $(MAKE) $(AM_MAKEFLAGS) vowel/vowel-rules-y.c; \
+ fi
+
+vowel/vowel-rules-l.c: vowel/vowel-rules.l
+ $(LEX) -o $@ --header-file=vowel/vowel-rules-l.h $<
+vowel/vowel-rules-l.h: vowel/vowel-rules-l.c
+ ## Recover from the removal of vowel/vowel-rules-l.h, see
+ ## https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
+ @if test -f $@; then :; else \
+ rm -f vowel/vowel-rules-l.c; \
+ $(MAKE) $(AM_MAKEFLAGS) vowel/vowel-rules-l.c; \
+ fi
+
+utf8strings.h: utf8strings.h.in
+ $(MAKE) $(AM_MAKEFLAGS) encode_utf8strings${EXEEXT}
+ ./encode_utf8strings${EXEEXT} $< $@
+
+encode_utf8strings${EXEEXT}: encode_utf8strings.c
+ $(CC) -o $@ $<
+
+clean-local:
+ find . -name '*.gcno' -print | xargs rm -f --
+ find . -name '*.gcda' -print | xargs rm -f --
+
+BUILT_SOURCES = utf8strings.h gabc/gabc-notes-determination-l.c \
+ gabc/gabc-score-determination-l.c \
+ gabc/gabc-score-determination-l.h \
+ gabc/gabc-score-determination-y.c \
+ gabc/gabc-score-determination-y.h vowel/vowel-rules-l.c \
+ vowel/vowel-rules-l.h vowel/vowel-rules-y.c \
+ vowel/vowel-rules-y.h
+
+CLEANFILES = encode_utf8strings${EXEEXT}
+MAINTAINERCLEANFILES = $(BUILT_SOURCES)
diff --git a/Build/source/texk/gregorio/gregorio-src/src/bool.h b/Build/source/texk/gregorio/gregorio-src/src/bool.h
new file mode 100644
index 00000000000..8857fde759f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/bool.h
@@ -0,0 +1,30 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header provides a minimum of C11-like bool functionality.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BOOL_H
+#define BOOL_H
+
+typedef unsigned int bool;
+#define true 1
+#define false 0
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/characters.c b/Build/source/texk/gregorio/gregorio-src/src/characters.c
new file mode 100644
index 00000000000..6caa92677fb
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/characters.c
@@ -0,0 +1,1329 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file contains functions that deal with lyrics and styles.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * @brief This file contains almost all the gregorio_character manipulation things.
+ *
+ * @warning The code is very spaghetti, but I don't really think I can do it another way with the chosen representation of styles, and the fact that everything must be xml-compliant and tex-compliant...
+ * So this file is basically very hard to maintain. Moreover, it has not been very well coded, so it is even harder to maintain...
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "characters.h"
+#include "messages.h"
+#include "support.h"
+#include "utf8strings.h"
+#include "vowel/vowel.h"
+
+#define VOWEL_FILE "gregorio-vowels.dat"
+
+static bool read_vowel_rules(char *const lang) {
+ char *language = lang;
+ rulefile_parse_status status = RFPS_NOT_FOUND;
+ char **filenames, *filename, **p;
+ const char *description;
+ int tries;
+
+ gregorio_kpse_find_or_else(filenames, VOWEL_FILE, return false);
+
+ gregorio_vowel_tables_init();
+ /* only need to try twice; if it's not resolved by then, there is an alias
+ * loop */
+ for (tries = 0; tries < 2; ++tries) {
+ for (p = filenames; status != RFPS_FOUND && (filename = *p); ++p) {
+ /* read and parse the file */
+ gregorio_messagef("read_rules", VERBOSITY_INFO, 0,
+ _("Looking for %s in %s"), language, filename);
+ gregorio_vowel_tables_load(filename, &language, &status);
+ switch (status) {
+ case RFPS_FOUND:
+ description = "Found";
+ break;
+ case RFPS_ALIASED:
+ description = "Aliased to";
+ break;
+ default:
+ description = "Could not find";
+ break;
+ }
+ gregorio_messagef("read_rules", VERBOSITY_INFO, 0, _("%s %s in %s"),
+ description, language, filename);
+ }
+ if (status != RFPS_ALIASED) {
+ /* if it's not aliased, there's no reason to scan again */
+ break;
+ }
+ }
+ if (status == RFPS_ALIASED) {
+ gregorio_messagef("read_rules", VERBOSITY_WARNING, 0,
+ _("Unable to resolve alias for %s"), lang);
+ }
+
+ /* free the allocated memory */
+ for (p = filenames; *p; ++p) {
+ free(*p);
+ }
+ free(filenames);
+ if (language != lang) {
+ free(language);
+ }
+
+ return status == RFPS_FOUND;
+}
+
+void gregorio_set_centering_language(char *const language)
+{
+ if (!read_vowel_rules(language)) {
+ if (strcmp(language, "Latin") != 0 && strcmp(language, "latin") != 0 && strcmp(language, "la") != 0 && strcmp(language, "lat") != 0) {
+ gregorio_messagef("gregorio_set_centering_language",
+ VERBOSITY_WARNING, 0, _("unable to read vowel files for "
+ "%s; defaulting to Latin rules"), language);
+ }
+
+ gregorio_vowel_tables_init();
+ gregorio_vowel_table_add(DEFAULT_VOWELS);
+ gregorio_prefix_table_add("i");
+ gregorio_prefix_table_add("I");
+ gregorio_prefix_table_add("u");
+ gregorio_prefix_table_add("U");
+ }
+}
+
+static __inline const gregorio_character *skip_verbatim_or_special(
+ const gregorio_character *ch)
+{
+ /* skip past verbatim and special characters */
+ if (ch->cos.s.type == ST_T_BEGIN && (ch->cos.s.style == ST_VERBATIM
+ || ch->cos.s.style == ST_SPECIAL_CHAR)) {
+ if (ch->next_character) {
+ ch = ch->next_character;
+ }
+ while (ch->next_character && ch->is_character) {
+ ch = ch->next_character;
+ }
+ }
+ return ch;
+}
+
+static __inline bool handle_elision(const gregorio_character *const ch,
+ bool *in_elision)
+{
+ if (ch->cos.s.style != ST_ELISION) {
+ return false;
+ }
+
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ *in_elision = true;
+ break;
+
+ case ST_T_END:
+ *in_elision = false;
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ }
+ return true;
+}
+
+static __inline int for_each_centerable_character(
+ const gregorio_character *const character,
+ void (*capture)(grewchar *, int, grewchar), grewchar *buffer)
+{
+ int count;
+ const gregorio_character *ch;
+ bool in_elision = false;
+
+ for (count = 0, ch = character; ch; ch = ch->next_character) {
+ if (ch->is_character) {
+ if (!in_elision) {
+ if (capture) {
+ capture(buffer, count, ch->cos.character);
+ }
+ ++count;
+ }
+ } else {
+ if (ch->cos.s.style == ST_PROTRUSION_FACTOR) {
+ /* if there is a protrusion, we will always encounter the
+ * protrusion factor first */
+ break;
+ }
+ if (ch->cos.s.type == ST_T_BEGIN && ch->cos.s.style == ST_ELISION) {
+ /* put in a special character at the beginning of an elision
+ * that represents the elision */
+ if (capture) {
+ capture(buffer, count, GREVOWEL_ELISION_MARK);
+ }
+ ++count;
+ }
+ if (!handle_elision(ch, &in_elision)) {
+ ch = skip_verbatim_or_special(ch);
+ }
+ }
+ }
+ return count;
+}
+
+/* this function assumes subject is sized correctly */
+static void capture_subject(grewchar *const subject, const int count,
+ const grewchar character)
+{
+ subject[count] = character;
+}
+
+static void determine_center(gregorio_character *character, int *start,
+ int *end)
+{
+ const int count = for_each_centerable_character(character, NULL, NULL);
+ grewchar *subject;
+
+ if (count == 0) {
+ return;
+ }
+
+ subject = (grewchar *)gregorio_malloc((count + 1) * sizeof(grewchar));
+ for_each_centerable_character(character, capture_subject, subject);
+ subject[count] = (grewchar)0;
+
+ *start = *end = -1;
+ gregorio_find_vowel_group(subject, start, end);
+
+ free(subject);
+}
+
+static bool go_to_end_initial(gregorio_character **param_character)
+{
+ bool has_initial = false;
+ gregorio_character *current_character = *param_character;
+ if (!current_character) {
+ return false;
+ }
+ gregorio_go_to_first_character_c(&current_character);
+ /* skip past any initial */
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_BEGIN
+ && current_character->cos.s.style == ST_INITIAL) {
+ has_initial = true;
+ while (current_character) {
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == ST_INITIAL) {
+ break;
+ }
+ current_character = current_character->next_character;
+ }
+ }
+ (*param_character) = current_character;
+ return has_initial;
+}
+
+/*
+ * The push function pushes a style in the stack, and updates first_style to
+ * this element.
+ */
+
+static void style_push(det_style **current_style, grestyle_style style)
+{
+ det_style *element;
+ gregorio_assert(current_style, style_push, "current_style may not be NULL",
+ return);
+ element = (det_style *) gregorio_malloc(sizeof(det_style));
+ element->style = style;
+ element->previous_style = NULL;
+ element->next_style = (*current_style);
+ if (*current_style) {
+ (*current_style)->previous_style = element;
+ }
+ (*current_style) = element;
+}
+
+/*
+ * Pop deletes an style in the stack (the style to delete is the parameter)
+ */
+
+static void style_pop(det_style **first_style, det_style *element)
+{
+ gregorio_assert(element && first_style && *first_style, style_pop,
+ "invalid arguments", return);
+ if (element->previous_style) {
+ assert(*first_style != element);
+ element->previous_style->next_style = element->next_style;
+ if (element->next_style) {
+ element->next_style->previous_style = element->previous_style;
+ }
+ } else {
+ if (element->next_style) {
+ element->next_style->previous_style = NULL;
+ (*first_style) = element->next_style;
+ } else {
+ (*first_style) = NULL;
+ }
+ }
+ free(element);
+}
+
+/*
+ * free_styles just frees the stack.
+ */
+
+static void free_styles(det_style **first_style)
+{
+ det_style *current_style;
+ gregorio_not_null(first_style, free_styles, return);
+ current_style = (*first_style);
+ while (current_style) {
+ current_style = current_style->next_style;
+ free((*first_style));
+ (*first_style) = current_style;
+ }
+}
+
+
+/*
+ * inline function that will be used for verbatim and special-characters in the
+ *
+ * next function, it calls function with a grewchar * which is the verbatim or
+ * special-character. It places current_character to the character next to the
+ * end of the verbatim or special_char charachters.
+ */
+static __inline void verb_or_sp(const gregorio_character **ptr_character,
+ const grestyle_style style, FILE *const f,
+ void (*const function) (FILE *, const grewchar *))
+{
+ int i, j;
+ grewchar *text;
+ const gregorio_character *current_character;
+ const gregorio_character *begin_character;
+
+ i = 0;
+ j = 0;
+
+ current_character = (*ptr_character)->next_character;
+ begin_character = current_character;
+ while (current_character) {
+ if (current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == style) {
+ break;
+ } else {
+ if (current_character->is_character) {
+ i++;
+ }
+ current_character = current_character->next_character;
+ }
+ }
+ if (i == 0) {
+ *ptr_character = current_character;
+ return;
+ }
+ text = (grewchar *) gregorio_malloc((i + 1) * sizeof(grewchar));
+ current_character = begin_character;
+ while (j < i) {
+ if (current_character->is_character) {
+ text[j] = current_character->cos.character;
+ j++;
+ }
+ current_character = current_character->next_character;
+ }
+ text[i] = 0;
+ function(f, text);
+ free(text);
+
+ *ptr_character = current_character;
+}
+
+/**
+ * This function is made to simplify the output modules : they just have to
+ * declare some simple functions (what to do when meeting a beginning of style,
+ * a character, etc.) and to call this function with pointer to these
+ * functions, and that will automatically write the good ouput. This function
+ * does not test at all the gregorio_character list, if it is wrong, then the
+ * ouput will be wrong. It is very simple to understand, even if it is a bit
+ * long.
+ *
+ * @warning The difficulty comes when we have to write the first syllable text,
+ * without the first letter.
+ * The behaviour can have some bugs in this case if the first syllable has some
+ * complex styles. It would be a bit stupid to do such a thing, but users are
+ * usually very creative when it comes to inventing twisted things...
+ */
+void gregorio_write_text(const gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *const f,
+ void (*const printverb) (FILE *, const grewchar *),
+ void (*const printchar) (FILE *, grewchar),
+ void (*const begin) (FILE *, grestyle_style),
+ void (*const end) (FILE *, grestyle_style),
+ void (*const printspchar) (FILE *, const grewchar *))
+{
+ gregorio_assert(current_character, gregorio_write_text,
+ "current_character may not be NULL", return);
+ while (current_character) {
+ if (current_character->is_character) {
+ printchar(f, current_character->cos.character);
+ } else {
+ if (current_character->cos.s.type == ST_T_BEGIN) {
+ switch (current_character->cos.s.style) {
+ case ST_VERBATIM:
+ verb_or_sp(&current_character, ST_VERBATIM, f, printverb);
+ break;
+ case ST_SPECIAL_CHAR:
+ verb_or_sp(&current_character, ST_SPECIAL_CHAR, f,
+ printspchar);
+ break;
+ case ST_INITIAL:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ while (current_character) {
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style ==
+ ST_INITIAL) {
+ break;
+ }
+ current_character =
+ current_character->next_character;
+ }
+ } else {
+ begin(f, ST_INITIAL);
+ }
+ break;
+ default:
+ begin(f, current_character->cos.s.style);
+ break;
+ }
+ } else { /* ST_T_END */
+ end(f, current_character->cos.s.style);
+ }
+ }
+
+ if (current_character) {
+ current_character = current_character->next_character;
+ }
+ }
+}
+
+void gregorio_write_first_letter_alignment_text(
+ const gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *const f,
+ void (*const printverb) (FILE *, const grewchar *),
+ void (*const printchar) (FILE *, grewchar),
+ void (*const begin) (FILE *, grestyle_style),
+ void (*const end) (FILE *, grestyle_style),
+ void (*const printspchar) (FILE *, const grewchar *))
+{
+ /* stack of styles to close and reopen */
+ det_style *first_style = NULL;
+ det_style *last_style = NULL;
+ int first_letter_open = (phase == WTP_FIRST_SYLLABLE)? 2 : 1;
+
+ gregorio_assert(current_character,
+ gregorio_write_first_letter_alignment_text,
+ "current_character may not be NULL", return);
+
+ /* go to the first character */
+ gregorio_go_to_first_character(&current_character);
+
+ if (phase != WTP_FIRST_SYLLABLE) {
+ begin(f, ST_SYLLABLE_INITIAL);
+ }
+
+ /* loop until there are no characters left */
+ for (; current_character;
+ current_character = current_character->next_character) {
+ bool close_first_letter = false;
+ /* found a real character */
+ if (current_character->is_character) {
+ printchar(f, current_character->cos.character);
+ close_first_letter = first_letter_open != 0;
+ } else switch (current_character->cos.s.type) {
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ case ST_T_BEGIN:
+ /* handle styles */
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ case ST_INITIAL:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ /* ignore */
+ break;
+ case ST_VERBATIM:
+ verb_or_sp(&current_character, ST_VERBATIM, f, printverb);
+ close_first_letter = first_letter_open != 0;
+ break;
+ case ST_SPECIAL_CHAR:
+ verb_or_sp(&current_character, ST_SPECIAL_CHAR, f, printspchar);
+ close_first_letter = first_letter_open != 0;
+ break;
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ break;
+ } /* else fall through */
+ default:
+ /* push the style onto the stack */
+ style_push(&first_style, current_character->cos.s.style);
+ begin(f, current_character->cos.s.style);
+ }
+ break;
+ case ST_T_END:
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ /* ignore */
+ break;
+ case ST_INITIAL:
+ /* in the case where the initial is closed before the first
+ * letter */
+ close_first_letter = first_letter_open > 1;
+ break;
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* not reachable unless there's a programming error */
+ assert(false); /* LCOV_EXCL_LINE */
+ break;
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ if (phase == WTP_FIRST_SYLLABLE) {
+ break;
+ } /* else fall through */
+ default:
+ /* pop the style from the stack */
+ assert(first_style);
+ assert(first_style->style
+ == current_character->cos.s.style);
+ style_pop(&first_style, first_style);
+ end(f, current_character->cos.s.style);
+ }
+ break;
+ }
+
+ while (close_first_letter || (!current_character->next_character
+ && first_letter_open > 0)) {
+ close_first_letter = false;
+ --first_letter_open;
+
+ /* close all the styles in the stack */
+ if (first_style) {
+ det_style *current_style;
+ /* these are immediately closed, so go past them */
+ while (first_style && current_character
+ && current_character->next_character
+ && !current_character->next_character->is_character
+ && current_character->next_character->cos.s.type
+ == ST_T_END
+ && current_character->next_character->cos.s.style
+ == first_style->style) {
+ current_character = current_character->next_character;
+ style_pop(&first_style, first_style);
+ end(f, current_character->cos.s.style);
+ }
+ for (current_style = first_style; current_style;
+ current_style = current_style->next_style) {
+ end(f, current_style->style);
+ last_style = current_style;
+ }
+ }
+
+ end(f, ST_SYLLABLE_INITIAL);
+
+ /* reopen all styles */
+ for (; last_style; last_style = last_style->previous_style) {
+ begin(f, last_style->style);
+ }
+ }
+ }
+
+ if (phase == WTP_FIRST_SYLLABLE) {
+ /* the only way this can happen is if the first syllable is empty,
+ * but if the first syllable is empty, this function will not be
+ * called */
+ gregorio_assert_only(!first_letter_open,
+ gregorio_write_first_letter_alignment_text,
+ "first_syllable was not closed properly");
+ }
+
+ free_styles(&first_style);
+}
+
+/*
+ * Here starts the code of the handling of text and styles.
+ *
+ * This part is not the easiest, in fact is is the most complicated. The reason
+ * is that I want to make something coherent in memory (easy to interprete),
+ * and to let the user type whatever he wants. This part was originally written
+ * for gabc, that's why it's always talking about it. But it could as well be
+ * used by other read plugins, to put things in order.
+ *
+ * Basically all the following lines of code are made for the last function,
+ * that will take a "user-written" gregorio_character list into a xml-compliant
+ * and tex-compliant list. It's more complicated than it seems...
+ *
+ * Functionalities: For example if the user types tt<i>ttt<b>ttt</i>tt I want
+ * it to be represented as tt<i>ttt<b>ttt</b></i><b>tt</b>. The fabulous thing
+ * is that it is xml-compliant. This part also determines the middle, for
+ * example pot will be interpreted as p{o}t. When I did that I also thought
+ * about TeX styles that needed things like {p}{o}{t}, so when the user types
+ * <i>pot</i>, it is interpreted as <i>p</i>{<i>o</i>}<i>t</i>.
+ *
+ * Internal structure: To do so we have a structure, det_style, that will help
+ * us : it is a stack (double chained list) of the styles that we have seen
+ * until now. When we encounter a <i>, we push the i style on the stack. If we
+ * encounter a </i> we suppress the i style from the stack. Let's take a more
+ * complex example: if we encounter <i><b></i>, the stack will be first null,
+ * then i then bi, and there we want to end i, but it is not the first style of
+ * the stack, so we close all the styles that we encounter before we encounter
+ * i (remember, this is for xml-compliance), so we insert a </b> before the
+ * </i>. But that's not all, we also write a <b> after the </i>, so that the b
+ * style continues. There our stack is just b. For center, we just close all
+ * the styles in the stack, insert a { and reopen all the styles in the stack.
+ *
+ * The structure used for character, styles, etc. is described in
+ * include/struct.h
+ *
+ * The functionment in this file is quite simple : we add all the characters
+ * that we see, even if they are incoherent, in the gregorio_character list,
+ * and then we call a very complex function that will build a stack of the
+ * style, determine the middle, make all xml-compliant, mow the lawn, etc.
+ *
+ * This code is *really* spaghetti, but I think it's a necessary pain.
+ *
+ */
+
+/*
+ *
+ * This function inserts a style before current_character, updating the double
+ * chained list.
+ *
+ */
+
+static void insert_style_before(unsigned char type,
+ unsigned char style, gregorio_character *current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = type;
+ element->cos.s.style = style;
+ element->next_character = current_character;
+ if (current_character->previous_character) {
+ current_character->previous_character->next_character = element;
+ }
+ element->previous_character = current_character->previous_character;
+ current_character->previous_character = element;
+}
+
+/*
+ *
+ * This function puts a style after current_character, and updates
+ * current_character to the gregorio_character it created. It updates the
+ * double chained list. It does not touche to the det_styles list.
+ *
+ */
+
+static void insert_style_after(unsigned char type, unsigned char style,
+ gregorio_character **current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = type;
+ element->cos.s.style = style;
+ element->next_character = (*current_character)->next_character;
+ if ((*current_character)->next_character) {
+ (*current_character)->next_character->previous_character = element;
+ }
+ element->previous_character = (*current_character);
+ (*current_character)->next_character = element;
+ (*current_character) = element;
+}
+
+#if 0
+static void insert_char_after(grewchar c,
+ gregorio_character **current_character)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_malloc(sizeof(gregorio_character));
+ element->is_character = 1;
+ element->cos.character = c;
+ element->next_character = (*current_character)->next_character;
+ if ((*current_character)->next_character) {
+ (*current_character)->next_character->previous_character = element;
+ }
+ element->previous_character = (*current_character);
+ (*current_character)->next_character = element;
+ (*current_character) = element;
+}
+#endif
+
+/*
+ *
+ * This function suppresses the character, updates the double chained
+ * list, and returns the character after, if there is one.
+ *
+ */
+
+static __inline gregorio_character *suppress_character(
+ gregorio_character *current_character)
+{
+ if (current_character) {
+ gregorio_character *thischaracter = current_character;
+ if (current_character->previous_character) {
+ current_character->previous_character->next_character =
+ current_character->next_character;
+ }
+ if (current_character->next_character) {
+ current_character->next_character->previous_character =
+ current_character->previous_character;
+ }
+ current_character = current_character->next_character;
+ free(thischaracter);
+ }
+ return current_character;
+}
+
+/*
+ *
+ * Then start the inline functions for the big function. the first one is the
+ * function we call when we close a style. The magic thing is that is will
+ * prevent things like a<i></i>{<i>b</b>: when the user types a<i>b</i>, if the
+ * middle is between a and b (...), it will interpret it as a{<i>b</i>.
+ *
+ */
+
+static __inline void close_style(gregorio_character *current_character,
+ det_style *current_style)
+{
+ /* we suppose that there is a previous_character, because there is a
+ * current_style
+ */
+ gregorio_assert(current_character && current_character->previous_character,
+ close_syllable, "have a style but no previous character", return);
+ if (!current_character->previous_character->is_character
+ && current_character->previous_character->cos.s.style ==
+ current_style->style) {
+ /* we do it this way rather than calling suppress_character on the
+ * previous character because the intent is more obvious to both the
+ * human reading it and to the clang static analyzer */
+ gregorio_character *tofree = current_character->previous_character;
+ if (tofree->previous_character) {
+ tofree->previous_character->next_character = current_character;
+ }
+ current_character->previous_character = tofree->previous_character;
+ free(tofree);
+ } else {
+ insert_style_before(ST_T_END, current_style->style, current_character);
+ }
+}
+
+/*
+ *
+ * next the function called when we have determined that we must end the center
+ * here : it closes all styles, adds a } and then reopens all styles.
+ *
+ */
+
+/* type is ST_CENTER or ST_FORCED_CENTER */
+static __inline void end_center(grestyle_style type,
+ gregorio_character *current_character, det_style **ptr_style)
+{
+ det_style *current_style;
+ current_style = *ptr_style;
+
+ while (current_style) {
+ close_style(current_character, current_style);
+ if (current_style->next_style) {
+ current_style = current_style->next_style;
+ } else {
+ break;
+ }
+ }
+ insert_style_before(ST_T_END, type, current_character);
+ while (current_style) {
+ insert_style_before(ST_T_BEGIN, current_style->style,
+ current_character);
+ if (current_style->previous_style) {
+ current_style = current_style->previous_style;
+ } else {
+ break;
+ }
+ }
+
+ *ptr_style = current_style;
+}
+
+/*
+ * about the same, but adding a {
+ */
+
+static __inline void begin_center(grestyle_style type,
+ gregorio_character *current_character, det_style **ptr_style)
+{
+ det_style *current_style;
+ current_style = *ptr_style;
+
+ while (current_style) {
+ close_style(current_character, current_style);
+ if (current_style->next_style) {
+ current_style = current_style->next_style;
+ } else {
+ break;
+ }
+ }
+ insert_style_before(ST_T_BEGIN, type, current_character);
+ while (current_style) {
+ insert_style_before(ST_T_BEGIN, current_style->style,
+ current_character);
+ if (current_style->previous_style) {
+ current_style = current_style->previous_style;
+ } else {
+ break;
+ }
+ }
+
+ *ptr_style = current_style;
+}
+
+/*
+ * THE big function. Very long, using a lot of long macros, etc. I hope you
+ * really want to understand it, 'cause it won't be easy.
+ *
+ * current character is a pointer to a gregorio_character. The
+ * gregorio_character double-chained list it is in will be totally reorganized
+ * so that it is xml compliant, and the function will update it to the first
+ * character of this brand new list.
+ *
+ * center_is_determined has the values present in characters.h.
+ *
+ * Another difficulty is the fact that we must consider characters in verbatim
+ * and special character styles like only one block, we can't say the center is
+ * in the middle of a verbatim block.
+ */
+
+void gregorio_rebuild_characters(gregorio_character **const param_character,
+ gregorio_center_determination center_is_determined, bool skip_initial)
+{
+ /* the current_character */
+ gregorio_character *current_character = *param_character;
+ gregorio_character *sentinel;
+ det_style *first_style = NULL;
+ /* determining the type of centering (forced or not) */
+ grestyle_style center_type = ST_NO_STYLE;
+ int start = -1, end = -1, index = -1;
+ bool in_elision = false;
+ det_style *current_style;
+ /* so, here we start: we go to the first_character */
+ if (skip_initial && go_to_end_initial(&current_character)) {
+ if (!current_character->next_character) {
+ /* nothing else to rebuild, but the initial needs to be ST_CENTER */
+ insert_style_after(ST_T_END, ST_CENTER, &current_character);
+ gregorio_go_to_first_character_c(&current_character);
+ insert_style_before(ST_T_BEGIN, ST_CENTER, current_character);
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+ return;
+ }
+ /* move to the character after the initial */
+ current_character = current_character->next_character;
+ } else {
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ }
+ /* first we see if there is already a center determined */
+ if (center_is_determined == 0) {
+ center_type = ST_CENTER;
+ determine_center(current_character, &start, &end);
+ } else {
+ center_type = ST_FORCED_CENTER;
+ }
+ if (!current_character) {
+ return;
+ }
+ for (sentinel = current_character; sentinel->next_character;
+ sentinel = sentinel->next_character) {
+ /* just loop to get the last character */
+ }
+ /* put a sentinel at the end to aid in looping */
+ insert_style_after(ST_T_NOTHING, ST_SENTINEL, &sentinel);
+ /* we loop until there isn't any character */
+ while (current_character && current_character != sentinel) {
+ /* IMPORTANT: A continue inside this loop MUST put current_character on
+ * the next character to process */
+
+ /* the first part of the function deals with real characters (not
+ * styles) */
+ if (current_character->is_character) {
+ if (!in_elision) {
+ ++index;
+ if (!center_is_determined && index == start) {
+ /* the firstcase is if the user hasn't determined the
+ * middle, and we have only seen vowels so far (else
+ * center_is_determined would be DETERMINING_MIDDLE). The
+ * current_character is the first vowel, so we start the
+ * center here. */
+ begin_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_DETERMINING_MIDDLE;
+ } else if (center_is_determined == CENTER_DETERMINING_MIDDLE
+ && index == end) {
+ /* the case where the user has not determined the middle
+ * and we are in the middle section of the syllable, but
+ * there we encounter something that is not a vowel, so the
+ * center ends there. */
+ end_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } /* else it is just a normal character... we simply pass. */
+ }
+ } else {
+ const grestyle_style style = current_character->cos.s.style;
+ /* there starts the second part of the function that deals with the
+ * styles characters */
+ switch (current_character->cos.s.type) {
+ case ST_T_BEGIN:
+ /* the beginning of a style */
+
+ if (center_is_determined == CENTER_DETERMINING_MIDDLE
+ && index == end - 1) {
+ /* if we are determining the end of the center and we have
+ * a, ELISION, VERBATIM or SPECIAL_CHAR style, we end the
+ * center determination */
+ switch (style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ case ST_ELISION:
+ end_center(center_type, current_character, &first_style);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ break;
+
+ default:
+ /* something else; don't do anything */
+ break;
+ }
+ }
+
+ if (style == ST_ELISION) {
+ /* skip over the elision marker in the vowel determination
+ * buffer */
+ ++index;
+ }
+
+ switch (style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* Here we pass all the characters after a verbatim (or
+ * special char) beginning, until we find a style (begin or
+ * end) */
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character && current_character != sentinel
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ assert(current_character);
+ if (current_character != sentinel) {
+ gregorio_assert2(!current_character->is_character
+ && current_character->cos.s.type == ST_T_END
+ && current_character->cos.s.style == style,
+ gregorio_rebuild_characters, "mismatched %s",
+ grestyle_style_to_string(style), break);
+ }
+ break;
+
+ case ST_CENTER:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "encountered unexpected begin ST_CENTER");
+ break;
+ /* LCOV_EXCL_STOP */
+
+ case ST_FORCED_CENTER:
+ begin_center(center_type, current_character, &first_style);
+ current_character = suppress_character(current_character);
+ continue;
+
+ default:
+ handle_elision(current_character, &in_elision);
+ /* it the beginning of a style, which is not center. We
+ * check if the style is not already in the stack. If it is
+ * the case, we suppress the character and pass */
+ for (current_style = first_style; current_style
+ && current_style->style != current_character->cos.s.style;
+ current_style = current_style->next_style) {
+ /* just loop */
+ }
+ if (current_style) {
+ /* repeated styles should already have been filtered out
+ * during parsing, so if this is hit, it's a programming
+ * error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "encountered repeated style");
+ current_character = suppress_character(current_character);
+ continue;
+ /* LCOV_EXCL_STOP */
+ }
+ /* if it is something to add then we just push the style in the
+ * stack and continue. */
+ style_push(&first_style, current_character->cos.s.style);
+ break;
+ }
+ break;
+
+ case ST_T_END:
+ /* the beginning of a style */
+ switch(current_character->cos.s.style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ case ST_CENTER:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregorio_rebuild_characters,
+ "encountered unexpected end %s",
+ grestyle_style_to_string(
+ current_character->cos.s.style));
+ break;
+ /* LCOV_EXCL_STOP */
+
+ case ST_FORCED_CENTER:
+ end_center(center_type, current_character, &first_style);
+ current_character = suppress_character(current_character);
+ continue;
+
+ default:
+ handle_elision(current_character, &in_elision);
+ /* the case of the end of a style (the most complex).
+ * First, we have to see if the style is in the stack. If
+ * there is no stack, we just suppress and continue. */
+ if (!first_style) {
+ current_character = suppress_character(current_character);
+ continue;
+ }
+ /* so, we look if it is in the stack. If it is we put
+ * current_style to the style just before the style
+ * corresponding to the character that we are treating
+ * (still there ?) */
+ for (current_style = first_style; current_style
+ && current_style->style
+ != current_character->cos.s.style;
+ current_style = current_style->next_style) {
+ /* just loop */
+ }
+ if (current_style) {
+ det_style *this_style;
+ /* if there are styles before in the stack, we close
+ * them */
+ for (this_style = first_style;
+ this_style != current_style;
+ this_style = this_style->next_style) {
+ insert_style_before(ST_T_END, this_style->style,
+ current_character);
+ }
+ /* and then we reopen them */
+ for (this_style = this_style->previous_style;
+ this_style;
+ this_style = this_style->previous_style) {
+ insert_style_after(ST_T_BEGIN, this_style->style,
+ &current_character);
+ }
+ /* we delete the style in the stack */
+ style_pop(&first_style, current_style);
+ } else {
+ current_character = suppress_character(current_character);
+ continue;
+ }
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_rebuild_characters,
+ "unexpected style type");
+ }
+ /* LCOV_EXCL_STOP */
+ }
+ current_character = current_character->next_character;
+ }
+ /* destroy the sentinel */
+ current_character = sentinel->previous_character;
+ current_character->next_character = NULL;
+ free(sentinel);
+ /* we terminate all the styles that are still in the stack */
+ for (current_style = first_style; current_style;
+ current_style = current_style->next_style) {
+ insert_style_after(ST_T_END, current_style->style,
+ &current_character);
+ }
+ /* current_character is at the end of the list now, so if we havn't closed
+ * the center, we do it at the end. */
+ if (center_is_determined != CENTER_FULLY_DETERMINED) {
+ insert_style_after(ST_T_END, center_type, &current_character);
+ }
+ /* these three lines are for the case where the user didn't tell anything
+ * about the middle and there aren't any vowel in the syllable, so we
+ * begin the center before the first character (you can notice that there
+ * is no problem of style). */
+ if (!center_is_determined) {
+ if (skip_initial && go_to_end_initial(&current_character)) {
+ current_character = current_character->next_character;
+ } else {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ insert_style_before(ST_T_BEGIN, ST_CENTER, current_character);
+ }
+ /* well.. you're quite brave if you reach this comment. */
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+ free_styles(&first_style);
+}
+
+/**
+ * @brief This function will determine the behaviour of gregorio when it comes to the recognition of the initial.
+ *
+ * Basically it will take a gregorio_character list and return the same list, but with a style added : ST_INITIAL. This style will incidate the initial. The center will be placed at the second letter, unless there is a FORCED_CENTER somewhere.
+ * Finally all will be xml-compliant and tex-compliant when we call gregorio_rebuild_characters.
+ *
+ * If we note <> for the initial and {} for the center, here is what we want:
+ *
+ * @li \verbatim Po -> <P>{o} \endverbatim
+ * @li \verbatim {A}b -> <>{A}b \endverbatim
+ * @li \verbatim {}a -> <>{}a \endverbatim
+ * @li \verbatim Glo -> <G>{l}o \endverbatim
+ * @li \verbatim Gl{o} -> <G>l{o} \endverbatim
+ *
+ * @param param_character is a pointer to the (pointer to the) first character, it will be modified so that it points to the new first character.
+ */
+void gregorio_rebuild_first_syllable(gregorio_character **param_character,
+ bool separate_initial)
+{
+ /* the current_character */
+ gregorio_character *current_character = *param_character;
+ gregorio_character *first_character;
+ gregorio_character *start_of_special;
+ /* so, here we start: we go to the first_character */
+ gregorio_go_to_first_character_c(&current_character);
+ /* first we look at the styles to see if there is a FORCED_CENTER
+ * somewhere */
+ /* Note: we don't have to deal with ST_CENTER here because
+ * gregorio_rebuild_first_syllable is meant to be run **before**
+ * gregorio_rebuild_characters, which is what adds ST_CENTER */
+ gregorio_assert(param_character, gregorio_rebuild_first_syllable,
+ "param_character may not be NULL", return);
+ while (current_character) {
+ if (!current_character->is_character) {
+ if (current_character->cos.s.style == ST_FORCED_CENTER) {
+ /* we can break here, as there won't be forced center plus
+ * center */
+ break;
+ }
+ }
+ current_character = current_character->next_character;
+ }
+ current_character = *param_character;
+ gregorio_go_to_first_character_c(&current_character);
+ first_character = current_character;
+ /* now we are going to place the two INITIAL styles (begin and end) */
+ while (current_character) {
+ if (!current_character->is_character
+ && (current_character->cos.s.style == ST_FORCED_CENTER
+ || current_character->cos.s.style == ST_PROTRUSION_FACTOR)) {
+ /* we don't touch anything after a FORCED_CENTER, so we put an
+ * empty INITIAL style just before; we handle the weird case of
+ * a protrusion (manual or automatic) at the initial the same way
+ * (we need only check for PROTRUSION_FACTOR since that will come
+ * before PROTRUSION) */
+ current_character = first_character;
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ current_character = current_character->previous_character;
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ break;
+ }
+ /* this if is a hack to make gregorio consider verbatim blocks and
+ * special chars like one block, not a sequence of letters */
+ if (!current_character->is_character
+ && current_character->cos.s.type == ST_T_BEGIN
+ && (current_character->cos.s.style == ST_VERBATIM
+ || current_character->cos.s.style == ST_SPECIAL_CHAR)) {
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ start_of_special = current_character->previous_character;
+ /* ... which is now the begin-initial style */
+
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character->next_character
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ if (separate_initial && start_of_special->previous_character) {
+ /* we need to move the initial to the front */
+ start_of_special->previous_character->next_character =
+ current_character->next_character;
+ current_character->next_character->previous_character =
+ start_of_special->previous_character;
+ start_of_special->previous_character = NULL;
+ current_character->next_character = first_character;
+ first_character->previous_character = current_character;
+ }
+ break;
+ }
+ if (current_character->is_character) {
+ if (separate_initial && current_character->previous_character) {
+ /* we need to move the initial to the front */
+ current_character->previous_character->next_character =
+ current_character->next_character;
+ current_character->next_character->previous_character =
+ current_character->previous_character;
+ current_character->previous_character = NULL;
+ current_character->next_character = first_character;
+ first_character->previous_character = current_character;
+ }
+ insert_style_before(ST_T_BEGIN, ST_INITIAL, current_character);
+ insert_style_after(ST_T_END, ST_INITIAL, &current_character);
+ break;
+ }
+ current_character = current_character->next_character;
+ }
+ /* now apply the first syllable style */
+ current_character = *param_character;
+ if (separate_initial) {
+ if (go_to_end_initial(&current_character)) {
+ current_character = current_character->next_character;
+ }
+ } else {
+ gregorio_go_to_first_character_c(&current_character);
+ }
+ if (current_character) {
+ bool marked_syllable_initial = false;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_SYLLABLE, current_character);
+ do {
+ if (!marked_syllable_initial && (current_character->is_character
+ || (current_character->cos.s.type == ST_T_BEGIN
+ && (current_character->cos.s.style == ST_VERBATIM
+ || current_character->cos.s.style
+ == ST_SPECIAL_CHAR
+ )
+ )
+ )) {
+ marked_syllable_initial = true;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_SYLLABLE_INITIAL,
+ current_character);
+ if (!current_character->is_character) {
+ /* skip past the verbatim or special character */
+ if (current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ while (current_character->next_character
+ && current_character->is_character) {
+ current_character = current_character->next_character;
+ }
+ }
+ insert_style_after(ST_T_END, ST_FIRST_SYLLABLE_INITIAL,
+ &current_character);
+ }
+ if (!current_character->is_character) {
+ switch (current_character->cos.s.style) {
+ case ST_CENTER:
+ case ST_FORCED_CENTER:
+ insert_style_before(ST_T_END, ST_FIRST_SYLLABLE,
+ current_character);
+ insert_style_after(ST_T_BEGIN, ST_FIRST_SYLLABLE,
+ &current_character);
+ break;
+
+ case ST_PROTRUSION_FACTOR:
+ /* protrusion is not allowed to be the syllable initial;
+ * we only need to check PROTRUSION_FACTOR since that will
+ * come before PROTRUSION */
+ marked_syllable_initial = true;
+ break;
+
+ default:
+ break;
+ }
+ }
+ if (!current_character->next_character) {
+ insert_style_after(ST_T_END, ST_FIRST_SYLLABLE,
+ &current_character);
+ }
+ current_character = current_character->next_character;
+ } while (current_character);
+ }
+
+ current_character = *param_character;
+ gregorio_go_to_first_character_c(&current_character);
+ (*param_character) = current_character;
+}
+
+void gregorio_set_first_word(gregorio_character **const character)
+{
+ gregorio_character *ch = *character;
+ if (go_to_end_initial(&ch)) {
+ ch = ch->next_character;
+ }
+ if (ch) {
+ bool started_style = false;
+ while (ch) {
+ if (!ch->is_character
+ && (ch->cos.s.style == ST_CENTER
+ || ch->cos.s.style == ST_FORCED_CENTER)) {
+ if (started_style) {
+ started_style = false;
+ insert_style_before(ST_T_END, ST_FIRST_WORD, ch);
+ }
+ } else if (!started_style) {
+ started_style = true;
+ insert_style_before(ST_T_BEGIN, ST_FIRST_WORD, ch);
+ }
+
+ if (!ch->next_character && started_style) {
+ insert_style_after(ST_T_END, ST_FIRST_WORD, &ch);
+ }
+
+ ch = ch->next_character;
+ }
+ }
+ /* else there are no more characters here */
+
+ if (*character) {
+ gregorio_go_to_first_character_c(character);
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/characters.h b/Build/source/texk/gregorio/gregorio-src/src/characters.h
new file mode 100644
index 00000000000..33f40616d44
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/characters.h
@@ -0,0 +1,89 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the lyric handling data structures and entry points.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CHARACTERS_H
+#define CHARACTERS_H
+
+#include "bool.h"
+#include "struct.h"
+
+/*
+ *
+ * The three next defines are the possible values of center_is_determined.
+ *
+ * CENTER_NOT_DETERMINED means that the plugin has encountered no { nor } (in
+ * the gabc syntax). CENTER_HALF_DETERMINED means that the plugin has
+ * encountered a { but no }, and we will try to determine a middle starting
+ * after the {. CENTER_FULLY_DETERMINED means that lex has encountered a { and
+ * a }, so we won't determine the middle, it is considered done.
+ * CENTER_DETERMINING_MIDDLE is used internally in the big function to know
+ * where we are in the middle determination.
+ *
+ */
+
+typedef enum gregorio_center_determination {
+ CENTER_NOT_DETERMINED = 0,
+ CENTER_HALF_DETERMINED,
+ CENTER_FULLY_DETERMINED,
+ CENTER_DETERMINING_MIDDLE
+} gregorio_center_determination;
+
+/* this is a temporary structure that will be used for style determination */
+
+typedef struct det_style {
+ grestyle_style style;
+ struct det_style *previous_style;
+ struct det_style *next_style;
+} det_style;
+
+typedef enum gregorio_write_text_phase {
+ WTP_NORMAL,
+ WTP_FIRST_SYLLABLE
+} gregorio_write_text_phase;
+
+void gregorio_write_text(gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *f,
+ void (*printverb) (FILE *, const grewchar *),
+ void (*printchar) (FILE *, grewchar),
+ void (*begin) (FILE *, grestyle_style),
+ void (*end) (FILE *, grestyle_style),
+ void (*printspchar) (FILE *, const grewchar *));
+
+void gregorio_write_first_letter_alignment_text(gregorio_write_text_phase phase,
+ const gregorio_character *current_character, FILE *f,
+ void (*printverb) (FILE *, const grewchar *),
+ void (*printchar) (FILE *, grewchar),
+ void (*begin) (FILE *, grestyle_style),
+ void (*end) (FILE *, grestyle_style),
+ void (*printspchar) (FILE *, const grewchar *));
+
+void gregorio_set_centering_language(char *language);
+
+void gregorio_rebuild_characters(gregorio_character **param_character,
+ gregorio_center_determination center_is_determined, bool skip_initial);
+
+void gregorio_rebuild_first_syllable(gregorio_character **param_character,
+ bool separate_initial);
+
+void gregorio_set_first_word(gregorio_character **character);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/config.h b/Build/source/texk/gregorio/gregorio-src/src/config.h
new file mode 100644
index 00000000000..259c4ca0c3a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/config.h
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header wraps the generated config_.h to provide version macros.
+ *
+ * Gregorio configuration headers.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_.h"
+
+#ifdef BRANCH_VERSION
+#define GREGORIO_VERSION VERSION "-" BRANCH_VERSION
+#else
+#define GREGORIO_VERSION VERSION
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
new file mode 100644
index 00000000000..5f604b9ba3d
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
@@ -0,0 +1,546 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file provides functions to dump out Gregorio structures.
+ *
+ * Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "plugins.h"
+#include "support.h"
+
+static const char *dump_style_to_string(grestyle_style style)
+{
+ static char buf[50];
+
+ gregorio_snprintf(buf, sizeof buf, "%16s", grestyle_style_to_string(style));
+ return buf;
+}
+
+void dump_write_characters(FILE *const f,
+ const gregorio_character * current_character)
+{
+ while (current_character) {
+ fprintf(f,
+ "---------------------------------------------------------------------\n");
+ if (current_character->is_character) {
+ fprintf(f, " character ");
+ gregorio_print_unichar(f, current_character->cos.character);
+ fprintf(f, "\n");
+ } else {
+ switch (current_character->cos.s.type) {
+ case ST_T_BEGIN:
+ fprintf(f, " beginning of style %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ case ST_T_END:
+ fprintf(f, " end of style %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !! IMPROPER STYLE !! %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ current_character = current_character->next_character;
+ }
+}
+
+static const char *dump_bool(bool value) {
+ return value? "true" : "false";
+}
+
+static const char *dump_pitch(const char height, const char highest_pitch) {
+ static char buf[20];
+ if (height >= LOWEST_PITCH && height <= highest_pitch) {
+ char pitch = height + 'a' - LOWEST_PITCH;
+ if (pitch == 'o') {
+ pitch = 'p';
+ }
+ gregorio_snprintf(buf, 20, "%c", pitch);
+ } else {
+ /* not reachable unless there's a programming error */
+ gregorio_snprintf(buf, 20, "?%d", height); /* LCOV_EXCL_LINE */
+ }
+ return buf;
+}
+
+static void dump_hepisema_adjustment(FILE *const f, const gregorio_note *note,
+ const gregorio_sign_orientation orientation, const char *const which) {
+ unsigned short index = note->he_adjustment_index[orientation];
+ if (index) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ index);
+ fprintf(f, " %s hepisema group %d\n", which, index);
+ fprintf(f, " %s hep. vbasepos %d (%s)\n", which,
+ adj->vbasepos,
+ gregorio_hepisema_vbasepos_to_string(adj->vbasepos));
+ if (adj->nudge) {
+ fprintf(f, " %s hepisema nudge %s\n", which, adj->nudge);
+ }
+ }
+}
+
+void dump_write_score(FILE *f, gregorio_score *score)
+{
+ gregorio_voice_info *voice_info = score->first_voice_info;
+ int i;
+ int annotation_num;
+ gregorio_syllable *syllable;
+ gregorio_header *header;
+
+ gregorio_assert(f, dump_write_score, "call with NULL file", return);
+
+ fprintf(f,
+ "=====================================================================\n"
+ " SCORE INFOS\n"
+ "=====================================================================\n");
+ if (score->number_of_voices) {
+ fprintf(f, " number_of_voices %d\n",
+ score->number_of_voices);
+ }
+ if (score->name) {
+ fprintf(f, " name %s\n", score->name);
+ }
+ if (score->gabc_copyright) {
+ fprintf(f, " gabc_copyright %s\n", score->gabc_copyright);
+ }
+ if (score->score_copyright) {
+ fprintf(f, " score_copyright %s\n", score->score_copyright);
+ }
+ if (score->author) {
+ fprintf(f, " author %s\n", score->author);
+ }
+ if (score->mode) {
+ fprintf(f, " mode %s\n", score->mode);
+ }
+ if (score->mode_modifier) {
+ fprintf(f, " mode_modifier %s\n", score->mode_modifier);
+ }
+ if (score->mode_differentia) {
+ fprintf(f, " mode_differentia %s\n", score->mode_differentia);
+ }
+ if (score->staff_lines != 4) {
+ fprintf(f, " staff_lines %d\n", (int)score->staff_lines);
+ }
+ if (score->nabc_lines) {
+ fprintf(f, " nabc_lines %d\n", (int)score->nabc_lines);
+ }
+ if (score->legacy_oriscus_orientation) {
+ fprintf(f, " oriscus-orientation legacy\n");
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " HEADERS\n"
+ "=====================================================================\n");
+ for (header = score->headers; header; header = header->next) {
+ fprintf(f, " %-25s %s\n", header->name, header->value);
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " VOICES INFOS\n"
+ "=====================================================================\n");
+ for (i = 0; i < score->number_of_voices; i++) {
+ fprintf(f, " Voice %d\n", i + 1);
+ if (voice_info->initial_clef.line) {
+ fprintf(f, " initial_key %d (%c%d)\n",
+ gregorio_calculate_new_key(voice_info->initial_clef),
+ gregorio_clef_to_char(voice_info->initial_clef.clef),
+ voice_info->initial_clef.line);
+ if (voice_info->initial_clef.flatted) {
+ fprintf(f, " flatted_key true\n");
+ }
+ if (voice_info->initial_clef.secondary_line) {
+ fprintf(f, " secondary_clef %c%d\n",
+ gregorio_clef_to_char(
+ voice_info->initial_clef.secondary_clef),
+ voice_info->initial_clef.secondary_line);
+ if (voice_info->initial_clef.secondary_flatted) {
+ fprintf(f, " secondary_flatted_key true\n");
+ }
+ }
+ }
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS;
+ ++annotation_num) {
+ if (score->annotation[annotation_num]) {
+ fprintf(f, " annotation %s\n",
+ score->annotation[annotation_num]);
+ }
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+ fprintf(f, "\n\n"
+ "=====================================================================\n"
+ " SCORE\n"
+ "=====================================================================\n");
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ gregorio_element *element;
+ fprintf(f, " type 0 (GRE_SYLLABLE)\n");
+ if (syllable->position) {
+ fprintf(f, " position %d (%s)\n",
+ syllable->position,
+ gregorio_word_position_to_string(syllable->position));
+ }
+ if (syllable->no_linebreak_area != NLBA_NORMAL) {
+ fprintf(f, " no line break area %s\n",
+ gregorio_nlba_to_string(syllable->no_linebreak_area));
+ }
+ if (syllable->euouae != EUOUAE_NORMAL) {
+ fprintf(f, " euouae %s\n",
+ gregorio_euouae_to_string(syllable->euouae));
+ }
+ if (syllable->clear) {
+ fprintf(f, " clear true\n");
+ }
+ if (syllable->text) {
+ if (syllable->translation) {
+ fprintf(f, "\n Text\n");
+ }
+ dump_write_characters(f, syllable->text);
+ }
+ if ((syllable->translation
+ && syllable->translation_type != TR_WITH_CENTER_END)
+ || syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "\n Translation type %s",
+ gregorio_tr_centering_to_string
+ (syllable->translation_type));
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "\n");
+ }
+ }
+ if (syllable->translation) {
+ fprintf(f, "\n Translation\n");
+ dump_write_characters(f, syllable->translation);
+ }
+ if (syllable->abovelinestext) {
+ fprintf(f, "\n Abovelinestext\n %s", syllable->abovelinestext);
+ }
+ for (element = *syllable->elements; element; element = element->next) {
+ gregorio_glyph *glyph;
+ fprintf(f, "---------------------------------------------------------------------\n");
+ if (element->type) {
+ fprintf(f, " type %d (%s)\n",
+ element->type, gregorio_type_to_string(element->type));
+ }
+ switch (element->type) {
+ case GRE_CUSTOS:
+ if (element->u.misc.pitched.pitch) {
+ fprintf(f, " pitch %s\n",
+ dump_pitch(element->u.misc.pitched.pitch,
+ score->highest_pitch));
+ }
+ if (element->u.misc.pitched.force_pitch) {
+ fprintf(f, " force_pitch true\n");
+ }
+ break;
+ case GRE_SUPPRESS_CUSTOS:
+ /* not handling this would generate an error below */
+ break;
+ case GRE_SPACE:
+ if (element->u.misc.unpitched.info.space) {
+ char *factor = element->u.misc.unpitched.info.
+ ad_hoc_space_factor;
+ fprintf(f, " space %d (%s)%s%s\n",
+ element->u.misc.unpitched.info.space,
+ gregorio_space_to_string(
+ element->u.misc.unpitched.info.space),
+ factor? " x " : "", factor? factor : "");
+ }
+ break;
+ case GRE_TEXVERB_ELEMENT:
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(element->texverb));
+ break;
+ case GRE_NLBA:
+ fprintf(f, " nlba %d (%s)\n",
+ element->u.misc.unpitched.info.nlba,
+ gregorio_nlba_to_string(element->u.misc.unpitched.info.
+ nlba));
+ break;
+ case GRE_ALT:
+ fprintf(f, " Above lines text \"%s\"\n",
+ gregorio_texverb(element->texverb));
+ break;
+ case GRE_BAR:
+ if (element->u.misc.unpitched.info.bar) {
+ fprintf(f, " bar %d (%s)\n",
+ element->u.misc.unpitched.info.bar,
+ gregorio_bar_to_string(element->u.misc.unpitched.
+ info.bar));
+ if (element->u.misc.unpitched.special_sign) {
+ fprintf(f, " special sign %d (%s)\n",
+ element->u.misc.unpitched.special_sign,
+ gregorio_sign_to_string(element->
+ u.misc.unpitched.special_sign));
+ }
+ }
+ break;
+ case GRE_CLEF:
+ if (element->u.misc.clef.line) {
+ fprintf(f, " clef %d (%c%d)\n",
+ gregorio_calculate_new_key(element->u.misc.clef),
+ gregorio_clef_to_char(element->u.misc.clef.clef),
+ element->u.misc.clef.line);
+ if (element->u.misc.clef.flatted) {
+ fprintf(f, " flatted_key true\n");
+ }
+ if (element->u.misc.clef.secondary_line) {
+ fprintf(f, " secondary_clef %c%d\n",
+ gregorio_clef_to_char(
+ element->u.misc.clef.secondary_clef),
+ element->u.misc.clef.secondary_line);
+ if (element->u.misc.clef.secondary_flatted) {
+ fprintf(f, " secondary_flatted_key true\n");
+ }
+ }
+ }
+ break;
+ case GRE_END_OF_LINE:
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, " ragged true\n");
+ }
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ fprintf(f, " forces custos %s\n",
+ dump_bool(element
+ ->u.misc.unpitched.info.eol_forces_custos_on));
+ }
+ break;
+ case GRE_ELEMENT:
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ gregorio_note *note;
+ fprintf(f, "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
+ if (glyph->type) {
+ fprintf(f, " type %d (%s)\n",
+ glyph->type, gregorio_type_to_string(glyph->
+ type));
+ }
+ switch (glyph->type) {
+ case GRE_TEXVERB_GLYPH:
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(glyph->texverb));
+ break;
+
+ case GRE_SPACE:
+ fprintf(f, " space %d (%s)\n",
+ glyph->u.misc.unpitched.info.space,
+ gregorio_space_to_string(glyph->u.misc.
+ unpitched.info.space));
+ break;
+
+ case GRE_GLYPH:
+ fprintf(f, " glyph_type %d (%s)\n",
+ glyph->u.notes.glyph_type,
+ gregorio_glyph_type_to_string(glyph->u.notes.
+ glyph_type));
+ if (glyph->u.notes.is_cavum) {
+ fprintf(f, " is_cavum true\n");
+ }
+ if (glyph->u.notes.liquescentia) {
+ fprintf(f, " liquescentia %d (%s)\n",
+ glyph->u.notes.liquescentia,
+ gregorio_liquescentia_to_string(
+ glyph->u.notes.liquescentia));
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(glyph->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (glyph->type == GRE_GLYPH) {
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ fprintf(f, "- - - - - - - - - - - - - - - - - - - - - - - \n");
+ if (note->type) {
+ fprintf(f, " type %d (%s)\n",
+ note->type,
+ gregorio_type_to_string(note->type));
+ }
+ switch (note->type) {
+ case GRE_NOTE:
+ if (note->u.note.pitch) {
+ fprintf(f, " pitch %s\n",
+ dump_pitch(note->u.note.pitch,
+ score->highest_pitch));
+ }
+ if (note->u.note.shape) {
+ fprintf(f, " shape %d (%s)\n",
+ note->u.note.shape,
+ gregorio_shape_to_string(
+ note->u.note.shape));
+ }
+ if (note->u.note.is_cavum) {
+ fprintf(f, " is_cavum true\n");
+ }
+ if (note->u.note.liquescentia) {
+ fprintf(f, " liquescentia %d (%s)\n",
+ note->u.note.liquescentia,
+ gregorio_liquescentia_to_string(
+ note->u.note.liquescentia));
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(note->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->texverb) {
+ fprintf(f, " TeX string \"%s\"\n",
+ gregorio_texverb(note->texverb));
+ }
+ if (note->choral_sign) {
+ fprintf(f, " Choral Sign \"%s\"\n",
+ note->choral_sign);
+ }
+ if (note->signs) {
+ fprintf(f, " signs %d (%s)\n",
+ note->signs,
+ gregorio_sign_to_string(note->signs));
+ }
+ if (note->signs & _V_EPISEMA && note->v_episema_height) {
+ if (note->v_episema_height < note->u.note.pitch) {
+ fprintf(f, " v episema forced BELOW\n");
+ }
+ else {
+ fprintf(f, " v episema forced ABOVE\n");
+ }
+ }
+ if ((note->signs == _PUNCTUM_MORA
+ || note->signs == _V_EPISEMA_PUNCTUM_MORA)
+ && note->mora_vposition) {
+ fprintf(f, " mora vposition %s\n",
+ gregorio_vposition_to_string(note->
+ mora_vposition));
+ }
+ if (note->special_sign) {
+ fprintf(f, " special sign %d (%s)\n",
+ note->special_sign,
+ gregorio_sign_to_string(
+ note->special_sign));
+ }
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ fprintf(f, " auto hepisema size %d (%s)\n",
+ note->h_episema_above_size,
+ grehepisema_size_to_string(note->
+ h_episema_above_size));
+ fprintf(f, " auto hepisema bridge %s\n",
+ dump_bool(note->h_episema_above_connect));
+ }
+ else {
+ if (note->h_episema_above == HEPISEMA_FORCED) {
+ fprintf(f, " above hepisema size %d (%s)\n",
+ note->h_episema_above_size,
+ grehepisema_size_to_string(note->
+ h_episema_above_size));
+ fprintf(f, " above hepisema bridge %s\n",
+ dump_bool(note->h_episema_above_connect));
+ }
+ if (note->h_episema_below == HEPISEMA_FORCED) {
+ fprintf(f, " below hepisema size %d (%s)\n",
+ note->h_episema_below_size,
+ grehepisema_size_to_string(note->
+ h_episema_below_size));
+ fprintf(f, " below hepisema bridge %s\n",
+ dump_bool(note->h_episema_below_connect));
+ }
+ }
+ dump_hepisema_adjustment(f, note, SO_OVER, "above");
+ dump_hepisema_adjustment(f, note, SO_UNDER,
+ "below");
+ switch (note->high_ledger_specificity) {
+ case LEDGER_SUPPOSED:
+ break;
+ case LEDGER_EXPLICIT:
+ fprintf(f, " explicit high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ case LEDGER_DRAWN:
+ fprintf(f, " drawn high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, " forced drawn high line %s\n",
+ dump_bool(note->high_ledger_line));
+ break;
+ }
+ switch (note->low_ledger_specificity) {
+ case LEDGER_SUPPOSED:
+ break;
+ case LEDGER_EXPLICIT:
+ fprintf(f, " explicit low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ case LEDGER_DRAWN:
+ fprintf(f, " drawn low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, " forced drawn low line %s\n",
+ dump_bool(note->low_ledger_line));
+ break;
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(element->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (element->nabc_lines) {
+ fprintf(f, " nabc_lines %d\n",
+ (int)element->nabc_lines);
+ }
+ if (element->nabc_lines && element->nabc) {
+ for (i = 0; i < (int)element->nabc_lines; i++) {
+ if (element->nabc[i]) {
+ fprintf(f, " nabc_line %d \"%s\"\n",
+ (int)(i+1), element->nabc[i]);
+ }
+ }
+ }
+ }
+ fprintf(f, "=====================================================================\n");
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c b/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c
new file mode 100644
index 00000000000..d57c8d71054
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/encode_utf8strings.c
@@ -0,0 +1,75 @@
+/*
+ * Utility program to convert utf8strings.h.in into utf8strings.h
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+int main(int argc, char **argv)
+{
+ char buf[5];
+ FILE *input, *output;
+ int c;
+
+ if (argc != 3) {
+ fprintf(stderr, "Incorrect arguments\n");
+ return -1;
+ }
+
+ input = fopen(argv[1], "rb");
+ if (input == NULL) {
+ fprintf(stderr, "Error opening %s: %s\n", argv[1], strerror(errno));
+ return -1;
+ }
+
+ output = fopen(argv[2], "wb");
+ if (output == NULL) {
+ fprintf(stderr, "Error creating %s: %s\n", argv[2], strerror(errno));
+ return -1;
+ }
+
+ while ((c = fgetc(input)) != EOF) {
+ if (c & 0x80) {
+ snprintf(buf, sizeof(buf), "\\%03o", c);
+ if (fwrite(buf, sizeof(buf) - sizeof(char), 1, output) != 1) {
+ fprintf(stderr, "Error writing %s: %s\n", argv[2],
+ strerror(errno));
+ return -1;
+ }
+ } else {
+ if (fputc(c, output) != c) {
+ fprintf(stderr, "Error writing %s: %s\n", argv[2],
+ strerror(errno));
+ return -1;
+ }
+ }
+ }
+
+ if (fclose(output) != 0) {
+ fprintf(stderr, "Error closing %s: %s\n", argv[2], strerror(errno));
+ return -1;
+ }
+ if (fclose(input) != 0) {
+ fprintf(stderr, "Error closing %s: %s\n", argv[1], strerror(errno));
+ return -1;
+ }
+ return 0;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h b/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h
new file mode 100644
index 00000000000..a2e4b03892e
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/enum_generator.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* These macros are used for generating enum code. This is based on the
+ * technique described in http://stackoverflow.com/a/202511
+ *
+ * Two of these macros are meant for use outside this set of macros:
+ *
+ * - ENUM declares the enum itself and a prototype for the function that
+ * returns the string value of the enum's numeric value. This is meant to be
+ * used from a header file.
+ * - ENUM_TO_STRING defines the function whose prototype was declared by ENUM.
+ * This is meant to be used from a code file.
+ *
+ * These two macros both take the following two arguments:
+ *
+ * - TYPE is the name to use for the enum.
+ * - DEF is the name of a macro that generates the bodies of the enum and the
+ * to-string function. DEF should take four arguments, in the following
+ * order (with suggested names):
+ * - A is a macro that generates an enum value with a specifiec numeric
+ * value. It takes two arguments, the name and the numeric value.
+ * - E is a macro that generates an enum value that has no specific numeric
+ * value. It takes one argument, the name.
+ * - X is a macro that generates the last enum value when it has a specific
+ * numeric value. It takes the same two arguments as A.
+ * - L is a macro that generates the last enum value when it has no specific
+ * numeric value. It takes the same argument as E.
+ *
+ * Note: If we were supporting C11, we could take empty macro arguments and
+ * would be able to get away with only two arguments to DEF.
+ */
+
+#ifndef ENUM_GENERATOR_H
+#define ENUM_GENERATOR_H
+
+/* for enum values */
+#define ENUM_VALUE(NAME,VALUE) NAME = VALUE,
+#define ENUM_ENTRY(NAME) NAME,
+#define ENUM_LAST_VALUE(NAME,VALUE) NAME = VALUE
+#define ENUM_LAST_ENTRY(NAME) NAME
+
+/* for enum case */
+#define ENUM_VALUE_CASE(NAME,VALUE) case NAME: return #NAME;
+#define ENUM_ENTRY_CASE(NAME) case NAME: return #NAME;
+
+/* enum declaration */
+#define ENUM(TYPE,DEF) \
+ typedef enum TYPE { \
+ DEF(ENUM_VALUE, ENUM_ENTRY, ENUM_LAST_VALUE, ENUM_LAST_ENTRY) \
+ } TYPE; \
+ const char *TYPE##_to_string(TYPE value)
+
+/* enum *_to_string function defintiion */
+#define ENUM_TO_STRING(TYPE,DEF) \
+ const char *TYPE##_to_string(TYPE value) \
+ { \
+ switch(value) { \
+ DEF(ENUM_VALUE_CASE, ENUM_ENTRY_CASE, ENUM_VALUE_CASE, ENUM_ENTRY_CASE) \
+ default: return gregorio_unknown(value); \
+ } \
+ }
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c
new file mode 100644
index 00000000000..16ca2dfa60c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-elements-determination.c
@@ -0,0 +1,337 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX.
+ * This file provides functions for determining elements from notes.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+
+#include "gabc.h"
+
+#define SINGLE_NOTE_GLYPH \
+ G_PUNCTUM: \
+ case G_VIRGA: \
+ case G_BIVIRGA: \
+ case G_TRIVIRGA: \
+ case G_VIRGA_REVERSA: \
+ case G_STROPHA: \
+ case G_STROPHA_AUCTA: \
+ case G_DISTROPHA: \
+ case G_DISTROPHA_AUCTA: \
+ case G_TRISTROPHA: \
+ case G_TRISTROPHA_AUCTA
+
+#define PUNCTA_INCLINATA_ASCENDENS_GLYPH \
+ G_2_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_3_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_4_PUNCTA_INCLINATA_ASCENDENS: \
+ case G_5_PUNCTA_INCLINATA_ASCENDENS
+
+#define PUNCTA_INCLINATA_DESCENDENS_GLYPH \
+ G_2_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_3_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_4_PUNCTA_INCLINATA_DESCENDENS: \
+ case G_5_PUNCTA_INCLINATA_DESCENDENS
+
+static __inline signed char glyph_note_ambitus(
+ const gregorio_glyph *const current_glyph,
+ const gregorio_glyph *const previous_glyph)
+{
+ return current_glyph->u.notes.first_note->u.note.pitch -
+ gregorio_glyph_last_note(previous_glyph)->u.note.pitch;
+}
+
+/*
+ *
+ * A function that will be called several times: it adds an element to the
+ * current element current_element: the current_element in the determination,
+ * it will be updated to the element that we will add first_glyph: the
+ * first_glyph of the element that we will add current_glyph: the last glyph
+ * that will be in the element
+ *
+ */
+
+static void close_element(gregorio_element **current_element,
+ gregorio_glyph **const first_glyph,
+ const gregorio_glyph *const current_glyph)
+{
+ gregorio_add_element(current_element, *first_glyph);
+ if (*first_glyph && (*first_glyph)->previous) {
+ (*first_glyph)->previous->next = NULL;
+ (*first_glyph)->previous = NULL;
+ }
+ *first_glyph = current_glyph->next;
+}
+
+/*
+ *
+ * inline function to automatically do two or three things
+ *
+ */
+static __inline void cut_before(gregorio_glyph *current_glyph,
+ gregorio_glyph **first_glyph,
+ gregorio_element **current_element)
+{
+ if (*first_glyph != current_glyph) {
+ close_element(current_element, first_glyph, current_glyph);
+ /* yes, this is changing value close_element sets for first_glyph */
+ *first_glyph = current_glyph;
+ }
+}
+
+/*
+ *
+ * The big function of the file, but rather simple I think.
+ *
+ */
+
+static gregorio_element *gabc_det_elements_from_glyphs(
+ gregorio_glyph *current_glyph)
+{
+ /* the last element we have successfully added to the list of elements */
+ gregorio_element *current_element = NULL;
+ /* the first element, that we will return at the end. We have to consider
+ * it because the gregorio_element struct does not have previous_element
+ * element. */
+ gregorio_element *first_element = NULL;
+ /* the first_glyph of the element that we are currently determining */
+ gregorio_glyph *first_glyph = current_glyph;
+ /* the last real (GRE_GLYPH) that we have processed */
+ gregorio_glyph *previous_glyph = NULL;
+ /* boolean necessary to determine some cases */
+ bool do_not_cut = false;
+ bool force_cut = false;
+
+ gregorio_not_null(current_glyph, gabc_det_elements_from_glyphs, return NULL);
+ /* first we go to the first glyph in the chained list of glyphs (maybe to
+ * suppress ?) */
+ gregorio_go_to_first_glyph(&current_glyph);
+
+ while (current_glyph) {
+ if (current_glyph->type != GRE_GLYPH) {
+ force_cut = false;
+ /* we must not cut after a glyph-level space */
+ if (current_glyph->type == GRE_SPACE) {
+ switch (current_glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ case SP_HALF_SPACE:
+ case SP_INTERGLYPH_SPACE:
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+ current_glyph = current_glyph->next;
+ do_not_cut = true;
+ continue;
+ default:
+ /* any other space should be handled normally */
+ break;
+ }
+ } else if (current_glyph->type == GRE_TEXVERB_GLYPH) {
+ /* we must not cut after a texverb */
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+ current_glyph = current_glyph->next;
+ do_not_cut = true;
+ continue;
+ }
+ /* clef change or space or end of line */
+ cut_before(current_glyph, &first_glyph, &current_element);
+ /* if statement to make neumatic cuts not appear in elements, as
+ * there is always one between elements, unless the next element
+ * is a space */
+ if (current_glyph->type != GRE_SPACE
+ || current_glyph->u.misc.unpitched.info.space
+ != SP_NEUMATIC_CUT
+ || (current_glyph->next
+ && current_glyph->next->type == GRE_SPACE)) {
+ /* clef change or space other than neumatic cut */
+ if (!first_element) {
+ first_element = current_element;
+ }
+ gregorio_add_misc_element(&current_element, current_glyph->type,
+ &(current_glyph->u.misc),
+ current_glyph->texverb);
+ }
+ first_glyph = current_glyph->next;
+ previous_glyph = NULL;
+ current_glyph->texverb = 0;
+ gregorio_free_one_glyph(&current_glyph);
+ continue;
+ }
+
+ if (is_fused(current_glyph->u.notes.liquescentia)) {
+ do_not_cut = true;
+ } else if (force_cut) {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ previous_glyph = NULL;
+ }
+ force_cut = false;
+
+ switch (current_glyph->u.notes.glyph_type) {
+ case PUNCTA_INCLINATA_ASCENDENS_GLYPH:
+ case G_PUNCTUM_INCLINATUM:
+ case G_ALTERATION:
+ if (!do_not_cut) {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ do_not_cut = true;
+ }
+ break;
+
+ case G_STROPHA_AUCTA:
+ case G_STROPHA:
+ if (current_glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ force_cut = true;
+ }
+ /* fall through */
+ case PUNCTA_INCLINATA_DESCENDENS_GLYPH:
+ /* we don't cut before, so we don't do anything else */
+ if (do_not_cut) {
+ do_not_cut = false;
+ }
+ break;
+
+ default:
+ if (previous_glyph && previous_glyph->type == GRE_GLYPH
+ && !is_tail_liquescentia(
+ previous_glyph->u.notes.liquescentia)) {
+ bool break_early = false;
+ signed char ambitus;
+
+ switch (previous_glyph->u.notes.glyph_type) {
+ case SINGLE_NOTE_GLYPH:
+ /* we determine the last pitch */
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus == 0) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ break;
+
+ case PUNCTA_INCLINATA_DESCENDENS_GLYPH:
+ case G_PUNCTUM_INCLINATUM:
+ switch (current_glyph->u.notes.glyph_type) {
+ case SINGLE_NOTE_GLYPH:
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus > -2 && ambitus < 2) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ break;
+
+ default:
+ /* do nothing in particular */
+ break;
+ }
+ break;
+
+ case G_PODATUS:
+ if (current_glyph->u.notes.glyph_type == G_VIRGA) {
+ ambitus = glyph_note_ambitus(current_glyph, previous_glyph);
+ if (ambitus >= 0) {
+ do_not_cut = false;
+ break_early = true;
+ }
+ }
+ break;
+
+ default:
+ /* do nothing in particular */
+ break;
+ }
+
+ if (break_early) {
+ break;
+ }
+ }
+
+ if (do_not_cut) {
+ do_not_cut = false;
+ } else {
+ cut_before(current_glyph, &first_glyph, &current_element);
+ }
+ }
+
+ if (gregorio_glyph_last_note(current_glyph)->signs
+ & (_PUNCTUM_MORA | _AUCTUM_DUPLEX)) {
+ force_cut = true;
+ }
+
+ /* we must determine the first element, that we will return */
+ if (!first_element && current_element) {
+ first_element = current_element;
+ }
+ if (!current_glyph->next) {
+ close_element(&current_element, &first_glyph, current_glyph);
+ }
+
+ previous_glyph = current_glyph;
+ current_glyph = current_glyph->next;
+ } /* end of while */
+
+ /*
+ * we must determine the first element, that we will return
+ */
+ if (!first_element && current_element) {
+ first_element = current_element;
+ }
+ return first_element;
+}
+
+/*
+ *
+ * Two "hat" functions, they permit to have a good API. They amost don't do
+ * anything except calling the det_elements_from_glyphs.
+ *
+ * All those functions change the current_key, according to the possible new
+ * values (with key changes)
+ *
+ */
+
+static gregorio_element *gabc_det_elements_from_notes(
+ gregorio_note *current_note, int *current_key,
+ gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ gregorio_element *final = NULL;
+ gregorio_glyph *tmp = gabc_det_glyphs_from_notes(current_note, current_key,
+ punctum_inclinatum_orientation, score);
+ final = gabc_det_elements_from_glyphs(tmp);
+ return final;
+}
+
+gregorio_element *gabc_det_elements_from_string(char *const str,
+ int *const current_key, char *macros[10],
+ gregorio_scanner_location *const loc,
+ gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ gregorio_element *final;
+ gregorio_note *tmp;
+ tmp = gabc_det_notes_from_string(str, macros, loc, score);
+ final = gabc_det_elements_from_notes(tmp, current_key,
+ punctum_inclinatum_orientation, score);
+ return final;
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c
new file mode 100644
index 00000000000..094b79291fa
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-glyphs-determination.c
@@ -0,0 +1,1303 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file provides functions for determining glyphs from notes.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+
+#include "gabc.h"
+
+static __inline gregorio_scanner_location *copy_note_location(
+ const gregorio_note *const note, gregorio_scanner_location *const loc)
+{
+ loc->first_line = note->src_line;
+ loc->first_column = note->src_column;
+ loc->first_offset = note->src_offset;
+ loc->last_line = note->src_line;
+ loc->last_column = note->src_column;
+ loc->last_offset = note->src_offset;
+ return loc;
+}
+
+static __inline bool is_normal_punctum(const gregorio_note *const note)
+{
+ return note->u.note.shape == S_PUNCTUM
+ && note->u.note.liquescentia != L_INITIO_DEBILIS;
+}
+
+static __inline bool is_punctum_inclinatum(const gregorio_shape shape,
+ const bool determined_only)
+{
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ return true;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ return !determined_only;
+ default:
+ return false;
+ }
+}
+
+/****************************
+ *
+ * This function is the basis of all the determination of glyphs. The
+ * phylosophy of the function is to say : We have a glyph that we have
+ * determined, and we have the following note, can we "add" it to the
+ * glyph, or will it be the first note of another glyph ?
+ *
+ * current_glyph_type is the type of the current_glyph (current_glyph
+ * as meant in gabc_det_glyphs_from_notes). curent_pitch
+ * is the height of the note that we want to "add" to the glyph.
+ * last_pitch is the height of the last note of current_glyph. shape
+ * is the shape of the note we want to "add" to the glyph.
+ *
+ * The function returns a char, which meaning is explained below.
+ *
+ * end_of_glyph is a pointer to the result of the determination, here
+ * are the meanings :
+ *
+ * DET_NO_END: we have successfully added the note to the glyph, and
+ * we return the new type of the glyph. We may again add notes to the
+ * glyph.
+ *
+ * DET_END_OF_PREVIOUS: we have not been able to add the note to the
+ * glyph, so we will have to close the glyph.
+ *
+ * DET_END_OF_CURRENT: we have been able to add the note to the glyph,
+ * but we won't be able to add more notes to the glyph, we can close
+ * it. The new type is returned.
+ *
+ * DET_END_OF_BOTH: we haven't been able to add the note to the glyph,
+ * and we won't be able to add notes to the new glyph. This special
+ * case is quite rare, we use it for trivirga, tristropha, etc.
+ *
+ * When we encouter a S_QUADRATUM (or S_QUILISMA_QUADRATUM), we build
+ * a new glyph with the (temporary) shape G_PES_QUADRATUM_FIRST_PART
+ * (or G_PES_QUILISMA_QUADRATUM_FIRST_PART), and we wait for the next
+ * note.
+ *
+ ****************************/
+
+static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
+ char current_pitch, char last_pitch, gregorio_shape shape,
+ gregorio_liquescentia liquescentia,
+ gregorio_note *current_glyph_first_note,
+ gabc_determination *end_of_glyph,
+ gregorio_shape *punctum_inclinatum_orientation)
+{
+ #define this_note_starts_new_glyph { \
+ next_glyph_type = G_PUNCTUM; \
+ *end_of_glyph = DET_END_OF_PREVIOUS; \
+ }
+
+ /* next glyph type is the type of the glyph that will be returned (the
+ * new type of the glyph with the note added to it, or the type of the
+ * new glyph with the note alone. */
+ gregorio_glyph_type next_glyph_type = G_UNDETERMINED;
+
+ *end_of_glyph = DET_NO_END;
+
+ /* here we separate notes that would be logically in the same glyph
+ * but that are too far to be so */
+ if (last_pitch) {
+ if (current_pitch - last_pitch > MAX_AMBITUS
+ || current_pitch - last_pitch < -MAX_AMBITUS) {
+ current_glyph_type = G_UNDETERMINED;
+ }
+ }
+
+ switch (shape) {
+ case S_LINEA_PUNCTUM:
+ case S_LINEA:
+ next_glyph_type = G_PUNCTUM;
+ *end_of_glyph = DET_END_OF_BOTH;
+ break;
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ next_glyph_type = G_ALTERATION;
+ *end_of_glyph = DET_END_OF_BOTH;
+ break;
+ case S_PUNCTUM:
+ /*
+ * we determine here the shape of the thing if it is made of puncta
+ */
+ if (current_pitch == last_pitch) {
+ this_note_starts_new_glyph;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_PUNCTUM:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PODATUS;
+ } else {
+ next_glyph_type = G_FLEXA;
+ }
+ break;
+ case G_PODATUS:
+ if (current_pitch > last_pitch) {
+ if (is_normal_punctum(current_glyph_first_note)) {
+ next_glyph_type = G_SCANDICUS;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ } else {
+ next_glyph_type = G_TORCULUS;
+ }
+ break;
+ case G_PES_QUADRATUM_FIRST_PART:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PES_QUADRATUM;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ next_glyph_type = G_FLEXA;
+ }
+ break;
+ case G_PES_QUILISMA_QUADRATUM_FIRST_PART:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_PES_QUADRATUM;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_PES_ASCENDENS_ORISCUS:
+ case G_PES_DESCENDENS_ORISCUS:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_SALICUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_SALICUS:
+ if (current_pitch < last_pitch) {
+ next_glyph_type = G_SALICUS_FLEXUS;
+ *end_of_glyph = DET_END_OF_CURRENT;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_FLEXA:
+ if (current_pitch > last_pitch) {
+ if (is_normal_punctum(current_glyph_first_note)) {
+ next_glyph_type = G_PORRECTUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ } else {
+ if (liquescentia & L_DEMINUTUS) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_ANCUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ }
+ break;
+ case G_TORCULUS:
+ if (current_pitch > last_pitch) {
+ next_glyph_type = G_TORCULUS_RESUPINUS;
+ } else if (liquescentia == L_DEMINUTUS) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TORCULUS_LIQUESCENS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case G_TORCULUS_RESUPINUS:
+ if (current_pitch > last_pitch) {
+ this_note_starts_new_glyph;
+ } else {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TORCULUS_RESUPINUS_FLEXUS;
+ }
+ break;
+ case G_PORRECTUS:
+ if (current_pitch > last_pitch) {
+ this_note_starts_new_glyph;
+ } else {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_PORRECTUS_FLEXUS;
+ }
+ break;
+ default:
+ this_note_starts_new_glyph;
+ break;
+ }
+ break;
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ case S_QUILISMA:
+ this_note_starts_new_glyph;
+ break;
+ case S_VIRGA:
+ if (current_glyph_type == G_VIRGA && last_pitch == current_pitch) {
+ next_glyph_type = G_BIVIRGA;
+ } else {
+ if (current_glyph_type == G_BIVIRGA && last_pitch == current_pitch) {
+ next_glyph_type = G_TRIVIRGA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_VIRGA;
+ }
+ }
+ break;
+ case S_VIRGA_REVERSA:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_VIRGA_REVERSA;
+ break;
+ case S_BIVIRGA:
+ if (current_glyph_type == G_VIRGA && last_pitch == current_pitch) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRIVIRGA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_BIVIRGA;
+ }
+ break;
+ case S_TRIVIRGA:
+ *end_of_glyph = DET_END_OF_BOTH;
+ next_glyph_type = G_TRIVIRGA;
+ break;
+ case S_QUADRATUM:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PES_QUADRATUM_FIRST_PART;
+ break;
+ case S_QUILISMA_QUADRATUM:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PES_QUILISMA_QUADRATUM_FIRST_PART;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ if (current_glyph_type == G_PUNCTUM && last_pitch < current_pitch) {
+ next_glyph_type = G_PES_ASCENDENS_ORISCUS;
+ /* Therefore G_PES_ASCENDENS_ORISCUS might be fronting an
+ * undetermined oriscus scapus. This will be resolved during
+ * oriscus orientation determination */
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ if (current_glyph_type == G_PUNCTUM && last_pitch < current_pitch) {
+ next_glyph_type = G_PES_DESCENDENS_ORISCUS;
+ } else {
+ this_note_starts_new_glyph;
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ /*
+ * Warning : this part of the code is specific to the
+ * declarations of the header file
+ */
+ if (current_glyph_type > G_PUNCTA_INCLINATA) {
+ /*
+ * meaning that the previous glyph is not a combination of puncta
+ * inclinata, see header file for details
+ */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ if (current_pitch == last_pitch) {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ if (is_punctum_inclinatum(shape, true)
+ && *punctum_inclinatum_orientation != shape
+ && *punctum_inclinatum_orientation
+ != S_PUNCTUM_INCLINATUM_UNDETERMINED) {
+ /* change of orientation ends the glyph */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_PUNCTUM_INCLINATUM;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_PUNCTUM_INCLINATUM:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_2_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_2_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_3_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_4_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_5_PUNCTA_INCLINATA_ASCENDENS;
+ } else {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ }
+ break;
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_3_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_4_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ if (last_pitch < current_pitch) {
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ } else {
+ next_glyph_type = G_5_PUNCTA_INCLINATA_DESCENDENS;
+ }
+ break;
+ default:
+ next_glyph_type = G_PUNCTA_INCLINATA;
+ break;
+ }
+ break;
+ case S_STROPHA:
+ if (last_pitch != current_pitch) {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_STROPHA;
+ break;
+ }
+ switch (current_glyph_type) {
+ case G_STROPHA:
+ next_glyph_type = G_DISTROPHA;
+ break;
+ case G_DISTROPHA:
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRISTROPHA;
+ break;
+ default:
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_STROPHA;
+ break;
+ }
+ break;
+ case S_DISTROPHA:
+ if (last_pitch == current_pitch && current_glyph_type == G_STROPHA) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ next_glyph_type = G_TRISTROPHA;
+ } else {
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ next_glyph_type = G_DISTROPHA;
+ }
+ break;
+ case S_TRISTROPHA:
+ *end_of_glyph = DET_END_OF_BOTH;
+ next_glyph_type = G_TRISTROPHA;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_note_to_a_glyph, "unexpected shape: %s",
+ gregorio_shape_to_string(shape));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ /* end of the main switch */
+
+ if (current_glyph_type == G_UNDETERMINED) {
+ /*
+ * means that this is the first glyph or that the previous glyph has
+ * already been added
+ */
+ if (*end_of_glyph == DET_END_OF_PREVIOUS) {
+ *end_of_glyph = DET_NO_END;
+ } else {
+ if (*end_of_glyph == DET_END_OF_BOTH) {
+ *end_of_glyph = DET_END_OF_CURRENT;
+ }
+ }
+ }
+
+ /*
+ * WARNING : Ugly section of the code, just some kind of patch for it to work
+ * with fonts that can't handle large intervals.
+ */
+ /* here we separate notes that would be logically in the same glyph
+ * but that are too far to be so, we already said to the function that
+ * it was not the same glyph, there we must say that the previous
+ * glyph has ended. */
+ if (last_pitch) {
+ if (current_pitch - last_pitch > MAX_AMBITUS
+ || current_pitch - last_pitch < -MAX_AMBITUS) {
+ if (*end_of_glyph == DET_END_OF_CURRENT
+ || *end_of_glyph == DET_END_OF_BOTH) {
+ /* There is no current way for the code to end up here, but
+ * we'll leave it in because it's a good safety precaution in
+ * case something new is added in the future */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("Encountered the need to switch "
+ "DET_END_OF_CURRENT to DET_END_OF_BOTH because of "
+ "overly large ambitus"),
+ "add_note_to_a_glyph", VERBOSITY_WARNING,
+ __LINE__);
+ *end_of_glyph = DET_END_OF_BOTH;
+ } else {
+ /* LCOV_EXCL_STOP */
+ *end_of_glyph = DET_END_OF_PREVIOUS;
+ }
+ }
+ }
+
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ *punctum_inclinatum_orientation = shape;
+ break;
+ case S_PUNCTUM_INCLINATUM_UNDETERMINED:
+ break;
+ default:
+ *punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ break;
+ }
+
+ return next_glyph_type;
+}
+
+static bool is_cavum(gregorio_note *note, gregorio_note *last_note)
+{
+ bool is_cavum = false;
+ for (; note; note = note->next) {
+ if (note->type == GRE_NOTE) {
+ is_cavum = is_cavum || note->u.note.is_cavum;
+ }
+ /* don't look past the last note */
+ if (note == last_note) {
+ break;
+ }
+ }
+ return is_cavum;
+}
+
+/****************************
+ *
+ * First see the comments of
+ * gabc_det_glyphs_from_notes. This function is used when
+ * we have finished to determine a glyph. We have the last glyph that
+ * have been added: last_glyph. The glyph we want to add is given by
+ * glyph_type and liquescentia.
+ *
+ * The glyph we want to add goes from first_note to current_note, we
+ * isolate these notes from the notes that won't be in the glyph, and
+ * we add the glyph to the list_of_glyphs.
+ *
+****************************/
+
+static gregorio_note *close_normal_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note)
+{
+ gregorio_note *new_current_note = current_note;
+ gregorio_scanner_location loc;
+
+ /* patch to have good glyph type in the case where a glyph ends by a note
+ * with shape S_QUADRATUM */
+ if (glyph_type == G_PES_QUADRATUM_FIRST_PART
+ || glyph_type == G_PES_QUILISMA_QUADRATUM_FIRST_PART) {
+ glyph_type = G_PUNCTUM;
+ }
+
+ gregorio_add_glyph(last_glyph, glyph_type, *first_note, liquescentia,
+ is_cavum(*first_note, current_note));
+
+ if (current_note->next) {
+ current_note->next->previous = NULL;
+ *first_note = current_note->next;
+ current_note->next = NULL;
+ }
+ /* here we "patch" the structure for bivirga, tristropha, etc. */
+ /* the idea is not to have a S_BIVIRGA in the shape of the note (which is
+ * dirty) but rather a G_BIVIRGA in the glyph (which is the case now) and
+ * two virgas */
+
+ if (glyph_type == G_BIVIRGA || glyph_type == G_DISTROPHA
+ || glyph_type == G_TRIVIRGA || glyph_type == G_TRISTROPHA
+ || glyph_type == G_DISTROPHA_AUCTA
+ || glyph_type == G_TRISTROPHA_AUCTA) {
+ gregorio_go_to_first_note(&current_note);
+ while (current_note) {
+ /* a variable necessary for the patch for G_BIVIRGA & co. */
+ gregorio_note *added_notes = NULL;
+ gregorio_note *next_note = NULL;
+ if (current_note->type == GRE_NOTE) {
+ switch (current_note->u.note.shape) {
+ case S_TRIVIRGA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, _NO_SIGN, L_NO_LIQUESCENTIA, current_note,
+ copy_note_location(current_note, &loc));
+ /* fall through */
+ case S_BIVIRGA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, _NO_SIGN, L_NO_LIQUESCENTIA, current_note,
+ copy_note_location(current_note, &loc));
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_VIRGA, current_note->signs,
+ current_note->u.note.liquescentia, current_note,
+ copy_note_location(current_note, &loc));
+ break;
+ case S_TRISTROPHA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, _NO_SIGN, L_NO_LIQUESCENTIA,
+ current_note,
+ copy_note_location(current_note, &loc));
+ /* fall through */
+ case S_DISTROPHA:
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, _NO_SIGN, L_NO_LIQUESCENTIA,
+ current_note,
+ copy_note_location(current_note, &loc));
+ gregorio_add_note(&added_notes, current_note->u.note.pitch,
+ S_STROPHA, current_note->signs,
+ current_note->u.note.liquescentia, current_note,
+ copy_note_location(current_note, &loc));
+ break;
+ default:
+ break;
+ }
+ }
+ if (!added_notes) {
+ /* nothing added, but we must go on in case it's
+ * virga+bivirga = trivirga or stropa+bistropha = tristropha */
+ if (current_note->next) {
+ current_note = current_note->next;
+ continue;
+ } else {
+ break;
+ }
+ }
+ next_note = current_note->next;
+ /* now we have what we want, we set up the links and free the old
+ * note */
+ if (next_note) {
+ current_note->next->previous = added_notes;
+ added_notes->next = next_note;
+ }
+ if (current_note == new_current_note) {
+ new_current_note = added_notes;
+ }
+ gregorio_go_to_first_note(&added_notes);
+ if (current_note->previous) {
+ current_note->previous->next = added_notes;
+ added_notes->previous = current_note->previous;
+ }
+ /* Detaching current_note is not strictly necessary here because we
+ * are effectively plucking out added_notes into its own glyph;
+ * however, detaching the note is safer if this behavior changes in
+ * the future because gregorio_free_one_note nullifies surrounding
+ * pointers */
+ current_note->next = NULL;
+ current_note->previous = NULL;
+ gregorio_free_one_note(&current_note);
+ if (!next_note) {
+ current_note = added_notes;
+ break;
+ }
+ current_note = next_note;
+ }
+ gregorio_go_to_first_note(&current_note);
+ /* finally we set the just added glyph first_note to current_note */
+ (*last_glyph)->u.notes.first_note = current_note;
+ }
+ return new_current_note;
+}
+
+static gregorio_note *close_fused_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note)
+{
+ (*first_note)->u.note.liquescentia |= (liquescentia & L_FUSED);
+ return close_normal_glyph(last_glyph, glyph_type, first_note, liquescentia,
+ current_note);
+}
+
+static gregorio_note *next_non_texverb_note(gregorio_note *first_note,
+ gregorio_note *last_note)
+{
+ gregorio_not_null(first_note, gregorio_note, return NULL);
+
+ if (first_note == last_note) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_assert_only(first_note->type != GRE_TEXVERB_GLYPH,
+ next_non_texverb_note, "Unexpected texverb at start of iteration");
+ return first_note;
+ /* LCOV_EXCL_STOP */
+ }
+
+ for (first_note = first_note->next; first_note && first_note != last_note;
+ first_note = first_note->next) {
+ if (first_note->type != GRE_TEXVERB_GLYPH) {
+ return first_note;
+ }
+ }
+
+ gregorio_assert_only(!first_note || first_note->type != GRE_TEXVERB_GLYPH,
+ next_non_texverb_note, "Unexpected texverb at end of iteration");
+
+ return last_note;
+}
+
+static void add_intervening_texverbs(gregorio_glyph **last_glyph,
+ gregorio_note *first_note, gregorio_note *last_note)
+{
+ for ( ; first_note && first_note->type == GRE_TEXVERB_GLYPH; ) {
+ bool on_last_note = (first_note == last_note);
+
+ gregorio_add_unpitched_element_as_glyph(last_glyph, first_note->type,
+ &(first_note->u.other), _NO_SIGN, first_note->texverb);
+ first_note->texverb = 0;
+ gregorio_free_one_note(&first_note);
+
+ if (on_last_note) {
+ break;
+ }
+ }
+}
+
+static gregorio_note *close_fusion_glyph(gregorio_glyph **last_glyph,
+ gregorio_note **first_note, gregorio_liquescentia liquescentia,
+ gregorio_note *real_last_note,
+ gregorio_shape *const punctum_inclinatum_orientation)
+{
+ bool first = true;
+ gregorio_note *last_note, *texverb_tail;
+ gregorio_note *next;
+ int prev_shift = 0, shift, shift2;
+ gregorio_note *result;
+
+ gregorio_assert((*first_note)->type != GRE_TEXVERB_GLYPH,
+ close_fusion_glyph, "Unexpected texverb at start of fusion",
+ return real_last_note);
+
+ for (last_note = real_last_note;
+ last_note != *first_note && last_note->type == GRE_TEXVERB_GLYPH;
+ last_note = last_note->previous) {
+ /* skip over the trailing texverbs */
+ }
+ texverb_tail = (last_note == real_last_note)? NULL : last_note->next;
+
+ for (;;) {
+ bool processed = false;
+
+ /* fusion must work through glyph-level texverbs */
+ if ((*first_note)->type == GRE_TEXVERB_GLYPH) {
+ gregorio_add_unpitched_element_as_glyph(last_glyph,
+ (*first_note)->type, &((*first_note)->u.other), _NO_SIGN,
+ (*first_note)->texverb);
+ (*first_note)->texverb = 0;
+ gregorio_assert(*first_note != last_note,
+ close_fusion_glyph, "Unexpected texverb at end of fusion",
+ return last_note);
+ gregorio_free_one_note(first_note);
+ }
+
+ if (*first_note == last_note) {
+ close_fused_glyph(last_glyph, G_PUNCTUM, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, last_note);
+ return last_note;
+ }
+
+ gregorio_assert((*first_note)->next, close_fusion_glyph,
+ "Unexpected single note during fusion", return last_note);
+
+ next = next_non_texverb_note(*first_note, last_note);
+
+ shift = next->u.note.pitch - (*first_note)->u.note.pitch;
+ if (shift != 0 && next == last_note) {
+ /* there are exactly two notes left, so we end fusion */
+ add_intervening_texverbs(last_glyph, (*first_note)->next, next);
+ result = close_fused_glyph(last_glyph,
+ shift < 0? G_FLEXA : G_PODATUS, first_note,
+ liquescentia, last_note);
+ if (texverb_tail) {
+ add_intervening_texverbs(last_glyph, texverb_tail,
+ real_last_note);
+ }
+ return result;
+ }
+ if (prev_shift >= 0 && shift < 0) {
+ /* check for a porrectus-like flexus */
+ gregorio_note *next_next = next_non_texverb_note(next, last_note);
+ gregorio_assert(next_next, close_fusion_glyph,
+ "Unexpected end of notes during fusion", return last_note);
+ shift2 = next_next->u.note.pitch - next->u.note.pitch;
+ if (shift2 > 0) {
+ if (next_next == last_note) {
+ /* there are exactly three notes left in a porrectus shape,
+ * so we end fusion */
+ add_intervening_texverbs(last_glyph, (*first_note)->next,
+ next);
+ add_intervening_texverbs(last_glyph, next->next, next_next);
+ result = close_fused_glyph(last_glyph,
+ G_PORRECTUS, first_note,
+ liquescentia, last_note);
+ add_intervening_texverbs(last_glyph, texverb_tail,
+ real_last_note);
+ return result;
+ }
+ /* found a porrectus-like flexus */
+ add_intervening_texverbs(last_glyph, *first_note, next);
+ close_fused_glyph(last_glyph,
+ shift < 0? G_FLEXA : G_PODATUS, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, next);
+ prev_shift = shift2;
+ processed = true;
+ }
+ }
+
+ if (!processed) {
+ /* didn't find anything interesting, so fuse the single note */
+ gabc_determination ignored;
+ gregorio_glyph_type next_glyph_type =
+ add_note_to_a_glyph(G_UNDETERMINED,
+ (*first_note)->u.note.pitch, 0, (*first_note)->u.note.shape,
+ (*first_note)->u.note.liquescentia, *first_note, &ignored,
+ punctum_inclinatum_orientation);
+ close_fused_glyph(last_glyph, next_glyph_type, first_note,
+ liquescentia & ~TAIL_LIQUESCENTIA_MASK, *first_note);
+ prev_shift = shift;
+ }
+
+ if (first) {
+ first = false;
+ liquescentia = (liquescentia & TAIL_LIQUESCENTIA_MASK) | L_FUSED;
+ }
+ }
+}
+
+static gregorio_note *close_glyph(gregorio_glyph **last_glyph,
+ gregorio_glyph_type glyph_type, gregorio_note **first_note,
+ gregorio_liquescentia liquescentia, gregorio_note *current_note,
+ gregorio_shape *const punctum_inclinatum_orientation)
+{
+ /* special case for fusion when rarer shapes don't exist */
+ if (glyph_type == G_TORCULUS) {
+ switch ((*first_note)->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ glyph_type = G_FUSED;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (glyph_type == G_FUSED) {
+ return close_fusion_glyph(last_glyph, first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ } else {
+ return close_normal_glyph(last_glyph, glyph_type, first_note,
+ liquescentia, current_note);
+ }
+}
+
+/* a small function to automatically determine the pitch of a custo : it is
+ * the pitch of the next note, but we must take care of the clef changes, as
+ * custo are (normally and for now) only present before clef changes. */
+/* TODO: there may be a side effect with the flated keys... */
+
+static char gabc_determine_custo_pitch(gregorio_note *current_note,
+ int current_key, const gregorio_score *const score)
+{
+ int pitch_difference = 0;
+ int newkey;
+ for (; current_note; current_note = current_note->next) {
+ switch (current_note->type) {
+ case GRE_CLEF:
+ newkey = gregorio_calculate_new_key(current_note->u.clef);
+ pitch_difference = newkey - current_key;
+ break;
+
+ case GRE_NOTE:
+ pitch_difference =
+ (int) current_note->u.note.pitch - pitch_difference;
+ while (pitch_difference < LOWEST_PITCH) {
+ pitch_difference += 7;
+ }
+ while (pitch_difference > score->highest_pitch) {
+ pitch_difference -= 7;
+ }
+ assert(pitch_difference >= LOWEST_PITCH
+ && pitch_difference <= score->highest_pitch);
+ return (char) pitch_difference;
+
+ default:
+ break;
+ }
+ }
+ return DUMMY_PITCH;
+}
+
+/****************************
+ *
+ * Function called with a list of gregorio_notes as argument, this
+ * list is determined from gabc notation by the function
+ * gabc_det_notes_from_string.
+ *
+ * In this function we create a list of glyphs, by determining their
+ * type according to the sequence of notes (we look at their height,
+ * shape, etc.). Each glyph has a pointer gregorio_note *first_note
+ * that will be filled with the good note (and notes will be cut as
+ * explained in the comments on close_glyph function).
+ *
+ * Here is how it works :
+ * current_glyph is the glyph we are currently determining, that is to
+ * say a glyph whose type may change according to the note we will add
+ * to it.
+ * current_note is the note we are currently dealing with.
+ * Let's take an example, if the list of notes is ab, the first step
+ * (current_glyph: undetermined, current_note: a) will be to add a to
+ * nothing, that will give a glyph "punctum" containing only one note:
+ * a. In the second step (current_glyph: punctum, current_note: b) we
+ * transform the glyph in "pes".
+ * For special notes like a key change or something, we stop the
+ * determination of the current glyph, we delete the note and we add
+ * it as a glyph.
+ *
+ * When we determine the glyphs we can encounter the shapes
+ * S_QUADRATUM and S_QUILISMA_QUADRATUM, which means that the
+ * corresponding note is the first note of a pes quadratum (it can
+ * have the shape quilisma for very rare forms). But these shapes must
+ * not appear in the final form of the score, and we transform them
+ * respectively in punctum and quilisma (and the glyph type must be
+ * pes_quadratum, but it is done in add_note_to_a_glyph).
+ *
+****************************/
+
+/* this function updates current_key with the new values (with clef changes) */
+
+gregorio_glyph *gabc_det_glyphs_from_notes(gregorio_note *current_note,
+ int *current_key, gregorio_shape *const punctum_inclinatum_orientation,
+ const gregorio_score *const score)
+{
+ /* the first note of the current glyph, to be able to close it well:
+ * later we will cut the link (next_notes and previous_note) between
+ * this note and the previous one */
+ gregorio_note *current_glyph_first_note = current_note;
+
+ /* the last glyph we have totally determined. It is automatically
+ * updated by close_glyph(). */
+ gregorio_glyph *last_glyph = NULL;
+
+ /* type of the glyph we are currently determining */
+ gregorio_glyph_type current_glyph_type = G_UNDETERMINED;
+ gregorio_glyph_type next_glyph_type = G_UNDETERMINED;
+ char last_pitch = USELESS_VALUE;
+ gregorio_note *next_note = NULL;
+
+ /* determination of end of glyphs, see comments on
+ * add_note_to_a_glyph */
+ gabc_determination end_of_glyph = DET_NO_END;
+
+ /* a char representing the liquescentia of the current glyph */
+ gregorio_liquescentia liquescentia = L_NO_LIQUESCENTIA;
+ gregorio_liquescentia head_liquescentia;
+ bool autofuse = false, first_autofused_note = false;
+
+ gregorio_assert(current_note, gabc_det_glyphs_from_notes,
+ "current_note may not be NULL", return NULL);
+
+ gregorio_go_to_first_note(&current_note);
+
+ while (current_note) {
+ bool add = true;
+
+ next_note = current_note->next;
+ if (current_note->type != GRE_NOTE) {
+ gregorio_type type = current_note->type;
+ char pitch = USELESS_VALUE;
+ bool force = false;
+ gregorio_sign sign = _NO_SIGN;
+
+ if (current_glyph_type == G_FUSED
+ && (type == GRE_TEXVERB_GLYPH || type == GRE_TEXVERB_ELEMENT)) {
+ current_note = next_note;
+ continue;
+ }
+
+ if (current_glyph_type != G_UNDETERMINED) {
+ close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ }
+
+ switch (type) {
+ case GRE_CLEF:
+ pitch = current_note->u.note.pitch;
+ *current_key = gregorio_calculate_new_key(current_note->u.clef);
+ break;
+
+ case GRE_CUSTOS:
+ pitch = gabc_determine_custo_pitch(current_note->next,
+ *current_key, score);
+ break;
+
+ case GRE_MANUAL_CUSTOS:
+ pitch = current_note->u.note.pitch;
+ type = GRE_CUSTOS;
+ force = true;
+ break;
+
+ case GRE_BAR:
+ /* we calculate the signs of the bars */
+ if (current_note->signs == _V_EPISEMA) {
+ sign = _V_EPISEMA;
+ } else {
+ sign = current_note->special_sign;
+ }
+ if (current_note->h_episema_above) {
+ if (sign == _V_EPISEMA) {
+ sign = _V_EPISEMA_BAR_H_EPISEMA;
+ } else {
+ sign = _BAR_H_EPISEMA;
+ }
+ }
+ break;
+
+ case GRE_AUTOFUSE_START:
+ autofuse = true;
+ first_autofused_note = true;
+ add = false;
+ break;
+
+ case GRE_AUTOFUSE_END:
+ autofuse = false;
+ add = false;
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+
+ if (add) {
+ if (pitch == USELESS_VALUE) {
+ gregorio_add_unpitched_element_as_glyph(&last_glyph, type,
+ &(current_note->u.other), sign,
+ current_note->texverb);
+ } else if (type == GRE_CLEF) {
+ gregorio_add_clef_as_glyph(&last_glyph,
+ current_note->u.clef, current_note->texverb);
+ } else {
+ gregorio_add_pitched_element_as_glyph(&last_glyph, type,
+ pitch, force, current_note->texverb);
+ }
+ }
+ current_glyph_first_note = current_note->next;
+ current_note->texverb = 0;
+ gregorio_free_one_note(&current_note);
+ last_pitch = USELESS_VALUE;
+ continue;
+ }
+
+ /* first we do what must be done with liquescentia */
+ head_liquescentia = current_note->u.note.liquescentia
+ & (L_INITIO_DEBILIS | L_FUSED);
+ if (head_liquescentia) {
+ /* initio debilis or fused */
+ if (current_glyph_type != G_UNDETERMINED) {
+ /* if it is not the first glyph */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ liquescentia, current_note->previous,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ }
+ liquescentia = head_liquescentia;
+ }
+
+ if (autofuse) {
+ if (current_glyph_first_note == current_note) {
+ if (first_autofused_note) {
+ first_autofused_note = false;
+ } else {
+ if (!(current_note->u.note.liquescentia & L_INITIO_DEBILIS)) {
+ current_note->u.note.liquescentia |= L_FUSED;
+ liquescentia |= L_FUSED;
+ }
+ }
+ } else {
+ /* only handle the multi-note case here; the single-note
+ * case will be added normally by the state machine */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia)
+ && current_glyph_type > G_PUNCTA_INCLINATA) {
+ /* once we hit a liquescent, that's the end of a string of
+ * fused notes */
+ liquescentia |= current_note->u.note.liquescentia;
+ current_note = close_glyph(&last_glyph, G_FUSED,
+ &current_glyph_first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ add = false;
+ } else {
+ switch (current_note->u.note.shape) {
+ case S_PUNCTUM:
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ case S_QUILISMA:
+ case S_QUADRATUM:
+ case S_QUILISMA_QUADRATUM:
+ /* these are fusible */
+ if (current_glyph_type <= G_PUNCTA_INCLINATA
+ || current_note->u.note.shape != S_PUNCTUM) {
+ /* if we had some puncta inclinata, then end them */
+ /* if the current shape is not a punctum, start a
+ * new shape */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ liquescentia, current_note->previous,
+ punctum_inclinatum_orientation);
+ if (!(current_note->u.note.liquescentia
+ & L_INITIO_DEBILIS)) {
+ current_note->u.note.liquescentia |= L_FUSED;
+ liquescentia |= L_FUSED;
+ }
+ }
+ next_glyph_type = current_glyph_type = G_FUSED;
+ add = false;
+ break;
+
+ default:
+ /* not fusible; will be added normally by the state
+ * machine */
+ break;
+ }
+ }
+ }
+ }
+
+ if (add) {
+ next_glyph_type = add_note_to_a_glyph(current_glyph_type,
+ current_note->u.note.pitch, last_pitch,
+ current_note->u.note.shape,
+ current_note->u.note.liquescentia,
+ current_glyph_first_note, &end_of_glyph,
+ punctum_inclinatum_orientation);
+ }
+
+ /* patch to have good shapes in the special cases of pes quadratum and
+ * pes quilisma quadratum. */
+ switch (current_note->u.note.shape) {
+ case S_QUADRATUM:
+ current_note->u.note.shape = S_PUNCTUM;
+ break;
+
+ case S_QUILISMA_QUADRATUM:
+ current_note->u.note.shape = S_QUILISMA;
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+
+ if (add) {
+ /* see comments on add_note_to_a_glyph for the meaning of
+ * end_of_glyph */
+ switch (end_of_glyph) {
+ case DET_NO_END:
+ current_glyph_type = next_glyph_type;
+ /*
+ * we deal with liquescentia
+ */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia)) {
+ /* special cases of oriscus descendens, treated like normal
+ * oriscus in some cases. */
+ if (score->legacy_oriscus_orientation) {
+ if (current_note->u.note.shape == S_ORISCUS_DESCENDENS
+ && current_note->next
+ && current_note->next->type == GRE_NOTE
+ && current_note->next->u.note.pitch <
+ current_note->u.note.pitch) {
+ last_pitch = current_note->u.note.pitch;
+ current_note->u.note.shape = S_ORISCUS_ASCENDENS;
+ current_note->u.note.liquescentia =
+ L_NO_LIQUESCENTIA;
+ current_note = next_note;
+ continue;
+ }
+ }
+ /* special cases of the punctum inclinatum deminutus and
+ * auctus */
+ if (is_punctum_inclinatum(current_note->u.note.shape, false)) {
+ if (current_note->u.note.liquescentia == L_DEMINUTUS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_DEMINUTUS;
+ }
+ if (current_note->u.note.liquescentia
+ == L_AUCTUS_DESCENDENS
+ || current_note->u.note.liquescentia
+ == L_AUCTUS_ASCENDENS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_AUCTUS;
+ }
+
+ if (current_note->next
+ && current_note->next->type == GRE_NOTE
+ && is_punctum_inclinatum(
+ current_note->next->u.note.shape, false)
+ && current_note->next->u.note.liquescentia
+ == L_DEMINUTUS) {
+ last_pitch = current_note->u.note.pitch;
+ current_note = next_note;
+ continue;
+ }
+ }
+ liquescentia |= current_note->u.note.liquescentia;
+ /* once again, only works with the good values in the header
+ * file */
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note, punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ }
+ break;
+ case DET_END_OF_PREVIOUS:
+ if (current_note->previous)
+ {
+ /* we don't want to close previous glyph twice */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous,
+ punctum_inclinatum_orientation);
+ }
+ current_glyph_type = next_glyph_type;
+ liquescentia = L_NO_LIQUESCENTIA;
+ last_pitch = USELESS_VALUE;
+ /* we deal with liquescentia */
+ if (is_tail_liquescentia(current_note->u.note.liquescentia))
+ /* not an initio debilis, because we considered it in the first
+ * part... */
+ {
+ /* special cases of the punctum inclinatum deminutus and
+ * auctus */
+ if (is_punctum_inclinatum(current_note->u.note.shape, false)) {
+ if (current_note->u.note.liquescentia == L_DEMINUTUS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_DEMINUTUS;
+ }
+ if (current_note->u.note.liquescentia ==
+ L_AUCTUS_DESCENDENS
+ || current_note->u.note.liquescentia ==
+ L_AUCTUS_ASCENDENS) {
+ current_note->u.note.shape =
+ S_PUNCTUM_INCLINATUM_AUCTUS;
+ }
+ if (current_note->next
+ && current_note->next->type == GRE_NOTE
+ && is_punctum_inclinatum(
+ current_note->next->u.note.shape, false)
+ && current_note->next->u.note.liquescentia ==
+ L_DEMINUTUS) {
+ current_note = next_note;
+ continue;
+ }
+ }
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note,
+ current_note->u.note.liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ }
+ break;
+ case DET_END_OF_CURRENT:
+ liquescentia += current_note->u.note.liquescentia;
+ /* once again, only works with the good values in the header file */
+ current_note = close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note, liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ break;
+ case DET_END_OF_BOTH:
+ if (current_note->previous)
+ {
+ /* we don't want to close previous glyph twice */
+ close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia,
+ current_note->previous,
+ punctum_inclinatum_orientation);
+ }
+ current_glyph_type = G_UNDETERMINED;
+ liquescentia = L_NO_LIQUESCENTIA;
+ current_note = close_glyph(&last_glyph, next_glyph_type,
+ &current_glyph_first_note,
+ current_note->u.note.liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ break;
+ }
+ }
+
+ if (!next_note && current_glyph_type != G_UNDETERMINED) {
+ /* we must end the determination here */
+ current_note = close_glyph(&last_glyph, current_glyph_type,
+ &current_glyph_first_note, liquescentia, current_note,
+ punctum_inclinatum_orientation);
+ }
+
+ last_pitch = current_note->u.note.pitch;
+ current_note = next_note;
+ }
+ /* end of while */
+
+ gregorio_go_to_first_glyph(&last_glyph);
+ return last_glyph;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c
new file mode 100644
index 00000000000..482c7f06dd0
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination-l.c
@@ -0,0 +1,15127 @@
+#line 1 "gabc/gabc-notes-determination-l.c"
+
+#line 3 "gabc/gabc-notes-determination-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gabc_notes_determination__create_buffer
+#define yy_delete_buffer gabc_notes_determination__delete_buffer
+#define yy_scan_buffer gabc_notes_determination__scan_buffer
+#define yy_scan_string gabc_notes_determination__scan_string
+#define yy_scan_bytes gabc_notes_determination__scan_bytes
+#define yy_init_buffer gabc_notes_determination__init_buffer
+#define yy_flush_buffer gabc_notes_determination__flush_buffer
+#define yy_load_buffer_state gabc_notes_determination__load_buffer_state
+#define yy_switch_to_buffer gabc_notes_determination__switch_to_buffer
+#define yypush_buffer_state gabc_notes_determination_push_buffer_state
+#define yypop_buffer_state gabc_notes_determination_pop_buffer_state
+#define yyensure_buffer_stack gabc_notes_determination_ensure_buffer_stack
+#define yy_flex_debug gabc_notes_determination__flex_debug
+#define yyin gabc_notes_determination_in
+#define yyleng gabc_notes_determination_leng
+#define yylex gabc_notes_determination_lex
+#define yylineno gabc_notes_determination_lineno
+#define yyout gabc_notes_determination_out
+#define yyrestart gabc_notes_determination_restart
+#define yytext gabc_notes_determination_text
+#define yywrap gabc_notes_determination_wrap
+#define yyalloc gabc_notes_determination_alloc
+#define yyrealloc gabc_notes_determination_realloc
+#define yyfree gabc_notes_determination_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_notes_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_notes_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_notes_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_notes_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_notes_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_notes_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_notes_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_notes_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_notes_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_notes_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_notes_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_notes_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_notes_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_notes_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_notes_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_notes_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_notes_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_notes_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_notes_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_notes_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_notes_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_notes_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_notes_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_notes_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_notes_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_notes_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_notes_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_notes_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_notes_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_notes_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_notes_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_notes_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_notes_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_notes_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_notes_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_notes_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_notes_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_notes_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_notes_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_notes_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_notes_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_notes_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_notes_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_notes_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_notes_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_notes_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_notes_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_notes_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_notes_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_notes_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_notes_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_notes_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_notes_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_notes_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_notes_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_notes_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_notes_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_notes_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_notes_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_notes_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_notes_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_notes_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_notes_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_notes_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_notes_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_notes_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_notes_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_notes_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_notes_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_notes_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_notes_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_notes_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_notes_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_notes_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_notes_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_notes_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_notes_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_notes_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gabc_notes_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static const flex_int32_t yy_nxt[][256] =
+ {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+ },
+
+ {
+ 39, 40, 40, 40, 40, 40, 40, 40, 40, 41,
+ 41, 40, 40, 41, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 42, 43, 40, 44, 40, 45, 40, 46,
+
+ 40, 40, 40, 40, 47, 48, 49, 50, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 51, 52,
+ 53, 54, 55, 40, 56, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 58,
+ 57, 40, 59, 40, 40, 40, 60, 61, 40, 40,
+ 62, 63, 40, 64, 65, 66, 67, 68, 68, 69,
+ 68, 68, 69, 68, 68, 68, 68, 68, 68, 68,
+ 68, 70, 68, 71, 72, 73, 40, 40, 74, 75,
+ 76, 77, 78, 79, 40, 80, 81, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 39, 40, 40, 40, 40, 40, 40, 40, 40, 41,
+ 41, 40, 40, 41, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 42, 43, 40, 44, 40, 45, 40, 46,
+ 40, 40, 40, 40, 47, 48, 49, 50, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 51, 52,
+ 53, 54, 55, 40, 56, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 58,
+
+ 57, 40, 59, 40, 40, 40, 60, 61, 40, 40,
+ 62, 63, 40, 64, 65, 66, 67, 68, 68, 69,
+ 68, 68, 69, 68, 68, 68, 68, 68, 68, 68,
+ 68, 70, 68, 71, 72, 73, 40, 40, 74, 75,
+ 76, 77, 78, 79, 40, 80, 81, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 39, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 83, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82
+ },
+
+ {
+ 39, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 83, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82
+
+ },
+
+ {
+ 39, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 83, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84
+ },
+
+ {
+ 39, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 83, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+
+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84
+ },
+
+ {
+ 39, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 83, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85
+ },
+
+ {
+ 39, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 83, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85
+ },
+
+ {
+ 39, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 83, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86
+
+ },
+
+ {
+ 39, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 83, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86
+ },
+
+ {
+ 39, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 83, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87
+ },
+
+ {
+ 39, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 83, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87
+ },
+
+ {
+ 39, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 83, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88
+ },
+
+ {
+ 39, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 83, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88
+
+ },
+
+ {
+ 39, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 90, 89, 89, 90, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89
+ },
+
+ {
+ 39, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 90, 89, 89, 90, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89
+ },
+
+ {
+ 39, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 83, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91
+ },
+
+ {
+ 39, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 83, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91
+ },
+
+ {
+ 39, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 83, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92
+
+ },
+
+ {
+ 39, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 83, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 92
+ },
+
+ {
+ 39, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 83, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93
+ },
+
+ {
+ 39, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 83, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93
+ },
+
+ {
+ 39, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 83, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94
+ },
+
+ {
+ 39, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 83, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94
+
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 96, 97, 95, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 96, 97, 95, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 99, 100, 95, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 99, 100, 95, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 95,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 95, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102
+
+ },
+
+ {
+ 39, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 95,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 95, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 103,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 104, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 103,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 104, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 95,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 95, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105
+ },
+
+ {
+ 39, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 95,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 95, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
+ 105, 105, 105, 105, 105, 105
+
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 106,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 107, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 106,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 107, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ 39, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 83, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95
+ },
+
+ {
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39
+
+ },
+
+ {
+ 39, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40
+ },
+
+ {
+ 39, -41, -41, -41, -41, -41, -41, -41, -41, 108,
+ 108, -41, -41, 108, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41
+ },
+
+ {
+ 39, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42
+ },
+
+ {
+ 39, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 110, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 111, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109
+ },
+
+ {
+ 39, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44
+
+ },
+
+ {
+ 39, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45
+ },
+
+ {
+ 39, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, 112, 112,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46
+ },
+
+ {
+ 39, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, 113, 114,
+ 114, 114, 114, 114, 114, 114, 114, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47
+ },
+
+ {
+ 39, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, -48,
+ 115, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, 116, 116, 116,
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
+ 116, -48, 116, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48
+ },
+
+ {
+ 39, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, 117, 117,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49
+
+ },
+
+ {
+ 39, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, 118, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, 119, 120, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, 121, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50
+ },
+
+ {
+ 39, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, 122, -51,
+ -51, -51, -51, 123, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+
+ -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, -51, -51, -51, -51, -51
+ },
+
+ {
+ 39, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, 114,
+ 114, 114, 114, 114, 114, 114, 114, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52
+ },
+
+ {
+ 39, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, 124, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ 125, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53
+ },
+
+ {
+ 39, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54
+
+ },
+
+ {
+ 39, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55
+ },
+
+ {
+ 39, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, 126, 126, 126, 126, 126,
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, -56,
+ 126, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, 127, -56, -56, -56, -56, -56, 128, 128, 129,
+ 128, 128, 129, 128, 128, 128, 128, 128, 128, 128,
+ 128, -56, 128, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56
+ },
+
+ {
+ 39, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, 130, 130,
+ 130, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+
+ -57, -57, -57, -57, -57, -57, 131, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, 132, -57, -57, 133, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57
+ },
+
+ {
+ 39, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, 134, 135,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, -58, -58, -58
+ },
+
+ {
+ 39, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, -59, -59, -59
+
+ },
+
+ {
+ 39, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, -60, -60, -60
+ },
+
+ {
+ 39, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+
+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, -61, -61, -61
+ },
+
+ {
+ 39, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, 136, -62, 137, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, -62, -62, -62
+ },
+
+ {
+ 39, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, 138, -63, -63, -63, -63, -63, 139, -63, 140,
+ -63, 141, -63, 142, 143, -63, -63, -63, 144, -63,
+ 145, 146, -63, -63, -63, -63, -63, 147, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, -63, -63, -63
+ },
+
+ {
+ 39, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, 148, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, -64, -64, -64
+
+ },
+
+ {
+ 39, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, 149, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, -65, -65, -65
+ },
+
+ {
+ 39, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, 150, 150,
+ 150, 150, 150, 150, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+
+ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, -66, -66, -66
+ },
+
+ {
+ 39, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, 151, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, -67, -67, -67
+ },
+
+ {
+ 39, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, 152, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, 131, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, 132, -68, -68, 133, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, -68, -68, -68
+ },
+
+ {
+ 39, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, 152, -69, -69, -69, -69, -69, 153,
+ 153, 153, 153, 153, -69, -69, -69, -69, -69, -69,
+
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, 131, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, 154, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, 132, -69, -69, 133, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, -69, -69, -69
+
+ },
+
+ {
+ 39, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, 155, 156,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70
+ },
+
+ {
+ 39, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+
+ -71, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, -71, -71, -71
+ },
+
+ {
+ 39, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, -72, -72, -72
+ },
+
+ {
+ 39, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, -73, -73, -73
+ },
+
+ {
+ 39, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, -74, -74, -74
+
+ },
+
+ {
+ 39, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, -75, -75, -75
+ },
+
+ {
+ 39, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+
+ -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, -76, -76, -76
+ },
+
+ {
+ 39, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77, -77, -77, -77, -77,
+ -77, -77, -77, -77, -77, -77
+ },
+
+ {
+ 39, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, 166, -78, 167, -78, -78, 168, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78
+ },
+
+ {
+ 39, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79, -79, -79, -79, -79,
+ -79, -79, -79, -79, -79, -79
+
+ },
+
+ {
+ 39, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80
+ },
+
+ {
+ 39, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+
+ -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
+ -81, -81, -81, -81, -81, -81
+ },
+
+ {
+ 39, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, -82, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169
+ },
+
+ {
+ 39, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83
+ },
+
+ {
+ 39, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, -84, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170
+
+ },
+
+ {
+ 39, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, -85, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171
+ },
+
+ {
+ 39, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, -86, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172
+ },
+
+ {
+ 39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, -87, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173
+ },
+
+ {
+ 39, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, -88, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174
+ },
+
+ {
+ 39, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ -89, 175, 175, -89, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175
+
+ },
+
+ {
+ 39, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ 176, -90, -90, 176, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90
+ },
+
+ {
+ 39, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, -91, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177
+ },
+
+ {
+ 39, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, -92, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178
+ },
+
+ {
+ 39, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, -93, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179
+ },
+
+ {
+ 39, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, -94, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180
+
+ },
+
+ {
+ 39, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, -95, -95, -95
+ },
+
+ {
+ 39, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, 181, -96, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+
+ -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, -96, -96, -96
+ },
+
+ {
+ 39, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, -97, -97, -97
+ },
+
+ {
+ 39, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, 184, -98, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, 185, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, -98, -98, -98
+ },
+
+ {
+ 39, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, 186, -99, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -99, -99,
+
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99
+
+ },
+
+ {
+ 39, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, -100, -100, -100
+ },
+
+ {
+ 39, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, 189, -101, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, 190, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101
+ },
+
+ {
+ 39, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, -102,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, -102, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191
+ },
+
+ {
+ 39, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, -103, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192
+ },
+
+ {
+ 39, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, -104, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193
+
+ },
+
+ {
+ 39, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, -105,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, -105, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194
+ },
+
+ {
+ 39, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, -106, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195
+ },
+
+ {
+ 39, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, -107, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196
+ },
+
+ {
+ 39, -108, -108, -108, -108, -108, -108, -108, -108, 108,
+ 108, -108, -108, 108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, -108, -108, -108
+ },
+
+ {
+ 39, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, -109, -109, -109
+
+ },
+
+ {
+ 39, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, -110, -110, -110
+ },
+
+ {
+ 39, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, 118, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, 197, 120, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, 198, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+
+ -111, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, -111, -111, -111
+ },
+
+ {
+ 39, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, -112, -112, -112
+ },
+
+ {
+ 39, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113
+ },
+
+ {
+ 39, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, -114, -114, -114
+
+ },
+
+ {
+ 39, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, 199, 199,
+ 199, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, -115, -115, -115, -115, -115
+ },
+
+ {
+ 39, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+
+ -116, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, -116, -116, -116
+ },
+
+ {
+ 39, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, -117, -117, -117
+ },
+
+ {
+ 39, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118
+ },
+
+ {
+ 39, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, 200, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, -119, -119, -119
+
+ },
+
+ {
+ 39, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, -120, -120, -120
+ },
+
+ {
+ 39, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+
+ -121, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, -121, -121, -121
+ },
+
+ {
+ 39, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, -122, -122, -122
+ },
+
+ {
+ 39, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, -123
+ },
+
+ {
+ 39, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ 201, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, -124, -124, -124
+
+ },
+
+ {
+ 39, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+
+ -125, -125, -125, -125, -125, -125, -125, -125, 202, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, -125, -125, -125
+ },
+
+ {
+ 39, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, 203, 203,
+ 203, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+
+ -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, -126, -126, -126
+ },
+
+ {
+ 39, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, -127, -127, -127
+ },
+
+ {
+ 39, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, -128, -128, -128
+ },
+
+ {
+ 39, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, 204,
+ 204, 204, 204, 204, -129, -129, -129, -129, -129, -129,
+
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, 205, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, -129, -129, -129
+
+ },
+
+ {
+ 39, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, -130, -130, -130
+ },
+
+ {
+ 39, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, 206, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+
+ -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, -131, -131, -131
+ },
+
+ {
+ 39, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, 207, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, -132, -132, -132
+ },
+
+ {
+ 39, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, 208, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, -133, -133, -133
+ },
+
+ {
+ 39, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, -134, -134, -134
+
+ },
+
+ {
+ 39, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, -135, -135, -135
+ },
+
+ {
+ 39, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+
+ -136, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, -136, -136, -136
+ },
+
+ {
+ 39, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, -137, -137, -137
+ },
+
+ {
+ 39, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, -138, -138, -138
+ },
+
+ {
+ 39, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, 209, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, -139, -139, -139
+
+ },
+
+ {
+ 39, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ 210, -140, -140, -140, -140, 211, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, -140, -140, -140
+ },
+
+ {
+ 39, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, 212,
+ -141, -141, -141, -141, -141, -141, -141, -141, 213, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+
+ -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141
+ },
+
+ {
+ 39, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, 214,
+ -142, -142, -142, -142, -142, -142, -142, -142, 215, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, -142, -142, -142
+ },
+
+ {
+ 39, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, 216, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143
+ },
+
+ {
+ 39, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, 217, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, -144, -144, -144
+
+ },
+
+ {
+ 39, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, 218,
+ -145, 219, -145, -145, -145, -145, -145, -145, 220, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, -145, -145, -145
+ },
+
+ {
+ 39, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, 221, 222,
+ -146, -146, -146, -146, 223, -146, -146, -146, 224, -146,
+ -146, -146, -146, -146, -146, 225, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+
+ -146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, -146, -146, -146
+ },
+
+ {
+ 39, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, 226, -147,
+ -147, -147, -147, -147, 223, -147, -147, -147, 227, -147,
+ -147, -147, -147, -147, -147, 225, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, -147, -147, -147
+ },
+
+ {
+ 39, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, -148, -148, -148
+ },
+
+ {
+ 39, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, -149, -149
+
+ },
+
+ {
+ 39, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, 150, 150,
+ 150, 150, 150, 150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, -150, -150, -150
+ },
+
+ {
+ 39, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151
+ },
+
+ {
+ 39, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, -152, -152, -152
+ },
+
+ {
+ 39, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, -153, -153, -153
+ },
+
+ {
+ 39, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, 228,
+ 228, 228, 228, 228, -154, -154, -154, -154, -154, -154,
+
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, -154, -154, -154
+
+ },
+
+ {
+ 39, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, -155, -155, -155
+ },
+
+ {
+ 39, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+
+ -156, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, -156, -156, -156
+ },
+
+ {
+ 39, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, -157, -157, -157
+ },
+
+ {
+ 39, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, -158, -158, -158
+ },
+
+ {
+ 39, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, -159, -159, -159
+
+ },
+
+ {
+ 39, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, -160, -160, -160
+ },
+
+ {
+ 39, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+
+ -161, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, -161, -161, -161
+ },
+
+ {
+ 39, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, -162, -162, -162
+ },
+
+ {
+ 39, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, -163, -163, -163
+ },
+
+ {
+ 39, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, -164, -164, -164
+
+ },
+
+ {
+ 39, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, -165, -165, -165
+ },
+
+ {
+ 39, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+
+ -166, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, -166, -166, -166
+ },
+
+ {
+ 39, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, -167, -167, -167
+ },
+
+ {
+ 39, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, -168, -168, -168
+ },
+
+ {
+ 39, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, -169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169
+
+ },
+
+ {
+ 39, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, -170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170
+ },
+
+ {
+ 39, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, -171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171
+ },
+
+ {
+ 39, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, -172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172
+ },
+
+ {
+ 39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, -173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173
+ },
+
+ {
+ 39, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, -174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
+ 174, 174, 174, 174, 174, 174
+
+ },
+
+ {
+ 39, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ -175, 175, 175, -175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175
+ },
+
+ {
+ 39, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ 176, -176, -176, 176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+
+ -176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, -176, -176, -176
+ },
+
+ {
+ 39, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, -177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 177, 177, 177, 177, 177, 177
+ },
+
+ {
+ 39, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, -178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
+ 178, 178, 178, 178, 178, 178
+ },
+
+ {
+ 39, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, -179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
+ 179, 179, 179, 179, 179, 179
+
+ },
+
+ {
+ 39, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, -180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
+ 180, 180, 180, 180, 180, 180
+ },
+
+ {
+ 39, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+
+ -181, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, -181, -181, -181
+ },
+
+ {
+ 39, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 184, -182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, 185, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182
+ },
+
+ {
+ 39, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, 183, 183,
+ 183, 183, 183, 183, 183, 183, 183, 183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, 185, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, -183, -183, -183
+ },
+
+ {
+ 39, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229, -184, -184,
+
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, 185, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, -184, -184, -184
+
+ },
+
+ {
+ 39, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, -185, -185, -185
+ },
+
+ {
+ 39, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+
+ -186, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, -186, -186, -186
+ },
+
+ {
+ 39, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, 189, -187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, 190, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, -187, -187, -187
+ },
+
+ {
+ 39, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, 188, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, 190, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188
+ },
+
+ {
+ 39, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, -189, -189,
+
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, 190, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, -189, -189, -189
+
+ },
+
+ {
+ 39, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, -190, -190, -190
+ },
+
+ {
+ 39, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, -191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, -191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+
+ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
+ 191, 191, 191, 191, 191, 191
+ },
+
+ {
+ 39, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, -192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192
+ },
+
+ {
+ 39, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, -193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193
+ },
+
+ {
+ 39, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, -194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, -194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+ 194, 194, 194, 194, 194, 194
+
+ },
+
+ {
+ 39, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, -195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195
+ },
+
+ {
+ 39, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, -196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196
+ },
+
+ {
+ 39, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, 231, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, -197, -197, -197
+ },
+
+ {
+ 39, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, -198, -198, -198
+ },
+
+ {
+ 39, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, -199, -199, -199
+
+ },
+
+ {
+ 39, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, -200, -200, -200
+ },
+
+ {
+ 39, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, 232, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+
+ -201, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, -201, -201, -201
+ },
+
+ {
+ 39, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, 233, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, -202, -202, -202
+ },
+
+ {
+ 39, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, -203, -203, -203
+ },
+
+ {
+ 39, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, -204, -204, -204
+
+ },
+
+ {
+ 39, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, 234,
+ 234, 234, 234, 234, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, -205, -205, -205
+ },
+
+ {
+ 39, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, 235, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+
+ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, -206, -206, -206
+ },
+
+ {
+ 39, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ 236, -207, 236, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, 237, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, -207, -207, -207
+ },
+
+ {
+ 39, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, 238, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, -208, -208, -208
+ },
+
+ {
+ 39, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, 239, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, -209, -209, -209
+
+ },
+
+ {
+ 39, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, 240, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, -210, -210, -210
+ },
+
+ {
+ 39, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, 241, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+
+ -211, -211, -211, -211, -211, -211, -211, -211, -211, -211,
+ -211, -211, -211, -211, -211, -211
+ },
+
+ {
+ 39, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212
+ },
+
+ {
+ 39, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, 243, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213, -213, -213, -213, -213,
+ -213, -213, -213, -213, -213, -213
+ },
+
+ {
+ 39, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, 244,
+ 244, 244, 244, 244, 244, 244, 244, 244, -214, -214,
+
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214, -214, -214, -214, -214,
+ -214, -214, -214, -214, -214, -214
+
+ },
+
+ {
+ 39, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, 245, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215
+ },
+
+ {
+ 39, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, 246, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+
+ -216, -216, -216, -216, -216, -216, -216, -216, -216, -216,
+ -216, -216, -216, -216, -216, -216
+ },
+
+ {
+ 39, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, 247, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217, -217, -217, -217, -217,
+ -217, -217, -217, -217, -217, -217
+ },
+
+ {
+ 39, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218, -218, -218, -218, -218,
+ -218, -218, -218, -218, -218, -218
+ },
+
+ {
+ 39, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, 249,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219, -219, -219, -219, -219,
+ -219, -219, -219, -219, -219, -219
+
+ },
+
+ {
+ 39, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, 250, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220, -220, -220, -220, -220,
+ -220, -220, -220, -220, -220, -220
+ },
+
+ {
+ 39, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, 251, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+
+ -221, -221, -221, -221, -221, -221, -221, -221, -221, -221,
+ -221, -221, -221, -221, -221, -221
+ },
+
+ {
+ 39, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, 252, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
+ -222, -222, -222, -222, -222, -222
+ },
+
+ {
+ 39, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, 253, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, 254, -223, 255, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223, -223, -223, -223, -223,
+ -223, -223, -223, -223, -223, -223
+ },
+
+ {
+ 39, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, 256, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224, -224, -224, -224, -224,
+ -224, -224, -224, -224, -224, -224
+
+ },
+
+ {
+ 39, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+
+ -225, -225, -225, -225, -225, -225, -225, -225, 257, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225, -225, -225, -225, -225,
+ -225, -225, -225, -225, -225, -225
+ },
+
+ {
+ 39, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, 258, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+
+ -226, -226, -226, -226, -226, -226, -226, -226, -226, -226,
+ -226, -226, -226, -226, -226, -226
+ },
+
+ {
+ 39, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, 259, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227, -227, -227, -227, -227,
+ -227, -227, -227, -227, -227, -227
+ },
+
+ {
+ 39, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228, -228, -228, -228, -228,
+ -228, -228, -228, -228, -228, -228
+ },
+
+ {
+ 39, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229, -229, -229,
+
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, 185, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229, -229, -229, -229, -229,
+ -229, -229, -229, -229, -229, -229
+
+ },
+
+ {
+ 39, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, 190, -230, -230, -230, -230, -230, -230,
+
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230, -230, -230, -230, -230,
+ -230, -230, -230, -230, -230, -230
+ },
+
+ {
+ 39, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+
+ -231, -231, -231, -231, -231, -231, -231, -231, -231, -231,
+ -231, -231, -231, -231, -231, -231
+ },
+
+ {
+ 39, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, 260, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232, -232, -232, -232, -232,
+ -232, -232, -232, -232, -232, -232
+ },
+
+ {
+ 39, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, 261, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233, -233, -233, -233, -233,
+ -233, -233, -233, -233, -233, -233
+ },
+
+ {
+ 39, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234, -234, -234, -234, -234,
+ -234, -234, -234, -234, -234, -234
+
+ },
+
+ {
+ 39, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
+ -235, -235, -235, -235, -235, -235
+ },
+
+ {
+ 39, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+
+ -236, -236, -236, -236, -236, -236, -236, -236, -236, -236,
+ -236, -236, -236, -236, -236, -236
+ },
+
+ {
+ 39, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ 262, -237, 262, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237, -237, -237, -237, -237,
+ -237, -237, -237, -237, -237, -237
+ },
+
+ {
+ 39, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238, -238, -238, -238, -238,
+ -238, -238, -238, -238, -238, -238
+ },
+
+ {
+ 39, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, 263, -239,
+
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, 264,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239, -239, -239, -239, -239,
+ -239, -239, -239, -239, -239, -239
+
+ },
+
+ {
+ 39, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240, -240, -240, -240, -240,
+ -240, -240, -240, -240, -240, -240
+ },
+
+ {
+ 39, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+
+ -241, -241, -241, -241, -241, -241, -241, -241, -241, -241,
+ -241, -241, -241, -241, -241, -241
+ },
+
+ {
+ 39, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, 265, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242, -242, -242, -242, -242,
+ -242, -242, -242, -242, -242, -242
+ },
+
+ {
+ 39, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243, -243, -243, -243, -243,
+ -243, -243, -243, -243, -243, -243
+ },
+
+ {
+ 39, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, 266, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244, -244, -244, -244, -244,
+ -244, -244, -244, -244, -244, -244
+
+ },
+
+ {
+ 39, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245, -245, -245, -245, -245,
+ -245, -245, -245, -245, -245, -245
+ },
+
+ {
+ 39, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, 267, 268,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+
+ -246, -246, -246, -246, -246, -246, -246, -246, -246, -246,
+ -246, -246, -246, -246, -246, -246
+ },
+
+ {
+ 39, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, 269, 270,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247
+ },
+
+ {
+ 39, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, 271, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248, -248, -248, -248, -248,
+ -248, -248, -248, -248, -248, -248
+ },
+
+ {
+ 39, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, 272, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249, -249, -249, -249, -249,
+ -249, -249, -249, -249, -249, -249
+
+ },
+
+ {
+ 39, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
+ -250, -250, -250, -250, -250, -250
+ },
+
+ {
+ 39, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, 273, 273,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+
+ -251, -251, -251, -251, -251, -251, -251, -251, -251, -251,
+ -251, -251, -251, -251, -251, -251
+ },
+
+ {
+ 39, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, 274, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, 275, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252, -252, -252, -252, -252,
+ -252, -252, -252, -252, -252, -252
+ },
+
+ {
+ 39, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, 276, -253, 276, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, 277, -253, -253, -253, 277, 277,
+ -253, 278, -253, -253, -253, -253, -253, 278, -253, -253,
+
+ -253, -253, -253, 254, -253, 255, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253, -253, -253, -253, -253,
+ -253, -253, -253, -253, -253, -253
+ },
+
+ {
+ 39, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, 279, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
+ -254, -254, -254, -254, -254, -254
+
+ },
+
+ {
+ 39, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, 280, -255, -255, -255, -255, -255, -255,
+
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
+ -255, -255, -255, -255, -255, -255
+ },
+
+ {
+ 39, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, 281, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+
+ -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
+ -256, -256, -256, -256, -256, -256
+ },
+
+ {
+ 39, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, 282, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
+ -257, -257, -257, -257, -257, -257
+ },
+
+ {
+ 39, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, 283, 283,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258, -258, -258, -258, -258,
+ -258, -258, -258, -258, -258, -258
+ },
+
+ {
+ 39, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, 284, -259,
+
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
+ -259, -259, -259, -259, -259, -259
+
+ },
+
+ {
+ 39, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, 285, -260, -260,
+
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260, -260, -260, -260, -260,
+ -260, -260, -260, -260, -260, -260
+ },
+
+ {
+ 39, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, 286, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+
+ -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
+ -261, -261, -261, -261, -261, -261
+ },
+
+ {
+ 39, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262, -262, -262, -262, -262,
+ -262, -262, -262, -262, -262, -262
+ },
+
+ {
+ 39, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263, -263, -263, -263, -263,
+ -263, -263, -263, -263, -263, -263
+ },
+
+ {
+ 39, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, 287,
+ 287, 287, 287, 287, 287, 287, 287, 287, -264, -264,
+
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264, -264, -264, -264, -264,
+ -264, -264, -264, -264, -264, -264
+
+ },
+
+ {
+ 39, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
+ -265, -265, -265, -265, -265, -265
+ },
+
+ {
+ 39, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266
+ },
+
+ {
+ 39, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, 288, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, -267, -267, -267, -267, -267
+ },
+
+ {
+ 39, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, 289, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268, -268, -268, -268, -268,
+ -268, -268, -268, -268, -268, -268
+ },
+
+ {
+ 39, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, 290, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269, -269, -269, -269, -269,
+ -269, -269, -269, -269, -269, -269
+
+ },
+
+ {
+ 39, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, 291, -270, -270, -270, -270, -270, -270,
+
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
+ -270, -270, -270, -270, -270, -270
+ },
+
+ {
+ 39, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+
+ -271, -271, -271, -271, -271, -271, -271, -271, -271, -271,
+ -271, -271, -271, -271, -271, -271
+ },
+
+ {
+ 39, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, 292, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272, -272, -272, -272, -272,
+ -272, -272, -272, -272, -272, -272
+ },
+
+ {
+ 39, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, 293,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, 294, -273, 295, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
+ -273, -273, -273, -273, -273, -273
+ },
+
+ {
+ 39, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, 296, 296,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274, -274, -274, -274, -274,
+ -274, -274, -274, -274, -274, -274
+
+ },
+
+ {
+ 39, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, 297, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275, -275, -275, -275, -275,
+ -275, -275, -275, -275, -275, -275
+ },
+
+ {
+ 39, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, -276, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, -276, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298
+ },
+
+ {
+ 39, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 276, -277, 276, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 279, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, 254, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277, -277, -277, -277, -277,
+ -277, -277, -277, -277, -277, -277
+ },
+
+ {
+ 39, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, 277, -278, -278, -278, 277, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278, -278, -278, -278, -278,
+ -278, -278, -278, -278, -278, -278
+ },
+
+ {
+ 39, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
+ -279, -279, -279, -279, -279, -279
+
+ },
+
+ {
+ 39, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280, -280, -280, -280, -280,
+ -280, -280, -280, -280, -280, -280
+ },
+
+ {
+ 39, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, 299, 300,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, 301, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+
+ -281, -281, -281, -281, -281, -281, -281, -281, -281, -281,
+ -281, -281, -281, -281, -281, -281
+ },
+
+ {
+ 39, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, 302, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282, -282, -282, -282, -282,
+ -282, -282, -282, -282, -282, -282
+ },
+
+ {
+ 39, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, 303,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, 304, -283, 305, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283, -283, -283, -283, -283,
+ -283, -283, -283, -283, -283, -283
+ },
+
+ {
+ 39, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, 306, 307,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, 308, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284, -284, -284, -284, -284,
+ -284, -284, -284, -284, -284, -284
+
+ },
+
+ {
+ 39, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, 309, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285, -285, -285, -285, -285,
+ -285, -285, -285, -285, -285, -285
+ },
+
+ {
+ 39, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+
+ -286, -286, -286, -286, -286, -286, -286, -286, -286, -286,
+ -286, -286, -286, -286, -286, -286
+ },
+
+ {
+ 39, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, 310, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287, -287, -287, -287, -287,
+ -287, -287, -287, -287, -287, -287
+ },
+
+ {
+ 39, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288, -288, -288, -288, -288,
+ -288, -288, -288, -288, -288, -288
+ },
+
+ {
+ 39, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289, -289, -289, -289, -289,
+ -289, -289, -289, -289, -289, -289
+
+ },
+
+ {
+ 39, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290, -290, -290, -290, -290,
+ -290, -290, -290, -290, -290, -290
+ },
+
+ {
+ 39, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+
+ -291, -291, -291, -291, -291, -291, -291, -291, -291, -291,
+ -291, -291, -291, -291, -291, -291
+ },
+
+ {
+ 39, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, 311, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292, -292, -292, -292, -292,
+ -292, -292, -292, -292, -292, -292
+ },
+
+ {
+ 39, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293, -293, -293, -293, -293,
+ -293, -293, -293, -293, -293, -293
+ },
+
+ {
+ 39, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, 312, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294, -294, -294, -294, -294,
+ -294, -294, -294, -294, -294, -294
+
+ },
+
+ {
+ 39, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, 313, -295, -295, -295, -295, -295, -295,
+
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295, -295, -295, -295, -295,
+ -295, -295, -295, -295, -295, -295
+ },
+
+ {
+ 39, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, 314,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, 315, -296, 316, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+
+ -296, -296, -296, -296, -296, -296, -296, -296, -296, -296,
+ -296, -296, -296, -296, -296, -296
+ },
+
+ {
+ 39, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, 317, 317,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297, -297, -297, -297, -297,
+ -297, -297, -297, -297, -297, -297
+ },
+
+ {
+ 39, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 279, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 318, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298
+ },
+
+ {
+ 39, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, 319, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
+ -299, -299, -299, -299, -299, -299
+
+ },
+
+ {
+ 39, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, 320, -300, -300, -300, -300, -300, -300,
+
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300, -300, -300, -300, -300,
+ -300, -300, -300, -300, -300, -300
+ },
+
+ {
+ 39, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, 321, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+
+ -301, -301, -301, -301, -301, -301, -301, -301, -301, -301,
+ -301, -301, -301, -301, -301, -301
+ },
+
+ {
+ 39, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, 322, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
+ -302, -302, -302, -302, -302, -302
+ },
+
+ {
+ 39, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
+ -303, -303, -303, -303, -303, -303
+ },
+
+ {
+ 39, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, 323, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
+ -304, -304, -304, -304, -304, -304
+
+ },
+
+ {
+ 39, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, 324, -305, -305, -305, -305, -305, -305,
+
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305, -305, -305, -305, -305,
+ -305, -305, -305, -305, -305, -305
+ },
+
+ {
+ 39, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, 325, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+
+ -306, -306, -306, -306, -306, -306, -306, -306, -306, -306,
+ -306, -306, -306, -306, -306, -306
+ },
+
+ {
+ 39, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, 326, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307, -307, -307, -307, -307,
+ -307, -307, -307, -307, -307, -307
+ },
+
+ {
+ 39, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, 327, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308, -308, -308, -308, -308,
+ -308, -308, -308, -308, -308, -308
+ },
+
+ {
+ 39, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309, -309, -309, -309, -309,
+ -309, -309, -309, -309, -309, -309
+
+ },
+
+ {
+ 39, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310
+ },
+
+ {
+ 39, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, 328, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+
+ -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
+ -311, -311, -311, -311, -311, -311
+ },
+
+ {
+ 39, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312, -312, -312, -312, -312,
+ -312, -312, -312, -312, -312, -312
+ },
+
+ {
+ 39, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313, -313, -313, -313, -313,
+ -313, -313, -313, -313, -313, -313
+ },
+
+ {
+ 39, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314, -314, -314, -314, -314,
+ -314, -314, -314, -314, -314, -314
+
+ },
+
+ {
+ 39, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, 329, -315, -315, -315, -315, -315, -315,
+
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315, -315, -315, -315, -315,
+ -315, -315, -315, -315, -315, -315
+ },
+
+ {
+ 39, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, 330, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+
+ -316, -316, -316, -316, -316, -316, -316, -316, -316, -316,
+ -316, -316, -316, -316, -316, -316
+ },
+
+ {
+ 39, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, 331,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, 332, -317, 333, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
+ -317, -317, -317, -317, -317, -317
+ },
+
+ {
+ 39, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, 279, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318, -318, -318, -318, -318,
+ -318, -318, -318, -318, -318, -318
+ },
+
+ {
+ 39, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319, -319, -319, -319, -319,
+ -319, -319, -319, -319, -319, -319
+
+ },
+
+ {
+ 39, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
+ -320, -320, -320, -320, -320, -320
+ },
+
+ {
+ 39, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+
+ -321, -321, -321, -321, -321, -321, -321, -321, -321, -321,
+ -321, -321, -321, -321, -321, -321
+ },
+
+ {
+ 39, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, 334, 334,
+ 334, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322, -322, -322, -322, -322,
+ -322, -322, -322, -322, -322, -322
+ },
+
+ {
+ 39, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323, -323, -323, -323, -323,
+ -323, -323, -323, -323, -323, -323
+ },
+
+ {
+ 39, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324, -324, -324, -324, -324,
+ -324, -324, -324, -324, -324, -324
+
+ },
+
+ {
+ 39, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
+ -325, -325, -325, -325, -325, -325
+ },
+
+ {
+ 39, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+
+ -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
+ -326, -326, -326, -326, -326, -326
+ },
+
+ {
+ 39, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327, -327, -327, -327, -327,
+ -327, -327, -327, -327, -327, -327
+ },
+
+ {
+ 39, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, 335, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
+ -328, -328, -328, -328, -328, -328
+ },
+
+ {
+ 39, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329, -329, -329, -329, -329,
+ -329, -329, -329, -329, -329, -329
+
+ },
+
+ {
+ 39, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330, -330, -330, -330, -330,
+ -330, -330, -330, -330, -330, -330
+ },
+
+ {
+ 39, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+
+ -331, -331, -331, -331, -331, -331, -331, -331, -331, -331,
+ -331, -331, -331, -331, -331, -331
+ },
+
+ {
+ 39, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, 336, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332, -332, -332, -332, -332,
+ -332, -332, -332, -332, -332, -332
+ },
+
+ {
+ 39, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, 337, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333, -333, -333, -333, -333,
+ -333, -333, -333, -333, -333, -333
+ },
+
+ {
+ 39, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, 338,
+
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, 339, -334, 340, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
+ -334, -334, -334, -334, -334, -334
+
+ },
+
+ {
+ 39, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, 341, -335, -335, -335, -335, -335, -335,
+
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
+ -335, -335, -335, -335, -335, -335
+ },
+
+ {
+ 39, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+
+ -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
+ -336, -336, -336, -336, -336, -336
+ },
+
+ {
+ 39, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337, -337, -337, -337, -337,
+ -337, -337, -337, -337, -337, -337
+ },
+
+ {
+ 39, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, -338, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342
+ },
+
+ {
+ 39, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, 343, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
+ -339, -339, -339, -339, -339, -339
+
+ },
+
+ {
+ 39, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, 344, -340, -340, -340, -340, -340, -340,
+
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340, -340, -340, -340, -340,
+ -340, -340, -340, -340, -340, -340
+ },
+
+ {
+ 39, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+
+ -341, -341, -341, -341, -341, -341, -341, -341, -341, -341,
+ -341, -341, -341, -341, -341, -341
+ },
+
+ {
+ 39, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 345, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342
+ },
+
+ {
+ 39, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343, -343, -343, -343, -343,
+ -343, -343, -343, -343, -343, -343
+ },
+
+ {
+ 39, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344, -344, -344, -344, -344,
+ -344, -344, -344, -344, -344, -344
+
+ },
+
+ {
+ 39, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, -345, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346
+ },
+
+ {
+ 39, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 347, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+
+ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346
+ },
+
+ {
+ 39, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347, -347, -347, -347, -347,
+ -347, -347, -347, -347, -347, -347
+ },
+
+ } ;
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 156
+#define YY_END_OF_BUFFER 157
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[348] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 157, 155,
+ 69, 112, 155, 105, 1, 133, 86, 155, 135, 109,
+ 90, 89, 138, 118, 137, 155, 130, 143, 94, 149,
+ 147, 75, 155, 29, 84, 134, 82, 127, 127, 140,
+ 139, 93, 150, 148, 146, 104, 106, 72, 66, 67,
+ 136, 36, 58, 37, 38, 34, 35, 39, 3, 2,
+ 30, 31, 32, 33, 156, 156, 156, 156, 156, 156,
+
+ 156, 48, 156, 156, 55, 156, 156, 69, 117, 116,
+ 113, 133, 87, 88, 131, 128, 135, 108, 111, 107,
+ 40, 91, 92, 0, 0, 132, 28, 129, 129, 130,
+ 0, 0, 0, 144, 145, 76, 77, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 65, 85, 134,
+ 83, 68, 78, 0, 141, 142, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 73, 74, 71, 36, 37,
+ 38, 34, 35, 39, 3, 2, 30, 31, 32, 33,
+ 0, 0, 0, 0, 41, 0, 0, 0, 0, 43,
+ 48, 49, 50, 55, 56, 57, 115, 42, 131, 110,
+
+ 0, 0, 132, 80, 0, 121, 123, 119, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
+ 114, 0, 0, 81, 122, 124, 125, 120, 0, 5,
+ 4, 0, 24, 0, 23, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 126, 25, 0, 20, 19, 0, 0, 0, 0,
+ 18, 0, 0, 0, 0, 0, 0, 0, 62, 63,
+ 47, 0, 0, 54, 0, 26, 0, 152, 151, 154,
+ 153, 0, 6, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 7, 0, 0, 0, 0, 0, 27, 21,
+ 0, 10, 14, 8, 0, 0, 0, 0, 45, 44,
+ 46, 0, 11, 15, 52, 51, 53, 0, 12, 16,
+ 9, 0, 0, 0, 0, 13, 17, 0, 0, 0,
+ 70, 0, 60, 61, 0, 0, 59
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+static const yy_state_type yy_NUL_trans[348] =
+ { 0,
+ 40, 40, 82, 82, 84, 84, 85, 85, 86, 86,
+ 87, 87, 88, 88, 89, 89, 91, 91, 92, 92,
+ 93, 93, 94, 94, 95, 95, 95, 95, 102, 102,
+ 95, 95, 105, 105, 95, 95, 95, 95, 0, 0,
+ 0, 0, 109, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 169, 0, 170, 171, 172, 173, 174, 175, 0,
+ 177, 178, 179, 180, 0, 0, 0, 0, 0, 0,
+
+ 0, 191, 192, 193, 194, 195, 196, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 169, 170,
+ 171, 172, 173, 174, 175, 0, 177, 178, 179, 180,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 191, 192, 193, 194, 195, 196, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 298, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 298, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 342, 0, 0,
+ 0, 342, 0, 0, 346, 346, 0
+ } ;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "gabc/gabc-notes-determination.l"
+#line 2 "gabc/gabc-notes-determination.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the note parser.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h> /* for tolower */
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "gabc.h"
+
+#define YY_NO_INPUT
+
+#define YY_USER_ACTION gabc_update_location(&notes_lloc, \
+ gabc_notes_determination_text, gabc_notes_determination_leng);
+
+static gregorio_scanner_location notes_lloc;
+static gregorio_note *current_note;
+static char char_for_brace;
+static unsigned int nbof_isolated_episema;
+static char *notesmacros[10];
+static char tempstr[256];
+static unsigned short overbrace_var = 0, underbrace_var = 0;
+static const char *overbrace_var_kind;
+static int before_ledger_type;
+static char *before_ledger_length = NULL;
+static unsigned short ledger_var[2] = { 0, 0 };
+static unsigned char staff_lines;
+static signed char highest_pitch;
+static signed char high_ledger_line_pitch;
+static bool legacy_oriscus_orientation;
+static unsigned short he_adjustment_index[2] = { 0, 0 };
+static signed char bracket_low_pitch, bracket_high_pitch;
+static unsigned short left_bracket_texverb = 0;
+
+#define LEDGER(WHICH, SPECIFICITY, VALUE) \
+ if (LEDGER_##SPECIFICITY > current_note->WHICH##_ledger_specificity) { \
+ current_note->WHICH##_ledger_line = VALUE; \
+ current_note->WHICH##_ledger_specificity = LEDGER_##SPECIFICITY; \
+ }
+
+typedef struct slur_info {
+ unsigned short var;
+ char shift;
+ gregorio_note *start;
+} slur_info;
+
+static slur_info slur[2] = { { 0, '\0', NULL }, { 0, '\0', NULL } };
+
+static __inline gregorio_sign_orientation letter_to_sign_orientation(
+ const char letter) {
+ switch (letter) {
+ case 'u': /* "u"under */
+ return SO_UNDER;
+ case 'o': /* "o"ver */
+ return SO_OVER;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_sign_orientation,
+ "invalid sign orientation letter: %c", letter);
+ return SO_OVER;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline int letter_to_pitch_adjustment(const char letter) {
+ switch (letter_to_sign_orientation(letter)) {
+ case SO_OVER:
+ return 1;
+ case SO_UNDER:
+ return -1;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_pitch_adjustment,
+ "invalid sign orientation letter: %c", letter);
+ return 0;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline signed char pitch_letter_to_height(const char pitch) {
+ char result = pitch - 'a' + LOWEST_PITCH;
+ if (pitch == 'p') {
+ --result;
+ }
+ if (result > highest_pitch) {
+ gregorio_messagef("pitch_letter_to_height", VERBOSITY_ERROR, 0,
+ _("invalid pitch for %u lines: %c"), (unsigned int)staff_lines,
+ pitch);
+ }
+ if (left_bracket_texverb) {
+ if (result < bracket_low_pitch) {
+ bracket_low_pitch = result;
+ }
+ if (result > bracket_high_pitch) {
+ bracket_high_pitch = result;
+ }
+ }
+ return result;
+}
+
+static gregorio_shape punctum_inclinatum(const char orientation)
+{
+ switch (orientation) {
+ case '0':
+ return S_PUNCTUM_INCLINATUM_DESCENDENS;
+
+ case '2':
+ return S_PUNCTUM_INCLINATUM_STANS;
+
+ case '1':
+ return S_PUNCTUM_INCLINATUM_ASCENDENS;
+ }
+
+ return S_PUNCTUM_INCLINATUM_UNDETERMINED;
+}
+
+static __inline void lex_add_note(int i, gregorio_shape shape, char signs,
+ char liquescentia)
+{
+ signed char height = pitch_letter_to_height(tolower(
+ (unsigned char)gabc_notes_determination_text[i]));
+
+ nbof_isolated_episema = 0;
+ gregorio_add_note(&current_note, height, shape, signs, liquescentia, NULL,
+ &notes_lloc);
+ current_note->he_adjustment_index[SO_OVER] = he_adjustment_index[SO_OVER];
+ current_note->he_adjustment_index[SO_UNDER] = he_adjustment_index[SO_UNDER];
+
+ if (height >= high_ledger_line_pitch) {
+ LEDGER(high, DRAWN, true);
+ } else if (ledger_var[SO_OVER]) {
+ LEDGER(high, EXPLICIT, true);
+ }
+
+ if (height <= LOW_LEDGER_LINE_PITCH) {
+ LEDGER(low, DRAWN, true);
+ } else if (ledger_var[SO_UNDER]) {
+ LEDGER(low, EXPLICIT, true);
+ }
+}
+
+static __inline void add_bar_as_note(gregorio_bar bar)
+{
+ nbof_isolated_episema = 0;
+ gregorio_add_bar_as_note(&current_note, bar, &notes_lloc);
+}
+
+static __inline void error(void)
+{
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("undefined macro used: m%d"),
+ gabc_notes_determination_text[3] - '0');
+}
+
+static void add_h_episema(void)
+{
+ grehepisema_size size = H_NORMAL;
+ gregorio_vposition vposition = VPOS_AUTO;
+ bool disable_bridge = false;
+
+ char *ptr = gabc_notes_determination_text;
+ char current;
+ /* first character is the underscore */
+ while ((current = *(++ptr))) {
+ switch(current) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ case '2':
+ disable_bridge = true;
+ break;
+ case '3':
+ size = H_SMALL_LEFT;
+ break;
+ case '4':
+ size = H_SMALL_CENTRE;
+ break;
+ case '5':
+ size = H_SMALL_RIGHT;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gabc_notes_determination,
+ "unrecognized horizontal episema modifier: %c", current);
+ break;
+ /* LCOV_EXCL_STOP */
+ };
+ }
+
+ gregorio_add_h_episema(current_note, size, vposition, disable_bridge,
+ &nbof_isolated_episema);
+}
+
+static void add_sign(gregorio_sign sign)
+{
+ gregorio_vposition vposition = VPOS_AUTO;
+ switch(gabc_notes_determination_text[1]) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ }
+ gregorio_add_sign(current_note, sign, vposition);
+}
+
+static void save_before_ledger(const char *const before_ledger)
+{
+ if (strcmp(before_ledger, "0") == 0) {
+ before_ledger_type = 0;
+ before_ledger_length = "";
+ } else if (strcmp(before_ledger, "1") == 0) {
+ before_ledger_type = 1;
+ before_ledger_length = "";
+ } else {
+ before_ledger_type = 2;
+ before_ledger_length = gregorio_strdup(before_ledger);
+ }
+}
+
+static void add_static_ledger(const gregorio_sign_orientation type,
+ const char *length) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreDrawAdditionalLine{%d}{%s}{%d}{%s}{0}{}",
+ type, length + 1, before_ledger_type, before_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+}
+
+static __inline const char *over_or_under(
+ const gregorio_sign_orientation type) {
+ switch (type) {
+ case SO_OVER:
+ return "over";
+ case SO_UNDER:
+ return "under";
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(over_or_under, "invalid ledger type %d", type);
+ return "";
+ /* LCOV_EXCL_STOP */
+}
+
+static void add_variable_ledger(const gregorio_sign_orientation type,
+ const char *after_ledger)
+{
+ if (ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("add_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line without termination of "
+ "previous %s-staff ledger line"), typename, typename);
+ } else {
+ int after_ledger_type;
+ const char *after_ledger_length;
+
+ ++after_ledger;
+
+ if (strcmp(after_ledger, "0") == 0) {
+ after_ledger_type = 0;
+ after_ledger_length = "";
+ } else if (strcmp(after_ledger, "1") == 0) {
+ after_ledger_type = 1;
+ after_ledger_length = "";
+ } else {
+ after_ledger_type = 2;
+ after_ledger_length = after_ledger;
+ }
+
+ ledger_var[type] = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{1}"
+ "\\GreDrawAdditionalLine{%d}{\\GreVarBraceLength{%hu}}"
+ "{%d}{%s}{%d}{%s}",
+ ledger_var[type], type, ledger_var[type], before_ledger_type,
+ before_ledger_length, after_ledger_type, after_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static void end_variable_ledger(const gregorio_sign_orientation type)
+{
+ if (!ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("end_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line termination without variable "
+ "%s-staff ledger line start"), typename, typename);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{2}", ledger_var[type]);
+ ledger_var[type] = 0;
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static __inline int parse_clef_line(char line)
+{
+ line -= '0';
+ if (line < 0 || line > staff_lines) {
+ gregorio_messagef("parse_clef_line", VERBOSITY_ERROR, 0,
+ _("invalid clef line for %u lines: %d"),
+ (unsigned int)staff_lines, (int)line);
+ return 1;
+ }
+ return line;
+}
+
+static __inline gregorio_bar parse_dominican_bar(char bar)
+{
+ bar -= '0';
+ if (bar < 1 || bar > (2 * (staff_lines - 1))) {
+ gregorio_messagef("parse_dominican_line", VERBOSITY_ERROR, 0,
+ _("invalid Dominican bar for %u lines: ;%d"),
+ (unsigned int)staff_lines, (int)bar);
+ }
+
+ switch (bar) {
+ case 1:
+ return B_DIVISIO_MINOR_D1;
+ case 2:
+ return B_DIVISIO_MINOR_D2;
+ case 3:
+ return B_DIVISIO_MINOR_D3;
+ case 4:
+ return B_DIVISIO_MINOR_D4;
+ case 5:
+ return B_DIVISIO_MINOR_D5;
+ case 6:
+ return B_DIVISIO_MINOR_D6;
+ case 7:
+ return B_DIVISIO_MINOR_D7;
+ case 8:
+ return B_DIVISIO_MINOR_D8;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(check_dominican_line, "invalid dominican bar: %d", (int)bar);
+ return B_NO_BAR;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline gregorio_clef letter_to_clef(char letter)
+{
+ switch (letter) {
+ case 'c':
+ return CLEF_C;
+ case 'f':
+ return CLEF_F;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_clef, "invalid clef: %c", letter);
+ return CLEF_C;
+ /* LCOV_EXCL_STOP */
+}
+
+/* this assertion should only fail if the lex rules are incorrect */
+static __inline void slur_assert(char *fn, bool test) {
+ if (!test) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid slur text"), fn, VERBOSITY_FATAL, 0);
+ exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static char *parse_slur_shift(char *shift)
+{
+ char *c;
+
+ c = strchr(gabc_notes_determination_text, ':');
+ slur_assert("parse_slur_shift", c != NULL);
+ slur_assert("parse_slur_shift", *(++c) != '\0');
+ *shift = *c;
+ return c;
+}
+
+static void parse_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ char shift, *width, *height, *end;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "parse_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ end = parse_slur_shift(&shift);
+ width = strchr(end, ';');
+ slur_assert("parse_slur", width != NULL);
+ height = strchr(++width, ',');
+ slur_assert("parse_slur", height != NULL);
+ *height = '\0';
+ end = strchr(++height, ']');
+ slur_assert("parse_slur", end != NULL);
+ *end = '\0';
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreSlur{%d}{%d}{%c}{%s}{%s}{}",
+ current_note->u.note.pitch + direction, direction, shift, width,
+ height);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+}
+
+static void start_var_slur(void)
+{
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "start_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (slur[index].var) {
+ gregorio_messagef("start_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur without termination of previous slur"),
+ over_or_under(index));
+ return;
+ }
+
+ slur[index].var = ++tex_position_id;
+ parse_slur_shift(&(slur[index].shift));
+ slur[index].start = current_note;
+}
+
+static void end_var_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ char shift;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "end_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (!slur[index].var || !slur[index].shift || !slur[index].start) {
+ gregorio_messagef("end_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur end without start"),
+ over_or_under(index));
+ return;
+ }
+
+ parse_slur_shift(&shift);
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{1}"
+ "\\GreSlur{%d}{%d}{%c}{\\GreVarBraceLength{%hu}}{}{%d}",
+ slur[index].var, slur[index].shift,
+ slur[index].start->u.note.pitch + direction, direction,
+ slur[index].shift, slur[index].var,
+ current_note->u.note.pitch + direction);
+ gregorio_add_texverb_to_note(slur[index].start, gregorio_strdup(tempstr));
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{2}", slur[index].var, shift);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+
+
+ slur[index].var = 0;
+ slur[index].shift = '\0';
+ slur[index].start = NULL;
+}
+
+static void left_bracket(void)
+{
+ if (left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a left bracket before closing the previous one"),
+ "left_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ /* when setting the left bracket, temporarily store the point-and-click
+ * information in the texverb */
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr, "%u:%u:%u",
+ notes_lloc.first_line, notes_lloc.first_offset,
+ notes_lloc.first_column + 1);
+ } else {
+ tempstr[0] = '\0';
+ }
+ left_bracket_texverb = gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(tempstr), GRE_TEXVERB_GLYPH, &notes_lloc);
+ bracket_low_pitch = MAX_PITCH;
+ bracket_high_pitch = LOWEST_PITCH;
+}
+
+static void right_bracket(void)
+{
+ if (!left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a right bracket without a matching left bracket"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (bracket_high_pitch < bracket_low_pitch) {
+ gregorio_message(
+ _("cannot add brackets without notes between them"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ gregorio_snprintf(tempstr, sizeof tempstr, "\\GreBracket{0}{%d}{%d}{%s}",
+ bracket_low_pitch, bracket_high_pitch,
+ gregorio_texverb(left_bracket_texverb));
+ gregorio_change_texverb(left_bracket_texverb, gregorio_strdup(tempstr));
+
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{%u:%u:%u}", bracket_low_pitch,
+ bracket_high_pitch, notes_lloc.first_line,
+ notes_lloc.first_offset, notes_lloc.first_column + 1);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{}", bracket_low_pitch,
+ bracket_high_pitch);
+ }
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+
+ left_bracket_texverb = 0;
+}
+
+static void parse_hepisema_adjustment(void)
+{
+ /* See https://github.com/gregorio-project/gregorio/issues/872
+ *
+ * [xh:yzw]
+ *
+ * - x is o(ver) or u(under)
+ * - y is optional and is
+ * - l for low in the space (chooses ol or ul depending on x)
+ * - m for middle of the space
+ * - h for high in the space (chooses oh or uh depending on x)
+ * - ol for low in the space as if the episema were over the note
+ * - oh for high in the space as if the episema were over the note
+ * - ul for low in the space as if the episema were under the note
+ * - uh for high in the space as if the episema were under the note
+ * - z is an optional nudge and must start with + or -
+ * - w is optional and may be { to start a range or } to end a range.
+ *
+ * at least one of y, z, or w must be provided
+ * if y and z are omitted, the : may be omitted
+ * y and z are not permitted when w is }
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ gregorio_sign_orientation det_index = index;
+ char *ch = gabc_notes_determination_text + 3;
+ gregorio_hepisema_vbasepos vbasepos = HVB_AUTO;
+ char *nudge = NULL;
+ char save;
+ short hepisema_adjustment_id;
+
+ if (he_adjustment_index[index]) {
+ gregorio_messagef("parse_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment start before ending the "
+ "previous adjustment"), over_or_under(index));
+ return;
+ }
+
+ if (*ch == ':') {
+ ++ch;
+ if (*ch == 'm') {
+ vbasepos = HVB_MIDDLE;
+ } else {
+ switch (*ch) {
+ case 'o':
+ ++ch;
+ det_index = SO_OVER;
+ break;
+ case 'u':
+ ++ch;
+ det_index = SO_UNDER;
+ break;
+ }
+
+ switch (*ch) {
+ case 'l':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_LOW;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_LOW;
+ break;
+ }
+ break;
+ case 'h':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_HIGH;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_HIGH;
+ break;
+ }
+ break;
+ }
+ }
+ if (vbasepos) {
+ ++ch;
+ }
+ if (*ch == '+' || *ch == '-') {
+ nudge = ch;
+ do {
+ ++ch;
+ } while (*ch && *ch != '{' && *ch != ']');
+ save = *ch;
+ *ch = '\0';
+ nudge = gregorio_strdup(nudge);
+ *ch = save;
+ }
+ }
+
+ hepisema_adjustment_id = gregorio_add_hepisema_adjustment(vbasepos, nudge);
+
+ if (*ch == '{') {
+ he_adjustment_index[index] = hepisema_adjustment_id;
+ } else {
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(_("cannot add a horizontal episema adjustment to "
+ "something that is not a note"),
+ "parse_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return;
+ }
+ current_note->he_adjustment_index[index] = hepisema_adjustment_id;
+ }
+}
+
+static void end_hepisema_adjustment(void)
+{
+ /* [xh:}]
+ * - x indicates l(ow) or h(igh) episema
+ * - : is optional
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!he_adjustment_index[index]) {
+ gregorio_messagef("end_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment end with no matching "
+ "start"), over_or_under(index));
+ return;
+ }
+
+ he_adjustment_index[index] = 0;
+}
+
+void gabc_det_notes_finish(void)
+{
+ gregorio_sign_orientation orientation;
+ if (overbrace_var) {
+ gregorio_message(_("unclosed variable over-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ overbrace_var = 0;
+ }
+ if (underbrace_var) {
+ gregorio_message(_("unclosed variable under-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ underbrace_var = 0;
+ }
+ for (orientation = SO_OVER; orientation <= SO_UNDER; ++orientation) {
+ const char *name = over_or_under(orientation);
+ if (ledger_var[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-staff ledger line"), name);
+ ledger_var[orientation] = 0;
+ }
+ if (slur[orientation].var) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-note slur"), name);
+ slur[orientation].var = 0;
+ slur[orientation].shift = '\0';
+ slur[orientation].start = NULL;
+ }
+ if (he_adjustment_index[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed horizontal %s-episema adjustment"),
+ over_or_under(orientation));
+ ledger_var[orientation] = 0;
+ }
+ }
+ if (left_bracket_texverb) {
+ gregorio_message(_("unclosed left bracket"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ left_bracket_texverb = 0;
+ }
+}
+
+#line 12472 "gabc/gabc-notes-determination-l.c"
+
+#line 12474 "gabc/gabc-notes-determination-l.c"
+
+#define INITIAL 0
+#define texverbnote 1
+#define texverbglyph 2
+#define texverbelement 3
+#define choralsign 4
+#define choralnabc 5
+#define alt 6
+#define comments 7
+#define overbrace 8
+#define underbrace 9
+#define overcurlybrace 10
+#define overcurlyaccentusbrace 11
+#define space 12
+#define nbspace 13
+#define overledger 14
+#define overledger2 15
+#define underledger 16
+#define underledger2 17
+#define endledger 18
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 782 "gabc/gabc-notes-determination.l"
+
+#line 12713 "gabc/gabc-notes-determination-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 )
+ {
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+
+ ++yy_cp;
+ }
+
+ yy_current_state = -yy_current_state;
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos) + 1;
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 783 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(comments);
+ }
+ YY_BREAK
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 786 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 789 "gabc/gabc-notes-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 792 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(choralsign);
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 795 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(choralnabc);
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 798 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(overbrace);
+ }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 802 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(underbrace);
+ }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 806 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ BEGIN(overcurlybrace);
+ }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 810 "gabc/gabc-notes-determination.l"
+{
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ BEGIN(overcurlyaccentusbrace);
+ }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 814 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ob";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 830 "gabc/gabc-notes-determination.l"
+{
+ if (underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace without termination of "
+ "previous underbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ underbrace_var = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreUnderBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ underbrace_var, char_for_brace, underbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 845 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocb";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{0}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 861 "gabc/gabc-notes-determination.l"
+{
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocba";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{1}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 877 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ob")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ob"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 896 "gabc/gabc-notes-determination.l"
+{
+ if (!underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace termination without "
+ "variable underbrace start"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", underbrace_var,
+ char_for_brace);
+ underbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 910 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocb")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocb"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 929 "gabc/gabc-notes-determination.l"
+{
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocba")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocba"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 948 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']));
+ } else error();
+ }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 954 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 961 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 968 "gabc/gabc-notes-determination.l"
+{
+ if (notesmacros[gabc_notes_determination_text[5]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[5]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 975 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbnote);
+ }
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 978 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbglyph);
+ }
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 981 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(texverbelement);
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 984 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(alt);
+ }
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 987 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_nlba_as_note(&current_note, NLBA_BEGINNING, &notes_lloc);
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 990 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_nlba_as_note(&current_note, NLBA_END, &notes_lloc);
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 993 "gabc/gabc-notes-determination.l"
+{
+ gregorio_start_autofuse(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 996 "gabc/gabc-notes-determination.l"
+{
+ gregorio_end_autofuse(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 30:
+/* rule 30 can match eol */
+YY_RULE_SETUP
+#line 999 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 31:
+/* rule 31 can match eol */
+YY_RULE_SETUP
+#line 1005 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreUnderBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 32:
+/* rule 32 can match eol */
+YY_RULE_SETUP
+#line 1011 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{0}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 33:
+/* rule 33 can match eol */
+YY_RULE_SETUP
+#line 1017 "gabc/gabc-notes-determination.l"
+{
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{1}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ YY_BREAK
+case 34:
+/* rule 34 can match eol */
+YY_RULE_SETUP
+#line 1023 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), false);
+ }
+ YY_BREAK
+case 35:
+/* rule 35 can match eol */
+YY_RULE_SETUP
+#line 1027 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), true);
+ }
+ YY_BREAK
+case 36:
+/* rule 36 can match eol */
+YY_RULE_SETUP
+#line 1031 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_to_note(current_note,
+ gregorio_strdup(gabc_notes_determination_text));
+ }
+ YY_BREAK
+case 37:
+/* rule 37 can match eol */
+YY_RULE_SETUP
+#line 1035 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+ YY_BREAK
+case 38:
+/* rule 38 can match eol */
+YY_RULE_SETUP
+#line 1040 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+ YY_BREAK
+case 39:
+/* rule 39 can match eol */
+YY_RULE_SETUP
+#line 1045 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), GRE_ALT,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 1050 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(space);
+ }
+ YY_BREAK
+case 41:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1053 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 1057 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(nbspace);
+ }
+ YY_BREAK
+case 43:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1060 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE_NB,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 1064 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICITLY_DRAWN, true);
+ }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 1067 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICITLY_DRAWN, false);
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 1070 "gabc/gabc-notes-determination.l"
+{
+ end_variable_ledger(SO_OVER);
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 1073 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(overledger);
+ }
+ YY_BREAK
+case 48:
+/* rule 48 can match eol */
+YY_RULE_SETUP
+#line 1076 "gabc/gabc-notes-determination.l"
+{
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(overledger2);
+ }
+ YY_BREAK
+case 49:
+/* rule 49 can match eol */
+YY_RULE_SETUP
+#line 1080 "gabc/gabc-notes-determination.l"
+{
+ add_static_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 50:
+/* rule 50 can match eol */
+YY_RULE_SETUP
+#line 1084 "gabc/gabc-notes-determination.l"
+{
+ add_variable_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 1088 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICITLY_DRAWN, true);
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 1091 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICITLY_DRAWN, false);
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 1094 "gabc/gabc-notes-determination.l"
+{
+ end_variable_ledger(SO_UNDER);
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 1097 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(underledger);
+ }
+ YY_BREAK
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 1100 "gabc/gabc-notes-determination.l"
+{
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(underledger2);
+ }
+ YY_BREAK
+case 56:
+/* rule 56 can match eol */
+YY_RULE_SETUP
+#line 1104 "gabc/gabc-notes-determination.l"
+{
+ add_static_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 57:
+/* rule 57 can match eol */
+YY_RULE_SETUP
+#line 1108 "gabc/gabc-notes-determination.l"
+{
+ add_variable_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 1112 "gabc/gabc-notes-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 59:
+/* rule 59 can match eol */
+YY_RULE_SETUP
+#line 1115 "gabc/gabc-notes-determination.l"
+{
+ parse_slur();
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 1118 "gabc/gabc-notes-determination.l"
+{
+ start_var_slur();
+ }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 1121 "gabc/gabc-notes-determination.l"
+{
+ end_var_slur();
+ }
+ YY_BREAK
+case 62:
+/* rule 62 can match eol */
+YY_RULE_SETUP
+#line 1128 "gabc/gabc-notes-determination.l"
+{
+ parse_hepisema_adjustment();
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 1131 "gabc/gabc-notes-determination.l"
+{
+ end_hepisema_adjustment();
+ }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 1134 "gabc/gabc-notes-determination.l"
+{
+ left_bracket();
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 1137 "gabc/gabc-notes-determination.l"
+{
+ right_bracket();
+ }
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 1140 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hbox to 0pt{"), GRE_TEXVERB_ELEMENT,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 1145 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hss%\n}%\n\\GreNoBreak\\relax "),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 1150 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_manual_custos_as_note(&current_note,
+ pitch_letter_to_height(gabc_notes_determination_text[0]),
+ &notes_lloc);
+ }
+ YY_BREAK
+case 69:
+/* rule 69 can match eol */
+YY_RULE_SETUP
+#line 1155 "gabc/gabc-notes-determination.l"
+/* ignore ends of line and tabs */;
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 1156 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_suppress_custos_as_note(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 1159 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_custos_as_note(&current_note, &notes_lloc);
+ }
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 1162 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, false, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 1166 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, true, true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 1170 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, false, true, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 1174 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, false, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 1178 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, true, true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 1182 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_end_of_line_as_note(&current_note, true, true, false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 1186 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[1]), false,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 1192 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[2]), true,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 1198 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[2]), false);
+ }
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 1203 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[3]), true);
+ }
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 1208 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_VIRGULA);
+ }
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 1211 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_VIRGULA_HIGH);
+ }
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 1214 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMIS);
+ }
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 1217 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMIS_HIGH);
+ }
+ YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 1220 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMA);
+ }
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 1223 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINIMA_HIGH);
+ }
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 1226 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(parse_dominican_bar(gabc_notes_determination_text[1]));
+ }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 1229 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MINOR);
+ }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 1232 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MAIOR);
+ }
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 1235 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_FINALIS);
+ }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 1238 "gabc/gabc-notes-determination.l"
+{
+ add_bar_as_note(B_DIVISIO_MAIOR_DOTTED);
+ }
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 1241 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_cavum(current_note);
+ }
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 1244 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 1248 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ gregorio_add_cavum(current_note);
+ }
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 1253 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _ACCENTUS);
+ }
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 1256 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _ACCENTUS_REVERSUS);
+ }
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 1259 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _CIRCULUS);
+ }
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 1262 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS);
+ }
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 1265 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS_REVERSUS);
+ }
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 1268 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_FLAT);
+ }
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 1271 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_NATURAL);
+ }
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 1274 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_SHARP);
+ }
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 1277 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_FLAT, legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 1280 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_SHARP,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 1284 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_NATURAL,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 1288 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_HALF_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 1292 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_INTERGLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 1296 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 110:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1300 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 1304 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 1308 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 1312 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 114:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1316 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 1320 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 1324 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 117:
+/* rule 117 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+YY_LINENO_REWIND_TO(yy_bp + 1);
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 1328 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_space_as_note(&current_note, SP_ZERO_WIDTH, NULL,
+ &notes_lloc);
+ }
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 1332 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_LINEA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 1336 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 1339 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 1342 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 1345 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 1348 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 1351 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+ YY_BREAK
+case 125:
+YY_RULE_SETUP
+#line 1354 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 1357 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 1360 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, S_PUNCTUM, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 128:
+YY_RULE_SETUP
+#line 1363 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_INITIO_DEBILIS);
+ }
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 1366 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_FUSED);
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 1369 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(0, punctum_inclinatum(gabc_notes_determination_text[1]),
+ _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+ YY_BREAK
+case 131:
+YY_RULE_SETUP
+#line 1373 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_INITIO_DEBILIS);
+ }
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 1377 "gabc/gabc-notes-determination.l"
+{
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_FUSED);
+ }
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 1381 "gabc/gabc-notes-determination.l"
+{
+ add_sign(_V_EPISEMA);
+ }
+ YY_BREAK
+case 134:
+YY_RULE_SETUP
+#line 1384 "gabc/gabc-notes-determination.l"
+{
+ add_h_episema();
+ }
+ YY_BREAK
+case 135:
+YY_RULE_SETUP
+#line 1387 "gabc/gabc-notes-determination.l"
+{
+ add_sign(_PUNCTUM_MORA);
+ }
+ YY_BREAK
+case 136:
+YY_RULE_SETUP
+#line 1390 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_DEMINUTUS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 137:
+YY_RULE_SETUP
+#line 1394 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 138:
+YY_RULE_SETUP
+#line 1398 "gabc/gabc-notes-determination.l"
+{
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+#line 1402 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 140:
+YY_RULE_SETUP
+#line 1406 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 141:
+YY_RULE_SETUP
+#line 1410 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 142:
+YY_RULE_SETUP
+#line 1414 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 1418 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 144:
+YY_RULE_SETUP
+#line 1422 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 1426 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 1430 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUILISMA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 1434 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_QUILISMA_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 148:
+YY_RULE_SETUP
+#line 1438 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_VIRGA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 149:
+YY_RULE_SETUP
+#line 1442 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_VIRGA_REVERSA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 150:
+YY_RULE_SETUP
+#line 1446 "gabc/gabc-notes-determination.l"
+{
+ gregorio_change_shape(current_note, S_STROPHA,
+ legacy_oriscus_orientation);
+ }
+ YY_BREAK
+case 151:
+YY_RULE_SETUP
+#line 1450 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICIT, true);
+ }
+ YY_BREAK
+case 152:
+YY_RULE_SETUP
+#line 1453 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(high, EXPLICIT, false);
+ }
+ YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 1456 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICIT, true);
+ }
+ YY_BREAK
+case 154:
+YY_RULE_SETUP
+#line 1459 "gabc/gabc-notes-determination.l"
+{
+ LEDGER(low, EXPLICIT, false);
+ }
+ YY_BREAK
+case 155:
+/* rule 155 can match eol */
+YY_RULE_SETUP
+#line 1462 "gabc/gabc-notes-determination.l"
+{
+ gregorio_messagef("det_notes_from_string", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_notes_determination_text[0]);
+ }
+ YY_BREAK
+case 156:
+YY_RULE_SETUP
+#line 1468 "gabc/gabc-notes-determination.l"
+ECHO;
+ YY_BREAK
+#line 14101 "gabc/gabc-notes-determination-l.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(texverbnote):
+case YY_STATE_EOF(texverbglyph):
+case YY_STATE_EOF(texverbelement):
+case YY_STATE_EOF(choralsign):
+case YY_STATE_EOF(choralnabc):
+case YY_STATE_EOF(alt):
+case YY_STATE_EOF(comments):
+case YY_STATE_EOF(overbrace):
+case YY_STATE_EOF(underbrace):
+case YY_STATE_EOF(overcurlybrace):
+case YY_STATE_EOF(overcurlyaccentusbrace):
+case YY_STATE_EOF(space):
+case YY_STATE_EOF(nbspace):
+case YY_STATE_EOF(overledger):
+case YY_STATE_EOF(overledger2):
+case YY_STATE_EOF(underledger):
+case YY_STATE_EOF(underledger2):
+case YY_STATE_EOF(endledger):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ if ( *yy_cp )
+ {
+ yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)];
+ }
+ else
+ yy_current_state = yy_NUL_trans[yy_current_state];
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ yy_current_state = yy_NUL_trans[yy_current_state];
+ yy_is_jam = (yy_current_state == 0);
+
+ if ( ! yy_is_jam )
+ {
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ }
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 1468 "gabc/gabc-notes-determination.l"
+
+
+gregorio_note *gabc_det_notes_from_string(char *str, char *newmacros[10],
+ gregorio_scanner_location *loc, const gregorio_score *const score)
+{
+ int i;
+ YY_BUFFER_STATE buf;
+
+ notes_lloc.first_line = loc->first_line;
+ notes_lloc.first_column = loc->first_column;
+ notes_lloc.first_offset = loc->first_offset;
+ /* yes... I do mean to set values from loc->first_* */
+ notes_lloc.last_line = loc->first_line;
+ notes_lloc.last_column = loc->first_column;
+ notes_lloc.last_offset = loc->first_offset;
+ notes_lloc.generate_point_and_click = loc->generate_point_and_click;
+
+ staff_lines = score->staff_lines;
+ highest_pitch = score->highest_pitch;
+ high_ledger_line_pitch = score->high_ledger_line_pitch;
+ legacy_oriscus_orientation = score->legacy_oriscus_orientation;
+
+ /* a small optimization could uccur here: we could do it only once at the
+ * beginning of the score, not at each syllable */
+ for (i = 0; i < 10; i++) {
+ notesmacros[i] = newmacros[i];
+ }
+ nbof_isolated_episema = 0;
+ current_note = NULL;
+ buf = yy_scan_string(str);
+ yylex();
+ yy_flush_buffer(buf);
+ yy_delete_buffer(buf);
+ gregorio_go_to_first_note(&current_note);
+ return current_note;
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l
new file mode 100644
index 00000000000..d19e53f51ae
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-notes-determination.l
@@ -0,0 +1,1503 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the note parser.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h> /* for tolower */
+#include "bool.h"
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "gabc.h"
+
+#define YY_NO_INPUT
+
+#define YY_USER_ACTION gabc_update_location(&notes_lloc, \
+ gabc_notes_determination_text, gabc_notes_determination_leng);
+
+static gregorio_scanner_location notes_lloc;
+static gregorio_note *current_note;
+static char char_for_brace;
+static unsigned int nbof_isolated_episema;
+static char *notesmacros[10];
+static char tempstr[256];
+static unsigned short overbrace_var = 0, underbrace_var = 0;
+static const char *overbrace_var_kind;
+static int before_ledger_type;
+static char *before_ledger_length = NULL;
+static unsigned short ledger_var[2] = { 0, 0 };
+static unsigned char staff_lines;
+static signed char highest_pitch;
+static signed char high_ledger_line_pitch;
+static bool legacy_oriscus_orientation;
+static unsigned short he_adjustment_index[2] = { 0, 0 };
+static signed char bracket_low_pitch, bracket_high_pitch;
+static unsigned short left_bracket_texverb = 0;
+
+#define LEDGER(WHICH, SPECIFICITY, VALUE) \
+ if (LEDGER_##SPECIFICITY > current_note->WHICH##_ledger_specificity) { \
+ current_note->WHICH##_ledger_line = VALUE; \
+ current_note->WHICH##_ledger_specificity = LEDGER_##SPECIFICITY; \
+ }
+
+typedef struct slur_info {
+ unsigned short var;
+ char shift;
+ gregorio_note *start;
+} slur_info;
+
+static slur_info slur[2] = { { 0, '\0', NULL }, { 0, '\0', NULL } };
+
+static __inline gregorio_sign_orientation letter_to_sign_orientation(
+ const char letter) {
+ switch (letter) {
+ case 'u': /* "u"under */
+ return SO_UNDER;
+ case 'o': /* "o"ver */
+ return SO_OVER;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_sign_orientation,
+ "invalid sign orientation letter: %c", letter);
+ return SO_OVER;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline int letter_to_pitch_adjustment(const char letter) {
+ switch (letter_to_sign_orientation(letter)) {
+ case SO_OVER:
+ return 1;
+ case SO_UNDER:
+ return -1;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_pitch_adjustment,
+ "invalid sign orientation letter: %c", letter);
+ return 0;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline signed char pitch_letter_to_height(const char pitch) {
+ char result = pitch - 'a' + LOWEST_PITCH;
+ if (pitch == 'p') {
+ --result;
+ }
+ if (result > highest_pitch) {
+ gregorio_messagef("pitch_letter_to_height", VERBOSITY_ERROR, 0,
+ _("invalid pitch for %u lines: %c"), (unsigned int)staff_lines,
+ pitch);
+ }
+ if (left_bracket_texverb) {
+ if (result < bracket_low_pitch) {
+ bracket_low_pitch = result;
+ }
+ if (result > bracket_high_pitch) {
+ bracket_high_pitch = result;
+ }
+ }
+ return result;
+}
+
+static gregorio_shape punctum_inclinatum(const char orientation)
+{
+ switch (orientation) {
+ case '0':
+ return S_PUNCTUM_INCLINATUM_DESCENDENS;
+
+ case '2':
+ return S_PUNCTUM_INCLINATUM_STANS;
+
+ case '1':
+ return S_PUNCTUM_INCLINATUM_ASCENDENS;
+ }
+
+ return S_PUNCTUM_INCLINATUM_UNDETERMINED;
+}
+
+static __inline void lex_add_note(int i, gregorio_shape shape, char signs,
+ char liquescentia)
+{
+ signed char height = pitch_letter_to_height(tolower(
+ (unsigned char)gabc_notes_determination_text[i]));
+
+ nbof_isolated_episema = 0;
+ gregorio_add_note(&current_note, height, shape, signs, liquescentia, NULL,
+ &notes_lloc);
+ current_note->he_adjustment_index[SO_OVER] = he_adjustment_index[SO_OVER];
+ current_note->he_adjustment_index[SO_UNDER] = he_adjustment_index[SO_UNDER];
+
+ if (height >= high_ledger_line_pitch) {
+ LEDGER(high, DRAWN, true);
+ } else if (ledger_var[SO_OVER]) {
+ LEDGER(high, EXPLICIT, true);
+ }
+
+ if (height <= LOW_LEDGER_LINE_PITCH) {
+ LEDGER(low, DRAWN, true);
+ } else if (ledger_var[SO_UNDER]) {
+ LEDGER(low, EXPLICIT, true);
+ }
+}
+
+static __inline void add_bar_as_note(gregorio_bar bar)
+{
+ nbof_isolated_episema = 0;
+ gregorio_add_bar_as_note(&current_note, bar, &notes_lloc);
+}
+
+static __inline void error(void)
+{
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("undefined macro used: m%d"),
+ gabc_notes_determination_text[3] - '0');
+}
+
+static void add_h_episema(void)
+{
+ grehepisema_size size = H_NORMAL;
+ gregorio_vposition vposition = VPOS_AUTO;
+ bool disable_bridge = false;
+
+ char *ptr = gabc_notes_determination_text;
+ char current;
+ /* first character is the underscore */
+ while ((current = *(++ptr))) {
+ switch(current) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ case '2':
+ disable_bridge = true;
+ break;
+ case '3':
+ size = H_SMALL_LEFT;
+ break;
+ case '4':
+ size = H_SMALL_CENTRE;
+ break;
+ case '5':
+ size = H_SMALL_RIGHT;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gabc_notes_determination,
+ "unrecognized horizontal episema modifier: %c", current);
+ break;
+ /* LCOV_EXCL_STOP */
+ };
+ }
+
+ gregorio_add_h_episema(current_note, size, vposition, disable_bridge,
+ &nbof_isolated_episema);
+}
+
+static void add_sign(gregorio_sign sign)
+{
+ gregorio_vposition vposition = VPOS_AUTO;
+ switch(gabc_notes_determination_text[1]) {
+ case '0':
+ vposition = VPOS_BELOW;
+ break;
+ case '1':
+ vposition = VPOS_ABOVE;
+ break;
+ }
+ gregorio_add_sign(current_note, sign, vposition);
+}
+
+static void save_before_ledger(const char *const before_ledger)
+{
+ if (strcmp(before_ledger, "0") == 0) {
+ before_ledger_type = 0;
+ before_ledger_length = "";
+ } else if (strcmp(before_ledger, "1") == 0) {
+ before_ledger_type = 1;
+ before_ledger_length = "";
+ } else {
+ before_ledger_type = 2;
+ before_ledger_length = gregorio_strdup(before_ledger);
+ }
+}
+
+static void add_static_ledger(const gregorio_sign_orientation type,
+ const char *length) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreDrawAdditionalLine{%d}{%s}{%d}{%s}{0}{}",
+ type, length + 1, before_ledger_type, before_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+}
+
+static __inline const char *over_or_under(
+ const gregorio_sign_orientation type) {
+ switch (type) {
+ case SO_OVER:
+ return "over";
+ case SO_UNDER:
+ return "under";
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(over_or_under, "invalid ledger type %d", type);
+ return "";
+ /* LCOV_EXCL_STOP */
+}
+
+static void add_variable_ledger(const gregorio_sign_orientation type,
+ const char *after_ledger)
+{
+ if (ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("add_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line without termination of "
+ "previous %s-staff ledger line"), typename, typename);
+ } else {
+ int after_ledger_type;
+ const char *after_ledger_length;
+
+ ++after_ledger;
+
+ if (strcmp(after_ledger, "0") == 0) {
+ after_ledger_type = 0;
+ after_ledger_length = "";
+ } else if (strcmp(after_ledger, "1") == 0) {
+ after_ledger_type = 1;
+ after_ledger_length = "";
+ } else {
+ after_ledger_type = 2;
+ after_ledger_length = after_ledger;
+ }
+
+ ledger_var[type] = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{1}"
+ "\\GreDrawAdditionalLine{%d}{\\GreVarBraceLength{%hu}}"
+ "{%d}{%s}{%d}{%s}",
+ ledger_var[type], type, ledger_var[type], before_ledger_type,
+ before_ledger_length, after_ledger_type, after_ledger_length);
+
+ if (before_ledger_type == 2) {
+ free(before_ledger_length);
+ before_ledger_length = NULL;
+ }
+
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static void end_variable_ledger(const gregorio_sign_orientation type)
+{
+ if (!ledger_var[type]) {
+ const char *const typename = over_or_under(type);
+ gregorio_messagef("end_variable_ledger", VERBOSITY_ERROR, 0,
+ _("variable %s-staff ledger line termination without variable "
+ "%s-staff ledger line start"), typename, typename);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{0}{2}", ledger_var[type]);
+ ledger_var[type] = 0;
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+}
+
+static __inline int parse_clef_line(char line)
+{
+ line -= '0';
+ if (line < 0 || line > staff_lines) {
+ gregorio_messagef("parse_clef_line", VERBOSITY_ERROR, 0,
+ _("invalid clef line for %u lines: %d"),
+ (unsigned int)staff_lines, (int)line);
+ return 1;
+ }
+ return line;
+}
+
+static __inline gregorio_bar parse_dominican_bar(char bar)
+{
+ bar -= '0';
+ if (bar < 1 || bar > (2 * (staff_lines - 1))) {
+ gregorio_messagef("parse_dominican_line", VERBOSITY_ERROR, 0,
+ _("invalid Dominican bar for %u lines: ;%d"),
+ (unsigned int)staff_lines, (int)bar);
+ }
+
+ switch (bar) {
+ case 1:
+ return B_DIVISIO_MINOR_D1;
+ case 2:
+ return B_DIVISIO_MINOR_D2;
+ case 3:
+ return B_DIVISIO_MINOR_D3;
+ case 4:
+ return B_DIVISIO_MINOR_D4;
+ case 5:
+ return B_DIVISIO_MINOR_D5;
+ case 6:
+ return B_DIVISIO_MINOR_D6;
+ case 7:
+ return B_DIVISIO_MINOR_D7;
+ case 8:
+ return B_DIVISIO_MINOR_D8;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(check_dominican_line, "invalid dominican bar: %d", (int)bar);
+ return B_NO_BAR;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline gregorio_clef letter_to_clef(char letter)
+{
+ switch (letter) {
+ case 'c':
+ return CLEF_C;
+ case 'f':
+ return CLEF_F;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(letter_to_clef, "invalid clef: %c", letter);
+ return CLEF_C;
+ /* LCOV_EXCL_STOP */
+}
+
+/* this assertion should only fail if the lex rules are incorrect */
+static __inline void slur_assert(char *fn, bool test) {
+ if (!test) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid slur text"), fn, VERBOSITY_FATAL, 0);
+ exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static char *parse_slur_shift(char *shift)
+{
+ char *c;
+
+ c = strchr(gabc_notes_determination_text, ':');
+ slur_assert("parse_slur_shift", c != NULL);
+ slur_assert("parse_slur_shift", *(++c) != '\0');
+ *shift = *c;
+ return c;
+}
+
+static void parse_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ char shift, *width, *height, *end;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "parse_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ end = parse_slur_shift(&shift);
+ width = strchr(end, ';');
+ slur_assert("parse_slur", width != NULL);
+ height = strchr(++width, ',');
+ slur_assert("parse_slur", height != NULL);
+ *height = '\0';
+ end = strchr(++height, ']');
+ slur_assert("parse_slur", end != NULL);
+ *end = '\0';
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreSlur{%d}{%d}{%c}{%s}{%s}{}",
+ current_note->u.note.pitch + direction, direction, shift, width,
+ height);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+}
+
+static void start_var_slur(void)
+{
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "start_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (slur[index].var) {
+ gregorio_messagef("start_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur without termination of previous slur"),
+ over_or_under(index));
+ return;
+ }
+
+ slur[index].var = ++tex_position_id;
+ parse_slur_shift(&(slur[index].shift));
+ slur[index].start = current_note;
+}
+
+static void end_var_slur(void)
+{
+ const int direction = letter_to_pitch_adjustment(
+ gabc_notes_determination_text[1]);
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ char shift;
+
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(
+ _("cannot add a slur to something that is not a note"),
+ "end_var_slur", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (!slur[index].var || !slur[index].shift || !slur[index].start) {
+ gregorio_messagef("end_var_slur", VERBOSITY_ERROR, 0,
+ _("variable %s-note slur end without start"),
+ over_or_under(index));
+ return;
+ }
+
+ parse_slur_shift(&shift);
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{1}"
+ "\\GreSlur{%d}{%d}{%c}{\\GreVarBraceLength{%hu}}{}{%d}",
+ slur[index].var, slur[index].shift,
+ slur[index].start->u.note.pitch + direction, direction,
+ slur[index].shift, slur[index].var,
+ current_note->u.note.pitch + direction);
+ gregorio_add_texverb_to_note(slur[index].start, gregorio_strdup(tempstr));
+
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%c}{2}", slur[index].var, shift);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+
+
+ slur[index].var = 0;
+ slur[index].shift = '\0';
+ slur[index].start = NULL;
+}
+
+static void left_bracket(void)
+{
+ if (left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a left bracket before closing the previous one"),
+ "left_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ /* when setting the left bracket, temporarily store the point-and-click
+ * information in the texverb */
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr, "%u:%u:%u",
+ notes_lloc.first_line, notes_lloc.first_offset,
+ notes_lloc.first_column + 1);
+ } else {
+ tempstr[0] = '\0';
+ }
+ left_bracket_texverb = gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(tempstr), GRE_TEXVERB_GLYPH, &notes_lloc);
+ bracket_low_pitch = MAX_PITCH;
+ bracket_high_pitch = LOWEST_PITCH;
+}
+
+static void right_bracket(void)
+{
+ if (!left_bracket_texverb) {
+ gregorio_message(
+ _("cannot add a right bracket without a matching left bracket"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (bracket_high_pitch < bracket_low_pitch) {
+ gregorio_message(
+ _("cannot add brackets without notes between them"),
+ "right_bracket", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ gregorio_snprintf(tempstr, sizeof tempstr, "\\GreBracket{0}{%d}{%d}{%s}",
+ bracket_low_pitch, bracket_high_pitch,
+ gregorio_texverb(left_bracket_texverb));
+ gregorio_change_texverb(left_bracket_texverb, gregorio_strdup(tempstr));
+
+ if (notes_lloc.generate_point_and_click) {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{%u:%u:%u}", bracket_low_pitch,
+ bracket_high_pitch, notes_lloc.first_line,
+ notes_lloc.first_offset, notes_lloc.first_column + 1);
+ } else {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreBracket{1}{%d}{%d}{}", bracket_low_pitch,
+ bracket_high_pitch);
+ }
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(tempstr),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+
+ left_bracket_texverb = 0;
+}
+
+static void parse_hepisema_adjustment(void)
+{
+ /* See https://github.com/gregorio-project/gregorio/issues/872
+ *
+ * [xh:yzw]
+ *
+ * - x is o(ver) or u(under)
+ * - y is optional and is
+ * - l for low in the space (chooses ol or ul depending on x)
+ * - m for middle of the space
+ * - h for high in the space (chooses oh or uh depending on x)
+ * - ol for low in the space as if the episema were over the note
+ * - oh for high in the space as if the episema were over the note
+ * - ul for low in the space as if the episema were under the note
+ * - uh for high in the space as if the episema were under the note
+ * - z is an optional nudge and must start with + or -
+ * - w is optional and may be { to start a range or } to end a range.
+ *
+ * at least one of y, z, or w must be provided
+ * if y and z are omitted, the : may be omitted
+ * y and z are not permitted when w is }
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+ gregorio_sign_orientation det_index = index;
+ char *ch = gabc_notes_determination_text + 3;
+ gregorio_hepisema_vbasepos vbasepos = HVB_AUTO;
+ char *nudge = NULL;
+ char save;
+ short hepisema_adjustment_id;
+
+ if (he_adjustment_index[index]) {
+ gregorio_messagef("parse_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment start before ending the "
+ "previous adjustment"), over_or_under(index));
+ return;
+ }
+
+ if (*ch == ':') {
+ ++ch;
+ if (*ch == 'm') {
+ vbasepos = HVB_MIDDLE;
+ } else {
+ switch (*ch) {
+ case 'o':
+ ++ch;
+ det_index = SO_OVER;
+ break;
+ case 'u':
+ ++ch;
+ det_index = SO_UNDER;
+ break;
+ }
+
+ switch (*ch) {
+ case 'l':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_LOW;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_LOW;
+ break;
+ }
+ break;
+ case 'h':
+ switch (det_index) {
+ case SO_OVER:
+ vbasepos = HVB_O_HIGH;
+ break;
+ case SO_UNDER:
+ vbasepos = HVB_U_HIGH;
+ break;
+ }
+ break;
+ }
+ }
+ if (vbasepos) {
+ ++ch;
+ }
+ if (*ch == '+' || *ch == '-') {
+ nudge = ch;
+ do {
+ ++ch;
+ } while (*ch && *ch != '{' && *ch != ']');
+ save = *ch;
+ *ch = '\0';
+ nudge = gregorio_strdup(nudge);
+ *ch = save;
+ }
+ }
+
+ hepisema_adjustment_id = gregorio_add_hepisema_adjustment(vbasepos, nudge);
+
+ if (*ch == '{') {
+ he_adjustment_index[index] = hepisema_adjustment_id;
+ } else {
+ if (!current_note || current_note->type != GRE_NOTE) {
+ gregorio_message(_("cannot add a horizontal episema adjustment to "
+ "something that is not a note"),
+ "parse_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return;
+ }
+ current_note->he_adjustment_index[index] = hepisema_adjustment_id;
+ }
+}
+
+static void end_hepisema_adjustment(void)
+{
+ /* [xh:}]
+ * - x indicates l(ow) or h(igh) episema
+ * - : is optional
+ */
+
+ const gregorio_sign_orientation index = letter_to_sign_orientation(
+ gabc_notes_determination_text[1]);
+
+ if (!he_adjustment_index[index]) {
+ gregorio_messagef("end_hepisema_adustment", VERBOSITY_ERROR, 0,
+ _("horizontal %s-episema adjustment end with no matching "
+ "start"), over_or_under(index));
+ return;
+ }
+
+ he_adjustment_index[index] = 0;
+}
+
+void gabc_det_notes_finish(void)
+{
+ gregorio_sign_orientation orientation;
+ if (overbrace_var) {
+ gregorio_message(_("unclosed variable over-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ overbrace_var = 0;
+ }
+ if (underbrace_var) {
+ gregorio_message(_("unclosed variable under-staff brace"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ underbrace_var = 0;
+ }
+ for (orientation = SO_OVER; orientation <= SO_UNDER; ++orientation) {
+ const char *name = over_or_under(orientation);
+ if (ledger_var[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-staff ledger line"), name);
+ ledger_var[orientation] = 0;
+ }
+ if (slur[orientation].var) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed variable %s-note slur"), name);
+ slur[orientation].var = 0;
+ slur[orientation].shift = '\0';
+ slur[orientation].start = NULL;
+ }
+ if (he_adjustment_index[orientation]) {
+ gregorio_messagef("gabc_det_notes_finish", VERBOSITY_ERROR, 0,
+ _("unclosed horizontal %s-episema adjustment"),
+ over_or_under(orientation));
+ ledger_var[orientation] = 0;
+ }
+ }
+ if (left_bracket_texverb) {
+ gregorio_message(_("unclosed left bracket"),
+ "gabc_det_notes_finish", VERBOSITY_ERROR, 0);
+ left_bracket_texverb = 0;
+ }
+}
+
+%}
+
+%option stack
+%option 8bit
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option full
+%option noread
+%option nomain
+%option align
+%option noyylineno
+%option prefix="gabc_notes_determination_"
+%option noyywrap
+
+%x texverbnote
+%x texverbglyph
+%x texverbelement
+%x choralsign
+%x choralnabc
+%x alt
+%x comments
+%x overbrace
+%x underbrace
+%x overcurlybrace
+%x overcurlyaccentusbrace
+%x space
+%x nbspace
+%x overledger overledger2
+%x underledger underledger2
+%x endledger
+
+%%
+<INITIAL>\% {
+ BEGIN(comments);
+ }
+<comments>(\n|\r)+ {
+ BEGIN(INITIAL);
+ }
+<comments>[^\n\r]* {
+ /* ignored */
+ }
+<INITIAL>\[cs: {
+ BEGIN(choralsign);
+ }
+<INITIAL>\[cn: {
+ BEGIN(choralnabc);
+ }
+<INITIAL>\[ob:[01]; {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(overbrace);
+ }
+<INITIAL>\[ub:[01]; {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ BEGIN(underbrace);
+ }
+<INITIAL>\[ocb:[01]; {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ BEGIN(overcurlybrace);
+ }
+<INITIAL>\[ocba:[01]; {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ BEGIN(overcurlyaccentusbrace);
+ }
+<INITIAL>\[ob:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ob";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ub:[01]\{\] {
+ if (underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace without termination of "
+ "previous underbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ underbrace_var = ++tex_position_id;
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreUnderBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}",
+ underbrace_var, char_for_brace, underbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocb:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocb";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{0}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocba:[01]\{\] {
+ if (overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace without termination of "
+ "previous overbrace"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ overbrace_var = ++tex_position_id;
+ overbrace_var_kind = "ocba";
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{1}"
+ "\\GreOverCurlyBrace{\\GreVarBraceLength{%hu}}{0pt}{0pt}{%d}{1}",
+ overbrace_var, char_for_brace, overbrace_var, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ob:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ob")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ob"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ub:[01]\}\] {
+ if (!underbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable underbrace termination without "
+ "variable underbrace start"));
+ } else {
+ char_for_brace = gabc_notes_determination_text[4]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", underbrace_var,
+ char_for_brace);
+ underbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocb:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocb")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocb"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[5]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[ocba:[01]\}\] {
+ if (!overbrace_var) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace termination without "
+ "variable overbrace start"));
+ } else if (strcmp (overbrace_var_kind, "ocba")) {
+ gregorio_messagef("gabc_notes_determination", VERBOSITY_ERROR, 0,
+ _("variable overbrace started with %s "
+ "and terminated with ocba"),
+ overbrace_var_kind);
+ } else {
+ char_for_brace = gabc_notes_determination_text[6]-'0';
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreVarBraceSavePos{%hu}{%d}{2}", overbrace_var,
+ char_for_brace);
+ overbrace_var = 0;
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+ }
+<INITIAL>\[nm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']));
+ } else error();
+ }
+<INITIAL>\[gm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[em[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[3]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[3]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[altm[1-9]\] {
+ if (notesmacros[gabc_notes_determination_text[5]-'0']) {
+ gregorio_add_texverb_as_note(&current_note, gregorio_strdup(
+ notesmacros[gabc_notes_determination_text[5]-'0']),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ } else error();
+ }
+<INITIAL>\[nv: {
+ BEGIN(texverbnote);
+ }
+<INITIAL>\[gv: {
+ BEGIN(texverbglyph);
+ }
+<INITIAL>\[ev: {
+ BEGIN(texverbelement);
+ }
+<INITIAL>\[alt: {
+ BEGIN(alt);
+ }
+<INITIAL><nlba> {
+ gregorio_add_nlba_as_note(&current_note, NLBA_BEGINNING, &notes_lloc);
+ }
+<INITIAL><\/nlba> {
+ gregorio_add_nlba_as_note(&current_note, NLBA_END, &notes_lloc);
+ }
+<INITIAL>@\[ {
+ gregorio_start_autofuse(&current_note, &notes_lloc);
+ }
+<INITIAL>\] {
+ gregorio_end_autofuse(&current_note, &notes_lloc);
+ }
+<overbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<underbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreUnderBrace{%s}{0pt}{0pt}{%d}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<overcurlybrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{0}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<overcurlyaccentusbrace>[^\]]+ {
+ gregorio_snprintf(tempstr, sizeof tempstr,
+ "\\GreOverCurlyBrace{%s}{0pt}{0pt}{%d}{1}",
+ gabc_notes_determination_text, char_for_brace);
+ gregorio_add_texverb_to_note(current_note, gregorio_strdup(tempstr));
+ }
+<choralsign>[^\]]+ {
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), false);
+ }
+<choralnabc>[^\]]+ {
+ gregorio_add_cs_to_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), true);
+ }
+<texverbnote>[^\]]+ {
+ gregorio_add_texverb_to_note(current_note,
+ gregorio_strdup(gabc_notes_determination_text));
+ }
+<texverbglyph>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_GLYPH, &notes_lloc);
+ }
+<texverbelement>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+<alt>[^\]]+ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup(gabc_notes_determination_text), GRE_ALT,
+ &notes_lloc);
+ }
+<INITIAL>\/\[ {
+ BEGIN(space);
+ }
+<space>-?(\.[0-9]+|[0-9]+(\.[0-9]*)?)/\] {
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+<INITIAL>!\/\[ {
+ BEGIN(nbspace);
+ }
+<nbspace>-?(\.[0-9]+|[0-9]+(\.[0-9]*)?)/\] {
+ gregorio_add_space_as_note(&current_note, SP_AD_HOC_SPACE_NB,
+ gregorio_strdup(gabc_notes_determination_text), &notes_lloc);
+ }
+<INITIAL>\[oll:1\] {
+ LEDGER(high, EXPLICITLY_DRAWN, true);
+ }
+<INITIAL>\[oll:0\] {
+ LEDGER(high, EXPLICITLY_DRAWN, false);
+ }
+<INITIAL>\[oll:\}\] {
+ end_variable_ledger(SO_OVER);
+ }
+<INITIAL>\[oll: {
+ BEGIN(overledger);
+ }
+<overledger>[^;{]+ {
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(overledger2);
+ }
+<overledger2>;[^\]]+ {
+ add_static_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<overledger2>\{[^\]]+ {
+ add_variable_ledger(SO_OVER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<INITIAL>\[ull:1\] {
+ LEDGER(low, EXPLICITLY_DRAWN, true);
+ }
+<INITIAL>\[ull:0\] {
+ LEDGER(low, EXPLICITLY_DRAWN, false);
+ }
+<INITIAL>\[ull:\}\] {
+ end_variable_ledger(SO_UNDER);
+ }
+<INITIAL>\[ull: {
+ BEGIN(underledger);
+ }
+<underledger>[^;{]+ {
+ save_before_ledger(gabc_notes_determination_text);
+ BEGIN(underledger2);
+ }
+<underledger2>;[^\]]+ {
+ add_static_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<underledger2>\{[^\]]+ {
+ add_variable_ledger(SO_UNDER, gabc_notes_determination_text);
+ BEGIN(endledger);
+ }
+<texverbnote,texverbglyph,texverbelement,choralsign,choralnabc,alt,overcurlyaccentusbrace,overcurlybrace,overbrace,underbrace,space,nbspace,endledger>\] {
+ BEGIN(INITIAL);
+ }
+<INITIAL>\[[ou]slur:[012];[^,]+,[^\]]+\] {
+ parse_slur();
+ }
+<INITIAL>\[[ou]slur:[012]\{\] {
+ start_var_slur();
+ }
+<INITIAL>\[[ou]slur:[012]\}\] {
+ end_var_slur();
+ }
+<INITIAL>\[[ou]h(?x:
+ :(m|[ou]?[lh])\{?
+| :(m|[ou]?[lh])?[+-][^\]\{]+\{?
+| :?\{
+)\] {
+ parse_hepisema_adjustment();
+ }
+<INITIAL>\[[ou]h:?\}\] {
+ end_hepisema_adjustment();
+ }
+<INITIAL>\[\[ {
+ left_bracket();
+ }
+<INITIAL>\]\] {
+ right_bracket();
+ }
+\{ {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hbox to 0pt{"), GRE_TEXVERB_ELEMENT,
+ &notes_lloc);
+ }
+\} {
+ gregorio_add_texverb_as_note(&current_note,
+ gregorio_strdup("\\hss%\n}%\n\\GreNoBreak\\relax "),
+ GRE_TEXVERB_ELEMENT, &notes_lloc);
+ }
+[a-np]\+ {
+ gregorio_add_manual_custos_as_note(&current_note,
+ pitch_letter_to_height(gabc_notes_determination_text[0]),
+ &notes_lloc);
+ }
+[\t\r\n]+ /* ignore ends of line and tabs */;
+<INITIAL>\[nocustos\] {
+ gregorio_add_suppress_custos_as_note(&current_note, &notes_lloc);
+ }
+z0 {
+ gregorio_add_custos_as_note(&current_note, &notes_lloc);
+ }
+z {
+ gregorio_add_end_of_line_as_note(&current_note, false, false, false,
+ &notes_lloc);
+ }
+z\+ {
+ gregorio_add_end_of_line_as_note(&current_note, false, true, true,
+ &notes_lloc);
+ }
+z- {
+ gregorio_add_end_of_line_as_note(&current_note, false, true, false,
+ &notes_lloc);
+ }
+Z {
+ gregorio_add_end_of_line_as_note(&current_note, true, false, false,
+ &notes_lloc);
+ }
+Z\+ {
+ gregorio_add_end_of_line_as_note(&current_note, true, true, true,
+ &notes_lloc);
+ }
+Z- {
+ gregorio_add_end_of_line_as_note(&current_note, true, true, false,
+ &notes_lloc);
+ }
+[cf][1-5] {
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[1]), false,
+ &notes_lloc);
+ }
+[cf]b[1-5] {
+ gregorio_add_clef_as_note(&current_note,
+ letter_to_clef(gabc_notes_determination_text[0]),
+ parse_clef_line(gabc_notes_determination_text[2]), true,
+ &notes_lloc);
+ }
+@[cf][1-5] {
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[2]), false);
+ }
+@[cf]b[1-5] {
+ gregorio_add_secondary_clef_to_note(current_note,
+ letter_to_clef(gabc_notes_determination_text[1]),
+ parse_clef_line(gabc_notes_determination_text[3]), true);
+ }
+` {
+ add_bar_as_note(B_VIRGULA);
+ }
+`0 {
+ add_bar_as_note(B_VIRGULA_HIGH);
+ }
+\^ {
+ add_bar_as_note(B_DIVISIO_MINIMIS);
+ }
+\^0 {
+ add_bar_as_note(B_DIVISIO_MINIMIS_HIGH);
+ }
+, {
+ add_bar_as_note(B_DIVISIO_MINIMA);
+ }
+,0 {
+ add_bar_as_note(B_DIVISIO_MINIMA_HIGH);
+ }
+[,;][1-8] {
+ add_bar_as_note(parse_dominican_bar(gabc_notes_determination_text[1]));
+ }
+; {
+ add_bar_as_note(B_DIVISIO_MINOR);
+ }
+: {
+ add_bar_as_note(B_DIVISIO_MAIOR);
+ }
+:: {
+ add_bar_as_note(B_DIVISIO_FINALIS);
+ }
+:\? {
+ add_bar_as_note(B_DIVISIO_MAIOR_DOTTED);
+ }
+r {
+ gregorio_add_cavum(current_note);
+ }
+R {
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ }
+r0 {
+ gregorio_change_shape(current_note, S_LINEA_PUNCTUM,
+ legacy_oriscus_orientation);
+ gregorio_add_cavum(current_note);
+ }
+r1 {
+ gregorio_add_special_sign(current_note, _ACCENTUS);
+ }
+r2 {
+ gregorio_add_special_sign(current_note, _ACCENTUS_REVERSUS);
+ }
+r3 {
+ gregorio_add_special_sign(current_note, _CIRCULUS);
+ }
+r4 {
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS);
+ }
+r5 {
+ gregorio_add_special_sign(current_note, _SEMI_CIRCULUS_REVERSUS);
+ }
+r6 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_FLAT);
+ }
+r7 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_NATURAL);
+ }
+r8 {
+ gregorio_add_special_sign(current_note, _MUSICA_FICTA_SHARP);
+ }
+x {
+ gregorio_change_shape(current_note, S_FLAT, legacy_oriscus_orientation);
+ }
+# {
+ gregorio_change_shape(current_note, S_SHARP,
+ legacy_oriscus_orientation);
+ }
+y {
+ gregorio_change_shape(current_note, S_NATURAL,
+ legacy_oriscus_orientation);
+ }
+!?\/0 {
+ gregorio_add_space_as_note(&current_note, SP_HALF_SPACE, NULL,
+ &notes_lloc);
+ }
+!?\/! {
+ gregorio_add_space_as_note(&current_note, SP_INTERGLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+\/ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+\//\/\[ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT, NULL,
+ &notes_lloc);
+ }
+\/\/ {
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE, NULL,
+ &notes_lloc);
+ }
+\ {
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE, NULL,
+ &notes_lloc);
+ }
+!\/ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+!\//\/\[ {
+ gregorio_add_space_as_note(&current_note, SP_NEUMATIC_CUT_NB, NULL,
+ &notes_lloc);
+ }
+!\/\/ {
+ gregorio_add_space_as_note(&current_note, SP_LARGER_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+!\ {
+ gregorio_add_space_as_note(&current_note, SP_GLYPH_SPACE_NB, NULL,
+ &notes_lloc);
+ }
+!/[^\/ ] {
+ gregorio_add_space_as_note(&current_note, SP_ZERO_WIDTH, NULL,
+ &notes_lloc);
+ }
+= {
+ gregorio_change_shape(current_note, S_LINEA,
+ legacy_oriscus_orientation);
+ }
+[a-npA-NP]vv {
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]vvv {
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]VV {
+ lex_add_note(0, S_BIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]VVV {
+ lex_add_note(0, S_TRIVIRGA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]ss {
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]ss(\<|\>) {
+ lex_add_note(0, S_DISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+[a-npA-NP]sss {
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+[a-npA-NP]sss(\<|\>) {
+ lex_add_note(0, S_TRISTROPHA, _NO_SIGN, L_AUCTUS_ASCENDENS);
+ }
+[a-np] {
+ lex_add_note(0, S_PUNCTUM, _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+-[a-np] {
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_INITIO_DEBILIS);
+ }
+@[a-np] {
+ lex_add_note(1, S_PUNCTUM, _NO_SIGN, L_FUSED);
+ }
+[A-NP][012]? {
+ lex_add_note(0, punctum_inclinatum(gabc_notes_determination_text[1]),
+ _NO_SIGN, L_NO_LIQUESCENTIA);
+ }
+-[A-NP][012]? {
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_INITIO_DEBILIS);
+ }
+@[A-NP][012]? {
+ lex_add_note(1, punctum_inclinatum(gabc_notes_determination_text[2]),
+ _NO_SIGN, L_FUSED);
+ }
+\'[01]? {
+ add_sign(_V_EPISEMA);
+ }
+_[0-5]* {
+ add_h_episema();
+ }
+\.[01]? {
+ add_sign(_PUNCTUM_MORA);
+ }
+~ {
+ gregorio_add_tail_liquescentia(current_note, L_DEMINUTUS,
+ legacy_oriscus_orientation);
+ }
+> {
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+\< {
+ gregorio_add_tail_liquescentia(current_note, L_AUCTUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+q {
+ gregorio_change_shape(current_note, S_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+o {
+ gregorio_change_shape(current_note, S_ORISCUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+o0 {
+ gregorio_change_shape(current_note, S_ORISCUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+o1 {
+ gregorio_change_shape(current_note, S_ORISCUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+O {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_UNDETERMINED,
+ legacy_oriscus_orientation);
+ }
+O0 {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_DESCENDENS,
+ legacy_oriscus_orientation);
+ }
+O1 {
+ gregorio_change_shape(current_note, S_ORISCUS_SCAPUS_ASCENDENS,
+ legacy_oriscus_orientation);
+ }
+w {
+ gregorio_change_shape(current_note, S_QUILISMA,
+ legacy_oriscus_orientation);
+ }
+W {
+ gregorio_change_shape(current_note, S_QUILISMA_QUADRATUM,
+ legacy_oriscus_orientation);
+ }
+v {
+ gregorio_change_shape(current_note, S_VIRGA,
+ legacy_oriscus_orientation);
+ }
+V {
+ gregorio_change_shape(current_note, S_VIRGA_REVERSA,
+ legacy_oriscus_orientation);
+ }
+s {
+ gregorio_change_shape(current_note, S_STROPHA,
+ legacy_oriscus_orientation);
+ }
+\[hl:1\] {
+ LEDGER(high, EXPLICIT, true);
+ }
+\[hl:0\] {
+ LEDGER(high, EXPLICIT, false);
+ }
+\[ll:1\] {
+ LEDGER(low, EXPLICIT, true);
+ }
+\[ll:0\] {
+ LEDGER(low, EXPLICIT, false);
+ }
+.|\n {
+ gregorio_messagef("det_notes_from_string", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_notes_determination_text[0]);
+ }
+
+%%
+
+gregorio_note *gabc_det_notes_from_string(char *str, char *newmacros[10],
+ gregorio_scanner_location *loc, const gregorio_score *const score)
+{
+ int i;
+ YY_BUFFER_STATE buf;
+
+ notes_lloc.first_line = loc->first_line;
+ notes_lloc.first_column = loc->first_column;
+ notes_lloc.first_offset = loc->first_offset;
+ /* yes... I do mean to set values from loc->first_* */
+ notes_lloc.last_line = loc->first_line;
+ notes_lloc.last_column = loc->first_column;
+ notes_lloc.last_offset = loc->first_offset;
+ notes_lloc.generate_point_and_click = loc->generate_point_and_click;
+
+ staff_lines = score->staff_lines;
+ highest_pitch = score->highest_pitch;
+ high_ledger_line_pitch = score->high_ledger_line_pitch;
+ legacy_oriscus_orientation = score->legacy_oriscus_orientation;
+
+ /* a small optimization could uccur here: we could do it only once at the
+ * beginning of the score, not at each syllable */
+ for (i = 0; i < 10; i++) {
+ notesmacros[i] = newmacros[i];
+ }
+ nbof_isolated_episema = 0;
+ current_note = NULL;
+ buf = yy_scan_string(str);
+ yylex();
+ yy_flush_buffer(buf);
+ yy_delete_buffer(buf);
+ gregorio_go_to_first_note(&current_note);
+ return current_note;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c
new file mode 100644
index 00000000000..d25f0ee2d94
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.c
@@ -0,0 +1,2987 @@
+#line 1 "gabc/gabc-score-determination-l.c"
+
+#line 3 "gabc/gabc-score-determination-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gabc_score_determination__create_buffer
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#define yy_scan_string gabc_score_determination__scan_string
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#define yy_init_buffer gabc_score_determination__init_buffer
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#define yy_flex_debug gabc_score_determination__flex_debug
+#define yyin gabc_score_determination_in
+#define yyleng gabc_score_determination_leng
+#define yylex gabc_score_determination_lex
+#define yylineno gabc_score_determination_lineno
+#define yyout gabc_score_determination_out
+#define yyrestart gabc_score_determination_restart
+#define yytext gabc_score_determination_text
+#define yywrap gabc_score_determination_wrap
+#define yyalloc gabc_score_determination_alloc
+#define yyrealloc gabc_score_determination_realloc
+#define yyfree gabc_score_determination_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_score_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_score_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_score_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_score_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_score_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_score_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_score_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_score_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_score_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_score_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_score_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_score_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_score_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_score_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_score_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_score_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_score_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_score_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_score_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_score_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_score_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_score_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_score_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_score_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_score_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_score_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_score_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_score_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_score_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_score_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_score_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_score_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_score_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_score_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_score_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_score_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_score_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_score_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_score_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_score_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_score_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_score_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_score_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_score_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_score_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_score_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_score_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_score_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_score_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_score_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_score_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_score_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_score_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_score_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_score_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_score_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_score_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_score_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gabc_score_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 77
+#define YY_END_OF_BUFFER 78
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[309] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 78, 25, 76, 25, 23, 6, 23, 23,
+ 23, 23, 23, 23, 23, 23, 2, 2, 3, 3,
+ 1, 8, 9, 27, 26, 50, 71, 29, 28, 56,
+ 64, 65, 57, 58, 72, 74, 73, 49, 48, 77,
+ 77, 55, 56, 52, 51, 5, 4, 56, 77, 69,
+ 77, 77, 70, 0, 0, 23, 6, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 2, 1, 8,
+ 0, 7, 0, 27, 26, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
+ 75, 49, 48, 0, 55, 0, 52, 51, 5, 4,
+ 0, 69, 69, 69, 0, 0, 70, 0, 24, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 40, 38, 0, 44, 0, 32, 0, 0, 0,
+ 0, 0, 0, 53, 63, 0, 0, 0, 23, 23,
+ 0, 23, 23, 14, 23, 11, 23, 23, 23, 41,
+ 39, 45, 0, 33, 0, 0, 0, 0, 0, 0,
+ 61, 0, 0, 0, 68, 67, 42, 46, 34, 36,
+
+ 0, 54, 0, 23, 23, 23, 0, 23, 0, 0,
+ 23, 23, 23, 62, 0, 43, 35, 37, 59, 0,
+ 0, 0, 68, 47, 0, 23, 18, 10, 23, 23,
+ 23, 23, 23, 23, 0, 0, 0, 0, 30, 60,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 31,
+ 0, 0, 66, 23, 23, 19, 23, 23, 23, 0,
+ 23, 23, 0, 23, 23, 23, 23, 23, 23, 23,
+ 23, 17, 23, 23, 23, 21, 23, 23, 23, 23,
+ 23, 23, 23, 23, 20, 23, 23, 23, 23, 23,
+ 23, 23, 15, 23, 23, 13, 23, 23, 23, 23,
+
+ 23, 12, 16, 23, 23, 23, 22, 0
+ } ;
+
+static const YY_CHAR yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 1, 6, 1, 7, 1, 1, 8,
+ 9, 1, 1, 10, 11, 12, 13, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
+ 1, 18, 1, 1, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 1, 21, 1, 19, 1, 22, 23, 24, 25,
+
+ 26, 27, 28, 29, 30, 19, 19, 31, 32, 33,
+ 34, 35, 19, 36, 37, 38, 39, 40, 19, 19,
+ 41, 19, 42, 43, 44, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 45, 1, 1, 1,
+ 46, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 47, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static const YY_CHAR yy_meta[48] =
+ { 0,
+ 1, 1, 2, 2, 1, 1, 3, 3, 4, 3,
+ 5, 3, 1, 6, 3, 7, 8, 1, 6, 3,
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 9, 4, 9, 1, 1, 1
+ } ;
+
+static const flex_int32_t yy_base[326] =
+ { 0,
+ 0, 45, 707, 706, 90, 132, 41, 44, 71, 78,
+ 704, 703, 51, 53, 55, 57, 702, 701, 50, 51,
+ 65, 152, 717, 724, 724, 709, 704, 709, 75, 78,
+ 55, 74, 65, 101, 92, 107, 68, 76, 724, 706,
+ 79, 0, 156, 0, 164, 724, 724, 724, 724, 175,
+ 699, 724, 724, 724, 0, 179, 724, 0, 187, 698,
+ 724, 0, 697, 0, 113, 0, 126, 696, 694, 107,
+ 191, 214, 724, 134, 0, 696, 724, 140, 164, 135,
+ 200, 152, 139, 210, 176, 192, 209, 221, 182, 0,
+ 232, 236, 241, 0, 245, 249, 262, 675, 687, 237,
+
+ 168, 686, 672, 666, 232, 663, 669, 681, 677, 0,
+ 255, 0, 259, 660, 0, 656, 0, 262, 0, 266,
+ 673, 680, 679, 260, 276, 300, 724, 304, 272, 681,
+ 276, 98, 680, 266, 285, 271, 287, 301, 280, 303,
+ 304, 659, 671, 670, 298, 669, 655, 661, 646, 652,
+ 644, 724, 724, 655, 724, 662, 724, 656, 330, 660,
+ 659, 658, 657, 724, 724, 639, 655, 641, 282, 308,
+ 639, 659, 310, 658, 657, 656, 312, 314, 317, 724,
+ 724, 724, 648, 724, 642, 646, 645, 644, 643, 638,
+ 724, 637, 348, 352, 369, 724, 724, 724, 724, 724,
+
+ 633, 724, 604, 319, 347, 315, 615, 353, 335, 595,
+ 348, 608, 603, 724, 590, 724, 724, 724, 724, 575,
+ 589, 374, 386, 724, 507, 327, 510, 509, 313, 357,
+ 351, 335, 369, 371, 495, 487, 497, 391, 724, 724,
+ 373, 375, 386, 387, 390, 189, 503, 389, 391, 724,
+ 414, 426, 724, 400, 394, 500, 395, 396, 413, 476,
+ 402, 409, 443, 422, 414, 425, 427, 429, 432, 430,
+ 438, 498, 442, 441, 445, 495, 446, 447, 448, 451,
+ 452, 454, 456, 458, 491, 462, 459, 463, 470, 473,
+ 449, 475, 272, 478, 479, 260, 482, 483, 484, 485,
+
+ 486, 219, 160, 487, 489, 493, 122, 724, 526, 535,
+ 544, 553, 562, 571, 580, 589, 594, 600, 609, 615,
+ 624, 631, 640, 649, 67
+ } ;
+
+static const flex_int32_t yy_def[326] =
+ { 0,
+ 308, 1, 309, 309, 310, 310, 311, 311, 312, 312,
+ 313, 313, 314, 314, 315, 315, 313, 313, 316, 316,
+ 316, 316, 308, 308, 308, 308, 317, 308, 317, 317,
+ 317, 317, 317, 317, 317, 317, 308, 308, 308, 308,
+ 308, 318, 308, 319, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 320, 308, 308, 321, 308, 308,
+ 308, 322, 308, 323, 308, 324, 308, 308, 308, 308,
+ 308, 308, 308, 308, 325, 317, 308, 317, 317, 317,
+ 317, 317, 317, 317, 317, 317, 317, 308, 308, 318,
+ 308, 308, 308, 319, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 320,
+ 308, 321, 308, 308, 322, 308, 323, 308, 324, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 325,
+ 317, 317, 317, 317, 317, 317, 317, 317, 317, 317,
+ 317, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 317, 317,
+ 325, 317, 317, 317, 317, 317, 317, 317, 317, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+
+ 308, 308, 308, 317, 317, 325, 325, 317, 325, 325,
+ 317, 317, 317, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 317, 317, 325, 325, 317,
+ 325, 325, 325, 317, 325, 325, 308, 308, 308, 308,
+ 317, 325, 317, 325, 325, 325, 317, 325, 325, 308,
+ 308, 308, 308, 317, 325, 317, 325, 325, 325, 325,
+ 325, 325, 308, 317, 325, 325, 325, 325, 325, 325,
+ 325, 317, 325, 325, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325,
+
+ 325, 325, 325, 325, 325, 325, 325, 0, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308
+ } ;
+
+static const flex_int32_t yy_nxt[772] =
+ { 0,
+ 24, 24, 25, 24, 24, 24, 26, 24, 24, 24,
+ 24, 24, 24, 27, 28, 24, 24, 24, 27, 24,
+ 24, 29, 27, 27, 30, 27, 27, 31, 27, 27,
+ 32, 33, 34, 35, 27, 27, 36, 27, 27, 27,
+ 27, 24, 24, 24, 24, 24, 24, 37, 38, 56,
+ 39, 40, 56, 65, 65, 65, 65, 67, 67, 67,
+ 67, 69, 69, 70, 70, 75, 71, 71, 71, 71,
+ 88, 88, 130, 59, 59, 75, 81, 72, 88, 88,
+ 59, 59, 73, 57, 75, 75, 57, 60, 75, 41,
+ 41, 41, 45, 45, 60, 82, 46, 47, 83, 48,
+
+ 49, 48, 75, 80, 48, 48, 50, 78, 75, 51,
+ 52, 75, 61, 79, 61, 118, 118, 75, 123, 61,
+ 124, 61, 84, 89, 89, 89, 170, 85, 120, 120,
+ 86, 53, 75, 54, 45, 45, 129, 129, 46, 47,
+ 74, 48, 49, 48, 87, 75, 48, 48, 50, 75,
+ 75, 51, 52, 71, 71, 71, 71, 91, 92, 92,
+ 91, 133, 75, 136, 72, 95, 95, 95, 95, 73,
+ 75, 93, 131, 53, 75, 54, 96, 96, 96, 96,
+ 111, 111, 111, 111, 135, 155, 75, 97, 113, 113,
+ 113, 113, 125, 125, 125, 125, 98, 99, 100, 75,
+
+ 101, 132, 75, 126, 102, 139, 156, 103, 127, 104,
+ 75, 105, 106, 107, 108, 128, 128, 128, 128, 75,
+ 75, 259, 134, 88, 88, 140, 89, 89, 89, 75,
+ 141, 127, 137, 91, 92, 92, 91, 91, 92, 92,
+ 91, 138, 91, 92, 92, 91, 95, 95, 95, 95,
+ 96, 96, 96, 96, 153, 160, 111, 111, 111, 111,
+ 113, 113, 113, 113, 118, 118, 161, 154, 120, 120,
+ 75, 123, 142, 124, 129, 129, 75, 125, 125, 125,
+ 125, 75, 75, 104, 143, 144, 75, 145, 126, 172,
+ 75, 146, 75, 127, 147, 75, 174, 75, 148, 149,
+
+ 150, 128, 128, 128, 128, 128, 128, 128, 128, 169,
+ 175, 75, 173, 75, 75, 182, 177, 127, 75, 204,
+ 75, 127, 75, 75, 75, 75, 176, 75, 228, 75,
+ 179, 193, 193, 193, 193, 211, 183, 75, 178, 212,
+ 226, 205, 194, 213, 195, 75, 242, 196, 208, 193,
+ 193, 193, 193, 222, 222, 222, 222, 75, 75, 231,
+ 194, 75, 195, 75, 241, 196, 232, 75, 245, 196,
+ 223, 223, 223, 223, 230, 222, 222, 222, 222, 75,
+ 244, 75, 227, 75, 243, 75, 234, 223, 223, 223,
+ 223, 196, 251, 251, 251, 251, 75, 75, 246, 75,
+
+ 75, 75, 254, 252, 75, 75, 75, 247, 253, 255,
+ 75, 256, 75, 257, 258, 251, 251, 251, 251, 75,
+ 262, 266, 261, 75, 75, 267, 252, 263, 263, 263,
+ 263, 253, 75, 264, 265, 75, 270, 75, 268, 75,
+ 75, 271, 75, 253, 263, 263, 263, 263, 75, 273,
+ 274, 75, 75, 275, 272, 75, 75, 75, 75, 75,
+ 253, 75, 75, 279, 75, 276, 75, 277, 75, 75,
+ 278, 280, 75, 75, 282, 283, 281, 287, 286, 288,
+ 75, 289, 284, 75, 285, 75, 296, 290, 75, 75,
+ 291, 292, 75, 75, 75, 75, 75, 75, 293, 75,
+
+ 295, 75, 294, 75, 301, 75, 303, 299, 75, 269,
+ 75, 300, 297, 260, 250, 298, 305, 249, 248, 75,
+ 75, 302, 306, 304, 240, 307, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 76, 76,
+
+ 90, 90, 90, 90, 90, 90, 239, 90, 90, 94,
+ 238, 237, 94, 236, 94, 110, 110, 110, 235, 110,
+ 110, 110, 110, 110, 112, 233, 112, 112, 112, 112,
+ 112, 115, 115, 115, 115, 115, 115, 115, 229, 115,
+ 117, 225, 117, 117, 117, 117, 117, 117, 117, 119,
+ 224, 119, 119, 119, 119, 119, 119, 119, 221, 220,
+ 219, 218, 217, 216, 215, 214, 75, 210, 209, 207,
+ 206, 203, 202, 201, 200, 199, 198, 197, 192, 191,
+ 190, 189, 188, 187, 186, 185, 184, 181, 180, 154,
+ 171, 75, 122, 122, 168, 167, 166, 165, 164, 163,
+
+ 162, 159, 158, 157, 152, 151, 75, 122, 121, 116,
+ 114, 109, 74, 77, 75, 74, 308, 68, 68, 63,
+ 63, 43, 43, 23, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308
+ } ;
+
+static const flex_int32_t yy_chk[772] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 7,
+ 2, 2, 8, 13, 13, 14, 14, 15, 15, 16,
+ 16, 19, 20, 19, 20, 31, 21, 21, 21, 21,
+ 37, 37, 325, 9, 9, 33, 31, 21, 38, 38,
+ 10, 10, 21, 7, 32, 29, 8, 9, 30, 2,
+ 2, 2, 5, 5, 10, 32, 5, 5, 33, 5,
+
+ 5, 5, 35, 30, 5, 5, 5, 29, 132, 5,
+ 5, 34, 9, 29, 9, 65, 65, 36, 70, 10,
+ 70, 10, 34, 41, 41, 41, 132, 35, 67, 67,
+ 36, 5, 307, 5, 6, 6, 74, 74, 6, 6,
+ 74, 6, 6, 6, 36, 80, 6, 6, 6, 83,
+ 78, 6, 6, 22, 22, 22, 22, 43, 43, 43,
+ 43, 80, 82, 83, 22, 45, 45, 45, 45, 22,
+ 303, 43, 78, 6, 79, 6, 50, 50, 50, 50,
+ 56, 56, 56, 56, 82, 101, 85, 50, 59, 59,
+ 59, 59, 71, 71, 71, 71, 50, 50, 50, 246,
+
+ 50, 79, 86, 71, 50, 85, 101, 50, 71, 50,
+ 81, 50, 50, 50, 50, 72, 72, 72, 72, 87,
+ 84, 246, 81, 88, 88, 86, 89, 89, 89, 302,
+ 87, 72, 84, 91, 91, 91, 91, 92, 92, 92,
+ 92, 84, 93, 93, 93, 93, 95, 95, 95, 95,
+ 96, 96, 96, 96, 100, 105, 111, 111, 111, 111,
+ 113, 113, 113, 113, 118, 118, 105, 100, 120, 120,
+ 296, 124, 96, 124, 129, 129, 134, 125, 125, 125,
+ 125, 136, 293, 96, 97, 97, 131, 97, 125, 134,
+ 139, 97, 169, 125, 97, 135, 136, 137, 97, 97,
+
+ 97, 126, 126, 126, 126, 128, 128, 128, 128, 131,
+ 137, 138, 135, 140, 141, 145, 139, 126, 170, 169,
+ 173, 128, 177, 229, 178, 206, 138, 179, 206, 204,
+ 141, 159, 159, 159, 159, 177, 145, 226, 140, 178,
+ 204, 170, 159, 179, 159, 232, 229, 159, 173, 193,
+ 193, 193, 193, 194, 194, 194, 194, 205, 211, 209,
+ 193, 231, 193, 208, 226, 193, 209, 230, 232, 194,
+ 195, 195, 195, 195, 208, 222, 222, 222, 222, 233,
+ 231, 234, 205, 241, 230, 242, 211, 223, 223, 223,
+ 223, 222, 238, 238, 238, 238, 243, 244, 233, 248,
+
+ 245, 249, 241, 238, 255, 257, 258, 234, 238, 242,
+ 254, 243, 261, 244, 245, 251, 251, 251, 251, 262,
+ 249, 257, 248, 259, 265, 258, 251, 252, 252, 252,
+ 252, 251, 264, 254, 255, 266, 261, 267, 259, 268,
+ 270, 262, 269, 252, 263, 263, 263, 263, 271, 265,
+ 266, 274, 273, 267, 264, 275, 277, 278, 279, 291,
+ 263, 280, 281, 271, 282, 268, 283, 269, 284, 287,
+ 270, 273, 286, 288, 275, 277, 274, 281, 280, 282,
+ 289, 283, 278, 290, 279, 292, 291, 284, 294, 295,
+ 286, 287, 297, 298, 299, 300, 301, 304, 288, 305,
+
+ 290, 285, 289, 306, 298, 276, 300, 295, 272, 260,
+ 256, 297, 292, 247, 237, 294, 304, 236, 235, 228,
+ 227, 299, 305, 301, 225, 306, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 313, 313, 313, 313, 313, 313, 313, 313,
+ 313, 314, 314, 314, 314, 314, 314, 314, 314, 314,
+ 315, 315, 315, 315, 315, 315, 315, 315, 315, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316, 317, 317,
+
+ 318, 318, 318, 318, 318, 318, 221, 318, 318, 319,
+ 220, 215, 319, 213, 319, 320, 320, 320, 212, 320,
+ 320, 320, 320, 320, 321, 210, 321, 321, 321, 321,
+ 321, 322, 322, 322, 322, 322, 322, 322, 207, 322,
+ 323, 203, 323, 323, 323, 323, 323, 323, 323, 324,
+ 201, 324, 324, 324, 324, 324, 324, 324, 192, 190,
+ 189, 188, 187, 186, 185, 183, 176, 175, 174, 172,
+ 171, 168, 167, 166, 163, 162, 161, 160, 158, 156,
+ 154, 151, 150, 149, 148, 147, 146, 144, 143, 142,
+ 133, 130, 123, 122, 121, 116, 114, 109, 108, 107,
+
+ 106, 104, 103, 102, 99, 98, 76, 69, 68, 63,
+ 60, 51, 40, 28, 27, 26, 23, 18, 17, 12,
+ 11, 4, 3, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
+ 308
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "gabc/gabc-score-determination.l"
+#line 2 "gabc/gabc-score-determination.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score lexer.
+ *
+ * Gregorio score determination in gabc input.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "bool.h"
+#include "support.h"
+
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-y.h"
+
+static bool eof_found = false;
+
+#define START_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style already started: %s"), gabc_score_determination_text); \
+ } else { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _BEGIN; \
+ }
+
+#define END_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _END; \
+ } else { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style not started: %s"), gabc_score_determination_text); \
+ }
+
+#define RETURN_CHARACTERS \
+ gabc_score_determination_lval.text = \
+ gregorio_strdup(gabc_score_determination_text); \
+ return CHARACTERS
+
+#define RETURN_SPACE \
+ gabc_score_determination_lval.text = gregorio_strdup(" "); \
+ return CHARACTERS
+
+#define YY_NO_INPUT
+
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) { \
+ int c = '*'; \
+ int n; \
+ for (n = 0; n < max_size \
+ && (c = getc(gabc_score_determination_in)) != EOF \
+ && c != '\n'; ++n ) { \
+ buf[n] = (char) c; \
+ } \
+ if (c == '\n') { \
+ buf[n++] = (char) c; \
+ } \
+ if (c == EOF && ferror(gabc_score_determination_in)) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ } \
+ result = n; \
+ } else { \
+ errno=0; \
+ while ((result = fread(buf, 1, max_size, gabc_score_determination_in)) \
+ == 0 && ferror(gabc_score_determination_in)) { \
+ if (errno != EINTR) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ break; \
+ } \
+ errno = 0; \
+ clearerr(gabc_score_determination_in); \
+ } \
+ } \
+ gabc_digest(buf, result)
+
+#define YY_USER_ACTION gabc_update_location(&gabc_score_determination_lloc, \
+ gabc_score_determination_text, gabc_score_determination_leng);
+
+#line 1079 "gabc/gabc-score-determination-l.c"
+
+/* The expression for attribute below is rather messy because we allow
+for (a) single-line values, ending with a semicolon at end of line or a
+double semicolon, (b) multi-line values, which end at a double
+semicolon. */
+#line 1085 "gabc/gabc-score-determination-l.c"
+
+#define INITIAL 0
+#define attribute 1
+#define score 2
+#define notes 3
+#define sp 4
+#define verb 5
+#define comments 6
+#define inicomments 7
+#define alt 8
+#define protrusion_value 9
+#define protrusion_end 10
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 136 "gabc/gabc-score-determination.l"
+
+#line 1319 "gabc/gabc-score-determination-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+yy_match:
+ do
+ {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 724 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 137 "gabc/gabc-score-determination.l"
+{
+ /* BOM written by a lot of windows softwares when they write UTF-8 */
+ }
+ YY_BREAK
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 140 "gabc/gabc-score-determination.l"
+{
+ /* ignoring empty lines */
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 143 "gabc/gabc-score-determination.l"
+{
+ BEGIN(inicomments);
+ }
+ YY_BREAK
+case 4:
+/* rule 4 can match eol */
+YY_RULE_SETUP
+#line 146 "gabc/gabc-score-determination.l"
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 149 "gabc/gabc-score-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 152 "gabc/gabc-score-determination.l"
+{
+ BEGIN(attribute);
+ return COLON;
+ }
+ YY_BREAK
+case 7:
+/* rule 7 can match eol */
+YY_RULE_SETUP
+#line 156 "gabc/gabc-score-determination.l"
+{
+ BEGIN(INITIAL);
+ return SEMICOLON;
+ }
+ YY_BREAK
+case 8:
+/* rule 8 can match eol */
+YY_RULE_SETUP
+#line 160 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+ }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 165 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 170 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.character = gabc_score_determination_text[5];
+ return DEF_MACRO;
+ }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 174 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NAME;
+ }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 179 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return SCORE_COPYRIGHT;
+ }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 184 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return GABC_COPYRIGHT;
+ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 189 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE;
+ }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 194 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_MODIFIER;
+ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 199 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_DIFFERENTIA;
+ }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 204 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ANNOTATION;
+ }
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 209 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return AUTHOR;
+ }
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 214 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return LANGUAGE;
+ }
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 219 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return STAFF_LINES;
+ }
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 224 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NABC_LINES;
+ }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 229 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ORISCUS_ORIENTATION;
+ }
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 234 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return OTHER_HEADER;
+ }
+ YY_BREAK
+case 24:
+/* rule 24 can match eol */
+YY_RULE_SETUP
+#line 239 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return END_OF_DEFINITIONS;
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 243 "gabc/gabc-score-determination.l"
+{
+ gregorio_messagef("det_score", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\" in definition part"),
+ gabc_score_determination_text[0]);
+ }
+ YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+#line 248 "gabc/gabc-score-determination.l"
+{
+ RETURN_SPACE;
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 251 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 254 "gabc/gabc-score-determination.l"
+{
+ return HYPHEN;
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 257 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUDING_PUNCTUATION;
+ }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 262 "gabc/gabc-score-determination.l"
+{
+ return NLBA_B;
+ }
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 265 "gabc/gabc-score-determination.l"
+{
+ return NLBA_E;
+ }
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 268 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(I);
+ }
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 271 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(I);
+ }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 274 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(TT);
+ }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 277 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(TT);
+ }
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 280 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(UL);
+ }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 283 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(UL);
+ }
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 286 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(C);
+ }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 289 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(C);
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 292 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(B);
+ }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 295 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(B);
+ }
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 298 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(SC);
+ }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 301 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(SC);
+ }
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 304 "gabc/gabc-score-determination.l"
+{
+ START_STYLE(ELISION);
+ }
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 307 "gabc/gabc-score-determination.l"
+{
+ END_STYLE(ELISION);
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 310 "gabc/gabc-score-determination.l"
+{
+ BEGIN(sp);
+ return SP_BEGIN;
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 314 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return SP_END;
+ }
+ YY_BREAK
+case 48:
+/* rule 48 can match eol */
+YY_RULE_SETUP
+#line 318 "gabc/gabc-score-determination.l"
+{
+ RETURN_SPACE;
+ }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 321 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 324 "gabc/gabc-score-determination.l"
+{
+ BEGIN(comments);
+ }
+ YY_BREAK
+case 51:
+/* rule 51 can match eol */
+YY_RULE_SETUP
+#line 327 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 330 "gabc/gabc-score-determination.l"
+{
+ /* ignored */
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 333 "gabc/gabc-score-determination.l"
+{
+ BEGIN(verb);
+ return VERB_BEGIN;
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 337 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return VERB_END;
+ }
+ YY_BREAK
+case 55:
+/* rule 55 can match eol */
+YY_RULE_SETUP
+#line 341 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 344 "gabc/gabc-score-determination.l"
+{
+ RETURN_CHARACTERS;
+ }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 347 "gabc/gabc-score-determination.l"
+{
+ return CENTER_BEGIN;
+ }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 350 "gabc/gabc-score-determination.l"
+{
+ return CENTER_END;
+ }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 353 "gabc/gabc-score-determination.l"
+{
+ BEGIN(alt);
+ return ALT_BEGIN;
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 357 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return ALT_END;
+ }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 361 "gabc/gabc-score-determination.l"
+{
+ return EUOUAE_B;
+ }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 364 "gabc/gabc-score-determination.l"
+{
+ return EUOUAE_E;
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 367 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_CENTER_END;
+ }
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 370 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_BEGIN;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 373 "gabc/gabc-score-determination.l"
+{
+ return TRANSLATION_END;
+ }
+ YY_BREAK
+case 66:
+/* rule 66 can match eol */
+YY_RULE_SETUP
+#line 376 "gabc/gabc-score-determination.l"
+{
+ return CLEAR;
+ }
+ YY_BREAK
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 379 "gabc/gabc-score-determination.l"
+{
+ return PROTRUSION;
+ }
+ YY_BREAK
+case 68:
+/* rule 68 can match eol */
+YY_RULE_SETUP
+#line 382 "gabc/gabc-score-determination.l"
+{
+ BEGIN(protrusion_value);
+ return PROTRUSION;
+ }
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 386 "gabc/gabc-score-determination.l"
+{
+ BEGIN(protrusion_end);
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUSION_VALUE;
+ }
+ YY_BREAK
+case 70:
+/* rule 70 can match eol */
+YY_RULE_SETUP
+#line 392 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return PROTRUSION_END;
+ }
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 396 "gabc/gabc-score-determination.l"
+{
+ BEGIN(notes);
+ return OPENING_BRACKET;
+ }
+ YY_BREAK
+case 72:
+/* rule 72 can match eol */
+YY_RULE_SETUP
+#line 400 "gabc/gabc-score-determination.l"
+{
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NOTES;
+ }
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 405 "gabc/gabc-score-determination.l"
+{
+ return NABC_CUT;
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 408 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return CLOSING_BRACKET;
+ }
+ YY_BREAK
+case 75:
+/* rule 75 can match eol */
+YY_RULE_SETUP
+#line 412 "gabc/gabc-score-determination.l"
+{
+ BEGIN(score);
+ return CLOSING_BRACKET_WITH_SPACE;
+ }
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(attribute):
+case YY_STATE_EOF(score):
+case YY_STATE_EOF(notes):
+case YY_STATE_EOF(sp):
+case YY_STATE_EOF(verb):
+case YY_STATE_EOF(comments):
+case YY_STATE_EOF(inicomments):
+case YY_STATE_EOF(alt):
+case YY_STATE_EOF(protrusion_value):
+case YY_STATE_EOF(protrusion_end):
+#line 416 "gabc/gabc-score-determination.l"
+{
+ if (!eof_found) {
+ eof_found = true;
+ return END_OF_FILE;
+ } else {
+ yyterminate();
+ }
+ }
+ YY_BREAK
+case 76:
+/* rule 76 can match eol */
+YY_RULE_SETUP
+#line 424 "gabc/gabc-score-determination.l"
+{
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_score_determination_text[0]);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 429 "gabc/gabc-score-determination.l"
+ECHO;
+ YY_BREAK
+#line 2007 "gabc/gabc-score-determination-l.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 309 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_is_jam = (yy_current_state == 308);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 429 "gabc/gabc-score-determination.l"
+
+
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h
new file mode 100644
index 00000000000..7e311979a47
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-l.h
@@ -0,0 +1,721 @@
+#ifndef gabc_score_determination_HEADER_H
+#define gabc_score_determination_HEADER_H 1
+#define gabc_score_determination_IN_HEADER 1
+
+#line 5 "gabc/gabc-score-determination-l.h"
+
+#line 7 "gabc/gabc-score-determination-l.h"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gabc_score_determination__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gabc_score_determination__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gabc_score_determination__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gabc_score_determination__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gabc_score_determination__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gabc_score_determination__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gabc_score_determination__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gabc_score_determination__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gabc_score_determination__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gabc_score_determination__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gabc_score_determination__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gabc_score_determination__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gabc_score_determination_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gabc_score_determination_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gabc_score_determination_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gabc_score_determination_lex_ALREADY_DEFINED
+#else
+#define yylex gabc_score_determination_lex
+#endif
+
+#ifdef yyrestart
+#define gabc_score_determination_restart_ALREADY_DEFINED
+#else
+#define yyrestart gabc_score_determination_restart
+#endif
+
+#ifdef yylex_init
+#define gabc_score_determination_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gabc_score_determination_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gabc_score_determination_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gabc_score_determination_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gabc_score_determination_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gabc_score_determination_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gabc_score_determination_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gabc_score_determination_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gabc_score_determination_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gabc_score_determination_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gabc_score_determination_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gabc_score_determination_set_extra
+#endif
+
+#ifdef yyget_in
+#define gabc_score_determination_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gabc_score_determination_get_in
+#endif
+
+#ifdef yyset_in
+#define gabc_score_determination_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gabc_score_determination_set_in
+#endif
+
+#ifdef yyget_out
+#define gabc_score_determination_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gabc_score_determination_get_out
+#endif
+
+#ifdef yyset_out
+#define gabc_score_determination_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gabc_score_determination_set_out
+#endif
+
+#ifdef yyget_leng
+#define gabc_score_determination_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gabc_score_determination_get_leng
+#endif
+
+#ifdef yyget_text
+#define gabc_score_determination_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gabc_score_determination_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gabc_score_determination_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gabc_score_determination_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gabc_score_determination_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gabc_score_determination_set_lineno
+#endif
+
+#ifdef yywrap
+#define gabc_score_determination_wrap_ALREADY_DEFINED
+#else
+#define yywrap gabc_score_determination_wrap
+#endif
+
+#ifdef yyalloc
+#define gabc_score_determination_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gabc_score_determination_alloc
+#endif
+
+#ifdef yyrealloc
+#define gabc_score_determination_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gabc_score_determination_realloc
+#endif
+
+#ifdef yyfree
+#define gabc_score_determination_free_ALREADY_DEFINED
+#else
+#define yyfree gabc_score_determination_free
+#endif
+
+#ifdef yytext
+#define gabc_score_determination_text_ALREADY_DEFINED
+#else
+#define yytext gabc_score_determination_text
+#endif
+
+#ifdef yyleng
+#define gabc_score_determination_leng_ALREADY_DEFINED
+#else
+#define yyleng gabc_score_determination_leng
+#endif
+
+#ifdef yyin
+#define gabc_score_determination_in_ALREADY_DEFINED
+#else
+#define yyin gabc_score_determination_in
+#endif
+
+#ifdef yyout
+#define gabc_score_determination_out_ALREADY_DEFINED
+#else
+#define yyout gabc_score_determination_out
+#endif
+
+#ifdef yy_flex_debug
+#define gabc_score_determination__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gabc_score_determination__flex_debug
+#endif
+
+#ifdef yylineno
+#define gabc_score_determination_lineno_ALREADY_DEFINED
+#else
+#define yylineno gabc_score_determination_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+/* Begin user sect3 */
+
+#define gabc_score_determination_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+
+extern int yylineno;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+#define attribute 1
+#define score 2
+#define notes 3
+#define sp 4
+#define verb 5
+#define comments 6
+#define inicomments 7
+#define alt 8
+#define protrusion_value 9
+#define protrusion_end 10
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#ifndef gabc_score_determination__create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef gabc_score_determination__delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef gabc_score_determination__scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef gabc_score_determination__scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef gabc_score_determination__scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef gabc_score_determination__init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef gabc_score_determination__flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef gabc_score_determination__load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef gabc_score_determination__switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef gabc_score_determination_push_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef gabc_score_determination_pop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef gabc_score_determination_ensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef gabc_score_determination_lex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef gabc_score_determination_restart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef gabc_score_determination_lex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef gabc_score_determination_lex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef gabc_score_determination_lex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef gabc_score_determination_get_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef gabc_score_determination_set_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef gabc_score_determination_get_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef gabc_score_determination_set_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef gabc_score_determination_get_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef gabc_score_determination_set_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef gabc_score_determination_get_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef gabc_score_determination_set_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef gabc_score_determination_get_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef gabc_score_determination_get_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef gabc_score_determination_get_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef gabc_score_determination_set_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef gabc_score_determination_get_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef gabc_score_determination_set_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef gabc_score_determination_wrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef gabc_score_determination_get_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef gabc_score_determination_set_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef gabc_score_determination_get_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef gabc_score_determination_set_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef gabc_score_determination_alloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef gabc_score_determination_realloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef gabc_score_determination_free_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef gabc_score_determination_text_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef gabc_score_determination_leng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef gabc_score_determination_in_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef gabc_score_determination_out_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef gabc_score_determination__flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef gabc_score_determination_lineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef gabc_score_determination_tables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef gabc_score_determination_tables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef gabc_score_determination_TABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
+#line 429 "gabc/gabc-score-determination.l"
+
+
+#line 719 "gabc/gabc-score-determination-l.h"
+#undef gabc_score_determination_IN_HEADER
+#endif /* gabc_score_determination_HEADER_H */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c
new file mode 100644
index 00000000000..9f4ddd2119c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.c
@@ -0,0 +1,3178 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.3.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse gabc_score_determination_parse
+#define yylex gabc_score_determination_lex
+#define yyerror gabc_score_determination_error
+#define yydebug gabc_score_determination_debug
+#define yynerrs gabc_score_determination_nerrs
+
+#define yylval gabc_score_determination_lval
+#define yychar gabc_score_determination_char
+#define yylloc gabc_score_determination_lloc
+
+/* First part of user prologue. */
+#line 1 "gabc/gabc-score-determination.y" /* yacc.c:337 */
+
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ *
+ * This file is certainly not the most easy to understand, it is a bison file.
+ * See the bison manual on gnu.org for further details.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "sha1.h"
+#include "plugins.h"
+#include "gabc.h"
+
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ if (N) { \
+ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).first_offset = YYRHSLOC (Rhs, 1).first_offset; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ (Current).last_offset = YYRHSLOC (Rhs, N).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 1).generate_point_and_click; \
+ } else { \
+ (Current).first_line = (Current).last_line = YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = YYRHSLOC (Rhs, 0).last_column; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 0).generate_point_and_click; \
+ }
+
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-l.h"
+
+/* workaround for bison issue passing pointer to a "local" variable */
+#define STYLE_BITS &styles
+
+/* forward declaration of the flex/bison process function */
+static int gabc_score_determination_parse(void);
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/* int gabc_score_determination_debug=1; */
+
+/*
+ *
+ * We will need some variables and functions through the entire file, we
+ * declare them there:
+ *
+ */
+
+/* the score that we will determine and return */
+static gregorio_score *score;
+/* an array of elements that we will use for each syllable */
+static gregorio_element **elements;
+gregorio_element *current_element;
+/* a table containing the macros to use in gabc file */
+static char *macros[10];
+/* other variables that we will have to use */
+static gregorio_character *current_character;
+static gregorio_character *suspended_character;
+static gregorio_character *first_text_character;
+static gregorio_character *first_translation_character;
+static gregorio_tr_centering translation_type;
+static gregorio_nlba no_linebreak_area;
+static gregorio_euouae euouae;
+static gregorio_voice_info *current_voice_info;
+static int number_of_voices;
+static int voice;
+/* see comments on text to understand this */
+static gregorio_center_determination center_is_determined;
+/* current_key is... the current key... updated by each notes determination
+ * (for key changes) */
+static int current_key;
+static bool got_language;
+static bool got_staff_lines;
+static bool started_first_word;
+static struct sha1_ctx digester;
+static gabc_style_bits styles;
+static bool generate_point_and_click;
+static bool clear_syllable_text;
+static bool has_protrusion;
+
+/* punctum_inclinatum_orientation maintains the running punctum inclinatum
+ * orientation in order to decide if the glyph needs to be cut when a punctum
+ * inclinatum with forced orientation is encountered. This should be set to
+ * the shape of a non-liquescent punctum inclinatum with forced orientation
+ * when one is encountered, be left alone when a non-liquescent punctum
+ * inclinatum with undetermined orientation is encountered, or be reset to
+ * S_PUNCTUM_INCLINATUM_UNDETERMINED otherwise (because such ends any previous
+ * run of punctum inclinatum notes). Based on the assumption that a punctum
+ * inclinatum with forced orientation changes all the punctum inclinatum shapes
+ * with undetermined orientation in the same run of notes before and after it
+ * unless influenced by an earlier punctum inclinatum with forced orientation,
+ * the value of punctum_inclinatum_orientation can be used to determine if a
+ * punctum inclinatum with a forced orientation will have a different
+ * orientation than the punctum inclinatum immediately before it, which would
+ * require a cut of the glyph. */
+static gregorio_shape punctum_inclinatum_orientation;
+
+static __inline void check_multiple(const char *name, bool exists) {
+ if (exists) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("several %s definitions found, only the last will be taken "
+ "into consideration"), name);
+ }
+}
+
+static void gabc_score_determination_error(const char *error_str)
+{
+ gregorio_message(error_str, (const char *) "gabc_score_determination_parse",
+ VERBOSITY_ERROR, 0);
+}
+
+/*
+ * The function that will initialize the variables.
+ */
+
+static void initialize_variables(bool point_and_click)
+{
+ int i;
+ /* build a brand new empty score */
+ score = gregorio_new_score();
+ /* initialization of the first voice info to an empty voice info */
+ current_voice_info = NULL;
+ gregorio_add_voice_info(&current_voice_info);
+ score->first_voice_info = current_voice_info;
+ /* other initializations */
+ number_of_voices = 1;
+ voice = 0; /* first (and only) voice */
+ current_character = NULL;
+ suspended_character = NULL;
+ first_translation_character = NULL;
+ first_text_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_key = gregorio_calculate_new_key(gregorio_default_clef);
+ for (i = 0; i < 10; i++) {
+ macros[i] = NULL;
+ }
+ got_language = false;
+ got_staff_lines = false;
+ started_first_word = false;
+ styles = 0;
+ punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ generate_point_and_click = point_and_click;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+/*
+ * function that frees the variables that need it, for when we have finished to
+ * determine the score
+ */
+
+static void free_variables(void)
+{
+ int i;
+ free(elements);
+ for (i = 0; i < 10; i++) {
+ free(macros[i]);
+ }
+}
+
+/*
+ * Function called when we have reached the end of the definitions, it tries to
+ * make the voice_infos coherent.
+ */
+static void end_definitions(void)
+{
+ int i;
+
+ gregorio_assert_only(gabc_check_infos_integrity(score), end_definitions,
+ "can't determine valid infos on the score");
+
+ elements = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+
+ if (!got_language) {
+ static char latin[] = "Latin";
+ gregorio_set_centering_language(latin);
+ }
+}
+
+/*
+ * Here starts the code for the determinations of the notes. The notes are not
+ * precisely determined here, we separate the text describing the notes of each
+ * voice, and we call determine_elements_from_string to really determine them.
+ */
+static char position = WORD_BEGINNING;
+static gregorio_syllable *current_syllable = NULL;
+static char *abovelinestext = NULL;
+
+/*
+ * Function called each time we find a space, it updates the current position.
+ */
+static void update_position_with_space(void)
+{
+ if (position == WORD_MIDDLE) {
+ position = WORD_END;
+ }
+ if (position == WORD_BEGINNING) {
+ position = WORD_ONE_SYLLABLE;
+ }
+}
+
+/*
+ * When we encounter a translation center ending, we call this function that
+ * sets translation_type = TR_WITH_CENTER_BEGINNING on previous syllable with
+ * translation
+ */
+static void gregorio_set_translation_center_beginning(
+ gregorio_syllable *current_syllable)
+{
+ gregorio_syllable *syllable = current_syllable->previous_syllable;
+ while (syllable) {
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ gregorio_message("encountering translation centering end but "
+ "cannot find translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+ return;
+ }
+ if (syllable->translation) {
+ syllable->translation_type = TR_WITH_CENTER_BEGINNING;
+ return;
+ }
+ syllable = syllable->previous_syllable;
+ }
+ /* we didn't find any beginning... */
+ gregorio_message("encountering translation centering end but cannot find "
+ "translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+}
+
+static void ready_characters(void)
+{
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ if (!score->first_syllable || (current_syllable
+ && !current_syllable->previous_syllable
+ && !current_syllable->text)) {
+ started_first_word = true;
+ }
+ }
+}
+
+static void rebuild_score_characters(void)
+{
+ if (score->first_syllable) {
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ const gregorio_character *t;
+
+ /* find out if there is a forced center */
+ gregorio_center_determination center = CENTER_NOT_DETERMINED;
+ for (t = syllable->text; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.style == ST_FORCED_CENTER) {
+ syllable->forced_center = true;
+ center = CENTER_FULLY_DETERMINED;
+ break;
+ }
+ }
+
+ if (syllable == score->first_syllable) {
+ /* leave the first syllable text untouched at this time */
+ continue;
+ }
+
+ gregorio_rebuild_characters(&(syllable->text), center, false);
+
+ if (syllable->first_word) {
+ gregorio_set_first_word(&(syllable->text));
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The two functions called when lex returns a style, we simply add it. All the
+ * complex things will be done by the function after...
+ *
+ */
+
+static void add_style(unsigned char style)
+{
+ gregorio_begin_style(&current_character, style);
+}
+
+static void end_style(unsigned char style)
+{
+ gregorio_end_style(&current_character, style);
+}
+
+static __inline void save_text(void)
+{
+ if (has_protrusion) {
+ end_style(ST_PROTRUSION);
+ }
+ ready_characters();
+ first_text_character = current_character;
+}
+
+/* a function called when we see a [, basically, all characters are added to
+ * the translation pointer instead of the text pointer */
+static void start_translation(unsigned char asked_translation_type)
+{
+ suspended_character = current_character;
+ /* the middle letters of the translation have no sense */
+ /*center_is_determined = CENTER_FULLY_DETERMINED;*/
+ current_character = NULL;
+ translation_type = asked_translation_type;
+}
+
+static void end_translation(void)
+{
+ ready_characters();
+ first_translation_character = current_character;
+ current_character = suspended_character;
+}
+
+/*
+ * add_text is the function called when lex returns a char *. In
+ * this function we convert it into grewchar, and then we add the corresponding
+ * gregorio_characters in the list of gregorio_characters.
+ */
+
+static void add_text(char *mbcharacters)
+{
+ if (!current_character) {
+ /* insert open styles, leaving out ELISION on purpose */
+ if (styles & SB_I) {
+ add_style(ST_ITALIC);
+ }
+ if (styles & SB_B) {
+ add_style(ST_BOLD);
+ }
+ if (styles & SB_TT) {
+ add_style(ST_TT);
+ }
+ if (styles & SB_SC) {
+ add_style(ST_SMALL_CAPS);
+ }
+ if (styles & SB_UL) {
+ add_style(ST_UNDERLINED);
+ }
+ if (styles & SB_C) {
+ add_style(ST_COLORED);
+ }
+ }
+ if (current_character) {
+ current_character->next_character = gregorio_build_char_list_from_buf(
+ mbcharacters);
+ current_character->next_character->previous_character =
+ current_character;
+ } else {
+ current_character = gregorio_build_char_list_from_buf(mbcharacters);
+ }
+ while (current_character && current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ free(mbcharacters);
+}
+
+static void add_protrusion(char *factor)
+{
+ if (has_protrusion) {
+ gregorio_message("syllable already has protrusion; pr tag ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ free(factor);
+ } else {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ gregorio_message("closing open syllable center before protrusion",
+ "det_score", VERBOSITY_WARNING, 0);
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ }
+
+ add_style(ST_PROTRUSION_FACTOR);
+ add_text(factor);
+ end_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_PROTRUSION);
+ has_protrusion = true;
+ }
+}
+
+static void add_auto_protrusion(char *protrusion)
+{
+ if (has_protrusion) {
+ add_text(protrusion);
+ } else {
+ add_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreProtrusionFactor{"));
+
+ switch (*protrusion) {
+ case ',':
+ add_text(gregorio_strdup("comma"));
+ break;
+ case ';':
+ add_text(gregorio_strdup("semicolon"));
+ break;
+ case ':':
+ add_text(gregorio_strdup("colon"));
+ break;
+ case '.':
+ add_text(gregorio_strdup("period"));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_auto_protrusion,
+ "unsupported protruding punctuation: %c", *protrusion);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ add_text(gregorio_strdup("}"));
+ end_style(ST_VERBATIM);
+ end_style(ST_PROTRUSION_FACTOR);
+
+ add_style(ST_PROTRUSION);
+ add_text(protrusion);
+ end_style(ST_PROTRUSION);
+
+ has_protrusion = true;
+ }
+}
+
+/*
+ * Function to close a syllable and update the position.
+ */
+
+static void close_syllable(YYLTYPE *loc)
+{
+ int i = 0;
+ gregorio_character *ch;
+
+ /* make sure any elisions that are opened are closed within the syllable */
+ for (ch = first_text_character; ch; ch = ch->next_character) {
+ if (!ch->is_character) {
+ switch (ch->cos.s.style) {
+ case ST_ELISION:
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ ++i;
+ /* the parser precludes this from falling here */
+ gregorio_assert_only(i <= 1, close_syllable,
+ "elisions may not be nested");
+ break;
+
+ case ST_T_END:
+ --i;
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i >= 0, close_syllable,
+ "encountered elision end with no beginning");
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(close_syllable, "encountered ST_T_NOTHING");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case ST_FORCED_CENTER:
+ if (i > 0) {
+ gregorio_message(
+ _("forced center may not be within an elision"),
+ "close_syllable", VERBOSITY_ERROR, 0);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i == 0, close_syllable,
+ "encountered elision beginning with no end");
+
+ gregorio_add_syllable(&current_syllable, number_of_voices, elements,
+ first_text_character, first_translation_character, position,
+ abovelinestext, translation_type, no_linebreak_area, euouae, loc,
+ started_first_word, clear_syllable_text);
+ if (!score->first_syllable) {
+ /* we rebuild the first syllable if we have to */
+ score->first_syllable = current_syllable;
+ }
+ if (translation_type == TR_WITH_CENTER_END) {
+ gregorio_set_translation_center_beginning(current_syllable);
+ }
+ /* we update the position */
+ if (position == WORD_BEGINNING) {
+ position = WORD_MIDDLE;
+ }
+ if (position == WORD_ONE_SYLLABLE || position == WORD_END) {
+ position = WORD_BEGINNING;
+
+ if (started_first_word) {
+ started_first_word = false;
+ }
+ }
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_character = NULL;
+ suspended_character = NULL;
+ first_text_character = NULL;
+ first_translation_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ abovelinestext = NULL;
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+ current_element = NULL;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+void gabc_digest(const void *const buf, const size_t size)
+{
+ sha1_process_bytes(buf, size, &digester);
+}
+
+/*
+ * The "main" function. It is the function that is called when we have to read
+ * a gabc file. It takes a file descriptor, that is to say a file that is
+ * aleady open. It returns a valid gregorio_score
+ */
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click)
+{
+ /* compute the SHA-1 digest while parsing, for I/O efficiency */
+ sha1_init_ctx(&digester);
+ /* digest GREGORIO_VERSION to get a different value when the version
+ changes */
+ sha1_process_bytes(GREGORIO_VERSION, strlen(GREGORIO_VERSION), &digester);
+ /* the input file that flex will parse */
+ gabc_score_determination_in = f_in;
+ gregorio_assert(f_in, gabc_read_score, "can't read stream from NULL",
+ return NULL);
+ initialize_variables(point_and_click);
+ /* the flex/bison main call, it will build the score (that we have
+ * initialized) */
+ gabc_score_determination_parse();
+ if (!score->legacy_oriscus_orientation) {
+ gabc_determine_oriscus_orientation(score);
+ }
+ gabc_determine_punctum_inclinatum_orientation(score);
+ gabc_determine_ledger_lines(score);
+ gregorio_fix_initial_keys(score, gregorio_default_clef);
+ rebuild_score_characters();
+ gabc_suppress_extra_custos_at_linebreak(score);
+ gabc_fix_custos_pitches(score);
+ gabc_det_notes_finish();
+ free_variables();
+ /* then we check the validity and integrity of the score we have built. */
+ if (!gabc_check_score_integrity(score)) {
+ gregorio_message(_("unable to determine a valid score from file"),
+ "gabc_read_score", VERBOSITY_ERROR, 0);
+ }
+ sha1_finish_ctx(&digester, score->digest);
+ return score;
+}
+
+unsigned char nabc_state = 0;
+size_t nabc_lines = 0;
+
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+ if (nabc_state == 0) {
+ if (!elements[voice]) {
+ elements[voice] = gabc_det_elements_from_string(notes, &current_key,
+ macros, &loc, &punctum_inclinatum_orientation, score);
+ current_element = elements[voice];
+ } else {
+ gregorio_element *new_elements = gabc_det_elements_from_string(
+ notes, &current_key, macros, &loc,
+ &punctum_inclinatum_orientation, score);
+ gregorio_element *last_element = elements[voice];
+ while (last_element->next) {
+ last_element = last_element->next;
+ }
+ last_element->next = new_elements;
+ new_elements->previous = last_element;
+ current_element = new_elements;
+ }
+ } else {
+ if (!elements[voice]) {
+ gregorio_add_element(&elements[voice], NULL);
+ current_element = elements[voice];
+ }
+ gregorio_assert(current_element, gabc_y_add_notes,
+ "current_element is null, this shouldn't happen!",
+ return);
+ if (!current_element->nabc) {
+ current_element->nabc = (char **) gregorio_calloc (nabc_lines,
+ sizeof (char *));
+ }
+ current_element->nabc[nabc_state-1] = gregorio_strdup(notes);
+ current_element->nabc_lines = nabc_state;
+ }
+}
+
+static char *concatenate(char *first, char *const second) {
+ first = (char *)gregorio_realloc(first, strlen(first) + strlen(second) + 1);
+ strcat(first, second);
+ free(second);
+ return first;
+}
+
+#line 733 "gabc/gabc-score-determination-y.c" /* yacc.c:337 */
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "gabc-score-determination-y.h". */
+#ifndef YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+# define YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gabc_score_determination_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ NAME = 258,
+ AUTHOR = 259,
+ GABC_COPYRIGHT = 260,
+ SCORE_COPYRIGHT = 261,
+ LANGUAGE = 262,
+ STAFF_LINES = 263,
+ ORISCUS_ORIENTATION = 264,
+ DEF_MACRO = 265,
+ OTHER_HEADER = 266,
+ ANNOTATION = 267,
+ MODE = 268,
+ MODE_MODIFIER = 269,
+ MODE_DIFFERENTIA = 270,
+ END_OF_DEFINITIONS = 271,
+ END_OF_FILE = 272,
+ COLON = 273,
+ SEMICOLON = 274,
+ CHARACTERS = 275,
+ NOTES = 276,
+ HYPHEN = 277,
+ ATTRIBUTE = 278,
+ OPENING_BRACKET = 279,
+ CLOSING_BRACKET = 280,
+ CLOSING_BRACKET_WITH_SPACE = 281,
+ I_BEGIN = 282,
+ I_END = 283,
+ TT_BEGIN = 284,
+ TT_END = 285,
+ UL_BEGIN = 286,
+ UL_END = 287,
+ C_BEGIN = 288,
+ C_END = 289,
+ B_BEGIN = 290,
+ B_END = 291,
+ SC_BEGIN = 292,
+ SC_END = 293,
+ SP_BEGIN = 294,
+ SP_END = 295,
+ VERB_BEGIN = 296,
+ VERB_END = 297,
+ CENTER_BEGIN = 298,
+ CENTER_END = 299,
+ ELISION_BEGIN = 300,
+ ELISION_END = 301,
+ TRANSLATION_BEGIN = 302,
+ TRANSLATION_END = 303,
+ TRANSLATION_CENTER_END = 304,
+ ALT_BEGIN = 305,
+ ALT_END = 306,
+ NLBA_B = 307,
+ NLBA_E = 308,
+ EUOUAE_B = 309,
+ EUOUAE_E = 310,
+ NABC_CUT = 311,
+ NABC_LINES = 312,
+ CLEAR = 313,
+ PROTRUSION = 314,
+ PROTRUSION_VALUE = 315,
+ PROTRUSION_END = 316,
+ PROTRUDING_PUNCTUATION = 317
+ };
+#endif
+/* Tokens. */
+#define NAME 258
+#define AUTHOR 259
+#define GABC_COPYRIGHT 260
+#define SCORE_COPYRIGHT 261
+#define LANGUAGE 262
+#define STAFF_LINES 263
+#define ORISCUS_ORIENTATION 264
+#define DEF_MACRO 265
+#define OTHER_HEADER 266
+#define ANNOTATION 267
+#define MODE 268
+#define MODE_MODIFIER 269
+#define MODE_DIFFERENTIA 270
+#define END_OF_DEFINITIONS 271
+#define END_OF_FILE 272
+#define COLON 273
+#define SEMICOLON 274
+#define CHARACTERS 275
+#define NOTES 276
+#define HYPHEN 277
+#define ATTRIBUTE 278
+#define OPENING_BRACKET 279
+#define CLOSING_BRACKET 280
+#define CLOSING_BRACKET_WITH_SPACE 281
+#define I_BEGIN 282
+#define I_END 283
+#define TT_BEGIN 284
+#define TT_END 285
+#define UL_BEGIN 286
+#define UL_END 287
+#define C_BEGIN 288
+#define C_END 289
+#define B_BEGIN 290
+#define B_END 291
+#define SC_BEGIN 292
+#define SC_END 293
+#define SP_BEGIN 294
+#define SP_END 295
+#define VERB_BEGIN 296
+#define VERB_END 297
+#define CENTER_BEGIN 298
+#define CENTER_END 299
+#define ELISION_BEGIN 300
+#define ELISION_END 301
+#define TRANSLATION_BEGIN 302
+#define TRANSLATION_END 303
+#define TRANSLATION_CENTER_END 304
+#define ALT_BEGIN 305
+#define ALT_END 306
+#define NLBA_B 307
+#define NLBA_E 308
+#define EUOUAE_B 309
+#define EUOUAE_E 310
+#define NABC_CUT 311
+#define NABC_LINES 312
+#define CLEAR 313
+#define PROTRUSION 314
+#define PROTRUSION_VALUE 315
+#define PROTRUSION_END 316
+#define PROTRUDING_PUNCTUATION 317
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+extern YYSTYPE gabc_score_determination_lval;
+extern YYLTYPE gabc_score_determination_lloc;
+int gabc_score_determination_parse (void);
+
+#endif /* !YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ + 2 * YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 247
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 63
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 28
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 101
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 145
+
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 317
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 700, 700, 704, 709, 710, 714, 717, 723, 726,
+ 732, 737, 746, 752, 757, 762, 767, 772, 777, 785,
+ 793, 802, 807, 811, 816, 817, 821, 826, 832, 843,
+ 847, 855, 856, 857, 861, 864, 867, 870, 873, 876,
+ 879, 882, 888, 891, 894, 897, 900, 903, 906, 909,
+ 915, 918, 935, 938, 951, 954, 960, 963, 969, 972,
+ 978, 979, 982, 983, 984, 985, 986, 987, 988, 991,
+ 992, 995, 1001, 1002, 1006, 1009, 1010, 1011, 1014, 1020,
+ 1021, 1025, 1031, 1034, 1037, 1044, 1050, 1054, 1061, 1068,
+ 1073, 1078, 1082, 1089, 1096, 1101, 1109, 1112, 1118, 1119,
+ 1122, 1123
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "NAME", "AUTHOR", "GABC_COPYRIGHT",
+ "SCORE_COPYRIGHT", "LANGUAGE", "STAFF_LINES", "ORISCUS_ORIENTATION",
+ "DEF_MACRO", "OTHER_HEADER", "ANNOTATION", "MODE", "MODE_MODIFIER",
+ "MODE_DIFFERENTIA", "END_OF_DEFINITIONS", "END_OF_FILE", "COLON",
+ "SEMICOLON", "CHARACTERS", "NOTES", "HYPHEN", "ATTRIBUTE",
+ "OPENING_BRACKET", "CLOSING_BRACKET", "CLOSING_BRACKET_WITH_SPACE",
+ "I_BEGIN", "I_END", "TT_BEGIN", "TT_END", "UL_BEGIN", "UL_END",
+ "C_BEGIN", "C_END", "B_BEGIN", "B_END", "SC_BEGIN", "SC_END", "SP_BEGIN",
+ "SP_END", "VERB_BEGIN", "VERB_END", "CENTER_BEGIN", "CENTER_END",
+ "ELISION_BEGIN", "ELISION_END", "TRANSLATION_BEGIN", "TRANSLATION_END",
+ "TRANSLATION_CENTER_END", "ALT_BEGIN", "ALT_END", "NLBA_B", "NLBA_E",
+ "EUOUAE_B", "EUOUAE_E", "NABC_CUT", "NABC_LINES", "CLEAR", "PROTRUSION",
+ "PROTRUSION_VALUE", "PROTRUSION_END", "PROTRUDING_PUNCTUATION",
+ "$accept", "score", "all_definitions", "definitions", "attribute_value",
+ "attribute", "definition", "notes", "note", "closing_bracket_with_space",
+ "style_beginning", "style_end", "special_style_beginning",
+ "special_style_end", "euouae", "linebreak_area", "protrusion",
+ "character", "text", "translation_character", "translation_text",
+ "translation_beginning", "translation", "above_line_text",
+ "syllable_with_notes", "notes_without_word", "syllable", "syllables", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317
+};
+# endif
+
+#define YYPACT_NINF -85
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-85)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ -85, 11, -85, 69, -85, 66, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -85,
+ 0, -85, -85, -20, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, 4, -85, -85,
+ -85, -85, -85, -41, -19, -85, -85, -85, -85, -85,
+ -85, -85, -85, 107, 148, -4, -85, -85, -85, -85,
+ -7, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, 1, -11, -17, -29,
+ -85, 9, -2, -85, -1, -85, 13, -85, -85, -85,
+ -85, -85, -85, -85, 184, -85, -85, -85, -6, -11,
+ -85, -18, 27, 32, -85, -85, -85, -85, -11, -85,
+ -85, 26, -11, -85, 28, -85, -85, -85, -11, -85,
+ -85, -11, 27, -85, -85, -85, -85, -11, -11, -85,
+ -11, -85, -11, -11, -11
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 4, 0, 100, 0, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
+ 0, 5, 61, 70, 24, 34, 42, 35, 43, 36,
+ 44, 37, 45, 38, 46, 39, 47, 41, 49, 40,
+ 48, 51, 53, 50, 52, 81, 84, 0, 56, 57,
+ 54, 55, 68, 59, 71, 62, 63, 64, 65, 67,
+ 66, 69, 72, 0, 0, 0, 60, 98, 99, 101,
+ 0, 11, 21, 13, 14, 12, 18, 22, 10, 23,
+ 20, 15, 16, 17, 19, 24, 0, 96, 0, 0,
+ 24, 0, 70, 24, 71, 73, 0, 74, 77, 82,
+ 78, 75, 76, 79, 0, 24, 9, 6, 0, 87,
+ 24, 0, 29, 31, 25, 30, 85, 58, 89, 24,
+ 24, 0, 86, 24, 0, 24, 83, 80, 97, 8,
+ 7, 92, 26, 28, 27, 33, 32, 94, 88, 24,
+ 90, 24, 91, 93, 95
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -85, -85, -85, -85, -85, 227, -85, -84, -85, -60,
+ -62, -61, -85, -85, -85, -85, -85, -10, -85, -50,
+ -85, -85, -23, -85, -85, -85, -85, -85
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 1, 2, 3, 108, 71, 21, 87, 114, 115,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 103,
+ 104, 64, 65, 66, 67, 68, 69, 5
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 86, 109, 101, 102, 85, 90, 118, 132, 113, 122,
+ 111, 4, 106, 129, 112, 113, 107, 130, 70, 89,
+ 105, 128, 120, 123, 88, 110, 131, 45, 45, 46,
+ 46, 91, 117, 119, 116, 137, 138, 125, 133, 140,
+ 96, 142, 101, 102, 135, 45, 45, 46, 46, 136,
+ 139, 134, 141, 95, 127, 143, 0, 144, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 121,
+ 0, 124, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 22, 0, 23, 0,
+ 24, 0, 0, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 0, 46, 47, 0, 48, 49,
+ 50, 51, 0, 0, 52, 53, 20, 22, 54, 92,
+ 0, 93, 0, 0, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 0, 46, 47, 0, 48,
+ 49, 50, 51, 0, 0, 52, 53, 0, 97, 94,
+ 98, 0, 0, 0, 0, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 0, 0, 0, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 0, 97, 0, 98, 0, 0, 0,
+ 100, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 0, 0, 0,
+ 0, 0, 126, 0, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 100, 84
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 23, 85, 64, 64, 24, 24, 90, 25, 26, 93,
+ 21, 0, 19, 19, 25, 26, 23, 23, 18, 60,
+ 24, 105, 24, 24, 20, 24, 110, 47, 47, 49,
+ 49, 54, 61, 24, 51, 119, 120, 24, 56, 123,
+ 63, 125, 104, 104, 17, 47, 47, 49, 49, 17,
+ 24, 111, 24, 63, 104, 139, -1, 141, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 92,
+ -1, 94, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 20, -1, 22, -1,
+ 24, -1, -1, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, -1, 49, 50, -1, 52, 53,
+ 54, 55, -1, -1, 58, 59, 57, 20, 62, 22,
+ -1, 24, -1, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 50, -1, 52,
+ 53, 54, 55, -1, -1, 58, 59, -1, 20, 62,
+ 22, -1, -1, -1, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, -1, -1, -1, -1, -1, 48, -1, -1, -1,
+ -1, -1, -1, -1, 20, -1, 22, -1, -1, -1,
+ 62, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, -1, -1, -1,
+ -1, -1, 48, -1, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 62, 20
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 64, 65, 66, 0, 90, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 57, 69, 20, 22, 24, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 49, 50, 52, 53,
+ 54, 55, 58, 59, 62, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 84, 85, 86, 87, 88, 89,
+ 18, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 24, 85, 70, 20, 60,
+ 24, 85, 22, 24, 62, 80, 85, 20, 22, 48,
+ 62, 73, 74, 82, 83, 24, 19, 23, 67, 70,
+ 24, 21, 25, 26, 71, 72, 51, 61, 70, 24,
+ 24, 85, 70, 24, 85, 24, 48, 82, 70, 19,
+ 23, 70, 25, 56, 72, 17, 17, 70, 70, 24,
+ 70, 24, 70, 70, 70
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 63, 64, 65, 66, 66, 67, 67, 68, 68,
+ 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 70, 70, 71, 71, 71, 71,
+ 71, 72, 72, 72, 73, 73, 73, 73, 73, 73,
+ 73, 73, 74, 74, 74, 74, 74, 74, 74, 74,
+ 75, 75, 76, 76, 77, 77, 78, 78, 79, 79,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 81, 81, 82, 82, 82, 82, 82, 83,
+ 83, 84, 85, 85, 85, 86, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 88, 88, 89, 89,
+ 90, 90
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 2, 0, 2, 1, 2, 3, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 0, 2, 2, 2, 2, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 3, 1, 3, 3, 3, 4, 3,
+ 4, 4, 4, 5, 4, 5, 2, 3, 1, 1,
+ 0, 2
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+
+/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
+
+YY_ATTRIBUTE_UNUSED
+static int
+yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
+{
+ int res = 0;
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+ if (0 <= yylocp->first_line)
+ {
+ res += YYFPRINTF (yyo, "%d", yylocp->first_line);
+ if (0 <= yylocp->first_column)
+ res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
+ }
+ if (0 <= yylocp->last_line)
+ {
+ if (yylocp->first_line < yylocp->last_line)
+ {
+ res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
+ if (0 <= end_col)
+ res += YYFPRINTF (yyo, ".%d", end_col);
+ }
+ else if (0 <= end_col && yylocp->first_column < end_col)
+ res += YYFPRINTF (yyo, "-%d", end_col);
+ }
+ return res;
+ }
+
+# define YY_LOCATION_PRINT(File, Loc) \
+ yy_location_print_ (File, &(Loc))
+
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ YYUSE (yylocationp);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyo, *yylocationp);
+ YYFPRINTF (yyo, ": ");
+ yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
+{
+ unsigned long yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &yyvsp[(yyi + 1) - (yynrhs)]
+ , &(yylsp[(yyi + 1) - (yynrhs)]) );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+{
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+ = { 1, 1, 1, 1 }
+# endif
+;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+/* User initialization code. */
+#line 655 "gabc/gabc-score-determination.y" /* yacc.c:1431 */
+{
+ yylloc.first_line = 1;
+ yylloc.first_column = 0;
+ yylloc.first_offset = 0;
+ yylloc.last_line = 1;
+ yylloc.last_column = 0;
+ yylloc.last_offset = 0;
+ yylloc.generate_point_and_click = generate_point_and_click;
+}
+
+#line 2058 "gabc/gabc-score-determination-y.c" /* yacc.c:1431 */
+ yylsp[0] = yylloc;
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ *yyssp = (yytype_int16) yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ YYLTYPE *yyls1 = yyls;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ yyls = yyls1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (STYLE_BITS);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+ *++yylsp = yylloc;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ yyerror_range[1] = yyloc;
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+#line 704 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_definitions();
+ }
+#line 2254 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 6:
+#line 714 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = yyvsp[0].text;
+ }
+#line 2262 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 7:
+#line 717 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = concatenate(yyvsp[-1].text, yyvsp[0].text);
+ }
+#line 2270 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 8:
+#line 723 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = yyvsp[-1].text;
+ }
+#line 2278 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 9:
+#line 726 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ yyval.text = NULL;
+ }
+#line 2286 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 10:
+#line 732 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ /* these definitions are not passed through */
+ free(macros[yyvsp[-1].character - '0']);
+ macros[yyvsp[-1].character - '0'] = yyvsp[0].text;
+ }
+#line 2296 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 11:
+#line 737 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (yyvsp[0].text == NULL) {
+ gregorio_message("name can't be empty","det_score",
+ VERBOSITY_WARNING, 0);
+ }
+ check_multiple("name", score->name != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->name = yyvsp[0].text;
+ }
+#line 2310 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 12:
+#line 746 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("language", got_language);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_centering_language(yyvsp[0].text);
+ got_language = true;
+ }
+#line 2321 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 13:
+#line 752 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("gabc-copyright", score->gabc_copyright != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->gabc_copyright = yyvsp[0].text;
+ }
+#line 2331 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 14:
+#line 757 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("score_copyright", score->score_copyright != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->score_copyright = yyvsp[0].text;
+ }
+#line 2341 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 15:
+#line 762 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode", score->mode != 0);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode = yyvsp[0].text;
+ }
+#line 2351 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 16:
+#line 767 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode-modifier", score->mode_modifier != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode_modifier = yyvsp[0].text;
+ }
+#line 2361 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 17:
+#line 772 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("mode-differentia", score->mode_differentia != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->mode_differentia = yyvsp[0].text;
+ }
+#line 2371 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 18:
+#line 777 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("staff-lines", got_staff_lines);
+ if (yyvsp[0].text) {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_score_staff_lines(score, atoi(yyvsp[0].text));
+ got_staff_lines = true;
+ }
+ }
+#line 2384 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 19:
+#line 785 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("nabc lines", score->nabc_lines != 0);
+ if (yyvsp[0].text) {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ nabc_lines=atoi(yyvsp[0].text);
+ score->nabc_lines=nabc_lines;
+ }
+ }
+#line 2397 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 20:
+#line 793 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (score->annotation [MAX_ANNOTATIONS - 1]) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("too many definitions of annotation found, only the "
+ "first %d will be taken"), MAX_ANNOTATIONS);
+ }
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ gregorio_set_score_annotation(score, yyvsp[0].text);
+ }
+#line 2411 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 21:
+#line 802 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ check_multiple("author", score->author != NULL);
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->author = yyvsp[0].text;
+ }
+#line 2421 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 22:
+#line 807 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ score->legacy_oriscus_orientation = (strcmp(yyvsp[0].text, "legacy") == 0);
+ }
+#line 2430 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 23:
+#line 811 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gregorio_add_score_header(score, yyvsp[-1].text, yyvsp[0].text);
+ }
+#line 2438 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 26:
+#line 821 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state=0;
+ }
+#line 2448 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 27:
+#line 826 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state=0;
+ update_position_with_space();
+ }
+#line 2459 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 28:
+#line 832 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (!nabc_lines) {
+ gregorio_message(_("You used character \"|\" in gabc without "
+ "setting \"nabc-lines\" parameter. Please "
+ "set it in your gabc header."),
+ "det_score", VERBOSITY_FATAL, 0);
+ }
+ gabc_y_add_notes(yyvsp[-1].text, (yylsp[-1]));
+ free(yyvsp[-1].text);
+ nabc_state = (nabc_state + 1) % (nabc_lines+1);
+ }
+#line 2475 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 29:
+#line 843 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ elements[voice]=NULL;
+ nabc_state=0;
+ }
+#line 2484 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 30:
+#line 847 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ elements[voice]=NULL;
+ nabc_state=0;
+ update_position_with_space();
+ }
+#line 2494 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 34:
+#line 861 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_ITALIC);
+ }
+#line 2502 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 35:
+#line 864 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_TT);
+ }
+#line 2510 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 36:
+#line 867 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_UNDERLINED);
+ }
+#line 2518 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 37:
+#line 870 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_COLORED);
+ }
+#line 2526 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 38:
+#line 873 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_BOLD);
+ }
+#line 2534 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 39:
+#line 876 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_SMALL_CAPS);
+ }
+#line 2542 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 40:
+#line 879 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ }
+#line 2550 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 41:
+#line 882 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_SPECIAL_CHAR);
+ }
+#line 2558 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 42:
+#line 888 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_ITALIC);
+ }
+#line 2566 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 43:
+#line 891 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_TT);
+ }
+#line 2574 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 44:
+#line 894 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_UNDERLINED);
+ }
+#line 2582 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 45:
+#line 897 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_COLORED);
+ }
+#line 2590 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 46:
+#line 900 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_BOLD);
+ }
+#line 2598 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 47:
+#line 903 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_SMALL_CAPS);
+ }
+#line 2606 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 48:
+#line 906 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_VERBATIM);
+ }
+#line 2614 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 49:
+#line 909 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_SPECIAL_CHAR);
+ }
+#line 2622 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 50:
+#line 915 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_ELISION);
+ }
+#line 2630 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 51:
+#line 918 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (center_is_determined) {
+ gregorio_message(
+ "syllable already has center; ignoring additional center",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else if (has_protrusion) {
+ gregorio_message(
+ "center not allowed after protrusion; ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else {
+ add_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_HALF_DETERMINED;
+ }
+ }
+#line 2649 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 52:
+#line 935 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_style(ST_ELISION);
+ }
+#line 2657 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 53:
+#line 938 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } else {
+ gregorio_message(
+ "not within a syllable center",
+ "det_score", VERBOSITY_WARNING, 0);
+ }
+ }
+#line 2672 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 54:
+#line 951 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ euouae = EUOUAE_BEGINNING;
+ }
+#line 2680 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 55:
+#line 954 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ euouae = EUOUAE_END;
+ }
+#line 2688 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 56:
+#line 960 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ no_linebreak_area = NLBA_BEGINNING;
+ }
+#line 2696 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 57:
+#line 963 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ no_linebreak_area = NLBA_END;
+ }
+#line 2704 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 58:
+#line 969 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_protrusion(yyvsp[-1].text);
+ }
+#line 2712 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 59:
+#line 972 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_protrusion(gregorio_strdup("d")); /* d = default */
+ }
+#line 2720 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 61:
+#line 979 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2728 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 68:
+#line 988 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ clear_syllable_text = true;
+ }
+#line 2736 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 70:
+#line 992 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(gregorio_strdup("-"));
+ }
+#line 2744 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 71:
+#line 995 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2752 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 74:
+#line 1006 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2760 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 77:
+#line 1011 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(gregorio_strdup("-"));
+ }
+#line 2768 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 78:
+#line 1014 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_text(yyvsp[0].text);
+ }
+#line 2776 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 81:
+#line 1025 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ start_translation(TR_NORMAL);
+ }
+#line 2784 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 82:
+#line 1031 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_translation();
+ }
+#line 2792 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 83:
+#line 1034 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ end_translation();
+ }
+#line 2800 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 84:
+#line 1037 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ start_translation(TR_WITH_CENTER_END);
+ end_translation();
+ }
+#line 2809 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 85:
+#line 1044 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ abovelinestext = yyvsp[-1].text;
+ }
+#line 2817 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 86:
+#line 1050 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2826 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 87:
+#line 1054 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2838 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 88:
+#line 1061 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2850 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 89:
+#line 1068 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-2].text);
+ save_text();
+ close_syllable(&(yylsp[-2]));
+ }
+#line 2860 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 90:
+#line 1073 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-2].text);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2870 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 91:
+#line 1078 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2879 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 92:
+#line 1082 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2891 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 93:
+#line 1089 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&(yylsp[-4]));
+ }
+#line 2903 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 94:
+#line 1096 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-3].text);
+ save_text();
+ close_syllable(&(yylsp[-3]));
+ }
+#line 2913 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 95:
+#line 1101 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ add_auto_protrusion(yyvsp[-3].text);
+ save_text();
+ close_syllable(&(yylsp[-4]));
+ }
+#line 2923 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 96:
+#line 1109 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ close_syllable(NULL);
+ }
+#line 2931 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+ case 97:
+#line 1112 "gabc/gabc-score-determination.y" /* yacc.c:1652 */
+ {
+ close_syllable(NULL);
+ }
+#line 2939 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ break;
+
+
+#line 2943 "gabc/gabc-score-determination-y.c" /* yacc.c:1652 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+ *++yylsp = yyloc;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+ yyerror_range[1] = yylloc;
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, &yylloc);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ yyerror_range[1] = *yylsp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, yylsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ yyerror_range[2] = yylloc;
+ /* Using YYLLOC is tempting, but would change the location of
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ *++yylsp = yyloc;
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, &yylloc);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, yylsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h
new file mode 100644
index 00000000000..df928d20667
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination-y.h
@@ -0,0 +1,202 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#ifndef YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+# define YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gabc_score_determination_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ NAME = 258,
+ AUTHOR = 259,
+ GABC_COPYRIGHT = 260,
+ SCORE_COPYRIGHT = 261,
+ LANGUAGE = 262,
+ STAFF_LINES = 263,
+ ORISCUS_ORIENTATION = 264,
+ DEF_MACRO = 265,
+ OTHER_HEADER = 266,
+ ANNOTATION = 267,
+ MODE = 268,
+ MODE_MODIFIER = 269,
+ MODE_DIFFERENTIA = 270,
+ END_OF_DEFINITIONS = 271,
+ END_OF_FILE = 272,
+ COLON = 273,
+ SEMICOLON = 274,
+ CHARACTERS = 275,
+ NOTES = 276,
+ HYPHEN = 277,
+ ATTRIBUTE = 278,
+ OPENING_BRACKET = 279,
+ CLOSING_BRACKET = 280,
+ CLOSING_BRACKET_WITH_SPACE = 281,
+ I_BEGIN = 282,
+ I_END = 283,
+ TT_BEGIN = 284,
+ TT_END = 285,
+ UL_BEGIN = 286,
+ UL_END = 287,
+ C_BEGIN = 288,
+ C_END = 289,
+ B_BEGIN = 290,
+ B_END = 291,
+ SC_BEGIN = 292,
+ SC_END = 293,
+ SP_BEGIN = 294,
+ SP_END = 295,
+ VERB_BEGIN = 296,
+ VERB_END = 297,
+ CENTER_BEGIN = 298,
+ CENTER_END = 299,
+ ELISION_BEGIN = 300,
+ ELISION_END = 301,
+ TRANSLATION_BEGIN = 302,
+ TRANSLATION_END = 303,
+ TRANSLATION_CENTER_END = 304,
+ ALT_BEGIN = 305,
+ ALT_END = 306,
+ NLBA_B = 307,
+ NLBA_E = 308,
+ EUOUAE_B = 309,
+ EUOUAE_E = 310,
+ NABC_CUT = 311,
+ NABC_LINES = 312,
+ CLEAR = 313,
+ PROTRUSION = 314,
+ PROTRUSION_VALUE = 315,
+ PROTRUSION_END = 316,
+ PROTRUDING_PUNCTUATION = 317
+ };
+#endif
+/* Tokens. */
+#define NAME 258
+#define AUTHOR 259
+#define GABC_COPYRIGHT 260
+#define SCORE_COPYRIGHT 261
+#define LANGUAGE 262
+#define STAFF_LINES 263
+#define ORISCUS_ORIENTATION 264
+#define DEF_MACRO 265
+#define OTHER_HEADER 266
+#define ANNOTATION 267
+#define MODE 268
+#define MODE_MODIFIER 269
+#define MODE_DIFFERENTIA 270
+#define END_OF_DEFINITIONS 271
+#define END_OF_FILE 272
+#define COLON 273
+#define SEMICOLON 274
+#define CHARACTERS 275
+#define NOTES 276
+#define HYPHEN 277
+#define ATTRIBUTE 278
+#define OPENING_BRACKET 279
+#define CLOSING_BRACKET 280
+#define CLOSING_BRACKET_WITH_SPACE 281
+#define I_BEGIN 282
+#define I_END 283
+#define TT_BEGIN 284
+#define TT_END 285
+#define UL_BEGIN 286
+#define UL_END 287
+#define C_BEGIN 288
+#define C_END 289
+#define B_BEGIN 290
+#define B_END 291
+#define SC_BEGIN 292
+#define SC_END 293
+#define SP_BEGIN 294
+#define SP_END 295
+#define VERB_BEGIN 296
+#define VERB_END 297
+#define CENTER_BEGIN 298
+#define CENTER_END 299
+#define ELISION_BEGIN 300
+#define ELISION_END 301
+#define TRANSLATION_BEGIN 302
+#define TRANSLATION_END 303
+#define TRANSLATION_CENTER_END 304
+#define ALT_BEGIN 305
+#define ALT_END 306
+#define NLBA_B 307
+#define NLBA_E 308
+#define EUOUAE_B 309
+#define EUOUAE_E 310
+#define NABC_CUT 311
+#define NABC_LINES 312
+#define CLEAR 313
+#define PROTRUSION 314
+#define PROTRUSION_VALUE 315
+#define PROTRUSION_END 316
+#define PROTRUDING_PUNCTUATION 317
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+/* Location type. */
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE YYLTYPE;
+struct YYLTYPE
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+};
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+
+extern YYSTYPE gabc_score_determination_lval;
+extern YYLTYPE gabc_score_determination_lloc;
+int gabc_score_determination_parse (void);
+
+#endif /* !YY_GABC_SCORE_DETERMINATION_GABC_GABC_SCORE_DETERMINATION_Y_H_INCLUDED */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
new file mode 100644
index 00000000000..38b88ad4799
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
@@ -0,0 +1,659 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc utilities.
+ * Copyright (C) 2016-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "struct_iter.h"
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "messages.h"
+#include "support.h"
+
+void gabc_suppress_extra_custos_at_linebreak(gregorio_score *score)
+{
+ gregorio_syllable *syllable;
+ gregorio_element **custos = NULL;
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ gregorio_element **element;
+ for (element = syllable->elements; element && *element;
+ element = &((*element)->next)) {
+ switch ((*element)->type) {
+ case GRE_CUSTOS:
+ if (!((*element)->u.misc.pitched.force_pitch)) {
+ /* save the encountered non-forced custos */
+ custos = element;
+ } else {
+ /* forget the (previous) custos */
+ custos = NULL;
+ }
+ break;
+ case GRE_CLEF:
+ case GRE_BAR:
+ /* remember the custos if only these appear before linebreak */
+ break;
+ case GRE_END_OF_LINE:
+ if (custos) {
+ /* suppress the custos when linebreak follows */
+ gregorio_free_one_element(custos);
+ }
+ /* fall through */
+ default:
+ /* forget the custos */
+ custos = NULL;
+ break;
+ }
+ }
+ }
+}
+
+void gabc_fix_custos_pitches(gregorio_score *score_to_check)
+{
+ gregorio_syllable *current_syllable;
+ gregorio_element *current_element;
+ gregorio_element *custos_element;
+ int newkey;
+ int current_key;
+
+ if (!score_to_check || !score_to_check->first_syllable
+ || !score_to_check->first_voice_info) {
+ return;
+ }
+
+ current_key = gregorio_calculate_new_key(
+ score_to_check->first_voice_info->initial_clef);
+ for (current_syllable = score_to_check->first_syllable; current_syllable;
+ current_syllable = current_syllable->next_syllable) {
+ for (current_element = (current_syllable->elements)[0]; current_element;
+ current_element = current_element->next) {
+ if (current_element->type == GRE_CLEF) {
+ newkey = gregorio_calculate_new_key(
+ current_element->u.misc.clef);
+ current_element->u.misc.clef.pitch_difference =
+ (signed char) newkey - (signed char) current_key;
+ current_key = newkey;
+ }
+ }
+ }
+
+ custos_element = NULL;
+ for (current_syllable = score_to_check->first_syllable; current_syllable;
+ current_syllable = current_syllable->next_syllable) {
+ for (current_element = (current_syllable->elements)[0]; current_element;
+ current_element = current_element->next) {
+ switch (current_element->type) {
+ case GRE_CUSTOS:
+ if (current_element->u.misc.pitched.force_pitch) {
+ /* forget about the preceding custos if a forced one is
+ * encountered */
+ custos_element = NULL;
+ } else {
+ /* the pitch is not forced, so it may need to be adjusted */
+ custos_element = current_element;
+ custos_element->u.misc.pitched.pitch =
+ gregorio_determine_next_pitch(current_syllable,
+ current_element, NULL, NULL);
+ }
+ break;
+
+ case GRE_ELEMENT:
+ /* if it's an element, forget any preceding custos */
+ custos_element = NULL;
+ break;
+
+ case GRE_CLEF:
+ if (custos_element) {
+ /* adjust the preceding custos for the clef */
+ custos_element->u.misc.pitched.pitch =
+ gregorio_adjust_pitch_into_staff(score_to_check,
+ custos_element->u.misc.pitched.pitch
+ - current_element->u.misc.clef.pitch_difference);
+ }
+ break;
+
+ default:
+ /* to prevent the warning */
+ break;
+ }
+ }
+ }
+}
+
+/*
+ * A function that checks the score integrity.
+ */
+
+bool gabc_check_score_integrity(gregorio_score *score_to_check)
+{
+ bool good = true;
+
+ gregorio_assert(score_to_check, check_score_integrity, "score is NULL",
+ return false);
+
+ if (score_to_check->first_syllable
+ && score_to_check->first_syllable->elements
+ && *(score_to_check->first_syllable->elements)) {
+ gregorio_character *ch;
+ if ((score_to_check->first_syllable->elements)[0]->type
+ == GRE_END_OF_LINE) {
+ gregorio_message(
+ "line break is not supported on the first syllable",
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ good = false;
+ }
+ if (gregorio_get_clef_change(score_to_check->first_syllable)) {
+ gregorio_message(
+ "clef change is not supported on the first syllable",
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ good = false;
+ }
+ /* check first syllable for elision at the beginning */
+ for (ch = score_to_check->first_syllable->text; ch;
+ ch = ch->next_character) {
+ if (ch->is_character) {
+ break;
+ } else if (ch->cos.s.style == ST_VERBATIM
+ || ch->cos.s.style == ST_SPECIAL_CHAR) {
+ break;
+ } else if (ch->cos.s.style == ST_ELISION) {
+ gregorio_message(
+ _("score initial may not be in an elision"),
+ "check_score_integrity", VERBOSITY_ERROR, 0);
+ break;
+ }
+ }
+ }
+
+ return good;
+}
+
+/*
+ * Another function to be improved: this one checks the validity of the voice_infos.
+ */
+
+bool gabc_check_infos_integrity(gregorio_score *score_to_check)
+{
+ if (!score_to_check->name) {
+ gregorio_message(_("no name specified, put `name:...;' at the "
+ "beginning of the file, can be dangerous with some output "
+ "formats"), "det_score", VERBOSITY_WARNING, 0);
+ }
+ return true;
+}
+
+static void set_oriscus_descending(const gregorio_note_iter_position *const p,
+ void *const ignored __attribute__((unused)))
+{
+ switch(p->note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_DESCENDENS;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_SCAPUS_DESCENDENS;
+ gregorio_assert_only(p->glyph->u.notes.glyph_type
+ != G_PES_DESCENDENS_ORISCUS, set_oriscus_descending,
+ "glyph type should not be G_PES_DESCENDENS_ORISCUS");
+ if (p->glyph->u.notes.glyph_type == G_PES_ASCENDENS_ORISCUS) {
+ p->glyph->u.notes.glyph_type = G_PES_DESCENDENS_ORISCUS;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+static void set_oriscus_ascending(const gregorio_note_iter_position *const p,
+ void *const ignored __attribute__((unused)))
+{
+ switch(p->note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_ASCENDENS;
+ break;
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ p->note->u.note.shape = S_ORISCUS_SCAPUS_ASCENDENS;
+ gregorio_assert_only(p->glyph->u.notes.glyph_type
+ != G_PES_DESCENDENS_ORISCUS, set_oriscus_ascending,
+ "glyph type should not be G_PES_DESCENDENS_ORISCUS");
+ break;
+ default:
+ break;
+ }
+}
+
+/* data must be (gregorio_note_iter_position *) */
+static void oriscus_orientation_visit(
+ const gregorio_note_iter_position *const p, void *const data)
+{
+ gregorio_note *const note = p->note;
+ gregorio_note_iter_position *const oriscus =
+ (gregorio_note_iter_position *const)data;
+
+ if (oriscus->note && note->u.note.pitch != oriscus->note->u.note.pitch) {
+ if (note->u.note.pitch <= oriscus->note->u.note.pitch) {
+ /* descending (or undetermined oriscus in unison) */
+ gregorio_from_note_to_note(oriscus, p, false,
+ set_oriscus_descending, NULL, GRESTRUCT_NONE, NULL);
+ } else {
+ /* ascending */
+ gregorio_from_note_to_note(oriscus, p, false,
+ set_oriscus_ascending, NULL, GRESTRUCT_NONE, NULL);
+ }
+ oriscus->syllable = NULL,
+ oriscus->element = NULL,
+ oriscus->note = NULL;
+ oriscus->glyph = NULL;
+ }
+
+ if (!oriscus->note) {
+ switch (note->u.note.shape) {
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ *oriscus = *p;
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+void gabc_determine_oriscus_orientation(const gregorio_score *const score)
+{
+ gregorio_note_iter_position oriscus = {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ };
+
+ gregorio_for_each_note(score, oriscus_orientation_visit, NULL,
+ GRESTRUCT_NONE, &oriscus);
+
+ if (oriscus.note) {
+ gregorio_from_note_to_note(&oriscus, NULL, true,
+ set_oriscus_descending, NULL, GRESTRUCT_NONE, NULL);
+ }
+}
+
+typedef struct {
+ gregorio_note_iter_position first, previous;
+ gregorio_shape orientation;
+ int running;
+ int count;
+ bool unison;
+} punctum_inclinatum_vars;
+
+/* data must be (gregorio_shape *) */
+static void set_shape(const gregorio_note_iter_position *const p,
+ void *const data)
+{
+ p->note->u.note.shape = *((gregorio_shape *)data);
+}
+
+static __inline void set_punctum_inclinatum_orientation(
+ punctum_inclinatum_vars *const v)
+{
+ if (v->orientation == S_UNDETERMINED) {
+ if (v->unison && (v->count > 1 || (v->count == 1 && v->running == 0))) {
+ v->orientation = S_PUNCTUM_INCLINATUM_STANS;
+ } else if (v->running > 0) {
+ v->orientation = S_PUNCTUM_INCLINATUM_ASCENDENS;
+ } else {
+ v->orientation = S_PUNCTUM_INCLINATUM_DESCENDENS;
+ }
+ }
+}
+
+static __inline void finalize_punctum_inclinatum_orientation(
+ punctum_inclinatum_vars *const v)
+{
+ if (v->first.note) {
+ set_punctum_inclinatum_orientation(v);
+ gregorio_assert_only(v->orientation != S_UNDETERMINED,
+ punctum_inclinatum_orientation_end_item,
+ "orientation should not be S_UNDETERMINED");
+ gregorio_from_note_to_note(&v->first, &v->previous, true, set_shape,
+ NULL, GRESTRUCT_NONE, &v->orientation);
+ }
+
+ v->first.syllable = NULL;
+ v->first.element = NULL;
+ v->first.glyph = NULL;
+ v->first.note = NULL;
+ v->unison = true;
+}
+
+/* data must be (punctum_inclinatum_vars *) */
+static void punctum_inclinatum_orientation_visit(
+ const gregorio_note_iter_position *const p, void *const data)
+{
+ const gregorio_shape shape = p->note->u.note.shape;
+ punctum_inclinatum_vars *const v = (punctum_inclinatum_vars *)data;
+ if (shape == S_PUNCTUM_INCLINATUM_UNDETERMINED) {
+ if (v->orientation) {
+ p->note->u.note.shape = v->orientation;
+ } else {
+ /* any cases not covered here will not change running */
+ if (v->previous.note
+ && (v->first.note || v->previous.syllable == p->syllable)) {
+ if (v->previous.note->u.note.pitch
+ < p->note->u.note.pitch) {
+ ++ v->running;
+ if (v->count > 0) {
+ v->unison = false;
+ }
+ } else if (v->previous.note->u.note.pitch
+ > p->note->u.note.pitch) {
+ -- v->running;
+ if (v->count > 0) {
+ v->unison = false;
+ }
+ }
+ }
+ if (!v->first.note) {
+ v->first = *p;
+ }
+ }
+ ++ v->count;
+ } else { /* non-inclinatum or determined inclinatum */
+ bool is_punctum_inclinatum;
+
+ /* shape can't be S_PUNCTUM_INCLINATUM_UNDETERMINED here */
+ switch (shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ v->orientation = S_PUNCTUM_INCLINATUM_ASCENDENS;
+ is_punctum_inclinatum = true;
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ v->orientation = S_PUNCTUM_INCLINATUM_STANS;
+ is_punctum_inclinatum = true;
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ v->unison = false;
+ /* fall through */
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ v->orientation = S_PUNCTUM_INCLINATUM_DESCENDENS;
+ is_punctum_inclinatum = true;
+ break;
+ default:
+ is_punctum_inclinatum = false;
+ break;
+ }
+
+ if (v->first.note) {
+ if (!is_punctum_inclinatum) {
+ /* if v->first.note is not null,
+ * then v->previous.note is not null */
+ if (v->previous.note->u.note.pitch
+ < p->note->u.note.pitch
+ && v->previous.syllable == p->syllable) {
+ ++ v->running;
+ } else if (v->previous.note->u.note.pitch
+ > p->note->u.note.pitch) {
+ -- v->running;
+ }
+ }
+ finalize_punctum_inclinatum_orientation(v);
+ }
+
+ if (is_punctum_inclinatum) {
+ ++ v->count;
+ /* and leave orientation alone */
+ } else {
+ v->running = 0;
+ v->count = 0;
+ v->orientation = S_UNDETERMINED;
+ }
+ }
+
+ v->previous = *p;
+}
+
+/* data must be (punctum_inclinatum_vars *) */
+static void punctum_inclinatum_orientation_end_item(
+ const gregorio_note_iter_position *const p __attribute__((__unused__)),
+ const gregorio_note_iter_item_type item_type,
+ void *const data)
+{
+ punctum_inclinatum_vars *const v = (punctum_inclinatum_vars *)data;
+
+ gregorio_assert_only(item_type == GRESTRUCT_SYLLABLE,
+ punctum_inclinatum_orientation_end_item,
+ "item type should be GRESTRUCT_SYLLABLE");
+
+ finalize_punctum_inclinatum_orientation(v);
+ v->count = 0;
+}
+
+void gabc_determine_punctum_inclinatum_orientation(
+ const gregorio_score *const score)
+{
+ punctum_inclinatum_vars v = {
+ /* .first = */ {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ },
+ /* .previous = */ {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ },
+ /* .orientation = */ S_UNDETERMINED, /* because it's 0 */
+ /* .running = */ 0,
+ /* .count = */ 0,
+ /* .unison = */ true,
+ };
+
+ gregorio_for_each_note(score, punctum_inclinatum_orientation_visit,
+ punctum_inclinatum_orientation_end_item, GRESTRUCT_SYLLABLE, &v);
+
+ if (v.first.note) {
+ set_punctum_inclinatum_orientation(&v);
+ gregorio_from_note_to_note(&v.first, &v.previous, true, set_shape, NULL,
+ GRESTRUCT_NONE, &v.orientation);
+ }
+}
+
+typedef struct note_stack {
+ gregorio_note *note;
+ struct note_stack *prev;
+} note_stack;
+
+static void note_stack_push(note_stack **const stack, gregorio_note *note) {
+ note_stack *item = gregorio_malloc(sizeof(note_stack));
+ item->note = note;
+ item->prev = *stack;
+ *stack = item;
+}
+
+static gregorio_note *note_stack_pop(note_stack **const stack) {
+ note_stack *item = *stack;
+ if (item) {
+ gregorio_note *note = item->note;
+ note_stack *prev = item->prev;
+ free(item);
+ *stack = prev;
+ return note;
+ }
+ return NULL;
+}
+
+static void note_stack_clear(note_stack **const stack) {
+ note_stack *item = *stack;
+ while (item) {
+ note_stack *prev = item->prev;
+ free(item);
+ item = prev;
+ }
+ *stack = NULL;
+}
+
+typedef struct {
+ note_stack *high, *low;
+ gregorio_note *prev_note;
+ signed char high_ledger_line_pitch;
+ bool running_high, running_low;
+} ledger_line_vars;
+
+static __inline void clear_ledger_line_vars(ledger_line_vars *const v) {
+ note_stack_clear(&v->high);
+ note_stack_clear(&v->low);
+ v->prev_note = NULL;
+ v->running_high = false;
+ v->running_low = false;
+}
+
+static __inline void adjust_ledger(const gregorio_note_iter_position *const p,
+ const gregorio_ledger_specificity specificity, bool ledger_line,
+ note_stack **const stack, bool *const running, gregorio_note *prev_note,
+ const signed char high_ledger_line_pitch,
+ bool (*extend_ledger)(gregorio_note *, const gregorio_note *,
+ const gregorio_note *, signed char))
+{
+ if (specificity & LEDGER_DRAWN) {
+ if (ledger_line) {
+ gregorio_note *after = p->note;
+ gregorio_note *note;
+ /* process from this ledger backwards */
+ while ((note = note_stack_pop(stack))) {
+ if (!extend_ledger(note, NULL, after, high_ledger_line_pitch)) {
+ /* ledger has ended */
+ break;
+ }
+ after = note;
+ }
+ *running = true;
+ } else {
+ *running = false;
+ }
+ note_stack_clear(stack);
+ } else {
+ if (*running) {
+ if (!extend_ledger(p->note, prev_note, NULL,
+ high_ledger_line_pitch)) {
+ /* ledger has ended */
+ note_stack_push(stack, p->note);
+ *running = false;
+ }
+ /* else stack should be empty, keep it that way */
+ } else {
+ note_stack_push(stack, p->note);
+ }
+ }
+}
+
+static bool extend_high_ledger(gregorio_note *const note,
+ const gregorio_note *const note_before,
+ const gregorio_note *const note_after,
+ const signed char high_ledger_line_pitch)
+{
+ bool extend = false;
+
+ if (note_before) {
+ extend = note_before->u.note.pitch < note->u.note.pitch
+ || (note_before->u.note.pitch > high_ledger_line_pitch
+ && note->u.note.pitch < high_ledger_line_pitch);
+ } else if (note_after) {
+ extend = note_after->u.note.pitch < note->u.note.pitch
+ || (note_after->u.note.pitch > high_ledger_line_pitch
+ && note->u.note.pitch < high_ledger_line_pitch);
+ }
+
+ if (extend) {
+ note->high_ledger_line = true;
+ note->high_ledger_specificity = LEDGER_DRAWN;
+ }
+ return extend;
+}
+
+static bool extend_low_ledger(gregorio_note *const note,
+ const gregorio_note *const note_before,
+ const gregorio_note *const note_after,
+ const signed char high_ledger_line_pitch __attribute__((__unused__)))
+{
+ bool extend = false;
+
+ if (note_before) {
+ extend = note_before->u.note.pitch < note->u.note.pitch
+ || (note_before->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && note->u.note.pitch < LOW_LEDGER_LINE_PITCH);
+ } else if (note_after) {
+ extend = note_after->u.note.pitch < note->u.note.pitch
+ || (note_after->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && note->u.note.pitch < LOW_LEDGER_LINE_PITCH);
+ }
+
+ if (extend) {
+ note->low_ledger_line = true;
+ note->low_ledger_specificity = LEDGER_DRAWN;
+ }
+ return extend;
+}
+
+/* data must be (ledger_line_vars *) */
+static void ledger_line_visit(const gregorio_note_iter_position *const p,
+ void *const data)
+{
+ ledger_line_vars *const v = (ledger_line_vars *)data;
+
+ adjust_ledger(p, p->note->high_ledger_specificity, p->note->high_ledger_line,
+ &v->high, &v->running_high, v->prev_note, v->high_ledger_line_pitch,
+ &extend_high_ledger);
+ adjust_ledger(p, p->note->low_ledger_specificity, p->note->low_ledger_line,
+ &v->low, &v->running_low, v->prev_note, v->high_ledger_line_pitch,
+ &extend_low_ledger);
+
+ v->prev_note = p->note;
+}
+
+/* data must be (ledger_line_vars *) */
+static void ledger_line_end_item(
+ const gregorio_note_iter_position *const p __attribute__((__unused__)),
+ const gregorio_note_iter_item_type item_type, void *const data)
+{
+ if (item_type == GRESTRUCT_ELEMENT) {
+ clear_ledger_line_vars((ledger_line_vars *)data);
+ }
+}
+
+void gabc_determine_ledger_lines(const gregorio_score *const score)
+{
+ ledger_line_vars v;
+ memset(&v, 0, sizeof v);
+ v.high_ledger_line_pitch = score->high_ledger_line_pitch;
+
+ gregorio_for_each_note(score, ledger_line_visit, ledger_line_end_item,
+ GRESTRUCT_ELEMENT, &v);
+
+ /* stacks should be cleared by ledger_line_end_item */
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
new file mode 100644
index 00000000000..4474973c4d3
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
@@ -0,0 +1,64 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header shares definitions between the score parser and lexer.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GABC_SCORE_DETERMINATION_H
+#define GABC_SCORE_DETERMINATION_H
+
+#include "bool.h"
+#include "struct.h"
+#include "gabc.h"
+
+/* The bits in this enum are named to correspond with the _BEGIN/_END tokens */
+typedef enum {
+ SB_I = 0x01,
+ SB_B = 0x02,
+ SB_TT = 0x04,
+ SB_SC = 0x08,
+ SB_UL = 0x10,
+ SB_C = 0x20,
+ SB_ELISION = 0x40
+} gabc_style_bits;
+
+typedef union gabc_score_determination_lval_t {
+ char *text;
+ char character;
+} gabc_score_determination_lval_t;
+
+#define YYSTYPE gabc_score_determination_lval_t
+#define YYSTYPE_IS_DECLARED 1
+
+#define YY_DECL \
+ int gabc_score_determination_lex(gabc_style_bits *const styles)
+YY_DECL;
+
+#define YYLTYPE gregorio_scanner_location
+
+void gabc_suppress_extra_custos_at_linebreak(gregorio_score *score);
+void gabc_fix_custos_pitches(gregorio_score *score_to_check);
+bool gabc_check_score_integrity(gregorio_score *score_to_check);
+bool gabc_check_infos_integrity(gregorio_score *score_to_check);
+void gabc_determine_oriscus_orientation(const gregorio_score *score);
+void gabc_determine_punctum_inclinatum_orientation(const gregorio_score *score);
+void gabc_determine_ledger_lines(const gregorio_score *const score);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l
new file mode 100644
index 00000000000..c0d68c1148f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l
@@ -0,0 +1,430 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score lexer.
+ *
+ * Gregorio score determination in gabc input.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "bool.h"
+#include "support.h"
+
+#include "gabc.h"
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-y.h"
+
+static bool eof_found = false;
+
+#define START_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style already started: %s"), gabc_score_determination_text); \
+ } else { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _BEGIN; \
+ }
+
+#define END_STYLE(STYLE) \
+ if (*styles & SB_ ## STYLE) { \
+ *styles ^= SB_ ## STYLE; \
+ return STYLE ## _END; \
+ } else { \
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0, \
+ _("style not started: %s"), gabc_score_determination_text); \
+ }
+
+#define RETURN_CHARACTERS \
+ gabc_score_determination_lval.text = \
+ gregorio_strdup(gabc_score_determination_text); \
+ return CHARACTERS
+
+#define RETURN_SPACE \
+ gabc_score_determination_lval.text = gregorio_strdup(" "); \
+ return CHARACTERS
+
+#define YY_NO_INPUT
+
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) { \
+ int c = '*'; \
+ int n; \
+ for (n = 0; n < max_size \
+ && (c = getc(gabc_score_determination_in)) != EOF \
+ && c != '\n'; ++n ) { \
+ buf[n] = (char) c; \
+ } \
+ if (c == '\n') { \
+ buf[n++] = (char) c; \
+ } \
+ if (c == EOF && ferror(gabc_score_determination_in)) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ } \
+ result = n; \
+ } else { \
+ errno=0; \
+ while ((result = fread(buf, 1, max_size, gabc_score_determination_in)) \
+ == 0 && ferror(gabc_score_determination_in)) { \
+ if (errno != EINTR) { \
+ YY_FATAL_ERROR("input in flex scanner failed"); \
+ break; \
+ } \
+ errno = 0; \
+ clearerr(gabc_score_determination_in); \
+ } \
+ } \
+ gabc_digest(buf, result)
+
+#define YY_USER_ACTION gabc_update_location(&gabc_score_determination_lloc, \
+ gabc_score_determination_text, gabc_score_determination_leng);
+
+%}
+
+%x attribute
+%x score
+%x notes
+%x sp
+%x verb
+%x comments
+%x inicomments
+%x alt
+%x protrusion_value
+%x protrusion_end
+
+%option stack
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option align
+%option noread
+%option nomain
+%option noalways-interactive
+%option nonever-interactive
+%option prefix="gabc_score_determination_"
+%option noyywrap
+%option 8bit
+
+
+/* The expression for attribute below is rather messy because we allow
+for (a) single-line values, ending with a semicolon at end of line or a
+double semicolon, (b) multi-line values, which end at a double
+semicolon. */
+
+%%
+<INITIAL>^(\xBB|\xEF|\xBF)+ {
+ /* BOM written by a lot of windows softwares when they write UTF-8 */
+ }
+<INITIAL>^[\n\r]+ {
+ /* ignoring empty lines */
+ }
+<INITIAL>^[\%#] {
+ BEGIN(inicomments);
+ }
+<inicomments>(\n|\r)+ {
+ BEGIN(INITIAL);
+ }
+<inicomments>[^\n\r]+ {
+ /* ignored */
+ }
+<INITIAL>:(\ )? {
+ BEGIN(attribute);
+ return COLON;
+ }
+<attribute>;;?[\n\r \t]*[\n\r] {
+ BEGIN(INITIAL);
+ return SEMICOLON;
+ }
+<attribute>[^;]+ {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+ }
+<attribute>; {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ATTRIBUTE;
+}
+<INITIAL>def-m[0-9] {
+ gabc_score_determination_lval.character = gabc_score_determination_text[5];
+ return DEF_MACRO;
+ }
+<INITIAL>name {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NAME;
+ }
+<INITIAL>score-copyright {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return SCORE_COPYRIGHT;
+ }
+<INITIAL>gabc-copyright {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return GABC_COPYRIGHT;
+ }
+<INITIAL>mode {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE;
+ }
+<INITIAL>mode-modifier {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_MODIFIER;
+ }
+<INITIAL>mode-differentia {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return MODE_DIFFERENTIA;
+ }
+<INITIAL>annotation {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ANNOTATION;
+ }
+<INITIAL>author {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return AUTHOR;
+ }
+<INITIAL>language {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return LANGUAGE;
+ }
+<INITIAL>staff-lines {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return STAFF_LINES;
+ }
+<INITIAL>nabc-lines {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NABC_LINES;
+ }
+<INITIAL>oriscus-orientation {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return ORISCUS_ORIENTATION;
+ }
+<INITIAL>[A-Za-z0-9_]+(-[A-Za-z0-9_]+)* {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return OTHER_HEADER;
+ }
+<INITIAL>%%+(\n|\r)+ {
+ BEGIN(score);
+ return END_OF_DEFINITIONS;
+ }
+<INITIAL>. {
+ gregorio_messagef("det_score", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\" in definition part"),
+ gabc_score_determination_text[0]);
+ }
+<score>[\n\r][\n\r \t]* {
+ RETURN_SPACE;
+ }
+<score>[^-,;:.\{\}\(\[\]<%\n\r]+ {
+ RETURN_CHARACTERS;
+ }
+<score>- {
+ return HYPHEN;
+ }
+<score>[,;:.] {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUDING_PUNCTUATION;
+ }
+<score><nlba> {
+ return NLBA_B;
+ }
+<score><\/nlba> {
+ return NLBA_E;
+ }
+<score><i> {
+ START_STYLE(I);
+ }
+<score><\/i> {
+ END_STYLE(I);
+ }
+<score><tt> {
+ START_STYLE(TT);
+ }
+<score><\/tt> {
+ END_STYLE(TT);
+ }
+<score><ul> {
+ START_STYLE(UL);
+ }
+<score><\/ul> {
+ END_STYLE(UL);
+ }
+<score><c> {
+ START_STYLE(C);
+ }
+<score><\/c> {
+ END_STYLE(C);
+ }
+<score><b> {
+ START_STYLE(B);
+ }
+<score><\/b> {
+ END_STYLE(B);
+ }
+<score><sc> {
+ START_STYLE(SC);
+ }
+<score><\/sc> {
+ END_STYLE(SC);
+ }
+<score><e> {
+ START_STYLE(ELISION);
+ }
+<score><\/e> {
+ END_STYLE(ELISION);
+ }
+<score><sp> {
+ BEGIN(sp);
+ return SP_BEGIN;
+ }
+<sp><\/sp> {
+ BEGIN(score);
+ return SP_END;
+ }
+<sp>[\n\r][\n\r \t]* {
+ RETURN_SPACE;
+ }
+<sp>[^<\{\}\n\r]+ {
+ RETURN_CHARACTERS;
+ }
+<score>\% {
+ BEGIN(comments);
+ }
+<comments>(\n|\r)+ {
+ BEGIN(score);
+ }
+<comments>[^\n\r]+ {
+ /* ignored */
+ }
+<score><v> {
+ BEGIN(verb);
+ return VERB_BEGIN;
+ }
+<verb><\/v> {
+ BEGIN(score);
+ return VERB_END;
+ }
+<verb,alt>[^<]+ {
+ RETURN_CHARACTERS;
+ }
+<verb,score,alt>< {
+ RETURN_CHARACTERS;
+ }
+<score>\{ {
+ return CENTER_BEGIN;
+ }
+<score>\} {
+ return CENTER_END;
+ }
+<score><alt> {
+ BEGIN(alt);
+ return ALT_BEGIN;
+ }
+<alt><\/alt> {
+ BEGIN(score);
+ return ALT_END;
+ }
+<score><eu> {
+ return EUOUAE_B;
+ }
+<score><\/eu> {
+ return EUOUAE_E;
+ }
+<score>\[\/] {
+ return TRANSLATION_CENTER_END;
+ }
+<score>\[ {
+ return TRANSLATION_BEGIN;
+ }
+<score>\] {
+ return TRANSLATION_END;
+ }
+<score><[\n\r \t]*clear[\n\r \t]*\/?[\n\r \t]*> {
+ return CLEAR;
+ }
+<score><[\n\r \t]*pr[\n\r \t]*\/?[\n\r \t]*> {
+ return PROTRUSION;
+ }
+<score><[\n\r \t]*pr[\n\r \t]*:[\n\r \t]* {
+ BEGIN(protrusion_value);
+ return PROTRUSION;
+ }
+<protrusion_value>([0-9]*\.?[0-9]+|[0-9]+\.) {
+ BEGIN(protrusion_end);
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return PROTRUSION_VALUE;
+ }
+<protrusion_end>[\n\r \t]*\/?[\n\r \t]*> {
+ BEGIN(score);
+ return PROTRUSION_END;
+ }
+<score>\( {
+ BEGIN(notes);
+ return OPENING_BRACKET;
+ }
+<notes>[^|\)]+ {
+ gabc_score_determination_lval.text =
+ gregorio_strdup(gabc_score_determination_text);
+ return NOTES;
+ }
+<notes>\| {
+ return NABC_CUT;
+ }
+<notes>\) {
+ BEGIN(score);
+ return CLOSING_BRACKET;
+ }
+<notes>\)(\ |\t|\n|\r)+ {
+ BEGIN(score);
+ return CLOSING_BRACKET_WITH_SPACE;
+ }
+<<EOF>> {
+ if (!eof_found) {
+ eof_found = true;
+ return END_OF_FILE;
+ } else {
+ yyterminate();
+ }
+ }
+.|\n {
+ gregorio_messagef("gabc_score_determination_lex", VERBOSITY_ERROR, 0,
+ _("unrecognized character: \"%c\""),
+ gabc_score_determination_text[0]);
+ }
+%%
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y
new file mode 100644
index 00000000000..e12c057ef68
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.y
@@ -0,0 +1,1124 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the score parser.
+ *
+ * Gregorio score determination from gabc.
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ *
+ * This file is certainly not the most easy to understand, it is a bison file.
+ * See the bison manual on gnu.org for further details.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "sha1.h"
+#include "plugins.h"
+#include "gabc.h"
+
+#define YYLLOC_DEFAULT(Current, Rhs, N) \
+ if (N) { \
+ (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).first_offset = YYRHSLOC (Rhs, 1).first_offset; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ (Current).last_offset = YYRHSLOC (Rhs, N).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 1).generate_point_and_click; \
+ } else { \
+ (Current).first_line = (Current).last_line = YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = YYRHSLOC (Rhs, 0).last_column; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).first_offset = (Current).last_offset = YYRHSLOC (Rhs, 0).last_offset; \
+ (Current).generate_point_and_click = YYRHSLOC (Rhs, 0).generate_point_and_click; \
+ }
+
+#include "gabc-score-determination.h"
+#include "gabc-score-determination-l.h"
+
+/* workaround for bison issue passing pointer to a "local" variable */
+#define STYLE_BITS &styles
+
+/* forward declaration of the flex/bison process function */
+static int gabc_score_determination_parse(void);
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/* int gabc_score_determination_debug=1; */
+
+/*
+ *
+ * We will need some variables and functions through the entire file, we
+ * declare them there:
+ *
+ */
+
+/* the score that we will determine and return */
+static gregorio_score *score;
+/* an array of elements that we will use for each syllable */
+static gregorio_element **elements;
+gregorio_element *current_element;
+/* a table containing the macros to use in gabc file */
+static char *macros[10];
+/* other variables that we will have to use */
+static gregorio_character *current_character;
+static gregorio_character *suspended_character;
+static gregorio_character *first_text_character;
+static gregorio_character *first_translation_character;
+static gregorio_tr_centering translation_type;
+static gregorio_nlba no_linebreak_area;
+static gregorio_euouae euouae;
+static gregorio_voice_info *current_voice_info;
+static int number_of_voices;
+static int voice;
+/* see comments on text to understand this */
+static gregorio_center_determination center_is_determined;
+/* current_key is... the current key... updated by each notes determination
+ * (for key changes) */
+static int current_key;
+static bool got_language;
+static bool got_staff_lines;
+static bool started_first_word;
+static struct sha1_ctx digester;
+static gabc_style_bits styles;
+static bool generate_point_and_click;
+static bool clear_syllable_text;
+static bool has_protrusion;
+
+/* punctum_inclinatum_orientation maintains the running punctum inclinatum
+ * orientation in order to decide if the glyph needs to be cut when a punctum
+ * inclinatum with forced orientation is encountered. This should be set to
+ * the shape of a non-liquescent punctum inclinatum with forced orientation
+ * when one is encountered, be left alone when a non-liquescent punctum
+ * inclinatum with undetermined orientation is encountered, or be reset to
+ * S_PUNCTUM_INCLINATUM_UNDETERMINED otherwise (because such ends any previous
+ * run of punctum inclinatum notes). Based on the assumption that a punctum
+ * inclinatum with forced orientation changes all the punctum inclinatum shapes
+ * with undetermined orientation in the same run of notes before and after it
+ * unless influenced by an earlier punctum inclinatum with forced orientation,
+ * the value of punctum_inclinatum_orientation can be used to determine if a
+ * punctum inclinatum with a forced orientation will have a different
+ * orientation than the punctum inclinatum immediately before it, which would
+ * require a cut of the glyph. */
+static gregorio_shape punctum_inclinatum_orientation;
+
+static __inline void check_multiple(const char *name, bool exists) {
+ if (exists) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("several %s definitions found, only the last will be taken "
+ "into consideration"), name);
+ }
+}
+
+static void gabc_score_determination_error(const char *error_str)
+{
+ gregorio_message(error_str, (const char *) "gabc_score_determination_parse",
+ VERBOSITY_ERROR, 0);
+}
+
+/*
+ * The function that will initialize the variables.
+ */
+
+static void initialize_variables(bool point_and_click)
+{
+ int i;
+ /* build a brand new empty score */
+ score = gregorio_new_score();
+ /* initialization of the first voice info to an empty voice info */
+ current_voice_info = NULL;
+ gregorio_add_voice_info(&current_voice_info);
+ score->first_voice_info = current_voice_info;
+ /* other initializations */
+ number_of_voices = 1;
+ voice = 0; /* first (and only) voice */
+ current_character = NULL;
+ suspended_character = NULL;
+ first_translation_character = NULL;
+ first_text_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_key = gregorio_calculate_new_key(gregorio_default_clef);
+ for (i = 0; i < 10; i++) {
+ macros[i] = NULL;
+ }
+ got_language = false;
+ got_staff_lines = false;
+ started_first_word = false;
+ styles = 0;
+ punctum_inclinatum_orientation = S_PUNCTUM_INCLINATUM_UNDETERMINED;
+ generate_point_and_click = point_and_click;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+/*
+ * function that frees the variables that need it, for when we have finished to
+ * determine the score
+ */
+
+static void free_variables(void)
+{
+ int i;
+ free(elements);
+ for (i = 0; i < 10; i++) {
+ free(macros[i]);
+ }
+}
+
+/*
+ * Function called when we have reached the end of the definitions, it tries to
+ * make the voice_infos coherent.
+ */
+static void end_definitions(void)
+{
+ int i;
+
+ gregorio_assert_only(gabc_check_infos_integrity(score), end_definitions,
+ "can't determine valid infos on the score");
+
+ elements = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+
+ if (!got_language) {
+ static char latin[] = "Latin";
+ gregorio_set_centering_language(latin);
+ }
+}
+
+/*
+ * Here starts the code for the determinations of the notes. The notes are not
+ * precisely determined here, we separate the text describing the notes of each
+ * voice, and we call determine_elements_from_string to really determine them.
+ */
+static char position = WORD_BEGINNING;
+static gregorio_syllable *current_syllable = NULL;
+static char *abovelinestext = NULL;
+
+/*
+ * Function called each time we find a space, it updates the current position.
+ */
+static void update_position_with_space(void)
+{
+ if (position == WORD_MIDDLE) {
+ position = WORD_END;
+ }
+ if (position == WORD_BEGINNING) {
+ position = WORD_ONE_SYLLABLE;
+ }
+}
+
+/*
+ * When we encounter a translation center ending, we call this function that
+ * sets translation_type = TR_WITH_CENTER_BEGINNING on previous syllable with
+ * translation
+ */
+static void gregorio_set_translation_center_beginning(
+ gregorio_syllable *current_syllable)
+{
+ gregorio_syllable *syllable = current_syllable->previous_syllable;
+ while (syllable) {
+ if (syllable->translation_type == TR_WITH_CENTER_END) {
+ gregorio_message("encountering translation centering end but "
+ "cannot find translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+ return;
+ }
+ if (syllable->translation) {
+ syllable->translation_type = TR_WITH_CENTER_BEGINNING;
+ return;
+ }
+ syllable = syllable->previous_syllable;
+ }
+ /* we didn't find any beginning... */
+ gregorio_message("encountering translation centering end but cannot find "
+ "translation centering beginning...",
+ "set_translation_center_beginning", VERBOSITY_ERROR, 0);
+ current_syllable->translation_type = TR_NORMAL;
+}
+
+static void ready_characters(void)
+{
+ if (current_character) {
+ gregorio_go_to_first_character_c(&current_character);
+ if (!score->first_syllable || (current_syllable
+ && !current_syllable->previous_syllable
+ && !current_syllable->text)) {
+ started_first_word = true;
+ }
+ }
+}
+
+static void rebuild_score_characters(void)
+{
+ if (score->first_syllable) {
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ const gregorio_character *t;
+
+ /* find out if there is a forced center */
+ gregorio_center_determination center = CENTER_NOT_DETERMINED;
+ for (t = syllable->text; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.style == ST_FORCED_CENTER) {
+ syllable->forced_center = true;
+ center = CENTER_FULLY_DETERMINED;
+ break;
+ }
+ }
+
+ if (syllable == score->first_syllable) {
+ /* leave the first syllable text untouched at this time */
+ continue;
+ }
+
+ gregorio_rebuild_characters(&(syllable->text), center, false);
+
+ if (syllable->first_word) {
+ gregorio_set_first_word(&(syllable->text));
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The two functions called when lex returns a style, we simply add it. All the
+ * complex things will be done by the function after...
+ *
+ */
+
+static void add_style(unsigned char style)
+{
+ gregorio_begin_style(&current_character, style);
+}
+
+static void end_style(unsigned char style)
+{
+ gregorio_end_style(&current_character, style);
+}
+
+static __inline void save_text(void)
+{
+ if (has_protrusion) {
+ end_style(ST_PROTRUSION);
+ }
+ ready_characters();
+ first_text_character = current_character;
+}
+
+/* a function called when we see a [, basically, all characters are added to
+ * the translation pointer instead of the text pointer */
+static void start_translation(unsigned char asked_translation_type)
+{
+ suspended_character = current_character;
+ /* the middle letters of the translation have no sense */
+ /*center_is_determined = CENTER_FULLY_DETERMINED;*/
+ current_character = NULL;
+ translation_type = asked_translation_type;
+}
+
+static void end_translation(void)
+{
+ ready_characters();
+ first_translation_character = current_character;
+ current_character = suspended_character;
+}
+
+/*
+ * add_text is the function called when lex returns a char *. In
+ * this function we convert it into grewchar, and then we add the corresponding
+ * gregorio_characters in the list of gregorio_characters.
+ */
+
+static void add_text(char *mbcharacters)
+{
+ if (!current_character) {
+ /* insert open styles, leaving out ELISION on purpose */
+ if (styles & SB_I) {
+ add_style(ST_ITALIC);
+ }
+ if (styles & SB_B) {
+ add_style(ST_BOLD);
+ }
+ if (styles & SB_TT) {
+ add_style(ST_TT);
+ }
+ if (styles & SB_SC) {
+ add_style(ST_SMALL_CAPS);
+ }
+ if (styles & SB_UL) {
+ add_style(ST_UNDERLINED);
+ }
+ if (styles & SB_C) {
+ add_style(ST_COLORED);
+ }
+ }
+ if (current_character) {
+ current_character->next_character = gregorio_build_char_list_from_buf(
+ mbcharacters);
+ current_character->next_character->previous_character =
+ current_character;
+ } else {
+ current_character = gregorio_build_char_list_from_buf(mbcharacters);
+ }
+ while (current_character && current_character->next_character) {
+ current_character = current_character->next_character;
+ }
+ free(mbcharacters);
+}
+
+static void add_protrusion(char *factor)
+{
+ if (has_protrusion) {
+ gregorio_message("syllable already has protrusion; pr tag ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ free(factor);
+ } else {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ gregorio_message("closing open syllable center before protrusion",
+ "det_score", VERBOSITY_WARNING, 0);
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ }
+
+ add_style(ST_PROTRUSION_FACTOR);
+ add_text(factor);
+ end_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_PROTRUSION);
+ has_protrusion = true;
+ }
+}
+
+static void add_auto_protrusion(char *protrusion)
+{
+ if (has_protrusion) {
+ add_text(protrusion);
+ } else {
+ add_style(ST_PROTRUSION_FACTOR);
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreProtrusionFactor{"));
+
+ switch (*protrusion) {
+ case ',':
+ add_text(gregorio_strdup("comma"));
+ break;
+ case ';':
+ add_text(gregorio_strdup("semicolon"));
+ break;
+ case ':':
+ add_text(gregorio_strdup("colon"));
+ break;
+ case '.':
+ add_text(gregorio_strdup("period"));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(add_auto_protrusion,
+ "unsupported protruding punctuation: %c", *protrusion);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ add_text(gregorio_strdup("}"));
+ end_style(ST_VERBATIM);
+ end_style(ST_PROTRUSION_FACTOR);
+
+ add_style(ST_PROTRUSION);
+ add_text(protrusion);
+ end_style(ST_PROTRUSION);
+
+ has_protrusion = true;
+ }
+}
+
+/*
+ * Function to close a syllable and update the position.
+ */
+
+static void close_syllable(YYLTYPE *loc)
+{
+ int i = 0;
+ gregorio_character *ch;
+
+ /* make sure any elisions that are opened are closed within the syllable */
+ for (ch = first_text_character; ch; ch = ch->next_character) {
+ if (!ch->is_character) {
+ switch (ch->cos.s.style) {
+ case ST_ELISION:
+ switch (ch->cos.s.type) {
+ case ST_T_BEGIN:
+ ++i;
+ /* the parser precludes this from falling here */
+ gregorio_assert_only(i <= 1, close_syllable,
+ "elisions may not be nested");
+ break;
+
+ case ST_T_END:
+ --i;
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i >= 0, close_syllable,
+ "encountered elision end with no beginning");
+ break;
+
+ case ST_T_NOTHING:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(close_syllable, "encountered ST_T_NOTHING");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case ST_FORCED_CENTER:
+ if (i > 0) {
+ gregorio_message(
+ _("forced center may not be within an elision"),
+ "close_syllable", VERBOSITY_ERROR, 0);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ /* the parser precludes this from failing here */
+ gregorio_assert_only(i == 0, close_syllable,
+ "encountered elision beginning with no end");
+
+ gregorio_add_syllable(&current_syllable, number_of_voices, elements,
+ first_text_character, first_translation_character, position,
+ abovelinestext, translation_type, no_linebreak_area, euouae, loc,
+ started_first_word, clear_syllable_text);
+ if (!score->first_syllable) {
+ /* we rebuild the first syllable if we have to */
+ score->first_syllable = current_syllable;
+ }
+ if (translation_type == TR_WITH_CENTER_END) {
+ gregorio_set_translation_center_beginning(current_syllable);
+ }
+ /* we update the position */
+ if (position == WORD_BEGINNING) {
+ position = WORD_MIDDLE;
+ }
+ if (position == WORD_ONE_SYLLABLE || position == WORD_END) {
+ position = WORD_BEGINNING;
+
+ if (started_first_word) {
+ started_first_word = false;
+ }
+ }
+ center_is_determined = CENTER_NOT_DETERMINED;
+ current_character = NULL;
+ suspended_character = NULL;
+ first_text_character = NULL;
+ first_translation_character = NULL;
+ translation_type = TR_NORMAL;
+ no_linebreak_area = NLBA_NORMAL;
+ euouae = EUOUAE_NORMAL;
+ abovelinestext = NULL;
+ for (i = 0; i < number_of_voices; i++) {
+ elements[i] = NULL;
+ }
+ current_element = NULL;
+ clear_syllable_text = false;
+ has_protrusion = false;
+}
+
+void gabc_digest(const void *const buf, const size_t size)
+{
+ sha1_process_bytes(buf, size, &digester);
+}
+
+/*
+ * The "main" function. It is the function that is called when we have to read
+ * a gabc file. It takes a file descriptor, that is to say a file that is
+ * aleady open. It returns a valid gregorio_score
+ */
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click)
+{
+ /* compute the SHA-1 digest while parsing, for I/O efficiency */
+ sha1_init_ctx(&digester);
+ /* digest GREGORIO_VERSION to get a different value when the version
+ changes */
+ sha1_process_bytes(GREGORIO_VERSION, strlen(GREGORIO_VERSION), &digester);
+ /* the input file that flex will parse */
+ gabc_score_determination_in = f_in;
+ gregorio_assert(f_in, gabc_read_score, "can't read stream from NULL",
+ return NULL);
+ initialize_variables(point_and_click);
+ /* the flex/bison main call, it will build the score (that we have
+ * initialized) */
+ gabc_score_determination_parse();
+ if (!score->legacy_oriscus_orientation) {
+ gabc_determine_oriscus_orientation(score);
+ }
+ gabc_determine_punctum_inclinatum_orientation(score);
+ gabc_determine_ledger_lines(score);
+ gregorio_fix_initial_keys(score, gregorio_default_clef);
+ rebuild_score_characters();
+ gabc_suppress_extra_custos_at_linebreak(score);
+ gabc_fix_custos_pitches(score);
+ gabc_det_notes_finish();
+ free_variables();
+ /* then we check the validity and integrity of the score we have built. */
+ if (!gabc_check_score_integrity(score)) {
+ gregorio_message(_("unable to determine a valid score from file"),
+ "gabc_read_score", VERBOSITY_ERROR, 0);
+ }
+ sha1_finish_ctx(&digester, score->digest);
+ return score;
+}
+
+unsigned char nabc_state = 0;
+size_t nabc_lines = 0;
+
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+ if (nabc_state == 0) {
+ if (!elements[voice]) {
+ elements[voice] = gabc_det_elements_from_string(notes, &current_key,
+ macros, &loc, &punctum_inclinatum_orientation, score);
+ current_element = elements[voice];
+ } else {
+ gregorio_element *new_elements = gabc_det_elements_from_string(
+ notes, &current_key, macros, &loc,
+ &punctum_inclinatum_orientation, score);
+ gregorio_element *last_element = elements[voice];
+ while (last_element->next) {
+ last_element = last_element->next;
+ }
+ last_element->next = new_elements;
+ new_elements->previous = last_element;
+ current_element = new_elements;
+ }
+ } else {
+ if (!elements[voice]) {
+ gregorio_add_element(&elements[voice], NULL);
+ current_element = elements[voice];
+ }
+ gregorio_assert(current_element, gabc_y_add_notes,
+ "current_element is null, this shouldn't happen!",
+ return);
+ if (!current_element->nabc) {
+ current_element->nabc = (char **) gregorio_calloc (nabc_lines,
+ sizeof (char *));
+ }
+ current_element->nabc[nabc_state-1] = gregorio_strdup(notes);
+ current_element->nabc_lines = nabc_state;
+ }
+}
+
+static char *concatenate(char *first, char *const second) {
+ first = (char *)gregorio_realloc(first, strlen(first) + strlen(second) + 1);
+ strcat(first, second);
+ free(second);
+ return first;
+}
+%}
+
+%initial-action {
+ @$.first_line = 1;
+ @$.first_column = 0;
+ @$.first_offset = 0;
+ @$.last_line = 1;
+ @$.last_column = 0;
+ @$.last_offset = 0;
+ @$.generate_point_and_click = generate_point_and_click;
+}
+
+%lex-param { gabc_style_bits *STYLE_BITS }
+
+%token NAME AUTHOR GABC_COPYRIGHT SCORE_COPYRIGHT
+%token LANGUAGE STAFF_LINES ORISCUS_ORIENTATION
+%token DEF_MACRO OTHER_HEADER
+%token ANNOTATION MODE MODE_MODIFIER MODE_DIFFERENTIA
+%token END_OF_DEFINITIONS END_OF_FILE
+%token COLON SEMICOLON CHARACTERS NOTES HYPHEN ATTRIBUTE
+%token OPENING_BRACKET CLOSING_BRACKET CLOSING_BRACKET_WITH_SPACE
+%token I_BEGIN I_END
+%token TT_BEGIN TT_END
+%token UL_BEGIN UL_END
+%token C_BEGIN C_END
+%token B_BEGIN B_END
+%token SC_BEGIN SC_END
+%token SP_BEGIN SP_END
+%token VERB_BEGIN VERB_END
+%token CENTER_BEGIN CENTER_END
+%token ELISION_BEGIN ELISION_END
+%token TRANSLATION_BEGIN TRANSLATION_END TRANSLATION_CENTER_END
+%token ALT_BEGIN ALT_END
+%token NLBA_B NLBA_E
+%token EUOUAE_B EUOUAE_E
+%token NABC_CUT NABC_LINES
+%token CLEAR
+%token PROTRUSION PROTRUSION_VALUE PROTRUSION_END PROTRUDING_PUNCTUATION
+
+%precedence HYPHEN PROTRUDING_PUNCTUATION
+%precedence TRANSLATION_BEGIN TRANSLATION_CENTER_END
+%precedence TRANSLATION_END
+%precedence OPENING_BRACKET
+
+%%
+
+score:
+ all_definitions syllables
+ ;
+
+all_definitions:
+ definitions END_OF_DEFINITIONS {
+ end_definitions();
+ }
+ ;
+
+definitions:
+ | definitions definition
+ ;
+
+attribute_value:
+ ATTRIBUTE {
+ $$.text = $1.text;
+ }
+ | attribute_value ATTRIBUTE {
+ $$.text = concatenate($1.text, $2.text);
+ }
+ ;
+
+attribute:
+ COLON attribute_value SEMICOLON {
+ $$.text = $2.text;
+ }
+ | COLON SEMICOLON {
+ $$.text = NULL;
+ }
+ ;
+
+definition:
+ DEF_MACRO attribute {
+ /* these definitions are not passed through */
+ free(macros[$1.character - '0']);
+ macros[$1.character - '0'] = $2.text;
+ }
+ | NAME attribute {
+ if ($2.text == NULL) {
+ gregorio_message("name can't be empty","det_score",
+ VERBOSITY_WARNING, 0);
+ }
+ check_multiple("name", score->name != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->name = $2.text;
+ }
+ | LANGUAGE attribute {
+ check_multiple("language", got_language);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_centering_language($2.text);
+ got_language = true;
+ }
+ | GABC_COPYRIGHT attribute {
+ check_multiple("gabc-copyright", score->gabc_copyright != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->gabc_copyright = $2.text;
+ }
+ | SCORE_COPYRIGHT attribute {
+ check_multiple("score_copyright", score->score_copyright != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->score_copyright = $2.text;
+ }
+ | MODE attribute {
+ check_multiple("mode", score->mode != 0);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode = $2.text;
+ }
+ | MODE_MODIFIER attribute {
+ check_multiple("mode-modifier", score->mode_modifier != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode_modifier = $2.text;
+ }
+ | MODE_DIFFERENTIA attribute {
+ check_multiple("mode-differentia", score->mode_differentia != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->mode_differentia = $2.text;
+ }
+ | STAFF_LINES attribute {
+ check_multiple("staff-lines", got_staff_lines);
+ if ($2.text) {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_score_staff_lines(score, atoi($2.text));
+ got_staff_lines = true;
+ }
+ }
+ | NABC_LINES attribute {
+ check_multiple("nabc lines", score->nabc_lines != 0);
+ if ($2.text) {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ nabc_lines=atoi($2.text);
+ score->nabc_lines=nabc_lines;
+ }
+ }
+ | ANNOTATION attribute {
+ if (score->annotation [MAX_ANNOTATIONS - 1]) {
+ gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
+ _("too many definitions of annotation found, only the "
+ "first %d will be taken"), MAX_ANNOTATIONS);
+ }
+ gregorio_add_score_header(score, $1.text, $2.text);
+ gregorio_set_score_annotation(score, $2.text);
+ }
+ | AUTHOR attribute {
+ check_multiple("author", score->author != NULL);
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->author = $2.text;
+ }
+ | ORISCUS_ORIENTATION attribute {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ score->legacy_oriscus_orientation = (strcmp($2.text, "legacy") == 0);
+ }
+ | OTHER_HEADER attribute {
+ gregorio_add_score_header(score, $1.text, $2.text);
+ }
+ ;
+
+notes:
+ | notes note
+ ;
+
+note:
+ NOTES CLOSING_BRACKET {
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state=0;
+ }
+ | NOTES closing_bracket_with_space {
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state=0;
+ update_position_with_space();
+ }
+ | NOTES NABC_CUT {
+ if (!nabc_lines) {
+ gregorio_message(_("You used character \"|\" in gabc without "
+ "setting \"nabc-lines\" parameter. Please "
+ "set it in your gabc header."),
+ "det_score", VERBOSITY_FATAL, 0);
+ }
+ gabc_y_add_notes($1.text, @1);
+ free($1.text);
+ nabc_state = (nabc_state + 1) % (nabc_lines+1);
+ }
+ | CLOSING_BRACKET {
+ elements[voice]=NULL;
+ nabc_state=0;
+ }
+ | closing_bracket_with_space {
+ elements[voice]=NULL;
+ nabc_state=0;
+ update_position_with_space();
+ }
+ ;
+
+closing_bracket_with_space:
+ CLOSING_BRACKET_WITH_SPACE
+ | CLOSING_BRACKET_WITH_SPACE END_OF_FILE
+ | CLOSING_BRACKET END_OF_FILE
+ ;
+
+style_beginning:
+ I_BEGIN {
+ add_style(ST_ITALIC);
+ }
+ | TT_BEGIN {
+ add_style(ST_TT);
+ }
+ | UL_BEGIN {
+ add_style(ST_UNDERLINED);
+ }
+ | C_BEGIN {
+ add_style(ST_COLORED);
+ }
+ | B_BEGIN {
+ add_style(ST_BOLD);
+ }
+ | SC_BEGIN {
+ add_style(ST_SMALL_CAPS);
+ }
+ | VERB_BEGIN {
+ add_style(ST_VERBATIM);
+ }
+ | SP_BEGIN {
+ add_style(ST_SPECIAL_CHAR);
+ }
+ ;
+
+style_end:
+ I_END {
+ end_style(ST_ITALIC);
+ }
+ | TT_END {
+ end_style(ST_TT);
+ }
+ | UL_END {
+ end_style(ST_UNDERLINED);
+ }
+ | C_END {
+ end_style(ST_COLORED);
+ }
+ | B_END {
+ end_style(ST_BOLD);
+ }
+ | SC_END {
+ end_style(ST_SMALL_CAPS);
+ }
+ | VERB_END {
+ end_style(ST_VERBATIM);
+ }
+ | SP_END {
+ end_style(ST_SPECIAL_CHAR);
+ }
+ ;
+
+special_style_beginning:
+ ELISION_BEGIN {
+ add_style(ST_ELISION);
+ }
+ | CENTER_BEGIN {
+ if (center_is_determined) {
+ gregorio_message(
+ "syllable already has center; ignoring additional center",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else if (has_protrusion) {
+ gregorio_message(
+ "center not allowed after protrusion; ignored",
+ "det_score", VERBOSITY_WARNING, 0);
+ } else {
+ add_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_HALF_DETERMINED;
+ }
+ }
+ ;
+
+special_style_end:
+ ELISION_END {
+ end_style(ST_ELISION);
+ }
+ | CENTER_END {
+ if (center_is_determined == CENTER_HALF_DETERMINED) {
+ end_style(ST_FORCED_CENTER);
+ center_is_determined = CENTER_FULLY_DETERMINED;
+ } else {
+ gregorio_message(
+ "not within a syllable center",
+ "det_score", VERBOSITY_WARNING, 0);
+ }
+ }
+ ;
+
+euouae:
+ EUOUAE_B {
+ euouae = EUOUAE_BEGINNING;
+ }
+ | EUOUAE_E {
+ euouae = EUOUAE_END;
+ }
+ ;
+
+linebreak_area:
+ NLBA_B {
+ no_linebreak_area = NLBA_BEGINNING;
+ }
+ | NLBA_E {
+ no_linebreak_area = NLBA_END;
+ }
+ ;
+
+protrusion:
+ PROTRUSION PROTRUSION_VALUE PROTRUSION_END {
+ add_protrusion($2.text);
+ }
+ | PROTRUSION {
+ add_protrusion(gregorio_strdup("d")); /* d = default */
+ }
+ ;
+
+character:
+ above_line_text
+ | CHARACTERS {
+ add_text($1.text);
+ }
+ | style_beginning
+ | style_end
+ | special_style_beginning
+ | special_style_end
+ | linebreak_area
+ | euouae
+ | CLEAR {
+ clear_syllable_text = true;
+ }
+ | protrusion
+ | HYPHEN {
+ add_text(gregorio_strdup("-"));
+ }
+ | PROTRUDING_PUNCTUATION {
+ add_text($1.text);
+ }
+ ;
+
+text:
+ character
+ | text character
+ ;
+
+translation_character:
+ CHARACTERS {
+ add_text($1.text);
+ }
+ | style_beginning
+ | style_end
+ | HYPHEN {
+ add_text(gregorio_strdup("-"));
+ }
+ | PROTRUDING_PUNCTUATION {
+ add_text($1.text);
+ }
+ ;
+
+translation_text:
+ translation_character
+ | translation_text translation_character
+ ;
+
+translation_beginning:
+ TRANSLATION_BEGIN {
+ start_translation(TR_NORMAL);
+ }
+ ;
+
+translation:
+ translation_beginning TRANSLATION_END {
+ end_translation();
+ }
+ | translation_beginning translation_text TRANSLATION_END {
+ end_translation();
+ }
+ | TRANSLATION_CENTER_END {
+ start_translation(TR_WITH_CENTER_END);
+ end_translation();
+ }
+ ;
+
+above_line_text:
+ ALT_BEGIN CHARACTERS ALT_END {
+ abovelinestext = $2.text;
+ }
+ ;
+
+syllable_with_notes:
+ text OPENING_BRACKET notes {
+ save_text();
+ close_syllable(&@1);
+ }
+ | HYPHEN OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text HYPHEN OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | PROTRUDING_PUNCTUATION OPENING_BRACKET notes {
+ add_auto_protrusion($1.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text PROTRUDING_PUNCTUATION OPENING_BRACKET notes {
+ add_auto_protrusion($2.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text translation OPENING_BRACKET notes {
+ save_text();
+ close_syllable(&@1);
+ }
+ | HYPHEN translation OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text HYPHEN translation OPENING_BRACKET notes {
+ add_style(ST_VERBATIM);
+ add_text(gregorio_strdup("\\GreForceHyphen"));
+ end_style(ST_VERBATIM);
+ save_text();
+ close_syllable(&@1);
+ }
+ | PROTRUDING_PUNCTUATION translation OPENING_BRACKET notes {
+ add_auto_protrusion($1.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ | text PROTRUDING_PUNCTUATION translation OPENING_BRACKET notes {
+ add_auto_protrusion($2.text);
+ save_text();
+ close_syllable(&@1);
+ }
+ ;
+
+notes_without_word:
+ OPENING_BRACKET notes {
+ close_syllable(NULL);
+ }
+ | translation OPENING_BRACKET notes {
+ close_syllable(NULL);
+ }
+ ;
+
+syllable:
+ syllable_with_notes
+ | notes_without_word
+ ;
+
+syllables:
+ | syllables syllable
+ ;
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c
new file mode 100644
index 00000000000..a6be28bad4a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-write.c
@@ -0,0 +1,1171 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file provides functions for writing gabc from Gregorio structures.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This is a simple and easyly understandable output module. If you want to
+ * write a module, you can consider it as a model.
+ */
+
+#include "config.h"
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h> /* for strchr */
+#include "bool.h"
+#include "characters.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "plugins.h"
+
+#include "gabc.h"
+
+typedef enum {
+ GABC_NORMAL,
+ GABC_AT_PROTRUSION_FACTOR,
+ GABC_IN_PROTRUSION_FACTOR
+} gabc_write_state;
+
+static gabc_write_state write_state;
+
+static __inline char pitch_letter(const char height) {
+ char result = height + 'a' - LOWEST_PITCH;
+ if (result == 'o') {
+ return 'p';
+ }
+ return result;
+}
+
+/* not reachable unless there's a programming error */
+/* LCOV_EXCL_START */
+static __inline void unsupported(const char *fn, const int line,
+ const char *type, const char *value)
+{
+ gregorio_messagef(fn, VERBOSITY_ASSERTION, line, _("unsupported %s %s"),
+ type, value);
+}
+/* LCOV_EXCL_STOP */
+
+/*
+ * Output one attribute, allowing for multi-line values
+ */
+static void gabc_write_str_attribute(FILE *f, const char *name,
+ const char *attr)
+{
+ if (attr) {
+ fprintf(f, "%s: %s%s;\n", name, attr, strchr(attr, '\n') ? ";" : "");
+ }
+}
+
+/*
+ *
+ * Then we start the functions made to write the text of the syllable. See
+ * comments on struct.h and struct-utils.c to understand more deeply.
+ *
+ * This first function will be called each time we will encounter a
+ * gregorio_character which is the beginning of a style.
+ *
+ */
+
+static void gabc_write_begin(FILE *f, grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "<i>");
+ break;
+ case ST_COLORED:
+ fprintf(f, "<c>");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "<sc>");
+ break;
+ case ST_BOLD:
+ fprintf(f, "<b>");
+ break;
+ case ST_FORCED_CENTER:
+ fprintf(f, "{");
+ break;
+ case ST_TT:
+ fprintf(f, "<tt>");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "<ul>");
+ break;
+ case ST_ELISION:
+ fprintf(f, "<e>");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ write_state = GABC_AT_PROTRUSION_FACTOR;
+ break;
+ case ST_INITIAL:
+ case ST_CENTER:
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ case ST_PROTRUSION:
+ /* nothing should be emitted for these */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_begin", __LINE__, "style",
+ grestyle_style_to_string(style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * This function is about the same but for ends of styles.
+ *
+ */
+
+static void gabc_write_end(FILE *f, grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "</i>");
+ break;
+ case ST_COLORED:
+ fprintf(f, "</c>");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "</sc>");
+ break;
+ case ST_BOLD:
+ fprintf(f, "</b>");
+ break;
+ case ST_FORCED_CENTER:
+ fprintf(f, "}");
+ break;
+ case ST_TT:
+ fprintf(f, "</tt>");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "</ul>");
+ break;
+ case ST_ELISION:
+ fprintf(f, "</e>");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ if (write_state == GABC_IN_PROTRUSION_FACTOR) {
+ fprintf(f, ">");
+ }
+ break;
+ case ST_INITIAL:
+ case ST_CENTER:
+ case ST_FIRST_WORD:
+ case ST_FIRST_SYLLABLE:
+ case ST_FIRST_SYLLABLE_INITIAL:
+ case ST_PROTRUSION:
+ /* nothing should be emitted for these */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_end", __LINE__, "style",
+ grestyle_style_to_string(style));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * This function writes the special chars. As the specials chars are
+ * represented simply in gabc, this function is very simple, but for TeX output
+ * modules, this may be.. a little more difficult.
+ *
+ */
+static void gabc_write_special_char(FILE *f, const grewchar *first_char)
+{
+ fprintf(f, "<sp>");
+ gregorio_print_unistring(f, first_char);
+ fprintf(f, "</sp>");
+}
+
+/*
+ *
+ * This functions writes verbatim output... but as the previous one it is very
+ * simple.
+ *
+ */
+static void gabc_write_verb(FILE *f, const grewchar *first_char)
+{
+ if (write_state == GABC_AT_PROTRUSION_FACTOR) {
+ /* this is an auto protrusion, so ignore it */
+ write_state = GABC_NORMAL;
+ } else {
+ fprintf(f, "<v>");
+ gregorio_print_unistring(f, first_char);
+ fprintf(f, "</v>");
+ }
+}
+
+/*
+ *
+ * The function called when we will encounter a character. There may be other
+ * representations of the character (for example for Omega), so it is necessary
+ * to have such a function defined in each module.
+ *
+ */
+
+static void gabc_print_char(FILE *f, const grewchar to_print)
+{
+ if (write_state == GABC_AT_PROTRUSION_FACTOR) {
+ write_state = GABC_IN_PROTRUSION_FACTOR;
+ if (to_print == 'd') {
+ fprintf(f, "<pr");
+ } else {
+ fprintf(f, "<pr:");
+ gregorio_print_unichar(f, to_print);
+ }
+ } else {
+ gregorio_print_unichar(f, to_print);
+ }
+}
+
+/*
+ *
+ * Quite important: the function that writes the liquescentia. It is called at
+ * the end of the function that writes one glyph.
+ *
+ */
+
+static void gabc_write_end_liquescentia(FILE *f, char liquescentia)
+{
+ switch (liquescentia & TAIL_LIQUESCENTIA_MASK) {
+ case L_DEMINUTUS:
+ fprintf(f, "~");
+ break;
+ case L_AUCTUS_ASCENDENS:
+ fprintf(f, "<");
+ break;
+ case L_AUCTUS_DESCENDENS:
+ fprintf(f, ">");
+ break;
+ }
+}
+
+/*
+ *
+ * The function that writes a key change... quite simple.
+ *
+ */
+
+static void gabc_write_clef(FILE *f, gregorio_clef_info clef)
+{
+ fprintf(f, "%c%s%d", clef.clef == CLEF_C? 'c' : 'f', clef.flatted? "b" : "",
+ clef.line);
+ if (clef.secondary_line) {
+ fprintf(f, "@%c%s%d", clef.secondary_clef == CLEF_C? 'c' : 'f',
+ clef.secondary_flatted? "b" : "", clef.secondary_line);
+ }
+}
+
+/*
+ *
+ * The function that writes spaces, called when we encounter one.
+ *
+ */
+
+static void gabc_write_space(FILE *f, gregorio_space type, char *factor,
+ bool next_is_space)
+{
+ switch (type) {
+ case SP_NEUMATIC_CUT:
+ if (next_is_space) {
+ /* if the following is not a space, we omit this because the
+ * code always puts a "/" between elements unless there is some
+ * other space there */
+ fprintf (f, "/");
+ }
+ break;
+ case SP_LARGER_SPACE:
+ fprintf(f, "//");
+ break;
+ case SP_GLYPH_SPACE:
+ fprintf(f, " ");
+ break;
+ case SP_AD_HOC_SPACE:
+ fprintf(f, "/[%s]", factor);
+ break;
+ case SP_NEUMATIC_CUT_NB:
+ fprintf(f, "!/");
+ break;
+ case SP_LARGER_SPACE_NB:
+ fprintf(f, "!//");
+ break;
+ case SP_GLYPH_SPACE_NB:
+ fprintf(f, "! ");
+ break;
+ case SP_AD_HOC_SPACE_NB:
+ fprintf(f, "!/[%s]", factor);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_space", __LINE__, "space type",
+ gregorio_space_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * A function to write a bar.
+ *
+ */
+
+static void gabc_write_bar(FILE *f, gregorio_bar type)
+{
+ switch (type) {
+ case B_VIRGULA:
+ fprintf(f, "`");
+ break;
+ case B_DIVISIO_MINIMA:
+ fprintf(f, ",");
+ break;
+ case B_DIVISIO_MINOR:
+ fprintf(f, ";");
+ break;
+ case B_DIVISIO_MAIOR:
+ fprintf(f, ":");
+ break;
+ case B_DIVISIO_FINALIS:
+ fprintf(f, "::");
+ break;
+ case B_DIVISIO_MINOR_D1:
+ fprintf(f, ";1");
+ break;
+ case B_DIVISIO_MINOR_D2:
+ fprintf(f, ";2");
+ break;
+ case B_DIVISIO_MINOR_D3:
+ fprintf(f, ";3");
+ break;
+ case B_DIVISIO_MINOR_D4:
+ fprintf(f, ";4");
+ break;
+ case B_DIVISIO_MINOR_D5:
+ fprintf(f, ";5");
+ break;
+ case B_DIVISIO_MINOR_D6:
+ fprintf(f, ";6");
+ break;
+ case B_DIVISIO_MINOR_D7:
+ fprintf(f, ";7");
+ break;
+ case B_DIVISIO_MINOR_D8:
+ fprintf(f, ";8");
+ break;
+ case B_VIRGULA_HIGH:
+ fprintf(f, "`0");
+ break;
+ case B_DIVISIO_MINIMA_HIGH:
+ fprintf(f, ",0");
+ break;
+ case B_DIVISIO_MAIOR_DOTTED:
+ fprintf(f, ":?");
+ break;
+ case B_DIVISIO_MINIMIS:
+ fprintf(f, "^");
+ break;
+ case B_DIVISIO_MINIMIS_HIGH:
+ fprintf(f, "^0");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_bar", __LINE__, "bar type",
+ gregorio_bar_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/* writing the signs of a bar */
+
+static void gabc_write_bar_signs(FILE *f, gregorio_sign type)
+{
+ switch (type) {
+ case _V_EPISEMA:
+ fprintf(f, "'");
+ break;
+ case _V_EPISEMA_BAR_H_EPISEMA:
+ fprintf(f, "'_");
+ break;
+ case _BAR_H_EPISEMA:
+ fprintf(f, "_");
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_bar_signs", __LINE__, "bar signs",
+ gregorio_sign_to_string(type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static void gabc_hepisema(FILE *f, const char *prefix, bool connect,
+ grehepisema_size size)
+{
+ fprintf(f, "_%s", prefix);
+ if (!connect) {
+ fprintf(f, "2");
+ }
+ switch (size) {
+ case H_SMALL_LEFT:
+ fprintf(f, "3");
+ break;
+ case H_SMALL_CENTRE:
+ fprintf(f, "4");
+ break;
+ case H_SMALL_RIGHT:
+ fprintf(f, "5");
+ break;
+ case H_NORMAL:
+ /* nothing to print */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_hepisema", __LINE__, "hepisema size",
+ grehepisema_size_to_string(size));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static const char *vepisema_position(gregorio_note *note)
+{
+ if (!note->v_episema_height) {
+ return "";
+ }
+ if (note->v_episema_height < note->u.note.pitch) {
+ return "0";
+ }
+ return "1";
+}
+
+static const char *mora_vposition(gregorio_note *note)
+{
+ switch (note->mora_vposition) {
+ case VPOS_AUTO:
+ return "";
+ case VPOS_ABOVE:
+ return "1";
+ case VPOS_BELOW:
+ return "0";
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("mora_vposition", __LINE__, "vposition",
+ gregorio_vposition_to_string(note->mora_vposition));
+ return "";
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static void write_note_heuristics(FILE *f, gregorio_note *note) {
+ switch (note->high_ledger_specificity) {
+ case LEDGER_EXPLICIT:
+ fprintf(f, "[hl:%c]", note->high_ledger_line? '1' : '0');
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, "[oll:%c]", note->high_ledger_line? '1' : '0');
+ break;
+ default:
+ break;
+ }
+ switch (note->low_ledger_specificity) {
+ case LEDGER_EXPLICIT:
+ fprintf(f, "[ll:%c]", note->low_ledger_line? '1' : '0');
+ break;
+ case LEDGER_EXPLICITLY_DRAWN:
+ fprintf(f, "[ull:%c]", note->low_ledger_line? '1' : '0');
+ break;
+ default:
+ break;
+ }
+}
+
+typedef struct glyph_context {
+ gregorio_syllable *syllable;
+ gregorio_element *element;
+ unsigned short he_adjustment_index[2];
+} glyph_context;
+
+/*
+ *
+ * The function that writes one gregorio_note.
+ *
+ */
+
+static void gabc_write_gregorio_note(FILE *f, gregorio_note *note,
+ const bool is_quadratum)
+{
+ char shape;
+ gregorio_assert(note, gabc_write_gregorio_note, "call with NULL argument",
+ return);
+ gregorio_assert(note->type == GRE_NOTE, gabc_write_gregorio_note,
+ "call with argument which type is not GRE_NOTE", return);
+ shape = note->u.note.shape;
+ switch (shape) {
+ /* first we write the letters that determine the shapes */
+ case S_PUNCTUM:
+ if (is_quadratum) {
+ fprintf(f, "%cq", pitch_letter(note->u.note.pitch));
+ } else {
+ fprintf(f, "%c", pitch_letter(note->u.note.pitch));
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ fprintf(f, "%c1", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ fprintf(f, "%c0", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ fprintf(f, "%c2", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ if (note->next) {
+ fprintf(f, "%c~", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ } else {
+ fprintf(f, "%c", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ fprintf(f, "%c", toupper((unsigned char)pitch_letter(note->u.note.pitch)));
+ break;
+ case S_FLAT:
+ fprintf(f, "%cx", pitch_letter(note->u.note.pitch));
+ break;
+ case S_NATURAL:
+ fprintf(f, "%cy", pitch_letter(note->u.note.pitch));
+ break;
+ case S_SHARP:
+ fprintf(f, "%c#", pitch_letter(note->u.note.pitch));
+ break;
+ case S_VIRGA:
+ fprintf(f, "%cv", pitch_letter(note->u.note.pitch));
+ break;
+ case S_VIRGA_REVERSA:
+ fprintf(f, "%cV", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_ASCENDENS:
+ fprintf(f, "%co1", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_DESCENDENS:
+ fprintf(f, "%co0", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_DEMINUTUS:
+ fprintf(f, "%co", pitch_letter(note->u.note.pitch));
+ /* Note: the DEMINUTUS is also in the liquescentia */
+ break;
+ case S_QUILISMA:
+ if (is_quadratum) {
+ fprintf(f, "%cW", pitch_letter(note->u.note.pitch));
+ } else {
+ fprintf(f, "%cw", pitch_letter(note->u.note.pitch));
+ }
+ break;
+ case S_LINEA:
+ fprintf(f, "%c=", pitch_letter(note->u.note.pitch));
+ break;
+ case S_LINEA_PUNCTUM:
+ fprintf(f, "%cR", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ fprintf(f, "%cO1", pitch_letter(note->u.note.pitch));
+ break;
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fprintf(f, "%cO0", pitch_letter(note->u.note.pitch));
+ break;
+ case S_STROPHA:
+ case S_STROPHA_AUCTA:
+ fprintf(f, "%cs", pitch_letter(note->u.note.pitch));
+ break;
+ default:
+ /* includes S_BIVIRGA, S_TRIVIRGA, S_DISTROPHA, and S_TRISTROPHA */
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "shape",
+ gregorio_shape_to_string(shape));
+ fprintf(f, "%c", pitch_letter(note->u.note.pitch));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->u.note.is_cavum) {
+ fprintf(f, "r");
+ }
+ switch (note->signs) {
+ case _PUNCTUM_MORA:
+ fprintf(f, ".%s", mora_vposition(note));
+ break;
+ case _AUCTUM_DUPLEX:
+ fprintf(f, "..");
+ break;
+ case _V_EPISEMA:
+ fprintf(f, "'%s", vepisema_position(note));
+ break;
+ case _V_EPISEMA_PUNCTUM_MORA:
+ fprintf(f, "'%s.%s", vepisema_position(note), mora_vposition(note));
+ break;
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ fprintf(f, "'%s..", vepisema_position(note));
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "shape signs",
+ gregorio_sign_to_string(note->signs));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ switch (note->special_sign) {
+ case _ACCENTUS:
+ fprintf(f, "r1");
+ break;
+ case _ACCENTUS_REVERSUS:
+ fprintf(f, "r2");
+ break;
+ case _CIRCULUS:
+ fprintf(f, "r3");
+ break;
+ case _SEMI_CIRCULUS:
+ fprintf(f, "r4");
+ break;
+ case _SEMI_CIRCULUS_REVERSUS:
+ fprintf(f, "r5");
+ break;
+ case _MUSICA_FICTA_FLAT:
+ fprintf(f, "r6");
+ break;
+ case _MUSICA_FICTA_NATURAL:
+ fprintf(f, "r7");
+ break;
+ case _MUSICA_FICTA_SHARP:
+ fprintf(f, "r8");
+ break;
+ case _NO_SIGN:
+ /* if there's no sign, don't emit anything */
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_note", __LINE__, "special sign",
+ gregorio_sign_to_string(note->special_sign));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ gabc_hepisema(f, "", note->h_episema_above_connect,
+ note->h_episema_above_size);
+ } else {
+ if (note->h_episema_below == HEPISEMA_FORCED) {
+ gabc_hepisema(f, "0", note->h_episema_below_connect,
+ note->h_episema_below_size);
+ }
+ if (note->h_episema_above == HEPISEMA_FORCED) {
+ gabc_hepisema(f, "1", note->h_episema_above_connect,
+ note->h_episema_above_size);
+ }
+ }
+ write_note_heuristics(f, note);
+ if (note->texverb) {
+ fprintf(f, "[nv:%s]", gregorio_texverb(note->texverb));
+ }
+}
+
+static void get_next_hepisema_adjustments(unsigned short *adjustment_index,
+ const gregorio_syllable *syllable, const gregorio_element *element,
+ const gregorio_glyph *glyph, const gregorio_note *note)
+{
+ while (note) {
+ note = note->next;
+ if (!note) {
+ while (glyph) {
+ glyph = glyph->next;
+ if (!glyph) {
+ while (element) {
+ element = element->next;
+ if (!element) {
+ syllable = syllable->next_syllable;
+ if (syllable) {
+ element = syllable->elements[0];
+ }
+ }
+ if (element && element->type == GRE_ELEMENT) {
+ glyph = element->u.first_glyph;
+ break;
+ }
+ }
+ }
+ if (glyph && glyph->type == GRE_GLYPH) {
+ note = glyph->u.notes.first_note;
+ break;
+ }
+ }
+ }
+ if (note && note->type == GRE_NOTE) {
+ break;
+ }
+ }
+
+ if (note) {
+ adjustment_index[SO_OVER] = note->he_adjustment_index[SO_OVER];
+ adjustment_index[SO_UNDER] = note->he_adjustment_index[SO_UNDER];
+ } else {
+ adjustment_index[SO_OVER] = 0;
+ adjustment_index[SO_UNDER] = 0;
+ }
+}
+
+static __inline void emit_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note, const gregorio_sign_orientation index,
+ const char which, const bool open_brace)
+{
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ note->he_adjustment_index[index]);
+
+ fprintf(f, "[%ch", which);
+ if (adj->vbasepos || adj->nudge) {
+ fputc(':', f);
+ switch (adj->vbasepos) {
+ case HVB_AUTO:
+ break;
+ case HVB_MIDDLE:
+ fputc('m', f);
+ break;
+ case HVB_O_LOW:
+ if (index == SO_OVER) {
+ fputc('l', f);
+ } else {
+ fprintf(f, "ol");
+ }
+ break;
+ case HVB_O_HIGH:
+ if (index == SO_OVER) {
+ fputc('h', f);
+ } else {
+ fprintf(f, "oh");
+ }
+ break;
+ case HVB_U_LOW:
+ if (index == SO_UNDER) {
+ fputc('l', f);
+ } else {
+ fprintf(f, "ul");
+ }
+ break;
+ case HVB_U_HIGH:
+ if (index == SO_UNDER) {
+ fputc('h', f);
+ } else {
+ fprintf(f, "uh");
+ }
+ break;
+ }
+ if (adj->nudge) {
+ fprintf(f, "%s", adj->nudge);
+ }
+ }
+ if (open_brace) {
+ fputc('{', f);
+ }
+ fputc(']', f);
+}
+
+static __inline void open_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note,
+ const unsigned short *const prev_adjustment_index,
+ const unsigned short *const next_adjustment_index,
+ const gregorio_sign_orientation index, const char which)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[index];
+
+ if (adjustment_index
+ && adjustment_index != prev_adjustment_index[index]
+ && adjustment_index == next_adjustment_index[index]) {
+ emit_hepisema_adjustment(f, note, index, which, true);
+ }
+}
+
+static __inline void close_hepisema_adjustment(FILE *const f,
+ const gregorio_note *const note,
+ const unsigned short *const prev_adjustment_index,
+ const unsigned short *const next_adjustment_index,
+ const gregorio_sign_orientation index, const char which)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[index];
+
+ if (adjustment_index) {
+ if (adjustment_index != next_adjustment_index[index]) {
+ if (adjustment_index == prev_adjustment_index[index]) {
+ fprintf(f, "[%ch}]", which);
+ } else {
+ emit_hepisema_adjustment(f, note, index, which, false);
+ }
+ }
+ }
+}
+
+/*
+ *
+ * The function that writes one glyph. If it is really a glyph (meaning not a
+ * space or an alteration), we just do like always, a loop on the notes and a
+ * call to the function that writes one note on each of them.
+ *
+ */
+
+static void gabc_write_gregorio_glyph(FILE *f, gregorio_glyph *glyph,
+ glyph_context *context)
+{
+ unsigned short next_adjustment_index[2] = { 0, 0 };
+ gregorio_note *current_note;
+
+ gregorio_assert(glyph, gabc_write_gregorio_glyph, "call with NULL argument",
+ return);
+ switch (glyph->type) {
+ case GRE_TEXVERB_GLYPH:
+ if (glyph->texverb) {
+ fprintf(f, "[gv:%s]", gregorio_texverb(glyph->texverb));
+ }
+ break;
+ case GRE_SPACE:
+ if (glyph->next) {
+ switch (glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ fprintf(f, "!");
+ break;
+ case SP_HALF_SPACE:
+ fprintf(f, "/0");
+ break;
+ case SP_INTERGLYPH_SPACE:
+ fprintf(f, "/!");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_glyph", __LINE__, "space type",
+ gregorio_space_to_string(
+ glyph->u.misc.unpitched.info.space));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gabc_write_gregorio_glyph, "bad space");
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ case GRE_GLYPH:
+ if (is_initio_debilis(glyph->u.notes.liquescentia)) {
+ fprintf(f, "-");
+ } else if (is_fused(glyph->u.notes.liquescentia)) {
+ fprintf(f, "@");
+ }
+
+ current_note = glyph->u.notes.first_note;
+ while (current_note) {
+ get_next_hepisema_adjustments(next_adjustment_index,
+ context->syllable, context->element, glyph, current_note);
+
+ open_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_OVER, 'o');
+ open_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_UNDER, 'u');
+
+ /* third argument necessary for the special shape pes quadratum */
+ gabc_write_gregorio_note(f, current_note,
+ glyph->u.notes.glyph_type == G_PES_QUADRATUM
+ && current_note == glyph->u.notes.first_note);
+
+ close_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_OVER, 'o');
+ close_hepisema_adjustment(f, current_note,
+ context->he_adjustment_index, next_adjustment_index,
+ SO_UNDER, 'u');
+
+ context->he_adjustment_index[SO_OVER] =
+ current_note->he_adjustment_index[SO_OVER];
+ context->he_adjustment_index[SO_UNDER] =
+ current_note->he_adjustment_index[SO_UNDER];
+
+ current_note = current_note->next;
+ }
+ gabc_write_end_liquescentia(f, glyph->u.notes.liquescentia);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_glyph", __LINE__, "glyph type",
+ gregorio_type_to_string(glyph->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * To write an element, first we check the type of the element (if it is a bar,
+ * etc.), and if it is really an element, we make a loop on the list of glyphs
+ * inside the neume, and for each of them we call the function that will write
+ * one glyph.
+ *
+ */
+
+static void gabc_write_gregorio_element(FILE *f, gregorio_element *element,
+ glyph_context *context)
+{
+ gregorio_glyph *current_glyph;
+ gregorio_assert(element, gabc_write_gregorio_element,
+ "call with NULL argument", return);
+ current_glyph = element->u.first_glyph;
+ switch (element->type) {
+ case GRE_ELEMENT:
+ while (current_glyph) {
+ gabc_write_gregorio_glyph(f, current_glyph, context);
+ current_glyph = current_glyph->next;
+ }
+ break;
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "[ev:%s]", gregorio_texverb(element->texverb));
+ }
+ break;
+ case GRE_ALT:
+ if (element->texverb) {
+ fprintf(f, "[alt:%s]", gregorio_texverb(element->texverb));
+ }
+ break;
+ case GRE_SPACE:
+ gabc_write_space(f, element->u.misc.unpitched.info.space,
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ element->next && element->next->type == GRE_SPACE);
+ break;
+ case GRE_BAR:
+ gabc_write_bar(f, element->u.misc.unpitched.info.bar);
+ gabc_write_bar_signs(f, element->u.misc.unpitched.special_sign);
+ break;
+ case GRE_CLEF:
+ gabc_write_clef(f, element->u.misc.clef);
+ break;
+ case GRE_END_OF_LINE:
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "Z");
+ } else {
+ fprintf(f, "z");
+ }
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ fprintf(f, element->u.misc.unpitched.info.eol_forces_custos_on? "+"
+ : "-");
+ }
+ break;
+ case GRE_CUSTOS:
+ if (element->u.misc.pitched.force_pitch) {
+ fprintf(f, "%c+", pitch_letter(element->u.misc.pitched.pitch));
+ } else {
+ fprintf(f, "z0");
+ }
+ break;
+ case GRE_SUPPRESS_CUSTOS:
+ fprintf(f, "[nocustos]");
+ break;
+ case GRE_NLBA:
+ switch (element->u.misc.unpitched.info.nlba) {
+ case NLBA_BEGINNING:
+ fprintf(f, "<nlba>");
+ break;
+ case NLBA_END:
+ fprintf(f, "</nlba>");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_element", __LINE__, "nlba type",
+ gregorio_nlba_to_string(element->u.misc.unpitched.info.nlba));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ unsupported("gabc_write_gregorio_element", __LINE__, "element type",
+ gregorio_type_to_string(element->type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ *
+ * Here is defined the function that will write the list of gregorio_elements.
+ * It is very simple: it makes a loop in which it calls a function that writes
+ * one element.
+ *
+ */
+
+static bool gabc_write_gregorio_elements(FILE *f, gregorio_element *element,
+ glyph_context *context)
+{
+ bool linebreak_or_bar_in_element = false;
+ while (element) {
+ context->element = element;
+ gabc_write_gregorio_element(f, element, context);
+ /* we don't want a bar after an end of line */
+ if (element->type != GRE_END_OF_LINE
+ && (element->type != GRE_SPACE
+ || element->u.misc.unpitched.info.space == SP_NEUMATIC_CUT)
+ && element->next && element->next->type == GRE_ELEMENT) {
+ fprintf(f, "/");
+ }
+ if (element->type == GRE_END_OF_LINE || element->type == GRE_BAR)
+ {
+ linebreak_or_bar_in_element = true;
+ }
+ element = element->next;
+ }
+ return linebreak_or_bar_in_element;
+}
+
+/*
+ *
+ * Here it goes, we are writing a gregorio_syllable.
+ *
+ */
+
+static void gabc_write_gregorio_syllable(FILE *f, gregorio_syllable *syllable,
+ glyph_context *context)
+{
+ bool linebreak_or_bar_in_element;
+ gregorio_assert(syllable, gabc_write_gregorio_syllable,
+ "call with NULL argument", return);
+ write_state = GABC_NORMAL;
+ if (syllable->no_linebreak_area == NLBA_BEGINNING) {
+ fprintf(f, "<nlba>");
+ }
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ fprintf(f, "<eu>");
+ }
+ if (syllable->clear) {
+ fprintf(f, "<clear>");
+ }
+ if (syllable->text) {
+ /* we call the magic function (defined in struct_utils.c), that will
+ * write our text. */
+ gregorio_write_text(WTP_NORMAL, syllable->text, f, &gabc_write_verb,
+ &gabc_print_char, &gabc_write_begin, &gabc_write_end,
+ &gabc_write_special_char);
+ }
+ if (syllable->translation) {
+ fprintf(f, "[");
+ gregorio_write_text(WTP_NORMAL, syllable->translation, f,
+ &gabc_write_verb, &gabc_print_char, &gabc_write_begin,
+ &gabc_write_end, &gabc_write_special_char);
+ fprintf(f, "]");
+ } else if (syllable->translation_type == TR_WITH_CENTER_END) {
+ fprintf(f, "[/]");
+ }
+ if (syllable->euouae == EUOUAE_END) {
+ fprintf(f, "</eu>");
+ }
+ if (syllable->no_linebreak_area == NLBA_END) {
+ fprintf(f, "</nlba>");
+ }
+ fprintf(f, "(");
+ /* we write all the elements of the syllable. */
+ linebreak_or_bar_in_element = gabc_write_gregorio_elements(f, syllable->elements[0], context);
+ if (linebreak_or_bar_in_element)
+ {
+ fprintf(f, ")\n");
+ } else {
+ if (syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE
+ || gregorio_is_only_special(syllable->elements[0]))
+ {
+ fprintf(f, ") ");
+ } else {
+ fprintf(f, ")");
+ }
+ }
+}
+
+/*
+ *
+ * This is the top function, the one called when we want to write a
+ * gregorio_score in gabc.
+ *
+ */
+
+void gabc_write_score(FILE *f, gregorio_score *score)
+{
+ glyph_context context;
+ gregorio_syllable *syllable;
+ gregorio_header *header;
+
+ gregorio_assert(f, gabc_write_score, "call with NULL file", return);
+
+ context.he_adjustment_index[0] = 0;
+ context.he_adjustment_index[1] = 0;
+
+ for (header = score->headers; header; header = header->next) {
+ gabc_write_str_attribute(f, header->name, header->value);
+ }
+ /* And since the gabc is generated by this program, note this. */
+ fprintf(f, "generated-by: %s %s;\n", "gregorio", GREGORIO_VERSION);
+ gregorio_assert(score->number_of_voices == 1, gabc_write_score,
+ "gregorio_score seems to be empty", return);
+ fprintf(f, "%%%%\n");
+ /* at present we only allow for one clef at the start of the gabc */
+ if (score->first_voice_info) {
+ fprintf(f, "(");
+ gabc_write_clef(f, score->first_voice_info->initial_clef);
+ fprintf(f, ")");
+ }
+ syllable = score->first_syllable;
+ /* the we write every syllable */
+ while (syllable) {
+ context.syllable = syllable;
+ gabc_write_gregorio_syllable(f, syllable, &context);
+ syllable = syllable->next_syllable;
+ }
+ fprintf(f, "\n");
+}
+
+/* And that's it... not really hard isn't it? */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h
new file mode 100644
index 00000000000..34c50e682e1
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc.h
@@ -0,0 +1,86 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes gabc-format handling data structures and entry points.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GABC_H
+#define GABC_H
+
+#include "struct.h"
+
+/* functions to read gabc */
+gregorio_note *gabc_det_notes_from_string(char *str, char *macros[10],
+ gregorio_scanner_location *loc, const gregorio_score *score);
+void gabc_det_notes_finish(void);
+gregorio_element *gabc_det_elements_from_string(char *str, int *current_key,
+ char *macros[10], gregorio_scanner_location *loc,
+ gregorio_shape *punctum_inclinatum_orientation,
+ const gregorio_score *const score);
+gregorio_glyph *gabc_det_glyphs_from_notes(gregorio_note *current_note,
+ int *current_key, gregorio_shape *punctum_inclinatum_orientation,
+ const gregorio_score *score);
+void gabc_digest(const void *buf, size_t size);
+int gabc_score_determination_lex_destroy(void);
+int gabc_notes_determination_lex_destroy(void);
+
+/* see comments on gregorio_add_note_to_a_glyph for meaning of these
+ * variables */
+typedef enum gabc_determination {
+ DET_NO_END,
+ DET_END_OF_CURRENT,
+ DET_END_OF_PREVIOUS,
+ DET_END_OF_BOTH
+} gabc_determination;
+
+static __inline void gabc_update_location(gregorio_scanner_location *const loc,
+ const char *const bytes, const size_t length)
+{
+ size_t i;
+
+ /* to be compatible with LilyPond, this algorithm is based on Lilypond's
+ * Source_file::get_counts */
+
+ /* possible future enhancement: make the tabstop size configurable */
+
+ loc->first_line = loc->last_line;
+ loc->first_column = loc->last_column;
+ loc->first_offset = loc->last_offset;
+
+ for (i = 0; i < length; ++i) {
+ if (bytes[i] == '\n') {
+ ++loc->last_line;
+ loc->last_column = 0;
+ loc->last_offset = 0;
+ } else if (((unsigned char)bytes[i] & 0xc0u) != 0x80u) {
+ /* if two highest bits are 1 and 0, it's a continuation byte,
+ * so count everything else, which is either a single-byte
+ * character or the first byte of a multi-byte sequence */
+
+ if (bytes[i] == '\t') {
+ loc->last_column = (loc->last_column / 8 + 1) * 8;
+ } else {
+ ++loc->last_column;
+ }
+ ++loc->last_offset;
+ }
+ }
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
new file mode 100644
index 00000000000..7d3aa1e00bd
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
@@ -0,0 +1,721 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the command line interface of Gregorio.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+static const char *copyright =
+"Copyright (C) 2006-2019 Gregorio Project authors (see CONTRIBUTORS.md)";
+
+#include "config.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#ifdef USE_KPSE
+#include <kpathsea/kpathsea.h>
+#else
+#include <getopt.h>
+#endif
+#include <string.h> /* for strcmp */
+#include <locale.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+#include "struct.h"
+#include "plugins.h"
+#include "messages.h"
+#include "characters.h"
+#include "support.h"
+#include "gabc/gabc.h"
+#include "vowel/vowel.h"
+
+#ifndef MODULE_PATH_ENV
+#define MODULE_PATH_ENV "MODULE_PATH"
+#endif
+
+typedef enum gregorio_file_format {
+ FORMAT_UNSET = 0,
+ GABC,
+ GTEX,
+ DUMP
+} gregorio_file_format;
+
+#define GABC_STR "gabc"
+#define GTEX_STR "gtex"
+#define DUMP_STR "dump"
+
+#define DEFAULT_INPUT_FORMAT GABC
+#define DEFAULT_OUTPUT_FORMAT GTEX
+
+/* realpath is not in mingw32 */
+#ifdef _WIN32
+/* _MAX_PATH is being passed for the maxLength (third) argument of _fullpath,
+ * but we are always passing NULL for the absPath (first) argument, so it will
+ * be ignored per the MSDN documentation */
+#define gregorio_realpath(path,resolved_path) _fullpath(resolved_path,path,_MAX_PATH)
+#else
+#ifdef FUNC_REALPATH_WORKS
+#define gregorio_realpath(path,resolved_path) realpath(path,resolved_path)
+#else
+/* When realpath doesn't work (on an older system), we are forced to use
+ * PATH_MAX to allocate a buffer */
+#define gregorio_realpath(path,resolved_path) realpath(path,gregorio_malloc(PATH_MAX))
+#endif /* FUNC_REALPATH_WORKS */
+#endif /* _WIN32 */
+
+/* define_path attempts to canonicalize the pathname of a given string */
+static char *define_path(char *current_directory, char *string)
+{
+ int length;
+ char *file_name;
+ char *temp_name;
+ char *base_name;
+#ifdef _WIN32
+ char *last_backslash;
+#endif
+
+ temp_name = gregorio_strdup(string);
+ base_name = strrchr(temp_name, '/');
+#ifdef _WIN32
+ last_backslash = strrchr(temp_name, '\\');
+ if (last_backslash > base_name) {
+ base_name = last_backslash;
+ }
+#endif
+ if (base_name) {
+ /* some path was supplied */
+
+ *base_name = '\0';
+ base_name++;
+
+ /* try to resolve it */
+ file_name = gregorio_realpath(temp_name, NULL);
+ if (!file_name) {
+ /* it's not reasonable to cover this failure in testing */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "the directory %s for %s does not exist\n",
+ temp_name, base_name);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ } else {
+ /* no path was supplied */
+ base_name = string;
+ file_name = gregorio_malloc(
+ strlen(current_directory) + strlen(base_name) + 2);
+ strcpy(file_name, current_directory);
+ }
+
+ /* build the file name */
+ length = strlen(file_name);
+ file_name = gregorio_realloc(file_name, length + strlen(base_name) + 2);
+ file_name[length] = '/';
+ strcpy(file_name + length + 1, base_name);
+
+ free(temp_name);
+ return file_name;
+}
+
+/* function that returns the filename without the extension */
+static char *get_base_filename(char *fbasename)
+{
+ char *p;
+ int l;
+ char *ret;
+ p = strrchr(fbasename, '.');
+ if (!p || strchr(p, '/') || strchr(p, '\\')) {
+ return gregorio_strdup(fbasename);
+ }
+ l = strlen(fbasename) - strlen(p);
+ ret = (char *) gregorio_malloc(l + 1);
+ gregorio_snprintf(ret, l + 1, "%s", fbasename);
+ ret[l] = '\0';
+ return ret;
+}
+
+/* function that adds the good extension to a basename (without extension) */
+static char *get_output_filename(char *fbasename, const char *extension)
+{
+ char *output_filename = NULL;
+ output_filename =
+ (char *) gregorio_malloc((strlen(extension) + strlen(fbasename) + 2));
+ output_filename = strcpy(output_filename, fbasename);
+ output_filename = strcat(output_filename, ".");
+ output_filename = strcat(output_filename, extension);
+ return output_filename;
+}
+
+static void print_licence(void)
+{
+ printf("Gregorio: Gregorian chant score engraving.\n\
+%s\n\
+\n\
+This program is free software: you can redistribute it and/or modify\n\
+it under the terms of the GNU General Public License as published by\n\
+the Free Software Foundation, either version 3 of the License, or\n\
+(at your option) any later version.\n\
+\n", copyright);
+ printf("This program is distributed in the hope that it will be useful,\n\
+but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
+GNU General Public License for more details.\n\
+\n\
+You should have received a copy of the GNU General Public License\n\
+along with this program. If not, see <http://www.gnu.org/licenses/>.\n\
+");
+}
+
+static void print_usage(char *name)
+{
+ printf(_("Usage: %s [OPTION]... [-s | INPUT_FILE]\n\
+\nEngrave Gregorian chant scores, convert a gabc file to GregorioTeX.\n\n\
+Options:\n\
+ -o, --output-file FILE write output to FILE,\n\
+ default is basename(INPUT_FILE).FORMAT\n\
+ -S, --stdout write output to stdout\n\
+ -s, --stdin read input from stdin\n\
+ -l, --messages-file FILE output messages to FILE (default: stderr)\n\
+ -F, --output-format FORMAT\n\
+ specify output format (default: gtex)\n"), name);
+printf(_(" -f, --input-format FORMAT\n\
+ specify input format (default: gabc)\n\
+ -p, --point-and-click generate Lilypond point and click information\n\
+ -h, --help print this help message\n\
+ -V, --version print version and exit\n"));
+ printf(_("\
+ -L, --license print licence\n\
+ -v, --verbose verbose mode\n\
+ -W, --all-warnings output warnings\n\
+ -D, --deprecation-errors treat deprecation warnings as errors\n\
+ -d, --debug output debug information\n\
+\n\
+Formats:\n\
+ gabc gabc\n\
+ gtex GregorioTeX\n\
+ dump plain text dump (for debugging purpose)\n\
+\n\
+See <" PACKAGE_URL "> for general documentation,\n\
+GregorioRef.pdf and GregorioNabcRef.pdf for full documentation.\
+\n"));
+}
+
+static void print_short_usage(char *name)
+{
+ fprintf(stderr, "Usage: %s [OPTION]... [-s | INPUT_FILE]\n\
+Try '%s --help' for more information.\n", name, name);
+}
+
+static void check_input_clobber(char *input_file_name, char *output_file_name)
+{
+ if (input_file_name && output_file_name) {
+ char *absolute_input_file_name;
+ char *absolute_output_file_name;
+ char *current_directory;
+ int file_cmp;
+ size_t bufsize = 128;
+ char *buf = gregorio_malloc(bufsize);
+ while ((current_directory = getcwd(buf, bufsize)) == NULL
+ && errno == ERANGE && bufsize < MAX_BUF_GROWTH) {
+ free(buf);
+ bufsize <<= 1;
+ buf = gregorio_malloc(bufsize);
+ }
+ if (current_directory == NULL) {
+ fprintf(stderr, _("can't determine current directory"));
+ free(buf);
+ gregorio_exit(1);
+ }
+ absolute_input_file_name = define_path(current_directory, input_file_name);
+ absolute_output_file_name = define_path(current_directory, output_file_name);
+ file_cmp = strcmp(absolute_input_file_name, absolute_output_file_name);
+ if (file_cmp == 0) {
+ fprintf(stderr, "error: refusing to overwrite the input file\n");
+ }
+ free(buf);
+ free(absolute_input_file_name);
+ free(absolute_output_file_name);
+ if (file_cmp == 0) {
+ gregorio_exit(1);
+ }
+ }
+}
+
+static char *encode_point_and_click_filename(char *input_file_name)
+{
+ /* percent-encoding favors capital hex digits */
+ static const char *const hex = "0123456789ABCDEF";
+ char *filename, *result = NULL, *r = NULL, *p;
+
+ filename = gregorio_realpath(input_file_name, NULL);
+ if (!filename) {
+ /* it's not reasonable to generate the system error that would cause
+ * this to fail */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error: unable to resolve %s\n", input_file_name);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+
+ /* 2 extra characters for a possible leading slash and final NUL */
+ r = result = gregorio_malloc(strlen(filename) * 4 + 2);
+
+#ifdef _WIN32
+ *(r++) = '/';
+#endif
+
+ for (p = filename; *p; ++p) {
+#ifdef _WIN32
+ if (*p == '\\') {
+ *p = '/';
+ }
+#endif
+
+ /* note that -, _ and ~ are conspicuously missing from this list
+ * because they cause trouble in TeX; we will percent-encode them */
+ if ((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p < 'z')
+ || (*p >= '0' && *p <= '9') || *p == '.' || *p == '/'
+#ifdef _WIN32
+ || *p == ':'
+#endif
+ ) {
+ *(r++) = *p;
+ }
+ else {
+ /* percent-encode anything else */
+ *(r++) = '\\'; /* must escape it because it's TeX */
+ *(r++) = '%';
+ *(r++) = hex[(*p >> 4) & 0x0FU];
+ *(r++) = hex[*p & 0x0FU];
+ }
+ }
+
+ *r = '\0';
+
+ free(filename);
+ return result;
+}
+
+int main(int argc, char **argv)
+{
+ int c;
+
+ char *input_file_name = NULL;
+ char *output_file_name = NULL;
+ char *output_basename = NULL;
+ char *error_file_name = NULL;
+ FILE *input_file = NULL;
+ FILE *output_file = NULL;
+ FILE *error_file = NULL;
+ gregorio_file_format input_format = FORMAT_UNSET;
+ gregorio_file_format output_format = FORMAT_UNSET;
+ gregorio_verbosity verb_mode = 0;
+ bool deprecation_errors = false;
+ bool point_and_click = false;
+ char *point_and_click_filename = NULL;
+ bool debug = false;
+ bool must_print_short_usage = false;
+ int option_index = 0;
+ static struct option long_options[] = {
+ {"output-file", 1, 0, 'o'},
+ {"stdout", 0, 0, 'S'},
+ {"output-format", 1, 0, 'F'},
+ {"messages-file", 1, 0, 'l'},
+ {"input-format", 1, 0, 'f'},
+ {"stdin", 0, 0, 's'},
+ {"help", 0, 0, 'h'},
+ {"version", 0, 0, 'V'},
+ {"licence", 0, 0, 'L'},
+ {"verbose", 0, 0, 'v'},
+ {"all-warnings", 0, 0, 'W'},
+ {"deprecation-errors", 0, 0, 'D'},
+ {"point-and-click", 0, 0, 'p'},
+ {"debug", 0, 0, 'd'},
+ };
+ gregorio_score *score = NULL;
+
+ gregorio_support_init("gregorio", argv[0]);
+
+ if (argc == 1) {
+ fprintf(stderr, "%s: missing file operand.\n", argv[0]);
+ print_short_usage(argv[0]);
+ gregorio_exit(0);
+ }
+ setlocale(LC_CTYPE, "C");
+
+ while (1) {
+ c = getopt_long(argc, argv, "o:SF:l:f:shOLVvWDpd",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+ switch (c) {
+ case 'o':
+ if (output_file_name) {
+ fprintf(stderr,
+ "warning: several output files declared, %s taken\n",
+ output_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ if (output_file) { /* means that stdout is defined */
+ fprintf(stderr,
+ "warning: can't write to file and stdout, writing on stdout\n");
+ must_print_short_usage = true;
+ break;
+ }
+ output_file_name = optarg;
+ break;
+ case 'S':
+ if (output_file_name) {
+ fprintf(stderr,
+ "warning: can't write to file and stdout, writing on %s\n",
+ output_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ if (output_file) { /* means that stdout is defined */
+ fprintf(stderr, "warning: option used several times: %c\n", c);
+ must_print_short_usage = true;
+ break;
+ }
+ output_file = stdout;
+ break;
+ case 'F':
+ if (output_format) {
+ fprintf(stderr,
+ "warning: several output formats declared, first taken\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (!strcmp(optarg, GABC_STR)) {
+ output_format = GABC;
+ break;
+ }
+ if (!strcmp(optarg, GTEX_STR)) {
+ output_format = GTEX;
+ break;
+ }
+ if (!strcmp(optarg, DUMP_STR)) {
+ output_format = DUMP;
+ break;
+ } else {
+ fprintf(stderr, "error: unknown output format: %s\n", optarg);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ break;
+ case 'l':
+ if (error_file_name) {
+ fprintf(stderr,
+ "warning: several error files declared, %s taken\n",
+ error_file_name);
+ must_print_short_usage = true;
+ break;
+ }
+ error_file_name = optarg;
+ break;
+ case 'f':
+ if (input_format) {
+ gregorio_set_error_out(error_file);
+ fprintf(stderr,
+ "warning: several output formats declared, first taken\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (!strcmp(optarg, GABC_STR)) {
+ input_format = GABC;
+ break;
+ } else {
+ fprintf(stderr, "error: unknown input format: %s\n", optarg);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ break;
+ case 's':
+ /* input_file_name will be null here because of the way
+ * we use getopt_long */
+ assert(!input_file_name);
+ if (input_file) { /* means that stdin is defined */
+ fprintf(stderr, "warning: option used several times: %c\n", c);
+ must_print_short_usage = true;
+ break;
+ }
+ input_file = stdin;
+ break;
+ case 'h':
+ print_usage(argv[0]);
+ gregorio_exit(0);
+ break;
+ case 'V':
+ gregorio_print_version(copyright);
+ gregorio_exit(0);
+ break;
+ case 'v':
+ if (verb_mode && verb_mode != VERBOSITY_WARNING) {
+ fprintf(stderr, "warning: verbose option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ verb_mode = VERBOSITY_INFO;
+ break;
+ case 'W':
+ if (verb_mode == VERBOSITY_WARNING) {
+ fprintf(stderr,
+ "warning: all-warnings option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ if (verb_mode != VERBOSITY_INFO) {
+ verb_mode = VERBOSITY_WARNING;
+ }
+ break;
+ case 'D':
+ if (deprecation_errors) {
+ fprintf(stderr, "warning: deprecation-errors option passed "
+ "several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ deprecation_errors = true;
+ break;
+ case 'L':
+ print_licence();
+ gregorio_exit(0);
+ break;
+ case 'p':
+ if (point_and_click) {
+ fprintf(stderr,
+ "warning: point-and-click option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ point_and_click = true;
+ break;
+ case 'd':
+ if (debug) {
+ fprintf(stderr,
+ "warning: debug option passed several times\n");
+ must_print_short_usage = true;
+ break;
+ }
+ debug = true;
+ break;
+ case '?':
+ must_print_short_usage = true;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(main, "unknown option: %c", c);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ } /* end of while */
+ if (optind == argc) {
+ if (!input_file) { /* input not undefined (could be stdin) */
+ fprintf(stderr, "%s: missing file operand.\n", argv[0]);
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ }
+ } else {
+ input_file_name = argv[optind++];
+ output_basename = get_base_filename(input_file_name);
+ if (input_file) {
+ fprintf(stderr,
+ "warning: can't read from both stdin and a file, reading from %s\n",
+ input_file_name);
+ input_file = NULL;
+ must_print_short_usage = true;
+ }
+ }
+ if (optind < argc) {
+ must_print_short_usage = true;
+ fprintf(stderr, "ignored arguments:");
+ for (; optind < argc; ++optind) {
+ fprintf(stderr, " %s", argv[optind]);
+ }
+ fprintf(stderr, "\n");
+ }
+
+ if (must_print_short_usage) {
+ print_short_usage(argv[0]);
+ fprintf(stderr, "Proceeding anyway...\n");
+ }
+
+ gregorio_set_debug_messages(debug);
+ gregorio_set_deprecation_errors(deprecation_errors);
+
+ if (!input_format) {
+ input_format = DEFAULT_INPUT_FORMAT;
+ }
+
+ if (!output_format) {
+ output_format = DEFAULT_OUTPUT_FORMAT;
+ }
+
+ /* then we act... */
+
+ if (!output_file_name && !output_file) {
+ if (!output_basename) {
+ output_file = stdout;
+ } else {
+ switch (output_format) {
+ case GABC:
+ output_file_name =
+ get_output_filename(output_basename, "gabc");
+ break;
+ case GTEX:
+ output_file_name =
+ get_output_filename(output_basename, "gtex");
+ break;
+ case DUMP:
+ output_file_name =
+ get_output_filename(output_basename, "dump");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error: unsupported format");
+ print_short_usage(argv[0]);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ }
+
+ if (output_basename) {
+ free(output_basename);
+ }
+
+ if (!output_file) {
+ if (!input_file) {
+ check_input_clobber(input_file_name, output_file_name);
+ }
+ gregorio_check_file_access(write, output_file_name, ERROR,
+ gregorio_exit(1));
+ output_file = fopen(output_file_name, "wb");
+ if (!output_file) {
+ fprintf(stderr, "error: can't write in file %s", output_file_name);
+ gregorio_exit(1);
+ }
+ }
+
+ /* we always have input_file or input_file_name */
+ if (input_file) {
+ if (point_and_click) {
+ fprintf(stderr,
+ "warning: disabling point-and-click since reading from stdin\n");
+ }
+ } else {
+ gregorio_check_file_access(read, input_file_name, ERROR,
+ gregorio_exit(1));
+ input_file = fopen(input_file_name, "r");
+ if (!input_file) {
+ fprintf(stderr, "error: can't open file %s for reading\n",
+ input_file_name);
+ gregorio_exit(1);
+ }
+ if (point_and_click) {
+ point_and_click_filename = encode_point_and_click_filename(
+ input_file_name);
+ }
+ }
+
+ if (!error_file_name) {
+ error_file = stderr;
+ gregorio_set_error_out(error_file);
+ } else {
+ gregorio_check_file_access(write, error_file_name, ERROR,
+ gregorio_exit(1));
+ error_file = fopen(error_file_name, "wb");
+ if (!error_file) {
+ fprintf(stderr, "error: can't open file %s for writing\n",
+ error_file_name);
+ gregorio_exit(1);
+ }
+ gregorio_set_error_out(error_file);
+ }
+
+ if (!verb_mode) {
+ verb_mode = VERBOSITY_DEPRECATION;
+ }
+
+ gregorio_set_verbosity_mode(verb_mode);
+
+ switch (input_format) {
+ case GABC:
+ score = gabc_read_score(input_file, point_and_click);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error : invalid input format\n");
+ fclose(input_file);
+ fclose(output_file);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ fclose(input_file);
+ if (score == NULL) {
+ /* score should never be NULL on return from gabc_read_score */
+ /* LCOV_EXCL_START */
+ fclose(output_file);
+ fprintf(stderr, "error in file parsing\n");
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+
+ switch (output_format) {
+ case GABC:
+ gabc_write_score(output_file, score);
+ break;
+ case GTEX:
+ gregoriotex_write_score(output_file, score, point_and_click_filename);
+ break;
+ case DUMP:
+ dump_write_score(output_file, score);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(stderr, "error : invalid output format\n");
+ gregorio_free_score(score);
+ fclose(output_file);
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ fclose(output_file);
+ if (point_and_click_filename) {
+ free(point_and_click_filename);
+ }
+ gregorio_free_score(score);
+ gregorio_vowel_tables_free();
+ gabc_score_determination_lex_destroy();
+ gabc_notes_determination_lex_destroy();
+ gregorio_vowel_rulefile_lex_destroy();
+ if (error_file_name) {
+ fclose(error_file);
+ }
+
+ gregorio_exit(gregorio_get_return_value());
+} /* due to exit on prior line, this will never be reached; LCOV_EXCL_LINE */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
new file mode 100644
index 00000000000..dd88699392b
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-position.c
@@ -0,0 +1,1750 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains the logic for positioning signs on neumes.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+
+#include "gregoriotex.h"
+
+/* (loose) naming convention, employing camel case to be TeX-csname-compliant:
+ * {specific-glyph-shape}{note-position}{note-shape}{first-ambitus}{second-ambitus}
+ */
+OFFSET_CASE(FinalPunctum);
+OFFSET_CASE(FinalDeminutus);
+OFFSET_CASE(PenultBeforePunctumWide);
+OFFSET_CASE(PenultBeforeDeminutus);
+OFFSET_CASE(AntepenultBeforePunctum);
+OFFSET_CASE(AntepenultBeforeDeminutus);
+OFFSET_CASE(InitialPunctum);
+OFFSET_CASE(InitioDebilis);
+OFFSET_CASE(PorrNonAuctusInitialWide);
+OFFSET_CASE(PorrNonAuctusInitialOne);
+OFFSET_CASE(PorrAuctusInitialAny);
+OFFSET_CASE(FinalInclinatum);
+OFFSET_CASE(FinalInclinatumDeminutus);
+OFFSET_CASE(FinalStropha);
+OFFSET_CASE(FinalQuilisma);
+OFFSET_CASE(FinalOriscus);
+OFFSET_CASE(PenultBeforePunctumOne);
+OFFSET_CASE(FinalUpperPunctum);
+OFFSET_CASE(InitialOriscus);
+OFFSET_CASE(InitialQuilisma);
+OFFSET_CASE(TorcResNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResDebilisNonAuctusSecondAnyWide);
+OFFSET_CASE(FinalLineaPunctum);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondWideWide);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondOneWide);
+OFFSET_CASE(TorcResNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResDebilisNonAuctusSecondAnyOne);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondWideOne);
+OFFSET_CASE(TorcResNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResQuilismaNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResOriscusNonAuctusSecondOneOne);
+OFFSET_CASE(TorcResAuctusSecondWideAny);
+OFFSET_CASE(TorcResDebilisAuctusSecondAnyAny);
+OFFSET_CASE(TorcResQuilismaAuctusSecondWideAny);
+OFFSET_CASE(TorcResOriscusAuctusSecondWideAny);
+OFFSET_CASE(TorcResAuctusSecondOneAny);
+OFFSET_CASE(TorcResQuilismaAuctusSecondOneAny);
+OFFSET_CASE(TorcResOriscusAuctusSecondOneAny);
+OFFSET_CASE(ConnectedPenultBeforePunctumWide);
+OFFSET_CASE(ConnectedPenultBeforePunctumOne);
+OFFSET_CASE(InitialConnectedPunctum);
+OFFSET_CASE(InitialConnectedVirga);
+OFFSET_CASE(InitialConnectedQuilisma);
+OFFSET_CASE(InitialConnectedOriscus);
+OFFSET_CASE(FinalConnectedPunctum);
+OFFSET_CASE(FinalConnectedAuctus);
+OFFSET_CASE(FinalVirgaAuctus);
+OFFSET_CASE(FinalConnectedVirga);
+OFFSET_CASE(InitialVirga);
+OFFSET_CASE(SalicusOriscusWide);
+OFFSET_CASE(SalicusOriscusOne);
+OFFSET_CASE(LeadingPunctum);
+OFFSET_CASE(LeadingQuilisma);
+OFFSET_CASE(LeadingOriscus);
+OFFSET_CASE(Flat);
+OFFSET_CASE(Sharp);
+OFFSET_CASE(Natural);
+
+static __inline const char *note_before_last_note_case_ignoring_deminutus(
+ const gregorio_note *const current_note)
+{
+ assert(current_note->next);
+ if ((current_note->u.note.pitch - current_note->next->u.note.pitch) == 1
+ || (current_note->u.note.pitch -
+ current_note->next->u.note.pitch) == -1) {
+ if (!current_note->previous || current_note->u.note.pitch -
+ current_note->previous->u.note.pitch > 1) {
+ return ConnectedPenultBeforePunctumOne;
+ } else {
+ return PenultBeforePunctumOne;
+ }
+ } else {
+ if (!current_note->previous || current_note->u.note.pitch -
+ current_note->previous->u.note.pitch > 1) {
+ return ConnectedPenultBeforePunctumWide;
+ } else {
+ return PenultBeforePunctumWide;
+ }
+ }
+}
+
+static __inline const char *note_before_last_note_case(
+ const gregorio_glyph *const current_glyph,
+ const gregorio_note *const current_note)
+{
+ if ((current_glyph->u.notes.liquescentia & L_DEMINUTUS)
+ && current_note->next) {
+ return PenultBeforeDeminutus;
+ } else {
+ return note_before_last_note_case_ignoring_deminutus(current_note);
+ }
+}
+
+/* num can be FinalPunctum or FinalUpperPunctum according if the last note is a
+ * standard punctum or a smaller punctum (for pes, porrectus and torculus
+ * resupinus */
+static __inline const char *last_note_case(
+ const gregorio_glyph *const current_glyph, const char* offset_pos,
+ gregorio_note *current_note, bool no_ambitus_one)
+{
+ if (current_glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ /*
+ * may seem strange, but it is unlogical to typeset a small horizontal
+ * episema at the end of a flexus deminutus
+ */
+ return FinalDeminutus;
+ }
+ if (!current_note->previous
+ || (!no_ambitus_one && (offset_pos == FinalUpperPunctum
+ || current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1 ||
+ current_note->u.note.pitch - current_note->previous->u.note.pitch
+ == 1))) {
+ return offset_pos;
+ }
+ if (current_note->previous->u.note.pitch < current_note->u.note.pitch) {
+ if (current_glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ return FinalConnectedAuctus;
+ } else {
+ return FinalConnectedVirga;
+ }
+ } else {
+ return FinalConnectedPunctum;
+ }
+}
+
+static __inline const char *first_note_case(
+ const gregorio_note *const current_note,
+ const gregorio_glyph *const current_glyph)
+{
+ bool ambitus_one = true;
+ if (current_glyph->u.notes.liquescentia >= L_INITIO_DEBILIS) {
+ return InitioDebilis;
+ } else {
+ if (current_note->next && current_note->next->u.note.pitch -
+ current_note->u.note.pitch != 1 &&
+ current_note->u.note.pitch - current_note->next->u.note.pitch
+ != 1) {
+ ambitus_one = false;
+ }
+ switch (current_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ return ambitus_one ? InitialOriscus : InitialConnectedOriscus;
+
+ case S_QUILISMA:
+ return ambitus_one ? InitialQuilisma : InitialConnectedQuilisma;
+
+ default:
+ if (ambitus_one) {
+ return InitialPunctum;
+ }
+ if (current_note->u.note.pitch > current_note->next->u.note.pitch) {
+ return InitialConnectedVirga;
+ } else {
+ return InitialConnectedPunctum;
+ }
+ }
+ }
+}
+
+static __inline const char *fused_single_note_case(
+ const gregorio_glyph *const glyph, const char *const unfused_case,
+ const char *const fused_case) {
+ int fuse_to_next_glyph = glyph->u.notes.fuse_to_next_glyph;
+ if (fuse_to_next_glyph < -1 || fuse_to_next_glyph > 1) {
+ return fused_case;
+ }
+ return unfused_case;
+}
+
+static __inline gregorio_vposition below_if_auctus(
+ const gregorio_glyph *const glyph)
+{
+ if (glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ return VPOS_BELOW;
+ }
+ return VPOS_ABOVE;
+}
+
+static __inline gregorio_vposition above_if_h_episema(
+ const gregorio_note *const note)
+{
+ if (note && note->h_episema_above) {
+ return VPOS_ABOVE;
+ }
+ return VPOS_BELOW;
+}
+
+static __inline gregorio_vposition above_if_fused_next_h_episema(
+ const gregorio_glyph *glyph)
+{
+ const gregorio_glyph *next = gregorio_next_non_texverb_glyph(glyph);
+ gregorio_assert(next && next->type == GRE_GLYPH
+ && is_fused(next->u.notes.liquescentia),
+ above_if_fused_next_h_episema,
+ "expected this glyph to be fused to the next one",
+ return VPOS_BELOW);
+ return above_if_h_episema(next->u.notes.first_note);
+}
+
+static __inline gregorio_vposition above_if_either_h_episema(
+ const gregorio_note *const note)
+{
+ if ((note->previous && note->previous->h_episema_above)
+ || (note->next && note->next->h_episema_above)) {
+ return VPOS_ABOVE;
+ }
+ return VPOS_BELOW;
+}
+
+static __inline gregorio_vposition below_if_next_ambitus_allows(
+ const gregorio_note *const note)
+{
+ assert(note->next);
+
+ if (!note->next || note->u.note.pitch - note->next->u.note.pitch > 2) {
+ return VPOS_BELOW;
+ }
+ return VPOS_ABOVE;
+}
+
+static __inline void low_high_set_lower(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) ||
+ !(glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ note->is_lower_note = true;
+ }
+}
+
+static __inline void low_high_set_upper(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) ||
+ !(glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ note->is_upper_note = true;
+ }
+}
+
+static __inline void high_low_set_upper(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->is_upper_note = true;
+ }
+}
+
+static __inline void high_low_set_lower(const gregorio_glyph *const glyph,
+ gregorio_note *const note)
+{
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->is_lower_note = true;
+ }
+}
+
+/* a function that finds the good sign (additional line, vepisema or
+ * hepisema) number, according to the gregoriotex convention (described in
+ * gregoriotex.tex)
+ * this function is REALLY a pain in the ass, but it is sadly necessary */
+/*
+ *
+ * For the first note of a porrectus (flexus), this table summarizes the sign
+ * number (amb2 is the ambitus after the diagonal stroke):
+ *
+ * Porrectus | Porrectus | Porrectus | Porrectus
+ * non-auctus | non-auctus | auctus | Flexus
+ * amb2=1 | amb2>1 | |
+ * =================|=================|==============|==============
+ * PorrNonAuctus | PorrNonAuctus | PorrAuctus | PorrAuctus
+ * ~InitialOne | ~InitialWide | ~InitialAny | ~InitialAny
+ *
+ * For the second note of a torculus resupinus (flexus), this table summarizes
+ * the number (amb1 is the ambitus before the diagonal stroke and amb2 is the
+ * ambitus after the diagonal stroke):
+ *
+ * | | Torculus | Torculus | Torculus | Torculus
+ * | | Resupinus | Resupinus | Resupinus | Resupinus
+ * | Initial | non-auctus | non-auctus | auctus | Flexus
+ * amb1 | Note | amb2=1 | amb2>1 | |
+ * ======|============|=============|=============|============|============
+ * 1 | Punctum | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | I. Debilis | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Debilis | ~Debilis | ~Debilis | ~Debilis
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~AnyOne | ~AnyWide | ~AnyAny | ~AnyAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | Quilisma | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Quilisma | ~Quilisma | ~Quilisma | ~Quilisma
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ------+------------+-------------+-------------+------------+------------
+ * 1 | Oriscus | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Oriscus | ~Oriscus | ~Oriscus | ~Oriscus
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~OneOne | ~OneWide | ~OneAny | ~OneAny
+ * ======|============|=============|=============|============|============
+ * >1 | Punctum | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | I. Debilis | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Debilis | ~Debilis | ~Debilis | ~Debilis
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~AnyOne | ~AnyWide | ~AnyAny | ~AnyAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | Quilisma | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Quilisma | ~Quilisma | ~Quilisma | ~Quilisma
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ * ------+------------+-------------+-------------+------------+------------
+ * >1 | Oriscus | TorcRes | TorcRes | TorcRes | TorcRes
+ * | | ~Oriscus | ~Oriscus | ~Oriscus | ~Oriscus
+ * | | ~NonAuctus | ~NonAuctus | ~Auctus | ~Auctus
+ * | | ~Second | ~Second | ~Second | ~Second
+ * | | ~WideOne | ~WideWide | ~WideAny | ~WideAny
+ *
+ */
+static gregorio_vposition advise_positioning(const gregorio_glyph *const glyph,
+ gregorio_note *const note, int i, const gtex_type type)
+{
+ gregorio_vposition h_episema = VPOS_AUTO, v_episema = VPOS_AUTO;
+ bool v_episema_below_is_lower = false, done;
+ const gregorio_glyph *previous;
+
+ /* no need to clear is_lower_note/is_upper_note because we used calloc */
+
+ switch (type) {
+ case T_PES:
+ case T_QUILISMA_PES:
+ /*
+ * in the case of a pes, we put the episema just under the bottom note
+ */
+ if (i == 1) {
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = InitioDebilis;
+ h_episema = above_if_h_episema(note->next);
+ } else {
+ note->is_lower_note = true;
+ if (note->u.note.shape == S_QUILISMA) {
+ note->gtex_offset_case = FinalQuilisma;
+ } else {
+ note->gtex_offset_case = FinalPunctum;
+ }
+ h_episema = VPOS_BELOW;
+ }
+ v_episema = VPOS_BELOW;
+ } else { /* i=2 */
+ if (!(glyph->u.notes.liquescentia & L_INITIO_DEBILIS)) {
+ note->is_upper_note = true;
+ }
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = FinalDeminutus;
+ } else {
+ note->gtex_offset_case = FinalUpperPunctum;
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_auctus(glyph);
+ }
+ break;
+ case T_PES_QUADRATUM:
+ case T_PES_QUASSUS:
+ case T_QUILISMA_PES_QUADRATUM:
+ if (i == 1) {
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ } else { /* i=2 */
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = InitioDebilis;
+ } else {
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum,
+ note, true);
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ case T_FLEXUS:
+ case T_FLEXUS_ORISCUS:
+ if (i == 1) {
+ high_low_set_upper(glyph, note);
+ if (type == T_FLEXUS_ORISCUS) {
+ note->gtex_offset_case = InitialConnectedOriscus;
+ } else {
+ if (note->next && note->u.note.pitch -
+ note->next->u.note.pitch == 1) {
+ note->gtex_offset_case = InitialVirga;
+ } else {
+ note->gtex_offset_case = InitialConnectedVirga;
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = below_if_next_ambitus_allows(note);
+ } else {
+ v_episema = VPOS_BELOW;
+ }
+ } else { /* i=2 */
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ h_episema = VPOS_BELOW;
+ } else {
+ h_episema = above_if_h_episema(note->previous);
+ }
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case HEPISEMA_FIRST_TWO:
+ case 2:
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = TorcResDebilisAuctusSecondAnyAny;
+ } else {
+ if (note->u.note.pitch - note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondOneAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondOneAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondOneAny;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondWideAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondWideAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondWideAny;
+ break;
+ }
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_PORRECTUS_FLEXUS:
+ switch (i) {
+ case HEPISEMA_FIRST_TWO:
+ case 1:
+ note->gtex_offset_case = PorrAuctusInitialAny;
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ case 2:
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = AntepenultBeforeDeminutus;
+ } else {
+ note->gtex_offset_case = AntepenultBeforePunctum;
+ }
+ h_episema = above_if_either_h_episema(note);
+ v_episema = VPOS_BELOW;
+ break;
+ case 3:
+ high_low_set_upper(glyph, note);
+ h_episema = VPOS_ABOVE;
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS) && note->next) {
+ v_episema = below_if_next_ambitus_allows(note);
+ note->gtex_offset_case = PenultBeforeDeminutus;
+ } else {
+ v_episema = VPOS_BELOW;
+ note->gtex_offset_case = note_before_last_note_case(glyph,
+ note);
+ }
+ break;
+ default:
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = above_if_h_episema(note->previous);
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case HEPISEMA_FIRST_TWO:
+ case 2:
+ if (glyph->u.notes.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ /* auctus */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case = TorcResDebilisAuctusSecondAnyAny;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondOneAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondOneAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondOneAny;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaAuctusSecondWideAny;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusAuctusSecondWideAny;
+ break;
+ default:
+ note->gtex_offset_case = TorcResAuctusSecondWideAny;
+ break;
+ }
+ }
+ }
+ } else if (note->next->next->u.note.pitch -
+ note->next->u.note.pitch == 1) {
+ /* non-auctus with a second ambitus of 1 */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case =
+ TorcResDebilisNonAuctusSecondAnyOne;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondOneOne;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondOneOne;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondOneOne;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondWideOne;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondWideOne;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondWideOne;
+ break;
+ }
+ }
+ }
+ } else {
+ /* non-auctus with a second ambitus of at least 2 */
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ note->gtex_offset_case =
+ TorcResDebilisNonAuctusSecondAnyWide;
+ } else {
+ if (note->u.note.pitch -
+ note->previous->u.note.pitch == 1) {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondOneWide;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondOneWide;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondOneWide;
+ break;
+ }
+ } else {
+ switch (note->previous->u.note.shape) {
+ case S_QUILISMA:
+ note->gtex_offset_case =
+ TorcResQuilismaNonAuctusSecondWideWide;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ note->gtex_offset_case =
+ TorcResOriscusNonAuctusSecondWideWide;
+ break;
+ default:
+ note->gtex_offset_case =
+ TorcResNonAuctusSecondWideWide;
+ break;
+ }
+ }
+ }
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_PORRECTUS: /* or porrectus-like flexus */
+ switch (i) {
+ case HEPISEMA_FIRST_TWO:
+ case 1:
+ if (glyph->u.notes.fuse_to_next_glyph ||
+ (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ /* auctus */
+ note->gtex_offset_case = PorrAuctusInitialAny;
+ } else if (note->next->next->u.note.pitch
+ - note->next->u.note.pitch == 1) {
+ /* non-auctus with a second ambitus of 1 */
+ note->gtex_offset_case = PorrNonAuctusInitialOne;
+ } else {
+ /* non-auctus with a second ambitus of at least 2 */
+ note->gtex_offset_case = PorrNonAuctusInitialWide;
+ }
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ v_episema_below_is_lower = true;
+ break;
+ case 2:
+ low_high_set_lower(glyph, note);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ note->gtex_offset_case = PenultBeforeDeminutus;
+ } else if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ note->gtex_offset_case = PenultBeforePunctumWide;
+ } else {
+ note->gtex_offset_case = FinalPunctum;
+ }
+ h_episema = above_if_h_episema(note->previous);
+ if (h_episema == VPOS_BELOW && !note->next) {
+ /* handle porrectus-like flexus */
+ h_episema = above_if_fused_next_h_episema(glyph);
+ }
+ v_episema = VPOS_BELOW;
+ break;
+ default: /* case 3 */
+ low_high_set_upper(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalUpperPunctum,
+ note, true);
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_auctus(glyph);
+ break;
+ }
+ break;
+ case T_SCANDICUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ low_high_set_lower(glyph, note);
+ if (note->u.note.pitch - note->previous->u.note.pitch == 1) {
+ note->gtex_offset_case = FinalPunctum;
+ } else {
+ note->gtex_offset_case = FinalConnectedPunctum;
+ }
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ default:
+ low_high_set_upper(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ true);
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_SALICUS_FLEXUS:
+ done = true;
+ v_episema = VPOS_BELOW;
+ switch (i) {
+ case 3:
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ break;
+ case 4:
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = VPOS_BELOW;
+ break;
+ default:
+ done = false;
+ break;
+ }
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_SALICUS:
+ v_episema = VPOS_BELOW;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = InitialConnectedPunctum;
+ h_episema = above_if_h_episema(note->next);
+ break;
+ case 2:
+ if (note->next->u.note.pitch - note->u.note.pitch == 1) {
+ note->gtex_offset_case = SalicusOriscusOne;
+ } else {
+ note->gtex_offset_case = SalicusOriscusWide;
+ }
+ h_episema = VPOS_ABOVE;
+ break;
+ default:
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = VPOS_ABOVE;
+ }
+ h_episema = VPOS_ABOVE;
+ break;
+ }
+ break;
+ case T_TORCULUS_LIQUESCENS:
+ done = true;
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ note->gtex_offset_case =
+ note_before_last_note_case_ignoring_deminutus(note);
+ h_episema = VPOS_ABOVE;
+ v_episema = VPOS_BELOW;
+ break;
+ default:
+ --i;
+ done = false;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+ /* else fallthrough to the next case! */
+ case T_ANCUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ note->is_upper_note = true;
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ v_episema = below_if_next_ambitus_allows(note);
+ break;
+ default:
+ note->is_lower_note = true;
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = VPOS_BELOW;
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ case T_TORCULUS:
+ switch (i) {
+ case 1:
+ note->gtex_offset_case = first_note_case(note, glyph);
+ h_episema = above_if_h_episema(note->next);
+ v_episema = VPOS_BELOW;
+ break;
+ case 2:
+ high_low_set_upper(glyph, note);
+ note->gtex_offset_case = note_before_last_note_case(glyph, note);
+ h_episema = VPOS_ABOVE;
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ v_episema = below_if_next_ambitus_allows(note);
+ } else {
+ v_episema = VPOS_BELOW;
+ }
+ break;
+ default:
+ high_low_set_lower(glyph, note);
+ note->gtex_offset_case = last_note_case(glyph, FinalPunctum, note,
+ false);
+ h_episema = above_if_h_episema(note->previous);
+ v_episema = VPOS_BELOW;
+ break;
+ }
+ break;
+ default: /* case T_ONE_NOTE */
+ previous = gregorio_previous_non_texverb_glyph(glyph);
+ if ((!previous || previous->type != GRE_GLYPH
+ || previous->u.notes.fuse_to_next_glyph < 0)
+ && (glyph->u.notes.fuse_to_next_glyph > 0)) {
+ h_episema = above_if_fused_next_h_episema(glyph);
+ } else {
+ h_episema = VPOS_ABOVE;
+ }
+ v_episema = VPOS_BELOW;
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ note->gtex_offset_case = FinalInclinatumDeminutus;
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ note->gtex_offset_case = FinalInclinatum;
+ break;
+ case S_STROPHA:
+ note->gtex_offset_case = FinalStropha;
+ break;
+ case S_QUILISMA:
+ note->gtex_offset_case = fused_single_note_case(glyph,
+ FinalQuilisma, LeadingQuilisma);
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ note->gtex_offset_case = fused_single_note_case(glyph, FinalOriscus,
+ LeadingOriscus);
+ break;
+ case S_VIRGA:
+ note->gtex_offset_case = InitialVirga;
+ break;
+ case S_VIRGA_REVERSA:
+ if (glyph->u.notes.liquescentia == L_AUCTUS_DESCENDENS) {
+ note->gtex_offset_case = FinalVirgaAuctus;
+ } else {
+ note->gtex_offset_case = InitialVirga;
+ }
+ break;
+ case S_LINEA_PUNCTUM:
+ note->gtex_offset_case = FinalLineaPunctum;
+ break;
+ case S_LINEA:
+ note->gtex_offset_case = FinalPunctum;
+ break;
+ case S_FLAT:
+ note->gtex_offset_case = Flat;
+ break;
+ case S_SHARP:
+ note->gtex_offset_case = Sharp;
+ break;
+ case S_NATURAL:
+ note->gtex_offset_case = Natural;
+ break;
+ default:
+ note->gtex_offset_case = last_note_case(glyph,
+ fused_single_note_case(glyph, FinalPunctum, LeadingPunctum),
+ note, true);
+ break;
+ }
+ break;
+ }
+
+ if (note->signs & _V_EPISEMA) {
+ if (note->v_episema_height) {
+ if (note->v_episema_height > note->u.note.pitch) {
+ /* above is always higher because of GregorioTeX's design */
+ note->v_episema_height += (int)VPOS_ABOVE;
+ }
+ }
+ else {
+ note->v_episema_height = note->u.note.pitch + (int)v_episema;
+ if ((v_episema == VPOS_BELOW && v_episema_below_is_lower)
+ || v_episema == VPOS_ABOVE) {
+ /* above is always higher because of GregorioTeX's design */
+ note->v_episema_height += (int)v_episema;
+ }
+ }
+ }
+
+ return h_episema;
+}
+
+static __inline char compute_h_episema_height(
+ const gregorio_glyph *const glyph, const gregorio_note *const note,
+ const gregorio_vposition vpos)
+{
+ char height = note->u.note.pitch;
+
+ if (note->signs & _V_EPISEMA) {
+ if ((vpos == VPOS_ABOVE && note->v_episema_height >= height)
+ || (vpos == VPOS_BELOW && note->v_episema_height <= height)) {
+ height = note->v_episema_height;
+ }
+ }
+
+ if (vpos == VPOS_ABOVE && note->choral_sign
+ && !choral_sign_here_is_low(glyph, note, NULL)) {
+ ++height;
+ if (!is_on_a_line(note->u.note.pitch)) {
+ ++height;
+ }
+ }
+
+ return height + (int)vpos;
+}
+
+static bool is_bridgeable_space(const gregorio_element *const element)
+{
+ if (element->type == GRE_SPACE) {
+ switch (element->u.misc.unpitched.info.space) {
+ case SP_NEUMATIC_CUT:
+ case SP_LARGER_SPACE:
+ case SP_NEUMATIC_CUT_NB:
+ case SP_LARGER_SPACE_NB:
+ return true;
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+
+ return false;
+}
+
+typedef struct height_computation {
+ const gregorio_vposition vpos;
+ const gregorio_sign_orientation orientation;
+ bool (*const is_applicable)(const gregorio_note *);
+ bool (*const is_shown)(const gregorio_note *);
+ bool (*const is_connected)(const gregorio_note *);
+ grehepisema_size (*const get_size)(const gregorio_note *);
+ bool (*const is_better_height)(signed char, signed char);
+ void (*const position)(gregorio_note *, signed char, bool);
+
+ bool active;
+ char height;
+ bool connected;
+ const gregorio_element *start_element;
+ const gregorio_glyph *start_glyph;
+ gregorio_note *start_note;
+ const gregorio_element *last_connected_element;
+ const gregorio_glyph *last_connected_glyph;
+ gregorio_note *last_connected_note;
+ unsigned short adjustment_index;
+} height_computation;
+
+static bool is_h_episema_above_applicable(const gregorio_note *const note)
+{
+ return note->h_episema_above || !note->is_lower_note;
+}
+
+static bool is_h_episema_below_applicable(const gregorio_note *const note)
+{
+ return note->h_episema_below || !note->is_upper_note;
+}
+
+bool gtex_is_h_episema_above_shown(const gregorio_note *const note)
+{
+ return note->h_episema_above;
+}
+
+bool gtex_is_h_episema_below_shown(const gregorio_note *const note)
+{
+ return note->h_episema_below;
+}
+
+static bool is_h_episema_above_connected(const gregorio_note *const note)
+{
+ return note->h_episema_above_connect;
+}
+
+static bool is_h_episema_below_connected(const gregorio_note *const note)
+{
+ return note->h_episema_below_connect;
+}
+
+static grehepisema_size get_h_episema_above_size(
+ const gregorio_note *const note)
+{
+ return note->h_episema_above_size;
+}
+
+static grehepisema_size get_h_episema_below_size(
+ const gregorio_note *const note)
+{
+ return note->h_episema_below_size;
+}
+
+static bool is_h_episema_above_better_height(const signed char new_height,
+ const signed char old_height)
+{
+ return new_height > old_height;
+}
+
+static bool is_h_episema_below_better_height(const signed char new_height,
+ const signed char old_height)
+{
+ return new_height < old_height;
+}
+
+static void adjust_h_episema_above_if_better(gregorio_note *const note,
+ signed char potential_height)
+{
+ if (is_h_episema_above_better_height(potential_height,
+ note->h_episema_above)) {
+ note->h_episema_above = potential_height;
+ }
+}
+
+static void adjust_h_episema_below_if_better(gregorio_note *const note,
+ signed char potential_height)
+{
+ if (is_h_episema_below_better_height(potential_height,
+ note->h_episema_below)) {
+ note->h_episema_below = potential_height;
+ }
+}
+
+static __inline bool has_high_ledger_line(const signed char height,
+ bool is_sign, const gregorio_score *const score)
+{
+ if (is_sign) {
+ return height > score->high_ledger_line_pitch;
+ }
+ return height >= score->high_ledger_line_pitch;
+}
+
+static __inline bool has_low_ledger_line(const signed char height, bool is_sign)
+{
+ if (is_sign) {
+ return height < LOW_LEDGER_LINE_PITCH;
+ }
+ return height <= LOW_LEDGER_LINE_PITCH;
+}
+
+static __inline void start_h_episema(height_computation *const h,
+ const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note)
+{
+ h->start_element = element;
+ h->start_glyph = glyph;
+ h->start_note = note;
+ h->active = true;
+ h->height = compute_h_episema_height(glyph, note, h->vpos);
+}
+
+static __inline void position_h_episema(gregorio_note *const note,
+ const height_computation *const h, const bool connect,
+ const bool high_ledger_line, const bool low_ledger_line)
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[h->orientation];
+
+ h->position(note, h->height, connect);
+ if (adjustment_index) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ adjustment_index);
+ if (adj->pitch_extremum == NO_PITCH
+ || h->is_better_height(h->height, adj->pitch_extremum)) {
+ adj->pitch_extremum = h->height;
+ }
+ }
+ if (!note->high_ledger_specificity && !note->high_ledger_line) {
+ note->high_ledger_line = high_ledger_line;
+ }
+ if (!note->low_ledger_specificity && !note->low_ledger_line) {
+ note->low_ledger_line = low_ledger_line;
+ }
+}
+
+static __inline void next_has_ledger_line(
+ const height_computation *const h, bool *high_ledger_line,
+ bool *low_ledger_line)
+{
+ const gregorio_element *element = h->last_connected_element;
+ const gregorio_glyph *glyph = h->last_connected_glyph;
+ gregorio_note *note = h->last_connected_note;
+ bool eat_upper_note = note->is_lower_note, keep_going = false;
+
+ if (!*high_ledger_line || !*low_ledger_line) {
+ /* going forwards, we must iterate through any lower notes */
+ do {
+ note = note->next;
+ if (!note) {
+ do {
+ glyph = glyph->next;
+ if (!glyph) {
+ do {
+ element = element->next;
+ if (!element) {
+ return;
+ }
+ } while (element->type != GRE_ELEMENT);
+ glyph = element->u.first_glyph;
+ }
+ } while (glyph->type != GRE_GLYPH);
+ note = glyph->u.notes.first_note;
+ }
+
+ *high_ledger_line = *high_ledger_line || note->high_ledger_line;
+ *low_ledger_line = *low_ledger_line || note->low_ledger_line;
+
+ if (keep_going) {
+ keep_going = false;
+ }
+ if (eat_upper_note && note->is_upper_note) {
+ eat_upper_note = false;
+ keep_going = true;
+ }
+ } while ((!*high_ledger_line || !*low_ledger_line)
+ && (note->is_lower_note || keep_going));
+ }
+}
+
+static __inline void previous_has_ledger_line(
+ const height_computation *const h, bool *high_ledger_line,
+ bool *low_ledger_line)
+{
+ const gregorio_element *element = h->start_element;
+ const gregorio_glyph *glyph = h->start_glyph;
+ gregorio_note *note = h->start_note;
+ bool eat_lower_note = note->is_upper_note, keep_going = false;
+
+ if (!*high_ledger_line || !*low_ledger_line) {
+ /* going backwards, we must iterate through any upper notes */
+ do {
+ note = note->previous;
+ if (!note) {
+ do {
+ glyph = glyph->previous;
+ if (!glyph) {
+ do {
+ element = element->previous;
+ if (!element) {
+ return;
+ }
+ } while (element->type != GRE_ELEMENT);
+ for (glyph = element->u.first_glyph; glyph->next;
+ glyph = glyph->next) {
+ /* just iterate to find the last glyph */
+ }
+ }
+ } while (glyph->type != GRE_GLYPH);
+ note = gregorio_glyph_last_note(glyph);
+ }
+ *high_ledger_line = *high_ledger_line || note->high_ledger_line;
+ *low_ledger_line = *low_ledger_line || note->low_ledger_line;
+
+ if (keep_going) {
+ keep_going = false;
+ }
+ if (eat_lower_note && note->is_lower_note) {
+ eat_lower_note = false;
+ keep_going = true;
+ }
+ } while ((!*high_ledger_line || !*low_ledger_line)
+ && (note->is_upper_note || keep_going));
+ }
+}
+
+static __inline void set_h_episema_height(const height_computation *const h,
+ gregorio_note *const end, const gregorio_score *const score)
+{
+ gregorio_note *last_note = NULL;
+
+ const gregorio_element *element = h->start_element;
+ const gregorio_glyph *glyph = h->start_glyph;
+ gregorio_note *note = h->start_note;
+
+ bool high_ledger_line = has_high_ledger_line(h->height, true, score)
+ || has_high_ledger_line(h->height - h->vpos, false, score);
+ bool low_ledger_line = has_low_ledger_line(h->height, true)
+ || has_low_ledger_line(h->height - h->vpos, false);
+
+ next_has_ledger_line(h, &high_ledger_line, &low_ledger_line);
+ previous_has_ledger_line(h, &high_ledger_line, &low_ledger_line);
+
+ for ( ; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ for (glyph = glyph? glyph : element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph && glyph->type == GRE_GLYPH) {
+ for (note = note? note : glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (end && note == end) {
+ if (last_note) {
+ position_h_episema(last_note, h, false,
+ high_ledger_line, low_ledger_line);
+ }
+ return;
+ }
+ if (h->is_applicable(note)) {
+ position_h_episema(note, h, true, high_ledger_line,
+ low_ledger_line);
+ last_note = note;
+ }
+ }
+ }
+ }
+ } else if (!is_bridgeable_space(element)) {
+ break;
+ }
+ }
+
+ if (last_note) {
+ position_h_episema(last_note, h, false, high_ledger_line,
+ low_ledger_line);
+ }
+}
+
+static __inline bool is_connected_left(const grehepisema_size size) {
+ return size == H_NORMAL || size == H_SMALL_LEFT;
+}
+
+static __inline bool is_connected_right(const grehepisema_size size) {
+ return size == H_NORMAL || size == H_SMALL_RIGHT;
+}
+
+static __inline bool is_connectable_interglyph_ambitus(const signed char first,
+ const signed char second)
+{
+ return abs(first - second) < 3;
+}
+
+static __inline bool is_connectable_interglyph_notes(
+ const gregorio_note *const first, const gregorio_note *const second)
+{
+ return first && second && is_connectable_interglyph_ambitus(
+ first->u.note.pitch, second->u.note.pitch);
+}
+
+static __inline bool has_space_to_left(const gregorio_note *const note) {
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ return !is_connectable_interglyph_notes(note->previous, note);
+
+ default:
+ return !note->previous;
+ }
+}
+
+static __inline void end_h_episema(height_computation *const h,
+ gregorio_note *const end, const gregorio_score *const score)
+{
+ signed char proposed_height;
+
+ if (h->active) {
+ /* don't let the episema clash with the note before or after */
+ if (is_connected_left(h->get_size(h->start_note))) {
+ if (h->start_note->previous) {
+ if (!has_space_to_left(h->start_note)
+ && h->start_note->previous->type == GRE_NOTE
+ && is_connected_right(h->get_size(
+ h->start_note->previous))) {
+ proposed_height = h->start_note->previous->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ } else {
+ const gregorio_glyph *previous =
+ gregorio_previous_non_texverb_glyph(h->start_glyph);
+ if (previous && previous->type == GRE_GLYPH
+ && is_fused(h->start_glyph->u.notes.liquescentia)) {
+ gregorio_note *note = gregorio_glyph_last_note(
+ h->start_glyph->previous);
+ if (note->type == GRE_NOTE
+ && is_connected_right(h->get_size(note))) {
+ proposed_height = note->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ }
+ }
+ }
+ if (end && end->type == GRE_NOTE && is_connected_left(h->get_size(end))
+ && !(end->u.note.liquescentia & L_DEMINUTUS)
+ && h->last_connected_note
+ && is_connected_right(h->get_size(h->last_connected_note))) {
+ if (h->last_connected_note->next) {
+ if (h->last_connected_note->next->type == GRE_NOTE
+ && !has_space_to_left(h->last_connected_note->next)) {
+ gregorio_note *note;
+ /* this loop checks that it's within the same glyph */
+ for (note = end->previous; note; note = note->previous) {
+ if (note == h->start_note) {
+ proposed_height = end->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height,
+ h->height)) {
+ h->height = proposed_height;
+ }
+ break;
+ }
+ }
+ }
+ } else if (is_fused(end->u.note.liquescentia) && !end->previous) {
+ proposed_height = end->u.note.pitch + h->vpos;
+ if (h->is_better_height(proposed_height, h->height)) {
+ h->height = proposed_height;
+ }
+ }
+ }
+
+ set_h_episema_height(h, end, score);
+
+ h->active = false;
+ h->height = 0;
+ h->connected = false;
+ h->start_element = NULL;
+ h->start_glyph = NULL;
+ h->start_note = NULL;
+ h->last_connected_element = NULL;
+ h->last_connected_glyph = NULL;
+ h->last_connected_note = NULL;
+ }
+}
+
+static __inline void compute_h_episema(height_computation *const h,
+ const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note,
+ const int i, const gtex_type type, const gregorio_score *const score)
+{
+ grehepisema_size size;
+
+ if (h->is_applicable(note)) {
+ if (h->is_shown(note)) {
+ size = h->get_size(note);
+
+ if (h->active) {
+ const signed char next_height = compute_h_episema_height(
+ glyph, note, h->vpos);
+ if (h->connected && is_connected_left(size)
+ && (i != 1 || is_connectable_interglyph_ambitus(
+ next_height, h->height))) {
+ if (h->is_better_height(next_height, h->height)) {
+ h->height = next_height;
+ }
+ }
+ else {
+ end_h_episema(h, note, score);
+ start_h_episema(h, element, glyph, note);
+ }
+ } else {
+ start_h_episema(h, element, glyph, note);
+ }
+
+ h->connected = h->is_connected(note) && is_connected_right(size);
+ h->last_connected_element = element;
+ h->last_connected_glyph = glyph;
+ h->last_connected_note = note;
+ } else {
+ end_h_episema(h, note, score);
+ }
+ } else if (!h->is_shown(note)) {
+ /* special handling for porrectus shapes because of their shape:
+ * the lower note of the porrectus stroke is normally not applicable,
+ * but we have to end the episema on the upper note if the episema
+ * on the lower note is not shown. */
+ switch(type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ if (i == 2) {
+ end_h_episema(h, note, score);
+ }
+ break;
+
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ if (i == 3) {
+ end_h_episema(h, note, score);
+ }
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+}
+
+static __inline void compute_note_positioning(height_computation *const above,
+ height_computation *const below, const gregorio_element *const element,
+ const gregorio_glyph *const glyph, gregorio_note *const note,
+ const int i, const gtex_type type, const gregorio_score *const score)
+{
+ gregorio_vposition default_vpos = advise_positioning(glyph, note, i, type);
+
+ if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ if (default_vpos == VPOS_BELOW) {
+ note->h_episema_above = HEPISEMA_NONE;
+ }
+ else { /* default_vpos == VPOS_ABOVE */
+ note->h_episema_below = HEPISEMA_NONE;
+ }
+ }
+
+ compute_h_episema(above, element, glyph, note, i, type, score);
+ compute_h_episema(below, element, glyph, note, i, type, score);
+}
+
+static __inline int compute_fused_shift(const gregorio_glyph *glyph)
+{
+ int shift;
+ gregorio_note *first_note, *prev_note;
+ const gregorio_glyph *next, *previous;
+ bool next_is_fused;
+
+ if (!glyph || !is_fused(glyph->u.notes.liquescentia)
+ || glyph->type != GRE_GLYPH
+ || !(first_note = glyph->u.notes.first_note)
+ || first_note->type != GRE_NOTE
+ || !(previous = gregorio_previous_non_texverb_glyph(glyph))
+ || previous->type != GRE_GLYPH
+ || previous->u.notes.liquescentia & TAIL_LIQUESCENTIA_MASK
+ || !previous->u.notes.first_note) {
+ /* base conditions prevent fusion */
+ return 0;
+ }
+
+ next = gregorio_next_non_texverb_glyph(glyph);
+ next_is_fused = next && next->type == GRE_GLYPH
+ && is_fused(next->u.notes.liquescentia);
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_PORRECTUS:
+ case G_PODATUS:
+ if (next_is_fused) {
+ return 0;
+ }
+ /* else it may be fused to the previous note */
+ break;
+
+ case G_PUNCTUM:
+ case G_FLEXA:
+ /* these may be fused to the previous note */
+ break;
+
+ default:
+ /* anything else may not be fused to the previous note */
+ return 0;
+ }
+
+ switch (first_note->u.note.shape) {
+ case S_QUILISMA:
+ case S_QUILISMA_QUADRATUM:
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ /* if this glyph starts with one of these, it's not fusible */
+ return 0;
+
+ default:
+ /* anything else is potentially fusible */
+ break;
+ }
+
+ switch (previous->u.notes.glyph_type) {
+ case G_PUNCTUM:
+ case G_FLEXA:
+ case G_VIRGA_REVERSA:
+ /* these are potentially fusible to this note */
+ break;
+
+ default:
+ /* everything else is not fusible */
+ return 0;
+ }
+
+ prev_note = gregorio_glyph_last_note(previous);
+
+ gregorio_assert(prev_note->type == GRE_NOTE, compute_fused_shift,
+ "previous note wasn't a note", return 0);
+
+ shift = first_note->u.note.pitch - prev_note->u.note.pitch;
+ gregorio_assert(shift >= -MAX_AMBITUS && shift <= MAX_AMBITUS,
+ compute_fused_shift, "ambitus too large to fuse", return 0);
+
+ if (shift > 0 && previous->u.notes.glyph_type == G_VIRGA_REVERSA) {
+ /* virga reversa cannot fuse upwards */
+ return 0;
+ }
+
+ if (shift < 0) {
+ if (glyph->u.notes.glyph_type == G_PODATUS) {
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ /* podatus deminutus may be fused from above */
+ return shift;
+ }
+ switch (first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ return shift;
+ default:
+ /* otherwise, podatus may not be fused from above */
+ return 0;
+ }
+ }
+
+ /* the FLEXA check below checks for a porrectus-like flexus, which is
+ * not fusible from above */
+ if ((next_is_fused && glyph->u.notes.glyph_type == G_FLEXA)
+ || glyph->u.notes.glyph_type == G_PORRECTUS
+ || (previous->u.notes.glyph_type == G_PUNCTUM
+ && is_initio_debilis(previous->u.notes.liquescentia))) {
+ /* may not be fused from above */
+ return 0;
+ }
+ }
+
+ return shift;
+}
+
+void gregoriotex_compute_positioning(
+ const gregorio_element *const param_element,
+ const gregorio_score *const score)
+{
+ height_computation above = {
+ /*.vpos =*/ VPOS_ABOVE,
+ /*.orientation =*/ SO_OVER,
+ /*.is_applicable =*/ &is_h_episema_above_applicable,
+ /*.is_shown =*/ &gtex_is_h_episema_above_shown,
+ /*.is_connected =*/ &is_h_episema_above_connected,
+ /*.get_size =*/ &get_h_episema_above_size,
+ /*.is_better_height =*/ &is_h_episema_above_better_height,
+ /*.position =*/ &gregorio_position_h_episema_above,
+
+ /*.active =*/ false,
+ /*.height =*/ 0,
+ /*.connected =*/ false,
+ /*.start_element =*/ NULL,
+ /*.start_glyph =*/ NULL,
+ /*.start_note =*/ NULL,
+ /*.last_connected_element =*/ NULL,
+ /*.last_connected_glyph =*/ NULL,
+ /*.last_connected_note =*/ NULL,
+ /*.adjustment_index =*/ 0,
+ };
+ height_computation below = {
+ /*.vpos =*/ VPOS_BELOW,
+ /*.orientation =*/ SO_UNDER,
+ /*.is_applicable =*/ &is_h_episema_below_applicable,
+ /*.is_shown =*/ &gtex_is_h_episema_below_shown,
+ /*.is_connected =*/ &is_h_episema_below_connected,
+ /*.get_size =*/ &get_h_episema_below_size,
+ /*.is_better_height =*/ &is_h_episema_below_better_height,
+ /*.position =*/ &gregorio_position_h_episema_below,
+
+ /*.active =*/ false,
+ /*.height =*/ 0,
+ /*.connected =*/ false,
+ /*.start_element =*/ NULL,
+ /*.start_glyph =*/ NULL,
+ /*.start_note =*/ NULL,
+ /*.last_connected_element =*/ NULL,
+ /*.last_connected_glyph =*/ NULL,
+ /*.last_connected_note =*/ NULL,
+ /*.adjustment_index =*/ 0,
+ };
+ int i;
+ gtex_alignment ignored;
+ gtex_type type;
+ const gregorio_element *element;
+
+ for (element = param_element; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ gregorio_note *note;
+ glyph->u.notes.fuse_to_next_glyph = compute_fused_shift(
+ gregorio_next_non_texverb_glyph(glyph));
+ i = 0;
+ gregoriotex_determine_glyph_name(glyph, &ignored, &type);
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (note->type == GRE_NOTE) {
+ compute_note_positioning(&above, &below, element,
+ glyph, note, ++i, type, score);
+ }
+ }
+ }
+ }
+ } else if (!is_bridgeable_space(element)) {
+ end_h_episema(&above, NULL, score);
+ end_h_episema(&below, NULL, score);
+ }
+ }
+ end_h_episema(&above, NULL, score);
+ end_h_episema(&below, NULL, score);
+}
+
+static __inline void adjust_hepisema(gregorio_note *const note,
+ const gregorio_sign_orientation orientation,
+ bool (*const is_shown)(const gregorio_note *),
+ void (*const adjust_if_better)(gregorio_note *, signed char))
+{
+ const unsigned short adjustment_index =
+ note->he_adjustment_index[orientation];
+
+ if (adjustment_index && is_shown(note)) {
+ gregorio_hepisema_adjustment *adj = gregorio_get_hepisema_adjustment(
+ adjustment_index);
+
+ adjust_if_better(note, adj->pitch_extremum);
+ }
+}
+
+void gregoriotex_compute_cross_syllable_positioning(
+ const gregorio_score *const score)
+{
+ gregorio_syllable *syllable;
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregorio_element *element;
+ for (element = syllable->elements[voice]; element;
+ element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ gregorio_note *note;
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ if (note->type == GRE_NOTE) {
+ adjust_hepisema(note, SO_OVER,
+ gtex_is_h_episema_above_shown,
+ adjust_h_episema_above_if_better);
+ adjust_hepisema(note, SO_UNDER,
+ gtex_is_h_episema_below_shown,
+ adjust_h_episema_below_if_better);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c
new file mode 100644
index 00000000000..1f9b915a7e4
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex-write.c
@@ -0,0 +1,4539 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions for writing GregorioTeX from Gregorio structures.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/**
+ * @file
+ * @brief The plugin which writes a GregorioTeX score.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "characters.h"
+#include "plugins.h"
+#include "support.h"
+#include "utf8strings.h"
+
+#include "gregoriotex.h"
+
+#define BUFSIZE 128
+
+/* a structure containing the status */
+typedef struct gregoriotex_status {
+ bool point_and_click;
+
+ /* true if the current_glyph will have an additional line under or not
+ * (useful to determine the length of the bar in case of a flexa starting
+ * at d */
+ bool bottom_line;
+
+ signed char top_height;
+ signed char bottom_height;
+
+ /* indicates if there is a translation on the line */
+ bool translation;
+
+ /* indicates if there is "above lines text" on the line */
+ bool abovelinestext;
+
+ bool suppressed_custos;
+} gregoriotex_status;
+
+#define UNDETERMINED_HEIGHT -127
+
+#define MAX_AMBITUS 5
+static const char *tex_ambitus[] = {
+ "", "One", "Two", "Three", "Four", "Five"
+};
+
+#define SHAPE(NAME) static const char *const SHAPE_##NAME = #NAME
+SHAPE(Ancus);
+SHAPE(AncusLongqueue);
+SHAPE(AscendensOriscus);
+SHAPE(AscendensOriscusLineBL);
+SHAPE(AscendensOriscusLineTL);
+SHAPE(AscendensOriscusScapus);
+SHAPE(AscendensOriscusScapusLongqueue);
+SHAPE(AscendensOriscusScapusOpenqueue);
+SHAPE(AscendensPunctumInclinatum);
+SHAPE(DescendensOriscus);
+SHAPE(DescendensOriscusLineBL);
+SHAPE(DescendensOriscusLineTL);
+SHAPE(DescendensOriscusScapus);
+SHAPE(DescendensOriscusScapusLongqueue);
+SHAPE(DescendensOriscusScapusOpenqueue);
+SHAPE(DescendensPunctumInclinatum);
+SHAPE(Flat);
+SHAPE(Flexus);
+SHAPE(FlexusLongqueue);
+SHAPE(FlexusNobar);
+SHAPE(FlexusOpenqueue);
+SHAPE(FlexusOriscus);
+SHAPE(FlexusOriscusInusitatus);
+SHAPE(FlexusOriscusScapus);
+SHAPE(FlexusOriscusScapusInusitatus);
+SHAPE(FlexusOriscusScapusInusitatusLongqueue);
+SHAPE(FlexusOriscusScapusInusitatusOpenqueue);
+SHAPE(FlexusOriscusScapusLongqueue);
+SHAPE(FlexusOriscusScapusOpenqueue);
+SHAPE(Linea);
+SHAPE(LineaPunctum);
+SHAPE(Natural);
+SHAPE(OriscusDeminutus);
+SHAPE(Pes);
+SHAPE(PesAscendensOriscus);
+SHAPE(PesDescendensOriscus);
+SHAPE(PesQuadratum);
+SHAPE(PesQuadratumLongqueue);
+SHAPE(PesQuadratumOpenqueue);
+SHAPE(PesQuassus);
+SHAPE(PesQuassusInusitatus);
+SHAPE(PesQuassusInusitatusLongqueue);
+SHAPE(PesQuassusInusitatusOpenqueue);
+SHAPE(PesQuassusLongqueue);
+SHAPE(PesQuassusOpenqueue);
+SHAPE(Porrectus);
+SHAPE(PorrectusFlexus);
+SHAPE(PorrectusFlexusLongqueue);
+SHAPE(PorrectusFlexusNobar);
+SHAPE(PorrectusLongqueue);
+SHAPE(PorrectusNobar);
+SHAPE(Punctum);
+SHAPE(PunctumAscendens);
+SHAPE(PunctumDeminutus);
+SHAPE(PunctumDescendens);
+SHAPE(PunctumInclinatumAuctus);
+SHAPE(PunctumInclinatumDeminutus);
+SHAPE(PunctumLineBL);
+SHAPE(PunctumLineTL);
+SHAPE(Quilisma);
+SHAPE(QuilismaPes);
+SHAPE(QuilismaPesQuadratum);
+SHAPE(QuilismaPesQuadratumLongqueue);
+SHAPE(QuilismaPesQuadratumOpenqueue);
+SHAPE(StansPunctumInclinatum);
+SHAPE(Salicus);
+SHAPE(SalicusFlexus);
+SHAPE(SalicusLongqueue);
+SHAPE(Scandicus);
+SHAPE(Sharp);
+SHAPE(Stropha);
+SHAPE(StrophaAucta);
+SHAPE(StrophaAuctaLongtail);
+SHAPE(Torculus);
+SHAPE(TorculusLiquescens);
+SHAPE(TorculusLiquescensQuilisma);
+SHAPE(TorculusQuilisma);
+SHAPE(TorculusResupinus);
+SHAPE(TorculusResupinusQuilisma);
+SHAPE(Virga);
+SHAPE(VirgaLongqueue);
+SHAPE(VirgaOpenqueue);
+SHAPE(VirgaReversa);
+SHAPE(VirgaReversaAscendens);
+SHAPE(VirgaReversaDescendens);
+SHAPE(VirgaReversaLongqueue);
+SHAPE(VirgaReversaLongqueueAscendens);
+SHAPE(VirgaReversaLongqueueDescendens);
+SHAPE(VirgaReversaOpenqueue);
+SHAPE(VirgaReversaOpenqueueAscendens);
+SHAPE(VirgaReversaOpenqueueDescendens);
+
+#define LIQ(NAME) static const char *const LIQ_##NAME = #NAME
+LIQ(Deminutus);
+LIQ(Ascendens);
+LIQ(Descendens);
+LIQ(InitioDebilis);
+LIQ(InitioDebilisDeminutus);
+LIQ(InitioDebilisAscendens);
+LIQ(InitioDebilisDescendens);
+LIQ(Nothing);
+
+#define FUSE(NAME) static const char *const FUSE_##NAME = #NAME
+FUSE(Lower);
+FUSE(LowerOblatus);
+FUSE(Upper);
+FUSE(UpperOblatus);
+FUSE(Down);
+FUSE(Up);
+
+/* the value indicating to GregorioTeX that there is no flat */
+#define NO_KEY_FLAT LOWEST_PITCH
+
+static __inline signed char pitch_value(const signed char height) {
+ /* right now height == pitch, but this function allows us to change
+ * the offset easily */
+ return height;
+}
+
+static __inline int bool_to_int(bool value) {
+ return value? 1 : 0;
+}
+
+typedef enum queuetype {
+ Q_ON_SPACE_BELOW_BOTTOM_LINE,
+ Q_ON_SPACE_ABOVE_BOTTOM_LINE,
+ Q_ON_BOTTOM_LINE,
+ Q_ON_LINE_ABOVE_BOTTOM_LINE
+} queuetype;
+
+static queuetype adjusted_queuetype_of(const gregorio_note *const note,
+ const gregorio_note *const queue_note, const signed char adjustment)
+{
+ switch (note->u.note.pitch + adjustment - LOWEST_PITCH) {
+ case 0:
+ return Q_ON_SPACE_BELOW_BOTTOM_LINE;
+ case 1:
+ return Q_ON_BOTTOM_LINE;
+ case 2:
+ return queue_note->low_ledger_line?
+ Q_ON_SPACE_ABOVE_BOTTOM_LINE : Q_ON_SPACE_BELOW_BOTTOM_LINE;
+ case 3:
+ return queue_note->low_ledger_line?
+ Q_ON_LINE_ABOVE_BOTTOM_LINE : Q_ON_BOTTOM_LINE;
+ case 5:
+ case 7:
+ case 9:
+ case 11:
+ case 13:
+ return Q_ON_LINE_ABOVE_BOTTOM_LINE;
+ default:
+ return Q_ON_SPACE_ABOVE_BOTTOM_LINE;
+ }
+}
+
+static queuetype queuetype_of(const gregorio_note *const note) {
+ return adjusted_queuetype_of(note, note, 0);
+}
+
+static grestyle_style gregoriotex_ignore_style = ST_NO_STYLE;
+static grestyle_style gregoriotex_next_ignore_style = ST_NO_STYLE;
+
+/*
+ * The different liquescentiae are:
+ * 'Nothing'
+ * 'InitioDebilis'
+ * 'Deminutus
+ * 'Ascendens'
+ * 'Descendens'
+ * 'InitioDebilisDeminutus'
+ * 'InitioDebilisAscendens'
+ * 'InitioDebilisDescendens'
+ *
+ * They also are and must be the same as in squarize.py.
+ */
+
+static const char *gregoriotex_determine_liquescentia(
+ gtex_glyph_liquescentia type, const gregorio_glyph *const glyph)
+{
+ gregorio_liquescentia liquescentia = glyph->u.notes.liquescentia;
+
+ switch (type) {
+ case LG_ALL:
+ break;
+ case LG_NO_INITIO:
+ liquescentia &= ~L_INITIO_DEBILIS;
+ break;
+ case LG_ONLY_DEMINUTUS:
+ liquescentia &= L_INITIO_DEBILIS | L_DEMINUTUS;
+ break;
+ case LG_FUSIBLE_INITIO:
+ if (glyph->u.notes.fuse_to_next_glyph) {
+ liquescentia &= L_INITIO_DEBILIS;
+ break;
+ }
+ /* else fall through to next case */
+ case LG_NONE:
+ liquescentia = L_NO_LIQUESCENTIA;
+ break;
+ }
+
+ /* now we convert liquescentia into the good GregorioTeX liquescentia
+ * numbers */
+
+ switch (liquescentia & ~L_FUSED) {
+ case L_DEMINUTUS:
+ return LIQ_Deminutus;
+ case L_AUCTUS_ASCENDENS:
+ return LIQ_Ascendens;
+ case L_AUCTUS_DESCENDENS:
+ return LIQ_Descendens;
+ case L_INITIO_DEBILIS:
+ return LIQ_InitioDebilis;
+ case L_DEMINUTUS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisDeminutus;
+ case L_AUCTUS_ASCENDENS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisAscendens;
+ case L_AUCTUS_DESCENDENS_INITIO_DEBILIS:
+ return LIQ_InitioDebilisDescendens;
+ case L_NO_LIQUESCENTIA:
+ /* break out and return "Nothing" */
+ break;
+ }
+
+ return LIQ_Nothing;
+}
+
+static __inline int compute_ambitus(const gregorio_note *const current_note)
+{
+ int first = current_note->u.note.pitch;
+ int second = current_note->next->u.note.pitch;
+ int ambitus;
+ if (first < second) {
+ ambitus = second - first;
+ } else {
+ ambitus = first - second;
+ }
+ gregorio_assert2(ambitus >= 1 && ambitus <= MAX_AMBITUS, compute_ambitus,
+ "unsupported ambitus: %d", ambitus, return 0);
+ return ambitus;
+}
+
+static const char *compute_glyph_name(const gregorio_glyph *const glyph,
+ const char *shape, const gtex_glyph_liquescentia ltype,
+ bool is_single_note)
+{
+ static char buf[BUFSIZE];
+
+ const char *liquescentia = gregoriotex_determine_liquescentia(ltype, glyph);
+ const gregorio_note *current_note;
+ int ambitus1, ambitus2, ambitus3, fuse_ambitus = 0;
+ const char *fuse_head = "", *fuse_tail = "";
+ const gregorio_glyph *previous = gregorio_previous_non_texverb_glyph(glyph);
+ int fuse_to_next_note, fuse_from_previous_note =
+ (previous && previous->type == GRE_GLYPH)
+ ? previous->u.notes.fuse_to_next_glyph : 0;
+
+ /* then we start making our formula */
+ gregorio_assert(glyph, compute_glyph_name, "called with NULL pointer",
+ return "");
+ gregorio_assert(glyph->u.notes.first_note, compute_glyph_name,
+ "called with a glyph that have no note", return "");
+
+ fuse_to_next_note = glyph->u.notes.fuse_to_next_glyph;
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ case G_PUNCTUM:
+ case G_FLEXA:
+ /* directionally head-fusible */
+ if (fuse_from_previous_note < 0) {
+ if (glyph->u.notes.first_note->u.note.shape != S_QUILISMA
+ && glyph->u.notes.first_note->u.note.shape
+ != S_QUILISMA_QUADRATUM) {
+ if (fuse_from_previous_note < -1) {
+ fuse_head = FUSE_Lower;
+ } else if (glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_DESCENDENS
+ || glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_SCAPUS_DESCENDENS) {
+ /* fuse_from_previous_note will be -1 here */
+ fuse_head = FUSE_LowerOblatus;
+ }
+ }
+ } else if (fuse_from_previous_note > 0) {
+ if (fuse_from_previous_note > 1) {
+ fuse_head = FUSE_Upper;
+ } else if (glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_ASCENDENS
+ || glyph->u.notes.first_note->u.note.shape
+ == S_ORISCUS_SCAPUS_ASCENDENS) {
+ /* fuse_from_previous_note will be 1 here */
+ fuse_head = FUSE_UpperOblatus;
+ }
+ }
+ break;
+
+ default:
+ /* not directionally head-fusible */
+ break;
+ }
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ if (fuse_to_next_note <= 0) {
+ /* a flexa is only fusible up */
+ break;
+ }
+ /* else fall through */
+ case G_VIRGA_REVERSA:
+ case G_PUNCTUM:
+ /* tail-fusible */
+ if (fuse_to_next_note < 0) {
+ fuse_tail = FUSE_Down;
+ fuse_ambitus = -fuse_to_next_note;
+ } else if (fuse_to_next_note > 0) {
+ fuse_tail = FUSE_Up;
+ fuse_ambitus = fuse_to_next_note;
+ }
+
+ if (*fuse_tail && liquescentia == LIQ_Nothing) {
+ liquescentia = "";
+ }
+ break;
+
+ default:
+ /* not tail-fusible */
+ break;
+ }
+
+ if (is_fused(glyph->u.notes.liquescentia)) {
+ if (shape == SHAPE_AscendensOriscusScapus
+ || shape == SHAPE_AscendensOriscusScapusLongqueue
+ || shape == SHAPE_AscendensOriscusScapusOpenqueue) {
+ shape = SHAPE_AscendensOriscus;
+ } else if (shape == SHAPE_DescendensOriscusScapus
+ || shape == SHAPE_DescendensOriscusScapusLongqueue
+ || shape == SHAPE_DescendensOriscusScapusOpenqueue) {
+ shape = SHAPE_DescendensOriscus;
+ } else if (shape == SHAPE_FlexusOriscusScapus
+ || shape == SHAPE_FlexusOriscusScapusLongqueue
+ || shape == SHAPE_FlexusOriscusScapusOpenqueue) {
+ shape = SHAPE_FlexusOriscus;
+ } else if (shape == SHAPE_FlexusOriscusScapusInusitatus
+ || shape == SHAPE_FlexusOriscusScapusInusitatusLongqueue
+ || shape == SHAPE_FlexusOriscusScapusInusitatusOpenqueue) {
+ shape = SHAPE_FlexusOriscusInusitatus;
+ }
+ }
+
+ current_note = glyph->u.notes.first_note;
+ if (is_single_note) {
+ if (liquescentia == LIQ_Nothing) {
+ liquescentia = "";
+ }
+ if (!(*fuse_tail) && fuse_head != FUSE_UpperOblatus
+ && fuse_head != FUSE_LowerOblatus) {
+ /* single note fused shapes have weird names */
+ if (fuse_head == FUSE_Upper) {
+ if (shape == SHAPE_Punctum) {
+ shape = SHAPE_PunctumLineBL;
+ } else if (shape == SHAPE_AscendensOriscus) {
+ shape = SHAPE_AscendensOriscusLineBL;
+ } else if (shape == SHAPE_DescendensOriscus) {
+ shape = SHAPE_DescendensOriscusLineBL;
+ }
+ } else if (fuse_head == FUSE_Lower) {
+ if (shape == SHAPE_Punctum) {
+ shape = SHAPE_PunctumLineTL;
+ } else if (shape == SHAPE_AscendensOriscus) {
+ shape = SHAPE_AscendensOriscusLineTL;
+ } else if (shape == SHAPE_DescendensOriscus) {
+ shape = SHAPE_DescendensOriscusLineTL;
+ }
+ }
+ fuse_head = "";
+ }
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert(current_note->next, compute_glyph_name,
+ "called with a multi-note glyph that has only one note", return "");
+ gregorio_assert((ambitus1 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ if (is_fused(glyph->u.notes.liquescentia)) {
+ if (shape == SHAPE_Flexus || shape == SHAPE_FlexusLongqueue
+ || shape == SHAPE_FlexusOpenqueue) {
+ if (fuse_to_next_note) {
+ fuse_head = "";
+ }
+ if (*fuse_head) {
+ shape = SHAPE_Flexus;
+ } else {
+ shape = SHAPE_FlexusNobar;
+ }
+ } else if (shape == SHAPE_Porrectus
+ || shape == SHAPE_PorrectusLongqueue) {
+ shape = SHAPE_PorrectusNobar;
+ }
+ } else {
+ if (fuse_to_next_note && (shape == SHAPE_FlexusLongqueue
+ || shape == SHAPE_FlexusOpenqueue)) {
+ /* a porrectus-like flexus has no longqueue variant */
+ shape = SHAPE_Flexus;
+ }
+ }
+ if (shape == SHAPE_SalicusLongqueue && liquescentia != LIQ_Nothing) {
+ /* the salicus queue is at the end of the glyph, and it doesn't exist
+ * for the liquescent forms */
+ shape = SHAPE_Salicus;
+ }
+ current_note = current_note->next;
+ if (!current_note->next) {
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[fuse_ambitus],
+ liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert((ambitus2 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ current_note = current_note->next;
+ if (!current_note->next) {
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[ambitus2],
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+ }
+ gregorio_assert((ambitus3 = compute_ambitus(current_note)),
+ compute_glyph_name, "unexpected unison on multi-note glyph",
+ return "");
+ gregorio_snprintf(buf, BUFSIZE, "%s%s%s%s%s%s%s%s", fuse_head, shape,
+ tex_ambitus[ambitus1], tex_ambitus[ambitus2], tex_ambitus[ambitus3],
+ tex_ambitus[fuse_ambitus], liquescentia, fuse_tail);
+ return buf;
+}
+
+static const char *fusible_queued_shape(const gregorio_note *const note,
+ const gregorio_glyph *const glyph,
+ const char *const base_shape, const char *const longqueue_shape,
+ const char *const openqueue_shape)
+{
+ const char *name = NULL;
+ if (glyph->u.notes.fuse_to_next_glyph < 0) {
+ /* queue size depends on the following note if fused down */
+ bool ambitus_one = (glyph->u.notes.fuse_to_next_glyph == -1);
+ switch (adjusted_queuetype_of(note, note,
+ glyph->u.notes.fuse_to_next_glyph)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ name = openqueue_shape;
+ break;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a space is longer than on a line */
+ name = ambitus_one? longqueue_shape : base_shape;
+ break;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ name = openqueue_shape;
+ break;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a line is shorter than on a space */
+ name = ambitus_one? base_shape : longqueue_shape;
+ break;
+ }
+ } else if (glyph->u.notes.fuse_to_next_glyph) {
+ /* TODO (5.0?) handle queue size on upwards fusion */
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ name = base_shape;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = longqueue_shape;
+ break;
+ }
+ } else {
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ name = base_shape;
+ break;
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ name = openqueue_shape;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = longqueue_shape;
+ break;
+ }
+ }
+ gregorio_not_null(name, fusible_queued_shape, return base_shape);
+ return compute_glyph_name(glyph, name, LG_NONE, true);
+}
+
+static __inline char *code_point(const char *const shape, const bool is_cavum,
+ char *const buf, const size_t bufsize)
+{
+ if (is_cavum) {
+ gregorio_snprintf(buf, bufsize, "\\GreCavum{%s}", shape);
+ } else {
+ gregorio_snprintf(buf, bufsize, "\\GreCP%s", shape);
+ }
+ return buf;
+}
+
+static const char *determine_note_glyph_name(const gregorio_note *const note,
+ const gregorio_glyph *glyph, gtex_alignment *type)
+{
+ static char buf[128], cpbuf[96];
+ const char *name = "";
+
+ gregorio_assert(note, determine_note_glyph_name, "called with NULL pointer",
+ return "");
+
+ *type = AT_ONE_NOTE;
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_AscendensPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_StansPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ *type = AT_PUNCTUM_INCLINATUM;
+ return SHAPE_DescendensPunctumInclinatum;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ return SHAPE_PunctumInclinatumDeminutus;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ return SHAPE_PunctumInclinatumAuctus;
+ case S_PUNCTUM:
+ return compute_glyph_name(glyph, SHAPE_Punctum, LG_FUSIBLE_INITIO, true);
+ case S_PUNCTUM_AUCTUS_ASCENDENS:
+ return SHAPE_PunctumAscendens;
+ case S_PUNCTUM_AUCTUS_DESCENDENS:
+ return SHAPE_PunctumDescendens;
+ case S_PUNCTUM_DEMINUTUS:
+ return SHAPE_PunctumDeminutus;
+ case S_LINEA:
+ return SHAPE_Linea;
+ case S_LINEA_PUNCTUM:
+ return SHAPE_LineaPunctum;
+ case S_VIRGA:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_Virga;
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ return SHAPE_VirgaOpenqueue;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaLongqueue;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ case S_VIRGA_REVERSA:
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaAscendens;
+ break;
+ case Q_ON_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaOpenqueueAscendens;
+ break;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ name = SHAPE_VirgaReversaLongqueueAscendens;
+ break;
+ }
+ if (note->u.note.pitch - LOWEST_PITCH == 3) {
+ /* if we're on the 'd' line, the queue could be long or short */
+ gregorio_snprintf(buf, sizeof buf,
+ "VirgaReversaAscendensOnDLine{%s}", code_point(name,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf));
+ return buf;
+ }
+ return name;
+ case L_AUCTUS_DESCENDENS:
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaReversaDescendens;
+ case Q_ON_BOTTOM_LINE:
+ return SHAPE_VirgaReversaOpenqueueDescendens;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_VirgaReversaLongqueueDescendens;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ default:
+ return fusible_queued_shape(note, glyph, SHAPE_VirgaReversa,
+ SHAPE_VirgaReversaLongqueue, SHAPE_VirgaReversaOpenqueue);
+ }
+ case S_ORISCUS_ASCENDENS:
+ *type = AT_ORISCUS;
+ return compute_glyph_name(glyph, SHAPE_AscendensOriscus, LG_NONE, true);
+ case S_ORISCUS_DESCENDENS:
+ *type = AT_ORISCUS;
+ return compute_glyph_name(glyph, SHAPE_DescendensOriscus, LG_NONE, true);
+ case S_ORISCUS_DEMINUTUS:
+ *type = AT_ORISCUS;
+ return SHAPE_OriscusDeminutus;
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ return compute_glyph_name(glyph, SHAPE_Quilisma, LG_NONE, true);
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ return fusible_queued_shape(note, glyph, SHAPE_AscendensOriscusScapus,
+ SHAPE_AscendensOriscusScapusLongqueue,
+ SHAPE_AscendensOriscusScapusOpenqueue);
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ return fusible_queued_shape(note, glyph, SHAPE_DescendensOriscusScapus,
+ SHAPE_DescendensOriscusScapusLongqueue,
+ SHAPE_DescendensOriscusScapusOpenqueue);
+ case S_STROPHA:
+ *type = AT_STROPHA;
+ if (!(note->u.note.liquescentia &
+ (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS))) {
+ return SHAPE_Stropha;
+ }
+ /* else fall through to next case */
+ case S_STROPHA_AUCTA:
+ *type = AT_STROPHA;
+ switch (queuetype_of(note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ return SHAPE_StrophaAucta;
+ case Q_ON_BOTTOM_LINE:
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return SHAPE_StrophaAuctaLongtail;
+ } /* all cases return, so this line is not hit; LCOV_EXCL_LINE */
+ case S_FLAT:
+ return SHAPE_Flat;
+ case S_SHARP:
+ return SHAPE_Sharp;
+ case S_NATURAL:
+ return SHAPE_Natural;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(determine_note_glyph_name,
+ "called with unknown shape: %s",
+ gregorio_shape_to_string(note->u.note.shape));
+ return "";
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static __inline gregorio_note *first_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ return glyph->u.notes.first_note;
+}
+
+static __inline signed char first_pitch_of(const gregorio_glyph *const glyph) {
+ return first_note_of(glyph)->u.note.pitch;
+}
+
+static __inline gregorio_note *second_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next);
+ assert(glyph->u.notes.first_note->next->type == GRE_NOTE);
+ return glyph->u.notes.first_note->next;
+}
+
+static __inline signed char second_pitch_of(const gregorio_glyph *const glyph) {
+ return second_note_of(glyph)->u.note.pitch;
+}
+
+static __inline gregorio_note *third_note_of(
+ const gregorio_glyph *const glyph) {
+ assert(glyph->type == GRE_GLYPH);
+ assert(glyph->u.notes.first_note);
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next);
+ assert(glyph->u.notes.first_note->next->type == GRE_NOTE);
+ assert(glyph->u.notes.first_note->next->next);
+ assert(glyph->u.notes.first_note->next->next->type == GRE_NOTE);
+ return glyph->u.notes.first_note->next->next;
+}
+
+static __inline signed char third_pitch_of(const gregorio_glyph *const glyph) {
+ return third_note_of(glyph)->u.note.pitch;
+}
+
+static __inline const char *porrectus_shape(const gregorio_glyph *const glyph,
+ const char *base_shape, const char *longqueue_shape) {
+ const gregorio_note *const first_note = first_note_of(glyph);
+ if ((glyph->u.notes.glyph_type == G_PORRECTUS
+ && (glyph->u.notes.liquescentia & L_DEMINUTUS))
+ || first_note->u.note.pitch - second_pitch_of(glyph) == 1) {
+ switch (queuetype_of(first_note)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ case Q_ON_BOTTOM_LINE:
+ return base_shape;
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ return longqueue_shape;
+ }
+ } /* must be optimized out; LCOV_EXCL_LINE */
+ return base_shape;
+}
+
+static __inline const char *flexus_shape(const gregorio_glyph *const glyph,
+ const signed char ambitus, const char *base_shape,
+ const char *longqueue_shape, const char *openqueue_shape) {
+ const bool ambitus_one = (ambitus == 1);
+ switch (adjusted_queuetype_of(second_note_of(glyph), first_note_of(glyph),
+ 0)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a space is longer than on a line */
+ return ambitus_one? longqueue_shape : base_shape;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue where
+ * the second note is on a line is shorter than on a space */
+ return ambitus_one? base_shape : longqueue_shape;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(flexus_shape, "unexpected queue length");
+ return base_shape;
+ /* LCOV_EXCL_STOP */
+}
+
+static __inline const char *quadratum_shape(const gregorio_glyph *const glyph,
+ const char *base_shape, const char *longqueue_shape,
+ const char *openqueue_shape) {
+ const bool ambitus_one =
+ (second_pitch_of(glyph) - first_pitch_of(glyph) == 1);
+ if (!is_tail_liquescentia(glyph->u.notes.liquescentia)) {
+ switch (adjusted_queuetype_of(first_note_of(glyph),
+ second_note_of(glyph), 0)) {
+ case Q_ON_SPACE_BELOW_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_SPACE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue
+ * where the first note is on a space is longer than on a line */
+ return ambitus_one? longqueue_shape : base_shape;
+ case Q_ON_BOTTOM_LINE:
+ if (ambitus_one) {
+ return openqueue_shape;
+ }
+ /* else fall through */
+ case Q_ON_LINE_ABOVE_BOTTOM_LINE:
+ /* at ambitus one, long and short are swapped becuase the queue
+ * where the first note is on a line is shorter than on a space */
+ return ambitus_one? base_shape : longqueue_shape;
+ }
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(quadratum_shape, "unexpected queue length");
+ /* fall out of the conditional */
+ }
+ /* LCOV_EXCL_STOP */
+ return base_shape;
+}
+
+/* the function that calculates the number of the glyph. It also
+ * calculates the type, used for determining the position of signs. Type is
+ * very basic, it is only the global dimensions : torculus, one_note, etc. */
+
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+ gtex_alignment *const type, gtex_type *const gtype)
+{
+ const char *shape = NULL;
+ gtex_glyph_liquescentia ltype;
+ signed char ambitus;
+ const gregorio_note *second_note;
+ gregorio_assert(glyph, gregoriotex_determine_glyph_name,
+ "called with NULL pointer", return "");
+ gregorio_assert(glyph->u.notes.first_note, gregoriotex_determine_glyph_name,
+ "called with a glyph that has no note", return "");
+ *gtype = T_ONE_NOTE;
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ /* the next if is because we made the choice that AUCTUS shapes
+ * look like pes quadratum. */
+ if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ *gtype = T_QUILISMA_PES_QUADRATUM;
+ shape = SHAPE_QuilismaPesQuadratum;
+ } else {
+ *gtype = T_QUILISMA_PES;
+ shape = SHAPE_QuilismaPes;
+ }
+ ltype = LG_NO_INITIO;
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ *type = AT_ORISCUS;
+ *gtype = T_PES_QUASSUS;
+ shape = quadratum_shape(glyph, SHAPE_PesQuassus,
+ SHAPE_PesQuassusLongqueue, SHAPE_PesQuassusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ *type = AT_ORISCUS;
+ *gtype = T_PES_QUASSUS;
+ shape = quadratum_shape(glyph, SHAPE_PesQuassusInusitatus,
+ SHAPE_PesQuassusInusitatusLongqueue,
+ SHAPE_PesQuassusInusitatusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ default:
+ *type = AT_ONE_NOTE;
+ if (glyph->u.notes.liquescentia
+ & (L_AUCTUS_ASCENDENS | L_AUCTUS_DESCENDENS)) {
+ *gtype = T_PES_QUADRATUM;
+ shape = SHAPE_PesQuadratum;
+ } else {
+ *gtype = T_PES;
+ shape = SHAPE_Pes;
+ }
+ ltype = LG_ALL;
+ break;
+ }
+ break;
+ case G_PES_QUADRATUM:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ *type = AT_QUILISMA;
+ *gtype = T_QUILISMA_PES_QUADRATUM;
+ shape = quadratum_shape(glyph, SHAPE_QuilismaPesQuadratum,
+ SHAPE_QuilismaPesQuadratumLongqueue,
+ SHAPE_QuilismaPesQuadratumOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ default:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_QUADRATUM;
+ shape = quadratum_shape(glyph, SHAPE_PesQuadratum,
+ SHAPE_PesQuadratumLongqueue, SHAPE_PesQuadratumOpenqueue);
+ ltype = LG_ALL;
+ break;
+ }
+ break;
+ case G_PES_ASCENDENS_ORISCUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_ORISCUS;
+ shape = SHAPE_PesAscendensOriscus;
+ ltype = LG_ALL;
+ break;
+ case G_PES_DESCENDENS_ORISCUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_PES_ORISCUS;
+ shape = SHAPE_PesDescendensOriscus;
+ ltype = LG_ALL;
+ break;
+ case G_FLEXA:
+ ambitus = first_pitch_of(glyph) - second_pitch_of(glyph);
+ if (glyph->u.notes.liquescentia & L_DEMINUTUS) {
+ *type = AT_FLEXUS_DEMINUTUS;
+ } else {
+ if (ambitus == 1) {
+ *type = AT_FLEXUS_1;
+ } else {
+ *type = AT_FLEXUS;
+ }
+ }
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ *gtype = T_FLEXUS_ORISCUS;
+ shape = SHAPE_FlexusOriscusInusitatus;
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_DESCENDENS:
+ *gtype = T_FLEXUS_ORISCUS;
+ shape = SHAPE_FlexusOriscus;
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ *gtype = T_FLEXUS_ORISCUS_SCAPUS;
+ shape = flexus_shape(glyph, ambitus,
+ SHAPE_FlexusOriscusScapusInusitatus,
+ SHAPE_FlexusOriscusScapusInusitatusLongqueue,
+ SHAPE_FlexusOriscusScapusInusitatusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ *gtype = T_FLEXUS_ORISCUS_SCAPUS;
+ shape = flexus_shape(glyph, ambitus, SHAPE_FlexusOriscusScapus,
+ SHAPE_FlexusOriscusScapusLongqueue,
+ SHAPE_FlexusOriscusScapusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+
+ default:
+ *gtype = glyph->u.notes.fuse_to_next_glyph? T_PORRECTUS : T_FLEXUS;
+ shape = flexus_shape(glyph, ambitus, SHAPE_Flexus,
+ SHAPE_FlexusLongqueue, SHAPE_FlexusOpenqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ }
+ break;
+ case G_TORCULUS:
+ *gtype = T_TORCULUS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusQuilisma;
+ ltype = LG_NO_INITIO;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_Torculus;
+ ltype = LG_ALL;
+ }
+ break;
+ case G_TORCULUS_LIQUESCENS:
+ *gtype = T_TORCULUS_LIQUESCENS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusLiquescensQuilisma;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_TorculusLiquescens;
+ }
+ ltype = LG_ONLY_DEMINUTUS;
+ break;
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_TORCULUS_RESUPINUS_FLEXUS;
+ break;
+ case G_PORRECTUS:
+ *type = AT_PORRECTUS;
+ *gtype = T_PORRECTUS;
+ shape = porrectus_shape(glyph, SHAPE_Porrectus,
+ SHAPE_PorrectusLongqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_TORCULUS_RESUPINUS:
+ *gtype = T_TORCULUS_RESUPINUS;
+ if (glyph->u.notes.first_note->u.note.shape == S_QUILISMA) {
+ *type = AT_QUILISMA;
+ shape = SHAPE_TorculusResupinusQuilisma;
+ } else {
+ *type = AT_ONE_NOTE;
+ shape = SHAPE_TorculusResupinus;
+ }
+ ltype = LG_ALL;
+ break;
+ case G_PORRECTUS_FLEXUS:
+ *type = AT_PORRECTUS;
+ *gtype = T_PORRECTUS_FLEXUS;
+ shape = porrectus_shape(glyph, SHAPE_PorrectusFlexus,
+ SHAPE_PorrectusFlexusLongqueue);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PORRECTUS_NO_BAR:
+ *type = AT_PORRECTUS;
+ *gtype = T_TORCULUS_RESUPINUS;
+ shape = SHAPE_PorrectusNobar;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PORRECTUS_FLEXUS_NO_BAR:
+ *type = AT_PORRECTUS;
+ *gtype = T_TORCULUS_RESUPINUS_FLEXUS;
+ shape = SHAPE_PorrectusFlexusNobar;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_ANCUS:
+ *type = AT_ONE_NOTE;
+ gregorio_assert(glyph->u.notes.liquescentia & L_DEMINUTUS,
+ gregoriotex_determine_glyph_name,
+ "encountered non-deminutus ancus", break);
+ second_note = second_note_of(glyph);
+ if (first_pitch_of(glyph) - second_note->u.note.pitch == 1) {
+ *type = AT_FLEXUS_1;
+ } else {
+ *type = AT_FLEXUS;
+ }
+ *gtype = T_ANCUS;
+ ambitus = first_pitch_of(glyph) - second_pitch_of(glyph);
+ shape = flexus_shape(glyph, ambitus, SHAPE_Ancus,
+ SHAPE_AncusLongqueue, SHAPE_Ancus);
+ ltype = LG_ONLY_DEMINUTUS;
+ break;
+ case G_SCANDICUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SCANDICUS;
+ shape = SHAPE_Scandicus;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_SALICUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SALICUS;
+ ambitus = third_pitch_of(glyph) - second_pitch_of(glyph);
+ shape = flexus_shape(glyph, ambitus, SHAPE_Salicus,
+ SHAPE_SalicusLongqueue, SHAPE_Salicus);
+ ltype = LG_NO_INITIO;
+ break;
+ case G_SALICUS_FLEXUS:
+ *type = AT_ONE_NOTE;
+ *gtype = T_SALICUS_FLEXUS;
+ shape = SHAPE_SalicusFlexus;
+ ltype = LG_NO_INITIO;
+ break;
+ case G_PUNCTUM_INCLINATUM:
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ case G_PUNCTUM:
+ case G_STROPHA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ case G_ALTERATION:
+ *type = AT_ONE_NOTE;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregoriotex_determine_glyph_name,
+ "called with unknown glyph: %s",
+ gregorio_glyph_type_to_string(glyph->u.notes.glyph_type));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ if (shape) {
+ shape = compute_glyph_name(glyph, shape, ltype, false);
+ }
+ /* we fix *type with initio_debilis */
+ if (*type == AT_ONE_NOTE) {
+ if (is_initio_debilis(glyph->u.notes.liquescentia)) {
+ *type = AT_INITIO_DEBILIS;
+ }
+ }
+
+ return shape;
+}
+
+/**
+ * This now does nothing useful, but we keep it here in case it may
+ * be needed in future.
+ */
+static void gregoriotex_write_voice_info(FILE *f, gregorio_voice_info *voice_info)
+{
+ gregorio_assert(f && voice_info, gregoriotex_write_voice_info,
+ "file or voice_info passed as NULL", return);
+}
+
+/* this function indicates if the syllable is the last of the line or score. */
+static bool is_last_of_line(gregorio_syllable *syllable)
+{
+ gregorio_element *current_element = NULL;
+ if (!(syllable->next_syllable) || ((syllable->next_syllable->elements)[0]
+ && (syllable->next_syllable->elements)[0]->type
+ == GRE_END_OF_LINE)) {
+ /* the next syllable start by an end of line */
+ return true;
+ }
+ if (syllable->elements) {
+ current_element = (syllable->elements)[0];
+ while (current_element) {
+ if (current_element->type == GRE_END_OF_LINE) {
+ /* we return true only if the end of line is the last element */
+ if (!(current_element->next)) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ current_element = current_element->next;
+ }
+ }
+ }
+ return false;
+}
+
+/*
+ * ! @brief Prints the beginning of each text style
+ */
+static void gtex_write_begin(FILE *f, grestyle_style style)
+{
+ if (style == gregoriotex_ignore_style) {
+ return;
+ }
+ switch (style) {
+ case ST_ITALIC:
+ fprintf(f, "\\GreItalic{");
+ break;
+ case ST_SMALL_CAPS:
+ fprintf(f, "\\GreSmallCaps{");
+ break;
+ case ST_BOLD:
+ fprintf(f, "\\GreBold{");
+ break;
+ case ST_FORCED_CENTER:
+ case ST_CENTER:
+ fprintf(f, "}{");
+ break;
+ case ST_TT:
+ fprintf(f, "\\GreTypewriter{");
+ break;
+ case ST_UNDERLINED:
+ fprintf(f, "\\GreUnderline{");
+ break;
+ case ST_COLORED:
+ fprintf(f, "\\GreColored{");
+ break;
+ case ST_ELISION:
+ fprintf(f, "\\GreElision{");
+ break;
+ case ST_FIRST_WORD:
+ fprintf(f, "\\GreFirstWord{");
+ break;
+ case ST_FIRST_SYLLABLE:
+ fprintf(f, "\\GreFirstSyllable{");
+ break;
+ case ST_FIRST_SYLLABLE_INITIAL:
+ fprintf(f, "\\GreFirstSyllableInitial{");
+ break;
+ case ST_PROTRUSION_FACTOR:
+ fprintf(f, "\\GreProtrusion{");
+ break;
+ case ST_PROTRUSION:
+ fprintf(f, "{");
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @brief Ends each text style
+ */
+static void gtex_write_end(FILE *f, grestyle_style style)
+{
+ if (style == gregoriotex_ignore_style) {
+ return;
+ }
+ switch (style) {
+ case ST_FORCED_CENTER:
+ case ST_CENTER:
+ case ST_SYLLABLE_INITIAL:
+ fprintf(f, "}{");
+ break;
+ case ST_INITIAL:
+ break;
+ default:
+ fprintf(f, "}");
+ break;
+ }
+}
+
+static __inline void tex_escape_text(FILE *const f, const char *text)
+{
+ /* We escape these characters into \string\ddd (where ddd is the decimal
+ * ASCII value of the character) for most escapes, and into \string\n for
+ * newlines. We do it this way to get the "raw" string values through TeX
+ * and into Lua, where the sequences become \ddd and \n respectively and
+ * are translated into their byte values. Lua can then decide whether the
+ * full strings should be evaluated by TeX as TeX or as strings */
+ for (; *text; ++text) {
+ switch (*text) {
+ case '\\':
+ case '{':
+ case '}':
+ case '~':
+ case '%': /* currently, we'll never get %, but handle it anyway */
+ case '#':
+ case '"':
+ /* these characters have special meaning to TeX */
+ fprintf(f, "\\string\\%03d", *text);
+ break;
+ case '\n':
+ fprintf(f, "\\string\\n");
+ break;
+ case '\r':
+ /* ignore */
+ break;
+ default:
+ /* UTF-8 multibyte sequences will fall into here, which is fine */
+ fputc(*text, f);
+ break;
+ }
+ }
+}
+
+static __inline void tex_escape_wtext(FILE *const f, const grewchar *text)
+{
+ /* We escape these characters into \string\ddd (where ddd is the decimal
+ * ASCII value of the character) for most escapes, and into \string\n for
+ * newlines. We do it this way to get the "raw" string values through TeX
+ * and into Lua, where the sequences become \ddd and \n respectively and
+ * are translated into their byte values. Lua can then decide whether the
+ * full strings should be evaluated by TeX as TeX or as strings */
+ for (; *text; ++text) {
+ switch (*text) {
+ case L'\\':
+ case L'{':
+ case L'}':
+ case L'~':
+ case L'%': /* currently, we'll never get %, but handle it anyway */
+ case L'#':
+ case L'"':
+ /* these characters have special meaning to TeX */
+ fprintf(f, "\\string\\%03d", *text);
+ break;
+ /* There is currently no way to get a carriage return or a newline into
+ * an <sp>, but we'll leave this code here, but #if'd out, in case we
+ * need this function in a different context */
+#if 0
+ case L'\n':
+ fprintf(f, "\\string\\n");
+ break;
+ case L'\r':
+ / * ignore * /
+ break;
+#endif
+ default:
+ gregorio_print_unichar(f, *text);
+ break;
+ }
+ }
+}
+
+/*
+ * ! @brief Writes GregorioTeX special characters. This function takes the
+ * special characters as input (i.e. from gabc representation), and writes them
+ * * in GregorioTeX form.
+ */
+static void gtex_write_special_char(FILE *f, const grewchar *special_char)
+{
+ fprintf(f, "\\GreSpecial{");
+ tex_escape_wtext(f, special_char);
+ fprintf(f, "}");
+}
+
+static void gtex_write_verb(FILE *f, const grewchar *first_char)
+{
+ gregorio_print_unistring(f, first_char);
+}
+
+static void gtex_print_char(FILE *f, const grewchar to_print)
+{
+ switch (to_print) {
+ case L'*':
+ fprintf(f, "\\GreStar{}");
+ break;
+ case L'%':
+ /* there's currently no way to get a % into gabc, so this wont be hit,
+ * but we leave it here for safety and possible future use */
+ /* LCOV_EXCL_START */
+ fprintf(f, "\\%%{}");
+ break;
+ /* LCOV_EXCL_STOP */
+ case L'\\':
+ fprintf(f, "\\textbackslash{}");
+ break;
+ case L'&':
+ fprintf(f, "\\&{}");
+ break;
+ case L'#':
+ fprintf(f, "\\#{}");
+ break;
+ case L'+':
+ fprintf(f, "\\GreDagger{}");
+ break;
+ case L'_':
+ fprintf(f, "\\_{}");
+ break;
+ case L'-':
+ fprintf(f, "\\GreHyph{}");
+ break;
+ default:
+ gregorio_print_unichar(f, to_print);
+ break;
+ }
+ return;
+}
+
+/* a function to map the internal ST_* styles to gregoriotex styles as defined
+ * in gregoriotex-syllables.tex */
+static unsigned char gregoriotex_internal_style_to_gregoriotex(
+ const grestyle_style style)
+{
+ switch (style) {
+ case ST_ITALIC:
+ return 1;
+ case ST_BOLD:
+ return 2;
+ case ST_SMALL_CAPS:
+ return 3;
+ case ST_TT:
+ return 4;
+ case ST_UNDERLINED:
+ return 5;
+ case ST_COLORED:
+ return 6;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregoriotex_internal_style_to_gregoriotex,
+ "unrecognized style: %s", grestyle_style_to_string(style));
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/*
+ * A quite hacky function: when we have only one style (typically italic) and
+ * when this style is on all the parts, then we return this style.
+ *
+ */
+static grestyle_style gregoriotex_fix_style(
+ const gregorio_character *current_char)
+{
+ grestyle_style possible_fixed_style = ST_NO_STYLE;
+ grestyle_style in_fixed_style = ST_NO_STYLE;
+ while (current_char) {
+ if (!in_fixed_style) {
+ /* before the first style */
+ if (current_char->is_character) {
+ /* got some character, so no future style can apply to the
+ * entire syllable */
+ return ST_NO_STYLE;
+ }
+ if (current_char->cos.s.type == ST_T_BEGIN) {
+ switch (current_char->cos.s.style) {
+ case ST_VERBATIM:
+ case ST_SPECIAL_CHAR:
+ /* these are pseudo-characters, and if they appear
+ * before the first style, then the style does not
+ * apply to the entire syllable */
+ return ST_NO_STYLE;
+
+ case ST_ITALIC:
+ case ST_BOLD:
+ case ST_TT:
+ case ST_SMALL_CAPS:
+ case ST_UNDERLINED:
+ case ST_COLORED:
+ if (possible_fixed_style) {
+ if (current_char->cos.s.style != possible_fixed_style) {
+ /* found a differing style */
+ return ST_NO_STYLE;
+ } else {
+ /* same style which may apply to the entire
+ * syllable */
+ in_fixed_style = possible_fixed_style;
+ }
+ } else {
+ /* we found a candidate fixed style */
+ in_fixed_style = possible_fixed_style =
+ current_char->cos.s.style;
+ }
+ break;
+
+ default:
+ /* anything else is "transparent" before the first real
+ * or pseudo-character */
+ break;
+ }
+ }
+ /* else it's an end of a style, which we treat as "transparent"
+ * noise */
+ } else {
+ /* we have a possible style */
+ if (!current_char->is_character) {
+ if (current_char->cos.s.type == ST_T_BEGIN) {
+ switch (current_char->cos.s.style) {
+ case ST_ITALIC:
+ case ST_BOLD:
+ case ST_TT:
+ case ST_SMALL_CAPS:
+ case ST_UNDERLINED:
+ case ST_COLORED:
+ if (current_char->cos.s.style != possible_fixed_style) {
+ /* found a differing style */
+ return ST_NO_STYLE;
+ }
+ /* else it's a (nested) open of the same style, which
+ * doesn't change the style; however, nested styles
+ * (should) have been eliminated by now */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_fix_style, "encountered a "
+ "nested style which should have been removed "
+ "by now");
+ break;
+ /* LCOV_EXCL_STOP */
+
+ default:
+ /* anything else is a pseudo-character or a
+ * "transparent" style, which don't affect the fixed
+ * style */
+ break;
+ }
+ } else if (current_char->cos.s.type == ST_T_END) {
+ if (current_char->cos.s.style == possible_fixed_style) {
+ /* we closed the possible fixed style; we don't return
+ * yet to give it the chance to re-open */
+ in_fixed_style = ST_NO_STYLE;
+ }
+ /* else it's a close of something we don't care about or a
+ * style that wasn't opened, so for the purposes of this
+ * function, these are "transparent" and don't affect the
+ * fixed style */
+ }
+ }
+ /* else it's a character, and that doesn't affect the fixed style */
+ }
+ current_char = current_char->next_character;
+ }
+ return possible_fixed_style;
+}
+
+/*
+ * @brief Writes the translation.
+ *
+ * There is no special handling of translation text; that is, we just print the
+ * entire string of text under the normal text line, without considering any
+ * special centering or linebreaks.
+ */
+static __inline void write_translation(FILE *f,
+ gregorio_character *translation)
+{
+ gregorio_not_null(translation, write_translation, return);
+ gregorio_write_text(WTP_NORMAL, translation, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+}
+
+/* a function to compute the height of the flat of a key
+ * the flat is always on the line of the */
+
+static char clef_flat_height(gregorio_clef clef, signed char line, bool flatted)
+{
+ char offset = 6;
+
+ if (!flatted) {
+ return NO_KEY_FLAT;
+ }
+
+ switch (clef) {
+ case CLEF_C:
+ switch (line) {
+ case 1:
+ offset = 2;
+ break;
+ case 2:
+ offset = 4;
+ break;
+ case 3:
+ offset = 6;
+ break;
+ case 4:
+ offset = 8;
+ break;
+ case 5:
+ offset = 10;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown line number: %d", line);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ case CLEF_F:
+ switch (line) {
+ case 1:
+ offset = 6;
+ break;
+ case 2:
+ offset = 8;
+ break;
+ case 3:
+ offset = 3;
+ break;
+ case 4:
+ offset = 5;
+ break;
+ case 5:
+ offset = 7;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown line number: %d", line);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(clef_flat_height, "unknown clef type: %d", clef);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ return pitch_value(LOWEST_PITCH + offset);
+}
+
+static __inline bool is_manual_custos(const gregorio_element *const element)
+{
+ return element->type == GRE_CUSTOS && element->u.misc.pitched.force_pitch;
+}
+
+OFFSET_CASE(BarStandard);
+OFFSET_CASE(BarVirgula);
+OFFSET_CASE(BarDivisioFinalis);
+
+static void write_bar(FILE *f, const gregorio_score *const score,
+ const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ const unsigned char first_of_disc)
+{
+ const gregorio_bar type = element->u.misc.unpitched.info.bar;
+ const gregorio_sign signs = element->u.misc.unpitched.special_sign;
+ const bool is_inside_bar = element->next && !is_manual_custos(element->next)
+ && element->next->type != GRE_END_OF_LINE;
+ const bool has_text = !element->previous && syllable->text;
+ /* the type number of function vepisemaorrare */
+ const char *offset_case = BarStandard;
+ signed char far_pitch_adjustment = 0;
+ /* don't use "In" version of bars in the first argument of a GreDiscretionary */
+ if (is_inside_bar && first_of_disc != 1) {
+ fprintf(f, "\\GreIn");
+ } else {
+ fprintf(f, "\\Gre");
+ }
+ switch (type) {
+ case B_VIRGULA:
+ fprintf(f, "Virgula");
+ offset_case = BarVirgula;
+ break;
+ case B_DIVISIO_MINIMA:
+ fprintf(f, "DivisioMinima");
+ break;
+ case B_DIVISIO_MINOR:
+ fprintf(f, "DivisioMinor");
+ break;
+ case B_DIVISIO_MAIOR:
+ fprintf(f, "DivisioMaior");
+ break;
+ case B_DIVISIO_FINALIS:
+ fprintf(f, "DivisioFinalis");
+ offset_case = BarDivisioFinalis;
+ break;
+ case B_DIVISIO_MINOR_D1:
+ fprintf(f, "Dominica{1}");
+ break;
+ case B_DIVISIO_MINOR_D2:
+ fprintf(f, "Dominica{2}");
+ break;
+ case B_DIVISIO_MINOR_D3:
+ fprintf(f, "Dominica{3}");
+ break;
+ case B_DIVISIO_MINOR_D4:
+ fprintf(f, "Dominica{4}");
+ break;
+ case B_DIVISIO_MINOR_D5:
+ fprintf(f, "Dominica{5}");
+ break;
+ case B_DIVISIO_MINOR_D6:
+ fprintf(f, "Dominica{6}");
+ break;
+ case B_DIVISIO_MINOR_D7:
+ fprintf(f, "Dominica{7}");
+ break;
+ case B_DIVISIO_MINOR_D8:
+ fprintf(f, "Dominica{8}");
+ break;
+ case B_VIRGULA_HIGH:
+ fprintf(f, "VirgulaHigh");
+ offset_case = BarVirgula;
+ break;
+ case B_DIVISIO_MINIMA_HIGH:
+ fprintf(f, "DivisioMinimaHigh");
+ break;
+ case B_DIVISIO_MAIOR_DOTTED:
+ fprintf(f, "DivisioMaiorDotted");
+ break;
+ case B_DIVISIO_MINIMIS:
+ fprintf(f, "DivisioMinimis");
+ break;
+ case B_DIVISIO_MINIMIS_HIGH:
+ fprintf(f, "DivisioMinimisHigh");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(write_bar, "unknown bar type: %d", type);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ fprintf(f, "{%c}", has_text? '1' : '0');
+ switch (signs) {
+ case _V_EPISEMA:
+ fprintf(f, "{\\GreBarVEpisema{\\GreOCase%s}}", offset_case);
+ break;
+ case _BAR_H_EPISEMA:
+ fprintf(f, "{\\GreBarBrace{\\GreOCase%s}}", offset_case);
+ break;
+ case _V_EPISEMA_BAR_H_EPISEMA:
+ fprintf(f, "{\\GreBarBrace{\\GreOCase%s}"
+ "\\GreBarVEpisema{\\GreOCase%s}}",
+ offset_case, offset_case);
+ break;
+ default:
+ fprintf(f, "{}");
+ break;
+ }
+ switch (type) {
+ case B_DIVISIO_MINIMIS_HIGH:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_VIRGULA_HIGH:
+ case B_DIVISIO_MINIMA_HIGH:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_DIVISIO_MINIMIS:
+ ++ far_pitch_adjustment;
+ /* fall through */
+
+ case B_VIRGULA:
+ case B_DIVISIO_MINIMA:
+ {
+ char is_far = '0';
+ const gregorio_element *e;
+ const gregorio_syllable *s;
+ const gregorio_glyph *g;
+ const gregorio_note *n;
+ signed char pitch;
+
+ /* find the prior element */
+ e = element->previous;
+ if (!e) {
+ for (s = syllable->previous_syllable; s; s = s->previous_syllable) {
+ /* loop to find the previous syllable with elements */
+ if (s->elements && *s->elements) {
+ for (e = *s->elements; e->next; e = e->next) {
+ /* just loop to find the last element */
+ }
+ break;
+ }
+ }
+ }
+ if (e && e->type == GRE_ELEMENT) {
+ g = e->u.first_glyph;
+ if (g) {
+ while (g->next) {
+ /* loop to find the last glyph in the prior element */
+ g = g->next;
+ }
+ }
+ if (g && g->type == GRE_GLYPH && (n = g->u.notes.first_note)) {
+ while (n->next) {
+ /* loop to find the last note */
+ n = n->next;
+ }
+ pitch = n->u.note.pitch;
+ if (g->u.notes.liquescentia & L_DEMINUTUS && n->previous
+ && n->previous->u.note.pitch > pitch) {
+ pitch = n->previous->u.note.pitch;
+ }
+ if (pitch < score->virgula_far_pitch + far_pitch_adjustment) {
+ /* find next element */
+ e = element->next;
+ if (!e) {
+ for (s = syllable->next_syllable; s;
+ s = s->next_syllable) {
+ /* loop to find the next syllable with elements */
+ if (s->elements && *s->elements) {
+ e = *s->elements;
+ break;
+ }
+ }
+ }
+ if (e) {
+ if (e->type == GRE_END_OF_LINE) {
+ is_far = '1';
+ } else if (e->type == GRE_ELEMENT) {
+ g = e->u.first_glyph;
+ if (g && g->type == GRE_GLYPH) {
+ n = g->u.notes.first_note;
+ if (n) {
+ if (g->u.notes.glyph_type == G_PODATUS
+ && n->next) {
+ n = n->next;
+ }
+ if (n->u.note.pitch
+ < score->virgula_far_pitch
+ + far_pitch_adjustment) {
+ is_far = '1';
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ fprintf(f, "{%c}%%\n", is_far);
+ }
+ break;
+
+ default:
+ fprintf(f, "%%\n");
+ break;
+ }
+}
+
+static __inline char *suppose_high_ledger_line(const gregorio_note *const note)
+{
+ return note->high_ledger_line? "\\GreSupposeHighLedgerLine" : "";
+}
+
+static __inline char *suppose_low_ledger_line(const gregorio_note *const note)
+{
+ return note->low_ledger_line? "\\GreSupposeLowLedgerLine" : "";
+}
+
+/*
+ * ! @brief Writes augmentum duplexes (double dots) We suppose we are on the
+ * last note. \n The algorithm is the following: if there is a previous note,
+ * we consider that the two puncta of the augumentum duplex must correspond to
+ * the last note and the previous note. If we are adding to a single note
+ * glyph, which would be weird but sure why not, we just typeset two puncta
+ * spaced of 2.
+ */
+static void write_auctum_duplex(FILE *f,
+ const gregorio_note *const current_note)
+{
+ char pitch = current_note->u.note.pitch;
+ char previous_pitch = 0;
+ /* second_pitch is the second argument of the \augmentumduplex macro,
+ * that's what this function is all about. */
+ char second_pitch = 0;
+ /* this variable will be set to 1 if we are on the note before the last
+ * note of a podatus or a porrectus or a torculus resupinus */
+ unsigned char special_punctum = 0;
+ if (current_note->previous) {
+ if (current_note->previous->u.note.pitch - current_note->u.note.pitch ==
+ -1
+ || current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ special_punctum = 1;
+ }
+ second_pitch = current_note->previous->u.note.pitch;
+ previous_pitch = second_pitch;
+ }
+
+ if (!previous_pitch || previous_pitch == pitch) {
+ if (is_on_a_line(pitch)) {
+ second_pitch = pitch;
+ special_punctum = 1;
+ } else {
+ second_pitch = pitch + 1;
+ }
+ }
+ /* the first argument should always be the lowest one, that's what we do
+ * here: */
+ if (pitch > second_pitch) {
+ previous_pitch = pitch;
+ pitch = second_pitch;
+ second_pitch = previous_pitch;
+ }
+ /* maybe the third argument should be changed */
+ fprintf(f, "\\GreAugmentumDuplex{%d}{%d}{%d}%%\n", pitch_value(pitch),
+ pitch_value(second_pitch), special_punctum);
+}
+
+/**
+ * @brief Adds a dot.
+ *
+ * Writes \c \\GrePunctumMora in the gtex file, with the appropriate arguments. You might think this function
+ * more straightforward than it actually is...
+ */
+static void write_punctum_mora(FILE *f, const gregorio_glyph *glyph,
+ const gregorio_note *current_note, const int fuse_to_next_note)
+{
+ /* in this if we consider that the puncta are only on the last two notes
+ * (maybe it would be useful to consider it more entirely, but it would be
+ * really weird...) */
+ /* the variable that will be set to true if we have to shift the punctum
+ * inclinatum before the last note */
+ bool shift_before = false;
+ /* this variable will be set to 1 if we are on the note before the last
+ * note of a podatus or a porrectus or a torculus resupinus */
+ unsigned char special_punctum = 0;
+ /* 0 if space is normal, 1 if there should be no space after a punctum */
+ unsigned char no_space = 0;
+ /* the pitch where to set the punctum */
+ char pitch = current_note->u.note.pitch;
+ /* a variable to know if we are on a punctum inclinatum or not */
+ unsigned char punctum_inclinatum = 0;
+ /* a temp variable */
+ const gregorio_note *tmpnote;
+ /* we go into this switch only if it is the note before the last note */
+ if (current_note->next) {
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ case G_TORCULUS:
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ case G_PORRECTUS_FLEXUS:
+ if (!(glyph->u.notes.liquescentia & L_DEMINUTUS)) {
+ shift_before = true;
+ }
+ if (is_between_lines(pitch)
+ && pitch - current_note->next->u.note.pitch == 1) {
+ special_punctum = 2;
+ }
+ break;
+ case G_PODATUS:
+ if ((current_note->u.note.shape != S_PUNCTUM
+ && current_note->u.note.shape != S_QUILISMA)
+ || (glyph->u.notes.liquescentia
+ & (L_AUCTUS_DESCENDENS | L_AUCTUS_ASCENDENS))) {
+ shift_before = true;
+ /* fine tuning */
+ if (current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ special_punctum = 1;
+ } else {
+ pitch = current_note->u.note.pitch - 1;
+ }
+ }
+ } else {
+ /* case for f.g */
+ if (current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ special_punctum = 1;
+ }
+ }
+ break;
+ case G_PES_QUADRATUM:
+ shift_before = true;
+ if (current_note->next->u.note.pitch - current_note->u.note.pitch ==
+ 1) {
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ special_punctum = 1;
+ } else {
+ pitch = current_note->u.note.pitch - 1;
+ }
+ }
+ break;
+ case G_PORRECTUS:
+ case G_TORCULUS_RESUPINUS:
+ /* this case is only for the note before the previous note */
+ if ((current_note->next->u.note.pitch -
+ current_note->u.note.pitch == -1
+ || current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1)
+ && !(current_note->next->next))
+ special_punctum = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ /* we enter here in any case */
+ switch (glyph->u.notes.glyph_type) {
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_TORCULUS:
+ if (!current_note->next) {
+ special_punctum = 1;
+ }
+ break;
+ default:
+ break;
+ }
+ switch (current_note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ case S_PUNCTUM_INCLINATUM_STANS:
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ punctum_inclinatum = 1;
+ break;
+ default:
+ break;
+ }
+ /* when the punctum mora is on a note on a line, and the prior note is on
+ * the space immediately above, the dot is placed on the space below the
+ * line instead */
+ if (current_note->previous
+ && (current_note->previous->u.note.pitch -
+ current_note->u.note.pitch == 1)
+ && is_on_a_line(current_note->u.note.pitch)
+ && (current_note->previous->signs == _PUNCTUM_MORA
+ || current_note->previous->signs == _V_EPISEMA_PUNCTUM_MORA
+ || current_note->previous->choral_sign)) {
+ special_punctum = 1;
+ }
+
+ if (current_note->mora_vposition) {
+ special_punctum = current_note->mora_vposition == VPOS_BELOW? 1 : 0;
+ }
+
+ if (shift_before) {
+ if (current_note->next->u.note.pitch - current_note->u.note.pitch == -1
+ || current_note->next->u.note.pitch -
+ current_note->u.note.pitch == 1) {
+ fprintf(f, "\\GrePunctumMora{%d}{3}{%d}{%d}%%\n",
+ pitch_value(pitch), special_punctum, punctum_inclinatum);
+ } else {
+ fprintf(f, "\\GrePunctumMora{%d}{2}{%d}{%d}%%\n",
+ pitch_value(pitch), special_punctum, punctum_inclinatum);
+ }
+ return;
+ }
+ /* There are two special cases. The first: if the next glyph is a
+ * ZERO_WIDTH_SPACE, and the current glyph is a PES, and the punctum mora
+ * is on the first note, and the first note of the next glyph is at least
+ * two (or three depending on something) pitches higher than the current
+ * note.
+ * You'll all have understood, this case is quite rare... but when it
+ * appears, we pass 1 as a second argument of \punctummora so that it
+ * removes the space introduced by the punctummora. */
+ if (glyph->u.notes.glyph_type == G_PODATUS && glyph->next
+ && glyph->next->type == GRE_SPACE
+ && glyph->next->u.misc.unpitched.info.space == SP_ZERO_WIDTH
+ && current_note->next && glyph->next->next
+ && glyph->next->next->type == GRE_GLYPH
+ && glyph->next->next->u.notes.first_note
+ && (glyph->next->next->u.notes.first_note->u.note.pitch -
+ current_note->u.note.pitch > 1)) {
+ fprintf(f, "\\GrePunctumMora{%d}{1}{%d}{%d}%%\n", pitch_value(pitch),
+ special_punctum, punctum_inclinatum);
+ return;
+ }
+ /* if there is a punctum or a auctum dumplex on a note after, we put a
+ * zero-width punctum */
+ tmpnote = current_note->next;
+ while (tmpnote) {
+ if (tmpnote->signs == _PUNCTUM_MORA || tmpnote->signs == _AUCTUM_DUPLEX
+ || tmpnote->signs == _V_EPISEMA_PUNCTUM_MORA
+ || tmpnote->signs == _V_EPISEMA_AUCTUM_DUPLEX
+ || tmpnote->choral_sign) {
+ no_space = 1;
+ break;
+ }
+ tmpnote = tmpnote->next;
+ }
+ /* use a special no-space punctum mora for ascending fusion */
+ if (fuse_to_next_note) {
+ no_space = 1;
+ if (fuse_to_next_note > 0) {
+ special_punctum = 1;
+ }
+ }
+
+ /* the normal operation */
+ fprintf(f, "\\GrePunctumMora{%d}{%d}{%d}{%d}%%\n", pitch_value(pitch),
+ no_space, special_punctum, punctum_inclinatum);
+}
+
+static __inline int get_punctum_inclinatum_space_case(
+ const gregorio_note *const note)
+{
+ char temp;
+
+ switch (note->u.note.shape) {
+ case S_PUNCTUM_INCLINATUM_ASCENDENS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ /* negative values = ascending ambitus */
+ /* not sure we ever need to consider a larger ambitus here */
+ switch (temp) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return 25;
+ case -1:
+ default:
+ return 12;
+ case -2:
+ return 14;
+ case -3:
+ case -4:
+ return 15;
+ }
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_STANS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ return 26;
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_DESCENDENS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ /* negative values = ascending ambitus */
+ /* not sure we ever need to consider a larger ambitus here */
+ switch (temp) {
+ case 1:
+ default:
+ return 3;
+ case 2:
+ return 10;
+ case 3:
+ case 4:
+ return 11;
+ case -1:
+ case -2:
+ case -3:
+ case -4:
+ return 24;
+ }
+ }
+ break;
+ case S_PUNCTUM_INCLINATUM_DEMINUTUS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ if (temp < -2) {
+ return 15;
+ } else if (temp > 2) {
+ return 11;
+ } else {
+ if (note->previous
+ && note->previous->u.note.shape ==
+ S_PUNCTUM_INCLINATUM_DEMINUTUS) {
+ if (temp < -1) {
+ /* really if the ambitus = 3rd at this point */
+ return 14;
+ } else if (temp > 1) {
+ /* really if the ambitus = 3rd at this point */
+ return 10;
+ } else {
+ /* temp == 0, so there is no ascending case */
+ return 8;
+ }
+ } else {
+ if (temp < 0) {
+ /* puncta inclinatum followed by puncta inclinatum
+ * debilis */
+ return 13;
+ } else if (temp > 0) {
+ /* puncta inclinatum followed by puncta inclinatum
+ * debilis */
+ return 7;
+ }
+ }
+ }
+ } /* LCOV_EXCL_LINE */
+ break;
+ case S_PUNCTUM_INCLINATUM_AUCTUS:
+ if (note->previous) {
+ /* means that it is not the first note of the puncta inclinata
+ * sequence */
+ temp = note->previous->u.note.pitch - note->u.note.pitch;
+ if (temp < -1 || temp > 1) {
+ /* this is the normal interglyph space, so we'll use it for
+ * either direction */
+ return 1;
+ } else {
+ /* temp == 0, so there is no ascending case */
+ /* we approximate that it is the same space */
+ return 3;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return -1;
+}
+
+static __inline int get_punctum_inclinatum_to_nobar_space_case(
+ const gregorio_glyph *const glyph)
+{
+ if (glyph->u.notes.glyph_type <= G_PUNCTA_INCLINATA) {
+ const gregorio_glyph *next = gregorio_next_non_texverb_glyph(glyph);
+ if (next && next->type == GRE_GLYPH
+ && (next->u.notes.glyph_type == G_PUNCTUM
+ || (next->u.notes.glyph_type == G_FLEXA
+ && !next->u.notes.fuse_to_next_glyph))) {
+ int descent;
+ const gregorio_note *note = gregorio_glyph_last_note(glyph);
+ descent = note->u.note.pitch -
+ glyph->next->u.notes.first_note->u.note.pitch;
+ /* a negative descent is an ascent */
+ switch(descent) {
+ case -1:
+ return 19;
+ case 1:
+ return 16;
+ case -2:
+ return 20;
+ case 2:
+ return 17;
+ case -3:
+ case -4:
+ return 21;
+ case 3:
+ case 4:
+ return 18;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static __inline void write_single_hepisema(FILE *const f, int hepisema_case,
+ const gregorio_note *const note, gregorio_sign_orientation orientation,
+ bool connect, char height, const grehepisema_size size, const int i,
+ const gregorio_glyph *const glyph,
+ const int porrectus_long_episema_index,
+ bool (*const is_episema_shown)(const gregorio_note *))
+{
+ if (height) {
+ const gregorio_hepisema_adjustment *adj =
+ gregorio_get_hepisema_adjustment(
+ note->he_adjustment_index[orientation]);
+ char ambitus = 0;
+ char size_arg;
+
+ switch (size) {
+ case H_SMALL_LEFT:
+ size_arg = 'l';
+ connect = false;
+ break;
+ case H_SMALL_CENTRE:
+ size_arg = 'c';
+ connect = false;
+ break;
+ case H_SMALL_RIGHT:
+ size_arg = 'r';
+ break;
+ default:
+ size_arg = 'f';
+ break;
+ }
+
+ if (i == porrectus_long_episema_index && note->next
+ && is_episema_shown(note->next)) {
+ ambitus = compute_ambitus(note);
+ }
+
+ if (i - 1 != porrectus_long_episema_index || !note->previous
+ || !is_episema_shown(note->previous)) {
+ if (connect) {
+ const gregorio_glyph *next;
+ if (!note->next
+ && (!(next = gregorio_next_non_texverb_glyph(glyph))
+ || next->type != GRE_SPACE
+ || next->u.misc.unpitched.info.space
+ != SP_ZERO_WIDTH)) {
+ /* not followed by a zero-width space */
+ /* try to fuse from punctum inclinatum to nobar glyph */
+ fprintf(f,
+ "\\GreHEpisemaBridge{%d}{%d}{%d}{%s%s}{%s}{%d}%%\n",
+ pitch_value(height), hepisema_case,
+ get_punctum_inclinatum_to_nobar_space_case(glyph),
+ suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note),
+ adj->nudge? adj->nudge : "", adj->vbasepos);
+ } else if (note->next
+ && (note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_ASCENDENS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_DESCENDENS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_DEMINUTUS
+ || note->next->u.note.shape
+ == S_PUNCTUM_INCLINATUM_AUCTUS)) {
+ /* is a punctum inclinatum of some sort */
+ fprintf(f, "\\GreHEpisemaBridge{%d}{%d}{%d}{%s%s}{%s}{%d}%%\n",
+ pitch_value(height), hepisema_case,
+ get_punctum_inclinatum_space_case(note->next),
+ suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note),
+ adj->nudge? adj->nudge : "", adj->vbasepos);
+ }
+ }
+ fprintf(f, "\\GreHEpisema{%d}{\\GreOCase%s}{%d}{%d}{%c}{%d}"
+ "{%s%s}{%s}{%d}%%\n", pitch_value(height),
+ note->gtex_offset_case, ambitus, hepisema_case, size_arg,
+ pitch_value(height), suppose_high_ledger_line(note),
+ suppose_low_ledger_line(note), adj->nudge? adj->nudge : "",
+ adj->vbasepos);
+ }
+ }
+}
+
+/**
+ * @brief A function that writes the good \c \\hepisema in GregorioTeX.
+ * @param i The position of the note in the glyph.
+ */
+static void gregoriotex_write_hepisema(FILE *const f,
+ const gregorio_note *const note, const int i, const gtex_type type,
+ const gregorio_glyph *const glyph)
+{
+ int porrectus_long_episema_index = -1;
+
+ gregorio_assert(note, gregoriotex_write_hepisema,
+ "called with NULL pointer", return);
+
+ switch (type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ porrectus_long_episema_index = 1;
+ break;
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ porrectus_long_episema_index = 2;
+ break;
+ default:
+ /* do nothing */
+ break;
+ }
+
+ write_single_hepisema(f, 1, note, SO_UNDER, note->h_episema_below_connect,
+ note->h_episema_below, note->h_episema_below_size, i, glyph,
+ porrectus_long_episema_index, &gtex_is_h_episema_below_shown);
+ write_single_hepisema(f, 0, note, SO_OVER, note->h_episema_above_connect,
+ note->h_episema_above, note->h_episema_above_size, i, glyph,
+ porrectus_long_episema_index, &gtex_is_h_episema_above_shown);
+}
+
+/* a macro to write an additional line */
+
+static void write_additional_line(FILE *f, int i, gtex_type type, bool bottom,
+ const gregorio_note *current_note, const gregorio_score *const score)
+{
+ char ambitus = 0;
+ gregorio_assert(current_note, write_additional_line, "called with no note",
+ return);
+ /* patch to get a line under the full glyph in the case of dbc (for
+ * example) */
+ switch (type) {
+ case T_PORRECTUS:
+ case T_PORRECTUS_FLEXUS:
+ switch (i) {
+ case 1:
+ i = HEPISEMA_FIRST_TWO;
+ break;
+ case 2:
+ if (current_note->previous->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && current_note->previous->u.note.pitch
+ < score->high_ledger_line_pitch) {
+ i = HEPISEMA_FIRST_TWO;
+ /* HEPISEMA_FIRST_TWO works only for first note */
+ current_note = current_note->previous;
+ } else {
+ return;
+ }
+ break;
+ case 3:
+ if (bottom || current_note->previous->u.note.pitch
+ >= score->high_ledger_line_pitch) {
+ /* we don't need to add twice the same line */
+ return;
+ }
+ break;
+ }
+ break;
+ case T_TORCULUS_RESUPINUS:
+ case T_TORCULUS_RESUPINUS_FLEXUS:
+ switch (i) {
+ case 2:
+ i = HEPISEMA_FIRST_TWO;
+ break;
+ case 3:
+ if (current_note->previous->u.note.pitch > LOW_LEDGER_LINE_PITCH
+ && current_note->previous->u.note.pitch
+ < score->high_ledger_line_pitch) {
+ i = HEPISEMA_FIRST_TWO;
+ /* HEPISEMA_FIRST_TWO works only for first note */
+ current_note = current_note->previous;
+ } else {
+ return;
+ }
+ break;
+ case 4:
+ if (bottom || current_note->previous->u.note.pitch
+ >= score->high_ledger_line_pitch) {
+ /* we don't need to add twice the same line */
+ return;
+ }
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (i == HEPISEMA_FIRST_TWO) {
+ /* here we must compare the first note of the big bar with the second
+ * one, but it may be tricky sometimes, because of the previous patch */
+ gregorio_assert_only(!current_note->previous ||
+ current_note->u.note.pitch
+ > current_note->previous->u.note.pitch,
+ write_additional_line, "HEPISEMA_FIRST_TWO on the wrong note");
+ ambitus = current_note->u.note.pitch - current_note->next->u.note.pitch;
+ }
+ fprintf(f, "\\GreAdditionalLine{\\GreOCase%s}{%d}{%d}%%\n",
+ current_note->gtex_offset_case, ambitus, bottom ? 3 : 2);
+}
+
+/*
+ *
+ * a function that writes the good value of \vepisema in GregorioTeX. i is the
+ * position of the note in the glyph
+ *
+ */
+
+static void write_vepisema(FILE *f, const gregorio_note *const note)
+{
+ fprintf(f, "\\GreVEpisema{%d}{\\GreOCase%s}%%\n",
+ pitch_value(note->v_episema_height), note->gtex_offset_case);
+}
+
+/*
+ * a function that writes the rare signs in GregorioTeX. i is the position of
+ * the note in the glyph */
+
+static void write_rare_sign(FILE *f, const gregorio_note *const current_note,
+ const gregorio_sign rare)
+{
+ switch (rare) {
+ case _ACCENTUS:
+ fprintf(f, "\\GreAccentus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _ACCENTUS_REVERSUS:
+ fprintf(f, "\\GreReversedAccentus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _CIRCULUS:
+ fprintf(f, "\\GreCirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _SEMI_CIRCULUS:
+ fprintf(f, "\\GreSemicirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _SEMI_CIRCULUS_REVERSUS:
+ fprintf(f, "\\GreReversedSemicirculus{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_FLAT:
+ fprintf(f, "\\GreMusicaFictaFlat{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_NATURAL:
+ fprintf(f, "\\GreMusicaFictaNatural{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ case _MUSICA_FICTA_SHARP:
+ fprintf(f, "\\GreMusicaFictaSharp{%d}{\\GreOCase%s}%%\n",
+ pitch_value(current_note->u.note.pitch),
+ current_note->gtex_offset_case);
+ break;
+ /* the cases of the bar signs are dealt in another function
+ * (write_bar) */
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ assert(false);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+static __inline const char *alteration_name(
+ const gregorio_shape next_note_alteration)
+{
+ switch (next_note_alteration) {
+ case S_FLAT:
+ return "Flat";
+ case S_SHARP:
+ return "Sharp";
+ case S_NATURAL:
+ return "Natural";
+ default:
+ return "";
+ }
+}
+
+static const char *next_custos(const signed char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ gregoriotex_status *const status)
+{
+ static char buf[50];
+
+ gregorio_snprintf(buf, sizeof buf, "%s\\GreNextCustos{%d}{%s}",
+ status->suppressed_custos? "\\GreResetEolCustos" : "",
+ pitch_value(next_note_pitch),
+ alteration_name(next_note_alteration));
+
+ status->suppressed_custos = false;
+
+ return buf;
+}
+
+/*
+ * function used when the glyph is only one note long
+ */
+
+static void write_note(FILE *f, gregorio_note *note,
+ const gregorio_glyph *glyph, const char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ gregoriotex_status *const status)
+{
+ unsigned int initial_shape = note->u.note.shape;
+ const char *shape;
+ int space_case;
+ static char cpbuf[96];
+ /* type in the sense of GregorioTeX alignment type */
+ gtex_alignment type = AT_ONE_NOTE;
+ gregorio_assert(note, write_note, "called with NULL pointer",
+ return);
+ if (note->u.note.shape == S_PUNCTUM) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.shape = S_PUNCTUM_AUCTUS_ASCENDENS;
+ break;
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_PUNCTUM_AUCTUS_DESCENDENS;
+ break;
+ case L_INITIO_DEBILIS:
+ if (glyph->u.notes.fuse_to_next_glyph > 0) {
+ break;
+ }
+ /* else fall through to next case */
+ case L_DEMINUTUS:
+ /* this is a currenly unused, but we keep it as a fallback case */
+ /* LCOV_EXCL_START */
+ note->u.note.shape = S_PUNCTUM_DEMINUTUS;
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ break;
+ }
+ }
+ shape = determine_note_glyph_name(note, glyph, &type);
+ note->u.note.shape = initial_shape;
+ /* special things for puncta inclinata */
+ space_case = get_punctum_inclinatum_space_case(note);
+ if (space_case >= 0) {
+ fprintf(f, "\\GreEndOfGlyph{%d}%%\n", space_case);
+ }
+
+ switch (note->u.note.shape) {
+ case S_FLAT:
+ fprintf(f, "\\GreFlat{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ case S_NATURAL:
+ fprintf(f, "\\GreNatural{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ case S_SHARP:
+ fprintf(f, "\\GreSharp{%d}{0}", pitch_value(note->u.note.pitch));
+ break;
+ default:
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}",
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ break;
+ }
+}
+
+static int gregoriotex_syllable_first_type(gregorio_syllable *syllable)
+{
+ int result = 0;
+ gtex_alignment type = AT_ONE_NOTE;
+ gtex_type gtype = T_ONE_NOTE;
+ /* alteration says if there is a flat or a natural first in the next
+ * syllable, see gregoriotex.tex for more details */
+ int alteration = 0;
+ gregorio_glyph *glyph;
+ gregorio_element *element;
+ gregorio_assert(syllable && syllable->elements,
+ gregoriotex_syllable_first_type, "called with a NULL argument",
+ return 0);
+ for (element = syllable->elements[0]; element; element = element->next) {
+ if (element->type == GRE_BAR) {
+ switch (element->u.misc.unpitched.info.bar) {
+ case B_NO_BAR:
+ case B_VIRGULA:
+ case B_VIRGULA_HIGH:
+ result = 10;
+ break;
+ case B_DIVISIO_MINIMIS:
+ case B_DIVISIO_MINIMIS_HIGH:
+ case B_DIVISIO_MINIMA:
+ case B_DIVISIO_MINIMA_HIGH:
+ result = 11;
+ break;
+ case B_DIVISIO_MINOR:
+ result = 12;
+ break;
+ case B_DIVISIO_MAIOR:
+ case B_DIVISIO_MAIOR_DOTTED:
+ result = 13;
+ break;
+ case B_DIVISIO_MINOR_D1:
+ case B_DIVISIO_MINOR_D2:
+ case B_DIVISIO_MINOR_D3:
+ case B_DIVISIO_MINOR_D4:
+ case B_DIVISIO_MINOR_D5:
+ case B_DIVISIO_MINOR_D6:
+ case B_DIVISIO_MINOR_D7:
+ case B_DIVISIO_MINOR_D8:
+ result = 14;
+ break;
+ case B_DIVISIO_FINALIS:
+ result = 15;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_syllable_first_type, "invalid bar");
+ result = 0;
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ return result;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH && glyph->u.notes.first_note) {
+ switch (glyph->u.notes.glyph_type) {
+ case G_ALTERATION:
+ if (alteration == 0) {
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_FLAT:
+ alteration = 20;
+ break;
+ case S_NATURAL:
+ alteration = 40;
+ break;
+ case S_SHARP:
+ alteration = 60;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregoriotex_syllable_first_type,
+ "invalid alteration");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ continue;
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ case G_PUNCTUM:
+ case G_STROPHA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ determine_note_glyph_name
+ (glyph->u.notes.first_note, glyph, &type);
+ break;
+ default:
+ gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ break;
+ }
+ return type + alteration;
+ }
+ }
+ }
+ }
+ if (syllable->elements[0]) {
+ /* if there is anything else in the next syllable */
+ return 0;
+ }
+ /* the only thing that should reach this point is an empty next syllable
+ * we treat that kind of syllable as a bar */
+ return 16;
+}
+
+static __inline void write_low_choral_sign(FILE *const f,
+ const gregorio_note *const note, int special)
+{
+ if (note->choral_sign_is_nabc) {
+ fprintf(f, "\\GreLowChoralSign{%d}{\\GreNABCChar{",
+ pitch_value(note->u.note.pitch));
+ tex_escape_text(f, note->choral_sign);
+ fprintf(f, "}}{%d}%%\n", special);
+ } else {
+ fprintf(f, "\\GreLowChoralSign{%d}{%s}{%d}%%\n",
+ pitch_value(note->u.note.pitch), note->choral_sign,
+ special);
+ }
+}
+
+static __inline void write_high_choral_sign(FILE *const f,
+ const gregorio_note *const note, int pitch_offset)
+{
+ if (note->choral_sign_is_nabc) {
+ fprintf(f, "\\GreHighChoralSign{%d}{\\GreNABCChar{",
+ pitch_value(note->u.note.pitch + pitch_offset));
+ tex_escape_text(f, note->choral_sign);
+ fprintf(f, "}}{\\GreOCase%s}%%\n", note->gtex_offset_case);
+ } else {
+ fprintf(f, "\\GreHighChoralSign{%d}{%s}{\\GreOCase%s}%%\n",
+ pitch_value(note->u.note.pitch + pitch_offset),
+ note->choral_sign, note->gtex_offset_case);
+ }
+}
+
+static void write_choral_sign(FILE *f, const gregorio_glyph *glyph,
+ const gregorio_note *current_note, bool low)
+{
+ bool kind_of_pes;
+ /* false in the normal case (sign above the note), true in the case of it's
+ * next to the note (same height as a punctum) */
+ bool low_sign = choral_sign_here_is_low(glyph, current_note, &kind_of_pes);
+
+ /* the low choral signs must be typeset after the punctum, whereas the high
+ * must be typeset before the h episema */
+ if ((low_sign && !low) || (!low_sign && low)) {
+ return;
+ }
+
+ if (low_sign) {
+ /* very approximative heuristic, some things may have to be adapted
+ * here... */
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ if (kind_of_pes && current_note->u.note.pitch -
+ current_note->next->u.note.pitch == -1) {
+ write_low_choral_sign(f, current_note, 1);
+ return;
+ }
+ if (current_note->previous
+ && (current_note->previous->signs == _PUNCTUM_MORA
+ || current_note->previous->signs ==
+ _V_EPISEMA_PUNCTUM_MORA)) {
+ write_low_choral_sign(f, current_note, 1);
+ return;
+ }
+ }
+
+ write_low_choral_sign(f, current_note, 0);
+ } else {
+ /* let's cheat a little */
+ if (is_on_a_line(current_note->u.note.pitch)) {
+ write_high_choral_sign(f, current_note, 0);
+ } else {
+ write_high_choral_sign(f, current_note, 2);
+ }
+ }
+}
+
+/*
+ *
+ * A function that write the signs of a glyph, which has the type type (T_*,
+ * not G_*, which is in the glyph->glyph_type), and (important), we start only
+ * at the note current_note. It is due to the way we call it : if type is
+ * T_ONE_NOTE, we just do the signs on current_note, not all. This is the case
+ * for example for the first note of the torculus resupinus, or the
+ * G_*_PUNCTA_INCLINATA.
+ *
+ */
+
+/* small helper */
+static __inline bool _found(FILE *const f, const bool found)
+{
+ if (!found) {
+ fprintf (f, "%%\n");\
+ return true;
+ }
+ return found;
+}
+
+static void compute_height_extrema(const gregorio_glyph *const glyph,
+ const gregorio_note *note, signed char *const top_height,
+ signed char *const bottom_height)
+{
+ char height;
+ /* get the minima/maxima pitches */
+ for (; note; note = note->next) {
+ if (note->h_episema_above) {
+ height = note->h_episema_above;
+ } else {
+ if (note->v_episema_height && note->v_episema_height
+ > note->u.note.pitch) {
+ height = note->v_episema_height;
+ } else {
+ height = note->u.note.pitch;
+ }
+
+ if (note->choral_sign
+ && !choral_sign_here_is_low(glyph, note, NULL)) {
+ ++height;
+ }
+ }
+ if (*top_height == UNDETERMINED_HEIGHT || height > *top_height) {
+ *top_height = height;
+ }
+
+ if (note->h_episema_below) {
+ height = note->h_episema_below;
+ } else if (note->v_episema_height && note->v_episema_height
+ < note->u.note.pitch) {
+ height = note->v_episema_height;
+ } else {
+ height = note->u.note.pitch;
+
+ /* no vertical episema, so we need to check for a stem */
+ gregorio_assert(glyph->type == GRE_GLYPH, compute_height_extrema,
+ "glyph->type must be GRE_GLYPH here", return);
+ switch (glyph->u.notes.glyph_type) {
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ --height;
+ break;
+
+ case G_PUNCTUM:
+ switch (note->u.note.shape) {
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ --height;
+ break;
+
+ default:
+ /* default to avoid the warning */
+ break;
+ }
+ break;
+
+ default:
+ /* default to avoid the warning */
+
+ /* other shapes like the porrectus have stems, but the height
+ * computation will cover other notes in the shape, negating
+ * the need to account for the stem on the shape */
+ break;
+ }
+ }
+
+ if (*bottom_height == UNDETERMINED_HEIGHT || height < *bottom_height) {
+ *bottom_height = height;
+ }
+ }
+}
+
+static void compute_element_height_extrema(
+ const gregorio_element *const element, signed char *const top_height,
+ signed char *const bottom_height)
+{
+ const gregorio_glyph *glyph;
+ gregorio_not_null(element, compute_element_height_extrema, return);
+ if (element->type != GRE_ELEMENT) {
+ return;
+ }
+ /* get the minima/maxima pitches */
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ compute_height_extrema(glyph, glyph->u.notes.first_note,
+ top_height, bottom_height);
+ }
+ }
+}
+
+static __inline void fixup_height_extrema(signed char *const top_height,
+ signed char *const bottom_height)
+{
+ if (*top_height == UNDETERMINED_HEIGHT) {
+ *top_height = 9; /* 'g' */
+ }
+ if (*bottom_height == UNDETERMINED_HEIGHT) {
+ *bottom_height = 9; /* 'g' */
+ }
+}
+
+static __inline bool is_ledger_drawn(const bool setting,
+ const gregorio_ledger_specificity specificity)
+{
+ return ((specificity & LEDGER_DRAWN) && setting);
+}
+
+static void write_signs(FILE *f, gtex_type type,
+ const gregorio_glyph *glyph, const gregorio_note *note,
+ int fuse_to_next_note, gregoriotex_status *const status,
+ const gregorio_score *const score)
+{
+ /* i is the number of the note for which we are typesetting the sign. */
+ int i;
+ const gregorio_note *current_note;
+ signed char high_pitch = UNDETERMINED_HEIGHT;
+ signed char low_pitch = UNDETERMINED_HEIGHT;
+ bool found = false;
+ compute_height_extrema(glyph, note, &high_pitch, &low_pitch);
+ fixup_height_extrema(&high_pitch, &low_pitch);
+ fprintf(f, "%%\n{%%\n\\GreGlyphHeights{%d}{%d}%%\n",
+ pitch_value(high_pitch), pitch_value(low_pitch));
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ /* we start by the additional lines */
+ if (is_ledger_drawn(current_note->low_ledger_line,
+ current_note->low_ledger_specificity)) {
+ write_additional_line(f, i, type, true, current_note, score);
+ status->bottom_line = 1;
+ }
+ if (is_ledger_drawn(current_note->high_ledger_line,
+ current_note->high_ledger_specificity)) {
+ write_additional_line(f, i, type, false, current_note, score);
+ }
+ if (current_note->texverb) {
+ fprintf(f, "%% verbatim text at note level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(current_note->texverb));
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ fprintf(f, "}{");
+ /* now a first loop for the choral signs, because high signs must be taken
+ * into account before any hepisema */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ if (current_note->choral_sign) {
+ found = _found(f, found);
+ write_choral_sign(f, glyph, current_note, false);
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ /* a loop for rare signs, vertical episema, and horizontal episema */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ /* we continue with the hepisema */
+ if (current_note->h_episema_above || current_note->h_episema_below) {
+ found = _found(f, found);
+ gregoriotex_write_hepisema(f, current_note, i, type, glyph);
+ }
+ /* write_rare_sign also writes the vepisema */
+ if (current_note->special_sign) {
+ found = _found(f, found);
+ write_rare_sign(f, current_note, current_note->special_sign);
+ }
+ if (current_note->signs != _NO_SIGN) {
+ found = _found(f, found);
+ }
+ switch (current_note->signs) {
+ case _V_EPISEMA:
+ case _V_EPISEMA_PUNCTUM_MORA:
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ write_vepisema(f, current_note);
+ break;
+ default:
+ /* do nothing */
+ break;
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ /* final loop for choral signs and punctum mora */
+ for (current_note = note, i = 1; current_note;
+ current_note = current_note->next, ++i) {
+ switch (current_note->signs) {
+ case _PUNCTUM_MORA:
+ case _V_EPISEMA_PUNCTUM_MORA:
+ write_punctum_mora(f, glyph, current_note, fuse_to_next_note);
+ break;
+ case _AUCTUM_DUPLEX:
+ case _V_EPISEMA_AUCTUM_DUPLEX:
+ write_auctum_duplex(f, current_note);
+ break;
+ default:
+ break;
+ }
+ if (current_note->choral_sign) {
+ found = _found(f, found);
+ write_choral_sign(f, glyph, current_note, true);
+ }
+ if (type == T_ONE_NOTE) {
+ break;
+ }
+ }
+ fprintf(f, "}{");
+ if (status->point_and_click) {
+ fprintf(f, "%u:%u:%u", note->src_line, note->src_offset,
+ note->src_column + 1);
+ }
+ fprintf(f, "}%%\n");
+}
+
+static char *determine_leading_shape(const gregorio_glyph *const glyph)
+{
+ static char buf[BUFSIZE];
+ int ambitus = compute_ambitus(glyph->u.notes.first_note);
+ const char *head, *head_liquescence;
+
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_QUILISMA:
+ head = "Quilisma";
+ break;
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ head = "Oriscus";
+ break;
+ default:
+ head = "Punctum";
+ break;
+ }
+
+ if (glyph->u.notes.liquescentia & L_INITIO_DEBILIS) {
+ head_liquescence = "InitioDebilis";
+ } else {
+ head_liquescence = "";
+ }
+
+ gregorio_snprintf(buf, BUFSIZE, "Leading%s%s%s", head, tex_ambitus[ambitus],
+ head_liquescence);
+ return buf;
+}
+
+static __inline void write_composed_multinote_glyph(FILE *const f,
+ gregorio_note *current_note, const gregorio_glyph *glyph,
+ const signed char next_note_pitch,
+ const gregorio_shape next_note_alteration,
+ const int fuse_to_next_note, gregoriotex_status *const status,
+ const gregorio_score *const score, const char *glyph_end_between_notes)
+{
+ while (current_note) {
+ const bool has_next = current_note->next != NULL;
+ if (has_next) {
+ write_note(f, current_note, glyph, current_note->next->u.note.pitch,
+ S_UNDETERMINED, status);
+ } else {
+ write_note(f, current_note, glyph, next_note_pitch,
+ next_note_alteration, status);
+ }
+ write_signs(f, T_ONE_NOTE, glyph, current_note,
+ has_next ? 0 : fuse_to_next_note, status, score);
+ current_note = current_note->next;
+ if (current_note && glyph_end_between_notes) {
+ fputs(glyph_end_between_notes, f);
+ }
+ }
+}
+
+static void write_glyph(FILE *const f, const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ gregorio_glyph *const glyph,
+ gregoriotex_status *const status, const gregorio_score *const score)
+{
+ static char cpbuf[96], cpbuf2[96];
+ /* type is the type of the glyph. Understand the type of the glyph for
+ * gregoriotex, for the alignement between text and notes. (AT_ONE_NOTE,
+ * etc.) */
+ gtex_alignment type = 0;
+ /* the type of the glyph, in the sense of the shape (T_PES, etc.) */
+ gtex_type gtype = 0;
+ signed char next_note_pitch = 0;
+ gregorio_note *current_note;
+ const char *leading_shape, *shape;
+ const gregorio_glyph *prev_glyph =
+ gregorio_previous_non_texverb_glyph(glyph);
+ int fuse_to_next_note, fuse_from_previous_note =
+ (prev_glyph && prev_glyph->type == GRE_GLYPH)
+ ? prev_glyph->u.notes.fuse_to_next_glyph : 0;
+ gregorio_shape next_note_alteration;
+ gregorio_assert(glyph, write_glyph, "called with NULL pointer", return);
+ gregorio_assert(glyph->type == GRE_GLYPH && glyph->u.notes.first_note,
+ write_glyph, "called with glyph without note", return);
+ fuse_to_next_note = glyph->u.notes.fuse_to_next_glyph;
+ if (fuse_from_previous_note) {
+ fprintf(f, "\\GreFuse");
+ }
+ next_note_pitch = gregorio_determine_next_pitch(syllable, element, glyph,
+ &next_note_alteration);
+ current_note = glyph->u.notes.first_note;
+ /* first we check if it is really a unique glyph in gregoriotex... the
+ * glyphs that are not a unique glyph are : trigonus and pucta inclinata
+ * in general, and torculus resupinus and torculus resupinus flexus, so
+ * we first divide the glyph into real gregoriotex glyphs */
+ switch (glyph->u.notes.glyph_type) {
+ case G_PUNCTA_INCLINATA:
+ case G_2_PUNCTA_INCLINATA_DESCENDENS:
+ case G_3_PUNCTA_INCLINATA_DESCENDENS:
+ case G_4_PUNCTA_INCLINATA_DESCENDENS:
+ case G_5_PUNCTA_INCLINATA_DESCENDENS:
+ case G_2_PUNCTA_INCLINATA_ASCENDENS:
+ case G_3_PUNCTA_INCLINATA_ASCENDENS:
+ case G_4_PUNCTA_INCLINATA_ASCENDENS:
+ case G_5_PUNCTA_INCLINATA_ASCENDENS:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, NULL);
+ break;
+ case G_SCANDICUS:
+ if ((glyph->u.notes.liquescentia & L_DEMINUTUS)
+ || glyph->u.notes.liquescentia == L_NO_LIQUESCENTIA
+ || glyph->u.notes.liquescentia == L_FUSED) {
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ } else {
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, NULL);
+ }
+ break;
+ case G_ANCUS:
+ gregorio_assert(glyph->u.notes.liquescentia & L_DEMINUTUS,
+ write_glyph, "encountered a non-deminutus ancus", break);
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ /* we retain this "old-style" fusion as it does look marginally better
+ * on screen */
+ leading_shape = determine_leading_shape(glyph);
+ /* trick to have the good position for these glyphs */
+ glyph->u.notes.glyph_type = G_PORRECTUS_FLEXUS_NO_BAR;
+ glyph->u.notes.first_note = current_note->next;
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{\\GreFuseTwo{%s}{%s}}{%d}{%s}{%d}",
+ code_point(leading_shape, glyph->u.notes.is_cavum, cpbuf,
+ sizeof cpbuf),
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf2,
+ sizeof cpbuf2),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ glyph->u.notes.first_note = current_note;
+ glyph->u.notes.glyph_type = G_TORCULUS_RESUPINUS_FLEXUS;
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ case G_BIVIRGA:
+ case G_TRIVIRGA:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, "\\GreEndOfGlyph{4}%%\n");
+ break;
+ case G_TRISTROPHA:
+ case G_TRISTROPHA_AUCTA:
+ case G_DISTROPHA:
+ case G_DISTROPHA_AUCTA:
+ write_composed_multinote_glyph(f, current_note, glyph,
+ next_note_pitch, next_note_alteration, fuse_to_next_note,
+ status, score, "\\GreEndOfGlyph{5}%%\n");
+ break;
+
+ case G_PUNCTUM:
+ switch (glyph->u.notes.first_note->u.note.shape) {
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ /* don't change the oriscus */
+ break;
+
+ default:
+ switch (glyph->u.notes.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ glyph->u.notes.first_note->u.note.shape =
+ S_PUNCTUM_AUCTUS_ASCENDENS;
+ break;
+ case L_AUCTUS_DESCENDENS:
+ glyph->u.notes.first_note->u.note.shape =
+ S_PUNCTUM_AUCTUS_DESCENDENS;
+ break;
+ case L_INITIO_DEBILIS:
+ if (glyph->u.notes.fuse_to_next_glyph > 0) {
+ break;
+ }
+ /* else fall through to next case */
+ case L_DEMINUTUS:
+ glyph->u.notes.first_note->u.note.shape = S_PUNCTUM_DEMINUTUS;
+ default:
+ break;
+ }
+ break;
+ }
+
+ /* fall into the next case */
+ case G_PUNCTUM_INCLINATUM:
+ case G_VIRGA:
+ case G_VIRGA_REVERSA:
+ case G_STROPHA:
+ case G_STROPHA_AUCTA:
+ case G_ALTERATION:
+ write_note(f, glyph->u.notes.first_note, glyph, next_note_pitch,
+ next_note_alteration, status);
+ write_signs(f, T_ONE_NOTE, glyph, current_note, fuse_to_next_note,
+ status, score);
+ break;
+ default:
+ /* we retain this "old-style" fusion as it does look marginally better
+ * on screen */
+ /* special case of the torculus resupinus which first note is not a
+ * punctum */
+ if (glyph->u.notes.glyph_type == G_TORCULUS_RESUPINUS
+ && current_note->u.note.shape != S_PUNCTUM
+ && current_note->u.note.shape != S_QUILISMA) {
+ leading_shape = determine_leading_shape(glyph);
+ /* trick to have the good position for these glyphs */
+ glyph->u.notes.glyph_type = G_PORRECTUS_NO_BAR;
+ glyph->u.notes.first_note = current_note->next;
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{\\GreFuseTwo{%s}{%s}}{%d}{%s}{%d}",
+ code_point(leading_shape, glyph->u.notes.is_cavum, cpbuf,
+ sizeof cpbuf),
+ code_point(shape, glyph->u.notes.is_cavum, cpbuf2,
+ sizeof cpbuf2),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ glyph->u.notes.first_note = current_note;
+ glyph->u.notes.glyph_type = G_TORCULUS_RESUPINUS;
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ } else {
+ shape = gregoriotex_determine_glyph_name(glyph, &type, &gtype);
+ fprintf(f, "\\GreGlyph{%s}{%d}{%s}{%d}", code_point(shape,
+ glyph->u.notes.is_cavum, cpbuf, sizeof cpbuf),
+ pitch_value(glyph->u.notes.first_note->u.note.pitch),
+ next_custos(next_note_pitch, next_note_alteration, status),
+ type);
+ write_signs(f, gtype, glyph, glyph->u.notes.first_note,
+ fuse_to_next_note, status, score);
+ break;
+ }
+ }
+}
+
+static __inline unsigned int glyph_note_units(const gregorio_glyph *glyph)
+{
+ unsigned int count = 0;
+ const gregorio_note *note;
+ if (glyph->u.notes.glyph_type != G_ALTERATION) {
+ for (note = glyph->u.notes.first_note; note; note = note->next) {
+ ++count;
+ }
+ }
+ return count;
+}
+
+/* here we absolutely need to pass the syllable as an argument, because we
+ * will need the next note, that may be contained in the next syllable */
+
+static unsigned int write_element(FILE *const f,
+ const gregorio_syllable *const syllable,
+ const gregorio_element *const element,
+ gregoriotex_status *const status,
+ const gregorio_score *const score)
+{
+ unsigned int note_unit_count = 0;
+ if (element->type == GRE_ELEMENT) {
+ gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ switch (glyph->type) {
+ case GRE_SPACE:
+ switch (glyph->u.misc.unpitched.info.space) {
+ case SP_ZERO_WIDTH:
+ fprintf(f, "\\GreEndOfGlyph{1}%%\n");
+ break;
+ case SP_HALF_SPACE:
+ fprintf(f, "\\GreEndOfGlyph{22}%%\n");
+ break;
+ case SP_INTERGLYPH_SPACE:
+ fprintf(f, "\\GreEndOfGlyph{0}%%\n");
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(write_element,
+ "encountered an unexpected glyph-level space");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case GRE_TEXVERB_GLYPH:
+ if (glyph->texverb) {
+ fprintf(f, "%% verbatim text at glyph level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(glyph->texverb));
+ }
+ break;
+
+ default:
+ /* at this point glyph->type is GRE_GLYPH */
+ assert(glyph->type == GRE_GLYPH);
+ write_glyph(f, syllable, element, glyph, status, score);
+ note_unit_count += glyph_note_units(glyph);
+ if (glyph->next && glyph->next->type == GRE_GLYPH &&
+ glyph->next->u.notes.glyph_type != G_ALTERATION) {
+ if (is_fused(glyph->next->u.notes.liquescentia)) {
+ int space_case =
+ get_punctum_inclinatum_to_nobar_space_case(glyph);
+ if (space_case >= 0) {
+ /* fuse from punctum inclinatum to nobar glyph */
+ fprintf(f, "\\GreEndOfGlyph{%d}%%\n", space_case);
+ } else {
+ fprintf(f, "\\GreEndOfGlyph{1}%%\n");
+ }
+ } else if (is_puncta_inclinata(
+ glyph->next->u.notes.glyph_type)
+ || glyph->next->u.notes.glyph_type
+ == G_PUNCTA_INCLINATA) {
+ if ((is_puncta_inclinata(glyph->u.notes.glyph_type)
+ || glyph->u.notes.glyph_type
+ == G_PUNCTA_INCLINATA)
+ && glyph->next->u.notes.first_note->u.note.pitch
+ == gregorio_glyph_last_note(glyph)->u.note.pitch) {
+ /* special case for unison puncta inclinata */
+ fprintf(f, "\\GreEndOfGlyph{23}%%\n");
+ } else {
+ fprintf(f, "\\GreEndOfGlyph{9}%%\n");
+ }
+ } else if (glyph->u.notes.glyph_type != G_ALTERATION
+ || !glyph->next) {
+ fprintf(f, "\\GreEndOfGlyph{0}%%\n");
+ }
+ }
+ break;
+ }
+ }
+ }
+ return note_unit_count;
+}
+
+static void write_fixed_text_styles(FILE *f, gregorio_character *syllable_text,
+ gregorio_character *next_syllable_text)
+{
+ if (syllable_text) {
+ gregoriotex_ignore_style = gregoriotex_fix_style(syllable_text);
+ if (gregoriotex_ignore_style) {
+ fprintf(f, "\\GreSetFixedTextFormat{%d}",
+ gregoriotex_internal_style_to_gregoriotex
+ (gregoriotex_ignore_style));
+ }
+ }
+ if (next_syllable_text) {
+ gregoriotex_next_ignore_style = gregoriotex_fix_style(
+ next_syllable_text);
+ if (gregoriotex_next_ignore_style) {
+ fprintf(f, "\\GreSetFixedNextTextFormat{%d}",
+ gregoriotex_internal_style_to_gregoriotex
+ (gregoriotex_next_ignore_style));
+ }
+ }
+}
+
+static void write_text(FILE *const f, const gregorio_character *const text)
+{
+ if (text == NULL) {
+ fprintf(f, "{}{}{}{}{}");
+ return;
+ }
+ fprintf(f, "{");
+ gregorio_write_text(WTP_NORMAL, text, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+ fprintf(f, "}{");
+ gregorio_write_first_letter_alignment_text(WTP_NORMAL, text,
+ f, &gtex_write_verb, &gtex_print_char, &gtex_write_begin,
+ &gtex_write_end, &gtex_write_special_char);
+ gregoriotex_ignore_style = gregoriotex_next_ignore_style;
+ gregoriotex_next_ignore_style = ST_NO_STYLE;
+ fprintf(f, "}");
+}
+
+/*
+ * Function printing the line clef change (only updating \localleftbox, not
+ * printing the key). Useful for \GreDiscretionary.
+ * TODO: I'm not sure about the third argument, but that's how it's called in
+ * \GreChangeClef.
+ */
+static void gregoriotex_print_change_line_clef(FILE *f,
+ const gregorio_element *const current_element)
+{
+ if (current_element->type == GRE_CLEF) {
+ /* the third argument is 0 or 1 according to the need for a space
+ * before the clef */
+ fprintf(f, "\\GreSetLinesClef{%c}{%d}{1}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(current_element->u.misc.clef.clef),
+ current_element->u.misc.clef.line,
+ clef_flat_height(current_element->u.misc.clef.clef,
+ current_element->u.misc.clef.line,
+ current_element->u.misc.clef.flatted),
+ gregorio_clef_to_char(
+ current_element->u.misc.clef.secondary_clef),
+ current_element->u.misc.clef.secondary_line,
+ clef_flat_height(current_element->u.misc.clef.secondary_clef,
+ current_element->u.misc.clef.secondary_line,
+ current_element->u.misc.clef.secondary_flatted));
+ }
+}
+
+static __inline bool next_is_bar(const gregorio_syllable *syllable,
+ const gregorio_element *element)
+{
+ bool got_custos = false;
+ if (element) {
+ element = element->next;
+ }
+
+ while (syllable) {
+ if (element) {
+ if (element->type == GRE_BAR) {
+ return true;
+ }
+ /* allow no more than one manual custos before a bar */
+ if (got_custos || !is_manual_custos(element)) {
+ return false;
+ }
+ got_custos = true;
+ if (element->next) {
+ /* look at the next element */
+ element = element->next;
+ continue;
+ }
+ }
+
+ syllable = syllable->next_syllable;
+ if (!syllable) {
+ return false;
+ }
+
+ element = syllable->elements[0];
+ }
+
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(next_is_bar, "unexpected end of syllables/elements");
+ return false;
+ /* LCOV_EXCL_STOP */
+}
+
+static void finish_syllable(FILE *f, gregorio_syllable *syllable) {
+ /* Very last, if the syllable is the end of a no-linebreak area: */
+ if (syllable->no_linebreak_area == NLBA_END) {
+ fprintf(f, "\\GreEndNLBArea{%d}{0}%%\n",
+ next_is_bar(syllable, NULL)? 3 : 1);
+ }
+ if (syllable->euouae == EUOUAE_END) {
+ fprintf(f, "\\GreEndEUOUAE{%d}%%\n",
+ next_is_bar(syllable, NULL)? 3 : 1);
+ }
+}
+
+static void handle_final_bar(FILE *f, const char *type, gregorio_syllable *syllable)
+{
+ gregorio_element *element;
+ fprintf(f, "\\GreFinal%s{%%\n", type);
+ /* first element will be the bar, which we just handled, so skip it */
+ for (element = (*syllable->elements)->next; element;
+ element = element->next) {
+ switch (element->type) {
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "%% verbatim text at element level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_CUSTOS:
+ assert(element->u.misc.pitched.force_pitch);
+ fprintf(f, "\\GreFinalCustos{%d}{}%%\n",
+ pitch_value(element->u.misc.pitched.pitch));
+ break;
+
+ case GRE_END_OF_LINE:
+ fprintf(f, "\\GreFinalNewLine%%\n");
+ break;
+
+ default:
+ /* do nothing */
+ break;
+ }
+ }
+ fprintf(f, "}%%\n");
+ finish_syllable(f, syllable);
+}
+
+static __inline void write_syllable_point_and_click(FILE *const f,
+ const gregorio_syllable *const syllable,
+ const gregoriotex_status *const status)
+{
+ if (status->point_and_click && syllable->src_line) {
+ fprintf(f, "%u:%u:%u", syllable->src_line, syllable->src_offset,
+ syllable->src_column + 1);
+ }
+}
+
+static void write_syllable_text(FILE *f, const char *const syllable_type,
+ const gregorio_syllable *const syllable,
+ const bool ignored __attribute__((unused)))
+{
+ if (syllable_type != NULL) {
+ fprintf(f, "%s{%s%s\\GreSetThisSyllable", syllable_type,
+ syllable->clear? "\\GreClearSyllableText" : "",
+ syllable->forced_center? "\\GreGABCForceCenters" : "");
+ write_text(f, syllable->text);
+ fprintf(f, "}");
+ }
+}
+
+static void write_first_syllable_text(FILE *f, const char *const syllable_type,
+ const gregorio_syllable *const syllable,
+ const bool end_of_word)
+{
+ const gregorio_character *const text = syllable->text;
+ gregorio_not_null(syllable_type, write_first_syllable_text, return);
+ if (text == NULL) {
+ fprintf(f, "}{%s}{\\GreSetNoFirstSyllableText}", syllable_type);
+ } else {
+ gregorio_character *text_with_initial = gregorio_clone_characters(text),
+ *text_without_initial = gregorio_clone_characters(text);
+ const gregorio_character *t;
+
+ /* find out if there is a forced center -> has_forced_center */
+ gregorio_center_determination center = syllable->forced_center?
+ CENTER_FULLY_DETERMINED : CENTER_NOT_DETERMINED;
+
+ gregorio_rebuild_first_syllable(&text_with_initial, false);
+ gregorio_rebuild_characters(&text_with_initial, center, false);
+ gregorio_set_first_word(&text_with_initial);
+
+ gregorio_rebuild_first_syllable(&text_without_initial, true);
+ gregorio_rebuild_characters(&text_without_initial, center, true);
+ gregorio_set_first_word(&text_without_initial);
+
+ fprintf(f, "}{%s}{%s%s\\GreSetFirstSyllableText", syllable_type,
+ syllable->clear? "\\GreClearSyllableText" : "",
+ syllable->forced_center? "\\GreGABCForceCenters" : "");
+
+ fprintf(f, "{");
+ gregorio_write_first_letter_alignment_text(WTP_FIRST_SYLLABLE,
+ text_with_initial, f, &gtex_write_verb, &gtex_print_char,
+ &gtex_write_begin, &gtex_write_end, &gtex_write_special_char);
+ fprintf(f, "}{{");
+ gregorio_write_text(WTP_FIRST_SYLLABLE, text_without_initial, f,
+ &gtex_write_verb, &gtex_print_char, &gtex_write_begin,
+ &gtex_write_end, &gtex_write_special_char);
+ fprintf(f, "}}{{");
+ gregorio_write_text(WTP_NORMAL, text_with_initial, f, &gtex_write_verb,
+ &gtex_print_char, &gtex_write_begin, &gtex_write_end,
+ &gtex_write_special_char);
+ gregoriotex_ignore_style = gregoriotex_next_ignore_style;
+ gregoriotex_next_ignore_style = ST_NO_STYLE;
+ fprintf(f, "}}");
+
+ /* Check to see if we need to force a hyphen (empty first syllable) */
+ for (t = text_without_initial; t; t = t->next_character) {
+ if (t->is_character) {
+ break;
+ } else if (t->cos.s.type == ST_T_BEGIN) {
+ if (t->cos.s.style == ST_VERBATIM ||
+ t->cos.s.style == ST_SPECIAL_CHAR) {
+ break;
+ } else if (t->cos.s.style == ST_INITIAL) {
+ for (; t; t = t->next_character) {
+ if (!t->is_character && t->cos.s.type == ST_T_END
+ && t->cos.s.style == ST_INITIAL) {
+ break;
+ }
+ }
+ if (!t) break;
+ }
+ }
+ }
+ if (t || end_of_word) {
+ fprintf(f, "{}");
+ } else {
+ fprintf(f, "{\\GreEmptyFirstSyllableHyphen}");
+ }
+
+ fprintf(f, "}");
+
+ gregorio_free_characters(text_with_initial);
+ gregorio_free_characters(text_without_initial);
+ }
+}
+
+static __inline void scan_syllable_for_eol(
+ const gregorio_syllable *const syllable, char *const eol_forces_custos)
+{
+ const gregorio_element *element;
+ if (syllable->elements) {
+ for (element = *(syllable->elements); element; element = element->next) {
+ if (element->type == GRE_END_OF_LINE) {
+ if (element->u.misc.unpitched.info.eol_forces_custos) {
+ *eol_forces_custos = element->u.misc.unpitched.info
+ .eol_forces_custos_on? '1' : '0';
+ }
+ }
+ }
+ }
+}
+
+/*
+ * euouae_follows will be
+ * - '\0' if no euouae follows
+ * - '0' if euouae follows with no intervening linebreak
+ * - '1' if euouae follows with an intervening linebreak
+ *
+ * eol_forces_custos will be
+ * - '\0' if no linebreak follows or doesn't force a custos
+ * - '0' if a linebreak follows and forces custos off
+ * - '1' if a linebreak follows and forces custos on
+ */
+static __inline void anticipate_event(gregorio_syllable *syllable,
+ char *const euouae_follows, char *const eol_forces_custos,
+ unsigned short *const next_euouae_id)
+{
+ bool has_intervening_linebreak = false;
+
+ *euouae_follows = '\0';
+ *eol_forces_custos = '\0';
+ *next_euouae_id = 0;
+
+ if (syllable->next_syllable) {
+ for (syllable = syllable->next_syllable;
+ syllable && syllable->elements && *(syllable->elements)
+ && (*(syllable->elements))->type == GRE_END_OF_LINE;
+ syllable = syllable->next_syllable) {
+ has_intervening_linebreak = true;
+ /* we are at an end-of-line, so check if custos is forced */
+ scan_syllable_for_eol(syllable, eol_forces_custos);
+ }
+ if (syllable) {
+ scan_syllable_for_eol(syllable, eol_forces_custos);
+
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ *next_euouae_id = syllable->euouae_id = ++tex_position_id;
+ *euouae_follows = has_intervening_linebreak? '1' : '0';
+ }
+ }
+ }
+}
+
+static __inline void write_anticipated_event(FILE *f, const char euouae_follows,
+ const char eol_forces_custos, const short next_euouae_id)
+{
+ if (euouae_follows) {
+ fprintf(f, "%%\n\\GreNextSyllableBeginsEUOUAE{%hu}{%c}%%\n",
+ next_euouae_id, euouae_follows);
+ }
+ if (eol_forces_custos) {
+ fprintf(f, "%%\n\\GreUpcomingNewLineForcesCustos{%c}%%\n",
+ eol_forces_custos);
+ }
+}
+
+static __inline unsigned int count_note_units(const gregorio_element *element)
+{
+ unsigned int count = 0;
+ for (; element; element = element->next) {
+ if (element->type == GRE_ELEMENT) {
+ const gregorio_glyph *glyph;
+ for (glyph = element->u.first_glyph; glyph; glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ count += glyph_note_units(glyph);
+ }
+ }
+ }
+ }
+ return count;
+}
+
+static __inline void handle_last_of_voice(FILE *const f,
+ const gregorio_syllable *syllable,
+ const gregorio_element *const element,
+ const gregorio_element *const last_of_voice)
+{
+ if (element == last_of_voice) {
+ if (syllable->next_syllable) {
+ /* check for no-element syllables that follow */
+ for (syllable = syllable->next_syllable;
+ syllable && (!syllable->elements || !*(syllable->elements));
+ syllable = syllable->next_syllable) {
+ /* just loop */
+ }
+ /* if syllable is NULL here, then all syllables that follow
+ * have no elements */
+ }
+ /* emit GreLastOfScore if we are either on the last syllable (and
+ * thus the loop above is not executed, leaving syllable at the
+ * current syllable) or if a syllable which follows the current
+ * syllable has an element of some sort (and thus the loop above
+ * stopped before running out of syllables); in any case, the check
+ * is that syllable, at this point, is not NULL */
+ if (syllable) {
+ fprintf(f, "\\GreLastOfScore");
+ }
+ }
+}
+
+static bool is_before_linebreak(const gregorio_syllable *syllable,
+ const gregorio_element *element)
+{
+ if (element) {
+ element = element->next;
+ }
+
+ while (syllable) {
+ if (element) {
+ if (element->type == GRE_END_OF_LINE) {
+ return true;
+ }
+ break;
+ }
+
+ syllable = syllable->next_syllable;
+ if (syllable) {
+ element = syllable->elements[0];
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Arguments are relatively obvious. The most obscure is certainly first_of_disc
+ * which is 0 all the time, except in the case of a "clef change syllable". In
+ * this case we make a \GreDiscretionary with two arguments:
+ * 1.what should be printed if the syllable is the last of its line (which
+ * basically means everything but clefs and custos), and
+ * 2. what should be printed if it's in a middle of a line (which means
+ * everything)
+ * So the first_of_disc argument is:
+ * 0 if we don't know (general case)
+ * 1 in case of the first argument of a \GreDiscretionary
+ * 2 if we are in the second argument (necessary in order to avoid infinite loops)
+ */
+static void write_syllable(FILE *f, gregorio_syllable *syllable,
+ unsigned char first_of_disc, gregoriotex_status *const status,
+ const gregorio_score *const score,
+ const gregorio_element *const *const last_of_voice,
+ void (*const write_this_syllable_text)
+ (FILE *, const char *, const gregorio_syllable *, bool))
+{
+ const gregorio_element *clef_change_element = NULL, *element;
+ const char *syllable_type = NULL;
+ bool anticipated_event_written = false;
+ bool end_of_word;
+ bool end_of_line;
+ char euouae_follows;
+ char eol_forces_custos;
+ unsigned short next_euouae_id;
+ unsigned int note_unit_count;
+
+ gregorio_not_null(syllable, write_syllable, return);
+ end_of_word = syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE || !syllable->text
+ || !syllable->next_syllable;
+ /* Very first: before anything, if the syllable is the beginning of a
+ * no-linebreak area: */
+ if (syllable->no_linebreak_area == NLBA_BEGINNING) {
+ fprintf(f, "\\GreBeginNLBArea{1}{0}%%\n");
+ }
+ if (syllable->euouae == EUOUAE_BEGINNING) {
+ fprintf(f, "\\GreBeginEUOUAE{%hu}%%\n", syllable->euouae_id);
+ }
+ if (syllable->elements && *(syllable->elements)) {
+ /*
+ * first we check if the syllable is only a end of line. If it is the
+ * case, we don't print anything but a comment (to be able to read it
+ * if we read GregorioTeX). The end of lines are treated separately in
+ * GregorioTeX, it is buit inside the TeX structure.
+ */
+ if ((syllable->elements)[0]->type == GRE_END_OF_LINE) {
+ gregorio_assert(syllable != score->first_syllable, write_syllable,
+ "line break is not supported on the first syllable",
+ return);
+ if ((syllable->elements)[0]->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "%%\n%%\n\\GreNewParLine %%\n%%\n%%\n");
+ } else {
+ fprintf(f, "%%\n%%\n\\GreNewLine %%\n%%\n%%\n");
+ }
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ /*
+ * This case is not simple: if the syllable contains a clef change,
+ * whether it is (c4) or (::c4) or (z0::c4), we put it in a
+ * discretionary. Warning: only these three cases will have the expected
+ * effect. So first we detect it:
+ */
+ if (first_of_disc == 0) { /* to avoid infinite loops */
+ clef_change_element = gregorio_get_clef_change(syllable);
+ if (clef_change_element) {
+ gregorio_assert(syllable != score->first_syllable,
+ write_syllable,
+ "clef change is not supported on the first syllable",
+ return);
+ /*
+ * In this case, the first thing to do is to change the line clef
+ */
+ gregoriotex_print_change_line_clef(f, clef_change_element);
+ fprintf(f, "\\GreDiscretionary{0}{%%\n");
+ write_syllable(f, syllable, 1, status, score, last_of_voice,
+ write_syllable_text);
+ fprintf(f, "}{%%\n");
+ write_syllable(f, syllable, 2, status, score, last_of_voice,
+ write_syllable_text);
+ fprintf(f, "}%%\n");
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ }
+ write_fixed_text_styles(f, syllable->text,
+ syllable->next_syllable? syllable->next_syllable->text : NULL);
+ if ((syllable->elements)[0]->type == GRE_BAR) {
+ if (syllable != score->first_syllable) {
+ if (!syllable->next_syllable && !syllable->text
+ && (syllable->elements)[0]->u.misc.unpitched.info.bar
+ == B_DIVISIO_FINALIS) {
+ handle_final_bar(f, "DivisioFinalis", syllable);
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ if (!syllable->next_syllable && !syllable->text
+ && (syllable->elements)[0]->u.misc.unpitched.info.bar
+ == B_DIVISIO_MAIOR) {
+ handle_final_bar(f, "DivisioMaior", syllable);
+ write_this_syllable_text(f, NULL, syllable, end_of_word);
+ return;
+ }
+ }
+ /* the special case of first syllable will be treated as a normal
+ * bar syllable */
+ syllable_type = "\\GreBarSyllable";
+ } else {
+ if (first_of_disc != 0) {
+ syllable_type = "\\GreBarSyllable";
+ } else {
+ syllable_type = "\\GreSyllable";
+ }
+ }
+ } else {
+ write_fixed_text_styles(f, syllable->text,
+ syllable->next_syllable? syllable->next_syllable->text : NULL);
+ syllable_type = "\\GreNoNoteSyllable";
+ }
+ write_this_syllable_text(f, syllable_type, syllable, end_of_word);
+ fprintf(f, "{}{\\Gre%s}", syllable->first_word ? "FirstWord" : "Unstyled");
+ if (end_of_word) {
+ fprintf(f, "{1}");
+ } else {
+ fprintf(f, "{0}");
+ }
+ end_of_line = is_last_of_line(syllable);
+ anticipate_event(syllable, &euouae_follows, &eol_forces_custos,
+ &next_euouae_id);
+ if (syllable->next_syllable) {
+ fprintf(f, "{%s\\GreSetNextSyllable",
+ syllable->next_syllable->forced_center?
+ "\\GreGABCNextForceCenters" : "");
+ write_text(f, syllable->next_syllable->text);
+ if (end_of_line || first_of_disc == 1) {
+ fprintf(f, "\\GreLastOfLine");
+ } else if (euouae_follows) {
+ fprintf(f, "\\GreLastSyllableBeforeEUOUAE{%hu}{%c}",
+ next_euouae_id, euouae_follows);
+ }
+ fprintf(f, "}{");
+ write_syllable_point_and_click(f, syllable, status);
+ fprintf(f, "}{%d}{",
+ gregoriotex_syllable_first_type(syllable->next_syllable));
+ } else {
+ fprintf(f, "{\\GreSetNextSyllable{}{}{}{}{}");
+ if (end_of_line || first_of_disc == 1) {
+ fprintf(f, "\\GreLastOfLine");
+ }
+ fprintf(f, "}{");
+ write_syllable_point_and_click(f, syllable, status);
+ fprintf(f, "}{16}{");
+ }
+ if (syllable->translation) {
+ if (syllable->translation_type == TR_WITH_CENTER_BEGINNING) {
+ fprintf(f, "%%\n\\GreWriteTranslationWithCenterBeginning{");
+ } else {
+ fprintf(f, "%%\n\\GreWriteTranslation{");
+ }
+ write_translation(f, syllable->translation);
+ fprintf(f, "}%%\n");
+ }
+ if (syllable->translation_type) {
+ if (syllable->translation_type == TR_WITH_CENTER_END)
+ fprintf(f, "%%\n\\GreTranslationCenterEnd %%\n");
+ }
+ if (syllable->abovelinestext) {
+ fprintf(f, "%%\n\\GreSetTextAboveLines{%s}%%\n",
+ syllable->abovelinestext);
+ }
+ fprintf(f, "}{%%\n");
+
+ fprintf(f, "\\GreSyllableNoteCount{%u}%%\n", syllable->elements?
+ count_note_units(*syllable->elements) : 0);
+
+ note_unit_count = 0;
+ if (syllable->elements) {
+ for (element = *syllable->elements; element; element = element->next) {
+ if (element->nabc_lines && element->nabc) {
+ signed char high_pitch = UNDETERMINED_HEIGHT;
+ signed char low_pitch = UNDETERMINED_HEIGHT;
+ size_t i;
+ compute_element_height_extrema(element, &high_pitch,
+ &low_pitch);
+ fixup_height_extrema(&high_pitch, &low_pitch);
+ for (i = 0; i < element->nabc_lines; i++) {
+ if (element->nabc[i]) {
+ fprintf(f, "\\GreNABCNeumes{%d}{", (int)(i+1));
+ tex_escape_text(f, element->nabc[i]);
+ fprintf(f, "}{%d}{%d}%%\n", pitch_value(high_pitch),
+ pitch_value(low_pitch));
+ }
+ }
+ }
+ switch (element->type) {
+ case GRE_SPACE:
+ switch (element->u.misc.unpitched.info.space) {
+ case SP_LARGER_SPACE:
+ fprintf(f, "\\GreEndOfElement{1}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_GLYPH_SPACE:
+ fprintf(f, "\\GreEndOfElement{2}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_NEUMATIC_CUT:
+ fprintf(f, "\\GreEndOfElement{0}{0}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_AD_HOC_SPACE:
+ fprintf(f, "\\GreAdHocSpaceEndOfElement{%s}{0}{%u}%%\n",
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ note_unit_count);
+ break;
+ case SP_GLYPH_SPACE_NB:
+ fprintf(f, "\\GreEndOfElement{2}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_LARGER_SPACE_NB:
+ fprintf(f, "\\GreEndOfElement{1}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_NEUMATIC_CUT_NB:
+ fprintf(f, "\\GreEndOfElement{0}{1}{%u}%%\n",
+ note_unit_count);
+ break;
+ case SP_AD_HOC_SPACE_NB:
+ fprintf(f, "\\GreAdHocSpaceEndOfElement{%s}{1}{%u}%%\n",
+ element->u.misc.unpitched.info.ad_hoc_space_factor,
+ note_unit_count);
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(write_syllable,
+ "encountered an unexpected element-level space");
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ break;
+
+ case GRE_TEXVERB_ELEMENT:
+ if (element->texverb) {
+ fprintf(f, "%% verbatim text at element level:\n%s%%\n"
+ "%% end of verbatim text\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_NLBA:
+ if (element->u.misc.unpitched.info.nlba == NLBA_BEGINNING) {
+ fprintf(f, "\\GreBeginNLBArea{0}{0}%%\n");
+ } else {
+ fprintf(f, "\\GreEndNLBArea{%d}{0}%%\n",
+ next_is_bar(syllable, element)? 3 : 0);
+ }
+ break;
+
+ case GRE_ALT:
+ if (element->texverb) {
+ fprintf(f, "\\GreSetTextAboveLines{%s}%%\n",
+ gregorio_texverb(element->texverb));
+ }
+ break;
+
+ case GRE_CLEF:
+ /* We don't print clef changes at the end of a line */
+ if (first_of_disc != 1) {
+ if (is_before_linebreak(syllable, element)) {
+ signed char next_note_pitch;
+ gregorio_shape next_note_alteration;
+
+ next_note_pitch = gregorio_adjust_pitch_into_staff(
+ score, gregorio_determine_next_pitch(
+ syllable, element, NULL, &next_note_alteration)
+ - element->u.misc.clef.pitch_difference);
+
+ fputs(next_custos(next_note_pitch, next_note_alteration,
+ status), f);
+ gregoriotex_print_change_line_clef(f, element);
+ } else {
+ /* the third argument is 0 or 1 according to the need
+ * for a space before the clef */
+ fprintf(f, "\\GreChangeClef{%c}{%d}{%c}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(element->u.misc.clef.clef),
+ element->u.misc.clef.line,
+ (!element->previous || element->previous->type
+ == GRE_BAR)? '0' : '1',
+ clef_flat_height(element->u.misc.clef.clef,
+ element->u.misc.clef.line,
+ element->u.misc.clef.flatted),
+ gregorio_clef_to_char(
+ element->u.misc.clef.secondary_clef),
+ element->u.misc.clef.secondary_line,
+ clef_flat_height(
+ element->u.misc.clef.secondary_clef,
+ element->u.misc.clef.secondary_line,
+ element->u.misc.clef.secondary_flatted));
+ }
+ }
+ break;
+
+ case GRE_CUSTOS:
+ if (first_of_disc != 1) {
+ signed char next_note_pitch;
+ gregorio_shape next_note_alteration;
+ const char *alteration = "";
+ /* We don't print custos before a bar at the end of a line.
+ * We also print an unbreakable larger space before the
+ * custos */
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ next_note_pitch = gregorio_determine_next_pitch(syllable,
+ element, NULL, &next_note_alteration);
+ if (!element->u.misc.pitched.force_pitch) {
+ alteration = alteration_name(next_note_alteration);
+ }
+ fprintf(f, "\\GreCustos{%d}{%s}%s%%\n",
+ pitch_value(element->u.misc.pitched.pitch), alteration,
+ next_custos(next_note_pitch, next_note_alteration,
+ status));
+ ++note_unit_count;
+ }
+ break;
+
+ case GRE_SUPPRESS_CUSTOS:
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ fprintf(f, "\\GreSuppressEolCustos %%\n");
+ status->suppressed_custos = true;
+ break;
+
+ case GRE_BAR:
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ write_bar(f, score, syllable, element, first_of_disc);
+ break;
+
+ case GRE_END_OF_LINE:
+ if (!element->next) {
+ write_anticipated_event(f, euouae_follows,
+ eol_forces_custos, next_euouae_id);
+ anticipated_event_written = true;
+ }
+ /* here we suppose we don't have two linebreaks in the same
+ * syllable */
+ if (element->u.misc.unpitched.info.eol_ragged) {
+ fprintf(f, "%%\n%%\n\\GreNewParLine %%\n%%\n%%\n");
+ } else {
+ fprintf(f, "%%\n%%\n\\GreNewLine %%\n%%\n%%\n");
+ }
+ break;
+
+ default:
+ /* here current_element->type is GRE_ELEMENT */
+ assert(element->type == GRE_ELEMENT);
+ handle_last_of_voice(f, syllable, element, *last_of_voice);
+ note_unit_count += write_element(f, syllable, element, status,
+ score);
+ if (element->next && (element->next->type == GRE_ELEMENT
+ || (element->next->next
+ && element->next->type == GRE_ALT
+ && element->next->next->type ==
+ GRE_ELEMENT))) {
+ fprintf(f, "\\GreEndOfElement{0}{0}{%u}%%\n",
+ note_unit_count);
+ }
+ break;
+ }
+ }
+ }
+ if (!anticipated_event_written) {
+ write_anticipated_event(f, euouae_follows, eol_forces_custos,
+ next_euouae_id);
+ }
+ fprintf(f, "}%%\n");
+ if (syllable->position == WORD_END
+ || syllable->position == WORD_ONE_SYLLABLE || !syllable->text) {
+ fprintf(f, "%%\n");
+ }
+ finish_syllable(f, syllable);
+}
+
+static char *digest_to_hex(const unsigned char digest[SHA1_DIGEST_SIZE])
+{
+ static const char *const hex = "0123456789abcdef";
+ static char result[41];
+
+ char *p = result;
+ unsigned char byte;
+
+ int i;
+ for (i = 0; i < SHA1_DIGEST_SIZE; ++i) {
+ byte = digest[i];
+
+ *(p++) = hex[(byte >> 4) & 0x0FU];
+ *(p++) = hex[byte & 0x0FU];
+ }
+
+ *p = '\0';
+
+ return result;
+}
+
+static void initialize_score(gregoriotex_status *const status,
+ gregorio_score *score, const bool point_and_click,
+ const gregorio_element **const last_of_voice)
+{
+ gregorio_syllable *syllable;
+
+ status->bottom_line = false;
+ status->top_height = status->bottom_height = UNDETERMINED_HEIGHT;
+ status->abovelinestext = status->translation = false;
+ status->suppressed_custos = false;
+
+ /* first pass to compute positioning */
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregoriotex_compute_positioning(syllable->elements[voice], score);
+ }
+ }
+
+ gregoriotex_compute_cross_syllable_positioning(score);
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ int voice;
+
+ if (syllable->translation) {
+ status->translation = true;
+ }
+
+ if (syllable->abovelinestext) {
+ status->abovelinestext = true;
+ }
+
+ /* simultaneously compute height extrema and determine the last "real"
+ * element in each voice */
+ for (voice = 0; voice < score->number_of_voices; ++voice) {
+ gregorio_element *element;
+
+ for (element = syllable->elements[voice]; element;
+ element = element->next) {
+ gregorio_glyph *glyph;
+
+ switch (element->type) {
+ case GRE_ALT:
+ status->abovelinestext = true;
+ break;
+
+ case GRE_CUSTOS:
+ last_of_voice[voice] = element;
+ break;
+
+ case GRE_ELEMENT:
+ for (glyph = element->u.first_glyph; glyph;
+ glyph = glyph->next) {
+ if (glyph->type == GRE_GLYPH) {
+ last_of_voice[voice] = element;
+ compute_height_extrema(glyph,
+ glyph->u.notes.first_note,
+ &(status->top_height),
+ &(status->bottom_height));
+ }
+ }
+ break;
+
+ case GRE_BAR:
+ last_of_voice[voice] = element;
+ break;
+
+ default:
+ /* to eliminate the warning */
+ break;
+ }
+ }
+ }
+ }
+
+ fixup_height_extrema(&(status->top_height), &(status->bottom_height));
+
+ status->point_and_click = point_and_click;
+}
+
+static void write_header(FILE *const f, const char *const name,
+ const char *const value)
+{
+ if (value) {
+ fprintf(f, "\\GreHeader{");
+ tex_escape_text(f, name);
+ fprintf(f, "}{");
+ tex_escape_text(f, value);
+ fprintf(f, "}%%\n");
+ }
+}
+
+static void write_headers(FILE *const f, gregorio_score *const score)
+{
+ gregorio_header *header;
+
+ fprintf(f, "\\GreBeginHeaders %%\n");
+ for (header = score->headers; header; header = header->next) {
+ write_header(f, header->name, header->value);
+ }
+ fprintf(f, "\\GreEndHeaders %%\n");
+}
+
+static void suppress_expansion(FILE *const f, const char *text)
+{
+ if (!text) {
+ return;
+ }
+
+ for (; *text; ++text) {
+ if (*text == '\\') {
+ fprintf(f, "\\noexpand");
+ }
+ fputc(*text, f);
+ }
+}
+
+static int first_note_near_clef(const gregorio_score *const score) {
+ gregorio_clef_info clef = gregorio_default_clef;
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ if (!clef.secondary_line && !clef.flatted && score->first_syllable
+ && score->first_syllable->elements) {
+ const gregorio_element *element = score->first_syllable->elements[0];
+ if (element && element->type == GRE_ELEMENT) {
+ const gregorio_glyph *glyph = element->u.first_glyph;
+ if (glyph && glyph->type == GRE_GLYPH) {
+ const signed char clef_pitch = LOW_LINE_PITCH
+ + ((clef.line - 1) * 2);
+ const gregorio_note *low_note = glyph->u.notes.first_note;
+ const gregorio_note *high_note = low_note;
+ switch (glyph->u.notes.glyph_type) {
+ case G_PODATUS:
+ /* next note is above the previous */
+ if (low_note->next) {
+ high_note = low_note->next;
+ }
+ break;
+ case G_FLEXA:
+ case G_PORRECTUS:
+ case G_PORRECTUS_FLEXUS:
+ /* there is a stem the size of the ambitus */
+ if (high_note->next) {
+ low_note = high_note->next;
+ }
+ break;
+ default:
+ /* to prevent the enum warning */
+ break;
+ }
+ if (high_note->u.note.pitch < clef_pitch - 3
+ || low_note->u.note.pitch > clef_pitch + 3) {
+ return 0;
+ }
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+static int clef_size(const gregorio_clef_info *const clef)
+{
+ /* this is a heuristic clef size approximation:
+ * C-clef = 1
+ * F-clef = 2
+ * flatted = +2
+ * unstacked double-clef = +1 (plus the clef size)
+ */
+ /* purposely making line signed */
+ int line_diff = clef->line - clef->secondary_line;
+ int size;
+ if (clef->clef == CLEF_F) {
+ size = 2;
+ } else {
+ size = 1;
+ }
+ if (clef->flatted) {
+ size += 2;
+ }
+ if (clef->secondary_line) {
+ if (line_diff < -1 || line_diff > 1) { /* stacked */
+ int secondary_size;
+ if (clef->secondary_clef == CLEF_F) {
+ secondary_size = 2;
+ } else {
+ secondary_size = 1;
+ }
+ if (clef->secondary_flatted) {
+ secondary_size += 2;
+ }
+ if (secondary_size > size) {
+ size = secondary_size;
+ }
+ } else { /* unstacked */
+ size += 1;
+ if (clef->secondary_clef == CLEF_F) {
+ size += 2;
+ } else {
+ size += 1;
+ }
+ if (clef->secondary_flatted) {
+ size += 2;
+ }
+ }
+ }
+ return size;
+}
+
+static void write_largest_clef(FILE *const f, gregorio_score *const score)
+{
+ const gregorio_syllable *syllable;
+ const gregorio_element *element;
+ gregorio_clef_info clef = gregorio_default_clef;
+ int size;
+
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ }
+ size = clef_size(&clef);
+
+ for (syllable = score->first_syllable; syllable;
+ syllable = syllable->next_syllable) {
+ if (syllable->elements) {
+ for (element = *syllable->elements; element;
+ element = element->next) {
+ if (element->type == GRE_CLEF) {
+ const int this_size = clef_size(&element->u.misc.clef);
+ if (this_size > size) {
+ clef = element->u.misc.clef;
+ size = this_size;
+ }
+ }
+ }
+ }
+ }
+
+ fprintf(f, "\\GreSetLargestClef{%c}{%d}{%d}{%c}{%d}{%d}%%\n",
+ gregorio_clef_to_char(clef.clef), clef.line,
+ clef_flat_height(clef.clef, clef.line, clef.flatted),
+ gregorio_clef_to_char(clef.secondary_clef), clef.secondary_line,
+ clef_flat_height(clef.secondary_clef, clef.secondary_line,
+ clef.secondary_flatted));
+}
+
+void gregoriotex_write_score(FILE *const f, gregorio_score *const score,
+ const char *const point_and_click_filename)
+{
+ gregorio_clef_info clef = gregorio_default_clef;
+ gregorio_syllable *current_syllable;
+ int annotation_num;
+ gregoriotex_status status;
+ const gregorio_element *last_of_voice[MAX_NUMBER_OF_VOICES];
+
+ memset(last_of_voice, 0, sizeof last_of_voice);
+ initialize_score(&status, score, point_and_click_filename != NULL,
+ last_of_voice);
+
+ gregorio_assert(f, gregoriotex_write_score, "call with NULL file", return);
+
+ gregorio_assert_only(score->number_of_voices == 1, gregoriotex_write_score,
+ "gregoriotex only works in monophony (for the moment)");
+
+ fprintf(f, "%% File generated by gregorio %s\n", GREGORIO_VERSION);
+ fprintf(f, "\\GregorioTeXAPIVersion{%s}%%\n", VERSION);
+
+ if (score->name) {
+ fprintf(f, "%% Name: %s\n", score->name);
+ }
+ if (score->author) {
+ fprintf(f, "%% Author: %s\n", score->author);
+ }
+ if (score->gabc_copyright) {
+ fprintf(f, "%% The copyright of this gabc is: %s\n",
+ score->gabc_copyright);
+ }
+ if (score->score_copyright) {
+ fprintf(f, "%% The copyright of the score is: %s\n",
+ score->score_copyright);
+ }
+
+ write_headers(f, score);
+
+ if (score->first_voice_info) {
+ clef = score->first_voice_info->initial_clef;
+ }
+ fprintf(f, "\\GreBeginScore{%s}{%d}{%d}{%d}{%d}{%s}{%u}"
+ "{\\GreInitialClefPosition{%d}{%d}}%%\n",
+ digest_to_hex(score->digest), status.top_height,
+ status.bottom_height, bool_to_int(status.translation),
+ bool_to_int(status.abovelinestext),
+ point_and_click_filename? point_and_click_filename : "",
+ score->staff_lines, clef.line, clef.secondary_line);
+ if (score->nabc_lines) {
+ fprintf(f, "\\GreScoreNABCLines{%d}", (int)score->nabc_lines);
+ }
+ if (score->annotation[0]) {
+ fprintf(f, "\\GreAnnotationLines");
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS;
+ ++annotation_num) {
+ if (score->annotation[annotation_num]) {
+ fprintf(f, "{%s}",
+ score->annotation[annotation_num]);
+ }
+ else {
+ fprintf(f, "{}");
+ }
+ }
+ fprintf(f, "%%\n");
+ }
+ if (score->mode) {
+ fprintf(f, "\\GreMode{");
+ if (*(score->mode) >= '1' && *(score->mode) <= '8') {
+ fprintf(f, "\\GreModeNumber{%c}%s", *(score->mode), score->mode + 1);
+ } else {
+ fprintf(f, "%s", score->mode);
+ }
+ fprintf(f, "}{");
+ suppress_expansion(f, score->mode_modifier);
+ fprintf(f, "}{");
+ suppress_expansion(f, score->mode_differentia);
+ fprintf(f, "}%%\n");
+ }
+
+ write_largest_clef(f, score);
+ fprintf(f, "\\GreScoreOpening{%%\n"); /* GreScoreOpening#1 */
+ if (score->first_voice_info) {
+ gregoriotex_write_voice_info(f, score->first_voice_info);
+ }
+ fprintf(f, "}{%%\n"); /* GreScoreOpening#2 */
+ fprintf(f, "\\GreSetInitialClef{%c}{%d}{%d}{%c}{%d}{%d}{%d}%%\n",
+ gregorio_clef_to_char(clef.clef), clef.line,
+ clef_flat_height(clef.clef, clef.line, clef.flatted),
+ gregorio_clef_to_char(clef.secondary_clef), clef.secondary_line,
+ clef_flat_height(clef.secondary_clef, clef.secondary_line,
+ clef.secondary_flatted),
+ first_note_near_clef(score));
+ fprintf(f, "}{%%\n"); /* GreScoreOpening#3 */
+ current_syllable = score->first_syllable;
+ if (current_syllable) {
+ write_syllable(f, current_syllable, 0, &status, score, last_of_voice,
+ write_first_syllable_text);
+ current_syllable = current_syllable->next_syllable;
+ } else {
+ /* edge case: a score with no syllables */
+ fprintf(f, "}{}{\\GreSetNoFirstSyllableText}%%\n");
+ }
+ while (current_syllable) {
+ write_syllable(f, current_syllable, 0, &status, score, last_of_voice,
+ write_syllable_text);
+ current_syllable = current_syllable->next_syllable;
+ }
+ fprintf(f, "\\GreEndScore %%\n\\endinput %%\n");
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h
new file mode 100644
index 00000000000..dc662b25ffe
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregoriotex/gregoriotex.h
@@ -0,0 +1,151 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes GregorioTeX writing data structures and entry points.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GREGORIOTEX_H
+#define GREGORIOTEX_H
+
+#include "bool.h"
+
+#define OFFSET_CASE(name) static const char *const name = #name
+
+/*
+ * Here are the different types, they must be the same as in squarize.py
+ */
+
+typedef enum gtex_type {
+ T_ONE_NOTE = 1,
+ /* two note neumes */
+ T_PES,
+ T_PES_QUADRATUM,
+ T_QUILISMA_PES,
+ T_PES_QUASSUS,
+ T_QUILISMA_PES_QUADRATUM,
+ T_FLEXUS,
+ T_FLEXUS_ORISCUS,
+ T_FLEXUS_ORISCUS_SCAPUS,
+ T_PES_ORISCUS,
+ /* three note neumes */
+ T_PORRECTUS,
+ T_TORCULUS,
+ T_TORCULUS_QUILISMA,
+ T_SCANDICUS, /* only deminutus */
+ T_ANCUS, /* only deminutus */
+ T_SALICUS,
+ /* four note neumes */
+ T_SALICUS_FLEXUS,
+ T_PORRECTUS_FLEXUS,
+ T_TORCULUS_RESUPINUS,
+ T_TORCULUS_LIQUESCENS,
+ T_TORCULUS_RESUPINUS_FLEXUS
+} gtex_type;
+
+/* the different types for the alignment of the notes in GregorioTeX
+ * these values are numbers coded into GregorioTeX */
+typedef enum gtex_alignment {
+ AT_ONE_NOTE = 0,
+ AT_FLEXUS = 1,
+ AT_PORRECTUS = 2,
+ AT_INITIO_DEBILIS = 3,
+ AT_QUILISMA = 4,
+ AT_ORISCUS = 5,
+ AT_PUNCTUM_INCLINATUM = 6,
+ AT_STROPHA = 7,
+ AT_FLEXUS_1 = 8,
+ AT_FLEXUS_DEMINUTUS = 9
+} gtex_alignment;
+
+/* Here we define a function that will determine the number of the
+ * liquescentia that we will add to the glyph number. There are several types
+ * as all glyphs can't have all liquescentiae. Let's first define the
+ * different types: */
+
+typedef enum gtex_glyph_liquescentia {
+ LG_ALL = 0, /* for glyphs that accept all liquecentiae */
+ LG_NO_INITIO, /* for glyphs that don't accept initio debilis */
+ LG_NONE, /* for glyphs that don't accept liquescentia */
+ LG_ONLY_DEMINUTUS,
+ LG_FUSIBLE_INITIO
+} gtex_glyph_liquescentia;
+
+typedef enum gtex_sign_type {
+ ST_H_EPISEMA = 0,
+ ST_V_EPISEMA = 1
+} gtex_sign_type;
+
+#define HEPISEMA_FIRST_TWO 12
+
+static __inline bool choral_sign_here_is_low(const gregorio_glyph *const glyph,
+ const gregorio_note *const note, bool *const kind_of_pes)
+{
+ if (kind_of_pes) {
+ *kind_of_pes = false;
+ }
+
+ switch (glyph->u.notes.glyph_type) {
+ case G_FLEXA:
+ case G_TORCULUS:
+ case G_TORCULUS_LIQUESCENS:
+ case G_TORCULUS_RESUPINUS_FLEXUS:
+ case G_PORRECTUS_FLEXUS:
+ if (!note->next) {
+ return true;
+ }
+ break;
+
+ case G_PODATUS:
+ case G_PORRECTUS:
+ case G_TORCULUS_RESUPINUS:
+ if (!note->next || note->next->next) {
+ break;
+ }
+ if (kind_of_pes) {
+ *kind_of_pes = true;
+ }
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
+static __inline bool is_on_a_line(const char pitch)
+{
+ return pitch % 2 == 0;
+}
+
+static __inline bool is_between_lines(const char pitch)
+{
+ return pitch % 2 == 1;
+}
+
+bool gtex_is_h_episema_above_shown(const gregorio_note *const note);
+bool gtex_is_h_episema_below_shown(const gregorio_note *const note);
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+ gtex_alignment *const type, gtex_type *const gtype);
+void gregoriotex_compute_positioning(const gregorio_element *element,
+ const gregorio_score *score);
+void gregoriotex_compute_cross_syllable_positioning(
+ const gregorio_score *score);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/messages.c b/Build/source/texk/gregorio/gregorio-src/src/messages.c
new file mode 100644
index 00000000000..d8b7cecab53
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/messages.c
@@ -0,0 +1,172 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions for logging messages, warnings, and errors.
+ *
+ * Copyright (C) 2009-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <assert.h>
+#include <stdarg.h>
+#include "bool.h"
+#include "messages.h"
+#include "support.h"
+
+static FILE *error_out;
+static gregorio_verbosity verbosity_mode = 0;
+static bool debug_messages = false;
+static bool deprecation_is_warning = true;
+static int return_value = 0;
+
+int gregorio_get_return_value(void)
+{
+ return return_value;
+}
+
+void gregorio_set_error_out(FILE *const f)
+{
+ error_out = f;
+}
+
+void gregorio_set_verbosity_mode(const gregorio_verbosity verbosity)
+{
+ verbosity_mode = verbosity;
+}
+
+void gregorio_set_debug_messages(bool debug)
+{
+ debug_messages = debug;
+}
+
+void gregorio_set_deprecation_errors(bool deprecation_errors)
+{
+ deprecation_is_warning = !deprecation_errors;
+}
+
+static const char *verbosity_to_str(const gregorio_verbosity verbosity)
+{
+ const char *str;
+ switch (verbosity) {
+ case VERBOSITY_WARNING:
+ str = _("warning:");
+ break;
+ case VERBOSITY_DEPRECATION:
+ /* if there is no deprecation, these lines will not be hit */
+ /* LCOV_EXCL_START */
+ str = _("deprecation:");
+ break;
+ /* LCOV_EXCL_STOP */
+ case VERBOSITY_ERROR:
+ str = _("error:");
+ break;
+ case VERBOSITY_ASSERTION:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ str = _("assertion:");
+ break;
+ /* LCOV_EXCL_STOP */
+ case VERBOSITY_FATAL:
+ /* all fatal errors should not be reasonably testable */
+ /* LCOV_EXCL_START */
+ str = _("fatal error:");
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ /* INFO, for example */
+ str = " ";
+ break;
+ }
+ return str;
+}
+
+void gregorio_messagef(const char *function_name,
+ gregorio_verbosity verbosity, int line_number,
+ const char *format, ...)
+{
+ va_list args;
+ const char *verbosity_str;
+
+ if (!debug_messages && verbosity != VERBOSITY_ASSERTION) {
+ line_number = 0;
+ function_name = NULL;
+ }
+
+ /* if these assertions fail, the program is not using this code correctly */
+ assert(error_out);
+ assert(verbosity_mode);
+
+ if (verbosity < verbosity_mode) {
+ return;
+ }
+ if (verbosity == VERBOSITY_ASSERTION && return_value) {
+ /* if something has already caused the system to fail, demote any
+ * assertions coming after to warnings */
+ verbosity = VERBOSITY_WARNING;
+ }
+ verbosity_str = verbosity_to_str(verbosity);
+ if (line_number) {
+ /* if line number is specified, function_name must be specified */
+ assert(function_name);
+ if (function_name) {
+ fprintf(error_out, "%d: in function `%s': %s", line_number,
+ function_name, verbosity_str);
+ }
+ } else {
+ if (function_name) {
+ fprintf(error_out, "in function `%s': %s", function_name,
+ verbosity_str);
+ } else {
+ fprintf(error_out, "%s", verbosity_str);
+ }
+ }
+ va_start(args, format);
+ vfprintf(error_out, format, args);
+ va_end(args);
+ fprintf(error_out, "\n");
+
+ switch (verbosity) {
+ case VERBOSITY_DEPRECATION:
+ /* if there is no deprecation, these lines will not be hit */
+ /* LCOV_EXCL_START */
+ if (deprecation_is_warning) {
+ break;
+ }
+ /* LCOV_EXCL_STOP */
+ /* else fall through */
+ case VERBOSITY_ERROR:
+ case VERBOSITY_ASSERTION:
+ return_value = 1;
+ break;
+ case VERBOSITY_FATAL:
+ /* all fatal errors should not be reasonably testable */
+ /* LCOV_EXCL_START */
+ gregorio_exit(1);
+ break;
+ /* LCOV_EXCL_STOP */
+ default:
+ break;
+ }
+}
+
+void gregorio_message(const char *string, const char *function_name,
+ gregorio_verbosity verbosity, int line_number)
+{
+ gregorio_messagef(function_name, verbosity, line_number, "%s", string);
+}
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/messages.h b/Build/source/texk/gregorio/gregorio-src/src/messages.h
new file mode 100644
index 00000000000..c89bbbe5484
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/messages.h
@@ -0,0 +1,90 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the message logging functions.
+ *
+ * Copyright (C) 2009-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MESSAGES_H
+#define MESSAGES_H
+
+#ifndef ENABLE_NLS
+#define ENABLE_NLS 0
+#endif
+#if ENABLE_NLS == 1
+#include "gettext.h"
+#define _(str) gettext(str)
+#define N_(str) (str)
+#define ngt_(str, strtwo, count) ngettext(str, strtwo, count)
+#else
+#define _(str) (str)
+#define N_(str) (str)
+#define ngt_(str, strtwo, count) (str)
+#endif
+
+typedef enum gregorio_verbosity {
+ VERBOSITY_INFO = 1,
+ VERBOSITY_WARNING,
+ VERBOSITY_DEPRECATION,
+ VERBOSITY_ERROR,
+ VERBOSITY_ASSERTION,
+ VERBOSITY_FATAL
+} gregorio_verbosity;
+
+void gregorio_message(const char *string, const char *function_name,
+ gregorio_verbosity verbosity, int line_number);
+void gregorio_messagef(const char *function_name,
+ gregorio_verbosity verbosity,
+ int line_number, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 4, 5)));
+void gregorio_set_verbosity_mode(gregorio_verbosity verbosity);
+void gregorio_set_debug_messages(bool debug);
+void gregorio_set_deprecation_errors(bool deprecation_errors);
+void gregorio_set_error_out(FILE *f);
+int gregorio_get_return_value(void);
+
+#define gregorio_assert_only(TEST,FUNCTION,MESSAGE) \
+ if (!(TEST)) { \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__); \
+ }
+
+#define gregorio_assert(TEST,FUNCTION,MESSAGE,ON_FALSE) \
+ if (!(TEST)) { \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__); \
+ ON_FALSE; \
+ }
+
+#define gregorio_assert2(TEST,FUNCTION,FORMAT,ARG,ON_FALSE) \
+ if (!(TEST)) { \
+ gregorio_messagef(#FUNCTION, VERBOSITY_ASSERTION, __LINE__, FORMAT, ARG); \
+ ON_FALSE; \
+ }
+
+#define gregorio_not_null(VARIABLE,FUNCTION,ON_FALSE) \
+ gregorio_assert(VARIABLE, FUNCTION, #VARIABLE " may not be null", ON_FALSE)
+
+#define gregorio_not_null_ptr(VARIABLE,FUNCTION,ON_FALSE) \
+ gregorio_assert(VARIABLE && *VARIABLE, FUNCTION, #VARIABLE " may not be null", ON_FALSE)
+
+#define gregorio_fail(FUNCTION,MESSAGE) \
+ gregorio_message(_(MESSAGE), #FUNCTION, VERBOSITY_ASSERTION, __LINE__)
+
+#define gregorio_fail2(FUNCTION,FORMAT,ARG) \
+ gregorio_messagef(#FUNCTION, VERBOSITY_ASSERTION, __LINE__, FORMAT, ARG)
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/plugins.h b/Build/source/texk/gregorio/gregorio-src/src/plugins.h
new file mode 100644
index 00000000000..7af3aa61c71
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/plugins.h
@@ -0,0 +1,40 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the "main" entry points for reading and writing data.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PLUGINS_H
+#define PLUGINS_H
+
+#include "bool.h"
+
+void dump_write_score(FILE *f, gregorio_score *score);
+
+void dump_write_characters(FILE *const f,
+ const gregorio_character *current_character);
+
+gregorio_score *gabc_read_score(FILE *f_in, bool point_and_click);
+
+void gabc_write_score(FILE *f, gregorio_score *score);
+
+void gregoriotex_write_score(FILE *f, gregorio_score *score,
+ const char *point_and_click_filename);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/sha1.c b/Build/source/texk/gregorio/gregorio-src/src/sha1.c
new file mode 100644
index 00000000000..4420bd35327
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/sha1.c
@@ -0,0 +1,346 @@
+/*
+ * sha1.c - Functions to compute SHA1 message digest of files or
+ * memory blocks according to the NIST specification FIPS-180-1.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ * Copyright (C) 2000-2001, 2003-2006, 2008-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of Gregorio.
+ * This file has been adapted from GNU coreutils to fit Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Written by Scott G. Miller
+ Credits:
+ Robert Klep <robert@ilse.nl> -- Expansion function fix
+*/
+
+#include "config.h"
+#include "sha1.h"
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef WORDS_BIGENDIAN
+#define SWAP(n) (n)
+#else
+#define SWAP(n) \
+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+#endif
+
+#define BLOCKSIZE 32768
+#if BLOCKSIZE % 64 != 0
+#error "invalid BLOCKSIZE"
+#endif
+
+/* This array contains the bytes used to pad the buffer to the next
+ 64-byte boundary. (RFC 1321, 3.1: Step 1) */
+static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
+
+/* Take a pointer to a 160 bit block of data (five 32 bit ints) and
+ initialize it to the start constants of the SHA1 algorithm. This
+ must be called before using hash in the call to sha1_hash. */
+void sha1_init_ctx(struct sha1_ctx *ctx)
+{
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+ ctx->E = 0xc3d2e1f0;
+
+ ctx->total[0] = ctx->total[1] = 0;
+ ctx->buflen = 0;
+}
+
+/* Copy the 4 byte value from v into the memory location pointed to by *cp,
+ If your architecture allows unaligned access this is equivalent to
+ * (uint32_t *) cp = v */
+static void set_uint32(char *cp, uint32_t v)
+{
+ memcpy(cp, &v, sizeof v);
+}
+
+/* Put result from CTX in first 20 bytes following RESBUF. The result
+ must be in little endian byte order. */
+void *sha1_read_ctx(const struct sha1_ctx *ctx, void *resbuf)
+{
+ char *r = resbuf;
+ set_uint32(r + 0 * sizeof ctx->A, SWAP(ctx->A));
+ set_uint32(r + 1 * sizeof ctx->B, SWAP(ctx->B));
+ set_uint32(r + 2 * sizeof ctx->C, SWAP(ctx->C));
+ set_uint32(r + 3 * sizeof ctx->D, SWAP(ctx->D));
+ set_uint32(r + 4 * sizeof ctx->E, SWAP(ctx->E));
+
+ return resbuf;
+}
+
+/* Process the remaining bytes in the internal buffer and the usual
+ prolog according to the standard and write the result to RESBUF. */
+void *sha1_finish_ctx(struct sha1_ctx *ctx, void *resbuf)
+{
+ /*
+ * Take yet unprocessed bytes into account.
+ */
+ uint32_t bytes = ctx->buflen;
+ size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4;
+
+ /*
+ * Now count remaining bytes.
+ */
+ ctx->total[0] += bytes;
+ if (ctx->total[0] < bytes)
+ ++ctx->total[1]; /* data-sepcific; LCOV_EXCL_LINE */
+
+ /*
+ * Put the 64-bit file length in *bits* at the end of the buffer.
+ */
+ ctx->buffer[size - 2] = SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ ctx->buffer[size - 1] = SWAP(ctx->total[0] << 3);
+
+ memcpy(&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes);
+
+ /*
+ * Process last bytes.
+ */
+ sha1_process_block(ctx->buffer, size * 4, ctx);
+
+ return sha1_read_ctx(ctx, resbuf);
+}
+
+void sha1_process_bytes(const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+ /*
+ * When we already have some bits in our internal buffer concatenate
+ * both inputs first.
+ */
+ if (ctx->buflen != 0) {
+ size_t left_over = ctx->buflen;
+ size_t add = 128 - left_over > len ? len : 128 - left_over;
+
+ memcpy(&((char *) ctx->buffer)[left_over], buffer, add);
+ ctx->buflen += add;
+
+ if (ctx->buflen > 64) {
+ sha1_process_block(ctx->buffer, ctx->buflen & ~63, ctx);
+
+ ctx->buflen &= 63;
+ /*
+ * The regions in the following copy operation cannot overlap.
+ */
+ memcpy(ctx->buffer,
+ &((char *) ctx->buffer)[(left_over + add) & ~63],
+ ctx->buflen);
+ }
+
+ buffer = (const char *) buffer + add;
+ len -= add;
+ }
+
+ /*
+ * Process available complete blocks.
+ */
+ if (len >= 64) {
+ /* architecture and data-specific; LCOV_EXCL_START */
+#if !_STRING_ARCH_unaligned
+#define UNALIGNED_P(p) ((uintptr_t) (p) % ALIGNOF_UINT32_T != 0)
+ if (UNALIGNED_P(buffer)) {
+ while (len > 64) {
+ sha1_process_block(memcpy(ctx->buffer, buffer, 64), 64, ctx);
+ buffer = (const char *) buffer + 64;
+ len -= 64;
+ }
+ } else
+#endif
+ {
+ sha1_process_block(buffer, len & ~63, ctx);
+ buffer = (const char *) buffer + (len & ~63);
+ len &= 63;
+ }
+ /* LCOV_EXCL_STOP */
+ }
+
+ /*
+ * Move remaining bytes in internal buffer.
+ */
+ if (len > 0) {
+ size_t left_over = ctx->buflen;
+
+ memcpy(&((char *) ctx->buffer)[left_over], buffer, len);
+ left_over += len;
+ if (left_over >= 64) {
+ /* data-specific; LCOV_EXCL_START */
+ sha1_process_block(ctx->buffer, 64, ctx);
+ left_over -= 64;
+ memcpy(ctx->buffer, &ctx->buffer[16], left_over);
+ }
+ /* LCOV_EXCL_STOP */
+ ctx->buflen = left_over;
+ }
+}
+
+/* --- Code below is the primary difference between md5.c and sha1.c --- */
+
+/* SHA1 round constants */
+#define K1 0x5a827999
+#define K2 0x6ed9eba1
+#define K3 0x8f1bbcdc
+#define K4 0xca62c1d6
+
+/* Round functions. Note that F2 is the same as F4. */
+#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
+#define F2(B,C,D) (B ^ C ^ D)
+#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
+#define F4(B,C,D) (B ^ C ^ D)
+
+/* Process LEN bytes of BUFFER, accumulating context into CTX.
+ It is assumed that LEN % 64 == 0.
+ Most of this code comes from GnuPG's cipher/sha1.c. */
+
+void sha1_process_block(const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+ const uint32_t *words = buffer;
+ size_t nwords = len / sizeof(uint32_t);
+ const uint32_t *endp = words + nwords;
+ uint32_t x[16];
+ uint32_t a = ctx->A;
+ uint32_t b = ctx->B;
+ uint32_t c = ctx->C;
+ uint32_t d = ctx->D;
+ uint32_t e = ctx->E;
+ uint32_t lolen = len;
+
+ /*
+ * First increment the byte count. RFC 1321 specifies the possible
+ * length of the file up to 2^64 bits. Here we only compute the
+ * number of bytes. Do a double word increment.
+ */
+ ctx->total[0] += lolen;
+ ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
+
+#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n))))
+
+#define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \
+ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
+ , (x[I&0x0f] = rol(tm, 1)) )
+
+#define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \
+ + F( B, C, D ) \
+ + K \
+ + M; \
+ B = rol( B, 30 ); \
+ } while(0)
+
+ while (words < endp) {
+ uint32_t tm;
+ int t;
+ uint32_t v;
+ for (t = 0; t < 16; t++) {
+ memcpy(&v, words, sizeof(uint32_t));
+ x[t] = SWAP(v);
+ words++;
+ }
+
+ R(a, b, c, d, e, F1, K1, x[0]);
+ R(e, a, b, c, d, F1, K1, x[1]);
+ R(d, e, a, b, c, F1, K1, x[2]);
+ R(c, d, e, a, b, F1, K1, x[3]);
+ R(b, c, d, e, a, F1, K1, x[4]);
+ R(a, b, c, d, e, F1, K1, x[5]);
+ R(e, a, b, c, d, F1, K1, x[6]);
+ R(d, e, a, b, c, F1, K1, x[7]);
+ R(c, d, e, a, b, F1, K1, x[8]);
+ R(b, c, d, e, a, F1, K1, x[9]);
+ R(a, b, c, d, e, F1, K1, x[10]);
+ R(e, a, b, c, d, F1, K1, x[11]);
+ R(d, e, a, b, c, F1, K1, x[12]);
+ R(c, d, e, a, b, F1, K1, x[13]);
+ R(b, c, d, e, a, F1, K1, x[14]);
+ R(a, b, c, d, e, F1, K1, x[15]);
+ R(e, a, b, c, d, F1, K1, M(16));
+ R(d, e, a, b, c, F1, K1, M(17));
+ R(c, d, e, a, b, F1, K1, M(18));
+ R(b, c, d, e, a, F1, K1, M(19));
+ R(a, b, c, d, e, F2, K2, M(20));
+ R(e, a, b, c, d, F2, K2, M(21));
+ R(d, e, a, b, c, F2, K2, M(22));
+ R(c, d, e, a, b, F2, K2, M(23));
+ R(b, c, d, e, a, F2, K2, M(24));
+ R(a, b, c, d, e, F2, K2, M(25));
+ R(e, a, b, c, d, F2, K2, M(26));
+ R(d, e, a, b, c, F2, K2, M(27));
+ R(c, d, e, a, b, F2, K2, M(28));
+ R(b, c, d, e, a, F2, K2, M(29));
+ R(a, b, c, d, e, F2, K2, M(30));
+ R(e, a, b, c, d, F2, K2, M(31));
+ R(d, e, a, b, c, F2, K2, M(32));
+ R(c, d, e, a, b, F2, K2, M(33));
+ R(b, c, d, e, a, F2, K2, M(34));
+ R(a, b, c, d, e, F2, K2, M(35));
+ R(e, a, b, c, d, F2, K2, M(36));
+ R(d, e, a, b, c, F2, K2, M(37));
+ R(c, d, e, a, b, F2, K2, M(38));
+ R(b, c, d, e, a, F2, K2, M(39));
+ R(a, b, c, d, e, F3, K3, M(40));
+ R(e, a, b, c, d, F3, K3, M(41));
+ R(d, e, a, b, c, F3, K3, M(42));
+ R(c, d, e, a, b, F3, K3, M(43));
+ R(b, c, d, e, a, F3, K3, M(44));
+ R(a, b, c, d, e, F3, K3, M(45));
+ R(e, a, b, c, d, F3, K3, M(46));
+ R(d, e, a, b, c, F3, K3, M(47));
+ R(c, d, e, a, b, F3, K3, M(48));
+ R(b, c, d, e, a, F3, K3, M(49));
+ R(a, b, c, d, e, F3, K3, M(50));
+ R(e, a, b, c, d, F3, K3, M(51));
+ R(d, e, a, b, c, F3, K3, M(52));
+ R(c, d, e, a, b, F3, K3, M(53));
+ R(b, c, d, e, a, F3, K3, M(54));
+ R(a, b, c, d, e, F3, K3, M(55));
+ R(e, a, b, c, d, F3, K3, M(56));
+ R(d, e, a, b, c, F3, K3, M(57));
+ R(c, d, e, a, b, F3, K3, M(58));
+ R(b, c, d, e, a, F3, K3, M(59));
+ R(a, b, c, d, e, F4, K4, M(60));
+ R(e, a, b, c, d, F4, K4, M(61));
+ R(d, e, a, b, c, F4, K4, M(62));
+ R(c, d, e, a, b, F4, K4, M(63));
+ R(b, c, d, e, a, F4, K4, M(64));
+ R(a, b, c, d, e, F4, K4, M(65));
+ R(e, a, b, c, d, F4, K4, M(66));
+ R(d, e, a, b, c, F4, K4, M(67));
+ R(c, d, e, a, b, F4, K4, M(68));
+ R(b, c, d, e, a, F4, K4, M(69));
+ R(a, b, c, d, e, F4, K4, M(70));
+ R(e, a, b, c, d, F4, K4, M(71));
+ R(d, e, a, b, c, F4, K4, M(72));
+ R(c, d, e, a, b, F4, K4, M(73));
+ R(b, c, d, e, a, F4, K4, M(74));
+ R(a, b, c, d, e, F4, K4, M(75));
+ R(e, a, b, c, d, F4, K4, M(76));
+ R(d, e, a, b, c, F4, K4, M(77));
+ R(c, d, e, a, b, F4, K4, M(78));
+ R(b, c, d, e, a, F4, K4, M(79));
+
+ a = ctx->A += a;
+ b = ctx->B += b;
+ c = ctx->C += c;
+ d = ctx->D += d;
+ e = ctx->E += e;
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/sha1.h b/Build/source/texk/gregorio/gregorio-src/src/sha1.h
new file mode 100644
index 00000000000..078fd7a17ea
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/sha1.h
@@ -0,0 +1,85 @@
+/*
+ * Declarations of functions and data types used for SHA1 sum
+ * library functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ * Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2014 Free Software
+ * Foundation, Inc.
+ *
+ * This file is part of Gregorio.
+ * This file has been adapted from GNU coreutils to fit Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SHA1_H
+#define SHA1_H 1
+
+#include <stddef.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+
+#define SHA1_DIGEST_SIZE 20
+
+/* Structure to save state of computation between the single steps. */
+struct sha1_ctx {
+ uint32_t A;
+ uint32_t B;
+ uint32_t C;
+ uint32_t D;
+ uint32_t E;
+
+ uint32_t total[2];
+ uint32_t buflen;
+ uint32_t buffer[32];
+};
+
+/* Initialize structure containing state of computation. */
+extern void sha1_init_ctx(struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is necessary that LEN is a multiple of 64!!! */
+extern void sha1_process_block(const void *buffer, size_t len,
+ struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is NOT required that LEN is a multiple of 64. */
+extern void sha1_process_bytes(const void *buffer, size_t len,
+ struct sha1_ctx *ctx);
+
+/* Process the remaining bytes in the buffer and put result from CTX
+ in first 20 bytes following RESBUF. The result is always in little
+ endian byte order, so that a byte-wise output yields to the wanted
+ ASCII representation of the message digest. */
+extern void *sha1_finish_ctx(struct sha1_ctx *ctx, void *resbuf);
+
+/* Put result from CTX in first 20 bytes following RESBUF. The result is
+ always in little endian byte order, so that a byte-wise output yields
+ to the wanted ASCII representation of the message digest. */
+extern void *sha1_read_ctx(const struct sha1_ctx *ctx, void *resbuf);
+
+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
+ result is always in little endian byte order, so that a byte-wise
+ output yields to the wanted ASCII representation of the message
+ digest. */
+extern void *sha1_buffer(const char *buffer, size_t len, void *resblock);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct.c b/Build/source/texk/gregorio/gregorio-src/src/struct.c
new file mode 100644
index 00000000000..eabc5cb57ad
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct.c
@@ -0,0 +1,1609 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the Gregorio data structures.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * @brief This file contains a set of function to manipulate the gregorio
+ * structure.
+ *
+ * It starts by simple add/delete functions for almost all
+ * structs, and ends with more complex functions for manipulating
+ * horizontal episema, keys, etc.
+ *
+ * The first functions are not commented, but they always act like
+ * this : we give them a pointer to the pointer to the current element
+ * (by element I mean a struct which can be gregorio_note,
+ * gregorio_element, etc.), they add an element and the update the
+ * pointer to the element so that it points to the new element (may
+ * seem a bit strange).
+ *
+ * All the delete functions are recursive and free all memory.
+ *
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <assert.h>
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+#include "characters.h"
+#include "support.h"
+
+unsigned short tex_position_id = 0;
+
+gregorio_clef_info gregorio_default_clef = {
+ /*.line =*/ 3,
+ /*.secondary_line =*/ 0,
+ /*.pitch_difference =*/ 0,
+ /*.clef =*/ CLEF_C,
+ /*.flatted =*/ false,
+ /*.secondary_clef =*/ CLEF_C, /* not used since secondary_line is 0 */
+ /*.secondary_flatted =*/ false,
+};
+
+static size_t hepisema_adjustments_capacity = 0;
+static unsigned short hepisema_adjustments_last = 0;
+static gregorio_hepisema_adjustment *hepisema_adjustments = NULL;
+
+static size_t texverbs_capacity = 0;
+static unsigned short texverbs_last = 0;
+static char **texverbs = NULL;
+
+void gregorio_struct_init(void)
+{
+ hepisema_adjustments_capacity = 8;
+ hepisema_adjustments = gregorio_grow_buffer(NULL,
+ &hepisema_adjustments_capacity, gregorio_hepisema_adjustment);
+ hepisema_adjustments[0].vbasepos = HVB_AUTO;
+ hepisema_adjustments[0].nudge = NULL;
+
+ texverbs_capacity = 32;
+ texverbs = gregorio_grow_buffer(NULL, &texverbs_capacity, char *);
+ texverbs[0] = NULL;
+}
+
+void gregorio_struct_destroy(void)
+{
+ size_t i;
+ gregorio_hepisema_adjustment *adj;
+ char **texverb;
+
+ for (i = 0, adj = hepisema_adjustments; i <= hepisema_adjustments_last;
+ ++i, ++adj) {
+ if (adj->nudge) {
+ free(adj->nudge);
+ }
+ }
+ free(hepisema_adjustments);
+
+ for (i = 0, texverb = texverbs; i <= texverbs_last; ++i, ++texverb) {
+ if (*texverb) {
+ /* If the code falls here, this is a programming error. */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_struct_destroy, "unfreed texverb");
+ free(*texverb);
+ }
+ /* LCOV_EXCL_STOP */
+ }
+ free(texverbs);
+}
+
+static unsigned short register_texverb(char *const texverb)
+{
+ if (texverbs_last == USHRT_MAX) {
+ /* It's not reasonable to trigger this condition while testing */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("too many texverbs"), "register_texverb",
+ VERBOSITY_ERROR, 0);
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+ ++texverbs_last;
+ if (texverbs_last >= texverbs_capacity) {
+ texverbs = gregorio_grow_buffer(texverbs, &texverbs_capacity, char *);
+ }
+ texverbs[texverbs_last] = texverb;
+ return texverbs_last;
+}
+
+static void free_one_texverb(unsigned short index)
+{
+ if (index) {
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return);
+ free(texverbs[index]);
+ texverbs[index] = NULL;
+ }
+}
+
+static gregorio_note *create_and_link_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *note = gregorio_calloc(1, sizeof(gregorio_note));
+ note->previous = *current_note;
+ note->next = NULL;
+ if (*current_note) {
+ (*current_note)->next = note;
+ }
+ *current_note = note;
+ note->src_line = loc->first_line;
+ note->src_column = loc->first_column;
+ note->src_offset = loc->first_offset;
+
+ return note;
+}
+
+void gregorio_position_h_episema_above(gregorio_note *note, signed char height,
+ bool connect)
+{
+ assert(note && (note->type == GRE_NOTE || note->type == GRE_BAR));
+ note->h_episema_above = height;
+ note->h_episema_above_connect = connect;
+}
+
+static void set_h_episema_above(gregorio_note *note, signed char height,
+ grehepisema_size size, bool connect)
+{
+ gregorio_position_h_episema_above(note, height, connect);
+ note->h_episema_above_size = size;
+}
+
+void gregorio_position_h_episema_below(gregorio_note *note, signed char height,
+ bool connect)
+{
+ assert(note && (note->type == GRE_NOTE || note->type == GRE_BAR));
+ note->h_episema_below = height;
+ note->h_episema_below_connect = connect;
+}
+
+static void set_h_episema_below(gregorio_note *note, signed char height,
+ grehepisema_size size, bool connect)
+{
+ gregorio_position_h_episema_below(note, height, connect);
+ note->h_episema_below_size = size;
+}
+
+void gregorio_add_note(gregorio_note **current_note, signed char pitch,
+ gregorio_shape shape, gregorio_sign signs,
+ gregorio_liquescentia liquescentia, gregorio_note *prototype,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_NOTE;
+ element->u.note.pitch = pitch;
+ element->u.note.shape = shape;
+ element->signs = signs;
+ element->special_sign = _NO_SIGN;
+ element->u.note.liquescentia = liquescentia;
+ if (prototype) {
+ set_h_episema_above(element, prototype->h_episema_above,
+ prototype->h_episema_above_size,
+ prototype->h_episema_above_connect);
+ set_h_episema_below(element, prototype->h_episema_below,
+ prototype->h_episema_below_size,
+ prototype->h_episema_below_connect);
+ element->he_adjustment_index[SO_OVER] =
+ prototype->he_adjustment_index[SO_OVER];
+ element->he_adjustment_index[SO_UNDER] =
+ prototype->he_adjustment_index[SO_UNDER];
+ element->high_ledger_line = prototype->high_ledger_line;
+ element->high_ledger_specificity = prototype->high_ledger_specificity;
+ element->low_ledger_line = prototype->low_ledger_line;
+ element->low_ledger_specificity = prototype->low_ledger_specificity;
+ }
+ element->texverb = 0;
+ element->choral_sign = NULL;
+}
+
+static void add_pitched_item_as_note(gregorio_note **current_note,
+ gregorio_type type, signed char pitch,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = type;
+ element->u.note.pitch = pitch;
+}
+
+void gregorio_add_end_of_line_as_note(gregorio_note **current_note,
+ bool eol_ragged, bool eol_forces_custos, bool eol_forces_custos_on,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_END_OF_LINE;
+ element->u.other.eol_ragged = eol_ragged;
+ element->u.other.eol_forces_custos = eol_forces_custos;
+ element->u.other.eol_forces_custos_on = eol_forces_custos_on;
+}
+
+void gregorio_add_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_CUSTOS;
+}
+
+void gregorio_add_manual_custos_as_note(gregorio_note **current_note,
+ signed char pitch, const gregorio_scanner_location *const loc)
+{
+ add_pitched_item_as_note(current_note, GRE_MANUAL_CUSTOS, pitch, loc);
+}
+
+void gregorio_add_suppress_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_SUPPRESS_CUSTOS;
+}
+
+void gregorio_add_clef_as_note(gregorio_note **current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_CLEF;
+ element->u.clef.clef = clef;
+ element->u.clef.line = clef_line;
+ element->u.clef.flatted = flatted;
+}
+
+void gregorio_add_secondary_clef_to_note(gregorio_note *current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted)
+{
+ gregorio_not_null(current_note, gregorio_add_secondary_clef_to_note,
+ return);
+ if (current_note->type != GRE_CLEF) {
+ gregorio_message(_("trying to add a secondary clef to something that "
+ "is not a clef"), "gregorio_add_secondary_clef_to_note",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (current_note->u.clef.secondary_line) {
+ gregorio_message(_("secondary clef already exists"),
+ "gregorio_add_secondary_clef_to_note", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ current_note->u.clef.secondary_clef = clef;
+ current_note->u.clef.secondary_line = clef_line;
+ current_note->u.clef.secondary_flatted = flatted;
+}
+
+void gregorio_add_bar_as_note(gregorio_note **current_note, gregorio_bar bar,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_BAR;
+ element->u.other.bar = bar;
+}
+
+void gregorio_add_space_as_note(gregorio_note **current_note,
+ const gregorio_space space, char *factor,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_SPACE;
+ element->u.other.space = space;
+ element->u.other.ad_hoc_space_factor = factor;
+}
+
+unsigned short gregorio_add_texverb_as_note(gregorio_note **current_note,
+ char *str, gregorio_type type,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element;
+ /* gregorio_not_null(str, gregorio_add_texverb_as_note, return NULL); */
+ element = create_and_link_note(current_note, loc);
+ assert(type == GRE_TEXVERB_GLYPH || type == GRE_TEXVERB_ELEMENT
+ || type == GRE_ALT);
+ element->type = type;
+ element->texverb = register_texverb(str);
+ return element->texverb;
+}
+
+void gregorio_add_nlba_as_note(gregorio_note **current_note, gregorio_nlba type,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_NLBA;
+ element->u.other.nlba = type;
+}
+
+void gregorio_start_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_AUTOFUSE_START;
+}
+
+void gregorio_end_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *const loc)
+{
+ gregorio_note *element = create_and_link_note(current_note, loc);
+ element->type = GRE_AUTOFUSE_END;
+}
+
+static __inline void change_note_texverb(gregorio_note *note, char *str)
+{
+ if (note->texverb) {
+ gregorio_change_texverb(note->texverb, str);
+ } else {
+ note->texverb = register_texverb(str);
+ }
+}
+
+void gregorio_add_texverb_to_note(gregorio_note *current_note, char *str)
+{
+ size_t len;
+ char *res;
+ gregorio_not_null(str, gregorio_add_texverb_as_note, return);
+ if (current_note) {
+ const char *texverb = gregorio_texverb(current_note->texverb);
+ if (texverb) {
+ len = strlen(texverb) + strlen(str) + 1;
+ res = gregorio_malloc(len);
+ strcpy(res, texverb);
+ strcat(res, str);
+ free(str);
+ change_note_texverb(current_note, res);
+ } else {
+ change_note_texverb(current_note, str);
+ }
+ }
+}
+
+void gregorio_add_cs_to_note(gregorio_note *const*const current_note,
+ char *const str, const bool nabc)
+{
+ if (*current_note) {
+ (*current_note)->choral_sign = str;
+ (*current_note)->choral_sign_is_nabc = nabc;
+ }
+}
+
+void gregorio_add_special_sign(gregorio_note *note, gregorio_sign sign)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to add a special sign to something that is "
+ "not a note"), "gregorio_add_special_sign", VERBOSITY_ERROR,
+ 0);
+ return;
+ }
+ note->special_sign = sign;
+}
+
+static void fix_oriscus_liquescentia(gregorio_note *const note,
+ const bool legacy_oriscus_orientation)
+{
+ if (legacy_oriscus_orientation) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_DESCENDENS;
+ /* fall through */
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_ORISCUS_DESCENDENS;
+ break;
+ case L_DEMINUTUS:
+ note->u.note.shape = S_ORISCUS_DEMINUTUS;
+ break;
+ default:
+ note->u.note.shape = S_ORISCUS_ASCENDENS;
+ break;
+ }
+ } else {
+ note->u.note.liquescentia &= ((~TAIL_LIQUESCENTIA_MASK) | L_DEMINUTUS);
+ if (note->u.note.liquescentia & L_DEMINUTUS) {
+ note->u.note.shape = S_ORISCUS_DEMINUTUS;
+ }
+ }
+}
+
+static void fix_oriscus_scapus_liquescentia(gregorio_note *const note,
+ const bool legacy_oriscus_orientation)
+{
+ if (legacy_oriscus_orientation) {
+ switch (note->u.note.liquescentia) {
+ case L_AUCTUS_ASCENDENS:
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_DESCENDENS;
+ /* fall through */
+ case L_AUCTUS_DESCENDENS:
+ note->u.note.shape = S_ORISCUS_SCAPUS_DESCENDENS;
+ break;
+ default:
+ note->u.note.shape = S_ORISCUS_SCAPUS_ASCENDENS;
+ break;
+ }
+ } else {
+ note->u.note.liquescentia &= ~TAIL_LIQUESCENTIA_MASK;
+ }
+}
+
+void gregorio_change_shape(gregorio_note *const note,
+ const gregorio_shape shape, const bool legacy_oriscus_orientation)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to change the shape of something that is "
+ "not a note"), "change_shape", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ note->u.note.shape = shape;
+ switch (shape) {
+ case S_STROPHA:
+ case S_DISTROPHA:
+ case S_TRISTROPHA:
+ note->u.note.liquescentia &= L_AUCTUS_ASCENDENS | L_INITIO_DEBILIS;
+ break;
+
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ fix_oriscus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fix_oriscus_scapus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void gregorio_add_cavum(gregorio_note *const note)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to add cavum to something that is "
+ "not a note"), "change_shape", VERBOSITY_ERROR, 0);
+ return;
+ }
+ note->u.note.is_cavum = true;
+}
+
+void gregorio_add_tail_liquescentia(gregorio_note *note,
+ gregorio_liquescentia liq, const bool legacy_oriscus_orientation)
+{
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("trying to make a liquescence on something that "
+ "is not a note"), "add_liquescentia", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | (liq & TAIL_LIQUESCENTIA_MASK);
+
+ switch (note->u.note.shape) {
+ case S_STROPHA:
+ case S_DISTROPHA:
+ case S_TRISTROPHA:
+ if (note->u.note.liquescentia & L_AUCTUS_DESCENDENS) {
+ note->u.note.liquescentia =
+ (note->u.note.liquescentia & ~TAIL_LIQUESCENTIA_MASK)
+ | L_AUCTUS_ASCENDENS;
+ }
+ break;
+
+ case S_ORISCUS_UNDETERMINED:
+ case S_ORISCUS_ASCENDENS:
+ case S_ORISCUS_DESCENDENS:
+ case S_ORISCUS_DEMINUTUS:
+ fix_oriscus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ case S_ORISCUS_SCAPUS_UNDETERMINED:
+ case S_ORISCUS_SCAPUS_ASCENDENS:
+ case S_ORISCUS_SCAPUS_DESCENDENS:
+ fix_oriscus_scapus_liquescentia(note, legacy_oriscus_orientation);
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void apply_auto_h_episema(gregorio_note *const note,
+ const grehepisema_size size, const bool disable_bridge)
+{
+ if (note->h_episema_above == HEPISEMA_NONE
+ && note->h_episema_below == HEPISEMA_NONE) {
+ /* if both are unset, set both to auto */
+ set_h_episema_above(note, HEPISEMA_AUTO, size, !disable_bridge);
+ set_h_episema_below(note, HEPISEMA_AUTO, size, !disable_bridge);
+ } else if (note->h_episema_above == HEPISEMA_AUTO
+ && note->h_episema_below == HEPISEMA_AUTO) {
+ /* if both are auto, then force both */
+ /* the upper episema keeps its settings */
+ note->h_episema_above = HEPISEMA_FORCED;
+
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ } else {
+ /* force whichever is not already forced */
+ if (note->h_episema_above != HEPISEMA_FORCED) {
+ set_h_episema_above(note, HEPISEMA_FORCED, size, !disable_bridge);
+ }
+ if (note->h_episema_below != HEPISEMA_FORCED) {
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ }
+ }
+}
+
+/**********************************
+ *
+ * Activate_isolated_h_episema is used when we see an "isolated"
+ * horizontal episema: when we type ab__ lex see a then b then _ then _, so
+ * we must put the _ on the a (kind of backward process), and say the
+ * the episema on the b is a multi episema. Here n is the length of
+ * the isolated episema we found (can be up to 4).
+ *
+ *********************************/
+static void gregorio_activate_isolated_h_episema(gregorio_note *note,
+ const grehepisema_size size, const bool disable_bridge, int n)
+{
+ gregorio_not_null(note, gregorio_activate_isolated_h_episema, return);
+ if (note->type != GRE_NOTE) {
+ gregorio_message(ngt_("isolated horizontal episema after something "
+ "that is not a note, ignored",
+ "isolated horizontal episema after something that is not "
+ "a note, ignored", n), "activate_h_isolated_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ for (; n > 0; --n) {
+ note = note->previous;
+ if (!note || note->type != GRE_NOTE) {
+ gregorio_message(_("found more horizontal episema than notes "
+ "able to be under"), "activate_h_isolated_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ }
+ apply_auto_h_episema(note, size, disable_bridge);
+}
+
+void gregorio_add_h_episema(gregorio_note *note,
+ grehepisema_size size, gregorio_vposition vposition,
+ bool disable_bridge, unsigned int *nbof_isolated_episema)
+{
+ if (!note || (note->type != GRE_NOTE && note->type != GRE_BAR)) {
+ gregorio_message(_("trying to add a horizontal episema on something "
+ "that is not a note"), "add_h_episema",
+ VERBOSITY_ERROR, 0);
+ return;
+ }
+ gregorio_not_null(nbof_isolated_episema, gregorio_add_h_episema, return);
+ if (vposition && *nbof_isolated_episema) {
+ gregorio_message(_("trying to add a forced horizontal episema on a "
+ "note which already has an automatic horizontal "
+ "episema"), "add_h_episema", VERBOSITY_ERROR, 0);
+ return;
+ }
+
+ if (vposition || !*nbof_isolated_episema) {
+ switch (vposition) {
+ case VPOS_ABOVE:
+ set_h_episema_above(note, HEPISEMA_FORCED, size, !disable_bridge);
+ break;
+
+ case VPOS_BELOW:
+ set_h_episema_below(note, HEPISEMA_FORCED, size, !disable_bridge);
+ break;
+
+ default: /* VPOS_AUTO */
+ apply_auto_h_episema(note, size, disable_bridge);
+ *nbof_isolated_episema = 1;
+ break;
+ }
+ } else {
+ gregorio_activate_isolated_h_episema(note, size, disable_bridge,
+ (*nbof_isolated_episema)++);
+ }
+}
+
+void gregorio_add_sign(gregorio_note *note, gregorio_sign sign,
+ gregorio_vposition vposition)
+{
+ if (!note) {
+ gregorio_message(_("trying to add a sign to something that is "
+ "not a note"), "gregorio_add_sign", VERBOSITY_ERROR, 0);
+ return;
+ }
+ switch (sign) {
+ case _PUNCTUM_MORA:
+ switch (note->signs) {
+ case _NO_SIGN:
+ note->signs = _PUNCTUM_MORA;
+ break;
+ case _V_EPISEMA:
+ note->signs = _V_EPISEMA_PUNCTUM_MORA;
+ break;
+ case _PUNCTUM_MORA:
+ note->signs = _AUCTUM_DUPLEX;
+ break;
+ case _V_EPISEMA_PUNCTUM_MORA:
+ note->signs = _V_EPISEMA_AUCTUM_DUPLEX;
+ break;
+ default:
+ break;
+ }
+
+ note->mora_vposition = vposition;
+ break;
+
+ case _V_EPISEMA:
+ switch (note->signs) {
+ case _NO_SIGN:
+ note->signs = _V_EPISEMA;
+ break;
+ case _PUNCTUM_MORA:
+ note->signs = _V_EPISEMA_PUNCTUM_MORA;
+ break;
+ case _AUCTUM_DUPLEX:
+ note->signs = _V_EPISEMA_AUCTUM_DUPLEX;
+ break;
+ default:
+ break;
+ }
+
+ if (note->type == GRE_NOTE && vposition) {
+ note->v_episema_height = note->u.note.pitch + vposition;
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(gregorio_add_sign, "unexpected sign to add: %s",
+ gregorio_sign_to_string(sign));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+void gregorio_go_to_first_note(gregorio_note **note)
+{
+ gregorio_note *tmp;
+ gregorio_not_null_ptr(note, gregorio_go_to_first_note, return);
+ tmp = *note;
+ while (tmp->previous) {
+ tmp = tmp->previous;
+ }
+ *note = tmp;
+}
+
+static __inline void free_one_note(gregorio_note *note)
+{
+ if (note->type == GRE_SPACE) {
+ free(note->u.other.ad_hoc_space_factor);
+ }
+ free_one_texverb(note->texverb);
+ free(note->choral_sign);
+ free(note);
+}
+
+void gregorio_free_one_note(gregorio_note **note)
+{
+ gregorio_note *next = NULL;
+ gregorio_not_null_ptr(note, gregorio_free_one_note, return);
+ if ((*note)->next) {
+ (*note)->next->previous = (*note)->previous;
+ next = (*note)->next;
+ }
+ if ((*note)->previous) {
+ (*note)->previous->next = (*note)->next;
+ }
+ free_one_note(*note);
+ *note = next;
+}
+
+static void gregorio_free_notes(gregorio_note **note)
+{
+ gregorio_note *tmp;
+ while (*note) {
+ tmp = (*note)->next;
+ free_one_note(*note);
+ *note = tmp;
+ }
+}
+
+static gregorio_glyph *create_and_link_glyph(gregorio_glyph **current_glyph)
+{
+ gregorio_glyph *glyph = gregorio_calloc(1, sizeof(gregorio_glyph));
+ glyph->previous = *current_glyph;
+ glyph->next = NULL;
+ if (*current_glyph) {
+ (*current_glyph)->next = glyph;
+ }
+ *current_glyph = glyph;
+
+ return glyph;
+}
+
+void gregorio_add_glyph(gregorio_glyph **current_glyph,
+ gregorio_glyph_type type, gregorio_note *first_note,
+ gregorio_liquescentia liquescentia, bool is_cavum)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ next_glyph->type = GRE_GLYPH;
+ next_glyph->u.notes.glyph_type = type;
+ next_glyph->u.notes.liquescentia = liquescentia;
+ next_glyph->u.notes.is_cavum = is_cavum;
+ next_glyph->u.notes.first_note = first_note;
+}
+
+void gregorio_add_clef_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_clef_info clef, unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ next_glyph->type = GRE_CLEF;
+ next_glyph->u.misc.clef = clef;
+ next_glyph->texverb = texverb;
+}
+
+void gregorio_add_pitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, signed char pitch, bool force_pitch,
+ unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ assert(type == GRE_CUSTOS);
+ next_glyph->type = type;
+ next_glyph->u.misc.pitched.pitch = pitch;
+ next_glyph->u.misc.pitched.force_pitch = force_pitch;
+ next_glyph->texverb = texverb;
+}
+
+void gregorio_add_unpitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, gregorio_extra_info *info, gregorio_sign sign,
+ unsigned short texverb)
+{
+ gregorio_glyph *next_glyph = create_and_link_glyph(current_glyph);
+ assert(type != GRE_NOTE && type != GRE_GLYPH && type != GRE_ELEMENT
+ && type != GRE_CLEF && type != GRE_CUSTOS);
+ next_glyph->type = type;
+ next_glyph->u.misc.unpitched.info = *info;
+ next_glyph->u.misc.unpitched.special_sign = sign;
+ next_glyph->texverb = texverb;
+
+ /* this was copied into the glyph, so we need to clear it to avoid a
+ * double-free */
+ info->ad_hoc_space_factor = NULL;
+}
+
+void gregorio_go_to_first_glyph(gregorio_glyph **glyph)
+{
+ gregorio_glyph *tmp;
+ gregorio_not_null_ptr(glyph, gregorio_go_to_first_glyph, return);
+ tmp = *glyph;
+ while (tmp->previous) {
+ tmp = tmp->previous;
+ }
+ *glyph = tmp;
+}
+
+static __inline void free_one_glyph(gregorio_glyph *glyph)
+{
+ free_one_texverb(glyph->texverb);
+ switch (glyph->type) {
+ case GRE_GLYPH:
+ gregorio_free_notes(&glyph->u.notes.first_note);
+ break;
+ case GRE_SPACE:
+ free(glyph->u.misc.unpitched.info.ad_hoc_space_factor);
+ break;
+ default:
+ /* nothing to do */
+ break;
+ }
+ free(glyph);
+}
+
+void gregorio_free_one_glyph(gregorio_glyph **glyph)
+{
+ gregorio_glyph *next = NULL;
+ gregorio_not_null_ptr(glyph, gregorio_free_one_glyph, return);
+ if ((*glyph)->next) {
+ (*glyph)->next->previous = NULL;
+ next = (*glyph)->next;
+ }
+ if ((*glyph)->previous) {
+ (*glyph)->previous->next = NULL;
+ }
+ free_one_glyph(*glyph);
+ *glyph = next;
+}
+
+static void gregorio_free_glyphs(gregorio_glyph **glyph)
+{
+ gregorio_glyph *next_glyph;
+ gregorio_not_null(glyph, gregorio_free_glyphs, return);
+ while (*glyph) {
+ next_glyph = (*glyph)->next;
+ free_one_glyph(*glyph);
+ *glyph = next_glyph;
+ }
+}
+
+static gregorio_element *create_and_link_element(gregorio_element
+ **current_element)
+{
+ gregorio_element *element = gregorio_calloc(1, sizeof(gregorio_element));
+ element->previous = *current_element;
+ element->next = NULL;
+ if (*current_element) {
+ (*current_element)->next = element;
+ }
+ *current_element = element;
+
+ return element;
+}
+
+void gregorio_add_element(gregorio_element **current_element,
+ gregorio_glyph *first_glyph)
+{
+ gregorio_element *next = create_and_link_element(current_element);
+ next->type = GRE_ELEMENT;
+ next->u.first_glyph = first_glyph;
+}
+
+void gregorio_add_misc_element(gregorio_element **current_element,
+ gregorio_type type, gregorio_misc_element_info *info,
+ unsigned short texverb)
+{
+ gregorio_element *special = create_and_link_element(current_element);
+ special->type = type;
+ special->u.misc = *info;
+ special->texverb = texverb;
+
+ if (type == GRE_SPACE) {
+ /* this was copied into the glyph, so we need to clear it to avoid a
+ * double-free */
+ info->unpitched.info.ad_hoc_space_factor = NULL;
+ }
+}
+
+static __inline void free_one_element(gregorio_element *element)
+{
+ size_t i;
+ free_one_texverb(element->texverb);
+ for (i = 0; i < element->nabc_lines; i++) {
+ free(element->nabc[i]);
+ }
+ free(element->nabc);
+ switch (element->type) {
+ case GRE_ELEMENT:
+ gregorio_free_glyphs(&element->u.first_glyph);
+ break;
+ case GRE_SPACE:
+ free(element->u.misc.unpitched.info.ad_hoc_space_factor);
+ break;
+ default:
+ /* nothing to do */
+ break;
+ }
+ free(element);
+}
+
+void gregorio_free_one_element(gregorio_element **element)
+{
+ gregorio_element *next = NULL;
+ gregorio_element *to_free;
+ gregorio_not_null_ptr(element, gregorio_free_one_element, return);
+ to_free = *element;
+ if (to_free->next) {
+ to_free->next->previous = NULL;
+ next = to_free->next;
+ }
+ if (to_free->previous) {
+ to_free->previous->next = NULL;
+ }
+ /* The previous line is probably optimized out */
+ /* LCOV_EXCL_STOP */
+ free_one_element(to_free);
+ *element = next;
+}
+
+static void gregorio_free_elements(gregorio_element **element)
+{
+ gregorio_element *next;
+ if (!element || !*element) {
+ return;
+ }
+ while (*element) {
+ next = (*element)->next;
+ free_one_element(*element);
+ *element = next;
+ }
+}
+
+void gregorio_add_character(gregorio_character **current_character,
+ grewchar wcharacter)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 1;
+ element->cos.character = wcharacter;
+ element->next_character = NULL;
+ element->previous_character = *current_character;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+static void gregorio_free_one_character(gregorio_character *current_character)
+{
+ free(current_character);
+}
+
+void gregorio_free_characters(gregorio_character *current_character)
+{
+ gregorio_character *next_character;
+ gregorio_not_null(current_character, gregorio_free_characters, return);
+ while (current_character) {
+ next_character = current_character->next_character;
+ gregorio_free_one_character(current_character);
+ current_character = next_character;
+ }
+}
+
+void gregorio_go_to_first_character(const gregorio_character **character)
+{
+ const gregorio_character *tmp;
+ gregorio_not_null_ptr(character, gregorio_free_characters, return);
+ tmp = *character;
+ while (tmp->previous_character) {
+ tmp = tmp->previous_character;
+ }
+ *character = tmp;
+}
+
+void gregorio_begin_style(gregorio_character **current_character,
+ grestyle_style style)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = ST_T_BEGIN;
+ element->cos.s.style = style;
+ element->previous_character = *current_character;
+ element->next_character = NULL;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+void gregorio_end_style(gregorio_character **current_character,
+ grestyle_style style)
+{
+ gregorio_character *element =
+ (gregorio_character *) gregorio_calloc(1, sizeof(gregorio_character));
+ element->is_character = 0;
+ element->cos.s.type = ST_T_END;
+ element->cos.s.style = style;
+ element->next_character = NULL;
+ element->previous_character = *current_character;
+ if (*current_character) {
+ (*current_character)->next_character = element;
+ }
+ *current_character = element;
+}
+
+gregorio_character *gregorio_clone_characters(
+ const gregorio_character *source)
+{
+ gregorio_character *target = NULL, *current = NULL;
+
+ for (; source; source = source->next_character) {
+ gregorio_character *character = (gregorio_character *)
+ gregorio_calloc(1, sizeof(gregorio_character));
+ *character = *source;
+ character->next_character = NULL;
+
+ if (current) {
+ character->previous_character = current;
+ current = current->next_character = character;
+ } else {
+ character->previous_character = NULL;
+ target = current = character;
+ }
+ }
+
+ return target;
+}
+
+void gregorio_add_syllable(gregorio_syllable **current_syllable,
+ int number_of_voices, gregorio_element *elements[],
+ gregorio_character *first_character,
+ gregorio_character *first_translation_character,
+ gregorio_word_position position, char *abovelinestext,
+ gregorio_tr_centering translation_type, gregorio_nlba no_linebreak_area,
+ gregorio_euouae euouae, const gregorio_scanner_location *const loc,
+ const bool first_word, const bool clear)
+{
+ gregorio_syllable *next;
+ gregorio_element **tab;
+ int i;
+ gregorio_not_null(elements, gregorio_add_syllable, return);
+ gregorio_assert(number_of_voices == 1, gregorio_add_syllable,
+ "gregorio only supports one voice", return);
+ next = gregorio_calloc(1, sizeof(gregorio_syllable));
+ next->position = position;
+ next->no_linebreak_area = no_linebreak_area;
+ next->euouae = euouae;
+ next->text = first_character;
+ next->translation = first_translation_character;
+ next->translation_type = translation_type;
+ next->abovelinestext = abovelinestext;
+ next->first_word = first_word;
+ next->clear = clear;
+ if (loc) {
+ next->src_line = loc->first_line;
+ next->src_column = loc->first_column;
+ next->src_offset = loc->first_offset;
+ }
+ next->next_syllable = NULL;
+ next->previous_syllable = *current_syllable;
+ tab = (gregorio_element **) gregorio_malloc(number_of_voices *
+ sizeof(gregorio_element *));
+ for (i = 0; i < number_of_voices; i++) {
+ tab[i] = elements[i];
+ }
+ next->elements = tab;
+ if (*current_syllable) {
+ (*current_syllable)->next_syllable = next;
+ }
+ *current_syllable = next;
+}
+
+static void gregorio_free_one_syllable(gregorio_syllable **syllable,
+ int number_of_voices)
+{
+ int i;
+ gregorio_syllable *next;
+ gregorio_not_null_ptr(syllable, gregorio_free_one_syllable, return);
+ for (i = 0; i < number_of_voices; i++) {
+ gregorio_free_elements((struct gregorio_element **)
+ &((*syllable)->elements[i]));
+ }
+ if ((*syllable)->text) {
+ gregorio_free_characters((*syllable)->text);
+ }
+ if ((*syllable)->translation) {
+ gregorio_free_characters((*syllable)->translation);
+ }
+ free((*syllable)->abovelinestext);
+ next = (*syllable)->next_syllable;
+ if (next) {
+ next->previous_syllable = NULL;
+ }
+ free((*syllable)->elements);
+ free(*syllable);
+ *syllable = next;
+}
+
+static void gregorio_free_syllables(gregorio_syllable **syllable,
+ int number_of_voices)
+{
+ gregorio_not_null_ptr(syllable, gregorio_free_one_syllable, return);
+ while (*syllable) {
+ gregorio_free_one_syllable(syllable, number_of_voices);
+ }
+}
+
+gregorio_score *gregorio_new_score(void)
+{
+ gregorio_score *new_score = gregorio_calloc(1, sizeof(gregorio_score));
+ new_score->number_of_voices = 1;
+ gregorio_set_score_staff_lines(new_score, 4);
+ return new_score;
+}
+
+static void gregorio_free_score_infos(gregorio_score *score)
+{
+ gregorio_not_null(score, gregorio_free_score_infos, return);
+ /* don't free the strings coming from headers; they will be freed when the
+ * headers themselves are freed */
+ if (score->first_voice_info) {
+ gregorio_free_voice_infos(score->first_voice_info);
+ }
+}
+
+static void free_headers(gregorio_score *score) {
+ gregorio_header *header = score->headers;
+ while (header) {
+ gregorio_header *next = header->next;
+ free(header->name);
+ free(header->value);
+ free(header);
+ header = next;
+ }
+}
+
+void gregorio_free_score(gregorio_score *score)
+{
+ gregorio_not_null(score, gregorio_free_score, return);
+ if (score->first_syllable) {
+ gregorio_free_syllables(&(score->first_syllable),
+ score->number_of_voices);
+ }
+ gregorio_free_score_infos(score);
+ free_headers(score);
+ free(score);
+}
+
+void gregorio_add_voice_info(gregorio_voice_info **current_voice_info)
+{
+ gregorio_voice_info *next = gregorio_calloc(1, sizeof(gregorio_voice_info));
+ gregorio_assert(!*current_voice_info, gregorio_add_voice_info,
+ "since gregorio only supports once voice, this should only be "
+ "called once", (*current_voice_info)->next_voice_info = next);
+ *current_voice_info = next;
+}
+
+void gregorio_free_voice_infos(gregorio_voice_info *voice_info)
+{
+ gregorio_voice_info *next;
+ gregorio_not_null(voice_info, gregorio_free_voice_infos, return);
+ while (voice_info) {
+ next = voice_info->next_voice_info;
+ free(voice_info);
+ voice_info = next;
+ }
+}
+
+void gregorio_set_score_annotation(gregorio_score *score, char *annotation)
+{
+ int annotation_num;
+ gregorio_not_null(score, gregorio_set_score_annotation, return);
+ /* save the annotation in the first spare place. */
+ for (annotation_num = 0; annotation_num < MAX_ANNOTATIONS; ++annotation_num) {
+ if (score->annotation[annotation_num] == NULL) {
+ score->annotation[annotation_num] = annotation;
+ break;
+ }
+ }
+ if (annotation_num >= MAX_ANNOTATIONS) {
+ gregorio_message(_("too many annotations"),
+ "gregorio_set_annotation", VERBOSITY_WARNING, 0);
+ }
+}
+
+void gregorio_set_score_staff_lines(gregorio_score *const score,
+ const char staff_lines)
+{
+ gregorio_not_null(score, gregorio_set_score_staff_lines, return);
+ if (staff_lines < 2 || staff_lines > 5) {
+ gregorio_message(_("invalid number of staff lines"),
+ "gregorio_set_score_staff_lines", VERBOSITY_ERROR, 0);
+ return;
+ }
+ score->staff_lines = staff_lines;
+ score->highest_pitch = LOWEST_PITCH + 4 + (2 * staff_lines);
+ score->high_ledger_line_pitch = score->highest_pitch - 1;
+ score->virgula_far_pitch = score->highest_pitch - 6;
+
+ gregorio_assert(score->highest_pitch <= MAX_PITCH,
+ gregorio_set_score_staff_lines, "highest pitch exceeds MAX_PITCH",
+ return);
+}
+
+void gregorio_add_score_header(gregorio_score *score, char *name, char *value)
+{
+ gregorio_header *header;
+ gregorio_not_null(score, gregorio_add_score_header, return);
+ header = (gregorio_header *)gregorio_malloc(sizeof(gregorio_header));
+ header->name = name;
+ header->value = value;
+ header->next = NULL;
+ if (score->last_header) {
+ score->last_header->next = header;
+ } else {
+ score->headers = header;
+ }
+ score->last_header = header;
+}
+
+/**********************************
+ *
+ * A function to build an integer from a key, very useful to represent
+ * it in the structure.
+ *
+ *The representation is :
+ *
+ * * 1 for a C key on the first (bottom) line
+ * * 3 for a C key on the second line
+ * * 5 for a C key on the third line (default key)
+ * * 7 for a C key on the fourth line
+ * * 9 for a C key on the fifth line
+ *
+ * * -2 for a F key on the first line
+ * * 0 for a F key on the second line
+ * * 2 for a F key on the third line
+ * * 4 for a F key on the fourth line
+ * * 6 for a F key on the fifth line
+ *
+ *********************************/
+
+int gregorio_calculate_new_key(gregorio_clef_info clef)
+{
+ switch (clef.clef) {
+ case CLEF_C:
+ return (2 * clef.line) - 1;
+ break;
+ case CLEF_F:
+ return (2 * clef.line) - 4;
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail(gregorio_calculate_new_key, "can't calculate key");
+ return NO_KEY;
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+/* shape is an output parameter */
+static __inline signed char next_pitch_from_glyph(const gregorio_glyph *glyph,
+ gregorio_shape *const alterations, gregorio_shape *const shape)
+{
+ while (glyph) {
+ if (glyph->type == GRE_GLYPH) {
+ if (glyph->u.notes.glyph_type == G_ALTERATION) {
+ const gregorio_note *note;
+ for (note = glyph->u.notes.first_note; note;
+ note = note->next) {
+ switch (note->u.note.shape) {
+ case S_FLAT:
+ case S_SHARP:
+ case S_NATURAL:
+ if (note->u.note.pitch >= LOWEST_PITCH &&
+ note->u.note.pitch <= MAX_PITCH) {
+ alterations[note->u.note.pitch] =
+ note->u.note.shape;
+ }
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_fail2(next_pitch_from_glyph,
+ "unrecognized alteration shape: %s",
+ gregorio_shape_to_string(note->u.note.shape));
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ } else if (glyph->u.notes.first_note) {
+ assert(glyph->u.notes.first_note->type == GRE_NOTE);
+ if (shape) {
+ *shape = alterations[
+ glyph->u.notes.first_note->u.note.pitch];
+ }
+ return glyph->u.notes.first_note->u.note.pitch;
+ }
+ }
+ glyph = glyph->next;
+ }
+ return 0;
+}
+
+/* shape is an output parameter */
+static signed char syllable_first_note(const gregorio_syllable *syllable,
+ gregorio_shape *const alterations, gregorio_shape *const shape)
+{
+ gregorio_element *element;
+ gregorio_glyph *glyph;
+ signed char pitch;
+ gregorio_not_null(syllable, syllable_first_note, return 0);
+ element = syllable->elements[0];
+ while (element) {
+ if (element->type == GRE_CUSTOS) {
+ return element->u.misc.pitched.pitch;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ glyph = element->u.first_glyph;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ }
+ element = element->next;
+ }
+ return 0;
+}
+
+/* shape is an output parameter */
+signed char gregorio_determine_next_pitch(const gregorio_syllable *syllable,
+ const gregorio_element *element, const gregorio_glyph *glyph,
+ gregorio_shape *const shape)
+{
+ signed char pitch;
+ gregorio_shape alterations[MAX_PITCH + 1];
+
+ memset(alterations, 0, sizeof alterations);
+
+ if (shape) {
+ *shape = S_UNDETERMINED;
+ }
+ gregorio_not_null(element, gregorio_determine_next_pitch,
+ return DUMMY_PITCH);
+ gregorio_not_null(syllable, gregorio_determine_next_pitch,
+ return DUMMY_PITCH);
+ /* we first explore the next glyphs to find a note, if there is one */
+ if (glyph) {
+ glyph = glyph->next;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ }
+ /* then we do the same with the elements */
+ element = element->next;
+ while (element) {
+ if (element->type == GRE_CUSTOS) {
+ return element->u.misc.pitched.pitch;
+ }
+ if (element->type == GRE_ELEMENT && element->u.first_glyph) {
+ glyph = element->u.first_glyph;
+ pitch = next_pitch_from_glyph(glyph, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ } /* I think this is optimized out; LCOV_EXCL_LINE */
+ element = element->next;
+ }
+
+ /* then we do the same with the syllables */
+ syllable = syllable->next_syllable;
+ while (syllable) {
+ /* we call another function that will return the pitch of the first
+ * note if syllable has a note, and 0 else */
+ pitch = syllable_first_note(syllable, alterations, shape);
+ if (pitch) {
+ return pitch;
+ }
+ syllable = syllable->next_syllable;
+ }
+ /* here it means that there is no next note, so we return a stupid value,
+ * but it won' t be used */
+ if (shape) {
+ *shape = S_UNDETERMINED;
+ }
+ return DUMMY_PITCH;
+}
+
+/**********************************
+ *
+ * A function called after the entire score is determined : we check
+ * if the first element is a key change, if it is the case we delete
+ * it and we update the score->voice-info->initial_key. Works in
+ * polyphony.
+ *
+ ******************************/
+
+void gregorio_fix_initial_keys(gregorio_score *score,
+ gregorio_clef_info default_clef)
+{
+ gregorio_element *element;
+ gregorio_voice_info *voice_info;
+ int i;
+ char to_delete = 1;
+
+ gregorio_not_null(score, gregorio_fix_initial_keys, return);
+ gregorio_not_null(score->first_voice_info, gregorio_fix_initial_keys,
+ return);
+ if (!score->first_syllable) {
+ /* valid but almost nonsense: a score with no syllables */
+ return;
+ }
+ voice_info = score->first_voice_info;
+ for (i = 0; i < score->number_of_voices; i++) {
+ element = score->first_syllable->elements[i];
+ if (element && element->type == GRE_CLEF) {
+ voice_info->initial_clef = element->u.misc.clef;
+ gregorio_free_one_element(&(score->first_syllable->elements[i]));
+ gregorio_messagef("gregorio_fix_initial_keys", VERBOSITY_INFO, 0,
+ _("in voice %d the first element is a key definition, "
+ "considered as initial key"), i + 1);
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+
+ /* then we suppress syllables that contain nothing anymore : case of (c2)
+ * at beginning of files */
+
+ for (i = 0; i < score->number_of_voices; i++) {
+ if (score->first_syllable->elements[i]) {
+ to_delete = 0;
+ break;
+ }
+ }
+
+ if (to_delete) {
+ gregorio_free_one_syllable(&(score->first_syllable),
+ score->number_of_voices);
+ }
+ /* finally we initialize voice infos that have no initial key to default
+ * key */
+
+ voice_info = score->first_voice_info;
+
+ for (i = 0; i < score->number_of_voices; i++) {
+ if (!voice_info->initial_clef.line) {
+ voice_info->initial_clef = default_clef;
+ gregorio_messagef("gregorio_fix_initial_keys", VERBOSITY_INFO, 0,
+ _("no initial key definition in voice %d, default key "
+ "definition applied"), i + 1);
+ }
+ voice_info = voice_info->next_voice_info;
+ }
+}
+
+/**********************************
+ *
+ * A small function to determine if an element list contains only
+ * special elements (bar, key-change, etc.), useful because the
+ * representation (in xml for example) may vary according to it.
+ *
+ *********************************/
+
+bool gregorio_is_only_special(gregorio_element *element)
+{
+ gregorio_not_null(element, gregorio_is_only_special, return 0);
+ while (element) {
+ if (element->type == GRE_ELEMENT) {
+ return 0;
+ }
+ element = element->next;
+ }
+ return 1;
+}
+
+/* This should only be called when an unknown enum value is encountered; as
+ * such, this is a programming error */
+/* LCOV_EXCL_START */
+const char *gregorio_unknown(int value) {
+ static char buf[20];
+ gregorio_snprintf(buf, sizeof buf, "?%d", value);
+ return buf;
+}
+/* LCOV_EXCL_STOP */
+
+/*
+ * A small helper for the following function
+ */
+
+static __inline bool is_clef(gregorio_type x)
+{
+ return x == GRE_CLEF;
+}
+
+/*
+ * This function is used in write_syllable, it detects if the syllable is like
+ * (c4), (::c4), (z0c4) or (z0::c4). It returns the gregorio_element of the
+ * clef change.
+ */
+gregorio_element *gregorio_get_clef_change(gregorio_syllable *syllable)
+{
+ gregorio_element *element;
+ gregorio_assert(syllable && syllable->elements && syllable->elements[0],
+ gregoriotex_syllable_is_clef_change, "invalid syllable",
+ return NULL);
+ element = syllable->elements[0];
+ /* we just detect the foud cases */
+ if (element->type == GRE_CUSTOS && element->next
+ && (is_clef(element->next->type)) && !element->next->next) {
+ return element->next;
+ }
+ if (element->type == GRE_BAR && element->next
+ && (is_clef(element->next->type)) && !element->next->next) {
+ return element->next;
+ }
+ if ((is_clef(element->type)) && !element->next) {
+ return element;
+ }
+ if (element->type == GRE_CUSTOS && element->next
+ && element->next->type == GRE_BAR && element->next->next
+ && (is_clef(element->next->next->type))
+ && !element->next->next->next) {
+ return element->next->next;
+ }
+ return NULL;
+}
+
+unsigned short gregorio_add_hepisema_adjustment(
+ const gregorio_hepisema_vbasepos vbasepos, char *const nudge)
+{
+ if (hepisema_adjustments_last == USHRT_MAX) {
+ /* It's not reasonable to trigger this condition while testing */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("too many horizontal episema adjustments"),
+ "gregorio_add_hepisema_adjustment", VERBOSITY_ERROR, 0);
+ return 0;
+ /* LCOV_EXCL_STOP */
+ }
+ ++hepisema_adjustments_last;
+ if (hepisema_adjustments_last >= hepisema_adjustments_capacity) {
+ hepisema_adjustments = gregorio_grow_buffer(hepisema_adjustments,
+ &hepisema_adjustments_capacity, gregorio_hepisema_adjustment);
+ }
+ hepisema_adjustments[hepisema_adjustments_last].vbasepos = vbasepos;
+ hepisema_adjustments[hepisema_adjustments_last].nudge = nudge;
+ hepisema_adjustments[hepisema_adjustments_last].pitch_extremum = NO_PITCH;
+ return hepisema_adjustments_last;
+}
+
+gregorio_hepisema_adjustment *gregorio_get_hepisema_adjustment(
+ const unsigned short index)
+{
+ gregorio_assert(index <= hepisema_adjustments_last,
+ gregorio_get_hepisema_adjustment, "array index out of bounds",
+ return &hepisema_adjustments[0]);
+ return &hepisema_adjustments[index];
+}
+
+const char *gregorio_texverb(unsigned short index)
+{
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return NULL);
+ return texverbs[index];
+}
+
+void gregorio_change_texverb(unsigned short index, char *texverb)
+{
+ /* not allowed to change index 0 (== NULL) */
+ gregorio_assert(index != 0, gregorio_texverb,
+ "array index 0 may not be changed", return);
+ gregorio_assert(index <= texverbs_last, gregorio_texverb,
+ "array index out of bounds", return);
+ if (texverbs[index]) {
+ free(texverbs[index]);
+ }
+ texverbs[index] = texverb;
+}
+
+ENUM_TO_STRING(gregorio_type, GREGORIO_TYPE)
+ENUM_TO_STRING(gregorio_shape, GREGORIO_SHAPE)
+ENUM_TO_STRING(gregorio_bar, GREGORIO_BAR)
+ENUM_TO_STRING(gregorio_sign, GREGORIO_SIGN)
+ENUM_TO_STRING(gregorio_space, GREGORIO_SPACE)
+ENUM_TO_STRING(gregorio_liquescentia, GREGORIO_LIQUESCENTIA)
+ENUM_TO_STRING(grehepisema_size, GREHEPISEMA_SIZE)
+ENUM_TO_STRING(gregorio_vposition, GREGORIO_VPOSITION)
+ENUM_TO_STRING(gregorio_glyph_type, GREGORIO_GLYPH_TYPE)
+ENUM_TO_STRING(grestyle_style, GRESTYLE_STYLE)
+ENUM_TO_STRING(gregorio_tr_centering, GREGORIO_TR_CENTERING)
+ENUM_TO_STRING(gregorio_nlba, GREGORIO_NLBA)
+ENUM_TO_STRING(gregorio_euouae, GREGORIO_EUOUAE)
+ENUM_TO_STRING(gregorio_word_position, GREGORIO_WORD_POSITION)
+ENUM_TO_STRING(gregorio_hepisema_vbasepos, GREGORIO_HEPISEMA_VBASEPOS)
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct.h b/Build/source/texk/gregorio/gregorio-src/src/struct.h
new file mode 100644
index 00000000000..39fc7fbde29
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct.h
@@ -0,0 +1,984 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header defines the Gregorio data structures and functions.
+ *
+ * Copyright (C) 2006-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * The file starts by the definition of all the structures used in
+ * gregorio. As it is certainly the most important file for
+ * understanding, read it carefully.
+ */
+
+#include "unicode.h"
+
+#ifndef STRUCT_H
+#define STRUCT_H
+
+#include <assert.h>
+#include "enum_generator.h"
+#include "bool.h"
+#include "sha1.h"
+#include "messages.h"
+
+#ifdef __cplusplus
+#define ENUM_BITFIELD(TYPE) enum TYPE
+#elif defined(__GNUC__) && __GNUC__ >= 2
+#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
+#else
+#define ENUM_BITFIELD(TYPE) unsigned int
+#endif
+
+/* Lilypond-compatible location counters */
+typedef struct gregorio_scanner_location {
+ /* - line is the 1-based line number
+ * - column is the 0-based* column number, tabs expanded to 8-column stops
+ * - offset is the 0-based number of characters from the start of the line
+ *
+ * * = column is calculated and stored as a 0-based number so the tabstop
+ * math is simpler; it should be printed 1-based */
+
+ unsigned short first_line;
+ unsigned short first_column;
+ unsigned short first_offset;
+ unsigned short last_line;
+ unsigned short last_column;
+ unsigned short last_offset;
+ bool generate_point_and_click:1;
+} gregorio_scanner_location;
+
+/* all the different types of things a gregorio_* can be */
+
+#define GREGORIO_TYPE(A,E,X,L) \
+ A(GRE_NOTE, 1) \
+ E(GRE_GLYPH) \
+ E(GRE_ELEMENT) \
+ E(GRE_CLEF) \
+ E(GRE_END_OF_LINE) \
+ E(GRE_SPACE) \
+ E(GRE_BAR) \
+ E(GRE_CUSTOS) \
+ E(GRE_MANUAL_CUSTOS) \
+ E(GRE_SUPPRESS_CUSTOS) \
+ /* I don't really know how I could use the a TEXVERB_NOTE in gregoriotex,
+ * as we don't write note by note... */ \
+ /* GRE_TEXVERB_NOTE, */ \
+ E(GRE_TEXVERB_GLYPH) \
+ E(GRE_TEXVERB_ELEMENT) \
+ /* above lines text, quite the same as GRE_TEXVERB_ELEMENT, but counted
+ * differently for the spaces above the lines */ \
+ E(GRE_ALT) \
+ E(GRE_NLBA) \
+ E(GRE_AUTOFUSE_START) \
+ L(GRE_AUTOFUSE_END)
+ENUM(gregorio_type, GREGORIO_TYPE);
+
+#define GREGORIO_CLEF(A,E,X,L) \
+ A(CLEF_C, 0) \
+ X(CLEF_F, 1)
+ENUM(gregorio_clef, GREGORIO_CLEF);
+
+/* the different shapes, only for notes */
+
+#define GREGORIO_SHAPE(A,E,X,L) \
+ A(S_UNDETERMINED, 0) \
+ E(S_PUNCTUM) \
+ E(S_PUNCTUM_END_OF_GLYPH) \
+ E(S_PUNCTUM_INCLINATUM_ASCENDENS) \
+ E(S_PUNCTUM_INCLINATUM_STANS) \
+ E(S_PUNCTUM_INCLINATUM_DESCENDENS) \
+ E(S_PUNCTUM_INCLINATUM_DEMINUTUS) \
+ E(S_PUNCTUM_INCLINATUM_AUCTUS) \
+ E(S_VIRGA) \
+ E(S_VIRGA_REVERSA) \
+ E(S_BIVIRGA) \
+ E(S_TRIVIRGA) \
+ E(S_ORISCUS_ASCENDENS) \
+ E(S_ORISCUS_DESCENDENS) \
+ E(S_ORISCUS_DEMINUTUS) \
+ E(S_ORISCUS_SCAPUS_ASCENDENS) \
+ E(S_ORISCUS_SCAPUS_DESCENDENS) \
+ E(S_QUILISMA) \
+ E(S_STROPHA) \
+ E(S_STROPHA_AUCTA) \
+ E(S_DISTROPHA) \
+ E(S_TRISTROPHA) \
+ E(S_LINEA_PUNCTUM) \
+ E(S_FLAT) \
+ E(S_SHARP) \
+ E(S_NATURAL) \
+ /* special shapes that must not appear in the final form of the score :
+ * quadratum is the shape of the first note of a punctum quadratum
+ * and quilisma quadratum is the shape of the first note of a pes
+ * quislisma quadratum */ \
+ E(S_ORISCUS_UNDETERMINED) \
+ E(S_ORISCUS_SCAPUS_UNDETERMINED) \
+ E(S_QUADRATUM) \
+ E(S_PUNCTUM_INCLINATUM_UNDETERMINED) \
+ /* those shapes are for now used only in gregoriotex */ \
+ E(S_QUILISMA_QUADRATUM) \
+ E(S_PUNCTUM_AUCTUS_ASCENDENS) \
+ E(S_PUNCTUM_AUCTUS_DESCENDENS) \
+ E(S_PUNCTUM_DEMINUTUS) \
+ L(S_LINEA)
+ENUM(gregorio_shape, GREGORIO_SHAPE);
+
+/* the different kind of bars */
+
+#define GREGORIO_BAR(A,E,X,L) \
+ A(B_NO_BAR, 0) \
+ E(B_VIRGULA) \
+ E(B_DIVISIO_MINIMA) \
+ E(B_DIVISIO_MINOR) \
+ E(B_DIVISIO_MAIOR) \
+ E(B_DIVISIO_FINALIS) \
+ E(B_DIVISIO_MINOR_D1) \
+ E(B_DIVISIO_MINOR_D2) \
+ E(B_DIVISIO_MINOR_D3) \
+ E(B_DIVISIO_MINOR_D4) \
+ E(B_DIVISIO_MINOR_D5) \
+ E(B_DIVISIO_MINOR_D6) \
+ E(B_DIVISIO_MINOR_D7) \
+ E(B_DIVISIO_MINOR_D8) \
+ E(B_VIRGULA_HIGH) \
+ E(B_DIVISIO_MINIMA_HIGH) \
+ E(B_DIVISIO_MAIOR_DOTTED) \
+ E(B_DIVISIO_MINIMIS) \
+ L(B_DIVISIO_MINIMIS_HIGH)
+ENUM(gregorio_bar, GREGORIO_BAR);
+
+/* definition of the signs. You can notice that the values are made so
+ * that if you wan to add a vertical episema to a note, you juste
+ * make note->signs+=_V_EPISEMA, so please don't change the value as
+ * this trick is used. */
+
+#define GREGORIO_SIGN(A,E,X,L) \
+ A(_NO_SIGN, 0x00) \
+ A(_PUNCTUM_MORA, 0x01) \
+ A(_AUCTUM_DUPLEX, 0x02) \
+ A(_V_EPISEMA, 0x10) \
+ A(_V_EPISEMA_PUNCTUM_MORA, 0x11) \
+ A(_V_EPISEMA_AUCTUM_DUPLEX, 0x12) \
+ /* more rare signs, for now they can't be used with the others */ \
+ A(_ACCENTUS, 0x03) \
+ A(_ACCENTUS_REVERSUS, 0x04) \
+ A(_CIRCULUS, 0x05) \
+ A(_SEMI_CIRCULUS, 0x06) \
+ A(_SEMI_CIRCULUS_REVERSUS, 0x07) \
+ /* signs of a bar */ \
+ A(_BAR_H_EPISEMA, 0x08) \
+ A(_V_EPISEMA_BAR_H_EPISEMA, 0x18) \
+ /* musica ficta */ \
+ A(_MUSICA_FICTA_FLAT, 0x09) \
+ A(_MUSICA_FICTA_NATURAL, 0x0a) \
+ X(_MUSICA_FICTA_SHARP, 0x0b)
+ENUM(gregorio_sign, GREGORIO_SIGN);
+
+/* the different spaces */
+
+#define GREGORIO_SPACE(A,E,X,L) \
+ A(SP_DEFAULT, 1) \
+ E(SP_NO_SPACE) \
+ E(SP_ZERO_WIDTH) \
+ E(SP_HALF_SPACE) \
+ E(SP_INTERGLYPH_SPACE) \
+ E(SP_NEUMATIC_CUT) \
+ E(SP_LARGER_SPACE) \
+ E(SP_GLYPH_SPACE) \
+ E(SP_AD_HOC_SPACE) \
+ E(SP_NEUMATIC_CUT_NB) \
+ E(SP_LARGER_SPACE_NB) \
+ E(SP_GLYPH_SPACE_NB) \
+ L(SP_AD_HOC_SPACE_NB)
+ENUM(gregorio_space, GREGORIO_SPACE);
+
+/* the different liquescences, like for the signs, have special
+ * values: to say that something is initio_debilis, just do
+ * glyph->liquescentia+=L_INITIO_DEBILIS. So don't change the value,
+ * the trick is much used */
+
+#define TAIL_LIQUESCENTIA_MASK 0x07
+
+#define GREGORIO_LIQUESCENTIA(A,E,X,L) \
+ A(L_NO_LIQUESCENTIA, 0x00) \
+ A(L_DEMINUTUS, 0x01) \
+ A(L_AUCTUS_ASCENDENS, 0x02) \
+ A(L_AUCTUS_DESCENDENS, 0x04) \
+ A(L_INITIO_DEBILIS, 0x10) \
+ A(L_DEMINUTUS_INITIO_DEBILIS, 0x11) \
+ A(L_AUCTUS_ASCENDENS_INITIO_DEBILIS, 0x12) \
+ A(L_AUCTUS_DESCENDENS_INITIO_DEBILIS, 0x14) \
+ A(L_FUSED, 0x20) \
+ A(L_FUSED_DEMINUTUS, 0x21) \
+ A(L_FUSED_AUCTUS_ASCENDENS, 0x22) \
+ X(L_FUSED_AUCTUS_DESCENDENS, 0x24)
+ENUM(gregorio_liquescentia, GREGORIO_LIQUESCENTIA);
+
+#define GREHEPISEMA_SIZE(A,E,X,L) \
+ A(H_NORMAL, 0) \
+ E(H_SMALL_LEFT) \
+ E(H_SMALL_CENTRE) \
+ L(H_SMALL_RIGHT)
+ENUM(grehepisema_size, GREHEPISEMA_SIZE);
+
+/* values are chosen so BELOW/ABOVE can be added to a pitch */
+#define GREGORIO_VPOSITION(A,E,X,L) \
+ A(VPOS_AUTO, 0) \
+ A(VPOS_BELOW, -1) \
+ X(VPOS_ABOVE, 1)
+ENUM(gregorio_vposition, GREGORIO_VPOSITION);
+
+/* The different types of glyph */
+
+#define GREGORIO_GLYPH_TYPE(A,E,X,L) \
+ A(G_PUNCTUM_INCLINATUM, 1) \
+ E(G_2_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_3_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_4_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_5_PUNCTA_INCLINATA_DESCENDENS) \
+ E(G_2_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_3_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_4_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_5_PUNCTA_INCLINATA_ASCENDENS) \
+ E(G_PUNCTA_INCLINATA) \
+ /* !!! DO NOT CHANGE THE ENUM ORDERING BEFORE THIS LINE !!! */ \
+ E(G_UNDETERMINED) \
+ E(G_VIRGA) \
+ E(G_STROPHA) \
+ E(G_STROPHA_AUCTA) \
+ E(G_PUNCTUM) \
+ E(G_ALTERATION) \
+ E(G_PODATUS) \
+ E(G_PES_QUADRATUM) \
+ E(G_FLEXA) \
+ E(G_TORCULUS) \
+ E(G_TORCULUS_RESUPINUS) \
+ E(G_TORCULUS_RESUPINUS_FLEXUS) \
+ E(G_PORRECTUS) \
+ E(G_PORRECTUS_FLEXUS) \
+ E(G_BIVIRGA) \
+ E(G_TRIVIRGA) \
+ E(G_DISTROPHA) \
+ E(G_DISTROPHA_AUCTA) \
+ E(G_TRISTROPHA) \
+ E(G_TRISTROPHA_AUCTA) \
+ E(G_PES_QUADRATUM_FIRST_PART) \
+ E(G_SCANDICUS) \
+ E(G_PES_QUILISMA_QUADRATUM_FIRST_PART) \
+ E(G_ANCUS) \
+ E(G_PUNCTA_ASCENDENS) \
+ E(G_PUNCTA_DESCENDENS) \
+ E(G_VIRGA_REVERSA) \
+ E(G_SALICUS) \
+ E(G_SALICUS_FLEXUS) \
+ E(G_PES_ASCENDENS_ORISCUS) \
+ E(G_PES_DESCENDENS_ORISCUS) \
+ E(G_TORCULUS_LIQUESCENS) \
+ /* additional glyph types, necessary for determination */ \
+ E(G_PORRECTUS_NO_BAR) \
+ E(G_PORRECTUS_FLEXUS_NO_BAR) \
+ L(G_FUSED)
+ENUM(gregorio_glyph_type, GREGORIO_GLYPH_TYPE);
+
+/*
+ *
+ * The we define the characters. First we define the different styles. You
+ * can notice that center is just a style like the others
+ *
+ */
+
+#define GRESTYLE_STYLE(A,E,X,L) \
+ A(ST_NO_STYLE, 0) \
+ E(ST_ITALIC) \
+ E(ST_CENTER) \
+ /* when the user types a {}, basically the same behaviour, except for
+ * the initial */ \
+ E(ST_FORCED_CENTER) \
+ E(ST_BOLD) \
+ E(ST_TT) \
+ E(ST_SMALL_CAPS) \
+ E(ST_SPECIAL_CHAR) \
+ E(ST_VERBATIM) \
+ E(ST_INITIAL) /* a style used to determine the initial */ \
+ E(ST_UNDERLINED) \
+ E(ST_COLORED) \
+ E(ST_ELISION) \
+ E(ST_FIRST_WORD) \
+ E(ST_FIRST_SYLLABLE) \
+ E(ST_FIRST_SYLLABLE_INITIAL) \
+ E(ST_SYLLABLE_INITIAL) \
+ /* protrusion is implemented a PROTRUSION_FACTOR followed by a PROTRUSION;
+ * an automatic protrusion will have a verbatim TeX macro as factor */ \
+ E(ST_PROTRUSION_FACTOR) \
+ E(ST_PROTRUSION) \
+ L(ST_SENTINEL) /* a temporary style to signify the end of a syllable */
+ENUM(grestyle_style, GRESTYLE_STYLE);
+
+/*
+ * Then the different types of styles. See the next comments for further
+ * readings.
+ */
+
+#define GRESTYLE_TYPE(A,E,X,L) \
+ A(ST_T_NOTHING, 0) \
+ E(ST_T_BEGIN) \
+ L(ST_T_END)
+ENUM(grestyle_type, GRESTYLE_TYPE);
+
+/*
+ * The different types of translation centerings
+ */
+
+#define GREGORIO_TR_CENTERING(A,E,X,L) \
+ A(TR_NORMAL, 0) \
+ E(TR_WITH_CENTER_BEGINNING) \
+ L(TR_WITH_CENTER_END)
+ENUM(gregorio_tr_centering, GREGORIO_TR_CENTERING);
+
+/*
+ * Nothing, beginning or end of area without linebreak
+ */
+
+#define GREGORIO_NLBA(A,E,X,L) \
+ A(NLBA_NORMAL, 0) \
+ E(NLBA_BEGINNING) \
+ L(NLBA_END)
+ENUM(gregorio_nlba, GREGORIO_NLBA);
+
+#define GREGORIO_EUOUAE(A,E,X,L) \
+ A(EUOUAE_NORMAL, 0) \
+ E(EUOUAE_BEGINNING) \
+ L(EUOUAE_END)
+ENUM(gregorio_euouae, GREGORIO_EUOUAE);
+
+#define GREGORIO_WORD_POSITION(A,E,X,L) \
+ A(WORD_BEGINNING, 1) \
+ E(WORD_MIDDLE) \
+ E(WORD_END) \
+ L(WORD_ONE_SYLLABLE)
+ENUM(gregorio_word_position, GREGORIO_WORD_POSITION);
+
+#define GREGORIO_SIGN_ORIENTATION(A,E,X,L) \
+ A(SO_OVER, 0) \
+ X(SO_UNDER, 1)
+ENUM(gregorio_sign_orientation, GREGORIO_SIGN_ORIENTATION);
+
+/* the numeric values will be directly passed to TeX */
+#define GREGORIO_HEPISEMA_VBASEPOS(A,E,X,L) \
+ A(HVB_AUTO, 0) \
+ A(HVB_MIDDLE, 1) \
+ A(HVB_O_LOW, 2) \
+ A(HVB_O_HIGH, 3) \
+ A(HVB_U_LOW, 4) \
+ X(HVB_U_HIGH, 5)
+ENUM(gregorio_hepisema_vbasepos, GREGORIO_HEPISEMA_VBASEPOS);
+
+/* these may be used as bit fields, with LEDGER_EXPLICIT and LEDGER_DRAWN being
+ * the bits */
+#define GREGORIO_LEDGER_SPECIFICITY(A,E,X,L) \
+ A(LEDGER_SUPPOSED, 0) \
+ A(LEDGER_EXPLICIT, 1) \
+ A(LEDGER_DRAWN, 2) \
+ X(LEDGER_EXPLICITLY_DRAWN, 3)
+ENUM(gregorio_ledger_specificity, GREGORIO_LEDGER_SPECIFICITY);
+
+typedef struct gregorio_extra_info {
+ char *ad_hoc_space_factor;
+ ENUM_BITFIELD(gregorio_bar) bar:5;
+ ENUM_BITFIELD(gregorio_space) space:4;
+ ENUM_BITFIELD(gregorio_nlba) nlba:2;
+ bool eol_ragged:1;
+ bool eol_forces_custos:1;
+ bool eol_forces_custos_on:1;
+} gregorio_extra_info;
+
+typedef struct gregorio_clef_info {
+ signed char line;
+ signed char secondary_line;
+ signed char pitch_difference;
+ ENUM_BITFIELD(gregorio_clef) clef:1;
+ bool flatted:1;
+ ENUM_BITFIELD(gregorio_clef) secondary_clef:1;
+ bool secondary_flatted:1;
+} gregorio_clef_info;
+
+typedef union gregorio_misc_element_info {
+ /* pitched is used for GRE_CUSTOS */
+ struct {
+ /* The pitch of the glyph. */
+ signed char pitch;
+ /* boolean indicating whether the pitch is forced */
+ bool force_pitch:1;
+ } pitched;
+ /* clef is used for GRE_CLEF */
+ struct gregorio_clef_info clef;
+ /* unpitched is used for everything else */
+ struct {
+ struct gregorio_extra_info info;
+ /* an element might carry a sign. */
+ ENUM_BITFIELD(gregorio_sign) special_sign:8;
+ } unpitched;
+} gregorio_misc_element_info;
+
+/*
+ * ! We start with the most precise structure, the note structure. The
+ * note is always a real note (we'll see that glyphs and elements can be
+ * other things).
+ */
+typedef struct gregorio_note {
+ /* then two pointer to other notes, to make a chained list. */
+ struct gregorio_note *previous;
+ struct gregorio_note *next;
+ /* choral sign is a letter that appears next to a note in some choral
+ * scores we put it as char* because sometimes two letters appear */
+ char *choral_sign;
+ union {
+ /* note is used for GRE_NOTE */
+ struct {
+ /* the pitch is the height of the note on the score, that is to
+ * say the letter it is represented by in gabc. If a clef
+ * change, pitch will be a number indicating the line of the
+ * clef. */
+ signed char pitch;
+ /* shape is the shape of the note... if you want to know the
+ * different possible shapes, see above. */
+ ENUM_BITFIELD(gregorio_shape) shape:8;
+ /* liquescentia is the liquescence on the note, it is not really
+ * used in the final score, but it is, like type, used in the
+ * determination of glyphs. */
+ ENUM_BITFIELD(gregorio_liquescentia) liquescentia:7;
+ bool is_cavum:1;
+ } note;
+ /* clef is used for GRE_CLEF */
+ struct gregorio_clef_info clef;
+ /* other is used for everything else */
+ struct gregorio_extra_info other;
+ } u;
+
+ /* these go to the end for structure alignment */
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+ unsigned short src_line, src_column, src_offset;
+ unsigned short he_adjustment_index[2];
+
+ /* we have seen that notes are always real notes, that is to say
+ * GRE_NOTE. the type is always that in the final structure. But there
+ * is however this field in the structure because of the temporary
+ * states that can appear in the determination, where notes can be
+ * other things. This is the case for example in gabc reading. */
+ ENUM_BITFIELD(gregorio_type) type:8;
+ /* signs is the signs on the notes, see above for all possible values */
+ ENUM_BITFIELD(gregorio_sign) signs:8;
+ /* special_sign is the sign we sometimes encounter on punctum cavum, like
+ * accentus, semi-circulus, etc. */
+ ENUM_BITFIELD(gregorio_sign) special_sign:8;
+ /* h_episema_type is the type of horizontal episema, possible values
+ * are H_ALONE for an isolated horizontal episema, H_MULTI_BEGINNING
+ * if the note is the first note of an episema on several notes,
+ * H_MULTI_MIDDLE if it is inside an episema on several notes. I let
+ * you guess what could be the use of H_MULTI_END. Other values are
+ * temporary values used in determination, they must not appear in the
+ * final structure. */
+
+ const char *gtex_offset_case;
+ signed char v_episema_height;
+ signed char h_episema_above;
+ signed char h_episema_below;
+ ENUM_BITFIELD(grehepisema_size) h_episema_above_size:2;
+ ENUM_BITFIELD(grehepisema_size) h_episema_below_size:2;
+ bool h_episema_above_connect:1;
+ bool h_episema_below_connect:1;
+ /* the "specificity" field indicates how to interpret the line flag */
+ bool high_ledger_line:1;
+ ENUM_BITFIELD(gregorio_ledger_specificity) high_ledger_specificity:2;
+ bool low_ledger_line:1;
+ ENUM_BITFIELD(gregorio_ledger_specificity) low_ledger_specificity:2;
+ bool is_lower_note:1;
+ bool is_upper_note:1;
+ ENUM_BITFIELD(gregorio_vposition) mora_vposition:2;
+ bool choral_sign_is_nabc:1;
+} gregorio_note;
+
+/*
+ * ! @brief The gregorio glyph structure Unlike gregorio_note, gregorio_glyph
+ * can be other things besides GRE_GLYPH: it can also be GRE_SPACE
+ */
+typedef struct gregorio_glyph {
+ /* two pointer to make a chained list */
+ struct gregorio_glyph *previous;
+ struct gregorio_glyph *next;
+ union {
+ /* glyph is used for GRE_GLYPH */
+ struct {
+ /* a pointer to a (chained list of) gregorio_notes, the first of
+ * the glyph. */
+ struct gregorio_note *first_note;
+ signed char fuse_to_next_glyph;
+ /* The glyph type for a GRE_GLYPH (porrectus, pes, etc.). They
+ * are all listed above. */
+ ENUM_BITFIELD(gregorio_glyph_type) glyph_type:8;
+ /* liquescentia is really used, because that will determine the
+ * shape we will have to use. */
+ ENUM_BITFIELD(gregorio_liquescentia) liquescentia:7;
+ bool is_cavum:1;
+ } notes;
+ union gregorio_misc_element_info misc;
+ } u;
+
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+
+ /* type can have the values explained in the comment just above. */
+ ENUM_BITFIELD(gregorio_type) type:8;
+
+ /* There is no additional parameter for GRE_SPACE in a gregorio_glyph
+ * because gregorio_space in this case can have only one value:
+ * SP_ZERO_WIDTH, as other spaces would break the glyphs into
+ * different elements. */
+} gregorio_glyph;
+
+typedef struct gregorio_element {
+ /* pointers to the next and previous elements. */
+ struct gregorio_element *previous;
+ struct gregorio_element *next;
+ /* The nabc string */
+ char **nabc;
+ /* we put it here to get the length of the array here too */
+ size_t nabc_lines;
+ union {
+ /* first_glyph is used for GRE_ELEMENT */
+ /* a pointer to the first glyph of the element. */
+ struct gregorio_glyph *first_glyph;
+ union gregorio_misc_element_info misc;
+ } u;
+
+ /* index to a string containing a possible TeX verbatim; necessary during
+ * structure generation. */
+ unsigned short texverb;
+ /* type can have the values GRE_ELEMENT, GRE_BAR, GRE_CLEF, GRE_CUSTOS,
+ * GRE_END_OF_LINE, GRE_SPACE, GRE_TEXVERB_ELEMENT or GRE_NLBA */
+ ENUM_BITFIELD(gregorio_type) type:8;
+} gregorio_element;
+
+/*
+ *
+ * gregorio_characters are a bit specials. As there can be styles in the
+ * text, I had to find a structure mode adapted that just grewchar *. So
+ * basically a gregorio_character is a double-chained list of things that
+ * can be grewchar or gregorio_styles. For example if you type (in gabc)
+ * p<i>o</i>t, the corresponding gregorio_character list will be
+ * P->style(type: beginning, style italic) -> o -> style(type:end, style:
+ * italic). But for this list to be coherent, it is mandatory that it is
+ * xml-compliant, that is to say that a<b>c<i>d</b>e</i> will be
+ * interpreted as a<b>c<i>d</i></b><i>e</i>. This MUST be done when reading
+ * a file, so that the structure in memory is coherent. It makes input
+ * modules more comple, but output modules muche more simpler. The last
+ * particularity is that center must also be determined in the input
+ * modules, so that it is already defined in memory. But it is a bit more
+ * complex, because for TeX-like output modules, we need to close all
+ * styles before the center style: if the user types <i>pot</i> it must be
+ * represented as <i>p</i>{<i>o</i>}<i>t</i>.
+ *
+ * Here is the declaration of the gregorio_style struct. It is simply two
+ * chars, one telling the type of style character it is (beginning for a
+ * character that marks the beginning of a style, and end for a character
+ * marking the end of a style). The other char simply is the style
+ * represented by the character (italic, etc.)
+ *
+ */
+
+typedef struct gregorio_style {
+ ENUM_BITFIELD(grestyle_style) style:6;
+ ENUM_BITFIELD(grestyle_type) type:2;
+} gregorio_style;
+
+/*
+ *
+ * This union is quite ugly... but necessary for a gregorio_character to be
+ * able to be a grewchar or gregorio_style.
+ *
+ */
+typedef union character_or_style {
+ grewchar character;
+ struct gregorio_style s;
+} character_or_style;
+
+/*
+ *
+ * Finally the gregorio_character structure in itself, It is first a char
+ * determining the type (character or gregorio_style). This char is 0 when
+ * it is a style and something else when it is a character. Then the two
+ * pointers to build the double chained list, and finally the union. So
+ * when you want to access to the style of a gregorio_character (when you
+ * know it is a character of style), you must access to
+ * mygregoriochar.cos.s.style, and for the character
+ * mygregoriochar.cos.character .
+ *
+ */
+
+typedef struct gregorio_character {
+ bool is_character;
+ struct gregorio_character *next_character;
+ struct gregorio_character *previous_character;
+ union character_or_style cos;
+} gregorio_character;
+
+typedef struct gregorio_syllable {
+ /* pointer to a gregorio_text structure corresponding to the text. */
+ struct gregorio_character *text;
+ /* pointer to a gregorio_text structure corresponding to the
+ * translation */
+ struct gregorio_character *translation;
+ /* a string representing the text above the lines (raw TeX) */
+ char *abovelinestext;
+ /* pointer to the next and previous syllable */
+ struct gregorio_syllable *next_syllable;
+ struct gregorio_syllable *previous_syllable;
+ /* and finally a pointer to the elements of the structure. Here we see
+ * that we point to an array of elements. In fact it is the array of
+ * the first elements of the different voices of the syllable, for the
+ * case of polyphonic score. In most scores (monophonic), the array
+ * has only one element. */
+ struct gregorio_element **elements;
+ unsigned short euouae_id;
+ unsigned short src_line, src_column, src_offset;
+ /* type of translation (with center beginning or only center end) */
+ ENUM_BITFIELD(gregorio_tr_centering) translation_type:2;
+ /* beginning or end of area without linebreak? */
+ ENUM_BITFIELD(gregorio_nlba) no_linebreak_area:2;
+ /* beginning or end of euouae area */
+ ENUM_BITFIELD(gregorio_euouae) euouae:2;
+ /* position is WORD_BEGINNING for the beginning of a multi-syllable
+ * word, WORD_ONE_SYLLABLE for syllable that are alone in their word,
+ * and i let you gess what are WORD_MIDDLE and WORD_END. */
+ ENUM_BITFIELD(gregorio_word_position) position:3;
+ bool first_word:1;
+ bool forced_center:1;
+ bool clear:1;
+} gregorio_syllable;
+
+/* Stores a header in a singly-linked list */
+typedef struct gregorio_header {
+ char *name;
+ char *value;
+ struct gregorio_header *next;
+} gregorio_header;
+
+/*
+ *
+ * Score is the top structure, the structure in which we will convert
+ * everything, and from which we will construct XML
+ *
+ */
+
+#define MAX_ANNOTATIONS 2
+
+typedef struct gregorio_score {
+ unsigned char digest[SHA1_DIGEST_SIZE];
+ /* the structure starts by a pointer to the first syllable of the
+ * score. */
+ struct gregorio_syllable *first_syllable;
+ /* the number of voices is very important. In monophony it is one. If
+ * there are more voices thant number_of_voices, the additional voices
+ * won't be taken into consideration. */
+ int number_of_voices;
+ /* then start some metadata: */
+ char *name;
+ char *gabc_copyright;
+ char *score_copyright;
+ char *mode;
+ char *mode_modifier;
+ char *mode_differentia;
+ char *author;
+ /* There is one annotation for each line above the initial letter */
+ char *annotation[MAX_ANNOTATIONS];
+ /* field giving informations on the initial (no initial, normal initial
+ * or two lines initial) */
+ size_t nabc_lines;
+ char *user_notes;
+ /* the determination method (maximal ambitus, etc.) */
+ unsigned char det_method;
+ /* then, as there are some metadata that are voice-specific, we add a
+ * pointer to the first voice_info. (see comments below) */
+ struct gregorio_voice_info *first_voice_info;
+ struct gregorio_header *headers;
+ struct gregorio_header *last_header;
+ unsigned char staff_lines;
+ signed char highest_pitch;
+ signed char high_ledger_line_pitch;
+ signed char virgula_far_pitch;
+ bool legacy_oriscus_orientation;
+} gregorio_score;
+
+/*
+ *
+ * gregorio_voice info contains everything that is voice_specific, for
+ * example the key, etc. that can be different from one voice to another.
+ * The order of the voice_info (it is a chained list) is the same as the
+ * order of the voices (from top to bottom in their representation on the
+ * score).
+ *
+ */
+
+typedef struct gregorio_voice_info {
+ gregorio_clef_info initial_clef;
+ struct gregorio_voice_info *next_voice_info;
+} gregorio_voice_info;
+
+typedef struct gregorio_hepisema_adjustment {
+ gregorio_hepisema_vbasepos vbasepos;
+ char *nudge;
+ signed char pitch_extremum;
+} gregorio_hepisema_adjustment;
+
+/* the maximum number of voices, more than this is total nonsense in
+ * gregorian chant. */
+#define MAX_NUMBER_OF_VOICES 10
+
+#define MAX_TEXT_LENGTH 200
+
+#define C_KEY 'c'
+#define F_KEY 'f'
+#define NO_KEY -5
+
+extern unsigned short tex_position_id;
+extern gregorio_clef_info gregorio_default_clef;
+
+#define MONOPHONY 0
+
+#define USELESS_VALUE 0
+
+static __inline bool is_puncta_inclinata(char glyph)
+{
+ return glyph <= G_5_PUNCTA_INCLINATA_ASCENDENS;
+}
+
+#define IS_INITIO_DEBILIS 5
+#define NO_INITIO_DEBILIS 0
+
+static __inline bool is_tail_liquescentia(char liquescentia)
+{
+ return liquescentia & TAIL_LIQUESCENTIA_MASK;
+}
+
+static __inline bool is_initio_debilis(char liquescentia)
+{
+ return liquescentia & L_INITIO_DEBILIS;
+}
+
+static __inline bool is_fused(char liquescentia)
+{
+ return liquescentia & L_FUSED;
+}
+
+#define HEPISEMA_NONE 0
+#define HEPISEMA_AUTO -1
+#define HEPISEMA_FORCED -2
+
+/* The first pitch MUST be an odd number */
+#define LOWEST_PITCH 3
+#define DUMMY_PITCH (LOWEST_PITCH + 6)
+#define LOW_LEDGER_LINE_PITCH (LOWEST_PITCH + 1)
+#define LOW_LINE_PITCH (LOWEST_PITCH + 3)
+#define MAX_PITCH (LOWEST_PITCH + 4 + (2 * 5))
+
+#define NO_PITCH -128
+
+/* defines the maximal interval between two notes of the same glyph */
+#define MAX_AMBITUS 5
+
+void gregorio_struct_init(void);
+void gregorio_struct_destroy(void);
+gregorio_score *gregorio_new_score(void);
+void gregorio_add_note(gregorio_note **current_note, signed char pitch,
+ gregorio_shape shape, gregorio_sign signs,
+ gregorio_liquescentia liquescentia, gregorio_note* prototype,
+ const gregorio_scanner_location *loc);
+void gregorio_add_glyph(gregorio_glyph **current_glyph,
+ gregorio_glyph_type type, gregorio_note *first_note,
+ gregorio_liquescentia liquescentia, bool is_cavum);
+void gregorio_add_element(gregorio_element **current_element,
+ gregorio_glyph *first_glyph);
+void gregorio_add_syllable(gregorio_syllable **current_syllable,
+ int number_of_voices, gregorio_element *elements[],
+ gregorio_character *first_character,
+ gregorio_character *first_translation_character,
+ gregorio_word_position position, char *abovelinestext,
+ gregorio_tr_centering translation_type, gregorio_nlba no_linebreak_area,
+ gregorio_euouae euouae, const gregorio_scanner_location *loc,
+ bool first_word, bool clear);
+void gregorio_add_special_sign(gregorio_note *current_note, gregorio_sign sign);
+void gregorio_change_shape(gregorio_note *note, gregorio_shape shape,
+ bool legacy_oriscus_orientation);
+void gregorio_add_cavum(gregorio_note *note);
+void gregorio_position_h_episema_above(gregorio_note *note, signed char height,
+ bool connect);
+void gregorio_position_h_episema_below(gregorio_note *note, signed char height,
+ bool connect);
+void gregorio_add_h_episema(gregorio_note *note, grehepisema_size size,
+ gregorio_vposition vposition, bool disable_bridge,
+ unsigned int *nbof_isolated_episema);
+void gregorio_add_sign(gregorio_note *note, gregorio_sign sign,
+ gregorio_vposition vposition);
+void gregorio_add_tail_liquescentia(gregorio_note *note,
+ gregorio_liquescentia liquescentia, bool legacy_oriscus_orientation);
+void gregorio_add_voice_info(gregorio_voice_info **current_voice_info);
+void gregorio_free_voice_infos(gregorio_voice_info *voice_info);
+void gregorio_free_one_note(gregorio_note **note);
+void gregorio_free_one_glyph(gregorio_glyph **glyph);
+void gregorio_free_one_element(gregorio_element **element);
+void gregorio_free_score(gregorio_score *score);
+void gregorio_free_characters(gregorio_character *current_character);
+void gregorio_go_to_first_character(const gregorio_character **character);
+void gregorio_add_clef_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_clef_info clef, unsigned short texverb);
+void gregorio_add_pitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, signed char pitch, bool force_pitch,
+ unsigned short texverb);
+void gregorio_add_unpitched_element_as_glyph(gregorio_glyph **current_glyph,
+ gregorio_type type, gregorio_extra_info *info, gregorio_sign sign,
+ unsigned short texverb);
+void gregorio_add_end_of_line_as_note(gregorio_note **current_note,
+ bool eol_ragged, bool eol_forces_custos, bool eol_forces_custos_on,
+ const gregorio_scanner_location *loc);
+void gregorio_add_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_manual_custos_as_note(gregorio_note **current_note,
+ signed char pitch, const gregorio_scanner_location *loc);
+void gregorio_add_suppress_custos_as_note(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_clef_as_note(gregorio_note **current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted,
+ const gregorio_scanner_location *loc);
+void gregorio_add_secondary_clef_to_note(gregorio_note *current_note,
+ gregorio_clef clef, signed char clef_line, bool flatted);
+void gregorio_add_bar_as_note(gregorio_note **current_note, gregorio_bar bar,
+ const gregorio_scanner_location *loc);
+void gregorio_add_space_as_note(gregorio_note **current_note,
+ gregorio_space space, char *factor,
+ const gregorio_scanner_location *loc);
+unsigned short gregorio_add_texverb_as_note(gregorio_note **current_note,
+ char *str, gregorio_type type, const gregorio_scanner_location *loc);
+void gregorio_add_nlba_as_note(gregorio_note **current_note,
+ gregorio_nlba type, const gregorio_scanner_location *loc);
+void gregorio_start_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_end_autofuse(gregorio_note **current_note,
+ const gregorio_scanner_location *loc);
+void gregorio_add_texverb_to_note(gregorio_note *current_note, char *str);
+void gregorio_add_cs_to_note(gregorio_note *const*current_note, char *str,
+ bool nabc);
+void gregorio_add_misc_element(gregorio_element **current_element,
+ gregorio_type type, gregorio_misc_element_info *info,
+ unsigned short texverb);
+void gregorio_set_score_annotation(gregorio_score *score, char *annotation);
+void gregorio_set_score_staff_lines(gregorio_score *score, char staff_lines);
+void gregorio_add_score_header(gregorio_score *score, char *name,
+ char *value);
+void gregorio_fix_initial_keys(gregorio_score *score,
+ gregorio_clef_info default_clef);
+void gregorio_go_to_first_note(gregorio_note **note);
+void gregorio_go_to_first_glyph(gregorio_glyph **glyph);
+bool gregorio_is_only_special(gregorio_element *element);
+int gregorio_calculate_new_key(gregorio_clef_info clef);
+void gregorio_add_character(gregorio_character **current_character,
+ grewchar wcharacter);
+void gregorio_begin_style(gregorio_character **current_character,
+ grestyle_style style);
+void gregorio_end_style(gregorio_character **current_character,
+ grestyle_style style);
+gregorio_character *gregorio_clone_characters(const gregorio_character *source);
+signed char gregorio_determine_next_pitch(const gregorio_syllable *syllable,
+ const gregorio_element *element, const gregorio_glyph *glyph,
+ gregorio_shape *next_pitch_alteration);
+const char *gregorio_unknown(int value);
+gregorio_element *gregorio_get_clef_change(gregorio_syllable *syllable);
+unsigned short gregorio_add_hepisema_adjustment(
+ gregorio_hepisema_vbasepos vbasepos, char *nudge);
+gregorio_hepisema_adjustment *gregorio_get_hepisema_adjustment(
+ unsigned short index);
+const char *gregorio_texverb(unsigned short index);
+void gregorio_change_texverb(unsigned short index, char *texverb);
+
+static __inline void gregorio_go_to_first_character_c(gregorio_character **character)
+{
+ gregorio_go_to_first_character((const gregorio_character **)character);
+}
+
+static __inline gregorio_note *gregorio_glyph_last_note(
+ const gregorio_glyph *const glyph)
+{
+ gregorio_note *note;
+ gregorio_assert(glyph && glyph->type == GRE_GLYPH, gregorio_glyph_last_note,
+ "trying to find the last note of something that is not a glyph",
+ return NULL);
+ for (note = glyph->u.notes.first_note; note->next; note = note->next) {
+ /* iterate to find the last note */
+ }
+ return note;
+}
+
+static __inline const gregorio_glyph *gregorio_next_non_texverb_glyph(
+ const gregorio_glyph *glyph)
+{
+ if (glyph) {
+ for (glyph = glyph->next; glyph; glyph = glyph->next) {
+ if (glyph->type != GRE_TEXVERB_GLYPH) {
+ return glyph;
+ }
+ }
+ }
+ return NULL;
+}
+
+static __inline const gregorio_glyph *gregorio_previous_non_texverb_glyph(
+ const gregorio_glyph *glyph)
+{
+ if (glyph) {
+ for (glyph = glyph->previous; glyph; glyph = glyph->previous) {
+ if (glyph->type != GRE_TEXVERB_GLYPH) {
+ return glyph;
+ }
+ }
+ }
+ return NULL;
+}
+
+static __inline char gregorio_clef_to_char(gregorio_clef clef)
+{
+ return (clef == CLEF_C)? 'c' : 'f';
+}
+
+static __inline signed char gregorio_adjust_pitch_into_staff(
+ const gregorio_score *score, signed char pitch)
+{
+ while (pitch < LOWEST_PITCH) {
+ pitch += 7;
+ }
+ while (pitch > score->highest_pitch) {
+ pitch -= 7;
+ }
+ assert(pitch >= LOWEST_PITCH && pitch <= score->highest_pitch);
+ return pitch;
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h b/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h
new file mode 100644
index 00000000000..f0b19040655
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct_iter.h
@@ -0,0 +1,191 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header defines the Gregorio data structures and functions.
+ *
+ * Copyright (C) 2016-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file
+ * The file starts by the definition of all the structures used in
+ * gregorio. As it is certainly the most important file for
+ * understanding, read it carefully.
+ */
+
+#ifndef STRUCT_ITER_H
+#define STRUCT_ITER_H
+
+#include "struct.h"
+
+/* This enum defines bitfields selecting the node types that should be passed
+ * to end_item in gregorio_from_note_to_note */
+typedef enum {
+ GRESTRUCT_NONE = 0,
+ GRESTRUCT_NOTE = 1 << 0,
+ GRESTRUCT_GLYPH = 1 << 1,
+ GRESTRUCT_ELEMENT = 1 << 2,
+ GRESTRUCT_SYLLABLE = 1 << 3
+} gregorio_note_iter_item_type;
+
+typedef struct {
+ gregorio_syllable *syllable;
+ gregorio_element *element;
+ gregorio_glyph *glyph;
+ gregorio_note *note;
+} gregorio_note_iter_position;
+
+static __inline void gregorio_from_note_to_note(
+ const gregorio_note_iter_position *const start,
+ const gregorio_note_iter_position *const end, bool include_end,
+ void (*const visit)(const gregorio_note_iter_position *, void *),
+ void (*const end_item)(const gregorio_note_iter_position *,
+ gregorio_note_iter_item_type, void *),
+ const gregorio_note_iter_item_type desired_end_items, void *data)
+{
+ /* Note: include_end is effectively ignored if end is NULL */
+
+ gregorio_note_iter_position p = *start;
+
+ while (p.syllable) {
+ if (!p.element) {
+ p.element = p.syllable->elements[0];
+ }
+ while (p.element) {
+ if (p.element->type == GRE_ELEMENT) {
+ if (!p.glyph) {
+ p.glyph = p.element->u.first_glyph;
+ }
+ while (p.glyph) {
+ if (p.glyph->type == GRE_GLYPH) {
+ if (!p.note) {
+ p.note = p.glyph->u.notes.first_note;
+ }
+ while (p.note) {
+ bool at_end = (end && p.note == end->note);
+
+ if (p.note->type == GRE_NOTE
+ && (!at_end || include_end)) {
+ visit(&p, data);
+ }
+
+ if (at_end) {
+ if (end_item) {
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ if (desired_end_items & GRESTRUCT_NOTE) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_NOTE, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items & GRESTRUCT_GLYPH) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_GLYPH, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items
+ & GRESTRUCT_ELEMENT) {
+ /* currently unused */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_ELEMENT, data);
+ }
+ /* LCOV_EXCL_END */
+ if (desired_end_items
+ & GRESTRUCT_SYLLABLE) {
+ end_item(&p, GRESTRUCT_SYLLABLE, data);
+ }
+ }
+ return;
+ }
+
+ if (end_item
+ && (desired_end_items & GRESTRUCT_NOTE)) {
+ /* in 4.2.0, this code is never hit, as the only
+ * usage that gets through to here does not
+ * include GRESTRUCT_NOTE in desired_end_items */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this
+ * assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_NOTE, data);
+
+ }
+ /* LCOV_EXCL_STOP */
+ p.note = p.note->next;
+ } /* note */
+ }
+ if (end_item && (desired_end_items & GRESTRUCT_GLYPH)) {
+ /* in 4.2.0, this code is never hit, as the only usage
+ * that gets through to here does not include
+ * GRESTRUCT_GLYPH in desired_end_items */
+ /* LCOV_EXCL_START */
+ /* to enable the real code, delete this assertion: */
+ gregorio_fail(gregorio_from_note_to_note,
+ "unused code path");
+ end_item(&p, GRESTRUCT_GLYPH, data);
+ }
+ /* LCOV_EXCL_STOP */
+ p.glyph = p.glyph->next;
+ } /* glyph */
+ }
+ if (end_item && (desired_end_items & GRESTRUCT_ELEMENT)) {
+ end_item(&p, GRESTRUCT_ELEMENT, data);
+ }
+ p.element = p.element->next;
+ } /* element */
+ if (end_item && (desired_end_items & GRESTRUCT_SYLLABLE)) {
+ end_item(&p, GRESTRUCT_SYLLABLE, data);
+ }
+ p.syllable = p.syllable->next_syllable;
+ } /* syllable */
+}
+
+static __inline void gregorio_for_each_note(const gregorio_score *score,
+ void (*const visit)(const gregorio_note_iter_position *, void *),
+ void (*const end_item)(const gregorio_note_iter_position *,
+ gregorio_note_iter_item_type, void *),
+ const gregorio_note_iter_item_type desired_end_items, void *data)
+{
+ gregorio_note_iter_position p = {
+ /* .syllable = */ NULL,
+ /* .element = */ NULL,
+ /* .glyph = */ NULL,
+ /* .note = */ NULL
+ };
+
+ p.syllable = score->first_syllable;
+
+ gregorio_from_note_to_note(&p, NULL, true, visit, end_item,
+ desired_end_items, data);
+}
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.c b/Build/source/texk/gregorio/gregorio-src/src/support.c
new file mode 100644
index 00000000000..a169cbaac9c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.c
@@ -0,0 +1,282 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains miscellaneous support functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include "support.h"
+#include "struct.h"
+#include "messages.h"
+
+/* Our version of snprintf; this is NOT semantically the same as C99's
+ * snprintf; rather, it's a "lowest common denominator" implementation
+ * blending C99 and MS-C */
+void gregorio_snprintf(char *s, size_t size, const char *format, ...)
+{
+ va_list args;
+
+#ifdef _MSC_VER
+ memset(s, 0, size);
+#endif
+
+ va_start(args, format);
+#ifdef _MSC_VER
+ _vsnprintf_s(s, size, _TRUNCATE, format, args);
+#else
+ vsnprintf(s, size, format, args);
+#endif
+ va_end(args);
+}
+
+static __inline void *assert_successful_allocation(void *ptr, char *funcname) {
+ if (!ptr) {
+ /* it's not realistic to test this for coverage */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("error in memory allocation"),
+ funcname, VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ }
+ /* LCOV_EXCL_STOP */
+ return ptr;
+}
+
+void *gregorio_malloc(size_t size)
+{
+ return assert_successful_allocation(malloc(size), "gregorio_malloc");
+}
+
+void *gregorio_calloc(size_t nmemb, size_t size)
+{
+ return assert_successful_allocation(calloc(nmemb, size), "gregorio_calloc");
+}
+
+void *gregorio_realloc(void *ptr, size_t size)
+{
+ return assert_successful_allocation(realloc(ptr, size), "gregorio_realloc");
+}
+
+char *gregorio_strdup(const char *s)
+{
+ return (char *)assert_successful_allocation(strdup(s), "gregorio_strdup");
+}
+
+void *_gregorio_grow_buffer(void *buffer, size_t *nmemb, size_t size)
+{
+ if (buffer == NULL) {
+ return gregorio_malloc(*nmemb * size);
+ }
+ if (*nmemb >= MAX_BUF_GROWTH) {
+ /* it's not realistic to test this case */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("buffer too large"), "gregorio_grow_buffer",
+ VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ *nmemb <<= 1;
+ return gregorio_realloc(buffer, *nmemb * size);
+}
+
+#ifdef USE_KPSE
+static kpathsea kpse = NULL;
+#define USED_FOR_KPSE
+#else
+#define USED_FOR_KPSE __attribute__((unused))
+#endif
+
+void gregorio_support_init(const char *const program USED_FOR_KPSE,
+ const char *const argv0 USED_FOR_KPSE)
+{
+ gregorio_set_error_out(stderr);
+ gregorio_set_verbosity_mode(VERBOSITY_ERROR);
+ gregorio_struct_init();
+#ifdef USE_KPSE
+ kpse = kpathsea_new();
+ kpathsea_set_program_name(kpse, argv0, program);
+#endif
+}
+
+void gregorio_print_version(const char *copyright)
+{
+#ifdef USE_KPSE
+ printf("Gregorio %s (%s).\n%s\n", GREGORIO_VERSION,
+ kpathsea_version_string, copyright);
+#else
+ printf("Gregorio %s.\n%s\n", GREGORIO_VERSION,
+ copyright);
+#endif
+ printf("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n");
+}
+
+#ifdef USE_KPSE
+bool gregorio_read_ok(const char *const filename,
+ const gregorio_verbosity verbosity)
+{
+ if (kpathsea_in_name_ok_silent(kpse, filename)) {
+ return true;
+ }
+ gregorio_messagef("gregorio_in_name_ok", verbosity, __LINE__,
+ _("kpse prohibits read from file %s"), filename);
+ return false;
+}
+
+bool gregorio_write_ok(const char *const filename,
+ const gregorio_verbosity verbosity)
+{
+ if (kpathsea_out_name_ok_silent(kpse, filename)) {
+ return true;
+ }
+ gregorio_messagef("gregorio_out_name_ok", verbosity, __LINE__,
+ _("kpse prohibits write to file %s"), filename);
+ return false;
+}
+#endif
+
+#ifndef USE_KPSE
+static __inline void rtrim(char *buf)
+{
+ char *p;
+ for (p = buf + strlen(buf) - 1; p >= buf && isspace(*p); --p) {
+ *p = '\0';
+ }
+}
+
+static bool gregorio_readline(char **buf, size_t *bufsize, FILE *file)
+{
+ size_t oldsize;
+ if (*buf == NULL) {
+ *bufsize = 128;
+ *buf = gregorio_grow_buffer(NULL, bufsize, char);
+ } else {
+ if (*bufsize < 128) {
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("invalid buffer size"), "gregorio_getline",
+ VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ }
+ (*buf)[0] = '\0';
+ oldsize = 1;
+ for (;;) {
+ (*buf)[*bufsize - 2] = '\0';
+
+ if (feof(file) || ferror(file)
+ || !fgets((*buf) + oldsize - 1, (int)(*bufsize - oldsize + 1),
+ file)
+ || (*buf)[*bufsize - 2] == '\0') {
+ if (ferror(file)) {
+ /* it's not realistic to simulate the system error required to
+ * cover this case */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("Error reading from the file"),
+ "gregorio_getline", VERBOSITY_FATAL, 0);
+ gregorio_exit(1);
+ /* LCOV_EXCL_STOP */
+ }
+ return (*buf)[0] != '\0';
+ }
+
+ oldsize = *bufsize;
+ *buf = gregorio_grow_buffer(*buf, bufsize, char);
+ }
+}
+#endif
+
+
+char **gregorio_kpse_find(const char *filename)
+{
+ char **filenames;
+#ifdef USE_KPSE
+ filenames = kpathsea_find_file_generic(kpse, filename, kpse_tex_format,
+ true, true);
+ if (!filenames) {
+ /* It's not reasonable to break kpse in such a way that this would
+ * fail. */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_kpse_find", VERBOSITY_WARNING, 0,
+ _("kpathsea_find_file_generic returned NULL: %s"), filename);
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
+#else
+ FILE *file;
+ size_t bufsize = 0;
+ char *buf = NULL;
+ size_t capacity = 16, size = 0;
+#define KPSE_COMMAND "kpsewhich -must-exist -all "
+ size_t command_size = sizeof(KPSE_COMMAND) + strlen(filename);
+ char *command = gregorio_malloc(command_size);
+
+ strcpy(command, KPSE_COMMAND);
+ strcpy(command + sizeof(KPSE_COMMAND) - 1, filename);
+ file = popen(command, "r");
+ free(command);
+ command = NULL; /* just to be sure */
+ if (!file) {
+ /* it's not reasonable to cause popen to fail */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_kpse_find", VERBOSITY_WARNING, 0,
+ _("unable to run kpsewhich %s: %s"), filename,
+ strerror(errno));
+ return NULL;
+ /* LCOV_EXCL_STOP */
+ }
+ filenames = gregorio_malloc(capacity * sizeof(char *));
+ while (gregorio_readline(&buf, &bufsize, file)) {
+ rtrim(buf);
+ if (strlen(buf) > 0) {
+ filenames[size++] = gregorio_strdup(buf);
+ if (size >= capacity) {
+ capacity <<= 1;
+ filenames = gregorio_realloc(filenames,
+ capacity * sizeof(char *));
+ }
+ } else {
+ gregorio_messagef("read_patterns", VERBOSITY_WARNING, 0,
+ _("kpsewhich returned bad value for %s"), filename);
+ }
+ }
+ free(buf);
+ filenames[size] = NULL;
+ pclose(file);
+#endif
+ return filenames;
+}
+
+void gregorio_exit(int status)
+{
+#ifdef USE_KPSE
+ if (kpse) {
+ kpathsea_finish(kpse);
+ }
+#endif
+ gregorio_struct_destroy();
+ exit(status);
+} /* the prior line exits; LCOV_EXCL_LINE */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.h b/Build/source/texk/gregorio/gregorio-src/src/support.h
new file mode 100644
index 00000000000..28b4e11bec1
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.h
@@ -0,0 +1,76 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the miscellaneous support functions.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include <stdlib.h>
+#include <limits.h>
+#ifdef USE_KPSE
+#include <kpathsea/kpathsea.h>
+#endif
+#include "bool.h"
+#include "config.h"
+#include "messages.h"
+
+#define GREGORIO_SZ_MAX (~((size_t)0))
+#define MAX_BUF_GROWTH \
+ ((size_t)((((INT_MAX < GREGORIO_SZ_MAX)? INT_MAX : GREGORIO_SZ_MAX) >> 1) + 1))
+
+void gregorio_snprintf(char *s, size_t size, const char *format, ...)
+ __attribute__((__format__ (__printf__, 3, 4)));
+void *gregorio_malloc(size_t size) __attribute__((malloc));
+void *gregorio_calloc(size_t nmemb, size_t size) __attribute__((malloc));
+void *gregorio_realloc(void *ptr, size_t size)
+ __attribute__((warn_unused_result));
+char *gregorio_strdup(const char *s) __attribute__((malloc));
+void *_gregorio_grow_buffer(void *buffer, size_t *nmemb, size_t size)
+ __attribute__((warn_unused_result));
+void gregorio_support_init(const char *program, const char *argv0);
+void gregorio_print_version(const char *copyright);
+char **gregorio_kpse_find(const char *filename);
+void gregorio_exit(int status) __attribute__((noreturn));
+
+#define gregorio_grow_buffer(BUFFER, NMEMB, TYPE) \
+ ((TYPE *)_gregorio_grow_buffer(BUFFER, NMEMB, sizeof(TYPE)))
+
+#ifdef USE_KPSE
+bool gregorio_read_ok(const char *filename, gregorio_verbosity verbosity);
+bool gregorio_write_ok(const char *filename, gregorio_verbosity verbosity);
+
+#define gregorio_check_file_access(DIR, FILENAME, LEVEL, ON_NOT_ALLOWED) \
+ if (!gregorio_ ## DIR ## _ok(FILENAME, VERBOSITY_ ## LEVEL)) { \
+ ON_NOT_ALLOWED; \
+ }
+#define gregorio_kpse_find_or_else(VAR, FILENAME, ON_FAIL) \
+ VAR = gregorio_kpse_find(FILENAME); \
+ if (!VAR) { \
+ ON_FAIL; \
+ }
+#else
+#define gregorio_check_file_access(DIRECTION, FILENAME, LEVEL, ON_NOT_ALLOWED)
+#define gregorio_kpse_find_or_else(VAR, FILENAME, ON_FAIL) \
+ VAR = gregorio_kpse_find(FILENAME); \
+ gregorio_not_null(VAR, gregorio_kpse_find, ON_FAIL)
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/unicode.c b/Build/source/texk/gregorio/gregorio-src/src/unicode.c
new file mode 100644
index 00000000000..fa9e2a4ac87
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/unicode.c
@@ -0,0 +1,174 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file contains functions providing UTF-8 support.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <string.h> /* for strlen */
+#include <stdlib.h>
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+
+/*
+ *
+ * This file contains some functions to handle UTF-8 correctly. We chose to
+ * embed them instead of relying on locale or glib, for simplification: with
+ * these functions we don't rely on anything locale-dependant (such as
+ * wchar_t). The reason is that Windows XP (...) is not UTF-8 and thus would
+ * need the glib in oder to run, which make dependencies much bigger.
+ *
+ */
+
+/* an utf8 version of mbstowcs */
+
+/* expects a buffer of size n + 1 */
+static bool gregorio_mbstowcs(grewchar *dest, const char *src, size_t n)
+{
+ bool success = true;
+ unsigned char bytes_to_come;
+ grewchar result = 0;
+ unsigned char c;
+ size_t res = 0; /* number of bytes we've done so far */
+ gregorio_not_null(src, gregorio_mbstowcs, return false);
+ gregorio_not_null(dest, gregorio_mbstowcs, return false);
+ while (success && *src && res < n) {
+ c = (unsigned char) (*src);
+ if (c < 128) { /* 0100xxxx */
+ /* one-byte symbol */
+ bytes_to_come = 0;
+ result = c;
+ } else if (c >= 240) { /* 1111xxxx */
+ /* start of a four-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 3;
+ result = (result << 3) | (c & 7);
+ } else if (c >= 224) { /* 1110xxxx */
+ /* start of a three-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 2;
+ result = (result << 4) | (c & 15);
+ } else if (c >= 192) { /* 1100xxxx */
+ /* start of a two-byte symbol */
+ /* printf("%d\n", c); */
+ bytes_to_come = 1;
+ result = (result << 5) | (c & 31);
+ } else {
+ /* printf("%s %d %d\n", src, res, c); */
+ gregorio_message(_("malformed UTF-8 sequence1"),
+ "gregorio_mbstowcs", VERBOSITY_ERROR, 0);
+ success = false;
+ break;
+ }
+ while (bytes_to_come > 0) {
+ bytes_to_come--;
+ src++;
+ c = (unsigned char) (*src);
+ if (c < 192 && c >= 128) /* 1000xxxx */
+ {
+ result = (result << 6) | (c & 63);
+ } else {
+ gregorio_message(_("malformed UTF-8 sequence2"),
+ "gregorio_mbstowcs", VERBOSITY_ERROR, 0);
+ success = false;
+ break;
+ }
+ }
+ dest[res] = result;
+
+ res++;
+ result = 0;
+ src++;
+ }
+ dest[res] = 0;
+ return success;
+}
+
+/* the value returned by this function must be freed! */
+grewchar *gregorio_build_grewchar_string_from_buf(const char *const buf)
+{
+ size_t len;
+ grewchar *gwstring;
+ /* this doesn't currently happen, but it's safer to keep this check */
+ if (buf == NULL) {
+ return NULL; /* LCOV_EXCL_LINE */
+ }
+ len = strlen(buf); /* to get the length of the syllable in ASCII */
+ gwstring = (grewchar *) gregorio_malloc((len + 1) * sizeof(grewchar));
+ gregorio_mbstowcs(gwstring, buf, len); /* converting into grewchar */
+ /* no need to check the return code; if it failed, the error state would
+ * already be in place */
+ return gwstring;
+}
+
+/* the function to build a gregorio_character list from a buffer. */
+
+gregorio_character *gregorio_build_char_list_from_buf(const char *const buf)
+{
+ int i = 0;
+ grewchar *gwstring;
+ gregorio_character *current_character = NULL;
+ /* this doesn't currently happen, but it's safer to keep this check */
+ if (buf == NULL) {
+ return NULL; /* LCOV_EXCL_LINE */
+ }
+ gwstring = gregorio_build_grewchar_string_from_buf(buf);
+ /* we add the corresponding characters in the list of gregorio_characters */
+ while (gwstring[i]) {
+ gregorio_add_character(&current_character, gwstring[i]);
+ i++;
+ }
+ free(gwstring);
+ gregorio_go_to_first_character_c(&current_character);
+ return current_character;
+}
+
+void gregorio_print_unichar(FILE *f, const grewchar to_print)
+{
+ if (to_print <= 0x7F) {
+ fprintf(f, "%c", (unsigned char) to_print);
+ return;
+ }
+ if (to_print >= 0x80 && to_print <= 0x7FF) {
+ fprintf(f, "%c%c", 0xC0 | (to_print >> 6), 0x80 | (to_print & 0x3F));
+ return;
+ }
+ if ((to_print >= 0x800 && to_print <= 0xD7FF) ||
+ (to_print >= 0xE000 && to_print <= 0xFFFF)) {
+ fprintf(f, "%c%c%c", 0xE0 | (to_print >> 12),
+ 0x80 | ((to_print >> 6) & 0x3F), 0x80 | (to_print & 0x3F));
+ return;
+ }
+ if (to_print >= 0x10000 && to_print <= 0x10FFFF) {
+ fprintf(f, "%c%c%c%c", 0xF0 | (to_print >> 18),
+ 0x80 | ((to_print >> 12) & 0x3F),
+ 0x80 | ((to_print >> 6) & 0x3F), 0x80 | (to_print & 0x3F));
+ }
+}
+
+void gregorio_print_unistring(FILE *f, const grewchar *first_char)
+{
+ while (*first_char != 0) {
+ gregorio_print_unichar(f, *first_char);
+ first_char++;
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/unicode.h b/Build/source/texk/gregorio/gregorio-src/src/unicode.h
new file mode 100644
index 00000000000..e2ae1505967
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/unicode.h
@@ -0,0 +1,69 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the UTF-8 support functions.
+ *
+ * Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UNICODE_H_FIRST_PART
+#define UNICODE_H_FIRST_PART
+#define UNICODE_H
+
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+
+typedef uint32_t grewchar;
+
+void gregorio_print_unichar(FILE *f, grewchar to_print);
+void gregorio_print_unistring(FILE *f, const grewchar *first_char);
+grewchar *gregorio_build_grewchar_string_from_buf(const char *buf);
+
+static __inline size_t gregorio_wcstrlen(const grewchar *wstr)
+{
+ size_t length = 0;
+
+ while (*(wstr++)) {
+ ++length;
+ }
+
+ return length;
+}
+
+/* this macro is for portability under windows, where L'x' is only two-bytes
+ * long, and thus needs to be cast to a 4-bytes integer. */
+#define GL(wc) ((const grewchar) L'wc')
+
+#endif
+
+/* we enter the second part only if struct.h has already been included, because
+ * we need gregorio_character */
+
+#ifdef STRUCT_H
+
+#ifndef UNICODE_H_SECOND_PART
+#define UNICODE_H_SECOND_PART
+
+gregorio_character *gregorio_build_char_list_from_buf(const char *buf);
+
+#endif
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h
new file mode 100644
index 00000000000..e472a048eb6
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header file contains UTF-8 encoded strings used by Gregorio
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTF8STRINGS_H
+#define UTF8STRINGS_H
+
+#define ACCENTED_AE "'\303\246"
+#define ACCENTED_OE "'\305\223"
+
+/* This is a superset of Latin vowels which includes some French, Vietnamese,
+ * Slavic, Hungarian, and Norwegian vowels which don't interfere with Latin
+ * itself. For something more accurate, the user should consider the use of
+ * custom centering rules. */
+#define DEFAULT_VOWELS "a\303\240\303\241\303\242\304\203\304\205\303\245A\303\200\303\201\303\202\304\202\304\204\303\205e\303\250\303\251\303\252\303\253\304\233\304\231E\303\210\303\211\303\212\303\213\304\232\304\230i\303\254\303\255\303\256I\303\214\303\215\303\216" \
+ "o\303\262\303\263\303\264\306\241\305\221\303\270O\303\222\303\223\303\224\306\240\305\220\303\230u\303\271\303\272\303\273\306\260\305\257\305\261U\303\231\303\232\303\233\306\257\305\256\305\260y\341\273\263\303\275Y\341\273\262\303\235\303\246\307\275\303\206\307\274\305\223\305\222"
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in
new file mode 100644
index 00000000000..acfed30159f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/utf8strings.h.in
@@ -0,0 +1,36 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header file contains UTF-8 encoded strings used by Gregorio
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * Gregorio is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Gregorio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTF8STRINGS_H
+#define UTF8STRINGS_H
+
+#define ACCENTED_AE "'æ"
+#define ACCENTED_OE "'œ"
+
+/* This is a superset of Latin vowels which includes some French, Vietnamese,
+ * Slavic, Hungarian, and Norwegian vowels which don't interfere with Latin
+ * itself. For something more accurate, the user should consider the use of
+ * custom centering rules. */
+#define DEFAULT_VOWELS "aàáâăąåAÀÁÂĂĄÅeèéêëěęEÈÉÊËĚĘiìíîIÌÍÎ" \
+ "oòóôơőøOÒÓÔƠŐØuùúûưůűUÙÚÛƯŮŰyỳýYỲÝæǽÆǼœŒ"
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
new file mode 100644
index 00000000000..4d1906b3a02
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
@@ -0,0 +1,2166 @@
+#line 1 "vowel/vowel-rules-l.c"
+
+#line 3 "vowel/vowel-rules-l.c"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#define yyin gregorio_vowel_rulefile_in
+#define yyleng gregorio_vowel_rulefile_leng
+#define yylex gregorio_vowel_rulefile_lex
+#define yylineno gregorio_vowel_rulefile_lineno
+#define yyout gregorio_vowel_rulefile_out
+#define yyrestart gregorio_vowel_rulefile_restart
+#define yytext gregorio_vowel_rulefile_text
+#define yywrap gregorio_vowel_rulefile_wrap
+#define yyalloc gregorio_vowel_rulefile_alloc
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#define yyfree gregorio_vowel_rulefile_free
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#else
+#define yylex gregorio_vowel_rulefile_lex
+#endif
+
+#ifdef yyrestart
+#define gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#else
+#define yyrestart gregorio_vowel_rulefile_restart
+#endif
+
+#ifdef yylex_init
+#define gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gregorio_vowel_rulefile_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gregorio_vowel_rulefile_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gregorio_vowel_rulefile_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gregorio_vowel_rulefile_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gregorio_vowel_rulefile_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gregorio_vowel_rulefile_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gregorio_vowel_rulefile_set_extra
+#endif
+
+#ifdef yyget_in
+#define gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gregorio_vowel_rulefile_get_in
+#endif
+
+#ifdef yyset_in
+#define gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gregorio_vowel_rulefile_set_in
+#endif
+
+#ifdef yyget_out
+#define gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gregorio_vowel_rulefile_get_out
+#endif
+
+#ifdef yyset_out
+#define gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gregorio_vowel_rulefile_set_out
+#endif
+
+#ifdef yyget_leng
+#define gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gregorio_vowel_rulefile_get_leng
+#endif
+
+#ifdef yyget_text
+#define gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gregorio_vowel_rulefile_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gregorio_vowel_rulefile_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gregorio_vowel_rulefile_set_lineno
+#endif
+
+#ifdef yywrap
+#define gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#else
+#define yywrap gregorio_vowel_rulefile_wrap
+#endif
+
+#ifdef yyalloc
+#define gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gregorio_vowel_rulefile_alloc
+#endif
+
+#ifdef yyrealloc
+#define gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#endif
+
+#ifdef yyfree
+#define gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#else
+#define yyfree gregorio_vowel_rulefile_free
+#endif
+
+#ifdef yytext
+#define gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#else
+#define yytext gregorio_vowel_rulefile_text
+#endif
+
+#ifdef yyleng
+#define gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#else
+#define yyleng gregorio_vowel_rulefile_leng
+#endif
+
+#ifdef yyin
+#define gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#else
+#define yyin gregorio_vowel_rulefile_in
+#endif
+
+#ifdef yyout
+#define gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#else
+#define yyout gregorio_vowel_rulefile_out
+#endif
+
+#ifdef yy_flex_debug
+#define gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#endif
+
+#ifdef yylineno
+#define gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#else
+#define yylineno gregorio_vowel_rulefile_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
+ */
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = NULL;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+#define yy_new_buffer yy_create_buffer
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define gregorio_vowel_rulefile_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
+
+FILE *yyin = NULL, *yyout = NULL;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+int yylineno = 1;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+#define YY_NUM_RULES 17
+#define YY_END_OF_BUFFER 18
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static const flex_int32_t yy_accept[71] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 18, 16,
+ 15, 15, 13, 7, 16, 16, 16, 16, 16, 16,
+ 12, 9, 16, 10, 10, 10, 10, 7, 11, 13,
+ 0, 0, 0, 0, 0, 0, 0, 12, 8, 10,
+ 10, 0, 0, 0, 0, 0, 0, 14, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 0, 2,
+ 0, 3, 0, 4, 0, 0, 1, 0, 5, 0
+ } ;
+
+static const YY_CHAR yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 5, 1, 1, 1, 1, 1,
+ 1, 1, 1, 6, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 7, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 8, 1, 9, 1, 1, 1, 10, 1, 11, 12,
+
+ 13, 14, 15, 1, 16, 1, 1, 17, 1, 18,
+ 19, 20, 1, 21, 22, 23, 24, 25, 26, 27,
+ 28, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 29, 1, 1, 1,
+ 30, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 31, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static const YY_CHAR yy_meta[32] =
+ { 0,
+ 1, 2, 3, 3, 2, 2, 2, 1, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1
+ } ;
+
+static const flex_int32_t yy_base[78] =
+ { 0,
+ 0, 30, 60, 66, 72, 0, 94, 102, 92, 139,
+ 139, 139, 0, 139, 74, 80, 68, 0, 69, 58,
+ 0, 139, 67, 0, 0, 0, 5, 0, 139, 0,
+ 69, 66, 70, 71, 67, 52, 30, 0, 139, 0,
+ 12, 49, 43, 43, 37, 40, 40, 139, 29, 25,
+ 32, 28, 29, 27, 139, 33, 15, 29, 12, 139,
+ 23, 139, 26, 139, 17, 8, 139, 0, 139, 139,
+ 111, 115, 119, 123, 127, 131, 134
+ } ;
+
+static const flex_int32_t yy_def[78] =
+ { 0,
+ 71, 71, 72, 72, 71, 5, 73, 73, 70, 70,
+ 70, 70, 74, 70, 70, 70, 70, 70, 70, 70,
+ 75, 70, 70, 76, 76, 76, 77, 76, 70, 74,
+ 70, 70, 70, 70, 70, 70, 70, 75, 70, 76,
+ 77, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 0,
+ 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static const flex_int32_t yy_nxt[171] =
+ { 0,
+ 70, 11, 12, 11, 13, 70, 14, 40, 40, 15,
+ 70, 70, 34, 30, 40, 40, 16, 70, 70, 17,
+ 30, 18, 70, 35, 19, 70, 70, 69, 68, 67,
+ 20, 11, 12, 11, 13, 66, 14, 65, 64, 15,
+ 63, 62, 61, 60, 59, 58, 16, 57, 56, 17,
+ 55, 18, 54, 53, 19, 52, 51, 50, 49, 48,
+ 20, 11, 12, 11, 13, 10, 14, 11, 12, 11,
+ 13, 10, 14, 11, 12, 11, 13, 47, 14, 22,
+ 46, 45, 44, 43, 42, 39, 37, 36, 33, 32,
+ 31, 70, 70, 70, 23, 25, 26, 25, 27, 70,
+
+ 28, 70, 29, 25, 26, 25, 27, 70, 28, 70,
+ 29, 10, 10, 10, 10, 21, 21, 21, 21, 24,
+ 24, 24, 24, 30, 30, 70, 30, 38, 70, 70,
+ 38, 40, 40, 40, 41, 41, 41, 41, 9, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static const flex_int32_t yy_chk[171] =
+ { 0,
+ 0, 1, 1, 1, 1, 0, 1, 27, 27, 1,
+ 0, 0, 18, 27, 41, 41, 1, 0, 0, 1,
+ 41, 1, 0, 18, 1, 0, 0, 68, 66, 65,
+ 1, 2, 2, 2, 2, 63, 2, 61, 59, 2,
+ 58, 57, 56, 54, 53, 52, 2, 51, 50, 2,
+ 49, 2, 47, 46, 2, 45, 44, 43, 42, 37,
+ 2, 3, 3, 3, 3, 3, 3, 4, 4, 4,
+ 4, 4, 4, 5, 5, 5, 5, 36, 5, 5,
+ 35, 34, 33, 32, 31, 23, 20, 19, 17, 16,
+ 15, 9, 0, 0, 5, 7, 7, 7, 7, 0,
+
+ 7, 0, 7, 8, 8, 8, 8, 0, 8, 0,
+ 8, 71, 71, 71, 71, 72, 72, 72, 72, 73,
+ 73, 73, 73, 74, 74, 0, 74, 75, 0, 0,
+ 75, 76, 76, 76, 77, 77, 77, 77, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "vowel/vowel-rules.l"
+#line 2 "vowel/vowel-rules.l"
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-y.h"
+
+#define YY_NO_INPUT
+
+static __inline void save_lval(void)
+{
+ gregorio_vowel_rulefile_lval =
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
+ strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
+ gregorio_vowel_rulefile_leng);
+ gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
+}
+
+static __inline void invalid(void)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_lex", VERBOSITY_WARNING, 0,
+ _("invalid character in vowel file: %c"),
+ *gregorio_vowel_rulefile_text);
+}
+#line 813 "vowel/vowel-rules-l.c"
+
+#line 815 "vowel/vowel-rules-l.c"
+
+#define INITIAL 0
+#define chars 1
+#define lang 2
+#define langname 3
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals ( void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput ( void );
+#else
+static int input ( void );
+#endif
+
+#endif
+
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK /*LINTED*/break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
+#line 75 "vowel/vowel-rules.l"
+
+
+#line 1040 "vowel/vowel-rules-l.c"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of yytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ do
+ {
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 139 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 77 "vowel/vowel-rules.l"
+{ BEGIN(lang); return LANGUAGE; }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 78 "vowel/vowel-rules.l"
+{ BEGIN(chars); return VOWEL; }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 79 "vowel/vowel-rules.l"
+{ BEGIN(chars); return PREFIX; }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 80 "vowel/vowel-rules.l"
+{ BEGIN(chars); return SUFFIX; }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 81 "vowel/vowel-rules.l"
+{ BEGIN(chars); return SECONDARY; }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 82 "vowel/vowel-rules.l"
+{ BEGIN(lang); return ALIAS; }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 83 "vowel/vowel-rules.l"
+{ BEGIN(INITIAL); return SEMICOLON; }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 84 "vowel/vowel-rules.l"
+{ return TO; }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 85 "vowel/vowel-rules.l"
+{ BEGIN(langname); }
+ YY_BREAK
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+#line 86 "vowel/vowel-rules.l"
+{ save_lval(); return NAME; }
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 87 "vowel/vowel-rules.l"
+{ BEGIN(lang); }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 88 "vowel/vowel-rules.l"
+{ save_lval(); return CHARACTERS; }
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 89 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 90 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 15:
+/* rule 15 can match eol */
+YY_RULE_SETUP
+#line 91 "vowel/vowel-rules.l"
+{ }
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 92 "vowel/vowel-rules.l"
+{ invalid(); return INVALID; }
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 94 "vowel/vowel-rules.l"
+ECHO;
+ YY_BREAK
+#line 1184 "vowel/vowel-rules-l.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(chars):
+case YY_STATE_EOF(lang):
+case YY_STATE_EOF(langname):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( yywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = NULL;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
+
+ YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 71 )
+ yy_c = yy_meta[yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_is_jam = (yy_current_state == 70);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+#ifndef YY_NO_UNPUT
+
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap( ) )
+ return 0;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yyfree( (void *) b->yy_ch_buf );
+
+ yyfree( (void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return NULL;
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
+{
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yynoreturn yy_fatal_error (const char* msg )
+{
+ fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *yyget_text (void)
+{
+ return yytext;
+}
+
+/** Set the current line number.
+ * @param _line_number line number
+ *
+ */
+void yyset_lineno (int _line_number )
+{
+
+ yylineno = _line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param _in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * _in_str )
+{
+ yyin = _in_str ;
+}
+
+void yyset_out (FILE * _out_str )
+{
+ yyout = _out_str ;
+}
+
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+
+void yyset_debug (int _bdebug )
+{
+ yy_flex_debug = _bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = NULL;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = NULL;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_start_stack_ptr) = 0;
+ (yy_start_stack_depth) = 0;
+ (yy_start_stack) = NULL;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = NULL;
+ yyout = NULL;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer( YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Destroy the start condition stack. */
+ yyfree( (yy_start_stack) );
+ (yy_start_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
+{
+
+ int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (const char * s )
+{
+ int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *yyalloc (yy_size_t size )
+{
+ return malloc(size);
+}
+
+void *yyrealloc (void * ptr, yy_size_t size )
+{
+
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return realloc(ptr, size);
+}
+
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 94 "vowel/vowel-rules.l"
+
+
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h
new file mode 100644
index 00000000000..cecacf9603c
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.h
@@ -0,0 +1,714 @@
+#ifndef gregorio_vowel_rulefile_HEADER_H
+#define gregorio_vowel_rulefile_HEADER_H 1
+#define gregorio_vowel_rulefile_IN_HEADER 1
+
+#line 5 "vowel/vowel-rules-l.h"
+
+#line 7 "vowel/vowel-rules-l.h"
+
+#define YY_INT_ALIGNED long int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+#ifdef yy_create_buffer
+#define gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer gregorio_vowel_rulefile__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer gregorio_vowel_rulefile__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer gregorio_vowel_rulefile__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string gregorio_vowel_rulefile__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes gregorio_vowel_rulefile__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer gregorio_vowel_rulefile__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer gregorio_vowel_rulefile__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state gregorio_vowel_rulefile__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer gregorio_vowel_rulefile__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state gregorio_vowel_rulefile_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state gregorio_vowel_rulefile_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack gregorio_vowel_rulefile_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#else
+#define yylex gregorio_vowel_rulefile_lex
+#endif
+
+#ifdef yyrestart
+#define gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#else
+#define yyrestart gregorio_vowel_rulefile_restart
+#endif
+
+#ifdef yylex_init
+#define gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init gregorio_vowel_rulefile_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra gregorio_vowel_rulefile_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy gregorio_vowel_rulefile_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug gregorio_vowel_rulefile_get_debug
+#endif
+
+#ifdef yyset_debug
+#define gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug gregorio_vowel_rulefile_set_debug
+#endif
+
+#ifdef yyget_extra
+#define gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra gregorio_vowel_rulefile_get_extra
+#endif
+
+#ifdef yyset_extra
+#define gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra gregorio_vowel_rulefile_set_extra
+#endif
+
+#ifdef yyget_in
+#define gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#else
+#define yyget_in gregorio_vowel_rulefile_get_in
+#endif
+
+#ifdef yyset_in
+#define gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#else
+#define yyset_in gregorio_vowel_rulefile_set_in
+#endif
+
+#ifdef yyget_out
+#define gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#else
+#define yyget_out gregorio_vowel_rulefile_get_out
+#endif
+
+#ifdef yyset_out
+#define gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#else
+#define yyset_out gregorio_vowel_rulefile_set_out
+#endif
+
+#ifdef yyget_leng
+#define gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng gregorio_vowel_rulefile_get_leng
+#endif
+
+#ifdef yyget_text
+#define gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#else
+#define yyget_text gregorio_vowel_rulefile_get_text
+#endif
+
+#ifdef yyget_lineno
+#define gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno gregorio_vowel_rulefile_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno gregorio_vowel_rulefile_set_lineno
+#endif
+
+#ifdef yywrap
+#define gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#else
+#define yywrap gregorio_vowel_rulefile_wrap
+#endif
+
+#ifdef yyalloc
+#define gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#else
+#define yyalloc gregorio_vowel_rulefile_alloc
+#endif
+
+#ifdef yyrealloc
+#define gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc gregorio_vowel_rulefile_realloc
+#endif
+
+#ifdef yyfree
+#define gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#else
+#define yyfree gregorio_vowel_rulefile_free
+#endif
+
+#ifdef yytext
+#define gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#else
+#define yytext gregorio_vowel_rulefile_text
+#endif
+
+#ifdef yyleng
+#define gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#else
+#define yyleng gregorio_vowel_rulefile_leng
+#endif
+
+#ifdef yyin
+#define gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#else
+#define yyin gregorio_vowel_rulefile_in
+#endif
+
+#ifdef yyout
+#define gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#else
+#define yyout gregorio_vowel_rulefile_out
+#endif
+
+#ifdef yy_flex_debug
+#define gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug gregorio_vowel_rulefile__flex_debug
+#endif
+
+#ifdef yylineno
+#define gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#else
+#define yylineno gregorio_vowel_rulefile_lineno
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* begin standard C++ headers. */
+
+/* TODO: this is always defined, so inline it */
+#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
+#else
+#define yynoreturn
+#endif
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern int yyleng;
+
+extern FILE *yyin, *yyout;
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ int yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
+
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+
+/* Begin user sect3 */
+
+#define gregorio_vowel_rulefile_wrap() (/*CONSTCOND*/1)
+#define YY_SKIP_YYWRAP
+
+extern int yylineno;
+
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+#define chars 1
+#define lang 2
+#define langname 3
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy ( void );
+
+int yyget_debug ( void );
+
+void yyset_debug ( int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra ( void );
+
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in ( void );
+
+void yyset_in ( FILE * _in_str );
+
+FILE *yyget_out ( void );
+
+void yyset_out ( FILE * _out_str );
+
+ int yyget_leng ( void );
+
+char *yyget_text ( void );
+
+int yyget_lineno ( void );
+
+void yyset_lineno ( int _line_number );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap ( void );
+#else
+extern int yywrap ( void );
+#endif
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy ( char *, const char *, int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen ( const char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#ifndef gregorio_vowel_rulefile__create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef gregorio_vowel_rulefile__scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef gregorio_vowel_rulefile__init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef gregorio_vowel_rulefile__load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile__switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef gregorio_vowel_rulefile_push_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile_pop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef gregorio_vowel_rulefile_ensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef gregorio_vowel_rulefile_lex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef gregorio_vowel_rulefile_restart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef gregorio_vowel_rulefile_lex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef gregorio_vowel_rulefile_lex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef gregorio_vowel_rulefile_lex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef gregorio_vowel_rulefile_get_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef gregorio_vowel_rulefile_set_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef gregorio_vowel_rulefile_get_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef gregorio_vowel_rulefile_set_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef gregorio_vowel_rulefile_get_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef gregorio_vowel_rulefile_set_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef gregorio_vowel_rulefile_get_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef gregorio_vowel_rulefile_set_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef gregorio_vowel_rulefile_get_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef gregorio_vowel_rulefile_get_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef gregorio_vowel_rulefile_get_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef gregorio_vowel_rulefile_set_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef gregorio_vowel_rulefile_get_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef gregorio_vowel_rulefile_set_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef gregorio_vowel_rulefile_wrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef gregorio_vowel_rulefile_get_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef gregorio_vowel_rulefile_set_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef gregorio_vowel_rulefile_get_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef gregorio_vowel_rulefile_set_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef gregorio_vowel_rulefile_alloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef gregorio_vowel_rulefile_realloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef gregorio_vowel_rulefile_free_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef gregorio_vowel_rulefile_text_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef gregorio_vowel_rulefile_leng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef gregorio_vowel_rulefile_in_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef gregorio_vowel_rulefile_out_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef gregorio_vowel_rulefile__flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef gregorio_vowel_rulefile_lineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef gregorio_vowel_rulefile_tables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef gregorio_vowel_rulefile_tables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef gregorio_vowel_rulefile_TABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
+#line 94 "vowel/vowel-rules.l"
+
+
+#line 712 "vowel/vowel-rules-l.h"
+#undef gregorio_vowel_rulefile_IN_HEADER
+#endif /* gregorio_vowel_rulefile_HEADER_H */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c
new file mode 100644
index 00000000000..d57e881735e
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.c
@@ -0,0 +1,1610 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.3.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse gregorio_vowel_rulefile_parse
+#define yylex gregorio_vowel_rulefile_lex
+#define yyerror gregorio_vowel_rulefile_error
+#define yydebug gregorio_vowel_rulefile_debug
+#define yynerrs gregorio_vowel_rulefile_nerrs
+
+#define yylval gregorio_vowel_rulefile_lval
+#define yychar gregorio_vowel_rulefile_char
+
+/* First part of user prologue. */
+#line 1 "vowel/vowel-rules.y" /* yacc.c:337 */
+
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule parser.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-l.h"
+
+/* NOTE: This parser might allocate a new value for language; this value MUST
+ * BE FREED after the parser returns (if the value of the language pointer
+ * changes, then free the pointer). This parser DOES free the language
+ * pointer before changing it, if status points to RFPS_ALIASED. */
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/*int gregorio_vowel_rulefile_debug=1;*/
+
+static void gregorio_vowel_rulefile_error(const char *const filename,
+ char **const language __attribute__((__unused__)),
+ rulefile_parse_status *const status __attribute__((__unused__)),
+ const char *const error_str)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_parse", VERBOSITY_ERROR, 0,
+ _("%s: %s"), filename, error_str);
+}
+
+/* this returns false until the language *after* the desired language */
+static __inline bool match_language(char **language,
+ rulefile_parse_status *status, char *const name)
+{
+ if (*status == RFPS_FOUND) {
+ free(name);
+ return true;
+ }
+
+ if (strcmp(*language, name) == 0) {
+ *status = RFPS_FOUND;
+ }
+
+ free(name);
+ return false;
+}
+
+static __inline void alias(char **const language,
+ rulefile_parse_status *const status, char *const name,
+ char *const target)
+{
+ if (strcmp(*language, name) == 0) {
+ gregorio_messagef("alias", VERBOSITY_INFO, 0, _("Aliasing %s to %s"),
+ name, target);
+ if (*status == RFPS_ALIASED) {
+ free(*language);
+ }
+ *language = target;
+ *status = RFPS_ALIASED;
+ } else {
+ free(target);
+ }
+ free(name);
+}
+
+static __inline void add(const rulefile_parse_status *const status,
+ void (*const fn)(const char *), char *const value)
+{
+ if (*status == RFPS_FOUND) {
+ fn(value);
+ }
+ free(value);
+}
+
+#define _MATCH(NAME) if (match_language(language, status, NAME)) YYACCEPT
+#define _ALIAS(NAME, TARGET) alias(language, status, NAME, TARGET)
+#define _ADD(TABLE, CHARS) add(status, gregorio_##TABLE##_table_add, CHARS)
+
+
+#line 181 "vowel/vowel-rules-y.c" /* yacc.c:337 */
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "vowel-rules-y.h". */
+#ifndef YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+# define YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gregorio_vowel_rulefile_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ LANGUAGE = 258,
+ VOWEL = 259,
+ PREFIX = 260,
+ SUFFIX = 261,
+ SECONDARY = 262,
+ ALIAS = 263,
+ SEMICOLON = 264,
+ TO = 265,
+ NAME = 266,
+ CHARACTERS = 267,
+ INVALID = 268
+ };
+#endif
+/* Tokens. */
+#define LANGUAGE 258
+#define VOWEL 259
+#define PREFIX 260
+#define SUFFIX 261
+#define SECONDARY 262
+#define ALIAS 263
+#define SEMICOLON 264
+#define TO 265
+#define NAME 266
+#define CHARACTERS 267
+#define INVALID 268
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE gregorio_vowel_rulefile_lval;
+
+int gregorio_vowel_rulefile_parse (const char *const filename, char **language, rulefile_parse_status *const status);
+
+#endif /* !YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 2
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 21
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 14
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 7
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 17
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 28
+
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 268
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 114, 114, 116, 120, 121, 122, 123, 124, 125,
+ 128, 130, 133, 135, 138, 140, 143, 145
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "LANGUAGE", "VOWEL", "PREFIX", "SUFFIX",
+ "SECONDARY", "ALIAS", "SEMICOLON", "TO", "NAME", "CHARACTERS", "INVALID",
+ "$accept", "rules", "rule", "vowels", "prefixes", "suffixes",
+ "secondaries", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268
+};
+# endif
+
+#define YYPACT_NINF -11
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-11)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int8 yypact[] =
+{
+ -11, 0, -11, -10, -11, -11, -11, -11, -9, -11,
+ 8, 1, 2, 3, 7, -1, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, 9, 12, -11
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 0, 1, 0, 10, 12, 14, 16, 0, 3,
+ 0, 0, 0, 0, 0, 0, 4, 6, 11, 7,
+ 13, 8, 15, 9, 17, 0, 0, 5
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -11, -11, -11, -11, -11, -11, -11
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 1, 9, 11, 12, 13, 14
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_uint8 yytable[] =
+{
+ 2, 10, 15, 3, 4, 5, 6, 7, 8, 25,
+ 17, 19, 21, 18, 20, 22, 23, 16, 0, 24,
+ 26, 27
+};
+
+static const yytype_int8 yycheck[] =
+{
+ 0, 11, 11, 3, 4, 5, 6, 7, 8, 10,
+ 9, 9, 9, 12, 12, 12, 9, 9, -1, 12,
+ 11, 9
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 15, 0, 3, 4, 5, 6, 7, 8, 16,
+ 11, 17, 18, 19, 20, 11, 9, 9, 12, 9,
+ 12, 9, 12, 9, 12, 10, 11, 9
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 14, 15, 15, 16, 16, 16, 16, 16, 16,
+ 17, 17, 18, 18, 19, 19, 20, 20
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 2, 3, 5, 3, 3, 3, 3,
+ 0, 2, 0, 2, 0, 2, 0, 2
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (filename, language, status, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, filename, language, status); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ YYUSE (filename);
+ YYUSE (language);
+ YYUSE (status);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyo, yytype, yyvaluep, filename, language, status);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ unsigned long yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &yyvsp[(yyi + 1) - (yynrhs)]
+ , filename, language, status);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, filename, language, status); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ YYUSE (yyvaluep);
+ YYUSE (filename);
+ YYUSE (language);
+ YYUSE (status);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (const char *const filename, char **language, rulefile_parse_status *const status)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ *yyssp = (yytype_int16) yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 4:
+#line 120 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _MATCH(yyvsp[-1]); }
+#line 1347 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 5:
+#line 121 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ALIAS(yyvsp[-3], yyvsp[-1]); }
+#line 1353 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 11:
+#line 130 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(vowel, yyvsp[0]); }
+#line 1359 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 13:
+#line 135 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(prefix, yyvsp[0]); }
+#line 1365 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 15:
+#line 140 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(suffix, yyvsp[0]); }
+#line 1371 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+ case 17:
+#line 145 "vowel/vowel-rules.y" /* yacc.c:1652 */
+ { _ADD(secondary, yyvsp[0]); }
+#line 1377 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ break;
+
+
+#line 1381 "vowel/vowel-rules-y.c" /* yacc.c:1652 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (filename, language, status, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (filename, language, status, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, filename, language, status);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, filename, language, status);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (filename, language, status, YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, filename, language, status);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, filename, language, status);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h
new file mode 100644
index 00000000000..6d808829b3a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-y.h
@@ -0,0 +1,90 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#ifndef YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+# define YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int gregorio_vowel_rulefile_debug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ LANGUAGE = 258,
+ VOWEL = 259,
+ PREFIX = 260,
+ SUFFIX = 261,
+ SECONDARY = 262,
+ ALIAS = 263,
+ SEMICOLON = 264,
+ TO = 265,
+ NAME = 266,
+ CHARACTERS = 267,
+ INVALID = 268
+ };
+#endif
+/* Tokens. */
+#define LANGUAGE 258
+#define VOWEL 259
+#define PREFIX 260
+#define SUFFIX 261
+#define SECONDARY 262
+#define ALIAS 263
+#define SEMICOLON 264
+#define TO 265
+#define NAME 266
+#define CHARACTERS 267
+#define INVALID 268
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE gregorio_vowel_rulefile_lval;
+
+int gregorio_vowel_rulefile_parse (const char *const filename, char **language, rulefile_parse_status *const status);
+
+#endif /* !YY_GREGORIO_VOWEL_RULEFILE_VOWEL_VOWEL_RULES_Y_H_INCLUDED */
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
new file mode 100644
index 00000000000..f53bb66d681
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
@@ -0,0 +1,28 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header shares definitions between the vowel parser and lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define YYSTYPE char *
+#define YYSTYPE_IS_DECLARED 1
+
+int gregorio_vowel_rulefile_lex(void);
+#define YY_DECL int gregorio_vowel_rulefile_lex(void)
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
new file mode 100644
index 00000000000..89215af0af8
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
@@ -0,0 +1,95 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule lexer.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "struct.h"
+#include "messages.h"
+#include "support.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-y.h"
+
+#define YY_NO_INPUT
+
+static __inline void save_lval(void)
+{
+ gregorio_vowel_rulefile_lval =
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
+ strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
+ gregorio_vowel_rulefile_leng);
+ gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
+}
+
+static __inline void invalid(void)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_lex", VERBOSITY_WARNING, 0,
+ _("invalid character in vowel file: %c"),
+ *gregorio_vowel_rulefile_text);
+}
+%}
+
+%x chars
+%x lang
+%x langname
+
+%option stack
+%option pointer
+%option nounput
+%option noyy_push_state
+%option noyy_pop_state
+%option noyy_top_state
+%option align
+%option noread
+%option nomain
+%option noalways-interactive
+%option nonever-interactive
+%option prefix="gregorio_vowel_rulefile_"
+%option noyywrap
+%option 8bit
+
+%%
+
+<INITIAL>language { BEGIN(lang); return LANGUAGE; }
+<INITIAL>vowel { BEGIN(chars); return VOWEL; }
+<INITIAL>prefix { BEGIN(chars); return PREFIX; }
+<INITIAL>suffix { BEGIN(chars); return SUFFIX; }
+<INITIAL>secondary { BEGIN(chars); return SECONDARY; }
+<INITIAL>alias { BEGIN(lang); return ALIAS; }
+<*>; { BEGIN(INITIAL); return SEMICOLON; }
+<lang>to { return TO; }
+<lang>"[" { BEGIN(langname); }
+<langname>[^\]]+ { save_lval(); return NAME; }
+<langname>"]" { BEGIN(lang); }
+<chars>[^;,# \t\n\r\v\f]+ { save_lval(); return CHARACTERS; }
+<*>#[^\n\r]* { }
+<INITIAL>\xEF\xBB\xBF { }
+<*>[\ \t\n\r\v\f] { }
+<*>. { invalid(); return INVALID; }
+
+%%
+
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y
new file mode 100644
index 00000000000..bcdfb77c74a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.y
@@ -0,0 +1,146 @@
+%{
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements the vowel rule parser.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "bool.h"
+#include "struct.h"
+#include "unicode.h"
+#include "messages.h"
+
+#include "vowel.h"
+
+#include "vowel-rules.h"
+#include "vowel-rules-l.h"
+
+/* NOTE: This parser might allocate a new value for language; this value MUST
+ * BE FREED after the parser returns (if the value of the language pointer
+ * changes, then free the pointer). This parser DOES free the language
+ * pointer before changing it, if status points to RFPS_ALIASED. */
+
+/* uncomment it if you want to have an interactive shell to understand the
+ * details on how bison works for a certain input */
+/*int gregorio_vowel_rulefile_debug=1;*/
+
+static void gregorio_vowel_rulefile_error(const char *const filename,
+ char **const language __attribute__((__unused__)),
+ rulefile_parse_status *const status __attribute__((__unused__)),
+ const char *const error_str)
+{
+ gregorio_messagef("gregorio_vowel_rulefile_parse", VERBOSITY_ERROR, 0,
+ _("%s: %s"), filename, error_str);
+}
+
+/* this returns false until the language *after* the desired language */
+static __inline bool match_language(char **language,
+ rulefile_parse_status *status, char *const name)
+{
+ if (*status == RFPS_FOUND) {
+ free(name);
+ return true;
+ }
+
+ if (strcmp(*language, name) == 0) {
+ *status = RFPS_FOUND;
+ }
+
+ free(name);
+ return false;
+}
+
+static __inline void alias(char **const language,
+ rulefile_parse_status *const status, char *const name,
+ char *const target)
+{
+ if (strcmp(*language, name) == 0) {
+ gregorio_messagef("alias", VERBOSITY_INFO, 0, _("Aliasing %s to %s"),
+ name, target);
+ if (*status == RFPS_ALIASED) {
+ free(*language);
+ }
+ *language = target;
+ *status = RFPS_ALIASED;
+ } else {
+ free(target);
+ }
+ free(name);
+}
+
+static __inline void add(const rulefile_parse_status *const status,
+ void (*const fn)(const char *), char *const value)
+{
+ if (*status == RFPS_FOUND) {
+ fn(value);
+ }
+ free(value);
+}
+
+#define _MATCH(NAME) if (match_language(language, status, NAME)) YYACCEPT
+#define _ALIAS(NAME, TARGET) alias(language, status, NAME, TARGET)
+#define _ADD(TABLE, CHARS) add(status, gregorio_##TABLE##_table_add, CHARS)
+
+%}
+
+%name-prefix "gregorio_vowel_rulefile_"
+%parse-param { const char *const filename }
+%parse-param { char **language }
+%parse-param { rulefile_parse_status *const status }
+
+%token LANGUAGE VOWEL PREFIX SUFFIX SECONDARY ALIAS SEMICOLON TO
+%token NAME CHARACTERS INVALID
+
+%%
+
+rules
+ :
+ | rules rule
+ ;
+
+rule
+ : LANGUAGE NAME SEMICOLON { _MATCH($2); }
+ | ALIAS NAME TO NAME SEMICOLON { _ALIAS($2, $4); }
+ | VOWEL vowels SEMICOLON
+ | PREFIX prefixes SEMICOLON
+ | SUFFIX suffixes SEMICOLON
+ | SECONDARY secondaries SEMICOLON
+ ;
+
+vowels
+ :
+ | vowels CHARACTERS { _ADD(vowel, $2); }
+ ;
+
+prefixes
+ :
+ | prefixes CHARACTERS { _ADD(prefix, $2); }
+ ;
+
+suffixes
+ :
+ | suffixes CHARACTERS { _ADD(suffix, $2); }
+ ;
+
+secondaries
+ :
+ | secondaries CHARACTERS { _ADD(secondary, $2); }
+ ;
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c
new file mode 100644
index 00000000000..a765ee77b1f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.c
@@ -0,0 +1,447 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This file implements vowel rule handling (aside from parsing).
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <errno.h>
+#include "bool.h"
+#include "vowel.h"
+#include "unicode.h"
+#include "messages.h"
+#include "support.h"
+
+typedef struct character_set {
+ grewchar *table;
+ struct character_set **next;
+ grewchar mask;
+ unsigned int bins;
+ unsigned int size;
+ bool is_final;
+} character_set;
+
+static character_set *character_set_new(const bool alloc_next)
+{
+ character_set *set =
+ (character_set *)gregorio_calloc(1, sizeof(character_set));
+ set->mask = 0x0f;
+ set->bins = 16;
+ set->size = 0;
+ set->table = (grewchar *)gregorio_calloc(set->bins, sizeof(grewchar));
+ if (alloc_next) {
+ set->next = (character_set **)gregorio_calloc(set->bins,
+ sizeof(character_set *));
+ }
+ return set;
+}
+
+static void character_set_free(character_set *const set);
+
+static __inline void character_set_next_elements_free(character_set *const set)
+{
+ unsigned int i;
+ assert(set && set->next);
+ for (i = 0; i < set->bins; ++i) {
+ if (set->next[i]) {
+ character_set_free(set->next[i]);
+ }
+ }
+}
+
+static void character_set_free(character_set *const set)
+{
+ if (set) {
+ if (set->next) {
+ character_set_next_elements_free(set);
+ free(set->next);
+ }
+ free(set->table);
+ free(set);
+ }
+}
+
+static bool character_set_contains(character_set *const set,
+ const grewchar character, character_set **const next)
+{
+ unsigned int index;
+ assert(set);
+
+ if (next) {
+ *next = NULL;
+ }
+ for (index = ((unsigned long)character) & set->mask; set->table[index];
+ index = (index + 1) & set->mask) {
+ if (set->table[index] == character) {
+ if (next && set->next) {
+ *next = set->next[index];
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+static __inline void character_set_put(character_set *const set,
+ const grewchar character, character_set *next)
+{
+ unsigned int index;
+
+ assert(set);
+
+ index = ((unsigned long)character) & set->mask;
+ while (set->table[index]) {
+ index = (index + 1) & set->mask;
+ }
+
+ set->table[index] = character;
+ if (set->next) {
+ set->next[index] = next;
+ }
+}
+
+static __inline void character_set_grow(character_set *const set) {
+ static grewchar *old_table;
+ static character_set **old_next;
+ unsigned int old_bins, i;
+
+ assert(set);
+
+ if (set->bins >= 0x4000L) {
+ /* this should not realistically be reached */
+ /* LCOV_EXCL_START */
+ gregorio_message(_("character set too large"), "character_set_grow",
+ VERBOSITY_FATAL, 0);
+ return;
+ /* LCOV_EXCL_STOP */
+ }
+
+ old_table = set->table;
+ old_next = set->next;
+ old_bins = set->bins;
+
+ set->bins <<= 1;
+ set->mask = (set->mask << 1) | 0x01;
+ set->table = gregorio_calloc(set->bins, sizeof(grewchar));
+ if (old_next) {
+ set->next = gregorio_calloc(set->bins, sizeof(character_set *));
+ }
+ for (i = 0; i < old_bins; ++i) {
+ if (old_table[i]) {
+ character_set_put(set, old_table[i], old_next ? old_next[i] : NULL);
+ } else {
+ assert(!old_next || !old_next[i]);
+ }
+ }
+
+ free(old_table);
+ if (old_next) {
+ free(old_next);
+ }
+}
+
+static character_set *character_set_add(character_set *const set,
+ const grewchar character)
+{
+ character_set *next = NULL;
+
+ if (!character_set_contains(set, character, &next)) {
+ if (((++(set->size) * 10) / set->bins) >= 7) {
+ character_set_grow(set);
+ }
+
+ if (set->next) {
+ next = character_set_new(true);
+ }
+
+ character_set_put(set, character, next);
+ }
+
+ return next;
+}
+
+static __inline void character_set_clear(character_set *const set)
+{
+ if (set) {
+ memset(set->table, 0, set->bins * sizeof(grewchar));
+
+ if (set->next) {
+ character_set_next_elements_free(set);
+ memset(set->next, 0, set->bins * sizeof(character_set *));
+ }
+
+ set->size = 0;
+ }
+}
+
+static character_set *vowel_table = NULL;
+static character_set *prefix_table = NULL;
+static character_set *suffix_table = NULL;
+static character_set *secondary_table = NULL;
+static grewchar *prefix_buffer = NULL;
+static size_t prefix_buffer_size;
+static size_t prefix_buffer_mask;
+
+extern FILE *gregorio_vowel_rulefile_in;
+
+static void prefix_buffer_grow(size_t required_size)
+{
+ while (required_size > prefix_buffer_size) {
+ prefix_buffer_size <<= 1;
+ prefix_buffer_mask = (prefix_buffer_mask << 1) | 0x01;
+ }
+ prefix_buffer = gregorio_realloc(prefix_buffer,
+ prefix_buffer_size * sizeof(grewchar));
+}
+
+void gregorio_vowel_tables_init(void)
+{
+ if (vowel_table) {
+ character_set_clear(vowel_table);
+ character_set_clear(prefix_table);
+ character_set_clear(suffix_table);
+ character_set_clear(secondary_table);
+ } else {
+ vowel_table = character_set_new(false);
+ prefix_table = character_set_new(true);
+ suffix_table = character_set_new(true);
+ secondary_table = character_set_new(true);
+
+ prefix_buffer_size = 16;
+ prefix_buffer_mask = 0x0f;
+ prefix_buffer = (grewchar *)gregorio_malloc(
+ prefix_buffer_size * sizeof(grewchar));
+ }
+}
+
+void gregorio_vowel_tables_load(const char *const filename,
+ char **const language, rulefile_parse_status *status)
+{
+ gregorio_check_file_access(read, filename, WARNING, return);
+ gregorio_vowel_rulefile_in = fopen(filename, "r");
+ if (gregorio_vowel_rulefile_in) {
+ gregorio_vowel_rulefile_parse(filename, language, status);
+ fclose(gregorio_vowel_rulefile_in);
+ gregorio_vowel_rulefile_in = NULL;
+ } else {
+ /* tests cannot be expected to simulate the system error that would
+ * cause gregorio_vowel_rulefile_in to be NULL */
+ /* LCOV_EXCL_START */
+ gregorio_messagef("gregorio_vowel_tables_load", VERBOSITY_WARNING, 0,
+ _("unable to open %s: %s"), filename, strerror(errno));
+ /* LCOV_EXCL_STOP */
+ }
+}
+
+void gregorio_vowel_tables_free(void)
+{
+ if (vowel_table) {
+ character_set_free(vowel_table);
+ }
+ if (prefix_table) {
+ character_set_free(prefix_table);
+ }
+ if (suffix_table) {
+ character_set_free(suffix_table);
+ }
+ if (secondary_table) {
+ character_set_free(secondary_table);
+ }
+ if (prefix_buffer) {
+ free(prefix_buffer);
+ }
+}
+
+void gregorio_vowel_table_add(const char *vowels)
+{
+ if (vowels) {
+ grewchar *str = gregorio_build_grewchar_string_from_buf(vowels), *p;
+ for (p = str; *p; ++p) {
+ character_set_add(vowel_table, *p);
+ }
+ free(str);
+ }
+}
+
+void gregorio_prefix_table_add(const char *prefix)
+{
+ character_set *set = prefix_table;
+ grewchar *str, *p;
+
+ /* store prefixes backwards */
+ if (prefix && *prefix) {
+ str = gregorio_build_grewchar_string_from_buf(prefix);
+ p = str;
+
+ while (*(++p)) ;
+
+ while (p > str) {
+ set = character_set_add(set, *(--p));
+ }
+
+ set->is_final = true;
+ prefix_buffer_grow(gregorio_wcstrlen(str));
+ free(str);
+ }
+}
+
+void gregorio_suffix_table_add(const char *suffix)
+{
+ character_set *set = suffix_table;
+ grewchar *str, *p;
+
+ if (suffix && *suffix) {
+ str = gregorio_build_grewchar_string_from_buf(suffix);
+ p = str;
+
+ while (*p) {
+ set = character_set_add(set, *(p++));
+ }
+
+ set->is_final = true;
+ free(str);
+ }
+}
+
+void gregorio_secondary_table_add(const char *secondary)
+{
+ character_set *set = secondary_table;
+ grewchar *str, *p;
+
+ if (secondary && *secondary) {
+ str = gregorio_build_grewchar_string_from_buf(secondary);
+ p = str;
+
+ while (*p) {
+ set = character_set_add(set, *(p++));
+ }
+
+ set->is_final = true;
+ free(str);
+ }
+}
+
+typedef enum {
+ VWL_BEFORE = 0,
+ VWL_WITHIN,
+ VWL_SUFFIX
+} vowel_group_state;
+
+static __inline bool is_in_prefix(size_t bufpos) {
+ character_set *previous = prefix_table, *prefix;
+
+ while (character_set_contains(previous, prefix_buffer[bufpos], &prefix)) {
+ bufpos = (bufpos + prefix_buffer_size - 1) & prefix_buffer_mask;
+ previous = prefix;
+ }
+
+ return previous->is_final;
+}
+
+bool gregorio_find_vowel_group(const grewchar *const string, int *const start,
+ int *const end)
+{
+ size_t bufpos = 0;
+ vowel_group_state state = VWL_BEFORE;
+ character_set *cset = NULL;
+ const grewchar *subject;
+ int i;
+
+ /* stick the 0 in here to avoid overruns from is_in_prefix */
+ prefix_buffer[0] = 0;
+
+ for (i = 0, subject = string; true; ++i, ++subject) {
+ switch (state) {
+ case VWL_BEFORE:
+ bufpos = (bufpos + 1) & prefix_buffer_mask;
+ prefix_buffer[bufpos] = *subject;
+ if (character_set_contains(vowel_table, *subject, NULL)) {
+ /* we found a vowel */
+ if ((!character_set_contains(vowel_table, *(subject + 1), NULL)
+ && *(subject + 1) != GREVOWEL_ELISION_MARK)
+ || !is_in_prefix(bufpos)) {
+ /* no vowel/elision after, or not in prefix, so this is the
+ * start */
+ *start = i;
+ state = VWL_WITHIN;
+ }
+ }
+ break;
+
+ case VWL_WITHIN:
+ if (!character_set_contains(vowel_table, *subject, NULL)) {
+ /* not a vowel; is it a suffix? */
+ *end = i;
+ if (character_set_contains(suffix_table, *subject, &cset)) {
+ /* it's the start of a suffix */
+ state = VWL_SUFFIX;
+ } else {
+ /* neither a vowel nor a suffix, so this is the end */
+ return true;
+ }
+ }
+ break;
+
+ case VWL_SUFFIX:
+ if (cset->is_final) {
+ /* remember the last final position */
+ *end = i;
+ }
+ if (!character_set_contains(cset, *subject, &cset)) {
+ /* no longer in valid suffix */
+ return true;
+ }
+ break;
+
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ assert(false);
+ break;
+ /* LCOV_EXCL_STOP */
+ }
+
+ if (!*subject) {
+ break;
+ }
+ }
+
+ /* no vowel found; look for a secondary */
+ *end = -1;
+ for (*start = 0; *(subject = string + *start); ++ *start) {
+ for (cset = secondary_table, i = *start;
+ character_set_contains(cset, *subject, &cset); ++i, ++subject) {
+ if (cset->is_final) {
+ /* remember the last final position */
+ *end = i + 1;
+ }
+ }
+ if (*end >= 0) {
+ return true;
+ }
+ }
+
+ /* no center found */
+ *start = -1;
+ return false;
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h
new file mode 100644
index 00000000000..a149f4214d5
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel.h
@@ -0,0 +1,52 @@
+/*
+ * Gregorio is a program that translates gabc files to GregorioTeX
+ * This header prototypes the vowel handling data structures and entry points.
+ *
+ * Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+ *
+ * This file is part of Gregorio.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _VOWEL_H
+#define _VOWEL_H
+
+#include <stdio.h>
+#include "bool.h"
+#include "unicode.h"
+
+/* Use unicode 0xfffe, which is guaranteed not to be a character */
+#define GREVOWEL_ELISION_MARK ((grewchar)0xfffe)
+
+typedef enum rulefile_parse_status {
+ RFPS_NOT_FOUND = 0,
+ RFPS_FOUND,
+ RFPS_ALIASED
+} rulefile_parse_status;
+
+int gregorio_vowel_rulefile_parse(const char *filename, char **language,
+ rulefile_parse_status *status);
+int gregorio_vowel_rulefile_lex_destroy(void);
+void gregorio_vowel_tables_init(void);
+void gregorio_vowel_tables_load(const char *filename, char **language,
+ rulefile_parse_status *status);
+void gregorio_vowel_tables_free(void);
+void gregorio_vowel_table_add(const char *vowels);
+void gregorio_prefix_table_add(const char *prefix);
+void gregorio_suffix_table_add(const char *suffix);
+void gregorio_secondary_table_add(const char *secondary);
+bool gregorio_find_vowel_group(const grewchar *subject, int *start, int *end);
+
+#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc b/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc
new file mode 100644
index 00000000000..06f463bea07
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc
@@ -0,0 +1,25 @@
+IDI_ICON1 ICON DISCARDABLE "gregorio.ico"
+1 VERSIONINFO
+FILEVERSION 5,2,1,30
+PRODUCTVERSION 5,2,1,30
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "Gregorio project"
+ VALUE "FileDescription", "Gregorio"
+ VALUE "FileVersion", "5.2.1"
+ VALUE "InternalName", "gregorio"
+ VALUE "LegalCopyright", "See COPYING in the installation directory."
+ VALUE "OriginalFilename", "gregorio.exe"
+ VALUE "ProductName", "Gregorio"
+ VALUE "ProductVersion", "5.2.1"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/Build/source/texk/gregorio/gregorio-src/windows/gregorio.ico b/Build/source/texk/gregorio/gregorio-src/windows/gregorio.ico
new file mode 100644
index 00000000000..5b1e78fdb1a
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/windows/gregorio.ico
Binary files differ