diff -Nru plantuml-1.2017.15/build.xml plantuml-1.2018.9/build.xml --- plantuml-1.2017.15/build.xml 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/build.xml 2018-07-27 21:59:19.000000000 +0000 @@ -56,6 +56,11 @@ + + + + + @@ -64,7 +69,7 @@ - + diff -Nru plantuml-1.2017.15/debian/changelog plantuml-1.2018.9/debian/changelog --- plantuml-1.2017.15/debian/changelog 2017-09-16 19:54:51.000000000 +0000 +++ plantuml-1.2018.9/debian/changelog 2018-08-05 09:39:13.000000000 +0000 @@ -1,3 +1,18 @@ +plantuml (1:1.2018.9-1) unstable; urgency=medium + + [ Alex Kirchhoff ] + * New upstream version (1.2018.9). + * Update pdf.patch: + - Add libavalon-framework-java, libcommons-io-java, + libcommons-logging-java, libxml-commons-external-java, + libxmlgraphics-commons-java as dependencies. + * Update the description with new features + (Closes: #897414). + * Update Vcs-* to point to Salsa. + * Update Standards-Version from 4.0.0 to 4.1.5 (no change needed) + + -- Andrej Shadura Sun, 05 Aug 2018 11:39:13 +0200 + plantuml (1:1.2017.15-1) unstable; urgency=medium * Fix "New version available" package upstream release (1.2017.15), new diff -Nru plantuml-1.2017.15/debian/control plantuml-1.2018.9/debian/control --- plantuml-1.2017.15/debian/control 2017-09-16 19:54:51.000000000 +0000 +++ plantuml-1.2018.9/debian/control 2018-08-05 09:39:13.000000000 +0000 @@ -10,10 +10,10 @@ default-jdk, libfop-java, libbatik-java -Standards-Version: 4.0.0 +Standards-Version: 4.1.5 Homepage: http://plantuml.com/ -Vcs-Git: https://anonscm.debian.org/git/collab-maint/plantuml.git -Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/plantuml.git/ +Vcs-Git: https://salsa.debian.org/debian/plantuml.git +Vcs-Browser: https://salsa.debian.org/debian/plantuml Package: plantuml Architecture: all @@ -22,19 +22,35 @@ default-jre, libfop-java, libbatik-java, - libjlatexmath-java + libjlatexmath-java, + libavalon-framework-java, + libcommons-io-java, + libcommons-logging-java, + libxml-commons-external-java, + libxmlgraphics-commons-java Recommends: graphviz Description: text-to-UML converter PlantUML is a program allowing to draw UML diagrams, using a simple human readable text description. . - PlantUML supports the following diagram types: + PlantUML supports the following UML diagrams: - sequence diagram - use case diagram - class diagram - activity diagram - component diagram - state diagram + - object diagram + - deployment diagram + - timing diagram + . + The following non-UML diagrams are also supported: + - wireframe graphical interface (Salt) + - Archimate diagram + - Specification and Description Language (SDL) + - Ditaa diagram + - Gantt diagram + - mathematics with AsciiMath or JLaTeXMath notation . Output images can be generated in PNG, in SVG or LaTeX format. PlantUML also supports generation of ASCII art diagrams (only for diff -Nru plantuml-1.2017.15/debian/patches/pdf.patch plantuml-1.2018.9/debian/patches/pdf.patch --- plantuml-1.2017.15/debian/patches/pdf.patch 2017-09-16 19:54:51.000000000 +0000 +++ plantuml-1.2018.9/debian/patches/pdf.patch 2018-08-05 09:39:13.000000000 +0000 @@ -1,7 +1,7 @@ Subject: Specify Class-Path to the libraries needed to support PDF (#807928). Author: Andrew Shadura Forwarded: not-needed -Last-Update: 2017-09-16 +Last-Update: 2018-08-04 --- a/build.xml +++ b/build.xml @@ -9,8 +9,8 @@ -- -+ +- ++ diff -Nru plantuml-1.2017.15/license.txt plantuml-1.2018.9/license.txt --- plantuml-1.2017.15/license.txt 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/license.txt 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,49 @@ +======================================================================= +PlantUML : a free UML diagram generator +======================================================================== + +(C) Copyright 2009-2017, Arnaud Roques + +Project Info: http://plantuml.com + +If you like this project or if you find it useful, you can support us at: + +http://plantuml.com/patreon (only 1$ per month!) +http://plantuml.com/paypal + +PlantUML 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. + +PlantUML 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 library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +USA. + +PlantUML can occasionally display sponsored or advertising messages. Those +messages are usually generated on welcome or error images and never on +functional diagrams. + +Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML +are owned by the author of their corresponding sources code (that is, their +textual description in PlantUML language). Those images are not covered by +the GPL license. + +The generated images can then be used without any reference to the GPL license. +It is not even necessary to stipulate that they have been generated with PlantUML, +also this will be appreciate by PlantUML team. + +There is an exception : if the textual description in PlantUML language is also covered +by a license (like the GPL), then the generated images are logically covered +by the very same license. + +Icons provided by OpenIconic : https://useiconic.com/open +Archimate sprites provided by Archi : http://www.archimatetool.com +ASCIIMathML (c) Peter Jipsen http://www.chapman.edu/~jipsen +ASCIIMathML (c) David Lippman http://www.pierce.ctc.edu/dlippman diff -Nru plantuml-1.2017.15/pom.xml plantuml-1.2018.9/pom.xml --- plantuml-1.2017.15/pom.xml 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/pom.xml 2018-07-27 21:59:19.000000000 +0000 @@ -35,7 +35,7 @@ net.sourceforge.plantuml plantuml - 1.2017.15-SNAPSHOT + 1.2018.10-SNAPSHOT jar PlantUML @@ -120,6 +120,12 @@ net/sourceforge/plantuml/math/*.js + + ${project.basedir} + + stdlib/**/*.repx + + diff -Nru plantuml-1.2017.15/README.md plantuml-1.2018.9/README.md --- plantuml-1.2017.15/README.md 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/README.md 2018-07-27 21:59:19.000000000 +0000 @@ -15,5 +15,18 @@ * [Object diagram](http://plantuml.com/object-diagram), * [Deployment diagram](http://plantuml.com/deployment-diagram), * [Timing diagram](http://plantuml.com/timing-diagram) + +And also: + * [Activity diagram (legacy syntax)](http://plantuml.com/activity-diagram-legacy) + * [Archimate diagram](http://plantuml.com/archimate) + * [Gantt charts](http://plantuml.com/gantt-diagram) + * [SALT UI mockups](http://plantuml.com/salt) + +Furthermore: + * [Hyperlinks and tooltips](http://plantuml.com/link) + * [Creole](http://plantuml.com/creole): rich text, emoticons, unicode, icons + * [OpenIconic icons](http://plantuml.com/openiconic) + * [Sprite icons](http://plantuml.com/sprite) + * [AsciiMath mathematical expressions](http://plantuml.com/ascii-math) To know more about PlantUML, please visit http://plantuml.com/ diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/ACearth.java plantuml-1.2018.9/src/com/ctreber/acearth/ACearth.java --- plantuml-1.2017.15/src/com/ctreber/acearth/ACearth.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/ACearth.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,373 +0,0 @@ -package com.ctreber.acearth; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Random; - -import com.ctreber.acearth.gui.CanvasACearth; -import com.ctreber.acearth.plugins.Plugin; -import com.ctreber.acearth.plugins.markers.Marker; -import com.ctreber.acearth.plugins.markers.PluginMarkers; -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.projection.ProjectionCyl; -import com.ctreber.acearth.projection.ProjectionMerc; -import com.ctreber.acearth.projection.ProjectionOrtho; -import com.ctreber.acearth.renderer.Renderer; -import com.ctreber.acearth.renderer.RowTypeRendererScanBit; -import com.ctreber.acearth.renderer.RowTypeRendererScanDot; -import com.ctreber.acearth.scanbit.BitGeneratorMap; -import com.ctreber.acearth.scanbit.BitGeneratorMapDefault; -import com.ctreber.acearth.scanbit.BitGeneratorMapOrtho; -import com.ctreber.acearth.scandot.DotGeneratorLines; -import com.ctreber.acearth.scandot.DotGeneratorStars; -import com.ctreber.acearth.scandot.ScanDot; -import com.ctreber.acearth.scandot.ScanDotGenerator; -import com.ctreber.acearth.shader.Shader; -import com.ctreber.acearth.shader.ShaderDefault; -import com.ctreber.acearth.shader.ShaderFlat; -import com.ctreber.acearth.shader.ShaderOrtho; -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.SunPositionCalculator; -import com.ctreber.acearth.util.Toolkit; -import com.ctreber.aclib.sort.CTSort; -import com.ctreber.aclib.sort.QuickSort; - -/** - *

AC.earth - XEarth for Java - *

- * - *

- * The original XEarth was written by Kirk Johnson in July 1993 - thank you for - * writing this great little program and making it available for free! - * - *

- * I wanted to extend the program, but not in C. So I created this Java version, - * and found the process quite painfull interesting. The - * biggest effort went into resolving references between C files and - * eliminatiing pointers. - * - *

License

- * - *

- * AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com - * - *

- * AC.earth is based on XEarth by Kirk Johnson - * - *

- * To comply with the XEarth license I include the following text: - * - *

- * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
- * Parts of the source code are:
- *   Copyright (C) 1989, 1990, 1991 by Jim Frost
- *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
- * Permission to use, copy, modify and freely distribute xearth for
- * non-commercial and not-for-profit purposes is hereby granted
- * without fee, provided that both the above copyright notice and this
- * permission notice appear in all copies and in supporting
- * documentation.
- * [Section refering to GIF omitted because it doesn't apply to this version]
- * The author makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
- * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- * - *

- * The license for this program (AC.earth) is the same as the quoted license - * above, with one change: The "copyright notice and permission notice" shall - * include the entire text of this section. - * - * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo - * Phase 2: Enter fixed time as data and time, not seconds since epoch todo - * Phase 2: Compact map data into binary file - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - */ -public class ACearth { - public static final String VERSION = "1.1"; - public static final String BUILD = "22.11.2002 004"; - - // private static long fsStartTime = 0; - - private ConfigurationACearth fConf = new ConfigurationACearth(); - private long fCurrentTime; - - private CanvasACearth fCanvas; - - private Coordinate fViewPos; - private double fViewRotation; - - private List fPlugins; - - /** - *

- * Well, the main class. - * @param markers - */ - public ACearth(List markers) { - // fsStartTime = System.currentTimeMillis(); - - fPlugins = new ArrayList(); - fPlugins.add(new PluginMarkers(markers)); - - } - - public void exportPng(OutputStream os) throws IOException { - fCanvas = new CanvasACearth(this, fConf.getInt("imageWidth"), fConf.getInt("imageHeight")); - update(); - fCanvas.saveToImage(os); - } - - public void update() throws IOException { - Projection lProjection = null; - Shader lShader = null; - BitGeneratorMap lScanner = null; - if (fConf.is("projection", "Cylindrical")) { - lProjection = new ProjectionCyl(); - lScanner = new BitGeneratorMapDefault(lProjection); - lShader = new ShaderDefault(); - } - - if (fConf.is("projection", "Mercator")) { - lProjection = new ProjectionMerc(); - lScanner = new BitGeneratorMapDefault(lProjection); - lShader = new ShaderDefault(); - } - - if (fConf.is("projection", "Orthographic")) { - lProjection = new ProjectionOrtho(); - lScanner = new BitGeneratorMapOrtho(lProjection); - lShader = new ShaderOrtho(); - } - - computePositions(); - lProjection.setImageWidth(fConf.getInt("imageWidth")); - lProjection.setImageHeight(fConf.getInt("imageHeight")); - lProjection.setShiftX(fConf.getInt("shiftX")); - lProjection.setShiftY(fConf.getInt("shiftY")); - lProjection.setViewMagnification(fConf.getDouble("viewMagnification")); - lProjection.setViewPos(fViewPos); - lProjection.setViewRotation(fViewRotation); - - lScanner.setImageWidth(fConf.getInt("imageWidth")); - lScanner.setImageHeight(fConf.getInt("imageHeight")); - lScanner.setMapData(MapDataReader.readMapData()); - // Process the map (produces ScanBit-s). - lScanner.generateScanBits(); - - // Process stars and lines (produces ScanDots-s). - List lScanDots = new ArrayList(); - if (fConf.getBoolean("starsP")) { - ScanDotGenerator lGenerator = new DotGeneratorStars(fConf.getInt("imageWidth"), - fConf.getInt("imageHeight"), fConf.getDouble("starFrequency"), fConf.getInt("bigStars"), new Random(fCurrentTime)); - lGenerator.generateScanDots(); - lScanDots.addAll(lGenerator.getScanDots()); - } - - if (fConf.getBoolean("gridP")) { - ScanDotGenerator lGenerator = new DotGeneratorLines(lProjection, fConf.getInt("gridDivision"), fConf - .getInt("gridPixelDivision")); - lGenerator.generateScanDots(); - lScanDots.addAll(lGenerator.getScanDots()); - } - - final CTSort lSort = new QuickSort(); - ScanDot[] lScanDotsArray = (ScanDot[]) lScanDots.toArray(new ScanDot[0]); - lSort.sort(lScanDotsArray); - - if (!fConf.getBoolean("shadeP")) { - lShader = new ShaderFlat(); - } - lShader.setProjection(lProjection); - lShader.setSunPos(fConf.getSunPos()); - lShader.setDaySideBrightness(fConf.getInt("daySideBrightness")); - lShader.setTerminatorDiscontinuity(fConf.getInt("terminatorDiscontinuity")); - lShader.setNightSideBrightness(fConf.getInt("nightSideBrightness")); - lShader.init(); - - Renderer lRenderer = new Renderer(fCanvas); - - RowTypeRendererScanBit lRowRendererScanBit = new RowTypeRendererScanBit(); - lRowRendererScanBit.setScanBits(lScanner.getScanBits()); - lRenderer.addRowTypeRenderer(lRowRendererScanBit); - - RowTypeRendererScanDot lRowRendererScanDot = new RowTypeRendererScanDot(); - lRowRendererScanDot.setScanDots(lScanDotsArray); - lRenderer.addRowTypeRenderer(lRowRendererScanDot); - - lRenderer.setShader(lShader); - lRenderer.render(); - - // Apply plugins - Iterator lIt = fPlugins.iterator(); - while (lIt.hasNext()) { - Plugin lPlugin = (Plugin) lIt.next(); - lPlugin.setProjection(lProjection); - lPlugin.setRenderTarget(fCanvas); - lPlugin.setParent(this); - lPlugin.render(); - } - - } - - /** - *

- * This is repeated when time changes since this influences the position of - * Earth. - */ - private void computePositions() { - // Determine time for rendering - if (fConf.getInt("fixedTime") == 0) { - // No fixed time. - // final long lTimePassed = System.currentTimeMillis() - fsStartTime; - // fCurrentTime = fsStartTime + (long) (fConf.getDouble("timeWarpFactor") * lTimePassed); - fCurrentTime = System.currentTimeMillis(); - } else { - // Fixed time. - fCurrentTime = fConf.getInt("fixedTime") * 1000L; - } - - if (fConf.getBoolean("sunMovesP")) { - fConf.setSunPos(SunPositionCalculator.getSunPositionOnEarth(fCurrentTime)); - } - - // Determine viewing position - if (fConf.is("viewPositionType", "Fixed")) { - fViewPos = fConf.getViewPos(); - } else if (fConf.is("viewPositionType", "Sun-relative")) { - fViewPos = getSunRelativePosition(); - } else if (fConf.is("viewPositionType", "Orbit")) { - fViewPos = getOrbitPosition(fCurrentTime); - } else if (fConf.is("viewPositionType", "Random")) { - fViewPos = getRandomPosition(); - } else if (fConf.is("viewPositionType", "Moon")) { - fViewPos = SunPositionCalculator.getMoonPositionOnEarth(fCurrentTime); - } - - // for ViewRotGalactic, compute appropriate viewing rotation - if (fConf.is("viewRotationType", "Galactic")) { - fViewRotation = (Toolkit.degsToRads(fConf.getSunPos().getLat() - * Math.sin((fViewPos.getLong() - fConf.getSunPos().getLong())))); - } else { - fViewRotation = fConf.getDouble("viewRotation"); - } - } - - /** - *

- * Add sun position and position relative to sun, straighten out the result. - * - * @return Position relativ to sun position as defined by fSunPosRel. - */ - private Coordinate getSunRelativePosition() { - final Coordinate lPos = fConf.getSunPos(); - lPos.add(fConf.getSunPosRel()); - - return lPos; - } - - private Coordinate getOrbitPosition(long pTimeMillis) { - double x, y, z; - double a, c, s; - double t1, t2; - - /* start at 0 N 0 E */ - x = 0; - y = 0; - z = 1; - - /* - * rotate in about y axis (from z towards x) according to the number of - * orbits we've completed - */ - a = (double) pTimeMillis / (fConf.getDouble("orbitPeriod") * 3600 * 1000) * 2 * Math.PI; - c = Math.cos(a); - s = Math.sin(a); - t1 = c * z - s * x; - t2 = s * z + c * x; - z = t1; - x = t2; - - /* - * rotate about z axis (from x towards y) according to the inclination - * of the orbit - */ - a = Toolkit.degsToRads(fConf.getDouble("orbitInclination")); - c = Math.cos(a); - s = Math.sin(a); - t1 = c * x - s * y; - t2 = s * x + c * y; - x = t1; - y = t2; - - /* - * rotate about y axis (from x towards z) according to the number of - * rotations the earth has made - */ - a = ((double) pTimeMillis / 86400000) * (2 * Math.PI); - c = Math.cos(a); - s = Math.sin(a); - t1 = c * x - s * z; - t2 = s * x + c * z; - x = t1; - z = t2; - - return new Coordinate(Toolkit.radsToDegs(Math.asin(y)), Toolkit.radsToDegs(Math.atan2(x, z))); - } - - /** - *

- * Pick a position (lat, lon) at random - * - * @return A random position. - */ - private static Coordinate getRandomPosition() { - - /* select a vector at random */ - final double[] pos = new double[3]; - double mag = 0; - do { - for (int i = 0; i < 3; i++) { - pos[i] = ((Math.random() * 20000) * 1e-4) - 1; - mag += pos[i] * pos[i]; - } - } while ((mag > 1.0) || (mag < 0.01)); - - /* normalize the vector */ - mag = Math.sqrt(mag); - for (int i = 0; i < 3; i++) { - pos[i] /= mag; - } - - /* convert to (lat, lon) */ - final double s_lat = pos[1]; - final double c_lat = Math.sqrt(1 - s_lat * s_lat); - final double s_lon = pos[0] / c_lat; - final double c_lon = pos[2] / c_lat; - - return new Coordinate(Math.atan2(s_lat, c_lat) * (180 / Math.PI), Math.atan2(s_lon, c_lon) * (180 / Math.PI)); - } - -// public static long getStartTime() { -// return fsStartTime; -// } - - public ConfigurationACearth getConf() { - return fConf; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/ConfigurationACearth.java plantuml-1.2018.9/src/com/ctreber/acearth/ConfigurationACearth.java --- plantuml-1.2017.15/src/com/ctreber/acearth/ConfigurationACearth.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/ConfigurationACearth.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -package com.ctreber.acearth; - -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.aclib.gui.MOBoolean; -import com.ctreber.aclib.gui.MODouble; -import com.ctreber.aclib.gui.MOEnum; -import com.ctreber.aclib.gui.MOInteger; -import com.ctreber.aclib.gui.MOString; -import com.ctreber.aclib.gui.MonitoredObject; - -/** - *

- * How to avoid writing all the accessors? Code generator that creates derived - * class from template class? Configuration items in data structure? - *

- * - *

- * © 2002 Christian Treber, ct@ctreber.com (06.10.2002) - *

- * - * @author Christian Treber, ct@ctreber.com - * - */ -public class ConfigurationACearth extends Configuration { - private static final int DEFAULT_DIMENSION = 512; - - public ConfigurationACearth() { - final MOEnum lProjection = new MOEnum(); - lProjection.addValidValue("Mercator"); - lProjection.addValidValue("Orthographic"); - lProjection.addValidValue("Cylindrical"); - lProjection.set("Orthographic"); - add("projection", (MonitoredObject) lProjection); - - final MOEnum lPositionType = new MOEnum(); - lPositionType.addValidValue("Fixed"); - lPositionType.addValidValue("Sun-relative"); - lPositionType.addValidValue("Orbit"); - lPositionType.addValidValue("Random"); - lPositionType.addValidValue("Moon"); - lPositionType.set("Sun-relative"); - add("viewPositionType", lPositionType); - - final MOEnum lViewRotationType = new MOEnum(); - lViewRotationType.addValidValue("North"); - lViewRotationType.addValidValue("Galactic"); - lViewRotationType.set("North"); - add("viewRotationType", lViewRotationType); - - final MOString lOutputMode = new MOString("gui"); - add("outputMode", lOutputMode); - - // Only relevant if view type is "Fixed"./ - final MODouble lViewPosLat = new MODouble(0, -90, +90); - add("viewPosLat", lViewPosLat); - final MODouble lViewPosLong = new MODouble(0, -180, +180); - add("viewPosLong", lViewPosLong); - // Only relevant if view type is "Sun-relative". - final MODouble lSunPosRelLat = new MODouble(0, -90, +90); - add("sunPosRelLat", lSunPosRelLat); - final MODouble lSunPosRelLong = new MODouble(0, -180, +180); - add("sunPosRelLong", lSunPosRelLong); - - final MOBoolean lSunMovesP = new MOBoolean(true); - add("sunMovesP", lSunMovesP); - // Only relevant if sun does not move. - final MODouble lSunPosLat = new MODouble(0, -90, +90); - add("sunPosLat", lSunPosLat); - final MODouble lSunPosLong = new MODouble(0, -180, +180); - add("sunPosLong", lSunPosLong); - - final MODouble lTimeWarpFactor = new MODouble(1.0, 0, Double.MAX_VALUE); - add("timeWarpFactor", lTimeWarpFactor); - final MOInteger lFixedTime = new MOInteger(0, 0, Integer.MAX_VALUE); - add("fixedTime", lFixedTime); - final MOInteger lWaitTime = new MOInteger(300, 0, Integer.MAX_VALUE); - add("waitTime", lWaitTime); - - final MODouble lOrbitPeriod = new MODouble(1, 0.0001, Double.MAX_VALUE); - add("orbitPeriod", lOrbitPeriod); - final MODouble lOrbitInclination = new MODouble(45.0, 0, 90); - add("orbitInclination", lOrbitInclination); - - final MOBoolean lLabelP = new MOBoolean(false); - add("labelP", lLabelP); - - final MOInteger lImageWidth = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); - add("imageWidth", lImageWidth); - final MOInteger lImageHeight = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); - add("imageHeight", lImageHeight); - - final MOBoolean lStarsP = new MOBoolean(true); - add("starsP", lStarsP); - final MODouble lStarFrequency = new MODouble(0.002, 0, Double.MAX_VALUE); - add("starFrequency", lStarFrequency); - final MOInteger lBigStars = new MOInteger(0, 0, 100); - add("bigStars", lBigStars); - - final MOBoolean lGridP = new MOBoolean(true); - add("gridP", lGridP); - final MOInteger lGridDivision = new MOInteger(6, 0, Integer.MAX_VALUE); - add("gridDivision", lGridDivision); - final MOInteger lGridPixelDevision = new MOInteger(15, 0, Integer.MAX_VALUE); - add("gridPixelDivision", lGridPixelDevision); - - final MOInteger lShiftX = new MOInteger(0, 0, Integer.MAX_VALUE); - add("shiftX", lShiftX); - final MOInteger lShiftY = new MOInteger(0, 0, Integer.MAX_VALUE); - add("shiftY", lShiftY); - final MODouble lViewMagnification = new MODouble(1.0, 0, Double.MAX_VALUE); - add("viewMagnification", lViewMagnification); - - final MOBoolean lShadeP = new MOBoolean(true); - add("shadeP", lShadeP); - final MOInteger lDaySideBrightness = new MOInteger(100, 0, 100); - add("daySideBrightness", lDaySideBrightness); - final MOInteger lNightSideBrightness = new MOInteger(5, 0, 100); - add("nightSideBrightness", lNightSideBrightness); - final MOInteger lTerminatorDiscontinuity = new MOInteger(1, 0, 100); - add("terminatorDiscontinuity", lTerminatorDiscontinuity); - - final MODouble lViewRotation = new MODouble(0, 0, Double.MAX_VALUE); - add("viewRotation", lViewRotation); - } - - public Coordinate getViewPos() { - return new Coordinate(getDouble("viewPosLat"), getDouble("viewPosLong")); - } - - public void setViewPos(Coordinate pViewPos) { - setDouble("viewPosLat", pViewPos.getLat()); - setDouble("viewPosLong", pViewPos.getLong()); - } - - public Coordinate getSunPos() { - return new Coordinate(getDouble("sunPosLat"), getDouble("sunPosLong")); - } - - public void setSunPos(Coordinate pSunPos) { - setDouble("sunPosLat", pSunPos.getLat()); - setDouble("sunPosLong", pSunPos.getLong()); - } - - public Coordinate getSunPosRel() { - return new Coordinate(getDouble("sunPosRelLat"), getDouble("sunPosRelLong")); - } - - public void setSunPosRel(Coordinate pSunPosRel) { - setDouble("sunPosRelLat", pSunPosRel.getLat()); - setDouble("sunPosRelLong", pSunPosRel.getLong()); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/Configuration.java plantuml-1.2018.9/src/com/ctreber/acearth/Configuration.java --- plantuml-1.2017.15/src/com/ctreber/acearth/Configuration.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/Configuration.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ -package com.ctreber.acearth; - -import java.util.HashMap; -import java.util.Map; - -import com.ctreber.aclib.gui.MOBoolean; -import com.ctreber.aclib.gui.MODouble; -import com.ctreber.aclib.gui.MOEnum; -import com.ctreber.aclib.gui.MOInteger; -import com.ctreber.aclib.gui.MOString; -import com.ctreber.aclib.gui.MonitoredObject; - -/** - *

- *

- * - *

- * © 2002 Christian Treber, ct@ctreber.com (06.10.2002) - *

- * - * @author Christian Treber, ct@ctreber.com - * - */ -public class Configuration { - private Map fValues = new HashMap(); - - /** - *

- * Item must be added before it can be set or get. - * - * @param pID - * Item name. - * @param pObject - * Item value container. - */ - public void add(String pID, MonitoredObject pObject) { - fValues.put(pID, pObject); - } - - public void setString(String pID, String pValue) { - ((MOString) fValues.get(pID)).set(pValue); - } - - public void setBoolean(String pID, boolean pValue) { - ((MOBoolean) fValues.get(pID)).set(pValue); - } - - public void setInt(String pID, int pValue) { - ((MOInteger) fValues.get(pID)).set(pValue); - } - - public void setDouble(String pID, double pValue) { - ((MODouble) fValues.get(pID)).set(pValue); - } - - public void setEnum(String pID, Object pValue) { - ((MOEnum) fValues.get(pID)).set(pValue); - } - - public String getString(String pID) { - return ((MOString) fValues.get(pID)).get(); - } - - public boolean getBoolean(String pID) { - return ((MOBoolean) fValues.get(pID)).get(); - } - - public int getInt(String pID) { - return ((MOInteger) fValues.get(pID)).get(); - } - - public double getDouble(String pID) { - return ((MODouble) fValues.get(pID)).get(); - } - - public boolean is(String pID, Object pValue) { - return ((MOEnum) fValues.get(pID)).is(pValue); - } - - public MOBoolean getMOBoolean(String pID) { - return (MOBoolean) getMO(pID); - } - - public MOString getMOString(String pID) { - return (MOString) getMO(pID); - } - - public MOEnum getMOEnum(String pID) { - return (MOEnum) getMO(pID); - } - - public MOInteger getMOInteger(String pID) { - return (MOInteger) getMO(pID); - } - - public MODouble getMODouble(String pID) { - return (MODouble) getMO(pID); - } - - public MonitoredObject getMO(String pID) { - final MonitoredObject lMO = (MonitoredObject) fValues.get(pID); - if (lMO == null) { - throw new IllegalArgumentException("Unknown conf item '" + pID + "'"); - } - - return lMO; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/gui/CanvasACearth.java plantuml-1.2018.9/src/com/ctreber/acearth/gui/CanvasACearth.java --- plantuml-1.2017.15/src/com/ctreber/acearth/gui/CanvasACearth.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/gui/CanvasACearth.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -package com.ctreber.acearth.gui; - -import com.ctreber.acearth.ACearth; - -/** - *

- * Adds some mouse magic to the normal PixelCanvas. - *

- * - *

- * © 2002 Christian Treber, ct@ctreber.com (Nov 8, 2002) - *

- * - * @author Christian Treber, ct@ctreber.com - * - */ -public class CanvasACearth extends PixelCanvas { - public CanvasACearth(ACearth pParent, int pWidth, int pHeight) { - super(pWidth, pHeight); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/gui/PixelCanvas.java plantuml-1.2018.9/src/com/ctreber/acearth/gui/PixelCanvas.java --- plantuml-1.2017.15/src/com/ctreber/acearth/gui/PixelCanvas.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/gui/PixelCanvas.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -package com.ctreber.acearth.gui; - -import java.awt.Color; -import java.awt.Graphics2D; -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; - -import javax.imageio.ImageIO; - -import com.ctreber.acearth.renderer.RenderTarget; - -/** - *

- * Swing compatible drawing surface for images and graphics. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class PixelCanvas implements RenderTarget { - final private int fImageWidth; - final private int fImageHeight; - final private BufferedImage fEarthImage2; - - /** - *

- * Construct a canvas of the specified size. - * - * @param pWidth - * Width - * @param pHeight - * Height - */ - public PixelCanvas(int pWidth, int pHeight) { - fImageWidth = pWidth; - fImageHeight = pHeight; - fEarthImage2 = new BufferedImage(fImageWidth, fImageHeight, BufferedImage.TYPE_INT_RGB); - } - - public Graphics2D getGraphics2D() { - return fEarthImage2.createGraphics(); - } - - public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB) { - setPixel(pX, pY, new Color(pR, pG, pB, pA)); - } - - public void setPixel(int pX, int pY, Color pColor) { - fEarthImage2.setRGB(pX, pY, pColor.getRGB()); - } - - public int getImageWidth() { - return fImageWidth; - } - - public int getImageHeight() { - return fImageHeight; - } - - public boolean saveToImage(String pFileName, String pFormat) throws IOException { - return ImageIO.write(fEarthImage2, pFormat, new File(pFileName)); - } - - public void saveToImage(OutputStream os) throws IOException { - ImageIO.write(fEarthImage2, "png", os); - } - -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/MapData.java plantuml-1.2018.9/src/com/ctreber/acearth/MapData.java --- plantuml-1.2017.15/src/com/ctreber/acearth/MapData.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/MapData.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,6835 +0,0 @@ -package com.ctreber.acearth; - -import java.util.ArrayList; -import java.util.List; - -/** - *

AC.earth - XEarth for Java - *

- * - *

- * The original XEarth was written by Kirk Johnson in July 1993 - thank you for - * writing this great little program and making it available for free! - * - *

- * I wanted to extend the program, but not in C. So I created this Java version, - * and found the process quite painfull interesting. The - * biggest effort went into resolving references between C files and - * eliminatiing pointers. - * - *

License

- * - *

- * AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com - * - *

- * AC.earth is based on XEarth by Kirk Johnson - * - *

- * To comply with the XEarth license I include the following text: - * - *

- * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
- * Parts of the source code are:
- *   Copyright (C) 1989, 1990, 1991 by Jim Frost
- *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
- * Permission to use, copy, modify and freely distribute xearth for
- * non-commercial and not-for-profit purposes is hereby granted
- * without fee, provided that both the above copyright notice and this
- * permission notice appear in all copies and in supporting
- * documentation.
- * [Section refering to GIF omitted because it doesn't apply to this version]
- * The author makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
- * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, d OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- * - *

- * The license for this program (AC.earth) is the same as the quoted license - * above, with one change: The "copyright notice and permission notice" shall - * include the entire text of this section. - * - * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo - * Phase 2: Enter fixed time as d and time, not seconds since epoch todo - * Phase 2: Compact map d into binary file - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - */ -public class MapData { - - private final List d = new ArrayList(); - - public MapData() { - //add("/*0*/"); - add("3903,1,13663,15523,21733,"); - add("-138,74,34,69,29,-64,-38,19,10,-93,24,41,"); - add("-123,2,74,-139,23,68,-93,-54,94,-46,17,16,"); - add("33,33,-44,-145,-37,113,-59,-82,92,-117,-44,99,"); - add("-83,-79,101,-98,-59,97,-129,1,70,-132,62,30,"); - add("-136,30,54,-146,22,63,-120,37,38,-137,40,44,"); - add("-132,50,34,-137,27,51,-140,23,54,-141,32,48,"); - add("-133,4,62,-123,-34,82,-124,44,28,-95,124,-40,"); - add("-134,50,28,-136,-5,65,-143,24,48,-135,51,25,"); - add("-151,13,57,-116,80,-5,-70,114,-49,-151,52,28,"); - add("-141,44,27,-137,28,36,-151,0,61,-115,-55,84,"); - add("-137,-19,66,-113,-59,83,-106,-67,85,-83,-88,91,"); - add("-56,-106,92,4,-127,82,57,-127,62,81,-117,47,"); - add("4,-126,79,-56,-109,89,-81,-94,88,-111,-65,80,"); - add("-137,-19,60,-140,50,16,-129,77,-4,-125,84,-11,"); - add("-140,59,9,-141,51,13,-141,46,16,-146,36,22,"); - add("-145,24,28,-147,4,41,-146,30,23,-136,66,-3,"); - add("-101,105,-39,-69,120,-58,-46,125,-69,-119,79,-19,"); - add("-150,23,25,-143,45,7,-135,65,-9,-147,32,16,"); - add("-145,29,16,-142,15,24,-138,-36,55,-149,6,29,"); - add("-142,46,1,-154,71,-14,-125,38,0,-122,43,-4,"); - add("-131,126,-59,-138,25,9,-148,44,-2,-111,93,-43,"); - add("-32,122,-79,97,86,-77,111,74,-72,87,91,-80,"); - add("55,110,-89,20,109,-83,-52,128,-82,-122,81,-36,"); - add("-105,100,-54,-10,122,-89,103,79,-78,66,104,-92,"); - add("-18,101,-74,-145,-63,76,-125,-11,32,-59,130,-89,"); - add("-132,44,-11,-122,31,-2,-140,-37,51,-116,-63,67,"); - add("-123,-52,59,-148,-9,28,-165,-12,33,-130,47,-18,"); - add("-137,6,13,-141,-43,50,-141,43,-15,-120,-13,23,"); - add("-120,-62,60,-141,-30,36,-134,-48,49,-126,58,-32,"); - add("-147,39,-17,-152,5,8,-152,-1,12,-138,-34,35,"); - add("-152,-18,23,-141,-6,11,-140,-63,54,-146,-2,7,"); - add("-148,-18,19,-152,-10,12,-146,-17,16,-134,-51,40,"); - add("-137,-51,39,-122,-67,50,-94,-101,74,-153,-3,1,"); - add("-142,-45,31,-141,-36,24,-96,-91,63,-113,-76,51,"); - add("-131,-64,42,-148,-12,3,-148,11,-14,-140,28,-26,"); - add("-91,63,-49,-167,-51,26,-149,14,-19,-148,-15,0,"); - add("-147,-15,0,-141,43,-42,-112,79,-66,-79,97,-77,"); - add("-61,80,-64,-177,-45,16,-75,-108,69,-60,-116,77,"); - add("-58,-117,76,-67,-115,73,-74,-111,69,-82,-109,65,"); - add("-94,-100,58,-130,-71,31,-136,-61,24,-140,-54,17,"); - add("-142,-49,13,-136,-61,21,-108,-86,40,-109,-96,47,"); - add("-114,-89,40,-67,-108,58,-32,-126,76,-92,-106,52,"); - add("-95,-106,50,-65,-120,64,-22,-130,76,-16,-131,77,"); - add("18,-106,67,52,-115,78,-47,-130,68,-87,-111,50,"); - add("-97,-107,45,-92,-108,45,-107,-102,39,-124,-81,22,"); - add("-137,-67,11,-117,-90,27,-110,-101,34,-137,-63,6,"); - add("-142,-53,-1,-148,-33,-13,-149,-22,-22,-131,-55,1,"); - add("-102,-108,34,-70,-128,52,-73,-122,47,-62,-129,53,"); - add("-110,-97,23,-136,-69,2,-130,-68,2,-97,-100,27,"); - add("-63,-128,47,-72,-127,45,-68,-126,43,-24,-137,61,"); - add("-48,-134,51,-105,-101,20,-115,-97,14,-113,-102,17,"); - add("-124,-85,4,-45,-85,27,-86,-166,50,-81,-132,36,"); - add("-63,-120,34,-64,-131,39,-91,-126,28,-120,-81,-2,"); - add("-82,-125,28,-39,-135,45,-41,-142,46,-36,-139,45,"); - add("11,-63,29,88,49,7,55,-128,68,94,-66,54,"); - add("72,-129,71,25,-129,57,-35,-131,40,-72,-140,30,"); - add("-12,-75,25,57,-175,80,29,-137,57,23,-139,56,"); - add("5,-143,51,-9,-144,46,-25,-144,40,-51,-140,32,"); - add("-67,-134,24,-71,-130,20,-54,-138,27,-39,-142,32,"); - add("-15,-146,40,-39,-140,30,-86,-127,11,-87,-123,9,"); - add("-101,-113,1,-125,-80,-16,-35,-55,4,131,-79,62,"); - add("79,-115,55,55,-132,52,48,-37,24,80,37,14,"); - add("-24,-130,27,5,-132,35,86,-97,49,143,40,32,"); - add("151,15,39,139,11,37,23,-12,9,-165,-14,-43,"); - add("-150,-15,-39,-124,-71,-18,-137,66,-57,-95,-40,-19,"); - add("4,-145,37,-10,-150,33,68,-38,29,109,-29,39,"); - add("169,19,45,140,-28,46,108,53,18,32,16,5,"); - add("-131,-86,-16,-144,20,-46,-145,-14,-39,-139,0,-41,"); - add("-63,-98,4,132,-84,59,105,-1,30,30,-154,43,"); - add("141,35,33,23,-19,11,-4,-74,15,145,44,31,"); - add("138,22,33,85,-33,31,-198,-69,-40,68,-43,28,"); - add("74,-18,24,-111,-109,-7,57,-133,43,67,-24,23,"); - add("37,-29,16,51,-69,28,93,5,23,42,-89,29,"); - add("50,7,12,-20,-138,21,87,-128,47,146,-64,49,"); - add("100,-103,43,114,-63,40,40,-145,35,105,-106,43,"); - add("55,-111,32,51,-127,32,3,-125,20,49,-47,19,"); - add("-112,-70,-15,99,-97,37,66,-128,34,69,-98,30,"); - add("130,-47,35,64,-103,28,124,-117,43,137,-54,36,"); - add("123,-81,35,103,-103,34,110,-85,32,132,-68,34,"); - add("80,-100,27,164,-73,38,115,-81,30,105,-101,29,"); - add("109,-105,30,109,-98,28,107,-112,28,118,-87,27,"); - add("130,-70,27,131,-69,26,132,-73,26,140,-50,24,"); - add("136,-62,24,144,-33,22,137,60,13,138,61,12,"); - add("135,58,12,141,51,12,143,53,11,140,57,10,"); - add("154,36,13,144,15,12,80,34,4,221,-11,21,"); - add("150,21,10,153,12,10,31,26,0,-186,-21,-12,"); - add("-70,16,-7,216,24,15,145,2,10,70,-27,7,"); - add("241,-37,18,88,41,1,74,-80,12,215,-66,16,"); - add("148,-42,10,139,-66,11,145,61,0,127,75,-3,"); - add("152,42,0,142,47,-2,142,46,-2,131,71,-5,"); - add("138,62,-5,135,65,-7,139,51,-5,127,55,-7,"); - add("-86,84,-8,179,-137,12,126,67,-9,101,104,-12,"); - add("145,45,-9,147,33,-7,150,23,-8,151,18,-8,"); - add("151,15,-8,152,14,-9,152,2,-8,118,66,-15,"); - add("96,-12,-4,194,-39,-9,150,-20,-8,138,-57,-5,"); - add("119,-93,1,116,-123,3,104,-60,-4,93,-111,3,"); - add("72,-52,-2,-60,-116,16,22,-115,9,66,-152,6,"); - add("111,-118,-1,127,-59,-9,123,10,-14,172,14,-20,"); - add("81,57,-14,16,106,-11,97,-87,-4,83,20,-12,"); - add("13,34,-5,114,-41,-11,107,4,-14,144,-25,-18,"); - add("172,14,-25,57,94,-16,10,60,-7,117,-110,-8,"); - add("125,-37,-16,93,-200,1,128,-95,-14,128,-3,-20,"); - add("103,-40,-15,18,-169,8,77,-131,-5,50,-132,-1,"); - add("-31,-147,13,-24,-149,11,-20,-146,10,0,-155,5,"); - add("-58,-164,16,-80,-104,16,-38,-144,10,131,-77,-21,"); - add("-34,-206,9,-55,-13,9,-78,-47,14,106,-119,-17,"); - add("145,-47,-25,-5,-38,1,-148,11,26,-107,24,17,"); - add("-17,-219,3,-58,-133,9,-72,-120,10,-86,-22,13,"); - add("-68,14,11,81,-166,-15,78,-129,-15,131,-79,-23,"); - add("25,-86,-7,-143,111,26,-24,16,5,89,-154,-19,"); - add("76,-104,-16,30,-67,-7,110,-201,-26,122,-55,-23,"); - add("48,-37,-10,-95,-2,16,116,-113,-26,116,-93,-25,"); - add("108,-103,-25,91,-120,-24,103,-106,-26,89,-118,-25,"); - add("104,-105,-28,95,-110,-27,110,-104,-30,78,-131,-27,"); - add("57,-122,-23,82,-96,-26,50,-176,-27,-13,-142,-11,"); - add("102,-132,-36,104,-28,-26,127,73,-21,93,-26,-24,"); - add("-201,-68,38,-145,-55,26,65,-176,-34,77,-125,-32,"); - add("81,-121,-33,28,-149,-25,49,-142,-31,54,-139,-31,"); - add("63,-136,-34,66,-131,-35,13,-141,-25,-66,-116,-2,"); - add("-103,-102,7,18,-151,-29,41,-143,-34,36,-135,-32,"); - add("49,-132,-35,63,-140,-41,80,-124,-43,39,-130,-35,"); - add("20,-148,-34,-29,-145,-23,-11,-149,-29,-32,-147,-24,"); - add("-72,-145,-14,-85,-112,-5,-122,-66,14,-122,-104,4,"); - add("-63,-130,-16,-105,-105,-2,-74,-124,-13,-34,-157,-32,"); - add("-69,-133,-19,-16,-143,-33,-36,-147,-32,-55,-134,-24,"); - add("-50,-135,-26,-44,-152,-34,-93,-118,-14,-41,-114,-24,"); - add("0,-144,-43,2,-144,-43,-19,-144,-41,-27,-148,-40,"); - add("-22,-140,-40,-12,-144,-44,14,-143,-49,61,-126,-55,"); - add("56,-127,-56,98,-104,-56,78,-117,-58,64,-122,-58,"); - add("51,-130,-58,58,-125,-59,57,-126,-59,67,-119,-60,"); - add("36,-136,-61,39,-134,-61,51,-126,-61,67,-120,-64,"); - add("69,-117,-64,50,-128,-65,77,-111,-65,74,-113,-66,"); - add("50,-126,-66,16,-135,-62,-51,-115,-38,-7,-166,-71,"); - add("-8,-132,-57,-15,-140,-60,-13,-136,-59,33,-133,-71,"); - add("44,-122,-69,31,-129,-70,-17,-137,-62,0,-135,-66,"); - add("-2,-133,-66,18,-132,-71,21,-122,-68,21,-125,-70,"); - add("12,-128,-71,19,-130,-74,41,-121,-76,52,-119,-79,"); - add("58,-116,-80,84,-100,-79,88,-94,-78,98,-93,-81,"); - add("61,-104,-78,59,-112,-82,37,-121,-82,30,-125,-83,"); - add("16,-127,-81,24,-125,-83,31,-121,-83,45,-116,-86,"); - add("41,-117,-86,51,-113,-88,57,-108,-87,61,-107,-90,"); - add("21,-123,-87,-4,-129,-84,-31,-128,-75,-113,-90,-23,"); - add("-98,-49,-2,35,-95,-76,20,-75,-58,78,-152,-131,"); - add("6,-123,-89,-60,-113,-60,47,-37,-42,134,23,-29,"); - add("68,-84,-84,108,-67,-86,80,-84,-90,125,-33,-69,"); - add("120,35,-18,134,79,9,151,38,-29,129,19,-35,"); - add("138,-2,-56,150,15,-49,131,79,6,134,50,-18,"); - add("145,18,-47,117,-26,-69,139,5,-55,142,26,-43,"); - add("131,-22,-74,122,-33,-80,139,-17,-76,122,77,1,"); - add("139,-10,-74,110,29,-30,112,94,16,135,-5,-70,"); - add("135,4,-64,138,53,-30,135,59,-24,131,75,-13,"); - add("131,75,-12,129,77,-12,124,90,-1,128,79,-11,"); - add("122,91,-1,118,93,2,113,99,8,113,99,7,"); - add("126,83,-13,126,80,-15,115,101,4,108,105,10,"); - add("101,112,18,98,113,19,95,118,24,103,110,12,"); - add("87,122,29,106,111,9,112,98,-4,119,92,-13,"); - add("122,70,-31,127,93,-20,85,115,20,83,127,29,"); - add("55,132,47,65,130,40,76,128,29,70,131,35,"); - add("48,133,49,45,135,51,-9,92,60,-74,102,107,"); - add("104,114,-1,117,120,-7,131,81,-40,122,53,-51,"); - add("130,55,-55,130,46,-62,131,49,-61,130,49,-63,"); - add("128,60,-55,110,95,-25,103,114,-9,70,138,25,"); - add("-30,65,57,76,199,53,59,134,28,32,109,34,"); - add("26,155,61,42,142,42,-38,14,34,-44,-59,2,"); - add("31,186,71,10,140,62,-18,132,76,3,115,53,"); - add("15,152,60,-54,105,86,-37,109,76,49,147,32,"); - add("20,140,48,3,59,24,117,-35,-97,114,87,-42,"); - add("108,102,-32,96,108,-23,120,104,-41,123,58,-66,"); - add("95,68,-40,108,117,-32,117,122,-36,72,132,-1,"); - add("115,90,-50,109,78,-51,120,74,-63,119,65,-67,"); - add("99,59,-54,147,55,-94,106,38,-70,135,57,-87,"); - add("102,89,-48,115,73,-66,102,97,-48,86,104,-32,"); - add("85,115,-28,98,117,-40,99,115,-41,60,144,0,"); - add("42,99,0,42,96,-3,30,174,35,-10,83,36,"); - add("-10,101,43,18,182,45,13,138,32,22,135,24,"); - add("6,161,44,47,139,1,-9,159,54,25,141,20,"); - add("4,141,35,10,153,33,10,126,25,63,149,-15,"); - add("25,140,13,-29,151,62,-84,79,90,-85,64,86,"); - add("-73,102,85,-2,156,37,-21,134,47,-19,149,47,"); - add("-19,119,39,-35,164,61,14,142,16,54,146,-17,"); - add("-35,114,49,11,161,18,59,120,-28,44,119,-17,"); - add("-78,96,80,-61,118,67,-77,87,75,-36,161,52,"); - add("23,148,1,52,143,-24,50,144,-23,41,151,-15,"); - add("49,140,-25,92,92,-66,62,139,-37,37,138,-18,"); - add("72,152,-47,26,97,-13,71,122,-50,52,152,-33,"); - add("18,145,-6,101,86,-81,107,41,-89,71,113,-55,"); - add("34,134,-23,127,38,-109,89,107,-74,72,119,-59,"); - add("65,140,-53,52,131,-44,71,99,-62,80,121,-71,"); - add("70,106,-63,82,114,-75,76,109,-70,75,111,-70,"); - add("75,110,-71,75,109,-74,81,101,-79,85,91,-84,"); - add("78,102,-78,80,99,-82,85,91,-87,87,85,-89,"); - add("91,74,-94,92,69,-97,90,77,-95,89,76,-96,"); - add("78,96,-87,69,108,-80,73,103,-84,71,105,-82,"); - add("66,112,-80,64,112,-79,66,109,-81,64,110,-82,"); - add("61,115,-78,62,112,-81,49,125,-69,40,132,-62,"); - add("51,123,-73,53,119,-77,47,126,-71,43,128,-69,"); - add("38,132,-64,12,144,-39,20,142,-48,32,134,-61,"); - add("42,124,-73,44,123,-75,31,137,-65,11,140,-43,"); - add("58,113,-94,38,127,-74,30,129,-66,24,138,-63,"); - add("42,119,-80,33,131,-74,-10,152,-29,-2,147,-38,"); - add("-10,152,-31,69,73,-106,24,26,-38,-53,40,54,"); - add("-13,145,-27,-24,153,-18,-28,142,-10,15,138,-62,"); - add("-35,100,10,-105,49,113,-83,-34,112,-46,-113,93,"); - add("-75,-66,111,-89,-32,116,-91,-28,117,-82,-53,112,"); - add("-93,-32,117,-101,25,108,-98,-13,116,-83,-61,110,"); - add("-98,-19,115,-101,15,106,-96,-14,108,-74,-80,104,"); - add("-79,-74,105,-87,-57,108,-101,22,101,-113,29,108,"); - add("-91,-1,94,-84,-72,105,-85,-65,103,-86,-55,101,"); - add("-112,-5,112,-109,12,104,-102,86,77,-96,96,67,"); - add("-86,113,52,-74,136,34,-89,95,57,-99,63,75,"); - add("-117,-24,116,-43,19,34,87,98,-107,88,66,-102,"); - add("77,82,-96,-35,155,-13,-75,117,35,-92,112,52,"); - add("-100,62,73,-97,117,53,-86,83,52,-79,138,26,"); - add("-97,97,57,-109,73,73,-94,111,46,-86,117,37,"); - add("-94,110,44,-121,46,89,-92,89,49,-102,50,70,"); - add("-112,33,83,-66,134,8,-86,29,62,-21,-93,50,"); - add("-96,161,23,-64,103,15,-85,138,19,-56,143,-7,"); - add("-44,144,-19,-46,136,-16,-62,143,-5,-64,135,-2,"); - add("-76,133,7,-83,129,14,-79,109,17,-110,64,60,"); - add("-100,91,41,-122,107,49,-110,57,61,-78,129,4,"); - add("-59,140,-16,-63,146,-17,-32,132,-35,-52,137,-23,"); - add("-33,149,-44,-47,136,-28,-56,143,-27,10,76,-44,"); - add("-128,195,1,-63,134,-19,-57,131,-24,-120,83,47,"); - add("-108,96,31,-111,87,37,-134,73,59,-73,102,0,"); - add("-93,125,0,-48,134,-37,-20,153,-68,43,57,-62,"); - add("-128,103,35,-123,123,19,-84,121,-9,-82,124,-13,"); - add("-91,123,-7,-86,122,-10,-91,122,-9,-96,117,-3,"); - add("-91,122,-10,-92,124,-13,-67,126,-30,-68,124,-31,"); - add("-88,115,-12,-105,134,-13,-42,105,-39,-113,113,2,"); - add("-110,104,6,-106,108,-1,-95,114,-12,-85,119,-24,"); - add("-61,127,-45,-109,113,-7,-5,135,-88,49,1,-32,"); - add("86,-151,47,88,-107,16,114,-104,-5,80,-117,25,"); - add("65,-125,39,116,-100,-12,110,-101,-7,115,-93,-18,"); - add("134,-51,-58,42,108,-98,-38,135,-61,8,122,-86,"); - add("-7,130,-82,-17,126,-74,10,119,-87,50,-2,-33,"); - add("14,-138,84,20,-130,74,25,-132,70,-1,-137,90,"); - add("43,-69,16,141,-10,-92,115,-95,-20,98,-116,6,"); - add("97,-116,4,94,-115,6,104,-108,-7,100,-114,-2,"); - add("94,-115,2,99,-119,1,85,-103,-1,86,-96,-7,"); - add("104,-120,-6,97,-117,-3,58,-142,39,51,-108,23,"); - add("104,-121,-9,102,-81,-32,121,-53,-64,122,-83,-49,"); - add("111,-96,-33,94,-121,-7,87,-129,1,76,-122,6,"); - add("68,-99,0,98,-169,11,16,-130,55,19,-142,59,"); - add("68,-123,8,49,-139,31,60,-134,18,101,-119,-23,"); - add("83,-108,-17,97,-113,-24,110,-56,-65,124,-71,-71,"); - add("111,-91,-51,98,-97,-38,86,-115,-20,88,-136,-13,"); - add("80,-130,-9,64,-143,8,90,-117,-27,73,-128,-7,"); - add("90,-126,-26,106,-94,-54,103,-93,-53,82,-118,-25,"); - add("58,-121,-2,102,-128,-40,72,-124,-16,53,-141,8,"); - add("41,-148,20,-12,-138,64,40,-140,17,12,-117,33,"); - add("97,-176,-26,53,-134,-1,28,-110,13,65,-183,2,"); - add("74,-127,-25,29,-144,20,24,-145,25,74,-136,-27,"); - add("75,-114,-35,127,-42,-108,105,-7,-100,93,42,-104,"); - add("94,34,-103,92,9,-95,64,101,-96,81,71,-105,"); - add("62,98,-97,96,35,-111,104,10,-111,104,4,-111,"); - add("93,36,-111,90,45,-112,89,46,-113,65,93,-104,"); - add("76,71,-111,96,5,-108,94,6,-109,90,45,-118,"); - add("46,110,-96,44,108,-93,76,66,-115,80,52,-115,"); - add("89,32,-118,84,36,-116,73,67,-115,87,32,-120,"); - add("85,34,-121,80,47,-119,70,61,-116,65,68,-113,"); - add("63,83,-118,-38,151,-21,3,138,-69,50,93,-110,"); - add("72,53,-121,73,52,-121,76,43,-124,78,34,-123,"); - add("68,63,-125,69,47,-119,86,6,-123,92,-28,-116,"); - add("73,43,-127,10,133,-87,-30,138,-32,27,112,-102,"); - add("75,35,-129,79,18,-128,73,30,-126,22,110,-100,"); - add("-19,144,-57,15,115,-93,54,64,-124,69,33,-128,"); - add("80,10,-133,2,92,-61,-55,140,-5,-51,141,-14,"); - add("-17,137,-65,-21,139,-62,8,116,-95,56,-22,-73,"); - add("66,-9,-102,-3,146,-99,-3,110,-77,9,114,-100,"); - add("31,90,-120,15,102,-103,-7,124,-86,-6,121,-87,"); - add("-19,131,-74,-69,85,49,-92,72,98,-86,113,51,"); - add("-88,108,57,-85,116,46,-84,92,60,-86,26,120,"); - add("-94,38,120,-88,27,117,-94,42,114,-95,53,104,"); - add("-96,94,71,-91,110,48,-89,112,42,-81,127,16,"); - add("-63,134,-18,-55,135,-33,-63,129,-17,-35,140,-71,"); - add("-52,93,-3,-22,-178,188,-23,-89,111,-31,-81,115,"); - add("-14,-111,114,-22,-100,113,-38,-91,128,-14,-93,94,"); - add("-5,-92,80,-19,-114,115,-59,-61,127,-80,-22,127,"); - add("-96,21,114,-89,18,106,-100,6,127,-65,-24,103,"); - add("-64,-60,127,-97,15,113,-96,115,39,-70,26,69,"); - add("-65,57,41,-26,95,-37,3,161,-123,-50,136,-40,"); - add("-70,137,-16,-27,111,-52,-102,122,33,-82,23,85,"); - add("-7,-115,97,20,-126,72,18,-129,75,64,-135,22,"); - add("9,-77,45,-113,146,31,-93,140,8,-98,105,39,"); - add("-90,132,9,-23,84,-37,-31,122,-57,-81,129,-4,"); - add("-84,90,30,-110,86,63,-92,67,55,-105,120,27,"); - add("-124,79,80,-67,94,2,-102,129,12,-94,130,1,"); - add("-90,122,1,-88,113,7,-90,119,1,-95,94,26,"); - add("-62,54,23,42,90,-122,-74,158,-54,147,-35,-134,"); - add("67,37,-108,6,90,-87,-19,107,-73,55,-45,-23,"); - add("112,-93,-47,102,-43,-82,82,50,-141,100,-108,-22,"); - add("108,-111,-30,108,-99,-43,85,-130,11,92,-103,-22,"); - add("97,-111,-22,82,-131,12,93,-121,-12,100,-103,-37,"); - add("101,-51,-85,102,-25,-107,108,-63,-87,106,-94,-58,"); - add("89,-88,-41,105,-72,-78,110,-54,-100,100,-94,-55,"); - add("94,-33,-101,91,-5,-120,100,-57,-91,92,-32,-103,"); - add("48,68,-126,57,50,-127,39,69,-119,56,56,-132,"); - add("49,61,-129,83,0,-125,98,-44,-108,79,-89,-38,"); - add("83,-141,4,68,-132,15,71,-127,4,94,-116,-41,"); - add("101,-37,-127,84,-36,-101,86,-23,-117,79,-2,-127,"); - add("89,-42,-109,82,-30,-108,72,8,-130,86,-24,-124,"); - add("84,-14,-132,73,-2,-126,91,-52,-112,86,-30,-126,"); - add("85,-25,-130,53,13,-111,73,-23,-115,51,29,-124,"); - add("37,18,-89,69,19,-152,70,-4,-133,68,5,-141,"); - add("32,59,-126,66,6,-143,86,-53,-119,67,-15,-125,"); - add("51,34,-146,51,22,-136,61,1,-135,50,25,-140,"); - add("53,20,-141,20,17,-67,132,-165,-108,64,-132,8,"); - add("78,-36,-142,59,-87,-36,69,-126,-17,82,-136,-38,"); - add("70,-92,-62,67,-7,-154,61,-60,-82,52,-32,-93,"); - add("17,75,-133,9,-7,-15,4,-112,125,62,-112,-24,"); - add("74,-107,-64,77,-73,-112,72,-61,-117,65,-33,-136,"); - add("30,42,-131,32,47,-146,39,-4,-103,24,-180,155,"); - add("-30,-54,148,-31,-37,130,-49,-18,149,-33,-6,93,"); - add("89,-158,-53,73,-92,-89,77,-102,-89,74,-102,-84,"); - add("74,-110,-77,72,-96,-92,71,-77,-110,65,-51,-127,"); - add("38,23,-139,27,56,-143,17,60,-125,22,64,-145,"); - add("-8,94,-95,-34,140,-75,-74,137,55,-40,161,-91,"); - add("18,29,-95,54,-38,-120,36,-139,72,52,-115,-11,"); - add("41,-10,-118,11,-135,145,66,-140,-30,66,-125,-54,"); - add("51,-142,20,31,-133,66,38,-139,50,47,-133,11,"); - add("54,-123,-26,54,-119,-33,48,-125,-8,43,-134,15,"); - add("53,-149,-4,47,-129,-8,60,-158,-19,53,-138,-25,"); - add("50,-137,-17,51,-145,-13,54,-159,-12,35,-108,-4,"); - add("59,-160,-35,51,-123,-49,60,-131,-71,47,-113,-50,"); - add("54,-157,-34,58,-129,-77,53,-122,-70,39,-100,-44,"); - add("44,-137,-28,54,-154,-52,41,-124,-33,36,-139,-4,"); - add("48,-169,-26,36,-109,-40,52,-167,-50,45,-130,-56,"); - add("48,-119,-81,46,-117,-82,44,-128,-66,41,-123,-60,"); - add("41,-147,-44,37,-137,-39,41,-140,-55,36,-126,-51,"); - add("28,-99,-42,30,-135,-22,34,-195,-1,29,-109,-48,"); - add("35,-111,-67,47,-161,-94,39,-116,-90,40,-98,-112,"); - add("39,-50,-139,23,51,-139,15,82,-129,-5,131,-67,"); - add("-13,127,-37,4,120,-113,21,47,-142,22,41,-143,"); - add("30,-9,-149,5,5,-30,-40,53,161,-26,128,22,"); - add("-6,125,-84,-9,129,-72,-2,108,-91,25,-3,-132,"); - add("5,62,-91,-29,150,1,-28,148,-7,-38,164,28,"); - add("-23,115,1,-29,160,-28,-21,155,-68,-10,107,-78,"); - add("-19,133,-65,-27,145,-36,-29,146,-33,-32,122,17,"); - add("-28,89,40,-35,149,-13,-45,151,39,-32,147,-39,"); - add("-38,128,24,-43,146,21,-34,145,-30,-27,134,-66,"); - add("-14,110,-99,16,30,-147,14,-6,-75,1,34,-72,"); - add("-26,154,-116,-3,70,-117,24,-12,-144,7,49,-146,"); - add("-8,83,-127,-38,140,-30,-32,120,-35,-12,88,-121,"); - add("-3,64,-137,-7,76,-139,-18,89,-88,-25,114,-107,"); - add("-13,87,-134,-9,70,-133,-26,108,-106,-25,104,-102,"); - add("-30,113,-95,-28,101,-68,-28,113,-137,-21,87,-122,"); - add("-9,29,-19,-4,-10,94,-34,124,-122,27,-56,-83,"); - add("-1,45,-207,-23,87,-134,-13,53,-105,-35,116,-129,"); - add("-37,110,-67,-31,89,-47,-61,153,48,-49,129,-38,"); - add("-29,92,-116,-9,39,-146,-12,44,-145,-34,95,-113,"); - add("-49,127,-48,-29,67,32,62,-145,-77,57,-142,-11,"); - add("8,-13,-68,-14,40,-98,-52,133,-70,75,-182,-57,"); - add("-12,35,-112,-44,109,-9,33,-76,-139,-48,120,-77,"); - add("-21,54,-26,65,-162,-49,-42,106,-96,-59,144,-14,"); - add("-1,4,-21,61,-150,-42,33,-82,-72,-48,117,-129,"); - add("-48,115,-84,-57,138,37,-53,128,7,-57,134,0,"); - add("-44,104,54,-21,49,122,-39,88,132,-26,59,139,"); - add("-22,48,48,3,-3,-138,47,-107,-105,34,-78,-126,"); - add("4,-12,-148,72,-167,-24,44,-106,-87,15,-43,-144,"); - add("-5,4,-156,46,-116,-110,54,-137,-75,48,-121,-40,"); - add("56,-142,-41,52,-133,-24,53,-139,-34,45,-123,-74,"); - add("9,-27,-38,-22,59,8,54,-149,-71,38,-114,-94,"); - add("9,-30,-61,-24,61,-13,48,-135,-53,3,-16,-54,"); - add("-16,36,-44,62,-169,-7,0,-8,-58,-17,26,-129,"); - add("27,-95,-117,32,-103,-77,45,-136,-47,24,-40,146,"); - add("33,-125,-154,-37,96,-55,58,-178,-50,28,-93,-52,"); - add("48,-161,-73,39,-130,-51,43,-142,-32,38,-126,-30,"); - add("48,-147,26,49,-146,40,47,-148,37,40,-122,44,"); - add("44,-147,15,2,-29,-76,-42,117,-105,-17,42,-53,"); - add("50,-175,-19,-23,51,-92,33,-122,-32,-32,84,-84,"); - add("15,-70,-58,-15,39,-41,26,-110,-54,-39,103,-107,"); - add("-43,117,-85,-33,69,-124,-36,88,-93,-24,83,4,"); - add("-3,-54,-168,-48,120,-98,-41,123,-30,-44,128,-30,"); - add("31,-151,-129,40,-155,-57,14,-85,-92,-2,-35,-92,"); - add("56,-180,20,30,-130,-54,37,-146,-32,38,-142,-12,"); - add("37,-146,-21,27,-134,-67,33,-147,-32,30,-143,-55,"); - add("37,-155,-14,11,-70,-40,-28,99,-27,29,-160,-70,"); - add("21,-130,-68,26,-144,-58,29,-148,-37,31,-141,-4,"); - add("31,-141,3,33,-158,-10,6,-71,-55,13,-72,-15,"); - add("33,-145,19,33,-156,14,36,-130,69,29,-134,26,"); - add("26,-148,-14,2,-59,-53,-15,50,-44,39,-168,63,"); - add("27,-129,31,34,-153,54,26,-142,18,30,-145,45,"); - add("22,-137,11,7,-139,-93,-24,27,-135,5,-134,-93,"); - add("-1,-104,-102,-2,-95,-95,3,-152,-107,-7,-70,-96,"); - add("7,-124,-52,1,-114,-73,-5,-112,-101,1,-126,-77,"); - add("1,-132,-75,11,-156,-28,14,-142,-6,10,-151,-22,"); - add("7,-139,-30,-4,-115,-74,12,-146,0,3,-140,-38,"); - add("-2,-122,-58,-9,-132,-95,-10,-122,-90,-10,-121,-86,"); - add("5,-156,-18,-14,-115,-96,-23,-76,-131,-18,-93,-106,"); - add("-24,-88,-128,-27,-66,-136,-22,-98,-112,-27,-72,-129,"); - add("-28,-72,-129,-22,-96,-106,-20,-35,-86,-40,49,-157,"); - add("-22,21,-88,-26,2,-102,8,154,50,10,136,59,"); - add("11,135,65,13,138,78,24,89,116,8,136,63,"); - add("-8,153,2,-6,142,11,-5,153,23,-15,144,-22,"); - add("-16,146,-19,-9,152,15,1,137,55,5,133,70,"); - add("9,123,90,20,85,124,15,100,112,6,121,87,"); - add("16,85,115,19,71,126,11,103,109,3,127,88,"); - add("19,58,133,31,-16,146,18,68,134,12,80,121,"); - add("8,86,105,-2,133,85,-15,41,-55,3,-124,-72,"); - add("0,-49,-38,-16,196,57,-14,146,35,-16,147,32,"); - add("-2,103,72,-2,124,97,-20,150,21,-12,142,64,"); - add("29,-19,151,12,45,117,-18,149,43,-22,146,25,"); - add("-28,150,-11,-27,123,-22,-36,141,-59,-35,128,-61,"); - add("-34,150,-27,-37,143,-45,-40,134,-67,-38,133,-56,"); - add("-36,134,-38,-30,149,21,-36,144,-20,-34,137,-9,"); - add("-28,122,7,-37,54,-137,-33,23,-144,-16,-59,-160,"); - add("39,-162,-1,37,-146,12,9,-83,-52,-31,-7,-164,"); - add("-30,8,-140,-27,-21,-151,-7,-56,-96,-5,-88,-112,"); - add("-10,-97,-145,-5,-87,-105,13,-135,-73,-4,-53,-63,"); - add("29,-193,-50,21,-154,-43,-36,34,-123,-30,51,-83,"); - add("19,-149,-42,27,-125,12,-38,23,-137,-34,-36,-164,"); - add("-18,-78,-129,-9,-95,-104,-27,-58,-142,7,-100,-41,"); - add("46,-128,86,27,-147,6,26,-152,2,17,-163,-35,"); - add("12,-82,-2,-52,57,-162,-42,111,-88,-42,110,-85,"); - add("-46,58,-132,-51,62,-140,-25,121,-13,4,123,89,"); - add("-1,39,21,-18,-128,-141,-39,-14,-140,-9,147,56,"); - add("3,81,64,-30,-77,-152,4,97,73,-40,11,-127,"); - add("-6,92,40,-42,114,-68,-40,10,-127,-32,-63,-142,"); - add("-59,75,-141,-54,62,-131,-50,90,-97,-53,60,-123,"); - add("-58,91,-120,-54,71,-114,-46,100,-72,-41,93,-60,"); - add("-37,148,-13,-31,158,14,-30,109,-13,-50,117,-63,"); - add("-30,153,20,-15,138,55,-25,124,17,-34,152,15,"); - add("-28,158,39,-20,136,50,-22,134,43,-15,136,65,"); - add("-26,140,40,0,105,90,3,119,114,-8,120,83,"); - add("-7,106,75,14,94,131,14,90,130,7,80,101,"); - add("10,118,149,-10,109,83,7,95,122,-2,105,108,"); - add("-3,106,110,-15,45,-3,-38,137,29,4,83,113,"); - add("1,91,112,-17,130,97,-20,110,68,-57,138,-24,"); - add("-54,137,-16,-55,130,-24,-66,120,-76,-58,70,-105,"); - add("-72,109,-102,-57,131,-21,-57,108,-48,-36,71,-26,"); - add("-45,12,-132,-61,63,-114,-59,95,-65,-72,78,-126,"); - add("-46,24,-111,-62,43,-134,-41,48,-62,-34,60,-27,"); - add("-14,-62,-118,-10,-97,-149,-36,-22,-129,-64,65,-103,"); - add("2,-104,-116,77,-141,52,45,-140,-33,24,-120,-67,"); - add("17,-115,-77,-58,-12,-173,-57,124,-22,-18,111,74,"); - add("-26,121,63,-73,123,-61,-16,13,-28,-46,17,-105,"); - add("-78,58,-139,-50,16,-113,-62,28,-127,-75,77,-107,"); - add("-63,51,-103,-62,6,-144,-29,49,-18,-32,-36,-116,"); - add("-70,53,-111,-73,78,-93,-56,79,-47,-13,65,38,"); - add("-30,-67,-139,-58,161,33,-19,119,82,-75,112,-55,"); - add("-2,-33,-39,34,-104,-32,5,-131,-123,-1,-80,-85,"); - add("-55,26,-96,-54,54,-65,-40,45,-43,-53,30,-85,"); - add("-32,-3,-73,-87,63,-122,-50,-9,-116,-65,19,-116,"); - add("-71,17,-130,-80,46,-117,-98,116,-87,-28,51,-6,"); - add("-14,31,1,-91,99,-85,-74,32,-114,-103,87,-115,"); - add("-79,73,-82,-82,82,-76,-50,91,-8,-13,71,46,"); - add("-78,49,-99,-77,5,-139,-82,111,-44,-83,71,-82,"); - add("-64,95,-23,-62,48,-66,-44,102,22,-40,-15,-85,"); - add("-28,-6,-56,-58,141,35,-39,101,30,46,34,115,"); - add("-127,87,-137,-54,85,-10,-56,143,46,-47,-20,-103,"); - add("15,-44,-16,-73,105,-22,-90,112,-42,-64,95,-13,"); - add("-115,119,-74,-79,122,-6,-41,102,36,-5,21,13,"); - add("-83,22,-116,-94,84,-69,-101,50,-113,-20,139,110,"); - add("1,35,40,-102,57,-106,-29,101,59,-77,74,-46,"); - add("-58,12,-81,-32,114,70,67,-11,98,-159,133,-114,"); - add("-20,42,13,50,52,138,8,96,119,63,18,124,"); - add("116,-69,116,31,53,113,29,28,82,-126,35,-174,"); - add("-93,81,-63,-105,73,-90,-99,59,-93,-86,56,-77,"); - add("-34,133,99,25,76,128,10,90,123,40,56,135,"); - add("4,74,95,73,9,136,76,5,137,5,99,132,"); - add("-36,38,-15,11,-124,-136,-72,8,-113,-84,29,-107,"); - add("-24,-78,-135,-62,-21,-130,-51,-42,-133,-70,17,-93,"); - add("-12,121,124,7,78,105,-13,101,103,33,74,145,"); - add("-62,121,49,-41,121,84,-33,114,91,-36,114,88,"); - add("-44,117,81,-44,121,87,19,71,130,38,52,136,"); - add("15,79,139,1,59,85,-94,108,-13,-104,105,-34,"); - add("-115,101,-56,-91,70,-58,-105,97,-40,-64,75,-3,"); - add("-66,-10,-127,-103,105,-21,-82,81,-20,-136,62,-137,"); - add("-76,32,-78,-125,58,-119,-47,-24,-109,-91,71,-42,"); - add("-94,124,27,58,52,166,74,-12,100,64,25,141,"); - add("39,56,147,23,65,135,97,-31,118,88,-61,57,"); - add("129,-98,73,102,-82,52,80,-6,131,25,59,137,"); - add("-74,118,55,-84,108,19,-38,109,106,59,10,125,"); - add("65,14,144,24,51,131,-22,92,115,-74,112,52,"); - add("-105,109,-13,-101,67,-74,-37,-43,-143,-102,33,-130,"); - add("-65,19,-86,-133,124,-31,-106,97,-22,-106,68,-72,"); - add("-105,53,-95,-110,54,-98,-106,87,-34,-134,101,-57,"); - add("-102,77,-41,-78,4,-122,-71,-5,-122,0,-91,-149,"); - add("60,-97,-60,113,-96,28,108,-82,42,123,-93,52,"); - add("88,-91,0,-19,-77,-152,136,-111,47,93,-79,32,"); - add("-144,58,-147,-113,62,-85,-115,90,-44,-111,61,-81,"); - add("-113,56,-91,-106,46,-91,-97,31,-101,-93,3,-134,"); - add("-105,44,-89,-1,-105,-155,-62,-37,-142,-27,-60,-125,"); - add("94,-121,-38,106,-109,-4,-1,-61,-85,-7,-28,-51,"); - add("120,-40,116,118,-122,0,52,-66,-17,-29,-65,-130,"); - add("-35,-59,-128,-109,51,-83,-59,-48,-147,-101,-1,-137,"); - add("24,-67,-55,65,-148,-103,37,-87,-62,39,-74,-39,"); - add("87,11,130,88,-84,13,26,-142,-142,57,-118,-69,"); - add("16,-93,-91,119,-132,1,112,-116,12,74,-115,-36,"); - add("25,-109,-94,66,-86,-11,-7,-85,-108,-97,52,-70,"); - add("-111,45,-94,-37,-21,-73,-70,78,-3,-81,57,-40,"); - add("-112,37,-103,-90,-7,-121,-106,68,-57,-97,-5,-126,"); - add("-126,95,-48,-86,98,4,-101,132,28,-28,89,67,"); - add("-63,130,74,-78,121,47,-64,123,66,-43,115,85,"); - add("-18,107,106,-15,103,109,-2,97,117,-18,104,107,"); - add("-29,108,102,-13,98,110,27,76,134,18,79,126,"); - add("-3,85,110,-93,116,36,-98,88,-8,-119,65,-63,"); - add("-108,31,-97,-125,72,-58,-123,70,-58,-122,86,-33,"); - add("-120,63,-62,-97,76,-14,-88,121,59,-57,107,81,"); - add("-116,101,0,-118,89,-16,-123,77,-37,-113,40,-77,"); - add("-117,100,6,-124,41,-85,-107,85,-3,-127,95,-8,"); - add("-61,9,-56,-24,-24,-61,-64,8,-58,50,-110,-99,"); - add("-88,-27,-132,-63,-35,-115,-145,38,-102,-118,38,-73,"); - add("-132,67,-45,-131,59,-55,-129,67,-41,-130,83,-18,"); - add("-121,80,-12,-106,90,18,-121,90,6,-129,72,-29,"); - add("-123,89,5,-125,84,-4,-126,85,-1,-132,74,-20,"); - add("-129,82,-5,-128,80,-6,-125,85,6,-114,92,27,"); - add("-114,91,26,-109,100,45,-119,88,21,-131,79,0,"); - add("-116,93,34,-120,89,25,-134,76,-3,-132,74,-3,"); - add("-118,84,25,-97,100,66,-71,79,59,-102,100,66,"); - add("-105,106,75,-63,93,90,-75,74,54,-61,108,117,"); - add("-79,93,83,-110,89,51,-105,100,74,-107,80,43,"); - add("-132,75,15,-109,82,47,-36,61,73,-24,76,107,"); - add("-79,91,89,19,67,129,-18,21,21,-106,11,-66,"); - add("-41,73,92,32,53,118,48,67,155,-14,78,128,"); - add("23,66,140,68,17,87,116,-7,88,92,-13,56,"); - add("94,-97,-96,121,-86,-49,36,8,46,-84,73,57,"); - add("198,-81,31,88,15,107,-139,99,55,-15,57,95,"); - add("-48,44,39,132,-65,-1,101,-71,-41,56,19,90,"); - add("-109,95,76,-84,83,80,0,44,86,127,-10,101,"); - add("86,14,110,30,54,137,-139,80,23,-137,46,-42,"); - add("-135,61,-7,-136,58,-12,-136,51,-26,-136,54,-17,"); - add("-142,64,0,-143,71,15,-119,71,38,-139,69,17,"); - add("-130,52,-6,-149,58,-10,-141,57,-1,-142,57,-2,"); - add("-125,55,9,-115,77,66,-138,60,13,-145,46,-19,"); - add("-135,63,25,-131,63,30,-145,46,-15,-144,29,-48,"); - add("-126,9,-75,-131,2,-89,-103,-2,-78,-145,8,-85,"); - add("-73,-25,-101,-59,-25,-91,-125,51,20,-111,-21,-115,"); - add("-110,-10,-90,-144,20,-50,-93,-27,-111,-87,54,54,"); - add("-145,67,47,-122,0,-72,-96,-31,-117,-70,-24,-85,"); - add("-163,1,-89,-50,-59,-140,-12,-32,-67,158,-11,64,"); - add("80,-49,-49,-105,-24,-102,-154,32,-21,-130,-6,-79,"); - add("-155,53,20,-111,-1,-57,-135,-2,-70,-150,10,-52,"); - add("-53,63,93,122,17,89,33,27,67,-87,73,97,"); - add("-111,65,72,-127,62,59,-142,49,30,-136,52,41,"); - add("-111,67,81,-142,54,45,-96,68,93,-145,51,42,"); - add("-138,21,-15,-134,3,-48,-143,18,-19,-112,-14,-72,"); - add("-69,-19,-64,-127,17,-11,106,-88,-136,73,-56,-82,"); - add("-17,-66,-133,-14,-67,-133,-156,43,26,-129,56,62,"); - add("-127,53,61,-121,47,50,-165,41,27,-100,5,-21,"); - add("-39,83,150,-67,73,125,-70,56,90,-158,25,6,"); - add("-138,1,-37,-115,-32,-97,-19,-22,-49,170,0,48,"); - add("129,-52,-68,49,-72,-127,69,-67,-110,37,-63,-111,"); - add("81,-63,-95,66,-61,-96,131,-36,-28,169,-43,-28,"); - add("150,-47,-39,90,-65,-90,128,-53,-54,120,-61,-71,"); - add("138,-48,-39,123,-61,-65,132,-58,-56,91,-73,-96,"); - add("134,-71,-75,115,-51,-44,139,-53,-37,119,-52,-43,"); - add("159,-20,30,145,-37,-3,85,-30,-17,36,-84,-128,"); - add("117,-79,-83,122,-58,-44,106,-49,-36,109,-94,-106,"); - add("82,-82,-98,75,-82,-101,65,-85,-107,62,-85,-108,"); - add("41,-87,-117,33,-86,-120,30,-89,-123,20,-86,-123,"); - add("25,-88,-120,33,-89,-119,32,-90,-118,34,-90,-117,"); - add("22,-90,-119,-12,-73,-110,29,-103,-133,32,-93,-116,"); - add("50,-95,-109,14,-91,-119,-30,-84,-125,-195,88,36,"); - add("-121,70,44,-137,65,33,-119,79,60,-98,87,82,"); - add("-56,82,91,-57,83,96,-59,73,80,-205,54,-2,"); - add("-151,27,-18,-78,5,-23,-22,101,138,-37,90,117,"); - add("-88,84,91,-127,63,47,-135,56,35,-139,6,-38,"); - add("-140,1,-47,-134,70,61,5,81,122,17,78,125,"); - add("-41,86,117,-89,79,93,-98,75,85,-119,64,62,"); - add("-100,19,-1,17,-95,-143,-132,50,38,-20,87,131,"); - add("47,56,102,18,68,116,-29,86,130,-106,66,74,"); - add("-66,73,102,130,32,94,103,-30,-19,47,77,145,"); - add("-70,79,111,-99,71,90,-128,63,68,-114,62,73,"); - add("-87,70,95,-55,78,123,-97,68,93,-121,24,7,"); - add("-147,9,-24,-105,-31,-85,-80,65,96,-168,46,39,"); - add("-100,19,9,53,-101,-168,-37,-29,-61,-127,65,85,"); - add("-121,58,77,-134,29,22,-156,25,12,-144,-2,-33,"); - add("-137,-3,-32,-103,-67,-138,-35,-62,-117,-94,-9,-32,"); - add("-79,89,144,-103,42,58,-147,52,71,-131,39,52,"); - add("-94,50,77,-110,45,69,-88,41,63,-145,58,91,"); - add("-135,28,39,-149,33,45,-154,42,67,-110,29,47,"); - add("-142,33,52,-122,43,75,-88,36,65,-48,26,48,"); - add("-79,-44,-90,-151,-18,-40,-139,-29,-58,-91,10,17,"); - add("-85,59,112,37,70,137,32,61,121,79,42,84,"); - add("57,43,89,16,96,195,36,62,129,70,9,19,"); - add("137,40,90,51,50,108,169,-17,-27,36,11,26,"); - add("61,36,80,155,-21,-32,83,-6,-5,-231,34,53,"); - add("-136,-5,-19,-97,17,29,72,29,68,-155,-33,-80,"); - add("-91,-42,-93,-163,-15,-36,-124,23,46,-123,34,71,"); - add("-112,47,100,-74,53,114,-24,59,131,77,57,126,"); - add("-49,54,121,-99,29,69,-108,-6,-12,54,-64,-146,"); - add("-67,-63,-139,-79,-39,-84,-150,6,20,-139,16,41,"); - add("-148,-25,-46,-76,-52,-109,-43,-62,-131,-129,-32,-58,"); - add("-159,-30,-48,-105,-46,-87,-124,-6,0,-30,8,22,"); - add("-73,-24,-43,-57,44,101,39,66,136,-102,62,146,"); - add("30,32,67,11,49,105,29,27,57,-151,-27,-39,"); - add("-117,24,70,16,27,60,-138,-5,10,-65,55,136,"); - add("-33,35,84,122,35,61,121,49,94,115,44,86,"); - add("113,41,79,158,6,-6,124,3,-8,183,20,27,"); - add("23,-15,-38,-80,-60,-133,-18,-46,-105,10,-32,-75,"); - add("86,19,35,82,53,115,21,61,141,16,64,151,"); - add("76,33,75,102,59,134,129,33,73,138,35,80,"); - add("111,28,63,105,29,69,121,41,101,115,40,102,"); - add("82,18,44,870,23,91,110,40,114,77,23,70,"); - add("168,28,91,133,20,70,114,30,98,147,9,46,"); - add("-90,27,62,141,13,57,73,-15,-30,53,-51,-132,"); - add("-19,-34,-96,-41,-51,-145,15,-49,-127,95,-34,-73,"); - add("169,5,42,52,49,140,124,28,99,17,53,147,"); - add("69,28,93,171,-33,-53,144,4,48,140,8,58,"); - add("131,12,67,113,11,64,150,-6,27,138,-14,5,"); - add("138,-42,-71,49,-51,-127,60,-54,-127,76,-29,-53,"); - add("-71,79,190,-14,52,140,1,50,144,110,25,109,"); - add("-28,52,141,-81,43,99,-8,49,144,48,39,136,"); - add("93,26,116,113,17,100,135,5,72,150,-3,56,"); - add("113,-7,29,162,-13,33,146,-15,25,140,-3,62,"); - add("52,28,120,-7,49,156,114,7,87,44,10,60,"); - add("14,38,140,41,25,111,-150,31,21,30,35,144,"); - add("94,17,120,126,4,94,139,-28,-16,135,-41,-62,"); - add("151,-29,-4,25,19,88,-141,35,31,-58,13,9,"); - add("14,-26,-86,-127,49,98,155,0,104,71,5,70,"); - add("-208,7,-117,-46,10,7,91,20,141,98,13,115,"); - add("101,9,110,114,4,102,96,10,117,95,1,79,"); - add("109,-40,-76,133,-7,81,117,-41,-68,-35,-14,-89,"); - add("120,-42,-66,96,-58,-148,89,0,74,65,10,99,"); - add("130,-44,-61,71,-13,15,25,41,188,42,22,129,"); - add("122,-11,72,140,-30,16,82,17,155,-11,36,147,"); - add("11,19,96,183,-61,-70,112,-43,-66,155,-51,-47,"); - add("84,-4,77,16,27,138,-14,31,125,-75,53,155,"); - add("-80,36,74,-32,23,74,-15,35,154,-25,35,141,"); - add("72,0,99,109,-54,-133,105,-45,-94,50,-21,-34,"); - add("-128,64,153,-73,48,147,30,17,135,-15,32,149,"); - add("18,21,148,53,10,136,28,19,158,37,11,129,"); - add("65,4,136,47,-2,67,-5,36,232,-126,44,76,"); - add("38,14,176,36,11,147,59,2,141,104,-14,111,"); - add("123,-27,48,138,-42,-32,187,-62,-75,-42,18,54,"); - add("-141,44,29,-118,42,81,-131,41,52,-47,24,99,"); - add("100,-12,127,-67,31,125,69,-3,154,111,-34,-29,"); - add("-3,-9,-99,147,-28,121,100,-20,81,90,-18,85,"); - add("77,-8,160,91,-20,75,130,-34,57,-12,7,30,"); - add("-147,40,-39,-126,31,-55,-140,35,-59,-92,16,-109,"); - add("-133,32,-52,-138,31,-73,-128,32,-25,-139,29,-69,"); - add("-131,24,-93,-135,29,-56,-140,29,-51,-155,38,9,"); - add("-68,29,120,-52,14,26,-2,-10,-105,-127,37,72,"); - add("-73,28,119,-80,32,142,-82,30,140,29,5,136,"); - add("51,1,149,91,-14,95,46,-1,124,-187,43,23,"); - add("2,10,158,-32,14,112,-177,35,-56,-60,23,186,"); - add("83,-11,131,135,-25,77,148,-30,61,135,-30,13,"); - add("142,-36,-57,44,-12,-44,21,3,184,63,-11,92,"); - add("147,-40,-107,144,-35,15,202,-54,-65,-73,21,54,"); - add("-123,32,26,-149,37,6,-32,13,130,106,-21,127,"); - add("51,-9,130,-27,8,64,-59,17,91,33,-5,135,"); - add("77,-18,95,108,-26,130,55,-13,135,48,-11,147,"); - add("66,-18,128,103,-27,104,85,-24,134,147,-41,64,"); - add("19,-6,68,15,-5,55,129,-34,-105,26,-8,31,"); - add("25,-8,70,136,-36,-112,129,-37,-45,103,-32,103,"); - add("80,-25,120,132,-38,-81,21,-7,3,-143,41,91,"); - add("-118,37,-84,-104,31,-37,37,-15,193,1,-4,148,"); - add("12,-8,152,-17,-1,153,3,-8,154,55,-21,114,"); - add("136,-42,33,138,-40,-30,143,-45,34,130,-38,-51,"); - add("84,-20,-134,141,-43,-46,99,-28,-115,139,-44,-30,"); - add("133,-47,62,126,-43,4,155,-52,-32,141,-50,9,"); - add("67,-29,129,-217,78,-48,-91,30,49,147,-56,97,"); - add("75,-27,24,-208,74,-46,-143,50,-14,-108,40,-86,"); - add("-122,44,-87,-69,19,95,-20,-1,153,-144,42,95,"); - add("-91,26,69,-105,27,110,-56,9,142,31,-19,141,"); - add("84,-28,24,106,-34,10,-98,21,131,30,-19,134,"); - add("148,-48,3,117,-31,-89,78,-17,-117,122,-36,-74,"); - add("69,-22,-14,-138,31,215,-60,10,119,-78,16,122,"); - add("-115,38,-4,-151,50,-18,-124,44,-71,-124,43,-54,"); - add("-144,45,-14,-64,14,67,179,-57,30,125,-44,67,"); - add("52,-28,137,63,-31,126,126,-49,95,144,-44,-27,"); - add("145,-47,-12,144,-46,-26,122,-48,68,107,-46,95,"); - add("131,-53,64,136,-49,11,136,-52,28,89,-28,-48,"); - add("36,2,-152,-16,20,-148,86,-19,-130,104,-30,-102,"); - add("111,-37,-68,140,-53,-1,120,-48,13,104,-50,107,"); - add("129,-49,-15,73,-19,-133,41,-13,-37,-39,1,179,"); - add("-129,44,82,-136,57,-40,-129,53,-27,-126,47,10,"); - add("-142,50,53,-63,13,112,8,-18,149,45,-31,143,"); - add("136,-57,59,142,-53,-20,138,-57,23,102,-50,93,"); - add("82,-46,121,126,-59,66,78,-45,115,43,-35,140,"); - add("57,-39,119,74,-46,108,-89,19,130,-46,-2,147,"); - add("-88,19,119,-113,31,99,-93,46,-59,72,-8,-137,"); - add("102,-28,-92,11,18,-161,-96,49,-74,-84,51,-134,"); - add("-94,51,-104,-79,46,-124,-107,51,-78,-132,56,-46,"); - add("-104,51,-100,-143,47,58,-132,44,48,-138,54,-39,"); - add("-127,51,-45,-138,54,-54,-142,53,-26,-121,47,-58,"); - add("-126,49,-59,-139,50,-36,-135,41,25,-146,45,24,"); - add("-107,44,-100,-115,44,-86,-124,45,-74,-148,49,-40,"); - add("-125,31,66,-83,14,108,-48,-1,147,-42,-1,123,"); - add("116,-48,130,127,-47,76,124,-46,79,112,-45,93,"); - add("74,-39,124,41,-31,146,95,-43,99,120,-41,17,"); - add("125,-39,-7,123,-50,70,110,-45,58,111,-53,108,"); - add("78,-23,-21,122,-24,-128,143,-52,19,146,-46,-48,"); - add("73,-19,-46,128,-61,101,66,-43,127,-160,48,75,"); - add("-148,45,55,-120,29,88,-120,29,81,-122,25,107,"); - add("-140,42,39,-122,26,88,-106,18,107,-87,7,124,"); - add("-101,13,115,-20,-16,122,55,-38,110,148,-51,18,"); - add("124,-43,8,82,-56,149,10,-26,114,62,-41,104,"); - add("-119,33,37,-113,55,-90,-93,27,22,4,-32,149,"); - add("-4,-32,163,-60,-8,131,-85,3,112,-35,-21,147,"); - add("41,-47,149,-77,-2,113,-87,20,38,-90,56,-120,"); - add("-88,48,-90,-8,17,-64,-53,-20,162,-10,-31,147,"); - add("55,-34,69,-14,-15,81,-74,-7,122,-44,-22,144,"); - add("-2,-43,171,-14,-29,128,-19,-34,149,-41,-25,138,"); - add("26,-38,109,85,-58,111,53,-51,120,-70,-19,143,"); - add("-68,2,64,-159,44,17,-135,42,-6,-111,47,-48,"); - add("-14,46,-145,77,18,-141,3,26,-96,-128,49,-44,"); - add("-150,49,-21,-141,24,57,-100,-4,114,-90,-3,96,"); - add("222,-83,76,62,-44,91,74,-55,118,90,-69,142,"); - add("142,-41,0,117,-61,82,66,-54,112,64,-59,127,"); - add("39,-38,80,-114,24,35,-160,55,-21,-116,7,85,"); - add("-21,-50,172,-30,-38,141,-44,-33,136,-18,-44,143,"); - add("15,-50,132,125,-58,61,134,-55,39,87,-65,108,"); - add("-108,-7,111,-171,30,57,-122,8,76,-161,52,-16,"); - add("-157,32,34,-14,-54,156,100,-54,67,150,-56,35,"); - add("136,-17,-59,121,-76,104,-62,-35,139,-143,18,62,"); - add("-138,38,4,-140,47,-18,-139,20,48,-134,64,-69,"); - add("-83,61,-101,-108,57,-75,-77,52,-85,-35,66,-152,"); - add("-97,53,-78,-153,45,-17,-139,35,-4,-122,43,-38,"); - add("-145,48,-39,-131,50,-55,-35,17,-25,137,-22,-26,"); - add("172,-52,33,120,-16,-36,126,-23,-20,163,-31,-28,"); - add("144,-22,-41,137,-12,-66,138,-19,-52,141,-23,-41,"); - add("122,-3,-88,89,17,-123,62,29,-135,27,39,-143,"); - add("-8,50,-143,-36,54,-137,-97,54,-86,-118,58,-80,"); - add("-129,45,-36,-124,35,-5,-133,33,4,-164,34,26,"); - add("-107,20,20,-188,54,-27,-146,34,0,-150,34,3,"); - add("-145,30,10,-127,8,63,-145,14,55,-85,-11,92,"); - add("-32,-14,67,-106,45,-73,-137,20,24,-42,26,-57,"); - add("73,11,-81,-168,22,37,-53,-27,118,-158,15,48,"); - add("-68,-6,58,-88,16,1,-103,34,-50,-68,18,-19,"); - add("189,-4,-93,63,34,-146,-88,35,-63,-131,25,-8,"); - add("-159,26,8,-61,-27,121,26,-41,118,15,-28,81,"); - add("-100,59,-136,-39,43,-117,-48,35,-90,-92,-13,92,"); - add("24,-50,148,-47,-22,93,-103,51,-111,-30,-54,187,"); - add("-4,-45,141,-43,-10,52,-44,57,-156,-3,55,-172,"); - add("-113,9,23,-46,-29,115,-20,-42,140,-51,-43,155,"); - add("-8,-37,114,-142,27,-21,-138,10,25,3,-21,63,"); - add("99,-27,38,1,-24,71,-133,8,28,-51,-34,119,"); - add("20,-39,105,-49,-14,57,-19,63,-172,-63,18,-30,"); - add("3,-52,148,-27,-6,29,-81,38,-80,-1,-47,132,"); - add("41,-28,66,-100,12,0,-57,-14,60,-78,-50,161,"); - add("19,-50,132,-110,-31,118,37,-32,72,121,-13,-3,"); - add("-55,-17,61,-119,-5,51,22,-32,75,-8,-30,81,"); - add("-128,34,-51,-13,-34,92,-68,-38,115,104,-25,35,"); - add("-22,-38,101,-97,-8,46,10,-31,75,96,-15,11,"); - add("-150,-26,102,-89,-41,122,-29,-49,124,-5,-59,142,"); - add("102,-25,34,-142,-35,113,-11,-42,101,-17,-61,141,"); - add("32,-65,140,-65,-49,121,-116,-25,80,-12,-22,49,"); - add("74,4,-24,-32,-65,149,-87,-22,64,-107,-19,61,"); - add("-74,-53,125,-30,-54,117,-20,-47,102,103,-40,63,"); - add("121,38,-100,11,45,-95,83,15,-48,-5,-52,109,"); - add("-74,-49,115,-125,-37,99,-78,21,-28,-105,24,-32,"); - add("-65,-36,84,-117,-54,126,-12,-43,88,3,-20,39,"); - add("-93,17,-21,40,-36,67,-187,32,-38,-68,-35,77,"); - add("142,-19,19,44,-6,7,-107,-31,73,-170,5,11,"); - add("-38,-29,61,138,-35,51,19,-30,56,-139,30,-41,"); - add("-26,-22,45,-79,-18,43,-10,-20,39,-119,5,2,"); - add("-73,-15,35,51,-34,60,135,-9,4,88,-13,15,"); - add("-204,6,8,-58,-54,107,41,-62,111,-12,-60,111,"); - add("165,3,-22,141,9,-30,81,9,-26,121,5,-25,"); - add("46,10,-23,-65,-71,137,-113,15,-13,-165,6,8,"); - add("-137,-10,31,-71,-39,77,44,-55,96,56,-52,87,"); - add("-60,-51,95,76,-8,8,32,-7,9,58,-30,46,"); - add("91,74,-140,133,14,-40,-101,-58,115,-116,-74,141,"); - add("22,-36,61,36,-9,12,-128,-39,79,-45,-62,111,"); - add("96,-4,-3,89,24,-50,69,16,-36,-27,-68,119,"); - add("-8,-73,125,52,-14,17,-163,-5,26,-11,-80,133,"); - add("113,-56,81,164,-41,48,93,-44,62,120,-27,28,"); - add("139,12,-38,114,32,-68,113,56,-108,91,75,-138,"); - add("71,50,-95,85,48,-96,129,23,-62,16,79,-137,"); - add("-21,60,-100,45,39,-76,43,-102,168,100,-60,85,"); - add("86,-42,54,22,-91,149,77,-82,121,102,-39,44,"); - add("30,-102,160,52,-68,100,79,-76,105,81,-75,101,"); - add("100,-72,92,107,-82,103,-20,-80,129,43,-77,108,"); - add("97,-78,95,31,-91,130,152,-23,-2,139,15,-55,"); - add("85,37,-78,-46,84,-116,82,66,-121,93,34,-76,"); - add("140,2,-42,120,7,-44,27,94,-155,33,71,-122,"); - add("-10,85,-133,-17,82,-129,-22,77,-118,-36,75,-113,"); - add("0,71,-119,-42,78,-120,-84,51,-62,-18,8,-8,"); - add("158,11,-67,92,44,-104,59,43,-94,109,50,-124,"); - add("-4,43,-75,-166,-24,98,-135,18,11,-144,30,-10,"); - add("-87,17,-4,167,12,-72,119,0,-37,2,31,-55,"); - add("149,-74,84,81,29,-78,74,63,-140,-30,63,-103,"); - add("-137,64,-72,-118,56,-65,-130,36,-23,-116,42,-42,"); - add("-64,75,-122,-41,74,-128,-29,75,-135,10,49,-99,"); - add("-15,80,-154,-40,69,-124,76,46,-118,-7,57,-113,"); - add("69,41,-108,71,47,-122,85,54,-144,93,36,-111,"); - add("75,31,-94,48,61,-151,27,60,-142,7,54,-123,"); - add("-98,55,-87,11,62,-146,-33,63,-135,49,45,-126,"); - add("-1,19,-44,43,11,-45,45,31,-92,136,-8,-38,"); - add("142,2,-68,121,-7,-38,168,-56,59,69,-63,119,"); - add("54,-65,129,-102,-29,116,-19,-59,146,-32,-54,138,"); - add("-35,-54,138,-50,-50,131,-57,-41,114,-34,-55,135,"); - add("-52,-49,125,-61,-30,89,-21,-65,145,24,-66,128,"); - add("78,-59,90,58,-76,131,98,-70,104,39,-58,98,"); - add("35,-86,155,29,-67,119,95,-70,98,126,-32,10,"); - add("161,-43,16,118,-28,2,88,-64,85,11,-26,43,"); - add("80,38,-106,156,9,-87,89,28,-93,101,21,-88,"); - add("125,31,-120,87,26,-94,91,14,-71,143,6,-86,"); - add("115,7,-74,136,12,-97,132,-76,79,140,-29,-19,"); - add("134,-20,-36,62,-45,55,-190,9,90,-75,-38,116,"); - add("-100,-25,103,-13,-67,136,-131,-8,83,-145,16,45,"); - add("-146,21,32,-137,6,55,-107,-24,97,-117,-9,71,"); - add("-105,-33,110,-98,-41,117,21,-66,111,73,-68,92,"); - add("97,-88,114,158,-25,-26,66,-81,113,35,-79,122,"); - add("68,-81,109,16,-74,121,-89,-48,120,-143,29,13,"); - add("-109,73,-77,-134,61,-47,-107,36,-17,-124,-37,114,"); - add("-48,-64,126,16,-80,128,-34,-71,129,31,-93,141,"); - add("30,-73,105,61,-83,110,66,-83,105,74,-87,106,"); - add("34,-78,107,-27,-60,104,-107,38,-18,47,87,-152,"); - add("-16,52,-75,-34,-119,198,-91,-45,103,-86,-36,85,"); - add("-11,-86,133,-87,-52,109,-140,-7,59,-122,57,-43,"); - add("-29,57,-75,-218,21,39,-130,-21,74,-112,-40,93,"); - add("-111,-38,89,-63,-56,100,-148,-32,88,-129,-25,72,"); - add("-126,-32,78,-132,-15,55,-87,9,10,190,-58,34,"); - add("-36,-31,53,-140,41,-22,-103,81,-90,-133,38,-21,"); - add("-139,51,-42,-94,-4,27,-136,-64,122,-128,-38,80,"); - add("-91,-22,48,-108,37,-30,-13,81,-112,-199,13,18,"); - add("-104,55,-58,-90,68,-83,-50,40,-48,-25,89,-125,"); - add("1,91,-135,42,64,-102,84,60,-105,60,68,-113,"); - add("96,51,-97,-95,45,-50,-102,33,-33,-46,108,-159,"); - add("68,72,-125,-33,84,-128,-29,28,-39,-132,-44,93,"); - add("-66,-71,124,-120,-33,72,-139,-21,54,-71,-78,132,"); - add("72,-25,27,91,85,-145,98,9,-30,90,-10,1,"); - add("-70,-93,155,-18,-17,29,-92,29,-29,-109,-42,80,"); - add("-76,-38,70,13,-54,79,32,-90,131,5,-98,145,"); - add("84,-39,46,72,-99,134,40,-83,114,75,-76,97,"); - add("-8,-64,92,19,-48,65,63,-79,100,137,-58,59,"); - add("59,-44,51,-210,58,-47,-104,-26,52,-25,-83,118,"); - add("-102,23,-17,-129,39,-35,-146,-27,55,4,-80,109,"); - add("-47,-11,21,-127,39,-37,-147,-12,32,-140,-28,53,"); - add("-93,-63,94,-127,-54,83,-74,-49,71,-18,-91,121,"); - add("-46,-85,114,-90,-78,108,-68,-65,87,16,-45,57,"); - add("47,-36,41,-117,-21,35,128,-38,39,-230,4,9,"); - add("-135,-41,59,-128,-49,67,-143,-27,39,-139,-41,56,"); - add("-32,-93,115,6,-98,119,-35,-60,72,-123,-64,80,"); - add("-144,-29,37,-135,-47,56,-12,-90,106,-152,-52,60,"); - add("-149,15,-18,-155,15,-20,-86,84,-100,-162,-7,4,"); - add("52,-114,135,32,-91,106,9,-114,130,-161,-25,24,"); - add("-133,4,-10,-139,-10,5,-111,74,-90,-151,-18,12,"); - add("-136,-26,20,-161,-16,8,-72,-73,77,57,-63,75,"); - add("-53,-87,93,137,-50,67,137,-19,29,162,-32,46,"); - add("100,-45,55,119,-19,27,91,-75,85,133,-37,45,"); - add("-30,-117,125,67,-94,103,85,-65,71,146,-61,67,"); - add("44,-104,109,-9,-94,97,103,-89,93,52,-99,101,"); - add("23,-57,57,-115,142,-145,-71,-3,2,-22,-109,110,"); - add("-19,-107,106,14,-78,78,-40,-136,133,-28,-107,103,"); - add("-32,-106,101,-74,-99,92,-138,-42,35,-146,0,-5,"); - add("-143,33,-37,-142,-16,8,-151,34,-42,-139,-3,-6,"); - add("-172,-22,9,-145,9,-21,-145,24,-35,-138,23,-34,"); - add("-148,23,-37,-159,-13,-4,-147,-4,-14,-148,-5,-12,"); - add("-141,50,-67,-128,15,-31,-139,-42,21,-62,-79,67,"); - add("-211,-45,10,-123,-56,35,-32,-88,78,77,-89,95,"); - add("53,-76,79,-2,-93,86,-45,-126,108,-2,-102,92,"); - add("2,-115,103,22,-108,99,-27,-115,98,-8,-54,45,"); - add("-83,-186,148,-46,-98,76,-66,-108,81,-83,-102,72,"); - add("-64,-84,59,-44,-119,91,19,-93,79,126,53,-22,"); - add("61,39,-23,-122,-131,87,47,-63,58,109,-10,26,"); - add("-38,-152,115,-1,-121,95,-19,-114,86,-49,-117,83,"); - add("18,-67,55,169,15,14,153,-25,40,133,6,14,"); - add("142,54,-22,157,13,10,84,-19,25,121,-86,80,"); - add("70,-67,58,30,-135,104,79,-114,93,127,-64,60,"); - add("128,33,-12,92,101,-65,140,50,-25,138,39,-17,"); - add("123,56,-33,151,11,3,151,-8,16,148,11,0,"); - add("152,-13,18,134,36,-21,159,-4,9,106,95,-67,"); - add("69,112,-83,114,78,-56,141,35,-24,133,37,-26,"); - add("39,115,-89,58,119,-92,90,88,-69,131,65,-52,"); - add("61,86,-69,-122,102,-82,-43,111,-91,13,111,-91,"); - add("73,102,-84,87,93,-79,93,91,-77,81,100,-86,"); - add("77,60,-52,88,121,-106,134,42,-40,147,33,-32,"); - add("144,32,-34,110,76,-70,132,56,-56,124,59,-59,"); - add("73,90,-85,0,111,-100,-56,113,-101,-23,112,-102,"); - add("34,91,-87,120,73,-76,120,69,-72,103,22,-29,"); - add("168,-48,33,114,8,-17,115,-6,-4,128,-73,57,"); - add("153,-46,29,141,-6,-10,144,54,-67,82,80,-86,"); - add("112,69,-80,121,50,-63,145,31,-49,99,69,-81,"); - add("80,84,-95,121,57,-75,149,-25,2,134,-51,28,"); - add("136,-50,26,130,-60,35,52,-105,93,70,-99,83,"); - add("55,-106,91,69,-75,59,122,-75,47,102,-99,73,"); - add("141,-44,13,116,-90,59,127,-69,37,105,-88,57,"); - add("126,-83,47,135,-58,22,123,-28,-3,147,-15,-22,"); - add("126,-70,33,105,-88,52,132,-70,28,155,-24,-19,"); - add("74,-117,83,113,-80,41,135,-26,-15,107,-79,39,"); - add("69,-110,75,82,-106,67,60,-114,80,26,-104,80,"); - add("-78,-77,86,-23,-114,101,-26,-99,88,115,-56,13,"); - add("83,65,-77,68,93,-96,53,91,-91,-1,112,-93,"); - add("128,48,-79,49,65,-70,-51,122,-89,-128,78,-28,"); - add("-125,71,-24,8,117,-104,39,103,-103,86,76,-94,"); - add("104,-33,-2,164,-45,-12,114,-71,26,89,-93,54,"); - add("97,12,-43,-10,118,-102,-113,94,-46,-123,78,-31,"); - add("-144,57,-5,-133,65,-17,-139,59,-10,-143,42,4,"); - add("-142,49,-3,-141,79,-31,14,125,-120,-172,27,24,"); - add("-145,1,39,-142,41,0,-124,69,-32,-127,77,-40,"); - add("-115,84,-50,-80,101,-77,-62,107,-87,-76,104,-82,"); - add("-102,74,-48,-137,65,-31,-133,63,-32,-126,69,-40,"); - add("-81,97,-79,-38,109,-101,34,91,-101,-89,117,-101,"); - add("60,86,-102,128,30,-60,109,51,-79,144,-3,-31,"); - add("37,-68,62,12,-104,106,70,-91,77,105,-36,12,"); - add("54,87,-104,82,59,-82,137,-74,40,56,-99,89,"); - add("72,-97,79,123,-77,46,1,-51,51,118,-122,90,"); - add("134,-72,34,107,-73,41,151,-4,-39,153,-49,1,"); - add("130,-72,32,136,-74,30,31,-32,22,-122,21,18,"); - add("213,-65,-5,139,-55,9,144,-73,23,103,-35,-1,"); - add("148,-91,37,112,-86,43,138,-77,24,-10,-96,95,"); - add("35,-112,91,22,-110,94,18,-133,116,33,-91,71,"); - add("140,-97,36,114,-81,32,83,-104,62,88,-88,45,"); - add("129,-94,34,135,-66,6,69,-40,8,-23,-79,78,"); - add("115,-110,50,89,-38,-3,126,-18,-34,159,17,-78,"); - add("142,-3,-56,130,-29,-28,119,-85,22,-228,24,75,"); - add("-138,50,14,-119,-8,55,-120,-49,88,-42,-110,108,"); - add("111,-102,42,122,-103,37,19,-127,96,120,-89,24,"); - add("113,33,-72,102,-109,47,63,-49,12,89,76,-98,"); - add("119,-92,24,37,13,-26,-57,117,-70,-80,121,-65,"); - add("-91,110,-52,25,58,-59,134,-63,-5,47,72,-80,"); - add("-121,89,-23,-21,73,-53,144,21,-80,128,-70,4,"); - add("87,-9,-31,-51,146,-103,-119,77,-13,-136,65,3,"); - add("-121,63,-2,-151,55,16,-61,42,-11,63,83,-100,"); - add("-9,85,-71,85,-38,-2,-133,153,-80,-101,103,-51,"); - add("-106,100,-46,-27,125,-104,68,49,-73,134,-93,29,"); - add("112,-92,36,75,-17,-16,-36,90,-68,134,-79,14,"); - add("41,11,-28,-67,96,-59,113,-7,-44,-169,116,-33,"); - add("11,66,-66,125,23,-78,96,39,-80,125,5,-63,"); - add("105,13,-62,149,-35,-38,149,-29,-43,116,-76,15,"); - add("140,11,-79,28,-41,24,-103,-68,116,35,-72,52,"); - add("96,112,-154,98,57,-105,75,70,-106,56,82,-109,"); - add("128,13,-81,127,12,-79,112,-18,-44,95,62,-113,"); - add("-145,71,8,-141,52,25,-122,78,-13,-72,105,-68,"); - add("-105,106,-53,-118,86,-27,-5,75,-75,43,77,-102,"); - add("-37,120,-108,39,89,-115,102,41,-100,-33,122,-114,"); - add("-32,111,-104,-30,100,-95,3,95,-108,22,84,-107,"); - add("160,5,-96,-13,108,-117,-43,104,-96,-38,95,-89,"); - add("72,25,-71,82,100,-168,27,90,-125,11,88,-114,"); - add("111,33,-107,76,31,-85,88,25,-87,-59,90,-76,"); - add("-21,26,-20,98,-112,81,108,-71,21,69,-16,-24,"); - add("-180,-4,118,-23,-14,31,114,-65,10,158,-67,-16,"); - add("132,-5,-78,125,10,-94,134,-33,-47,47,-66,51,"); - add("-99,-45,120,-80,-55,119,-12,-79,103,182,-57,-48,"); - add("134,-44,-36,78,-102,70,37,-104,100,148,-59,-29,"); - add("89,44,-113,40,79,-121,101,33,-110,79,41,-105,"); - add("65,56,-115,144,-23,-75,92,32,-108,-42,108,-105,"); - add("-159,7,107,-90,-33,108,-132,55,25,-118,90,-29,"); - add("-103,98,-51,-28,90,-95,70,20,-75,80,89,-172,"); - add("92,41,-119,84,19,-87,107,13,-98,85,61,-144,"); - add("62,52,-118,125,7,-107,86,30,-108,72,14,-78,"); - add("154,-9,-111,-4,-62,89,-80,-44,124,-41,-57,111,"); - add("-114,-27,126,-13,-39,63,115,-63,-7,145,-69,-22,"); - add("8,-33,38,-49,-42,94,-32,-19,49,-4,-135,179,"); - add("30,-76,74,-119,-11,106,-110,8,72,26,-75,74,"); - add("162,-54,-53,120,-86,15,134,-31,-63,127,-64,-19,"); - add("133,-52,-41,132,-45,-49,131,-71,-18,131,-76,-11,"); - add("128,-82,-5,130,-75,-16,137,-72,-27,125,-50,-44,"); - add("131,-43,-60,125,-75,-16,123,-73,-18,94,-109,49,"); - add("99,-108,43,72,-113,72,-6,-94,117,-37,-74,120,"); - add("-73,-52,124,-70,-54,122,-89,-43,125,-122,14,87,"); - add("-132,33,71,-112,-8,101,-98,-33,116,-106,-14,99,"); - add("-136,29,75,-115,31,55,-132,22,76,-126,63,27,"); - add("-119,4,84,-114,25,57,-133,114,-27,-108,-4,81,"); - add("-131,31,60,-111,101,-33,-88,5,57,-112,-20,99,"); - add("-128,7,80,-130,7,80,-127,2,81,-101,-39,109,"); - add("-106,-35,104,-82,-52,107,-80,-62,115,-85,-56,112,"); - add("-46,-79,108,-112,-35,103,-136,22,59,-130,13,63,"); - add("-131,-5,82,-136,18,59,-107,-21,81,65,-99,62,"); - add("120,-47,-21,86,-22,-27,-177,-28,128,-37,-77,95,"); - add("-126,-30,99,-132,3,68,-125,14,53,-140,-26,99,"); - add("-120,26,36,-121,-25,86,-74,-77,110,-52,-90,110,"); - add("18,-115,97,63,-74,37,134,27,-91,87,-35,-12,"); - add("-6,-95,91,120,-127,55,1,-112,100,34,-86,60,"); - add("-158,38,45,42,-116,82,178,-55,-41,144,-64,-17,"); - add("24,-119,91,90,-110,49,95,-87,25,-4,-78,69,"); - add("140,2,-75,128,11,-77,27,-34,14,-66,-60,87,"); - add("-90,-34,75,184,-9,-90,135,38,-104,151,-52,-39,"); - add("91,-55,-3,109,-105,27,139,-47,-38,111,10,-72,"); - add("124,27,-95,56,55,-80,-20,119,-91,42,74,-89,"); - add("136,-10,-73,133,-37,-48,139,-57,-36,133,-59,-31,"); - add("117,-98,11,130,-69,-22,125,1,-82,110,25,-93,"); - add("116,15,-90,91,52,-107,48,96,-119,61,81,-114,"); - add("103,26,-94,133,-55,-43,129,-24,-70,42,57,-82,"); - add("118,50,-132,58,-114,63,-48,-95,121,81,-123,53,"); - add("13,-114,92,40,-113,72,91,-122,41,36,-120,78,"); - add("75,-122,50,-4,-99,87,-24,-99,101,12,-122,93,"); - add("-4,-114,97,-9,-114,98,1,-113,91,2,-125,97,"); - add("1,-114,89,20,-125,83,9,-123,88,-6,-117,93,"); - add("-27,-109,100,-52,-94,105,-86,-64,105,-114,-26,95,"); - add("-130,-8,92,-97,-4,66,-89,-7,62,-155,22,83,"); - add("50,-167,88,34,-111,55,"); - add(""); - //add("/*1*/"); - add("2737,1,-14284,23878,-11217,"); - add("-82,-105,-117,-15,25,72,-60,-31,10,-79,-19,62,"); - add("9,110,225,-46,-61,-72,-154,-85,22,40,7,-38,"); - add("54,-36,-148,1,-47,-99,-122,-119,-90,-97,31,190,"); - add("25,-21,-77,-3,-73,-146,-91,-31,55,11,-36,-89,"); - add("-159,-97,12,-70,-4,82,-94,2,131,-118,-56,45,"); - add("-43,51,167,-40,-46,-43,34,-54,-159,-75,-37,27,"); - add("-59,19,122,-93,-16,98,60,99,126,-21,-11,5,"); - add("-93,-116,-113,-75,5,120,-18,-24,-28,-75,-101,-104,"); - add("-108,-75,1,-89,-3,123,55,85,101,-32,-19,6,"); - add("-123,-105,-42,-7,-27,-46,-43,-47,-35,-81,17,159,"); - add("-116,-60,49,-40,-57,-60,-105,-66,22,-127,-79,29,"); - add("-105,-95,-35,-124,-106,-28,-98,-74,1,-88,-112,-92,"); - add("-92,-106,-71,18,-79,-186,29,58,71,40,78,93,"); - add("80,93,65,18,-7,-42,-45,-114,-161,40,41,20,"); - add("30,80,115,96,95,47,95,26,-94,91,7,-122,"); - add("101,19,-114,137,43,-116,-52,-83,-87,-118,-92,-9,"); - add("-117,-93,-10,-108,-96,-29,-143,-117,-12,-135,-130,-48,"); - add("-50,-79,-75,-157,-56,130,47,-16,-100,-29,-66,-80,"); - add("-93,-105,-58,-83,-98,-54,-84,-112,-77,-75,-105,-78,"); - add("-91,-115,-68,-70,-99,-70,-81,-109,-68,-79,-107,-67,"); - add("-72,-119,-97,-41,-94,-95,-65,-112,-90,-101,-106,-26,"); - add("-87,-112,-55,-110,-104,-6,-98,-108,-29,-104,-110,-19,"); - add("-75,-117,-75,-84,-126,-70,-25,-76,-80,-75,-126,-82,"); - add("-115,-95,27,-115,-90,35,-103,-111,-12,-80,-119,-56,"); - add("-97,-117,-25,-103,-98,10,-115,-91,43,-161,-129,59,"); - add("-58,-77,-21,-114,-71,74,-7,56,92,-67,27,148,"); - add("-90,-7,134,1,-10,-18,84,0,-134,22,-52,-112,"); - add("-131,-135,12,72,27,-74,-56,-101,-58,-97,-115,-11,"); - add("-110,-72,74,-100,-74,55,-42,-104,-80,-100,-122,-9,"); - add("-113,-93,54,-106,-102,31,-103,-87,50,-115,-98,55,"); - add("-100,-98,32,-86,-121,-19,-91,-125,-18,-92,-40,104,"); - add("-84,-16,124,-85,-18,123,-114,-81,90,-91,-59,81,"); - add("-80,-14,125,-100,-90,58,-75,-40,83,-109,-75,98,"); - add("-100,-79,80,-101,-100,50,-88,-122,-1,-77,-103,4,"); - add("-104,-135,15,-99,-113,37,-104,-118,43,-74,-117,-13,"); - add("-98,-106,51,-92,-124,16,-93,-102,52,-101,-150,3,"); - add("-74,-80,45,-85,-138,-7,-88,-117,27,-92,-81,86,"); - add("-90,-67,101,-91,-76,95,-94,-102,67,-88,-91,72,"); - add("-88,-94,70,-71,-130,-14,-61,-137,-44,-62,-124,-21,"); - add("22,-4,-54,54,10,-108,83,17,-158,-35,-68,-8,"); - add("-90,-85,87,-88,-108,61,-83,-64,101,-84,-69,103,"); - add("-95,-84,110,-62,13,159,-81,-98,64,-88,-89,95,"); - add("-79,-62,109,-79,-94,70,-115,-182,49,-40,-70,8,"); - add("-56,-132,-30,-56,-147,-45,-58,-85,38,-92,-109,97,"); - add("-89,-97,105,-69,-68,91,-77,-78,102,-78,-94,87,"); - add("-77,-89,95,-74,-86,91,-73,-123,44,-75,-139,31,"); - add("-41,7,123,-3,91,124,38,129,60,75,109,-70,"); - add("75,120,-54,66,92,-61,83,66,-140,48,13,-114,"); - add("74,106,-59,56,136,28,68,124,-18,78,115,-53,"); - add("78,123,-40,83,113,-65,70,128,-8,74,133,-10,"); - add("74,120,-22,75,71,-94,55,56,-62,78,120,-30,"); - add("84,100,-69,88,119,-51,85,86,-87,76,126,-10,"); - add("83,133,-13,79,83,-72,96,128,-46,82,80,-79,"); - add("92,121,-43,91,103,-61,91,88,-82,90,83,-87,"); - add("94,102,-64,81,122,-5,74,130,21,83,131,7,"); - add("86,113,-25,72,131,35,103,170,26,-42,-12,72,"); - add("-90,-65,101,-91,-42,139,-45,4,109,-93,-93,68,"); - add("-88,-49,130,-71,-79,43,-66,-126,-37,-88,-117,29,"); - add("-87,-114,34,-86,-133,7,-87,-114,37,-89,-115,45,"); - add("-78,-97,45,-90,-131,29,-89,-101,72,-91,-113,60,"); - add("-85,-83,93,-88,-111,61,-89,-78,117,-60,-23,123,"); - add("-62,-104,9,-85,-141,17,-80,-87,88,-82,-66,126,"); - add("-85,-125,47,-58,-24,127,-98,-125,90,-43,-84,-3,"); - add("-31,-134,-109,-78,-137,23,-52,0,150,-18,-42,-12,"); - add("-34,-42,39,-63,-65,90,-117,-117,174,-58,-89,46,"); - add("-45,-70,33,-105,-136,122,-37,-55,33,-72,-83,102,"); - add("-71,-86,103,-73,-100,85,-72,-113,67,-73,-107,82,"); - add("-68,-107,68,-78,-110,101,-63,-90,83,-67,-112,64,"); - add("-64,-137,21,-59,-136,6,-69,-126,60,-67,-105,87,"); - add("-57,-153,-18,-21,-129,-108,-53,-103,46,-5,-91,-114,"); - add("-25,-98,-42,-62,-133,40,-65,-120,71,-63,-107,87,"); - add("-66,-113,89,-52,-66,109,-55,-54,138,-55,-69,119,"); - add("-56,-76,116,-58,-103,90,-59,-114,86,-51,-59,131,"); - add("-48,-48,134,-45,-43,137,-43,-37,139,-32,-3,142,"); - add("-47,-65,124,-54,-103,99,-49,-79,115,-50,-83,118,"); - add("-44,-63,129,-41,-47,137,-41,-53,136,-44,-59,143,"); - add("-42,-72,116,-33,-27,146,-32,-30,145,-35,-40,142,"); - add("-45,-93,116,-43,-58,172,-33,-60,113,-35,-67,116,"); - add("-25,-17,150,-27,-27,146,-35,-66,134,-29,-40,149,"); - add("-14,9,148,0,52,139,1,54,142,0,51,145,"); - add("11,80,128,5,56,134,-7,7,104,-26,-55,123,"); - add("-30,-59,172,25,62,-90,-7,-4,85,-32,-82,117,"); - add("-35,-95,120,-33,-91,116,-33,-94,112,-43,-128,158,"); - add("-22,-72,54,-33,-106,101,-32,-104,104,-30,-96,111,"); - add("-27,-92,117,-24,-81,124,-20,-65,134,-12,-33,146,"); - add("-1,3,152,-6,-14,149,-13,-53,140,-16,-63,136,"); - add("-17,-71,124,-4,-20,157,-8,-44,143,-16,-86,237,"); - add("2,3,72,-4,-32,105,5,-2,175,27,99,105,"); - add("3,-12,139,-35,-165,74,-8,-14,-108,-21,-95,14,"); - add("-16,-90,97,-16,-92,106,-13,-92,128,-18,-108,97,"); - add("-21,-122,85,-15,-103,109,-11,-92,117,-12,-98,114,"); - add("-25,-149,52,-21,-128,50,-23,-111,-36,-27,-130,-35,"); - add("-19,-140,74,-1,-63,128,-5,-97,143,22,71,115,"); - add("17,158,-124,7,2,79,-3,-81,127,-16,-132,72,"); - add("-7,-90,90,6,-49,148,2,-72,134,-2,-92,118,"); - add("-17,-140,51,-24,-136,-28,4,-85,148,17,108,-1,"); - add("10,-4,92,-12,-118,54,-7,-129,92,8,23,39,"); - add("24,62,114,18,5,136,11,-45,124,18,-43,173,"); - add("-3,-104,84,-4,-117,78,30,28,174,-1,-120,95,"); - add("-10,-143,56,23,-13,155,31,74,126,32,74,128,"); - add("6,141,-78,-2,111,-104,18,127,0,33,54,142,"); - add("39,100,135,29,124,58,32,80,105,47,60,198,"); - add("4,-59,69,13,-90,141,5,-141,131,23,-19,127,"); - add("16,-116,158,-24,23,-131,-39,-129,-98,-13,-148,42,"); - add("0,-121,77,6,-115,99,11,-107,115,-4,-121,54,"); - add("10,-111,107,-14,-160,19,-15,-129,-3,2,-130,72,"); - add("-31,-136,-76,-5,-116,28,-12,-155,12,-7,-162,32,"); - add("-14,-141,-11,-15,-186,-2,11,-98,78,-2,-105,25,"); - add("-26,-135,-79,-24,-112,-78,-30,-150,-95,-16,-111,-47,"); - add("-23,-93,-86,-30,-35,-138,-33,-39,-151,-22,-114,-85,"); - add("-4,-170,15,-36,-101,-166,6,-160,53,-17,-111,-74,"); - add("-27,-53,-138,-33,-65,-171,-21,-26,-112,-24,-93,-125,"); - add("1,-170,15,-4,-145,-17,-14,-124,-84,-18,-110,-108,"); - add("4,-151,15,-15,-138,-98,-21,-80,-137,8,-155,32,"); - add("2,-150,-16,10,-154,35,-6,-140,-71,7,-91,21,"); - add("24,-76,129,28,-94,141,22,97,153,13,20,77,"); - add("-5,164,11,3,-13,11,10,-156,22,6,-135,2,"); - add("-1,-144,-50,-6,-131,-75,-20,-69,-134,-14,-89,-119,"); - add("-15,-91,-122,-8,-112,-98,-8,-113,-101,-4,-122,-85,"); - add("10,-152,-16,26,-152,82,12,-139,-4,26,-119,99,"); - add("20,-144,37,-9,-86,-115,19,-129,32,29,-83,126,"); - add("30,-70,132,30,-70,131,31,-83,122,30,-119,87,"); - add("30,-120,86,29,-138,56,30,-135,62,32,-123,80,"); - add("35,-102,104,32,-130,70,34,-129,73,31,-145,41,"); - add("33,-133,55,35,-126,67,35,-143,52,34,-138,43,"); - add("34,-136,49,39,-127,69,40,-127,74,39,-131,62,"); - add("35,-144,26,46,-102,113,43,-120,78,39,-154,26,"); - add("42,-114,73,47,-116,90,44,-128,64,45,-127,64,"); - add("46,-124,66,47,-125,70,32,-162,-34,15,-96,-38,"); - add("48,-136,50,50,-120,77,51,-121,72,52,-85,116,"); - add("53,-104,93,55,-111,91,50,-94,90,54,-68,124,"); - add("54,-71,122,54,-71,118,54,-75,114,59,-82,116,"); - add("53,-47,133,55,-66,118,60,-66,129,57,-55,126,"); - add("58,-60,126,62,-96,97,62,-79,113,62,-62,126,"); - add("61,-93,91,56,-133,35,68,-87,114,65,-89,101,"); - add("68,-87,104,68,-103,91,47,-147,-14,53,-143,3,"); - add("53,-141,2,58,-139,15,55,-139,6,49,-143,-17,"); - add("42,-138,-35,50,-147,-23,58,-138,5,61,-139,10,"); - add("44,-134,-32,44,-140,-45,43,-137,-41,49,-141,-37,"); - add("47,-137,-36,36,-137,-72,4,-78,-87,62,-138,-4,"); - add("62,-111,29,43,-131,-51,56,-141,-31,53,-137,-36,"); - add("62,-135,-10,70,-132,13,55,-134,-36,24,-110,-90,"); - add("60,-137,-28,66,-138,-14,54,-127,-37,51,-134,-57,"); - add("52,-134,-60,44,-117,-56,66,-137,-28,34,-115,-84,"); - add("57,-129,-48,59,-132,-46,44,-120,-73,40,-123,-92,"); - add("76,-129,1,84,-125,28,71,-130,-20,57,-123,-54,"); - add("26,-100,-104,50,-118,-71,75,-131,-20,78,-129,-10,"); - add("82,-129,-3,84,-130,0,76,-123,-14,81,-130,-13,"); - add("78,-119,-7,63,-121,-55,51,-118,-89,76,-125,-31,"); - add("81,-125,-19,43,-108,-100,57,-117,-78,74,-121,-44,"); - add("72,-124,-53,64,-118,-69,46,-103,-94,51,-109,-97,"); - add("72,-117,-50,55,-110,-92,78,-122,-50,65,-122,-96,"); - add("42,-82,-70,87,-130,-52,-11,-41,-145,71,-110,-56,"); - add("88,-116,-17,100,-112,30,85,-119,-42,110,-137,-12,"); - add("83,-92,18,105,-118,19,87,-110,-27,73,-111,-74,"); - add("42,-78,-86,70,-110,-90,89,-116,-50,78,-111,-71,"); - add("81,-108,-55,107,-116,5,98,-91,49,47,-47,10,"); - add("69,-38,112,-33,70,110,20,15,109,40,7,146,"); - add("39,-52,-29,21,-74,-152,88,-69,71,102,-105,9,"); - add("-32,12,-66,53,-66,-33,28,-44,-43,94,-112,-47,"); - add("75,-89,-41,70,-106,-108,126,-123,13,50,-68,-58,"); - add("89,-110,-76,128,-91,118,48,-36,35,74,-96,-84,"); - add("22,-62,-139,38,-66,-102,120,-94,70,-19,-6,-83,"); - add("92,-105,-67,61,-77,-71,103,-112,-62,-4,21,62,"); - add("25,-27,-11,74,-103,-134,-90,77,-19,-51,13,-130,"); - add("-21,37,64,-80,80,25,-44,10,-122,44,-71,-113,"); - add("41,-65,-111,30,-57,-118,108,-124,-107,-26,30,28,"); - add("-11,46,149,33,-26,18,109,-71,111,32,2,123,"); - add("146,-121,40,31,-60,-127,123,-103,21,-19,-7,-94,"); - add("48,-45,-14,52,-14,131,-16,48,132,35,-25,24,"); - add("100,-72,57,2,-6,-18,65,-58,-7,-43,11,-101,"); - add("-43,2,-143,-44,18,-81,26,-28,-22,126,-84,98,"); - add("86,-86,-53,59,-67,-71,102,-98,-55,133,-113,-8,"); - add("-71,88,125,73,-62,-12,133,-103,28,-27,12,-39,"); - add("13,-32,-97,94,-71,26,76,-69,-33,-28,-4,-118,"); - add("59,-52,-18,106,-64,89,107,-88,-18,-26,53,148,"); - add("61,-54,-29,50,-69,-132,110,-78,34,122,-91,11,"); - add("92,-73,-12,130,-91,31,-52,53,65,66,-47,7,"); - add("-52,53,66,23,7,102,-112,74,-45,38,-13,69,"); - add("134,-90,44,89,-78,-45,112,-96,-59,-31,26,10,"); - add("-113,88,22,12,-22,-60,2,-18,-69,-59,11,-148,"); - add("42,-39,-34,135,-106,-30,21,12,126,27,-17,10,"); - add("85,-83,-96,93,-63,20,-42,51,94,-94,85,72,"); - add("7,23,125,76,-8,204,2,-26,-102,5,-42,-169,"); - add("9,-32,-114,115,-92,-38,123,-74,55,-78,77,97,"); - add("-23,34,76,-7,36,136,-20,50,149,82,-53,22,"); - add("44,-63,-128,86,-89,-121,-26,22,12,-49,18,-70,"); - add("6,-27,-100,132,-79,61,88,-39,99,69,-15,139,"); - add("-71,73,99,-116,90,37,-104,92,74,-99,90,83,"); - add("5,32,137,1,38,148,-20,47,123,-14,45,125,"); - add("95,-22,171,-112,84,9,-125,85,-23,-110,50,-111,"); - add("-1,15,51,-48,55,71,-148,108,-12,-55,45,13,"); - add("-91,92,75,-78,87,93,-27,69,159,-102,65,-46,"); - add("-35,39,38,6,7,38,119,-74,59,7,39,145,"); - add("-78,89,88,-121,116,62,-72,75,55,-57,83,110,"); - add("-42,75,123,-14,59,137,-12,60,141,-26,71,141,"); - add("-86,88,46,-35,49,54,-61,88,101,-106,102,32,"); - add("-94,46,-87,-71,11,-132,-100,51,-95,-112,74,-64,"); - add("-114,76,-62,-113,99,-4,-86,99,63,-59,91,102,"); - add("-56,92,108,-33,77,122,13,41,135,13,50,154,"); - add("64,-2,138,-71,86,50,-44,95,131,-71,99,77,"); - add("-89,105,50,-103,109,26,-50,96,109,-34,84,116,"); - add("19,58,165,-54,43,-20,-122,78,-88,-13,80,145,"); - add("91,-47,90,102,-80,41,33,37,145,-76,109,74,"); - add("-106,110,11,-67,-7,-152,51,-78,-57,-81,27,-112,"); - add("-102,62,-85,-106,89,-36,-85,112,55,-97,108,19,"); - add("-104,112,10,-72,119,88,32,6,83,99,-47,112,"); - add("96,-45,110,98,-50,100,70,-3,136,57,13,137,"); - add("25,48,139,-10,97,164,-71,84,20,-106,119,17,"); - add("-69,116,77,-22,75,93,-107,151,65,-80,71,-28,"); - add("-100,134,43,73,-19,108,89,-23,125,71,2,135,"); - add("67,8,133,61,18,139,59,21,137,60,21,139,"); - add("54,30,138,56,27,137,46,40,139,49,38,138,"); - add("37,51,136,27,61,134,-22,95,103,-38,107,95,"); - add("-5,91,122,-23,103,109,-22,103,110,-48,112,79,"); - add("-99,139,38,-86,39,-79,-116,84,-65,-94,116,7,"); - add("-35,112,95,-55,108,58,-109,97,-44,-109,73,-75,"); - add("-105,60,-90,-107,62,-89,-101,101,-33,-41,95,58,"); - add("-75,122,35,-89,122,11,-55,126,71,-28,108,90,"); - add("-10,89,92,-87,138,28,20,-14,15,86,-125,-14,"); - add("12,-97,-99,32,-109,-85,58,-122,-60,84,-122,-19,"); - add("107,-98,46,108,-95,52,83,-34,87,77,5,127,"); - add("98,-51,88,106,-66,79,105,-49,97,89,-24,103,"); - add("62,42,144,98,-20,117,104,-36,107,68,23,123,"); - add("43,86,165,42,31,94,18,89,130,-10,106,107,"); - add("-20,110,97,4,95,113,20,86,122,19,88,121,"); - add("-6,105,106,-26,118,91,-35,122,83,-14,135,121,"); - add("-51,89,26,-45,147,90,-17,105,83,32,78,118,"); - add("16,95,113,-14,129,106,-26,123,83,-61,122,38,"); - add("42,-16,37,134,-47,122,53,-93,-21,27,-119,-79,"); - add("-15,-103,-116,-2,-92,-91,6,-109,-100,-23,-73,-99,"); - add("-55,-129,-200,39,25,75,46,69,127,31,84,122,"); - add("22,92,117,14,99,113,2,108,105,-1,111,102,"); - add("-7,115,97,-24,123,84,-19,123,88,-8,117,95,"); - add("5,111,102,13,106,107,27,95,113,43,82,118,"); - add("21,114,119,4,99,85,-34,135,71,-55,131,42,"); - add("-48,132,50,-33,119,55,-80,153,26,-57,132,36,"); - add("-77,147,23,-26,152,83,18,104,96,-83,84,-33,"); - add("22,52,63,66,23,90,55,87,123,-8,77,44,"); - add("53,100,128,67,63,116,61,84,123,32,97,99,"); - add("66,73,118,83,76,136,58,56,97,94,28,114,"); - add("101,10,109,51,99,114,61,66,101,101,33,121,"); - add("-18,61,19,12,97,70,85,9,89,142,-3,135,"); - add("92,-23,75,109,26,118,4,103,64,53,-40,26,"); - add("106,-50,70,106,13,105,135,-4,121,36,89,83,"); - add("-19,132,57,57,96,104,91,54,110,89,56,108,"); - add("8,109,65,-51,142,30,-6,136,66,15,129,79,"); - add("45,101,90,54,101,97,10,143,78,26,122,80,"); - add("19,122,75,61,99,96,11,134,71,-41,143,31,"); - add("-38,144,32,-18,141,47,7,137,65,45,118,87,"); - add("69,99,99,-24,139,36,-31,146,34,-4,140,52,"); - add("-7,144,50,2,141,56,7,139,57,-12,143,43,"); - add("-50,145,12,-40,145,19,-35,154,24,-35,137,19,"); - add("-3,147,46,-21,153,33,-42,129,7,-23,129,22,"); - add("28,139,65,8,208,68,46,83,61,97,-111,45,"); - add("87,20,76,63,112,81,48,122,72,52,121,74,"); - add("41,130,66,39,174,76,18,127,46,55,111,70,"); - add("62,93,70,67,111,76,94,80,89,88,82,83,"); - add("59,118,70,70,109,75,44,143,63,93,85,84,"); - add("68,113,72,59,123,66,38,135,53,31,139,47,"); - add("24,142,43,19,142,38,-15,166,17,8,111,24,"); - add("-25,186,11,-31,118,-3,-35,149,-4,-55,165,-16,"); - add("-29,123,-4,-40,145,-9,-46,144,-16,-72,130,-36,"); - add("-113,64,-74,-124,19,-87,-121,-17,-90,-123,1,-91,"); - add("-112,45,-78,-117,47,-84,-94,97,-60,-111,64,-79,"); - add("-94,98,-62,-98,95,-68,-86,113,-57,-90,120,-61,"); - add("-99,69,-73,-99,88,-72,-100,83,-74,-103,76,-80,"); - add("-113,73,-87,-98,73,-77,-108,42,-88,-118,12,-99,"); - add("-115,-23,-100,-115,-17,-100,-105,-27,-95,-117,27,-101,"); - add("-118,59,-101,-105,-19,-97,-110,42,-96,-97,69,-86,"); - add("-102,62,-90,-110,46,-100,-99,-47,-97,-101,-35,-98,"); - add("-144,-109,-146,30,126,37,-70,5,-68,-40,-97,-44,"); - add("-29,-148,-39,-81,-122,-89,-4,36,-2,10,141,21,"); - add("23,149,32,47,139,54,-84,-1,-82,4,58,8,"); - add("38,136,43,-76,114,-69,-80,101,-76,-117,-33,-119,"); - add("-63,103,-60,-92,70,-92,-80,35,-80,-91,62,-93,"); - add("-80,22,-83,-107,62,-112,-91,64,-95,-96,57,-102,"); - add("-92,3,-100,-109,-4,-119,-103,-28,-114,-58,-151,-69,"); - add("-40,-110,-48,-31,-140,-40,-71,-3,-80,-78,-95,-94,"); - add("-74,-89,-88,-61,-107,-77,-35,-140,-49,-49,-142,-67,"); - add("-8,45,-6,27,146,41,-11,182,-3,-108,-34,-129,"); - add("-85,58,-97,-100,-67,-124,-82,76,-95,-35,121,-38,"); - add("-39,139,-42,-18,138,-18,-35,60,-41,-75,-100,-96,"); - add("-72,-75,-92,-89,-73,-116,-81,-77,-106,-90,-15,-115,"); - add("-108,19,-141,15,41,22,86,61,114,90,27,116,"); - add("54,124,74,29,135,40,46,136,61,54,108,70,"); - add("44,138,56,79,87,98,81,81,99,66,113,79,"); - add("54,127,64,66,111,77,74,98,87,38,125,41,"); - add("-10,148,-18,-71,91,-89,-95,37,-116,-79,135,-104,"); - add("-8,130,-18,-29,131,-44,-26,148,-43,-27,146,-45,"); - add("-8,150,-25,-12,170,-31,-13,127,-30,-76,142,-112,"); - add("-17,-116,-7,-29,21,-40,-33,100,-52,-62,104,-92,"); - add("-42,110,-68,-74,78,-106,-59,106,-93,-64,99,-98,"); - add("-62,101,-98,-85,40,-118,-83,41,-120,-78,70,-117,"); - add("-92,-113,-107,13,75,6,-27,103,-55,-85,32,-124,"); - add("-84,27,-123,-92,9,-133,5,-52,17,-12,-14,-15,"); - add("-72,37,-110,-84,23,-126,-93,-75,-123,-62,2,-93,"); - add("-78,42,-123,-79,22,-125,-86,9,-132,-73,-172,-81,"); - add("5,71,-6,11,147,-11,-52,116,-104,-49,62,-89,"); - add("-48,105,-98,-54,96,-109,-76,39,-129,-88,-164,-108,"); - add("4,91,-13,40,143,32,24,150,3,-30,139,-84,"); - add("-38,97,-87,-44,104,-101,-49,91,-107,-75,77,-148,"); - add("-49,45,-97,-46,96,-108,-70,41,-135,-72,-32,-118,"); - add("-78,7,-140,-62,-56,-95,-93,37,-181,48,34,77,"); - add("55,90,71,51,161,41,60,100,74,-5,115,-47,"); - add("-58,47,-122,-61,111,-152,-68,-37,-112,-75,67,-165,"); - add("-43,-6,-79,-24,130,-97,-84,-17,-155,39,43,60,"); - add("-32,126,-112,46,78,58,69,-5,135,113,64,189,"); - add("-45,17,-93,-69,17,-138,-69,-5,-131,-72,-8,-139,"); - add("-69,-22,-127,-73,-3,-146,-96,-25,-187,55,-46,133,"); - add("-45,-34,-77,-78,-48,-142,-59,-65,-96,-58,-56,-98,"); - add("-75,-29,-148,-55,34,-134,-65,54,-168,-32,40,-88,"); - add("-19,117,-96,-47,41,-126,-62,-2,-141,-61,-9,-138,"); - add("-62,-27,-135,-61,-16,-139,-63,-22,-142,-52,18,-139,"); - add("-9,126,-86,14,107,-19,-7,131,-88,-34,82,-132,"); - add("-45,40,-138,-47,25,-139,-55,1,-146,-5,123,-88,"); - add("16,145,-43,-25,62,-110,-54,-104,-83,-14,-134,43,"); - add("52,-49,173,-47,-52,-98,-47,-65,-90,-57,-52,-131,"); - add("-57,-30,-142,-56,-64,-123,-64,-68,-148,-41,-115,-55,"); - add("-17,-148,36,2,-128,81,6,-128,89,-7,-136,51,"); - add("-30,-157,-7,-49,-116,-86,-54,-49,-133,-19,85,-101,"); - add("-1,110,-64,-7,78,-63,12,153,-47,46,132,68,"); - add("50,119,81,43,124,58,16,167,-52,6,94,-42,"); - add("-2,123,-85,31,130,12,57,46,143,54,68,114,"); - add("55,123,81,5,134,-75,-47,48,-173,-55,-74,-113,"); - add("-45,-45,-111,-50,-139,-57,-54,-73,-119,-53,-57,-131,"); - add("-53,-86,-113,-53,-88,-111,-47,-29,-139,-41,9,-146,"); - add("-38,13,-143,-42,-130,-52,-56,-133,-106,16,67,9,"); - add("3,32,-10,-31,46,-148,-42,-55,-114,-50,-104,-112,"); - add("-52,-113,-113,-41,-143,-52,-19,-114,8,-35,-159,-27,"); - add("-32,-151,-22,-37,-31,-124,-40,-96,-98,-40,-127,-78,"); - add("-43,-93,-113,-49,-103,-139,-12,-141,39,-22,-159,8,"); - add("-9,38,-65,-2,110,-77,-9,111,-113,-9,99,-111,"); - add("-10,92,-110,-5,113,-106,-13,81,-127,-20,55,-141,"); - add("-23,35,-141,-27,26,-157,-18,35,-127,-27,18,-160,"); - add("-38,-89,-123,-29,-61,-106,-36,-68,-143,-31,-46,-140,"); - add("-33,-79,-124,-30,-56,-136,-25,-11,-150,-11,129,-209,"); - add("-18,-47,-75,-10,63,-142,9,100,-57,9,124,-89,"); - add("-3,84,-129,4,98,-107,6,103,-98,9,118,-105,"); - add("13,124,-83,18,133,-63,13,113,-80,23,146,-59,"); - add("32,130,58,29,134,2,28,135,-4,30,125,26,"); - add("40,177,11,-14,-74,22,3,-8,43,37,164,-3,"); - add("32,145,-17,33,147,-10,38,143,23,39,142,37,"); - add("40,122,78,37,136,18,31,148,-65,21,67,28,"); - add("27,99,5,10,99,-155,-12,15,-146,12,76,-78,"); - add("24,96,-28,9,95,-179,-9,-1,-93,5,66,-146,"); - add("-17,-17,-142,-16,-12,-151,0,38,-139,-11,-10,-126,"); - add("-32,-73,-156,-11,-9,-146,-12,-11,-150,-3,19,-151,"); - add("-2,20,-165,0,19,-147,-25,-71,-125,2,20,-131,"); - add("3,24,-133,15,62,-139,42,140,100,43,133,129,"); - add("22,72,40,43,138,34,42,140,-20,48,151,22,"); - add("43,136,8,46,136,47,44,137,-24,14,50,-76,"); - add("55,155,85,-22,-70,55,-42,-135,73,9,23,49,"); - add("49,140,37,50,141,46,56,160,19,50,140,9,"); - add("50,140,17,30,77,27,51,137,29,47,116,83,"); - add("43,100,105,50,121,77,51,128,19,46,126,-58,"); - add("6,36,-160,-18,-34,-104,4,27,-143,6,31,-179,"); - add("-9,-13,-122,-18,-37,-144,-21,-45,-141,-12,-24,-148,"); - add("-8,-18,-150,-12,-28,-147,-22,-58,-137,-43,-113,-113,"); - add("-43,-114,-41,-53,-142,-13,-54,-145,-2,-43,-119,-51,"); - add("-43,-124,-61,-48,-137,-39,-32,-98,-113,-33,-105,-164,"); - add("-36,-102,24,-32,-103,-95,4,-2,-173,25,67,-69,"); - add("17,31,-155,-13,-58,-173,-7,-37,-107,-6,-41,-144,"); - add("10,-12,-243,-9,-41,-66,0,-27,-131,-2,-39,-146,"); - add("19,28,-134,47,118,-94,34,68,-128,30,53,-132,"); - add("19,9,-162,25,42,-104,57,139,-86,47,106,-93,"); - add("51,128,-54,55,140,-41,52,117,-82,51,108,-91,"); - add("51,106,-95,54,119,-73,57,128,-55,58,131,-52,"); - add("54,117,-60,84,188,-60,-24,-44,43,-84,-179,93,"); - add("32,84,12,55,105,-97,59,126,-61,61,138,-22,"); - add("56,132,-7,48,130,53,66,154,3,74,176,20,"); - add("41,94,3,62,147,27,59,138,27,57,135,40,"); - add("57,134,44,52,127,63,48,122,78,57,131,52,"); - add("62,122,-17,71,128,-61,61,115,-30,76,142,-28,"); - add("57,119,33,60,92,-89,-4,9,63,26,73,95,"); - add("70,131,-8,14,37,42,38,92,91,22,60,88,"); - add("38,100,131,50,107,79,-22,-10,147,-7,13,127,"); - add("16,45,85,19,57,138,46,104,119,52,110,114,"); - add("67,114,-21,31,64,62,-45,-65,87,-29,-52,-1,"); - add("-7,-11,9,23,59,139,15,46,156,47,90,50,"); - add("-19,-29,49,-19,-14,167,-15,-11,148,-36,-51,137,"); - add("-26,-34,144,18,42,151,29,58,109,-35,-56,127,"); - add("-35,-54,123,-47,-82,59,-37,-64,38,-21,-34,138,"); - add("27,52,132,-19,-33,138,59,107,66,-4,-8,122,"); - add("-36,-65,121,-50,-92,117,29,48,103,48,89,-112,"); - add("37,67,-134,50,88,26,57,98,77,19,35,-58,"); - add("15,27,-100,7,12,-104,5,9,-168,62,107,47,"); - add("-17,-29,140,-24,-42,142,36,59,133,25,39,160,"); - add("-5,-14,129,3,-1,151,55,86,135,-59,-104,74,"); - add("-22,-40,38,36,51,147,31,44,116,9,8,77,"); - add("-4,-21,146,15,8,176,-28,-60,109,-19,-57,201,"); - add("-40,-78,59,-56,-108,86,9,-11,173,31,35,121,"); - add("51,67,131,43,55,117,-12,-48,149,-39,-90,112,"); - add("-49,-103,94,-46,-103,105,-29,-79,124,-42,-96,96,"); - add("-58,-113,33,-83,-148,-12,-71,-123,-31,-71,-133,-2,"); - add("14,12,58,12,1,91,-86,-149,-59,-47,-98,37,"); - add("-59,-132,72,-14,-61,125,-49,-123,104,-39,-86,28,"); - add("-61,-140,60,-42,-107,77,-15,-74,144,-44,-116,79,"); - add("-50,-129,75,-10,-53,94,38,26,158,44,67,73,"); - add("69,133,26,64,111,58,72,142,7,72,141,8,"); - add("66,132,-4,58,125,-42,43,109,-75,66,145,-60,"); - add("56,125,-64,53,121,-71,56,124,-68,66,135,-51,"); - add("7,0,40,-46,-102,64,-66,-128,24,-26,-56,23,"); - add("98,190,-32,58,122,-57,51,118,-89,52,114,-78,"); - add("59,122,-68,62,125,-62,65,124,-47,69,129,-43,"); - add("68,125,-44,92,158,-25,60,92,29,77,119,30,"); - add("76,112,42,73,99,67,83,110,86,72,114,-11,"); - add("4,-5,45,24,21,68,50,49,105,78,83,137,"); - add("58,59,108,70,79,99,81,101,73,81,102,63,"); - add("81,95,85,70,68,124,37,11,140,63,60,99,"); - add("81,100,56,91,97,107,61,68,56,48,25,134,"); - add("95,69,193,4,59,-161,23,9,69,72,89,35,"); - add("26,85,-155,10,9,15,30,-9,154,18,-25,150,"); - add("84,79,104,87,109,25,-33,-15,-88,14,31,-36,"); - add("5,41,-103,1,40,-121,5,23,-51,63,28,174,"); - add("40,11,129,42,54,3,60,94,-46,8,-2,39,"); - add("-75,-117,58,-81,-138,88,20,29,-8,66,113,-76,"); - add("75,118,-55,74,121,-75,-19,24,-155,29,76,-125,"); - add("18,79,-187,13,-4,70,-9,-71,196,65,112,-92,"); - add("13,-9,81,59,64,36,32,76,-114,75,146,-180,"); - add("-24,-52,77,-36,-88,143,67,69,48,43,90,-123,"); - add("14,63,-154,21,64,-133,118,139,20,-74,-92,5,"); - add("-31,-74,127,-15,-71,175,81,117,-57,56,69,1,"); - add("106,135,-25,68,85,-11,73,76,39,94,73,131,"); - add("-38,-49,13,-104,-106,-57,-91,-108,-7,-47,-74,60,"); - add("-60,-68,-20,-42,-81,99,-28,-56,70,-62,-95,57,"); - add("-86,-105,-8,-131,-160,-16,64,62,63,78,79,59,"); - add("100,112,37,100,108,51,97,105,43,72,99,-36,"); - add("74,120,-100,77,113,-67,76,113,-78,90,93,38,"); - add("55,46,61,-148,-151,-74,-47,-93,123,-30,-85,157,"); - add("99,85,98,85,80,61,153,155,70,40,40,20,"); - add("97,112,-3,58,86,-66,73,91,-27,159,166,33,"); - add("-81,-96,19,19,6,50,90,69,92,83,50,125,"); - add("70,38,117,60,12,154,52,11,133,60,12,147,"); - add("131,119,60,17,-21,107,62,13,146,43,-7,138,"); - add("91,70,72,40,42,-1,-92,-53,-116,55,100,-113,"); - add("57,110,-139,115,106,35,65,82,-46,115,115,8,"); - add("121,104,49,104,88,41,110,78,84,48,34,38,"); - add("28,8,55,75,30,116,92,65,64,121,108,21,"); - add("-3,-30,74,62,26,88,54,3,128,80,39,94,"); - add("85,37,110,109,74,71,80,94,-52,28,9,44,"); - add("40,-16,131,126,64,129,30,-8,88,93,38,113,"); - add("105,56,94,107,52,103,121,107,-2,-8,-35,69,"); - add("-4,-29,60,-178,-122,-86,32,-15,103,66,1,136,"); - add("72,-9,167,-38,-22,-26,-130,-69,-107,-7,37,-101,"); - add("-67,-14,-107,-103,-53,-97,-159,-94,-120,-65,-45,-35,"); - add("-104,-60,-89,-103,-95,-3,-96,-103,31,-41,-79,93,"); - add("-20,-77,136,82,32,106,95,49,95,108,74,63,"); - add("123,90,55,82,63,30,99,72,40,23,-25,104,"); - add("83,40,80,102,39,117,93,25,125,92,42,89,"); - add("112,46,113,93,39,89,123,44,134,22,57,-80,"); - add("36,85,-115,-20,43,-130,-30,11,-80,-105,-46,-100,"); - add("-28,22,-100,-64,26,-185,-34,27,-132,22,71,-121,"); - add("5,51,-111,-17,47,-147,80,110,-104,68,88,-76,"); - add("40,80,-117,134,108,12,123,104,-5,2,40,-99,"); - add("-108,-42,-127,5,41,-96,1,50,-135,-47,24,-171,"); - add("32,19,19,79,21,123,42,-12,125,33,-26,144,"); - add("110,50,102,112,65,68,120,67,74,82,95,-79,"); - add("61,82,-89,-11,45,-144,-43,18,-144,-67,-4,-134,"); - add("-74,-13,-131,-89,-30,-116,-99,-42,-108,-94,-38,-113,"); - add("-98,-44,-106,-98,-45,-106,-106,-58,-90,-103,-55,-93,"); - add("-115,-73,-74,-112,-73,-67,-116,-83,-49,-113,-78,-60,"); - add("-114,-82,-55,-109,-72,-76,-115,-56,-147,53,45,6,"); - add("104,65,88,121,91,47,108,69,75,117,83,57,"); - add("113,98,-9,16,57,-140,-26,43,-219,24,-2,74,"); - add("16,-31,148,12,-36,152,108,62,91,118,86,38,"); - add("114,76,55,131,77,94,84,41,79,92,39,110,"); - add("86,27,124,120,92,10,113,81,18,139,79,87,"); - add("77,33,78,70,13,120,81,13,143,58,-5,138,"); - add("69,4,136,63,-2,137,60,-6,137,64,-1,130,"); - add("75,7,127,56,-9,131,52,-32,181,44,-3,90,"); - add("99,20,130,74,5,119,76,7,118,108,46,75,"); - add("134,72,56,129,65,61,115,75,12,132,71,48,"); - add("99,24,105,124,40,102,81,4,118,91,21,92,"); - add("132,64,53,120,49,69,144,82,24,74,85,-86,"); - add("-14,53,-143,67,20,52,87,76,-48,80,68,-44,"); - add("97,75,-36,35,76,-132,-21,48,-149,-156,-38,-144,"); - add("95,70,-28,64,77,-97,-12,40,-122,-80,5,-142,"); - add("-12,-31,64,-30,-11,-21,-110,-27,-105,-127,-59,-55,"); - add("-107,-47,-55,-128,-45,-96,-125,-59,-58,19,24,-33,"); - add("54,97,-171,53,-13,131,118,50,66,101,22,112,"); - add("171,62,118,-98,-11,-134,70,22,59,106,27,102,"); - add("107,39,73,154,49,114,21,60,-124,-52,22,-141,"); - add("-43,27,-143,33,72,-146,-152,-58,-96,79,48,0,"); - add("14,40,-88,-94,-11,-134,100,83,-66,71,76,-100,"); - add("-11,39,-135,24,62,-148,29,65,-150,72,74,-101,"); - add("53,75,-145,-13,-19,41,59,2,103,160,82,31,"); - add("37,63,-137,26,63,-161,85,41,23,94,82,-98,"); - add("21,40,-98,-49,12,-135,53,25,16,92,54,-15,"); - add("-52,10,-138,17,20,-37,156,74,39,59,61,-107,"); - add("-28,16,-117,60,38,-23,63,57,-88,69,57,-77,"); - add("102,83,-118,8,24,-79,20,20,-37,74,49,-46,"); - add("-111,-42,-64,-130,-69,5,-146,-88,43,-99,-48,-22,"); - add("-96,-58,25,-49,-28,7,-95,-41,-49,-150,-98,59,"); - add("34,27,-29,17,41,-129,-147,-71,-48,-110,-42,-86,"); - add("-152,-73,-58,50,47,-75,79,60,-67,-57,-21,-49,"); - add("-132,-76,3,-160,-61,-146,61,26,47,109,43,88,"); - add("143,85,-13,94,70,-73,37,50,-133,-63,-7,-132,"); - add("-117,-40,-128,87,51,-3,81,32,66,111,70,-42,"); - add("100,74,-88,118,74,-45,15,33,-126,-36,14,-172,"); - add("9,0,27,45,-2,137,84,29,79,128,82,-65,"); - add("129,69,-4,125,66,-7,-63,-16,-85,20,36,-138,"); - add("-29,12,-144,-2,26,-156,89,63,-95,66,48,-86,"); - add("60,51,-121,40,35,-94,67,52,-111,57,50,-139,"); - add("-47,-6,-120,-118,-44,-117,1,20,-137,-44,-5,-136,"); - add("38,40,-163,14,25,-149,-28,2,-138,-115,-48,-100,"); - add("-134,-70,10,-122,-72,69,-90,-59,99,-141,-75,4,"); - add("-126,-64,-36,-75,-48,63,-110,-70,73,-136,-81,52,"); - add("-81,-55,72,-147,-81,-18,-117,-61,-47,-106,-58,-32,"); - add("-127,-65,-71,-116,-66,-23,-72,-51,68,-61,-54,134,"); - add("-54,-51,138,-72,-60,117,-96,-71,91,-106,-77,75,"); - add("-114,-80,62,-121,-83,40,-123,-83,30,-125,-83,17,"); - add("-126,-79,-24,-132,-77,-69,-106,-62,-54,-111,-61,-90,"); - add("-99,-53,-99,-91,-47,-109,-81,-39,-122,-100,-48,-164,"); - add("-81,-59,24,-107,-89,97,-75,-63,74,-113,-87,43,"); - add("-105,-79,29,-130,-103,48,-103,-85,61,-109,-89,55,"); - add("-102,-90,84,-111,-81,-25,-113,-76,-66,-171,-140,51,"); - add("34,42,-103,-4,11,-101,-114,-81,-55,-149,-133,97,"); - add("41,43,-63,60,64,-122,0,21,-147,-105,-68,-124,"); - add("22,18,1,111,76,92,111,92,-45,79,75,-102,"); - add("54,56,-120,40,49,-163,60,45,13,107,92,-91,"); - add("85,75,-103,103,81,-53,114,83,17,117,88,-23,"); - add("118,88,-25,97,77,-75,128,91,-1,128,88,17,"); - add("117,86,-53,10,22,-157,2,16,-180,1,7,-79,"); - add("-1,10,-152,-23,-6,-149,-67,-37,-156,60,41,10,"); - add("92,69,-93,64,49,-125,36,31,-144,43,35,-143,"); - add("34,29,-159,75,53,-86,104,71,-92,74,51,-124,"); - add("85,58,-119,40,28,-137,36,24,-147,65,42,-134,"); - add("50,31,-135,-11,-8,-147,-44,-31,-140,-40,-31,-200,"); - add("110,72,10,124,78,-12,123,77,-49,127,78,-27,"); - add("121,74,-43,146,88,-45,51,26,-131,-32,-25,-132,"); - add("-139,-87,-39,9,5,-11,128,80,28,67,38,-60,"); - add("112,63,-78,124,75,31,127,75,-3,138,80,10,"); - add("121,72,33,140,80,26,111,66,70,123,71,80,"); - add("121,68,47,114,65,51,111,62,99,85,47,51,"); - add("101,56,71,11,7,65,95,51,27,48,27,106,"); - add("63,33,-10,60,31,34,-13,-4,161,65,34,141,"); - add("106,55,41,105,52,-52,72,35,-130,37,15,-168,"); - add("83,39,-90,46,19,-161,79,36,-75,3,3,49,"); - add("-79,-35,130,-59,-26,161,-35,-15,131,-59,-27,128,"); - add("18,9,136,118,59,92,101,49,32,-31,-15,113,"); - add("-16,-9,126,50,23,132,103,48,78,127,60,65,"); - add("110,50,64,141,65,60,77,38,-96,-2,1,-144,"); - add("15,9,-154,78,37,-114,106,48,-94,68,30,-131,"); - add("19,8,-167,23,11,24,-25,-11,189,7,3,112,"); - add("-100,-45,171,-61,-29,68,-89,-42,116,12,2,157,"); - add("103,45,94,121,53,77,128,54,77,159,73,-115,"); - add("60,22,148,-61,-30,111,-42,-24,145,-3,-7,123,"); - add("39,15,46,131,61,-85,138,64,-138,-35,-19,110,"); - add("-59,-28,68,-116,-54,85,46,14,109,93,34,114,"); - add("115,45,65,101,37,94,152,62,24,119,52,-55,"); - add("96,45,-107,135,57,-57,109,48,-81,56,19,54,"); - add("66,19,122,134,54,-47,120,45,14,79,37,-138,"); - add("77,36,-149,41,13,45,50,19,-23,-6,5,-150,"); - add("45,22,-146,-22,-2,-170,-101,-37,-34,-127,-47,19,"); - add("-127,-52,103,-127,-48,-19,-89,-31,-100,-148,-58,-11,"); - add("-144,-57,-30,-122,-47,-64,-175,-71,-30,-117,-46,-126,"); - add("87,38,-89,112,48,-94,131,54,-56,153,61,26,"); - add("91,35,63,141,56,-31,116,46,-79,111,43,-130,"); - add("-81,-30,-107,-154,-60,-23,-162,-63,-72,76,30,-75,"); - add("143,55,4,196,75,-91,86,33,78,71,26,-98,"); - add("11,3,-102,54,18,-147,88,33,26,157,58,68,"); - add("116,41,-5,120,42,-55,125,42,-76,158,55,8,"); - add("128,42,-55,132,41,-112,70,22,-75,23,5,-78,"); - add("-125,-45,-117,-114,-39,-27,-76,-30,-127,-123,-43,-32,"); - add("-160,-53,55,-110,-42,-70,-136,-49,-22,-142,-49,71,"); - add("-89,-29,108,-55,-16,124,-71,-22,150,-83,-30,38,"); - add("-1,-1,-34,33,11,-33,-107,-42,-58,-131,-52,-69,"); - add("13,8,119,-132,-49,48,-96,-40,-84,-108,-46,-91,"); - add("-57,-27,-143,-83,-37,-88,-125,-51,2,-141,-57,24,"); - add("-144,-61,-14,-41,-22,-92,-95,-41,-26,114,46,-52,"); - add("38,22,135,113,45,-60,128,49,-80,118,50,32,"); - add("181,75,49,-20,-12,-96,69,26,-27,132,44,-152,"); - add("-31,-18,-122,-48,-23,-73,-149,-58,36,-19,0,130,"); - add("-129,-50,41,33,6,-131,146,54,-83,-67,-29,-38,"); - add("-30,-20,-127,59,15,-137,23,-3,-164,-13,-16,-141,"); - add("43,5,-140,94,26,-126,115,37,-94,38,-1,-166,"); - add("125,41,-72,115,37,-70,142,54,6,102,28,-92,"); - add("-15,-22,-149,-12,-22,-150,-12,-22,-146,-138,-61,-71,"); - add("-43,0,128,6,19,144,20,29,187,-75,-34,-47,"); - add("-42,-28,-104,-9,-26,-190,-108,-52,-82,-154,-60,4,"); - add("-152,-59,7,-108,-50,-50,-174,-79,-54,68,23,-40,"); - add("184,68,-58,50,31,85,182,65,-57,38,5,-74,"); - add("139,47,-49,119,35,-77,39,0,-111,-4,-24,-154,"); - add("32,-10,-145,36,-10,-149,68,5,-132,84,9,-131,"); - add("127,25,-132,114,57,88,-14,17,135,47,32,91,"); - add("142,47,-23,132,37,-62,108,14,-139,21,-11,-110,"); - add("87,11,-105,116,20,-113,132,32,-67,113,19,-100,"); - add("112,18,-99,140,36,-44,131,29,-67,98,8,-115,"); - add("38,-12,-122,-82,-53,-131,62,-7,-132,142,57,68,"); - add("135,54,59,40,1,-51,-82,-50,-118,-89,-53,-125,"); - add("79,1,-103,147,43,-6,135,49,40,141,48,36,"); - add("170,45,-16,-69,-36,-77,-55,-47,-138,-9,-37,-150,"); - add("72,-6,-117,20,-29,-143,-66,-60,-170,86,24,-3,"); - add("53,-18,-131,2,-32,-129,-63,-49,-118,24,-19,-101,"); - add("70,46,101,12,39,137,16,42,151,-49,20,136,"); - add("-25,24,126,33,63,227,99,7,-88,13,-32,-147,"); - add("44,-32,-180,30,-15,-95,-5,-39,-151,40,-27,-142,"); - add("-4,-41,-153,-110,-55,-92,45,5,-27,85,-6,-106,"); - add("108,11,-66,125,10,-82,138,21,-55,174,38,-24,"); - add("120,27,-11,156,35,-11,117,9,-67,135,8,-83,"); - add("135,22,-30,145,30,-9,152,26,-26,105,-5,-96,"); - add("100,-12,-111,136,17,-37,146,17,-43,124,1,-78,"); - add("151,20,-27,140,19,-26,147,16,-33,124,-6,-91,"); - add("115,-6,-86,160,20,-20,122,46,82,136,16,-18,"); - add("124,-13,-100,161,35,35,87,-29,-131,55,33,77,"); - add("139,42,76,73,-25,-112,42,-38,-138,104,-20,-104,"); - add("133,-3,-61,49,-34,-123,-41,-40,-104,66,16,23,"); - add("106,-15,-82,140,-26,-125,66,-15,-64,37,-42,-134,"); - add("27,-46,-138,-11,-53,-145,41,-44,-135,89,-34,-116,"); - add("135,-12,-71,148,-3,-46,47,-29,-88,20,-60,-161,"); - add("-50,-23,-49,-136,-35,-57,-140,-33,-47,-120,-35,-57,"); - add("-138,-47,-79,-81,-56,-117,-109,-36,-56,-160,-3,41,"); - add("-158,-18,6,-68,-67,-143,-117,-6,24,-158,-13,25,"); - add("67,-29,-95,140,17,-7,205,63,88,-60,-34,-63,"); - add("-179,-70,-111,42,-48,-129,145,-3,-55,141,6,-29,"); - add("156,23,8,29,73,166,142,5,-28,107,-28,-95,"); - add("87,-40,-119,70,-21,-65,127,-24,-87,96,-37,-107,"); - add("105,-32,-96,-20,-34,-73,-192,-36,-37,-147,-15,0,"); - add("62,-27,-73,-50,-46,-90,-64,-47,-89,-113,-45,-70,"); - add("-151,-17,3,-124,0,32,-127,18,75,-194,-8,39,"); - add("-100,-17,-8,-68,13,51,-91,47,133,-117,28,102,"); - add("-108,-23,-15,39,-62,-152,-86,-54,-89,-79,-64,-112,"); - add("-34,-63,-124,72,-46,-124,159,-3,-57,77,-31,-90,"); - add("67,-50,-124,141,-12,-69,124,38,43,80,-39,-102,"); - add("26,-74,-158,-43,-63,-113,109,-12,-55,55,-60,-133,"); - add("8,-75,-147,46,-53,-112,-48,-53,-89,-123,-74,-110,"); - add("-57,27,66,-61,60,130,-4,-8,-14,37,-64,-132,"); - add("-77,-54,-81,-137,-36,-30,-162,9,65,-61,-42,-61,"); - add("114,-19,-69,160,46,41,86,-61,-135,-67,-54,-82,"); - add("-129,-49,-55,-129,-67,-84,-119,-42,-42,-138,10,60,"); - add("-116,33,95,-4,65,119,-34,91,179,6,-43,-82,"); - add("-48,-58,-91,-90,-77,-112,-97,-71,-96,-11,-72,-125,"); - add("-53,-59,-87,-43,-35,-47,-17,-85,-143,-102,-12,14,"); - add("-72,49,109,-131,44,123,-147,-31,-2,-112,-4,34,"); - add("-197,-92,-87,4,87,151,-95,49,126,19,-17,-38,"); - add("-77,-73,-99,-120,5,56,-104,35,105,-63,53,124,"); - add("-10,-6,-7,-5,-72,-129,51,-64,-135,-57,-80,-116,"); - add("13,-75,-135,-69,-96,-137,-6,-24,-38,106,-35,-103,"); - add("67,-57,-122,33,-94,-169,82,-34,-87,89,-37,-93,"); - add("96,-49,-115,63,-62,-121,-41,-96,-137,86,-23,-66,"); - add("130,44,24,125,-16,-67,99,-44,-102,83,-75,-141,"); - add("42,-58,-101,91,-40,-88,36,-71,-117,-44,19,42,"); - add("-137,27,82,-127,-2,37,-57,52,97,-37,84,141,"); - add("-93,-22,-3,-141,5,56,-90,27,74,-97,52,116,"); - add("-101,-20,6,-32,19,41,-73,40,90,-127,49,126,"); - add("-43,45,90,26,63,92,-86,40,98,-96,48,119,"); - add("-95,41,107,-79,44,109,-10,69,120,-50,62,128,"); - add("-69,42,103,-74,48,118,-71,56,132,-91,31,97,"); - add("-19,54,106,-31,67,136,-69,61,148,75,55,64,"); - add("165,34,-18,13,77,137,-48,65,147,-67,31,93,"); - add("-58,46,119,90,73,96,-41,10,41,-47,57,138,"); - add("-36,64,148,-17,59,129,-75,42,126,-82,38,126,"); - add("-160,31,156,12,-41,-93,-177,-73,-50,89,-3,-57,"); - add("138,10,-58,88,-34,-121,46,-49,-124,-61,-78,-125,"); - add("1,-67,-133,-8,-72,-138,-147,-34,14,-19,-46,-80,"); - add("77,-45,-127,-100,-39,-21,-108,17,91,-81,72,186,"); - add("-63,18,70,-43,51,126,-61,51,138,-149,-7,76,"); - add("-28,56,131,21,67,125,69,16,-9,34,13,6,"); - add("47,46,67,24,56,103,-37,49,128,-27,-27,-40,"); - add("-92,-20,15,-102,4,73,-89,33,130,-12,-27,-52,"); - add("-111,-57,-49,-142,-41,8,-133,-53,-22,-87,46,159,"); - add("-48,-46,-65,-135,-53,-18,-131,-41,5,-130,1,98,"); - add("-109,11,107,-130,-9,78,-177,-14,109,-103,-45,-18,"); - add("-140,-29,51,-106,6,100,-39,52,151,-118,-16,62,"); - add("9,-26,-65,11,-46,-113,-103,-54,-34,-114,-32,27,"); - add("-154,-41,44,-142,-49,18,-163,-73,-16,-109,-48,-5,"); - add("-176,-51,49,-66,10,85,-13,38,99,130,56,2,"); - add("129,43,-24,29,28,35,-139,-21,84,-80,-15,43,"); - add("-154,-101,-82,-135,-44,34,-15,25,71,115,79,68,"); - add("160,107,91,75,63,75,-35,-16,-4,-117,-76,-63,"); - add("-115,-66,-40,-141,-81,-45,-143,-15,110,-116,-71,-46,"); - add("-136,-59,6,-127,-79,-49,-82,-67,-64,-65,-50,-45,"); - add("-143,-56,26,-148,-70,1,-106,-61,-19,-197,-86,23,"); - add("-38,-63,-98,-99,-108,-127,-11,37,93,-37,63,181,"); - add("-104,-51,5,-113,-78,-43,-131,-99,-69,-39,-48,-61,"); - add("-90,-69,-46,-52,22,110,36,78,129,79,77,80,"); - add("94,82,74,23,21,21,-131,-106,-85,-88,-89,-96,"); - add("-22,4,35,76,92,117,-38,-8,26,-83,-108,-141,"); - add("-18,-45,-80,-56,-75,-99,-85,-68,-47,60,12,-44,"); - add("-75,-60,-42,-128,-21,106,-14,-35,-56,-7,-46,-91,"); - add("-126,-71,-1,-154,-77,21,2,45,95,18,77,144,"); - add("-56,-15,36,-91,-90,-80,-163,-46,103,49,9,-42,"); - add("118,28,-87,-8,-31,-56,-136,-78,3,-154,-87,7,"); - add(""); - //add("/*2*/"); - add("855,1,10146,-28113,2593,"); - add("-64,-14,99,-80,-18,106,-94,-21,118,-117,-32,89,"); - add("-142,-49,-9,-125,-42,5,-128,-35,72,-151,-47,23,"); - add("-146,-50,-18,-133,-46,-35,-151,-45,14,-129,-32,74,"); - add("-134,-34,54,-100,-18,108,15,23,153,86,38,101,"); - add("166,53,22,114,38,26,140,39,-36,135,37,-51,"); - add("143,47,6,145,55,58,-124,-32,67,28,23,110,"); - add("85,41,95,148,50,1,46,0,-116,126,38,-40,"); - add("98,45,85,98,27,-54,87,31,0,117,48,45,"); - add("135,50,10,123,45,-4,105,53,98,140,63,69,"); - add("-39,1,110,-64,-4,137,-33,10,148,-42,7,144,"); - add("-39,9,148,-38,12,148,-37,11,146,-28,16,148,"); - add("-87,-10,120,-70,-3,117,-42,15,156,-32,15,133,"); - add("-44,13,141,-80,-2,130,-5,24,117,-7,29,148,"); - add("-32,21,143,-35,21,147,87,40,36,96,40,22,"); - add("-19,30,156,11,38,140,31,47,141,-43,21,144,"); - add("-83,3,129,-86,1,122,-113,-13,102,-111,-11,104,"); - add("-142,-38,40,-137,-36,41,-138,-35,40,-116,-59,-74,"); - add("-56,-54,-130,-62,-27,-26,-49,23,143,-52,19,131,"); - add("-144,-27,65,-26,-48,-141,-89,-34,-22,-138,-28,50,"); - add("-92,-1,101,74,51,99,-49,22,131,-127,-50,-42,"); - add("-141,-33,32,-124,-13,80,-149,-37,17,-130,-15,74,"); - add("-132,-14,77,-147,-42,-9,-144,-26,44,-143,-29,27,"); - add("-147,-33,15,-138,-38,-14,-110,-61,-115,-105,-49,-84,"); - add("-193,-49,-13,38,41,110,-101,-31,-25,-72,23,133,"); - add("127,47,62,-51,10,74,-161,-49,-43,-33,28,117,"); - add("43,40,100,-56,30,138,-19,42,146,36,53,142,"); - add("-86,16,108,-145,-37,-16,-97,-52,-97,-128,-51,-76,"); - add("-146,-38,-26,-149,-29,-1,-148,-30,-2,-141,-7,60,"); - add("-141,-10,48,-149,-24,8,-150,-20,19,-141,-7,49,"); - add("-150,-18,18,-147,-14,28,-149,-16,19,-149,-15,22,"); - add("-142,-3,50,-112,19,105,-133,6,71,-116,18,96,"); - add("-112,20,101,-125,15,86,-121,16,87,-159,-19,-3,"); - add("-150,-19,-10,-151,-12,6,-135,9,64,-132,4,44,"); - add("-156,-14,-3,-118,-35,-73,-114,-37,-85,-153,4,42,"); - add("-88,34,115,-81,37,121,-112,32,108,-35,-26,-68,"); - add("-76,-33,-82,-115,38,126,-117,-31,-73,-110,-34,-83,"); - add("-152,-6,-1,-152,-7,-6,-147,-13,-25,-145,-16,-37,"); - add("-144,-16,-40,-132,-26,-70,-139,-21,-59,-109,-33,-97,"); - add("-99,-36,-108,-90,36,108,-127,-5,-17,-96,20,55,"); - add("-117,5,9,-147,-8,-32,-150,-1,-14,-149,-14,-56,"); - add("-83,28,76,58,42,129,-20,42,118,-126,-13,-49,"); - add("-86,-37,-120,-54,-44,-136,15,-53,-156,-135,-21,-85,"); - add("-82,49,137,-70,46,126,-119,36,88,-81,-19,-70,"); - add("-22,-46,-143,-69,-43,-144,-140,38,89,-43,-33,-110,"); - add("114,-37,-91,71,-44,-122,-30,-42,-140,-71,-35,-129,"); - add("-97,-29,-116,-138,-9,-65,23,-25,-77,-7,-32,-110,"); - add("-136,-7,-58,-104,-24,-113,-14,-51,-183,21,-28,-96,"); - add("58,-21,-58,132,9,68,127,15,86,27,-28,-92,"); - add("-97,-23,-110,-67,-30,-130,-79,-27,-125,-47,-32,-134,"); - add("-5,-37,-148,-31,-33,-141,48,-40,-150,-136,-10,-84,"); - add("-104,-10,-83,-111,-10,-85,-125,-4,-66,-120,-8,-87,"); - add("-117,-10,-97,-90,-20,-132,-69,-16,-107,-93,-15,-121,"); - add("-67,-21,-132,-38,-25,-144,-55,-21,-141,-31,-25,-148,"); - add("-77,-16,-131,-27,-24,-147,3,-27,-149,4,-26,-149,"); - add("22,-28,-148,55,-29,-137,103,-29,-106,150,-18,-6,"); - add("145,-20,-31,134,-7,46,80,13,129,78,14,128,"); - add("132,10,135,16,-14,-76,-32,-21,-147,4,-26,-155,"); - add("162,-21,-42,93,-24,-108,-32,-18,-138,-96,-10,-124,"); - add("-65,-13,-134,-90,-9,-122,-69,-11,-134,-79,-9,-128,"); - add("-44,-14,-146,-57,-11,-139,-22,-15,-147,59,-21,-143,"); - add("-61,-7,-129,-124,4,-86,-90,-3,-120,-57,-6,-139,"); - add("-36,-9,-146,-21,-10,-149,30,-15,-148,71,-17,-133,"); - add("75,-19,-163,-105,10,-3,-134,19,54,-145,14,-43,"); - add("-144,14,-52,-142,14,-50,-140,15,-54,-141,16,-55,"); - add("-136,15,-68,-124,13,-86,-100,9,-114,-115,13,-97,"); - add("-126,16,-86,-144,21,-33,-145,22,-49,-126,14,-211,"); - add("10,2,103,-62,16,132,-128,25,66,-141,24,-30,"); - add("-57,5,-132,-39,2,-151,107,-22,-83,-36,5,-47,"); - add("-142,25,-56,-109,18,-94,-147,29,-31,-156,30,-34,"); - add("-31,9,92,136,-26,79,112,-19,99,54,-6,141,"); - add("-19,9,150,-108,25,85,-133,25,-57,-88,13,-124,"); - add("-107,18,-129,-114,24,14,24,-1,120,84,-12,129,"); - add("60,-7,138,77,-9,129,83,-11,124,-50,19,144,"); - add("-119,31,98,-114,19,-79,-47,1,-148,-123,22,-77,"); - add("-136,28,-54,-143,30,-42,-142,31,-37,-139,32,-11,"); - add("-116,34,108,60,-8,127,139,-31,32,129,-26,64,"); - add("70,-8,134,61,-5,139,61,-3,139,54,-1,147,"); - add("-91,30,115,-36,19,136,-3,14,148,5,14,152,"); - add("-21,19,148,-30,23,145,-30,23,149,-106,31,50,"); - add("-96,33,86,-112,41,116,95,-17,48,-6,13,93,"); - add("-117,39,85,-90,36,105,-94,32,62,-40,17,51,"); - add("-61,31,110,-130,30,-29,-131,37,18,66,-4,97,"); - add("25,9,103,-109,39,70,-156,39,-21,-120,26,-45,"); - add("-54,31,103,-124,41,45,-115,11,-148,-38,20,61,"); - add("29,15,151,-109,31,-3,-62,25,43,-64,36,103,"); - add("-146,51,42,-111,23,-65,-72,33,67,-134,39,-15,"); - add("-96,44,80,-156,50,-3,-129,54,68,-134,41,-21,"); - add("-134,39,-38,-150,60,54,-117,42,3,-27,36,152,"); - add("-53,11,-44,-6,-26,-159,113,-44,-30,-20,-4,-58,"); - add("-82,9,-121,-125,48,21,-84,50,117,-82,22,-47,"); - add("-147,63,50,-120,52,44,-39,38,132,-100,56,97,"); - add("-23,41,177,-118,61,82,-71,52,123,202,-60,96,"); - add("-114,60,80,93,-7,139,20,19,131,-21,39,142,"); - add("-73,14,-67,-18,-25,-152,-142,44,-57,-88,65,143,"); - add("-97,45,31,-51,46,113,-18,42,157,-42,48,133,"); - add("-38,47,138,18,29,150,86,-9,108,-40,35,75,"); - add("-97,66,102,-47,52,129,-2,40,151,56,18,152,"); - add("-95,59,72,-85,8,-104,-7,-35,-144,-28,-30,-156,"); - add("25,-48,-147,-15,-25,-128,-24,-22,-132,-5,-34,-151,"); - add("73,-59,-120,23,-40,-133,3,-39,-169,21,-33,-111,"); - add("38,-44,-131,-54,-9,-152,126,-67,-76,70,-43,-69,"); - add("53,-45,-120,47,-38,-98,1,-24,-130,48,-43,-128,"); - add("75,-51,-119,85,-50,-97,50,-39,-115,16,-28,-131,"); - add("145,-69,-78,92,-14,130,81,-38,-46,92,-49,-90,"); - add("135,-55,-30,105,-50,-76,120,-56,-82,123,-40,17,"); - add("101,-51,-102,-31,-10,-145,-5,-15,-118,144,-53,-23,"); - add("127,-51,-60,141,-46,15,142,-48,-7,141,-48,-20,"); - add("139,-48,-27,129,-49,-68,142,-47,-20,144,-43,2,"); - add("134,-47,-55,118,-43,-65,95,-41,-118,48,-30,-133,"); - add("40,-27,-148,9,-19,-150,-25,-8,-148,2,-15,-146,"); - add("-5,-12,-156,31,-21,-145,-2,-12,-152,-15,-7,-143,"); - add("9,-13,-157,-86,24,-2,-77,18,-69,16,-15,-167,"); - add("-97,25,-49,-131,35,-68,-99,24,-107,55,-20,-57,"); - add("93,-30,-67,129,-40,-49,84,-29,-95,-35,5,-125,"); - add("-80,19,-128,-38,7,-140,-68,16,-139,-184,54,-42,"); - add("30,-11,-109,-23,5,-131,-40,10,-134,-186,56,-83,"); - add("112,-34,-78,70,-22,-118,55,-16,-134,-40,13,-157,"); - add("4,1,-147,49,-12,-139,-6,5,-150,40,-7,-148,"); - add("4,4,-147,-49,20,-153,-49,20,-120,42,-5,-148,"); - add("39,-4,-144,28,1,-165,-30,17,-116,-70,28,-110,"); - add("110,-29,-54,130,-44,72,26,-16,138,-25,-2,147,"); - add("-13,-5,153,70,-28,142,78,-20,-44,36,-3,-147,"); - add("-24,16,-149,53,-7,-129,110,-37,77,57,-23,124,"); - add("143,-44,74,27,-14,135,126,-36,32,75,-23,68,"); - add("98,-29,76,82,-17,-108,28,0,-145,-68,25,-127,"); - add("24,4,-161,49,-4,-144,86,-13,-128,107,-19,-105,"); - add("27,5,-144,-12,15,-154,84,-6,-166,-127,38,-63,"); - add("-148,36,15,-143,44,-72,-19,20,-144,109,-26,-31,"); - add("136,-40,54,109,-23,-50,-14,17,-123,-89,31,-83,"); - add("-123,39,-67,-87,35,-107,77,-9,-97,155,-46,54,"); - add("104,-16,-88,94,-9,-114,8,18,-157,92,-13,-73,"); - add("110,-17,-77,101,-8,-114,95,-6,-120,67,5,-135,"); - add("95,-5,-114,65,6,-140,81,3,-128,85,1,-126,"); - add("109,-7,-101,130,-14,-76,103,-3,-108,79,6,-131,"); - add("87,5,-123,129,-10,-87,18,26,-156,96,3,-108,"); - add("151,-19,-53,144,-31,23,139,-14,-57,133,-6,-84,"); - add("146,-32,31,140,-18,-24,118,0,-95,127,-12,-39,"); - add("156,-16,-38,134,-22,14,143,-10,-54,81,-45,165,"); - add("104,3,-81,78,19,-143,165,-22,5,-30,-18,107,"); - add("-130,3,66,-57,-19,133,6,-28,137,79,-26,81,"); - add("97,-32,107,88,0,-61,160,-18,-5,141,-19,14,"); - add("98,-1,-51,42,24,-149,104,4,-76,77,5,-66,"); - add("52,22,-135,113,9,-95,125,-16,19,118,4,-70,"); - add("89,-27,97,77,-31,117,41,-30,136,-72,-25,156,"); - add("-144,6,35,-121,-2,69,69,-30,124,161,-14,3,"); - add("37,-21,100,-45,-22,142,-92,-12,117,-82,-13,121,"); - add("-60,-18,139,-79,-13,131,-69,-14,132,-35,-19,147,"); - add("27,-24,148,60,-25,134,135,-21,64,138,-19,55,"); - add("133,-23,87,126,-7,-24,71,13,-132,96,8,-112,"); - add("117,6,-96,151,-12,12,-16,-15,116,-64,-16,145,"); - add("86,-21,123,23,-21,148,-22,-17,154,7,-18,148,"); - add("106,-18,108,92,-18,118,66,-18,136,75,-16,129,"); - add("56,-16,137,9,-14,151,-32,-11,148,-72,-7,133,"); - add("-86,-6,126,-84,-4,126,-14,-8,133,123,-8,18,"); - add("89,4,-130,125,1,-97,157,-11,62,114,1,-81,"); - add("157,-2,-36,120,3,-96,85,8,-121,92,8,-118,"); - add("75,8,-118,108,9,-118,128,6,-80,153,1,-24,"); - add("123,5,-53,115,10,-101,132,8,-74,135,9,-67,"); - add("113,8,-67,85,13,-99,153,6,-28,38,8,-63,"); - add("45,16,-122,89,13,-90,109,16,-106,112,15,-84,"); - add("81,16,-100,104,20,-116,151,21,-102,20,22,-149,"); - add("111,19,-87,53,22,-133,53,22,-123,132,8,1,"); - add("71,16,-73,-64,23,-163,42,23,-122,-1,27,-158,"); - add("66,27,-132,-52,19,-120,-108,12,-98,-88,18,-123,"); - add("-106,12,-92,-181,0,-44,53,12,-52,133,30,-117,"); - add("100,13,-34,82,37,-157,82,20,-73,63,33,-132,"); - add("115,28,-95,35,21,-85,31,32,-130,61,37,-142,"); - add("27,33,-132,16,32,-130,62,36,-128,76,39,-130,"); - add("-76,23,-114,-33,36,-149,-108,11,-73,-26,28,-111,"); - add("74,41,-132,-110,13,-76,9,25,-88,-85,32,-135,"); - add("-90,31,-127,-103,-6,-2,-99,8,-46,-25,40,-142,"); - add("-56,34,-126,-32,47,-159,9,45,-144,40,39,-116,"); - add("-74,30,-107,-14,40,-127,106,39,-102,153,10,-1,"); - add("126,33,-75,143,33,-68,84,42,-106,163,15,-9,"); - add("136,8,12,146,15,-9,154,12,8,123,-13,73,"); - add("140,35,-61,147,12,11,142,13,8,142,26,-26,"); - add("106,40,-77,132,38,-62,143,29,-28,135,34,-44,"); - add("194,36,-27,97,-12,78,124,-4,64,150,16,23,"); - add("159,37,-31,46,48,-115,156,45,-53,-15,-36,94,"); - add("-26,-53,138,147,11,43,118,0,64,138,-8,98,"); - add("120,71,-143,138,11,45,145,21,23,146,6,68,"); - add("113,50,-75,115,32,-22,87,-32,148,71,25,-26,"); - add("148,46,-37,171,21,52,60,55,-120,84,45,-71,"); - add("112,-11,108,134,20,40,147,29,20,107,-15,126,"); - add("147,32,16,131,8,82,130,11,73,131,16,60,"); - add("141,21,56,125,8,85,139,21,58,133,18,65,"); - add("111,2,99,144,26,57,153,29,56,87,53,-79,"); - add("72,62,-121,120,61,-70,123,47,-21,79,-2,88,"); - add("-86,-65,114,-106,-63,88,-125,-59,59,-42,-50,118,"); - add("131,12,99,76,-14,129,81,-11,124,87,-7,121,"); - add("105,3,111,32,-30,145,-31,-50,141,-74,-56,114,"); - add("-40,-47,127,112,11,101,121,18,85,137,36,41,"); - add("131,62,-66,141,35,58,25,-32,158,-43,-49,136,"); - add("95,18,63,95,12,88,17,-29,150,74,7,81,"); - add("119,18,111,27,-25,152,17,-25,144,64,-7,141,"); - add("44,-14,140,73,-1,140,52,-8,136,110,21,107,"); - add("140,49,19,136,45,44,78,7,125,25,-20,159,"); - add("129,47,22,139,49,40,139,48,50,59,4,115,"); - add("7,-23,148,32,-11,148,-6,-27,148,-101,-55,90,"); - add("-76,-48,104,-17,-28,144,16,-18,175,104,29,94,"); - add("124,40,85,58,5,144,73,15,129,78,17,127,"); - add("88,23,124,82,22,122,59,11,135,67,15,133,"); - add("30,-1,147,-6,-17,148,-18,-20,147,-90,-49,114,"); - add("-65,-38,129,-105,-54,130,66,23,86,82,28,102,"); - add("-29,-22,162,43,11,136,-8,-12,155,9,-3,157,"); - add("54,18,141,-20,-14,150,30,9,148,-2,-4,155,"); - add("38,14,144,0,-2,154,-38,-17,145,-30,-13,146,"); - add("-13,-5,165,118,51,49,159,71,70,-58,-25,54,"); - add("-147,-64,16,-117,-49,76,-86,-35,120,-43,-14,142,"); - add("-63,-23,129,-10,1,153,-12,1,149,-21,-2,150,"); - add("-87,-30,128,-7,4,134,-138,-53,64,-79,-30,35,"); - add("-98,-32,115,-59,-15,138,-81,-23,127,-102,-32,104,"); - add("-125,-43,76,-134,-48,36,-137,-54,-19,-115,-37,69,"); - add("-97,-26,116,-95,-26,95,"); - add(""); - //add("/*3*/"); - add("533,1,14413,-10720,-24028,"); - add("106,64,35,41,145,-39,45,121,-25,118,62,45,"); - add("108,59,42,130,65,53,121,63,49,125,156,13,"); - add("105,16,61,116,68,46,134,43,70,123,76,50,"); - add("78,121,2,37,136,-31,102,110,25,28,136,-35,"); - add("3,139,-52,41,137,-25,71,135,-3,71,132,-1,"); - add("106,109,33,94,119,21,23,137,-33,49,144,-17,"); - add("50,142,-13,38,151,-25,25,132,-27,44,100,-1,"); - add("117,83,55,114,84,53,77,128,14,100,11,68,"); - add("77,-59,74,102,-33,85,81,128,19,59,137,0,"); - add("45,141,-9,21,141,-27,40,147,-13,49,131,-2,"); - add("55,141,2,99,120,41,12,152,-33,97,77,53,"); - add("59,144,7,26,145,-17,59,151,8,83,100,39,"); - add("77,-10,61,69,-98,78,-3,-158,37,16,-145,50,"); - add("6,-150,44,28,-68,40,47,-117,69,-62,-183,3,"); - add("25,-97,47,27,-119,56,-34,-144,17,30,-138,66,"); - add("-8,-148,39,-63,-137,-5,-3,-148,45,-37,-145,19,"); - add("-51,-146,9,10,-137,56,16,-141,62,-6,-146,48,"); - add("-18,-141,38,10,-146,62,22,-132,68,43,-119,81,"); - add("8,-136,60,28,-124,73,85,-76,100,103,-39,102,"); - add("114,21,87,118,63,73,114,73,68,103,83,54,"); - add("74,129,12,119,59,79,116,34,89,116,41,87,"); - add("107,90,60,96,110,43,112,66,76,109,71,73,"); - add("114,56,83,102,33,84,106,93,64,98,100,55,"); - add("101,89,63,107,85,72,105,76,74,45,130,-4,"); - add("-39,126,-84,-51,115,-92,-23,126,-65,10,141,-39,"); - add("49,132,2,-28,103,-60,-91,36,-100,-74,6,-72,"); - add("-3,145,-49,-37,155,-83,-53,99,-80,74,82,45,"); - add("87,113,49,72,-11,71,12,-108,44,35,-107,66,"); - add("67,112,31,62,10,57,48,21,40,-31,120,-66,"); - add("19,34,9,75,-92,100,92,-81,115,82,-8,84,"); - add("109,97,80,90,-10,94,116,25,110,106,78,87,"); - add("85,40,76,101,-2,107,98,47,89,108,136,75,"); - add("93,-18,105,101,107,79,72,-5,80,45,4,49,"); - add("66,-13,77,-92,-105,-70,-116,-3,-126,-80,-112,-54,"); - add("-41,-175,10,55,-93,89,75,5,80,98,-28,118,"); - add("99,-9,114,116,57,113,75,-20,92,46,-138,98,"); - add("60,6,68,39,-81,73,60,-72,95,43,-109,90,"); - add("-49,-156,-2,56,-99,103,50,-71,86,-4,-133,46,"); - add("44,-94,90,23,-141,85,-100,-116,-74,-87,-100,-64,"); - add("17,-35,35,10,-127,65,48,36,43,92,-10,115,"); - add("51,51,42,103,56,103,109,16,130,28,-100,78,"); - add("18,-163,94,41,49,31,15,153,-49,18,117,-26,"); - add("99,103,83,78,114,53,90,103,74,89,65,90,"); - add("76,53,79,62,-14,88,19,-118,75,56,19,66,"); - add("49,-39,84,65,59,63,17,-34,39,-23,-173,43,"); - add("60,-55,107,55,99,32,14,-38,36,32,-76,79,"); - add("49,-70,100,-47,-125,-9,-20,-79,9,80,18,105,"); - add("-21,-130,32,56,-2,81,36,-42,73,46,-97,113,"); - add("-68,-135,-32,-26,-92,9,12,-100,68,-109,-64,-125,"); - add("17,-12,31,88,5,126,85,45,101,98,10,141,"); - add("33,-89,96,-10,-72,24,-108,-124,-95,-9,-120,52,"); - add("7,-166,103,59,52,60,73,129,39,75,139,38,"); - add("64,131,26,40,8,56,10,-123,85,35,-95,108,"); - add("38,-102,118,-6,-132,67,-46,-141,11,-57,-137,-9,"); - add("-32,-109,18,35,-92,112,37,-91,117,7,-117,86,"); - add("-8,-141,79,7,-120,92,25,-100,109,43,-74,123,"); - add("53,-57,130,57,-51,132,67,-25,134,61,-36,133,"); - add("69,-2,122,76,10,129,24,-97,116,41,-63,123,"); - add("68,-18,141,49,-44,126,26,-88,117,52,-38,132,"); - add("78,18,135,79,17,141,39,-36,107,37,-65,131,"); - add("30,-62,114,22,-89,124,18,-91,117,14,-95,118,"); - add("40,-60,139,40,-50,134,15,-97,124,-18,-110,68,"); - add("-10,-135,113,59,79,51,69,184,-27,23,-36,85,"); - add("-27,-131,71,-24,-129,79,-54,-125,5,-65,-137,-2,"); - add("-50,-138,32,-25,-122,75,-19,-121,89,-40,-134,59,"); - add("-56,-139,28,-80,-120,-45,-70,-128,-14,-80,-119,-43,"); - add("-82,-123,-40,-83,-118,-49,-75,-119,-27,-53,-167,84,"); - add("100,105,97,60,81,39,98,141,53,-23,-83,47,"); - add("-79,-124,-31,-87,-103,-72,-57,-134,37,63,50,81,"); - add("103,130,75,-27,-77,34,-85,-107,-64,-87,-106,-64,"); - add("-85,-114,-49,-85,-119,-40,-82,-127,-22,-63,-133,29,"); - add("-81,-128,-14,-89,-107,-59,-88,-115,-41,-79,-124,-8,"); - add("-93,-112,-54,-84,-127,-12,-67,-131,32,-71,-133,28,"); - add("-77,-127,10,-81,-128,3,-90,-122,-21,-92,-115,-32,"); - add("-91,-119,-25,-94,-115,-31,-85,-125,-1,-77,-137,40,"); - add("-92,-172,59,-23,-67,51,-85,-127,14,-63,-112,36,"); - add("-33,-122,120,50,-14,128,8,-34,69,-75,-127,40,"); - add("-100,-130,-6,-84,-36,-120,-97,-70,-91,-105,-98,-61,"); - add("-98,-58,-109,-69,-40,-76,-88,-26,-136,-69,0,-135,"); - add("-85,-22,-130,-62,9,-131,-36,52,-145,4,92,-127,"); - add("-10,81,-134,-54,23,-132,-42,37,-127,30,113,-104,"); - add("-19,73,-132,-69,10,-132,-67,12,-130,-64,23,-138,"); - add("-69,12,-130,-82,-5,-128,-97,-18,-133,-83,-38,-84,"); - add("-62,26,-130,-73,16,-134,-92,-30,-104,-67,39,-149,"); - add("-2,101,-125,22,108,-95,31,118,-93,-30,71,-126,"); - add("-69,31,-135,-37,68,-130,-46,59,-131,-44,61,-128,"); - add("-40,68,-130,-79,17,-126,-101,-20,-116,-90,2,-122,"); - add("-82,15,-124,-66,41,-128,-72,36,-130,-66,44,-129,"); - add("-59,54,-129,-54,61,-126,-77,32,-128,-88,16,-122,"); - add("-91,12,-122,-94,8,-120,-101,-6,-112,-94,8,-117,"); - add("-78,34,-120,-119,-51,-88,-117,-66,-71,-117,-80,-56,"); - add("-104,-26,-91,-87,18,-111,-122,-68,-68,-121,-27,-104,"); - add("-86,2,-92,-126,-117,-26,-112,-44,-74,-38,-120,71,"); - add("-98,-130,20,-129,-42,-92,-107,-99,-16,-85,-115,23,"); - add("-124,-98,-31,-87,-113,21,-80,-156,70,-62,-71,9,"); - add("-173,-72,-100,30,103,-70,-25,85,-105,-8,117,-118,"); - add("-31,90,-114,-65,81,-136,-70,41,-102,-11,108,-108,"); - add("11,117,-95,-39,91,-115,36,126,-78,-31,-5,-23,"); - add("-84,-123,30,-33,-105,63,-57,-130,65,4,-102,94,"); - add("11,-104,105,-21,-114,85,-51,-122,66,-60,-146,83,"); - add("84,-30,106,5,-114,113,-106,3,-101,-105,24,-119,"); - add("-2,109,-105,33,121,-83,13,141,-119,-96,-66,-25,"); - add("-122,-121,3,-61,-111,49,-43,-125,79,3,-137,133,"); - add("-119,-18,-87,-85,45,-119,-83,53,-122,-35,-85,51,"); - add("-7,-50,41,-116,-89,-16,-71,-54,-8,227,159,44,"); - add("-34,-26,-6,-122,-85,-24,-113,-99,-1,-100,-112,23,"); - add("-87,-116,39,-22,-117,95,-75,-117,53,-127,-103,-3,"); - add("-114,-89,-7,-114,-97,4,-128,-46,-59,-127,-32,-70,"); - add("-138,-91,-19,-80,19,-83,-136,-18,-88,-123,-15,-80,"); - add("-134,-63,-39,-134,-55,-47,-135,-49,-51,-89,37,-102,"); - add("-50,81,-118,-69,69,-117,-36,76,-99,-50,97,-129,"); - add("-109,-60,-18,27,-110,124,-68,-50,1,-74,71,-120,"); - add("-83,-61,1,-118,-90,6,-118,-72,-10,-166,-79,-35,"); - add("33,81,-56,-45,52,-80,-106,31,-99,-54,89,-120,"); - add("-53,84,-113,-65,76,-112,-91,53,-107,-114,29,-96,"); - add("-127,5,-82,-132,6,-85,-118,12,-81,-75,78,-114,"); - add("-42,85,-100,49,106,-64,45,112,-72,8,121,-99,"); - add("16,118,-92,34,114,-76,-2,118,-100,-22,114,-106,"); - add("-32,107,-105,-28,83,-82,18,123,-89,15,102,-72,"); - add("-23,126,-112,-27,98,-90,16,148,-104,-36,111,-104,"); - add("-29,92,-85,-33,108,-97,-98,84,-113,-57,79,-88,"); - add("-55,94,-96,26,127,-77,-46,113,-103,-21,121,-94,"); - add("3,124,-84,5,131,-85,52,127,-59,3,127,-83,"); - add("-8,125,-85,-2,126,-83,9,129,-78,18,131,-73,"); - add("-17,125,-87,-17,124,-85,46,131,-57,49,127,-52,"); - add("73,127,-39,73,123,-36,98,120,-20,37,121,-51,"); - add("26,144,-69,42,129,-52,37,130,-53,35,153,-67,"); - add("94,112,-12,39,138,-54,130,95,16,83,115,-18,"); - add("94,105,-6,121,87,19,92,135,-20,126,100,16,"); - add("107,31,42,122,95,19,132,110,18,78,104,-8,"); - add("52,139,-39,13,134,-58,91,140,-16,131,17,66,"); - add("131,106,25,24,-114,68,87,14,43,94,98,9,"); - add("73,136,-21,48,153,-43,78,105,-2,70,133,-19,"); - add(""); - //add("/*4*/"); - add("521,1,-7056,27453,9826,"); - add("48,26,-40,102,-3,82,129,39,-21,109,39,-34,"); - add("149,63,-76,128,57,-78,109,51,-74,115,37,-34,"); - add("155,37,-8,74,53,-109,30,53,-140,34,5,8,"); - add("16,-47,150,31,-29,102,147,9,62,99,17,11,"); - add("87,16,4,95,1,51,162,24,19,128,16,22,"); - add("150,20,22,150,21,14,147,40,-44,112,37,-54,"); - add("138,36,-40,141,35,-40,136,40,-59,124,28,-26,"); - add("101,31,-51,-186,8,-106,-101,20,-105,-103,19,-105,"); - add("-143,-14,-27,-148,-10,-40,-143,-34,32,-74,15,-85,"); - add("215,32,9,77,25,-38,-169,-3,-78,-107,8,-83,"); - add("-49,5,-41,160,34,-24,89,49,-114,72,13,-3,"); - add("104,-15,104,144,20,5,117,36,-60,-34,35,-133,"); - add("-138,6,-87,-100,9,-84,-26,2,-22,106,27,-34,"); - add("-46,31,-131,9,15,-50,67,-33,153,51,-38,155,"); - add("115,-8,83,73,-31,138,68,-22,102,-7,-50,156,"); - add("-23,-48,143,63,-35,135,127,12,17,55,24,-51,"); - add("83,-28,119,58,46,-118,28,48,-137,40,54,-155,"); - add("-28,28,-103,19,24,-71,-62,10,-58,48,38,-104,"); - add("-81,31,-138,-60,27,-121,-117,-1,-50,-49,-1,-21,"); - add("156,41,-69,-66,30,-137,-147,-11,-32,-25,17,-76,"); - add("183,8,61,84,29,-64,-116,16,-113,-119,-4,-45,"); - add("77,37,-102,147,-12,121,151,36,-63,12,32,-114,"); - add("100,-13,92,106,9,16,105,-20,118,-3,-3,10,"); - add("-130,-1,-53,79,-42,189,132,10,16,121,14,-3,"); - add("106,20,-32,35,40,-131,-138,11,-95,-50,-21,57,"); - add("10,46,-169,69,37,-110,76,18,-43,138,-12,102,"); - add("87,-21,110,101,33,-87,-53,19,-95,-114,12,-87,"); - add("12,41,-158,-85,7,-59,152,22,-32,-85,29,-153,"); - add("15,11,-41,84,-23,129,122,-16,112,95,37,-117,"); - add("21,34,-136,-87,20,-116,-75,5,-50,179,24,-36,"); - add("-114,10,-86,-64,32,-167,41,27,-107,139,16,-18,"); - add("125,9,5,132,-15,116,94,23,-70,-19,32,-157,"); - add("-106,8,-74,-49,18,-107,81,19,-60,78,3,13,"); - add("-125,21,-150,-109,-17,43,95,44,-183,83,32,-133,"); - add("61,27,-122,133,24,-80,108,28,-115,38,30,-154,"); - add("110,20,-81,127,17,-55,-21,16,-102,-151,-11,11,"); - add("-62,-7,23,131,29,-132,152,-1,58,123,15,-53,"); - add("-21,16,-106,-143,-1,-43,-83,3,-50,228,12,1,"); - add("155,6,10,102,20,-101,124,18,-90,107,21,-118,"); - add("-44,18,-138,-120,9,-92,-151,-8,10,-119,-20,108,"); - add("-142,0,-54,-144,-19,79,-121,-20,92,-119,-20,86,"); - add("-67,-9,34,143,31,-154,100,21,-98,96,22,-124,"); - add("58,22,-139,-64,9,-94,-117,-19,93,-141,-15,49,"); - add("-96,-5,-11,191,29,-131,-90,8,-108,-158,-5,-43,"); - add("-133,-6,-26,-88,-3,-36,207,24,-69,163,2,76,"); - add("131,-2,79,148,8,6,140,11,-31,71,17,-112,"); - add("-85,10,-124,-73,5,-72,0,13,-123,-135,-1,-55,"); - add("-129,-1,-65,-138,-7,-14,-103,-3,-43,161,11,-4,"); - add("140,4,45,135,0,78,110,11,-52,-95,9,-131,"); - add("-94,6,-119,-143,-1,-77,-135,-4,-55,-94,-4,-21,"); - add("-93,-10,28,-41,-13,106,-121,-11,22,-31,17,-204,"); - add("-68,2,-87,-140,-11,-12,-69,-8,23,94,-3,118,"); - add("85,-4,125,-5,-13,134,-42,-6,17,-30,11,-134,"); - add("-79,8,-159,-81,-8,3,-33,-17,156,-47,-12,77,"); - add("-162,-23,72,-64,-5,-20,28,18,-155,0,14,-147,"); - add("4,14,-151,-96,-8,-23,-86,-20,128,-92,-17,74,"); - add("-60,-11,44,-16,16,-196,-135,-16,6,192,35,-159,"); - add("-33,5,-106,-101,-6,-76,-153,-13,-66,-100,-22,129,"); - add("-62,-18,139,-13,-2,1,47,17,-149,52,17,-141,"); - add("-120,-10,-67,-128,-23,88,-156,-23,29,-96,-6,-97,"); - add("-75,-11,9,-161,-17,-91,-135,-17,-46,-158,-24,-9,"); - add("-66,-19,118,82,4,124,20,1,35,-159,-26,8,"); - add("-131,-27,69,-149,-26,5,-115,-15,-68,-79,-5,-112,"); - add("-136,-20,-71,-132,-18,-97,-92,-11,-104,-134,-22,-57,"); - add("-126,-27,35,-85,-27,146,3,-8,117,-31,-12,78,"); - add("-78,-22,78,72,6,114,84,7,125,27,-2,88,"); - add("-125,-28,30,-53,2,-158,-83,-15,-23,37,-8,187,"); - add("-6,-3,18,-45,4,-159,-37,4,-148,-69,-4,-134,"); - add("-122,-27,3,-14,-11,103,23,2,47,-56,-24,133,"); - add("-16,-10,74,-160,-31,-52,-68,-28,146,2,-15,161,"); - add("38,5,36,82,20,-10,39,-2,103,14,-6,92,"); - add("100,14,75,91,6,131,28,-10,139,4,-17,155,"); - add("-15,-22,150,-14,-21,139,-64,-30,120,-86,-26,53,"); - add("-80,-37,132,-46,-34,162,-75,-38,138,-88,-29,54,"); - add("-74,-22,30,-46,-35,152,-96,-36,80,-86,-47,153,"); - add("-106,-40,80,-72,-45,154,-114,-39,58,-87,-20,-17,"); - add("-31,-22,74,-100,-39,73,-184,-50,-1,-85,-46,120,"); - add("47,-12,127,129,32,18,96,30,-20,135,52,-87,"); - add("58,25,-52,-84,-59,192,-29,-33,130,30,-7,72,"); - add("-124,-33,1,72,1,88,-94,-29,17,21,-3,40,"); - add("-42,-19,38,4,-18,88,-59,-44,134,-73,-40,89,"); - add("-68,-28,39,-40,22,-146,2,33,-152,-53,15,-141,"); - add("-78,5,-131,-105,-33,17,-23,-37,147,48,-17,142,"); - add("-9,-35,153,54,-16,137,72,1,89,28,-16,102,"); - add("-118,-44,46,-91,-40,58,-86,-48,95,-70,-32,47,"); - add("-128,-40,7,-97,-41,45,-118,-10,-108,-108,-16,-70,"); - add("-100,-36,16,94,-8,155,118,26,45,30,-3,48,"); - add("-88,-50,90,-5,-29,108,-83,20,-181,-61,13,-130,"); - add("-50,4,-82,-53,-5,-51,-41,-34,87,-148,-38,-42,"); - add("-56,-34,64,161,41,50,129,23,72,36,-12,94,"); - add("100,1,123,7,-9,41,-86,-24,-11,37,-16,107,"); - add("-82,-3,-89,-56,15,-129,-59,16,-141,-96,-15,-64,"); - add("-170,-44,-50,-53,-35,69,117,12,110,106,9,101,"); - add("71,-8,121,15,-30,131,6,-3,21,-63,14,-130,"); - add("-40,21,-135,-110,-11,-99,-118,-16,-95,-78,-29,14,"); - add("-1,-26,101,63,-15,139,-126,-37,-22,-51,-34,62,"); - add("-122,-20,-87,-65,-49,103,145,31,74,142,41,32,"); - add("143,44,17,143,37,37,121,19,78,-6,-8,22,"); - add("-106,-25,-34,-154,-31,-77,-146,-44,-22,-143,-39,-39,"); - add("-139,-40,-33,-62,-35,48,85,-1,116,53,0,68,"); - add("-184,-35,-112,-17,-28,83,-15,-32,96,130,28,64,"); - add("136,29,71,24,-11,68,-165,-25,-119,-135,-42,-24,"); - add("-69,-39,52,-100,-73,125,28,-5,54,51,8,36,"); - add("-181,-67,0,-74,-63,122,195,74,-5,104,26,40,"); - add("119,64,-69,-31,-71,201,-58,-63,136,-23,-15,23,"); - add("1,55,-181,-66,-27,10,-35,-28,52,-152,-42,-51,"); - add("-76,-18,-34,133,15,117,47,-3,66,-180,-32,-116,"); - add("-70,-33,20,3,-16,55,-107,-47,18,47,-7,82,"); - add("12,-6,35,-83,-41,28,22,-12,65,-73,-36,24,"); - add("25,-30,122,-38,-42,84,60,16,22,-98,-49,33,"); - add("-130,-83,94,19,-34,122,-13,-35,90,-21,-28,56,"); - add("54,7,40,-92,-51,43,58,10,37,-98,-67,77,"); - add("57,-17,114,-21,-11,7,-77,-40,22,13,-34,109,"); - add("37,-10,67,-72,-48,51,-35,-37,59,92,13,67,"); - add("126,5,125,142,35,58,116,22,61,41,-17,87,"); - add("-146,-56,-6,60,-3,69,-97,-55,42,59,0,61,"); - add("-3,-18,43,63,-2,65,-120,-76,71,103,34,18,"); - add("-126,-76,63,185,44,72,79,-31,151,88,23,29,"); - add("4,50,-116,-5,45,-116,126,-9,141,57,37,-37,"); - add("21,43,-83,112,43,-3,-39,21,-88,74,12,38,"); - add("12,9,-12,33,17,-10,8,15,-29,95,37,-6,"); - add("19,27,-49,73,31,-12,4,15,-35,104,47,-23,"); - add("84,70,-102,40,56,-109,58,66,-120,125,26,48,"); - add("101,24,26,42,40,-68,85,33,-10,57,40,-58,"); - add("43,2,32,57,10,24,76,29,-11,-12,32,-96,"); - add("127,17,64,44,59,-121,-19,47,-146,170,32,60,"); - add("62,78,-163,57,57,-112,113,7,77,114,33,3,"); - add("98,67,-107,127,23,38,118,1,92,107,28,6,"); - add("82,50,-75,128,61,-78,76,16,15,-11,-28,72,"); - add("-127,-57,64,89,-12,100,147,19,57,106,16,32,"); - add(""); - //add("/*5*/"); - add("321,1,-10216,27876,4312,"); - add("-33,-1,-76,72,20,45,-2,15,-106,-14,19,-164,"); - add("39,12,16,27,27,-123,65,8,111,85,31,-9,"); - add("8,22,-136,71,20,39,8,15,-85,28,3,48,"); - add("4,-19,148,36,-10,148,91,34,-10,5,22,-145,"); - add("-23,12,-142,-74,2,-199,39,5,60,101,19,116,"); - add("97,15,136,111,41,-23,83,46,-134,-80,-19,-64,"); - add("-122,-34,-49,-149,-37,-113,40,14,2,175,50,71,"); - add("-13,9,-102,-138,-39,-64,31,12,-10,122,36,43,"); - add("129,29,115,102,31,16,46,35,-157,-87,-11,-138,"); - add("-56,-6,-113,-222,-73,-11,83,30,-16,-1,8,-72,"); - add("42,15,-13,111,28,86,158,51,1,-51,-7,-85,"); - add("-141,-30,-150,119,40,-9,109,25,97,130,48,-48,"); - add("40,27,-149,-81,-18,-74,-180,-53,-52,108,42,-72,"); - add("-67,-16,-56,21,9,-21,157,48,17,-26,-2,-67,"); - add("-175,-51,-57,83,31,-45,72,26,-34,127,32,93,"); - add("78,33,-99,-164,-42,-116,93,29,7,-46,-7,-95,"); - add("29,9,1,98,22,110,124,39,-10,36,22,-141,"); - add("38,22,-136,-15,5,-146,-116,-29,-96,-131,-52,162,"); - add("-2,9,-138,-168,-59,92,30,17,-111,82,29,-61,"); - add("58,25,-106,-53,-14,-52,-97,-26,-78,108,38,-70,"); - add("84,26,-3,138,41,41,138,44,-54,109,37,-90,"); - add("137,43,-56,61,23,-112,-40,-7,-144,-129,-34,-103,"); - add("-72,-18,-120,-116,-36,59,-11,0,-126,-95,-32,94,"); - add("12,7,-103,-111,-33,-55,-128,-42,81,-118,-41,121,"); - add("9,6,-99,-97,-29,-88,-120,-41,52,-76,-28,121,"); - add("-132,-45,25,-156,-52,-3,31,11,-43,-48,-11,-205,"); - add("55,18,52,82,24,128,114,40,-67,113,40,-102,"); - add("130,44,-64,145,46,-1,132,43,-41,135,42,-15,"); - add("136,40,48,138,41,56,119,33,92,89,26,-38,"); - add("6,5,-152,-47,-11,-143,-92,-26,-117,-137,-39,-88,"); - add("-116,-35,-60,-150,-46,-31,-133,-41,-51,-142,-45,-12,"); - add("-118,-39,-20,-147,-48,5,-147,-49,3,-69,-23,127,"); - add("-17,-7,159,-97,-35,131,-30,-9,-143,16,7,-160,"); - add("-128,-44,2,-123,-44,84,-87,-32,123,5,0,128,"); - add("48,15,108,-26,-10,41,-121,-45,61,-16,-9,122,"); - add("4,-3,150,-18,-12,161,16,-1,147,-33,-20,163,"); - add("142,56,-94,-32,-16,89,-94,-43,172,87,35,-57,"); - add("33,8,63,-16,-15,156,-31,-20,134,77,20,120,"); - add("224,86,-107,-50,-25,106,-45,-24,121,-143,-57,81,"); - add("-4,-6,52,-12,-10,76,-63,-30,87,-88,-41,97,"); - add("-89,-44,123,-97,-26,-101,-126,-48,6,104,26,133,"); - add("61,11,121,-78,-35,67,-48,-33,136,-7,-9,59,"); - add("-98,-47,90,-40,-27,104,-124,-58,86,-110,-55,90,"); - add("-119,-57,82,-121,-47,-10,-139,-52,-35,-26,-26,124,"); - add("28,-11,166,165,60,53,-23,-27,123,-19,-27,133,"); - add("-49,-40,137,-121,-51,7,-58,0,-158,-127,-38,-102,"); - add("72,37,-48,110,57,-83,22,29,-151,-29,8,-149,"); - add("-73,-16,-111,-128,-46,-65,-134,-47,-73,-106,-57,89,"); - add("-119,-68,133,-79,-22,-93,-88,-24,-123,-86,-20,-158,"); - add("-74,-40,60,-104,-51,36,15,11,-34,105,55,-70,"); - add("40,33,-139,8,24,-185,-97,-38,-54,-122,-47,-84,"); - add("-136,-60,-25,-121,-62,56,-57,-38,119,-8,-19,140,"); - add("53,12,112,102,35,117,51,13,85,22,-10,161,"); - add("136,69,-54,9,0,39,-73,-51,134,57,9,131,"); - add("-80,-45,58,-83,-53,109,-76,-54,126,-40,-37,125,"); - add("-10,-27,141,-118,-50,-33,-83,-49,60,-26,-39,160,"); - add("-43,-39,111,5,-29,182,-3,-24,125,-70,-55,117,"); - add("-21,-37,139,21,-21,160,19,-20,146,3,-29,150,"); - add("9,-29,158,108,53,-2,74,56,-98,77,62,-118,"); - add("33,42,-131,48,52,-147,29,36,-118,66,56,-133,"); - add("81,63,-139,58,14,68,-45,-49,153,69,32,-2,"); - add("5,-4,34,-65,-58,148,-52,-49,128,35,12,22,"); - add("6,0,13,-36,-43,131,3,-27,132,-51,-50,126,"); - add("48,17,25,94,46,-11,111,64,-64,148,89,-103,"); - add("-51,-52,135,106,52,-17,93,65,-109,46,40,-98,"); - add("104,66,-102,60,44,-88,59,48,-118,7,33,-157,"); - add("61,47,-111,96,62,-119,45,40,-122,45,33,-83,"); - add("124,73,-132,-1,-12,72,-14,-25,114,85,32,18,"); - add("104,68,-154,13,-7,76,64,28,-15,60,14,63,"); - add("-60,-47,133,21,-19,153,-70,-34,34,1,-17,94,"); - add("169,50,93,-76,-32,11,-140,-45,-62,-77,-48,87,"); - add("-46,-28,50,-52,-44,112,-24,-34,123,-24,-34,117,"); - add("48,9,49,121,63,-59,141,74,-81,41,-4,97,"); - add("74,22,40,108,55,-61,56,6,82,71,52,-120,"); - add("92,12,116,74,35,-30,82,28,15,84,54,-109,"); - add("-55,-3,-90,-92,-25,-50,27,17,-35,-66,-7,-93,"); - add("27,15,-25,168,65,-10,-77,-16,-67,-89,-7,-146,"); - add("62,29,-26,97,33,19,105,56,-96,-22,11,-108,"); - add("61,32,-54,-91,-27,-41,30,18,-40,-51,-10,-57,"); - add("79,38,-48,-64,-18,-37,23,20,-72,30,34,-145,"); - add(""); - //add("/*6*/"); - add("232,1,18592,-4797,-23051,"); - add("-106,15,-88,-120,-24,-91,-119,8,-94,-118,7,-93,"); - add("-120,-52,-82,-108,20,-87,-97,76,-88,-109,63,-95,"); - add("10,142,-19,95,107,50,118,58,78,117,25,84,"); - add("129,55,90,-36,0,-28,-107,-30,-77,-120,-9,-89,"); - add("-118,13,-91,-134,35,-107,36,120,6,-13,12,-11,"); - add("-146,-1,-108,61,204,10,-49,-33,-30,-119,-65,-75,"); - add("-99,38,-78,-75,44,-61,-122,-40,-80,-111,-70,-66,"); - add("-120,-44,-76,-131,-23,-86,-92,-37,-57,-116,-80,-64,"); - add("-78,-127,-30,-86,-126,-34,-63,-120,-20,-133,-100,-68,"); - add("-47,-112,-9,-98,-97,-45,-110,-83,-54,-81,-130,-25,"); - add("-117,-86,-56,-123,-29,-71,-124,-22,-72,-145,-4,-88,"); - add("-117,-41,-63,-131,-11,-75,-123,-34,-66,-185,-57,-96,"); - add("-47,-75,-11,-128,-41,-65,-123,32,-77,40,107,0,"); - add("-100,58,-68,45,25,20,127,31,66,127,50,61,"); - add("118,67,55,-31,116,-41,72,59,30,131,18,74,"); - add("117,87,52,6,176,-30,138,9,81,129,-9,80,"); - add("77,116,25,78,118,27,64,119,19,56,148,9,"); - add("114,75,59,107,85,53,93,102,44,110,89,56,"); - add("63,156,17,62,136,21,-86,71,-66,-129,-7,-82,"); - add("-135,30,-90,-20,131,-30,76,119,32,95,108,47,"); - add("124,25,76,123,42,74,116,64,69,117,74,68,"); - add("122,39,77,132,36,85,29,140,4,8,153,-11,"); - add("81,116,43,89,110,51,116,51,75,100,96,62,"); - add("100,82,63,95,92,60,126,13,89,114,54,78,"); - add("104,83,70,107,77,73,122,28,89,119,30,88,"); - add("117,44,86,115,52,84,111,58,82,111,59,84,"); - add("110,66,82,109,62,83,115,26,92,106,29,84,"); - add("116,62,92,108,32,88,115,2,96,110,49,91,"); - add("106,67,87,105,65,88,107,57,90,101,75,86,"); - add("109,46,94,104,60,91,102,33,91,102,-62,96,"); - add("99,-71,94,20,-114,24,54,-82,54,102,-52,98,"); - add("111,0,105,59,-109,62,65,-115,69,63,-110,69,"); - add("63,-114,69,76,-102,82,93,-48,96,111,34,107,"); - add("62,101,55,41,106,33,51,178,40,49,-74,54,"); - add("47,53,45,60,125,53,28,146,21,13,151,6,"); - add("-26,132,-32,-7,147,-13,49,159,46,26,101,24,"); - add("100,19,104,106,7,112,93,80,97,94,61,99,"); - add("99,46,107,103,0,112,92,-59,102,79,-95,89,"); - add("102,-47,116,95,-44,108,27,-144,35,66,-107,79,"); - add("-26,-80,-28,-89,10,-101,-113,-40,-126,-79,-43,-87,"); - add("-25,-126,-21,-48,-117,-49,-96,-86,-100,-104,-7,-113,"); - add("-103,-7,-111,-104,22,-113,-109,-1,-114,-95,41,-103,"); - add("-39,-73,-36,47,-135,57,106,-18,112,49,35,51,"); - add("92,22,96,70,-108,81,83,-45,93,94,29,101,"); - add("111,-45,126,-51,-80,-51,-99,-57,-104,-78,-112,-76,"); - add("-68,-98,-65,17,-122,30,-25,-150,-12,-85,-55,-86,"); - add("-90,52,-101,-34,127,-48,-36,147,-52,-73,194,-92,"); - add("21,-74,27,-15,-191,2,-79,-92,-74,-104,-65,-102,"); - add("-102,-37,-100,-121,16,-124,34,-53,39,-61,-124,-48,"); - add("-100,-76,-92,-105,-15,-103,-110,-21,-105,-106,-32,-100,"); - add("-102,-61,-90,-104,-53,-94,-108,-63,-94,-102,-25,-93,"); - add("-101,-45,-88,-111,-79,-92,-100,-81,-81,-87,-94,-67,"); - add("-89,-135,-61,-38,-138,-15,-47,-141,-22,-114,-156,-77,"); - add("-40,-83,-22,-121,-73,-93,17,-1,14,130,-9,115,"); - add("-146,-136,-105,90,-8,80,-9,-55,1,-90,-119,-58,"); - add("-3,-143,23,17,-176,48,-104,50,-100,-46,-39,-32,"); - add("-109,-13,-91,-167,68,-154,-25,-111,0,-104,-104,-67,"); - add("-94,-101,-59,-84,-116,-46,-96,-102,-57,"); - add(""); - //add("/*7*/"); - add("154,1,26493,2257,-13893,"); - add("-76,-31,-149,-74,37,-134,-66,79,-108,57,125,126,"); - add("-2,122,18,-70,10,-127,-71,7,-130,-74,49,-125,"); - add("-55,104,-77,43,75,91,54,35,105,57,73,117,"); - add("53,89,117,73,-38,129,-4,82,10,35,49,76,"); - add("65,-40,116,5,32,15,-31,140,-26,-9,133,15,"); - add("53,62,116,26,133,85,38,28,81,59,-90,93,"); - add("25,88,73,47,-149,54,56,-117,82,48,-93,74,"); - add("42,-130,54,50,-135,71,65,-82,116,50,-45,94,"); - add("7,-114,-9,4,-113,-15,66,-64,125,45,19,101,"); - add("66,-38,135,57,-93,104,62,-52,127,54,-50,112,"); - add("33,-153,44,46,-120,83,52,-101,102,42,-120,79,"); - add("45,-118,87,46,-102,92,58,-44,133,58,-36,134,"); - add("57,-37,135,57,-22,139,54,-54,127,26,-133,49,"); - add("25,-75,56,18,-121,35,29,-156,57,6,-124,5,"); - add("-9,-102,-29,81,61,215,46,78,129,40,25,111,"); - add("57,3,156,39,94,117,26,50,77,42,-95,109,"); - add("33,-121,83,9,-151,16,29,-118,75,13,-155,32,"); - add("-4,-158,-18,-19,-112,-56,-28,-126,-82,14,-146,40,"); - add("-12,-145,-30,-32,-83,-88,-10,-97,-26,-50,-35,-138,"); - add("-38,-109,-101,-29,-130,-70,7,-157,32,-8,-110,-14,"); - add("-22,-139,-46,-22,-167,-40,-8,-126,-4,-26,-111,-54,"); - add("-57,-16,-152,-43,-3,-113,-56,-11,-142,-51,28,-136,"); - add("-43,22,-113,-17,22,-44,-20,-161,-27,-26,-159,-42,"); - add("-61,77,-162,-61,-39,-142,-50,59,-128,-32,100,-89,"); - add("-26,34,-66,-52,-93,-110,-56,-29,-123,-35,-99,-66,"); - add("-53,64,-130,-44,15,-99,-56,-73,-114,-34,-133,-54,"); - add("-13,-154,-5,-33,-74,-59,-56,70,-131,-55,59,-128,"); - add("-58,55,-130,-56,67,-126,-38,95,-92,-27,130,-73,"); - add("4,111,-6,-20,68,-47,-22,171,-65,-39,115,-88,"); - add("28,83,49,20,62,35,10,163,7,-47,142,-102,"); - add("-36,123,-79,-12,41,-25,-60,19,-119,-48,126,-100,"); - add("-59,63,-115,-4,145,-12,19,146,35,-8,159,-15,"); - add("-17,144,-31,-32,136,-60,-51,96,-94,-20,76,-35,"); - add("-5,39,-8,-65,-89,-125,-68,-15,-126,-73,10,-133,"); - add("-26,105,-43,53,108,101,61,93,116,55,87,108,"); - add("53,95,104,32,132,70,-50,137,-83,32,133,71,"); - add("38,140,87,23,98,55,49,127,109,6,116,26,"); - add("20,83,51,-86,28,-162,-47,53,-82,38,99,86,"); - add("20,88,52,"); - add(""); - //add("/*8*/"); - add("165,1,-3761,29749,925,"); - add("105,16,-88,20,5,-115,-80,-9,-37,-29,-3,-31,"); - add("-47,-4,-80,-110,-14,-41,-136,-19,81,-100,-17,132,"); - add("1,1,-30,72,13,-169,33,6,-71,95,14,-116,"); - add("-71,-8,-70,-163,-23,48,0,1,-106,9,2,-129,"); - add("-147,-21,-153,-110,-16,31,-7,-1,135,-53,-8,-61,"); - add("-122,-19,-35,-63,-10,95,83,11,213,-84,-12,-44,"); - add("-61,-9,-181,-128,-21,73,71,11,96,120,18,87,"); - add("71,9,180,-31,-5,-34,-70,-9,-133,-142,-22,-76,"); - add("-76,-13,72,82,11,161,14,1,95,-8,-5,121,"); - add("111,15,104,152,24,26,154,20,94,-47,-7,-9,"); - add("-156,-22,-41,-25,-8,124,-41,-6,-17,-91,-11,-125,"); - add("-40,-8,50,-29,-4,-16,-67,-7,-129,-78,-9,-150,"); - add("-110,-19,4,-113,-22,102,-96,-21,116,-46,-7,-35,"); - add("58,13,-93,118,23,-94,104,20,-112,24,7,-151,"); - add("-68,-11,-87,-130,-23,56,-120,-22,56,-114,-23,91,"); - add("-158,-31,75,-82,-16,16,15,-2,197,-113,-21,-44,"); - add("25,8,-118,19,7,-151,-71,-13,-140,-128,-25,-53,"); - add("-165,-34,-4,8,0,136,119,23,111,-68,-14,33,"); - add("-86,-18,2,-119,-25,-28,-119,-27,44,-30,-9,120,"); - add("205,42,85,-71,-15,8,-158,-33,-60,-80,-16,-72,"); - add("15,6,-141,110,26,-69,106,24,-103,-43,-8,-138,"); - add("-141,-31,34,-114,-26,87,-72,-16,-23,-46,-10,-142,"); - add("-126,-28,-99,-150,-36,4,32,7,90,-57,-14,93,"); - add("15,2,148,-64,-18,122,50,10,115,89,18,123,"); - add("30,3,144,-27,-10,120,-120,-32,101,30,2,119,"); - add("126,25,109,91,18,84,144,33,-15,-11,3,-107,"); - add("91,23,-68,12,8,-124,0,6,-162,115,26,-25,"); - add("-3,-2,51,-49,-16,139,46,4,146,133,26,68,"); - add("161,36,-43,69,8,150,100,19,16,75,13,51,"); - add("97,23,-71,60,8,68,132,27,-12,35,13,-141,"); - add("-62,-5,-151,42,10,-41,84,13,67,50,5,82,"); - add("-5,-8,156,61,14,-56,-16,6,-192,78,13,33,"); - add("36,0,138,75,7,128,133,27,-61,21,0,70,"); - add("44,-1,150,152,29,-54,167,24,52,92,10,74,"); - add("145,21,23,139,18,43,150,19,39,151,18,47,"); - add("11,7,-78,-117,-10,-95,-148,-15,-126,48,7,13,"); - add("141,14,96,37,12,-110,20,0,43,101,6,127,"); - add("105,9,88,154,15,60,145,17,13,77,17,-129,"); - add("66,14,-106,21,9,-121,-130,-8,-126,76,8,5,"); - add("41,9,-86,-23,5,-159,-33,-1,-85,-109,-11,-52,"); - add("25,6,-75,8,5,-139,-90,-10,-11,-124,-18,83,"); - add(""); - //add("/*9*/"); - add("141,-1,-21883,20471,1436,"); - add("65,72,-30,87,96,-65,100,105,-11,107,111,-3,"); - add("102,102,54,109,109,17,92,90,60,101,90,127,"); - add("-65,-68,57,36,31,57,109,106,20,79,70,98,"); - add("111,104,51,-8,-21,150,-38,-50,135,-36,-49,136,"); - add("-43,-57,130,-92,-95,31,-111,-115,37,-111,-111,-3,"); - add("-90,-84,-66,-92,-84,-97,-97,-100,-2,16,3,123,"); - add("93,86,76,54,39,143,-62,-78,107,-99,-108,41,"); - add("-99,-110,38,-57,-72,90,77,63,126,93,86,74,"); - add("105,111,-16,107,112,-13,106,102,39,99,89,73,"); - add("106,107,-9,100,116,-107,24,10,84,-82,-96,103,"); - add("-64,-76,75,-8,-30,135,-15,-42,160,116,101,83,"); - add("60,64,-21,94,106,-86,61,78,-109,63,76,-93,"); - add("73,86,-101,3,26,-151,0,22,-151,9,29,-154,"); - add("2,22,-155,-15,3,-139,-8,9,-146,7,24,-151,"); - add("28,40,-138,43,54,-139,91,89,-30,73,74,-77,"); - add("119,111,-7,88,89,-104,118,108,-11,24,31,-124,"); - add("-13,-1,-150,60,61,-116,100,93,-69,110,101,-66,"); - add("28,31,-127,-2,5,-150,26,30,-153,34,34,-165,"); - add("-125,-107,-95,-72,-60,-133,-3,0,-117,-97,-86,-61,"); - add("-81,-72,-89,-64,-57,-131,-43,-39,-140,-43,-40,-140,"); - add("-67,-63,-120,-81,-77,-105,-74,-71,-112,-82,-81,-130,"); - add("-45,-39,74,36,37,155,35,36,139,-75,-70,33,"); - add("-34,-31,69,-4,-3,150,54,51,132,31,29,142,"); - add("51,45,135,68,61,144,-91,-86,86,-2,-5,78,"); - add("4,-1,145,-62,-61,110,-67,-69,114,-13,-20,160,"); - add("38,29,127,56,45,132,16,4,152,38,22,175,"); - add("-80,-81,76,-9,-21,153,-37,-46,111,-91,-95,80,"); - add("-42,-32,-78,-24,-11,-141,0,11,-124,24,35,-148,"); - add("-54,-41,-140,-27,-15,-151,-85,-77,-108,9,12,-37,"); - add("14,18,-89,-17,-13,-76,-97,-91,-71,-97,-92,-70,"); - add("-97,-94,-70,-126,-123,-92,37,32,153,-110,-113,18,"); - add("-105,-107,-20,-102,-103,-53,-103,-107,-10,-100,-104,-41,"); - add("-103,-108,0,-99,-109,34,-103,-112,0,-102,-112,13,"); - add("-90,-102,61,-85,-99,76,-3,-10,140,58,57,128,"); - add("87,91,82,94,99,65,100,107,35,102,110,3,"); - add(""); - //add("/*10*/"); - add("132,1,25827,-2922,-14981,"); - add("-63,23,-112,19,140,5,21,141,11,-16,138,-50,"); - add("13,153,-1,15,150,2,6,149,-11,-3,144,-22,"); - add("16,158,7,42,141,56,-44,112,-86,-60,83,-109,"); - add("-75,-8,-126,-28,-102,-36,-4,-168,10,29,-144,65,"); - add("-51,-124,-70,-63,-96,-91,-77,-86,-116,-10,-125,1,"); - add("4,-160,31,-56,-106,-75,-92,-2,-147,-29,144,-68,"); - add("-75,45,-127,-81,15,-127,-33,114,-68,61,79,85,"); - add("42,105,52,77,107,108,-6,149,-27,-10,119,-28,"); - add("50,128,66,63,116,89,43,135,59,58,105,86,"); - add("82,146,124,-61,9,-101,-61,102,-105,-75,53,-123,"); - add("-69,72,-112,-53,112,-89,-48,117,-79,-64,75,-102,"); - add("-81,-47,-121,-42,124,-68,69,87,103,89,-54,137,"); - add("55,-52,87,80,8,126,72,-53,115,74,-45,120,"); - add("77,43,124,66,-102,111,43,-122,76,61,-53,103,"); - add("75,38,125,38,141,57,63,82,104,52,115,88,"); - add("20,146,31,1,150,0,-27,141,-45,-44,124,-75,"); - add("-68,67,-115,-74,-34,-125,-76,-10,-127,-81,22,-133,"); - add("-73,11,-119,-75,-29,-121,-79,18,-125,-87,6,-138,"); - add("-72,-3,-112,-84,-17,-131,-72,-76,-110,-85,-8,-128,"); - add("-84,18,-126,-83,27,-122,-79,62,-115,-46,119,-65,"); - add("-62,111,-87,-57,114,-77,-48,140,-63,17,126,30,"); - add("71,-46,100,74,-113,101,46,-90,63,68,-92,97,"); - add("80,-71,115,82,-11,122,81,24,124,77,22,118,"); - add("83,-36,125,78,45,123,79,29,125,80,20,129,"); - add("77,10,124,72,58,119,63,41,105,81,33,135,"); - add("38,-108,60,49,-123,78,73,5,124,53,-60,89,"); - add("42,-121,70,42,-135,71,20,-165,34,-5,-129,-7,"); - add("-5,-218,-5,50,-60,89,37,-137,69,31,-131,61,"); - add("-2,-151,4,-6,-157,-1,35,-133,73,10,-147,30,"); - add("52,-105,103,11,-115,32,-4,-145,7,-35,-179,-41,"); - add("-67,-3,-120,-71,-23,-124,-23,-150,-21,-35,-129,-43,"); - add("-10,-165,6,8,-149,38,1,-148,26,17,-139,57,"); - add("-25,-158,-14,-61,-75,-93,-72,30,-132,"); - add(""); - //add("/*11*/"); - add("133,1,29737,2888,-2716,"); - add("9,-113,-12,8,-138,-52,6,-140,-72,-2,-106,-100,"); - add("-2,-111,-113,-5,-99,-114,-5,-101,-110,-4,-106,-109,"); - add("-16,-34,-151,-6,-108,-107,-4,-123,-92,-4,-124,-82,"); - add("-10,-97,-118,1,-147,-41,-1,-134,-54,-18,-43,-138,"); - add("-15,-85,-133,-17,-73,-129,-13,-126,-116,-1,-136,-24,"); - add("-5,-142,-55,-5,-144,-46,-5,-143,-50,-6,-154,-42,"); - add("-20,-65,-126,-23,-73,-133,-11,-130,-64,-16,-117,-89,"); - add("-18,-115,-96,-18,-122,-91,-10,-146,-42,-19,-126,-84,"); - add("-15,-136,-61,-19,-130,-78,-8,-149,-12,-19,-137,-69,"); - add("-25,-105,-103,-24,-111,-94,-22,-131,-73,-26,-107,-100,"); - add("-31,-88,-120,-31,-93,-119,-21,-139,-52,-30,-107,-102,"); - add("-33,-90,-116,-33,-98,-110,-35,-84,-122,-34,-94,-108,"); - add("-38,-70,-134,-36,-100,-107,-31,-118,-80,-38,-108,-108,"); - add("-50,-131,-143,11,129,-8,-21,16,-85,-51,-87,-158,"); - add("-12,85,-78,-28,-11,-98,-44,-106,-121,-14,86,-78,"); - add("11,150,-16,9,150,-19,11,150,-8,11,150,-5,"); - add("19,146,27,-2,156,-48,19,137,34,-6,148,-55,"); - add("-10,124,-58,31,104,87,28,122,77,29,133,80,"); - add("43,39,151,41,13,150,34,-129,151,1,99,-15,"); - add("-14,144,-74,34,85,116,16,106,50,12,151,27,"); - add("9,148,24,24,72,85,40,15,160,31,36,124,"); - add("31,99,122,-1,135,-10,6,103,22,-5,70,-21,"); - add("-27,80,-116,-8,134,-29,24,93,101,33,40,138,"); - add("30,-79,128,48,-65,208,-16,34,-70,-32,86,-138,"); - add("11,125,52,32,29,145,28,59,129,17,117,89,"); - add("8,142,49,21,102,112,25,64,128,25,57,130,"); - add("7,141,61,19,104,114,22,-104,94,17,33,97,"); - add("19,84,121,14,168,114,17,44,107,0,140,42,"); - add("12,110,102,17,81,126,13,95,116,16,79,127,"); - add("17,69,139,9,106,103,17,75,150,-6,95,13,"); - add("3,124,86,0,119,72,3,113,91,7,106,117,"); - add("19,1,150,14,39,141,19,-8,148,18,-11,149,"); - add("13,33,146,5,87,123,5,77,128,14,7,148,"); - add(""); - //add("/*12*/"); - add("129,-1,17606,18970,15171,"); - add("-13,-69,100,24,-118,119,79,-124,60,75,-119,57,"); - add("88,-117,38,105,-103,1,120,-58,-71,115,-15,-117,"); - add("107,-39,-82,114,-100,-19,119,-75,-55,119,-64,-69,"); - add("111,-41,-90,109,-28,-102,103,-17,-111,72,31,-131,"); - add("75,26,-129,69,33,-132,71,28,-131,83,13,-127,"); - add("26,2,-40,-103,181,-91,-89,118,-32,-85,121,-42,"); - add("-65,119,-69,-79,119,-52,-55,115,-80,-90,101,-15,"); - add("-97,78,26,-117,33,112,-71,83,-19,27,21,-65,"); - add("43,18,-83,-112,123,-21,-104,-5,146,-111,83,31,"); - add("-87,114,-44,-49,113,-96,-21,93,-105,128,-44,-107,"); - add("73,-19,-72,88,-33,-72,52,40,-132,35,56,-132,"); - add("-61,93,-54,-129,77,65,-119,82,41,-103,112,-27,"); - add("-111,101,-2,-98,4,127,-60,-33,129,37,-112,118,"); - add("76,-104,52,43,-80,60,-175,159,-1,-94,108,-37,"); - add("-68,104,-66,-36,102,-106,-71,91,-44,-136,52,97,"); - add("-108,31,93,-127,86,30,-99,45,57,-105,116,-45,"); - add("-116,93,3,-111,99,-15,-114,71,31,-118,47,69,"); - add("-37,83,-81,105,-3,-124,117,-34,-92,23,30,-75,"); - add("-173,114,35,-11,82,-119,-5,84,-127,73,16,-120,"); - add("99,0,-126,103,-17,-107,50,18,-95,-136,110,-8,"); - add("-28,92,-120,-61,101,-93,-100,104,-49,-77,98,-69,"); - add("-117,55,57,-84,-14,134,-69,-10,106,-112,43,68,"); - add("-117,32,91,-63,-37,142,-40,-45,124,-33,-54,130,"); - add("-51,-57,155,-69,-21,116,16,-82,112,-33,-62,136,"); - add("6,-73,108,-68,-55,161,-91,-26,142,-28,-31,78,"); - add("65,-125,116,26,-99,118,-5,-63,97,3,-96,136,"); - add("113,-74,-14,126,-73,-31,128,-109,16,69,-71,25,"); - add("101,-143,90,74,-109,72,117,-96,4,112,-93,3,"); - add("122,-91,-11,116,-97,3,118,-79,-27,124,-87,-23,"); - add("119,-92,-12,104,-107,22,117,-94,-11,115,-91,-14,"); - add("122,-32,-100,119,-63,-59,6,-38,42,-102,-1,123,"); - add("-37,-76,143,51,-113,87,48,-116,92,70,-87,27,"); - add(""); - //add("/*13*/"); - add("124,1,19067,-11237,20253,"); - add("-33,-122,-37,-29,-151,-59,-10,-135,-68,31,-113,-96,"); - add("-3,-132,-75,-21,-117,-50,-58,-142,-31,-39,-139,-48,"); - add("-8,-125,-70,25,-112,-96,-3,-132,-82,61,-101,-125,"); - add("57,-50,-88,90,-39,-116,62,-82,-117,98,-12,-107,"); - add("113,52,-80,114,71,-69,115,51,-85,112,14,-108,"); - add("112,48,-86,99,84,-50,84,137,2,78,132,5,"); - add("79,128,-2,81,128,-4,66,137,16,73,133,6,"); - add("68,135,11,59,138,20,67,136,10,71,133,3,"); - add("77,128,-9,71,135,1,69,135,2,65,138,8,"); - add("63,138,7,66,137,4,74,132,-11,62,123,-2,"); - add("67,148,4,69,134,-8,66,137,-2,71,133,-13,"); - add("70,134,-12,64,138,-4,50,138,11,55,142,6,"); - add("15,140,50,55,141,4,81,114,-42,53,86,-22,"); - add("56,154,5,10,135,49,5,138,55,14,146,47,"); - add("79,50,-71,13,-135,-75,51,-82,-97,83,123,-46,"); - add("60,141,-11,13,136,44,-18,131,76,3,142,54,"); - add("22,147,34,18,146,35,14,147,40,-2,145,57,"); - add("-2,136,52,-8,136,58,-47,91,89,-15,145,67,"); - add("-63,151,124,-75,-67,64,-95,-104,75,-2,-149,-48,"); - add("-41,-140,-2,-54,-146,9,-100,-65,91,-94,-118,63,"); - add("-71,56,100,-64,-50,53,-14,-217,-65,-54,-64,35,"); - add("-33,-189,-35,-79,-71,59,-81,-136,36,-8,95,45,"); - add("-59,-48,45,-115,-224,35,-47,52,72,-109,-77,85,"); - add("-93,-85,64,-42,-128,-9,-26,-34,14,-77,54,103,"); - add("-96,-1,98,-95,-83,64,-107,-29,96,-115,-54,94,"); - add("-101,-38,85,-108,-40,91,-38,-156,-28,-71,-134,14,"); - add("-84,-126,28,-80,-121,25,-45,-139,-18,-10,-135,-50,"); - add("-26,-143,-40,-12,-139,-52,16,-129,-77,-24,-134,-40,"); - add("6,-139,-73,2,-130,-66,-41,-141,-31,-45,-126,-20,"); - add("-86,-125,20,-83,-112,23,-94,-127,23,-69,-137,-6,"); - add("-101,-89,49,-79,-92,25,-68,-146,-15,"); - add(""); - //add("/*14*/"); - add("122,1,14146,19873,-17463,"); - add("104,-90,-18,-83,-22,-92,35,-96,-78,124,-19,79,"); - add("34,103,143,90,-59,8,110,-101,-22,114,-79,6,"); - add("38,-117,-98,122,-132,-43,-14,-100,-120,73,-117,-66,"); - add("97,-107,-32,92,-115,-44,111,-100,-11,100,-112,-31,"); - add("95,-109,-32,129,-66,43,117,-85,15,108,-105,-13,"); - add("122,-84,22,126,-56,55,128,-50,65,124,-60,52,"); - add("109,-21,80,-26,124,104,-148,120,-13,56,19,71,"); - add("123,-63,49,59,-112,-61,78,-122,-52,112,-100,3,"); - add("123,-89,27,116,-101,10,61,-129,-71,121,-80,37,"); - add("112,-15,95,39,56,95,115,1,116,111,-11,102,"); - add("120,-40,81,112,-13,103,119,3,127,79,17,103,"); - add("127,-51,83,113,-91,28,118,-84,42,118,-83,43,"); - add("122,-71,62,115,-81,46,105,-30,89,100,-76,36,"); - add("25,-102,-77,-105,-3,-123,-105,13,-106,-64,-64,-135,"); - add("-67,52,-22,-93,123,22,-79,-2,-89,-140,23,-128,"); - add("-81,13,-73,-106,51,-61,-130,25,-112,-119,61,-63,"); - add("-113,41,-75,-90,-25,-115,-91,-16,-107,-52,-37,-88,"); - add("133,-120,16,74,-125,-45,2,-108,-101,-17,-89,-99,"); - add("-88,-30,-115,-106,89,-20,-124,123,-4,-101,92,-11,"); - add("-128,42,-82,-65,56,-8,45,91,128,-73,118,44,"); - add("-75,-7,-77,-47,-80,-121,-48,-27,-69,-113,7,-97,"); - add("-123,-9,-120,-108,79,-23,-159,95,-51,5,-137,-123,"); - add("-122,86,-27,-72,118,46,-148,21,-106,-146,127,-5,"); - add("41,-97,-56,72,-134,-63,-73,11,-52,-131,69,-45,"); - add("-89,124,40,-123,82,-26,-54,64,16,6,109,107,"); - add("-49,118,71,-87,119,44,-104,108,19,-96,105,23,"); - add("-69,120,62,-46,118,80,-34,117,89,-106,120,36,"); - add("-113,25,-66,-58,35,-10,-57,106,63,-108,106,23,"); - add("-116,100,11,-90,116,51,-50,111,78,-30,116,99,"); - add("-18,105,98,26,93,122,-20,107,102,-61,115,79,"); - add("-36,99,82,"); - add(""); - //add("/*15*/"); - add("125,1,-1369,25599,15582,"); - add("-20,-57,92,-68,-54,82,2,-61,99,-37,-16,22,"); - add("-100,-31,38,-10,-85,134,26,-58,95,-46,-77,115,"); - add("-69,-80,116,34,-51,81,137,48,-60,11,-18,29,"); - add("-57,-58,82,-68,-102,148,-8,-72,106,-43,-121,173,"); - add("63,41,-53,40,81,-116,76,85,-120,50,-47,75,"); - add("20,-62,93,45,-78,120,-71,-85,116,-66,-81,111,"); - add("56,-59,90,165,12,-4,137,10,-5,179,39,-45,"); - add("-9,-27,39,-83,-86,117,38,-81,116,105,-49,74,"); - add("34,-64,90,-22,-82,111,-3,-101,137,-99,-17,17,"); - add("-155,-4,-5,-140,-41,46,-127,-85,103,77,-13,24,"); - add("88,-67,94,-29,-83,107,-108,-65,76,-141,-42,42,"); - add("-111,-69,79,75,-53,75,202,7,6,82,-38,55,"); - add("115,-27,42,136,-25,40,204,73,-82,-53,-57,69,"); - add("-93,-72,86,-150,-12,6,-157,0,-10,-113,-56,61,"); - add("-88,-76,87,-105,-74,82,-96,-71,78,-147,-70,71,"); - add("56,-32,44,112,17,-11,108,55,-57,163,21,-12,"); - add("143,-28,44,105,50,-54,71,78,-90,165,19,-14,"); - add("136,-37,50,150,25,-23,162,43,-49,127,8,-6,"); - add("109,-13,17,169,11,-12,154,-12,15,143,34,-43,"); - add("126,40,-51,112,90,-113,-210,52,-62,51,85,-108,"); - add("113,70,-92,97,61,-79,47,88,-116,0,90,-117,"); - add("-95,69,-88,-143,26,-32,-149,-21,30,-109,7,-8,"); - add("53,94,-126,-68,83,-110,-171,63,-86,117,-4,5,"); - add("-23,73,-99,-29,82,-113,-91,80,-113,-134,48,-69,"); - add("-81,47,-67,-50,85,-123,-36,83,-120,-40,84,-123,"); - add("-91,65,-98,-114,49,-77,-131,10,-21,-170,-1,-8,"); - add("40,14,-19,158,50,-66,-58,48,-74,3,15,-24,"); - add("128,39,-52,79,68,-101,63,78,-116,60,76,-117,"); - add("10,69,-108,-137,20,-37,-150,3,-12,-151,2,-11,"); - add("-198,-25,27,48,56,-86,63,67,-102,116,55,-81,"); - add("73,86,-136,-130,13,-29,-172,-18,17,-125,4,-17,"); - add(""); - //add("/*16*/"); - add("107,1,-8155,28629,-3723,"); - add("43,22,74,114,43,87,145,42,14,39,-6,-131,"); - add("-6,-21,-148,-12,-24,-151,-31,-28,-139,-45,-33,-139,"); - add("-123,-45,-76,-72,-40,-127,-132,-55,-107,-93,-12,98,"); - add("-74,-20,6,-81,-15,60,-49,9,155,-49,7,153,"); - add("-17,-12,-53,-6,-18,-105,12,-19,-152,17,-19,-152,"); - add("-76,-38,-93,-155,-41,44,-84,-7,118,-71,-3,126,"); - add("-63,2,143,-30,12,149,-75,-6,125,-103,-19,106,"); - add("-136,-31,101,-16,-15,-73,31,-7,-125,82,8,-136,"); - add("74,5,-129,44,-8,-146,35,-12,-147,24,-16,-149,"); - add("-75,-40,-97,-153,-48,19,-124,-37,26,-124,-25,98,"); - add("-70,-3,130,-87,-6,156,-108,-36,9,-131,-53,-43,"); - add("-145,-48,26,-55,1,138,-46,7,166,-26,8,121,"); - add("-37,7,149,-13,15,152,41,34,148,-9,14,143,"); - add("35,29,142,108,52,114,-85,-25,61,-85,-21,96,"); - add("-99,-27,92,-83,-19,116,-72,-14,140,-20,5,146,"); - add("75,42,168,150,55,-9,-25,-22,-156,57,21,0,"); - add("115,40,-23,5,9,95,60,32,128,-63,-12,140,"); - add("52,26,98,134,46,-35,97,27,-97,155,43,-139,"); - add("47,9,-88,125,37,-72,145,44,-49,139,50,50,"); - add("140,47,24,142,44,-22,144,45,1,147,45,5,"); - add("142,44,11,142,40,-31,131,32,-77,69,7,-136,"); - add("-56,-26,-110,-156,-49,-36,-143,-44,-18,-138,-44,-21,"); - add("-157,-48,5,-91,-36,-72,53,10,-68,141,45,13,"); - add("149,46,9,140,43,3,135,34,-52,119,26,-86,"); - add("-104,-33,-24,-118,-38,-32,3,-15,-141,-15,-17,-108,"); - add("21,4,-18,108,45,108,134,33,-41,111,19,-114,"); - add("-69,-37,-145,-15,-19,-114,"); - add(""); - //add("/*17*/"); - add("87,1,-27734,11163,2489,"); - add("19,13,151,8,-8,114,41,66,143,46,87,101,"); - add("23,15,150,38,58,119,51,92,110,48,75,125,"); - add("23,8,151,18,-5,151,6,-45,174,-52,-82,-123,"); - add("-24,-76,54,7,-30,134,17,-24,175,11,-4,84,"); - add("6,-40,142,33,17,158,-21,-103,125,-4,-70,140,"); - add("15,-33,154,8,-44,138,29,4,148,30,2,146,"); - add("-31,-125,96,-43,-133,48,-13,-95,115,-1,-71,127,"); - add("28,-12,151,33,-11,167,-25,-118,92,-62,-109,-91,"); - add("-74,-129,-116,17,-35,132,34,9,138,41,21,144,"); - add("40,10,150,39,11,143,33,-10,147,25,-31,147,"); - add("56,28,174,28,1,102,54,47,133,73,59,183,"); - add("6,95,-110,5,98,-119,-18,56,-147,-34,13,-147,"); - add("-26,37,-156,35,105,-27,-16,51,-142,-12,48,-123,"); - add("-27,26,-158,-10,45,-116,2,88,-143,-4,36,-84,"); - add("21,121,-126,-13,-44,25,-7,-7,-22,-7,70,-162,"); - add("6,72,-113,2,72,-129,-1,62,-134,-11,32,-121,"); - add("-30,7,-168,-3,53,-136,23,103,-108,13,79,-121,"); - add("-15,27,-150,-4,57,-164,-12,16,-116,-19,16,-168,"); - add("-24,-5,-136,-8,24,-127,-17,10,-152,-24,-7,-150,"); - add("-40,-51,-137,-30,-23,-156,-24,-20,-131,-39,-54,-141,"); - add("-37,-48,-143,-37,-57,-129,-54,-104,-106,-60,-143,-8,"); - add("-25,-50,-49,-33,-45,-160,"); - add(""); - //add("/*18*/"); - add("90,1,-15425,23492,10498,"); - add("-58,1,-87,-121,-46,-78,-123,-67,-36,-115,-76,-3,"); - add("-150,-98,-10,-111,-74,-9,-121,-91,15,-123,-90,8,"); - add("-140,-124,52,-108,-53,-58,-57,-91,109,-74,-19,-79,"); - add("-202,-127,-49,-95,-37,-76,59,-35,174,-100,-68,-17,"); - add("-123,-69,-56,-124,-80,-33,-59,-94,103,93,5,144,"); - add("92,25,97,70,-9,131,68,-15,139,65,-15,129,"); - add("77,6,109,128,39,115,109,47,69,-18,-33,37,"); - add("-91,-67,-3,22,-20,72,98,36,73,82,22,76,"); - add("29,-15,71,-129,-75,-42,-126,-83,-24,-120,-48,-86,"); - add("-25,-57,73,105,25,106,117,75,26,167,94,60,"); - add("55,14,53,138,110,-15,49,4,59,-67,-110,114,"); - add("-92,-81,24,-126,-104,16,10,-33,73,137,84,35,"); - add("2,-23,44,-76,-97,73,64,-24,128,138,100,5,"); - add("95,91,-35,139,135,-62,-112,-42,-70,7,42,-68,"); - add("168,143,-38,-94,-29,-72,-151,-107,-5,9,60,-100,"); - add("90,96,-57,109,58,39,166,93,46,-59,6,-90,"); - add("-109,-28,-94,50,45,-17,31,65,-82,110,82,-11,"); - add("122,87,-4,-28,62,-160,-90,-9,-107,-88,-16,-91,"); - add("-105,-24,-103,-11,43,-103,-60,20,-130,24,49,-67,"); - add("143,89,25,-21,50,-137,-98,-37,-69,-144,-84,-36,"); - add("14,29,-42,109,90,-28,142,98,3,114,74,10,"); - add("124,88,-10,127,75,23,36,67,-95,60,35,11,"); - add("112,50,53,"); - add(""); - //add("/*19*/"); - add("80,1,1236,-19143,-23066,"); - add("4,78,-64,-62,100,-85,-134,51,-49,-152,-25,15,"); - add("-51,9,-9,-6,134,-109,-98,76,-64,-52,106,-86,"); - add("-10,119,-94,-47,131,-104,132,74,-53,141,-39,35,"); - add("96,-86,71,153,-52,48,130,28,-16,140,50,-31,"); - add("184,72,-44,56,78,-56,49,121,-89,49,124,-90,"); - add("106,96,-64,26,-76,59,-28,-145,107,111,52,-31,"); - add("185,68,-34,34,89,-64,6,109,-81,60,113,-78,"); - add("86,128,-85,-13,95,-70,101,119,-75,101,59,-31,"); - add("124,67,-35,156,44,-13,120,51,-21,106,128,-77,"); - add("17,-60,44,-97,-101,58,-37,-121,81,-126,-90,50,"); - add("-22,-105,73,-98,-107,66,-161,-157,98,46,101,-70,"); - add("-19,-20,13,-150,-66,33,-21,-114,83,18,-66,51,"); - add("-79,-123,84,-127,-26,8,17,-62,48,-18,-95,71,"); - add("-63,-151,111,6,-115,90,33,-74,61,33,-132,109,"); - add("18,-117,95,106,-71,68,134,-48,53,68,-90,81,"); - add("-95,-89,64,-140,-46,24,-125,-73,48,-147,-47,27,"); - add("-111,-103,77,4,-80,69,30,-117,102,69,-104,96,"); - add("78,-95,91,-65,-52,40,-140,-75,54,-125,9,-18,"); - add("-117,69,-70,-87,88,-83,-64,99,-91,-71,102,-93,"); - add("-83,99,-89,-74,93,-83,-53,144,-123,"); - add(""); - //add("/*20*/"); - add("78,1,24076,9507,-15164,"); - add("72,-75,68,83,5,136,48,63,117,50,69,127,"); - add("79,-2,131,85,-69,98,67,-149,17,60,-142,10,"); - add("52,-139,2,27,-144,-44,40,-147,-23,64,-144,24,"); - add("35,-135,-20,25,-149,-43,59,-44,76,45,108,140,"); - add("61,-134,28,0,-120,-68,28,-143,-33,12,-137,-55,"); - add("20,-151,-45,-23,-78,-82,-26,-143,-118,-68,139,-44,"); - add("-67,-35,-130,24,-122,-21,90,-111,95,35,-131,-5,"); - add("-23,-58,-67,-46,-79,-116,-75,-39,-142,-69,93,-69,"); - add("-87,51,-117,-59,-72,-129,-41,-96,-108,-47,-146,-139,"); - add("-34,112,-4,-4,168,69,-58,-22,-101,-27,-107,-90,"); - add("-54,-93,-123,-9,-131,-71,-31,-83,-82,-93,-54,-162,"); - add("-1,-132,-55,-55,5,-80,-40,175,12,68,60,126,"); - add("0,101,43,28,143,103,-85,78,-93,13,73,52,"); - add("75,54,137,65,-48,78,35,93,96,45,111,120,"); - add("71,12,116,83,-91,88,54,-93,43,68,62,137,"); - add("8,122,73,-16,158,51,-19,113,25,3,134,74,"); - add("-11,130,50,-77,145,-48,-38,135,11,-128,111,-146,"); - add("-35,5,-54,-60,122,-28,-72,141,-35,-64,134,-25,"); - add("-26,135,36,23,98,92,-11,145,69,-46,146,16,"); - add("-67,132,-25,"); - add(""); - //add("/*21*/"); - add("83,1,2308,-19901,-22330,"); - add("-8,114,-102,37,64,-52,88,-4,12,15,49,-40,"); - add("143,-68,75,129,-20,33,58,130,-108,117,79,-53,"); - add("13,52,-44,159,-88,97,48,-95,90,-6,-118,104,"); - add("58,-104,101,115,-73,82,56,-86,87,28,-109,103,"); - add("-44,-49,39,-48,15,-21,137,-79,94,23,-106,102,"); - add("64,-21,31,128,-64,81,82,-62,72,125,-95,113,"); - add("111,-64,83,114,-43,62,54,-65,75,180,-33,68,"); - add("104,-70,91,75,-72,87,52,-95,106,89,-78,99,"); - add("92,-69,91,5,-84,88,28,-42,50,48,-41,54,"); - add("4,-88,93,43,-78,93,-69,-50,36,-151,-62,32,"); - add("-151,13,-47,-142,-55,28,-128,-40,15,-81,-36,22,"); - add("-166,-20,-10,-139,5,-32,-122,48,-75,-90,81,-102,"); - add("-75,81,-98,-121,75,-99,-19,93,-100,-36,101,-109,"); - add("-26,116,-123,95,51,-36,-142,51,-74,-6,106,-106,"); - add("64,76,-66,-8,10,-11,-117,26,-43,-130,40,-58,"); - add("-86,73,-83,130,90,-69,113,80,-60,71,52,-39,"); - add("-183,-124,91,-130,-69,48,-122,-15,-2,-89,-14,2,"); - add("-131,22,-38,101,77,-61,147,37,-17,75,28,-16,"); - add("-148,29,-47,47,27,-20,-128,29,-44,-120,64,-75,"); - add("-75,86,-89,-59,105,-105,-82,82,-84,-50,84,-81,"); - add("-93,114,-114,49,50,-39,"); - add(""); - //add("/*22*/"); - add("75,1,27917,-4121,-10180,"); - add("-55,-66,-125,-56,-60,-126,-57,-37,-134,-56,-23,-138,"); - add("-57,-18,-139,-57,-16,-138,-52,10,-134,-62,-21,-142,"); - add("-61,-38,-134,-55,13,-137,-48,51,-133,-62,-38,-130,"); - add("-64,-61,-123,-62,-52,-121,-63,-24,-134,-50,5,-112,"); - add("41,208,16,8,151,-34,46,99,69,64,39,130,"); - add("58,-28,139,58,-13,139,55,6,125,62,60,126,"); - add("35,106,46,37,122,49,42,130,59,62,14,144,"); - add("57,36,129,58,46,132,53,31,124,56,17,137,"); - add("49,109,92,42,-55,128,5,-142,61,33,-69,114,"); - add("52,21,133,54,10,146,53,21,139,49,-6,144,"); - add("49,22,134,52,36,139,37,135,61,50,96,115,"); - add("46,11,137,45,32,130,49,64,129,44,70,117,"); - add("32,-31,117,40,-15,136,44,24,140,45,29,144,"); - add("27,-48,110,-1,-141,51,9,-110,80,19,-109,115,"); - add("9,-45,53,-52,-16,-181,-41,3,-146,-48,-63,-137,"); - add("-36,-68,-93,-17,-140,4,-49,-31,-150,-46,-12,-146,"); - add("-49,-24,-145,-48,-52,-130,-49,-60,-128,-51,-35,-140,"); - add("-46,9,-142,-41,48,-142,-48,-18,-133,-52,-9,-148,"); - add("-52,-31,-132,-42,-26,-108,"); - add(""); - //add("/*23*/"); - add("73,1,11139,23963,-14202,"); - add("89,-95,-89,96,-86,-67,88,-87,-74,62,-93,-103,"); - add("27,-75,-102,-2,-91,-146,41,-93,-115,103,-92,-64,"); - add("82,-97,-84,49,-95,-108,72,-97,-91,71,-97,-90,"); - add("86,-97,-78,85,-98,-77,102,-97,-62,46,-94,-100,"); - add("21,-93,-116,65,-102,-94,106,-97,-53,82,-103,-79,"); - add("46,-100,-102,94,-101,-63,99,-102,-60,50,-103,-98,"); - add("-12,-80,-115,-153,136,60,-137,87,12,-101,-27,-114,"); - add("-59,-43,-100,5,-82,-103,-106,161,132,58,36,92,"); - add("-16,109,132,-15,93,115,18,72,113,-37,101,112,"); - add("-80,99,76,-103,98,60,-102,95,58,-98,96,63,"); - add("-108,86,43,-123,40,-33,-120,-28,-129,-46,-66,-128,"); - add("-22,-79,-126,-11,-17,-32,10,103,152,-23,94,117,"); - add("-41,96,110,-32,94,113,-21,90,119,-28,91,115,"); - add("-49,95,107,-44,93,110,-39,90,110,-28,92,123,"); - add("-42,94,116,-47,86,103,-77,88,84,-61,43,25,"); - add("-122,144,145,-50,96,124,-25,80,115,-34,76,105,"); - add("-87,97,101,32,59,126,80,-38,-4,18,-93,-149,"); - add("66,-71,-71,143,-69,-8,122,-18,64,55,-58,-55,"); - add(""); - //add("/*24*/"); - add("68,1,24092,5088,-17137,"); - add("14,-98,-10,-5,-145,-48,33,-140,7,93,-40,121,"); - add("96,-9,134,49,-171,25,57,-37,72,72,-13,102,"); - add("56,-137,47,123,-90,158,-21,70,-12,-5,154,32,"); - add("54,76,103,63,-11,91,88,-70,116,54,-134,47,"); - add("83,-56,112,82,-37,119,74,-87,95,36,-142,21,"); - add("41,-143,30,42,-141,33,-57,-49,-101,-54,145,-53,"); - add("-54,139,-51,-58,116,-63,-56,-80,-107,-75,2,-114,"); - add("-74,-50,-126,-60,146,-55,-78,-17,-121,-65,-72,-115,"); - add("-30,-130,-74,58,-132,56,28,-144,10,-1,-148,-32,"); - add("-21,-132,-58,-60,-86,-105,-70,-71,-115,-78,-52,-121,"); - add("-71,72,-88,-25,-40,-43,3,-135,-19,-55,-11,-80,"); - add("-62,126,-66,-30,143,-15,18,145,53,41,111,80,"); - add("-43,155,-30,-89,144,-92,-48,-107,-90,-25,-135,-62,"); - add("-6,-187,-45,-28,47,-29,-26,172,-2,-61,91,-64,"); - add("-61,132,-55,-17,146,9,25,128,63,-10,163,25,"); - add("4,129,36,30,118,71,-41,143,-19,15,171,66,"); - add("51,99,98,43,85,85,56,91,104,"); - add(""); - //add("/*25*/"); - add("68,1,-3077,27485,11624,"); - add("-135,-30,35,-65,39,-111,-105,10,-54,-99,-64,121,"); - add("-154,-21,2,-120,1,-38,-66,-57,110,-20,0,-4,"); - add("-33,53,-136,-80,19,-73,-139,-60,93,-102,32,-111,"); - add("-81,-55,100,-91,-36,52,-127,-52,72,-35,8,-32,"); - add("-7,58,-140,67,56,-108,-25,45,-117,-63,49,-144,"); - add("-114,16,-88,21,-24,67,-45,-62,133,-100,18,-85,"); - add("-92,-30,34,-25,-40,85,-48,-17,20,-111,-25,13,"); - add("-18,-25,52,131,3,50,151,20,17,116,-18,89,"); - add("-92,-52,85,59,-27,87,-70,-19,17,-141,-8,-40,"); - add("-184,-28,-14,47,-17,60,159,-3,75,33,-37,97,"); - add("90,-9,58,-7,-32,70,-65,-57,100,-173,-51,44,"); - add("79,-27,92,165,9,44,126,-28,110,44,-40,104,"); - add("116,-19,81,130,-23,95,170,15,27,110,36,-41,"); - add("101,29,-31,152,19,8,146,34,-28,138,43,-54,"); - add("144,30,-24,160,37,-36,77,51,-91,115,46,-73,"); - add("38,28,-52,37,37,-73,19,40,-85,-72,46,-121,"); - add("-70,39,-109,-20,60,-144,37,49,-104,"); - add(""); - //add("/*26*/"); - add("58,1,-26874,10130,8671,"); - add("-30,19,-117,-23,66,-151,-42,6,-144,-51,-24,-138,"); - add("-43,-88,-36,31,-48,163,11,-85,140,-45,-130,7,"); - add("-25,-118,58,4,-100,125,-32,-83,-7,-62,-49,-143,"); - add("-43,6,-149,-37,19,-145,-34,20,-136,-35,25,-152,"); - add("-32,27,-147,-55,-103,-67,2,-78,105,18,-88,166,"); - add("54,57,120,44,9,138,34,-28,142,40,-11,145,"); - add("50,23,132,51,8,154,28,-48,138,-3,-114,107,"); - add("-6,-95,79,34,16,85,63,116,69,64,135,53,"); - add("68,67,128,18,-60,109,53,-3,152,69,87,106,"); - add("54,3,144,53,-1,142,48,-14,141,27,-65,128,"); - add("48,29,96,70,121,68,2,113,-98,-17,86,-124,"); - add("-46,19,-139,-52,52,-189,58,60,97,-4,42,-55,"); - add("-57,-7,-146,0,99,-97,-7,69,-95,-41,28,-142,"); - add("-35,39,-140,-28,57,-142,-55,-27,-132,-47,19,-160,"); - add("-67,-83,-107,"); - add(""); - //add("/*27*/"); - add("56,1,12962,21402,-16551,"); - add("83,-38,16,93,-94,-47,24,-103,-113,56,-107,-91,"); - add("92,-105,-58,75,-108,-76,119,-90,-15,74,-104,-67,"); - add("76,-102,-64,114,-19,69,123,34,142,74,-101,-62,"); - add("123,-89,-5,138,-68,34,93,-120,-65,-16,-90,-120,"); - add("45,-102,-82,78,-121,-75,-106,20,-66,-130,85,-8,"); - add("-111,-5,-96,-35,58,38,51,73,126,74,50,120,"); - add("-52,98,73,-114,32,-57,-59,-67,-127,-156,66,-47,"); - add("-124,18,-77,-72,-56,-123,-64,-63,-122,-78,-53,-119,"); - add("-108,-43,-130,-113,119,50,-117,97,24,-127,81,-1,"); - add("-135,60,-29,-130,-6,-100,-136,31,-61,-222,90,-51,"); - add("53,27,67,-12,111,120,-41,101,89,-122,116,52,"); - add("50,-4,30,133,-79,0,125,-16,70,73,54,116,"); - add("107,29,113,63,62,122,53,69,124,39,77,125,"); - add("17,88,122,19,86,122,28,80,125,"); - add(""); - //add("/*28*/"); - add("49,1,-6596,29135,-2761,"); - add("64,5,-105,143,26,-49,-45,-23,-137,-7,-11,-80,"); - add("-52,-24,-120,-117,-14,109,-4,-7,-48,12,-16,-167,"); - add("-112,-12,117,-20,-17,-107,15,-13,-142,-115,-29,-16,"); - add("-102,-10,120,-70,-4,110,64,35,178,-97,-24,-2,"); - add("-46,4,143,-51,3,152,-58,-16,-15,11,-11,-139,"); - add("-6,-17,-145,-41,-26,-149,-146,-33,37,-68,-3,132,"); - add("2,16,151,51,28,150,21,17,128,12,17,157,"); - add("-43,0,130,-45,0,144,64,25,116,130,38,77,"); - add("128,36,64,141,33,-25,-48,-21,-136,56,7,-87,"); - add("145,32,-32,156,37,20,155,37,21,5,-7,-104,"); - add("-96,-31,-111,-131,-29,5,-136,-35,-40,-164,-37,32,"); - add("-15,-13,-109,72,4,-146,157,33,-47,128,29,-12,"); - add(""); - //add("/*29*/"); - add("50,1,-2179,24668,16933,"); - add("-94,-47,56,-114,2,-19,-121,-63,74,-71,-57,72,"); - add("55,-51,81,-74,-79,100,-74,-24,23,-140,1,-23,"); - add("-215,-15,-16,15,-80,115,25,-50,74,-131,-82,90,"); - add("69,-50,81,176,-48,94,-77,-77,92,-116,-97,110,"); - add("78,-13,30,150,24,-7,-7,-19,24,-155,-21,3,"); - add("-117,-60,58,-114,-68,70,-67,-96,113,136,-15,44,"); - add("-56,-41,42,101,-3,22,-24,-38,44,40,-22,35,"); - add("140,9,12,156,30,-14,130,61,-59,134,30,-19,"); - add("124,54,-53,169,33,-22,148,16,-3,87,67,-77,"); - add("60,91,-113,54,87,-110,-12,100,-135,4,79,-107,"); - add("-34,87,-123,50,59,-77,130,54,-61,66,69,-90,"); - add("-38,83,-120,-40,70,-104,-66,70,-108,-232,-9,-14,"); - add("-56,48,-76,"); - add(""); - //add("/*30*/"); - add("50,1,-8496,-28645,2696,"); - add("6,7,97,49,0,144,24,8,146,-32,25,135,"); - add("-71,36,135,-115,45,86,-123,47,78,-138,48,41,"); - add("-135,49,46,-138,49,36,-143,49,26,-145,47,-16,"); - add("-142,48,4,-141,51,18,-144,51,5,-134,43,-34,"); - add("-154,58,22,-65,9,-110,10,-22,-149,67,-40,-132,"); - add("140,-51,-5,133,-47,2,131,-52,-59,147,-52,-17,"); - add("62,-38,-146,114,-35,26,94,-18,115,144,-49,-11,"); - add("-14,-13,-167,-62,6,-134,96,-33,-22,-1,-9,-91,"); - add("43,-21,-74,-3,-8,-95,16,-15,-117,27,-18,-104,"); - add("129,-41,-1,104,-23,110,-59,29,117,5,7,92,"); - add("-49,28,130,53,-10,69,122,-30,76,62,-26,-69,"); - add("82,-16,90,54,-17,-7,-33,-5,-145,-65,6,-150,"); - add("110,-37,-35,"); - add(""); - //add("/*31*/"); - add("48,1,-16082,-24523,6323,"); - add("62,-6,135,71,-10,133,70,-10,134,98,-29,121,"); - add("35,19,149,50,7,135,-18,47,120,-72,37,-32,"); - add("-70,7,-129,-108,41,-100,-120,59,-71,-114,52,-85,"); - add("-119,59,-75,-119,66,-48,-126,76,-37,-158,98,-42,"); - add("-90,76,48,-125,77,-41,-60,16,-96,-79,27,-111,"); - add("6,-32,-100,10,-53,-177,66,-69,-86,106,-91,-66,"); - add("77,-31,92,56,6,173,62,-71,-105,26,-52,-137,"); - add("124,-87,-10,104,-47,95,106,-45,107,63,-54,-47,"); - add("-33,17,-21,-78,27,-102,-70,21,-104,-120,44,-157,"); - add("127,-72,60,-25,-5,-96,-64,3,-173,-15,-21,-138,"); - add("61,-36,23,33,3,116,90,-31,126,78,-22,127,"); - add("38,8,137,98,-37,112,48,5,145,"); - add(""); - //add("/*32*/"); - add("48,-1,-13245,26217,-6103,"); - add("-33,17,145,9,34,134,88,65,92,-23,16,132,"); - add("-12,24,141,56,55,134,71,62,134,67,53,99,"); - add("20,37,146,-27,10,130,31,23,44,30,2,-71,"); - add("45,45,128,43,-2,-129,7,-27,-165,-8,-15,-61,"); - add("47,61,209,-28,10,131,-81,-16,134,-34,-3,80,"); - add("147,46,-148,50,-2,-145,-7,-31,-150,-67,-54,-119,"); - add("-76,-59,-114,-44,-49,-140,20,-21,-151,57,0,-131,"); - add("122,46,-65,113,36,-81,117,32,-108,125,38,-90,"); - add("10,-8,-59,-144,-53,65,-133,-61,10,-154,-69,24,"); - add("-2,-31,-133,-11,-33,-121,-82,-67,-111,-15,-28,-88,"); - add("70,3,-126,39,-12,-127,20,0,-39,-135,-43,95,"); - add("-98,-23,100,-103,-25,110,-57,2,125,"); - add(""); - //add("/*33*/"); - add("47,1,-6930,29187,-252,"); - add("-51,-13,-133,84,20,-8,117,26,-82,65,13,-132,"); - add("-2,-5,-157,-116,-27,-23,-134,-30,78,-112,-25,89,"); - add("-11,1,173,-70,-16,98,-136,-33,52,-146,-37,22,"); - add("-139,-36,-46,-134,-35,28,-161,-44,34,-27,-6,117,"); - add("-79,-21,134,90,24,168,-115,-32,93,2,-2,158,"); - add("22,5,108,34,6,130,-10,-5,92,109,26,166,"); - add("-73,-24,108,-11,-8,138,67,12,154,164,41,55,"); - add("91,26,-33,146,35,46,85,27,-99,66,22,-142,"); - add("32,14,-143,-39,-5,-156,-64,-13,-131,-91,-20,-132,"); - add("-61,-15,-91,53,16,-144,-4,1,-154,36,9,-107,"); - add("132,34,-37,32,8,-118,82,20,-41,55,14,123,"); - add("133,32,-108,101,24,-60,"); - add(""); - //add("/*34*/"); - add("48,1,1042,29488,5419,"); - add("98,-20,87,52,-28,136,48,-30,145,90,-18,74,"); - add("119,-22,80,56,21,-116,10,26,-136,46,1,-20,"); - add("77,-17,65,58,4,-37,18,-24,117,-127,-21,144,"); - add("-84,-16,96,66,-25,107,145,9,-82,87,-4,-10,"); - add("-100,-22,137,57,-12,41,-157,-3,54,75,-34,135,"); - add("146,-18,44,54,-16,58,120,-27,82,3,44,-197,"); - add("-15,34,-151,32,26,-132,-23,34,-158,6,27,-135,"); - add("-22,32,-159,62,22,-133,69,16,-114,-170,29,-92,"); - add("-124,18,-61,-124,26,-103,-78,29,-141,-134,10,-20,"); - add("-23,-23,141,58,-27,135,68,-27,132,-9,-7,38,"); - add("-96,31,-142,-74,27,-129,-76,1,11,-52,-14,94,"); - add("-74,27,-137,-106,-7,63,-63,-14,94,"); - add(""); - //add("/*35*/"); - add("44,-1,14587,-2200,26122,"); - add("18,-53,-14,-39,-136,9,-28,-156,1,7,-151,-19,"); - add("52,-138,-43,34,-136,-35,-65,-137,21,28,-129,-31,"); - add("52,-143,-48,40,-135,-40,75,-119,-60,98,-83,-68,"); - add("86,-101,-64,19,-146,-33,37,-140,-44,83,-113,-67,"); - add("-4,-196,-31,100,-60,-69,118,-90,-87,54,91,-17,"); - add("-44,128,50,-47,126,49,-53,138,54,-57,134,55,"); - add("-15,150,31,-10,135,26,-63,145,57,-85,114,65,"); - add("-118,38,73,-68,131,56,69,122,-25,18,132,6,"); - add("-48,139,43,18,150,5,-67,130,52,3,147,12,"); - add("-9,143,18,-54,138,43,-47,140,37,-31,192,31,"); - add("-63,-85,29,-21,-147,1,-15,-153,-4,"); - add(""); - //add("/*36*/"); - add("44,-1,15944,24781,-5628,"); - add("93,-52,33,124,-87,-25,126,-79,19,127,-81,15,"); - add("127,-78,31,126,-81,22,126,-81,26,115,-62,80,"); - add("121,-74,51,111,-60,83,122,-74,64,118,-78,32,"); - add("107,-60,81,101,-54,99,119,-77,53,109,-66,77,"); - add("84,-39,121,67,-26,127,73,-22,171,52,-52,-63,"); - add("-4,-26,-148,-53,14,-135,-74,29,-129,-81,36,-126,"); - add("-113,69,-72,-121,88,-11,-87,45,-87,-77,36,-94,"); - add("-102,53,-98,-84,33,-122,-109,58,-87,-116,73,-41,"); - add("-107,52,-101,-84,68,40,-92,63,-6,-26,-2,-86,"); - add("-130,82,-29,-117,83,11,-119,89,37,-124,82,-1,"); - add("-123,85,16,-125,86,20,-122,95,65,"); - add(""); - //add("/*37*/"); - add("44,1,6601,28935,4379,"); - add("16,-21,118,74,-36,115,54,-21,53,5,-26,150,"); - add("77,-36,110,77,-8,-64,63,-35,120,137,-8,-153,"); - add("99,-9,-94,-67,34,-105,-78,32,-79,1,17,-112,"); - add("-95,35,-77,-28,26,-131,-93,35,-87,-13,23,-140,"); - add("-53,31,-142,-50,24,-95,-39,28,-148,-21,25,-161,"); - add("-7,20,-157,6,15,-149,-10,18,-150,-12,18,-148,"); - add("-31,21,-151,-53,22,-115,-115,35,-98,-143,30,10,"); - add("-62,2,131,40,-23,150,77,-27,112,14,-20,162,"); - add("-14,-14,160,-51,-2,116,-35,-8,136,20,-18,110,"); - add("-6,-21,176,29,-27,157,59,-32,142,15,-21,127,"); - add("45,-28,124,126,-39,69,80,-10,-54,"); - add(""); - //add("/*38*/"); - add("42,-1,-10564,27211,-6925,"); - add("-102,-15,98,-92,-3,131,66,56,126,44,48,128,"); - add("-57,9,136,-104,-63,-95,-54,-66,-186,-40,2,75,"); - add("9,41,155,35,51,160,133,62,44,-1,29,132,"); - add("-131,-12,184,91,59,109,63,45,100,124,63,73,"); - add("24,-12,-107,-3,-29,-133,85,0,-151,111,20,-101,"); - add("62,43,91,5,40,175,101,33,-17,61,-4,-125,"); - add("29,-22,-150,4,-30,-141,29,-27,-165,44,-16,-138,"); - add("31,-22,-139,26,-52,-249,-70,-3,91,-103,-4,137,"); - add("-17,20,107,-68,9,145,-127,-29,83,-63,-37,-57,"); - add("112,8,-146,-59,-26,-18,-81,-51,-84,-38,-43,-113,"); - add("-39,-46,-124,"); - add(""); - //add("/*39*/"); - add("42,-1,15744,-1075,25514,"); - add("6,-136,-9,63,-186,-49,95,83,-55,94,90,-55,"); - add("119,-70,-79,97,-30,-63,12,-169,-17,55,17,-35,"); - add("-7,158,13,95,44,-59,122,-38,-82,132,139,-81,"); - add("-154,62,105,36,92,-19,83,111,-51,82,122,-51,"); - add("58,107,-36,70,141,-44,14,129,-6,26,143,-16,"); - add("116,32,-79,133,71,-91,-25,92,18,-136,-72,93,"); - add("-92,61,63,-65,100,44,-74,99,49,-106,9,71,"); - add("-92,63,61,-106,-54,69,-100,-66,66,-117,11,75,"); - add("-123,-63,78,-116,-49,73,-53,-98,33,-59,-142,36,"); - add("-45,-145,26,35,-135,-25,-5,-167,0,-37,-133,19,"); - add("-39,-149,18,"); - add(""); - //add("/*40*/"); - add("41,-1,10098,22921,16512,"); - add("73,-48,22,138,-59,-3,139,-57,-9,146,-60,-11,"); - add("142,-45,-30,126,-12,-66,134,-54,-16,141,-51,-25,"); - add("138,-54,-20,147,-37,-50,94,-98,68,58,-99,93,"); - add("28,-94,108,-126,-8,97,-117,-8,91,-8,-77,107,"); - add("-15,-95,133,-18,-79,114,-148,-47,156,50,10,-45,"); - add("121,26,-112,31,60,-98,25,112,-163,21,49,-78,"); - add("108,22,-104,142,-26,-64,12,61,-90,-98,100,-65,"); - add("-59,95,-88,-67,119,-116,-45,3,27,-138,24,63,"); - add("-147,67,8,-111,47,11,-158,44,44,-137,49,23,"); - add("-164,88,-15,-109,6,60,-145,39,38,-141,48,21,"); - add(""); - //add("/*41*/"); - add("41,1,13989,-2192,-26448,"); - add("86,-38,49,159,11,84,-19,-147,3,-25,-168,2,"); - add("103,-47,60,110,-69,67,65,-124,49,84,-90,56,"); - add("118,-11,68,123,-16,72,99,59,50,-6,147,-20,"); - add("43,4,25,33,-150,35,103,-59,67,125,-26,76,"); - add("126,17,72,128,20,76,129,3,77,96,-39,64,"); - add("-67,-118,-28,-129,-48,-73,-115,-87,-58,-94,-19,-54,"); - add("-126,-33,-70,-108,-70,-55,-133,3,-77,-126,3,-73,"); - add("-125,47,-77,-109,65,-69,-126,46,-76,-104,90,-67,"); - add("-74,114,-54,-136,14,-74,-116,80,-71,47,156,9,"); - add("-83,70,-51,-84,109,-55,3,156,-13,72,103,29,"); - add(""); - //add("/*42*/"); - add("42,-1,119,4674,29633,"); - add("-31,-95,15,-26,-156,24,18,-132,19,-62,-159,23,"); - add("-136,104,-15,-64,53,-8,-123,30,-5,-88,126,-20,"); - add("-38,71,-11,-139,147,-25,-6,-84,13,-198,-34,1,"); - add("59,0,1,140,-44,10,126,-68,12,76,-142,22,"); - add("77,-71,11,119,-34,6,90,-119,17,-168,-97,12,"); - add("162,-8,2,59,-58,8,85,-120,15,-8,-136,17,"); - add("-64,-114,14,-133,-14,1,-143,29,-4,5,-38,4,"); - add("141,-66,9,144,-85,10,53,-82,9,12,12,-1,"); - add("65,176,-20,5,123,-15,18,141,-17,-3,172,-22,"); - add("-15,165,-22,-40,106,-15,22,154,-22,-38,130,-19,"); - add("37,142,-22,"); - add(""); - //add("/*43*/"); - add("38,-1,16496,-5129,24527,"); - add("30,-143,-51,63,-127,-70,-14,-142,-22,-2,-152,-34,"); - add("-16,-147,-24,6,-147,-40,-37,-135,-8,-79,-127,21,"); - add("-32,-147,-17,40,-121,-59,23,-149,-56,4,-137,-41,"); - add("-17,-147,-30,65,-116,-79,-4,-132,-36,-3,-139,-41,"); - add("80,-8,-57,66,36,-35,90,-60,-82,-28,223,88,"); - add("-65,92,72,4,149,41,4,148,40,24,146,23,"); - add("-14,143,49,31,146,18,82,121,-26,40,144,9,"); - add("-26,133,51,-64,103,69,-7,139,38,15,147,24,"); - add("-7,146,38,-7,149,37,-52,127,62,-73,108,73,"); - add("-84,19,60,"); - add(""); - //add("/*44*/"); - add("38,-1,18721,21147,10116,"); - add("-41,87,-107,-98,62,52,-143,106,36,-110,75,41,"); - add("-97,105,-49,-39,91,-123,-46,84,-102,-82,96,-61,"); - add("-35,-57,189,-109,39,111,-41,-10,94,-11,-64,155,"); - add("88,-98,52,-75,4,120,98,-117,73,-45,9,59,"); - add("-82,2,132,31,-83,115,63,-100,91,55,-99,103,"); - add("60,-102,97,96,-108,48,92,-108,53,108,-100,10,"); - add("112,-125,47,61,31,-157,50,-8,-69,81,-13,-111,"); - add("107,-67,-56,78,-43,-52,35,42,-143,60,12,-128,"); - add("7,52,-114,-103,91,4,-42,103,-130,-71,104,-81,"); - add("-14,51,-79,"); - add(""); - //add("/*45*/"); - add("36,1,-7108,28862,-4057,"); - add("112,21,-44,141,26,-58,70,-2,-127,59,-8,-140,"); - add("41,-15,-162,-132,-43,-72,-146,-39,-28,-93,-43,-120,"); - add("-79,-41,-127,-101,-41,-90,-99,-46,-118,-72,-42,-130,"); - add("-89,-47,-126,-104,-19,42,-139,-29,46,-140,-32,33,"); - add("-141,-45,-27,-129,-30,33,1,29,162,-10,20,126,"); - add("-22,20,151,107,46,95,125,53,110,13,24,123,"); - add("84,42,122,47,33,137,23,28,147,21,26,147,"); - add("19,25,147,47,31,140,148,38,-8,145,33,-34,"); - add("143,31,-45,90,7,-118,-2,-20,-139,"); - add(""); - //add("/*46*/"); - add("37,1,-12612,27178,1511,"); - add("72,38,-86,51,30,-137,29,20,-140,86,43,-98,"); - add("125,58,-54,2,5,-97,-129,-57,-48,-136,-62,-7,"); - add("-142,-65,0,-127,-59,-16,-136,-65,-10,-141,-68,27,"); - add("-101,-46,-110,-135,-65,-67,-7,-7,122,43,17,161,"); - add("-73,-39,70,-138,-70,15,-30,-19,113,92,41,116,"); - add("125,59,68,102,44,111,135,64,33,21,3,114,"); - add("-78,-46,138,-81,-44,78,-23,-22,149,-10,-16,146,"); - add("117,48,114,81,43,-43,56,36,-114,-34,-6,-149,"); - add("48,26,-31,141,69,-32,100,54,-100,42,28,-134,"); - add(""); - //add("/*47*/"); - add("37,1,29276,3899,5265,"); - add("22,-156,-12,20,-148,-7,25,-149,-40,23,-141,-38,"); - add("27,-130,-71,29,-62,-133,23,8,-143,17,59,-142,"); - add("16,48,-138,12,78,-134,5,102,-112,-8,137,-61,"); - add("-14,147,-29,-24,168,21,-25,121,59,-21,105,46,"); - add("-35,154,89,-29,151,46,-24,87,73,-36,155,77,"); - add("-27,94,71,-31,125,63,-36,109,111,-35,100,108,"); - add("-9,13,37,13,-41,-33,-21,12,111,40,-94,-140,"); - add("-21,-21,139,23,-150,12,9,-135,75,20,-154,24,"); - add("13,-144,45,8,-106,45,28,-187,-8,12,-81,-7,"); - add(""); - //add("/*48*/"); - add("36,1,23365,142,-18817,"); - add("54,94,69,71,84,90,55,106,71,-89,97,-109,"); - add("-51,107,-61,5,156,13,85,6,106,83,-108,102,"); - add("38,-107,44,63,-122,77,59,53,78,-71,119,-88,"); - add("-39,126,-45,12,149,21,2,179,13,60,-35,75,"); - add("58,-128,68,26,-140,27,34,-167,38,-33,-127,-46,"); - add("-5,-131,-9,-18,-143,-27,-26,-127,-33,5,-151,6,"); - add("-42,-120,-55,-55,-125,-68,-98,-123,-122,18,69,21,"); - add("51,128,63,35,139,44,20,146,25,-13,161,-16,"); - add("-91,11,-115,-90,-33,-115,-90,-48,-113,"); - add(""); - //add("/*49*/"); - add("37,1,12054,-19593,-19257,"); - add("58,-35,73,97,-42,105,128,-35,118,76,-28,78,"); - add("119,-11,92,139,38,53,138,60,31,139,47,46,"); - add("150,29,75,20,-63,80,-55,-105,73,-90,-108,53,"); - add("-102,-105,42,-115,-92,20,-144,-146,60,-2,-74,81,"); - add("-90,-96,45,-115,-98,31,-136,-92,12,-107,-61,-2,"); - add("-121,-47,-28,-125,-31,-47,-44,57,-94,2,89,-98,"); - add("-12,104,-125,-58,4,-41,-130,-56,-20,-12,60,-73,"); - add("56,106,-82,24,102,-94,-22,103,-124,4,65,-66,"); - add("55,112,-84,57,124,-94,51,106,-79,89,97,-43,"); - add(""); - //add("/*50*/"); - add("35,-1,19917,21699,5700,"); - add("29,-54,98,74,-89,80,71,-89,81,117,-98,-43,"); - add("149,-117,-89,-65,77,-55,-92,102,-55,-66,74,-48,"); - add("-63,79,-75,-15,46,-128,-73,99,-122,-7,36,-126,"); - add("0,20,-82,55,-15,-153,24,8,-132,59,-21,-154,"); - add("38,-6,-140,57,-21,-152,56,-26,-134,24,4,-131,"); - add("12,19,-164,-98,108,-91,-24,0,117,13,-42,160,"); - add("-47,15,150,-32,3,135,-31,-10,186,-40,10,120,"); - add("-62,32,114,-59,24,133,-18,-19,153,-60,19,148,"); - add("-14,-23,145,51,-77,121,"); - add(""); - //add("/*51*/"); - add("41,1,-4651,29635,-334,"); - add("-52,-9,-74,-147,-23,34,-42,-8,-77,-99,-18,-81,"); - add("-123,-20,85,-33,-7,-116,-111,-20,-20,-90,-14,125,"); - add("-50,-10,-19,-114,-21,-33,-8,1,154,-26,-4,153,"); - add("-56,-10,94,-19,-3,3,-17,-5,-154,-57,-12,-126,"); - add("-136,-26,27,-122,-24,97,-135,-27,24,-69,-14,135,"); - add("99,21,106,-44,-9,81,29,6,59,132,26,32,"); - add("192,38,20,-76,-15,25,68,13,79,90,16,80,"); - add("176,33,59,66,14,-123,115,21,-51,121,22,-35,"); - add("132,23,-23,-34,-5,-74,72,12,-59,92,16,-81,"); - add("130,21,-85,143,23,-50,127,19,-77,-47,-8,-78,"); - add(""); - //add("/*52*/"); - add("36,-1,-17857,23953,-2714,"); - add("-69,-60,-74,-114,-77,71,-109,-75,72,-111,-79,56,"); - add("-48,-29,82,11,18,91,-92,-64,75,-104,-78,30,"); - add("-34,-17,108,-110,-89,-23,-114,-97,-55,-121,-99,-25,"); - add("-87,-64,75,84,79,111,148,122,32,97,77,3,"); - add("108,81,-59,113,84,-44,119,88,-48,109,83,-14,"); - add("127,93,-33,122,88,-40,115,85,-19,118,82,-46,"); - add("120,84,-39,117,82,-19,111,82,21,20,10,-41,"); - add("-121,-93,-68,-89,-63,17,41,6,-221,-119,-96,-77,"); - add("-111,-88,-54,-84,-51,93,-21,-2,111,"); - add(""); - //add("/*53*/"); - add("35,1,18868,16148,-16830,"); - add("-118,111,-25,-43,93,43,11,86,96,13,65,80,"); - add("-48,105,49,114,-9,121,18,89,111,17,51,71,"); - add("110,-37,91,106,-88,33,119,-56,84,104,-67,55,"); - add("59,-94,-25,14,-90,-75,31,-109,-72,-118,47,-94,"); - add("-89,136,32,1,-144,-144,42,-99,-48,106,-129,-3,"); - add("109,-104,29,50,-132,-68,70,-135,-46,-4,-81,-81,"); - add("-71,16,-68,-57,139,63,-46,8,-45,42,-135,-77,"); - add("28,-89,-51,-151,124,-59,-109,73,-57,-77,126,31,"); - add("-77,126,31,-79,109,15,"); - add(""); - //add("/*54*/"); - add("34,-1,-21907,20246,3192,"); - add("-62,-57,-63,-62,-48,-135,-75,-66,-110,-9,14,-170,"); - add("89,99,-5,37,16,170,72,80,-15,8,22,-95,"); - add("-99,-99,-67,-102,-102,-62,-104,-108,-58,-69,-101,179,"); - add("-23,-35,65,4,-14,128,45,28,147,34,15,146,"); - add("79,69,114,66,51,126,59,41,134,78,57,154,"); - add("53,39,99,73,56,121,83,67,108,86,73,96,"); - add("96,95,30,-4,7,-52,-61,-36,-142,-38,-12,-144,"); - add("-92,-70,-152,-38,-33,-48,-3,24,-148,-11,13,-148,"); - add("-54,-35,-133,"); - add(""); - //add("/*55*/"); - add("35,-1,16309,24931,-3533,"); - add("24,-3,89,102,-57,80,68,-50,-39,119,-92,-89,"); - add("3,-15,-89,113,-84,-51,-16,8,-19,-118,83,21,"); - add("-65,59,106,-107,77,39,-82,40,-99,-36,5,-122,"); - add("95,-76,-91,106,-81,-69,108,-83,-62,121,-82,-3,"); - add("117,-79,4,120,-91,-49,114,-76,25,143,-110,-53,"); - add("45,-39,-40,151,-125,-101,-105,68,-46,-62,57,77,"); - add("-92,82,95,-114,79,-6,-96,70,18,-103,81,65,"); - add("-121,83,-3,-122,84,8,-113,84,57,-102,78,64,"); - add("-130,97,79,-13,30,141,"); - add(""); - //add("/*56*/"); - add("34,1,-15019,23246,-11578,"); - add("109,18,-104,-8,-59,-108,-129,-62,43,-61,-2,74,"); - add("-119,-114,-69,-118,-32,90,-114,-45,62,-120,-54,54,"); - add("-76,-47,10,-63,-67,-48,-110,-26,101,-106,-69,10,"); - add("-122,-55,61,-65,16,124,-4,20,46,-69,-112,-125,"); - add("-155,-65,94,-104,-37,77,-117,-37,99,-52,21,122,"); - add("94,83,26,134,97,-1,115,80,-6,112,50,-61,"); - add("129,45,-96,120,79,-9,126,83,-9,123,85,1,"); - add("117,61,-36,110,26,-100,108,20,-106,110,25,-95,"); - add("117,39,-76,"); - add(""); - //add("/*57*/"); - add("31,1,24179,-4896,-17070,"); - add("-65,75,-114,-78,42,-120,-77,49,-120,-76,50,-118,"); - add("-72,60,-113,-75,58,-116,-73,68,-113,-20,115,-55,"); - add("105,9,137,84,-42,122,87,-6,119,85,-18,122,"); - add("87,-9,122,82,-28,122,76,-55,122,38,-121,87,"); - add("63,-80,112,67,-61,115,75,-44,123,64,-73,116,"); - add("48,-105,102,6,-142,53,-20,-122,10,-9,-116,25,"); - add("-88,19,-138,-65,66,-119,-79,37,-127,-50,101,-104,"); - add("-46,108,-98,-25,98,-65,"); - add(""); - //add("/*58*/"); - add("32,-1,13075,24485,11382,"); - add("-40,52,-67,14,58,-144,17,52,-134,58,32,-141,"); - add("64,23,-131,84,3,-110,29,56,-168,-70,28,21,"); - add("28,-54,92,-76,-21,143,-85,-7,120,-75,-15,123,"); - add("-112,2,128,48,-60,76,21,-74,139,51,-82,117,"); - add("6,-62,126,108,-94,76,136,-62,-25,95,-80,56,"); - add("132,-88,31,-6,-35,77,19,-10,-1,87,45,-194,"); - add("-90,24,57,-82,74,-60,-55,107,-160,-47,-20,96,"); - add("-93,19,67,-130,74,-7,6,68,-152,"); - add(""); - //add("/*59*/"); - add("29,1,-3768,-29624,2870,"); - add("45,4,94,51,8,142,59,8,138,57,8,140,"); - add("32,14,147,-48,21,129,-31,19,118,-91,29,135,"); - add("-153,28,63,-79,26,117,-175,25,11,-15,23,147,"); - add("-106,32,113,-149,24,16,-144,16,-43,-99,-1,-109,"); - add("-16,-19,-150,25,-24,-149,63,-27,-134,90,-29,-121,"); - add("104,-29,-106,115,-28,-96,77,-26,-128,55,-24,-143,"); - add("18,-17,-146,25,-18,-143,94,-24,-118,135,-18,2,"); - add(""); - //add("/*60*/"); - add("30,1,-8205,28819,-1455,"); - add("-49,-18,-95,-107,-35,-74,-126,-34,63,-131,-39,-8,"); - add("-112,-37,-59,28,1,-121,135,35,-82,-84,-32,-116,"); - add("-139,-40,39,-129,-35,72,-87,-21,110,-125,-35,71,"); - add("-130,-38,69,-142,-45,39,-90,-25,91,165,60,100,"); - add("-39,-7,122,87,34,140,111,37,34,135,43,22,"); - add("151,48,-12,99,28,-61,93,23,-132,107,34,45,"); - add("114,37,99,118,37,66,92,23,-93,-35,-17,-168,"); - add("71,16,-104,"); - add(""); - //add("/*61*/"); - add("29,1,7341,28492,5857,"); - add("97,-32,32,101,-8,-91,129,-14,-97,162,-48,17,"); - add("98,-50,115,136,-21,-86,121,-12,-115,86,-3,-109,"); - add("72,-2,-102,-8,21,-96,-159,39,35,-146,40,12,"); - add("-144,44,-24,-140,46,-37,-124,42,-50,-140,56,-98,"); - add("-76,35,-88,-83,41,-114,-72,38,-113,-150,34,21,"); - add("-99,7,103,-38,-17,146,65,-39,131,10,-25,118,"); - add("113,-37,53,95,-48,123,24,-30,120,10,-30,139,"); - add(""); - //add("/*62*/"); - add("29,-1,13904,22523,14121,"); - add("-19,93,-130,-23,88,-121,-50,95,-107,-21,87,-123,"); - add("-56,98,-110,21,65,-132,94,11,-117,-1,23,-38,"); - add("-119,33,67,-106,103,-71,-21,80,-120,-112,91,-46,"); - add("-36,86,-118,14,66,-135,29,34,-93,-62,-54,165,"); - add("2,-75,134,67,-88,88,98,-84,48,7,-77,128,"); - add("102,-95,60,3,-81,136,40,-91,114,25,-96,136,"); - add("43,-85,97,37,-90,110,16,-85,122,27,-77,97,"); - add(""); - //add("/*63*/"); - add("28,1,25599,5928,-14475,"); - add("33,-94,20,47,-160,19,25,-90,9,54,-136,45,"); - add("62,-80,82,68,-111,82,64,-115,73,67,-111,84,"); - add("64,-114,80,67,-92,92,70,-85,104,66,-104,89,"); - add("83,-190,98,-58,18,-106,-67,77,-103,-69,92,-101,"); - add("-62,118,-76,-74,76,-112,-63,115,-76,-50,130,-45,"); - add("-49,115,-48,-82,54,-127,-63,120,-70,-85,80,-120,"); - add("-20,137,18,-2,140,50,-28,146,8,"); - add(""); - //add("/*64*/"); - add("32,-1,6784,26265,12812,"); - add("67,-5,-26,37,57,-138,-28,66,-122,80,12,-69,"); - add("61,44,-129,-45,71,-128,-100,88,-136,-27,-50,125,"); - add("-98,-3,60,-133,7,57,-138,81,-102,150,-27,-21,"); - add("-68,39,-49,-93,73,-111,-118,16,28,-118,39,-26,"); - add("-94,67,-101,3,-10,21,80,-70,114,132,-63,72,"); - add("51,-75,137,30,-24,37,111,-40,28,127,-51,42,"); - add("128,-39,13,-13,-32,75,-26,-49,117,-67,10,14,"); - add("-87,2,44,-6,-49,104,157,-56,33,"); - add(""); - //add("/*65*/"); - add("26,1,23238,12726,-14073,"); - add("76,-64,69,88,-121,37,88,-105,55,84,-121,34,"); - add("85,-121,37,85,-123,38,63,-143,-15,66,-149,-15,"); - add("20,-115,-62,24,-144,-78,-22,-86,-109,2,-174,-136,"); - add("-72,113,-31,-71,134,-10,-86,111,-53,-84,118,-43,"); - add("-72,126,-15,-71,138,0,-69,136,2,-69,134,1,"); - add("-84,129,-26,-57,123,16,-79,157,9,20,93,117,"); - add("66,-5,101,"); - add(""); - //add("/*66*/"); - add("30,-1,-15626,24491,7484,"); - add("-83,-67,46,-114,-88,46,-68,-5,-126,97,105,-140,"); - add("-44,-32,12,-109,-104,110,-71,-25,-74,17,58,-157,"); - add("56,86,-168,55,54,-62,99,90,-93,-46,-30,1,"); - add("-111,-81,30,-107,-95,90,51,32,2,18,-7,67,"); - add("-44,-71,143,-29,-57,126,-127,-117,107,61,42,-4,"); - add("84,48,25,129,58,89,23,-29,138,54,-12,150,"); - add("97,37,80,1,22,-66,-33,14,-112,39,65,-125,"); - add("78,80,-95,"); - add(""); - //add("/*67*/"); - add("28,1,5003,28957,-6038,"); - add("-142,13,-55,-88,-5,-93,-122,12,-36,6,39,188,"); - add("-80,41,141,-68,3,-37,111,-44,-128,-14,-26,-135,"); - add("-116,1,-81,-120,35,77,-93,33,90,63,26,174,"); - add("99,6,101,23,27,152,62,-3,38,127,-37,-87,"); - add("58,-6,16,1,28,142,27,27,171,115,-13,30,"); - add("134,-33,-55,109,-32,-70,98,-34,-89,43,-40,-165,"); - add("3,-30,-143,-109,2,-89,-95,20,19,"); - add(""); - //add("/*68*/"); - add("26,1,7323,-10567,-27106,"); - add("121,94,-3,142,73,11,122,50,15,31,-23,18,"); - add("-79,-118,23,-100,-126,21,-116,-102,8,-99,-88,8,"); - add("-118,-114,14,-116,-87,5,-129,-67,-7,-133,-64,-7,"); - add("-148,-82,-3,-104,-89,11,-126,-59,-5,-162,-43,-21,"); - add("-51,84,-47,121,97,-12,115,83,-7,115,86,-8,"); - add("145,83,2,105,59,3,128,90,-4,105,115,-18,"); - add("106,86,-6,"); - add(""); - //add("/*69*/"); - add("26,-1,-20783,20998,5211,"); - add("-67,-40,-109,-67,-36,-125,-76,-30,-203,-20,-37,79,"); - add("-61,-46,-71,-3,31,-149,-35,-6,-136,-49,-20,-142,"); - add("-48,-19,-142,-60,-36,-128,-82,-63,-113,-105,-93,-75,"); - add("-44,-64,90,45,20,138,58,32,135,44,16,144,"); - add("25,-6,149,1,-33,149,37,2,157,44,16,125,"); - add("87,62,112,80,63,76,114,121,-22,74,80,-27,"); - add("100,72,109,"); - add(""); - //add("/*70*/"); - add("27,1,-22450,-137,19899,"); - add("-70,14,-79,-99,23,-113,-98,19,-113,-86,-40,-100,"); - add("-104,11,-123,-96,32,-113,-97,9,-116,-84,-60,-104,"); - add("-22,-179,-28,-32,-108,-41,50,-137,58,-19,-49,-25,"); - add("-30,-140,-42,56,-135,63,66,-76,77,47,77,60,"); - add("23,0,27,79,-32,94,92,11,109,82,77,100,"); - add("97,22,114,89,69,105,33,101,41,70,117,83,"); - add("32,144,39,35,156,42,"); - add(""); - //add("/*71*/"); - add("25,1,23559,-1507,-18512,"); - add("27,-75,40,43,-174,71,-57,80,-80,-63,-34,-78,"); - add("-88,-88,-102,-96,83,-128,-85,-47,-100,-97,-34,-115,"); - add("-66,45,-84,-109,-20,-130,-84,-84,-92,-92,-58,-103,"); - add("-106,-83,-115,-37,97,-53,50,123,46,60,131,59,"); - add("87,78,95,102,9,121,87,54,99,99,35,117,"); - add("97,-53,123,84,32,102,97,-3,120,94,-4,119,"); - add(""); - //add("/*72*/"); - add("25,1,25640,-4315,-14965,"); - add("31,-45,66,54,-65,113,-15,-155,20,-76,-10,-128,"); - add("-74,-2,-127,-82,-20,-132,-78,-42,-117,-79,26,-139,"); - add("-74,13,-124,-72,1,-117,-70,50,-127,-81,13,-132,"); - add("-77,64,-138,-16,182,-75,15,-33,33,65,-78,123,"); - add("50,-80,100,83,61,115,72,4,114,69,-29,120,"); - add("79,35,120,80,57,116,85,40,131,72,15,117,"); - add(""); - //add("/*73*/"); - add("25,1,6329,18585,22684,"); - add("-107,-21,47,-119,-30,56,-133,-23,54,-136,-32,61,"); - add("-142,-5,39,-143,15,24,-151,47,-3,-153,-26,57,"); - add("-110,-33,51,-5,-114,92,127,-70,27,147,-37,-4,"); - add("135,-68,21,136,-61,15,141,-32,-11,132,-59,13,"); - add("114,-83,35,151,-27,-19,56,56,-58,26,118,-100,"); - add("-68,102,-61,-5,117,-92,38,106,-95,58,104,-101,"); - add(""); - //add("/*74*/"); - add("26,-1,7748,26705,11261,"); - add("129,-68,72,75,-7,-35,137,-55,31,-13,-50,125,"); - add("-161,55,-14,49,-48,77,-43,-4,39,-135,66,-60,"); - add("2,-12,25,126,-63,59,99,-70,91,122,-60,54,"); - add("141,-38,-16,147,-75,66,-108,0,77,30,-27,38,"); - add("172,-30,-57,50,41,-128,-18,56,-112,-120,65,-62,"); - add("-126,68,-62,-106,65,-74,-69,75,-127,-124,50,-29,"); - add("-152,41,9,"); - add(""); - //add("/*75*/"); - add("24,1,14610,-1401,-26164,"); - add("-43,-57,-21,-121,-61,-64,-114,-84,-57,-111,-85,-55,"); - add("-108,-95,-52,-127,-52,-64,-100,-97,-45,-86,-118,-37,"); - add("-64,-137,-22,-14,-151,6,-73,-146,-24,-89,52,-51,"); - add("-27,143,-26,41,133,10,95,100,40,117,78,55,"); - add("94,100,41,108,104,50,105,90,50,116,72,58,"); - add("117,80,58,121,59,63,112,86,57,"); - add(""); - //add("/*76*/"); - add("25,1,26396,-4371,-13570,"); - add("27,-28,63,47,-88,120,-11,-160,33,-56,-86,-80,"); - add("-64,15,-130,-65,22,-135,-62,42,-131,-63,33,-130,"); - add("-48,80,-115,-27,-30,-40,-87,-20,-155,-63,65,-133,"); - add("31,142,11,67,-4,122,35,47,51,74,2,136,"); - add("69,92,100,70,-21,139,-48,-125,-52,-73,-63,-118,"); - add("3,-64,27,69,-13,135,70,102,98,63,32,111,"); - add(""); - //add("/*77*/"); - add("23,1,26582,10216,-9436,"); - add("30,-17,65,49,-62,75,75,-102,105,70,-87,108,"); - add("50,-116,22,46,-147,-22,35,-144,-49,-19,-79,-135,"); - add("-30,-43,-131,-46,-32,-162,-77,83,-132,-44,43,-79,"); - add("-77,97,-116,-52,90,-53,-60,147,-15,-92,167,-77,"); - add("-58,74,-78,-40,143,40,36,48,144,48,-10,118,"); - add("63,-23,148,48,1,132,"); - add(""); - //add("/*78*/"); - add("23,1,-8254,28832,-761,"); - add("-97,-27,32,-31,-10,-50,-97,-30,-58,-158,-48,-10,"); - add("-145,-44,-22,-132,-40,25,-139,-43,23,-146,-46,14,"); - add("-16,-2,144,146,49,85,167,51,-32,34,13,112,"); - add("-19,-4,154,118,38,92,128,39,47,135,41,74,"); - add("140,41,77,82,23,-61,17,4,-155,43,11,-104,"); - add("41,10,-148,-16,-8,-141,"); - add(""); - //add("/*79*/"); - add("24,-1,14884,12125,23053,"); - add("-8,-117,67,30,-56,9,26,-101,36,-42,-130,92,"); - add("-29,-120,79,-101,-11,69,-108,-19,77,-76,-80,87,"); - add("-61,-124,97,-48,-109,82,-33,-127,80,-2,-59,28,"); - add("57,166,-112,62,118,-94,74,73,-82,52,104,-83,"); - add("117,0,-73,92,82,-99,54,95,-82,72,29,-62,"); - add("-24,146,-59,-33,131,-46,-56,133,-33,"); - add(""); - //add("/*80*/"); - add("24,1,-6839,29182,-1275,"); - add("-120,-28,3,-163,-38,26,40,6,-75,150,32,-101,"); - add("-80,-22,-42,-160,-38,24,-18,-7,-50,-43,-16,-102,"); - add("-84,-21,-8,-1,8,163,1,10,202,-56,-17,-58,"); - add("-100,-29,-83,-143,-37,2,-35,-4,135,14,11,157,"); - add("134,36,49,74,22,69,135,33,-19,158,41,35,"); - add("152,36,-3,91,18,-110,41,5,-116,"); - add(""); - //add("/*81*/"); - add("22,1,3600,19765,22280,"); - add("-77,-59,64,-106,-70,78,-159,-8,31,-4,-102,89,"); - add("93,-99,72,21,-114,94,35,-110,88,-12,-117,100,"); - add("13,-132,107,38,-71,53,123,-42,16,95,103,-100,"); - add("127,4,-24,82,36,-43,7,116,-98,-1,119,-100,"); - add("-19,110,-91,7,106,-91,-6,104,-89,-74,113,-87,"); - add("-86,90,-65,"); - add(""); - //add("/*82*/"); - add("22,1,17666,16854,-17432,"); - add("58,31,90,67,45,112,127,-40,93,77,-78,4,"); - add("118,-56,71,88,35,127,118,-100,28,110,-93,28,"); - add("132,-78,69,-25,0,-27,-25,-67,-93,41,-117,-70,"); - add("-50,-92,-141,-97,70,-37,-107,106,-14,-97,92,-15,"); - add("-122,47,-83,-86,-65,-151,-117,93,-33,-118,80,-43,"); - add("-51,74,19,"); - add(""); - //add("/*83*/"); - add("23,-1,5861,26752,12246,"); - add("82,-33,32,44,-67,125,76,-64,100,4,-66,137,"); - add("-2,-60,126,26,-61,114,56,-72,119,85,-65,91,"); - add("113,19,-91,-80,25,-13,-77,59,-82,-48,72,-125,"); - add("-16,64,-126,27,80,-182,83,25,-95,1,56,-122,"); - add("-73,49,-71,-16,-45,108,-29,-53,127,-52,-5,37,"); - add("-15,55,-111,-63,57,-93,"); - add(""); - //add("/*84*/"); - add("21,-1,-14603,25601,-5597,"); - add("-10,25,142,72,67,124,9,35,145,-23,16,145,"); - add("-38,6,147,-17,20,157,8,28,124,-63,-10,152,"); - add("-54,-3,159,20,6,-30,59,11,-131,70,16,-134,"); - add("72,16,-137,31,-8,-139,65,22,-75,81,21,-120,"); - add("-49,-52,-125,-49,-56,-141,-43,-51,-128,-51,-59,-142,"); - add(""); - //add("/*85*/"); - add("22,1,-5757,29270,-3178,"); - add("-36,-18,-100,-68,-28,-130,-59,-28,-136,-54,-28,-139,"); - add("-12,-22,-151,-104,-29,-57,-107,-3,153,-77,-12,39,"); - add("-63,-5,65,100,36,117,69,31,137,90,32,119,"); - add("-54,-10,14,-143,-35,-43,22,18,118,56,27,139,"); - add("125,32,58,110,32,92,119,26,24,9,-8,-107,"); - add("35,-5,-114,"); - add(""); - //add("/*86*/"); - add("21,-1,20081,22197,2006,"); - add("-52,51,-44,-84,68,86,-104,80,129,-69,58,28,"); - add("-120,102,37,-73,72,-95,-48,58,-182,-84,68,55,"); - add("-110,87,70,-18,8,85,64,-52,-33,78,-55,-118,"); - add("78,-70,26,34,-43,145,91,-86,70,115,-101,0,"); - add("61,-64,105,67,-57,-30,57,-37,-136,75,-56,-119,"); - add(""); - //add("/*87*/"); - add("20,1,-17819,21913,10114,"); - add("-28,11,-73,-142,-94,-50,-103,-82,-6,-124,-90,-31,"); - add("-113,-92,-6,-78,-105,82,23,-33,112,76,6,124,"); - add("103,33,114,116,67,63,95,87,-16,-56,30,-159,"); - add("-112,-81,-27,-102,-84,-3,-35,13,-90,78,74,-17,"); - add("142,85,72,90,79,-10,109,95,-13,"); - add(""); - //add("/*88*/"); - add("20,-1,7617,6776,28215,"); - add("-100,37,17,-132,61,21,-141,-23,42,-89,78,3,"); - add("-96,12,21,-102,53,13,7,147,-39,-119,93,6,"); - add("-141,-63,49,40,-153,29,77,-127,13,116,-87,-7,"); - add("54,-69,3,16,-124,25,121,-114,-4,95,65,-38,"); - add("115,89,-51,119,41,-40,150,29,-48,"); - add(""); - //add("/*89*/"); - add("19,1,10847,17337,21949,"); - add("-55,-34,54,-136,-1,68,-125,41,27,-145,19,54,"); - add("-134,22,45,-141,-18,79,-130,62,9,-164,26,53,"); - add("-47,-61,68,70,-81,33,147,-15,-54,141,-18,-50,"); - add("144,-61,-18,126,-37,-30,129,17,-74,133,12,-73,"); - add("135,5,-69,64,69,-85,"); - add(""); - //add("/*90*/"); - add("20,1,2092,29573,4591,"); - add("-46,-9,79,-90,13,-48,2,-21,135,-89,7,-11,"); - add("-133,16,-49,-43,-2,32,-29,-14,96,-26,-16,102,"); - add("78,-24,118,217,0,-82,-44,-15,105,58,-18,82,"); - add("160,-5,-33,149,-15,25,91,14,-122,30,20,-136,"); - add("19,23,-151,-57,26,-134,-157,12,-2,"); - add(""); - //add("/*91*/"); - add("20,-1,-20217,21829,-3845,"); - add("-71,-59,41,-110,-106,-18,-100,-95,2,-110,-103,7,"); - add("-95,-95,-14,-36,-35,-3,-92,-87,16,-71,-87,-94,"); - add("0,-28,-153,-18,-16,10,-98,-75,125,44,47,13,"); - add("84,99,88,78,86,54,114,110,-6,97,96,15,"); - add("98,90,-25,111,102,-14,116,111,14,"); - add(""); - //add("/*92*/"); - add("18,1,24559,5678,-16267,"); - add("45,23,76,82,-17,120,53,-117,40,48,-136,28,"); - add("29,-161,-10,79,-73,100,62,-105,63,-13,-129,-61,"); - add("-56,-87,-115,-34,-125,-90,-73,6,-110,-35,134,-13,"); - add("15,127,61,-34,158,-2,-54,138,-37,-51,138,-32,"); - add("-55,139,-37,"); - add(""); - //add("/*93*/"); - add("20,-1,7773,28919,-1814,"); - add("-89,16,-118,-83,13,-134,-41,10,2,-8,13,153,"); - add("162,-37,87,52,-6,135,18,3,148,-94,31,106,"); - add("-54,17,47,200,-56,-53,108,-26,75,31,-8,11,"); - add("11,-11,-150,130,-40,-79,27,-11,-54,-161,49,66,"); - add("-70,20,5,1,-8,-121,-91,22,-50,"); - add(""); - //add("/*94*/"); - add("19,1,28847,-786,-8199,"); - add("14,-81,55,17,10,63,33,-16,120,21,-153,93,"); - add("-27,-81,-85,-41,-5,-147,-26,-117,-78,-18,-132,-42,"); - add("-24,-120,-62,-43,-55,-138,-40,-73,-123,-13,54,-52,"); - add("-1,171,-32,26,67,75,42,57,133,23,143,60,"); - add("13,150,26,24,136,69,"); - add(""); - //add("/*95*/"); - add("19,-1,-13526,25075,-9397,"); - add("-104,-57,0,-169,-104,-31,-81,-44,5,-119,-56,27,"); - add("-136,-62,41,-155,-91,-5,21,21,24,125,71,-5,"); - add("135,72,-11,34,50,83,-79,4,130,-78,13,159,"); - add("39,17,-17,54,-22,-142,66,-7,-119,128,39,-89,"); - add("119,53,-33,130,72,1,"); - add(""); - //add("/*96*/"); - add("20,1,-8960,-28564,-1947,"); - add("-4,-7,116,-2,-8,149,17,-15,170,40,-19,128,"); - add("-19,-1,158,3,-7,144,-60,14,121,-106,34,-11,"); - add("-17,9,-106,-78,25,14,-77,27,-65,101,-30,-68,"); - add("12,1,-102,-83,31,-101,76,-21,-60,44,-10,-76,"); - add("-10,10,-123,16,4,-148,77,-15,-153,"); - add(""); - //add("/*97*/"); - add("17,-1,17593,2406,24180,"); - add("-46,-122,46,-2,-152,15,-14,-147,23,32,-145,-12,"); - add("61,-134,-35,60,-128,-35,91,-110,-59,82,-162,-52,"); - add("51,105,-43,-51,108,31,-94,101,62,-58,133,34,"); - add("-12,155,-3,-12,148,-4,-3,151,-11,-17,154,-2,"); - add(""); - //add("/*98*/"); - add("17,-1,7274,26419,12212,"); - add("-30,-53,132,-26,-63,149,90,-55,61,121,-62,59,"); - add("112,-69,77,111,-66,68,136,-77,76,45,47,-124,"); - add("109,9,-86,69,26,-97,-23,64,-119,-68,73,-111,"); - add("-118,65,-65,-148,50,-12,-139,44,-10,-135,48,-21,"); - add(""); - //add("/*99*/"); - add("18,1,-5378,29484,-1323,"); - add("7,-3,-94,-75,-18,-97,-134,-22,66,-123,-21,55,"); - add("-78,-18,-54,-45,-14,-99,-88,-13,91,-23,2,131,"); - add("-90,-13,129,-141,-28,38,-61,-8,119,130,29,54,"); - add("147,29,-35,140,28,5,121,21,-86,99,14,-122,"); - add("143,25,-49,"); - add(""); - //add("/*100*/"); - add("18,-1,13477,22776,14129,"); - add("109,-76,17,41,-79,87,-6,-77,128,-25,-78,145,"); - add("21,-91,121,32,-82,95,-81,-30,118,-6,-70,111,"); - add("92,-30,-39,85,48,-150,1,51,-78,-51,92,-93,"); - add("-5,96,-142,-21,78,-104,-25,85,-108,-32,83,-102,"); - add("-120,75,-7,"); - add(""); - //add("/*101*/"); - add("17,1,13832,17499,20061,"); - add("-49,-24,54,-87,-54,108,-99,-46,105,-113,-24,96,"); - add("-145,5,90,-63,-73,103,-121,-41,111,20,-94,65,"); - add("118,-79,-9,138,-22,-72,110,42,-106,81,58,-102,"); - add("102,48,-108,-30,92,-58,35,96,-105,73,73,-114,"); - add(""); - //add("/*102*/"); - add("17,1,24192,6529,-16496,"); - add("5,-81,-25,-12,-132,-68,-58,-89,-117,-44,-93,-99,"); - add("9,-107,-24,11,-90,-17,-48,-108,-106,-117,-38,-177,"); - add("-17,120,16,4,156,60,-22,140,20,-18,140,26,"); - add("28,112,82,69,65,123,82,-21,109,87,10,130,"); - add(""); - //add("/*103*/"); - add("16,-1,13005,-9227,25411,"); - add("89,107,-7,117,91,-28,96,129,-5,124,84,-36,"); - add("90,79,-20,135,59,-53,192,71,-80,-94,74,77,"); - add("-136,-44,59,-116,-94,30,-130,-64,47,-93,-97,15,"); - add("-108,-131,10,-73,-112,-2,-93,-119,5,"); - add(""); - //add("/*104*/"); - add("17,-1,12753,25778,8535,"); - add("52,-64,114,99,-58,27,-5,-49,150,9,-5,1,"); - add("88,-14,-90,143,-79,19,196,-98,-11,-76,66,-78,"); - add("-85,33,34,-159,84,-9,-83,82,-118,-127,73,-28,"); - add("-31,59,-134,-108,74,-64,-53,33,-23,131,-100,112,"); - add(""); - //add("/*105*/"); - add("17,-1,-16206,24956,-3814,"); - add("36,36,80,46,51,147,74,60,88,97,75,103,"); - add("123,82,32,170,122,119,112,64,-32,-8,-16,-86,"); - add("-85,-70,-130,-116,-86,-105,-110,-66,20,-171,-113,-32,"); - add("-59,-52,-95,72,44,-17,-35,-27,-34,-79,-59,-52,"); - add(""); - //add("/*106*/"); - add("16,1,-27904,9377,5782,"); - add("14,-34,121,-8,-99,117,14,-47,134,25,-36,169,"); - add("56,65,149,27,-4,118,34,-11,159,32,89,9,"); - add("-6,72,-124,-13,58,-137,-16,45,-140,-25,26,-147,"); - add("-27,16,-146,-35,-14,-143,-43,-42,-136,"); - add(""); - //add("/*107*/"); - add("16,1,24919,6169,-15523,"); - add("-15,-83,-57,15,-144,-32,30,-148,-7,46,-148,19,"); - add("27,-152,-11,-30,-15,-54,-79,68,-101,-85,43,-118,"); - add("-72,102,-77,-78,95,-86,-59,170,-28,55,27,94,"); - add("69,29,118,60,64,119,58,69,119,"); - add(""); - //add("/*108*/"); - add("15,1,25878,-4981,-14336,"); - add("-65,-92,-84,-74,-17,-126,-74,-48,-113,-75,-84,-102,"); - add("-71,-100,-87,-80,-25,-128,-62,61,-127,26,118,4,"); - add("71,113,81,76,61,110,79,105,100,67,7,115,"); - add("75,-1,131,72,-13,133,"); - add(""); - //add("/*109*/"); - add("16,1,5450,29486,-929,"); - add("-154,29,9,-133,25,53,15,0,102,55,-8,59,"); - add("-131,24,83,51,-6,146,117,-19,76,152,-27,86,"); - add("46,-9,-54,171,-34,-108,46,-11,-133,67,-16,-143,"); - add("2,-5,-140,-115,20,-79,-112,23,66,"); - add(""); - //add("/*110*/"); - add("16,-1,17357,24467,-289,"); - add("93,-67,-83,114,-83,-67,118,-86,-7,-13,8,-49,"); - add("-63,46,4,-131,96,35,-99,72,119,-113,81,37,"); - add("-79,53,-96,-30,19,-139,-102,66,-178,18,-10,75,"); - add("61,-39,123,40,-26,142,85,-58,90,"); - add(""); - //add("/*111*/"); - add("16,1,-10217,28170,-1431,"); - add("-65,-26,-59,-121,-47,-38,-112,-47,-83,-64,-32,-142,"); - add("-103,-35,66,-74,-21,123,-113,-36,147,-52,-14,123,"); - add("22,14,136,72,32,111,73,28,-15,127,46,-75,"); - add("129,46,-48,120,40,-116,91,30,-63,"); - add(""); - //add("/*112*/"); - add("15,1,29126,7027,-1524,"); - add("25,-95,61,35,-144,21,37,-153,29,32,-136,22,"); - add("32,-147,-4,36,-156,67,31,-153,-26,-10,34,-50,"); - add("-33,155,-14,-35,150,-55,-27,117,-36,-41,183,10,"); - add("-27,109,-30,-35,145,-19,"); - add(""); - //add("/*113*/"); - add("15,1,6145,29344,-1095,"); - add("-111,18,-111,-53,5,-138,-82,10,-139,-105,16,-86,"); - add("-147,32,55,-78,19,94,-45,14,107,69,-11,60,"); - add("-161,34,74,151,-26,74,141,-26,15,139,-26,36,"); - add("145,-29,16,127,-25,23,"); - add(""); - //add("/*114*/"); - add("15,1,24375,5854,-16479,"); - add("40,-64,35,43,-140,16,59,-133,43,58,-133,43,"); - add("65,-133,54,43,-126,24,37,-157,9,-33,-4,-52,"); - add("-54,137,-39,-51,140,-32,-78,112,-80,-58,111,-51,"); - add("-26,150,12,-23,147,17,"); - add(""); - //add("/*115*/"); - add("15,-1,-17689,24006,-3293,"); - add("3,-14,-112,-73,-60,-41,-34,-11,101,-70,-38,105,"); - add("-89,-57,66,-106,-88,-56,-163,-125,4,-104,-72,56,"); - add("44,39,37,120,91,-4,106,86,36,112,90,43,"); - add("115,84,-14,93,53,-126,"); - add(""); - //add("/*116*/"); - add("14,1,12744,-2905,-27003,"); - add("-5,-145,14,-77,-123,-22,-103,-99,-37,-63,-118,-14,"); - add("-67,-122,-15,-128,-69,-50,-133,51,-66,17,147,-12,"); - add("107,117,35,104,79,37,99,120,32,86,134,25,"); - add("119,58,49,"); - add(""); - //add("/*117*/"); - add("15,1,-12039,24973,-11465,"); - add("-64,-40,-18,-136,-75,-18,-97,-85,-81,-115,-86,-58,"); - add("-106,-47,12,-128,-64,5,-126,-69,-8,-7,38,87,"); - add("99,75,51,156,93,28,61,55,53,130,77,25,"); - add("140,57,-26,124,60,-2,"); - add(""); - //add("/*118*/"); - add("14,1,7404,28675,-4785,"); - add("-29,-17,-146,-17,-21,-148,7,-29,-149,-45,-11,-123,"); - add("-150,53,81,-131,42,51,-114,46,103,-17,24,116,"); - add("7,24,148,56,10,138,125,-25,35,146,-55,-111,"); - add("129,-30,17,"); - add(""); - //add("/*119*/"); - add("15,1,-18411,21935,8938,"); - add("-115,-81,-40,-37,-70,94,-16,-67,130,-6,-58,124,"); - add("71,2,136,-17,-59,103,77,18,109,131,91,45,"); - add("-20,35,-117,-69,-11,-111,-56,16,-148,-52,11,-130,"); - add("18,47,-75,70,90,-75,"); - add(""); - //add("/*120*/"); - add("16,-1,-19925,-10993,19549,"); - add("-85,60,-54,-81,131,-10,-95,132,-25,49,44,74,"); - add("124,-109,68,104,-49,79,-38,35,-20,-106,137,-32,"); - add("-67,38,-48,-111,-16,-125,11,-76,-29,64,-118,1,"); - add("29,-126,-41,51,-24,39,100,-47,78,"); - add(""); - //add("/*121*/"); - add("15,-1,-18321,23571,-2957,"); - add("-21,-25,-65,-55,-44,-12,-127,-88,93,-93,-71,26,"); - add("-105,-81,20,-118,-90,42,-124,-99,20,-24,-4,132,"); - add("89,77,41,107,79,-71,90,60,-111,99,80,11,"); - add("155,117,-44,66,45,-56,"); - add(""); - //add("/*122*/"); - add("13,1,-17336,22935,8569,"); - add("-77,9,-181,-36,-51,65,5,-50,144,-33,-72,123,"); - add("11,-49,149,36,-30,146,45,-23,142,99,30,115,"); - add("31,78,-136,-4,53,-140,-9,49,-144,-26,36,-146,"); - add(""); - //add("/*123*/"); - add("15,1,18292,-22847,6589,"); - add("17,51,129,65,27,-88,38,6,-87,81,84,64,"); - add("-109,-44,152,4,37,115,-16,21,109,75,88,88,"); - add("-100,-69,39,-92,-89,-47,-125,-112,-40,46,6,-100,"); - add("56,0,-148,7,-22,-92,"); - add(""); - //add("/*124*/"); - add("14,1,25183,6987,-14730,"); - add("-19,-68,-66,-34,-107,-106,-1,-140,-65,-8,-124,-68,"); - add("-18,-137,-89,-55,-30,-104,-61,102,-57,-40,142,-5,"); - add("-29,159,24,18,114,80,56,74,126,63,25,117,"); - add("76,10,133,"); - add(""); - //add("/*125*/"); - add("14,1,-8316,28793,1345,"); - add("-112,-33,14,-106,-36,84,-119,-39,70,-83,-31,115,"); - add("70,13,135,41,3,142,12,-7,156,99,28,19,"); - add("108,39,-100,95,35,-109,42,21,-148,-30,0,-150,"); - add("16,13,-150,"); - add(""); - //add("/*126*/"); - add("14,1,-20941,-20602,6087,"); - add("-57,78,65,-69,88,56,-96,95,-13,-76,82,8,"); - add("-54,95,123,-116,124,1,-64,28,-127,47,-74,-79,"); - add("82,-108,-69,97,-111,-29,98,-114,-42,84,-109,-75,"); - add("86,-65,78,"); - add(""); - //add("/*127*/"); - add("13,1,-4213,-29615,2279,"); - add("-54,18,127,-113,24,97,-128,26,79,-138,28,72,"); - add("-56,2,-82,112,-27,-103,78,-21,-118,-45,-5,-145,"); - add("-127,9,-160,135,-23,-23,80,-3,125,149,-19,48,"); - add(""); - //add("/*128*/"); - add("17,1,-7190,25393,-14265,"); - add("78,-15,-66,-8,-71,-121,96,22,-9,103,-22,-88,"); - add("-16,-69,-112,-123,-86,-89,-29,14,39,-51,17,54,"); - add("-61,-48,-53,-53,22,65,-54,65,139,-68,50,122,"); - add("-82,20,78,25,62,96,104,44,25,88,20,-10,"); - add(""); - //add("/*129*/"); - add("14,-1,-19493,22341,-4569,"); - add("21,-10,-138,-18,-17,-9,-18,15,150,-41,-7,140,"); - add("-104,-82,48,-110,-85,68,-76,-41,140,-11,27,201,"); - add("24,10,-64,19,-10,-144,124,90,-106,57,33,-93,"); - add("103,79,-54,"); - add(""); - //add("/*130*/"); - add("14,1,631,-8774,-28681,"); - add("-95,52,-18,-113,74,-25,-126,-17,4,-218,65,-21,"); - add("120,-18,6,3,62,-18,-151,163,-49,118,8,-2,"); - add("126,-59,18,142,-43,15,136,-62,21,142,-64,22,"); - add("-23,-89,26,"); - add(""); - //add("/*131*/"); - add("14,1,19698,-3856,-22297,"); - add("66,-19,63,94,-67,96,59,-115,73,41,-133,62,"); - add("33,-144,58,-56,-44,-42,-112,1,-101,-112,-2,-100,"); - add("-88,89,-95,-79,93,-87,-35,136,-55,18,126,-7,"); - add("109,85,80,"); - add(""); - //add("/*132*/"); - add("13,1,-11506,10377,-25689,"); - add("-24,-106,-32,45,-133,-73,-57,-146,-31,-32,-145,-41,"); - add("-112,-83,18,-96,90,78,-114,58,75,-114,81,84,"); - add("67,117,15,89,117,5,131,76,-30,133,55,-38,"); - add(""); - //add("/*133*/"); - add("13,1,3573,20459,21649,"); - add("-18,-82,80,-121,-55,70,-106,-79,91,11,-107,96,"); - add("42,-113,97,64,-95,76,145,-61,32,58,98,-98,"); - add("18,114,-107,15,110,-103,-40,114,-99,-24,107,-96,"); - add(""); - //add("/*134*/"); - add("14,1,-13127,24311,-11689,"); - add("32,-36,-111,-20,-65,-111,-11,-39,-67,119,108,88,"); - add("119,35,-57,12,-41,-96,-113,-93,-66,-148,-83,-6,"); - add("-78,-59,-31,-99,-15,79,15,71,124,81,88,89,"); - add("49,83,116,"); - add(""); - //add("/*135*/"); - add("14,-1,-27102,-7955,10108,"); - add("-41,40,-76,7,-121,-79,2,-95,-72,50,-76,73,"); - add("60,-59,116,54,-99,63,49,14,140,58,-112,59,"); - add("41,30,130,-56,115,-52,-55,104,-59,-68,105,-94,"); - add("-62,98,-88,"); - add(""); - //add("/*136*/"); - add("13,1,24282,5951,-16583,"); - add("1,-130,-43,-12,-124,-61,-62,-64,-112,21,-145,-17,"); - add("-12,-193,-80,-75,62,-87,-38,114,-17,22,137,75,"); - add("-22,152,20,1,137,49,74,1,106,62,51,109,"); - add(""); - //add("/*137*/"); - add("12,1,-26265,9394,11041,"); - add("-25,-130,52,61,-10,151,61,0,140,56,-11,136,"); - add("72,36,134,82,129,80,-33,84,-143,-47,8,-112,"); - add("-59,12,-145,-60,2,-141,-63,-12,-136,"); - add(""); - //add("/*138*/"); - add("13,1,959,-9398,-28474,"); - add("-96,40,-16,-137,30,-14,-46,96,-32,46,137,-43,"); - add("120,104,-29,106,43,-11,165,-34,17,122,-55,22,"); - add("71,-116,41,34,-132,44,-128,-70,17,-150,-39,7,"); - add(""); - //add("/*139*/"); - add("13,-1,14782,-8096,24818,"); - add("69,-20,-48,119,-33,-82,133,23,-74,129,-1,-79,"); - add("130,19,-76,172,44,-94,-52,24,41,-129,-22,74,"); - add("-124,-10,75,-135,-5,81,-127,-25,69,-127,11,80,"); - add(""); - //add("/*140*/"); - add("13,1,-18588,-22992,5084,"); - add("-30,41,75,-96,84,27,-117,108,51,-121,106,23,"); - add("-116,92,-23,16,-39,-112,126,-112,-27,33,-57,-133,"); - add("146,-119,7,-60,76,116,53,-45,-2,114,-97,-23,"); - add(""); - //add("/*141*/"); - add("13,1,10930,21399,-17962,"); - add("112,-57,2,131,-9,69,89,-43,5,131,-71,-1,"); - add("148,-86,-8,121,-90,-27,-34,-14,-38,-131,74,3,"); - add("-134,81,9,-140,53,-25,-138,61,-13,-155,53,-32,"); - add(""); - //add("/*142*/"); - add("13,-1,2123,5909,29336,"); - add("91,-78,9,130,-73,4,65,-131,20,-85,-112,28,"); - add("-40,-133,28,50,-162,25,34,36,-9,28,139,-28,"); - add("10,135,-25,8,152,-30,-103,116,-14,-132,66,-4,"); - add(""); - //add("/*143*/"); - add("14,-1,-17261,24337,-3127,"); - add("-106,-81,-41,-97,-73,-25,-70,-67,-119,-103,-69,48,"); - add("-89,-51,111,-27,0,147,30,31,74,43,21,-85,"); - add("52,29,-72,125,88,-25,82,75,129,15,1,-77,"); - add("94,67,-2,"); - add(""); - //add("/*144*/"); - add("15,-1,-17925,23424,5478,"); - add("-56,-22,-89,-109,-64,-90,-96,-63,-50,-158,-128,15,"); - add("-122,-105,33,71,48,36,88,74,-14,119,86,31,"); - add("133,87,74,-67,-52,0,43,22,48,109,65,81,"); - add("5,10,-29,16,17,-20,"); - add(""); - //add("/*145*/"); - add("12,1,-11151,25532,-11125,"); - add("-96,-60,-40,-113,-85,-80,-154,-96,-60,-89,-84,-95,"); - add("-39,41,132,43,56,79,187,120,81,-121,-59,-10,"); - add("37,33,37,135,73,29,132,34,-56,"); - add(""); - //add("/*146*/"); - add("13,1,-8245,28241,5871,"); - add("-116,-48,68,-111,-45,51,-55,-33,79,67,-11,142,"); - add("-65,-18,-4,-34,-28,75,111,13,96,134,24,67,"); - add("120,43,-35,8,38,-156,32,40,-143,-27,24,-145,"); - add(""); - //add("/*147*/"); - add("12,-1,-29258,6281,2126,"); - add("-23,-98,-32,-27,-136,29,-23,-141,72,-7,-82,123,"); - add("3,-46,145,8,-25,154,25,105,42,17,119,-83,"); - add("14,113,-102,8,88,-123,9,85,-120,"); - add(""); - //add("/*148*/"); - add("12,-1,15271,556,25816,"); - add("72,107,-45,84,120,-53,109,74,-69,73,123,-48,"); - add("14,199,-17,-60,-36,38,-94,-101,61,-101,-90,64,"); - add("-93,-105,59,-79,-120,50,19,-120,-8,"); - add(""); - //add("/*149*/"); - add("13,1,4573,29647,-405,"); - add("107,-16,122,127,-20,41,164,-26,40,74,-13,16,"); - add("63,-11,-54,48,-10,-152,-74,11,-130,-85,12,-108,"); - add("-165,28,-1,-109,18,26,-117,20,93,-78,13,54,"); - add(""); - //add("/*150*/"); - add("12,-1,9509,25746,12114,"); - add("-81,-25,114,107,-45,12,57,-63,87,-150,26,61,"); - add("42,-29,28,151,-65,19,165,-64,1,86,3,-73,"); - add("-2,67,-137,-128,58,-19,-139,62,-20,"); - add(""); - //add("/*151*/"); - add("12,1,10885,-3987,-27670,"); - add("-99,-113,-22,-113,-91,-30,-130,-74,-39,-127,-67,-37,"); - add("-158,-91,-44,-8,63,-13,108,109,23,122,81,33,"); - add("131,59,41,117,91,32,119,64,37,"); - add(""); - //add("/*152*/"); - add("12,1,-10784,27846,2885,"); - add("31,19,-71,-6,13,-150,-84,-23,-112,-140,-51,-40,"); - add("-139,-55,-1,-127,-56,54,-43,-30,122,55,9,143,"); - add("106,32,100,140,55,3,133,57,-42,"); - add(""); - //add("/*153*/"); - add("12,-1,-20095,-16594,14860,"); - add("-15,59,46,-47,134,85,5,91,106,32,39,83,"); - add("57,25,102,-93,188,76,-37,-61,-113,-25,-95,-134,"); - add("8,-95,-92,-9,-95,-115,80,-131,-38,"); - add(""); - //add("/*154*/"); - add("12,-1,-19229,22976,-1545,"); - add("-67,-58,-11,-88,-82,-108,-97,-85,-32,-80,-76,-92,"); - add("-72,-59,30,-25,-11,149,79,79,162,92,71,-119,"); - add("3,12,140,91,76,-35,97,78,-55,"); - add(""); - //add("/*155*/"); - add("11,1,-1931,-29525,-4956,"); - add("-34,25,-132,27,24,-147,46,23,-144,42,24,-147,"); - add("128,1,-45,118,-27,110,37,-28,139,-44,-23,143,"); - add("-82,-17,128,-119,-8,89,"); - add(""); - //add("/*156*/"); - add("11,1,-7314,-28817,-4011,"); - add("38,10,-135,63,4,-137,36,13,-147,80,3,-145,"); - add("86,-36,93,124,-44,90,31,-23,107,-108,11,103,"); - add("-109,12,101,-119,17,85,"); - add(""); - //add("/*157*/"); - add("14,1,-10998,25512,-11321,"); - add("41,-28,-103,-54,-61,-84,-107,-71,-54,-129,-62,-11,"); - add("25,48,82,-20,9,39,-150,-48,44,17,44,79,"); - add("187,57,-60,-74,-12,49,7,37,75,121,34,-43,"); - add("45,4,-36,"); - add(""); - //add("/*158*/"); - add("11,1,-29990,-14,-784,"); - add("-1,-139,84,-1,-155,84,4,-105,-129,1,-108,22,"); - add("-3,-4,154,-4,87,124,0,134,-44,0,128,-68,"); - add("1,125,-75,2,107,-82,"); - add(""); - //add("/*159*/"); - add("11,1,24220,-1670,-17623,"); - add("-21,-142,-16,-68,-99,-83,-84,-67,-106,-86,-7,-115,"); - add("-81,59,-114,-40,112,-64,55,102,63,79,92,96,"); - add("91,14,122,90,-31,124,"); - add(""); - //add("/*160*/"); - add("11,1,140,28342,-9835,"); - add("-148,16,46,-147,-2,-5,-152,14,45,-96,34,103,"); - add("101,41,118,139,17,48,150,-6,-21,122,-29,-85,"); - add("100,-38,-111,8,-41,-120,"); - add(""); - //add("/*161*/"); - add("11,1,9134,18840,21486,"); - add("134,-66,0,126,-91,25,135,-54,-13,113,-67,8,"); - add("137,-82,8,-43,62,-34,-97,100,-42,-91,95,-42,"); - add("-150,40,31,-124,74,-11,"); - add(""); - //add("/*162*/"); - add("11,1,-21516,19701,6996,"); - add("-54,-7,-149,-52,-18,-114,-56,-12,-145,-50,-13,-130,"); - add("-118,-89,-128,6,-28,106,77,37,149,69,26,145,"); - add("65,33,115,82,47,123,"); - add(""); - //add("/*163*/"); - add("12,1,-2471,26742,-13370,"); - add("-106,37,95,62,32,52,133,23,22,113,42,66,"); - add("158,-1,-29,145,13,5,63,-27,-64,-93,-46,-80,"); - add("-176,5,39,-113,-29,-42,-113,-42,-63,"); - add(""); - //add("/*164*/"); - add("12,1,-10150,-24537,13962,"); - add("-10,36,55,-102,82,68,-147,64,4,-127,49,-11,"); - add("-133,22,-63,-142,13,-86,47,-28,-11,123,-35,34,"); - add("144,-49,22,137,-52,12,136,-74,-31,"); - add(""); - //add("/*165*/"); - add("12,1,-15831,-23712,9333,"); - add("11,39,120,12,45,131,33,43,159,29,38,136,"); - add("-72,62,33,-54,0,-87,-65,29,-36,-103,35,-86,"); - add("60,-92,-122,18,-56,-109,34,-70,-119,"); - add(""); - //add("/*166*/"); - add("11,-1,-26860,12885,-3537,"); - add("-22,-68,-78,-64,-142,-24,-55,-120,-9,-54,-128,-42,"); - add("-98,-217,-5,28,66,16,59,138,29,57,135,39,"); - add("57,134,44,56,133,53,"); - add(""); - //add("/*167*/"); - add("10,-1,21555,20350,4610,"); - add("-13,-13,117,-23,-10,147,-11,-25,149,15,-65,193,"); - add("89,-66,-109,59,-32,-128,32,3,-154,-26,61,-143,"); - add("-71,111,-150,"); - add(""); - //add("/*168*/"); - add("12,1,25080,-2304,-16299,"); - add("36,-91,68,1,-152,24,5,-145,32,28,-138,68,"); - add("-28,-123,-22,-47,63,-85,-54,77,-96,14,96,4,"); - add("34,84,39,-33,137,-73,5,129,-10,"); - add(""); - //add("/*169*/"); - add("11,1,-5147,-29506,1706,"); - add("36,-1,84,-95,24,126,-104,26,108,-85,24,125,"); - add("-103,29,129,-55,5,-80,41,-19,-145,56,-20,-140,"); - add("89,-24,-121,131,-27,-73,"); - add(""); - //add("/*170*/"); - add("11,1,3601,24897,16346,"); - add("-94,-65,119,-106,-2,25,-143,-42,91,31,-83,117,"); - add("72,-63,79,161,-49,38,88,35,-69,12,73,-110,"); - add("37,67,-109,-8,83,-124,"); - add(""); - //add("/*171*/"); - add("12,1,-16031,-24558,6319,"); - add("-29,-8,-108,-28,-23,-166,19,-42,-123,130,-68,69,"); - add("-58,46,37,5,16,79,101,-54,43,132,-49,140,"); - add("-115,70,-13,-118,58,-72,14,12,83,"); - add(""); - //add("/*172*/"); - add("11,1,4179,29039,-6267,"); - add("73,-37,-121,-54,-26,-151,-57,-23,-136,-114,-7,-103,"); - add("-154,15,-24,-87,34,96,96,17,131,92,8,92,"); - add("101,10,108,59,10,82,"); - add(""); - //add("/*173*/"); - add("11,1,7225,28615,-5385,"); - add("-150,30,-40,-139,24,-51,-152,36,-3,-23,32,144,"); - add("-4,26,134,100,-10,76,124,-44,-80,137,-42,-45,"); - add("123,-46,-80,49,-24,-60,"); - add(""); - //add("/*174*/"); - add("10,1,27028,-4267,-12299,"); - add("-47,-101,-69,-68,-50,-128,-76,-143,-112,-39,74,-109,"); - add("-42,100,-123,53,124,69,69,41,132,55,-48,134,"); - add("67,29,136,"); - add(""); - //add("/*175*/"); - add("11,-1,17469,24240,2693,"); - add("-28,25,-38,-83,72,-130,-50,50,-130,-52,49,-133,"); - add("-57,55,-170,-37,23,45,59,-55,143,73,-63,123,"); - add("51,-50,127,70,-63,122,"); - add(""); - //add("/*176*/"); - add("11,1,9832,-4353,-28007,"); - add("-12,-95,11,-32,-144,12,-59,-142,3,-104,-107,-18,"); - add("-134,-122,-24,-2,72,-13,44,125,-7,81,123,7,"); - add("60,126,0,75,131,5,"); - add(""); - //add("/*177*/"); - add("11,-1,3662,25807,14853,"); - add("-135,2,28,-21,-77,138,-117,-27,73,-24,-53,95,"); - add("13,-75,123,53,-20,22,115,39,-92,129,32,-84,"); - add("65,57,-113,-8,65,-110,"); - add(""); - //add("/*178*/"); - add("10,1,-6841,-28848,-4579,"); - add("-89,40,-117,11,19,-132,-44,36,-150,0,26,-145,"); - add("120,-16,-75,82,-38,102,0,-25,145,26,-31,146,"); - add("-18,-20,148,"); - add(""); - //add("/*179*/"); - add("10,1,10303,-4850,-27755,"); - add("-3,-110,18,-87,-118,-10,-139,-39,-44,-145,-16,-49,"); - add("-168,-5,-59,51,128,-5,128,85,30,144,11,50,"); - add("127,49,38,"); - add(""); - //add("/*180*/"); - add("11,1,27435,-3603,-11592,"); - add("23,-70,78,-36,-77,-61,-56,-11,-129,-70,-5,-160,"); - add("-45,48,-118,-47,48,-121,14,73,10,61,-2,139,"); - add("60,0,137,60,1,140,"); - add(""); - //add("/*181*/"); - add("11,-1,-19573,-21914,6055,"); - add("-41,72,126,-22,58,133,28,17,146,73,-23,140,"); - add("-46,47,21,-91,40,-142,13,-52,-136,-19,-29,-159,"); - add("7,-23,-56,76,-90,-80,"); - add(""); - //add("/*182*/"); - add("10,1,-16090,-23678,8971,"); - add("67,-15,80,5,55,152,3,53,138,-68,112,164,"); - add("-100,20,-121,-81,-5,-154,100,-81,-30,55,-62,-63,"); - add("-13,-40,-128,"); - add(""); - //add("/*183*/"); - add("10,1,-7427,29059,-664,"); - add("-79,-23,-102,-94,-27,-62,-135,-36,-21,-102,-25,98,"); - add("-81,-19,122,31,12,139,154,41,18,142,38,-17,"); - add("130,32,-78,"); - add(""); - //add("/*184*/"); - add("10,1,22146,-6178,-19271,"); - add("-60,73,-92,-58,116,-102,55,130,23,75,-34,95,"); - add("107,-20,130,99,39,103,19,-78,46,-68,-127,-39,"); - add("-96,-82,-86,"); - add(""); - //add("/*185*/"); - add("11,-1,13300,25127,9578,"); - add("29,41,-150,-7,56,-141,23,35,-126,-131,89,-57,"); - add("-40,16,13,126,-92,70,-14,-37,123,9,-49,120,"); - add("-29,-40,146,39,-43,58,"); - add(""); - //add("/*186*/"); - add("10,-1,11562,21630,17276,"); - add("116,-40,-28,140,-47,-37,107,-42,-21,214,-140,24,"); - add("-64,64,-33,-121,92,-31,-136,91,-20,-132,38,42,"); - add("-104,7,62,"); - add(""); - //add("/*187*/"); - add("10,1,-25792,5633,14249,"); - add("-43,-12,-74,-78,-55,-120,-19,-181,35,-89,-108,-124,"); - add("22,-32,53,73,1,134,79,31,133,37,137,15,"); - add("34,178,-7,"); - add(""); - //add("/*188*/"); - add("10,1,-11381,25287,-11447,"); - add("56,-2,-59,-84,-68,-68,-114,-80,-60,-126,-71,-28,"); - add("-165,-107,-62,31,58,91,86,77,80,112,81,64,"); - add("118,75,46,"); - add(""); - //add("/*189*/"); - add("11,-1,-17257,23572,6821,"); - add("-79,-32,-89,-16,23,-121,-53,-38,-4,-103,-94,61,"); - add("-62,-78,109,-89,-94,93,16,8,12,124,83,35,"); - add("113,76,31,108,92,-44,"); - add(""); - //add("/*190*/"); - add("9,1,21029,-858,-21378,"); - add("-82,-38,-80,-104,-45,-99,-108,-41,-101,-166,25,-159,"); - add("75,53,68,106,28,100,109,16,104,108,13,105,"); - add(""); - //add("/*191*/"); - add("9,-1,16710,18554,16629,"); - add("40,-81,51,77,-100,31,90,-117,38,114,-123,18,"); - add("63,61,-130,-74,118,-54,-114,76,32,-75,122,-59,"); - add(""); - //add("/*192*/"); - add("10,1,-26154,13570,5641,"); - add("12,-36,142,-22,-92,112,-38,-97,53,-91,-175,-11,"); - add("33,46,40,70,120,43,37,119,-105,21,92,-118,"); - add("-14,33,-142,"); - add(""); - //add("/*193*/"); - add("10,1,-10691,-27735,4062,"); - add("89,-25,58,-53,43,153,-92,50,88,-103,49,54,"); - add("-119,59,77,-44,12,-36,69,-48,-127,98,-54,-100,"); - add("91,-52,-105,"); - add(""); - //add("/*194*/"); - add("9,1,5294,28803,-6509,"); - add("141,-38,-53,58,-14,-13,-125,-7,-132,-82,-14,-124,"); - add("-128,1,-92,-86,43,117,12,33,151,77,15,126,"); - add(""); - //add("/*195*/"); - add("10,1,-13366,24028,-12001,"); - add("65,-24,-120,-58,-49,-32,-118,-69,-5,-122,-71,-3,"); - add("-204,-95,43,57,44,22,133,68,-16,108,81,37,"); - add("61,66,65,"); - add(""); - //add("/*196*/"); - add("9,1,-13524,26719,1794,"); - add("-49,-16,-141,-59,-24,-103,-129,-63,-57,-127,-69,46,"); - add("11,-3,148,97,43,109,110,51,85,128,63,31,"); - add(""); - //add("/*197*/"); - add("10,-1,-19280,22118,-6250,"); - add("3,37,124,-25,20,152,-29,10,132,-36,9,154,"); - add("72,66,13,-1,-41,-155,5,-30,-131,31,-11,-139,"); - add("-4,-39,-126,"); - add(""); - //add("/*198*/"); - add("9,1,-5809,29420,-843,"); - add("-132,-27,-12,-164,-32,56,-135,-28,15,-23,-2,88,"); - add("83,20,143,154,33,14,113,21,-95,112,20,-106,"); - add(""); - //add("/*199*/"); - add("10,-1,-2866,4214,29564,"); - add("-77,-108,8,-26,-121,14,-26,-158,18,141,-133,31,"); - add("54,162,-16,-71,-12,-5,-48,38,-10,28,155,-18,"); - add("20,115,-14,"); - add(""); - //add("/*200*/"); - add("9,1,16380,-17659,-17885,"); - add("-77,86,-154,103,64,31,97,45,45,96,-26,114,"); - add("95,-32,121,-11,-89,78,-111,-41,-64,-107,11,-109,"); - add(""); - //add("/*201*/"); - add("8,1,2405,29362,5664,"); - add("-161,-1,74,55,-28,117,40,-40,180,167,-13,-2,"); - add("108,5,-68,27,32,-171,-115,17,-38,"); - add(""); - //add("/*202*/"); - add("10,-1,15812,18669,17362,"); - add("62,-1,-56,121,-24,-85,101,-18,-76,-52,103,-62,"); - add("26,105,-142,-85,18,62,-29,-52,84,-107,-11,112,"); - add("-38,-69,109,"); - add(""); - //add("/*203*/"); - add("9,-1,-22192,18429,-8241,"); - add("-24,-51,-48,-42,-105,-120,-45,-95,-83,3,-94,-206,"); - add("-31,-5,68,-7,65,158,63,115,82,45,106,111,"); - add(""); - //add("/*204*/"); - add("9,1,11904,-3476,-27317,"); - add("-52,-83,-12,-106,-103,-32,-102,-113,-28,-187,-67,-70,"); - add("48,72,10,85,121,20,114,88,37,122,81,42,"); - add(""); - //add("/*205*/"); - add("9,1,29712,544,-4112,"); - add("13,98,108,12,125,117,18,-20,133,2,-58,5,"); - add("-9,-130,-90,-10,-97,-91,-13,-138,-111,-12,92,-79,"); - add(""); - //add("/*206*/"); - add("9,1,9469,-5342,-27961,"); - add("-76,-64,-13,-89,-111,-8,-123,-76,-26,-193,-36,-55,"); - add("20,109,-15,111,75,21,140,40,38,133,73,30,"); - add(""); - //add("/*207*/"); - add("9,1,-4851,24586,-16492,"); - add("112,-15,-56,112,-35,-83,77,-73,-128,-49,-63,-78,"); - add("-117,34,82,-120,28,75,-155,20,75,46,45,53,"); - add(""); - //add("/*208*/"); - add("9,1,24496,6480,-16061,"); - add("42,-192,-12,-66,29,-89,-56,-72,-113,-60,-98,-126,"); - add("-32,66,-23,30,120,90,46,90,104,59,71,119,"); - add(""); - //add("/*209*/"); - add("9,1,-5809,29356,-2119,"); - add("25,-3,-102,10,-9,-147,-56,-22,-131,-154,-34,-30,"); - add("-109,-15,91,2,14,160,131,31,59,80,23,86,"); - add(""); - //add("/*210*/"); - add("9,-1,28373,6866,-6918,"); - add("16,-102,-31,-1,-97,-101,-9,-80,-107,-21,-107,-180,"); - add("-10,66,19,7,96,117,-9,131,86,7,89,112,"); - add(""); - //add("/*211*/"); - add("9,1,6654,-7693,-28223,"); - add("85,43,9,-37,-186,42,-30,-149,34,-106,-88,0,"); - add("-146,59,-50,24,144,-35,100,82,0,88,19,15,"); - add(""); - //add("/*212*/"); - add("9,1,23496,6501,17484,"); - add("57,-56,-56,91,-46,-107,87,15,-125,87,76,-150,"); - add("-52,72,45,-85,13,113,-84,-4,117,-82,-11,114,"); - add(""); - //add("/*213*/"); - add("9,-1,-6643,25925,-13555,"); - add("69,0,-34,128,-11,-84,105,-27,-99,109,-26,-98,"); - add("-71,-55,-69,-126,21,96,-97,28,97,-76,47,126,"); - add(""); - //add("/*214*/"); - add("9,1,-7497,28006,-7711,"); - add("-100,-11,58,-138,-24,49,27,14,24,77,47,98,"); - add("45,58,175,104,24,-16,36,-35,-168,12,-31,-128,"); - add(""); - //add("/*215*/"); - add("9,-1,-20663,19947,-8671,"); - add("-9,-40,-67,-99,-111,-19,-110,-98,41,-117,-97,63,"); - add("8,54,105,53,64,15,102,73,-80,114,93,-60,"); - add(""); - //add("/*216*/"); - add("9,1,4747,25258,15476,"); - add("-15,-47,81,-25,-76,129,-32,-73,126,23,-91,137,"); - add("39,12,-30,3,79,-126,12,80,-131,10,77,-128,"); - add(""); - //add("/*217*/"); - add("8,1,8037,27999,7173,"); - add("126,-37,4,70,13,-132,-8,42,-161,-67,37,-70,"); - add("-146,35,28,-97,4,97,30,-44,140,"); - add(""); - //add("/*218*/"); - add("8,1,-8206,28777,-2132,"); - add("89,20,-69,43,0,-147,-75,-30,-114,-146,-37,57,"); - add("-176,-46,61,49,22,105,122,42,81,"); - add(""); - //add("/*219*/"); - add("8,1,26623,-4311,-13138,"); - add("27,-94,85,6,-161,68,-36,-68,-50,-84,-1,-169,"); - add("-19,104,-74,-3,147,-55,61,86,94,"); - add(""); - //add("/*220*/"); - add("9,-1,-19193,23050,547,"); - add("-3,0,-116,-126,-104,-79,-91,-76,-9,-51,-45,93,"); - add("-32,-30,123,62,50,72,131,111,3,92,79,-39,"); - add(""); - //add("/*221*/"); - add("9,-1,-21968,17844,-9950,"); - add("-52,-145,-144,-65,-32,87,-53,11,139,-99,-72,94,"); - add("6,11,5,105,80,-92,45,-8,-115,86,123,27,"); - add(""); - //add("/*222*/"); - add("8,1,-9395,-28397,2317,"); - add("-3,14,145,-6,15,151,-50,30,144,-103,31,-45,"); - add("14,-17,-132,18,-21,-163,44,-26,-140,"); - add(""); - //add("/*223*/"); - add("8,1,-23532,-559,18600,"); - add("-51,-140,-71,78,10,100,72,112,94,44,111,58,"); - add("-18,153,-19,-74,-18,-94,-47,-129,-61,"); - add(""); - //add("/*224*/"); - add("8,1,29597,-880,-4821,"); - add("11,119,49,14,132,63,15,122,85,18,-57,120,"); - add("-6,-139,-20,-16,-129,-81,-21,-93,-116,"); - add(""); - //add("/*225*/"); - add("8,1,-4242,28374,8769,"); - add("-111,-19,10,-148,-19,-16,-174,-48,66,87,-11,80,"); - add("150,10,44,156,20,13,59,45,-115,"); - add(""); - //add("/*226*/"); - add("8,-1,23521,18132,-4238,"); - add("22,2,127,85,-98,57,62,-96,-62,2,-37,-146,"); - add("-18,-15,-158,-76,95,-24,-53,98,119,"); - add(""); - //add("/*227*/"); - add("9,-1,-12721,26335,-6680,"); - add("101,34,-59,-12,-37,-121,21,-30,-150,97,11,-132,"); - add("-22,-9,4,-87,-9,120,-32,24,149,-30,19,133,"); - add(""); - //add("/*228*/"); - add("8,1,28556,-1354,-9094,"); - add("4,-123,32,-10,-153,-7,-42,-14,-129,-41,-5,-126,"); - add("-13,145,-64,30,120,73,44,44,129,"); - add(""); - //add("/*229*/"); - add("9,-1,-13304,26737,-2855,"); - add("-76,-34,35,-77,-28,107,23,22,102,145,75,25,"); - add("91,53,92,49,18,-63,-12,-18,-126,-95,-61,-143,"); - add(""); - //add("/*230*/"); - add("9,1,-4166,24261,-17148,"); - add("79,-11,-35,76,-52,-91,33,-64,-96,128,-60,-112,"); - add("-52,-17,-11,-135,41,86,-105,58,105,-31,69,105,"); - add(""); - //add("/*231*/"); - add("10,-1,22208,16310,-11865,"); - add("-45,2,-82,-109,78,-95,-87,149,46,91,-49,101,"); - add("52,-108,-53,29,8,64,39,3,77,28,-4,47,"); - add("-22,-51,-112,"); - add(""); - //add("/*232*/"); - add("8,-1,18389,23461,-3379,"); - add("78,-58,17,126,-102,-8,148,-120,-6,-26,11,-72,"); - add("-120,91,-34,-120,92,-23,-123,105,59,"); - add(""); - //add("/*233*/"); - add("9,-1,-12115,27105,4305,"); - add("73,39,-40,98,61,-114,58,51,-174,-77,-33,0,"); - add("-134,-60,2,-95,-52,66,69,14,109,8,-12,101,"); - add(""); - //add("/*234*/"); - add("9,1,22705,-5,-19608,"); - add("49,-19,57,108,-56,126,-44,-88,-51,-88,25,-103,"); - add("-59,-15,-68,-104,-20,-119,-6,99,-7,89,57,101,"); - add(""); - //add("/*235*/"); - add("9,-1,-21304,20829,-3509,"); - add("-61,-67,-28,-89,-92,7,-93,-82,84,-97,-83,115,"); - add("17,17,-6,85,72,-102,93,83,-81,88,91,-4,"); - add(""); - //add("/*236*/"); - add("8,1,21301,-2864,-20930,"); - add("49,-109,66,-5,-141,14,-17,-126,3,-108,-60,-101,"); - add("-16,142,-38,0,130,-20,43,142,24,"); - add(""); - //add("/*237*/"); - add("8,1,-3541,26084,-14390,"); - add("91,-16,-52,143,-42,-108,-84,-54,-78,-183,-37,-22,"); - add("-110,17,58,-27,44,86,84,68,100,"); - add(""); - //add("/*238*/"); - add("9,1,-17503,-23888,4794,"); - add("98,-63,45,73,-33,99,90,-40,118,83,-41,84,"); - add("-47,33,-2,-82,42,-75,-89,41,-118,-87,42,-97,"); - add(""); - //add("/*239*/"); - add("8,1,-20659,21543,3021,"); - add("-20,-9,-74,-10,14,-179,-30,-5,-194,-34,-42,74,"); - add("-22,-39,146,-6,-28,161,69,56,82,"); - add(""); - //add("/*240*/"); - add("8,1,24748,-885,-16934,"); - add("0,-113,6,-74,-41,-105,-86,34,-125,-97,38,-141,"); - add("31,56,41,88,29,123,87,22,125,"); - add(""); - //add("/*241*/"); - add("8,1,22276,-3747,-19742,"); - add("48,-106,75,49,-132,82,14,-106,39,-61,-71,-56,"); - add("-56,105,-85,-48,125,-80,7,156,-22,"); - add(""); - //add("/*242*/"); - add("10,1,-16881,-24201,5419,"); - add("-73,37,-65,-75,32,-95,-64,29,-74,60,-59,-77,"); - add("117,-85,-15,9,15,101,70,-48,1,35,-8,76,"); - add("-39,49,98,"); - add(""); - //add("/*243*/"); - add("8,1,-26588,12735,5561,"); - add("-52,-110,-1,-64,-123,-29,-32,-112,98,26,1,117,"); - add("60,110,43,41,123,-81,39,119,-83,"); - add(""); - //add("/*244*/"); - add("8,-1,15516,21285,-14359,"); - add("23,35,76,93,9,115,97,-78,-10,65,-106,-84,"); - add("1,-79,-116,-126,63,-47,-117,100,21,"); - add(""); - //add("/*245*/"); - add("8,1,7216,28601,-5469,"); - add("-30,-19,-138,2,-31,-152,-102,13,-61,-63,39,115,"); - add("40,19,146,74,4,118,101,-17,42,"); - add(""); - //add("/*246*/"); - add("8,1,3833,29553,3454,"); - add("2,11,-94,-34,18,-128,11,16,-167,-129,16,5,"); - add("28,-19,150,-9,-15,145,51,-17,88,"); - add(""); - //add("/*247*/"); - add("8,1,8843,28172,5303,"); - add("87,-18,-50,96,-15,-85,-82,41,-80,-143,38,39,"); - add("-156,43,31,-1,-21,116,113,-45,51,"); - add(""); - //add("/*248*/"); - add("7,1,21050,-381,-21372,"); - add("-94,-69,-91,-60,-120,-55,-138,-33,-132,42,113,37,"); - add("87,98,82,100,30,97,"); - add(""); - //add("/*249*/"); - add("7,-1,3999,25672,14999,"); - add("-52,-42,85,-37,-69,127,-3,-123,204,68,48,-97,"); - add("34,74,-133,7,66,-113,"); - add(""); - //add("/*250*/"); - add("8,1,-26361,12892,6235,"); - add("1,-67,145,-25,-108,108,-66,-133,-7,7,-5,35,"); - add("64,140,-9,25,106,-109,6,79,-137,"); - add(""); - //add("/*251*/"); - add("7,1,5148,25410,15094,"); - add("-78,-27,72,-48,-71,134,82,-126,180,79,41,-93,"); - add("22,67,-118,-13,83,-135,"); - add(""); - //add("/*252*/"); - add("7,1,24083,-4111,-17411,"); - add("-86,-14,-114,-93,-6,-126,-79,82,-125,26,70,20,"); - add("82,-15,114,86,-24,122,"); - add(""); - //add("/*253*/"); - add("8,1,12234,-12996,-24113,"); - add("-13,134,-78,-26,127,-81,41,134,-49,38,-2,21,"); - add("7,-140,76,11,-113,66,-8,-133,66,"); - add(""); - //add("/*254*/"); - add("7,1,1263,19267,22961,"); - add("-88,-22,23,-158,-114,102,113,-77,58,145,-30,17,"); - add("99,111,-97,-85,84,-65,"); - add(""); - //add("/*255*/"); - add("7,1,24383,5280,-16661,"); - add("76,-40,99,82,-101,90,0,-112,-34,-83,-22,-130,"); - add("-94,69,-117,-28,126,-2,"); - add(""); - //add("/*256*/"); - add("7,1,-3500,28664,8132,"); - add("-101,3,-56,-87,-33,79,32,-31,122,146,-35,183,"); - add("74,35,-91,-25,38,-140,"); - add(""); - //add("/*257*/"); - add("8,-1,10996,25265,11864,"); - add("114,-70,44,116,-82,64,52,-26,5,-116,97,-94,"); - add("-74,86,-116,-38,46,-62,-72,-30,131,"); - add(""); - //add("/*258*/"); - add("7,1,-8489,-28676,2368,"); - add("-45,2,-135,100,-37,-107,135,-40,-4,125,-27,112,"); - add("-82,28,67,-130,43,60,"); - add(""); - //add("/*259*/"); - add("7,1,-8544,-28708,1696,"); - add("-64,29,149,-100,35,82,-99,28,-39,-66,10,-166,"); - add("105,-33,-17,131,-44,-61,"); - add(""); - //add("/*260*/"); - add("7,1,-13684,26583,2464,"); - add("-102,-45,-76,-137,-72,-1,-98,-61,98,57,23,82,"); - add("129,64,34,127,69,-25,"); - add(""); - //add("/*261*/"); - add("7,1,-26462,13710,-3429,"); - add("-39,-77,-11,-70,-135,9,-110,-205,50,42,81,-8,"); - add("70,130,-33,70,134,-11,"); - add(""); - //add("/*262*/"); - add("8,1,25177,-2424,-16132,"); - add("51,-55,88,15,-120,43,7,-149,35,-50,-56,-68,"); - add("-40,47,-72,-13,136,-42,-1,134,-23,"); - add(""); - //add("/*263*/"); - add("7,1,-3593,28752,7771,"); - add("-130,-26,38,52,-25,114,199,4,74,-100,25,-133,"); - add("94,-2,50,-8,17,-66,"); - add(""); - //add("/*264*/"); - add("7,-1,18992,23204,-949,"); - add("50,-38,79,76,-60,101,116,-98,-56,11,-14,-132,"); - add("-109,85,-121,-102,88,82,"); - add(""); - //add("/*265*/"); - add("8,-1,16204,715,25237,"); - add("81,6,-52,141,-44,-91,9,71,-7,57,116,-41,"); - add("-71,-2,46,-126,-45,84,-122,-29,79,"); - add(""); - //add("/*266*/"); - add("7,1,11947,21012,-17769,"); - add("90,-72,-26,194,-154,-48,-100,47,-12,-129,85,11,"); - add("-141,54,-30,6,35,45,"); - add(""); - //add("/*267*/"); - add("8,1,-16323,24985,3054,"); - add("-64,-37,-40,-137,-88,-25,45,14,127,106,64,47,"); - add("-94,-61,-2,45,28,14,119,78,0,"); - add(""); - //add("/*268*/"); - add("8,-1,7459,26926,10924,"); - add("54,-44,73,122,-54,47,141,-87,112,-11,22,-44,"); - add("-44,63,-124,-40,29,-43,-140,56,-39,"); - add(""); - //add("/*269*/"); - add("7,1,4421,25599,-15005,"); - add("-163,57,51,-149,43,31,21,58,107,177,-45,-28,"); - add("85,-78,-109,70,-35,-40,"); - add(""); - //add("/*270*/"); - add("7,1,-3740,24124,-17437,"); - add("101,-6,-30,60,-71,-110,103,-102,-159,-74,7,24,"); - add("-92,67,110,-103,58,101,"); - add(""); - //add("/*271*/"); - add("7,-1,1630,23899,18060,"); - add("-7,-73,97,26,-79,102,152,4,-20,36,74,-101,"); - add("-85,82,-100,-54,59,-73,"); - add(""); - //add("/*272*/"); - add("8,-1,17320,22752,-9075,"); - add("98,-58,42,126,-77,52,92,-86,-38,-16,-14,-65,"); - add("-118,74,-44,-114,64,-61,-33,40,37,"); - add(""); - //add("/*273*/"); - add("7,1,6068,25608,14403,"); - add("-109,-11,63,-81,-45,113,88,-96,131,38,13,-37,"); - add("76,40,-102,88,57,-137,"); - add(""); - //add("/*274*/"); - add("7,-1,17827,6043,23359,"); - add("31,69,-41,30,130,-58,-71,130,20,-122,-25,100,"); - add("-17,-150,53,104,-86,-57,"); - add(""); - //add("/*275*/"); - add("7,1,1364,-29308,-6258,"); - add("-135,6,-59,24,23,-99,160,6,5,116,9,-12,"); - add("-36,-41,177,-50,-18,77,"); - add(""); - //add("/*276*/"); - add("7,-1,-18191,-23193,5583,"); - add("-74,68,39,-13,62,212,-55,22,-91,-92,34,-161,"); - add("66,-58,-18,115,-88,14,"); - add(""); - //add("/*277*/"); - add("7,1,-5480,29422,-2079,"); - add("-34,-15,-115,-39,-20,-165,-65,-8,54,-52,0,129,"); - add("-26,6,157,144,28,11,"); - add(""); - //add("/*278*/"); - add("7,1,-26312,13467,5132,"); - add("-14,-64,92,38,20,140,63,44,193,-5,18,-68,"); - add("-32,5,-167,-49,-50,-118,"); - add(""); - //add("/*279*/"); - add("7,1,22241,13603,14842,"); - add("-48,6,67,-63,-46,135,-55,-108,176,47,-5,-64,"); - add("67,36,-130,39,71,-123,"); - add(""); - //add("/*280*/"); - add("7,-1,-10783,26096,-10136,"); - add("-73,-35,-11,-140,-53,13,-193,-93,-27,52,35,34,"); - add("133,61,9,143,53,-17,"); - add(""); - //add("/*281*/"); - add("7,1,29783,1256,-3378,"); - add("4,68,62,9,88,122,11,87,149,6,-96,12,"); - add("-11,-65,-136,-11,-87,-135,"); - add(""); - //add("/*282*/"); - add("6,1,-17758,24025,2727,"); - add("-29,-6,-136,-87,-59,-52,-36,-45,161,-5,-25,188,"); - add("115,91,-49,"); - add(""); - //add("/*283*/"); - add("7,-1,-23952,18049,730,"); - add("-55,-75,42,-87,-119,38,-109,-148,28,35,46,27,"); - add("86,118,-37,85,116,-45,"); - add(""); - //add("/*284*/"); - add("7,-1,-1959,8253,28776,"); - add("-85,-33,3,-109,-82,16,-4,-124,34,54,-81,27,"); - add("-38,210,-62,109,71,-12,"); - add(""); - //add("/*285*/"); - add("7,1,24446,-969,-17363,"); - add("-58,-41,-79,-90,6,-125,-105,28,-146,25,31,33,"); - add("90,3,124,90,-3,125,"); - add(""); - //add("/*286*/"); - add("8,1,2887,27868,10725,"); - add("80,24,-85,93,20,-77,7,53,-145,-59,-21,75,"); - add("-54,25,-53,-39,-26,81,-25,-45,125,"); - add(""); - //add("/*287*/"); - add("7,1,21419,-3233,-20756,"); - add("-24,-119,-5,12,-123,32,-51,-112,-33,-75,85,-91,"); - add("2,117,-17,84,108,68,"); - add(""); - //add("/*288*/"); - add("8,1,20078,-7369,-21038,"); - add("-57,-7,-51,-117,-24,-103,-4,61,-24,22,130,-24,"); - add("47,74,19,75,-19,78,19,-139,65,"); - add(""); - //add("/*289*/"); - add("7,1,10608,21446,-18098,"); - add("-155,71,-6,-130,74,14,-41,49,34,179,-75,14,"); - add("129,-71,-9,65,-54,-26,"); - add(""); - //add("/*290*/"); - add("7,1,16151,-1050,-25260,"); - add("73,-1,47,122,24,78,149,-61,101,-61,-44,-39,"); - add("-138,-12,-89,-119,62,-80,"); - add(""); - //add("/*291*/"); - add("7,1,6256,-8530,-28073,"); - add("-89,-10,-17,-70,70,-36,128,113,-6,110,109,-7,"); - add("42,-69,29,-89,-109,12,"); - add(""); - //add("/*292*/"); - add("7,1,21026,13541,-16569,"); - add("85,-69,51,75,-69,41,109,-154,15,-55,43,-35,"); - add("-94,98,-42,-107,95,-60,"); - add(""); - //add("/*293*/"); - add("8,-1,-18859,-22602,5789,"); - add("106,-54,128,-49,49,33,-140,115,-9,47,-48,-33,"); - add("-95,67,-50,48,-51,-39,45,-53,-57,"); - add(""); - //add("/*294*/"); - add("7,-1,13656,23661,12396,"); - add("32,42,-116,-54,77,-89,-37,92,-139,-18,-4,28,"); - add("39,-82,118,30,-82,124,"); - add(""); - //add("/*295*/"); - add("6,1,8006,23007,-17510,"); - add("-151,56,6,-121,86,60,17,53,78,158,-90,-50,"); - add("129,-58,-17,"); - add(""); - //add("/*296*/"); - add("6,1,3087,24735,16693,"); - add("-183,-19,61,72,-85,112,104,-38,36,118,33,-70,"); - add("-33,81,-113,"); - add(""); - //add("/*297*/"); - add("8,1,-12618,24857,-11088,"); - add("2,-45,-102,-53,-74,-102,-86,-31,27,-39,-19,5,"); - add("-60,-22,19,43,77,120,114,79,46,"); - add(""); - //add("/*298*/"); - add("7,1,-11749,25130,-11421,"); - add("-35,-49,-71,-110,-76,-53,-90,-82,-83,-13,29,76,"); - add("66,77,98,79,60,49,"); - add(""); - //add("/*299*/"); - add("6,1,25018,-660,-16543,"); - add("66,-4,101,79,41,119,27,-147,48,-86,-7,-132,"); - add("-78,19,-120,"); - add(""); - //add("/*300*/"); - add("6,1,-15854,-24577,6681,"); - add("-80,25,-102,-66,-1,-162,84,-61,-26,86,-28,105,"); - add("62,-4,134,"); - add(""); - //add("/*301*/"); - add("7,-1,-17115,24557,-2011,"); - add("-4,-10,-84,-33,-36,-146,-32,-36,-148,-29,-18,28,"); - add("31,35,137,43,41,129,"); - add(""); - //add("/*302*/"); - add("6,1,11398,-4172,-27435,"); - add("70,-114,47,-117,-58,-40,-136,-105,-39,19,127,-12,"); - add("86,103,19,"); - add(""); - //add("/*303*/"); - add("6,1,-7436,14318,25292,"); - add("-138,-58,-8,-83,-61,10,93,-96,81,117,106,-25,"); - add("98,110,-33,"); - add(""); - //add("/*304*/"); - add("6,1,23814,-745,-18231,"); - add("5,-93,11,-74,-60,-93,-123,36,-160,55,113,66,"); - add("88,29,112,"); - add(""); - //add("/*305*/"); - add("6,1,-1698,25570,15597,"); - add("-88,-23,28,-115,-50,69,-31,-88,138,120,34,-41,"); - add("93,65,-95,"); - add(""); - //add("/*306*/"); - add("6,1,-11912,25153,-11200,"); - add("122,17,-91,-65,-58,-60,-143,-93,-55,-30,42,124,"); - add("22,55,98,"); - add(""); - //add("/*307*/"); - add("7,-1,-20089,-9689,20064,"); - add("-66,89,-24,-76,153,-4,-18,-81,-56,69,-127,9,"); - add("0,-83,-41,39,-9,36,"); - add(""); - //add("/*308*/"); - add("6,-1,22251,15516,-12811,"); - add("-4,-87,-113,-86,26,-115,-20,54,30,-35,135,102,"); - add("72,-15,105,"); - add(""); - //add("/*309*/"); - add("6,1,-6458,14255,25595,"); - add("-96,-106,34,-5,-26,13,156,64,4,89,105,-36,"); - add("-32,97,-62,"); - add(""); - //add("/*310*/"); - add("6,1,24489,-4261,-16797,"); - add("-10,-92,9,-89,-34,-121,-92,55,-144,55,71,59,"); - add("88,1,127,"); - add(""); - //add("/*311*/"); - add("6,1,-3316,28682,8146,"); - add("-99,13,-88,-180,-9,-46,35,-13,63,114,-17,109,"); - add("104,-4,57,"); - add(""); - //add("/*312*/"); - add("6,1,23528,1053,-18582,"); - add("-67,39,-83,-53,129,-59,31,123,48,82,-81,98,"); - add("24,-132,22,"); - add(""); - //add("/*313*/"); - add("6,1,-6353,29317,-386,"); - add("14,2,-107,-3,-4,-150,-118,-26,-18,-33,-4,162,"); - add("41,10,114,"); - add(""); - //add("/*314*/"); - add("6,1,23124,-10704,15834,"); - add("-88,-20,114,-37,-123,-29,45,-75,-117,87,56,-90,"); - add("11,96,50,"); - add(""); - //add("/*315*/"); - add("6,1,-10965,-27064,6879,"); - add("25,16,101,-67,56,109,-142,44,-53,-20,-23,-122,"); - add("130,-66,-46,"); - add(""); - //add("/*316*/"); - add("6,-1,4917,27988,9617,"); - add("96,-21,12,87,14,-86,-36,72,-196,-54,-7,52,"); - add("-60,-39,146,"); - add(""); - //add("/*317*/"); - add("6,1,-11542,-27125,5570,"); - add("69,-16,65,6,36,182,-109,54,35,-56,5,-86,"); - add("48,-47,-128,"); - add(""); - //add("/*318*/"); - add("6,1,22858,-880,-19409,"); - add("54,-24,64,110,-68,135,-61,-87,-69,-99,7,-118,"); - add("-23,91,-31,"); - add(""); - //add("/*319*/"); - add("6,1,-27648,11150,3354,"); - add("-39,-102,17,-24,-74,43,36,42,159,49,126,-16,"); - add("5,55,-140,"); - add(""); - //add("/*320*/"); - add("6,1,4612,1962,29578,"); - add("-94,-31,17,-91,-132,22,33,-105,1,110,57,-20,"); - add("72,140,-20,"); - add(""); - //add("/*321*/"); - add("6,1,-1839,23767,-18214,"); - add("43,-51,-70,184,-58,-92,-78,-8,-5,-124,19,37,"); - add("-76,60,86,"); - add(""); - //add("/*322*/"); - add("6,1,-26596,11995,6985,"); - add("-39,-139,86,-29,-85,33,2,-50,90,31,136,-108,"); - add("38,127,-73,"); - add(""); - //add("/*323*/"); - add("6,1,23795,-164,-18269,"); - add("46,-55,61,-29,-158,-37,-96,-53,-122,18,74,22,"); - add("25,130,30,"); - add(""); - //add("/*324*/"); - add("6,-1,-22867,-15404,11824,"); - add("41,24,111,-8,76,82,-82,57,-84,-53,-42,-157,"); - add("49,-85,-16,"); - add(""); - //add("/*325*/"); - add("6,1,11693,24510,-12748,"); - add("-64,-20,-97,-125,88,56,42,40,114,136,-64,1,"); - add("67,-45,-25,"); - add(""); - //add("/*326*/"); - add("6,1,-11168,-26833,7435,"); - add("18,20,99,82,1,123,-42,34,56,-107,16,-99,"); - add("-14,-37,-154,"); - add(""); - //add("/*327*/"); - add("6,1,-13936,24051,-11284,"); - add("-74,-76,-70,-60,-62,-58,-96,-32,54,16,53,90,"); - add("118,80,24,"); - add(""); - //add("/*328*/"); - add("6,1,29225,434,-6762,"); - add("18,61,82,30,61,138,16,-62,70,-16,-81,-79,"); - add("-37,-17,-167,"); - add(""); - //add("/*329*/"); - add("5,1,-3608,-29413,4678,"); - add("-92,6,-37,-199,3,-144,96,-6,43,125,-3,78,"); - add(""); - //add("/*330*/"); - add("5,1,27658,11617,-322,"); - add("34,-81,36,84,-207,-52,-36,85,-79,-53,132,33,"); - add(""); - //add("/*331*/"); - add("5,1,-2705,-28959,7352,"); - add("-24,22,78,-115,57,175,-66,-24,-114,139,-38,-97,"); - add(""); - //add("/*332*/"); - add("5,-1,-15874,23873,-8837,"); - add("-68,-40,15,-221,-126,61,94,56,-19,128,75,-31,"); - add(""); - //add("/*333*/"); - add("5,1,-22981,137,19284,"); - add("-96,-29,-116,4,-81,5,107,-35,129,62,114,74,"); - add(""); - //add("/*334*/"); - add("6,1,-7340,25545,-13913,"); - add("87,9,-28,74,-38,-109,-2,-50,-89,-113,4,66,"); - add("-83,37,110,"); - add(""); - //add("/*335*/"); - add("5,1,1932,28169,-10137,"); - add("142,19,82,88,-34,-77,-105,-34,-118,-115,11,8,"); - add(""); - //add("/*336*/"); - add("5,1,-2239,29202,6500,"); - add("-27,-20,78,-46,-58,238,41,25,-94,42,36,-144,"); - add(""); - //add("/*337*/"); - add("5,-1,-24505,2604,17110,"); - add("-50,-99,-58,-20,-122,-12,90,19,128,35,129,31,"); - add(""); - //add("/*338*/"); - add("6,1,-20336,-21189,6121,"); - add("-11,37,90,-61,85,91,-79,63,-47,19,-48,-101,"); - add("71,-85,-53,"); - add(""); - //add("/*339*/"); - add("4,1,4254,3683,-29468,"); - add("320,25,52,-163,-16,-27,-105,-40,-21,"); - add(""); - //add("/*340*/"); - add("5,1,4284,29586,2515,"); - add("59,0,-105,-86,24,-147,-98,6,99,20,-12,112,"); - add(""); - //add("/*341*/"); - add("5,1,-26886,10733,7871,"); - add("29,-12,114,85,100,149,-24,16,-99,-51,-28,-135,"); - add(""); - //add("/*342*/"); - add("5,1,-13498,24234,-11425,"); - add("-105,-65,-12,-169,-85,22,68,62,51,135,68,-19,"); - add(""); - //add("/*343*/"); - add("6,-1,22043,16210,-12301,"); - add("-56,32,-58,-70,134,52,64,2,117,-33,-4,-66,"); - add("48,-85,-26,"); - add(""); - //add("/*344*/"); - add("5,1,22450,-6144,-18928,"); - add("-111,30,-140,55,152,16,59,16,65,15,-137,61,"); - add(""); - //add("/*345*/"); - add("5,1,20013,16577,-14989,"); - add("52,-6,63,140,-83,97,-48,-44,-114,-124,73,-85,"); - add(""); - //add("/*346*/"); - add("5,1,8227,28696,2972,"); - add("-15,23,-188,-99,29,-5,-66,8,107,111,-40,86,"); - add(""); - //add("/*347*/"); - add("5,1,-6380,29120,-3367,"); - add("-28,-18,-102,-113,-43,-141,-18,11,124,101,37,117,"); - add(""); - //add("/*348*/"); - add("5,1,23793,-10289,15101,"); - add("-94,-116,68,-13,-97,-48,94,56,-108,39,97,6,"); - add(""); - //add("/*349*/"); - add("5,1,18853,-3180,23118,"); - add("48,-117,-55,67,16,-53,-36,157,51,-37,80,41,"); - add(""); - //add("/*350*/"); - add("5,1,-2898,29718,2905,"); - add("106,19,-87,-6,15,-174,-95,-14,55,-20,-16,149,"); - add(""); - //add("/*351*/"); - add("5,1,4133,24673,-16558,"); - add("22,-39,-52,-49,-76,-124,-81,-28,-61,43,111,173,"); - add(""); - //add("/*352*/"); - add("5,1,-17359,23518,6748,"); - add("-106,-60,-61,-67,-75,87,88,36,99,82,64,-9,"); - add(""); - //add("/*353*/"); - add("5,1,24745,-5658,-15990,"); - add("-70,25,-116,-48,118,-113,42,17,57,54,-81,111,"); - add(""); - //add("/*354*/"); - add("5,1,-6134,29314,-1752,"); - add("-118,-26,-10,-166,-33,39,76,20,58,144,29,-27,"); - add(""); - //add("/*355*/"); - add("5,-1,-18455,-22892,5946,"); - add("-81,50,-58,-89,38,-136,53,-53,-39,76,-27,138,"); - add(""); - //add("/*356*/"); - add("5,1,7506,28869,-3200,"); - add("-114,35,46,63,-2,141,110,-29,-5,21,-19,-124,"); - add(""); - //add("/*357*/"); - add("5,1,-19149,-22531,5067,"); - add("-69,67,39,-156,123,-52,66,-66,-41,108,-86,30,"); - add(""); - //add("/*358*/"); - add("4,1,-11154,10714,-25706,"); - add("-86,-136,-19,-138,16,67,39,94,22,"); - add(""); - //add("/*359*/"); - add("5,1,-11977,-26541,7220,"); - add("35,14,107,21,37,167,-80,16,-72,-11,-35,-141,"); - add(""); - //add("/*360*/"); - add("5,-1,12975,18669,19573,"); - add("11,61,-65,-125,125,-37,-62,-53,91,109,-97,21,"); - add(""); - //add("/*361*/"); - add("5,1,-10778,27815,3183,"); - add("3,14,-112,-37,-4,-95,-103,-47,69,52,2,161,"); - add(""); - //add("/*362*/"); - add("5,1,5802,24352,16532,"); - add("54,21,-49,116,84,-168,-73,-13,47,-91,-61,122,"); - add(""); - //add("/*363*/"); - add("5,1,10271,19027,20796,"); - add("-105,-43,91,86,-57,9,138,-37,-34,-25,72,-53,"); - add(""); - //add("/*364*/"); - add("5,1,-3812,-7158,-28883,"); - add("-111,23,9,13,124,-32,177,-2,-23,-12,-93,24,"); - add(""); - //add("/*365*/"); - add("5,-1,-26344,13706,4261,"); - add("-48,-69,-76,-47,-96,15,4,-31,122,74,139,13,"); - add(""); - //add("/*366*/"); - add("4,1,4332,-21849,-20096,"); - add("26,-143,162,-151,20,-55,29,71,-71,"); - add(""); - //add("/*367*/"); - add("5,1,11385,17811,21287,"); - add("-72,-41,73,-16,-121,108,94,11,-58,28,107,-104,"); - add(""); - //add("/*368*/"); - add("5,1,-25127,12810,-10224,"); - add("-25,-70,-26,-55,-132,-27,-31,-66,-6,84,203,43,"); - add(""); - //add("/*369*/"); - add("5,1,12061,-19379,-19468,"); - add("5,59,-55,129,111,-29,57,-24,58,-99,-108,46,"); - add(""); - //add("/*370*/"); - add("5,1,14601,-4888,-25747,"); - add("-33,-105,1,-141,-47,-70,-24,67,-26,108,73,46,"); - add(""); - //add("/*371*/"); - add("5,1,3182,28027,10215,"); - add("85,25,-94,-63,50,-119,-84,-20,80,0,-45,125,"); - add(""); - //add("/*372*/"); - add("5,1,24760,-13205,-10611,"); - add("48,83,9,95,156,31,-11,-49,34,-80,-123,-34,"); - add(""); - //add("/*373*/"); - add("5,1,22676,-468,-19636,"); - add("56,-46,66,-18,-132,-18,-76,-21,-86,-5,159,-11,"); - add(""); - //add("/*374*/"); - add("5,1,-8077,26065,-12464,"); - add("24,-25,-69,23,-83,-185,-55,7,48,-13,63,140,"); - add(""); - //add("/*375*/"); - add("5,1,-16783,-24152,5918,"); - add("73,-71,-85,118,-89,-31,-30,39,75,-98,81,53,"); - add(""); - //add("/*376*/"); - add("5,1,3471,29597,3461,"); - add("97,-6,-45,40,14,-168,-80,10,-3,-41,-11,138,"); - add(""); - //add("/*377*/"); - add("5,1,-23913,14805,-10440,"); - add("-45,-76,-3,-118,-129,90,31,66,22,92,106,-63,"); - add(""); - //add("/*378*/"); - add("5,1,-13537,24149,-11558,"); - add("-78,-47,-6,-155,-73,31,19,38,57,133,62,-27,"); - add(""); - //add("/*379*/"); - add("5,1,25723,-3019,-15140,"); - add("2,-81,20,-24,-199,1,-13,55,-33,15,150,-7,"); - add(""); - //add("/*380*/"); - add("5,1,18791,-8648,-21728,"); - add("-47,28,-51,-101,94,-124,74,33,50,73,-79,94,"); - add(""); - //add("/*381*/"); - add("5,1,-8993,-28620,-183,"); - add("89,-27,-50,148,-46,22,-1,0,52,-139,43,28,"); - add(""); - //add("/*382*/"); - add("5,1,-8768,-28641,-1673,"); - add("23,-13,95,-32,2,151,-70,24,-46,16,3,-153,"); - add(""); - //add("/*383*/"); - add("5,-1,16062,838,25324,"); - add("49,20,-32,167,83,-110,-83,-10,54,-116,-55,76,"); - add(""); - //add("/*384*/"); - add("5,1,-26157,14015,4405,"); - add("-30,-67,29,-77,-171,83,22,47,-18,57,127,-58,"); - add(""); - //add("/*385*/"); - add("5,1,21813,15801,-13211,"); - add("-2,-58,-71,-52,-66,-164,-11,47,39,26,72,126,"); - add(""); - //add("/*386*/"); - add("5,-1,-19641,22184,4702,"); - add("-76,-56,-55,-110,-117,85,52,40,29,78,83,-59,"); - add(""); - //add("/*387*/"); - add("5,1,15005,-1299,-25945,"); - add("-59,-53,-32,-124,-41,-69,-8,102,-9,133,23,75,"); - add(""); - //add("/*388*/"); - add("5,1,-10453,11094,-25839,"); - add("67,-43,-46,-1,-102,-42,-151,-27,49,32,108,33,"); - add(""); - //add("/*389*/"); - add("5,1,-26735,12315,5795,"); - add("-46,-82,-39,-37,-127,97,35,47,62,40,120,-67,"); - add(""); - //add("/*390*/"); - add("5,-1,-16802,23231,-8833,"); - add("-19,-44,-78,-139,-124,-58,33,33,22,101,96,58,"); - add(""); - //add("/*391*/"); - add("5,1,14422,-5109,-25805,"); - add("-79,-114,-21,-125,-36,-62,57,63,19,112,85,45,"); - add(""); - //add("/*392*/"); - add("5,1,10064,-5982,-27621,"); - add("-68,-60,-12,-159,-76,-40,16,47,-5,131,70,32,"); - add(""); - //add("/*393*/"); - add("5,1,24783,-4317,-16345,"); - add("6,-74,28,-42,-75,-43,-68,125,-136,56,14,81,"); - add(""); - //add("/*394*/"); - add("5,1,-13180,26791,2922,"); - add("52,32,-58,2,16,-147,-90,-46,20,-26,-27,133,"); - add(""); - //add("/*395*/"); - add("4,1,-1749,25344,15957,"); - add("-94,-46,62,119,-78,137,-3,58,-93,"); - add(""); - //add("/*396*/"); - add("5,1,-26328,14008,-3259,"); - add("-27,-66,-62,-66,-147,-86,14,34,27,52,118,77,"); - add(""); - //add("/*397*/"); - add("4,1,24089,7261,-16340,"); - add("48,-182,-10,-71,8,-101,-20,136,32,"); - add(""); - //add("/*398*/"); - add("4,1,-7194,13999,25540,"); - add("129,4,33,19,128,-65,-131,-13,-29,"); - add(""); - //add("/*399*/"); - add("5,-1,-24613,17122,1025,"); - add("-3,-11,108,-31,-55,138,11,15,3,31,54,-135,"); - add(""); - //add("/*400*/"); - add("5,1,20152,-5943,21414,"); - add("-22,-105,-8,22,-119,-55,45,37,-32,-6,160,52,"); - add(""); - //add("/*401*/"); - add("5,1,-1915,23677,-18322,"); - add("-91,-20,-17,-173,3,23,42,15,15,142,5,-9,"); - add(""); - //add("/*402*/"); - add("5,1,-23760,17289,6048,"); - add("47,40,67,89,121,3,20,27,-4,-112,-147,-13,"); - add(""); - //add("/*403*/"); - add("5,1,-14558,23775,-11081,"); - add("15,-31,-86,-12,-74,-142,-40,-5,41,4,69,142,"); - add(""); - //add("/*404*/"); - add("5,1,-12479,24643,-11704,"); - add("-55,-50,-48,-152,-89,-22,17,26,36,120,74,27,"); - add(""); - //add("/*405*/"); - add("4,1,5264,29534,-120,"); - add("82,-15,-121,-123,21,-60,-42,9,160,"); - add(""); - //add("/*406*/"); - add("5,1,13262,-5908,-26253,"); - add("-65,-72,-16,-137,-56,-56,7,54,-9,131,60,52,"); - add(""); - //add("/*407*/"); - add("4,1,-20288,22087,756,"); - add("19,19,-81,-118,-104,-125,29,23,110,"); - add(""); - //add("/*408*/"); - add("5,1,19086,-2847,22970,"); - add("38,55,-25,26,149,-4,-46,33,42,-22,-149,1,"); - add(""); - //add("/*409*/"); - add("4,1,-2873,28899,7523,"); - add("-133,-13,0,14,-30,117,144,12,10,"); - add(""); - //add("/*410*/"); - add("5,1,15596,18597,-17633,"); - add("67,-43,14,89,-115,-41,-45,-18,-58,-66,96,41,"); - add(""); - //add("/*411*/"); - add("5,-1,-28925,7951,348,"); - add("9,27,78,35,121,116,-1,-1,-35,-24,-79,-152,"); - add(""); - //add("/*412*/"); - add("5,-1,9541,23385,16190,"); - add("-2,-50,73,79,-109,108,19,19,-38,-53,97,-107,"); - add(""); - //add("/*413*/"); - add("5,1,29210,473,-6823,"); - add("15,77,72,31,35,138,-2,-56,-13,-30,-68,-138,"); - add(""); - //add("/*414*/"); - add("5,1,-25829,15180,1561,"); - add("-4,2,-86,-23,-24,-175,1,0,31,20,19,148,"); - add(""); - //add("/*415*/"); - add("5,1,-20000,22355,530,"); - add("-25,-22,-75,-69,-59,-143,-15,-14,47,64,55,123,"); - add(""); - //add("/*416*/"); - add("4,1,-444,-28368,9750,"); - add("52,35,103,-161,22,54,22,-47,-132,"); - add(""); - //add("/*417*/"); - add("4,1,2286,29384,5600,"); - add("-108,22,-73,-64,-19,124,98,-19,59,"); - add(""); - //add("/*418*/"); - add("4,1,-9750,11346,-26004,"); - add("114,-63,-70,-93,-91,-4,-88,65,60,"); - add(""); - //add("/*419*/"); - add("4,1,29357,1075,-6086,"); - add("26,-12,125,3,-133,-7,-25,20,-118,"); - add(""); - //add("/*420*/"); - add("5,1,-4180,-7285,-28800,"); - add("-96,6,12,12,67,-18,173,35,-34,-21,-79,23,"); - add(""); - //add("/*421*/"); - add("4,1,21812,-2819,-20403,"); - add("43,-216,77,-30,61,-41,-39,132,-60,"); - add(""); - //add("/*422*/"); - add("4,1,-6475,29293,-129,"); - add("-137,-31,54,34,8,102,130,29,-57,"); - add(""); - //add("/*423*/"); - add("4,1,-9851,-28219,2574,"); - add("-20,18,125,-123,38,-61,54,-29,-113,"); - add(""); - //add("/*424*/"); - add("4,1,6163,-10670,-27353,"); - add("84,30,8,-8,-122,46,-130,-35,-16,"); - add(""); - //add("/*425*/"); - add("5,1,24033,10600,14493,"); - add("-1,-61,47,-4,-116,90,29,-16,-37,-1,119,-84,"); - add(""); - //add("/*426*/"); - add("4,1,-10404,28061,2080,"); - add("-168,-58,-65,15,0,83,149,52,44,"); - add(""); - //add("/*427*/"); - add("4,-1,-6287,25435,-14613,"); - add("-175,-65,-37,-33,20,50,109,54,46,"); - add(""); - //add("/*428*/"); - add("4,1,3313,24533,16946,"); - add("72,-54,64,137,8,-41,-83,49,-52,"); - add(""); - //add("/*429*/"); - add("5,1,-17749,22168,9672,"); - add("-55,-22,-51,-134,-84,-55,35,14,33,110,69,45,"); - add(""); - //add("/*430*/"); - add("4,1,-24211,14614,-10014,"); - add("-45,-101,-37,-61,-44,84,77,151,33,"); - add(""); - //add("/*431*/"); - add("5,1,6168,20534,20984,"); - add("78,-19,-5,155,-9,-37,-14,11,-7,-148,19,25,"); - add(""); - //add("/*432*/"); - add("4,1,25249,3517,-15816,"); - add("54,-55,75,-32,-104,-73,-61,98,-77,"); - add(""); - //add("/*433*/"); - add("5,1,24510,6812,-15901,"); - add("-3,-70,-35,-47,-99,-113,-7,16,-4,32,110,94,"); - add(""); - //add("/*434*/"); - add("4,1,8900,28579,2013,"); - add("-28,18,-145,-98,29,17,48,-23,129,"); - add(""); - //add("/*435*/"); - add("4,1,-19110,-22514,5287,"); - add("-134,112,-16,34,-47,-73,77,-68,-7,"); - add(""); - //add("/*436*/"); - add("4,1,-26431,12476,6763,"); - add("-53,-173,112,21,25,32,28,120,-106,"); - add(""); - //add("/*437*/"); - add("4,1,-6923,29146,-1603,"); - add("-11,-10,-135,-86,-21,-1,12,12,153,"); - add(""); - //add("/*438*/"); - add("4,1,-7322,29032,-1885,"); - add("-93,-29,-71,-84,-16,84,116,34,54,"); - add(""); - //add("/*439*/"); - add("4,1,3874,29626,2697,"); - add("158,-14,-71,-62,11,-39,-140,12,75,"); - add(""); - //add("/*440*/"); - add("5,-1,-20399,-10562,19296,"); - add("-47,54,-21,-103,82,-64,4,-32,-13,72,-61,43,"); - add(""); - //add("/*441*/"); - add("4,1,-12040,-26645,6714,"); - add("91,-7,132,-57,34,35,-79,-3,-151,"); - add(""); - //add("/*442*/"); - add("4,1,-8141,28851,-1154,"); - add("-44,-19,-149,-67,-18,19,46,19,149,"); - add(""); - //add("/*443*/"); - add("4,1,-26611,11542,7659,"); - add("-88,-157,-73,26,23,58,70,125,54,"); - add(""); - //add("/*444*/"); - add("4,1,-25420,7629,13987,"); - add("24,-119,108,39,84,24,-21,80,-81,"); - add(""); - //add("/*445*/"); - add("4,1,-361,26098,14791,"); - add("-10,-64,111,54,-28,50,26,82,-142,"); - add(""); - //add("/*446*/"); - add("4,1,-10298,18382,21356,"); - add("130,-27,85,49,46,-16,-147,13,-81,"); - add(""); - //add("/*447*/"); - add("4,1,-6714,29188,-1727,"); - add("-94,-24,-29,-73,-10,108,114,26,-7,"); - add(""); - //add("/*448*/"); - add("4,1,-14486,-9145,-24628,"); - add("-107,-23,72,0,72,-27,104,40,-76,"); - add(""); - //add("/*449*/"); - add("3,1,-12116,27417,1220,"); - add("-145,-70,134,73,33,-17,"); - add(""); - //add("/*450*/"); - add("4,1,12149,-27337,-2254,"); - add("-8,3,-82,91,46,-59,-14,-19,153,"); - add(""); - //add("/*451*/"); - add("3,1,4304,29609,2188,"); - add("-48,20,-185,-38,-3,124,"); - add(""); - //add("/*452*/"); - add("4,1,-12276,24972,-11211,"); - add("-4,-43,-90,-130,-57,15,74,60,50,"); - add(""); - //add("/*453*/"); - add("4,1,3993,24360,17048,"); - add("106,2,-27,-55,80,-102,-56,-28,53,"); - add(""); - //add("/*454*/"); - add("4,1,4361,29555,2736,"); - add("-38,14,-91,-116,16,2,75,-20,101,"); - add(""); - //add("/*455*/"); - add("4,1,-18479,-23127,4866,"); - add("-52,67,118,-61,35,-66,59,-62,-71,"); - add(""); - //add("/*456*/"); - add("4,-1,2259,21690,20602,"); - add("163,40,-61,-51,30,-26,-119,-48,64,"); - add(""); - //add("/*457*/"); - add("4,1,20331,14288,-16807,"); - add("113,-62,84,2,-51,-41,-116,87,-67,"); - add(""); - //add("/*458*/"); - add("4,1,-16786,-24244,5517,"); - add("-13,-14,-98,115,-77,10,-36,41,70,"); - add(""); - //add("/*459*/"); - add("4,1,-1657,25010,16486,"); - add("-107,31,-59,-27,-59,86,106,-9,25,"); - add(""); - //add("/*460*/"); - add("4,1,-1331,-20857,-21523,"); - add("-32,87,-81,12,31,-31,94,-42,35,"); - add(""); - //add("/*461*/"); - add("3,1,-26552,5728,12735,"); - add("86,-10,182,-41,30,-98,"); - add(""); - //add("/*462*/"); - add("3,1,-11118,27856,637,"); - add("-170,-68,5,82,32,63,"); - add(""); - //add("/*463*/"); - add("4,1,2831,-28218,9783,"); - add("42,27,67,-99,15,70,-19,-40,-108,"); - add(""); - //add("/*464*/"); - add("3,1,23950,2362,-17911,"); - add("20,-179,4,-44,82,-49,"); - add(""); - //add("/*465*/"); - add("3,1,29304,688,-6390,"); - add("3,-151,3,-18,18,-82,"); - add(""); - //add("/*466*/"); - add("3,1,-9197,-28136,4878,"); - add("-159,68,85,75,-37,-64,"); - add(""); - //add("/*467*/"); - add("4,1,-10259,28140,1705,"); - add("-56,-25,63,62,17,101,34,17,-76,"); - add(""); - //add("/*468*/"); - add("3,1,29280,766,-6487,"); - add("34,42,158,-23,-96,-116,"); - add(""); - //add("/*469*/"); - add("4,1,6865,26520,12229,"); - add("-38,-15,54,43,-56,96,50,31,-93,"); - add(""); - //add("/*470*/"); - add("3,1,13499,-19327,-18554,"); - add("45,135,-107,13,-80,93,"); - add(""); - //add("/*471*/"); - add("3,-1,16732,5918,24187,"); - add("-123,131,53,50,-84,-14,"); - add(""); - //add("/*472*/"); - add("3,1,13670,-4696,-26288,"); - add("-146,-71,-63,60,85,15,"); - add(""); - //add("/*473*/"); - add("3,1,2313,23926,-17950,"); - add("-161,-16,-41,80,47,72,"); - add(""); - //add("/*474*/"); - add("3,1,3781,28274,9290,"); - add("93,34,-146,-91,-6,58,"); - add(""); - //add("/*475*/"); - add("3,1,25584,3122,-15352,"); - add("-85,-26,-147,17,59,39,"); - add(""); - //add("/*476*/"); - add("3,1,29702,3744,-1936,"); - add("17,-153,-35,-15,89,-55,"); - add(""); - //add("/*477*/"); - add("3,1,24789,6574,-15566,"); - add("65,-169,34,-52,102,-40,"); - add(""); - //add("/*478*/"); - add("3,-1,-29247,6430,1802,"); - add("-11,-85,122,17,72,23,"); - add(""); - //add("/*479*/"); - add("3,1,-6095,14636,25468,"); - add("-135,-95,22,97,7,20,"); - add(""); - //add("/*480*/"); - add("3,1,-10821,10826,-25801,"); - add("-167,-23,61,65,41,-11,"); - add(""); - //add("/*481*/"); - add("3,1,29023,590,-7570,"); - add("34,-5,129,-19,-95,-79,"); - add(""); - //add("/*482*/"); - add("3,1,23976,5439,-17192,"); - add("39,-177,-1,-33,87,-18,"); - add(""); - //add("/*483*/"); - add("4,1,5247,29038,-5412,"); - add("-99,36,100,26,0,28,97,-32,-81,"); - add(""); - //add("/*484*/"); - add("4,1,-18202,-23335,4919,"); - add("15,5,73,-62,62,68,2,-22,-100,"); - add(""); - //add("/*485*/"); - add("3,1,5756,-9056,-28015,"); - add("57,-84,39,-130,-10,-23,"); - add(""); - //add("/*486*/"); - add("3,1,-11472,-27071,5962,"); - add("-89,67,132,14,-25,-86,"); - add(""); - //add("/*487*/"); - add("3,1,-12893,26395,6088,"); - add("-47,3,-113,-50,-50,112,"); - add(""); - //add("/*488*/"); - add("3,1,5886,-8242,-28239,"); - add("26,166,-42,24,-67,24,"); - add(""); - //add("/*489*/"); - add("4,1,8245,18657,21999,"); - add("-25,-59,59,73,-66,28,2,70,-60,"); - add(""); - //add("/*490*/"); - add("3,1,5232,21275,20494,"); - add("58,-123,112,-13,69,-68,"); - add(""); - //add("/*491*/"); - add("4,1,-16253,-24546,5776,"); - add("-9,-21,-120,76,-43,33,-12,23,62,"); - add(""); - //add("/*492*/"); - add("3,-1,9502,25942,11694,"); - add("165,-65,8,-75,35,-15,"); - add(""); - //add("/*493*/"); - add("3,1,-12159,27406,1045,"); - add("-141,-66,59,88,39,12,"); - add(""); - //add("/*494*/"); - add("3,1,5425,21100,20624,"); - add("135,-94,60,-70,58,-40,"); - add(""); - //add("/*495*/"); - add("3,-1,3389,22127,19973,"); - add("-144,69,-53,28,-42,42,"); - add(""); - //add("/*496*/"); - add("3,1,-29998,-271,-211,"); - add("1,-103,-27,-1,44,124,"); - add(""); - //add("/*497*/"); - add("3,1,-6646,3953,28986,"); - add("154,-35,40,-66,64,-23,"); - add(""); - //add("/*498*/"); - add("3,1,17776,-4397,-23763,"); - add("-125,-94,-76,59,61,33,"); - add(""); - //add("/*499*/"); - add("3,1,15919,-2901,-25262,"); - add("-86,-113,-41,2,103,-10,"); - add(""); - //add("/*500*/"); - add("3,1,10276,18702,21087,"); - add("34,-115,84,49,48,-65,"); - add(""); - //add("/*501*/"); - add("3,1,-27182,9729,8156,"); - add("24,-63,152,0,71,-83,"); - add(""); - //add("/*502*/"); - add("3,1,-5062,29557,-877,"); - add("-151,-26,15,102,19,47,"); - add(""); - //add("/*503*/"); - add("3,1,5323,-9639,-27906,"); - add("94,-7,20,-115,-91,10,"); - add(""); - //add("/*504*/"); - add("3,1,9566,21962,-18060,"); - add("80,-60,-30,-146,87,28,"); - add(""); - //add("/*505*/"); - add("3,1,7782,19198,21700,"); - add("98,-114,65,-23,74,-57,"); - add(""); - //add("/*506*/"); - add("3,1,-25374,8277,13699,"); - add("37,132,-12,-48,-43,-63,"); - add(""); - //add("/*507*/"); - add("3,1,-21077,21320,1096,"); - add("-106,-101,-82,53,50,70,"); - add(""); - //add("/*508*/"); - add("3,1,24281,-1036,-17589,"); - add("-21,-166,-18,-1,96,-8,"); - add(""); - //add("/*509*/"); - add("3,1,-22788,37,19512,"); - add("-85,-52,-100,83,-20,97,"); - add(""); - //add("/*510*/"); - add("3,1,5240,28832,-6422,"); - add("-69,36,103,119,-31,-39,"); - add(""); - //add("/*511*/"); - add("3,1,-7468,-28825,-3652,"); - add("127,-23,-73,-26,-5,83,"); - add(""); - //add("/*512*/"); - add("3,1,24788,6981,-15389,"); - add("-28,-91,-85,-27,111,6,"); - add(""); - //add("/*513*/"); - add("3,1,-23208,-6,19010,"); - add("-80,-82,-98,74,14,91,"); - add(""); - //add("/*514*/"); - add("3,1,-2403,29024,7200,"); - add("6,-38,153,37,26,-90,"); - add(""); - //add("/*515*/"); - add("3,1,-8354,27070,9869,"); - add("31,63,-147,-39,-31,53,"); - add(""); - //add("/*516*/"); - add("3,1,25819,2792,-15019,"); - add("68,-90,100,-56,16,-93,"); - add(""); - //add("/*517*/"); - add("3,1,-13037,26839,3117,"); - add("36,33,-139,-71,-42,72,"); - add(""); - //add("/*518*/"); - add("3,1,19424,15377,-16920,"); - add("93,-132,-12,-64,64,-15,"); - add(""); - //add("/*519*/"); - add("3,1,25368,-2667,-15790,"); - add("-16,-138,-3,-25,82,-54,"); - add(""); - //add("/*520*/"); - add("3,1,-27385,6432,10424,"); - add("17,-117,116,-6,67,-55,"); - add(""); - //add("/*521*/"); - add("3,1,-16689,-24298,5573,"); - add("100,-55,59,-44,42,51,"); - add(""); - //add("/*522*/"); - add("3,1,7818,28361,5876,"); - add("-144,51,-56,68,-29,50,"); - add(""); - //add("/*523*/"); - add("3,1,-1083,23630,-18452,"); - add("50,-78,-102,-92,30,44,"); - add(""); - //add("/*524*/"); - add("3,1,25414,6393,-14604,"); - add("-41,-106,-116,11,70,48,"); - add(""); - //add("/*525*/"); - add("3,1,-11631,906,-27639,"); - add("120,91,-47,-49,-80,18,"); - add(""); - //add("/*526*/"); - add("3,1,3474,212,29797,"); - add("-59,-123,8,98,50,-12,"); - add(""); - //add("/*527*/"); - add("3,1,2829,27930,10580,"); - add("17,48,-134,-69,-20,73,"); - add(""); - //add("/*528*/"); - add("3,1,-18229,-23261,5161,"); - add("-120,85,-43,79,-65,-12,"); - add(""); - //add("/*529*/"); - add("3,1,1852,23822,18140,"); - add("-125,-44,70,101,2,-12,"); - add(""); - //add("/*530*/"); - add("3,1,17469,17022,-17466,"); - add("116,-106,12,-62,33,-30,"); - add(""); - //add("/*531*/"); - add("3,1,-13668,26130,5512,"); - add("-117,-58,-16,61,16,79,"); - add(""); - //add("/*532*/"); - add("3,1,-16825,22385,-10761,"); - add("-69,-60,-18,116,107,41,"); - add(""); - //add("/*533*/"); - add("3,1,-17801,-23670,4779,"); - add("-107,95,71,39,-40,-52,"); - add(""); - //add("/*534*/"); - add("3,-1,-16972,24643,-2166,"); - add("-50,-47,-138,-6,3,78,"); - add(""); - //add("/*535*/"); - add("3,1,-29510,-1408,5213,"); - add("-15,-102,-117,12,23,79,"); - add(""); - //add("/*536*/"); - add("3,1,-8023,14394,25068,"); - add("-68,34,-40,15,-116,71,"); - add(""); - //add("/*537*/"); - add("3,1,18663,8080,22054,"); - add("-75,93,30,-31,-36,39,"); - add(""); - //add("/*538*/"); - add("3,1,20234,-5953,-21335,"); - add("-49,130,-81,31,-57,45,"); - add(""); - //add("/*539*/"); - add("3,1,9465,-4873,-28048,"); - add("-62,-145,5,10,86,-12,"); - add(""); - //add("/*540*/"); - add("3,1,11849,-3988,-27271,"); - add("-79,-106,-18,-3,100,-16,"); - add(""); - //add("/*541*/"); - add("3,1,19173,8661,21387,"); - add("61,-39,-39,-116,87,69,"); - add(""); - //add("/*542*/"); - add("3,1,-25383,8079,13799,"); - add("-8,-129,61,32,94,5,"); - add(""); - //add("/*543*/"); - add("3,1,-947,23612,-18482,"); - add("119,-50,-69,-79,-3,0,"); - add(""); - //add("/*544*/"); - add("3,1,-20303,-21276,5923,"); - add("-76,41,-110,64,-56,18,"); - add(""); - //add("/*545*/"); - add("3,1,-3266,29707,2611,"); - add("37,16,-138,-65,-11,47,"); - add(""); - //add("/*546*/"); - add("3,1,29437,5643,-1268,"); - add("24,-114,44,-6,9,-82,"); - add(""); - //add("/*547*/"); - add("3,1,5941,-8348,-28196,"); - add("33,-77,30,-118,6,-27,"); - add(""); - //add("/*548*/"); - add("3,1,8674,28665,1747,"); - add("63,-15,-64,-102,33,-41,"); - add(""); - //add("/*549*/"); - add("3,1,12119,-27290,-2892,"); - add("132,54,46,-68,-33,16,"); - add(""); - //add("/*550*/"); - add("3,1,16774,7079,-23844,"); - add("82,-124,22,-73,54,-36,"); - add(""); - //add("/*551*/"); - add("3,1,20757,13260,17126,"); - add("63,-128,22,-13,88,-51,"); - add(""); - //add("/*552*/"); - add("3,1,-23106,319,19132,"); - add("-14,-153,-16,23,75,27,"); - add(""); - //add("/*553*/"); - add("3,1,28708,8390,-2334,"); - add("41,-117,87,-18,41,-74,"); - add(""); - //add("/*554*/"); - add("3,-1,-17143,22854,-9157,"); - add("-56,-49,-15,111,102,47,"); - add(""); - //add("/*555*/"); - add("3,1,24593,-4420,-16602,"); - add("-58,81,-108,42,-1,63,"); - add(""); - //add("/*556*/"); - add("3,1,-5670,29343,-2618,"); - add("-124,-24,0,70,19,69,"); - add(""); - //add("/*557*/"); - add("3,1,29384,4265,-4286,"); - add("19,-142,-11,-16,73,-41,"); - add(""); - //add("/*558*/"); - add("3,-1,-26493,13413,-4266,"); - add("73,129,-48,-41,-79,9,"); - add(""); - //add("/*559*/"); - add("3,1,-12215,8751,25965,"); - add("50,90,-6,-110,-43,-38,"); - add(""); - //add("/*560*/"); - add("3,1,942,-9821,-28331,"); - add("-127,40,-18,18,36,-12,"); - add(""); - //add("/*561*/"); - add("3,1,5791,-10962,-27318,"); - add("72,-41,31,-101,-56,1,"); - add(""); - //add("/*562*/"); - add("3,1,-16110,-24557,6118,"); - add("-55,1,-140,52,-15,77,"); - add(""); - //add("/*563*/"); - add("3,1,24603,7780,-15303,"); - add("19,-130,-35,-41,81,-25,"); - add(""); - //add("/*564*/"); - add("3,1,-11587,7787,26554,"); - add("-77,78,-57,3,-100,31,"); - add(""); - //add("/*565*/"); - add("3,-1,-16566,24953,-1701,"); - add("-34,-32,-139,-15,-5,72,"); - add(""); - //add("/*566*/"); - add("3,1,-10538,27951,2769,"); - add("-113,-50,71,82,32,-2,"); - add(""); - //add("/*567*/"); - add("3,1,-26227,14265,-2946,"); - add("-29,-81,-126,8,32,76,"); - add(""); - //add("/*568*/"); - add("3,1,-29996,-410,275,"); - add("1,-64,-4,0,96,102,"); - add(""); - //add("/*569*/"); - add("3,1,-1328,24397,17407,"); - add("-88,-68,88,79,22,-24,"); - add(""); - //add("/*570*/"); - add("3,1,28640,5411,-7103,"); - add("16,-124,-30,-25,81,-41,"); - add(""); - //add("/*571*/"); - add("3,1,2879,27986,10415,"); - add("44,45,-133,-48,-14,52,"); - add(""); - //add("/*572*/"); - add("3,1,-10402,-26170,10341,"); - add("-140,40,-40,64,-24,4,"); - add(""); - //add("/*573*/"); - add("3,1,-10281,28087,2329,"); - add("-106,-42,34,78,24,50,"); - add(""); - //add("/*574*/"); - add("3,1,2742,27846,10820,"); - add("85,35,-111,-70,-7,34,"); - add(""); - //add("/*575*/"); - add("3,1,-3438,-29243,-5748,"); - add("43,20,-125,29,-18,76,"); - add(""); - //add("/*576*/"); - add("3,1,-26723,12841,4584,"); - add("-66,-110,-80,29,43,47,"); - add(""); - //add("/*577*/"); - add("3,1,-1401,24087,17828,"); - add("-1,-60,81,89,26,-28,"); - add(""); - //add("/*578*/"); - add("3,1,5935,-7944,-28314,"); - add("15,145,-37,11,-47,15,"); - add(""); - //add("/*579*/"); - add("3,1,22691,-404,-19620,"); - add("90,-40,105,-74,0,-86,"); - add(""); - //add("/*580*/"); - add("3,1,-615,23609,-18500,"); - add("-27,-62,-78,-73,25,34,"); - add(""); - //add("/*581*/"); - add("3,1,-7610,27327,9765,"); - add("86,9,39,11,34,-85,"); - add(""); - //add("/*582*/"); - add("3,1,3275,28106,9967,"); - add("66,34,-120,-66,-8,46,"); - add(""); - //add("/*583*/"); - add("3,1,-1798,26125,-14637,"); - add("-125,-47,-69,60,25,37,"); - add(""); - //add("/*584*/"); - add("3,1,3404,28154,9786,"); - add("16,34,-104,-83,-3,38,"); - add(""); - //add("/*585*/"); - add("3,1,-19236,-22431,5182,"); - add("-95,81,-4,41,-48,-59,"); - add(""); - //add("/*586*/"); - add("3,1,16386,-1104,25106,"); - add("-73,82,50,-24,-52,14,"); - add(""); - //add("/*587*/"); - add("3,1,19553,-4260,-22350,"); - add("63,-51,65,-69,-44,-52,"); - add(""); - //add("/*588*/"); - add("3,1,-22905,18425,5990,"); - add("96,104,47,-33,-35,-18,"); - add(""); - //add("/*589*/"); - add("3,1,-12241,25010,-11164,"); - add("-117,-70,-28,42,42,46,"); - add(""); - //add("/*590*/"); - add("3,1,-6089,-28902,-5253,"); - add("34,14,-117,43,-22,71,"); - add(""); - //add("/*591*/"); - add("3,1,14736,-4824,-25682,"); - add("-43,-106,-5,-40,63,-34,"); - add(""); - //add("/*592*/"); - add("3,1,19044,17073,-15679,"); - add("94,-108,-3,-64,54,-19,"); - add(""); - //add("/*593*/"); - add("3,1,-16277,25021,3001,"); - add("-102,-58,-78,32,15,59,"); - add(""); - //add("/*594*/"); - add("3,1,3248,24619,16833,"); - add("-38,-76,118,31,32,-52,"); - add(""); - //add("/*595*/"); - add("3,1,-19337,-22287,5420,"); - add("18,15,122,-54,25,-89,"); - add(""); - //add("/*596*/"); - add("3,1,3510,24558,16869,"); - add("47,-68,89,36,36,-59,"); - add(""); - //add("/*597*/"); - add("3,1,-6842,29209,-35,"); - add("-123,-29,15,65,16,45,"); - add(""); - //add("/*598*/"); - add("3,1,-15937,22907,-11013,"); - add("-119,-62,44,55,39,1,"); - add(""); - //add("/*599*/"); - add("3,1,27779,11315,-526,"); - add("-49,121,-23,9,-22,44,"); - add(""); - //add("/*600*/"); - add("3,1,-12034,25103,-11183,"); - add("-63,-58,-60,-41,5,55,"); - add(""); - //add("/*601*/"); - add("3,1,11603,-4113,-27358,"); - add("-14,-103,10,-64,53,-35,"); - add(""); - //add("/*602*/"); - add("3,1,12813,-2626,-26999,"); - add("-4,-132,12,-36,71,-25,"); - add(""); - //add("/*603*/"); - add("3,1,-25308,8431,13728,"); - add("38,-43,95,1,89,-52,"); - add(""); - //add("/*604*/"); - add("3,1,-25475,7114,14157,"); - add("31,120,-5,-42,-62,-45,"); - add(""); - //add("/*605*/"); - add("3,1,13199,-12085,-24077,"); - add("70,108,-16,5,-60,32,"); - add(""); - //add("/*606*/"); - add("3,1,-14219,23894,-11265,"); - add("-85,-85,-73,26,40,52,"); - add(""); - //add("/*607*/"); - add("3,1,4551,-23163,-18514,"); - add("29,-77,104,-49,25,-44,"); - add(""); - //add("/*608*/"); - add("3,1,5199,-9999,-27803,"); - add("75,10,11,-79,-92,18,"); - add(""); - //add("/*609*/"); - add("3,1,-3465,-29255,-5667,"); - add("-50,-13,95,-26,22,-95,"); - add(""); - //add("/*610*/"); - add("3,1,20448,-6320,21022,"); - add("74,-52,-87,-11,63,29,"); - add(""); - //add("/*611*/"); - add("3,1,-11210,-27380,4968,"); - add("-67,47,106,7,-15,-70,"); - add(""); - //add("/*612*/"); - add("3,1,-7114,29104,-1523,"); - add("-31,-14,-125,-26,-3,61,"); - add(""); - //add("/*613*/"); - add("3,1,11126,17559,21631,"); - add("8,-111,86,4,44,-38,"); - add(""); - //add("/*614*/"); - add("3,-1,-17516,22482,-9368,"); - add("-37,-44,-36,77,91,75,"); - add(""); - //add("/*615*/"); - add("3,1,23571,-1939,-18457,"); - add("-68,34,-90,37,41,43,"); - add(""); - //add("/*616*/"); - add("3,1,-6394,-28910,-4832,"); - add("-27,25,-112,68,-24,51,"); - add(""); - //add("/*617*/"); - add("3,1,5794,26057,13692,"); - add("-56,-45,108,58,8,-38,"); - add(""); - //add("/*618*/"); - add("3,1,-23934,17129,5813,"); - add("-32,-36,-30,79,85,78,"); - add(""); - //add("/*619*/"); - add("3,1,-23357,-76,18827,"); - add("-56,-97,-71,41,25,52,"); - add(""); - //add("/*620*/"); - add("3,1,7231,-5628,-28566,"); - add("-117,22,-34,64,34,9,"); - add(""); - //add("/*621*/"); - add("3,-1,8011,-2165,28829,"); - add("-86,-20,23,42,-72,-17,"); - add(""); - //add("/*622*/"); - add("3,1,-17637,-23714,5158,"); - add("-108,70,-51,50,-34,13,"); - add(""); - //add("/*623*/"); - add("3,1,21913,-8820,18494,"); - add("66,118,-23,-34,-46,20,"); - add(""); - //add("/*624*/"); - add("3,1,9869,19293,20746,"); - add("-85,-38,75,55,-24,-4,"); - add(""); - //add("/*625*/"); - add("3,1,22899,-4077,-18947,"); - add("-26,-86,-13,-37,52,-57,"); - add(""); - //add("/*626*/"); - add("3,1,-14038,23901,-11476,"); - add("-107,-72,-17,35,39,38,"); - add(""); - //add("/*627*/"); - add("3,1,4353,24653,16531,"); - add("69,-61,72,12,41,-63,"); - add(""); - //add("/*628*/"); - add("3,1,-18051,-23470,4832,"); - add("-30,48,118,-10,-6,-67,"); - add(""); - //add("/*629*/"); - add("3,1,28220,10019,-1806,"); - add("23,-82,-83,-25,72,3,"); - add(""); - //add("/*630*/"); - add("3,1,-20490,-21140,5764,"); - add("-5,32,100,-44,19,-85,"); - add(""); - //add("/*631*/"); - add("3,1,3983,28240,9309,"); - add("12,35,-113,-52,-6,40,"); - add(""); - //add("/*632*/"); - add("3,1,-18699,-22936,4930,"); - add("-91,67,-33,37,-37,-36,"); - add(""); - //add("/*633*/"); - add("3,1,627,18932,23264,"); - add("-84,-62,52,85,7,-8,"); - add(""); - //add("/*634*/"); - add("3,1,19354,14991,17340,"); - add("50,-98,28,14,46,-55,"); - add(""); - //add("/*635*/"); - add("3,1,-28747,8411,1693,"); - add("22,50,121,-5,-4,-59,"); - add(""); - //add("/*636*/"); - add("3,1,-8901,26791,10151,"); - add("-2,39,-105,-41,-14,0,"); - add(""); - //add("/*637*/"); - add("3,1,-1847,24835,16728,"); - add("-27,-53,75,84,19,-19,"); - add(""); - //add("/*638*/"); - add("3,1,-10396,25971,10836,"); - add("84,12,51,-45,21,-93,"); - add(""); - //add("/*639*/"); - add("3,1,-1746,26561,13836,"); - add("46,-54,110,4,27,-50,"); - add(""); - //add("/*640*/"); - add("3,-1,-16548,24985,-1391,"); - add("30,12,-123,-40,-23,44,"); - add(""); - //add("/*641*/"); - add("3,1,-23092,1143,19117,"); - add("-29,-97,-30,49,20,58,"); - add(""); - //add("/*642*/"); - add("3,-1,-9616,27575,-6867,"); - add("-86,-18,48,81,35,28,"); - add(""); - //add("/*643*/"); - add("3,1,37,-8773,-28689,"); - add("-83,89,-27,70,-24,8,"); - add(""); - //add("/*644*/"); - add("3,1,-5877,24660,-16042,"); - add("29,-63,-107,-41,19,43,"); - add(""); - //add("/*645*/"); - add("3,1,-7063,29124,1383,"); - add("-106,-24,-46,12,1,50,"); - add(""); - //add("/*646*/"); - add("3,1,9491,-28294,3062,"); - add("88,35,49,-28,-5,40,"); - add(""); - //add("/*647*/"); - add("3,1,-10563,28011,-1955,"); - add("-92,-37,-31,2,5,62,"); - add(""); - //add("/*648*/"); - add("3,1,-23006,339,19251,"); - add("-51,-80,-59,52,6,61,"); - add(""); - //add("/*649*/"); - add("3,-1,24368,17193,-3258,"); - add("40,-67,-52,-54,71,-25,"); - add(""); - //add("/*650*/"); - add("3,1,-8017,28176,6466,"); - add("-87,-36,52,72,15,24,"); - add(""); - //add("/*651*/"); - add("3,1,-26550,11424,8038,"); - add("29,-20,121,-1,36,-53,"); - add(""); - //add("/*652*/"); - add("3,1,28996,6412,-4254,"); - add("-29,112,-31,13,-29,48,"); - add(""); - //add("/*653*/"); - add("3,1,-11839,8554,26204,"); - add("61,27,19,-107,18,-54,"); - add(""); - //add("/*654*/"); - add("3,1,-20098,-21617,5362,"); - add("-31,53,101,-18,2,-58,"); - add(""); - //add("/*655*/"); - add("3,1,21155,4033,-20886,"); - add("40,-117,19,-35,34,-29,"); - add(""); - //add("/*656*/"); - add("3,1,5515,20897,20806,"); - add("103,-68,41,-37,35,-25,"); - add(""); - //add("/*657*/"); - add("3,1,-29988,-222,-832,"); - add("-2,50,61,3,22,-100,"); - add(""); - //add("/*658*/"); - add("3,1,5034,26084,13938,"); - add("21,-49,84,54,10,-38,"); - add(""); - //add("/*659*/"); - add("3,1,1691,19298,22907,"); - add("-89,3,4,81,-54,40,"); - add(""); - //add("/*660*/"); - add("3,1,2119,26865,13182,"); - add("-116,-3,25,58,-16,24,"); - add(""); - //add("/*661*/"); - add("3,1,10789,18377,21116,"); - add("-103,-6,58,62,-29,-7,"); - add(""); - //add("/*662*/"); - add("3,1,-11870,-26301,8207,"); - add("27,19,101,-65,14,-51,"); - add(""); - //add("/*663*/"); - add("3,1,-18344,-23246,4807,"); - add("-84,74,38,27,-34,-58,"); - add(""); - //add("/*664*/"); - add("3,1,-11295,25251,-11610,"); - add("-65,-58,-63,-15,21,60,"); - add(""); - //add("/*665*/"); - add("3,1,6300,20443,21033,"); - add("123,-14,-23,-36,19,-8,"); - add(""); - //add("/*666*/"); - add("3,1,29102,725,-7249,"); - add("27,3,111,-11,-45,-52,"); - add(""); - //add("/*667*/"); - add("3,1,-29997,-152,-412,"); - add("-1,22,82,1,52,-85,"); - add(""); - //add("/*668*/"); - add("3,1,-28040,10545,1595,"); - add("-32,-71,-94,4,4,55,"); - add(""); - //add("/*669*/"); - add("3,1,11026,18001,21316,"); - add("-97,-31,76,47,1,-24,"); - add(""); - //add("/*670*/"); - add("3,1,24332,1794,-17457,"); - add("32,101,56,1,-69,-6,"); - add(""); - //add("/*671*/"); - add("3,1,4781,16690,24466,"); - add("-96,20,5,32,-59,34,"); - add(""); - //add("/*672*/"); - add("3,1,21656,-5891,-19908,"); - add("21,116,-11,16,-38,28,"); - add(""); - //add("/*673*/"); - add("3,1,-19012,-22658,5013,"); - add("-83,57,-54,41,-38,-15,"); - add(""); - //add("/*674*/"); - add("3,-1,-25345,15903,2173,"); - add("-67,-106,-3,15,21,14,"); - add(""); - //add("/*675*/"); - add("3,1,22404,-4219,-19500,"); - add("44,-78,68,-52,23,-66,"); - add(""); - //add("/*676*/"); - add("3,1,-10163,28146,2130,"); - add("-89,-29,-52,21,3,69,"); - add(""); - //add("/*677*/"); - add("3,1,-725,25703,15454,"); - add("-107,19,-37,23,-25,44,"); - add(""); - //add("/*678*/"); - add("3,1,25446,6214,-14625,"); - add("2,-95,-36,-28,38,-33,"); - add(""); - //add("/*679*/"); - add("3,1,-18014,-23519,4728,"); - add("-68,67,75,12,-18,-46,"); - add(""); - //add("/*680*/"); - add("3,1,8350,18419,22159,"); - add("86,-67,23,-8,45,-34,"); - add(""); - //add("/*681*/"); - add("3,1,-16265,24998,3250,"); - add("-89,-55,-27,11,2,45,"); - add(""); - //add("/*682*/"); - add("3,1,-29435,3954,4235,"); - add("-7,-102,43,10,58,20,"); - add(""); - //add("/*683*/"); - add("3,1,14345,-4396,-25979,"); - add("-2,-120,20,-17,45,-17,"); - add(""); - //add("/*684*/"); - add("3,1,-20159,-21497,5615,"); - add("-47,63,68,-11,-7,-64,"); - add(""); - //add("/*685*/"); - add("3,1,17291,-23956,5209,"); - add("-23,-40,-109,33,32,41,"); - add(""); - //add("/*686*/"); - add("3,1,6171,20591,20926,"); - add("108,-24,-8,-25,33,-25,"); - add(""); - //add("/*687*/"); - add("3,1,-8736,-28700,-52,"); - add("-34,11,92,-38,11,-52,"); - add(""); - //add("/*688*/"); - add("3,1,-5134,25663,-14664,"); - add("63,-34,-82,-50,-7,5,"); - add(""); - //add("/*689*/"); - add("3,1,23474,-4238,-18194,"); - add("-71,-46,-80,21,43,16,"); - add(""); - //add("/*690*/"); - add("3,1,-12945,26676,4562,"); - add("4,17,-91,-51,-38,80,"); - add(""); - //add("/*691*/"); - add("3,1,11880,-13958,-23749,"); - add("-2,99,-60,27,-28,31,"); - add(""); - //add("/*692*/"); - add("3,1,9893,18457,21482,"); - add("67,-72,30,17,31,-34,"); - add(""); - //add("/*693*/"); - add("3,1,-14530,23658,-11366,"); - add("-35,-60,-80,-23,11,53,"); - add(""); - //add("/*694*/"); - add("3,1,-17616,-23753,5046,"); - add("-93,61,-37,33,-27,-10,"); - add(""); - //add("/*695*/"); - add("3,1,25086,-5507,-15503,"); - add("-51,11,-86,23,44,21,"); - add(""); - //add("/*696*/"); - add("3,1,-15610,-24492,7515,"); - add("-12,-16,-78,52,-2,101,"); - add(""); - //add("/*697*/"); - add("3,1,-15472,22928,-11615,"); - add("-58,-51,-24,-15,24,68,"); - add(""); - //add("/*698*/"); - add("3,1,-12165,24913,-11461,"); - add("34,-28,-96,-48,-12,24,"); - add(""); - //add("/*699*/"); - add("3,1,5310,21296,20452,"); - add("21,-66,64,46,12,-25,"); - add(""); - //add("/*700*/"); - add("3,-1,17800,23716,-4555,"); - add("58,-61,-85,-31,27,21,"); - add(""); - //add("/*701*/"); - add("3,1,18987,-4163,22851,"); - add("56,89,-31,-54,-31,40,"); - add(""); - //add("/*702*/"); - add("3,1,-13833,24181,-11133,"); - add("4,-47,-107,-21,7,43,"); - add(""); - //add("/*703*/"); - add("3,1,6651,29245,-700,"); - add("50,-11,4,-96,20,-60,"); - add(""); - //add("/*704*/"); - add("3,1,-25607,5901,14473,"); - add("-58,-52,-82,27,-3,49,"); - add(""); - //add("/*705*/"); - add("3,1,-19397,-22308,5108,"); - add("1,25,114,-14,3,-42,"); - add(""); - //add("/*706*/"); - add("3,1,-23259,-297,18946,"); - add("-53,-60,-67,39,-10,48,"); - add(""); - //add("/*707*/"); - add("3,1,-13405,24297,-11400,"); - add("11,-34,-86,-50,-16,26,"); - add(""); - //add("/*708*/"); - add("3,1,25842,-4398,-14590,"); - add("-3,-99,25,-21,27,-45,"); - add(""); - //add("/*709*/"); - add("3,1,-25303,12454,-10231,"); - add("-57,-52,78,24,41,-8,"); - add(""); - //add("/*710*/"); - add("3,1,-8255,26088,-12300,"); - add("82,-6,-67,-56,-15,5,"); - add(""); - //add("/*711*/"); - add("3,1,6152,-8008,-28249,"); - add("-89,40,-31,63,17,9,"); - add(""); - //add("/*712*/"); - add("3,1,-25934,14888,2405,"); - add("-36,-47,-101,8,8,37,"); - add(""); - //add("/*713*/"); - add("3,1,-6774,29199,-1229,"); - add("-15,-8,-109,-22,-3,41,"); - add(""); - //add("/*714*/"); - add("3,1,-1560,24786,16830,"); - add("-10,-53,77,53,17,-21,"); - add(""); - //add("/*715*/"); - add("3,-1,-21338,21065,-960,"); - add("-45,-41,97,19,19,-19,"); - add(""); - //add("/*716*/"); - add("3,1,-5625,24695,-16078,"); - add("11,-41,-67,-64,-5,15,"); - add(""); - //add("/*717*/"); - add("3,1,-26663,12045,6635,"); - add("-9,-70,90,11,38,-27,"); - add(""); - //add("/*718*/"); - add("3,1,-27183,11286,5804,"); - add("-3,-54,92,15,44,-17,"); - add(""); - //add("/*719*/"); - add("3,1,-20085,-21491,5891,"); - add("-63,66,28,2,-16,-51,"); - add(""); - //add("/*720*/"); - add("3,1,11920,-13784,-23831,"); - add("22,98,-45,15,-28,23,"); - add(""); - //add("/*721*/"); - add("3,1,-19179,-22536,4928,"); - add("-34,47,83,-13,-1,-57,"); - add(""); - //add("/*722*/"); - add("3,1,-355,23212,19002,"); - add("-92,11,-15,20,-33,40,"); - add(""); - //add("/*723*/"); - add("3,1,10541,18339,21273,"); - add("-78,-33,68,42,-8,-15,"); - add(""); - //add("/*724*/"); - add("3,1,-14382,25139,7820,"); - add("-90,-56,16,38,15,21,"); - add(""); - //add("/*725*/"); - add("3,1,-17775,-23685,4805,"); - add("-61,60,70,10,-16,-41,"); - add(""); - //add("/*726*/"); - add("3,1,15192,-711,-25859,"); - add("-36,-88,-18,-22,47,-15,"); - add(""); - //add("/*727*/"); - add("3,1,-25173,6788,14841,"); - add("3,81,-33,-30,-45,-31,"); - add(""); - //add("/*728*/"); - add("3,1,23886,-136,-18151,"); - add("33,-60,45,-38,-20,-50,"); - add(""); - //add("/*729*/"); - add("3,1,-17001,21978,11312,"); - add("-63,-71,42,24,10,16,"); - add(""); - //add("/*730*/"); - add("3,1,11428,-4389,-27389,"); - add("22,-99,25,-34,23,-17,"); - add(""); - //add("/*731*/"); - add("3,1,-14644,23549,-11447,"); - add("-47,-58,-57,-17,11,44,"); - add(""); - //add("/*732*/"); - add("3,1,20716,-6655,20653,"); - add("26,-20,-32,-11,92,40,"); - add(""); - //add("/*733*/"); - add("3,1,-27252,6392,10793,"); - add("0,-79,45,16,25,26,"); - add(""); - //add("/*734*/"); - add("3,1,8257,18817,21858,"); - add("-26,-56,57,41,-17,-1,"); - add(""); - //add("/*735*/"); - add("3,1,17728,-4370,-23804,"); - add("-69,-43,-43,-2,40,-9,"); - add(""); - //add("/*736*/"); - add("3,1,7081,29143,-744,"); - add("46,-10,33,-16,1,-93,"); - add(""); - //add("/*737*/"); - add("3,1,20340,-6075,-21198,"); - add("-58,54,-71,24,-5,24,"); - add(""); - //add("/*738*/"); - add("3,1,-10500,-27772,4297,"); - add("13,7,78,-57,18,-24,"); - add(""); - //add("/*739*/"); - add("3,1,-21551,16797,-12387,"); - add("-61,-25,74,20,27,1,"); - add(""); - //add("/*740*/"); - add("3,1,-23937,14156,-11253,"); - add("40,42,-32,-29,-72,-28,"); - add(""); - //add("/*741*/"); - add("3,1,2497,24497,17137,"); - add("31,52,-79,-35,-7,14,"); - add(""); - //add("/*742*/"); - add("3,1,21770,-2150,-20529,"); - add("-61,-66,-57,14,28,12,"); - add(""); - //add("/*743*/"); - add("3,1,-10876,-27085,6937,"); - add("24,15,94,-38,8,-29,"); - add(""); - //add("/*744*/"); - add("3,1,-26625,11639,7461,"); - add("-2,-58,82,13,34,-9,"); - add(""); - //add("/*745*/"); - add("3,-1,-25621,14760,-5070,"); - add("-8,16,87,27,22,-74,"); - add(""); - //add("/*746*/"); - add("3,1,-16344,22674,-10897,"); - add("-89,-53,23,21,14,-3,"); - add(""); - //add("/*747*/"); - add("3,1,-15599,23126,-11040,"); - add("-60,-53,-25,-14,9,38,"); - add(""); - //add("/*748*/"); - add("3,1,2618,27824,10908,"); - add("49,19,-60,-43,11,-19,"); - add(""); - //add("/*749*/"); - add("3,-1,13838,15180,21865,"); - add("70,-66,2,3,22,-18,"); - add(""); - //add("/*750*/"); - add("3,1,29104,5954,-4186,"); - add("-25,89,-43,9,-21,32,"); - add(""); - //add("/*751*/"); - add("3,-1,-17298,24161,-4125,"); - add("-9,-22,-94,-19,-8,36,"); - add(""); - //add("/*752*/"); - add("3,1,7494,29029,1081,"); - add("29,-6,-36,-80,21,-19,"); - add(""); - //add("/*753*/"); - add("3,-1,-19537,-11007,19928,"); - add("-32,64,4,-30,8,-25,"); - add(""); - //add("/*754*/"); - add("3,1,-18953,-22734,4895,"); - add("-43,49,59,-8,-4,-50,"); - add(""); - //add("/*755*/"); - add("3,1,13593,-5535,-26165,"); - add("-86,-27,-39,14,23,3,"); - add(""); - //add("/*756*/"); - add("3,-1,-19136,21815,-7612,"); - add("-73,-60,14,6,12,19,"); - add(""); - //add("/*757*/"); - add("3,1,-24002,17079,5677,"); - add("-28,-7,-99,6,1,24,"); - add(""); - //add("/*758*/"); - add("3,1,-26057,14705,-2194,"); - add("-28,-61,-74,6,16,44,"); - add(""); - //add("/*759*/"); - add("3,1,-25874,9131,12130,"); - add("37,-3,82,4,26,-11,"); - add(""); - //add("/*760*/"); - add("3,-1,-22516,16997,-10205,"); - add("-66,-59,49,14,16,-6,"); - add(""); - //add("/*761*/"); - add("3,1,15992,-257,25381,"); - add("-2,95,2,-18,-43,11,"); - add(""); - //add("/*762*/"); - add("3,1,-8284,26137,-12175,"); - add("54,-16,-71,-23,-10,-5,"); - add(""); - //add("/*763*/"); - add("3,1,-20414,-21222,5734,"); - add("10,12,81,-31,24,-22,"); - add(""); - //add("/*764*/"); - add("3,1,-15647,23076,-11075,"); - add("-62,-58,-33,0,15,30,"); - add(""); - //add("/*765*/"); - add("3,1,-28391,9662,-763,"); - add("-10,-37,-88,-2,-1,37,"); - add(""); - //add("/*766*/"); - add("3,1,23132,6353,18016,"); - add("60,-29,-68,-13,23,9,"); - add(""); - //add("/*767*/"); - add("3,-1,-24613,16950,2623,"); - add("-44,-58,-39,16,15,55,"); - add(""); - //add("/*768*/"); - add("3,-1,10870,-14991,23603,"); - add("35,-65,-58,7,21,11,"); - add(""); - //add("/*769*/"); - add("3,1,-27204,11625,4977,"); - add("-5,-47,82,5,20,-16,"); - add(""); - //add("/*770*/"); - add("3,1,-26269,14142,-3158,"); - add("-28,-66,-58,-1,3,22,"); - add(""); - //add("/*771*/"); - add("3,1,2537,27833,10903,"); - add("-20,-29,79,23,2,-9,"); - add(""); - //add("/*772*/"); - add("3,1,-27160,11434,5619,"); - add("0,-35,71,12,28,5,"); - add(""); - //add("/*773*/"); - add("3,1,29168,5584,-4248,"); - add("-10,72,27,7,-18,25,"); - add(""); - //add("/*774*/"); - add("3,1,29735,1076,-3832,"); - add("3,68,47,2,-31,8,"); - add(""); - //add("/*775*/"); - add("3,-1,-1224,25269,16124,"); - add("-57,-36,52,10,1,0,"); - add(""); - //add("/*776*/"); - add("3,1,-28530,9221,1000,"); - add("22,64,44,0,1,-17,"); - add(""); - add("0,"); - } - - private void add(String s) { - d.add(s); - } - - public List getLines() { - return d; - } - - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/MapDataReader.java plantuml-1.2018.9/src/com/ctreber/acearth/MapDataReader.java --- plantuml-1.2017.15/src/com/ctreber/acearth/MapDataReader.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/MapDataReader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -package com.ctreber.acearth; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -import com.ctreber.acearth.util.Point3D; -import com.ctreber.acearth.util.Polygon; - -/** - * The map data file is a big array of short (16-bit) ints, as follows: - it is - * a sequence of closed curves - the first value in a curve is the number of - * points in the curve - the second value in a curve indicates land/water (1 or - * -1, respectively) - this is followed by an [x,y,z] triple that indicates a - * point on the unit sphere (each of x, y, and z has been scaled by 30000), - * where the x axis points "to the right" (towards 0 N 90 E), the y axis points - * "up" (towards the north pole), and the z axis points "out of the screen" - * (towards 0 N 0 E). this is the starting point of the curve. - this is - * followed by (one less than the number of points in the curve) triples - * [dx,dy,dz]; the [x,y,z] triple for each successive point in the curve is - * obtained by adding [dx,dy,dz] onto the previous [x,y,z] values. - the curves - * are [must be!] non-self-intersecting and traced in a counter-clockwise - * direction - * - * the curves are sampled at a (roughly) a 20 mile resolution. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class MapDataReader { - /** Point value scale (devide value by this number). */ - private static final double MAP_DATA_SCALE = 30000.0; - - private static List fData; - private static List fPolygons; - private static int fIndex; - - /** - *

- * Read map data. - * - * @param pFileName - * Map data file name. - * @return Array of map polygons. - * @throws IOException - */ - public static Polygon[] readMapData() throws IOException { - final List lines = new MapData().getLines(); - - fData = new ArrayList(); - for (Iterator it = lines.iterator(); it.hasNext(); ) { - String lLine = (String) it.next(); - if (lLine.indexOf("/*") != -1) { - // Filter out comments. - continue; - } - - StringTokenizer lST = new StringTokenizer(lLine, ", "); - while (lST.hasMoreTokens()) { - String lToken = lST.nextToken(); - final Integer lValue = new Integer(lToken); - fData.add(lValue); - } - } - - fPolygons = new ArrayList(); - fIndex = 0; - while (getValue(fIndex) != 0) { - processCurve(); - } - - return (Polygon[]) fPolygons.toArray(new Polygon[0]); - } - - private static void processCurve() { - final int lNPoint = getValue(fIndex++); - final int lType = getValue(fIndex++); - - final Point3D[] lPoints = new Point3D[lNPoint]; - final Point3D lPoint3D = new Point3D(getValue(fIndex++) / MAP_DATA_SCALE, getValue(fIndex++) / MAP_DATA_SCALE, - getValue(fIndex++) / MAP_DATA_SCALE); - - lPoints[0] = lPoint3D; - for (int i = 1; i < lNPoint; i++) { - lPoints[i] = new Point3D(lPoints[i - 1].getX() + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getY() - + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getZ() + getValue(fIndex++) / MAP_DATA_SCALE); - } - - final Polygon lPolygon = new Polygon(lType, lPoints); - fPolygons.add(lPolygon); - } - - /** - *

- * Get value of raw data at specified point. - * - * @param pIndex - * Index of value. - * @return Value of raw data at specified point. - */ - private static int getValue(int pIndex) { - return ((Integer) fData.get(pIndex)).intValue(); - } - -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/Marker.java plantuml-1.2018.9/src/com/ctreber/acearth/plugins/markers/Marker.java --- plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/Marker.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/plugins/markers/Marker.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ -package com.ctreber.acearth.plugins.markers; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics2D; -import java.util.List; - -import com.ctreber.acearth.gui.PixelCanvas; -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.projection.ProjectionOrtho; -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; -import com.ctreber.acearth.util.StringParser; - -/** - *

- * Marks a location on the globe. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class Marker { - private static final int MARKER_SIZE = 4; - - // types of marker label alignment - private static final int MarkerAlignDefault = 0; - private static final int MarkerAlignLeft = 1; - private static final int MarkerAlignRight = 2; - private static final int MarkerAlignAbove = 3; - private static final int MarkerAlignBelow = 4; - - private Marker(Coordinate pCoordinate, String pLabel, int pAlign) { - fCoordinate = pCoordinate; - fLabel = pLabel; - fAlign = pAlign; - } - - private Coordinate fCoordinate; - private String fLabel; - private int fAlign; - - // private static List fMarkers; - - /* - * builtin_marker_data[] contains the "built-in" marker data that is - * compiled into AC.earth. (My apologies for misspellings, omissions of your - * favorite location, or geographic inaccuracies. This is primarily just a - * pile of data that I had handy instead of an attempt to provide a sample - * that is "globally correct" in some sense.) - */ - // public static List loadMarkerFile(String pFileName) throws IOException { - // fMarkers = new ArrayList(); - // - // final LineNumberReader lReader = new LineNumberReader(new - // FileReader(pFileName)); - // String lLine; - // while ((lLine = lReader.readLine()) != null) { - // processLine(lLine); - // } - // - // lReader.close(); - // - // return fMarkers; - // } - // - // private static void processLine(String pLine) { - // final int lPos = pLine.indexOf('#'); - // if (lPos != -1) { - // // Remove comment - // pLine = pLine.substring(0, lPos); - // } - // - // final Marker lMarkerInfo = createFromLine(pLine); - // if (lMarkerInfo != null) { - // fMarkers.add(lMarkerInfo); - // } - // } - private static Marker createFromLine(String pLine) { - final List lWords = StringParser.parse(pLine); - - final double lLat = Double.parseDouble((String) lWords.get(0)); - final double lLong = Double.parseDouble((String) lWords.get(1)); - final String lLabel = (String) lWords.get(2); - - int lAlign = MarkerAlignDefault; - if (lWords.size() >= 4) { - String lAlignString = (String) lWords.get(3); - if (lAlignString.equalsIgnoreCase("left")) { - lAlign = MarkerAlignLeft; - } - if (lAlignString.equalsIgnoreCase("right")) { - lAlign = MarkerAlignRight; - } - if (lAlignString.equalsIgnoreCase("above")) { - lAlign = MarkerAlignAbove; - } - if (lAlignString.equalsIgnoreCase("below")) { - lAlign = MarkerAlignBelow; - } - } - - final Coordinate lPos = new Coordinate(lLat, lLong); - if (!lPos.check()) { - // ACearth.logError("latitude must be between -90 and 90, and - // longitude must be between -180 and 180"); - return null; - } - - return new Marker(lPos, lLabel, lAlign); - } - - public String toString() { - return fLabel + " (" + fCoordinate + "), align: " + fAlign; - } - - // --Recycle Bin START (10/28/02 2:24 PM): - // public String getLabel() - // { - // return fLabel; - // } - // --Recycle Bin STOP (10/28/02 2:24 PM) - - // --Recycle Bin START (10/28/02 2:24 PM): - // public int getAlign() - // { - // return fAlign; - // } - // --Recycle Bin STOP (10/28/02 2:24 PM) - - // --Recycle Bin START (10/28/02 2:24 PM): - // public Coordinate getLocation() - // { - // return fCoordinate; - // } - // --Recycle Bin STOP (10/28/02 2:24 PM) - - public void render(PixelCanvas pCanvas, Projection pProjection) { - final Point3D lPos = pProjection.rotate(fCoordinate.getPoint3D()); - - if ((pProjection instanceof ProjectionOrtho) && (lPos.getZ() <= 0)) { - // Back side of the Earth. - // Insight: We don't need to check if the marker is visible in other - // projections because they always show the whole earth - and all - // markers! - return; - } - - Point2D lPoint = pProjection.finalize(pProjection.project2D(lPos)); - final int lX = (int) lPoint.getX(); - final int lY = (int) lPoint.getY(); - - // Draw a circle - Graphics2D g2d = pCanvas.getGraphics2D(); - g2d.setColor(Color.red); - // pCanvas.drawCircle(lX, lY, MARKER_SIZE); - g2d.drawOval(lX, lY, MARKER_SIZE, MARKER_SIZE); - - if (fLabel != null) { - switch (fAlign) { - case Marker.MarkerAlignLeft: - break; - - case Marker.MarkerAlignRight: - case Marker.MarkerAlignDefault: - // pCanvas.drawText(lX + MARKER_SIZE, lY + 4, fLabel); - // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); - g2d.setFont(new Font("", Font.PLAIN, 9)); - g2d.drawString(fLabel, lX + MARKER_SIZE + 1, lY + 2); - break; - - case Marker.MarkerAlignAbove: - break; - - case Marker.MarkerAlignBelow: - break; - } - } - } - - public static Marker loadMarkerFile(String line) { - return createFromLine(line); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/PluginMarkers.java plantuml-1.2018.9/src/com/ctreber/acearth/plugins/markers/PluginMarkers.java --- plantuml-1.2017.15/src/com/ctreber/acearth/plugins/markers/PluginMarkers.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/plugins/markers/PluginMarkers.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -package com.ctreber.acearth.plugins.markers; - -import java.util.Iterator; -import java.util.List; - -import com.ctreber.acearth.plugins.Plugin; - -/** - *

- * Renders markers to the render target. a - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class PluginMarkers extends Plugin { - private List fMarkers; - - // private String fMarkerFileName = ACearth.getHomeDir() + - // "markersDefault.txt"; - - public PluginMarkers(List markers) { - // ACearth.indent("AC.earth Markers plug-in"); - // - // ACearth.log("Reading markers"); - // - // if(fMarkerFileName == null) - // { - // throw new RuntimeException("Marker file name not set"); - // } - - // try - // { - // fMarkers = Marker.loadMarkerFile(fMarkerFileName); - // } catch(IOException e) - // { - // ACearth.logError("Marker file not found"); - // return; - // } - - fMarkers = markers; - - // ACearth.outdent(); - } - - public boolean hasGUIP() { - return false; - } - - public void render() { - if (!fActiveP) { - return; - } - - // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); - Iterator lIt = fMarkers.iterator(); - while (lIt.hasNext()) { - Marker lMarker = (Marker) lIt.next(); - lMarker.render(fRenderTarget, fProjection); - } - } - - // public void setMarkerFileName(String pMarkerFileName) - // { - // fMarkerFileName = pMarkerFileName; - // } - - public String toString() { - return "AC.earth Markers plug-in"; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/plugins/Plugin.java plantuml-1.2018.9/src/com/ctreber/acearth/plugins/Plugin.java --- plantuml-1.2017.15/src/com/ctreber/acearth/plugins/Plugin.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/plugins/Plugin.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -package com.ctreber.acearth.plugins; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import com.ctreber.acearth.ACearth; -import com.ctreber.acearth.gui.PixelCanvas; -import com.ctreber.acearth.projection.Projection; - -/** - *

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 6, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class Plugin implements ActionListener -{ - protected ACearth fParent; - protected boolean fActiveP = true; - protected Projection fProjection; - protected PixelCanvas fRenderTarget; - - public void actionPerformed(ActionEvent e) - { - } - - abstract public boolean hasGUIP(); - - abstract public void render(); - - public void setProjection(Projection pProjection) - { - fProjection = pProjection; - } - - public void setRenderTarget(PixelCanvas pRenderTarget) - { - fRenderTarget = pRenderTarget; - } - - public void setParent(ACearth pParent) - { - fParent = pParent; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionCyl.java plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionCyl.java --- plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionCyl.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionCyl.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -package com.ctreber.acearth.projection; - -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point3D; - -/** - *

Cylindrical projection. Show Earth flatly spread out on rectangle. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class ProjectionCyl extends Projection -{ - /** - *

All of Earth is visible. - * - * @param pPoint - * @return - */ - public boolean isVisible(Point3D pPoint) - { - return true; - } - - public Coordinate getLocation(int pX, int pY) - { - final Coordinate lRaw = new Coordinate(Math.atan(inverseFinalizeY(pY)), - inverseFinalizeX(pX)); - - return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); - } - - /** - *

The scale is set so that a value of - * 2PI gets mapped to the full image width times the magnification. - * But see ProjectionOrtho.setScale(). - */ - protected void setScale() - { - // Makes 2PI come out as full image width - fScale = fViewMagnification * fImageWidth / (2 * Math.PI); - } - - /** - * @return Longitude (-PI to PI), linearly on x axis. - */ - public double projectX(double pX, double pZ) - { - return Math.atan2(pX, pZ); - } - - public double inverseProjectX(double pX) - { - return Math.sin(pX); - } - - /** - * @return Latitude (-PI/2 to PI/2), projected from center of Earth on - * y axis with a linear scale. - */ - public double projectY(double pY) - { - return (pY >= 0.9999999999) ? 1e6 : - (pY <= -0.9999999999) ? -1e6 : Math.tan(Math.asin(pY)); - } - - public double inverseProjectY(double y) - { - return Math.sin(Math.atan(y)); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/projection/Projection.java plantuml-1.2018.9/src/com/ctreber/acearth/projection/Projection.java --- plantuml-1.2017.15/src/com/ctreber/acearth/projection/Projection.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/projection/Projection.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,274 +0,0 @@ -package com.ctreber.acearth.projection; - -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; -import com.ctreber.acearth.util.Toolkit; - -/** - *

A projection for a globe on a flat surface (must be subclassed). - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class Projection -{ - // Target information - int fImageHeight; - int fImageWidth; - private double fXOffset; - private double fYOffset; - - //Viewing information - private int fShiftX; - private int fShiftY; - double fScale; - - private Coordinate fViewPos; - /**

In rads */ - private double fViewRotation; - double fViewMagnification; - - - //Transformation matrix parameters */ - private double fCosLat; - private double fSinLat; - private double fCosLon; - private double fSinLon; - private double fCosRot; - private double fSinRot; - - /** - *

Initialize transform parameters, set offset to center of image - * (plus shifts), set scale - */ - public void initTransformTable() - { - // Set transformation parameters - fCosLat = Math.cos(Toolkit.degsToRads(fViewPos.getLat())); - fSinLat = Math.sin(Toolkit.degsToRads(fViewPos.getLat())); - fCosLon = Math.cos(Toolkit.degsToRads(fViewPos.getLong())); - fSinLon = Math.sin(Toolkit.degsToRads(fViewPos.getLong())); - fCosRot = Math.cos(Toolkit.degsToRads(fViewRotation)); - fSinRot = Math.sin(Toolkit.degsToRads(fViewRotation)); - - fXOffset = (double)fImageWidth / 2 + fShiftX; - fYOffset = (double)fImageHeight / 2 + fShiftY; - - setScale(); - } - - abstract protected void setScale(); - - /** - *

Project 3D point on y axis. - */ - abstract public double projectY(double pY); - - abstract public double inverseProjectY(double pY); - - /** - *

Project 3D point on x axis. - */ - abstract protected double projectX(double pX, double pZ); - - abstract public double inverseProjectX(double pX); - - public abstract boolean isVisible(Point3D pPoint); - - public boolean isWithinImage(Point2D pPoint) - { - return (pPoint.getX() >= 0) && (pPoint.getX() < fImageWidth) && - (pPoint.getY() >= 0) && (pPoint.getY() < fImageHeight); - } - - /** - *

Translate screen point into coordinate on Earth. - * - * @param pX - * @param pY - * @return - */ - abstract public Coordinate getLocation(int pX, int pY); - - /** - *

Imagine view the globe, N is up, S is down, and N0E0 is in the center. - * x is right/left, y is up/down, and z is front/rear. - * - *

Map points are located on the surface of a unit sphere (diameter = 1). - * Latitude is the angle between x and y or z and y. Longitude is the angle - * between x and z. - * - *

Why? The way we choose our global coordinate system, longitude circles - * (latidude variable) always have the same size while the size of - * latidude circles (longitude variable) depends on the latitude. - * - * @param pPoint - * @return - */ - public Point2D project2D(Point3D pPoint) - { - return new Point2D(projectX(pPoint.getX(), pPoint.getZ()), - projectY(pPoint.getY())); - } - - public Point2D finalize(Point2D pPoint) - { - return new Point2D(finalizeX(pPoint.getX()), finalizeY(pPoint.getY())); - } - - /** - *

Since the final mapping is relative to the center of the image - * -PI and PI get mapped to the left and right border respectively. - * But see ProjectionOrtho.setScale(). - */ - public double finalizeX(double pX) - { - return fXOffset + fScale * pX; - } - - /** - *

Since the final mapping is relative to the center of the image - * -PI and PI get mapped to the bottom and top border respectively. - * But see ProjectionOrtho.setScale(). - */ - public double finalizeY(double pY) - { - return fYOffset - fScale * pY; - } - - /** - *

Transform screen to image coordinates. - */ - public double inverseFinalizeX(double x) - { - return (x - fXOffset) / fScale; - } - - /** - *

Transform screen to image coordinates. - */ - public double inverseFinalizeY(double y) - { - return (fYOffset - y) / fScale; - } - - /** - *

Rotate the point according to the current rotation of Earth. - */ - public Point3D rotate(Point3D pPoint) - { - double lX = pPoint.getX(); - double lY = pPoint.getY(); - double lZ = pPoint.getZ(); - - // Do NOT inline vars - it does not work (just inline _t_ for a try). - double _c_ = fCosLon; - double _s_ = fSinLon; - double _t_ = _c_ * lX - _s_ * lZ; - lZ = _s_ * lX + _c_ * lZ; - lX = _t_; - - _c_ = fCosLat; - _s_ = fSinLat; - _t_ = (_c_ * lY) - (_s_ * lZ); - lZ = (_s_ * lY) + (_c_ * lZ); - lY = _t_; - - _c_ = fCosRot; - _s_ = fSinRot; - _t_ = (_c_ * lX) - (_s_ * lY); - lY = (_s_ * lX) + (_c_ * lY); - lX = _t_; - - return new Point3D(lX, lY, lZ); - } - - public Point3D rotateReverse(Point3D pPoint) - { - // Set transformation parameters - final double fCosLat = Math.cos(Toolkit.degsToRads(-fViewPos.getLat())); - final double fSinLat = Math.sin(Toolkit.degsToRads(-fViewPos.getLat())); - final double fCosLon = Math.cos(Toolkit.degsToRads(-fViewPos.getLong())); - final double fSinLon = Math.sin(Toolkit.degsToRads(-fViewPos.getLong())); - final double fCosRot = Math.cos(Toolkit.degsToRads(-fViewRotation)); - final double fSinRot = Math.sin(Toolkit.degsToRads(-fViewRotation)); - - double lX = pPoint.getX(); - double lY = pPoint.getY(); - double lZ = pPoint.getZ(); - - // Do NOT inline vars - it does not work (just inline lTmp for a try). - double lCosFac; - double lSinFac; - double lTmp; - - // Note that the order of the three rotation had to be reversed as well. - lCosFac = fCosRot; - lSinFac = fSinRot; - lTmp = (lCosFac * lX) - (lSinFac * lY); - lY = (lSinFac * lX) + (lCosFac * lY); - lX = lTmp; - - lCosFac = fCosLat; - lSinFac = fSinLat; - lTmp = (lCosFac * lY) - (lSinFac * lZ); - lZ = (lSinFac * lY) + (lCosFac * lZ); - lY = lTmp; - - lCosFac = fCosLon; - lSinFac = fSinLon; - lTmp = (lCosFac * lX) - (lSinFac * lZ); - lZ = (lSinFac * lX) + (lCosFac * lZ); - lX = lTmp; - - return new Point3D(lX, lY, lZ); - } - - public double getScale() - { - return fScale; - } - - public Coordinate getViewPos() - { - return fViewPos; - } - - public void setViewMagnification(double pViewMagnification) - { - fViewMagnification = pViewMagnification; - setScale(); - } - - public void setViewPos(Coordinate pViewPos) - { - fViewPos = pViewPos; - } - - public void setShiftX(int pX) - { - fShiftX = pX; - } - - public void setShiftY(int pY) - { - fShiftY = pY; - } - - public void setViewRotation(double pViewRotation) - { - fViewRotation = pViewRotation; - } - - public void setImageWidth(int pImageWidth) - { - fImageWidth = pImageWidth; - } - - public void setImageHeight(int pImageHeight) - { - fImageHeight = pImageHeight; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionMerc.java plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionMerc.java --- plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionMerc.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionMerc.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -package com.ctreber.acearth.projection; - -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point3D; - - -/** - *

Mercator projection. Show Earth flatly spread out on rectangle. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class ProjectionMerc extends Projection -{ - /** - *

All of Earth is visible. - * - * @param pPoint - * @return - */ - public boolean isVisible(Point3D pPoint) - { - return true; - } - - public Coordinate getLocation(int pX, int pY) - { - final Coordinate lRaw = new Coordinate( - 2 * (Math.atan(Math.exp(inverseFinalizeY(pY))) - Math.PI / 4), - inverseFinalizeX(pX)); - - return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); - } - - /** - *

The scale is set so that a value of - * 2PI gets mapped to the full image width times the magnification. - * But see ProjectionOrtho.setScale(). - */ - protected void setScale() - { - // Makes 2PI come out as full image width - fScale = fViewMagnification * fImageWidth / (2 * Math.PI); - } - - /** - * @return Longitude (-PI to PI), linearly on x axis. - */ - public double projectX(double pX, double pZ) - { - return Math.atan2(pX, pZ); - } - - public double inverseProjectX(double pX) - { - return Math.sin(pX); - } - - /** - * @return Latitude (-PI/2 to PI/2), projected from center of Earth on - * y axis with a twist and a log scale. - */ - public double projectY(double pY) - { - return (pY >= 0.9999999999) ? 1e6 - : (pY <= -0.9999999999) ? -1e6 - : Math.log(Math.tan(Math.asin(pY) / 2 + Math.PI / 4)); - } - - public double inverseProjectY(double y) - { - return Math.sin(2 * (Math.atan(Math.exp(y)) - Math.PI / 4)); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionOrtho.java plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionOrtho.java --- plantuml-1.2017.15/src/com/ctreber/acearth/projection/ProjectionOrtho.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/projection/ProjectionOrtho.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -package com.ctreber.acearth.projection; - -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point3D; - - -/** - *

Orthographic projection (show Earth as a ball). - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class ProjectionOrtho extends Projection -{ - /** - *

All of Earth is visible. - * - * @param pPoint - * @return - */ - public boolean isVisible(Point3D pPoint) - { - return pPoint.getZ() >= 0; - } - - public Coordinate getLocation(int pX, int pY) - { - final double lX = inverseFinalizeX(pX); - final double lY = inverseFinalizeY(pY); - final double lZ = Math.sqrt(1 - lX * lX - lY * lY); - final Point3D lP = new Point3D(lX, lY, lZ); - - return rotateReverse(lP).getCoordinate(); - } - - /** - * @return Longitude, not in rad but from -1 to 1. - */ - public double projectX(double pX, double pZ) - { - return pX; - } - - public double inverseProjectX(double pX) - { - return pX; - } - - /** - * @return Latitude, not in rad but from -1 to 1. - */ - public double projectY(double pY) - { - return pY; - } - - public double inverseProjectY(double pY) - { - return pY; - } - - /** - *

The scale is not from -PI to PI but from -1 to 1 in this case - * (the range of x, y, z of the points). - */ - protected void setScale() - { - fScale = Math.min(fImageHeight, fImageWidth) * fViewMagnification * 0.99 / 2; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/renderer/Renderer.java plantuml-1.2018.9/src/com/ctreber/acearth/renderer/Renderer.java --- plantuml-1.2017.15/src/com/ctreber/acearth/renderer/Renderer.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/renderer/Renderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -package com.ctreber.acearth.renderer; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import com.ctreber.acearth.shader.Shader; - -/** - *

- * Uses defined RowTypeRenderers and Shader to render to render target. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class Renderer { - private Shader fShader; - private RenderTarget fRenderTarget; - private List fRowTypeRenderers = new ArrayList(); - - public Renderer(RenderTarget pRenderTarget) { - fRenderTarget = pRenderTarget; - } - - public void render() { - final Iterator lIt = fRowTypeRenderers.iterator(); - while (lIt.hasNext()) { - RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); - lRowRenderer.startNewRun(); - } - renderRows(); - } - - private void renderRows() { - for (int lRowNo = 0; lRowNo < fRenderTarget.getImageHeight(); lRowNo++) { - int[] lPixelTypes = getPixelTypes(lRowNo); - renderRow(lRowNo, lPixelTypes); - } - } - - /** - *

- * Get pixel types for whole row from all registered RowRenderers. - * - * @param pRowNo - * Row number. - * @return Pixel types for row. - */ - private int[] getPixelTypes(int pRowNo) { - // Create the types array - final int[] lPixelTypes = new int[fRenderTarget.getImageWidth()]; - - final Iterator lIt = fRowTypeRenderers.iterator(); - while (lIt.hasNext()) { - RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); - lRowRenderer.getPixelTypes(pRowNo, lPixelTypes); - } - - return lPixelTypes; - } - - /** - *

- * With help of Shader, render pixel types to actual colored pixels. - * - * @param pRowNo - * @param pPixelTypes - */ - private void renderRow(int pRowNo, int[] pPixelTypes) { - // For each pixel in row, render it. - final Color[] lPixelColors = fShader.getShadedColors(pRowNo, pPixelTypes); - for (int lColNo = 0; lColNo < fRenderTarget.getImageWidth(); lColNo++) { - fRenderTarget.setPixel(lColNo, pRowNo, lPixelColors[lColNo]); - } - } - - public void setShader(Shader pShader) { - fShader = pShader; - } - - public void setRenderTarget(RenderTarget pRenderTarget) { - fRenderTarget = pRenderTarget; - } - - public void addRowTypeRenderer(RowTypeRenderer pRowRenderer) { - fRowTypeRenderers.add(pRowRenderer); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RenderTarget.java plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RenderTarget.java --- plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RenderTarget.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RenderTarget.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -package com.ctreber.acearth.renderer; - -import java.awt.Color; - -/** - *

. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public interface RenderTarget { - - public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB); - - public void setPixel(int pX, int pY, Color pColor); - - public int getImageWidth(); - - public int getImageHeight(); - -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRenderer.java plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRenderer.java --- plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRenderer.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRenderer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -package com.ctreber.acearth.renderer; - -/** - *

Renders a row of pixel types.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public interface RowTypeRenderer -{ - /** - *

Each time when rendering an image, call startNewRun() first. - */ - public void startNewRun(); - - /** - *

Set pixel type for specified row number. Note some pixel types - * might be already set. The renderer can build on this information - * or overwrite it. - * - * @param pRowNo - * @param pPixelTypes - */ - public void getPixelTypes(int pRowNo, final int[] pPixelTypes); -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java --- plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -package com.ctreber.acearth.renderer; - -import com.ctreber.acearth.scanbit.BitGeneratorMap; -import com.ctreber.acearth.scanbit.ScanBit; - -/** - *

Renders a row of ScanBits to pixel types.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public class RowTypeRendererScanBit implements RowTypeRenderer -{ - private int fScanBitIndex; - private ScanBit[] fScanBits; - private final int[] fScanToPixelType = new int[256]; - - public void startNewRun() - { - fScanBitIndex = 0; - generateScanToPixelTypeTable(); - } - - public void getPixelTypes(int pRowNo, int[] pPixelTypes) - { - // For all ScanBits in specified row... - while((fScanBitIndex < fScanBits.length) && - (fScanBits[fScanBitIndex].getY() == pRowNo)) - { - for(int i = fScanBits[fScanBitIndex].getlXFrom(); - i <= fScanBits[fScanBitIndex].getXTo(); i++) - { - /** - * This is weird... why summing up the types? Note the row stays the - * same, but it possibly gets paved over a couple of times (There - * might be ScanBits painting on the same pixels). - * - * The polygons specify -1 as water and 1 as land. - * The type table says space is 0, Water is 1 to 64, Land is 65+. - * - * The outline paints the whole world as water (64). Adding a - * land pixel (1) creates a value of 65 (land). Adding a water - * pixel (-1) changes this back to 64 (water). - */ - pPixelTypes[i] += fScanBits[fScanBitIndex].getType(); - } - fScanBitIndex++; - } - - // Translate generateScanBits values into pixels types. - for(int lCol = 0; lCol < pPixelTypes.length; lCol++) - { - pPixelTypes[lCol] = fScanToPixelType[pPixelTypes[lCol] & 0xff]; - } - } - - private void generateScanToPixelTypeTable() - { - for(int i = 0; i < 256; i++) - { - if(i == 0) - { - // 0 is Space. - fScanToPixelType[i] = BitGeneratorMap.PixTypeSpace; - } else if(i > 64) - { - // Above 64 it's land. - fScanToPixelType[i] = BitGeneratorMap.PixTypeLand; - } else - { - // From 1 to 64 incl. it's water - fScanToPixelType[i] = BitGeneratorMap.PixTypeWater; - } - } - } - - public void setScanBits(ScanBit[] pScanBits) - { - fScanBits = pScanBits; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java --- plantuml-1.2017.15/src/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -package com.ctreber.acearth.renderer; - -import com.ctreber.acearth.scanbit.BitGeneratorMap; -import com.ctreber.acearth.scandot.ScanDot; - -/** - *

Renders a row of ScanDots to pixel types.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public class RowTypeRendererScanDot implements RowTypeRenderer -{ - private int fScanDotIndex; - private ScanDot[] fScanDots; - - public void startNewRun() - { - fScanDotIndex = 0; - } - - public void getPixelTypes(int pRowNo, int[] pPixelTypes) - { - // For all ScanDots in specified row... - while((fScanDotIndex < fScanDots.length) && - (fScanDots[fScanDotIndex].getY() == pRowNo)) - { - ScanDot lDot = fScanDots[fScanDotIndex]; - - if(lDot.getType() == ScanDot.DotTypeStar) - { - if(pPixelTypes[lDot.getX()] == BitGeneratorMap.PixTypeSpace) - { - // Stars get only painted on Space. - pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeStar; - } - } else - { - // The only other type for a dot (so far) is "grid". - switch(pPixelTypes[lDot.getX()]) - { - case BitGeneratorMap.PixTypeLand: - pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridLand; - break; - - case BitGeneratorMap.PixTypeWater: - pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridWater; - break; - } - } - fScanDotIndex++; - } - } - - public void setScanDots(ScanDot[] pScanDots) - { - fScanDots = pScanDots; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,265 +0,0 @@ -package com.ctreber.acearth.scanbit; - -import java.util.Comparator; - -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.util.EdgeCrossing; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; - -/** - *

Map scanner for mercator and cylindrical projections. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class BitGeneratorMapDefault extends BitGeneratorMap -{ - public BitGeneratorMapDefault(Projection pProjection) - { - super(pProjection); - } - - protected Comparator getEdgeXingComparator() - { - return new EdgeXingComparator(); - } - - /** - * Seems to: walk along outline of projected area. - */ - protected ScanBuf scanOutline() - { - final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); - - final double lLeft = fProjection.finalizeX(-Math.PI); - final double lRight = fProjection.finalizeX(Math.PI); - // Will be adjusted to fit height. - final double lTop = fProjection.finalizeY(1e6); - final double lBottom = fProjection.finalizeY(-1e6); - - // Top - lScanBuf.addLine(lRight, lTop, lLeft, lTop); - // Left - lScanBuf.addLine(lLeft, lTop, lLeft, lBottom); - // Bottom - lScanBuf.addLine(lLeft, lBottom, lRight, lBottom); - // Right - lScanBuf.addLine(lRight, lBottom, lRight, lTop); - - return lScanBuf; - } - - /** - *

Look at 2 neighboring points in polygon and find edge crossings - - * edge of the globe?! Edge of image? - */ - protected void scanPolygon(ScanBuf pScanBuf, - Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) - { - final Point2D lCurr = pPoints2D[pIndex]; - final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; - final Point2D lPrev = pPoints2D[lIndexPrev]; - double dx = lCurr.getX() - lPrev.getX(); - - if(Math.abs(dx) <= Math.PI) - { - // Perimeter not crossed. - pScanBuf.addLine( - fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), - fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); - return; - } - - // Perimeter crossed, we need to wrap the line around the edge. - int lAngle; - double mx; - double my = getYMidPoint(pPoints3D[lIndexPrev], pPoints3D[pIndex]); - if(dx > 0) - { - // Curve runs right - mx = -Math.PI; - lAngle = 2; - } else - { - mx = Math.PI; - lAngle = 0; - } - - // From previous point to edge... - pScanBuf.addLine( - fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), - fProjection.finalizeX(mx), fProjection.finalizeY(my)); - addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, mx, my, lAngle)); - - if(dx > 0) - { - mx = Math.PI; - lAngle = 0; - } else - { - mx = -Math.PI; - lAngle = 2; - } - - // ...and from edge to current point. - pScanBuf.addLine( - fProjection.finalizeX(mx), fProjection.finalizeY(my), - fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); - addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, mx, my, lAngle)); - } - - /** - *

My educated guess is that the mid point between the current and - * the previous point is calculated, and - kind of - y of that point - * is returned. - */ - private double getYMidPoint(Point3D pPrev, Point3D pCurr) - { - double lY; - final double lZ; - - if(pCurr.getX() != 0) - { - // if xPrev is twice xCurr, ratio is 2 - double ratio = (pPrev.getX() / pCurr.getX()); - lY = pPrev.getY() - ratio * pCurr.getY(); - lZ = pPrev.getZ() - ratio * pCurr.getZ(); - } else - { - lY = pCurr.getY(); - lZ = pCurr.getZ(); - } - - final double lDistance = Math.sqrt((lY * lY) + (lZ * lZ)); - lY *= ((lZ > 0) ? -1 : 1) / lDistance; - - return fProjection.projectY(lY); - } - - /** - *

Side effect: Creates ScanBuf lines. - */ - protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) - { - EdgeCrossing from; - EdgeCrossing to; - int lStart; - - if(xings[0].getType() == EdgeCrossing.XingTypeExit) - { - lStart = 0; - } else - { - // Type "entry". - from = xings[xings.length - 1]; - to = xings[0]; - addEdgeToScanbuf(pScanBuf, from, to); - lStart = 1; - } - - for(int i = lStart; i < xings.length - 1; i += 2) - { - from = xings[i]; - to = xings[i + 1]; - addEdgeToScanbuf(pScanBuf, from, to); - } - } - - /** - *

For handleCrossing(). Side effect: Creates ScanBuf lines. - * - * @param pScanBuf - * @param from - * @param to - */ - private void addEdgeToScanbuf(ScanBuf pScanBuf, EdgeCrossing from, - EdgeCrossing to) - { - int lAngleFrom = (int)from.getAngle(); - double lXFrom = fProjection.finalizeX(from.getX()); - double lYFrom = fProjection.finalizeY(from.getY()); - - // Step around in 90 degree increments until target angle is reached - while(lAngleFrom != (int)to.getAngle()) - { - int lAngleNew = 0; - double lXNew = 0; - double lYNew = 0; - - switch(lAngleFrom) - { - case 0: - // Top right - lXNew = fProjection.finalizeX(Math.PI); - lYNew = fProjection.finalizeY(1e6); - lAngleNew = 1; - break; - - case 1: - // Top left - lXNew = fProjection.finalizeX(-Math.PI); - lYNew = fProjection.finalizeY(1e6); - lAngleNew = 2; - break; - - case 2: - // Bottom left - lXNew = fProjection.finalizeX(-Math.PI); - lYNew = fProjection.finalizeY(-1e6); - lAngleNew = 3; - break; - - case 3: - // Bottom right - lXNew = fProjection.finalizeX(Math.PI); - lYNew = fProjection.finalizeY(-1e6); - lAngleNew = 0; - break; - } - - pScanBuf.addLine(lXFrom, lYFrom, lXNew, lYNew); - - lAngleFrom = lAngleNew; - lXFrom = lXNew; - lYFrom = lYNew; - } - - // ...and from last to final. - pScanBuf.addLine(lXFrom, lYFrom, fProjection.finalizeX(to.getX()), - fProjection.finalizeY(to.getY())); - } - - private static class EdgeXingComparator implements Comparator - { - public int compare(Object o1, Object o2) - { - final EdgeCrossing a = (EdgeCrossing)o1; - final EdgeCrossing b = (EdgeCrossing)o2; - - if(a.getAngle() < b.getAngle()) - { - return -1; - } - - if(a.getAngle() > b.getAngle()) - { - return 1; - } - - // Angles are equal. - if(a.getAngle() == 0) - { - return (a.getY() < b.getY()) ? -1 : (a.getY() > b.getY()) ? 1 : 0; - } - - if(a.getAngle() == 2) - { - return (a.getY() > b.getY()) ? -1 : (a.getY() < b.getY()) ? 1 : 0; - } - - throw new RuntimeException("No result"); - } - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMap.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMap.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMap.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMap.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -package com.ctreber.acearth.scanbit; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; - -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.util.EdgeCrossing; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; -import com.ctreber.acearth.util.Polygon; -import com.ctreber.aclib.sort.CTSort; -import com.ctreber.aclib.sort.QuickSort; - -/** - *

- * A BitGeneratorMap scans a map into ScanBits. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public abstract class BitGeneratorMap extends ScanBitGenerator { - // Types of pixels. - public static final int PixTypeSpace = 0; - public static final int PixTypeLand = 1; - public static final int PixTypeWater = 2; - public static final int PixTypeStar = 3; - public static final int PixTypeGridLand = 4; - public static final int PixTypeGridWater = 5; - - // Parameters influencing generateScanBits buffer genertion. - private Polygon[] fMapData; - Projection fProjection; - private List fScanbitsVector = new ArrayList(); - // Created by scanPolygon - List fEdgeCrossings; - - abstract protected ScanBuf scanOutline(); - - abstract protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] pEdgeCrossings); - - abstract protected Comparator getEdgeXingComparator(); - - abstract protected void scanPolygon(ScanBuf pScanBuf, Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex); - - public BitGeneratorMap(Projection pProjection) { - fProjection = pProjection; - } - - /** - *

- * Create outline for the map, scan all polygons. - */ - public void generateScanBits() { - // Prepare data. - fScanbitsVector = new ArrayList(); - fProjection.setImageWidth(fImageWidth); - fProjection.setImageHeight(fImageHeight); - fProjection.initTransformTable(); - - // Trace outling and polygons. - final ScanBuf lScanBuf = scanOutline(); - fScanbitsVector.addAll(lScanBuf.getScanbits(64)); - scanPolygons(); - - // Dress results. - final CTSort lSort = new QuickSort(); - fScanBitsArray = (ScanBit[]) fScanbitsVector.toArray(new ScanBit[0]); - lSort.sort(fScanBitsArray); - } - - private void scanPolygons() { - for (int lPolyNo = 0; lPolyNo < fMapData.length; lPolyNo++) { - Polygon lPolygon = fMapData[lPolyNo]; - - Point3D[] lPoints3D = new Point3D[lPolygon.getSize()]; - Point2D[] lPoints2D = new Point2D[lPolygon.getSize()]; - transformPolygonPoints(lPolygon, lPoints3D, lPoints2D); - - // For all points in polygon... - fEdgeCrossings = new ArrayList(); - ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); - for (int i = 0; i < lPoints2D.length; i++) { - scanPolygon(lScanBuf, lPoints3D, lPoints2D, i); - } - - if (fEdgeCrossings.size() > 0) { - // Edge crossings have been generated, deal with them. - final EdgeCrossing[] xings = (EdgeCrossing[]) fEdgeCrossings.toArray(new EdgeCrossing[0]); - final CTSort lSort = new QuickSort(); - lSort.sort(xings, getEdgeXingComparator()); - handleCrossings(lScanBuf, xings); - } - - if (lScanBuf.containsPoints()) { - // Scan lines have been generated, transform them into ScanBit. - fScanbitsVector.addAll(lScanBuf.getScanbits(lPolygon.getType())); - } - } - } - - /** - * The transformation rotates 3D and projects 2D points from it - */ - private void transformPolygonPoints(Polygon pPolygon, Point3D[] pPoints3D, Point2D[] pPoints2D) { - for (int i = 0; i < pPolygon.getPoints().length; i++) { - Point3D lPoint = pPolygon.getPoints()[i]; - - Point3D lPointRotated = fProjection.rotate(lPoint); - pPoints3D[i] = lPointRotated; - pPoints2D[i] = fProjection.project2D(lPointRotated); - } - } - - public void setMapData(Polygon[] pMapData) { - fMapData = pMapData; - } - - protected void addEdgeXing(EdgeCrossing pEdgeXing) { - fEdgeCrossings.add(pEdgeXing); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -package com.ctreber.acearth.scanbit; - -import java.util.Comparator; - -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.util.EdgeCrossing; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; - -/** - *

Map scanner for orthographic projection. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class BitGeneratorMapOrtho extends BitGeneratorMap -{ - public BitGeneratorMapOrtho(Projection pProjection) - { - super(pProjection); - } - - protected Comparator getEdgeXingComparator() - { - return new EdgeCrossingComparator(); - } - - protected ScanBuf scanOutline() - { - final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); - addArcToScanbuf(lScanBuf, 1.0, 0.0, 0.0, 1.0, 0.0, 2 * Math.PI); - - return lScanBuf; - } - - private void addArcToScanbuf(ScanBuf pScanBuf, double pXFrom, double pYFrom, - double pAngleFrom, double pXTo, double pYTo, double pAngleTo) - { - double step = 1 / fProjection.getScale() * 10; - if(step > 0.05) - { - step = 0.05; - } - final int lAngleFrom = (int)Math.ceil(pAngleFrom / step); - final int lAngleTo = (int)Math.floor(pAngleTo / step); - - double prev_x = fProjection.finalizeX(pXFrom); - double prev_y = fProjection.finalizeY(pYFrom); - double curr_x; - double curr_y; - if(lAngleFrom <= lAngleTo) - { - double c_step = Math.cos(step); - double s_step = Math.sin(step); - - double angle = lAngleFrom * step; - double arc_x = Math.cos(angle); - double arc_y = Math.sin(angle); - - for(int i = lAngleFrom; i <= lAngleTo; i++) - { - curr_x = fProjection.finalizeX(arc_x); - curr_y = fProjection.finalizeY(arc_y); - pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); - - /* instead of repeatedly calling cos() and sin() to get the next - * values for arc_x and arc_y, simply rotate the existing values - */ - double tmp = (c_step * arc_x) - (s_step * arc_y); - arc_y = (s_step * arc_x) + (c_step * arc_y); - arc_x = tmp; - - prev_x = curr_x; - prev_y = curr_y; - } - } - - curr_x = fProjection.finalizeX(pXTo); - curr_y = fProjection.finalizeY(pYTo); - pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); - } - - protected void scanPolygon(ScanBuf pScanBuf, - Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) - { - Point3D extra; - - Point3D lCurr = pPoints3D[pIndex]; - final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; - Point3D lPrev = pPoints3D[lIndexPrev]; - - if(lPrev.getZ() <= 0) - { - if(lCurr.getZ() <= 0) - { - return; - } - - // Previous point not visible, but current one is: horizon crossed. - extra = findEdgeCrossing(lPrev, lCurr); - addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, - extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); - lPrev = extra; - } else - { - if(lCurr.getZ() <= 0) - { - // Previous point visible, but current is not: horizon crossed. - extra = findEdgeCrossing(lPrev, lCurr); - addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, - extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); - lCurr = extra; - } - } - - pScanBuf.addLine( - fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), - fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); - } - - private Point3D findEdgeCrossing(Point3D pPrev, Point3D pCurr) - { - double tmp = pCurr.getZ() / (pCurr.getZ() - pPrev.getZ()); - final double r0 = pCurr.getX() - tmp * (pCurr.getX() - pPrev.getX()); - final double r1 = pCurr.getY() - tmp * (pCurr.getY() - pPrev.getY()); - - tmp = Math.sqrt((r0 * r0) + (r1 * r1)); - - return new Point3D(r0 / tmp, r1 / tmp, 0); - } - - protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) - { - EdgeCrossing from; - EdgeCrossing to; - int lStart; - - if(xings[0].getType() == EdgeCrossing.XingTypeExit) - { - lStart = 0; - } else - { - from = xings[xings.length - 1]; - to = xings[0]; - addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), - to.getX(), to.getY(), to.getAngle() + 2 * Math.PI); - lStart = 1; - } - - for(int i = lStart; i < xings.length - 1; i += 2) - { - from = xings[i]; - to = xings[i + 1]; - addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), - to.getX(), to.getY(), to.getAngle()); - } - } - - private static class EdgeCrossingComparator implements Comparator - { - public int compare(Object o1, Object o2) - { - final EdgeCrossing a = (EdgeCrossing)o1; - final EdgeCrossing b = (EdgeCrossing)o2; - - return (a.getAngle() < b.getAngle()) ? -1 : (a.getAngle() > b.getAngle()) ? 1 : 0; - } - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBitGenerator.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBitGenerator.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBitGenerator.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBitGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -package com.ctreber.acearth.scanbit; - -/** - *

A ScanBitGenerator produces ScanBits.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class ScanBitGenerator -{ - int fImageHeight; - int fImageWidth; - protected ScanBit[] fScanBitsArray; - - abstract public void generateScanBits(); - - public void setImageHeight(int pImageHeight) - { - fImageHeight = pImageHeight; - } - - public void setImageWidth(int pImageWidth) - { - fImageWidth = pImageWidth; - } - - public ScanBit[] getScanBits() - { - return fScanBitsArray; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBit.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBit.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBit.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBit.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -package com.ctreber.acearth.scanbit; - -/** - *

Instruction to paint points xFrom to xTo on line y. - * - *

What I don't understand: why do values get summed to determine the - * pixel type? - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class ScanBit implements Comparable -{ - private int fY; - private int lXFrom; - private int fXTo; - private int fType; - - public ScanBit(int pY, int pLoX, int pHiX, int pType) - { - fY = pY; - lXFrom = pLoX; - fXTo = pHiX; - fType = pType; - } - - public int compareTo(Object o) - { - if(o instanceof ScanBit) - { - ScanBit lOther = (ScanBit)o; - return (fY > lOther.fY) ? 1 : (fY < lOther.fY) ? -1 : 0; - } - - throw new IllegalArgumentException("Can't compare with " + o.getClass()); - } - - public int getY() - { - return fY; - } - - public int getlXFrom() - { - return lXFrom; - } - - public int getXTo() - { - return fXTo; - } - - /** - *

See values for - * @see com.ctreber.acearth.util.Polygon - */ - public int getType() - { - return fType; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBuf.java plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBuf.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scanbit/ScanBuf.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scanbit/ScanBuf.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -package com.ctreber.acearth.scanbit; - -import java.util.ArrayList; -import java.util.List; - -import com.ctreber.aclib.sort.CTSort; -import com.ctreber.aclib.sort.QuickSort; - -/** - *

For each line, the scanbuffer (= a raster divice) records the points hit - * I.e., line 5 (y=5) contains the values 2, 6, 40, and 46 (these line have - * been crossed). The values always come as pairs because we're dealing with - * polygons, which have a left and a right side which consists of a line. - * The points in between two values painted as filled. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -class ScanBuf -{ - private List[] fScanbuf; - private int fLineMin; - private int fLineMax; - private final int fLines; - private final int fPoints; - private boolean fScanBufsAdded; - - /** - *

Create a list for each line. - * - * @param pLines Number of lines aka screen height. - * @param pPoints Number of points per line aka screen width. - */ - public ScanBuf(int pLines, int pPoints) - { - fLines = pLines; - fPoints = pPoints; - - fLineMin = Integer.MAX_VALUE; - fLineMax = Integer.MIN_VALUE; - fScanBufsAdded = false; - - fScanbuf = new ArrayList[fLines]; - for(int i = 0; i < fScanbuf.length; i++) - { - fScanbuf[i] = new ArrayList(); - } - } - - /** - *

Add a line to the generateScanBits buffer. - */ - public void addLine(double pXFrom, double pYFrom, double pXTo, double pYTo) - { - int lYFrom; - int lYTo; - - // Do some rounding (but not in the way we expect it), limit values - if(pYFrom < pYTo) - { - // Round lYFrom (but .5 is handled oddly) - // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 - lYFrom = (int)Math.ceil(pYFrom - 0.5); - // Round lYTo, substract 1 - // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 - lYTo = (int)Math.floor(pYTo - 0.5); - - /** - * I don't know if this is intended, but in Java 3 == 3.001 is false - * (the left arg is converted to double), so the expr is true only when - * pYTo - 0.5 is exactly lYTo - */ - if(lYTo == pYTo - 0.5) - { - lYTo--; - } - } else - { - lYFrom = (int)Math.ceil(pYTo - 0.5); - lYTo = (int)Math.floor(pYFrom - 0.5); - - if(lYTo == pYFrom - 0.5) - { - lYTo--; - } - } - - // Limit y to size of image - if(lYFrom < 0) - { - lYFrom = 0; - } - if(lYTo >= fLines) - { - lYTo = fLines - 1; - } - - if(lYFrom > lYTo) - { - // No lines crossed. - return; - } - - // Note min/max settings so far - if(lYFrom < fLineMin) - { - fLineMin = lYFrom; - } - if(lYTo > fLineMax) - { - fLineMax = lYTo; - } - - // todo Curious: What happens if yFrom and yTo are equal? Shit? Or can't they be? - double lDx = (pXTo - pXFrom) / (pYTo - pYFrom); - double lX = pXFrom + lDx * ((lYFrom + 0.5) - pYFrom); - - // Record the x value for every line (y). - for(int lLineNo = lYFrom; lLineNo <= lYTo; lLineNo++) - { - fScanbuf[lLineNo].add(new Double(lX)); - lX += lDx; - } - fScanBufsAdded = true; - } - - public boolean containsPoints() - { - return fScanBufsAdded; - } - - /** - *

For each line, for each x value pair in line, create one ScanBit. - */ - public List getScanbits(int pCurveType) - { - final List fScanBits = new ArrayList(); - - // For each generateScanBits line containing points - for(int lLineNo = fLineMin; lLineNo <= fLineMax; lLineNo++) - { - // Sort so that lowest x values come first. - Double[] lScanLine = (Double[])fScanbuf[lLineNo].toArray(new Double[0]); - CTSort lSort = new QuickSort(); - lSort.sort(lScanLine); - - // The length will be divisible by 2 because we render closed polyons, - // so every generateScanBits line is crossed twice (left and right edge of polygon, - // no intersections allowed!). - for(int n = 0; n < lScanLine.length; n += 2) - { - // Round lLineFrom (but .5 is handled oddly) - // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 - int lXLo = (int)Math.ceil(lScanLine[n].doubleValue() - 0.5); - // Round lLineTo, substract 1 - // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 - int lXHi = (int)Math.floor(lScanLine[n + 1].doubleValue() - 0.5); - - // Limit low and high x to image dimensions - if(lXLo < 0) - { - lXLo = 0; - } - if(lXHi >= fPoints) - { - lXHi = fPoints - 1; - } - - if(lXLo <= lXHi) - { - /** - * Shouldn't that always be true since we sorted? "Yes", BUT the - * rounding might create lo 3.6 -> 4.0 and hi 3.7 -> 3.0 - */ - fScanBits.add(new ScanBit(lLineNo, lXLo, lXHi, pCurveType)); - } - } - } - - return fScanBits; - } - - public int getYMax() - { - return fLineMax; - } - - public int getYMin() - { - return fLineMin; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorLines.java plantuml-1.2018.9/src/com/ctreber/acearth/scandot/DotGeneratorLines.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorLines.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scandot/DotGeneratorLines.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -package com.ctreber.acearth.scandot; - -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point2D; -import com.ctreber.acearth.util.Point3D; - -/** - *

Generate latitude and longitude grid as dots. - * - *

Refactored 08.11.2002 - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class DotGeneratorLines extends ScanDotGenerator -{ - private Projection fProjection; - private int fLineDivider; - private int fPointDivider; - private static final double PI = Math.PI; - private static final double TWOPI = 2 * PI; - private static final double HALFPI = PI / 2; - - public DotGeneratorLines(Projection pProjection, - int pLineDevider, int pPointDivider) - { - fProjection = pProjection; - fLineDivider = pLineDevider; - fPointDivider = pPointDivider; - } - - /** - *

Paint grid. - */ - public void generateScanDots() - { - double lLonStep = TWOPI / (fLineDivider * 4); - double lLatStep = PI / (fLineDivider * 2 * fPointDivider); - for(double lLon = -PI; lLon <= PI; lLon += lLonStep) - { - for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) - { - transformAndAddDot(new Coordinate(lLat, lLon)); - } - } - - lLatStep = TWOPI / (fLineDivider * 4); - lLonStep = PI / (fLineDivider * 2 * fPointDivider); - for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) - { - for(double lLon = -PI; lLon <= PI; lLon += lLonStep) - { - transformAndAddDot(new Coordinate(lLat, lLon)); - } - } - } - - private void transformAndAddDot(Coordinate pPos) - { - final Point3D lPointRotated = fProjection.rotate(pPos.getPoint3DRads()); - if(fProjection.isVisible(lPointRotated)) - { - Point2D lPoint = fProjection.finalize(fProjection.project2D(lPointRotated)); - if(fProjection.isWithinImage(lPoint)) - { - fDots.add(new ScanDot(ScanDot.DotTypeGrid, lPoint)); - } - } - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorStars.java plantuml-1.2018.9/src/com/ctreber/acearth/scandot/DotGeneratorStars.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scandot/DotGeneratorStars.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scandot/DotGeneratorStars.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -package com.ctreber.acearth.scandot; - -import java.util.Random; - -/** - *

Generate random stars as dots. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class DotGeneratorStars extends ScanDotGenerator -{ - private final int fImageWidth; - private final int fImageHeight; - private int fBigStars; - private double fStarFrequency; - private final Random lRandom; - - public DotGeneratorStars(int pWidth, int pHeight, - double pStarFrequency, int pBigStars, Random rnd) - { - lRandom = rnd; - fImageWidth = pWidth; - fImageHeight = pHeight; - fStarFrequency = pStarFrequency; - fBigStars = pBigStars; - } - - public void generateScanDots() - { - // Make sure stars don't jump around between updates. - // final Random lRandom = new Random(ACearth.getStartTime()); - - final int lStarsMax = (int)(fImageWidth * fImageHeight * fStarFrequency); - for(int i = 0; i < lStarsMax; i++) - { - // "-1" to leave space for big stars. - int x = (int)(lRandom.nextDouble() * (fImageWidth - 1)); - int y = (int)(lRandom.nextDouble() * fImageHeight); - - fDots.add(new ScanDot(ScanDot.DotTypeStar, x, y)); - - // A big star is just two pixels wide. - if((fBigStars != 0) && (Math.random() * 100 < fBigStars)) - { - fDots.add(new ScanDot(ScanDot.DotTypeStar, x + 1, y)); - } - } - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDotGenerator.java plantuml-1.2018.9/src/com/ctreber/acearth/scandot/ScanDotGenerator.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDotGenerator.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scandot/ScanDotGenerator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -package com.ctreber.acearth.scandot; - -import java.util.ArrayList; -import java.util.List; - - -/** - *

A ScanDotGenerator produces ScanDots. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class ScanDotGenerator -{ - List fDots = new ArrayList(); - - /** - *

Generate whatever dots are generated. - */ - abstract public void generateScanDots(); - - public List getScanDots() - { - return fDots; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDot.java plantuml-1.2018.9/src/com/ctreber/acearth/scandot/ScanDot.java --- plantuml-1.2017.15/src/com/ctreber/acearth/scandot/ScanDot.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/scandot/ScanDot.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -package com.ctreber.acearth.scandot; - -import com.ctreber.acearth.util.Point2D; - -/** - *

A single scandot (opposed to a Polygon). - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class ScanDot implements Comparable -{ - // types of dots - public static final int DotTypeStar = 0; - public static final int DotTypeGrid = 1; - - private int fX; - private int fY; - private int fType; - - public ScanDot(int pType, int pX, int pY) - { - fType = pType; - fX = pX; - fY = pY; - } - - public ScanDot(int pType, Point2D pPoint) - { - fType = pType; - fX = (int)pPoint.getX(); - fY = (int)pPoint.getY(); - } - - public int compareTo(Object o) - { - if(o instanceof ScanDot) - { - ScanDot lOther = (ScanDot)o; - - return fY > lOther.fY ? 1 : (fY < lOther.fY ? -1 : 0); - } - - throw new IllegalArgumentException("Can't compare to " + o.getClass()); - } - - public int getType() - { - return fType; - } - - public int getX() - { - return fX; - } - - public int getY() - { - return fY; - } - - public String toString() - { - return fX + ", " + fY + ": " + fType; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderDefault.java plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderDefault.java --- plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderDefault.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderDefault.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -package com.ctreber.acearth.shader; - -import java.awt.Color; - -/** - *

Shader for projections which display the whole surface.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public class ShaderDefault extends Shader -{ - public Color[] getShadedColors(int pRowNo, int[] pRowTypes) - { - final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); - - // conceptually, on each iteration of the i loop, we want: - // - // x = Math.sin(INV_XPROJECT(i)) * sqrt(1 - (y*y)); - // z = cos(INV_XPROJECT(i)) * sqrt(1 - (y*y)); - // - // computing this directly is rather expensive, however, so we only - // compute the first (i=0) pair of values directly; all other pairs - // (i>0) are obtained through successive rotations of the original - // pair (by inv_proj_scale radians). - // - - // compute initial (x, z) values - double tmp = Math.sqrt(1 - (y * y)); - double x = Math.sin(fProjection.inverseFinalizeX(0)) * tmp; - double z = Math.cos(fProjection.inverseFinalizeX(0)) * tmp; - - // compute rotation coefficients used - // to find subsequent (x, z) values - tmp = 1 / fProjection.getScale(); - final double sin_theta = Math.sin(tmp); - final double cos_theta = Math.cos(tmp); - - // save a little computation in the inner loop - final double lYBySunVectorY = y * fLightVector.getY(); - - // use i_lim to encourage compilers to register loop limit - final Color[] lColors = new Color[pRowTypes.length]; - for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) - { - double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + - (z * fLightVector.getZ()); - lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); - - // compute next (x, z) values via 2-d rotation - tmp = (cos_theta * z) - (sin_theta * x); - x = (sin_theta * z) + (cos_theta * x); - z = tmp; - } - - return lColors; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderFlat.java plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderFlat.java --- plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderFlat.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderFlat.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -package com.ctreber.acearth.shader; - -import java.awt.Color; - -/** - *

Flat shader (does not care for Projection).

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public class ShaderFlat extends Shader -{ - public Color[] getShadedColors(int pRowNo, int[] pRowTypes) - { - final Color[] lColors = new Color[pRowTypes.length]; - for(int i = 0; i < pRowTypes.length; i++) - { - lColors[i] = getShadedColorForType(pRowTypes[i], 1.0); - } - - return lColors; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/shader/Shader.java plantuml-1.2018.9/src/com/ctreber/acearth/shader/Shader.java --- plantuml-1.2017.15/src/com/ctreber/acearth/shader/Shader.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/shader/Shader.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -package com.ctreber.acearth.shader; - -import java.awt.Color; - -import com.ctreber.acearth.projection.Projection; -import com.ctreber.acearth.scanbit.BitGeneratorMap; -import com.ctreber.acearth.util.Coordinate; -import com.ctreber.acearth.util.Point3D; - -/** - *

A shader computes Colors for a row of pixel types, depending - * on lighting parameters.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class Shader -{ - private static final Color COLOR_SPACE = Color.black; - private static final Color COLOR_STAR = Color.white; - private static final Color COLOR_WATER = Color.blue; - private static final Color COLOR_LAND = Color.green; - // Brown - //static final Color COLOR_LAND = new Color(255, 136, 25); - private static final Color COLOR_GRID_LAND = Color.white; - // Bright blue - private static final Color COLOR_GRID_WATER = new Color(128, 128, 255); - - /**

Needed to calculate lighting vectors. */ - Projection fProjection; - - // Stuff below only needed when shading. - private Coordinate fSunPos; - private double fNightSideBrightness; - private double fDaySideBrightness; - private double fTerminatorDiscontinuity; - - private double fDaySideValueBase; - private double fDaySideValueRange; - Point3D fLightVector; - - abstract public Color[] getShadedColors(int pRowNo, int[] pRowTypes); - - public void init() - { - // Precompute shading parameters. I personally find the terminator - // stuff is obscure and might as well be left out. - final double tmp = fTerminatorDiscontinuity / 100; - // 100%: day, 0%: night - fDaySideValueBase = (int)(tmp * fDaySideBrightness + - (1 - tmp) * fNightSideBrightness); - fDaySideValueRange = fDaySideBrightness - fDaySideValueBase; - fLightVector = fProjection.rotate(fSunPos.getPoint3D()); - } - - Color getShadedColorForType(int pType, double pSunValue) - { - double lBrightness; - - if(pSunValue < 0) - { - // The sun is below the horizon. - lBrightness = fNightSideBrightness / 100; - } else - { - // The sun is above the horizon. The brightness will range from - // the base to the maximum value. - lBrightness = (fDaySideValueBase + pSunValue * fDaySideValueRange) / 100; - } - if(lBrightness > 1.0) - { - lBrightness = 1.0; - } - - switch(pType) - { - case BitGeneratorMap.PixTypeSpace: - return COLOR_SPACE; - - case BitGeneratorMap.PixTypeStar: - return COLOR_STAR; - - case BitGeneratorMap.PixTypeGridLand: - return shade(COLOR_GRID_LAND, lBrightness); - - case BitGeneratorMap.PixTypeGridWater: - return shade(COLOR_GRID_WATER, lBrightness); - - case BitGeneratorMap.PixTypeLand: - return shade(COLOR_LAND, lBrightness); - - case BitGeneratorMap.PixTypeWater: - return shade(COLOR_WATER, lBrightness); - } - - return null; - } - - private static Color shade(Color pColor, double pBrightness) - { - return new Color((int)(pColor.getRed() * pBrightness), - (int)(pColor.getGreen() * pBrightness), - (int)(pColor.getBlue() * pBrightness)); - } - - public void setProjection(Projection pProjection) - { - fProjection = pProjection; - } - - public void setSunPos(Coordinate pSunPos) - { - fSunPos = pSunPos; - } - - public void setDaySideBrightness(double pDaySideBrightness) - { - fDaySideBrightness = pDaySideBrightness; - } - - public void setNightSideBrightness(double pNightSideBrightness) - { - fNightSideBrightness = pNightSideBrightness; - } - - public void setTerminatorDiscontinuity(double pTerminatorDiscontinuity) - { - fTerminatorDiscontinuity = pTerminatorDiscontinuity; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderOrtho.java plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderOrtho.java --- plantuml-1.2017.15/src/com/ctreber/acearth/shader/ShaderOrtho.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/shader/ShaderOrtho.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -package com.ctreber.acearth.shader; - -import java.awt.Color; - -/** - *

Shader for the orthographic projection.

- * - *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

- * @author Christian Treber, ct@ctreber.com - * - */ -public class ShaderOrtho extends Shader -{ - private static double[] fXValues; - - public Color[] getShadedColors(int pRowNo, int[] pRowTypes) - { - if(pRowNo == 0) - { - fXValues = computeXValues(pRowTypes.length); - } - - final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); - final double tmp = 1 - (y * y); - final double lYBySunVectorY = y * fLightVector.getY(); - - final Color[] lColors = new Color[pRowTypes.length]; - for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) - { - double x = fXValues[lColNo]; - double z = Math.sqrt(tmp - (x * x)); - - double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + (z * fLightVector.getZ()); - lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); - } - - return lColors; - } - - /** - * - * @return X value for each column in image. - */ - private double[] computeXValues(int pWidth) - { - final double[] lTable = new double[pWidth]; - - for(int lColNo = 0; lColNo < pWidth; lColNo++) - { - lTable[lColNo] = fProjection.inverseProjectX(fProjection.inverseFinalizeX(lColNo)); - } - - return lTable; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/Coordinate.java plantuml-1.2018.9/src/com/ctreber/acearth/util/Coordinate.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/Coordinate.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/Coordinate.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ -package com.ctreber.acearth.util; - -import java.io.IOException; -import java.io.Writer; - -/** - *

- * Latitude and longitude coordinate. Can be used as declination and right - * ascension as well. - * - *

- * © 2002 Christian Treber, ct@ctreber.com - * - * @author Christian Treber, ct@ctreber.com - * - */ -public class Coordinate { - /* - * MeanObliquity gives the mean obliquity of the earth's axis at epoch - * 1990.0 (computed as 23.440592 degrees according to the method given in - * duffett-smith, section 27) - */ - private static final double MEAN_OBLIQUITY = 23.440592 * Toolkit.TWOPI / 360; - - // Or DE - private double fLat; - // Or RA - private double fLong; - - public Coordinate() { - } - - /** - *

- * Construct a location specfied by two angles. Your choice if in degrees or - * rads, but keep track! - * - * @param pLong - * Longitude or RA - * @param pLat - * Latitude or DE - */ - public Coordinate(double pLat, double pLong) { - fLat = pLat; - fLong = pLong; - } - - public void renderAsXML(Writer writer) throws IOException { - writer.write("\n"); - writer.write(" " + fLat + "\n"); - writer.write(" " + fLong + "\n"); - writer.write("\n"); - } - - public Point3D getPoint3D() { - final double lLatRad = Toolkit.degsToRads(fLat); - final double lLongRad = Toolkit.degsToRads(fLong); - - final double lX = Math.cos(lLatRad) * Math.sin(lLongRad); - final double lY = Math.sin(lLatRad); - final double lZ = Math.cos(lLatRad) * Math.cos(lLongRad); - - return new Point3D(lX, lY, lZ); - } - - /** - *

- * Assumes coordinate is not in degrees but rads. - * - * @return - */ - public Point3D getPoint3DRads() { - final double lX = Math.cos(fLat) * Math.sin(fLong); - final double lY = Math.sin(fLat); - final double lZ = Math.cos(fLat) * Math.cos(fLong); - - return new Point3D(lX, lY, lZ); - } - - /** - *

- * Convert from ecliptic to equatorial coordinates (after duffett-smith, - * section 27) - */ - public Coordinate eclipticToEquatorial() { - final double sin_e = Math.sin(MEAN_OBLIQUITY); - final double cos_e = Math.cos(MEAN_OBLIQUITY); - - final double lRA = Math.atan2(Math.sin(fLong) * cos_e - Math.tan(fLat) * sin_e, Math.cos(fLong)); - final double lDE = Math.asin(Math.sin(fLat) * cos_e + Math.cos(fLat) * sin_e * Math.sin(fLong)); - - return new Coordinate(lDE, lRA); - } - - /** - *

- * Add position to this position, make sure coordinates are valid. - */ - public void add(Coordinate lOther) { - fLat += lOther.fLat; - fLong += lOther.fLong; - wrap(); - } - - /** - *

- * Warp coordinates exceeding valid values. Happens when latitudes and - * longitudes are added or substracted. - */ - public void wrap() { - if (fLat > 90) { - fLat = 180 - fLat; - fLong += 180; - } else if (fLat < -90) { - fLat = -180 - fLat; - fLong += 180; - } - - if (fLong > 180) { - do { - fLong -= 360; - } while (fLong > 180); - } else if (fLong < -180) { - do { - fLong += 360; - } while (fLong < -180); - } - } - - public double getLat() { - return fLat; - } - - public double getDE() { - return fLat; - } - - public double getLong() { - return fLong; - } - - public double getRA() { - return fLong; - } - - public boolean check() { - return (-90 <= fLat) && (fLat <= 90) && (-180 <= fLong) && (fLong <= 180); - } - - public String toString() { - return "lat: " + fLat + ", long: " + fLong; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/EdgeCrossing.java plantuml-1.2018.9/src/com/ctreber/acearth/util/EdgeCrossing.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/EdgeCrossing.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/EdgeCrossing.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -package com.ctreber.acearth.util; - -/** - *

Holds information about a line crossing "the edge of Earth". - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class EdgeCrossing -{ - public static final int XingTypeEntry = 0; - public static final int XingTypeExit = 1; - - private int fType; - private int fIndex; - private double fX; - private double fY; - private double fAngle; - - public EdgeCrossing(int pType, int pIndex, double pX, double pY, double pAngle) - { - fType = pType; - fX = pX; - fY = pY; - fAngle = pAngle; - fIndex = pIndex; - } - - public String toString() - { - return fType + ": " + fX + ", " + fY + ", " + fAngle + " (" + fIndex + ")"; - } - - public int getType() - { - return fType; - } - - public double getX() - { - return fX; - } - - public double getY() - { - return fY; - } - - public double getAngle() - { - return fAngle; - } - - public int getIndex() - { - return fIndex; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/Point2D.java plantuml-1.2018.9/src/com/ctreber/acearth/util/Point2D.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/Point2D.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/Point2D.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -package com.ctreber.acearth.util; - -/** - *

A point in a 2 axis space. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class Point2D -{ - private double fX; - private double fY; - - public Point2D(double pX, double pY) - { - fX = pX; - fY = pY; - } - - public double getX() - { - return fX; - } - - public double getY() - { - return fY; - } - - public String toString() - { - return "x: " + fX + ", y: " + fY; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/Point3D.java plantuml-1.2018.9/src/com/ctreber/acearth/util/Point3D.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/Point3D.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/Point3D.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -package com.ctreber.acearth.util; - -/** - *

A point in a 2 axis space. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class Point3D -{ - private double fX; - private double fY; - private double fZ; - - public Point3D(double pX, double pY, double pZ) - { - fX = pX; - fY = pY; - fZ = pZ; - } - - public double getX() - { - return fX; - } - - public double getY() - { - return fY; - } - - public double getZ() - { - return fZ; - } - - public String toString() - { - return "x: " + fX + ", y: " + fY + ", z: " + fZ; - } - - public Coordinate getCoordinate() - { - return new Coordinate(Toolkit.radsToDegs(Math.asin(fY)), - Toolkit.radsToDegs(Math.atan2(fX, fZ))); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/Polygon.java plantuml-1.2018.9/src/com/ctreber/acearth/util/Polygon.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/Polygon.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/Polygon.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -package com.ctreber.acearth.util; - - -/** - *

A polygon in a 3 axis space. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class Polygon -{ - public static final int LAND = 1; - public static final int WATER = -1; - - private int fType; - private Point3D[] fPoints; - - public Polygon(int pType, Point3D[] pPoints) - { - fType = pType; - fPoints = pPoints; - } - - public int getType() - { - return fType; - } - - public Point3D[] getPoints() - { - return fPoints; - } - - public Point3D getPoint(int pIndex) - { - return fPoints[pIndex]; - } - - public int getSize() - { - return fPoints.length; - } - - public String toString() - { - return "Type " + fType + ", " + fPoints.length + " points"; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/StringParser.java plantuml-1.2018.9/src/com/ctreber/acearth/util/StringParser.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/StringParser.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/StringParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -package com.ctreber.acearth.util; - -import java.util.ArrayList; -import java.util.List; - -/** - *

Cuts a string in words separated by white space. Quotes and square - * brackets are recognized (that is, white space within is ignored). - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class StringParser -{ - public static List parse(String pLine) - { - final List lSections = new ArrayList(); - - // True if within word. - boolean lInSectionP = false; - // Current char - char lChar; - // Wait for this character before switching back to normal parsing. - char lSeparator = ' '; - // Part count. - int lSectionNo = 0; - // Part start position - int lSectionStart = 0; - // Part end position - int lSectionEnd = 0; - - final int lLen = pLine.length(); - for(int lCharNo = 0; lCharNo <= lLen; lCharNo++) - { - if(lCharNo < lLen) - { - lChar = pLine.charAt(lCharNo); - } else - { - // This is a fictional last character. - lChar = ' '; - } - - if(lInSectionP) - { - // In section. Termination is by space or specific separator. - if((lChar != ' ') || (lSeparator != ' ')) - { - // It's not a space, or it is a space, but we wait for a special separator. - if(lChar == lSeparator) - { - // We waited for this separator. Switch back to normal parsing. - lSeparator = ' '; - lSectionEnd = lCharNo - 1; - } else - { - lSectionEnd = lCharNo; - } - } else - { - // Section has ended (with a space). - lSections.add(pLine.substring(lSectionStart, lSectionEnd + 1)); - lSectionNo++; - lInSectionP = false; - } - } else - { - // Not in a section, skipping white space. - if(lChar != ' ') - { - // No white space: a section has started. - if(lChar == '"') - { - // Special parsing "string" - lSeparator = '"'; - lSectionStart = lCharNo + 1; - } else if(lChar == '[') - { - // Special parsing "square brackets" - lSeparator = ']'; - lSectionStart = lCharNo + 1; - } else - { - // Use normal parsing. - lSeparator = ' '; - lSectionEnd = lSectionStart = lCharNo; - } - lInSectionP = true; - } else - { - // More void... - } - } - } - - return lSections; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/SunPositionCalculator.java plantuml-1.2018.9/src/com/ctreber/acearth/util/SunPositionCalculator.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/SunPositionCalculator.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/SunPositionCalculator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,260 +0,0 @@ -package com.ctreber.acearth.util; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - -/** - *

Calculates the position of the point on Earth which is directly - * below the sun or the moon. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class SunPositionCalculator -{ - /* - * the epoch upon which these astronomical calculations are based is - * 1990 january 0.0, 631065600 seconds since the beginning of the - * "unix epoch" (00:00:00 GMT, Jan. 1, 1970) - * - * given a number of seconds since the start of the unix epoch, - * daysSinceEpoch() computes the number of days since the start of the - * astronomical epoch (1990 january 0.0) - */ - - private static final long EPOCH_START = 631065600000l; - - /* - * assuming the apparent orbit of the sun about the earth is circular, - * the rate at which the orbit progresses is given by RadsPerDay -- - * TWOPI radians per orbit divided by 365.242191 days per year: - */ - - private static final double RADS_PER_DAY = Toolkit.TWOPI / 365.242191; - - /* - * details of sun's apparent orbit at epoch 1990.0 (after - * duffett-smith, table 6, section 46) - * - * Epsilon_g (ecliptic longitude at epoch 1990.0) 279.403303 degrees - * OmegaBar_g (ecliptic longitude of perigee) 282.768422 degrees - * Eccentricity (eccentricity of orbit) 0.016713 - */ - - private static final double EPSILON_G = Toolkit.degsToRads(279.403303); - private static final double OMEGA_BAR_G = Toolkit.degsToRads(282.768422); - private static final double ECCENTRICITY = 0.016713; - - /* - * Lunar parameters, epoch January 0, 1990.0 - */ - private static final double MOON_MEAN_LONGITUDE = Toolkit.degsToRads(318.351648); - private static final double MOON_MEAN_LONGITUDE_PERIGEE = Toolkit.degsToRads(36.340410); - private static final double MOON_MEAN_LONGITUDE_NODE = Toolkit.degsToRads(318.510107); - private static final double MOON_INCLINATION = Toolkit.degsToRads(5.145396); - - private static final double SIDERAL_MONTH = 27.3217; - - /** - *

Calculate the position of the mean sun: where the sun would - * be if the earth's orbit were circular instead of ellipictal. - * - *

Verified. - * - * @param pDays days since ephemeris epoch - */ - private static double getMeanSunLongitude(double pDays) - { - double N, M; - - N = RADS_PER_DAY * pDays; - N = Toolkit.fmod(N, 0, Toolkit.TWOPI); - if(N < 0) - { - N += Toolkit.TWOPI; - } - - M = N + EPSILON_G - OMEGA_BAR_G; - if(M < 0) - { - M += Toolkit.TWOPI; - } - - return M; - } - - /** - *

Compute ecliptic longitude of sun (in radians) - * (after duffett-smith, section 47) - * - *

Verified. - * - * @param pMillis Milliseconds since unix epoch - */ - private static double getSunEclipticLongitude(long pMillis) - { - final double lDays = daysSinceEpoch(pMillis); - final double M_sun = getMeanSunLongitude(lDays); - - final double E = doKepler(M_sun); - final double v = 2 * Math.atan(Math.sqrt((1 + ECCENTRICITY) / (1 - ECCENTRICITY)) * Math.tan(E / 2)); - - return (v + OMEGA_BAR_G); - } - - static double daysSinceEpoch(long pMillis) - { - return (double)(pMillis - EPOCH_START) / 24 / 3600 / 1000; - } - - /** - * solve Kepler's equation via Newton's method - * (after duffett-smith, section 47) - * - *

Verified. - */ - private static double doKepler(double M) - { - double E; - double lDelta; - - E = M; - while(true) - { - lDelta = E - ECCENTRICITY * Math.sin(E) - M; - if(Math.abs(lDelta) <= 1e-10) - { - break; - } - E -= lDelta / (1 - ECCENTRICITY * Math.cos(E)); - } - - return E; - } - - - /** - *

computing julian dates (assuming gregorian calendar, thus this is - * only valid for dates of 1582 oct 15 or later) - * (after duffett-smith, section 4) - * - *

Verified. - * - * @param pYear year (e.g. 19xx) - * @param pMonth month (jan=1, feb=2, ...) - * @param pDay day of month - */ - private static double getJulianDate(int pYear, int pMonth, int pDay) - { - if((pMonth == 1) || (pMonth == 2)) - { - pYear -= 1; - pMonth += 12; - } - - final int A = pYear / 100; - final int B = 2 - A + (A / 4); - final int C = (int)(365.25 * pYear); - final int D = (int)(30.6001 * (pMonth + 1)); - - return B + C + D + pDay + 1720994.5; - } - - - /** - *

compute greenwich mean sidereal time (getGST) corresponding to a given - * number of milliseconds since the unix epoch - * (after duffett-smith, section 12) - * - *

Verified. - */ - private static double getGST(long pMillis) - { - final Calendar lCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - lCal.setTime(new Date(pMillis)); - - final double lJulianDate = getJulianDate(lCal.get(Calendar.YEAR), lCal.get(Calendar.MONTH) + 1, - lCal.get(Calendar.DAY_OF_MONTH)); - final double T = (lJulianDate - 2451545) / 36525; - double T0 = ((T + 2.5862e-5) * T + 2400.051336) * T + 6.697374558; - - T0 = Toolkit.fmod(T0, 0, 24.0); - if(T0 < 0) - { - T0 += 24; - } - - final double UT = lCal.get(Calendar.HOUR_OF_DAY) + - (lCal.get(Calendar.MINUTE) + lCal.get(Calendar.SECOND) / 60.0) / 60.0; - - T0 += UT * 1.002737909; - T0 = Toolkit.fmod(T0, 0, 24.0); - if(T0 < 0) - { - T0 += 24; - } - - return T0; - } - - /** - *

Given a particular time (expressed in milliseconds since the unix - * epoch), compute position on the earth (lat, lon) such that sun is - * directly overhead. - * - *

Verified. - * - * @param pMillis seconds since unix epoch - * - */ - public static Coordinate getSunPositionOnEarth(long pMillis) - { - final Coordinate lSunPosEc = new Coordinate(0.0, getSunEclipticLongitude(pMillis)); - final Coordinate lSunPosEq = lSunPosEc.eclipticToEquatorial(); - - final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); - - return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); - } - - /** - *

Given a particular time (expressed in milliseconds since the unix - * epoch), compute position on the earth (lat, lon) such that the - * moon is directly overhead. - * - * Based on duffett-smith **2nd ed** section 61; combines some steps - * into single expressions to reduce the number of extra variables. - * - *

Verified. - */ - public static Coordinate getMoonPositionOnEarth(long pMillis) - { - final double lDays = daysSinceEpoch(pMillis); - double lSunLongEc = getSunEclipticLongitude(pMillis); - final double Ms = getMeanSunLongitude(lDays); - - double L = Toolkit.limitRads(Toolkit.fmod(lDays / SIDERAL_MONTH, 0, 1.0) * Toolkit.TWOPI + MOON_MEAN_LONGITUDE); - double Mm = Toolkit.limitRads(L - Toolkit.degsToRads(0.1114041 * lDays) - MOON_MEAN_LONGITUDE_PERIGEE); - double N = Toolkit.limitRads(MOON_MEAN_LONGITUDE_NODE - Toolkit.degsToRads(0.0529539 * lDays)); - final double Ev = Toolkit.degsToRads(1.2739) * Math.sin(2.0 * (L - lSunLongEc) - Mm); - final double Ae = Toolkit.degsToRads(0.1858) * Math.sin(Ms); - Mm += Ev - Ae - Toolkit.degsToRads(0.37) * Math.sin(Ms); - final double Ec = Toolkit.degsToRads(6.2886) * Math.sin(Mm); - L += Ev + Ec - Ae + Toolkit.degsToRads(0.214) * Math.sin(2.0 * Mm); - L += Toolkit.degsToRads(0.6583) * Math.sin(2.0 * (L - lSunLongEc)); - N -= Toolkit.degsToRads(0.16) * Math.sin(Ms); - - L -= N; - lSunLongEc = Toolkit.limitRads((Math.abs(Math.cos(L)) < 1e-12) ? - (N + Math.sin(L) * Math.cos(MOON_INCLINATION) * Math.PI / 2) : - (N + Math.atan2(Math.sin(L) * Math.cos(MOON_INCLINATION), Math.cos(L)))); - final double lSunLatEc = Math.asin(Math.sin(L) * Math.sin(MOON_INCLINATION)); - - final Coordinate lSunPosEq = new Coordinate(lSunLatEc, lSunLongEc).eclipticToEquatorial(); - final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); - - return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/acearth/util/Toolkit.java plantuml-1.2018.9/src/com/ctreber/acearth/util/Toolkit.java --- plantuml-1.2017.15/src/com/ctreber/acearth/util/Toolkit.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/acearth/util/Toolkit.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -package com.ctreber.acearth.util; - -import java.util.HashSet; -import java.util.StringTokenizer; - -/** - *

Some tools. - * - *

© 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class Toolkit -{ - public static final double TWOPI = Math.PI * 2; - public static final double PI = Math.PI; - public static final double HALFPI = Math.PI / 2; - private static final HashSet fsNoCap; - - static - { - fsNoCap = new HashSet(); - fsNoCap.add("a"); - fsNoCap.add("as"); - fsNoCap.add("to"); - fsNoCap.add("of"); - fsNoCap.add("the"); - fsNoCap.add("off"); - fsNoCap.add("and"); - fsNoCap.add("mid"); - } - - public static double degsToRads(double pDegrees) - { - return pDegrees * TWOPI / 360; - } - - public static double radsToDegs(double pRadians) - { - return pRadians * 360 / TWOPI; - } - - /** - * Force an angular value into the range [-PI, +PI] - */ - public static double limitRads(double x) - { - return fmod(x, -Math.PI, Math.PI); - } - - /** - *

Verified. - */ - public static double fmod(double pValue, double pMod) - { - while(pValue < 0) - { - pValue += pMod; - } - while(pValue > pMod) - { - pValue -= pMod; - } - - return pValue; - } - - /** - *

Examples: min -2, max 2: range 4 - * - *

    - *
  • value 1: lFact = 0 - *
  • value 3: lFact = 1, value -1 - *
  • value 9: lFact = 2, value 1 - *
  • value -3: lFact = -1, value 1 - *
- */ - public static double fmod(double pValue, double pMinValue, double pMaxValue) - { - final double lRange = pMaxValue - pMinValue; - int lFact = (int)((pValue - pMinValue) / lRange); - if(pValue < pMinValue) - { - lFact--; - } - - return pValue - lFact * lRange; - } - - /** - *

Capitalize String. Uppercase words smaller/equal than 3 chars, - * lowercase defined exceptions. Capitalize within word after '.' and '-'. - * Capitalize all others. - */ - public static String intelligentCapitalize(String pText) - { - boolean lDoCap = false; - final StringTokenizer lST = new StringTokenizer(pText, ".- ", true); - final StringBuffer lSB = new StringBuffer(50); - while(lST.hasMoreTokens()) - { - String lWord = lST.nextToken(); - - if(lWord.equals(".") || lWord.equals("-")) - { - lDoCap = true; - lSB.append(lWord); - continue; - } - if(lWord.equals(" ")) - { - lDoCap = false; - lSB.append(lWord); - continue; - } - - if(lDoCap || (lWord.length() > 3)) - { - lSB.append(Character.toUpperCase(lWord.charAt(0))); - lSB.append(lWord.substring(1).toLowerCase()); - } else - { - if(fsNoCap.contains(lWord.toLowerCase())) - { - lSB.append(lWord.toLowerCase()); - } else - { - lSB.append(lWord.toUpperCase()); - } - } - } - - return lSB.toString(); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOBoolean.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOBoolean.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOBoolean.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOBoolean.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -package com.ctreber.aclib.gui; - -/** - *

- * - *

© 2002 Christian Treber, ct@ctreber.com

- * @author Christian Treber, ct@ctreber.com - * - */ -public class MOBoolean extends MonitoredObject -{ - private boolean fBoolean; - - public MOBoolean() - { - } - - public MOBoolean(boolean pBoolean) - { - fBoolean = pBoolean; - } - - public void set(boolean pValue) - { - fBoolean = pValue; - fireValueChanged(); - } - - public boolean get() - { - return fBoolean; - } - - public boolean checkRange() - { - return true; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOChangeListener.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOChangeListener.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOChangeListener.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOChangeListener.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -package com.ctreber.aclib.gui; - -/** - *

Implemented by classes interetested in MonitoredObject values changes.

- * - *

© 2002 Christian Treber, ct@ctreber.com

- * @author Christian Treber, ct@ctreber.com - * - */ -public interface MOChangeListener -{ - public void valueChanged(MonitoredObject pObject); -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MODouble.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MODouble.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MODouble.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MODouble.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -package com.ctreber.aclib.gui; - -/** - *

- * - *

© 2002 Christian Treber, ct@ctreber.com

- * @author Christian Treber, ct@ctreber.com - * - */ -public class MODouble extends MonitoredObject -{ - private double fDouble; - private boolean fCheckRange = false; - private double fMin; - private double fMax; - - public MODouble() - { - } - - public MODouble(double pDouble) - { - fDouble = pDouble; - } - - public MODouble(double pDouble, double pMin, double pMax) - { - fMin = pMin; - fMax = pMax; - fCheckRange = true; - set(pDouble); - } - - public void set(double pDouble) - { - if(!checkRange(pDouble)) - { - throw new IllegalArgumentException("Argument '" + pDouble + - "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); - } - fDouble = pDouble; - fireValueChanged(); - } - - private static String niceFormat(double pDouble) - { - if(pDouble == Double.MAX_VALUE) - { - return "Infinity"; - } - - if(pDouble == Double.MIN_VALUE) - { - return "-Infinity"; - } - - return Double.toString(pDouble); - } - - public double get() - { - return fDouble; - } - - private boolean checkRange(double pDouble) - { - return !fCheckRange || (fMin <= pDouble) && (pDouble <= fMax); - } - - public boolean checkRange() - { - return checkRange(fDouble); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOEnum.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOEnum.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOEnum.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOEnum.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -package com.ctreber.aclib.gui; - -import java.util.HashSet; - -/** - *

- * Monitored enumeration value. - *

- * - *

- * © 2002 Christian Treber, ct@ctreber.com - *

- * - * @author Christian Treber, ct@ctreber.com - * - */ -public class MOEnum extends MonitoredObject { - private HashSet fValidValues = new HashSet(); - /** - *

- * null if no value selected - */ - private Object fValue; - - public void addValidValue(Object pValue) { - fValidValues.add(pValue); - } - - public void set(Object pValue) { - if (pValue != null) { - checkValue(pValue); - } - - fValue = pValue; - fireValueChanged(); - } - - public Object get() { - return fValue; - } - - public boolean is(Object pObject) { - checkValue(pObject); - - return this.equals(pObject); - } - - public int hashCode() { - if (fValue == null) { - return 0; - } - - return fValue.hashCode(); - } - - private void checkValue(Object pValue) { - if (!fValidValues.contains(pValue)) { - throw new IllegalArgumentException("Illegal enum value '" + pValue + "'"); - } - } - - public boolean equals(Object obj) { - if (obj instanceof MOEnum) { - MOEnum lOther = (MOEnum) obj; - if (fValue == null) { - return lOther.fValue == null; - } - - return fValue.equals(lOther.fValue); - } - - if (fValue == null) { - return obj.equals(null); - } - - return fValue.equals(obj); - } - - public HashSet getValidValues() { - return fValidValues; - } - - public boolean checkRange() { - return true; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOInteger.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOInteger.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOInteger.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOInteger.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -package com.ctreber.aclib.gui; - -/** - *

- * - *

© 2002 Christian Treber, ct@ctreber.com

- * @author Christian Treber, ct@ctreber.com - * - */ -public class MOInteger extends MonitoredObject -{ - private int fInteger; - private boolean fCheckRange = false; - private int fMin; - private int fMax; - - public MOInteger() - { - } - - public MOInteger(int pInteger) - { - fInteger = pInteger; - } - - public MOInteger(int pInteger, int pMin, int pMax) - { - fMin = pMin; - fMax = pMax; - fCheckRange = true; - set(pInteger); - } - - public void set(int pInteger) - { - if(!checkRange(pInteger)) - { - throw new IllegalArgumentException("Argument '" + pInteger + - "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); - } - fInteger = pInteger; - fireValueChanged(); - } - - private static String niceFormat(int pInteger) - { - if(pInteger == Integer.MAX_VALUE) - { - return "Infinity"; - } - - if(pInteger == Integer.MIN_VALUE) - { - return "-Infinity"; - } - - return Integer.toString(pInteger); - } - - public int get() - { - return fInteger; - } - - private boolean checkRange(int pInteger) - { - return !fCheckRange || (fMin <= pInteger) && (pInteger <= fMax); - } - - public boolean checkRange() - { - return checkRange(fInteger); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MonitoredObject.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MonitoredObject.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MonitoredObject.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MonitoredObject.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -package com.ctreber.aclib.gui; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - *

- *

- * - *

- * © 2002 Christian Treber, ct@ctreber.com - *

- * - * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class MonitoredObject { - private List fListeners = new ArrayList(); - - public void addChangeListener(MOChangeListener pListener) { - fListeners.add(pListener); - } - - public void removeChangeListener(MOChangeListener pListener) { - fListeners.remove(pListener); - } - - void fireValueChanged() { - final Iterator lIt = fListeners.iterator(); - while (lIt.hasNext()) { - MOChangeListener lListener = (MOChangeListener) lIt.next(); - lListener.valueChanged(this); - } - } - - /** - *

- * Check value agains (possibly defined) constraints. - * - * @return True if value is within range or range is not checked. - */ - abstract public boolean checkRange(); -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOString.java plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOString.java --- plantuml-1.2017.15/src/com/ctreber/aclib/gui/MOString.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/gui/MOString.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -package com.ctreber.aclib.gui; - - - -/** - *

- * - *

© 2002 Christian Treber, ct@ctreber.com

- * @author Christian Treber, ct@ctreber.com - * - */ -public class MOString extends MonitoredObject -{ - private String fString; - - public MOString(String pString) - { - fString = pString; - } - - public void set(String pString) - { - fString = pString; - fireValueChanged(); - } - - public String get() - { - return fString; - } - - public boolean checkRange() - { - return true; - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/sort/CTSort.java plantuml-1.2018.9/src/com/ctreber/aclib/sort/CTSort.java --- plantuml-1.2017.15/src/com/ctreber/aclib/sort/CTSort.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/sort/CTSort.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -package com.ctreber.aclib.sort; - -import java.util.Comparator; - -/** - *

Teehee - found that Comparator allready exists. - * - * © 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -abstract public class CTSort -{ - public void sort(Object[] items) - { - sort(items, new DefaultComparator()); - } - - abstract public void sort(Object[] items, Comparator comparator); -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/sort/DefaultComparator.java plantuml-1.2018.9/src/com/ctreber/aclib/sort/DefaultComparator.java --- plantuml-1.2017.15/src/com/ctreber/aclib/sort/DefaultComparator.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/sort/DefaultComparator.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -package com.ctreber.aclib.sort; - -import java.util.Comparator; - -/** - *

Implements a default Comparator based on Comparable and a ascending - * sort order. Requires that the two objects are Comparable. - * - * © 2002 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - * - */ -public class DefaultComparator implements Comparator -{ - public int compare(Object o1, Object o2) - { - return ((Comparable)o1).compareTo(o2); - } -} diff -Nru plantuml-1.2017.15/src/com/ctreber/aclib/sort/QuickSort.java plantuml-1.2018.9/src/com/ctreber/aclib/sort/QuickSort.java --- plantuml-1.2017.15/src/com/ctreber/aclib/sort/QuickSort.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/ctreber/aclib/sort/QuickSort.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -package com.ctreber.aclib.sort; - -import java.util.Comparator; - -/** - * © 2001 Christian Treber, ct@ctreber.com - * @author Christian Treber, ct@ctreber.com - */ -public class QuickSort extends CTSort -{ - public void sort(Object[] items, Comparator comparator) - { - if(items.length <= 1) - { - // Nothing to sort t all or only one element. - return; - } - - qsort(items, comparator, 0, items.length - 1); - insertionSort(items, comparator, 0, items.length - 1); - } - - private void qsort(Object[] items, Comparator comparator, int l, int r) - { - final int M = 4; - int i; - int j; - Object v; - - if((r - l) > M) - { - i = (r + l) / 2; - if(comparator.compare(items[l], items[i]) > 0) - { - swap(items, l, i); - } - if(comparator.compare(items[l], items[r]) > 0) - { - swap(items, l, r); - } - if(comparator.compare(items[i], items[r]) > 0) - { - swap(items, i, r); - } - - j = r - 1; - swap(items, i, j); - i = l; - v = items[j]; - while(true) - { - while(comparator.compare(items[++i], v) < 0) - { - } - while(comparator.compare(items[--j], v) > 0) - { - } - if(j < i) - { - break; - } - swap(items, i, j); - } - swap(items, i, r - 1); - qsort(items, comparator, l, j); - qsort(items, comparator, i + 1, r); - } - } - - private static void swap(Object[] items, int i, int j) - { - final Object tmp; - tmp = items[i]; - items[i] = items[j]; - items[j] = tmp; - } - - private static void insertionSort(Object[] items, Comparator comparator, int lo0, int hi0) - { - int i; - int j; - Object v; - - for(i = lo0 + 1; i <= hi0; i++) - { - v = items[i]; - j = i; - while((j > lo0) && (comparator.compare(items[j - 1], v) > 0)) - { - items[j] = items[j - 1]; - j--; - } - items[j] = v; - } - } -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/BarcodeFormat.java plantuml-1.2018.9/src/com/google/zxing/BarcodeFormat.java --- plantuml-1.2017.15/src/com/google/zxing/BarcodeFormat.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/BarcodeFormat.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -import java.util.Hashtable; - -/** - * Enumerates barcode formats known to this package. - * - * @author Sean Owen - */ -public final class BarcodeFormat { - - // No, we can't use an enum here. J2ME doesn't support it. - - private static final Hashtable VALUES = new Hashtable(); - - /** QR Code 2D barcode format. */ - public static final BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE"); - - /** Data Matrix 2D barcode format. */ - public static final BarcodeFormat DATA_MATRIX = new BarcodeFormat("DATA_MATRIX"); - - /** UPC-E 1D format. */ - public static final BarcodeFormat UPC_E = new BarcodeFormat("UPC_E"); - - /** UPC-A 1D format. */ - public static final BarcodeFormat UPC_A = new BarcodeFormat("UPC_A"); - - /** EAN-8 1D format. */ - public static final BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8"); - - /** EAN-13 1D format. */ - public static final BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13"); - - /** UPC/EAN extension format. Not a stand-alone format. */ - public static final BarcodeFormat UPC_EAN_EXTENSION = new BarcodeFormat("UPC_EAN_EXTENSION"); - - /** Code 128 1D format. */ - public static final BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128"); - - /** Code 39 1D format. */ - public static final BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39"); - - /** Code 93 1D format. */ - public static final BarcodeFormat CODE_93 = new BarcodeFormat("CODE_93"); - - /** CODABAR 1D format. */ - public static final BarcodeFormat CODABAR = new BarcodeFormat("CODABAR"); - - /** ITF (Interleaved Two of Five) 1D format. */ - public static final BarcodeFormat ITF = new BarcodeFormat("ITF"); - - /** RSS 14 */ - public static final BarcodeFormat RSS14 = new BarcodeFormat("RSS14"); - - /** PDF417 format. */ - public static final BarcodeFormat PDF417 = new BarcodeFormat("PDF417"); - - /** RSS EXPANDED */ - public static final BarcodeFormat RSS_EXPANDED = new BarcodeFormat("RSS_EXPANDED"); - - private final String name; - - private BarcodeFormat(String name) { - this.name = name; - VALUES.put(name, this); - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - public static BarcodeFormat valueOf(String name) { - if (name == null || name.length() == 0) { - throw new IllegalArgumentException(); - } - BarcodeFormat format = (BarcodeFormat) VALUES.get(name); - if (format == null) { - throw new IllegalArgumentException(); - } - return format; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/ChecksumException.java plantuml-1.2018.9/src/com/google/zxing/ChecksumException.java --- plantuml-1.2017.15/src/com/google/zxing/ChecksumException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/ChecksumException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * Thrown when a barcode was successfully detected and decoded, but - * was not returned because its checksum feature failed. - * - * @author Sean Owen - */ -public final class ChecksumException extends ReaderException { - - private static final ChecksumException instance = new ChecksumException(); - - private ChecksumException() { - // do nothing - } - - public static ChecksumException getChecksumInstance() { - return instance; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/client/j2se/MatrixToImageWriter.java plantuml-1.2018.9/src/com/google/zxing/client/j2se/MatrixToImageWriter.java --- plantuml-1.2017.15/src/com/google/zxing/client/j2se/MatrixToImageWriter.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/client/j2se/MatrixToImageWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* - * Copyright 2009 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.client.j2se; - -import java.awt.image.BufferedImage; -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; - -import javax.imageio.ImageIO; - -import com.google.zxing.common.BitMatrix; - -/** - * Writes a {@link BitMatrix} to {@link BufferedImage}, - * file or stream. Provided here instead of core since it depends on - * Java SE libraries. - * - * @author Sean Owen - */ -public final class MatrixToImageWriter { - - private static final int BLACK = 0xFF000000; - private static final int WHITE = 0xFFFFFFFF; - - private MatrixToImageWriter() {} - - /** - * Renders a {@link BitMatrix} as an image, where "false" bits are rendered - * as white, and "true" bits are rendered as black. - */ - public static BufferedImage toBufferedImage(BitMatrix matrix) { - int width = matrix.getWidth(); - int height = matrix.getHeight(); - BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); - for (int x = 0; x < width; x++) { - for (int y = 0; y < height; y++) { - image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE); - } - } - return image; - } - - /** - * Writes a {@link BitMatrix} to a file. - * - * @see #toBufferedImage(BitMatrix) - */ - public static void writeToFile(BitMatrix matrix, String format, File file) - throws IOException { - BufferedImage image = toBufferedImage(matrix); - ImageIO.write(image, format, file); - } - - /** - * Writes a {@link BitMatrix} to a stream. - * - * @see #toBufferedImage(BitMatrix) - */ - public static void writeToStream(BitMatrix matrix, String format, OutputStream stream) - throws IOException { - BufferedImage image = toBufferedImage(matrix); - ImageIO.write(image, format, stream); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/BitArray.java plantuml-1.2018.9/src/com/google/zxing/common/BitArray.java --- plantuml-1.2017.15/src/com/google/zxing/common/BitArray.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/BitArray.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,247 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -/** - *

A simple, fast array of bits, represented compactly by an array of ints internally.

- * - * @author Sean Owen - */ -public final class BitArray { - - // TODO: I have changed these members to be public so ProGuard can inline get() and set(). Ideally - // they'd be private and we'd use the -allowaccessmodification flag, but Dalvik rejects the - // resulting binary at runtime on Android. If we find a solution to this, these should be changed - // back to private. - public int[] bits; - public int size; - - public BitArray() { - this.size = 0; - this.bits = new int[1]; - } - - public BitArray(int size) { - this.size = size; - this.bits = makeArray(size); - } - - public int getSize() { - return size; - } - - public int getSizeInBytes() { - return (size + 7) >> 3; - } - - private void ensureCapacity(int size) { - if (size > bits.length << 5) { - int[] newBits = makeArray(size); - System.arraycopy(bits, 0, newBits, 0, bits.length); - this.bits = newBits; - } - } - - /** - * @param i bit to get - * @return true iff bit i is set - */ - public boolean get(int i) { - return (bits[i >> 5] & (1 << (i & 0x1F))) != 0; - } - - /** - * Sets bit i. - * - * @param i bit to set - */ - public void set(int i) { - bits[i >> 5] |= 1 << (i & 0x1F); - } - - /** - * Flips bit i. - * - * @param i bit to set - */ - public void flip(int i) { - bits[i >> 5] ^= 1 << (i & 0x1F); - } - - /** - * Sets a block of 32 bits, starting at bit i. - * - * @param i first bit to set - * @param newBits the new value of the next 32 bits. Note again that the least-significant bit - * corresponds to bit i, the next-least-significant to i+1, and so on. - */ - public void setBulk(int i, int newBits) { - bits[i >> 5] = newBits; - } - - /** - * Clears all bits (sets to false). - */ - public void clear() { - int max = bits.length; - for (int i = 0; i < max; i++) { - bits[i] = 0; - } - } - - /** - * Efficient method to check if a range of bits is set, or not set. - * - * @param start start of range, inclusive. - * @param end end of range, exclusive - * @param value if true, checks that bits in range are set, otherwise checks that they are not set - * @return true iff all bits are set or not set in range, according to value argument - * @throws IllegalArgumentException if end is less than or equal to start - */ - public boolean isRange(int start, int end, boolean value) { - if (end < start) { - throw new IllegalArgumentException(); - } - if (end == start) { - return true; // empty range matches - } - end--; // will be easier to treat this as the last actually set bit -- inclusive - int firstInt = start >> 5; - int lastInt = end >> 5; - for (int i = firstInt; i <= lastInt; i++) { - int firstBit = i > firstInt ? 0 : start & 0x1F; - int lastBit = i < lastInt ? 31 : end & 0x1F; - int mask; - if (firstBit == 0 && lastBit == 31) { - mask = -1; - } else { - mask = 0; - for (int j = firstBit; j <= lastBit; j++) { - mask |= 1 << j; - } - } - - // Return false if we're looking for 1s and the masked bits[i] isn't all 1s (that is, - // equals the mask, or we're looking for 0s and the masked portion is not all 0s - if ((bits[i] & mask) != (value ? mask : 0)) { - return false; - } - } - return true; - } - - public void appendBit(boolean bit) { - ensureCapacity(size + 1); - if (bit) { - bits[size >> 5] |= (1 << (size & 0x1F)); - } - size++; - } - - /** - * Appends the least-significant bits, from value, in order from most-significant to - * least-significant. For example, appending 6 bits from 0x000001E will append the bits - * 0, 1, 1, 1, 1, 0 in that order. - */ - public void appendBits(int value, int numBits) { - if (numBits < 0 || numBits > 32) { - throw new IllegalArgumentException("Num bits must be between 0 and 32"); - } - ensureCapacity(size + numBits); - for (int numBitsLeft = numBits; numBitsLeft > 0; numBitsLeft--) { - appendBit(((value >> (numBitsLeft - 1)) & 0x01) == 1); - } - } - - public void appendBitArray(BitArray other) { - int otherSize = other.getSize(); - ensureCapacity(size + otherSize); - for (int i = 0; i < otherSize; i++) { - appendBit(other.get(i)); - } - } - - public void xor(BitArray other) { - if (bits.length != other.bits.length) { - throw new IllegalArgumentException("Sizes don't match"); - } - for (int i = 0; i < bits.length; i++) { - // The last byte could be incomplete (i.e. not have 8 bits in - // it) but there is no problem since 0 XOR 0 == 0. - bits[i] ^= other.bits[i]; - } - } - - /** - * - * @param bitOffset first bit to start writing - * @param array array to write into. Bytes are written most-significant byte first. This is the opposite - * of the internal representation, which is exposed by {@link #getBitArray()} - * @param offset position in array to start writing - * @param numBytes how many bytes to write - */ - public void toBytes(int bitOffset, byte[] array, int offset, int numBytes) { - for (int i = 0; i < numBytes; i++) { - int theByte = 0; - for (int j = 0; j < 8; j++) { - if (get(bitOffset)) { - theByte |= 1 << (7 - j); - } - bitOffset++; - } - array[offset + i] = (byte) theByte; - } - } - - /** - * @return underlying array of ints. The first element holds the first 32 bits, and the least - * significant bit is bit 0. - */ - public int[] getBitArray() { - return bits; - } - - /** - * Reverses all bits in the array. - */ - public void reverse() { - int[] newBits = new int[bits.length]; - int size = this.size; - for (int i = 0; i < size; i++) { - if (get(size - i - 1)) { - newBits[i >> 5] |= 1 << (i & 0x1F); - } - } - bits = newBits; - } - - private static int[] makeArray(int size) { - return new int[(size + 31) >> 5]; - } - - public String toString() { - StringBuffer result = new StringBuffer(size); - for (int i = 0; i < size; i++) { - if ((i & 0x07) == 0) { - result.append(' '); - } - result.append(get(i) ? 'X' : '.'); - } - return result.toString(); - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/BitMatrix.java plantuml-1.2018.9/src/com/google/zxing/common/BitMatrix.java --- plantuml-1.2017.15/src/com/google/zxing/common/BitMatrix.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/BitMatrix.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -/** - *

Represents a 2D matrix of bits. In function arguments below, and throughout the common - * module, x is the column position, and y is the row position. The ordering is always x, y. - * The origin is at the top-left.

- * - *

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins - * with a new int. This is done intentionally so that we can copy out a row into a BitArray very - * efficiently.

- * - *

The ordering of bits is row-major. Within each int, the least significant bits are used first, - * meaning they represent lower x values. This is compatible with BitArray's implementation.

- * - * @author Sean Owen - * @author dswitkin@google.com (Daniel Switkin) - */ -public final class BitMatrix { - - // TODO: Just like BitArray, these need to be public so ProGuard can inline them. - public final int width; - public final int height; - public final int rowSize; - public final int[] bits; - - // A helper to construct a square matrix. - public BitMatrix(int dimension) { - this(dimension, dimension); - } - - public BitMatrix(int width, int height) { - if (width < 1 || height < 1) { - throw new IllegalArgumentException("Both dimensions must be greater than 0"); - } - this.width = width; - this.height = height; - this.rowSize = (width + 31) >> 5; - bits = new int[rowSize * height]; - } - - /** - *

Gets the requested bit, where true means black.

- * - * @param x The horizontal component (i.e. which column) - * @param y The vertical component (i.e. which row) - * @return value of given bit in matrix - */ - public boolean get(int x, int y) { - int offset = y * rowSize + (x >> 5); - return ((bits[offset] >>> (x & 0x1f)) & 1) != 0; - } - - /** - *

Sets the given bit to true.

- * - * @param x The horizontal component (i.e. which column) - * @param y The vertical component (i.e. which row) - */ - public void set(int x, int y) { - int offset = y * rowSize + (x >> 5); - bits[offset] |= 1 << (x & 0x1f); - } - - /** - *

Flips the given bit.

- * - * @param x The horizontal component (i.e. which column) - * @param y The vertical component (i.e. which row) - */ - public void flip(int x, int y) { - int offset = y * rowSize + (x >> 5); - bits[offset] ^= 1 << (x & 0x1f); - } - - /** - * Clears all bits (sets to false). - */ - public void clear() { - int max = bits.length; - for (int i = 0; i < max; i++) { - bits[i] = 0; - } - } - - /** - *

Sets a square region of the bit matrix to true.

- * - * @param left The horizontal position to begin at (inclusive) - * @param top The vertical position to begin at (inclusive) - * @param width The width of the region - * @param height The height of the region - */ - public void setRegion(int left, int top, int width, int height) { - if (top < 0 || left < 0) { - throw new IllegalArgumentException("Left and top must be nonnegative"); - } - if (height < 1 || width < 1) { - throw new IllegalArgumentException("Height and width must be at least 1"); - } - int right = left + width; - int bottom = top + height; - if (bottom > this.height || right > this.width) { - throw new IllegalArgumentException("The region must fit inside the matrix"); - } - for (int y = top; y < bottom; y++) { - int offset = y * rowSize; - for (int x = left; x < right; x++) { - bits[offset + (x >> 5)] |= 1 << (x & 0x1f); - } - } - } - - /** - * A fast method to retrieve one row of data from the matrix as a BitArray. - * - * @param y The row to retrieve - * @param row An optional caller-allocated BitArray, will be allocated if null or too small - * @return The resulting BitArray - this reference should always be used even when passing - * your own row - */ - public BitArray getRow(int y, BitArray row) { - if (row == null || row.getSize() < width) { - row = new BitArray(width); - } - int offset = y * rowSize; - for (int x = 0; x < rowSize; x++) { - row.setBulk(x << 5, bits[offset + x]); - } - return row; - } - - /** - * This is useful in detecting a corner of a 'pure' barcode. - * - * @return {x,y} coordinate of top-left-most 1 bit, or null if it is all white - */ - public int[] getTopLeftOnBit() { - int bitsOffset = 0; - while (bitsOffset < bits.length && bits[bitsOffset] == 0) { - bitsOffset++; - } - if (bitsOffset == bits.length) { - return null; - } - int y = bitsOffset / rowSize; - int x = (bitsOffset % rowSize) << 5; - - int theBits = bits[bitsOffset]; - int bit = 0; - while ((theBits << (31-bit)) == 0) { - bit++; - } - x += bit; - return new int[] {x, y}; - } - - /** - * @return The width of the matrix - */ - public int getWidth() { - return width; - } - - /** - * @return The height of the matrix - */ - public int getHeight() { - return height; - } - - public boolean equals(Object o) { - if (!(o instanceof BitMatrix)) { - return false; - } - BitMatrix other = (BitMatrix) o; - if (width != other.width || height != other.height || - rowSize != other.rowSize || bits.length != other.bits.length) { - return false; - } - for (int i = 0; i < bits.length; i++) { - if (bits[i] != other.bits[i]) { - return false; - } - } - return true; - } - - public int hashCode() { - int hash = width; - hash = 31 * hash + width; - hash = 31 * hash + height; - hash = 31 * hash + rowSize; - for (int i = 0; i < bits.length; i++) { - hash = 31 * hash + bits[i]; - } - return hash; - } - - public String toString() { - StringBuffer result = new StringBuffer(height * (width + 1)); - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - result.append(get(x, y) ? "X " : " "); - } - result.append('\n'); - } - return result.toString(); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/BitSource.java plantuml-1.2018.9/src/com/google/zxing/common/BitSource.java --- plantuml-1.2017.15/src/com/google/zxing/common/BitSource.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/BitSource.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -/** - *

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the - * number of bits read is not often a multiple of 8.

- * - *

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array - * it passed in, in which case all bets are off.

- * - * @author Sean Owen - */ -public final class BitSource { - - private final byte[] bytes; - private int byteOffset; - private int bitOffset; - - /** - * @param bytes bytes from which this will read bits. Bits will be read from the first byte first. - * Bits are read within a byte from most-significant to least-significant bit. - */ - public BitSource(byte[] bytes) { - this.bytes = bytes; - } - - /** - * @param numBits number of bits to read - * @return int representing the bits read. The bits will appear as the least-significant - * bits of the int - * @throws IllegalArgumentException if numBits isn't in [1,32] - */ - public int readBits(int numBits) { - if (numBits < 1 || numBits > 32) { - throw new IllegalArgumentException(); - } - - int result = 0; - - // First, read remainder from current byte - if (bitOffset > 0) { - int bitsLeft = 8 - bitOffset; - int toRead = numBits < bitsLeft ? numBits : bitsLeft; - int bitsToNotRead = bitsLeft - toRead; - int mask = (0xFF >> (8 - toRead)) << bitsToNotRead; - result = (bytes[byteOffset] & mask) >> bitsToNotRead; - numBits -= toRead; - bitOffset += toRead; - if (bitOffset == 8) { - bitOffset = 0; - byteOffset++; - } - } - - // Next read whole bytes - if (numBits > 0) { - while (numBits >= 8) { - result = (result << 8) | (bytes[byteOffset] & 0xFF); - byteOffset++; - numBits -= 8; - } - - // Finally read a partial byte - if (numBits > 0) { - int bitsToNotRead = 8 - numBits; - int mask = (0xFF >> bitsToNotRead) << bitsToNotRead; - result = (result << numBits) | ((bytes[byteOffset] & mask) >> bitsToNotRead); - bitOffset += numBits; - } - } - - return result; - } - - /** - * @return number of bits that can be read successfully - */ - public int available() { - return 8 * (bytes.length - byteOffset) - bitOffset; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/CharacterSetECI.java plantuml-1.2018.9/src/com/google/zxing/common/CharacterSetECI.java --- plantuml-1.2017.15/src/com/google/zxing/common/CharacterSetECI.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/CharacterSetECI.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -import java.util.Hashtable; - -/** - * Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 - * of ISO 18004. - * - * @author Sean Owen - */ -public final class CharacterSetECI extends ECI { - - private static Hashtable VALUE_TO_ECI; - private static Hashtable NAME_TO_ECI; - - private static void initialize() { - VALUE_TO_ECI = new Hashtable(29); - NAME_TO_ECI = new Hashtable(29); - // TODO figure out if these values are even right! - addCharacterSet(0, "Cp437"); - addCharacterSet(1, new String[] {"ISO8859_1", "ISO-8859-1"}); - addCharacterSet(2, "Cp437"); - addCharacterSet(3, new String[] {"ISO8859_1", "ISO-8859-1"}); - addCharacterSet(4, "ISO8859_2"); - addCharacterSet(5, "ISO8859_3"); - addCharacterSet(6, "ISO8859_4"); - addCharacterSet(7, "ISO8859_5"); - addCharacterSet(8, "ISO8859_6"); - addCharacterSet(9, "ISO8859_7"); - addCharacterSet(10, "ISO8859_8"); - addCharacterSet(11, "ISO8859_9"); - addCharacterSet(12, "ISO8859_10"); - addCharacterSet(13, "ISO8859_11"); - addCharacterSet(15, "ISO8859_13"); - addCharacterSet(16, "ISO8859_14"); - addCharacterSet(17, "ISO8859_15"); - addCharacterSet(18, "ISO8859_16"); - addCharacterSet(20, new String[] {"SJIS", "Shift_JIS"}); - } - - private final String encodingName; - - private CharacterSetECI(int value, String encodingName) { - super(value); - this.encodingName = encodingName; - } - - public String getEncodingName() { - return encodingName; - } - - private static void addCharacterSet(int value, String encodingName) { - CharacterSetECI eci = new CharacterSetECI(value, encodingName); - VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf - NAME_TO_ECI.put(encodingName, eci); - } - - private static void addCharacterSet(int value, String[] encodingNames) { - CharacterSetECI eci = new CharacterSetECI(value, encodingNames[0]); - VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf - for (int i = 0; i < encodingNames.length; i++) { - NAME_TO_ECI.put(encodingNames[i], eci); - } - } - - /** - * @param value character set ECI value - * @return {@link CharacterSetECI} representing ECI of given value, or null if it is legal but - * unsupported - * @throws IllegalArgumentException if ECI value is invalid - */ - public static CharacterSetECI getCharacterSetECIByValue(int value) { - if (VALUE_TO_ECI == null) { - initialize(); - } - if (value < 0 || value >= 900) { - throw new IllegalArgumentException("Bad ECI value: " + value); - } - return (CharacterSetECI) VALUE_TO_ECI.get(new Integer(value)); - } - - /** - * @param name character set ECI encoding name - * @return {@link CharacterSetECI} representing ECI for character encoding, or null if it is legal - * but unsupported - */ - public static CharacterSetECI getCharacterSetECIByName(String name) { - if (NAME_TO_ECI == null) { - initialize(); - } - return (CharacterSetECI) NAME_TO_ECI.get(name); - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/DecoderResult.java plantuml-1.2018.9/src/com/google/zxing/common/DecoderResult.java --- plantuml-1.2017.15/src/com/google/zxing/common/DecoderResult.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/DecoderResult.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -import java.util.Vector; - -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; - -/** - *

Encapsulates the result of decoding a matrix of bits. This typically - * applies to 2D barcode formats. For now it contains the raw bytes obtained, - * as well as a String interpretation of those bytes, if applicable.

- * - * @author Sean Owen - */ -public final class DecoderResult { - - private final byte[] rawBytes; - private final String text; - private final Vector byteSegments; - private final ErrorCorrectionLevel ecLevel; - - public DecoderResult(byte[] rawBytes, String text, Vector byteSegments, ErrorCorrectionLevel ecLevel) { - if (rawBytes == null && text == null) { - throw new IllegalArgumentException(); - } - this.rawBytes = rawBytes; - this.text = text; - this.byteSegments = byteSegments; - this.ecLevel = ecLevel; - } - - public byte[] getRawBytes() { - return rawBytes; - } - - public String getText() { - return text; - } - - public Vector getByteSegments() { - return byteSegments; - } - - public ErrorCorrectionLevel getECLevel() { - return ecLevel; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/DetectorResult.java plantuml-1.2018.9/src/com/google/zxing/common/DetectorResult.java --- plantuml-1.2017.15/src/com/google/zxing/common/DetectorResult.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/DetectorResult.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -import com.google.zxing.ResultPoint; - -/** - *

Encapsulates the result of detecting a barcode in an image. This includes the raw - * matrix of black/white pixels corresponding to the barcode, and possibly points of interest - * in the image, like the location of finder patterns or corners of the barcode in the image.

- * - * @author Sean Owen - */ -public final class DetectorResult { - - private final BitMatrix bits; - private final ResultPoint[] points; - - public DetectorResult(BitMatrix bits, ResultPoint[] points) { - this.bits = bits; - this.points = points; - } - - public BitMatrix getBits() { - return bits; - } - - public ResultPoint[] getPoints() { - return points; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/ECI.java plantuml-1.2018.9/src/com/google/zxing/common/ECI.java --- plantuml-1.2017.15/src/com/google/zxing/common/ECI.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/ECI.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -/** - * Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" - * 5.3 of ISO 18004. - * - * @author Sean Owen - */ -public abstract class ECI { - - private final int value; - - ECI(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - - /** - * @param value ECI value - * @return {@link ECI} representing ECI of given value, or null if it is legal but unsupported - * @throws IllegalArgumentException if ECI value is invalid - */ - public static ECI getECIByValue(int value) { - if (value < 0 || value > 999999) { - throw new IllegalArgumentException("Bad ECI value: " + value); - } - if (value < 900) { // Character set ECIs use 000000 - 000899 - return CharacterSetECI.getCharacterSetECIByValue(value); - } - return null; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256.java plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/GF256.java --- plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/GF256.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common.reedsolomon; - -/** - *

This class contains utility methods for performing mathematical operations over - * the Galois Field GF(256). Operations use a given primitive polynomial in calculations.

- * - *

Throughout this package, elements of GF(256) are represented as an int - * for convenience and speed (but at the cost of memory). - * Only the bottom 8 bits are really used.

- * - * @author Sean Owen - */ -public final class GF256 { - - public static final GF256 QR_CODE_FIELD = new GF256(0x011D); // x^8 + x^4 + x^3 + x^2 + 1 - public static final GF256 DATA_MATRIX_FIELD = new GF256(0x012D); // x^8 + x^5 + x^3 + x^2 + 1 - - private final int[] expTable; - private final int[] logTable; - private final GF256Poly zero; - private final GF256Poly one; - - /** - * Create a representation of GF(256) using the given primitive polynomial. - * - * @param primitive irreducible polynomial whose coefficients are represented by - * the bits of an int, where the least-significant bit represents the constant - * coefficient - */ - private GF256(int primitive) { - expTable = new int[256]; - logTable = new int[256]; - int x = 1; - for (int i = 0; i < 256; i++) { - expTable[i] = x; - x <<= 1; // x = x * 2; we're assuming the generator alpha is 2 - if (x >= 0x100) { - x ^= primitive; - } - } - for (int i = 0; i < 255; i++) { - logTable[expTable[i]] = i; - } - // logTable[0] == 0 but this should never be used - zero = new GF256Poly(this, new int[]{0}); - one = new GF256Poly(this, new int[]{1}); - } - - GF256Poly getZero() { - return zero; - } - - GF256Poly getOne() { - return one; - } - - /** - * @return the monomial representing coefficient * x^degree - */ - GF256Poly buildMonomial(int degree, int coefficient) { - if (degree < 0) { - throw new IllegalArgumentException(); - } - if (coefficient == 0) { - return zero; - } - int[] coefficients = new int[degree + 1]; - coefficients[0] = coefficient; - return new GF256Poly(this, coefficients); - } - - /** - * Implements both addition and subtraction -- they are the same in GF(256). - * - * @return sum/difference of a and b - */ - static int addOrSubtract(int a, int b) { - return a ^ b; - } - - /** - * @return 2 to the power of a in GF(256) - */ - int exp(int a) { - return expTable[a]; - } - - /** - * @return base 2 log of a in GF(256) - */ - int log(int a) { - if (a == 0) { - throw new IllegalArgumentException(); - } - return logTable[a]; - } - - /** - * @return multiplicative inverse of a - */ - int inverse(int a) { - if (a == 0) { - throw new ArithmeticException(); - } - return expTable[255 - logTable[a]]; - } - - /** - * @param a - * @param b - * @return product of a and b in GF(256) - */ - int multiply(int a, int b) { - if (a == 0 || b == 0) { - return 0; - } - int logSum = logTable[a] + logTable[b]; - // index is a sped-up alternative to logSum % 255 since sum - // is in [0,510]. Thanks to jmsachs for the idea - return expTable[(logSum & 0xFF) + (logSum >>> 8)]; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256Poly.java plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/GF256Poly.java --- plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/GF256Poly.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/GF256Poly.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,263 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common.reedsolomon; - -/** - *

Represents a polynomial whose coefficients are elements of GF(256). - * Instances of this class are immutable.

- * - *

Much credit is due to William Rucklidge since portions of this code are an indirect - * port of his C++ Reed-Solomon implementation.

- * - * @author Sean Owen - */ -final class GF256Poly { - - private final GF256 field; - private final int[] coefficients; - - /** - * @param field the {@link GF256} instance representing the field to use - * to perform computations - * @param coefficients coefficients as ints representing elements of GF(256), arranged - * from most significant (highest-power term) coefficient to least significant - * @throws IllegalArgumentException if argument is null or empty, - * or if leading coefficient is 0 and this is not a - * constant polynomial (that is, it is not the monomial "0") - */ - GF256Poly(GF256 field, int[] coefficients) { - if (coefficients == null || coefficients.length == 0) { - throw new IllegalArgumentException(); - } - this.field = field; - int coefficientsLength = coefficients.length; - if (coefficientsLength > 1 && coefficients[0] == 0) { - // Leading term must be non-zero for anything except the constant polynomial "0" - int firstNonZero = 1; - while (firstNonZero < coefficientsLength && coefficients[firstNonZero] == 0) { - firstNonZero++; - } - if (firstNonZero == coefficientsLength) { - this.coefficients = field.getZero().coefficients; - } else { - this.coefficients = new int[coefficientsLength - firstNonZero]; - System.arraycopy(coefficients, - firstNonZero, - this.coefficients, - 0, - this.coefficients.length); - } - } else { - this.coefficients = coefficients; - } - } - - int[] getCoefficients() { - return coefficients; - } - - /** - * @return degree of this polynomial - */ - int getDegree() { - return coefficients.length - 1; - } - - /** - * @return true iff this polynomial is the monomial "0" - */ - boolean isZero() { - return coefficients[0] == 0; - } - - /** - * @return coefficient of x^degree term in this polynomial - */ - int getCoefficient(int degree) { - return coefficients[coefficients.length - 1 - degree]; - } - - /** - * @return evaluation of this polynomial at a given point - */ - int evaluateAt(int a) { - if (a == 0) { - // Just return the x^0 coefficient - return getCoefficient(0); - } - int size = coefficients.length; - if (a == 1) { - // Just the sum of the coefficients - int result = 0; - for (int i = 0; i < size; i++) { - result = GF256.addOrSubtract(result, coefficients[i]); - } - return result; - } - int result = coefficients[0]; - for (int i = 1; i < size; i++) { - result = GF256.addOrSubtract(field.multiply(a, result), coefficients[i]); - } - return result; - } - - GF256Poly addOrSubtract(GF256Poly other) { - if (!field.equals(other.field)) { - throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); - } - if (isZero()) { - return other; - } - if (other.isZero()) { - return this; - } - - int[] smallerCoefficients = this.coefficients; - int[] largerCoefficients = other.coefficients; - if (smallerCoefficients.length > largerCoefficients.length) { - int[] temp = smallerCoefficients; - smallerCoefficients = largerCoefficients; - largerCoefficients = temp; - } - int[] sumDiff = new int[largerCoefficients.length]; - int lengthDiff = largerCoefficients.length - smallerCoefficients.length; - // Copy high-order terms only found in higher-degree polynomial's coefficients - System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff); - - for (int i = lengthDiff; i < largerCoefficients.length; i++) { - sumDiff[i] = GF256.addOrSubtract(smallerCoefficients[i - lengthDiff], largerCoefficients[i]); - } - - return new GF256Poly(field, sumDiff); - } - - GF256Poly multiply(GF256Poly other) { - if (!field.equals(other.field)) { - throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); - } - if (isZero() || other.isZero()) { - return field.getZero(); - } - int[] aCoefficients = this.coefficients; - int aLength = aCoefficients.length; - int[] bCoefficients = other.coefficients; - int bLength = bCoefficients.length; - int[] product = new int[aLength + bLength - 1]; - for (int i = 0; i < aLength; i++) { - int aCoeff = aCoefficients[i]; - for (int j = 0; j < bLength; j++) { - product[i + j] = GF256.addOrSubtract(product[i + j], - field.multiply(aCoeff, bCoefficients[j])); - } - } - return new GF256Poly(field, product); - } - - GF256Poly multiply(int scalar) { - if (scalar == 0) { - return field.getZero(); - } - if (scalar == 1) { - return this; - } - int size = coefficients.length; - int[] product = new int[size]; - for (int i = 0; i < size; i++) { - product[i] = field.multiply(coefficients[i], scalar); - } - return new GF256Poly(field, product); - } - - GF256Poly multiplyByMonomial(int degree, int coefficient) { - if (degree < 0) { - throw new IllegalArgumentException(); - } - if (coefficient == 0) { - return field.getZero(); - } - int size = coefficients.length; - int[] product = new int[size + degree]; - for (int i = 0; i < size; i++) { - product[i] = field.multiply(coefficients[i], coefficient); - } - return new GF256Poly(field, product); - } - - GF256Poly[] divide(GF256Poly other) { - if (!field.equals(other.field)) { - throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); - } - if (other.isZero()) { - throw new IllegalArgumentException("Divide by 0"); - } - - GF256Poly quotient = field.getZero(); - GF256Poly remainder = this; - - int denominatorLeadingTerm = other.getCoefficient(other.getDegree()); - int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm); - - while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) { - int degreeDifference = remainder.getDegree() - other.getDegree(); - int scale = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm); - GF256Poly term = other.multiplyByMonomial(degreeDifference, scale); - GF256Poly iterationQuotient = field.buildMonomial(degreeDifference, scale); - quotient = quotient.addOrSubtract(iterationQuotient); - remainder = remainder.addOrSubtract(term); - } - - return new GF256Poly[] { quotient, remainder }; - } - - public String toString() { - StringBuffer result = new StringBuffer(8 * getDegree()); - for (int degree = getDegree(); degree >= 0; degree--) { - int coefficient = getCoefficient(degree); - if (coefficient != 0) { - if (coefficient < 0) { - result.append(" - "); - coefficient = -coefficient; - } else { - if (result.length() > 0) { - result.append(" + "); - } - } - if (degree == 0 || coefficient != 1) { - int alphaPower = field.log(coefficient); - if (alphaPower == 0) { - result.append('1'); - } else if (alphaPower == 1) { - result.append('a'); - } else { - result.append("a^"); - result.append(alphaPower); - } - } - if (degree != 0) { - if (degree == 1) { - result.append('x'); - } else { - result.append("x^"); - result.append(degree); - } - } - } - } - return result.toString(); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java --- plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common.reedsolomon; - -import java.util.Vector; - -/** - *

Implements Reed-Solomon enbcoding, as the name implies.

- * - * @author Sean Owen - * @author William Rucklidge - */ -public final class ReedSolomonEncoder { - - private final GF256 field; - private final Vector cachedGenerators; - - public ReedSolomonEncoder(GF256 field) { - if (!GF256.QR_CODE_FIELD.equals(field)) { - throw new IllegalArgumentException("Only QR Code is supported at this time"); - } - this.field = field; - this.cachedGenerators = new Vector(); - cachedGenerators.addElement(new GF256Poly(field, new int[] { 1 })); - } - - private GF256Poly buildGenerator(int degree) { - if (degree >= cachedGenerators.size()) { - GF256Poly lastGenerator = (GF256Poly) cachedGenerators.elementAt(cachedGenerators.size() - 1); - for (int d = cachedGenerators.size(); d <= degree; d++) { - GF256Poly nextGenerator = lastGenerator.multiply(new GF256Poly(field, new int[] { 1, field.exp(d - 1) })); - cachedGenerators.addElement(nextGenerator); - lastGenerator = nextGenerator; - } - } - return (GF256Poly) cachedGenerators.elementAt(degree); - } - - public void encode(int[] toEncode, int ecBytes) { - if (ecBytes == 0) { - throw new IllegalArgumentException("No error correction bytes"); - } - int dataBytes = toEncode.length - ecBytes; - if (dataBytes <= 0) { - throw new IllegalArgumentException("No data bytes provided"); - } - GF256Poly generator = buildGenerator(ecBytes); - int[] infoCoefficients = new int[dataBytes]; - System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes); - GF256Poly info = new GF256Poly(field, infoCoefficients); - info = info.multiplyByMonomial(ecBytes, 1); - GF256Poly remainder = info.divide(generator)[1]; - int[] coefficients = remainder.getCoefficients(); - int numZeroCoefficients = ecBytes - coefficients.length; - for (int i = 0; i < numZeroCoefficients; i++) { - toEncode[dataBytes + i] = 0; - } - System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java --- plantuml-1.2017.15/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common.reedsolomon; - -/** - *

Thrown when an exception occurs during Reed-Solomon decoding, such as when - * there are too many errors to correct.

- * - * @author Sean Owen - */ -public final class ReedSolomonException extends Exception { - - public ReedSolomonException(String message) { - super(message); - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/common/StringUtils.java plantuml-1.2018.9/src/com/google/zxing/common/StringUtils.java --- plantuml-1.2017.15/src/com/google/zxing/common/StringUtils.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/common/StringUtils.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ -/* - * Copyright (C) 2010 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.common; - -import java.util.Hashtable; - -import com.google.zxing.DecodeHintType; - -/** - * Common string-related functions. - * - * @author Sean Owen - */ -public final class StringUtils { - - private static final String PLATFORM_DEFAULT_ENCODING = - System.getProperty("file.encoding"); - public static final String SHIFT_JIS = "SJIS"; - private static final String EUC_JP = "EUC_JP"; - private static final String UTF8 = "UTF8"; - private static final String ISO88591 = "ISO8859_1"; - private static final boolean ASSUME_SHIFT_JIS = - SHIFT_JIS.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING) || - EUC_JP.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING); - - private StringUtils() {} - - /** - * @param bytes bytes encoding a string, whose encoding should be guessed - * @param hints decode hints if applicable - * @return name of guessed encoding; at the moment will only guess one of: - * {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform - * default encoding if none of these can possibly be correct - */ - public static String guessEncoding(byte[] bytes, Hashtable hints) { - if (hints != null) { - String characterSet = (String) hints.get(DecodeHintType.CHARACTER_SET); - if (characterSet != null) { - return characterSet; - } - } - // Does it start with the UTF-8 byte order mark? then guess it's UTF-8 - if (bytes.length > 3 && - bytes[0] == (byte) 0xEF && - bytes[1] == (byte) 0xBB && - bytes[2] == (byte) 0xBF) { - return UTF8; - } - // For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS, - // which should be by far the most common encodings. ISO-8859-1 - // should not have bytes in the 0x80 - 0x9F range, while Shift_JIS - // uses this as a first byte of a two-byte character. If we see this - // followed by a valid second byte in Shift_JIS, assume it is Shift_JIS. - // If we see something else in that second byte, we'll make the risky guess - // that it's UTF-8. - int length = bytes.length; - boolean canBeISO88591 = true; - boolean canBeShiftJIS = true; - boolean canBeUTF8 = true; - int utf8BytesLeft = 0; - int maybeDoubleByteCount = 0; - int maybeSingleByteKatakanaCount = 0; - boolean sawLatin1Supplement = false; - boolean sawUTF8Start = false; - boolean lastWasPossibleDoubleByteStart = false; - - for (int i = 0; - i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8); - i++) { - - int value = bytes[i] & 0xFF; - - // UTF-8 stuff - if (value >= 0x80 && value <= 0xBF) { - if (utf8BytesLeft > 0) { - utf8BytesLeft--; - } - } else { - if (utf8BytesLeft > 0) { - canBeUTF8 = false; - } - if (value >= 0xC0 && value <= 0xFD) { - sawUTF8Start = true; - int valueCopy = value; - while ((valueCopy & 0x40) != 0) { - utf8BytesLeft++; - valueCopy <<= 1; - } - } - } - - // ISO-8859-1 stuff - - if ((value == 0xC2 || value == 0xC3) && i < length - 1) { - // This is really a poor hack. The slightly more exotic characters people might want to put in - // a QR Code, by which I mean the Latin-1 supplement characters (e.g. u-umlaut) have encodings - // that start with 0xC2 followed by [0xA0,0xBF], or start with 0xC3 followed by [0x80,0xBF]. - int nextValue = bytes[i + 1] & 0xFF; - if (nextValue <= 0xBF && - ((value == 0xC2 && nextValue >= 0xA0) || (value == 0xC3 && nextValue >= 0x80))) { - sawLatin1Supplement = true; - } - } - if (value >= 0x7F && value <= 0x9F) { - canBeISO88591 = false; - } - - // Shift_JIS stuff - - if (value >= 0xA1 && value <= 0xDF) { - // count the number of characters that might be a Shift_JIS single-byte Katakana character - if (!lastWasPossibleDoubleByteStart) { - maybeSingleByteKatakanaCount++; - } - } - if (!lastWasPossibleDoubleByteStart && - ((value >= 0xF0 && value <= 0xFF) || value == 0x80 || value == 0xA0)) { - canBeShiftJIS = false; - } - if (((value >= 0x81 && value <= 0x9F) || (value >= 0xE0 && value <= 0xEF))) { - // These start double-byte characters in Shift_JIS. Let's see if it's followed by a valid - // second byte. - if (lastWasPossibleDoubleByteStart) { - // If we just checked this and the last byte for being a valid double-byte - // char, don't check starting on this byte. If this and the last byte - // formed a valid pair, then this shouldn't be checked to see if it starts - // a double byte pair of course. - lastWasPossibleDoubleByteStart = false; - } else { - // ... otherwise do check to see if this plus the next byte form a valid - // double byte pair encoding a character. - lastWasPossibleDoubleByteStart = true; - if (i >= bytes.length - 1) { - canBeShiftJIS = false; - } else { - int nextValue = bytes[i + 1] & 0xFF; - if (nextValue < 0x40 || nextValue > 0xFC) { - canBeShiftJIS = false; - } else { - maybeDoubleByteCount++; - } - // There is some conflicting information out there about which bytes can follow which in - // double-byte Shift_JIS characters. The rule above seems to be the one that matches practice. - } - } - } else { - lastWasPossibleDoubleByteStart = false; - } - } - if (utf8BytesLeft > 0) { - canBeUTF8 = false; - } - - // Easy -- if assuming Shift_JIS and no evidence it can't be, done - if (canBeShiftJIS && ASSUME_SHIFT_JIS) { - return SHIFT_JIS; - } - if (canBeUTF8 && sawUTF8Start) { - return UTF8; - } - // Distinguishing Shift_JIS and ISO-8859-1 can be a little tough. The crude heuristic is: - // - If we saw - // - at least 3 bytes that starts a double-byte value (bytes that are rare in ISO-8859-1), or - // - over 5% of bytes could be single-byte Katakana (also rare in ISO-8859-1), - // - and, saw no sequences that are invalid in Shift_JIS, then we conclude Shift_JIS - if (canBeShiftJIS && (maybeDoubleByteCount >= 3 || 20 * maybeSingleByteKatakanaCount > length)) { - return SHIFT_JIS; - } - // Otherwise, we default to ISO-8859-1 unless we know it can't be - if (!sawLatin1Supplement && canBeISO88591) { - return ISO88591; - } - // Otherwise, we take a wild guess with platform encoding - return PLATFORM_DEFAULT_ENCODING; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java --- plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,446 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.datamatrix.decoder; - -import com.google.zxing.FormatException; -import com.google.zxing.common.BitMatrix; - -/** - * @author bbrown@google.com (Brian Brown) - */ -final class BitMatrixParser { - - private final BitMatrix mappingBitMatrix; - private final BitMatrix readMappingMatrix; - private final Version version; - - /** - * @param bitMatrix {@link BitMatrix} to parse - * @throws FormatException if dimension is < 10 or > 144 or not 0 mod 2 - */ - BitMatrixParser(BitMatrix bitMatrix) throws FormatException { - int dimension = bitMatrix.getHeight(); - if (dimension < 10 || dimension > 144 || (dimension & 0x01) != 0) { - throw FormatException.getFormatInstance(); - } - - version = readVersion(bitMatrix); - this.mappingBitMatrix = extractDataRegion(bitMatrix); - // TODO(bbrown): Make this work for rectangular symbols - this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getHeight()); - } - - /** - *

Creates the version object based on the dimension of the original bit matrix from - * the datamatrix code.

- * - *

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

- * - * @param bitMatrix Original {@link BitMatrix} including alignment patterns - * @return {@link Version} encapsulating the Data Matrix Code's "version" - * @throws FormatException if the dimensions of the mapping matrix are not valid - * Data Matrix dimensions. - */ - Version readVersion(BitMatrix bitMatrix) throws FormatException { - - if (version != null) { - return version; - } - - // TODO(bbrown): make this work for rectangular dimensions as well. - int numRows = bitMatrix.getHeight(); - int numColumns = numRows; - - return Version.getVersionForDimensions(numRows, numColumns); - } - - /** - *

Reads the bits in the {@link BitMatrix} representing the mapping matrix (No alignment patterns) - * in the correct order in order to reconstitute the codewords bytes contained within the - * Data Matrix Code.

- * - * @return bytes encoded within the Data Matrix Code - * @throws FormatException if the exact number of bytes expected is not read - */ - byte[] readCodewords() throws FormatException { - - byte[] result = new byte[version.getTotalCodewords()]; - int resultOffset = 0; - - int row = 4; - int column = 0; - // TODO(bbrown): Data Matrix can be rectangular, assuming square for now - int numRows = mappingBitMatrix.getHeight(); - int numColumns = numRows; - - boolean corner1Read = false; - boolean corner2Read = false; - boolean corner3Read = false; - boolean corner4Read = false; - - // Read all of the codewords - do { - // Check the four corner cases - if ((row == numRows) && (column == 0) && !corner1Read) { - result[resultOffset++] = (byte) readCorner1(numRows, numColumns); - row -= 2; - column +=2; - corner1Read = true; - } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x03) != 0) && !corner2Read) { - result[resultOffset++] = (byte) readCorner2(numRows, numColumns); - row -= 2; - column +=2; - corner2Read = true; - } else if ((row == numRows+4) && (column == 2) && ((numColumns & 0x07) == 0) && !corner3Read) { - result[resultOffset++] = (byte) readCorner3(numRows, numColumns); - row -= 2; - column +=2; - corner3Read = true; - } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x07) == 4) && !corner4Read) { - result[resultOffset++] = (byte) readCorner4(numRows, numColumns); - row -= 2; - column +=2; - corner4Read = true; - } else { - // Sweep upward diagonally to the right - do { - if ((row < numRows) && (column >= 0) && !readMappingMatrix.get(column, row)) { - result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); - } - row -= 2; - column +=2; - } while ((row >= 0) && (column < numColumns)); - row += 1; - column +=3; - - // Sweep downward diagonally to the left - do { - if ((row >= 0) && (column < numColumns) && !readMappingMatrix.get(column, row)) { - result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); - } - row += 2; - column -=2; - } while ((row < numRows) && (column >= 0)); - row += 3; - column +=1; - } - } while ((row < numRows) || (column < numColumns)); - - if (resultOffset != version.getTotalCodewords()) { - throw FormatException.getFormatInstance(); - } - return result; - } - - /** - *

Reads a bit of the mapping matrix accounting for boundary wrapping.

- * - * @param row Row to read in the mapping matrix - * @param column Column to read in the mapping matrix - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return value of the given bit in the mapping matrix - */ - boolean readModule(int row, int column, int numRows, int numColumns) { - // Adjust the row and column indices based on boundary wrapping - if (row < 0) { - row += numRows; - column += 4 - ((numRows + 4) & 0x07); - } - if (column < 0) { - column += numColumns; - row += 4 - ((numColumns + 4) & 0x07); - } - readMappingMatrix.set(column, row); - return mappingBitMatrix.get(column, row); - } - - /** - *

Reads the 8 bits of the standard Utah-shaped pattern.

- * - *

See ISO 16022:2006, 5.8.1 Figure 6

- * - * @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern - * @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return byte from the utah shape - */ - int readUtah(int row, int column, int numRows, int numColumns) { - int currentByte = 0; - if (readModule(row - 2, column - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row - 2, column - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row - 1, column - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row - 1, column - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row - 1, column, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row, column - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row, column - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(row, column, numRows, numColumns)) { - currentByte |= 1; - } - return currentByte; - } - - /** - *

Reads the 8 bits of the special corner condition 1.

- * - *

See ISO 16022:2006, Figure F.3

- * - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return byte from the Corner condition 1 - */ - int readCorner1(int numRows, int numColumns) { - int currentByte = 0; - if (readModule(numRows - 1, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 1, 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 1, 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(2, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(3, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - return currentByte; - } - - /** - *

Reads the 8 bits of the special corner condition 2.

- * - *

See ISO 16022:2006, Figure F.4

- * - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return byte from the Corner condition 2 - */ - int readCorner2(int numRows, int numColumns) { - int currentByte = 0; - if (readModule(numRows - 3, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 2, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 1, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 4, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 3, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - return currentByte; - } - - /** - *

Reads the 8 bits of the special corner condition 3.

- * - *

See ISO 16022:2006, Figure F.5

- * - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return byte from the Corner condition 3 - */ - int readCorner3(int numRows, int numColumns) { - int currentByte = 0; - if (readModule(numRows - 1, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 1, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 3, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 3, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - return currentByte; - } - - /** - *

Reads the 8 bits of the special corner condition 4.

- * - *

See ISO 16022:2006, Figure F.6

- * - * @param numRows Number of rows in the mapping matrix - * @param numColumns Number of columns in the mapping matrix - * @return byte from the Corner condition 4 - */ - int readCorner4(int numRows, int numColumns) { - int currentByte = 0; - if (readModule(numRows - 3, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 2, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(numRows - 1, 0, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 2, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(0, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(1, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(2, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - currentByte <<= 1; - if (readModule(3, numColumns - 1, numRows, numColumns)) { - currentByte |= 1; - } - return currentByte; - } - - /** - *

Extracts the data region from a {@link BitMatrix} that contains - * alignment patterns.

- * - * @param bitMatrix Original {@link BitMatrix} with alignment patterns - * @return BitMatrix that has the alignment patterns removed - */ - BitMatrix extractDataRegion(BitMatrix bitMatrix) { - int symbolSizeRows = version.getSymbolSizeRows(); - int symbolSizeColumns = version.getSymbolSizeColumns(); - - // TODO(bbrown): Make this work with rectangular codes - if (bitMatrix.getHeight() != symbolSizeRows) { - throw new IllegalArgumentException("Dimension of bitMarix must match the version size"); - } - - int dataRegionSizeRows = version.getDataRegionSizeRows(); - int dataRegionSizeColumns = version.getDataRegionSizeColumns(); - - int numDataRegionsRow = symbolSizeRows / dataRegionSizeRows; - int numDataRegionsColumn = symbolSizeColumns / dataRegionSizeColumns; - - int sizeDataRegionRow = numDataRegionsRow * dataRegionSizeRows; - //int sizeDataRegionColumn = numDataRegionsColumn * dataRegionSizeColumns; - - // TODO(bbrown): Make this work with rectangular codes - BitMatrix bitMatrixWithoutAlignment = new BitMatrix(sizeDataRegionRow); - for (int dataRegionRow = 0; dataRegionRow < numDataRegionsRow; ++dataRegionRow) { - int dataRegionRowOffset = dataRegionRow * dataRegionSizeRows; - for (int dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) { - int dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns; - for (int i = 0; i < dataRegionSizeRows; ++i) { - int readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i; - int writeRowOffset = dataRegionRowOffset + i; - for (int j = 0; j < dataRegionSizeColumns; ++j) { - int readColumnOffset = dataRegionColumn * (dataRegionSizeColumns + 2) + 1 + j; - if (bitMatrix.get(readColumnOffset, readRowOffset)) { - int writeColumnOffset = dataRegionColumnOffset + j; - bitMatrixWithoutAlignment.set(writeColumnOffset, writeRowOffset); - } - } - } - } - } - return bitMatrixWithoutAlignment; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/DataBlock.java plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/DataBlock.java --- plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/DataBlock.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/DataBlock.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.datamatrix.decoder; - -/** - *

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into - * multiple blocks, each of which is a unit of data and error-correction codewords. Each - * is represented by an instance of this class.

- * - * @author bbrown@google.com (Brian Brown) - */ -final class DataBlock { - - private final int numDataCodewords; - private final byte[] codewords; - - private DataBlock(int numDataCodewords, byte[] codewords) { - this.numDataCodewords = numDataCodewords; - this.codewords = codewords; - } - - /** - *

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. - * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This - * method will separate the data into original blocks.

- * - * @param rawCodewords bytes as read directly from the Data Matrix Code - * @param version version of the Data Matrix Code - * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the - * Data Matrix Code - */ - static DataBlock[] getDataBlocks(byte[] rawCodewords, - Version version) { - // Figure out the number and size of data blocks used by this version - Version.ECBlocks ecBlocks = version.getECBlocks(); - - // First count the total number of data blocks - int totalBlocks = 0; - Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); - for (int i = 0; i < ecBlockArray.length; i++) { - totalBlocks += ecBlockArray[i].getCount(); - } - - // Now establish DataBlocks of the appropriate size and number of data codewords - DataBlock[] result = new DataBlock[totalBlocks]; - int numResultBlocks = 0; - for (int j = 0; j < ecBlockArray.length; j++) { - Version.ECB ecBlock = ecBlockArray[j]; - for (int i = 0; i < ecBlock.getCount(); i++) { - int numDataCodewords = ecBlock.getDataCodewords(); - int numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords; - result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); - } - } - - // All blocks have the same amount of data, except that the last n - // (where n may be 0) have 1 less byte. Figure out where these start. - // TODO(bbrown): There is only one case where there is a difference for Data Matrix for size 144 - int longerBlocksTotalCodewords = result[0].codewords.length; - //int shorterBlocksTotalCodewords = longerBlocksTotalCodewords - 1; - - int longerBlocksNumDataCodewords = longerBlocksTotalCodewords - ecBlocks.getECCodewords(); - int shorterBlocksNumDataCodewords = longerBlocksNumDataCodewords - 1; - // The last elements of result may be 1 element shorter for 144 matrix - // first fill out as many elements as all of them have minus 1 - int rawCodewordsOffset = 0; - for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { - for (int j = 0; j < numResultBlocks; j++) { - result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; - } - } - - // Fill out the last data block in the longer ones - boolean specialVersion = version.getVersionNumber() == 24; - int numLongerBlocks = specialVersion ? 8 : numResultBlocks; - for (int j = 0; j < numLongerBlocks; j++) { - result[j].codewords[longerBlocksNumDataCodewords - 1] = rawCodewords[rawCodewordsOffset++]; - } - - // Now add in error correction blocks - int max = result[0].codewords.length; - for (int i = longerBlocksNumDataCodewords; i < max; i++) { - for (int j = 0; j < numResultBlocks; j++) { - int iOffset = (specialVersion && j > 7) ? i - 1 : i; - result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; - } - } - - if (rawCodewordsOffset != rawCodewords.length) { - throw new IllegalArgumentException(); - } - - return result; - } - - int getNumDataCodewords() { - return numDataCodewords; - } - - byte[] getCodewords() { - return codewords; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/Version.java plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/Version.java --- plantuml-1.2017.15/src/com/google/zxing/datamatrix/decoder/Version.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/datamatrix/decoder/Version.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,242 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.datamatrix.decoder; - -import com.google.zxing.FormatException; - -/** - * The Version object encapsulates attributes about a particular - * size Data Matrix Code. - * - * @author bbrown@google.com (Brian Brown) - */ -public final class Version { - - private static final Version[] VERSIONS = buildVersions(); - - private final int versionNumber; - private final int symbolSizeRows; - private final int symbolSizeColumns; - private final int dataRegionSizeRows; - private final int dataRegionSizeColumns; - private final ECBlocks ecBlocks; - private final int totalCodewords; - - private Version(int versionNumber, - int symbolSizeRows, - int symbolSizeColumns, - int dataRegionSizeRows, - int dataRegionSizeColumns, - ECBlocks ecBlocks) { - this.versionNumber = versionNumber; - this.symbolSizeRows = symbolSizeRows; - this.symbolSizeColumns = symbolSizeColumns; - this.dataRegionSizeRows = dataRegionSizeRows; - this.dataRegionSizeColumns = dataRegionSizeColumns; - this.ecBlocks = ecBlocks; - - // Calculate the total number of codewords - int total = 0; - int ecCodewords = ecBlocks.getECCodewords(); - ECB[] ecbArray = ecBlocks.getECBlocks(); - for (int i = 0; i < ecbArray.length; i++) { - ECB ecBlock = ecbArray[i]; - total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); - } - this.totalCodewords = total; - } - - public int getVersionNumber() { - return versionNumber; - } - - public int getSymbolSizeRows() { - return symbolSizeRows; - } - - public int getSymbolSizeColumns() { - return symbolSizeColumns; - } - - public int getDataRegionSizeRows() { - return dataRegionSizeRows; - } - - public int getDataRegionSizeColumns() { - return dataRegionSizeColumns; - } - - public int getTotalCodewords() { - return totalCodewords; - } - - ECBlocks getECBlocks() { - return ecBlocks; - } - - /** - *

Deduces version information from Data Matrix dimensions.

- * - * @param numRows Number of rows in modules - * @param numColumns Number of columns in modules - * @return {@link Version} for a Data Matrix Code of those dimensions - * @throws FormatException if dimensions do correspond to a valid Data Matrix size - */ - public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { - if ((numRows & 0x01) != 0 || (numColumns & 0x01) != 0) { - throw FormatException.getFormatInstance(); - } - - // TODO(bbrown): This is doing a linear search through the array of versions. - // If we interleave the rectangular versions with the square versions we could - // do a binary search. - int numVersions = VERSIONS.length; - for (int i = 0; i < numVersions; ++i){ - Version version = VERSIONS[i]; - if (version.symbolSizeRows == numRows && version.symbolSizeColumns == numColumns) { - return version; - } - } - - throw FormatException.getFormatInstance(); - } - - /** - *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will - * use blocks of differing sizes within one version, so, this encapsulates the parameters for - * each set of blocks. It also holds the number of error-correction codewords per block since it - * will be the same across all blocks within one version.

- */ - static final class ECBlocks { - private final int ecCodewords; - private final ECB[] ecBlocks; - - private ECBlocks(int ecCodewords, ECB ecBlocks) { - this.ecCodewords = ecCodewords; - this.ecBlocks = new ECB[] { ecBlocks }; - } - - private ECBlocks(int ecCodewords, ECB ecBlocks1, ECB ecBlocks2) { - this.ecCodewords = ecCodewords; - this.ecBlocks = new ECB[] { ecBlocks1, ecBlocks2 }; - } - - int getECCodewords() { - return ecCodewords; - } - - ECB[] getECBlocks() { - return ecBlocks; - } - } - - /** - *

Encapsualtes the parameters for one error-correction block in one symbol version. - * This includes the number of data codewords, and the number of times a block with these - * parameters is used consecutively in the Data Matrix code version's format.

- */ - static final class ECB { - private final int count; - private final int dataCodewords; - - private ECB(int count, int dataCodewords) { - this.count = count; - this.dataCodewords = dataCodewords; - } - - int getCount() { - return count; - } - - int getDataCodewords() { - return dataCodewords; - } - } - - public String toString() { - return String.valueOf(versionNumber); - } - - /** - * See ISO 16022:2006 5.5.1 Table 7 - */ - private static Version[] buildVersions() { - return new Version[]{ - new Version(1, 10, 10, 8, 8, - new ECBlocks(5, new ECB(1, 3))), - new Version(2, 12, 12, 10, 10, - new ECBlocks(7, new ECB(1, 5))), - new Version(3, 14, 14, 12, 12, - new ECBlocks(10, new ECB(1, 8))), - new Version(4, 16, 16, 14, 14, - new ECBlocks(12, new ECB(1, 12))), - new Version(5, 18, 18, 16, 16, - new ECBlocks(14, new ECB(1, 18))), - new Version(6, 20, 20, 18, 18, - new ECBlocks(18, new ECB(1, 22))), - new Version(7, 22, 22, 20, 20, - new ECBlocks(20, new ECB(1, 30))), - new Version(8, 24, 24, 22, 22, - new ECBlocks(24, new ECB(1, 36))), - new Version(9, 26, 26, 24, 24, - new ECBlocks(28, new ECB(1, 44))), - new Version(10, 32, 32, 14, 14, - new ECBlocks(36, new ECB(1, 62))), - new Version(11, 36, 36, 16, 16, - new ECBlocks(42, new ECB(1, 86))), - new Version(12, 40, 40, 18, 18, - new ECBlocks(48, new ECB(1, 114))), - new Version(13, 44, 44, 20, 20, - new ECBlocks(56, new ECB(1, 144))), - new Version(14, 48, 48, 22, 22, - new ECBlocks(68, new ECB(1, 174))), - new Version(15, 52, 52, 24, 24, - new ECBlocks(42, new ECB(2, 102))), - new Version(16, 64, 64, 14, 14, - new ECBlocks(56, new ECB(2, 140))), - new Version(17, 72, 72, 16, 16, - new ECBlocks(36, new ECB(4, 92))), - new Version(18, 80, 80, 18, 18, - new ECBlocks(48, new ECB(4, 114))), - new Version(19, 88, 88, 20, 20, - new ECBlocks(56, new ECB(4, 144))), - new Version(20, 96, 96, 22, 22, - new ECBlocks(68, new ECB(4, 174))), - new Version(21, 104, 104, 24, 24, - new ECBlocks(56, new ECB(6, 136))), - new Version(22, 120, 120, 18, 18, - new ECBlocks(68, new ECB(6, 175))), - new Version(23, 132, 132, 20, 20, - new ECBlocks(62, new ECB(8, 163))), - new Version(24, 144, 144, 22, 22, - new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))), - new Version(25, 8, 18, 6, 16, - new ECBlocks(7, new ECB(1, 5))), - new Version(26, 8, 32, 6, 14, - new ECBlocks(11, new ECB(1, 10))), - new Version(27, 12, 26, 10, 24, - new ECBlocks(14, new ECB(1, 16))), - new Version(28, 12, 36, 10, 16, - new ECBlocks(18, new ECB(1, 22))), - new Version(29, 16, 36, 10, 16, - new ECBlocks(24, new ECB(1, 32))), - new Version(30, 16, 48, 14, 22, - new ECBlocks(28, new ECB(1, 49))) - }; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/DecodeHintType.java plantuml-1.2018.9/src/com/google/zxing/DecodeHintType.java --- plantuml-1.2017.15/src/com/google/zxing/DecodeHintType.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/DecodeHintType.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -import java.io.Reader; - -/** - * Encapsulates a type of hint that a caller may pass to a barcode reader to help it - * more quickly or accurately decode it. It is up to implementations to decide what, - * if anything, to do with the information that is supplied. - * - * @author Sean Owen - * @author dswitkin@google.com (Daniel Switkin) - * @see Reader#decode(BinaryBitmap,java.util.Hashtable) - */ -public final class DecodeHintType { - - // No, we can't use an enum here. J2ME doesn't support it. - - /** - * Unspecified, application-specific hint. Maps to an unspecified {@link Object}. - */ - public static final DecodeHintType OTHER = new DecodeHintType(); - - /** - * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; - * use {@link Boolean#TRUE}. - */ - public static final DecodeHintType PURE_BARCODE = new DecodeHintType(); - - /** - * Image is known to be of one of a few possible formats. - * Maps to a {@link java.util.Vector} of {@link BarcodeFormat}s. - */ - public static final DecodeHintType POSSIBLE_FORMATS = new DecodeHintType(); - - /** - * Spend more time to try to find a barcode; optimize for accuracy, not speed. - * Doesn't matter what it maps to; use {@link Boolean#TRUE}. - */ - public static final DecodeHintType TRY_HARDER = new DecodeHintType(); - - /** - * Specifies what character encoding to use when decoding, where applicable (type String) - */ - public static final DecodeHintType CHARACTER_SET = new DecodeHintType(); - - /** - * Allowed lengths of encoded data -- reject anything else. Maps to an int[]. - */ - public static final DecodeHintType ALLOWED_LENGTHS = new DecodeHintType(); - - /** - * Assume Code 39 codes employ a check digit. Maps to {@link Boolean}. - */ - public static final DecodeHintType ASSUME_CODE_39_CHECK_DIGIT = new DecodeHintType(); - - /** - * The caller needs to be notified via callback when a possible {@link ResultPoint} - * is found. Maps to a {@link ResultPointCallback}. - */ - public static final DecodeHintType NEED_RESULT_POINT_CALLBACK = new DecodeHintType(); - - private DecodeHintType() { - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/EncodeHintType.java plantuml-1.2018.9/src/com/google/zxing/EncodeHintType.java --- plantuml-1.2017.15/src/com/google/zxing/EncodeHintType.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/EncodeHintType.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * These are a set of hints that you may pass to Writers to specify their behavior. - * - * @author dswitkin@google.com (Daniel Switkin) - */ -public final class EncodeHintType { - - /** - * Specifies what degree of error correction to use, for example in QR Codes (type Integer). - */ - public static final EncodeHintType ERROR_CORRECTION = new EncodeHintType(); - - /** - * Specifies what character encoding to use where applicable (type String) - */ - public static final EncodeHintType CHARACTER_SET = new EncodeHintType(); - - private EncodeHintType() { - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/FormatException.java plantuml-1.2018.9/src/com/google/zxing/FormatException.java --- plantuml-1.2017.15/src/com/google/zxing/FormatException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/FormatException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * Thrown when a barcode was successfully detected, but some aspect of - * the content did not conform to the barcode's format rules. This could have - * been due to a mis-detection. - * - * @author Sean Owen - */ -public final class FormatException extends ReaderException { - - private static final FormatException instance = new FormatException(); - - private FormatException() { - // do nothing - } - - public static FormatException getFormatInstance() { - return instance; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/NotFoundException.java plantuml-1.2018.9/src/com/google/zxing/NotFoundException.java --- plantuml-1.2017.15/src/com/google/zxing/NotFoundException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/NotFoundException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * Thrown when a barcode was not found in the image. It might have been - * partially detected but could not be confirmed. - * - * @author Sean Owen - */ -public final class NotFoundException extends ReaderException { - - private static final NotFoundException instance = new NotFoundException(); - - private NotFoundException() { - // do nothing - } - - public static NotFoundException getNotFoundInstance() { - return instance; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -import com.google.zxing.FormatException; -import com.google.zxing.common.BitMatrix; - -/** - * @author Sean Owen - */ -final class BitMatrixParser { - - private final BitMatrix bitMatrix; - private Version parsedVersion; - private FormatInformation parsedFormatInfo; - - /** - * @param bitMatrix {@link BitMatrix} to parse - * @throws FormatException if dimension is not >= 21 and 1 mod 4 - */ - BitMatrixParser(BitMatrix bitMatrix) throws FormatException { - int dimension = bitMatrix.getHeight(); - if (dimension < 21 || (dimension & 0x03) != 1) { - throw FormatException.getFormatInstance(); - } - this.bitMatrix = bitMatrix; - } - - /** - *

Reads format information from one of its two locations within the QR Code.

- * - * @return {@link FormatInformation} encapsulating the QR Code's format info - * @throws FormatException if both format information locations cannot be parsed as - * the valid encoding of format information - */ - FormatInformation readFormatInformation() throws FormatException { - - if (parsedFormatInfo != null) { - return parsedFormatInfo; - } - - // Read top-left format info bits - int formatInfoBits1 = 0; - for (int i = 0; i < 6; i++) { - formatInfoBits1 = copyBit(i, 8, formatInfoBits1); - } - // .. and skip a bit in the timing pattern ... - formatInfoBits1 = copyBit(7, 8, formatInfoBits1); - formatInfoBits1 = copyBit(8, 8, formatInfoBits1); - formatInfoBits1 = copyBit(8, 7, formatInfoBits1); - // .. and skip a bit in the timing pattern ... - for (int j = 5; j >= 0; j--) { - formatInfoBits1 = copyBit(8, j, formatInfoBits1); - } - - // Read the top-right/bottom-left pattern too - int dimension = bitMatrix.getHeight(); - int formatInfoBits2 = 0; - int iMin = dimension - 8; - for (int i = dimension - 1; i >= iMin; i--) { - formatInfoBits2 = copyBit(i, 8, formatInfoBits2); - } - for (int j = dimension - 7; j < dimension; j++) { - formatInfoBits2 = copyBit(8, j, formatInfoBits2); - } - - parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2); - if (parsedFormatInfo != null) { - return parsedFormatInfo; - } - throw FormatException.getFormatInstance(); - } - - /** - *

Reads version information from one of its two locations within the QR Code.

- * - * @return {@link Version} encapsulating the QR Code's version - * @throws FormatException if both version information locations cannot be parsed as - * the valid encoding of version information - */ - Version readVersion() throws FormatException { - - if (parsedVersion != null) { - return parsedVersion; - } - - int dimension = bitMatrix.getHeight(); - - int provisionalVersion = (dimension - 17) >> 2; - if (provisionalVersion <= 6) { - return Version.getVersionForNumber(provisionalVersion); - } - - // Read top-right version info: 3 wide by 6 tall - int versionBits = 0; - int ijMin = dimension - 11; - for (int j = 5; j >= 0; j--) { - for (int i = dimension - 9; i >= ijMin; i--) { - versionBits = copyBit(i, j, versionBits); - } - } - - parsedVersion = Version.decodeVersionInformation(versionBits); - if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { - return parsedVersion; - } - - // Hmm, failed. Try bottom left: 6 wide by 3 tall - versionBits = 0; - for (int i = 5; i >= 0; i--) { - for (int j = dimension - 9; j >= ijMin; j--) { - versionBits = copyBit(i, j, versionBits); - } - } - - parsedVersion = Version.decodeVersionInformation(versionBits); - if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { - return parsedVersion; - } - throw FormatException.getFormatInstance(); - } - - private int copyBit(int i, int j, int versionBits) { - return bitMatrix.get(i, j) ? (versionBits << 1) | 0x1 : versionBits << 1; - } - - /** - *

Reads the bits in the {@link BitMatrix} representing the finder pattern in the - * correct order in order to reconstitute the codewords bytes contained within the - * QR Code.

- * - * @return bytes encoded within the QR Code - * @throws FormatException if the exact number of bytes expected is not read - */ - byte[] readCodewords() throws FormatException { - - FormatInformation formatInfo = readFormatInformation(); - Version version = readVersion(); - - // Get the data mask for the format used in this QR Code. This will exclude - // some bits from reading as we wind through the bit matrix. - DataMask dataMask = DataMask.forReference((int) formatInfo.getDataMask()); - int dimension = bitMatrix.getHeight(); - dataMask.unmaskBitMatrix(bitMatrix, dimension); - - BitMatrix functionPattern = version.buildFunctionPattern(); - - boolean readingUp = true; - byte[] result = new byte[version.getTotalCodewords()]; - int resultOffset = 0; - int currentByte = 0; - int bitsRead = 0; - // Read columns in pairs, from right to left - for (int j = dimension - 1; j > 0; j -= 2) { - if (j == 6) { - // Skip whole column with vertical alignment pattern; - // saves time and makes the other code proceed more cleanly - j--; - } - // Read alternatingly from bottom to top then top to bottom - for (int count = 0; count < dimension; count++) { - int i = readingUp ? dimension - 1 - count : count; - for (int col = 0; col < 2; col++) { - // Ignore bits covered by the function pattern - if (!functionPattern.get(j - col, i)) { - // Read a bit - bitsRead++; - currentByte <<= 1; - if (bitMatrix.get(j - col, i)) { - currentByte |= 1; - } - // If we've made a whole byte, save it off - if (bitsRead == 8) { - result[resultOffset++] = (byte) currentByte; - bitsRead = 0; - currentByte = 0; - } - } - } - } - readingUp ^= true; // readingUp = !readingUp; // switch directions - } - if (resultOffset != version.getTotalCodewords()) { - throw FormatException.getFormatInstance(); - } - return result; - } - -} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataBlock.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/DataBlock.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataBlock.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/DataBlock.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -/** - *

Encapsulates a block of data within a QR Code. QR Codes may split their data into - * multiple blocks, each of which is a unit of data and error-correction codewords. Each - * is represented by an instance of this class.

- * - * @author Sean Owen - */ -final class DataBlock { - - private final int numDataCodewords; - private final byte[] codewords; - - private DataBlock(int numDataCodewords, byte[] codewords) { - this.numDataCodewords = numDataCodewords; - this.codewords = codewords; - } - - /** - *

When QR Codes use multiple data blocks, they are actually interleaved. - * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This - * method will separate the data into original blocks.

- * - * @param rawCodewords bytes as read directly from the QR Code - * @param version version of the QR Code - * @param ecLevel error-correction level of the QR Code - * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the - * QR Code - */ - static DataBlock[] getDataBlocks(byte[] rawCodewords, - Version version, - ErrorCorrectionLevel ecLevel) { - - if (rawCodewords.length != version.getTotalCodewords()) { - throw new IllegalArgumentException(); - } - - // Figure out the number and size of data blocks used by this version and - // error correction level - Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); - - // First count the total number of data blocks - int totalBlocks = 0; - Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); - for (int i = 0; i < ecBlockArray.length; i++) { - totalBlocks += ecBlockArray[i].getCount(); - } - - // Now establish DataBlocks of the appropriate size and number of data codewords - DataBlock[] result = new DataBlock[totalBlocks]; - int numResultBlocks = 0; - for (int j = 0; j < ecBlockArray.length; j++) { - Version.ECB ecBlock = ecBlockArray[j]; - for (int i = 0; i < ecBlock.getCount(); i++) { - int numDataCodewords = ecBlock.getDataCodewords(); - int numBlockCodewords = ecBlocks.getECCodewordsPerBlock() + numDataCodewords; - result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); - } - } - - // All blocks have the same amount of data, except that the last n - // (where n may be 0) have 1 more byte. Figure out where these start. - int shorterBlocksTotalCodewords = result[0].codewords.length; - int longerBlocksStartAt = result.length - 1; - while (longerBlocksStartAt >= 0) { - int numCodewords = result[longerBlocksStartAt].codewords.length; - if (numCodewords == shorterBlocksTotalCodewords) { - break; - } - longerBlocksStartAt--; - } - longerBlocksStartAt++; - - int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBlock(); - // The last elements of result may be 1 element longer; - // first fill out as many elements as all of them have - int rawCodewordsOffset = 0; - for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { - for (int j = 0; j < numResultBlocks; j++) { - result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; - } - } - // Fill out the last data block in the longer ones - for (int j = longerBlocksStartAt; j < numResultBlocks; j++) { - result[j].codewords[shorterBlocksNumDataCodewords] = rawCodewords[rawCodewordsOffset++]; - } - // Now add in error correction blocks - int max = result[0].codewords.length; - for (int i = shorterBlocksNumDataCodewords; i < max; i++) { - for (int j = 0; j < numResultBlocks; j++) { - int iOffset = j < longerBlocksStartAt ? i : i + 1; - result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; - } - } - return result; - } - - int getNumDataCodewords() { - return numDataCodewords; - } - - byte[] getCodewords() { - return codewords; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataMask.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/DataMask.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/DataMask.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/DataMask.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -import com.google.zxing.common.BitMatrix; - -/** - *

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations - * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, - * including areas used for finder patterns, timing patterns, etc. These areas should be unused - * after the point they are unmasked anyway.

- * - *

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position - * and j is row position. In fact, as the text says, i is row position and j is column position.

- * - * @author Sean Owen - */ -abstract class DataMask { - - /** - * See ISO 18004:2006 6.8.1 - */ - private static final DataMask[] DATA_MASKS = { - new DataMask000(), - new DataMask001(), - new DataMask010(), - new DataMask011(), - new DataMask100(), - new DataMask101(), - new DataMask110(), - new DataMask111(), - }; - - private DataMask() { - } - - /** - *

Implementations of this method reverse the data masking process applied to a QR Code and - * make its bits ready to read.

- * - * @param bits representation of QR Code bits - * @param dimension dimension of QR Code, represented by bits, being unmasked - */ - final void unmaskBitMatrix(BitMatrix bits, int dimension) { - for (int i = 0; i < dimension; i++) { - for (int j = 0; j < dimension; j++) { - if (isMasked(i, j)) { - bits.flip(j, i); - } - } - } - } - - abstract boolean isMasked(int i, int j); - - /** - * @param reference a value between 0 and 7 indicating one of the eight possible - * data mask patterns a QR Code may use - * @return {@link DataMask} encapsulating the data mask pattern - */ - static DataMask forReference(int reference) { - if (reference < 0 || reference > 7) { - throw new IllegalArgumentException(); - } - return DATA_MASKS[reference]; - } - - /** - * 000: mask bits for which (x + y) mod 2 == 0 - */ - private static class DataMask000 extends DataMask { - boolean isMasked(int i, int j) { - return ((i + j) & 0x01) == 0; - } - } - - /** - * 001: mask bits for which x mod 2 == 0 - */ - private static class DataMask001 extends DataMask { - boolean isMasked(int i, int j) { - return (i & 0x01) == 0; - } - } - - /** - * 010: mask bits for which y mod 3 == 0 - */ - private static class DataMask010 extends DataMask { - boolean isMasked(int i, int j) { - return j % 3 == 0; - } - } - - /** - * 011: mask bits for which (x + y) mod 3 == 0 - */ - private static class DataMask011 extends DataMask { - boolean isMasked(int i, int j) { - return (i + j) % 3 == 0; - } - } - - /** - * 100: mask bits for which (x/2 + y/3) mod 2 == 0 - */ - private static class DataMask100 extends DataMask { - boolean isMasked(int i, int j) { - return (((i >>> 1) + (j /3)) & 0x01) == 0; - } - } - - /** - * 101: mask bits for which xy mod 2 + xy mod 3 == 0 - */ - private static class DataMask101 extends DataMask { - boolean isMasked(int i, int j) { - int temp = i * j; - return (temp & 0x01) + (temp % 3) == 0; - } - } - - /** - * 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0 - */ - private static class DataMask110 extends DataMask { - boolean isMasked(int i, int j) { - int temp = i * j; - return (((temp & 0x01) + (temp % 3)) & 0x01) == 0; - } - } - - /** - * 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0 - */ - private static class DataMask111 extends DataMask { - boolean isMasked(int i, int j) { - return ((((i + j) & 0x01) + ((i * j) % 3)) & 0x01) == 0; - } - } -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -/** - *

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels - * defined by the QR code standard.

- * - * @author Sean Owen - */ -public final class ErrorCorrectionLevel { - - // No, we can't use an enum here. J2ME doesn't support it. - - /** - * L = ~7% correction - */ - public static final ErrorCorrectionLevel L = new ErrorCorrectionLevel(0, 0x01, "L"); - /** - * M = ~15% correction - */ - public static final ErrorCorrectionLevel M = new ErrorCorrectionLevel(1, 0x00, "M"); - /** - * Q = ~25% correction - */ - public static final ErrorCorrectionLevel Q = new ErrorCorrectionLevel(2, 0x03, "Q"); - /** - * H = ~30% correction - */ - public static final ErrorCorrectionLevel H = new ErrorCorrectionLevel(3, 0x02, "H"); - - private static final ErrorCorrectionLevel[] FOR_BITS = {M, L, H, Q}; - - private final int ordinal; - private final int bits; - private final String name; - - private ErrorCorrectionLevel(int ordinal, int bits, String name) { - this.ordinal = ordinal; - this.bits = bits; - this.name = name; - } - - public int ordinal() { - return ordinal; - } - - public int getBits() { - return bits; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - /** - * @param bits int containing the two bits encoding a QR Code's error correction level - * @return {@link ErrorCorrectionLevel} representing the encoded error correction level - */ - public static ErrorCorrectionLevel forBits(int bits) { - if (bits < 0 || bits >= FOR_BITS.length) { - throw new IllegalArgumentException(); - } - return FOR_BITS[bits]; - } - - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/FormatInformation.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/FormatInformation.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/FormatInformation.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/FormatInformation.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -/** - *

Encapsulates a QR Code's format information, including the data mask used and - * error correction level.

- * - * @author Sean Owen - * @see DataMask - * @see ErrorCorrectionLevel - */ -final class FormatInformation { - - private static final int FORMAT_INFO_MASK_QR = 0x5412; - - /** - * See ISO 18004:2006, Annex C, Table C.1 - */ - private static final int[][] FORMAT_INFO_DECODE_LOOKUP = { - {0x5412, 0x00}, - {0x5125, 0x01}, - {0x5E7C, 0x02}, - {0x5B4B, 0x03}, - {0x45F9, 0x04}, - {0x40CE, 0x05}, - {0x4F97, 0x06}, - {0x4AA0, 0x07}, - {0x77C4, 0x08}, - {0x72F3, 0x09}, - {0x7DAA, 0x0A}, - {0x789D, 0x0B}, - {0x662F, 0x0C}, - {0x6318, 0x0D}, - {0x6C41, 0x0E}, - {0x6976, 0x0F}, - {0x1689, 0x10}, - {0x13BE, 0x11}, - {0x1CE7, 0x12}, - {0x19D0, 0x13}, - {0x0762, 0x14}, - {0x0255, 0x15}, - {0x0D0C, 0x16}, - {0x083B, 0x17}, - {0x355F, 0x18}, - {0x3068, 0x19}, - {0x3F31, 0x1A}, - {0x3A06, 0x1B}, - {0x24B4, 0x1C}, - {0x2183, 0x1D}, - {0x2EDA, 0x1E}, - {0x2BED, 0x1F}, - }; - - /** - * Offset i holds the number of 1 bits in the binary representation of i - */ - private static final int[] BITS_SET_IN_HALF_BYTE = - {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; - - private final ErrorCorrectionLevel errorCorrectionLevel; - private final byte dataMask; - - private FormatInformation(int formatInfo) { - // Bits 3,4 - errorCorrectionLevel = ErrorCorrectionLevel.forBits((formatInfo >> 3) & 0x03); - // Bottom 3 bits - dataMask = (byte) (formatInfo & 0x07); - } - - static int numBitsDiffering(int a, int b) { - a ^= b; // a now has a 1 bit exactly where its bit differs with b's - // Count bits set quickly with a series of lookups: - return BITS_SET_IN_HALF_BYTE[a & 0x0F] + - BITS_SET_IN_HALF_BYTE[(a >>> 4 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 8 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 12 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 16 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 20 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 24 & 0x0F)] + - BITS_SET_IN_HALF_BYTE[(a >>> 28 & 0x0F)]; - } - - /** - * @param maskedFormatInfo1 format info indicator, with mask still applied - * @param maskedFormatInfo2 second copy of same info; both are checked at the same time - * to establish best match - * @return information about the format it specifies, or null - * if doesn't seem to match any known pattern - */ - static FormatInformation decodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { - FormatInformation formatInfo = doDecodeFormatInformation(maskedFormatInfo1, maskedFormatInfo2); - if (formatInfo != null) { - return formatInfo; - } - // Should return null, but, some QR codes apparently - // do not mask this info. Try again by actually masking the pattern - // first - return doDecodeFormatInformation(maskedFormatInfo1 ^ FORMAT_INFO_MASK_QR, - maskedFormatInfo2 ^ FORMAT_INFO_MASK_QR); - } - - private static FormatInformation doDecodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { - // Find the int in FORMAT_INFO_DECODE_LOOKUP with fewest bits differing - int bestDifference = Integer.MAX_VALUE; - int bestFormatInfo = 0; - for (int i = 0; i < FORMAT_INFO_DECODE_LOOKUP.length; i++) { - int[] decodeInfo = FORMAT_INFO_DECODE_LOOKUP[i]; - int targetInfo = decodeInfo[0]; - if (targetInfo == maskedFormatInfo1 || targetInfo == maskedFormatInfo2) { - // Found an exact match - return new FormatInformation(decodeInfo[1]); - } - int bitsDifference = numBitsDiffering(maskedFormatInfo1, targetInfo); - if (bitsDifference < bestDifference) { - bestFormatInfo = decodeInfo[1]; - bestDifference = bitsDifference; - } - if (maskedFormatInfo1 != maskedFormatInfo2) { - // also try the other option - bitsDifference = numBitsDiffering(maskedFormatInfo2, targetInfo); - if (bitsDifference < bestDifference) { - bestFormatInfo = decodeInfo[1]; - bestDifference = bitsDifference; - } - } - } - // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits - // differing means we found a match - if (bestDifference <= 3) { - return new FormatInformation(bestFormatInfo); - } - return null; - } - - ErrorCorrectionLevel getErrorCorrectionLevel() { - return errorCorrectionLevel; - } - - byte getDataMask() { - return dataMask; - } - - public int hashCode() { - return (errorCorrectionLevel.ordinal() << 3) | (int) dataMask; - } - - public boolean equals(Object o) { - if (!(o instanceof FormatInformation)) { - return false; - } - FormatInformation other = (FormatInformation) o; - return this.errorCorrectionLevel == other.errorCorrectionLevel && - this.dataMask == other.dataMask; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Mode.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/Mode.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Mode.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/Mode.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -/** - *

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which - * data can be encoded to bits in the QR code standard.

- * - * @author Sean Owen - */ -public final class Mode { - - // No, we can't use an enum here. J2ME doesn't support it. - - public static final Mode TERMINATOR = new Mode(new int[]{0, 0, 0}, 0x00, "TERMINATOR"); // Not really a mode... - public static final Mode NUMERIC = new Mode(new int[]{10, 12, 14}, 0x01, "NUMERIC"); - public static final Mode ALPHANUMERIC = new Mode(new int[]{9, 11, 13}, 0x02, "ALPHANUMERIC"); - public static final Mode STRUCTURED_APPEND = new Mode(new int[]{0, 0, 0}, 0x03, "STRUCTURED_APPEND"); // Not supported - public static final Mode BYTE = new Mode(new int[]{8, 16, 16}, 0x04, "BYTE"); - public static final Mode ECI = new Mode(null, 0x07, "ECI"); // character counts don't apply - public static final Mode KANJI = new Mode(new int[]{8, 10, 12}, 0x08, "KANJI"); - public static final Mode FNC1_FIRST_POSITION = new Mode(null, 0x05, "FNC1_FIRST_POSITION"); - public static final Mode FNC1_SECOND_POSITION = new Mode(null, 0x09, "FNC1_SECOND_POSITION"); - - private final int[] characterCountBitsForVersions; - private final int bits; - private final String name; - - private Mode(int[] characterCountBitsForVersions, int bits, String name) { - this.characterCountBitsForVersions = characterCountBitsForVersions; - this.bits = bits; - this.name = name; - } - - /** - * @param bits four bits encoding a QR Code data mode - * @return {@link Mode} encoded by these bits - * @throws IllegalArgumentException if bits do not correspond to a known mode - */ - public static Mode forBits(int bits) { - switch (bits) { - case 0x0: - return TERMINATOR; - case 0x1: - return NUMERIC; - case 0x2: - return ALPHANUMERIC; - case 0x3: - return STRUCTURED_APPEND; - case 0x4: - return BYTE; - case 0x5: - return FNC1_FIRST_POSITION; - case 0x7: - return ECI; - case 0x8: - return KANJI; - case 0x9: - return FNC1_SECOND_POSITION; - default: - throw new IllegalArgumentException(); - } - } - - /** - * @param version version in question - * @return number of bits used, in this QR Code symbol {@link Version}, to encode the - * count of characters that will follow encoded in this {@link Mode} - */ - public int getCharacterCountBits(Version version) { - if (characterCountBitsForVersions == null) { - throw new IllegalArgumentException("Character count doesn't apply to this mode"); - } - int number = version.getVersionNumber(); - int offset; - if (number <= 9) { - offset = 0; - } else if (number <= 26) { - offset = 1; - } else { - offset = 2; - } - return characterCountBitsForVersions[offset]; - } - - public int getBits() { - return bits; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Version.java plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/Version.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/decoder/Version.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/decoder/Version.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,586 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.decoder; - -import com.google.zxing.FormatException; -import com.google.zxing.common.BitMatrix; - -/** - * See ISO 18004:2006 Annex D - * - * @author Sean Owen - */ -public final class Version { - - /** - * See ISO 18004:2006 Annex D. - * Element i represents the raw version bits that specify version i + 7 - */ - private static final int[] VERSION_DECODE_INFO = { - 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6, - 0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78, - 0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683, - 0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB, - 0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250, - 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B, - 0x2542E, 0x26A64, 0x27541, 0x28C69 - }; - - private static final Version[] VERSIONS = buildVersions(); - - private final int versionNumber; - private final int[] alignmentPatternCenters; - private final ECBlocks[] ecBlocks; - private final int totalCodewords; - - private Version(int versionNumber, - int[] alignmentPatternCenters, - ECBlocks ecBlocks1, - ECBlocks ecBlocks2, - ECBlocks ecBlocks3, - ECBlocks ecBlocks4) { - this.versionNumber = versionNumber; - this.alignmentPatternCenters = alignmentPatternCenters; - this.ecBlocks = new ECBlocks[]{ecBlocks1, ecBlocks2, ecBlocks3, ecBlocks4}; - int total = 0; - int ecCodewords = ecBlocks1.getECCodewordsPerBlock(); - ECB[] ecbArray = ecBlocks1.getECBlocks(); - for (int i = 0; i < ecbArray.length; i++) { - ECB ecBlock = ecbArray[i]; - total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); - } - this.totalCodewords = total; - } - - public int getVersionNumber() { - return versionNumber; - } - - public int[] getAlignmentPatternCenters() { - return alignmentPatternCenters; - } - - public int getTotalCodewords() { - return totalCodewords; - } - - public int getDimensionForVersion() { - return 17 + 4 * versionNumber; - } - - public ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel) { - return ecBlocks[ecLevel.ordinal()]; - } - - /** - *

Deduces version information purely from QR Code dimensions.

- * - * @param dimension dimension in modules - * @return {@link Version} for a QR Code of that dimension - * @throws FormatException if dimension is not 1 mod 4 - */ - public static Version getProvisionalVersionForDimension(int dimension) throws FormatException { - if (dimension % 4 != 1) { - throw FormatException.getFormatInstance(); - } - try { - return getVersionForNumber((dimension - 17) >> 2); - } catch (IllegalArgumentException iae) { - throw FormatException.getFormatInstance(); - } - } - - public static Version getVersionForNumber(int versionNumber) { - if (versionNumber < 1 || versionNumber > 40) { - throw new IllegalArgumentException(); - } - return VERSIONS[versionNumber - 1]; - } - - static Version decodeVersionInformation(int versionBits) { - int bestDifference = Integer.MAX_VALUE; - int bestVersion = 0; - for (int i = 0; i < VERSION_DECODE_INFO.length; i++) { - int targetVersion = VERSION_DECODE_INFO[i]; - // Do the version info bits match exactly? done. - if (targetVersion == versionBits) { - return getVersionForNumber(i + 7); - } - // Otherwise see if this is the closest to a real version info bit string - // we have seen so far - int bitsDifference = FormatInformation.numBitsDiffering(versionBits, targetVersion); - if (bitsDifference < bestDifference) { - bestVersion = i + 7; - bestDifference = bitsDifference; - } - } - // We can tolerate up to 3 bits of error since no two version info codewords will - // differ in less than 8 bits. - if (bestDifference <= 3) { - return getVersionForNumber(bestVersion); - } - // If we didn't find a close enough match, fail - return null; - } - - /** - * See ISO 18004:2006 Annex E - */ - BitMatrix buildFunctionPattern() { - int dimension = getDimensionForVersion(); - BitMatrix bitMatrix = new BitMatrix(dimension); - - // Top left finder pattern + separator + format - bitMatrix.setRegion(0, 0, 9, 9); - // Top right finder pattern + separator + format - bitMatrix.setRegion(dimension - 8, 0, 8, 9); - // Bottom left finder pattern + separator + format - bitMatrix.setRegion(0, dimension - 8, 9, 8); - - // Alignment patterns - int max = alignmentPatternCenters.length; - for (int x = 0; x < max; x++) { - int i = alignmentPatternCenters[x] - 2; - for (int y = 0; y < max; y++) { - if ((x == 0 && (y == 0 || y == max - 1)) || (x == max - 1 && y == 0)) { - // No alignment patterns near the three finder paterns - continue; - } - bitMatrix.setRegion(alignmentPatternCenters[y] - 2, i, 5, 5); - } - } - - // Vertical timing pattern - bitMatrix.setRegion(6, 9, 1, dimension - 17); - // Horizontal timing pattern - bitMatrix.setRegion(9, 6, dimension - 17, 1); - - if (versionNumber > 6) { - // Version info, top right - bitMatrix.setRegion(dimension - 11, 0, 3, 6); - // Version info, bottom left - bitMatrix.setRegion(0, dimension - 11, 6, 3); - } - - return bitMatrix; - } - - /** - *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will - * use blocks of differing sizes within one version, so, this encapsulates the parameters for - * each set of blocks. It also holds the number of error-correction codewords per block since it - * will be the same across all blocks within one version.

- */ - public static final class ECBlocks { - private final int ecCodewordsPerBlock; - private final ECB[] ecBlocks; - - ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks) { - this.ecCodewordsPerBlock = ecCodewordsPerBlock; - this.ecBlocks = new ECB[]{ecBlocks}; - } - - ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks1, ECB ecBlocks2) { - this.ecCodewordsPerBlock = ecCodewordsPerBlock; - this.ecBlocks = new ECB[]{ecBlocks1, ecBlocks2}; - } - - public int getECCodewordsPerBlock() { - return ecCodewordsPerBlock; - } - - public int getNumBlocks() { - int total = 0; - for (int i = 0; i < ecBlocks.length; i++) { - total += ecBlocks[i].getCount(); - } - return total; - } - - public int getTotalECCodewords() { - return ecCodewordsPerBlock * getNumBlocks(); - } - - public ECB[] getECBlocks() { - return ecBlocks; - } - } - - /** - *

Encapsualtes the parameters for one error-correction block in one symbol version. - * This includes the number of data codewords, and the number of times a block with these - * parameters is used consecutively in the QR code version's format.

- */ - public static final class ECB { - private final int count; - private final int dataCodewords; - - ECB(int count, int dataCodewords) { - this.count = count; - this.dataCodewords = dataCodewords; - } - - public int getCount() { - return count; - } - - public int getDataCodewords() { - return dataCodewords; - } - } - - public String toString() { - return String.valueOf(versionNumber); - } - - /** - * See ISO 18004:2006 6.5.1 Table 9 - */ - private static Version[] buildVersions() { - return new Version[]{ - new Version(1, new int[]{}, - new ECBlocks(7, new ECB(1, 19)), - new ECBlocks(10, new ECB(1, 16)), - new ECBlocks(13, new ECB(1, 13)), - new ECBlocks(17, new ECB(1, 9))), - new Version(2, new int[]{6, 18}, - new ECBlocks(10, new ECB(1, 34)), - new ECBlocks(16, new ECB(1, 28)), - new ECBlocks(22, new ECB(1, 22)), - new ECBlocks(28, new ECB(1, 16))), - new Version(3, new int[]{6, 22}, - new ECBlocks(15, new ECB(1, 55)), - new ECBlocks(26, new ECB(1, 44)), - new ECBlocks(18, new ECB(2, 17)), - new ECBlocks(22, new ECB(2, 13))), - new Version(4, new int[]{6, 26}, - new ECBlocks(20, new ECB(1, 80)), - new ECBlocks(18, new ECB(2, 32)), - new ECBlocks(26, new ECB(2, 24)), - new ECBlocks(16, new ECB(4, 9))), - new Version(5, new int[]{6, 30}, - new ECBlocks(26, new ECB(1, 108)), - new ECBlocks(24, new ECB(2, 43)), - new ECBlocks(18, new ECB(2, 15), - new ECB(2, 16)), - new ECBlocks(22, new ECB(2, 11), - new ECB(2, 12))), - new Version(6, new int[]{6, 34}, - new ECBlocks(18, new ECB(2, 68)), - new ECBlocks(16, new ECB(4, 27)), - new ECBlocks(24, new ECB(4, 19)), - new ECBlocks(28, new ECB(4, 15))), - new Version(7, new int[]{6, 22, 38}, - new ECBlocks(20, new ECB(2, 78)), - new ECBlocks(18, new ECB(4, 31)), - new ECBlocks(18, new ECB(2, 14), - new ECB(4, 15)), - new ECBlocks(26, new ECB(4, 13), - new ECB(1, 14))), - new Version(8, new int[]{6, 24, 42}, - new ECBlocks(24, new ECB(2, 97)), - new ECBlocks(22, new ECB(2, 38), - new ECB(2, 39)), - new ECBlocks(22, new ECB(4, 18), - new ECB(2, 19)), - new ECBlocks(26, new ECB(4, 14), - new ECB(2, 15))), - new Version(9, new int[]{6, 26, 46}, - new ECBlocks(30, new ECB(2, 116)), - new ECBlocks(22, new ECB(3, 36), - new ECB(2, 37)), - new ECBlocks(20, new ECB(4, 16), - new ECB(4, 17)), - new ECBlocks(24, new ECB(4, 12), - new ECB(4, 13))), - new Version(10, new int[]{6, 28, 50}, - new ECBlocks(18, new ECB(2, 68), - new ECB(2, 69)), - new ECBlocks(26, new ECB(4, 43), - new ECB(1, 44)), - new ECBlocks(24, new ECB(6, 19), - new ECB(2, 20)), - new ECBlocks(28, new ECB(6, 15), - new ECB(2, 16))), - new Version(11, new int[]{6, 30, 54}, - new ECBlocks(20, new ECB(4, 81)), - new ECBlocks(30, new ECB(1, 50), - new ECB(4, 51)), - new ECBlocks(28, new ECB(4, 22), - new ECB(4, 23)), - new ECBlocks(24, new ECB(3, 12), - new ECB(8, 13))), - new Version(12, new int[]{6, 32, 58}, - new ECBlocks(24, new ECB(2, 92), - new ECB(2, 93)), - new ECBlocks(22, new ECB(6, 36), - new ECB(2, 37)), - new ECBlocks(26, new ECB(4, 20), - new ECB(6, 21)), - new ECBlocks(28, new ECB(7, 14), - new ECB(4, 15))), - new Version(13, new int[]{6, 34, 62}, - new ECBlocks(26, new ECB(4, 107)), - new ECBlocks(22, new ECB(8, 37), - new ECB(1, 38)), - new ECBlocks(24, new ECB(8, 20), - new ECB(4, 21)), - new ECBlocks(22, new ECB(12, 11), - new ECB(4, 12))), - new Version(14, new int[]{6, 26, 46, 66}, - new ECBlocks(30, new ECB(3, 115), - new ECB(1, 116)), - new ECBlocks(24, new ECB(4, 40), - new ECB(5, 41)), - new ECBlocks(20, new ECB(11, 16), - new ECB(5, 17)), - new ECBlocks(24, new ECB(11, 12), - new ECB(5, 13))), - new Version(15, new int[]{6, 26, 48, 70}, - new ECBlocks(22, new ECB(5, 87), - new ECB(1, 88)), - new ECBlocks(24, new ECB(5, 41), - new ECB(5, 42)), - new ECBlocks(30, new ECB(5, 24), - new ECB(7, 25)), - new ECBlocks(24, new ECB(11, 12), - new ECB(7, 13))), - new Version(16, new int[]{6, 26, 50, 74}, - new ECBlocks(24, new ECB(5, 98), - new ECB(1, 99)), - new ECBlocks(28, new ECB(7, 45), - new ECB(3, 46)), - new ECBlocks(24, new ECB(15, 19), - new ECB(2, 20)), - new ECBlocks(30, new ECB(3, 15), - new ECB(13, 16))), - new Version(17, new int[]{6, 30, 54, 78}, - new ECBlocks(28, new ECB(1, 107), - new ECB(5, 108)), - new ECBlocks(28, new ECB(10, 46), - new ECB(1, 47)), - new ECBlocks(28, new ECB(1, 22), - new ECB(15, 23)), - new ECBlocks(28, new ECB(2, 14), - new ECB(17, 15))), - new Version(18, new int[]{6, 30, 56, 82}, - new ECBlocks(30, new ECB(5, 120), - new ECB(1, 121)), - new ECBlocks(26, new ECB(9, 43), - new ECB(4, 44)), - new ECBlocks(28, new ECB(17, 22), - new ECB(1, 23)), - new ECBlocks(28, new ECB(2, 14), - new ECB(19, 15))), - new Version(19, new int[]{6, 30, 58, 86}, - new ECBlocks(28, new ECB(3, 113), - new ECB(4, 114)), - new ECBlocks(26, new ECB(3, 44), - new ECB(11, 45)), - new ECBlocks(26, new ECB(17, 21), - new ECB(4, 22)), - new ECBlocks(26, new ECB(9, 13), - new ECB(16, 14))), - new Version(20, new int[]{6, 34, 62, 90}, - new ECBlocks(28, new ECB(3, 107), - new ECB(5, 108)), - new ECBlocks(26, new ECB(3, 41), - new ECB(13, 42)), - new ECBlocks(30, new ECB(15, 24), - new ECB(5, 25)), - new ECBlocks(28, new ECB(15, 15), - new ECB(10, 16))), - new Version(21, new int[]{6, 28, 50, 72, 94}, - new ECBlocks(28, new ECB(4, 116), - new ECB(4, 117)), - new ECBlocks(26, new ECB(17, 42)), - new ECBlocks(28, new ECB(17, 22), - new ECB(6, 23)), - new ECBlocks(30, new ECB(19, 16), - new ECB(6, 17))), - new Version(22, new int[]{6, 26, 50, 74, 98}, - new ECBlocks(28, new ECB(2, 111), - new ECB(7, 112)), - new ECBlocks(28, new ECB(17, 46)), - new ECBlocks(30, new ECB(7, 24), - new ECB(16, 25)), - new ECBlocks(24, new ECB(34, 13))), - new Version(23, new int[]{6, 30, 54, 78, 102}, - new ECBlocks(30, new ECB(4, 121), - new ECB(5, 122)), - new ECBlocks(28, new ECB(4, 47), - new ECB(14, 48)), - new ECBlocks(30, new ECB(11, 24), - new ECB(14, 25)), - new ECBlocks(30, new ECB(16, 15), - new ECB(14, 16))), - new Version(24, new int[]{6, 28, 54, 80, 106}, - new ECBlocks(30, new ECB(6, 117), - new ECB(4, 118)), - new ECBlocks(28, new ECB(6, 45), - new ECB(14, 46)), - new ECBlocks(30, new ECB(11, 24), - new ECB(16, 25)), - new ECBlocks(30, new ECB(30, 16), - new ECB(2, 17))), - new Version(25, new int[]{6, 32, 58, 84, 110}, - new ECBlocks(26, new ECB(8, 106), - new ECB(4, 107)), - new ECBlocks(28, new ECB(8, 47), - new ECB(13, 48)), - new ECBlocks(30, new ECB(7, 24), - new ECB(22, 25)), - new ECBlocks(30, new ECB(22, 15), - new ECB(13, 16))), - new Version(26, new int[]{6, 30, 58, 86, 114}, - new ECBlocks(28, new ECB(10, 114), - new ECB(2, 115)), - new ECBlocks(28, new ECB(19, 46), - new ECB(4, 47)), - new ECBlocks(28, new ECB(28, 22), - new ECB(6, 23)), - new ECBlocks(30, new ECB(33, 16), - new ECB(4, 17))), - new Version(27, new int[]{6, 34, 62, 90, 118}, - new ECBlocks(30, new ECB(8, 122), - new ECB(4, 123)), - new ECBlocks(28, new ECB(22, 45), - new ECB(3, 46)), - new ECBlocks(30, new ECB(8, 23), - new ECB(26, 24)), - new ECBlocks(30, new ECB(12, 15), - new ECB(28, 16))), - new Version(28, new int[]{6, 26, 50, 74, 98, 122}, - new ECBlocks(30, new ECB(3, 117), - new ECB(10, 118)), - new ECBlocks(28, new ECB(3, 45), - new ECB(23, 46)), - new ECBlocks(30, new ECB(4, 24), - new ECB(31, 25)), - new ECBlocks(30, new ECB(11, 15), - new ECB(31, 16))), - new Version(29, new int[]{6, 30, 54, 78, 102, 126}, - new ECBlocks(30, new ECB(7, 116), - new ECB(7, 117)), - new ECBlocks(28, new ECB(21, 45), - new ECB(7, 46)), - new ECBlocks(30, new ECB(1, 23), - new ECB(37, 24)), - new ECBlocks(30, new ECB(19, 15), - new ECB(26, 16))), - new Version(30, new int[]{6, 26, 52, 78, 104, 130}, - new ECBlocks(30, new ECB(5, 115), - new ECB(10, 116)), - new ECBlocks(28, new ECB(19, 47), - new ECB(10, 48)), - new ECBlocks(30, new ECB(15, 24), - new ECB(25, 25)), - new ECBlocks(30, new ECB(23, 15), - new ECB(25, 16))), - new Version(31, new int[]{6, 30, 56, 82, 108, 134}, - new ECBlocks(30, new ECB(13, 115), - new ECB(3, 116)), - new ECBlocks(28, new ECB(2, 46), - new ECB(29, 47)), - new ECBlocks(30, new ECB(42, 24), - new ECB(1, 25)), - new ECBlocks(30, new ECB(23, 15), - new ECB(28, 16))), - new Version(32, new int[]{6, 34, 60, 86, 112, 138}, - new ECBlocks(30, new ECB(17, 115)), - new ECBlocks(28, new ECB(10, 46), - new ECB(23, 47)), - new ECBlocks(30, new ECB(10, 24), - new ECB(35, 25)), - new ECBlocks(30, new ECB(19, 15), - new ECB(35, 16))), - new Version(33, new int[]{6, 30, 58, 86, 114, 142}, - new ECBlocks(30, new ECB(17, 115), - new ECB(1, 116)), - new ECBlocks(28, new ECB(14, 46), - new ECB(21, 47)), - new ECBlocks(30, new ECB(29, 24), - new ECB(19, 25)), - new ECBlocks(30, new ECB(11, 15), - new ECB(46, 16))), - new Version(34, new int[]{6, 34, 62, 90, 118, 146}, - new ECBlocks(30, new ECB(13, 115), - new ECB(6, 116)), - new ECBlocks(28, new ECB(14, 46), - new ECB(23, 47)), - new ECBlocks(30, new ECB(44, 24), - new ECB(7, 25)), - new ECBlocks(30, new ECB(59, 16), - new ECB(1, 17))), - new Version(35, new int[]{6, 30, 54, 78, 102, 126, 150}, - new ECBlocks(30, new ECB(12, 121), - new ECB(7, 122)), - new ECBlocks(28, new ECB(12, 47), - new ECB(26, 48)), - new ECBlocks(30, new ECB(39, 24), - new ECB(14, 25)), - new ECBlocks(30, new ECB(22, 15), - new ECB(41, 16))), - new Version(36, new int[]{6, 24, 50, 76, 102, 128, 154}, - new ECBlocks(30, new ECB(6, 121), - new ECB(14, 122)), - new ECBlocks(28, new ECB(6, 47), - new ECB(34, 48)), - new ECBlocks(30, new ECB(46, 24), - new ECB(10, 25)), - new ECBlocks(30, new ECB(2, 15), - new ECB(64, 16))), - new Version(37, new int[]{6, 28, 54, 80, 106, 132, 158}, - new ECBlocks(30, new ECB(17, 122), - new ECB(4, 123)), - new ECBlocks(28, new ECB(29, 46), - new ECB(14, 47)), - new ECBlocks(30, new ECB(49, 24), - new ECB(10, 25)), - new ECBlocks(30, new ECB(24, 15), - new ECB(46, 16))), - new Version(38, new int[]{6, 32, 58, 84, 110, 136, 162}, - new ECBlocks(30, new ECB(4, 122), - new ECB(18, 123)), - new ECBlocks(28, new ECB(13, 46), - new ECB(32, 47)), - new ECBlocks(30, new ECB(48, 24), - new ECB(14, 25)), - new ECBlocks(30, new ECB(42, 15), - new ECB(32, 16))), - new Version(39, new int[]{6, 26, 54, 82, 110, 138, 166}, - new ECBlocks(30, new ECB(20, 117), - new ECB(4, 118)), - new ECBlocks(28, new ECB(40, 47), - new ECB(7, 48)), - new ECBlocks(30, new ECB(43, 24), - new ECB(22, 25)), - new ECBlocks(30, new ECB(10, 15), - new ECB(67, 16))), - new Version(40, new int[]{6, 30, 58, 86, 114, 142, 170}, - new ECBlocks(30, new ECB(19, 118), - new ECB(6, 119)), - new ECBlocks(28, new ECB(18, 47), - new ECB(31, 48)), - new ECBlocks(30, new ECB(34, 24), - new ECB(34, 25)), - new ECBlocks(30, new ECB(20, 15), - new ECB(61, 16))) - }; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/BlockPair.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/BlockPair.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/BlockPair.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/BlockPair.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -final class BlockPair { - - private final byte[] dataBytes; - private final byte[] errorCorrectionBytes; - - BlockPair(byte[] data, byte[] errorCorrection) { - dataBytes = data; - errorCorrectionBytes = errorCorrection; - } - - public byte[] getDataBytes() { - return dataBytes; - } - - public byte[] getErrorCorrectionBytes() { - return errorCorrectionBytes; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/ByteMatrix.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/ByteMatrix.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/ByteMatrix.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/ByteMatrix.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -/** - * A class which wraps a 2D array of bytes. The default usage is signed. If you want to use it as a - * unsigned container, it's up to you to do byteValue & 0xff at each location. - * - * JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned - * -1, 0, and 1, I'm going to use less memory and go with bytes. - * - * @author dswitkin@google.com (Daniel Switkin) - */ -public final class ByteMatrix { - - private final byte[][] bytes; - private final int width; - private final int height; - - public ByteMatrix(int width, int height) { - bytes = new byte[height][width]; - this.width = width; - this.height = height; - } - - public int getHeight() { - return height; - } - - public int getWidth() { - return width; - } - - public byte get(int x, int y) { - return bytes[y][x]; - } - - public byte[][] getArray() { - return bytes; - } - - public void set(int x, int y, byte value) { - bytes[y][x] = value; - } - - public void set(int x, int y, int value) { - bytes[y][x] = (byte) value; - } - - public void set(int x, int y, boolean value) { - bytes[y][x] = (byte) (value ? 1 : 0); - } - - public void clear(byte value) { - for (int y = 0; y < height; ++y) { - for (int x = 0; x < width; ++x) { - bytes[y][x] = value; - } - } - } - - public String toString() { - StringBuffer result = new StringBuffer(2 * width * height + 2); - for (int y = 0; y < height; ++y) { - for (int x = 0; x < width; ++x) { - switch (bytes[y][x]) { - case 0: - result.append(" 0"); - break; - case 1: - result.append(" 1"); - break; - default: - result.append(" "); - break; - } - } - result.append('\n'); - } - return result.toString(); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/Encoder.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/Encoder.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/Encoder.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/Encoder.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,557 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -import java.io.UnsupportedEncodingException; -import java.util.Hashtable; -import java.util.Vector; - -import com.google.zxing.EncodeHintType; -import com.google.zxing.WriterException; -import com.google.zxing.common.BitArray; -import com.google.zxing.common.CharacterSetECI; -import com.google.zxing.common.ECI; -import com.google.zxing.common.reedsolomon.GF256; -import com.google.zxing.common.reedsolomon.ReedSolomonEncoder; -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import com.google.zxing.qrcode.decoder.Mode; -import com.google.zxing.qrcode.decoder.Version; - -/** - * @author satorux@google.com (Satoru Takabayashi) - creator - * @author dswitkin@google.com (Daniel Switkin) - ported from C++ - */ -public final class Encoder { - - // The original table is defined in the table 5 of JISX0510:2004 (p.19). - private static final int[] ALPHANUMERIC_TABLE = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x00-0x0f - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x10-0x1f - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // 0x20-0x2f - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // 0x30-0x3f - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 0x40-0x4f - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 0x50-0x5f - }; - - static final String DEFAULT_BYTE_MODE_ENCODING = "ISO-8859-1"; - - private Encoder() { - } - - // The mask penalty calculation is complicated. See Table 21 of JISX0510:2004 (p.45) for details. - // Basically it applies four rules and summate all penalties. - private static int calculateMaskPenalty(ByteMatrix matrix) { - int penalty = 0; - penalty += MaskUtil.applyMaskPenaltyRule1(matrix); - penalty += MaskUtil.applyMaskPenaltyRule2(matrix); - penalty += MaskUtil.applyMaskPenaltyRule3(matrix); - penalty += MaskUtil.applyMaskPenaltyRule4(matrix); - return penalty; - } - - /** - * Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen - * internally by chooseMode(). On success, store the result in "qrCode". - * - * We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for - * "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very - * strong error correction for this purpose. - * - * Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() - * with which clients can specify the encoding mode. For now, we don't need the functionality. - */ - public static void encode(String content, ErrorCorrectionLevel ecLevel, QRCode qrCode) - throws WriterException { - encode(content, ecLevel, null, qrCode); - } - - public static void encode(String content, ErrorCorrectionLevel ecLevel, Hashtable hints, - QRCode qrCode) throws WriterException { - - String encoding = hints == null ? null : (String) hints.get(EncodeHintType.CHARACTER_SET); - if (encoding == null) { - encoding = DEFAULT_BYTE_MODE_ENCODING; - } - - // Step 1: Choose the mode (encoding). - Mode mode = chooseMode(content, encoding); - - // Step 2: Append "bytes" into "dataBits" in appropriate encoding. - BitArray dataBits = new BitArray(); - appendBytes(content, mode, dataBits, encoding); - // Step 3: Initialize QR code that can contain "dataBits". - int numInputBytes = dataBits.getSizeInBytes(); - initQRCode(numInputBytes, ecLevel, mode, qrCode); - - // Step 4: Build another bit vector that contains header and data. - BitArray headerAndDataBits = new BitArray(); - - // Step 4.5: Append ECI message if applicable - if (mode == Mode.BYTE && !DEFAULT_BYTE_MODE_ENCODING.equals(encoding)) { - CharacterSetECI eci = CharacterSetECI.getCharacterSetECIByName(encoding); - if (eci != null) { - appendECI(eci, headerAndDataBits); - } - } - - appendModeInfo(mode, headerAndDataBits); - - int numLetters = mode.equals(Mode.BYTE) ? dataBits.getSizeInBytes() : content.length(); - appendLengthInfo(numLetters, qrCode.getVersion(), mode, headerAndDataBits); - headerAndDataBits.appendBitArray(dataBits); - - // Step 5: Terminate the bits properly. - terminateBits(qrCode.getNumDataBytes(), headerAndDataBits); - - // Step 6: Interleave data bits with error correction code. - BitArray finalBits = new BitArray(); - interleaveWithECBytes(headerAndDataBits, qrCode.getNumTotalBytes(), qrCode.getNumDataBytes(), - qrCode.getNumRSBlocks(), finalBits); - - // Step 7: Choose the mask pattern and set to "qrCode". - ByteMatrix matrix = new ByteMatrix(qrCode.getMatrixWidth(), qrCode.getMatrixWidth()); - qrCode.setMaskPattern(chooseMaskPattern(finalBits, qrCode.getECLevel(), qrCode.getVersion(), - matrix)); - - // Step 8. Build the matrix and set it to "qrCode". - MatrixUtil.buildMatrix(finalBits, qrCode.getECLevel(), qrCode.getVersion(), - qrCode.getMaskPattern(), matrix); - qrCode.setMatrix(matrix); - // Step 9. Make sure we have a valid QR Code. - if (!qrCode.isValid()) { - throw new WriterException("Invalid QR code: " + qrCode.toString()); - } - } - - /** - * @return the code point of the table used in alphanumeric mode or - * -1 if there is no corresponding code in the table. - */ - static int getAlphanumericCode(int code) { - if (code < ALPHANUMERIC_TABLE.length) { - return ALPHANUMERIC_TABLE[code]; - } - return -1; - } - - public static Mode chooseMode(String content) { - return chooseMode(content, null); - } - - /** - * Choose the best mode by examining the content. Note that 'encoding' is used as a hint; - * if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. - */ - public static Mode chooseMode(String content, String encoding) { - if ("Shift_JIS".equals(encoding)) { - // Choose Kanji mode if all input are double-byte characters - return isOnlyDoubleByteKanji(content) ? Mode.KANJI : Mode.BYTE; - } - boolean hasNumeric = false; - boolean hasAlphanumeric = false; - for (int i = 0; i < content.length(); ++i) { - char c = content.charAt(i); - if (c >= '0' && c <= '9') { - hasNumeric = true; - } else if (getAlphanumericCode(c) != -1) { - hasAlphanumeric = true; - } else { - return Mode.BYTE; - } - } - if (hasAlphanumeric) { - return Mode.ALPHANUMERIC; - } else if (hasNumeric) { - return Mode.NUMERIC; - } - return Mode.BYTE; - } - - private static boolean isOnlyDoubleByteKanji(String content) { - byte[] bytes; - try { - bytes = content.getBytes("Shift_JIS"); - } catch (UnsupportedEncodingException uee) { - return false; - } - int length = bytes.length; - if (length % 2 != 0) { - return false; - } - for (int i = 0; i < length; i += 2) { - int byte1 = bytes[i] & 0xFF; - if ((byte1 < 0x81 || byte1 > 0x9F) && (byte1 < 0xE0 || byte1 > 0xEB)) { - return false; - } - } - return true; - } - - private static int chooseMaskPattern(BitArray bits, ErrorCorrectionLevel ecLevel, int version, - ByteMatrix matrix) throws WriterException { - - int minPenalty = Integer.MAX_VALUE; // Lower penalty is better. - int bestMaskPattern = -1; - // We try all mask patterns to choose the best one. - for (int maskPattern = 0; maskPattern < QRCode.NUM_MASK_PATTERNS; maskPattern++) { - MatrixUtil.buildMatrix(bits, ecLevel, version, maskPattern, matrix); - int penalty = calculateMaskPenalty(matrix); - if (penalty < minPenalty) { - minPenalty = penalty; - bestMaskPattern = maskPattern; - } - } - return bestMaskPattern; - } - - /** - * Initialize "qrCode" according to "numInputBytes", "ecLevel", and "mode". On success, - * modify "qrCode". - */ - private static void initQRCode(int numInputBytes, ErrorCorrectionLevel ecLevel, Mode mode, - QRCode qrCode) throws WriterException { - qrCode.setECLevel(ecLevel); - qrCode.setMode(mode); - - // In the following comments, we use numbers of Version 7-H. - for (int versionNum = 1; versionNum <= 40; versionNum++) { - Version version = Version.getVersionForNumber(versionNum); - // numBytes = 196 - int numBytes = version.getTotalCodewords(); - // getNumECBytes = 130 - Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); - int numEcBytes = ecBlocks.getTotalECCodewords(); - // getNumRSBlocks = 5 - int numRSBlocks = ecBlocks.getNumBlocks(); - // getNumDataBytes = 196 - 130 = 66 - int numDataBytes = numBytes - numEcBytes; - // We want to choose the smallest version which can contain data of "numInputBytes" + some - // extra bits for the header (mode info and length info). The header can be three bytes - // (precisely 4 + 16 bits) at most. Hence we do +3 here. - if (numDataBytes >= numInputBytes + 3) { - // Yay, we found the proper rs block info! - qrCode.setVersion(versionNum); - qrCode.setNumTotalBytes(numBytes); - qrCode.setNumDataBytes(numDataBytes); - qrCode.setNumRSBlocks(numRSBlocks); - // getNumECBytes = 196 - 66 = 130 - qrCode.setNumECBytes(numEcBytes); - // matrix width = 21 + 6 * 4 = 45 - qrCode.setMatrixWidth(version.getDimensionForVersion()); - return; - } - } - throw new WriterException("Cannot find proper rs block info (input data too big?)"); - } - - /** - * Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). - */ - static void terminateBits(int numDataBytes, BitArray bits) throws WriterException { - int capacity = numDataBytes << 3; - if (bits.getSize() > capacity) { - throw new WriterException("data bits cannot fit in the QR Code" + bits.getSize() + " > " + - capacity); - } - for (int i = 0; i < 4 && bits.getSize() < capacity; ++i) { - bits.appendBit(false); - } - // Append termination bits. See 8.4.8 of JISX0510:2004 (p.24) for details. - // If the last byte isn't 8-bit aligned, we'll add padding bits. - int numBitsInLastByte = bits.getSize() & 0x07; - if (numBitsInLastByte > 0) { - for (int i = numBitsInLastByte; i < 8; i++) { - bits.appendBit(false); - } - } - // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24). - int numPaddingBytes = numDataBytes - bits.getSizeInBytes(); - for (int i = 0; i < numPaddingBytes; ++i) { - bits.appendBits(((i & 0x01) == 0) ? 0xEC : 0x11, 8); - } - if (bits.getSize() != capacity) { - throw new WriterException("Bits size does not equal capacity"); - } - } - - /** - * Get number of data bytes and number of error correction bytes for block id "blockID". Store - * the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of - * JISX0510:2004 (p.30) - */ - static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes, int numDataBytes, - int numRSBlocks, int blockID, int[] numDataBytesInBlock, - int[] numECBytesInBlock) throws WriterException { - if (blockID >= numRSBlocks) { - throw new WriterException("Block ID too large"); - } - // numRsBlocksInGroup2 = 196 % 5 = 1 - int numRsBlocksInGroup2 = numTotalBytes % numRSBlocks; - // numRsBlocksInGroup1 = 5 - 1 = 4 - int numRsBlocksInGroup1 = numRSBlocks - numRsBlocksInGroup2; - // numTotalBytesInGroup1 = 196 / 5 = 39 - int numTotalBytesInGroup1 = numTotalBytes / numRSBlocks; - // numTotalBytesInGroup2 = 39 + 1 = 40 - int numTotalBytesInGroup2 = numTotalBytesInGroup1 + 1; - // numDataBytesInGroup1 = 66 / 5 = 13 - int numDataBytesInGroup1 = numDataBytes / numRSBlocks; - // numDataBytesInGroup2 = 13 + 1 = 14 - int numDataBytesInGroup2 = numDataBytesInGroup1 + 1; - // numEcBytesInGroup1 = 39 - 13 = 26 - int numEcBytesInGroup1 = numTotalBytesInGroup1 - numDataBytesInGroup1; - // numEcBytesInGroup2 = 40 - 14 = 26 - int numEcBytesInGroup2 = numTotalBytesInGroup2 - numDataBytesInGroup2; - // Sanity checks. - // 26 = 26 - if (numEcBytesInGroup1 != numEcBytesInGroup2) { - throw new WriterException("EC bytes mismatch"); - } - // 5 = 4 + 1. - if (numRSBlocks != numRsBlocksInGroup1 + numRsBlocksInGroup2) { - throw new WriterException("RS blocks mismatch"); - } - // 196 = (13 + 26) * 4 + (14 + 26) * 1 - if (numTotalBytes != - ((numDataBytesInGroup1 + numEcBytesInGroup1) * - numRsBlocksInGroup1) + - ((numDataBytesInGroup2 + numEcBytesInGroup2) * - numRsBlocksInGroup2)) { - throw new WriterException("Total bytes mismatch"); - } - - if (blockID < numRsBlocksInGroup1) { - numDataBytesInBlock[0] = numDataBytesInGroup1; - numECBytesInBlock[0] = numEcBytesInGroup1; - } else { - numDataBytesInBlock[0] = numDataBytesInGroup2; - numECBytesInBlock[0] = numEcBytesInGroup2; - } - } - - /** - * Interleave "bits" with corresponding error correction bytes. On success, store the result in - * "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. - */ - static void interleaveWithECBytes(BitArray bits, int numTotalBytes, - int numDataBytes, int numRSBlocks, BitArray result) throws WriterException { - - // "bits" must have "getNumDataBytes" bytes of data. - if (bits.getSizeInBytes() != numDataBytes) { - throw new WriterException("Number of bits and data bytes does not match"); - } - - // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll - // store the divided data bytes blocks and error correction bytes blocks into "blocks". - int dataBytesOffset = 0; - int maxNumDataBytes = 0; - int maxNumEcBytes = 0; - - // Since, we know the number of reedsolmon blocks, we can initialize the vector with the number. - Vector blocks = new Vector(numRSBlocks); - - for (int i = 0; i < numRSBlocks; ++i) { - int[] numDataBytesInBlock = new int[1]; - int[] numEcBytesInBlock = new int[1]; - getNumDataBytesAndNumECBytesForBlockID( - numTotalBytes, numDataBytes, numRSBlocks, i, - numDataBytesInBlock, numEcBytesInBlock); - - int size = numDataBytesInBlock[0]; - byte[] dataBytes = new byte[size]; - bits.toBytes(8*dataBytesOffset, dataBytes, 0, size); - byte[] ecBytes = generateECBytes(dataBytes, numEcBytesInBlock[0]); - blocks.addElement(new BlockPair(dataBytes, ecBytes)); - - maxNumDataBytes = Math.max(maxNumDataBytes, size); - maxNumEcBytes = Math.max(maxNumEcBytes, ecBytes.length); - dataBytesOffset += numDataBytesInBlock[0]; - } - if (numDataBytes != dataBytesOffset) { - throw new WriterException("Data bytes does not match offset"); - } - - // First, place data blocks. - for (int i = 0; i < maxNumDataBytes; ++i) { - for (int j = 0; j < blocks.size(); ++j) { - byte[] dataBytes = ((BlockPair) blocks.elementAt(j)).getDataBytes(); - if (i < dataBytes.length) { - result.appendBits(dataBytes[i], 8); - } - } - } - // Then, place error correction blocks. - for (int i = 0; i < maxNumEcBytes; ++i) { - for (int j = 0; j < blocks.size(); ++j) { - byte[] ecBytes = ((BlockPair) blocks.elementAt(j)).getErrorCorrectionBytes(); - if (i < ecBytes.length) { - result.appendBits(ecBytes[i], 8); - } - } - } - if (numTotalBytes != result.getSizeInBytes()) { // Should be same. - throw new WriterException("Interleaving error: " + numTotalBytes + " and " + - result.getSizeInBytes() + " differ."); - } - } - - static byte[] generateECBytes(byte[] dataBytes, int numEcBytesInBlock) { - int numDataBytes = dataBytes.length; - int[] toEncode = new int[numDataBytes + numEcBytesInBlock]; - for (int i = 0; i < numDataBytes; i++) { - toEncode[i] = dataBytes[i] & 0xFF; - } - new ReedSolomonEncoder(GF256.QR_CODE_FIELD).encode(toEncode, numEcBytesInBlock); - - byte[] ecBytes = new byte[numEcBytesInBlock]; - for (int i = 0; i < numEcBytesInBlock; i++) { - ecBytes[i] = (byte) toEncode[numDataBytes + i]; - } - return ecBytes; - } - - /** - * Append mode info. On success, store the result in "bits". - */ - static void appendModeInfo(Mode mode, BitArray bits) { - bits.appendBits(mode.getBits(), 4); - } - - - /** - * Append length info. On success, store the result in "bits". - */ - static void appendLengthInfo(int numLetters, int version, Mode mode, BitArray bits) - throws WriterException { - int numBits = mode.getCharacterCountBits(Version.getVersionForNumber(version)); - if (numLetters > ((1 << numBits) - 1)) { - throw new WriterException(numLetters + "is bigger than" + ((1 << numBits) - 1)); - } - bits.appendBits(numLetters, numBits); - } - - /** - * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". - */ - static void appendBytes(String content, Mode mode, BitArray bits, String encoding) - throws WriterException { - if (mode.equals(Mode.NUMERIC)) { - appendNumericBytes(content, bits); - } else if (mode.equals(Mode.ALPHANUMERIC)) { - appendAlphanumericBytes(content, bits); - } else if (mode.equals(Mode.BYTE)) { - append8BitBytes(content, bits, encoding); - } else if (mode.equals(Mode.KANJI)) { - appendKanjiBytes(content, bits); - } else { - throw new WriterException("Invalid mode: " + mode); - } - } - - static void appendNumericBytes(String content, BitArray bits) { - int length = content.length(); - int i = 0; - while (i < length) { - int num1 = content.charAt(i) - '0'; - if (i + 2 < length) { - // Encode three numeric letters in ten bits. - int num2 = content.charAt(i + 1) - '0'; - int num3 = content.charAt(i + 2) - '0'; - bits.appendBits(num1 * 100 + num2 * 10 + num3, 10); - i += 3; - } else if (i + 1 < length) { - // Encode two numeric letters in seven bits. - int num2 = content.charAt(i + 1) - '0'; - bits.appendBits(num1 * 10 + num2, 7); - i += 2; - } else { - // Encode one numeric letter in four bits. - bits.appendBits(num1, 4); - i++; - } - } - } - - static void appendAlphanumericBytes(String content, BitArray bits) throws WriterException { - int length = content.length(); - int i = 0; - while (i < length) { - int code1 = getAlphanumericCode(content.charAt(i)); - if (code1 == -1) { - throw new WriterException(); - } - if (i + 1 < length) { - int code2 = getAlphanumericCode(content.charAt(i + 1)); - if (code2 == -1) { - throw new WriterException(); - } - // Encode two alphanumeric letters in 11 bits. - bits.appendBits(code1 * 45 + code2, 11); - i += 2; - } else { - // Encode one alphanumeric letter in six bits. - bits.appendBits(code1, 6); - i++; - } - } - } - - static void append8BitBytes(String content, BitArray bits, String encoding) - throws WriterException { - byte[] bytes; - try { - bytes = content.getBytes(encoding); - } catch (UnsupportedEncodingException uee) { - throw new WriterException(uee.toString()); - } - for (int i = 0; i < bytes.length; ++i) { - bits.appendBits(bytes[i], 8); - } - } - - static void appendKanjiBytes(String content, BitArray bits) throws WriterException { - byte[] bytes; - try { - bytes = content.getBytes("Shift_JIS"); - } catch (UnsupportedEncodingException uee) { - throw new WriterException(uee.toString()); - } - int length = bytes.length; - for (int i = 0; i < length; i += 2) { - int byte1 = bytes[i] & 0xFF; - int byte2 = bytes[i + 1] & 0xFF; - int code = (byte1 << 8) | byte2; - int subtracted = -1; - if (code >= 0x8140 && code <= 0x9ffc) { - subtracted = code - 0x8140; - } else if (code >= 0xe040 && code <= 0xebbf) { - subtracted = code - 0xc140; - } - if (subtracted == -1) { - throw new WriterException("Invalid byte sequence"); - } - int encoded = ((subtracted >> 8) * 0xc0) + (subtracted & 0xff); - bits.appendBits(encoded, 13); - } - } - - private static void appendECI(ECI eci, BitArray bits) { - bits.appendBits(Mode.ECI.getBits(), 4); - // This is correct for values up to 127, which is all we need now. - bits.appendBits(eci.getValue(), 8); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MaskUtil.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/MaskUtil.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MaskUtil.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/MaskUtil.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -/** - * @author satorux@google.com (Satoru Takabayashi) - creator - * @author dswitkin@google.com (Daniel Switkin) - ported from C++ - */ -public final class MaskUtil { - - private MaskUtil() { - // do nothing - } - - // Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and - // give penalty to them. Example: 00000 or 11111. - public static int applyMaskPenaltyRule1(ByteMatrix matrix) { - return applyMaskPenaltyRule1Internal(matrix, true) + applyMaskPenaltyRule1Internal(matrix, false); - } - - // Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give - // penalty to them. - public static int applyMaskPenaltyRule2(ByteMatrix matrix) { - int penalty = 0; - byte[][] array = matrix.getArray(); - int width = matrix.getWidth(); - int height = matrix.getHeight(); - for (int y = 0; y < height - 1; ++y) { - for (int x = 0; x < width - 1; ++x) { - int value = array[y][x]; - if (value == array[y][x + 1] && value == array[y + 1][x] && value == array[y + 1][x + 1]) { - penalty += 3; - } - } - } - return penalty; - } - - // Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or - // 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give - // penalties twice (i.e. 40 * 2). - public static int applyMaskPenaltyRule3(ByteMatrix matrix) { - int penalty = 0; - byte[][] array = matrix.getArray(); - int width = matrix.getWidth(); - int height = matrix.getHeight(); - for (int y = 0; y < height; ++y) { - for (int x = 0; x < width; ++x) { - // Tried to simplify following conditions but failed. - if (x + 6 < width && - array[y][x] == 1 && - array[y][x + 1] == 0 && - array[y][x + 2] == 1 && - array[y][x + 3] == 1 && - array[y][x + 4] == 1 && - array[y][x + 5] == 0 && - array[y][x + 6] == 1 && - ((x + 10 < width && - array[y][x + 7] == 0 && - array[y][x + 8] == 0 && - array[y][x + 9] == 0 && - array[y][x + 10] == 0) || - (x - 4 >= 0 && - array[y][x - 1] == 0 && - array[y][x - 2] == 0 && - array[y][x - 3] == 0 && - array[y][x - 4] == 0))) { - penalty += 40; - } - if (y + 6 < height && - array[y][x] == 1 && - array[y + 1][x] == 0 && - array[y + 2][x] == 1 && - array[y + 3][x] == 1 && - array[y + 4][x] == 1 && - array[y + 5][x] == 0 && - array[y + 6][x] == 1 && - ((y + 10 < height && - array[y + 7][x] == 0 && - array[y + 8][x] == 0 && - array[y + 9][x] == 0 && - array[y + 10][x] == 0) || - (y - 4 >= 0 && - array[y - 1][x] == 0 && - array[y - 2][x] == 0 && - array[y - 3][x] == 0 && - array[y - 4][x] == 0))) { - penalty += 40; - } - } - } - return penalty; - } - - // Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give - // penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. Examples: - // - 0% => 100 - // - 40% => 20 - // - 45% => 10 - // - 50% => 0 - // - 55% => 10 - // - 55% => 20 - // - 100% => 100 - public static int applyMaskPenaltyRule4(ByteMatrix matrix) { - int numDarkCells = 0; - byte[][] array = matrix.getArray(); - int width = matrix.getWidth(); - int height = matrix.getHeight(); - for (int y = 0; y < height; ++y) { - for (int x = 0; x < width; ++x) { - if (array[y][x] == 1) { - numDarkCells += 1; - } - } - } - int numTotalCells = matrix.getHeight() * matrix.getWidth(); - double darkRatio = (double) numDarkCells / numTotalCells; - return Math.abs((int) (darkRatio * 100 - 50)) / 5 * 10; - } - - // Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask - // pattern conditions. - public static boolean getDataMaskBit(int maskPattern, int x, int y) { - if (!QRCode.isValidMaskPattern(maskPattern)) { - throw new IllegalArgumentException("Invalid mask pattern"); - } - int intermediate, temp; - switch (maskPattern) { - case 0: - intermediate = (y + x) & 0x1; - break; - case 1: - intermediate = y & 0x1; - break; - case 2: - intermediate = x % 3; - break; - case 3: - intermediate = (y + x) % 3; - break; - case 4: - intermediate = ((y >>> 1) + (x / 3)) & 0x1; - break; - case 5: - temp = y * x; - intermediate = (temp & 0x1) + (temp % 3); - break; - case 6: - temp = y * x; - intermediate = (((temp & 0x1) + (temp % 3)) & 0x1); - break; - case 7: - temp = y * x; - intermediate = (((temp % 3) + ((y + x) & 0x1)) & 0x1); - break; - default: - throw new IllegalArgumentException("Invalid mask pattern: " + maskPattern); - } - return intermediate == 0; - } - - // Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both - // vertical and horizontal orders respectively. - private static int applyMaskPenaltyRule1Internal(ByteMatrix matrix, boolean isHorizontal) { - int penalty = 0; - int numSameBitCells = 0; - int prevBit = -1; - // Horizontal mode: - // for (int i = 0; i < matrix.height(); ++i) { - // for (int j = 0; j < matrix.width(); ++j) { - // int bit = matrix.get(i, j); - // Vertical mode: - // for (int i = 0; i < matrix.width(); ++i) { - // for (int j = 0; j < matrix.height(); ++j) { - // int bit = matrix.get(j, i); - int iLimit = isHorizontal ? matrix.getHeight() : matrix.getWidth(); - int jLimit = isHorizontal ? matrix.getWidth() : matrix.getHeight(); - byte[][] array = matrix.getArray(); - for (int i = 0; i < iLimit; ++i) { - for (int j = 0; j < jLimit; ++j) { - int bit = isHorizontal ? array[i][j] : array[j][i]; - if (bit == prevBit) { - numSameBitCells += 1; - // Found five repetitive cells with the same color (bit). - // We'll give penalty of 3. - if (numSameBitCells == 5) { - penalty += 3; - } else if (numSameBitCells > 5) { - // After five repetitive cells, we'll add the penalty one - // by one. - penalty += 1; - } - } else { - numSameBitCells = 1; // Include the cell itself. - prevBit = bit; - } - } - numSameBitCells = 0; // Clear at each row/column. - } - return penalty; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MatrixUtil.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/MatrixUtil.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/MatrixUtil.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/MatrixUtil.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,524 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -import com.google.zxing.WriterException; -import com.google.zxing.common.BitArray; -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; - -/** - * @author satorux@google.com (Satoru Takabayashi) - creator - * @author dswitkin@google.com (Daniel Switkin) - ported from C++ - */ -public final class MatrixUtil { - - private MatrixUtil() { - // do nothing - } - - private static final int[][] POSITION_DETECTION_PATTERN = { - {1, 1, 1, 1, 1, 1, 1}, - {1, 0, 0, 0, 0, 0, 1}, - {1, 0, 1, 1, 1, 0, 1}, - {1, 0, 1, 1, 1, 0, 1}, - {1, 0, 1, 1, 1, 0, 1}, - {1, 0, 0, 0, 0, 0, 1}, - {1, 1, 1, 1, 1, 1, 1}, - }; - - private static final int[][] HORIZONTAL_SEPARATION_PATTERN = { - {0, 0, 0, 0, 0, 0, 0, 0}, - }; - - private static final int[][] VERTICAL_SEPARATION_PATTERN = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, - }; - - private static final int[][] POSITION_ADJUSTMENT_PATTERN = { - {1, 1, 1, 1, 1}, - {1, 0, 0, 0, 1}, - {1, 0, 1, 0, 1}, - {1, 0, 0, 0, 1}, - {1, 1, 1, 1, 1}, - }; - - // From Appendix E. Table 1, JIS0510X:2004 (p 71). The table was double-checked by komatsu. - private static final int[][] POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = { - {-1, -1, -1, -1, -1, -1, -1}, // Version 1 - { 6, 18, -1, -1, -1, -1, -1}, // Version 2 - { 6, 22, -1, -1, -1, -1, -1}, // Version 3 - { 6, 26, -1, -1, -1, -1, -1}, // Version 4 - { 6, 30, -1, -1, -1, -1, -1}, // Version 5 - { 6, 34, -1, -1, -1, -1, -1}, // Version 6 - { 6, 22, 38, -1, -1, -1, -1}, // Version 7 - { 6, 24, 42, -1, -1, -1, -1}, // Version 8 - { 6, 26, 46, -1, -1, -1, -1}, // Version 9 - { 6, 28, 50, -1, -1, -1, -1}, // Version 10 - { 6, 30, 54, -1, -1, -1, -1}, // Version 11 - { 6, 32, 58, -1, -1, -1, -1}, // Version 12 - { 6, 34, 62, -1, -1, -1, -1}, // Version 13 - { 6, 26, 46, 66, -1, -1, -1}, // Version 14 - { 6, 26, 48, 70, -1, -1, -1}, // Version 15 - { 6, 26, 50, 74, -1, -1, -1}, // Version 16 - { 6, 30, 54, 78, -1, -1, -1}, // Version 17 - { 6, 30, 56, 82, -1, -1, -1}, // Version 18 - { 6, 30, 58, 86, -1, -1, -1}, // Version 19 - { 6, 34, 62, 90, -1, -1, -1}, // Version 20 - { 6, 28, 50, 72, 94, -1, -1}, // Version 21 - { 6, 26, 50, 74, 98, -1, -1}, // Version 22 - { 6, 30, 54, 78, 102, -1, -1}, // Version 23 - { 6, 28, 54, 80, 106, -1, -1}, // Version 24 - { 6, 32, 58, 84, 110, -1, -1}, // Version 25 - { 6, 30, 58, 86, 114, -1, -1}, // Version 26 - { 6, 34, 62, 90, 118, -1, -1}, // Version 27 - { 6, 26, 50, 74, 98, 122, -1}, // Version 28 - { 6, 30, 54, 78, 102, 126, -1}, // Version 29 - { 6, 26, 52, 78, 104, 130, -1}, // Version 30 - { 6, 30, 56, 82, 108, 134, -1}, // Version 31 - { 6, 34, 60, 86, 112, 138, -1}, // Version 32 - { 6, 30, 58, 86, 114, 142, -1}, // Version 33 - { 6, 34, 62, 90, 118, 146, -1}, // Version 34 - { 6, 30, 54, 78, 102, 126, 150}, // Version 35 - { 6, 24, 50, 76, 102, 128, 154}, // Version 36 - { 6, 28, 54, 80, 106, 132, 158}, // Version 37 - { 6, 32, 58, 84, 110, 136, 162}, // Version 38 - { 6, 26, 54, 82, 110, 138, 166}, // Version 39 - { 6, 30, 58, 86, 114, 142, 170}, // Version 40 - }; - - // Type info cells at the left top corner. - private static final int[][] TYPE_INFO_COORDINATES = { - {8, 0}, - {8, 1}, - {8, 2}, - {8, 3}, - {8, 4}, - {8, 5}, - {8, 7}, - {8, 8}, - {7, 8}, - {5, 8}, - {4, 8}, - {3, 8}, - {2, 8}, - {1, 8}, - {0, 8}, - }; - - // From Appendix D in JISX0510:2004 (p. 67) - private static final int VERSION_INFO_POLY = 0x1f25; // 1 1111 0010 0101 - - // From Appendix C in JISX0510:2004 (p.65). - private static final int TYPE_INFO_POLY = 0x537; - private static final int TYPE_INFO_MASK_PATTERN = 0x5412; - - // Set all cells to -1. -1 means that the cell is empty (not set yet). - // - // JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding - // with the ByteMatrix initialized all to zero. - public static void clearMatrix(ByteMatrix matrix) { - matrix.clear((byte) -1); - } - - // Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On - // success, store the result in "matrix" and return true. - public static void buildMatrix(BitArray dataBits, ErrorCorrectionLevel ecLevel, int version, - int maskPattern, ByteMatrix matrix) throws WriterException { - clearMatrix(matrix); - embedBasicPatterns(version, matrix); - // Type information appear with any version. - embedTypeInfo(ecLevel, maskPattern, matrix); - // Version info appear if version >= 7. - maybeEmbedVersionInfo(version, matrix); - // Data should be embedded at end. - embedDataBits(dataBits, maskPattern, matrix); - } - - // Embed basic patterns. On success, modify the matrix and return true. - // The basic patterns are: - // - Position detection patterns - // - Timing patterns - // - Dark dot at the left bottom corner - // - Position adjustment patterns, if need be - public static void embedBasicPatterns(int version, ByteMatrix matrix) throws WriterException { - // Let's get started with embedding big squares at corners. - embedPositionDetectionPatternsAndSeparators(matrix); - // Then, embed the dark dot at the left bottom corner. - embedDarkDotAtLeftBottomCorner(matrix); - - // Position adjustment patterns appear if version >= 2. - maybeEmbedPositionAdjustmentPatterns(version, matrix); - // Timing patterns should be embedded after position adj. patterns. - embedTimingPatterns(matrix); - } - - // Embed type information. On success, modify the matrix. - public static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPattern, ByteMatrix matrix) - throws WriterException { - BitArray typeInfoBits = new BitArray(); - makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits); - - for (int i = 0; i < typeInfoBits.getSize(); ++i) { - // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in - // "typeInfoBits". - boolean bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i); - - // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46). - int x1 = TYPE_INFO_COORDINATES[i][0]; - int y1 = TYPE_INFO_COORDINATES[i][1]; - matrix.set(x1, y1, bit); - - if (i < 8) { - // Right top corner. - int x2 = matrix.getWidth() - i - 1; - int y2 = 8; - matrix.set(x2, y2, bit); - } else { - // Left bottom corner. - int x2 = 8; - int y2 = matrix.getHeight() - 7 + (i - 8); - matrix.set(x2, y2, bit); - } - } - } - - // Embed version information if need be. On success, modify the matrix and return true. - // See 8.10 of JISX0510:2004 (p.47) for how to embed version information. - public static void maybeEmbedVersionInfo(int version, ByteMatrix matrix) throws WriterException { - if (version < 7) { // Version info is necessary if version >= 7. - return; // Don't need version info. - } - BitArray versionInfoBits = new BitArray(); - makeVersionInfoBits(version, versionInfoBits); - - int bitIndex = 6 * 3 - 1; // It will decrease from 17 to 0. - for (int i = 0; i < 6; ++i) { - for (int j = 0; j < 3; ++j) { - // Place bits in LSB (least significant bit) to MSB order. - boolean bit = versionInfoBits.get(bitIndex); - bitIndex--; - // Left bottom corner. - matrix.set(i, matrix.getHeight() - 11 + j, bit); - // Right bottom corner. - matrix.set(matrix.getHeight() - 11 + j, i, bit); - } - } - } - - // Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. - // For debugging purposes, it skips masking process if "getMaskPattern" is -1. - // See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. - public static void embedDataBits(BitArray dataBits, int maskPattern, ByteMatrix matrix) - throws WriterException { - int bitIndex = 0; - int direction = -1; - // Start from the right bottom cell. - int x = matrix.getWidth() - 1; - int y = matrix.getHeight() - 1; - while (x > 0) { - // Skip the vertical timing pattern. - if (x == 6) { - x -= 1; - } - while (y >= 0 && y < matrix.getHeight()) { - for (int i = 0; i < 2; ++i) { - int xx = x - i; - // Skip the cell if it's not empty. - if (!isEmpty(matrix.get(xx, y))) { - continue; - } - boolean bit; - if (bitIndex < dataBits.getSize()) { - bit = dataBits.get(bitIndex); - ++bitIndex; - } else { - // Padding bit. If there is no bit left, we'll fill the left cells with 0, as described - // in 8.4.9 of JISX0510:2004 (p. 24). - bit = false; - } - - // Skip masking if mask_pattern is -1. - if (maskPattern != -1) { - if (MaskUtil.getDataMaskBit(maskPattern, xx, y)) { - bit = !bit; - } - } - matrix.set(xx, y, bit); - } - y += direction; - } - direction = -direction; // Reverse the direction. - y += direction; - x -= 2; // Move to the left. - } - // All bits should be consumed. - if (bitIndex != dataBits.getSize()) { - throw new WriterException("Not all bits consumed: " + bitIndex + '/' + dataBits.getSize()); - } - } - - // Return the position of the most significant bit set (to one) in the "value". The most - // significant bit is position 32. If there is no bit set, return 0. Examples: - // - findMSBSet(0) => 0 - // - findMSBSet(1) => 1 - // - findMSBSet(255) => 8 - public static int findMSBSet(int value) { - int numDigits = 0; - while (value != 0) { - value >>>= 1; - ++numDigits; - } - return numDigits; - } - - // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH - // code is used for encoding type information and version information. - // Example: Calculation of version information of 7. - // f(x) is created from 7. - // - 7 = 000111 in 6 bits - // - f(x) = x^2 + x^1 + x^0 - // g(x) is given by the standard (p. 67) - // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 - // Multiply f(x) by x^(18 - 6) - // - f'(x) = f(x) * x^(18 - 6) - // - f'(x) = x^14 + x^13 + x^12 - // Calculate the remainder of f'(x) / g(x) - // x^2 - // __________________________________________________ - // g(x) )x^14 + x^13 + x^12 - // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 - // -------------------------------------------------- - // x^11 + x^10 + x^7 + x^4 + x^2 - // - // The remainder is x^11 + x^10 + x^7 + x^4 + x^2 - // Encode it in binary: 110010010100 - // The return value is 0xc94 (1100 1001 0100) - // - // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit - // operations. We don't care if cofficients are positive or negative. - public static int calculateBCHCode(int value, int poly) { - // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1 - // from 13 to make it 12. - int msbSetInPoly = findMSBSet(poly); - value <<= msbSetInPoly - 1; - // Do the division business using exclusive-or operations. - while (findMSBSet(value) >= msbSetInPoly) { - value ^= poly << (findMSBSet(value) - msbSetInPoly); - } - // Now the "value" is the remainder (i.e. the BCH code) - return value; - } - - // Make bit vector of type information. On success, store the result in "bits" and return true. - // Encode error correction level and mask pattern. See 8.9 of - // JISX0510:2004 (p.45) for details. - public static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int maskPattern, BitArray bits) - throws WriterException { - if (!QRCode.isValidMaskPattern(maskPattern)) { - throw new WriterException("Invalid mask pattern"); - } - int typeInfo = (ecLevel.getBits() << 3) | maskPattern; - bits.appendBits(typeInfo, 5); - - int bchCode = calculateBCHCode(typeInfo, TYPE_INFO_POLY); - bits.appendBits(bchCode, 10); - - BitArray maskBits = new BitArray(); - maskBits.appendBits(TYPE_INFO_MASK_PATTERN, 15); - bits.xor(maskBits); - - if (bits.getSize() != 15) { // Just in case. - throw new WriterException("should not happen but we got: " + bits.getSize()); - } - } - - // Make bit vector of version information. On success, store the result in "bits" and return true. - // See 8.10 of JISX0510:2004 (p.45) for details. - public static void makeVersionInfoBits(int version, BitArray bits) throws WriterException { - bits.appendBits(version, 6); - int bchCode = calculateBCHCode(version, VERSION_INFO_POLY); - bits.appendBits(bchCode, 12); - - if (bits.getSize() != 18) { // Just in case. - throw new WriterException("should not happen but we got: " + bits.getSize()); - } - } - - // Check if "value" is empty. - private static boolean isEmpty(int value) { - return value == -1; - } - - // Check if "value" is valid. - private static boolean isValidValue(int value) { - return (value == -1 || // Empty. - value == 0 || // Light (white). - value == 1); // Dark (black). - } - - private static void embedTimingPatterns(ByteMatrix matrix) throws WriterException { - // -8 is for skipping position detection patterns (size 7), and two horizontal/vertical - // separation patterns (size 1). Thus, 8 = 7 + 1. - for (int i = 8; i < matrix.getWidth() - 8; ++i) { - int bit = (i + 1) % 2; - // Horizontal line. - if (!isValidValue(matrix.get(i, 6))) { - throw new WriterException(); - } - if (isEmpty(matrix.get(i, 6))) { - matrix.set(i, 6, bit); - } - // Vertical line. - if (!isValidValue(matrix.get(6, i))) { - throw new WriterException(); - } - if (isEmpty(matrix.get(6, i))) { - matrix.set(6, i, bit); - } - } - } - - // Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) - private static void embedDarkDotAtLeftBottomCorner(ByteMatrix matrix) throws WriterException { - if (matrix.get(8, matrix.getHeight() - 8) == 0) { - throw new WriterException(); - } - matrix.set(8, matrix.getHeight() - 8, 1); - } - - private static void embedHorizontalSeparationPattern(int xStart, int yStart, - ByteMatrix matrix) throws WriterException { - // We know the width and height. - if (HORIZONTAL_SEPARATION_PATTERN[0].length != 8 || HORIZONTAL_SEPARATION_PATTERN.length != 1) { - throw new WriterException("Bad horizontal separation pattern"); - } - for (int x = 0; x < 8; ++x) { - if (!isEmpty(matrix.get(xStart + x, yStart))) { - throw new WriterException(); - } - matrix.set(xStart + x, yStart, HORIZONTAL_SEPARATION_PATTERN[0][x]); - } - } - - private static void embedVerticalSeparationPattern(int xStart, int yStart, - ByteMatrix matrix) throws WriterException { - // We know the width and height. - if (VERTICAL_SEPARATION_PATTERN[0].length != 1 || VERTICAL_SEPARATION_PATTERN.length != 7) { - throw new WriterException("Bad vertical separation pattern"); - } - for (int y = 0; y < 7; ++y) { - if (!isEmpty(matrix.get(xStart, yStart + y))) { - throw new WriterException(); - } - matrix.set(xStart, yStart + y, VERTICAL_SEPARATION_PATTERN[y][0]); - } - } - - // Note that we cannot unify the function with embedPositionDetectionPattern() despite they are - // almost identical, since we cannot write a function that takes 2D arrays in different sizes in - // C/C++. We should live with the fact. - private static void embedPositionAdjustmentPattern(int xStart, int yStart, - ByteMatrix matrix) throws WriterException { - // We know the width and height. - if (POSITION_ADJUSTMENT_PATTERN[0].length != 5 || POSITION_ADJUSTMENT_PATTERN.length != 5) { - throw new WriterException("Bad position adjustment"); - } - for (int y = 0; y < 5; ++y) { - for (int x = 0; x < 5; ++x) { - if (!isEmpty(matrix.get(xStart + x, yStart + y))) { - throw new WriterException(); - } - matrix.set(xStart + x, yStart + y, POSITION_ADJUSTMENT_PATTERN[y][x]); - } - } - } - - private static void embedPositionDetectionPattern(int xStart, int yStart, - ByteMatrix matrix) throws WriterException { - // We know the width and height. - if (POSITION_DETECTION_PATTERN[0].length != 7 || POSITION_DETECTION_PATTERN.length != 7) { - throw new WriterException("Bad position detection pattern"); - } - for (int y = 0; y < 7; ++y) { - for (int x = 0; x < 7; ++x) { - if (!isEmpty(matrix.get(xStart + x, yStart + y))) { - throw new WriterException(); - } - matrix.set(xStart + x, yStart + y, POSITION_DETECTION_PATTERN[y][x]); - } - } - } - - // Embed position detection patterns and surrounding vertical/horizontal separators. - private static void embedPositionDetectionPatternsAndSeparators(ByteMatrix matrix) throws WriterException { - // Embed three big squares at corners. - int pdpWidth = POSITION_DETECTION_PATTERN[0].length; - // Left top corner. - embedPositionDetectionPattern(0, 0, matrix); - // Right top corner. - embedPositionDetectionPattern(matrix.getWidth() - pdpWidth, 0, matrix); - // Left bottom corner. - embedPositionDetectionPattern(0, matrix.getWidth() - pdpWidth, matrix); - - // Embed horizontal separation patterns around the squares. - int hspWidth = HORIZONTAL_SEPARATION_PATTERN[0].length; - // Left top corner. - embedHorizontalSeparationPattern(0, hspWidth - 1, matrix); - // Right top corner. - embedHorizontalSeparationPattern(matrix.getWidth() - hspWidth, - hspWidth - 1, matrix); - // Left bottom corner. - embedHorizontalSeparationPattern(0, matrix.getWidth() - hspWidth, matrix); - - // Embed vertical separation patterns around the squares. - int vspSize = VERTICAL_SEPARATION_PATTERN.length; - // Left top corner. - embedVerticalSeparationPattern(vspSize, 0, matrix); - // Right top corner. - embedVerticalSeparationPattern(matrix.getHeight() - vspSize - 1, 0, matrix); - // Left bottom corner. - embedVerticalSeparationPattern(vspSize, matrix.getHeight() - vspSize, - matrix); - } - - // Embed position adjustment patterns if need be. - private static void maybeEmbedPositionAdjustmentPatterns(int version, ByteMatrix matrix) - throws WriterException { - if (version < 2) { // The patterns appear if version >= 2 - return; - } - int index = version - 1; - int[] coordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index]; - int numCoordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index].length; - for (int i = 0; i < numCoordinates; ++i) { - for (int j = 0; j < numCoordinates; ++j) { - int y = coordinates[i]; - int x = coordinates[j]; - if (x == -1 || y == -1) { - continue; - } - // If the cell is unset, we embed the position adjustment pattern here. - if (isEmpty(matrix.get(x, y))) { - // -2 is necessary since the x/y coordinates point to the center of the pattern, not the - // left top corner. - embedPositionAdjustmentPattern(x - 2, y - 2, matrix); - } - } - } - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/QRCode.java plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/QRCode.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/encoder/QRCode.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/encoder/QRCode.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,239 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode.encoder; - -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import com.google.zxing.qrcode.decoder.Mode; - -/** - * @author satorux@google.com (Satoru Takabayashi) - creator - * @author dswitkin@google.com (Daniel Switkin) - ported from C++ - */ -public final class QRCode { - - public static final int NUM_MASK_PATTERNS = 8; - - private Mode mode; - private ErrorCorrectionLevel ecLevel; - private int version; - private int matrixWidth; - private int maskPattern; - private int numTotalBytes; - private int numDataBytes; - private int numECBytes; - private int numRSBlocks; - private ByteMatrix matrix; - - public QRCode() { - mode = null; - ecLevel = null; - version = -1; - matrixWidth = -1; - maskPattern = -1; - numTotalBytes = -1; - numDataBytes = -1; - numECBytes = -1; - numRSBlocks = -1; - matrix = null; - } - - // Mode of the QR Code. - public Mode getMode() { - return mode; - } - - // Error correction level of the QR Code. - public ErrorCorrectionLevel getECLevel() { - return ecLevel; - } - - // Version of the QR Code. The bigger size, the bigger version. - public int getVersion() { - return version; - } - - // ByteMatrix width of the QR Code. - public int getMatrixWidth() { - return matrixWidth; - } - - // Mask pattern of the QR Code. - public int getMaskPattern() { - return maskPattern; - } - - // Number of total bytes in the QR Code. - public int getNumTotalBytes() { - return numTotalBytes; - } - - // Number of data bytes in the QR Code. - public int getNumDataBytes() { - return numDataBytes; - } - - // Number of error correction bytes in the QR Code. - public int getNumECBytes() { - return numECBytes; - } - - // Number of Reedsolomon blocks in the QR Code. - public int getNumRSBlocks() { - return numRSBlocks; - } - - // ByteMatrix data of the QR Code. - public ByteMatrix getMatrix() { - return matrix; - } - - - // Return the value of the module (cell) pointed by "x" and "y" in the matrix of the QR Code. They - // call cells in the matrix "modules". 1 represents a black cell, and 0 represents a white cell. - public int at(int x, int y) { - // The value must be zero or one. - int value = matrix.get(x, y); - if (!(value == 0 || value == 1)) { - // this is really like an assert... not sure what better exception to use? - throw new RuntimeException("Bad value"); - } - return value; - } - - // Checks all the member variables are set properly. Returns true on success. Otherwise, returns - // false. - public boolean isValid() { - return - // First check if all version are not uninitialized. - mode != null && - ecLevel != null && - version != -1 && - matrixWidth != -1 && - maskPattern != -1 && - numTotalBytes != -1 && - numDataBytes != -1 && - numECBytes != -1 && - numRSBlocks != -1 && - // Then check them in other ways.. - isValidMaskPattern(maskPattern) && - numTotalBytes == numDataBytes + numECBytes && - // ByteMatrix stuff. - matrix != null && - matrixWidth == matrix.getWidth() && - // See 7.3.1 of JISX0510:2004 (p.5). - matrix.getWidth() == matrix.getHeight(); // Must be square. - } - - // Return debug String. - public String toString() { - StringBuffer result = new StringBuffer(200); - result.append("<<\n"); - result.append(" mode: "); - result.append(mode); - result.append("\n ecLevel: "); - result.append(ecLevel); - result.append("\n version: "); - result.append(version); - result.append("\n matrixWidth: "); - result.append(matrixWidth); - result.append("\n maskPattern: "); - result.append(maskPattern); - result.append("\n numTotalBytes: "); - result.append(numTotalBytes); - result.append("\n numDataBytes: "); - result.append(numDataBytes); - result.append("\n numECBytes: "); - result.append(numECBytes); - result.append("\n numRSBlocks: "); - result.append(numRSBlocks); - if (matrix == null) { - result.append("\n matrix: null\n"); - } else { - result.append("\n matrix:\n"); - result.append(matrix.toString()); - } - result.append(">>\n"); - return result.toString(); - } - - public void setMode(Mode value) { - mode = value; - } - - public void setECLevel(ErrorCorrectionLevel value) { - ecLevel = value; - } - - public void setVersion(int value) { - version = value; - } - - public void setMatrixWidth(int value) { - matrixWidth = value; - } - - public void setMaskPattern(int value) { - maskPattern = value; - } - - public void setNumTotalBytes(int value) { - numTotalBytes = value; - } - - public void setNumDataBytes(int value) { - numDataBytes = value; - } - - public void setNumECBytes(int value) { - numECBytes = value; - } - - public void setNumRSBlocks(int value) { - numRSBlocks = value; - } - - // This takes ownership of the 2D array. - public void setMatrix(ByteMatrix value) { - matrix = value; - } - - // Check if "mask_pattern" is valid. - public static boolean isValidMaskPattern(int maskPattern) { - return maskPattern >= 0 && maskPattern < NUM_MASK_PATTERNS; - } - - // Return true if the all values in the matrix are binary numbers. - // - // JAVAPORT: This is going to be super expensive and unnecessary, we should not call this in - // production. I'm leaving it because it may be useful for testing. It should be removed entirely - // if ByteMatrix is changed never to contain a -1. - /* - private static boolean EverythingIsBinary(final ByteMatrix matrix) { - for (int y = 0; y < matrix.height(); ++y) { - for (int x = 0; x < matrix.width(); ++x) { - int value = matrix.get(y, x); - if (!(value == 0 || value == 1)) { - // Found non zero/one value. - return false; - } - } - } - return true; - } - */ - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/qrcode/QRCodeWriter.java plantuml-1.2018.9/src/com/google/zxing/qrcode/QRCodeWriter.java --- plantuml-1.2017.15/src/com/google/zxing/qrcode/QRCodeWriter.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/qrcode/QRCodeWriter.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing.qrcode; - -import java.util.Hashtable; - -import com.google.zxing.BarcodeFormat; -import com.google.zxing.EncodeHintType; -import com.google.zxing.Writer; -import com.google.zxing.WriterException; -import com.google.zxing.common.BitMatrix; -import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import com.google.zxing.qrcode.encoder.ByteMatrix; -import com.google.zxing.qrcode.encoder.Encoder; -import com.google.zxing.qrcode.encoder.QRCode; - -/** - * This object renders a QR Code as a BitMatrix 2D array of greyscale values. - * - * @author dswitkin@google.com (Daniel Switkin) - */ -public final class QRCodeWriter implements Writer { - - private static final int QUIET_ZONE_SIZE = 4; - - public BitMatrix encode(String contents, BarcodeFormat format, int multiple) throws WriterException { - - return encode(contents, format, multiple, null); - } - - public BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) throws WriterException { - - if (contents == null || contents.length() == 0) { - throw new IllegalArgumentException("Found empty contents"); - } - - if (format != BarcodeFormat.QR_CODE) { - throw new IllegalArgumentException("Can only encode QR_CODE, but got " + format); - } - - ErrorCorrectionLevel errorCorrectionLevel = ErrorCorrectionLevel.L; - if (hints != null) { - ErrorCorrectionLevel requestedECLevel = (ErrorCorrectionLevel) hints.get(EncodeHintType.ERROR_CORRECTION); - if (requestedECLevel != null) { - errorCorrectionLevel = requestedECLevel; - } - } - - QRCode code = new QRCode(); - Encoder.encode(contents, errorCorrectionLevel, hints, code); - return renderResult(code, multiple); - } - - // Note that the input matrix uses 0 == white, 1 == black, while the output - // matrix uses - // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap). - private static BitMatrix renderResult(QRCode code, int multiple) { - ByteMatrix input = code.getMatrix(); - int inputWidth = input.getWidth(); - int inputHeight = input.getHeight(); - int qrWidth = inputWidth + (QUIET_ZONE_SIZE << 1); - int qrHeight = inputHeight + (QUIET_ZONE_SIZE << 1); - // int outputWidth = Math.max(width, qrWidth); - // int outputHeight = Math.max(height, qrHeight); - - // int multiple = Math.min(outputWidth / qrWidth, outputHeight / - // qrHeight); - // Padding includes both the quiet zone and the extra white pixels to - // accommodate the requested - // dimensions. For example, if input is 25x25 the QR will be 33x33 - // including the quiet zone. - // If the requested size is 200x160, the multiple will be 4, for a QR of - // 132x132. These will - // handle all the padding from 100x100 (the actual QR) up to 200x160. - int leftPadding = QUIET_ZONE_SIZE * multiple; - int topPadding = QUIET_ZONE_SIZE * multiple; - - BitMatrix output = new BitMatrix(qrWidth * multiple, qrHeight * multiple); - - for (int inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) { - // Write the contents of this row of the barcode - for (int inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) { - if (input.get(inputX, inputY) == 1) { - output.setRegion(outputX, outputY, multiple, multiple); - } - } - } - - return output; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/ReaderException.java plantuml-1.2018.9/src/com/google/zxing/ReaderException.java --- plantuml-1.2017.15/src/com/google/zxing/ReaderException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/ReaderException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * The general exception class throw when something goes wrong during decoding of a barcode. - * This includes, but is not limited to, failing checksums / error correction algorithms, being - * unable to locate finder timing patterns, and so on. - * - * @author Sean Owen - */ -public abstract class ReaderException extends Exception { - - // TODO: Currently we throw up to 400 ReaderExceptions while scanning a single 240x240 image before - // rejecting it. This involves a lot of overhead and memory allocation, and affects both performance - // and latency on continuous scan clients. In the future, we should change all the decoders not to - // throw exceptions for routine events, like not finding a barcode on a given row. Instead, we - // should return error codes back to the callers, and simply delete this class. In the mean time, I - // have altered this class to be as lightweight as possible, by ignoring the exception string, and - // by disabling the generation of stack traces, which is especially time consuming. These are just - // temporary measures, pending the big cleanup. - - //private static final ReaderException instance = new ReaderException(); - - // EXCEPTION TRACKING SUPPORT - // Identifies who is throwing exceptions and how often. To use: - // - // 1. Uncomment these lines and the code below which uses them. - // 2. Uncomment the two corresponding lines in j2se/CommandLineRunner.decode() - // 3. Change core to build as Java 1.5 temporarily -// private static int exceptionCount = 0; -// private static Map throwers = new HashMap(32); - - ReaderException() { - // do nothing - } - - //public static ReaderException getInstance() { -// Exception e = new Exception(); -// // Take the stack frame before this one. -// StackTraceElement stack = e.getStackTrace()[1]; -// String key = stack.getClassName() + "." + stack.getMethodName() + "(), line " + -// stack.getLineNumber(); -// if (throwers.containsKey(key)) { -// Integer value = throwers.get(key); -// value++; -// throwers.put(key, value); -// } else { -// throwers.put(key, 1); -// } -// exceptionCount++; - - //return instance; - //} - -// public static int getExceptionCountAndReset() { -// int temp = exceptionCount; -// exceptionCount = 0; -// return temp; -// } -// -// public static String getThrowersAndReset() { -// StringBuilder builder = new StringBuilder(1024); -// Object[] keys = throwers.keySet().toArray(); -// for (int x = 0; x < keys.length; x++) { -// String key = (String) keys[x]; -// Integer value = throwers.get(key); -// builder.append(key); -// builder.append(": "); -// builder.append(value); -// builder.append("\n"); -// } -// throwers.clear(); -// return builder.toString(); -// } - - // Prevent stack traces from being taken - // srowen says: huh, my IDE is saying this is not an override. native methods can't be overridden? - // This, at least, does not hurt. Because we use a singleton pattern here, it doesn't matter anyhow. - public final Throwable fillInStackTrace() { - return null; - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/ResultPoint.java plantuml-1.2018.9/src/com/google/zxing/ResultPoint.java --- plantuml-1.2017.15/src/com/google/zxing/ResultPoint.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/ResultPoint.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -/* - * Copyright 2007 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - *

Encapsulates a point of interest in an image containing a barcode. Typically, this - * would be the location of a finder pattern or the corner of the barcode, for example.

- * - * @author Sean Owen - */ -public class ResultPoint { - - private final float x; - private final float y; - - public ResultPoint(float x, float y) { - this.x = x; - this.y = y; - } - - public final float getX() { - return x; - } - - public final float getY() { - return y; - } - - public boolean equals(Object other) { - if (other instanceof ResultPoint) { - ResultPoint otherPoint = (ResultPoint) other; - return x == otherPoint.x && y == otherPoint.y; - } - return false; - } - - public int hashCode() { - return 31 * Float.floatToIntBits(x) + Float.floatToIntBits(y); - } - - public String toString() { - StringBuffer result = new StringBuffer(25); - result.append('('); - result.append(x); - result.append(','); - result.append(y); - result.append(')'); - return result.toString(); - } - - /** - *

Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and - * BC < AC and the angle between BC and BA is less than 180 degrees. - */ - public static void orderBestPatterns(ResultPoint[] patterns) { - - // Find distances between pattern centers - float zeroOneDistance = distance(patterns[0], patterns[1]); - float oneTwoDistance = distance(patterns[1], patterns[2]); - float zeroTwoDistance = distance(patterns[0], patterns[2]); - - ResultPoint pointA, pointB, pointC; - // Assume one closest to other two is B; A and C will just be guesses at first - if (oneTwoDistance >= zeroOneDistance && oneTwoDistance >= zeroTwoDistance) { - pointB = patterns[0]; - pointA = patterns[1]; - pointC = patterns[2]; - } else if (zeroTwoDistance >= oneTwoDistance && zeroTwoDistance >= zeroOneDistance) { - pointB = patterns[1]; - pointA = patterns[0]; - pointC = patterns[2]; - } else { - pointB = patterns[2]; - pointA = patterns[0]; - pointC = patterns[1]; - } - - // Use cross product to figure out whether A and C are correct or flipped. - // This asks whether BC x BA has a positive z component, which is the arrangement - // we want for A, B, C. If it's negative, then we've got it flipped around and - // should swap A and C. - if (crossProductZ(pointA, pointB, pointC) < 0.0f) { - ResultPoint temp = pointA; - pointA = pointC; - pointC = temp; - } - - patterns[0] = pointA; - patterns[1] = pointB; - patterns[2] = pointC; - } - - - /** - * @return distance between two points - */ - public static float distance(ResultPoint pattern1, ResultPoint pattern2) { - float xDiff = pattern1.getX() - pattern2.getX(); - float yDiff = pattern1.getY() - pattern2.getY(); - return (float) Math.sqrt((double) (xDiff * xDiff + yDiff * yDiff)); - } - - /** - * Returns the z component of the cross product between vectors BC and BA. - */ - private static float crossProductZ(ResultPoint pointA, ResultPoint pointB, ResultPoint pointC) { - float bX = pointB.x; - float bY = pointB.y; - return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX)); - } - - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/WriterException.java plantuml-1.2018.9/src/com/google/zxing/WriterException.java --- plantuml-1.2017.15/src/com/google/zxing/WriterException.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/WriterException.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -/** - * A base class which covers the range of exceptions which may occur when encoding a barcode using - * the Writer framework. - * - * @author dswitkin@google.com (Daniel Switkin) - */ -public final class WriterException extends Exception { - - public WriterException() { - super(); - } - - public WriterException(String message) { - super(message); - } - -} diff -Nru plantuml-1.2017.15/src/com/google/zxing/Writer.java plantuml-1.2018.9/src/com/google/zxing/Writer.java --- plantuml-1.2017.15/src/com/google/zxing/Writer.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/com/google/zxing/Writer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * Copyright 2008 ZXing authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.zxing; - -import java.util.Hashtable; - -import com.google.zxing.common.BitMatrix; - -/** - * The base class for all objects which encode/generate a barcode image. - * - * @author dswitkin@google.com (Daniel Switkin) - */ -public interface Writer { - - /** - * Encode a barcode using the default settings. - * - * @param contents The contents to encode in the barcode - * @param format The barcode format to generate - * @param width The preferred width in pixels - * @param height The preferred height in pixels - * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) - */ - BitMatrix encode(String contents, BarcodeFormat format, int multiple) - throws WriterException; - - /** - * - * @param contents The contents to encode in the barcode - * @param format The barcode format to generate - * @param width The preferred width in pixels - * @param height The preferred height in pixels - * @param hints Additional parameters to supply to the encoder - * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) - */ - BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) - throws WriterException; - -} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/ACearth.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/ACearth.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/ACearth.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/ACearth.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,373 @@ +package ext.plantuml.com.ctreber.acearth; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; + +import ext.plantuml.com.ctreber.acearth.gui.CanvasACearth; +import ext.plantuml.com.ctreber.acearth.plugins.Plugin; +import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; +import ext.plantuml.com.ctreber.acearth.plugins.markers.PluginMarkers; +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.projection.ProjectionCyl; +import ext.plantuml.com.ctreber.acearth.projection.ProjectionMerc; +import ext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; +import ext.plantuml.com.ctreber.acearth.renderer.Renderer; +import ext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanBit; +import ext.plantuml.com.ctreber.acearth.renderer.RowTypeRendererScanDot; +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapDefault; +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMapOrtho; +import ext.plantuml.com.ctreber.acearth.scandot.DotGeneratorLines; +import ext.plantuml.com.ctreber.acearth.scandot.DotGeneratorStars; +import ext.plantuml.com.ctreber.acearth.scandot.ScanDot; +import ext.plantuml.com.ctreber.acearth.scandot.ScanDotGenerator; +import ext.plantuml.com.ctreber.acearth.shader.Shader; +import ext.plantuml.com.ctreber.acearth.shader.ShaderDefault; +import ext.plantuml.com.ctreber.acearth.shader.ShaderFlat; +import ext.plantuml.com.ctreber.acearth.shader.ShaderOrtho; +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.SunPositionCalculator; +import ext.plantuml.com.ctreber.acearth.util.Toolkit; +import ext.plantuml.com.ctreber.aclib.sort.CTSort; +import ext.plantuml.com.ctreber.aclib.sort.QuickSort; + +/** + *

AC.earth - XEarth for Java + *

+ * + *

+ * The original XEarth was written by Kirk Johnson in July 1993 - thank you for + * writing this great little program and making it available for free! + * + *

+ * I wanted to extend the program, but not in C. So I created this Java version, + * and found the process quite painfull interesting. The + * biggest effort went into resolving references between C files and + * eliminatiing pointers. + * + *

License

+ * + *

+ * AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com + * + *

+ * AC.earth is based on XEarth by Kirk Johnson + * + *

+ * To comply with the XEarth license I include the following text: + * + *

+ * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
+ * Parts of the source code are:
+ *   Copyright (C) 1989, 1990, 1991 by Jim Frost
+ *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
+ * Permission to use, copy, modify and freely distribute xearth for
+ * non-commercial and not-for-profit purposes is hereby granted
+ * without fee, provided that both the above copyright notice and this
+ * permission notice appear in all copies and in supporting
+ * documentation.
+ * [Section refering to GIF omitted because it doesn't apply to this version]
+ * The author makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
+ * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * 
+ * + *

+ * The license for this program (AC.earth) is the same as the quoted license + * above, with one change: The "copyright notice and permission notice" shall + * include the entire text of this section. + * + * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo + * Phase 2: Enter fixed time as data and time, not seconds since epoch todo + * Phase 2: Compact map data into binary file + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + */ +public class ACearth { + public static final String VERSION = "1.1"; + public static final String BUILD = "22.11.2002 004"; + + // private static long fsStartTime = 0; + + private ConfigurationACearth fConf = new ConfigurationACearth(); + private long fCurrentTime; + + private CanvasACearth fCanvas; + + private Coordinate fViewPos; + private double fViewRotation; + + private List fPlugins; + + /** + *

+ * Well, the main class. + * @param markers + */ + public ACearth(List markers) { + // fsStartTime = System.currentTimeMillis(); + + fPlugins = new ArrayList(); + fPlugins.add(new PluginMarkers(markers)); + + } + + public void exportPng(OutputStream os) throws IOException { + fCanvas = new CanvasACearth(this, fConf.getInt("imageWidth"), fConf.getInt("imageHeight")); + update(); + fCanvas.saveToImage(os); + } + + public void update() throws IOException { + Projection lProjection = null; + Shader lShader = null; + BitGeneratorMap lScanner = null; + if (fConf.is("projection", "Cylindrical")) { + lProjection = new ProjectionCyl(); + lScanner = new BitGeneratorMapDefault(lProjection); + lShader = new ShaderDefault(); + } + + if (fConf.is("projection", "Mercator")) { + lProjection = new ProjectionMerc(); + lScanner = new BitGeneratorMapDefault(lProjection); + lShader = new ShaderDefault(); + } + + if (fConf.is("projection", "Orthographic")) { + lProjection = new ProjectionOrtho(); + lScanner = new BitGeneratorMapOrtho(lProjection); + lShader = new ShaderOrtho(); + } + + computePositions(); + lProjection.setImageWidth(fConf.getInt("imageWidth")); + lProjection.setImageHeight(fConf.getInt("imageHeight")); + lProjection.setShiftX(fConf.getInt("shiftX")); + lProjection.setShiftY(fConf.getInt("shiftY")); + lProjection.setViewMagnification(fConf.getDouble("viewMagnification")); + lProjection.setViewPos(fViewPos); + lProjection.setViewRotation(fViewRotation); + + lScanner.setImageWidth(fConf.getInt("imageWidth")); + lScanner.setImageHeight(fConf.getInt("imageHeight")); + lScanner.setMapData(MapDataReader.readMapData()); + // Process the map (produces ScanBit-s). + lScanner.generateScanBits(); + + // Process stars and lines (produces ScanDots-s). + List lScanDots = new ArrayList(); + if (fConf.getBoolean("starsP")) { + ScanDotGenerator lGenerator = new DotGeneratorStars(fConf.getInt("imageWidth"), + fConf.getInt("imageHeight"), fConf.getDouble("starFrequency"), fConf.getInt("bigStars"), new Random(fCurrentTime)); + lGenerator.generateScanDots(); + lScanDots.addAll(lGenerator.getScanDots()); + } + + if (fConf.getBoolean("gridP")) { + ScanDotGenerator lGenerator = new DotGeneratorLines(lProjection, fConf.getInt("gridDivision"), fConf + .getInt("gridPixelDivision")); + lGenerator.generateScanDots(); + lScanDots.addAll(lGenerator.getScanDots()); + } + + final CTSort lSort = new QuickSort(); + ScanDot[] lScanDotsArray = (ScanDot[]) lScanDots.toArray(new ScanDot[0]); + lSort.sort(lScanDotsArray); + + if (!fConf.getBoolean("shadeP")) { + lShader = new ShaderFlat(); + } + lShader.setProjection(lProjection); + lShader.setSunPos(fConf.getSunPos()); + lShader.setDaySideBrightness(fConf.getInt("daySideBrightness")); + lShader.setTerminatorDiscontinuity(fConf.getInt("terminatorDiscontinuity")); + lShader.setNightSideBrightness(fConf.getInt("nightSideBrightness")); + lShader.init(); + + Renderer lRenderer = new Renderer(fCanvas); + + RowTypeRendererScanBit lRowRendererScanBit = new RowTypeRendererScanBit(); + lRowRendererScanBit.setScanBits(lScanner.getScanBits()); + lRenderer.addRowTypeRenderer(lRowRendererScanBit); + + RowTypeRendererScanDot lRowRendererScanDot = new RowTypeRendererScanDot(); + lRowRendererScanDot.setScanDots(lScanDotsArray); + lRenderer.addRowTypeRenderer(lRowRendererScanDot); + + lRenderer.setShader(lShader); + lRenderer.render(); + + // Apply plugins + Iterator lIt = fPlugins.iterator(); + while (lIt.hasNext()) { + Plugin lPlugin = (Plugin) lIt.next(); + lPlugin.setProjection(lProjection); + lPlugin.setRenderTarget(fCanvas); + lPlugin.setParent(this); + lPlugin.render(); + } + + } + + /** + *

+ * This is repeated when time changes since this influences the position of + * Earth. + */ + private void computePositions() { + // Determine time for rendering + if (fConf.getInt("fixedTime") == 0) { + // No fixed time. + // final long lTimePassed = System.currentTimeMillis() - fsStartTime; + // fCurrentTime = fsStartTime + (long) (fConf.getDouble("timeWarpFactor") * lTimePassed); + fCurrentTime = System.currentTimeMillis(); + } else { + // Fixed time. + fCurrentTime = fConf.getInt("fixedTime") * 1000L; + } + + if (fConf.getBoolean("sunMovesP")) { + fConf.setSunPos(SunPositionCalculator.getSunPositionOnEarth(fCurrentTime)); + } + + // Determine viewing position + if (fConf.is("viewPositionType", "Fixed")) { + fViewPos = fConf.getViewPos(); + } else if (fConf.is("viewPositionType", "Sun-relative")) { + fViewPos = getSunRelativePosition(); + } else if (fConf.is("viewPositionType", "Orbit")) { + fViewPos = getOrbitPosition(fCurrentTime); + } else if (fConf.is("viewPositionType", "Random")) { + fViewPos = getRandomPosition(); + } else if (fConf.is("viewPositionType", "Moon")) { + fViewPos = SunPositionCalculator.getMoonPositionOnEarth(fCurrentTime); + } + + // for ViewRotGalactic, compute appropriate viewing rotation + if (fConf.is("viewRotationType", "Galactic")) { + fViewRotation = (Toolkit.degsToRads(fConf.getSunPos().getLat() + * Math.sin((fViewPos.getLong() - fConf.getSunPos().getLong())))); + } else { + fViewRotation = fConf.getDouble("viewRotation"); + } + } + + /** + *

+ * Add sun position and position relative to sun, straighten out the result. + * + * @return Position relativ to sun position as defined by fSunPosRel. + */ + private Coordinate getSunRelativePosition() { + final Coordinate lPos = fConf.getSunPos(); + lPos.add(fConf.getSunPosRel()); + + return lPos; + } + + private Coordinate getOrbitPosition(long pTimeMillis) { + double x, y, z; + double a, c, s; + double t1, t2; + + /* start at 0 N 0 E */ + x = 0; + y = 0; + z = 1; + + /* + * rotate in about y axis (from z towards x) according to the number of + * orbits we've completed + */ + a = (double) pTimeMillis / (fConf.getDouble("orbitPeriod") * 3600 * 1000) * 2 * Math.PI; + c = Math.cos(a); + s = Math.sin(a); + t1 = c * z - s * x; + t2 = s * z + c * x; + z = t1; + x = t2; + + /* + * rotate about z axis (from x towards y) according to the inclination + * of the orbit + */ + a = Toolkit.degsToRads(fConf.getDouble("orbitInclination")); + c = Math.cos(a); + s = Math.sin(a); + t1 = c * x - s * y; + t2 = s * x + c * y; + x = t1; + y = t2; + + /* + * rotate about y axis (from x towards z) according to the number of + * rotations the earth has made + */ + a = ((double) pTimeMillis / 86400000) * (2 * Math.PI); + c = Math.cos(a); + s = Math.sin(a); + t1 = c * x - s * z; + t2 = s * x + c * z; + x = t1; + z = t2; + + return new Coordinate(Toolkit.radsToDegs(Math.asin(y)), Toolkit.radsToDegs(Math.atan2(x, z))); + } + + /** + *

+ * Pick a position (lat, lon) at random + * + * @return A random position. + */ + private static Coordinate getRandomPosition() { + + /* select a vector at random */ + final double[] pos = new double[3]; + double mag = 0; + do { + for (int i = 0; i < 3; i++) { + pos[i] = ((Math.random() * 20000) * 1e-4) - 1; + mag += pos[i] * pos[i]; + } + } while ((mag > 1.0) || (mag < 0.01)); + + /* normalize the vector */ + mag = Math.sqrt(mag); + for (int i = 0; i < 3; i++) { + pos[i] /= mag; + } + + /* convert to (lat, lon) */ + final double s_lat = pos[1]; + final double c_lat = Math.sqrt(1 - s_lat * s_lat); + final double s_lon = pos[0] / c_lat; + final double c_lon = pos[2] / c_lat; + + return new Coordinate(Math.atan2(s_lat, c_lat) * (180 / Math.PI), Math.atan2(s_lon, c_lon) * (180 / Math.PI)); + } + +// public static long getStartTime() { +// return fsStartTime; +// } + + public ConfigurationACearth getConf() { + return fConf; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/ConfigurationACearth.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,152 @@ +package ext.plantuml.com.ctreber.acearth; + +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.aclib.gui.MOBoolean; +import ext.plantuml.com.ctreber.aclib.gui.MODouble; +import ext.plantuml.com.ctreber.aclib.gui.MOEnum; +import ext.plantuml.com.ctreber.aclib.gui.MOInteger; +import ext.plantuml.com.ctreber.aclib.gui.MOString; +import ext.plantuml.com.ctreber.aclib.gui.MonitoredObject; + +/** + *

+ * How to avoid writing all the accessors? Code generator that creates derived + * class from template class? Configuration items in data structure? + *

+ * + *

+ * © 2002 Christian Treber, ct@ctreber.com (06.10.2002) + *

+ * + * @author Christian Treber, ct@ctreber.com + * + */ +public class ConfigurationACearth extends Configuration { + private static final int DEFAULT_DIMENSION = 512; + + public ConfigurationACearth() { + final MOEnum lProjection = new MOEnum(); + lProjection.addValidValue("Mercator"); + lProjection.addValidValue("Orthographic"); + lProjection.addValidValue("Cylindrical"); + lProjection.set("Orthographic"); + add("projection", (MonitoredObject) lProjection); + + final MOEnum lPositionType = new MOEnum(); + lPositionType.addValidValue("Fixed"); + lPositionType.addValidValue("Sun-relative"); + lPositionType.addValidValue("Orbit"); + lPositionType.addValidValue("Random"); + lPositionType.addValidValue("Moon"); + lPositionType.set("Sun-relative"); + add("viewPositionType", lPositionType); + + final MOEnum lViewRotationType = new MOEnum(); + lViewRotationType.addValidValue("North"); + lViewRotationType.addValidValue("Galactic"); + lViewRotationType.set("North"); + add("viewRotationType", lViewRotationType); + + final MOString lOutputMode = new MOString("gui"); + add("outputMode", lOutputMode); + + // Only relevant if view type is "Fixed"./ + final MODouble lViewPosLat = new MODouble(0, -90, +90); + add("viewPosLat", lViewPosLat); + final MODouble lViewPosLong = new MODouble(0, -180, +180); + add("viewPosLong", lViewPosLong); + // Only relevant if view type is "Sun-relative". + final MODouble lSunPosRelLat = new MODouble(0, -90, +90); + add("sunPosRelLat", lSunPosRelLat); + final MODouble lSunPosRelLong = new MODouble(0, -180, +180); + add("sunPosRelLong", lSunPosRelLong); + + final MOBoolean lSunMovesP = new MOBoolean(true); + add("sunMovesP", lSunMovesP); + // Only relevant if sun does not move. + final MODouble lSunPosLat = new MODouble(0, -90, +90); + add("sunPosLat", lSunPosLat); + final MODouble lSunPosLong = new MODouble(0, -180, +180); + add("sunPosLong", lSunPosLong); + + final MODouble lTimeWarpFactor = new MODouble(1.0, 0, Double.MAX_VALUE); + add("timeWarpFactor", lTimeWarpFactor); + final MOInteger lFixedTime = new MOInteger(0, 0, Integer.MAX_VALUE); + add("fixedTime", lFixedTime); + final MOInteger lWaitTime = new MOInteger(300, 0, Integer.MAX_VALUE); + add("waitTime", lWaitTime); + + final MODouble lOrbitPeriod = new MODouble(1, 0.0001, Double.MAX_VALUE); + add("orbitPeriod", lOrbitPeriod); + final MODouble lOrbitInclination = new MODouble(45.0, 0, 90); + add("orbitInclination", lOrbitInclination); + + final MOBoolean lLabelP = new MOBoolean(false); + add("labelP", lLabelP); + + final MOInteger lImageWidth = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); + add("imageWidth", lImageWidth); + final MOInteger lImageHeight = new MOInteger(DEFAULT_DIMENSION, 0, Integer.MAX_VALUE); + add("imageHeight", lImageHeight); + + final MOBoolean lStarsP = new MOBoolean(true); + add("starsP", lStarsP); + final MODouble lStarFrequency = new MODouble(0.002, 0, Double.MAX_VALUE); + add("starFrequency", lStarFrequency); + final MOInteger lBigStars = new MOInteger(0, 0, 100); + add("bigStars", lBigStars); + + final MOBoolean lGridP = new MOBoolean(true); + add("gridP", lGridP); + final MOInteger lGridDivision = new MOInteger(6, 0, Integer.MAX_VALUE); + add("gridDivision", lGridDivision); + final MOInteger lGridPixelDevision = new MOInteger(15, 0, Integer.MAX_VALUE); + add("gridPixelDivision", lGridPixelDevision); + + final MOInteger lShiftX = new MOInteger(0, 0, Integer.MAX_VALUE); + add("shiftX", lShiftX); + final MOInteger lShiftY = new MOInteger(0, 0, Integer.MAX_VALUE); + add("shiftY", lShiftY); + final MODouble lViewMagnification = new MODouble(1.0, 0, Double.MAX_VALUE); + add("viewMagnification", lViewMagnification); + + final MOBoolean lShadeP = new MOBoolean(true); + add("shadeP", lShadeP); + final MOInteger lDaySideBrightness = new MOInteger(100, 0, 100); + add("daySideBrightness", lDaySideBrightness); + final MOInteger lNightSideBrightness = new MOInteger(5, 0, 100); + add("nightSideBrightness", lNightSideBrightness); + final MOInteger lTerminatorDiscontinuity = new MOInteger(1, 0, 100); + add("terminatorDiscontinuity", lTerminatorDiscontinuity); + + final MODouble lViewRotation = new MODouble(0, 0, Double.MAX_VALUE); + add("viewRotation", lViewRotation); + } + + public Coordinate getViewPos() { + return new Coordinate(getDouble("viewPosLat"), getDouble("viewPosLong")); + } + + public void setViewPos(Coordinate pViewPos) { + setDouble("viewPosLat", pViewPos.getLat()); + setDouble("viewPosLong", pViewPos.getLong()); + } + + public Coordinate getSunPos() { + return new Coordinate(getDouble("sunPosLat"), getDouble("sunPosLong")); + } + + public void setSunPos(Coordinate pSunPos) { + setDouble("sunPosLat", pSunPos.getLat()); + setDouble("sunPosLong", pSunPos.getLong()); + } + + public Coordinate getSunPosRel() { + return new Coordinate(getDouble("sunPosRelLat"), getDouble("sunPosRelLong")); + } + + public void setSunPosRel(Coordinate pSunPosRel) { + setDouble("sunPosRelLat", pSunPosRel.getLat()); + setDouble("sunPosRelLong", pSunPosRel.getLong()); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/Configuration.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/Configuration.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/Configuration.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/Configuration.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,108 @@ +package ext.plantuml.com.ctreber.acearth; + +import java.util.HashMap; +import java.util.Map; + +import ext.plantuml.com.ctreber.aclib.gui.MOBoolean; +import ext.plantuml.com.ctreber.aclib.gui.MODouble; +import ext.plantuml.com.ctreber.aclib.gui.MOEnum; +import ext.plantuml.com.ctreber.aclib.gui.MOInteger; +import ext.plantuml.com.ctreber.aclib.gui.MOString; +import ext.plantuml.com.ctreber.aclib.gui.MonitoredObject; + +/** + *

+ *

+ * + *

+ * © 2002 Christian Treber, ct@ctreber.com (06.10.2002) + *

+ * + * @author Christian Treber, ct@ctreber.com + * + */ +public class Configuration { + private Map fValues = new HashMap(); + + /** + *

+ * Item must be added before it can be set or get. + * + * @param pID + * Item name. + * @param pObject + * Item value container. + */ + public void add(String pID, MonitoredObject pObject) { + fValues.put(pID, pObject); + } + + public void setString(String pID, String pValue) { + ((MOString) fValues.get(pID)).set(pValue); + } + + public void setBoolean(String pID, boolean pValue) { + ((MOBoolean) fValues.get(pID)).set(pValue); + } + + public void setInt(String pID, int pValue) { + ((MOInteger) fValues.get(pID)).set(pValue); + } + + public void setDouble(String pID, double pValue) { + ((MODouble) fValues.get(pID)).set(pValue); + } + + public void setEnum(String pID, Object pValue) { + ((MOEnum) fValues.get(pID)).set(pValue); + } + + public String getString(String pID) { + return ((MOString) fValues.get(pID)).get(); + } + + public boolean getBoolean(String pID) { + return ((MOBoolean) fValues.get(pID)).get(); + } + + public int getInt(String pID) { + return ((MOInteger) fValues.get(pID)).get(); + } + + public double getDouble(String pID) { + return ((MODouble) fValues.get(pID)).get(); + } + + public boolean is(String pID, Object pValue) { + return ((MOEnum) fValues.get(pID)).is(pValue); + } + + public MOBoolean getMOBoolean(String pID) { + return (MOBoolean) getMO(pID); + } + + public MOString getMOString(String pID) { + return (MOString) getMO(pID); + } + + public MOEnum getMOEnum(String pID) { + return (MOEnum) getMO(pID); + } + + public MOInteger getMOInteger(String pID) { + return (MOInteger) getMO(pID); + } + + public MODouble getMODouble(String pID) { + return (MODouble) getMO(pID); + } + + public MonitoredObject getMO(String pID) { + final MonitoredObject lMO = (MonitoredObject) fValues.get(pID); + if (lMO == null) { + throw new IllegalArgumentException("Unknown conf item '" + pID + "'"); + } + + return lMO; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/gui/CanvasACearth.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,21 @@ +package ext.plantuml.com.ctreber.acearth.gui; + +import ext.plantuml.com.ctreber.acearth.ACearth; + +/** + *

+ * Adds some mouse magic to the normal PixelCanvas. + *

+ * + *

+ * © 2002 Christian Treber, ct@ctreber.com (Nov 8, 2002) + *

+ * + * @author Christian Treber, ct@ctreber.com + * + */ +public class CanvasACearth extends PixelCanvas { + public CanvasACearth(ACearth pParent, int pWidth, int pHeight) { + super(pWidth, pHeight); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,72 @@ +package ext.plantuml.com.ctreber.acearth.gui; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; + +import javax.imageio.ImageIO; + +import ext.plantuml.com.ctreber.acearth.renderer.RenderTarget; + +/** + *

+ * Swing compatible drawing surface for images and graphics. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class PixelCanvas implements RenderTarget { + final private int fImageWidth; + final private int fImageHeight; + final private BufferedImage fEarthImage2; + + /** + *

+ * Construct a canvas of the specified size. + * + * @param pWidth + * Width + * @param pHeight + * Height + */ + public PixelCanvas(int pWidth, int pHeight) { + fImageWidth = pWidth; + fImageHeight = pHeight; + fEarthImage2 = new BufferedImage(fImageWidth, fImageHeight, BufferedImage.TYPE_INT_RGB); + } + + public Graphics2D getGraphics2D() { + return fEarthImage2.createGraphics(); + } + + public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB) { + setPixel(pX, pY, new Color(pR, pG, pB, pA)); + } + + public void setPixel(int pX, int pY, Color pColor) { + fEarthImage2.setRGB(pX, pY, pColor.getRGB()); + } + + public int getImageWidth() { + return fImageWidth; + } + + public int getImageHeight() { + return fImageHeight; + } + + public boolean saveToImage(String pFileName, String pFormat) throws IOException { + return ImageIO.write(fEarthImage2, pFormat, new File(pFileName)); + } + + public void saveToImage(OutputStream os) throws IOException { + ImageIO.write(fEarthImage2, "png", os); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/MapData.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/MapData.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/MapData.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/MapData.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,6835 @@ +package ext.plantuml.com.ctreber.acearth; + +import java.util.ArrayList; +import java.util.List; + +/** + *

AC.earth - XEarth for Java + *

+ * + *

+ * The original XEarth was written by Kirk Johnson in July 1993 - thank you for + * writing this great little program and making it available for free! + * + *

+ * I wanted to extend the program, but not in C. So I created this Java version, + * and found the process quite painfull interesting. The + * biggest effort went into resolving references between C files and + * eliminatiing pointers. + * + *

License

+ * + *

+ * AC.earth Copyright (c) 2002 Christian Treber, ct@ctreber.com + * + *

+ * AC.earth is based on XEarth by Kirk Johnson + * + *

+ * To comply with the XEarth license I include the following text: + * + *

+ * XEarth Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
+ * Parts of the source code are:
+ *   Copyright (C) 1989, 1990, 1991 by Jim Frost
+ *   Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
+ * Permission to use, copy, modify and freely distribute xearth for
+ * non-commercial and not-for-profit purposes is hereby granted
+ * without fee, provided that both the above copyright notice and this
+ * permission notice appear in all copies and in supporting
+ * documentation.
+ * [Section refering to GIF omitted because it doesn't apply to this version]
+ * The author makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
+ * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, d OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * 
+ * + *

+ * The license for this program (AC.earth) is the same as the quoted license + * above, with one change: The "copyright notice and permission notice" shall + * include the entire text of this section. + * + * todo Phase 2: Make grid value stuff more meaningful ("every n degrees") todo + * Phase 2: Enter fixed time as d and time, not seconds since epoch todo + * Phase 2: Compact map d into binary file + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + */ +public class MapData { + + private final List d = new ArrayList(); + + public MapData() { + //add("/*0*/"); + add("3903,1,13663,15523,21733,"); + add("-138,74,34,69,29,-64,-38,19,10,-93,24,41,"); + add("-123,2,74,-139,23,68,-93,-54,94,-46,17,16,"); + add("33,33,-44,-145,-37,113,-59,-82,92,-117,-44,99,"); + add("-83,-79,101,-98,-59,97,-129,1,70,-132,62,30,"); + add("-136,30,54,-146,22,63,-120,37,38,-137,40,44,"); + add("-132,50,34,-137,27,51,-140,23,54,-141,32,48,"); + add("-133,4,62,-123,-34,82,-124,44,28,-95,124,-40,"); + add("-134,50,28,-136,-5,65,-143,24,48,-135,51,25,"); + add("-151,13,57,-116,80,-5,-70,114,-49,-151,52,28,"); + add("-141,44,27,-137,28,36,-151,0,61,-115,-55,84,"); + add("-137,-19,66,-113,-59,83,-106,-67,85,-83,-88,91,"); + add("-56,-106,92,4,-127,82,57,-127,62,81,-117,47,"); + add("4,-126,79,-56,-109,89,-81,-94,88,-111,-65,80,"); + add("-137,-19,60,-140,50,16,-129,77,-4,-125,84,-11,"); + add("-140,59,9,-141,51,13,-141,46,16,-146,36,22,"); + add("-145,24,28,-147,4,41,-146,30,23,-136,66,-3,"); + add("-101,105,-39,-69,120,-58,-46,125,-69,-119,79,-19,"); + add("-150,23,25,-143,45,7,-135,65,-9,-147,32,16,"); + add("-145,29,16,-142,15,24,-138,-36,55,-149,6,29,"); + add("-142,46,1,-154,71,-14,-125,38,0,-122,43,-4,"); + add("-131,126,-59,-138,25,9,-148,44,-2,-111,93,-43,"); + add("-32,122,-79,97,86,-77,111,74,-72,87,91,-80,"); + add("55,110,-89,20,109,-83,-52,128,-82,-122,81,-36,"); + add("-105,100,-54,-10,122,-89,103,79,-78,66,104,-92,"); + add("-18,101,-74,-145,-63,76,-125,-11,32,-59,130,-89,"); + add("-132,44,-11,-122,31,-2,-140,-37,51,-116,-63,67,"); + add("-123,-52,59,-148,-9,28,-165,-12,33,-130,47,-18,"); + add("-137,6,13,-141,-43,50,-141,43,-15,-120,-13,23,"); + add("-120,-62,60,-141,-30,36,-134,-48,49,-126,58,-32,"); + add("-147,39,-17,-152,5,8,-152,-1,12,-138,-34,35,"); + add("-152,-18,23,-141,-6,11,-140,-63,54,-146,-2,7,"); + add("-148,-18,19,-152,-10,12,-146,-17,16,-134,-51,40,"); + add("-137,-51,39,-122,-67,50,-94,-101,74,-153,-3,1,"); + add("-142,-45,31,-141,-36,24,-96,-91,63,-113,-76,51,"); + add("-131,-64,42,-148,-12,3,-148,11,-14,-140,28,-26,"); + add("-91,63,-49,-167,-51,26,-149,14,-19,-148,-15,0,"); + add("-147,-15,0,-141,43,-42,-112,79,-66,-79,97,-77,"); + add("-61,80,-64,-177,-45,16,-75,-108,69,-60,-116,77,"); + add("-58,-117,76,-67,-115,73,-74,-111,69,-82,-109,65,"); + add("-94,-100,58,-130,-71,31,-136,-61,24,-140,-54,17,"); + add("-142,-49,13,-136,-61,21,-108,-86,40,-109,-96,47,"); + add("-114,-89,40,-67,-108,58,-32,-126,76,-92,-106,52,"); + add("-95,-106,50,-65,-120,64,-22,-130,76,-16,-131,77,"); + add("18,-106,67,52,-115,78,-47,-130,68,-87,-111,50,"); + add("-97,-107,45,-92,-108,45,-107,-102,39,-124,-81,22,"); + add("-137,-67,11,-117,-90,27,-110,-101,34,-137,-63,6,"); + add("-142,-53,-1,-148,-33,-13,-149,-22,-22,-131,-55,1,"); + add("-102,-108,34,-70,-128,52,-73,-122,47,-62,-129,53,"); + add("-110,-97,23,-136,-69,2,-130,-68,2,-97,-100,27,"); + add("-63,-128,47,-72,-127,45,-68,-126,43,-24,-137,61,"); + add("-48,-134,51,-105,-101,20,-115,-97,14,-113,-102,17,"); + add("-124,-85,4,-45,-85,27,-86,-166,50,-81,-132,36,"); + add("-63,-120,34,-64,-131,39,-91,-126,28,-120,-81,-2,"); + add("-82,-125,28,-39,-135,45,-41,-142,46,-36,-139,45,"); + add("11,-63,29,88,49,7,55,-128,68,94,-66,54,"); + add("72,-129,71,25,-129,57,-35,-131,40,-72,-140,30,"); + add("-12,-75,25,57,-175,80,29,-137,57,23,-139,56,"); + add("5,-143,51,-9,-144,46,-25,-144,40,-51,-140,32,"); + add("-67,-134,24,-71,-130,20,-54,-138,27,-39,-142,32,"); + add("-15,-146,40,-39,-140,30,-86,-127,11,-87,-123,9,"); + add("-101,-113,1,-125,-80,-16,-35,-55,4,131,-79,62,"); + add("79,-115,55,55,-132,52,48,-37,24,80,37,14,"); + add("-24,-130,27,5,-132,35,86,-97,49,143,40,32,"); + add("151,15,39,139,11,37,23,-12,9,-165,-14,-43,"); + add("-150,-15,-39,-124,-71,-18,-137,66,-57,-95,-40,-19,"); + add("4,-145,37,-10,-150,33,68,-38,29,109,-29,39,"); + add("169,19,45,140,-28,46,108,53,18,32,16,5,"); + add("-131,-86,-16,-144,20,-46,-145,-14,-39,-139,0,-41,"); + add("-63,-98,4,132,-84,59,105,-1,30,30,-154,43,"); + add("141,35,33,23,-19,11,-4,-74,15,145,44,31,"); + add("138,22,33,85,-33,31,-198,-69,-40,68,-43,28,"); + add("74,-18,24,-111,-109,-7,57,-133,43,67,-24,23,"); + add("37,-29,16,51,-69,28,93,5,23,42,-89,29,"); + add("50,7,12,-20,-138,21,87,-128,47,146,-64,49,"); + add("100,-103,43,114,-63,40,40,-145,35,105,-106,43,"); + add("55,-111,32,51,-127,32,3,-125,20,49,-47,19,"); + add("-112,-70,-15,99,-97,37,66,-128,34,69,-98,30,"); + add("130,-47,35,64,-103,28,124,-117,43,137,-54,36,"); + add("123,-81,35,103,-103,34,110,-85,32,132,-68,34,"); + add("80,-100,27,164,-73,38,115,-81,30,105,-101,29,"); + add("109,-105,30,109,-98,28,107,-112,28,118,-87,27,"); + add("130,-70,27,131,-69,26,132,-73,26,140,-50,24,"); + add("136,-62,24,144,-33,22,137,60,13,138,61,12,"); + add("135,58,12,141,51,12,143,53,11,140,57,10,"); + add("154,36,13,144,15,12,80,34,4,221,-11,21,"); + add("150,21,10,153,12,10,31,26,0,-186,-21,-12,"); + add("-70,16,-7,216,24,15,145,2,10,70,-27,7,"); + add("241,-37,18,88,41,1,74,-80,12,215,-66,16,"); + add("148,-42,10,139,-66,11,145,61,0,127,75,-3,"); + add("152,42,0,142,47,-2,142,46,-2,131,71,-5,"); + add("138,62,-5,135,65,-7,139,51,-5,127,55,-7,"); + add("-86,84,-8,179,-137,12,126,67,-9,101,104,-12,"); + add("145,45,-9,147,33,-7,150,23,-8,151,18,-8,"); + add("151,15,-8,152,14,-9,152,2,-8,118,66,-15,"); + add("96,-12,-4,194,-39,-9,150,-20,-8,138,-57,-5,"); + add("119,-93,1,116,-123,3,104,-60,-4,93,-111,3,"); + add("72,-52,-2,-60,-116,16,22,-115,9,66,-152,6,"); + add("111,-118,-1,127,-59,-9,123,10,-14,172,14,-20,"); + add("81,57,-14,16,106,-11,97,-87,-4,83,20,-12,"); + add("13,34,-5,114,-41,-11,107,4,-14,144,-25,-18,"); + add("172,14,-25,57,94,-16,10,60,-7,117,-110,-8,"); + add("125,-37,-16,93,-200,1,128,-95,-14,128,-3,-20,"); + add("103,-40,-15,18,-169,8,77,-131,-5,50,-132,-1,"); + add("-31,-147,13,-24,-149,11,-20,-146,10,0,-155,5,"); + add("-58,-164,16,-80,-104,16,-38,-144,10,131,-77,-21,"); + add("-34,-206,9,-55,-13,9,-78,-47,14,106,-119,-17,"); + add("145,-47,-25,-5,-38,1,-148,11,26,-107,24,17,"); + add("-17,-219,3,-58,-133,9,-72,-120,10,-86,-22,13,"); + add("-68,14,11,81,-166,-15,78,-129,-15,131,-79,-23,"); + add("25,-86,-7,-143,111,26,-24,16,5,89,-154,-19,"); + add("76,-104,-16,30,-67,-7,110,-201,-26,122,-55,-23,"); + add("48,-37,-10,-95,-2,16,116,-113,-26,116,-93,-25,"); + add("108,-103,-25,91,-120,-24,103,-106,-26,89,-118,-25,"); + add("104,-105,-28,95,-110,-27,110,-104,-30,78,-131,-27,"); + add("57,-122,-23,82,-96,-26,50,-176,-27,-13,-142,-11,"); + add("102,-132,-36,104,-28,-26,127,73,-21,93,-26,-24,"); + add("-201,-68,38,-145,-55,26,65,-176,-34,77,-125,-32,"); + add("81,-121,-33,28,-149,-25,49,-142,-31,54,-139,-31,"); + add("63,-136,-34,66,-131,-35,13,-141,-25,-66,-116,-2,"); + add("-103,-102,7,18,-151,-29,41,-143,-34,36,-135,-32,"); + add("49,-132,-35,63,-140,-41,80,-124,-43,39,-130,-35,"); + add("20,-148,-34,-29,-145,-23,-11,-149,-29,-32,-147,-24,"); + add("-72,-145,-14,-85,-112,-5,-122,-66,14,-122,-104,4,"); + add("-63,-130,-16,-105,-105,-2,-74,-124,-13,-34,-157,-32,"); + add("-69,-133,-19,-16,-143,-33,-36,-147,-32,-55,-134,-24,"); + add("-50,-135,-26,-44,-152,-34,-93,-118,-14,-41,-114,-24,"); + add("0,-144,-43,2,-144,-43,-19,-144,-41,-27,-148,-40,"); + add("-22,-140,-40,-12,-144,-44,14,-143,-49,61,-126,-55,"); + add("56,-127,-56,98,-104,-56,78,-117,-58,64,-122,-58,"); + add("51,-130,-58,58,-125,-59,57,-126,-59,67,-119,-60,"); + add("36,-136,-61,39,-134,-61,51,-126,-61,67,-120,-64,"); + add("69,-117,-64,50,-128,-65,77,-111,-65,74,-113,-66,"); + add("50,-126,-66,16,-135,-62,-51,-115,-38,-7,-166,-71,"); + add("-8,-132,-57,-15,-140,-60,-13,-136,-59,33,-133,-71,"); + add("44,-122,-69,31,-129,-70,-17,-137,-62,0,-135,-66,"); + add("-2,-133,-66,18,-132,-71,21,-122,-68,21,-125,-70,"); + add("12,-128,-71,19,-130,-74,41,-121,-76,52,-119,-79,"); + add("58,-116,-80,84,-100,-79,88,-94,-78,98,-93,-81,"); + add("61,-104,-78,59,-112,-82,37,-121,-82,30,-125,-83,"); + add("16,-127,-81,24,-125,-83,31,-121,-83,45,-116,-86,"); + add("41,-117,-86,51,-113,-88,57,-108,-87,61,-107,-90,"); + add("21,-123,-87,-4,-129,-84,-31,-128,-75,-113,-90,-23,"); + add("-98,-49,-2,35,-95,-76,20,-75,-58,78,-152,-131,"); + add("6,-123,-89,-60,-113,-60,47,-37,-42,134,23,-29,"); + add("68,-84,-84,108,-67,-86,80,-84,-90,125,-33,-69,"); + add("120,35,-18,134,79,9,151,38,-29,129,19,-35,"); + add("138,-2,-56,150,15,-49,131,79,6,134,50,-18,"); + add("145,18,-47,117,-26,-69,139,5,-55,142,26,-43,"); + add("131,-22,-74,122,-33,-80,139,-17,-76,122,77,1,"); + add("139,-10,-74,110,29,-30,112,94,16,135,-5,-70,"); + add("135,4,-64,138,53,-30,135,59,-24,131,75,-13,"); + add("131,75,-12,129,77,-12,124,90,-1,128,79,-11,"); + add("122,91,-1,118,93,2,113,99,8,113,99,7,"); + add("126,83,-13,126,80,-15,115,101,4,108,105,10,"); + add("101,112,18,98,113,19,95,118,24,103,110,12,"); + add("87,122,29,106,111,9,112,98,-4,119,92,-13,"); + add("122,70,-31,127,93,-20,85,115,20,83,127,29,"); + add("55,132,47,65,130,40,76,128,29,70,131,35,"); + add("48,133,49,45,135,51,-9,92,60,-74,102,107,"); + add("104,114,-1,117,120,-7,131,81,-40,122,53,-51,"); + add("130,55,-55,130,46,-62,131,49,-61,130,49,-63,"); + add("128,60,-55,110,95,-25,103,114,-9,70,138,25,"); + add("-30,65,57,76,199,53,59,134,28,32,109,34,"); + add("26,155,61,42,142,42,-38,14,34,-44,-59,2,"); + add("31,186,71,10,140,62,-18,132,76,3,115,53,"); + add("15,152,60,-54,105,86,-37,109,76,49,147,32,"); + add("20,140,48,3,59,24,117,-35,-97,114,87,-42,"); + add("108,102,-32,96,108,-23,120,104,-41,123,58,-66,"); + add("95,68,-40,108,117,-32,117,122,-36,72,132,-1,"); + add("115,90,-50,109,78,-51,120,74,-63,119,65,-67,"); + add("99,59,-54,147,55,-94,106,38,-70,135,57,-87,"); + add("102,89,-48,115,73,-66,102,97,-48,86,104,-32,"); + add("85,115,-28,98,117,-40,99,115,-41,60,144,0,"); + add("42,99,0,42,96,-3,30,174,35,-10,83,36,"); + add("-10,101,43,18,182,45,13,138,32,22,135,24,"); + add("6,161,44,47,139,1,-9,159,54,25,141,20,"); + add("4,141,35,10,153,33,10,126,25,63,149,-15,"); + add("25,140,13,-29,151,62,-84,79,90,-85,64,86,"); + add("-73,102,85,-2,156,37,-21,134,47,-19,149,47,"); + add("-19,119,39,-35,164,61,14,142,16,54,146,-17,"); + add("-35,114,49,11,161,18,59,120,-28,44,119,-17,"); + add("-78,96,80,-61,118,67,-77,87,75,-36,161,52,"); + add("23,148,1,52,143,-24,50,144,-23,41,151,-15,"); + add("49,140,-25,92,92,-66,62,139,-37,37,138,-18,"); + add("72,152,-47,26,97,-13,71,122,-50,52,152,-33,"); + add("18,145,-6,101,86,-81,107,41,-89,71,113,-55,"); + add("34,134,-23,127,38,-109,89,107,-74,72,119,-59,"); + add("65,140,-53,52,131,-44,71,99,-62,80,121,-71,"); + add("70,106,-63,82,114,-75,76,109,-70,75,111,-70,"); + add("75,110,-71,75,109,-74,81,101,-79,85,91,-84,"); + add("78,102,-78,80,99,-82,85,91,-87,87,85,-89,"); + add("91,74,-94,92,69,-97,90,77,-95,89,76,-96,"); + add("78,96,-87,69,108,-80,73,103,-84,71,105,-82,"); + add("66,112,-80,64,112,-79,66,109,-81,64,110,-82,"); + add("61,115,-78,62,112,-81,49,125,-69,40,132,-62,"); + add("51,123,-73,53,119,-77,47,126,-71,43,128,-69,"); + add("38,132,-64,12,144,-39,20,142,-48,32,134,-61,"); + add("42,124,-73,44,123,-75,31,137,-65,11,140,-43,"); + add("58,113,-94,38,127,-74,30,129,-66,24,138,-63,"); + add("42,119,-80,33,131,-74,-10,152,-29,-2,147,-38,"); + add("-10,152,-31,69,73,-106,24,26,-38,-53,40,54,"); + add("-13,145,-27,-24,153,-18,-28,142,-10,15,138,-62,"); + add("-35,100,10,-105,49,113,-83,-34,112,-46,-113,93,"); + add("-75,-66,111,-89,-32,116,-91,-28,117,-82,-53,112,"); + add("-93,-32,117,-101,25,108,-98,-13,116,-83,-61,110,"); + add("-98,-19,115,-101,15,106,-96,-14,108,-74,-80,104,"); + add("-79,-74,105,-87,-57,108,-101,22,101,-113,29,108,"); + add("-91,-1,94,-84,-72,105,-85,-65,103,-86,-55,101,"); + add("-112,-5,112,-109,12,104,-102,86,77,-96,96,67,"); + add("-86,113,52,-74,136,34,-89,95,57,-99,63,75,"); + add("-117,-24,116,-43,19,34,87,98,-107,88,66,-102,"); + add("77,82,-96,-35,155,-13,-75,117,35,-92,112,52,"); + add("-100,62,73,-97,117,53,-86,83,52,-79,138,26,"); + add("-97,97,57,-109,73,73,-94,111,46,-86,117,37,"); + add("-94,110,44,-121,46,89,-92,89,49,-102,50,70,"); + add("-112,33,83,-66,134,8,-86,29,62,-21,-93,50,"); + add("-96,161,23,-64,103,15,-85,138,19,-56,143,-7,"); + add("-44,144,-19,-46,136,-16,-62,143,-5,-64,135,-2,"); + add("-76,133,7,-83,129,14,-79,109,17,-110,64,60,"); + add("-100,91,41,-122,107,49,-110,57,61,-78,129,4,"); + add("-59,140,-16,-63,146,-17,-32,132,-35,-52,137,-23,"); + add("-33,149,-44,-47,136,-28,-56,143,-27,10,76,-44,"); + add("-128,195,1,-63,134,-19,-57,131,-24,-120,83,47,"); + add("-108,96,31,-111,87,37,-134,73,59,-73,102,0,"); + add("-93,125,0,-48,134,-37,-20,153,-68,43,57,-62,"); + add("-128,103,35,-123,123,19,-84,121,-9,-82,124,-13,"); + add("-91,123,-7,-86,122,-10,-91,122,-9,-96,117,-3,"); + add("-91,122,-10,-92,124,-13,-67,126,-30,-68,124,-31,"); + add("-88,115,-12,-105,134,-13,-42,105,-39,-113,113,2,"); + add("-110,104,6,-106,108,-1,-95,114,-12,-85,119,-24,"); + add("-61,127,-45,-109,113,-7,-5,135,-88,49,1,-32,"); + add("86,-151,47,88,-107,16,114,-104,-5,80,-117,25,"); + add("65,-125,39,116,-100,-12,110,-101,-7,115,-93,-18,"); + add("134,-51,-58,42,108,-98,-38,135,-61,8,122,-86,"); + add("-7,130,-82,-17,126,-74,10,119,-87,50,-2,-33,"); + add("14,-138,84,20,-130,74,25,-132,70,-1,-137,90,"); + add("43,-69,16,141,-10,-92,115,-95,-20,98,-116,6,"); + add("97,-116,4,94,-115,6,104,-108,-7,100,-114,-2,"); + add("94,-115,2,99,-119,1,85,-103,-1,86,-96,-7,"); + add("104,-120,-6,97,-117,-3,58,-142,39,51,-108,23,"); + add("104,-121,-9,102,-81,-32,121,-53,-64,122,-83,-49,"); + add("111,-96,-33,94,-121,-7,87,-129,1,76,-122,6,"); + add("68,-99,0,98,-169,11,16,-130,55,19,-142,59,"); + add("68,-123,8,49,-139,31,60,-134,18,101,-119,-23,"); + add("83,-108,-17,97,-113,-24,110,-56,-65,124,-71,-71,"); + add("111,-91,-51,98,-97,-38,86,-115,-20,88,-136,-13,"); + add("80,-130,-9,64,-143,8,90,-117,-27,73,-128,-7,"); + add("90,-126,-26,106,-94,-54,103,-93,-53,82,-118,-25,"); + add("58,-121,-2,102,-128,-40,72,-124,-16,53,-141,8,"); + add("41,-148,20,-12,-138,64,40,-140,17,12,-117,33,"); + add("97,-176,-26,53,-134,-1,28,-110,13,65,-183,2,"); + add("74,-127,-25,29,-144,20,24,-145,25,74,-136,-27,"); + add("75,-114,-35,127,-42,-108,105,-7,-100,93,42,-104,"); + add("94,34,-103,92,9,-95,64,101,-96,81,71,-105,"); + add("62,98,-97,96,35,-111,104,10,-111,104,4,-111,"); + add("93,36,-111,90,45,-112,89,46,-113,65,93,-104,"); + add("76,71,-111,96,5,-108,94,6,-109,90,45,-118,"); + add("46,110,-96,44,108,-93,76,66,-115,80,52,-115,"); + add("89,32,-118,84,36,-116,73,67,-115,87,32,-120,"); + add("85,34,-121,80,47,-119,70,61,-116,65,68,-113,"); + add("63,83,-118,-38,151,-21,3,138,-69,50,93,-110,"); + add("72,53,-121,73,52,-121,76,43,-124,78,34,-123,"); + add("68,63,-125,69,47,-119,86,6,-123,92,-28,-116,"); + add("73,43,-127,10,133,-87,-30,138,-32,27,112,-102,"); + add("75,35,-129,79,18,-128,73,30,-126,22,110,-100,"); + add("-19,144,-57,15,115,-93,54,64,-124,69,33,-128,"); + add("80,10,-133,2,92,-61,-55,140,-5,-51,141,-14,"); + add("-17,137,-65,-21,139,-62,8,116,-95,56,-22,-73,"); + add("66,-9,-102,-3,146,-99,-3,110,-77,9,114,-100,"); + add("31,90,-120,15,102,-103,-7,124,-86,-6,121,-87,"); + add("-19,131,-74,-69,85,49,-92,72,98,-86,113,51,"); + add("-88,108,57,-85,116,46,-84,92,60,-86,26,120,"); + add("-94,38,120,-88,27,117,-94,42,114,-95,53,104,"); + add("-96,94,71,-91,110,48,-89,112,42,-81,127,16,"); + add("-63,134,-18,-55,135,-33,-63,129,-17,-35,140,-71,"); + add("-52,93,-3,-22,-178,188,-23,-89,111,-31,-81,115,"); + add("-14,-111,114,-22,-100,113,-38,-91,128,-14,-93,94,"); + add("-5,-92,80,-19,-114,115,-59,-61,127,-80,-22,127,"); + add("-96,21,114,-89,18,106,-100,6,127,-65,-24,103,"); + add("-64,-60,127,-97,15,113,-96,115,39,-70,26,69,"); + add("-65,57,41,-26,95,-37,3,161,-123,-50,136,-40,"); + add("-70,137,-16,-27,111,-52,-102,122,33,-82,23,85,"); + add("-7,-115,97,20,-126,72,18,-129,75,64,-135,22,"); + add("9,-77,45,-113,146,31,-93,140,8,-98,105,39,"); + add("-90,132,9,-23,84,-37,-31,122,-57,-81,129,-4,"); + add("-84,90,30,-110,86,63,-92,67,55,-105,120,27,"); + add("-124,79,80,-67,94,2,-102,129,12,-94,130,1,"); + add("-90,122,1,-88,113,7,-90,119,1,-95,94,26,"); + add("-62,54,23,42,90,-122,-74,158,-54,147,-35,-134,"); + add("67,37,-108,6,90,-87,-19,107,-73,55,-45,-23,"); + add("112,-93,-47,102,-43,-82,82,50,-141,100,-108,-22,"); + add("108,-111,-30,108,-99,-43,85,-130,11,92,-103,-22,"); + add("97,-111,-22,82,-131,12,93,-121,-12,100,-103,-37,"); + add("101,-51,-85,102,-25,-107,108,-63,-87,106,-94,-58,"); + add("89,-88,-41,105,-72,-78,110,-54,-100,100,-94,-55,"); + add("94,-33,-101,91,-5,-120,100,-57,-91,92,-32,-103,"); + add("48,68,-126,57,50,-127,39,69,-119,56,56,-132,"); + add("49,61,-129,83,0,-125,98,-44,-108,79,-89,-38,"); + add("83,-141,4,68,-132,15,71,-127,4,94,-116,-41,"); + add("101,-37,-127,84,-36,-101,86,-23,-117,79,-2,-127,"); + add("89,-42,-109,82,-30,-108,72,8,-130,86,-24,-124,"); + add("84,-14,-132,73,-2,-126,91,-52,-112,86,-30,-126,"); + add("85,-25,-130,53,13,-111,73,-23,-115,51,29,-124,"); + add("37,18,-89,69,19,-152,70,-4,-133,68,5,-141,"); + add("32,59,-126,66,6,-143,86,-53,-119,67,-15,-125,"); + add("51,34,-146,51,22,-136,61,1,-135,50,25,-140,"); + add("53,20,-141,20,17,-67,132,-165,-108,64,-132,8,"); + add("78,-36,-142,59,-87,-36,69,-126,-17,82,-136,-38,"); + add("70,-92,-62,67,-7,-154,61,-60,-82,52,-32,-93,"); + add("17,75,-133,9,-7,-15,4,-112,125,62,-112,-24,"); + add("74,-107,-64,77,-73,-112,72,-61,-117,65,-33,-136,"); + add("30,42,-131,32,47,-146,39,-4,-103,24,-180,155,"); + add("-30,-54,148,-31,-37,130,-49,-18,149,-33,-6,93,"); + add("89,-158,-53,73,-92,-89,77,-102,-89,74,-102,-84,"); + add("74,-110,-77,72,-96,-92,71,-77,-110,65,-51,-127,"); + add("38,23,-139,27,56,-143,17,60,-125,22,64,-145,"); + add("-8,94,-95,-34,140,-75,-74,137,55,-40,161,-91,"); + add("18,29,-95,54,-38,-120,36,-139,72,52,-115,-11,"); + add("41,-10,-118,11,-135,145,66,-140,-30,66,-125,-54,"); + add("51,-142,20,31,-133,66,38,-139,50,47,-133,11,"); + add("54,-123,-26,54,-119,-33,48,-125,-8,43,-134,15,"); + add("53,-149,-4,47,-129,-8,60,-158,-19,53,-138,-25,"); + add("50,-137,-17,51,-145,-13,54,-159,-12,35,-108,-4,"); + add("59,-160,-35,51,-123,-49,60,-131,-71,47,-113,-50,"); + add("54,-157,-34,58,-129,-77,53,-122,-70,39,-100,-44,"); + add("44,-137,-28,54,-154,-52,41,-124,-33,36,-139,-4,"); + add("48,-169,-26,36,-109,-40,52,-167,-50,45,-130,-56,"); + add("48,-119,-81,46,-117,-82,44,-128,-66,41,-123,-60,"); + add("41,-147,-44,37,-137,-39,41,-140,-55,36,-126,-51,"); + add("28,-99,-42,30,-135,-22,34,-195,-1,29,-109,-48,"); + add("35,-111,-67,47,-161,-94,39,-116,-90,40,-98,-112,"); + add("39,-50,-139,23,51,-139,15,82,-129,-5,131,-67,"); + add("-13,127,-37,4,120,-113,21,47,-142,22,41,-143,"); + add("30,-9,-149,5,5,-30,-40,53,161,-26,128,22,"); + add("-6,125,-84,-9,129,-72,-2,108,-91,25,-3,-132,"); + add("5,62,-91,-29,150,1,-28,148,-7,-38,164,28,"); + add("-23,115,1,-29,160,-28,-21,155,-68,-10,107,-78,"); + add("-19,133,-65,-27,145,-36,-29,146,-33,-32,122,17,"); + add("-28,89,40,-35,149,-13,-45,151,39,-32,147,-39,"); + add("-38,128,24,-43,146,21,-34,145,-30,-27,134,-66,"); + add("-14,110,-99,16,30,-147,14,-6,-75,1,34,-72,"); + add("-26,154,-116,-3,70,-117,24,-12,-144,7,49,-146,"); + add("-8,83,-127,-38,140,-30,-32,120,-35,-12,88,-121,"); + add("-3,64,-137,-7,76,-139,-18,89,-88,-25,114,-107,"); + add("-13,87,-134,-9,70,-133,-26,108,-106,-25,104,-102,"); + add("-30,113,-95,-28,101,-68,-28,113,-137,-21,87,-122,"); + add("-9,29,-19,-4,-10,94,-34,124,-122,27,-56,-83,"); + add("-1,45,-207,-23,87,-134,-13,53,-105,-35,116,-129,"); + add("-37,110,-67,-31,89,-47,-61,153,48,-49,129,-38,"); + add("-29,92,-116,-9,39,-146,-12,44,-145,-34,95,-113,"); + add("-49,127,-48,-29,67,32,62,-145,-77,57,-142,-11,"); + add("8,-13,-68,-14,40,-98,-52,133,-70,75,-182,-57,"); + add("-12,35,-112,-44,109,-9,33,-76,-139,-48,120,-77,"); + add("-21,54,-26,65,-162,-49,-42,106,-96,-59,144,-14,"); + add("-1,4,-21,61,-150,-42,33,-82,-72,-48,117,-129,"); + add("-48,115,-84,-57,138,37,-53,128,7,-57,134,0,"); + add("-44,104,54,-21,49,122,-39,88,132,-26,59,139,"); + add("-22,48,48,3,-3,-138,47,-107,-105,34,-78,-126,"); + add("4,-12,-148,72,-167,-24,44,-106,-87,15,-43,-144,"); + add("-5,4,-156,46,-116,-110,54,-137,-75,48,-121,-40,"); + add("56,-142,-41,52,-133,-24,53,-139,-34,45,-123,-74,"); + add("9,-27,-38,-22,59,8,54,-149,-71,38,-114,-94,"); + add("9,-30,-61,-24,61,-13,48,-135,-53,3,-16,-54,"); + add("-16,36,-44,62,-169,-7,0,-8,-58,-17,26,-129,"); + add("27,-95,-117,32,-103,-77,45,-136,-47,24,-40,146,"); + add("33,-125,-154,-37,96,-55,58,-178,-50,28,-93,-52,"); + add("48,-161,-73,39,-130,-51,43,-142,-32,38,-126,-30,"); + add("48,-147,26,49,-146,40,47,-148,37,40,-122,44,"); + add("44,-147,15,2,-29,-76,-42,117,-105,-17,42,-53,"); + add("50,-175,-19,-23,51,-92,33,-122,-32,-32,84,-84,"); + add("15,-70,-58,-15,39,-41,26,-110,-54,-39,103,-107,"); + add("-43,117,-85,-33,69,-124,-36,88,-93,-24,83,4,"); + add("-3,-54,-168,-48,120,-98,-41,123,-30,-44,128,-30,"); + add("31,-151,-129,40,-155,-57,14,-85,-92,-2,-35,-92,"); + add("56,-180,20,30,-130,-54,37,-146,-32,38,-142,-12,"); + add("37,-146,-21,27,-134,-67,33,-147,-32,30,-143,-55,"); + add("37,-155,-14,11,-70,-40,-28,99,-27,29,-160,-70,"); + add("21,-130,-68,26,-144,-58,29,-148,-37,31,-141,-4,"); + add("31,-141,3,33,-158,-10,6,-71,-55,13,-72,-15,"); + add("33,-145,19,33,-156,14,36,-130,69,29,-134,26,"); + add("26,-148,-14,2,-59,-53,-15,50,-44,39,-168,63,"); + add("27,-129,31,34,-153,54,26,-142,18,30,-145,45,"); + add("22,-137,11,7,-139,-93,-24,27,-135,5,-134,-93,"); + add("-1,-104,-102,-2,-95,-95,3,-152,-107,-7,-70,-96,"); + add("7,-124,-52,1,-114,-73,-5,-112,-101,1,-126,-77,"); + add("1,-132,-75,11,-156,-28,14,-142,-6,10,-151,-22,"); + add("7,-139,-30,-4,-115,-74,12,-146,0,3,-140,-38,"); + add("-2,-122,-58,-9,-132,-95,-10,-122,-90,-10,-121,-86,"); + add("5,-156,-18,-14,-115,-96,-23,-76,-131,-18,-93,-106,"); + add("-24,-88,-128,-27,-66,-136,-22,-98,-112,-27,-72,-129,"); + add("-28,-72,-129,-22,-96,-106,-20,-35,-86,-40,49,-157,"); + add("-22,21,-88,-26,2,-102,8,154,50,10,136,59,"); + add("11,135,65,13,138,78,24,89,116,8,136,63,"); + add("-8,153,2,-6,142,11,-5,153,23,-15,144,-22,"); + add("-16,146,-19,-9,152,15,1,137,55,5,133,70,"); + add("9,123,90,20,85,124,15,100,112,6,121,87,"); + add("16,85,115,19,71,126,11,103,109,3,127,88,"); + add("19,58,133,31,-16,146,18,68,134,12,80,121,"); + add("8,86,105,-2,133,85,-15,41,-55,3,-124,-72,"); + add("0,-49,-38,-16,196,57,-14,146,35,-16,147,32,"); + add("-2,103,72,-2,124,97,-20,150,21,-12,142,64,"); + add("29,-19,151,12,45,117,-18,149,43,-22,146,25,"); + add("-28,150,-11,-27,123,-22,-36,141,-59,-35,128,-61,"); + add("-34,150,-27,-37,143,-45,-40,134,-67,-38,133,-56,"); + add("-36,134,-38,-30,149,21,-36,144,-20,-34,137,-9,"); + add("-28,122,7,-37,54,-137,-33,23,-144,-16,-59,-160,"); + add("39,-162,-1,37,-146,12,9,-83,-52,-31,-7,-164,"); + add("-30,8,-140,-27,-21,-151,-7,-56,-96,-5,-88,-112,"); + add("-10,-97,-145,-5,-87,-105,13,-135,-73,-4,-53,-63,"); + add("29,-193,-50,21,-154,-43,-36,34,-123,-30,51,-83,"); + add("19,-149,-42,27,-125,12,-38,23,-137,-34,-36,-164,"); + add("-18,-78,-129,-9,-95,-104,-27,-58,-142,7,-100,-41,"); + add("46,-128,86,27,-147,6,26,-152,2,17,-163,-35,"); + add("12,-82,-2,-52,57,-162,-42,111,-88,-42,110,-85,"); + add("-46,58,-132,-51,62,-140,-25,121,-13,4,123,89,"); + add("-1,39,21,-18,-128,-141,-39,-14,-140,-9,147,56,"); + add("3,81,64,-30,-77,-152,4,97,73,-40,11,-127,"); + add("-6,92,40,-42,114,-68,-40,10,-127,-32,-63,-142,"); + add("-59,75,-141,-54,62,-131,-50,90,-97,-53,60,-123,"); + add("-58,91,-120,-54,71,-114,-46,100,-72,-41,93,-60,"); + add("-37,148,-13,-31,158,14,-30,109,-13,-50,117,-63,"); + add("-30,153,20,-15,138,55,-25,124,17,-34,152,15,"); + add("-28,158,39,-20,136,50,-22,134,43,-15,136,65,"); + add("-26,140,40,0,105,90,3,119,114,-8,120,83,"); + add("-7,106,75,14,94,131,14,90,130,7,80,101,"); + add("10,118,149,-10,109,83,7,95,122,-2,105,108,"); + add("-3,106,110,-15,45,-3,-38,137,29,4,83,113,"); + add("1,91,112,-17,130,97,-20,110,68,-57,138,-24,"); + add("-54,137,-16,-55,130,-24,-66,120,-76,-58,70,-105,"); + add("-72,109,-102,-57,131,-21,-57,108,-48,-36,71,-26,"); + add("-45,12,-132,-61,63,-114,-59,95,-65,-72,78,-126,"); + add("-46,24,-111,-62,43,-134,-41,48,-62,-34,60,-27,"); + add("-14,-62,-118,-10,-97,-149,-36,-22,-129,-64,65,-103,"); + add("2,-104,-116,77,-141,52,45,-140,-33,24,-120,-67,"); + add("17,-115,-77,-58,-12,-173,-57,124,-22,-18,111,74,"); + add("-26,121,63,-73,123,-61,-16,13,-28,-46,17,-105,"); + add("-78,58,-139,-50,16,-113,-62,28,-127,-75,77,-107,"); + add("-63,51,-103,-62,6,-144,-29,49,-18,-32,-36,-116,"); + add("-70,53,-111,-73,78,-93,-56,79,-47,-13,65,38,"); + add("-30,-67,-139,-58,161,33,-19,119,82,-75,112,-55,"); + add("-2,-33,-39,34,-104,-32,5,-131,-123,-1,-80,-85,"); + add("-55,26,-96,-54,54,-65,-40,45,-43,-53,30,-85,"); + add("-32,-3,-73,-87,63,-122,-50,-9,-116,-65,19,-116,"); + add("-71,17,-130,-80,46,-117,-98,116,-87,-28,51,-6,"); + add("-14,31,1,-91,99,-85,-74,32,-114,-103,87,-115,"); + add("-79,73,-82,-82,82,-76,-50,91,-8,-13,71,46,"); + add("-78,49,-99,-77,5,-139,-82,111,-44,-83,71,-82,"); + add("-64,95,-23,-62,48,-66,-44,102,22,-40,-15,-85,"); + add("-28,-6,-56,-58,141,35,-39,101,30,46,34,115,"); + add("-127,87,-137,-54,85,-10,-56,143,46,-47,-20,-103,"); + add("15,-44,-16,-73,105,-22,-90,112,-42,-64,95,-13,"); + add("-115,119,-74,-79,122,-6,-41,102,36,-5,21,13,"); + add("-83,22,-116,-94,84,-69,-101,50,-113,-20,139,110,"); + add("1,35,40,-102,57,-106,-29,101,59,-77,74,-46,"); + add("-58,12,-81,-32,114,70,67,-11,98,-159,133,-114,"); + add("-20,42,13,50,52,138,8,96,119,63,18,124,"); + add("116,-69,116,31,53,113,29,28,82,-126,35,-174,"); + add("-93,81,-63,-105,73,-90,-99,59,-93,-86,56,-77,"); + add("-34,133,99,25,76,128,10,90,123,40,56,135,"); + add("4,74,95,73,9,136,76,5,137,5,99,132,"); + add("-36,38,-15,11,-124,-136,-72,8,-113,-84,29,-107,"); + add("-24,-78,-135,-62,-21,-130,-51,-42,-133,-70,17,-93,"); + add("-12,121,124,7,78,105,-13,101,103,33,74,145,"); + add("-62,121,49,-41,121,84,-33,114,91,-36,114,88,"); + add("-44,117,81,-44,121,87,19,71,130,38,52,136,"); + add("15,79,139,1,59,85,-94,108,-13,-104,105,-34,"); + add("-115,101,-56,-91,70,-58,-105,97,-40,-64,75,-3,"); + add("-66,-10,-127,-103,105,-21,-82,81,-20,-136,62,-137,"); + add("-76,32,-78,-125,58,-119,-47,-24,-109,-91,71,-42,"); + add("-94,124,27,58,52,166,74,-12,100,64,25,141,"); + add("39,56,147,23,65,135,97,-31,118,88,-61,57,"); + add("129,-98,73,102,-82,52,80,-6,131,25,59,137,"); + add("-74,118,55,-84,108,19,-38,109,106,59,10,125,"); + add("65,14,144,24,51,131,-22,92,115,-74,112,52,"); + add("-105,109,-13,-101,67,-74,-37,-43,-143,-102,33,-130,"); + add("-65,19,-86,-133,124,-31,-106,97,-22,-106,68,-72,"); + add("-105,53,-95,-110,54,-98,-106,87,-34,-134,101,-57,"); + add("-102,77,-41,-78,4,-122,-71,-5,-122,0,-91,-149,"); + add("60,-97,-60,113,-96,28,108,-82,42,123,-93,52,"); + add("88,-91,0,-19,-77,-152,136,-111,47,93,-79,32,"); + add("-144,58,-147,-113,62,-85,-115,90,-44,-111,61,-81,"); + add("-113,56,-91,-106,46,-91,-97,31,-101,-93,3,-134,"); + add("-105,44,-89,-1,-105,-155,-62,-37,-142,-27,-60,-125,"); + add("94,-121,-38,106,-109,-4,-1,-61,-85,-7,-28,-51,"); + add("120,-40,116,118,-122,0,52,-66,-17,-29,-65,-130,"); + add("-35,-59,-128,-109,51,-83,-59,-48,-147,-101,-1,-137,"); + add("24,-67,-55,65,-148,-103,37,-87,-62,39,-74,-39,"); + add("87,11,130,88,-84,13,26,-142,-142,57,-118,-69,"); + add("16,-93,-91,119,-132,1,112,-116,12,74,-115,-36,"); + add("25,-109,-94,66,-86,-11,-7,-85,-108,-97,52,-70,"); + add("-111,45,-94,-37,-21,-73,-70,78,-3,-81,57,-40,"); + add("-112,37,-103,-90,-7,-121,-106,68,-57,-97,-5,-126,"); + add("-126,95,-48,-86,98,4,-101,132,28,-28,89,67,"); + add("-63,130,74,-78,121,47,-64,123,66,-43,115,85,"); + add("-18,107,106,-15,103,109,-2,97,117,-18,104,107,"); + add("-29,108,102,-13,98,110,27,76,134,18,79,126,"); + add("-3,85,110,-93,116,36,-98,88,-8,-119,65,-63,"); + add("-108,31,-97,-125,72,-58,-123,70,-58,-122,86,-33,"); + add("-120,63,-62,-97,76,-14,-88,121,59,-57,107,81,"); + add("-116,101,0,-118,89,-16,-123,77,-37,-113,40,-77,"); + add("-117,100,6,-124,41,-85,-107,85,-3,-127,95,-8,"); + add("-61,9,-56,-24,-24,-61,-64,8,-58,50,-110,-99,"); + add("-88,-27,-132,-63,-35,-115,-145,38,-102,-118,38,-73,"); + add("-132,67,-45,-131,59,-55,-129,67,-41,-130,83,-18,"); + add("-121,80,-12,-106,90,18,-121,90,6,-129,72,-29,"); + add("-123,89,5,-125,84,-4,-126,85,-1,-132,74,-20,"); + add("-129,82,-5,-128,80,-6,-125,85,6,-114,92,27,"); + add("-114,91,26,-109,100,45,-119,88,21,-131,79,0,"); + add("-116,93,34,-120,89,25,-134,76,-3,-132,74,-3,"); + add("-118,84,25,-97,100,66,-71,79,59,-102,100,66,"); + add("-105,106,75,-63,93,90,-75,74,54,-61,108,117,"); + add("-79,93,83,-110,89,51,-105,100,74,-107,80,43,"); + add("-132,75,15,-109,82,47,-36,61,73,-24,76,107,"); + add("-79,91,89,19,67,129,-18,21,21,-106,11,-66,"); + add("-41,73,92,32,53,118,48,67,155,-14,78,128,"); + add("23,66,140,68,17,87,116,-7,88,92,-13,56,"); + add("94,-97,-96,121,-86,-49,36,8,46,-84,73,57,"); + add("198,-81,31,88,15,107,-139,99,55,-15,57,95,"); + add("-48,44,39,132,-65,-1,101,-71,-41,56,19,90,"); + add("-109,95,76,-84,83,80,0,44,86,127,-10,101,"); + add("86,14,110,30,54,137,-139,80,23,-137,46,-42,"); + add("-135,61,-7,-136,58,-12,-136,51,-26,-136,54,-17,"); + add("-142,64,0,-143,71,15,-119,71,38,-139,69,17,"); + add("-130,52,-6,-149,58,-10,-141,57,-1,-142,57,-2,"); + add("-125,55,9,-115,77,66,-138,60,13,-145,46,-19,"); + add("-135,63,25,-131,63,30,-145,46,-15,-144,29,-48,"); + add("-126,9,-75,-131,2,-89,-103,-2,-78,-145,8,-85,"); + add("-73,-25,-101,-59,-25,-91,-125,51,20,-111,-21,-115,"); + add("-110,-10,-90,-144,20,-50,-93,-27,-111,-87,54,54,"); + add("-145,67,47,-122,0,-72,-96,-31,-117,-70,-24,-85,"); + add("-163,1,-89,-50,-59,-140,-12,-32,-67,158,-11,64,"); + add("80,-49,-49,-105,-24,-102,-154,32,-21,-130,-6,-79,"); + add("-155,53,20,-111,-1,-57,-135,-2,-70,-150,10,-52,"); + add("-53,63,93,122,17,89,33,27,67,-87,73,97,"); + add("-111,65,72,-127,62,59,-142,49,30,-136,52,41,"); + add("-111,67,81,-142,54,45,-96,68,93,-145,51,42,"); + add("-138,21,-15,-134,3,-48,-143,18,-19,-112,-14,-72,"); + add("-69,-19,-64,-127,17,-11,106,-88,-136,73,-56,-82,"); + add("-17,-66,-133,-14,-67,-133,-156,43,26,-129,56,62,"); + add("-127,53,61,-121,47,50,-165,41,27,-100,5,-21,"); + add("-39,83,150,-67,73,125,-70,56,90,-158,25,6,"); + add("-138,1,-37,-115,-32,-97,-19,-22,-49,170,0,48,"); + add("129,-52,-68,49,-72,-127,69,-67,-110,37,-63,-111,"); + add("81,-63,-95,66,-61,-96,131,-36,-28,169,-43,-28,"); + add("150,-47,-39,90,-65,-90,128,-53,-54,120,-61,-71,"); + add("138,-48,-39,123,-61,-65,132,-58,-56,91,-73,-96,"); + add("134,-71,-75,115,-51,-44,139,-53,-37,119,-52,-43,"); + add("159,-20,30,145,-37,-3,85,-30,-17,36,-84,-128,"); + add("117,-79,-83,122,-58,-44,106,-49,-36,109,-94,-106,"); + add("82,-82,-98,75,-82,-101,65,-85,-107,62,-85,-108,"); + add("41,-87,-117,33,-86,-120,30,-89,-123,20,-86,-123,"); + add("25,-88,-120,33,-89,-119,32,-90,-118,34,-90,-117,"); + add("22,-90,-119,-12,-73,-110,29,-103,-133,32,-93,-116,"); + add("50,-95,-109,14,-91,-119,-30,-84,-125,-195,88,36,"); + add("-121,70,44,-137,65,33,-119,79,60,-98,87,82,"); + add("-56,82,91,-57,83,96,-59,73,80,-205,54,-2,"); + add("-151,27,-18,-78,5,-23,-22,101,138,-37,90,117,"); + add("-88,84,91,-127,63,47,-135,56,35,-139,6,-38,"); + add("-140,1,-47,-134,70,61,5,81,122,17,78,125,"); + add("-41,86,117,-89,79,93,-98,75,85,-119,64,62,"); + add("-100,19,-1,17,-95,-143,-132,50,38,-20,87,131,"); + add("47,56,102,18,68,116,-29,86,130,-106,66,74,"); + add("-66,73,102,130,32,94,103,-30,-19,47,77,145,"); + add("-70,79,111,-99,71,90,-128,63,68,-114,62,73,"); + add("-87,70,95,-55,78,123,-97,68,93,-121,24,7,"); + add("-147,9,-24,-105,-31,-85,-80,65,96,-168,46,39,"); + add("-100,19,9,53,-101,-168,-37,-29,-61,-127,65,85,"); + add("-121,58,77,-134,29,22,-156,25,12,-144,-2,-33,"); + add("-137,-3,-32,-103,-67,-138,-35,-62,-117,-94,-9,-32,"); + add("-79,89,144,-103,42,58,-147,52,71,-131,39,52,"); + add("-94,50,77,-110,45,69,-88,41,63,-145,58,91,"); + add("-135,28,39,-149,33,45,-154,42,67,-110,29,47,"); + add("-142,33,52,-122,43,75,-88,36,65,-48,26,48,"); + add("-79,-44,-90,-151,-18,-40,-139,-29,-58,-91,10,17,"); + add("-85,59,112,37,70,137,32,61,121,79,42,84,"); + add("57,43,89,16,96,195,36,62,129,70,9,19,"); + add("137,40,90,51,50,108,169,-17,-27,36,11,26,"); + add("61,36,80,155,-21,-32,83,-6,-5,-231,34,53,"); + add("-136,-5,-19,-97,17,29,72,29,68,-155,-33,-80,"); + add("-91,-42,-93,-163,-15,-36,-124,23,46,-123,34,71,"); + add("-112,47,100,-74,53,114,-24,59,131,77,57,126,"); + add("-49,54,121,-99,29,69,-108,-6,-12,54,-64,-146,"); + add("-67,-63,-139,-79,-39,-84,-150,6,20,-139,16,41,"); + add("-148,-25,-46,-76,-52,-109,-43,-62,-131,-129,-32,-58,"); + add("-159,-30,-48,-105,-46,-87,-124,-6,0,-30,8,22,"); + add("-73,-24,-43,-57,44,101,39,66,136,-102,62,146,"); + add("30,32,67,11,49,105,29,27,57,-151,-27,-39,"); + add("-117,24,70,16,27,60,-138,-5,10,-65,55,136,"); + add("-33,35,84,122,35,61,121,49,94,115,44,86,"); + add("113,41,79,158,6,-6,124,3,-8,183,20,27,"); + add("23,-15,-38,-80,-60,-133,-18,-46,-105,10,-32,-75,"); + add("86,19,35,82,53,115,21,61,141,16,64,151,"); + add("76,33,75,102,59,134,129,33,73,138,35,80,"); + add("111,28,63,105,29,69,121,41,101,115,40,102,"); + add("82,18,44,870,23,91,110,40,114,77,23,70,"); + add("168,28,91,133,20,70,114,30,98,147,9,46,"); + add("-90,27,62,141,13,57,73,-15,-30,53,-51,-132,"); + add("-19,-34,-96,-41,-51,-145,15,-49,-127,95,-34,-73,"); + add("169,5,42,52,49,140,124,28,99,17,53,147,"); + add("69,28,93,171,-33,-53,144,4,48,140,8,58,"); + add("131,12,67,113,11,64,150,-6,27,138,-14,5,"); + add("138,-42,-71,49,-51,-127,60,-54,-127,76,-29,-53,"); + add("-71,79,190,-14,52,140,1,50,144,110,25,109,"); + add("-28,52,141,-81,43,99,-8,49,144,48,39,136,"); + add("93,26,116,113,17,100,135,5,72,150,-3,56,"); + add("113,-7,29,162,-13,33,146,-15,25,140,-3,62,"); + add("52,28,120,-7,49,156,114,7,87,44,10,60,"); + add("14,38,140,41,25,111,-150,31,21,30,35,144,"); + add("94,17,120,126,4,94,139,-28,-16,135,-41,-62,"); + add("151,-29,-4,25,19,88,-141,35,31,-58,13,9,"); + add("14,-26,-86,-127,49,98,155,0,104,71,5,70,"); + add("-208,7,-117,-46,10,7,91,20,141,98,13,115,"); + add("101,9,110,114,4,102,96,10,117,95,1,79,"); + add("109,-40,-76,133,-7,81,117,-41,-68,-35,-14,-89,"); + add("120,-42,-66,96,-58,-148,89,0,74,65,10,99,"); + add("130,-44,-61,71,-13,15,25,41,188,42,22,129,"); + add("122,-11,72,140,-30,16,82,17,155,-11,36,147,"); + add("11,19,96,183,-61,-70,112,-43,-66,155,-51,-47,"); + add("84,-4,77,16,27,138,-14,31,125,-75,53,155,"); + add("-80,36,74,-32,23,74,-15,35,154,-25,35,141,"); + add("72,0,99,109,-54,-133,105,-45,-94,50,-21,-34,"); + add("-128,64,153,-73,48,147,30,17,135,-15,32,149,"); + add("18,21,148,53,10,136,28,19,158,37,11,129,"); + add("65,4,136,47,-2,67,-5,36,232,-126,44,76,"); + add("38,14,176,36,11,147,59,2,141,104,-14,111,"); + add("123,-27,48,138,-42,-32,187,-62,-75,-42,18,54,"); + add("-141,44,29,-118,42,81,-131,41,52,-47,24,99,"); + add("100,-12,127,-67,31,125,69,-3,154,111,-34,-29,"); + add("-3,-9,-99,147,-28,121,100,-20,81,90,-18,85,"); + add("77,-8,160,91,-20,75,130,-34,57,-12,7,30,"); + add("-147,40,-39,-126,31,-55,-140,35,-59,-92,16,-109,"); + add("-133,32,-52,-138,31,-73,-128,32,-25,-139,29,-69,"); + add("-131,24,-93,-135,29,-56,-140,29,-51,-155,38,9,"); + add("-68,29,120,-52,14,26,-2,-10,-105,-127,37,72,"); + add("-73,28,119,-80,32,142,-82,30,140,29,5,136,"); + add("51,1,149,91,-14,95,46,-1,124,-187,43,23,"); + add("2,10,158,-32,14,112,-177,35,-56,-60,23,186,"); + add("83,-11,131,135,-25,77,148,-30,61,135,-30,13,"); + add("142,-36,-57,44,-12,-44,21,3,184,63,-11,92,"); + add("147,-40,-107,144,-35,15,202,-54,-65,-73,21,54,"); + add("-123,32,26,-149,37,6,-32,13,130,106,-21,127,"); + add("51,-9,130,-27,8,64,-59,17,91,33,-5,135,"); + add("77,-18,95,108,-26,130,55,-13,135,48,-11,147,"); + add("66,-18,128,103,-27,104,85,-24,134,147,-41,64,"); + add("19,-6,68,15,-5,55,129,-34,-105,26,-8,31,"); + add("25,-8,70,136,-36,-112,129,-37,-45,103,-32,103,"); + add("80,-25,120,132,-38,-81,21,-7,3,-143,41,91,"); + add("-118,37,-84,-104,31,-37,37,-15,193,1,-4,148,"); + add("12,-8,152,-17,-1,153,3,-8,154,55,-21,114,"); + add("136,-42,33,138,-40,-30,143,-45,34,130,-38,-51,"); + add("84,-20,-134,141,-43,-46,99,-28,-115,139,-44,-30,"); + add("133,-47,62,126,-43,4,155,-52,-32,141,-50,9,"); + add("67,-29,129,-217,78,-48,-91,30,49,147,-56,97,"); + add("75,-27,24,-208,74,-46,-143,50,-14,-108,40,-86,"); + add("-122,44,-87,-69,19,95,-20,-1,153,-144,42,95,"); + add("-91,26,69,-105,27,110,-56,9,142,31,-19,141,"); + add("84,-28,24,106,-34,10,-98,21,131,30,-19,134,"); + add("148,-48,3,117,-31,-89,78,-17,-117,122,-36,-74,"); + add("69,-22,-14,-138,31,215,-60,10,119,-78,16,122,"); + add("-115,38,-4,-151,50,-18,-124,44,-71,-124,43,-54,"); + add("-144,45,-14,-64,14,67,179,-57,30,125,-44,67,"); + add("52,-28,137,63,-31,126,126,-49,95,144,-44,-27,"); + add("145,-47,-12,144,-46,-26,122,-48,68,107,-46,95,"); + add("131,-53,64,136,-49,11,136,-52,28,89,-28,-48,"); + add("36,2,-152,-16,20,-148,86,-19,-130,104,-30,-102,"); + add("111,-37,-68,140,-53,-1,120,-48,13,104,-50,107,"); + add("129,-49,-15,73,-19,-133,41,-13,-37,-39,1,179,"); + add("-129,44,82,-136,57,-40,-129,53,-27,-126,47,10,"); + add("-142,50,53,-63,13,112,8,-18,149,45,-31,143,"); + add("136,-57,59,142,-53,-20,138,-57,23,102,-50,93,"); + add("82,-46,121,126,-59,66,78,-45,115,43,-35,140,"); + add("57,-39,119,74,-46,108,-89,19,130,-46,-2,147,"); + add("-88,19,119,-113,31,99,-93,46,-59,72,-8,-137,"); + add("102,-28,-92,11,18,-161,-96,49,-74,-84,51,-134,"); + add("-94,51,-104,-79,46,-124,-107,51,-78,-132,56,-46,"); + add("-104,51,-100,-143,47,58,-132,44,48,-138,54,-39,"); + add("-127,51,-45,-138,54,-54,-142,53,-26,-121,47,-58,"); + add("-126,49,-59,-139,50,-36,-135,41,25,-146,45,24,"); + add("-107,44,-100,-115,44,-86,-124,45,-74,-148,49,-40,"); + add("-125,31,66,-83,14,108,-48,-1,147,-42,-1,123,"); + add("116,-48,130,127,-47,76,124,-46,79,112,-45,93,"); + add("74,-39,124,41,-31,146,95,-43,99,120,-41,17,"); + add("125,-39,-7,123,-50,70,110,-45,58,111,-53,108,"); + add("78,-23,-21,122,-24,-128,143,-52,19,146,-46,-48,"); + add("73,-19,-46,128,-61,101,66,-43,127,-160,48,75,"); + add("-148,45,55,-120,29,88,-120,29,81,-122,25,107,"); + add("-140,42,39,-122,26,88,-106,18,107,-87,7,124,"); + add("-101,13,115,-20,-16,122,55,-38,110,148,-51,18,"); + add("124,-43,8,82,-56,149,10,-26,114,62,-41,104,"); + add("-119,33,37,-113,55,-90,-93,27,22,4,-32,149,"); + add("-4,-32,163,-60,-8,131,-85,3,112,-35,-21,147,"); + add("41,-47,149,-77,-2,113,-87,20,38,-90,56,-120,"); + add("-88,48,-90,-8,17,-64,-53,-20,162,-10,-31,147,"); + add("55,-34,69,-14,-15,81,-74,-7,122,-44,-22,144,"); + add("-2,-43,171,-14,-29,128,-19,-34,149,-41,-25,138,"); + add("26,-38,109,85,-58,111,53,-51,120,-70,-19,143,"); + add("-68,2,64,-159,44,17,-135,42,-6,-111,47,-48,"); + add("-14,46,-145,77,18,-141,3,26,-96,-128,49,-44,"); + add("-150,49,-21,-141,24,57,-100,-4,114,-90,-3,96,"); + add("222,-83,76,62,-44,91,74,-55,118,90,-69,142,"); + add("142,-41,0,117,-61,82,66,-54,112,64,-59,127,"); + add("39,-38,80,-114,24,35,-160,55,-21,-116,7,85,"); + add("-21,-50,172,-30,-38,141,-44,-33,136,-18,-44,143,"); + add("15,-50,132,125,-58,61,134,-55,39,87,-65,108,"); + add("-108,-7,111,-171,30,57,-122,8,76,-161,52,-16,"); + add("-157,32,34,-14,-54,156,100,-54,67,150,-56,35,"); + add("136,-17,-59,121,-76,104,-62,-35,139,-143,18,62,"); + add("-138,38,4,-140,47,-18,-139,20,48,-134,64,-69,"); + add("-83,61,-101,-108,57,-75,-77,52,-85,-35,66,-152,"); + add("-97,53,-78,-153,45,-17,-139,35,-4,-122,43,-38,"); + add("-145,48,-39,-131,50,-55,-35,17,-25,137,-22,-26,"); + add("172,-52,33,120,-16,-36,126,-23,-20,163,-31,-28,"); + add("144,-22,-41,137,-12,-66,138,-19,-52,141,-23,-41,"); + add("122,-3,-88,89,17,-123,62,29,-135,27,39,-143,"); + add("-8,50,-143,-36,54,-137,-97,54,-86,-118,58,-80,"); + add("-129,45,-36,-124,35,-5,-133,33,4,-164,34,26,"); + add("-107,20,20,-188,54,-27,-146,34,0,-150,34,3,"); + add("-145,30,10,-127,8,63,-145,14,55,-85,-11,92,"); + add("-32,-14,67,-106,45,-73,-137,20,24,-42,26,-57,"); + add("73,11,-81,-168,22,37,-53,-27,118,-158,15,48,"); + add("-68,-6,58,-88,16,1,-103,34,-50,-68,18,-19,"); + add("189,-4,-93,63,34,-146,-88,35,-63,-131,25,-8,"); + add("-159,26,8,-61,-27,121,26,-41,118,15,-28,81,"); + add("-100,59,-136,-39,43,-117,-48,35,-90,-92,-13,92,"); + add("24,-50,148,-47,-22,93,-103,51,-111,-30,-54,187,"); + add("-4,-45,141,-43,-10,52,-44,57,-156,-3,55,-172,"); + add("-113,9,23,-46,-29,115,-20,-42,140,-51,-43,155,"); + add("-8,-37,114,-142,27,-21,-138,10,25,3,-21,63,"); + add("99,-27,38,1,-24,71,-133,8,28,-51,-34,119,"); + add("20,-39,105,-49,-14,57,-19,63,-172,-63,18,-30,"); + add("3,-52,148,-27,-6,29,-81,38,-80,-1,-47,132,"); + add("41,-28,66,-100,12,0,-57,-14,60,-78,-50,161,"); + add("19,-50,132,-110,-31,118,37,-32,72,121,-13,-3,"); + add("-55,-17,61,-119,-5,51,22,-32,75,-8,-30,81,"); + add("-128,34,-51,-13,-34,92,-68,-38,115,104,-25,35,"); + add("-22,-38,101,-97,-8,46,10,-31,75,96,-15,11,"); + add("-150,-26,102,-89,-41,122,-29,-49,124,-5,-59,142,"); + add("102,-25,34,-142,-35,113,-11,-42,101,-17,-61,141,"); + add("32,-65,140,-65,-49,121,-116,-25,80,-12,-22,49,"); + add("74,4,-24,-32,-65,149,-87,-22,64,-107,-19,61,"); + add("-74,-53,125,-30,-54,117,-20,-47,102,103,-40,63,"); + add("121,38,-100,11,45,-95,83,15,-48,-5,-52,109,"); + add("-74,-49,115,-125,-37,99,-78,21,-28,-105,24,-32,"); + add("-65,-36,84,-117,-54,126,-12,-43,88,3,-20,39,"); + add("-93,17,-21,40,-36,67,-187,32,-38,-68,-35,77,"); + add("142,-19,19,44,-6,7,-107,-31,73,-170,5,11,"); + add("-38,-29,61,138,-35,51,19,-30,56,-139,30,-41,"); + add("-26,-22,45,-79,-18,43,-10,-20,39,-119,5,2,"); + add("-73,-15,35,51,-34,60,135,-9,4,88,-13,15,"); + add("-204,6,8,-58,-54,107,41,-62,111,-12,-60,111,"); + add("165,3,-22,141,9,-30,81,9,-26,121,5,-25,"); + add("46,10,-23,-65,-71,137,-113,15,-13,-165,6,8,"); + add("-137,-10,31,-71,-39,77,44,-55,96,56,-52,87,"); + add("-60,-51,95,76,-8,8,32,-7,9,58,-30,46,"); + add("91,74,-140,133,14,-40,-101,-58,115,-116,-74,141,"); + add("22,-36,61,36,-9,12,-128,-39,79,-45,-62,111,"); + add("96,-4,-3,89,24,-50,69,16,-36,-27,-68,119,"); + add("-8,-73,125,52,-14,17,-163,-5,26,-11,-80,133,"); + add("113,-56,81,164,-41,48,93,-44,62,120,-27,28,"); + add("139,12,-38,114,32,-68,113,56,-108,91,75,-138,"); + add("71,50,-95,85,48,-96,129,23,-62,16,79,-137,"); + add("-21,60,-100,45,39,-76,43,-102,168,100,-60,85,"); + add("86,-42,54,22,-91,149,77,-82,121,102,-39,44,"); + add("30,-102,160,52,-68,100,79,-76,105,81,-75,101,"); + add("100,-72,92,107,-82,103,-20,-80,129,43,-77,108,"); + add("97,-78,95,31,-91,130,152,-23,-2,139,15,-55,"); + add("85,37,-78,-46,84,-116,82,66,-121,93,34,-76,"); + add("140,2,-42,120,7,-44,27,94,-155,33,71,-122,"); + add("-10,85,-133,-17,82,-129,-22,77,-118,-36,75,-113,"); + add("0,71,-119,-42,78,-120,-84,51,-62,-18,8,-8,"); + add("158,11,-67,92,44,-104,59,43,-94,109,50,-124,"); + add("-4,43,-75,-166,-24,98,-135,18,11,-144,30,-10,"); + add("-87,17,-4,167,12,-72,119,0,-37,2,31,-55,"); + add("149,-74,84,81,29,-78,74,63,-140,-30,63,-103,"); + add("-137,64,-72,-118,56,-65,-130,36,-23,-116,42,-42,"); + add("-64,75,-122,-41,74,-128,-29,75,-135,10,49,-99,"); + add("-15,80,-154,-40,69,-124,76,46,-118,-7,57,-113,"); + add("69,41,-108,71,47,-122,85,54,-144,93,36,-111,"); + add("75,31,-94,48,61,-151,27,60,-142,7,54,-123,"); + add("-98,55,-87,11,62,-146,-33,63,-135,49,45,-126,"); + add("-1,19,-44,43,11,-45,45,31,-92,136,-8,-38,"); + add("142,2,-68,121,-7,-38,168,-56,59,69,-63,119,"); + add("54,-65,129,-102,-29,116,-19,-59,146,-32,-54,138,"); + add("-35,-54,138,-50,-50,131,-57,-41,114,-34,-55,135,"); + add("-52,-49,125,-61,-30,89,-21,-65,145,24,-66,128,"); + add("78,-59,90,58,-76,131,98,-70,104,39,-58,98,"); + add("35,-86,155,29,-67,119,95,-70,98,126,-32,10,"); + add("161,-43,16,118,-28,2,88,-64,85,11,-26,43,"); + add("80,38,-106,156,9,-87,89,28,-93,101,21,-88,"); + add("125,31,-120,87,26,-94,91,14,-71,143,6,-86,"); + add("115,7,-74,136,12,-97,132,-76,79,140,-29,-19,"); + add("134,-20,-36,62,-45,55,-190,9,90,-75,-38,116,"); + add("-100,-25,103,-13,-67,136,-131,-8,83,-145,16,45,"); + add("-146,21,32,-137,6,55,-107,-24,97,-117,-9,71,"); + add("-105,-33,110,-98,-41,117,21,-66,111,73,-68,92,"); + add("97,-88,114,158,-25,-26,66,-81,113,35,-79,122,"); + add("68,-81,109,16,-74,121,-89,-48,120,-143,29,13,"); + add("-109,73,-77,-134,61,-47,-107,36,-17,-124,-37,114,"); + add("-48,-64,126,16,-80,128,-34,-71,129,31,-93,141,"); + add("30,-73,105,61,-83,110,66,-83,105,74,-87,106,"); + add("34,-78,107,-27,-60,104,-107,38,-18,47,87,-152,"); + add("-16,52,-75,-34,-119,198,-91,-45,103,-86,-36,85,"); + add("-11,-86,133,-87,-52,109,-140,-7,59,-122,57,-43,"); + add("-29,57,-75,-218,21,39,-130,-21,74,-112,-40,93,"); + add("-111,-38,89,-63,-56,100,-148,-32,88,-129,-25,72,"); + add("-126,-32,78,-132,-15,55,-87,9,10,190,-58,34,"); + add("-36,-31,53,-140,41,-22,-103,81,-90,-133,38,-21,"); + add("-139,51,-42,-94,-4,27,-136,-64,122,-128,-38,80,"); + add("-91,-22,48,-108,37,-30,-13,81,-112,-199,13,18,"); + add("-104,55,-58,-90,68,-83,-50,40,-48,-25,89,-125,"); + add("1,91,-135,42,64,-102,84,60,-105,60,68,-113,"); + add("96,51,-97,-95,45,-50,-102,33,-33,-46,108,-159,"); + add("68,72,-125,-33,84,-128,-29,28,-39,-132,-44,93,"); + add("-66,-71,124,-120,-33,72,-139,-21,54,-71,-78,132,"); + add("72,-25,27,91,85,-145,98,9,-30,90,-10,1,"); + add("-70,-93,155,-18,-17,29,-92,29,-29,-109,-42,80,"); + add("-76,-38,70,13,-54,79,32,-90,131,5,-98,145,"); + add("84,-39,46,72,-99,134,40,-83,114,75,-76,97,"); + add("-8,-64,92,19,-48,65,63,-79,100,137,-58,59,"); + add("59,-44,51,-210,58,-47,-104,-26,52,-25,-83,118,"); + add("-102,23,-17,-129,39,-35,-146,-27,55,4,-80,109,"); + add("-47,-11,21,-127,39,-37,-147,-12,32,-140,-28,53,"); + add("-93,-63,94,-127,-54,83,-74,-49,71,-18,-91,121,"); + add("-46,-85,114,-90,-78,108,-68,-65,87,16,-45,57,"); + add("47,-36,41,-117,-21,35,128,-38,39,-230,4,9,"); + add("-135,-41,59,-128,-49,67,-143,-27,39,-139,-41,56,"); + add("-32,-93,115,6,-98,119,-35,-60,72,-123,-64,80,"); + add("-144,-29,37,-135,-47,56,-12,-90,106,-152,-52,60,"); + add("-149,15,-18,-155,15,-20,-86,84,-100,-162,-7,4,"); + add("52,-114,135,32,-91,106,9,-114,130,-161,-25,24,"); + add("-133,4,-10,-139,-10,5,-111,74,-90,-151,-18,12,"); + add("-136,-26,20,-161,-16,8,-72,-73,77,57,-63,75,"); + add("-53,-87,93,137,-50,67,137,-19,29,162,-32,46,"); + add("100,-45,55,119,-19,27,91,-75,85,133,-37,45,"); + add("-30,-117,125,67,-94,103,85,-65,71,146,-61,67,"); + add("44,-104,109,-9,-94,97,103,-89,93,52,-99,101,"); + add("23,-57,57,-115,142,-145,-71,-3,2,-22,-109,110,"); + add("-19,-107,106,14,-78,78,-40,-136,133,-28,-107,103,"); + add("-32,-106,101,-74,-99,92,-138,-42,35,-146,0,-5,"); + add("-143,33,-37,-142,-16,8,-151,34,-42,-139,-3,-6,"); + add("-172,-22,9,-145,9,-21,-145,24,-35,-138,23,-34,"); + add("-148,23,-37,-159,-13,-4,-147,-4,-14,-148,-5,-12,"); + add("-141,50,-67,-128,15,-31,-139,-42,21,-62,-79,67,"); + add("-211,-45,10,-123,-56,35,-32,-88,78,77,-89,95,"); + add("53,-76,79,-2,-93,86,-45,-126,108,-2,-102,92,"); + add("2,-115,103,22,-108,99,-27,-115,98,-8,-54,45,"); + add("-83,-186,148,-46,-98,76,-66,-108,81,-83,-102,72,"); + add("-64,-84,59,-44,-119,91,19,-93,79,126,53,-22,"); + add("61,39,-23,-122,-131,87,47,-63,58,109,-10,26,"); + add("-38,-152,115,-1,-121,95,-19,-114,86,-49,-117,83,"); + add("18,-67,55,169,15,14,153,-25,40,133,6,14,"); + add("142,54,-22,157,13,10,84,-19,25,121,-86,80,"); + add("70,-67,58,30,-135,104,79,-114,93,127,-64,60,"); + add("128,33,-12,92,101,-65,140,50,-25,138,39,-17,"); + add("123,56,-33,151,11,3,151,-8,16,148,11,0,"); + add("152,-13,18,134,36,-21,159,-4,9,106,95,-67,"); + add("69,112,-83,114,78,-56,141,35,-24,133,37,-26,"); + add("39,115,-89,58,119,-92,90,88,-69,131,65,-52,"); + add("61,86,-69,-122,102,-82,-43,111,-91,13,111,-91,"); + add("73,102,-84,87,93,-79,93,91,-77,81,100,-86,"); + add("77,60,-52,88,121,-106,134,42,-40,147,33,-32,"); + add("144,32,-34,110,76,-70,132,56,-56,124,59,-59,"); + add("73,90,-85,0,111,-100,-56,113,-101,-23,112,-102,"); + add("34,91,-87,120,73,-76,120,69,-72,103,22,-29,"); + add("168,-48,33,114,8,-17,115,-6,-4,128,-73,57,"); + add("153,-46,29,141,-6,-10,144,54,-67,82,80,-86,"); + add("112,69,-80,121,50,-63,145,31,-49,99,69,-81,"); + add("80,84,-95,121,57,-75,149,-25,2,134,-51,28,"); + add("136,-50,26,130,-60,35,52,-105,93,70,-99,83,"); + add("55,-106,91,69,-75,59,122,-75,47,102,-99,73,"); + add("141,-44,13,116,-90,59,127,-69,37,105,-88,57,"); + add("126,-83,47,135,-58,22,123,-28,-3,147,-15,-22,"); + add("126,-70,33,105,-88,52,132,-70,28,155,-24,-19,"); + add("74,-117,83,113,-80,41,135,-26,-15,107,-79,39,"); + add("69,-110,75,82,-106,67,60,-114,80,26,-104,80,"); + add("-78,-77,86,-23,-114,101,-26,-99,88,115,-56,13,"); + add("83,65,-77,68,93,-96,53,91,-91,-1,112,-93,"); + add("128,48,-79,49,65,-70,-51,122,-89,-128,78,-28,"); + add("-125,71,-24,8,117,-104,39,103,-103,86,76,-94,"); + add("104,-33,-2,164,-45,-12,114,-71,26,89,-93,54,"); + add("97,12,-43,-10,118,-102,-113,94,-46,-123,78,-31,"); + add("-144,57,-5,-133,65,-17,-139,59,-10,-143,42,4,"); + add("-142,49,-3,-141,79,-31,14,125,-120,-172,27,24,"); + add("-145,1,39,-142,41,0,-124,69,-32,-127,77,-40,"); + add("-115,84,-50,-80,101,-77,-62,107,-87,-76,104,-82,"); + add("-102,74,-48,-137,65,-31,-133,63,-32,-126,69,-40,"); + add("-81,97,-79,-38,109,-101,34,91,-101,-89,117,-101,"); + add("60,86,-102,128,30,-60,109,51,-79,144,-3,-31,"); + add("37,-68,62,12,-104,106,70,-91,77,105,-36,12,"); + add("54,87,-104,82,59,-82,137,-74,40,56,-99,89,"); + add("72,-97,79,123,-77,46,1,-51,51,118,-122,90,"); + add("134,-72,34,107,-73,41,151,-4,-39,153,-49,1,"); + add("130,-72,32,136,-74,30,31,-32,22,-122,21,18,"); + add("213,-65,-5,139,-55,9,144,-73,23,103,-35,-1,"); + add("148,-91,37,112,-86,43,138,-77,24,-10,-96,95,"); + add("35,-112,91,22,-110,94,18,-133,116,33,-91,71,"); + add("140,-97,36,114,-81,32,83,-104,62,88,-88,45,"); + add("129,-94,34,135,-66,6,69,-40,8,-23,-79,78,"); + add("115,-110,50,89,-38,-3,126,-18,-34,159,17,-78,"); + add("142,-3,-56,130,-29,-28,119,-85,22,-228,24,75,"); + add("-138,50,14,-119,-8,55,-120,-49,88,-42,-110,108,"); + add("111,-102,42,122,-103,37,19,-127,96,120,-89,24,"); + add("113,33,-72,102,-109,47,63,-49,12,89,76,-98,"); + add("119,-92,24,37,13,-26,-57,117,-70,-80,121,-65,"); + add("-91,110,-52,25,58,-59,134,-63,-5,47,72,-80,"); + add("-121,89,-23,-21,73,-53,144,21,-80,128,-70,4,"); + add("87,-9,-31,-51,146,-103,-119,77,-13,-136,65,3,"); + add("-121,63,-2,-151,55,16,-61,42,-11,63,83,-100,"); + add("-9,85,-71,85,-38,-2,-133,153,-80,-101,103,-51,"); + add("-106,100,-46,-27,125,-104,68,49,-73,134,-93,29,"); + add("112,-92,36,75,-17,-16,-36,90,-68,134,-79,14,"); + add("41,11,-28,-67,96,-59,113,-7,-44,-169,116,-33,"); + add("11,66,-66,125,23,-78,96,39,-80,125,5,-63,"); + add("105,13,-62,149,-35,-38,149,-29,-43,116,-76,15,"); + add("140,11,-79,28,-41,24,-103,-68,116,35,-72,52,"); + add("96,112,-154,98,57,-105,75,70,-106,56,82,-109,"); + add("128,13,-81,127,12,-79,112,-18,-44,95,62,-113,"); + add("-145,71,8,-141,52,25,-122,78,-13,-72,105,-68,"); + add("-105,106,-53,-118,86,-27,-5,75,-75,43,77,-102,"); + add("-37,120,-108,39,89,-115,102,41,-100,-33,122,-114,"); + add("-32,111,-104,-30,100,-95,3,95,-108,22,84,-107,"); + add("160,5,-96,-13,108,-117,-43,104,-96,-38,95,-89,"); + add("72,25,-71,82,100,-168,27,90,-125,11,88,-114,"); + add("111,33,-107,76,31,-85,88,25,-87,-59,90,-76,"); + add("-21,26,-20,98,-112,81,108,-71,21,69,-16,-24,"); + add("-180,-4,118,-23,-14,31,114,-65,10,158,-67,-16,"); + add("132,-5,-78,125,10,-94,134,-33,-47,47,-66,51,"); + add("-99,-45,120,-80,-55,119,-12,-79,103,182,-57,-48,"); + add("134,-44,-36,78,-102,70,37,-104,100,148,-59,-29,"); + add("89,44,-113,40,79,-121,101,33,-110,79,41,-105,"); + add("65,56,-115,144,-23,-75,92,32,-108,-42,108,-105,"); + add("-159,7,107,-90,-33,108,-132,55,25,-118,90,-29,"); + add("-103,98,-51,-28,90,-95,70,20,-75,80,89,-172,"); + add("92,41,-119,84,19,-87,107,13,-98,85,61,-144,"); + add("62,52,-118,125,7,-107,86,30,-108,72,14,-78,"); + add("154,-9,-111,-4,-62,89,-80,-44,124,-41,-57,111,"); + add("-114,-27,126,-13,-39,63,115,-63,-7,145,-69,-22,"); + add("8,-33,38,-49,-42,94,-32,-19,49,-4,-135,179,"); + add("30,-76,74,-119,-11,106,-110,8,72,26,-75,74,"); + add("162,-54,-53,120,-86,15,134,-31,-63,127,-64,-19,"); + add("133,-52,-41,132,-45,-49,131,-71,-18,131,-76,-11,"); + add("128,-82,-5,130,-75,-16,137,-72,-27,125,-50,-44,"); + add("131,-43,-60,125,-75,-16,123,-73,-18,94,-109,49,"); + add("99,-108,43,72,-113,72,-6,-94,117,-37,-74,120,"); + add("-73,-52,124,-70,-54,122,-89,-43,125,-122,14,87,"); + add("-132,33,71,-112,-8,101,-98,-33,116,-106,-14,99,"); + add("-136,29,75,-115,31,55,-132,22,76,-126,63,27,"); + add("-119,4,84,-114,25,57,-133,114,-27,-108,-4,81,"); + add("-131,31,60,-111,101,-33,-88,5,57,-112,-20,99,"); + add("-128,7,80,-130,7,80,-127,2,81,-101,-39,109,"); + add("-106,-35,104,-82,-52,107,-80,-62,115,-85,-56,112,"); + add("-46,-79,108,-112,-35,103,-136,22,59,-130,13,63,"); + add("-131,-5,82,-136,18,59,-107,-21,81,65,-99,62,"); + add("120,-47,-21,86,-22,-27,-177,-28,128,-37,-77,95,"); + add("-126,-30,99,-132,3,68,-125,14,53,-140,-26,99,"); + add("-120,26,36,-121,-25,86,-74,-77,110,-52,-90,110,"); + add("18,-115,97,63,-74,37,134,27,-91,87,-35,-12,"); + add("-6,-95,91,120,-127,55,1,-112,100,34,-86,60,"); + add("-158,38,45,42,-116,82,178,-55,-41,144,-64,-17,"); + add("24,-119,91,90,-110,49,95,-87,25,-4,-78,69,"); + add("140,2,-75,128,11,-77,27,-34,14,-66,-60,87,"); + add("-90,-34,75,184,-9,-90,135,38,-104,151,-52,-39,"); + add("91,-55,-3,109,-105,27,139,-47,-38,111,10,-72,"); + add("124,27,-95,56,55,-80,-20,119,-91,42,74,-89,"); + add("136,-10,-73,133,-37,-48,139,-57,-36,133,-59,-31,"); + add("117,-98,11,130,-69,-22,125,1,-82,110,25,-93,"); + add("116,15,-90,91,52,-107,48,96,-119,61,81,-114,"); + add("103,26,-94,133,-55,-43,129,-24,-70,42,57,-82,"); + add("118,50,-132,58,-114,63,-48,-95,121,81,-123,53,"); + add("13,-114,92,40,-113,72,91,-122,41,36,-120,78,"); + add("75,-122,50,-4,-99,87,-24,-99,101,12,-122,93,"); + add("-4,-114,97,-9,-114,98,1,-113,91,2,-125,97,"); + add("1,-114,89,20,-125,83,9,-123,88,-6,-117,93,"); + add("-27,-109,100,-52,-94,105,-86,-64,105,-114,-26,95,"); + add("-130,-8,92,-97,-4,66,-89,-7,62,-155,22,83,"); + add("50,-167,88,34,-111,55,"); + add(""); + //add("/*1*/"); + add("2737,1,-14284,23878,-11217,"); + add("-82,-105,-117,-15,25,72,-60,-31,10,-79,-19,62,"); + add("9,110,225,-46,-61,-72,-154,-85,22,40,7,-38,"); + add("54,-36,-148,1,-47,-99,-122,-119,-90,-97,31,190,"); + add("25,-21,-77,-3,-73,-146,-91,-31,55,11,-36,-89,"); + add("-159,-97,12,-70,-4,82,-94,2,131,-118,-56,45,"); + add("-43,51,167,-40,-46,-43,34,-54,-159,-75,-37,27,"); + add("-59,19,122,-93,-16,98,60,99,126,-21,-11,5,"); + add("-93,-116,-113,-75,5,120,-18,-24,-28,-75,-101,-104,"); + add("-108,-75,1,-89,-3,123,55,85,101,-32,-19,6,"); + add("-123,-105,-42,-7,-27,-46,-43,-47,-35,-81,17,159,"); + add("-116,-60,49,-40,-57,-60,-105,-66,22,-127,-79,29,"); + add("-105,-95,-35,-124,-106,-28,-98,-74,1,-88,-112,-92,"); + add("-92,-106,-71,18,-79,-186,29,58,71,40,78,93,"); + add("80,93,65,18,-7,-42,-45,-114,-161,40,41,20,"); + add("30,80,115,96,95,47,95,26,-94,91,7,-122,"); + add("101,19,-114,137,43,-116,-52,-83,-87,-118,-92,-9,"); + add("-117,-93,-10,-108,-96,-29,-143,-117,-12,-135,-130,-48,"); + add("-50,-79,-75,-157,-56,130,47,-16,-100,-29,-66,-80,"); + add("-93,-105,-58,-83,-98,-54,-84,-112,-77,-75,-105,-78,"); + add("-91,-115,-68,-70,-99,-70,-81,-109,-68,-79,-107,-67,"); + add("-72,-119,-97,-41,-94,-95,-65,-112,-90,-101,-106,-26,"); + add("-87,-112,-55,-110,-104,-6,-98,-108,-29,-104,-110,-19,"); + add("-75,-117,-75,-84,-126,-70,-25,-76,-80,-75,-126,-82,"); + add("-115,-95,27,-115,-90,35,-103,-111,-12,-80,-119,-56,"); + add("-97,-117,-25,-103,-98,10,-115,-91,43,-161,-129,59,"); + add("-58,-77,-21,-114,-71,74,-7,56,92,-67,27,148,"); + add("-90,-7,134,1,-10,-18,84,0,-134,22,-52,-112,"); + add("-131,-135,12,72,27,-74,-56,-101,-58,-97,-115,-11,"); + add("-110,-72,74,-100,-74,55,-42,-104,-80,-100,-122,-9,"); + add("-113,-93,54,-106,-102,31,-103,-87,50,-115,-98,55,"); + add("-100,-98,32,-86,-121,-19,-91,-125,-18,-92,-40,104,"); + add("-84,-16,124,-85,-18,123,-114,-81,90,-91,-59,81,"); + add("-80,-14,125,-100,-90,58,-75,-40,83,-109,-75,98,"); + add("-100,-79,80,-101,-100,50,-88,-122,-1,-77,-103,4,"); + add("-104,-135,15,-99,-113,37,-104,-118,43,-74,-117,-13,"); + add("-98,-106,51,-92,-124,16,-93,-102,52,-101,-150,3,"); + add("-74,-80,45,-85,-138,-7,-88,-117,27,-92,-81,86,"); + add("-90,-67,101,-91,-76,95,-94,-102,67,-88,-91,72,"); + add("-88,-94,70,-71,-130,-14,-61,-137,-44,-62,-124,-21,"); + add("22,-4,-54,54,10,-108,83,17,-158,-35,-68,-8,"); + add("-90,-85,87,-88,-108,61,-83,-64,101,-84,-69,103,"); + add("-95,-84,110,-62,13,159,-81,-98,64,-88,-89,95,"); + add("-79,-62,109,-79,-94,70,-115,-182,49,-40,-70,8,"); + add("-56,-132,-30,-56,-147,-45,-58,-85,38,-92,-109,97,"); + add("-89,-97,105,-69,-68,91,-77,-78,102,-78,-94,87,"); + add("-77,-89,95,-74,-86,91,-73,-123,44,-75,-139,31,"); + add("-41,7,123,-3,91,124,38,129,60,75,109,-70,"); + add("75,120,-54,66,92,-61,83,66,-140,48,13,-114,"); + add("74,106,-59,56,136,28,68,124,-18,78,115,-53,"); + add("78,123,-40,83,113,-65,70,128,-8,74,133,-10,"); + add("74,120,-22,75,71,-94,55,56,-62,78,120,-30,"); + add("84,100,-69,88,119,-51,85,86,-87,76,126,-10,"); + add("83,133,-13,79,83,-72,96,128,-46,82,80,-79,"); + add("92,121,-43,91,103,-61,91,88,-82,90,83,-87,"); + add("94,102,-64,81,122,-5,74,130,21,83,131,7,"); + add("86,113,-25,72,131,35,103,170,26,-42,-12,72,"); + add("-90,-65,101,-91,-42,139,-45,4,109,-93,-93,68,"); + add("-88,-49,130,-71,-79,43,-66,-126,-37,-88,-117,29,"); + add("-87,-114,34,-86,-133,7,-87,-114,37,-89,-115,45,"); + add("-78,-97,45,-90,-131,29,-89,-101,72,-91,-113,60,"); + add("-85,-83,93,-88,-111,61,-89,-78,117,-60,-23,123,"); + add("-62,-104,9,-85,-141,17,-80,-87,88,-82,-66,126,"); + add("-85,-125,47,-58,-24,127,-98,-125,90,-43,-84,-3,"); + add("-31,-134,-109,-78,-137,23,-52,0,150,-18,-42,-12,"); + add("-34,-42,39,-63,-65,90,-117,-117,174,-58,-89,46,"); + add("-45,-70,33,-105,-136,122,-37,-55,33,-72,-83,102,"); + add("-71,-86,103,-73,-100,85,-72,-113,67,-73,-107,82,"); + add("-68,-107,68,-78,-110,101,-63,-90,83,-67,-112,64,"); + add("-64,-137,21,-59,-136,6,-69,-126,60,-67,-105,87,"); + add("-57,-153,-18,-21,-129,-108,-53,-103,46,-5,-91,-114,"); + add("-25,-98,-42,-62,-133,40,-65,-120,71,-63,-107,87,"); + add("-66,-113,89,-52,-66,109,-55,-54,138,-55,-69,119,"); + add("-56,-76,116,-58,-103,90,-59,-114,86,-51,-59,131,"); + add("-48,-48,134,-45,-43,137,-43,-37,139,-32,-3,142,"); + add("-47,-65,124,-54,-103,99,-49,-79,115,-50,-83,118,"); + add("-44,-63,129,-41,-47,137,-41,-53,136,-44,-59,143,"); + add("-42,-72,116,-33,-27,146,-32,-30,145,-35,-40,142,"); + add("-45,-93,116,-43,-58,172,-33,-60,113,-35,-67,116,"); + add("-25,-17,150,-27,-27,146,-35,-66,134,-29,-40,149,"); + add("-14,9,148,0,52,139,1,54,142,0,51,145,"); + add("11,80,128,5,56,134,-7,7,104,-26,-55,123,"); + add("-30,-59,172,25,62,-90,-7,-4,85,-32,-82,117,"); + add("-35,-95,120,-33,-91,116,-33,-94,112,-43,-128,158,"); + add("-22,-72,54,-33,-106,101,-32,-104,104,-30,-96,111,"); + add("-27,-92,117,-24,-81,124,-20,-65,134,-12,-33,146,"); + add("-1,3,152,-6,-14,149,-13,-53,140,-16,-63,136,"); + add("-17,-71,124,-4,-20,157,-8,-44,143,-16,-86,237,"); + add("2,3,72,-4,-32,105,5,-2,175,27,99,105,"); + add("3,-12,139,-35,-165,74,-8,-14,-108,-21,-95,14,"); + add("-16,-90,97,-16,-92,106,-13,-92,128,-18,-108,97,"); + add("-21,-122,85,-15,-103,109,-11,-92,117,-12,-98,114,"); + add("-25,-149,52,-21,-128,50,-23,-111,-36,-27,-130,-35,"); + add("-19,-140,74,-1,-63,128,-5,-97,143,22,71,115,"); + add("17,158,-124,7,2,79,-3,-81,127,-16,-132,72,"); + add("-7,-90,90,6,-49,148,2,-72,134,-2,-92,118,"); + add("-17,-140,51,-24,-136,-28,4,-85,148,17,108,-1,"); + add("10,-4,92,-12,-118,54,-7,-129,92,8,23,39,"); + add("24,62,114,18,5,136,11,-45,124,18,-43,173,"); + add("-3,-104,84,-4,-117,78,30,28,174,-1,-120,95,"); + add("-10,-143,56,23,-13,155,31,74,126,32,74,128,"); + add("6,141,-78,-2,111,-104,18,127,0,33,54,142,"); + add("39,100,135,29,124,58,32,80,105,47,60,198,"); + add("4,-59,69,13,-90,141,5,-141,131,23,-19,127,"); + add("16,-116,158,-24,23,-131,-39,-129,-98,-13,-148,42,"); + add("0,-121,77,6,-115,99,11,-107,115,-4,-121,54,"); + add("10,-111,107,-14,-160,19,-15,-129,-3,2,-130,72,"); + add("-31,-136,-76,-5,-116,28,-12,-155,12,-7,-162,32,"); + add("-14,-141,-11,-15,-186,-2,11,-98,78,-2,-105,25,"); + add("-26,-135,-79,-24,-112,-78,-30,-150,-95,-16,-111,-47,"); + add("-23,-93,-86,-30,-35,-138,-33,-39,-151,-22,-114,-85,"); + add("-4,-170,15,-36,-101,-166,6,-160,53,-17,-111,-74,"); + add("-27,-53,-138,-33,-65,-171,-21,-26,-112,-24,-93,-125,"); + add("1,-170,15,-4,-145,-17,-14,-124,-84,-18,-110,-108,"); + add("4,-151,15,-15,-138,-98,-21,-80,-137,8,-155,32,"); + add("2,-150,-16,10,-154,35,-6,-140,-71,7,-91,21,"); + add("24,-76,129,28,-94,141,22,97,153,13,20,77,"); + add("-5,164,11,3,-13,11,10,-156,22,6,-135,2,"); + add("-1,-144,-50,-6,-131,-75,-20,-69,-134,-14,-89,-119,"); + add("-15,-91,-122,-8,-112,-98,-8,-113,-101,-4,-122,-85,"); + add("10,-152,-16,26,-152,82,12,-139,-4,26,-119,99,"); + add("20,-144,37,-9,-86,-115,19,-129,32,29,-83,126,"); + add("30,-70,132,30,-70,131,31,-83,122,30,-119,87,"); + add("30,-120,86,29,-138,56,30,-135,62,32,-123,80,"); + add("35,-102,104,32,-130,70,34,-129,73,31,-145,41,"); + add("33,-133,55,35,-126,67,35,-143,52,34,-138,43,"); + add("34,-136,49,39,-127,69,40,-127,74,39,-131,62,"); + add("35,-144,26,46,-102,113,43,-120,78,39,-154,26,"); + add("42,-114,73,47,-116,90,44,-128,64,45,-127,64,"); + add("46,-124,66,47,-125,70,32,-162,-34,15,-96,-38,"); + add("48,-136,50,50,-120,77,51,-121,72,52,-85,116,"); + add("53,-104,93,55,-111,91,50,-94,90,54,-68,124,"); + add("54,-71,122,54,-71,118,54,-75,114,59,-82,116,"); + add("53,-47,133,55,-66,118,60,-66,129,57,-55,126,"); + add("58,-60,126,62,-96,97,62,-79,113,62,-62,126,"); + add("61,-93,91,56,-133,35,68,-87,114,65,-89,101,"); + add("68,-87,104,68,-103,91,47,-147,-14,53,-143,3,"); + add("53,-141,2,58,-139,15,55,-139,6,49,-143,-17,"); + add("42,-138,-35,50,-147,-23,58,-138,5,61,-139,10,"); + add("44,-134,-32,44,-140,-45,43,-137,-41,49,-141,-37,"); + add("47,-137,-36,36,-137,-72,4,-78,-87,62,-138,-4,"); + add("62,-111,29,43,-131,-51,56,-141,-31,53,-137,-36,"); + add("62,-135,-10,70,-132,13,55,-134,-36,24,-110,-90,"); + add("60,-137,-28,66,-138,-14,54,-127,-37,51,-134,-57,"); + add("52,-134,-60,44,-117,-56,66,-137,-28,34,-115,-84,"); + add("57,-129,-48,59,-132,-46,44,-120,-73,40,-123,-92,"); + add("76,-129,1,84,-125,28,71,-130,-20,57,-123,-54,"); + add("26,-100,-104,50,-118,-71,75,-131,-20,78,-129,-10,"); + add("82,-129,-3,84,-130,0,76,-123,-14,81,-130,-13,"); + add("78,-119,-7,63,-121,-55,51,-118,-89,76,-125,-31,"); + add("81,-125,-19,43,-108,-100,57,-117,-78,74,-121,-44,"); + add("72,-124,-53,64,-118,-69,46,-103,-94,51,-109,-97,"); + add("72,-117,-50,55,-110,-92,78,-122,-50,65,-122,-96,"); + add("42,-82,-70,87,-130,-52,-11,-41,-145,71,-110,-56,"); + add("88,-116,-17,100,-112,30,85,-119,-42,110,-137,-12,"); + add("83,-92,18,105,-118,19,87,-110,-27,73,-111,-74,"); + add("42,-78,-86,70,-110,-90,89,-116,-50,78,-111,-71,"); + add("81,-108,-55,107,-116,5,98,-91,49,47,-47,10,"); + add("69,-38,112,-33,70,110,20,15,109,40,7,146,"); + add("39,-52,-29,21,-74,-152,88,-69,71,102,-105,9,"); + add("-32,12,-66,53,-66,-33,28,-44,-43,94,-112,-47,"); + add("75,-89,-41,70,-106,-108,126,-123,13,50,-68,-58,"); + add("89,-110,-76,128,-91,118,48,-36,35,74,-96,-84,"); + add("22,-62,-139,38,-66,-102,120,-94,70,-19,-6,-83,"); + add("92,-105,-67,61,-77,-71,103,-112,-62,-4,21,62,"); + add("25,-27,-11,74,-103,-134,-90,77,-19,-51,13,-130,"); + add("-21,37,64,-80,80,25,-44,10,-122,44,-71,-113,"); + add("41,-65,-111,30,-57,-118,108,-124,-107,-26,30,28,"); + add("-11,46,149,33,-26,18,109,-71,111,32,2,123,"); + add("146,-121,40,31,-60,-127,123,-103,21,-19,-7,-94,"); + add("48,-45,-14,52,-14,131,-16,48,132,35,-25,24,"); + add("100,-72,57,2,-6,-18,65,-58,-7,-43,11,-101,"); + add("-43,2,-143,-44,18,-81,26,-28,-22,126,-84,98,"); + add("86,-86,-53,59,-67,-71,102,-98,-55,133,-113,-8,"); + add("-71,88,125,73,-62,-12,133,-103,28,-27,12,-39,"); + add("13,-32,-97,94,-71,26,76,-69,-33,-28,-4,-118,"); + add("59,-52,-18,106,-64,89,107,-88,-18,-26,53,148,"); + add("61,-54,-29,50,-69,-132,110,-78,34,122,-91,11,"); + add("92,-73,-12,130,-91,31,-52,53,65,66,-47,7,"); + add("-52,53,66,23,7,102,-112,74,-45,38,-13,69,"); + add("134,-90,44,89,-78,-45,112,-96,-59,-31,26,10,"); + add("-113,88,22,12,-22,-60,2,-18,-69,-59,11,-148,"); + add("42,-39,-34,135,-106,-30,21,12,126,27,-17,10,"); + add("85,-83,-96,93,-63,20,-42,51,94,-94,85,72,"); + add("7,23,125,76,-8,204,2,-26,-102,5,-42,-169,"); + add("9,-32,-114,115,-92,-38,123,-74,55,-78,77,97,"); + add("-23,34,76,-7,36,136,-20,50,149,82,-53,22,"); + add("44,-63,-128,86,-89,-121,-26,22,12,-49,18,-70,"); + add("6,-27,-100,132,-79,61,88,-39,99,69,-15,139,"); + add("-71,73,99,-116,90,37,-104,92,74,-99,90,83,"); + add("5,32,137,1,38,148,-20,47,123,-14,45,125,"); + add("95,-22,171,-112,84,9,-125,85,-23,-110,50,-111,"); + add("-1,15,51,-48,55,71,-148,108,-12,-55,45,13,"); + add("-91,92,75,-78,87,93,-27,69,159,-102,65,-46,"); + add("-35,39,38,6,7,38,119,-74,59,7,39,145,"); + add("-78,89,88,-121,116,62,-72,75,55,-57,83,110,"); + add("-42,75,123,-14,59,137,-12,60,141,-26,71,141,"); + add("-86,88,46,-35,49,54,-61,88,101,-106,102,32,"); + add("-94,46,-87,-71,11,-132,-100,51,-95,-112,74,-64,"); + add("-114,76,-62,-113,99,-4,-86,99,63,-59,91,102,"); + add("-56,92,108,-33,77,122,13,41,135,13,50,154,"); + add("64,-2,138,-71,86,50,-44,95,131,-71,99,77,"); + add("-89,105,50,-103,109,26,-50,96,109,-34,84,116,"); + add("19,58,165,-54,43,-20,-122,78,-88,-13,80,145,"); + add("91,-47,90,102,-80,41,33,37,145,-76,109,74,"); + add("-106,110,11,-67,-7,-152,51,-78,-57,-81,27,-112,"); + add("-102,62,-85,-106,89,-36,-85,112,55,-97,108,19,"); + add("-104,112,10,-72,119,88,32,6,83,99,-47,112,"); + add("96,-45,110,98,-50,100,70,-3,136,57,13,137,"); + add("25,48,139,-10,97,164,-71,84,20,-106,119,17,"); + add("-69,116,77,-22,75,93,-107,151,65,-80,71,-28,"); + add("-100,134,43,73,-19,108,89,-23,125,71,2,135,"); + add("67,8,133,61,18,139,59,21,137,60,21,139,"); + add("54,30,138,56,27,137,46,40,139,49,38,138,"); + add("37,51,136,27,61,134,-22,95,103,-38,107,95,"); + add("-5,91,122,-23,103,109,-22,103,110,-48,112,79,"); + add("-99,139,38,-86,39,-79,-116,84,-65,-94,116,7,"); + add("-35,112,95,-55,108,58,-109,97,-44,-109,73,-75,"); + add("-105,60,-90,-107,62,-89,-101,101,-33,-41,95,58,"); + add("-75,122,35,-89,122,11,-55,126,71,-28,108,90,"); + add("-10,89,92,-87,138,28,20,-14,15,86,-125,-14,"); + add("12,-97,-99,32,-109,-85,58,-122,-60,84,-122,-19,"); + add("107,-98,46,108,-95,52,83,-34,87,77,5,127,"); + add("98,-51,88,106,-66,79,105,-49,97,89,-24,103,"); + add("62,42,144,98,-20,117,104,-36,107,68,23,123,"); + add("43,86,165,42,31,94,18,89,130,-10,106,107,"); + add("-20,110,97,4,95,113,20,86,122,19,88,121,"); + add("-6,105,106,-26,118,91,-35,122,83,-14,135,121,"); + add("-51,89,26,-45,147,90,-17,105,83,32,78,118,"); + add("16,95,113,-14,129,106,-26,123,83,-61,122,38,"); + add("42,-16,37,134,-47,122,53,-93,-21,27,-119,-79,"); + add("-15,-103,-116,-2,-92,-91,6,-109,-100,-23,-73,-99,"); + add("-55,-129,-200,39,25,75,46,69,127,31,84,122,"); + add("22,92,117,14,99,113,2,108,105,-1,111,102,"); + add("-7,115,97,-24,123,84,-19,123,88,-8,117,95,"); + add("5,111,102,13,106,107,27,95,113,43,82,118,"); + add("21,114,119,4,99,85,-34,135,71,-55,131,42,"); + add("-48,132,50,-33,119,55,-80,153,26,-57,132,36,"); + add("-77,147,23,-26,152,83,18,104,96,-83,84,-33,"); + add("22,52,63,66,23,90,55,87,123,-8,77,44,"); + add("53,100,128,67,63,116,61,84,123,32,97,99,"); + add("66,73,118,83,76,136,58,56,97,94,28,114,"); + add("101,10,109,51,99,114,61,66,101,101,33,121,"); + add("-18,61,19,12,97,70,85,9,89,142,-3,135,"); + add("92,-23,75,109,26,118,4,103,64,53,-40,26,"); + add("106,-50,70,106,13,105,135,-4,121,36,89,83,"); + add("-19,132,57,57,96,104,91,54,110,89,56,108,"); + add("8,109,65,-51,142,30,-6,136,66,15,129,79,"); + add("45,101,90,54,101,97,10,143,78,26,122,80,"); + add("19,122,75,61,99,96,11,134,71,-41,143,31,"); + add("-38,144,32,-18,141,47,7,137,65,45,118,87,"); + add("69,99,99,-24,139,36,-31,146,34,-4,140,52,"); + add("-7,144,50,2,141,56,7,139,57,-12,143,43,"); + add("-50,145,12,-40,145,19,-35,154,24,-35,137,19,"); + add("-3,147,46,-21,153,33,-42,129,7,-23,129,22,"); + add("28,139,65,8,208,68,46,83,61,97,-111,45,"); + add("87,20,76,63,112,81,48,122,72,52,121,74,"); + add("41,130,66,39,174,76,18,127,46,55,111,70,"); + add("62,93,70,67,111,76,94,80,89,88,82,83,"); + add("59,118,70,70,109,75,44,143,63,93,85,84,"); + add("68,113,72,59,123,66,38,135,53,31,139,47,"); + add("24,142,43,19,142,38,-15,166,17,8,111,24,"); + add("-25,186,11,-31,118,-3,-35,149,-4,-55,165,-16,"); + add("-29,123,-4,-40,145,-9,-46,144,-16,-72,130,-36,"); + add("-113,64,-74,-124,19,-87,-121,-17,-90,-123,1,-91,"); + add("-112,45,-78,-117,47,-84,-94,97,-60,-111,64,-79,"); + add("-94,98,-62,-98,95,-68,-86,113,-57,-90,120,-61,"); + add("-99,69,-73,-99,88,-72,-100,83,-74,-103,76,-80,"); + add("-113,73,-87,-98,73,-77,-108,42,-88,-118,12,-99,"); + add("-115,-23,-100,-115,-17,-100,-105,-27,-95,-117,27,-101,"); + add("-118,59,-101,-105,-19,-97,-110,42,-96,-97,69,-86,"); + add("-102,62,-90,-110,46,-100,-99,-47,-97,-101,-35,-98,"); + add("-144,-109,-146,30,126,37,-70,5,-68,-40,-97,-44,"); + add("-29,-148,-39,-81,-122,-89,-4,36,-2,10,141,21,"); + add("23,149,32,47,139,54,-84,-1,-82,4,58,8,"); + add("38,136,43,-76,114,-69,-80,101,-76,-117,-33,-119,"); + add("-63,103,-60,-92,70,-92,-80,35,-80,-91,62,-93,"); + add("-80,22,-83,-107,62,-112,-91,64,-95,-96,57,-102,"); + add("-92,3,-100,-109,-4,-119,-103,-28,-114,-58,-151,-69,"); + add("-40,-110,-48,-31,-140,-40,-71,-3,-80,-78,-95,-94,"); + add("-74,-89,-88,-61,-107,-77,-35,-140,-49,-49,-142,-67,"); + add("-8,45,-6,27,146,41,-11,182,-3,-108,-34,-129,"); + add("-85,58,-97,-100,-67,-124,-82,76,-95,-35,121,-38,"); + add("-39,139,-42,-18,138,-18,-35,60,-41,-75,-100,-96,"); + add("-72,-75,-92,-89,-73,-116,-81,-77,-106,-90,-15,-115,"); + add("-108,19,-141,15,41,22,86,61,114,90,27,116,"); + add("54,124,74,29,135,40,46,136,61,54,108,70,"); + add("44,138,56,79,87,98,81,81,99,66,113,79,"); + add("54,127,64,66,111,77,74,98,87,38,125,41,"); + add("-10,148,-18,-71,91,-89,-95,37,-116,-79,135,-104,"); + add("-8,130,-18,-29,131,-44,-26,148,-43,-27,146,-45,"); + add("-8,150,-25,-12,170,-31,-13,127,-30,-76,142,-112,"); + add("-17,-116,-7,-29,21,-40,-33,100,-52,-62,104,-92,"); + add("-42,110,-68,-74,78,-106,-59,106,-93,-64,99,-98,"); + add("-62,101,-98,-85,40,-118,-83,41,-120,-78,70,-117,"); + add("-92,-113,-107,13,75,6,-27,103,-55,-85,32,-124,"); + add("-84,27,-123,-92,9,-133,5,-52,17,-12,-14,-15,"); + add("-72,37,-110,-84,23,-126,-93,-75,-123,-62,2,-93,"); + add("-78,42,-123,-79,22,-125,-86,9,-132,-73,-172,-81,"); + add("5,71,-6,11,147,-11,-52,116,-104,-49,62,-89,"); + add("-48,105,-98,-54,96,-109,-76,39,-129,-88,-164,-108,"); + add("4,91,-13,40,143,32,24,150,3,-30,139,-84,"); + add("-38,97,-87,-44,104,-101,-49,91,-107,-75,77,-148,"); + add("-49,45,-97,-46,96,-108,-70,41,-135,-72,-32,-118,"); + add("-78,7,-140,-62,-56,-95,-93,37,-181,48,34,77,"); + add("55,90,71,51,161,41,60,100,74,-5,115,-47,"); + add("-58,47,-122,-61,111,-152,-68,-37,-112,-75,67,-165,"); + add("-43,-6,-79,-24,130,-97,-84,-17,-155,39,43,60,"); + add("-32,126,-112,46,78,58,69,-5,135,113,64,189,"); + add("-45,17,-93,-69,17,-138,-69,-5,-131,-72,-8,-139,"); + add("-69,-22,-127,-73,-3,-146,-96,-25,-187,55,-46,133,"); + add("-45,-34,-77,-78,-48,-142,-59,-65,-96,-58,-56,-98,"); + add("-75,-29,-148,-55,34,-134,-65,54,-168,-32,40,-88,"); + add("-19,117,-96,-47,41,-126,-62,-2,-141,-61,-9,-138,"); + add("-62,-27,-135,-61,-16,-139,-63,-22,-142,-52,18,-139,"); + add("-9,126,-86,14,107,-19,-7,131,-88,-34,82,-132,"); + add("-45,40,-138,-47,25,-139,-55,1,-146,-5,123,-88,"); + add("16,145,-43,-25,62,-110,-54,-104,-83,-14,-134,43,"); + add("52,-49,173,-47,-52,-98,-47,-65,-90,-57,-52,-131,"); + add("-57,-30,-142,-56,-64,-123,-64,-68,-148,-41,-115,-55,"); + add("-17,-148,36,2,-128,81,6,-128,89,-7,-136,51,"); + add("-30,-157,-7,-49,-116,-86,-54,-49,-133,-19,85,-101,"); + add("-1,110,-64,-7,78,-63,12,153,-47,46,132,68,"); + add("50,119,81,43,124,58,16,167,-52,6,94,-42,"); + add("-2,123,-85,31,130,12,57,46,143,54,68,114,"); + add("55,123,81,5,134,-75,-47,48,-173,-55,-74,-113,"); + add("-45,-45,-111,-50,-139,-57,-54,-73,-119,-53,-57,-131,"); + add("-53,-86,-113,-53,-88,-111,-47,-29,-139,-41,9,-146,"); + add("-38,13,-143,-42,-130,-52,-56,-133,-106,16,67,9,"); + add("3,32,-10,-31,46,-148,-42,-55,-114,-50,-104,-112,"); + add("-52,-113,-113,-41,-143,-52,-19,-114,8,-35,-159,-27,"); + add("-32,-151,-22,-37,-31,-124,-40,-96,-98,-40,-127,-78,"); + add("-43,-93,-113,-49,-103,-139,-12,-141,39,-22,-159,8,"); + add("-9,38,-65,-2,110,-77,-9,111,-113,-9,99,-111,"); + add("-10,92,-110,-5,113,-106,-13,81,-127,-20,55,-141,"); + add("-23,35,-141,-27,26,-157,-18,35,-127,-27,18,-160,"); + add("-38,-89,-123,-29,-61,-106,-36,-68,-143,-31,-46,-140,"); + add("-33,-79,-124,-30,-56,-136,-25,-11,-150,-11,129,-209,"); + add("-18,-47,-75,-10,63,-142,9,100,-57,9,124,-89,"); + add("-3,84,-129,4,98,-107,6,103,-98,9,118,-105,"); + add("13,124,-83,18,133,-63,13,113,-80,23,146,-59,"); + add("32,130,58,29,134,2,28,135,-4,30,125,26,"); + add("40,177,11,-14,-74,22,3,-8,43,37,164,-3,"); + add("32,145,-17,33,147,-10,38,143,23,39,142,37,"); + add("40,122,78,37,136,18,31,148,-65,21,67,28,"); + add("27,99,5,10,99,-155,-12,15,-146,12,76,-78,"); + add("24,96,-28,9,95,-179,-9,-1,-93,5,66,-146,"); + add("-17,-17,-142,-16,-12,-151,0,38,-139,-11,-10,-126,"); + add("-32,-73,-156,-11,-9,-146,-12,-11,-150,-3,19,-151,"); + add("-2,20,-165,0,19,-147,-25,-71,-125,2,20,-131,"); + add("3,24,-133,15,62,-139,42,140,100,43,133,129,"); + add("22,72,40,43,138,34,42,140,-20,48,151,22,"); + add("43,136,8,46,136,47,44,137,-24,14,50,-76,"); + add("55,155,85,-22,-70,55,-42,-135,73,9,23,49,"); + add("49,140,37,50,141,46,56,160,19,50,140,9,"); + add("50,140,17,30,77,27,51,137,29,47,116,83,"); + add("43,100,105,50,121,77,51,128,19,46,126,-58,"); + add("6,36,-160,-18,-34,-104,4,27,-143,6,31,-179,"); + add("-9,-13,-122,-18,-37,-144,-21,-45,-141,-12,-24,-148,"); + add("-8,-18,-150,-12,-28,-147,-22,-58,-137,-43,-113,-113,"); + add("-43,-114,-41,-53,-142,-13,-54,-145,-2,-43,-119,-51,"); + add("-43,-124,-61,-48,-137,-39,-32,-98,-113,-33,-105,-164,"); + add("-36,-102,24,-32,-103,-95,4,-2,-173,25,67,-69,"); + add("17,31,-155,-13,-58,-173,-7,-37,-107,-6,-41,-144,"); + add("10,-12,-243,-9,-41,-66,0,-27,-131,-2,-39,-146,"); + add("19,28,-134,47,118,-94,34,68,-128,30,53,-132,"); + add("19,9,-162,25,42,-104,57,139,-86,47,106,-93,"); + add("51,128,-54,55,140,-41,52,117,-82,51,108,-91,"); + add("51,106,-95,54,119,-73,57,128,-55,58,131,-52,"); + add("54,117,-60,84,188,-60,-24,-44,43,-84,-179,93,"); + add("32,84,12,55,105,-97,59,126,-61,61,138,-22,"); + add("56,132,-7,48,130,53,66,154,3,74,176,20,"); + add("41,94,3,62,147,27,59,138,27,57,135,40,"); + add("57,134,44,52,127,63,48,122,78,57,131,52,"); + add("62,122,-17,71,128,-61,61,115,-30,76,142,-28,"); + add("57,119,33,60,92,-89,-4,9,63,26,73,95,"); + add("70,131,-8,14,37,42,38,92,91,22,60,88,"); + add("38,100,131,50,107,79,-22,-10,147,-7,13,127,"); + add("16,45,85,19,57,138,46,104,119,52,110,114,"); + add("67,114,-21,31,64,62,-45,-65,87,-29,-52,-1,"); + add("-7,-11,9,23,59,139,15,46,156,47,90,50,"); + add("-19,-29,49,-19,-14,167,-15,-11,148,-36,-51,137,"); + add("-26,-34,144,18,42,151,29,58,109,-35,-56,127,"); + add("-35,-54,123,-47,-82,59,-37,-64,38,-21,-34,138,"); + add("27,52,132,-19,-33,138,59,107,66,-4,-8,122,"); + add("-36,-65,121,-50,-92,117,29,48,103,48,89,-112,"); + add("37,67,-134,50,88,26,57,98,77,19,35,-58,"); + add("15,27,-100,7,12,-104,5,9,-168,62,107,47,"); + add("-17,-29,140,-24,-42,142,36,59,133,25,39,160,"); + add("-5,-14,129,3,-1,151,55,86,135,-59,-104,74,"); + add("-22,-40,38,36,51,147,31,44,116,9,8,77,"); + add("-4,-21,146,15,8,176,-28,-60,109,-19,-57,201,"); + add("-40,-78,59,-56,-108,86,9,-11,173,31,35,121,"); + add("51,67,131,43,55,117,-12,-48,149,-39,-90,112,"); + add("-49,-103,94,-46,-103,105,-29,-79,124,-42,-96,96,"); + add("-58,-113,33,-83,-148,-12,-71,-123,-31,-71,-133,-2,"); + add("14,12,58,12,1,91,-86,-149,-59,-47,-98,37,"); + add("-59,-132,72,-14,-61,125,-49,-123,104,-39,-86,28,"); + add("-61,-140,60,-42,-107,77,-15,-74,144,-44,-116,79,"); + add("-50,-129,75,-10,-53,94,38,26,158,44,67,73,"); + add("69,133,26,64,111,58,72,142,7,72,141,8,"); + add("66,132,-4,58,125,-42,43,109,-75,66,145,-60,"); + add("56,125,-64,53,121,-71,56,124,-68,66,135,-51,"); + add("7,0,40,-46,-102,64,-66,-128,24,-26,-56,23,"); + add("98,190,-32,58,122,-57,51,118,-89,52,114,-78,"); + add("59,122,-68,62,125,-62,65,124,-47,69,129,-43,"); + add("68,125,-44,92,158,-25,60,92,29,77,119,30,"); + add("76,112,42,73,99,67,83,110,86,72,114,-11,"); + add("4,-5,45,24,21,68,50,49,105,78,83,137,"); + add("58,59,108,70,79,99,81,101,73,81,102,63,"); + add("81,95,85,70,68,124,37,11,140,63,60,99,"); + add("81,100,56,91,97,107,61,68,56,48,25,134,"); + add("95,69,193,4,59,-161,23,9,69,72,89,35,"); + add("26,85,-155,10,9,15,30,-9,154,18,-25,150,"); + add("84,79,104,87,109,25,-33,-15,-88,14,31,-36,"); + add("5,41,-103,1,40,-121,5,23,-51,63,28,174,"); + add("40,11,129,42,54,3,60,94,-46,8,-2,39,"); + add("-75,-117,58,-81,-138,88,20,29,-8,66,113,-76,"); + add("75,118,-55,74,121,-75,-19,24,-155,29,76,-125,"); + add("18,79,-187,13,-4,70,-9,-71,196,65,112,-92,"); + add("13,-9,81,59,64,36,32,76,-114,75,146,-180,"); + add("-24,-52,77,-36,-88,143,67,69,48,43,90,-123,"); + add("14,63,-154,21,64,-133,118,139,20,-74,-92,5,"); + add("-31,-74,127,-15,-71,175,81,117,-57,56,69,1,"); + add("106,135,-25,68,85,-11,73,76,39,94,73,131,"); + add("-38,-49,13,-104,-106,-57,-91,-108,-7,-47,-74,60,"); + add("-60,-68,-20,-42,-81,99,-28,-56,70,-62,-95,57,"); + add("-86,-105,-8,-131,-160,-16,64,62,63,78,79,59,"); + add("100,112,37,100,108,51,97,105,43,72,99,-36,"); + add("74,120,-100,77,113,-67,76,113,-78,90,93,38,"); + add("55,46,61,-148,-151,-74,-47,-93,123,-30,-85,157,"); + add("99,85,98,85,80,61,153,155,70,40,40,20,"); + add("97,112,-3,58,86,-66,73,91,-27,159,166,33,"); + add("-81,-96,19,19,6,50,90,69,92,83,50,125,"); + add("70,38,117,60,12,154,52,11,133,60,12,147,"); + add("131,119,60,17,-21,107,62,13,146,43,-7,138,"); + add("91,70,72,40,42,-1,-92,-53,-116,55,100,-113,"); + add("57,110,-139,115,106,35,65,82,-46,115,115,8,"); + add("121,104,49,104,88,41,110,78,84,48,34,38,"); + add("28,8,55,75,30,116,92,65,64,121,108,21,"); + add("-3,-30,74,62,26,88,54,3,128,80,39,94,"); + add("85,37,110,109,74,71,80,94,-52,28,9,44,"); + add("40,-16,131,126,64,129,30,-8,88,93,38,113,"); + add("105,56,94,107,52,103,121,107,-2,-8,-35,69,"); + add("-4,-29,60,-178,-122,-86,32,-15,103,66,1,136,"); + add("72,-9,167,-38,-22,-26,-130,-69,-107,-7,37,-101,"); + add("-67,-14,-107,-103,-53,-97,-159,-94,-120,-65,-45,-35,"); + add("-104,-60,-89,-103,-95,-3,-96,-103,31,-41,-79,93,"); + add("-20,-77,136,82,32,106,95,49,95,108,74,63,"); + add("123,90,55,82,63,30,99,72,40,23,-25,104,"); + add("83,40,80,102,39,117,93,25,125,92,42,89,"); + add("112,46,113,93,39,89,123,44,134,22,57,-80,"); + add("36,85,-115,-20,43,-130,-30,11,-80,-105,-46,-100,"); + add("-28,22,-100,-64,26,-185,-34,27,-132,22,71,-121,"); + add("5,51,-111,-17,47,-147,80,110,-104,68,88,-76,"); + add("40,80,-117,134,108,12,123,104,-5,2,40,-99,"); + add("-108,-42,-127,5,41,-96,1,50,-135,-47,24,-171,"); + add("32,19,19,79,21,123,42,-12,125,33,-26,144,"); + add("110,50,102,112,65,68,120,67,74,82,95,-79,"); + add("61,82,-89,-11,45,-144,-43,18,-144,-67,-4,-134,"); + add("-74,-13,-131,-89,-30,-116,-99,-42,-108,-94,-38,-113,"); + add("-98,-44,-106,-98,-45,-106,-106,-58,-90,-103,-55,-93,"); + add("-115,-73,-74,-112,-73,-67,-116,-83,-49,-113,-78,-60,"); + add("-114,-82,-55,-109,-72,-76,-115,-56,-147,53,45,6,"); + add("104,65,88,121,91,47,108,69,75,117,83,57,"); + add("113,98,-9,16,57,-140,-26,43,-219,24,-2,74,"); + add("16,-31,148,12,-36,152,108,62,91,118,86,38,"); + add("114,76,55,131,77,94,84,41,79,92,39,110,"); + add("86,27,124,120,92,10,113,81,18,139,79,87,"); + add("77,33,78,70,13,120,81,13,143,58,-5,138,"); + add("69,4,136,63,-2,137,60,-6,137,64,-1,130,"); + add("75,7,127,56,-9,131,52,-32,181,44,-3,90,"); + add("99,20,130,74,5,119,76,7,118,108,46,75,"); + add("134,72,56,129,65,61,115,75,12,132,71,48,"); + add("99,24,105,124,40,102,81,4,118,91,21,92,"); + add("132,64,53,120,49,69,144,82,24,74,85,-86,"); + add("-14,53,-143,67,20,52,87,76,-48,80,68,-44,"); + add("97,75,-36,35,76,-132,-21,48,-149,-156,-38,-144,"); + add("95,70,-28,64,77,-97,-12,40,-122,-80,5,-142,"); + add("-12,-31,64,-30,-11,-21,-110,-27,-105,-127,-59,-55,"); + add("-107,-47,-55,-128,-45,-96,-125,-59,-58,19,24,-33,"); + add("54,97,-171,53,-13,131,118,50,66,101,22,112,"); + add("171,62,118,-98,-11,-134,70,22,59,106,27,102,"); + add("107,39,73,154,49,114,21,60,-124,-52,22,-141,"); + add("-43,27,-143,33,72,-146,-152,-58,-96,79,48,0,"); + add("14,40,-88,-94,-11,-134,100,83,-66,71,76,-100,"); + add("-11,39,-135,24,62,-148,29,65,-150,72,74,-101,"); + add("53,75,-145,-13,-19,41,59,2,103,160,82,31,"); + add("37,63,-137,26,63,-161,85,41,23,94,82,-98,"); + add("21,40,-98,-49,12,-135,53,25,16,92,54,-15,"); + add("-52,10,-138,17,20,-37,156,74,39,59,61,-107,"); + add("-28,16,-117,60,38,-23,63,57,-88,69,57,-77,"); + add("102,83,-118,8,24,-79,20,20,-37,74,49,-46,"); + add("-111,-42,-64,-130,-69,5,-146,-88,43,-99,-48,-22,"); + add("-96,-58,25,-49,-28,7,-95,-41,-49,-150,-98,59,"); + add("34,27,-29,17,41,-129,-147,-71,-48,-110,-42,-86,"); + add("-152,-73,-58,50,47,-75,79,60,-67,-57,-21,-49,"); + add("-132,-76,3,-160,-61,-146,61,26,47,109,43,88,"); + add("143,85,-13,94,70,-73,37,50,-133,-63,-7,-132,"); + add("-117,-40,-128,87,51,-3,81,32,66,111,70,-42,"); + add("100,74,-88,118,74,-45,15,33,-126,-36,14,-172,"); + add("9,0,27,45,-2,137,84,29,79,128,82,-65,"); + add("129,69,-4,125,66,-7,-63,-16,-85,20,36,-138,"); + add("-29,12,-144,-2,26,-156,89,63,-95,66,48,-86,"); + add("60,51,-121,40,35,-94,67,52,-111,57,50,-139,"); + add("-47,-6,-120,-118,-44,-117,1,20,-137,-44,-5,-136,"); + add("38,40,-163,14,25,-149,-28,2,-138,-115,-48,-100,"); + add("-134,-70,10,-122,-72,69,-90,-59,99,-141,-75,4,"); + add("-126,-64,-36,-75,-48,63,-110,-70,73,-136,-81,52,"); + add("-81,-55,72,-147,-81,-18,-117,-61,-47,-106,-58,-32,"); + add("-127,-65,-71,-116,-66,-23,-72,-51,68,-61,-54,134,"); + add("-54,-51,138,-72,-60,117,-96,-71,91,-106,-77,75,"); + add("-114,-80,62,-121,-83,40,-123,-83,30,-125,-83,17,"); + add("-126,-79,-24,-132,-77,-69,-106,-62,-54,-111,-61,-90,"); + add("-99,-53,-99,-91,-47,-109,-81,-39,-122,-100,-48,-164,"); + add("-81,-59,24,-107,-89,97,-75,-63,74,-113,-87,43,"); + add("-105,-79,29,-130,-103,48,-103,-85,61,-109,-89,55,"); + add("-102,-90,84,-111,-81,-25,-113,-76,-66,-171,-140,51,"); + add("34,42,-103,-4,11,-101,-114,-81,-55,-149,-133,97,"); + add("41,43,-63,60,64,-122,0,21,-147,-105,-68,-124,"); + add("22,18,1,111,76,92,111,92,-45,79,75,-102,"); + add("54,56,-120,40,49,-163,60,45,13,107,92,-91,"); + add("85,75,-103,103,81,-53,114,83,17,117,88,-23,"); + add("118,88,-25,97,77,-75,128,91,-1,128,88,17,"); + add("117,86,-53,10,22,-157,2,16,-180,1,7,-79,"); + add("-1,10,-152,-23,-6,-149,-67,-37,-156,60,41,10,"); + add("92,69,-93,64,49,-125,36,31,-144,43,35,-143,"); + add("34,29,-159,75,53,-86,104,71,-92,74,51,-124,"); + add("85,58,-119,40,28,-137,36,24,-147,65,42,-134,"); + add("50,31,-135,-11,-8,-147,-44,-31,-140,-40,-31,-200,"); + add("110,72,10,124,78,-12,123,77,-49,127,78,-27,"); + add("121,74,-43,146,88,-45,51,26,-131,-32,-25,-132,"); + add("-139,-87,-39,9,5,-11,128,80,28,67,38,-60,"); + add("112,63,-78,124,75,31,127,75,-3,138,80,10,"); + add("121,72,33,140,80,26,111,66,70,123,71,80,"); + add("121,68,47,114,65,51,111,62,99,85,47,51,"); + add("101,56,71,11,7,65,95,51,27,48,27,106,"); + add("63,33,-10,60,31,34,-13,-4,161,65,34,141,"); + add("106,55,41,105,52,-52,72,35,-130,37,15,-168,"); + add("83,39,-90,46,19,-161,79,36,-75,3,3,49,"); + add("-79,-35,130,-59,-26,161,-35,-15,131,-59,-27,128,"); + add("18,9,136,118,59,92,101,49,32,-31,-15,113,"); + add("-16,-9,126,50,23,132,103,48,78,127,60,65,"); + add("110,50,64,141,65,60,77,38,-96,-2,1,-144,"); + add("15,9,-154,78,37,-114,106,48,-94,68,30,-131,"); + add("19,8,-167,23,11,24,-25,-11,189,7,3,112,"); + add("-100,-45,171,-61,-29,68,-89,-42,116,12,2,157,"); + add("103,45,94,121,53,77,128,54,77,159,73,-115,"); + add("60,22,148,-61,-30,111,-42,-24,145,-3,-7,123,"); + add("39,15,46,131,61,-85,138,64,-138,-35,-19,110,"); + add("-59,-28,68,-116,-54,85,46,14,109,93,34,114,"); + add("115,45,65,101,37,94,152,62,24,119,52,-55,"); + add("96,45,-107,135,57,-57,109,48,-81,56,19,54,"); + add("66,19,122,134,54,-47,120,45,14,79,37,-138,"); + add("77,36,-149,41,13,45,50,19,-23,-6,5,-150,"); + add("45,22,-146,-22,-2,-170,-101,-37,-34,-127,-47,19,"); + add("-127,-52,103,-127,-48,-19,-89,-31,-100,-148,-58,-11,"); + add("-144,-57,-30,-122,-47,-64,-175,-71,-30,-117,-46,-126,"); + add("87,38,-89,112,48,-94,131,54,-56,153,61,26,"); + add("91,35,63,141,56,-31,116,46,-79,111,43,-130,"); + add("-81,-30,-107,-154,-60,-23,-162,-63,-72,76,30,-75,"); + add("143,55,4,196,75,-91,86,33,78,71,26,-98,"); + add("11,3,-102,54,18,-147,88,33,26,157,58,68,"); + add("116,41,-5,120,42,-55,125,42,-76,158,55,8,"); + add("128,42,-55,132,41,-112,70,22,-75,23,5,-78,"); + add("-125,-45,-117,-114,-39,-27,-76,-30,-127,-123,-43,-32,"); + add("-160,-53,55,-110,-42,-70,-136,-49,-22,-142,-49,71,"); + add("-89,-29,108,-55,-16,124,-71,-22,150,-83,-30,38,"); + add("-1,-1,-34,33,11,-33,-107,-42,-58,-131,-52,-69,"); + add("13,8,119,-132,-49,48,-96,-40,-84,-108,-46,-91,"); + add("-57,-27,-143,-83,-37,-88,-125,-51,2,-141,-57,24,"); + add("-144,-61,-14,-41,-22,-92,-95,-41,-26,114,46,-52,"); + add("38,22,135,113,45,-60,128,49,-80,118,50,32,"); + add("181,75,49,-20,-12,-96,69,26,-27,132,44,-152,"); + add("-31,-18,-122,-48,-23,-73,-149,-58,36,-19,0,130,"); + add("-129,-50,41,33,6,-131,146,54,-83,-67,-29,-38,"); + add("-30,-20,-127,59,15,-137,23,-3,-164,-13,-16,-141,"); + add("43,5,-140,94,26,-126,115,37,-94,38,-1,-166,"); + add("125,41,-72,115,37,-70,142,54,6,102,28,-92,"); + add("-15,-22,-149,-12,-22,-150,-12,-22,-146,-138,-61,-71,"); + add("-43,0,128,6,19,144,20,29,187,-75,-34,-47,"); + add("-42,-28,-104,-9,-26,-190,-108,-52,-82,-154,-60,4,"); + add("-152,-59,7,-108,-50,-50,-174,-79,-54,68,23,-40,"); + add("184,68,-58,50,31,85,182,65,-57,38,5,-74,"); + add("139,47,-49,119,35,-77,39,0,-111,-4,-24,-154,"); + add("32,-10,-145,36,-10,-149,68,5,-132,84,9,-131,"); + add("127,25,-132,114,57,88,-14,17,135,47,32,91,"); + add("142,47,-23,132,37,-62,108,14,-139,21,-11,-110,"); + add("87,11,-105,116,20,-113,132,32,-67,113,19,-100,"); + add("112,18,-99,140,36,-44,131,29,-67,98,8,-115,"); + add("38,-12,-122,-82,-53,-131,62,-7,-132,142,57,68,"); + add("135,54,59,40,1,-51,-82,-50,-118,-89,-53,-125,"); + add("79,1,-103,147,43,-6,135,49,40,141,48,36,"); + add("170,45,-16,-69,-36,-77,-55,-47,-138,-9,-37,-150,"); + add("72,-6,-117,20,-29,-143,-66,-60,-170,86,24,-3,"); + add("53,-18,-131,2,-32,-129,-63,-49,-118,24,-19,-101,"); + add("70,46,101,12,39,137,16,42,151,-49,20,136,"); + add("-25,24,126,33,63,227,99,7,-88,13,-32,-147,"); + add("44,-32,-180,30,-15,-95,-5,-39,-151,40,-27,-142,"); + add("-4,-41,-153,-110,-55,-92,45,5,-27,85,-6,-106,"); + add("108,11,-66,125,10,-82,138,21,-55,174,38,-24,"); + add("120,27,-11,156,35,-11,117,9,-67,135,8,-83,"); + add("135,22,-30,145,30,-9,152,26,-26,105,-5,-96,"); + add("100,-12,-111,136,17,-37,146,17,-43,124,1,-78,"); + add("151,20,-27,140,19,-26,147,16,-33,124,-6,-91,"); + add("115,-6,-86,160,20,-20,122,46,82,136,16,-18,"); + add("124,-13,-100,161,35,35,87,-29,-131,55,33,77,"); + add("139,42,76,73,-25,-112,42,-38,-138,104,-20,-104,"); + add("133,-3,-61,49,-34,-123,-41,-40,-104,66,16,23,"); + add("106,-15,-82,140,-26,-125,66,-15,-64,37,-42,-134,"); + add("27,-46,-138,-11,-53,-145,41,-44,-135,89,-34,-116,"); + add("135,-12,-71,148,-3,-46,47,-29,-88,20,-60,-161,"); + add("-50,-23,-49,-136,-35,-57,-140,-33,-47,-120,-35,-57,"); + add("-138,-47,-79,-81,-56,-117,-109,-36,-56,-160,-3,41,"); + add("-158,-18,6,-68,-67,-143,-117,-6,24,-158,-13,25,"); + add("67,-29,-95,140,17,-7,205,63,88,-60,-34,-63,"); + add("-179,-70,-111,42,-48,-129,145,-3,-55,141,6,-29,"); + add("156,23,8,29,73,166,142,5,-28,107,-28,-95,"); + add("87,-40,-119,70,-21,-65,127,-24,-87,96,-37,-107,"); + add("105,-32,-96,-20,-34,-73,-192,-36,-37,-147,-15,0,"); + add("62,-27,-73,-50,-46,-90,-64,-47,-89,-113,-45,-70,"); + add("-151,-17,3,-124,0,32,-127,18,75,-194,-8,39,"); + add("-100,-17,-8,-68,13,51,-91,47,133,-117,28,102,"); + add("-108,-23,-15,39,-62,-152,-86,-54,-89,-79,-64,-112,"); + add("-34,-63,-124,72,-46,-124,159,-3,-57,77,-31,-90,"); + add("67,-50,-124,141,-12,-69,124,38,43,80,-39,-102,"); + add("26,-74,-158,-43,-63,-113,109,-12,-55,55,-60,-133,"); + add("8,-75,-147,46,-53,-112,-48,-53,-89,-123,-74,-110,"); + add("-57,27,66,-61,60,130,-4,-8,-14,37,-64,-132,"); + add("-77,-54,-81,-137,-36,-30,-162,9,65,-61,-42,-61,"); + add("114,-19,-69,160,46,41,86,-61,-135,-67,-54,-82,"); + add("-129,-49,-55,-129,-67,-84,-119,-42,-42,-138,10,60,"); + add("-116,33,95,-4,65,119,-34,91,179,6,-43,-82,"); + add("-48,-58,-91,-90,-77,-112,-97,-71,-96,-11,-72,-125,"); + add("-53,-59,-87,-43,-35,-47,-17,-85,-143,-102,-12,14,"); + add("-72,49,109,-131,44,123,-147,-31,-2,-112,-4,34,"); + add("-197,-92,-87,4,87,151,-95,49,126,19,-17,-38,"); + add("-77,-73,-99,-120,5,56,-104,35,105,-63,53,124,"); + add("-10,-6,-7,-5,-72,-129,51,-64,-135,-57,-80,-116,"); + add("13,-75,-135,-69,-96,-137,-6,-24,-38,106,-35,-103,"); + add("67,-57,-122,33,-94,-169,82,-34,-87,89,-37,-93,"); + add("96,-49,-115,63,-62,-121,-41,-96,-137,86,-23,-66,"); + add("130,44,24,125,-16,-67,99,-44,-102,83,-75,-141,"); + add("42,-58,-101,91,-40,-88,36,-71,-117,-44,19,42,"); + add("-137,27,82,-127,-2,37,-57,52,97,-37,84,141,"); + add("-93,-22,-3,-141,5,56,-90,27,74,-97,52,116,"); + add("-101,-20,6,-32,19,41,-73,40,90,-127,49,126,"); + add("-43,45,90,26,63,92,-86,40,98,-96,48,119,"); + add("-95,41,107,-79,44,109,-10,69,120,-50,62,128,"); + add("-69,42,103,-74,48,118,-71,56,132,-91,31,97,"); + add("-19,54,106,-31,67,136,-69,61,148,75,55,64,"); + add("165,34,-18,13,77,137,-48,65,147,-67,31,93,"); + add("-58,46,119,90,73,96,-41,10,41,-47,57,138,"); + add("-36,64,148,-17,59,129,-75,42,126,-82,38,126,"); + add("-160,31,156,12,-41,-93,-177,-73,-50,89,-3,-57,"); + add("138,10,-58,88,-34,-121,46,-49,-124,-61,-78,-125,"); + add("1,-67,-133,-8,-72,-138,-147,-34,14,-19,-46,-80,"); + add("77,-45,-127,-100,-39,-21,-108,17,91,-81,72,186,"); + add("-63,18,70,-43,51,126,-61,51,138,-149,-7,76,"); + add("-28,56,131,21,67,125,69,16,-9,34,13,6,"); + add("47,46,67,24,56,103,-37,49,128,-27,-27,-40,"); + add("-92,-20,15,-102,4,73,-89,33,130,-12,-27,-52,"); + add("-111,-57,-49,-142,-41,8,-133,-53,-22,-87,46,159,"); + add("-48,-46,-65,-135,-53,-18,-131,-41,5,-130,1,98,"); + add("-109,11,107,-130,-9,78,-177,-14,109,-103,-45,-18,"); + add("-140,-29,51,-106,6,100,-39,52,151,-118,-16,62,"); + add("9,-26,-65,11,-46,-113,-103,-54,-34,-114,-32,27,"); + add("-154,-41,44,-142,-49,18,-163,-73,-16,-109,-48,-5,"); + add("-176,-51,49,-66,10,85,-13,38,99,130,56,2,"); + add("129,43,-24,29,28,35,-139,-21,84,-80,-15,43,"); + add("-154,-101,-82,-135,-44,34,-15,25,71,115,79,68,"); + add("160,107,91,75,63,75,-35,-16,-4,-117,-76,-63,"); + add("-115,-66,-40,-141,-81,-45,-143,-15,110,-116,-71,-46,"); + add("-136,-59,6,-127,-79,-49,-82,-67,-64,-65,-50,-45,"); + add("-143,-56,26,-148,-70,1,-106,-61,-19,-197,-86,23,"); + add("-38,-63,-98,-99,-108,-127,-11,37,93,-37,63,181,"); + add("-104,-51,5,-113,-78,-43,-131,-99,-69,-39,-48,-61,"); + add("-90,-69,-46,-52,22,110,36,78,129,79,77,80,"); + add("94,82,74,23,21,21,-131,-106,-85,-88,-89,-96,"); + add("-22,4,35,76,92,117,-38,-8,26,-83,-108,-141,"); + add("-18,-45,-80,-56,-75,-99,-85,-68,-47,60,12,-44,"); + add("-75,-60,-42,-128,-21,106,-14,-35,-56,-7,-46,-91,"); + add("-126,-71,-1,-154,-77,21,2,45,95,18,77,144,"); + add("-56,-15,36,-91,-90,-80,-163,-46,103,49,9,-42,"); + add("118,28,-87,-8,-31,-56,-136,-78,3,-154,-87,7,"); + add(""); + //add("/*2*/"); + add("855,1,10146,-28113,2593,"); + add("-64,-14,99,-80,-18,106,-94,-21,118,-117,-32,89,"); + add("-142,-49,-9,-125,-42,5,-128,-35,72,-151,-47,23,"); + add("-146,-50,-18,-133,-46,-35,-151,-45,14,-129,-32,74,"); + add("-134,-34,54,-100,-18,108,15,23,153,86,38,101,"); + add("166,53,22,114,38,26,140,39,-36,135,37,-51,"); + add("143,47,6,145,55,58,-124,-32,67,28,23,110,"); + add("85,41,95,148,50,1,46,0,-116,126,38,-40,"); + add("98,45,85,98,27,-54,87,31,0,117,48,45,"); + add("135,50,10,123,45,-4,105,53,98,140,63,69,"); + add("-39,1,110,-64,-4,137,-33,10,148,-42,7,144,"); + add("-39,9,148,-38,12,148,-37,11,146,-28,16,148,"); + add("-87,-10,120,-70,-3,117,-42,15,156,-32,15,133,"); + add("-44,13,141,-80,-2,130,-5,24,117,-7,29,148,"); + add("-32,21,143,-35,21,147,87,40,36,96,40,22,"); + add("-19,30,156,11,38,140,31,47,141,-43,21,144,"); + add("-83,3,129,-86,1,122,-113,-13,102,-111,-11,104,"); + add("-142,-38,40,-137,-36,41,-138,-35,40,-116,-59,-74,"); + add("-56,-54,-130,-62,-27,-26,-49,23,143,-52,19,131,"); + add("-144,-27,65,-26,-48,-141,-89,-34,-22,-138,-28,50,"); + add("-92,-1,101,74,51,99,-49,22,131,-127,-50,-42,"); + add("-141,-33,32,-124,-13,80,-149,-37,17,-130,-15,74,"); + add("-132,-14,77,-147,-42,-9,-144,-26,44,-143,-29,27,"); + add("-147,-33,15,-138,-38,-14,-110,-61,-115,-105,-49,-84,"); + add("-193,-49,-13,38,41,110,-101,-31,-25,-72,23,133,"); + add("127,47,62,-51,10,74,-161,-49,-43,-33,28,117,"); + add("43,40,100,-56,30,138,-19,42,146,36,53,142,"); + add("-86,16,108,-145,-37,-16,-97,-52,-97,-128,-51,-76,"); + add("-146,-38,-26,-149,-29,-1,-148,-30,-2,-141,-7,60,"); + add("-141,-10,48,-149,-24,8,-150,-20,19,-141,-7,49,"); + add("-150,-18,18,-147,-14,28,-149,-16,19,-149,-15,22,"); + add("-142,-3,50,-112,19,105,-133,6,71,-116,18,96,"); + add("-112,20,101,-125,15,86,-121,16,87,-159,-19,-3,"); + add("-150,-19,-10,-151,-12,6,-135,9,64,-132,4,44,"); + add("-156,-14,-3,-118,-35,-73,-114,-37,-85,-153,4,42,"); + add("-88,34,115,-81,37,121,-112,32,108,-35,-26,-68,"); + add("-76,-33,-82,-115,38,126,-117,-31,-73,-110,-34,-83,"); + add("-152,-6,-1,-152,-7,-6,-147,-13,-25,-145,-16,-37,"); + add("-144,-16,-40,-132,-26,-70,-139,-21,-59,-109,-33,-97,"); + add("-99,-36,-108,-90,36,108,-127,-5,-17,-96,20,55,"); + add("-117,5,9,-147,-8,-32,-150,-1,-14,-149,-14,-56,"); + add("-83,28,76,58,42,129,-20,42,118,-126,-13,-49,"); + add("-86,-37,-120,-54,-44,-136,15,-53,-156,-135,-21,-85,"); + add("-82,49,137,-70,46,126,-119,36,88,-81,-19,-70,"); + add("-22,-46,-143,-69,-43,-144,-140,38,89,-43,-33,-110,"); + add("114,-37,-91,71,-44,-122,-30,-42,-140,-71,-35,-129,"); + add("-97,-29,-116,-138,-9,-65,23,-25,-77,-7,-32,-110,"); + add("-136,-7,-58,-104,-24,-113,-14,-51,-183,21,-28,-96,"); + add("58,-21,-58,132,9,68,127,15,86,27,-28,-92,"); + add("-97,-23,-110,-67,-30,-130,-79,-27,-125,-47,-32,-134,"); + add("-5,-37,-148,-31,-33,-141,48,-40,-150,-136,-10,-84,"); + add("-104,-10,-83,-111,-10,-85,-125,-4,-66,-120,-8,-87,"); + add("-117,-10,-97,-90,-20,-132,-69,-16,-107,-93,-15,-121,"); + add("-67,-21,-132,-38,-25,-144,-55,-21,-141,-31,-25,-148,"); + add("-77,-16,-131,-27,-24,-147,3,-27,-149,4,-26,-149,"); + add("22,-28,-148,55,-29,-137,103,-29,-106,150,-18,-6,"); + add("145,-20,-31,134,-7,46,80,13,129,78,14,128,"); + add("132,10,135,16,-14,-76,-32,-21,-147,4,-26,-155,"); + add("162,-21,-42,93,-24,-108,-32,-18,-138,-96,-10,-124,"); + add("-65,-13,-134,-90,-9,-122,-69,-11,-134,-79,-9,-128,"); + add("-44,-14,-146,-57,-11,-139,-22,-15,-147,59,-21,-143,"); + add("-61,-7,-129,-124,4,-86,-90,-3,-120,-57,-6,-139,"); + add("-36,-9,-146,-21,-10,-149,30,-15,-148,71,-17,-133,"); + add("75,-19,-163,-105,10,-3,-134,19,54,-145,14,-43,"); + add("-144,14,-52,-142,14,-50,-140,15,-54,-141,16,-55,"); + add("-136,15,-68,-124,13,-86,-100,9,-114,-115,13,-97,"); + add("-126,16,-86,-144,21,-33,-145,22,-49,-126,14,-211,"); + add("10,2,103,-62,16,132,-128,25,66,-141,24,-30,"); + add("-57,5,-132,-39,2,-151,107,-22,-83,-36,5,-47,"); + add("-142,25,-56,-109,18,-94,-147,29,-31,-156,30,-34,"); + add("-31,9,92,136,-26,79,112,-19,99,54,-6,141,"); + add("-19,9,150,-108,25,85,-133,25,-57,-88,13,-124,"); + add("-107,18,-129,-114,24,14,24,-1,120,84,-12,129,"); + add("60,-7,138,77,-9,129,83,-11,124,-50,19,144,"); + add("-119,31,98,-114,19,-79,-47,1,-148,-123,22,-77,"); + add("-136,28,-54,-143,30,-42,-142,31,-37,-139,32,-11,"); + add("-116,34,108,60,-8,127,139,-31,32,129,-26,64,"); + add("70,-8,134,61,-5,139,61,-3,139,54,-1,147,"); + add("-91,30,115,-36,19,136,-3,14,148,5,14,152,"); + add("-21,19,148,-30,23,145,-30,23,149,-106,31,50,"); + add("-96,33,86,-112,41,116,95,-17,48,-6,13,93,"); + add("-117,39,85,-90,36,105,-94,32,62,-40,17,51,"); + add("-61,31,110,-130,30,-29,-131,37,18,66,-4,97,"); + add("25,9,103,-109,39,70,-156,39,-21,-120,26,-45,"); + add("-54,31,103,-124,41,45,-115,11,-148,-38,20,61,"); + add("29,15,151,-109,31,-3,-62,25,43,-64,36,103,"); + add("-146,51,42,-111,23,-65,-72,33,67,-134,39,-15,"); + add("-96,44,80,-156,50,-3,-129,54,68,-134,41,-21,"); + add("-134,39,-38,-150,60,54,-117,42,3,-27,36,152,"); + add("-53,11,-44,-6,-26,-159,113,-44,-30,-20,-4,-58,"); + add("-82,9,-121,-125,48,21,-84,50,117,-82,22,-47,"); + add("-147,63,50,-120,52,44,-39,38,132,-100,56,97,"); + add("-23,41,177,-118,61,82,-71,52,123,202,-60,96,"); + add("-114,60,80,93,-7,139,20,19,131,-21,39,142,"); + add("-73,14,-67,-18,-25,-152,-142,44,-57,-88,65,143,"); + add("-97,45,31,-51,46,113,-18,42,157,-42,48,133,"); + add("-38,47,138,18,29,150,86,-9,108,-40,35,75,"); + add("-97,66,102,-47,52,129,-2,40,151,56,18,152,"); + add("-95,59,72,-85,8,-104,-7,-35,-144,-28,-30,-156,"); + add("25,-48,-147,-15,-25,-128,-24,-22,-132,-5,-34,-151,"); + add("73,-59,-120,23,-40,-133,3,-39,-169,21,-33,-111,"); + add("38,-44,-131,-54,-9,-152,126,-67,-76,70,-43,-69,"); + add("53,-45,-120,47,-38,-98,1,-24,-130,48,-43,-128,"); + add("75,-51,-119,85,-50,-97,50,-39,-115,16,-28,-131,"); + add("145,-69,-78,92,-14,130,81,-38,-46,92,-49,-90,"); + add("135,-55,-30,105,-50,-76,120,-56,-82,123,-40,17,"); + add("101,-51,-102,-31,-10,-145,-5,-15,-118,144,-53,-23,"); + add("127,-51,-60,141,-46,15,142,-48,-7,141,-48,-20,"); + add("139,-48,-27,129,-49,-68,142,-47,-20,144,-43,2,"); + add("134,-47,-55,118,-43,-65,95,-41,-118,48,-30,-133,"); + add("40,-27,-148,9,-19,-150,-25,-8,-148,2,-15,-146,"); + add("-5,-12,-156,31,-21,-145,-2,-12,-152,-15,-7,-143,"); + add("9,-13,-157,-86,24,-2,-77,18,-69,16,-15,-167,"); + add("-97,25,-49,-131,35,-68,-99,24,-107,55,-20,-57,"); + add("93,-30,-67,129,-40,-49,84,-29,-95,-35,5,-125,"); + add("-80,19,-128,-38,7,-140,-68,16,-139,-184,54,-42,"); + add("30,-11,-109,-23,5,-131,-40,10,-134,-186,56,-83,"); + add("112,-34,-78,70,-22,-118,55,-16,-134,-40,13,-157,"); + add("4,1,-147,49,-12,-139,-6,5,-150,40,-7,-148,"); + add("4,4,-147,-49,20,-153,-49,20,-120,42,-5,-148,"); + add("39,-4,-144,28,1,-165,-30,17,-116,-70,28,-110,"); + add("110,-29,-54,130,-44,72,26,-16,138,-25,-2,147,"); + add("-13,-5,153,70,-28,142,78,-20,-44,36,-3,-147,"); + add("-24,16,-149,53,-7,-129,110,-37,77,57,-23,124,"); + add("143,-44,74,27,-14,135,126,-36,32,75,-23,68,"); + add("98,-29,76,82,-17,-108,28,0,-145,-68,25,-127,"); + add("24,4,-161,49,-4,-144,86,-13,-128,107,-19,-105,"); + add("27,5,-144,-12,15,-154,84,-6,-166,-127,38,-63,"); + add("-148,36,15,-143,44,-72,-19,20,-144,109,-26,-31,"); + add("136,-40,54,109,-23,-50,-14,17,-123,-89,31,-83,"); + add("-123,39,-67,-87,35,-107,77,-9,-97,155,-46,54,"); + add("104,-16,-88,94,-9,-114,8,18,-157,92,-13,-73,"); + add("110,-17,-77,101,-8,-114,95,-6,-120,67,5,-135,"); + add("95,-5,-114,65,6,-140,81,3,-128,85,1,-126,"); + add("109,-7,-101,130,-14,-76,103,-3,-108,79,6,-131,"); + add("87,5,-123,129,-10,-87,18,26,-156,96,3,-108,"); + add("151,-19,-53,144,-31,23,139,-14,-57,133,-6,-84,"); + add("146,-32,31,140,-18,-24,118,0,-95,127,-12,-39,"); + add("156,-16,-38,134,-22,14,143,-10,-54,81,-45,165,"); + add("104,3,-81,78,19,-143,165,-22,5,-30,-18,107,"); + add("-130,3,66,-57,-19,133,6,-28,137,79,-26,81,"); + add("97,-32,107,88,0,-61,160,-18,-5,141,-19,14,"); + add("98,-1,-51,42,24,-149,104,4,-76,77,5,-66,"); + add("52,22,-135,113,9,-95,125,-16,19,118,4,-70,"); + add("89,-27,97,77,-31,117,41,-30,136,-72,-25,156,"); + add("-144,6,35,-121,-2,69,69,-30,124,161,-14,3,"); + add("37,-21,100,-45,-22,142,-92,-12,117,-82,-13,121,"); + add("-60,-18,139,-79,-13,131,-69,-14,132,-35,-19,147,"); + add("27,-24,148,60,-25,134,135,-21,64,138,-19,55,"); + add("133,-23,87,126,-7,-24,71,13,-132,96,8,-112,"); + add("117,6,-96,151,-12,12,-16,-15,116,-64,-16,145,"); + add("86,-21,123,23,-21,148,-22,-17,154,7,-18,148,"); + add("106,-18,108,92,-18,118,66,-18,136,75,-16,129,"); + add("56,-16,137,9,-14,151,-32,-11,148,-72,-7,133,"); + add("-86,-6,126,-84,-4,126,-14,-8,133,123,-8,18,"); + add("89,4,-130,125,1,-97,157,-11,62,114,1,-81,"); + add("157,-2,-36,120,3,-96,85,8,-121,92,8,-118,"); + add("75,8,-118,108,9,-118,128,6,-80,153,1,-24,"); + add("123,5,-53,115,10,-101,132,8,-74,135,9,-67,"); + add("113,8,-67,85,13,-99,153,6,-28,38,8,-63,"); + add("45,16,-122,89,13,-90,109,16,-106,112,15,-84,"); + add("81,16,-100,104,20,-116,151,21,-102,20,22,-149,"); + add("111,19,-87,53,22,-133,53,22,-123,132,8,1,"); + add("71,16,-73,-64,23,-163,42,23,-122,-1,27,-158,"); + add("66,27,-132,-52,19,-120,-108,12,-98,-88,18,-123,"); + add("-106,12,-92,-181,0,-44,53,12,-52,133,30,-117,"); + add("100,13,-34,82,37,-157,82,20,-73,63,33,-132,"); + add("115,28,-95,35,21,-85,31,32,-130,61,37,-142,"); + add("27,33,-132,16,32,-130,62,36,-128,76,39,-130,"); + add("-76,23,-114,-33,36,-149,-108,11,-73,-26,28,-111,"); + add("74,41,-132,-110,13,-76,9,25,-88,-85,32,-135,"); + add("-90,31,-127,-103,-6,-2,-99,8,-46,-25,40,-142,"); + add("-56,34,-126,-32,47,-159,9,45,-144,40,39,-116,"); + add("-74,30,-107,-14,40,-127,106,39,-102,153,10,-1,"); + add("126,33,-75,143,33,-68,84,42,-106,163,15,-9,"); + add("136,8,12,146,15,-9,154,12,8,123,-13,73,"); + add("140,35,-61,147,12,11,142,13,8,142,26,-26,"); + add("106,40,-77,132,38,-62,143,29,-28,135,34,-44,"); + add("194,36,-27,97,-12,78,124,-4,64,150,16,23,"); + add("159,37,-31,46,48,-115,156,45,-53,-15,-36,94,"); + add("-26,-53,138,147,11,43,118,0,64,138,-8,98,"); + add("120,71,-143,138,11,45,145,21,23,146,6,68,"); + add("113,50,-75,115,32,-22,87,-32,148,71,25,-26,"); + add("148,46,-37,171,21,52,60,55,-120,84,45,-71,"); + add("112,-11,108,134,20,40,147,29,20,107,-15,126,"); + add("147,32,16,131,8,82,130,11,73,131,16,60,"); + add("141,21,56,125,8,85,139,21,58,133,18,65,"); + add("111,2,99,144,26,57,153,29,56,87,53,-79,"); + add("72,62,-121,120,61,-70,123,47,-21,79,-2,88,"); + add("-86,-65,114,-106,-63,88,-125,-59,59,-42,-50,118,"); + add("131,12,99,76,-14,129,81,-11,124,87,-7,121,"); + add("105,3,111,32,-30,145,-31,-50,141,-74,-56,114,"); + add("-40,-47,127,112,11,101,121,18,85,137,36,41,"); + add("131,62,-66,141,35,58,25,-32,158,-43,-49,136,"); + add("95,18,63,95,12,88,17,-29,150,74,7,81,"); + add("119,18,111,27,-25,152,17,-25,144,64,-7,141,"); + add("44,-14,140,73,-1,140,52,-8,136,110,21,107,"); + add("140,49,19,136,45,44,78,7,125,25,-20,159,"); + add("129,47,22,139,49,40,139,48,50,59,4,115,"); + add("7,-23,148,32,-11,148,-6,-27,148,-101,-55,90,"); + add("-76,-48,104,-17,-28,144,16,-18,175,104,29,94,"); + add("124,40,85,58,5,144,73,15,129,78,17,127,"); + add("88,23,124,82,22,122,59,11,135,67,15,133,"); + add("30,-1,147,-6,-17,148,-18,-20,147,-90,-49,114,"); + add("-65,-38,129,-105,-54,130,66,23,86,82,28,102,"); + add("-29,-22,162,43,11,136,-8,-12,155,9,-3,157,"); + add("54,18,141,-20,-14,150,30,9,148,-2,-4,155,"); + add("38,14,144,0,-2,154,-38,-17,145,-30,-13,146,"); + add("-13,-5,165,118,51,49,159,71,70,-58,-25,54,"); + add("-147,-64,16,-117,-49,76,-86,-35,120,-43,-14,142,"); + add("-63,-23,129,-10,1,153,-12,1,149,-21,-2,150,"); + add("-87,-30,128,-7,4,134,-138,-53,64,-79,-30,35,"); + add("-98,-32,115,-59,-15,138,-81,-23,127,-102,-32,104,"); + add("-125,-43,76,-134,-48,36,-137,-54,-19,-115,-37,69,"); + add("-97,-26,116,-95,-26,95,"); + add(""); + //add("/*3*/"); + add("533,1,14413,-10720,-24028,"); + add("106,64,35,41,145,-39,45,121,-25,118,62,45,"); + add("108,59,42,130,65,53,121,63,49,125,156,13,"); + add("105,16,61,116,68,46,134,43,70,123,76,50,"); + add("78,121,2,37,136,-31,102,110,25,28,136,-35,"); + add("3,139,-52,41,137,-25,71,135,-3,71,132,-1,"); + add("106,109,33,94,119,21,23,137,-33,49,144,-17,"); + add("50,142,-13,38,151,-25,25,132,-27,44,100,-1,"); + add("117,83,55,114,84,53,77,128,14,100,11,68,"); + add("77,-59,74,102,-33,85,81,128,19,59,137,0,"); + add("45,141,-9,21,141,-27,40,147,-13,49,131,-2,"); + add("55,141,2,99,120,41,12,152,-33,97,77,53,"); + add("59,144,7,26,145,-17,59,151,8,83,100,39,"); + add("77,-10,61,69,-98,78,-3,-158,37,16,-145,50,"); + add("6,-150,44,28,-68,40,47,-117,69,-62,-183,3,"); + add("25,-97,47,27,-119,56,-34,-144,17,30,-138,66,"); + add("-8,-148,39,-63,-137,-5,-3,-148,45,-37,-145,19,"); + add("-51,-146,9,10,-137,56,16,-141,62,-6,-146,48,"); + add("-18,-141,38,10,-146,62,22,-132,68,43,-119,81,"); + add("8,-136,60,28,-124,73,85,-76,100,103,-39,102,"); + add("114,21,87,118,63,73,114,73,68,103,83,54,"); + add("74,129,12,119,59,79,116,34,89,116,41,87,"); + add("107,90,60,96,110,43,112,66,76,109,71,73,"); + add("114,56,83,102,33,84,106,93,64,98,100,55,"); + add("101,89,63,107,85,72,105,76,74,45,130,-4,"); + add("-39,126,-84,-51,115,-92,-23,126,-65,10,141,-39,"); + add("49,132,2,-28,103,-60,-91,36,-100,-74,6,-72,"); + add("-3,145,-49,-37,155,-83,-53,99,-80,74,82,45,"); + add("87,113,49,72,-11,71,12,-108,44,35,-107,66,"); + add("67,112,31,62,10,57,48,21,40,-31,120,-66,"); + add("19,34,9,75,-92,100,92,-81,115,82,-8,84,"); + add("109,97,80,90,-10,94,116,25,110,106,78,87,"); + add("85,40,76,101,-2,107,98,47,89,108,136,75,"); + add("93,-18,105,101,107,79,72,-5,80,45,4,49,"); + add("66,-13,77,-92,-105,-70,-116,-3,-126,-80,-112,-54,"); + add("-41,-175,10,55,-93,89,75,5,80,98,-28,118,"); + add("99,-9,114,116,57,113,75,-20,92,46,-138,98,"); + add("60,6,68,39,-81,73,60,-72,95,43,-109,90,"); + add("-49,-156,-2,56,-99,103,50,-71,86,-4,-133,46,"); + add("44,-94,90,23,-141,85,-100,-116,-74,-87,-100,-64,"); + add("17,-35,35,10,-127,65,48,36,43,92,-10,115,"); + add("51,51,42,103,56,103,109,16,130,28,-100,78,"); + add("18,-163,94,41,49,31,15,153,-49,18,117,-26,"); + add("99,103,83,78,114,53,90,103,74,89,65,90,"); + add("76,53,79,62,-14,88,19,-118,75,56,19,66,"); + add("49,-39,84,65,59,63,17,-34,39,-23,-173,43,"); + add("60,-55,107,55,99,32,14,-38,36,32,-76,79,"); + add("49,-70,100,-47,-125,-9,-20,-79,9,80,18,105,"); + add("-21,-130,32,56,-2,81,36,-42,73,46,-97,113,"); + add("-68,-135,-32,-26,-92,9,12,-100,68,-109,-64,-125,"); + add("17,-12,31,88,5,126,85,45,101,98,10,141,"); + add("33,-89,96,-10,-72,24,-108,-124,-95,-9,-120,52,"); + add("7,-166,103,59,52,60,73,129,39,75,139,38,"); + add("64,131,26,40,8,56,10,-123,85,35,-95,108,"); + add("38,-102,118,-6,-132,67,-46,-141,11,-57,-137,-9,"); + add("-32,-109,18,35,-92,112,37,-91,117,7,-117,86,"); + add("-8,-141,79,7,-120,92,25,-100,109,43,-74,123,"); + add("53,-57,130,57,-51,132,67,-25,134,61,-36,133,"); + add("69,-2,122,76,10,129,24,-97,116,41,-63,123,"); + add("68,-18,141,49,-44,126,26,-88,117,52,-38,132,"); + add("78,18,135,79,17,141,39,-36,107,37,-65,131,"); + add("30,-62,114,22,-89,124,18,-91,117,14,-95,118,"); + add("40,-60,139,40,-50,134,15,-97,124,-18,-110,68,"); + add("-10,-135,113,59,79,51,69,184,-27,23,-36,85,"); + add("-27,-131,71,-24,-129,79,-54,-125,5,-65,-137,-2,"); + add("-50,-138,32,-25,-122,75,-19,-121,89,-40,-134,59,"); + add("-56,-139,28,-80,-120,-45,-70,-128,-14,-80,-119,-43,"); + add("-82,-123,-40,-83,-118,-49,-75,-119,-27,-53,-167,84,"); + add("100,105,97,60,81,39,98,141,53,-23,-83,47,"); + add("-79,-124,-31,-87,-103,-72,-57,-134,37,63,50,81,"); + add("103,130,75,-27,-77,34,-85,-107,-64,-87,-106,-64,"); + add("-85,-114,-49,-85,-119,-40,-82,-127,-22,-63,-133,29,"); + add("-81,-128,-14,-89,-107,-59,-88,-115,-41,-79,-124,-8,"); + add("-93,-112,-54,-84,-127,-12,-67,-131,32,-71,-133,28,"); + add("-77,-127,10,-81,-128,3,-90,-122,-21,-92,-115,-32,"); + add("-91,-119,-25,-94,-115,-31,-85,-125,-1,-77,-137,40,"); + add("-92,-172,59,-23,-67,51,-85,-127,14,-63,-112,36,"); + add("-33,-122,120,50,-14,128,8,-34,69,-75,-127,40,"); + add("-100,-130,-6,-84,-36,-120,-97,-70,-91,-105,-98,-61,"); + add("-98,-58,-109,-69,-40,-76,-88,-26,-136,-69,0,-135,"); + add("-85,-22,-130,-62,9,-131,-36,52,-145,4,92,-127,"); + add("-10,81,-134,-54,23,-132,-42,37,-127,30,113,-104,"); + add("-19,73,-132,-69,10,-132,-67,12,-130,-64,23,-138,"); + add("-69,12,-130,-82,-5,-128,-97,-18,-133,-83,-38,-84,"); + add("-62,26,-130,-73,16,-134,-92,-30,-104,-67,39,-149,"); + add("-2,101,-125,22,108,-95,31,118,-93,-30,71,-126,"); + add("-69,31,-135,-37,68,-130,-46,59,-131,-44,61,-128,"); + add("-40,68,-130,-79,17,-126,-101,-20,-116,-90,2,-122,"); + add("-82,15,-124,-66,41,-128,-72,36,-130,-66,44,-129,"); + add("-59,54,-129,-54,61,-126,-77,32,-128,-88,16,-122,"); + add("-91,12,-122,-94,8,-120,-101,-6,-112,-94,8,-117,"); + add("-78,34,-120,-119,-51,-88,-117,-66,-71,-117,-80,-56,"); + add("-104,-26,-91,-87,18,-111,-122,-68,-68,-121,-27,-104,"); + add("-86,2,-92,-126,-117,-26,-112,-44,-74,-38,-120,71,"); + add("-98,-130,20,-129,-42,-92,-107,-99,-16,-85,-115,23,"); + add("-124,-98,-31,-87,-113,21,-80,-156,70,-62,-71,9,"); + add("-173,-72,-100,30,103,-70,-25,85,-105,-8,117,-118,"); + add("-31,90,-114,-65,81,-136,-70,41,-102,-11,108,-108,"); + add("11,117,-95,-39,91,-115,36,126,-78,-31,-5,-23,"); + add("-84,-123,30,-33,-105,63,-57,-130,65,4,-102,94,"); + add("11,-104,105,-21,-114,85,-51,-122,66,-60,-146,83,"); + add("84,-30,106,5,-114,113,-106,3,-101,-105,24,-119,"); + add("-2,109,-105,33,121,-83,13,141,-119,-96,-66,-25,"); + add("-122,-121,3,-61,-111,49,-43,-125,79,3,-137,133,"); + add("-119,-18,-87,-85,45,-119,-83,53,-122,-35,-85,51,"); + add("-7,-50,41,-116,-89,-16,-71,-54,-8,227,159,44,"); + add("-34,-26,-6,-122,-85,-24,-113,-99,-1,-100,-112,23,"); + add("-87,-116,39,-22,-117,95,-75,-117,53,-127,-103,-3,"); + add("-114,-89,-7,-114,-97,4,-128,-46,-59,-127,-32,-70,"); + add("-138,-91,-19,-80,19,-83,-136,-18,-88,-123,-15,-80,"); + add("-134,-63,-39,-134,-55,-47,-135,-49,-51,-89,37,-102,"); + add("-50,81,-118,-69,69,-117,-36,76,-99,-50,97,-129,"); + add("-109,-60,-18,27,-110,124,-68,-50,1,-74,71,-120,"); + add("-83,-61,1,-118,-90,6,-118,-72,-10,-166,-79,-35,"); + add("33,81,-56,-45,52,-80,-106,31,-99,-54,89,-120,"); + add("-53,84,-113,-65,76,-112,-91,53,-107,-114,29,-96,"); + add("-127,5,-82,-132,6,-85,-118,12,-81,-75,78,-114,"); + add("-42,85,-100,49,106,-64,45,112,-72,8,121,-99,"); + add("16,118,-92,34,114,-76,-2,118,-100,-22,114,-106,"); + add("-32,107,-105,-28,83,-82,18,123,-89,15,102,-72,"); + add("-23,126,-112,-27,98,-90,16,148,-104,-36,111,-104,"); + add("-29,92,-85,-33,108,-97,-98,84,-113,-57,79,-88,"); + add("-55,94,-96,26,127,-77,-46,113,-103,-21,121,-94,"); + add("3,124,-84,5,131,-85,52,127,-59,3,127,-83,"); + add("-8,125,-85,-2,126,-83,9,129,-78,18,131,-73,"); + add("-17,125,-87,-17,124,-85,46,131,-57,49,127,-52,"); + add("73,127,-39,73,123,-36,98,120,-20,37,121,-51,"); + add("26,144,-69,42,129,-52,37,130,-53,35,153,-67,"); + add("94,112,-12,39,138,-54,130,95,16,83,115,-18,"); + add("94,105,-6,121,87,19,92,135,-20,126,100,16,"); + add("107,31,42,122,95,19,132,110,18,78,104,-8,"); + add("52,139,-39,13,134,-58,91,140,-16,131,17,66,"); + add("131,106,25,24,-114,68,87,14,43,94,98,9,"); + add("73,136,-21,48,153,-43,78,105,-2,70,133,-19,"); + add(""); + //add("/*4*/"); + add("521,1,-7056,27453,9826,"); + add("48,26,-40,102,-3,82,129,39,-21,109,39,-34,"); + add("149,63,-76,128,57,-78,109,51,-74,115,37,-34,"); + add("155,37,-8,74,53,-109,30,53,-140,34,5,8,"); + add("16,-47,150,31,-29,102,147,9,62,99,17,11,"); + add("87,16,4,95,1,51,162,24,19,128,16,22,"); + add("150,20,22,150,21,14,147,40,-44,112,37,-54,"); + add("138,36,-40,141,35,-40,136,40,-59,124,28,-26,"); + add("101,31,-51,-186,8,-106,-101,20,-105,-103,19,-105,"); + add("-143,-14,-27,-148,-10,-40,-143,-34,32,-74,15,-85,"); + add("215,32,9,77,25,-38,-169,-3,-78,-107,8,-83,"); + add("-49,5,-41,160,34,-24,89,49,-114,72,13,-3,"); + add("104,-15,104,144,20,5,117,36,-60,-34,35,-133,"); + add("-138,6,-87,-100,9,-84,-26,2,-22,106,27,-34,"); + add("-46,31,-131,9,15,-50,67,-33,153,51,-38,155,"); + add("115,-8,83,73,-31,138,68,-22,102,-7,-50,156,"); + add("-23,-48,143,63,-35,135,127,12,17,55,24,-51,"); + add("83,-28,119,58,46,-118,28,48,-137,40,54,-155,"); + add("-28,28,-103,19,24,-71,-62,10,-58,48,38,-104,"); + add("-81,31,-138,-60,27,-121,-117,-1,-50,-49,-1,-21,"); + add("156,41,-69,-66,30,-137,-147,-11,-32,-25,17,-76,"); + add("183,8,61,84,29,-64,-116,16,-113,-119,-4,-45,"); + add("77,37,-102,147,-12,121,151,36,-63,12,32,-114,"); + add("100,-13,92,106,9,16,105,-20,118,-3,-3,10,"); + add("-130,-1,-53,79,-42,189,132,10,16,121,14,-3,"); + add("106,20,-32,35,40,-131,-138,11,-95,-50,-21,57,"); + add("10,46,-169,69,37,-110,76,18,-43,138,-12,102,"); + add("87,-21,110,101,33,-87,-53,19,-95,-114,12,-87,"); + add("12,41,-158,-85,7,-59,152,22,-32,-85,29,-153,"); + add("15,11,-41,84,-23,129,122,-16,112,95,37,-117,"); + add("21,34,-136,-87,20,-116,-75,5,-50,179,24,-36,"); + add("-114,10,-86,-64,32,-167,41,27,-107,139,16,-18,"); + add("125,9,5,132,-15,116,94,23,-70,-19,32,-157,"); + add("-106,8,-74,-49,18,-107,81,19,-60,78,3,13,"); + add("-125,21,-150,-109,-17,43,95,44,-183,83,32,-133,"); + add("61,27,-122,133,24,-80,108,28,-115,38,30,-154,"); + add("110,20,-81,127,17,-55,-21,16,-102,-151,-11,11,"); + add("-62,-7,23,131,29,-132,152,-1,58,123,15,-53,"); + add("-21,16,-106,-143,-1,-43,-83,3,-50,228,12,1,"); + add("155,6,10,102,20,-101,124,18,-90,107,21,-118,"); + add("-44,18,-138,-120,9,-92,-151,-8,10,-119,-20,108,"); + add("-142,0,-54,-144,-19,79,-121,-20,92,-119,-20,86,"); + add("-67,-9,34,143,31,-154,100,21,-98,96,22,-124,"); + add("58,22,-139,-64,9,-94,-117,-19,93,-141,-15,49,"); + add("-96,-5,-11,191,29,-131,-90,8,-108,-158,-5,-43,"); + add("-133,-6,-26,-88,-3,-36,207,24,-69,163,2,76,"); + add("131,-2,79,148,8,6,140,11,-31,71,17,-112,"); + add("-85,10,-124,-73,5,-72,0,13,-123,-135,-1,-55,"); + add("-129,-1,-65,-138,-7,-14,-103,-3,-43,161,11,-4,"); + add("140,4,45,135,0,78,110,11,-52,-95,9,-131,"); + add("-94,6,-119,-143,-1,-77,-135,-4,-55,-94,-4,-21,"); + add("-93,-10,28,-41,-13,106,-121,-11,22,-31,17,-204,"); + add("-68,2,-87,-140,-11,-12,-69,-8,23,94,-3,118,"); + add("85,-4,125,-5,-13,134,-42,-6,17,-30,11,-134,"); + add("-79,8,-159,-81,-8,3,-33,-17,156,-47,-12,77,"); + add("-162,-23,72,-64,-5,-20,28,18,-155,0,14,-147,"); + add("4,14,-151,-96,-8,-23,-86,-20,128,-92,-17,74,"); + add("-60,-11,44,-16,16,-196,-135,-16,6,192,35,-159,"); + add("-33,5,-106,-101,-6,-76,-153,-13,-66,-100,-22,129,"); + add("-62,-18,139,-13,-2,1,47,17,-149,52,17,-141,"); + add("-120,-10,-67,-128,-23,88,-156,-23,29,-96,-6,-97,"); + add("-75,-11,9,-161,-17,-91,-135,-17,-46,-158,-24,-9,"); + add("-66,-19,118,82,4,124,20,1,35,-159,-26,8,"); + add("-131,-27,69,-149,-26,5,-115,-15,-68,-79,-5,-112,"); + add("-136,-20,-71,-132,-18,-97,-92,-11,-104,-134,-22,-57,"); + add("-126,-27,35,-85,-27,146,3,-8,117,-31,-12,78,"); + add("-78,-22,78,72,6,114,84,7,125,27,-2,88,"); + add("-125,-28,30,-53,2,-158,-83,-15,-23,37,-8,187,"); + add("-6,-3,18,-45,4,-159,-37,4,-148,-69,-4,-134,"); + add("-122,-27,3,-14,-11,103,23,2,47,-56,-24,133,"); + add("-16,-10,74,-160,-31,-52,-68,-28,146,2,-15,161,"); + add("38,5,36,82,20,-10,39,-2,103,14,-6,92,"); + add("100,14,75,91,6,131,28,-10,139,4,-17,155,"); + add("-15,-22,150,-14,-21,139,-64,-30,120,-86,-26,53,"); + add("-80,-37,132,-46,-34,162,-75,-38,138,-88,-29,54,"); + add("-74,-22,30,-46,-35,152,-96,-36,80,-86,-47,153,"); + add("-106,-40,80,-72,-45,154,-114,-39,58,-87,-20,-17,"); + add("-31,-22,74,-100,-39,73,-184,-50,-1,-85,-46,120,"); + add("47,-12,127,129,32,18,96,30,-20,135,52,-87,"); + add("58,25,-52,-84,-59,192,-29,-33,130,30,-7,72,"); + add("-124,-33,1,72,1,88,-94,-29,17,21,-3,40,"); + add("-42,-19,38,4,-18,88,-59,-44,134,-73,-40,89,"); + add("-68,-28,39,-40,22,-146,2,33,-152,-53,15,-141,"); + add("-78,5,-131,-105,-33,17,-23,-37,147,48,-17,142,"); + add("-9,-35,153,54,-16,137,72,1,89,28,-16,102,"); + add("-118,-44,46,-91,-40,58,-86,-48,95,-70,-32,47,"); + add("-128,-40,7,-97,-41,45,-118,-10,-108,-108,-16,-70,"); + add("-100,-36,16,94,-8,155,118,26,45,30,-3,48,"); + add("-88,-50,90,-5,-29,108,-83,20,-181,-61,13,-130,"); + add("-50,4,-82,-53,-5,-51,-41,-34,87,-148,-38,-42,"); + add("-56,-34,64,161,41,50,129,23,72,36,-12,94,"); + add("100,1,123,7,-9,41,-86,-24,-11,37,-16,107,"); + add("-82,-3,-89,-56,15,-129,-59,16,-141,-96,-15,-64,"); + add("-170,-44,-50,-53,-35,69,117,12,110,106,9,101,"); + add("71,-8,121,15,-30,131,6,-3,21,-63,14,-130,"); + add("-40,21,-135,-110,-11,-99,-118,-16,-95,-78,-29,14,"); + add("-1,-26,101,63,-15,139,-126,-37,-22,-51,-34,62,"); + add("-122,-20,-87,-65,-49,103,145,31,74,142,41,32,"); + add("143,44,17,143,37,37,121,19,78,-6,-8,22,"); + add("-106,-25,-34,-154,-31,-77,-146,-44,-22,-143,-39,-39,"); + add("-139,-40,-33,-62,-35,48,85,-1,116,53,0,68,"); + add("-184,-35,-112,-17,-28,83,-15,-32,96,130,28,64,"); + add("136,29,71,24,-11,68,-165,-25,-119,-135,-42,-24,"); + add("-69,-39,52,-100,-73,125,28,-5,54,51,8,36,"); + add("-181,-67,0,-74,-63,122,195,74,-5,104,26,40,"); + add("119,64,-69,-31,-71,201,-58,-63,136,-23,-15,23,"); + add("1,55,-181,-66,-27,10,-35,-28,52,-152,-42,-51,"); + add("-76,-18,-34,133,15,117,47,-3,66,-180,-32,-116,"); + add("-70,-33,20,3,-16,55,-107,-47,18,47,-7,82,"); + add("12,-6,35,-83,-41,28,22,-12,65,-73,-36,24,"); + add("25,-30,122,-38,-42,84,60,16,22,-98,-49,33,"); + add("-130,-83,94,19,-34,122,-13,-35,90,-21,-28,56,"); + add("54,7,40,-92,-51,43,58,10,37,-98,-67,77,"); + add("57,-17,114,-21,-11,7,-77,-40,22,13,-34,109,"); + add("37,-10,67,-72,-48,51,-35,-37,59,92,13,67,"); + add("126,5,125,142,35,58,116,22,61,41,-17,87,"); + add("-146,-56,-6,60,-3,69,-97,-55,42,59,0,61,"); + add("-3,-18,43,63,-2,65,-120,-76,71,103,34,18,"); + add("-126,-76,63,185,44,72,79,-31,151,88,23,29,"); + add("4,50,-116,-5,45,-116,126,-9,141,57,37,-37,"); + add("21,43,-83,112,43,-3,-39,21,-88,74,12,38,"); + add("12,9,-12,33,17,-10,8,15,-29,95,37,-6,"); + add("19,27,-49,73,31,-12,4,15,-35,104,47,-23,"); + add("84,70,-102,40,56,-109,58,66,-120,125,26,48,"); + add("101,24,26,42,40,-68,85,33,-10,57,40,-58,"); + add("43,2,32,57,10,24,76,29,-11,-12,32,-96,"); + add("127,17,64,44,59,-121,-19,47,-146,170,32,60,"); + add("62,78,-163,57,57,-112,113,7,77,114,33,3,"); + add("98,67,-107,127,23,38,118,1,92,107,28,6,"); + add("82,50,-75,128,61,-78,76,16,15,-11,-28,72,"); + add("-127,-57,64,89,-12,100,147,19,57,106,16,32,"); + add(""); + //add("/*5*/"); + add("321,1,-10216,27876,4312,"); + add("-33,-1,-76,72,20,45,-2,15,-106,-14,19,-164,"); + add("39,12,16,27,27,-123,65,8,111,85,31,-9,"); + add("8,22,-136,71,20,39,8,15,-85,28,3,48,"); + add("4,-19,148,36,-10,148,91,34,-10,5,22,-145,"); + add("-23,12,-142,-74,2,-199,39,5,60,101,19,116,"); + add("97,15,136,111,41,-23,83,46,-134,-80,-19,-64,"); + add("-122,-34,-49,-149,-37,-113,40,14,2,175,50,71,"); + add("-13,9,-102,-138,-39,-64,31,12,-10,122,36,43,"); + add("129,29,115,102,31,16,46,35,-157,-87,-11,-138,"); + add("-56,-6,-113,-222,-73,-11,83,30,-16,-1,8,-72,"); + add("42,15,-13,111,28,86,158,51,1,-51,-7,-85,"); + add("-141,-30,-150,119,40,-9,109,25,97,130,48,-48,"); + add("40,27,-149,-81,-18,-74,-180,-53,-52,108,42,-72,"); + add("-67,-16,-56,21,9,-21,157,48,17,-26,-2,-67,"); + add("-175,-51,-57,83,31,-45,72,26,-34,127,32,93,"); + add("78,33,-99,-164,-42,-116,93,29,7,-46,-7,-95,"); + add("29,9,1,98,22,110,124,39,-10,36,22,-141,"); + add("38,22,-136,-15,5,-146,-116,-29,-96,-131,-52,162,"); + add("-2,9,-138,-168,-59,92,30,17,-111,82,29,-61,"); + add("58,25,-106,-53,-14,-52,-97,-26,-78,108,38,-70,"); + add("84,26,-3,138,41,41,138,44,-54,109,37,-90,"); + add("137,43,-56,61,23,-112,-40,-7,-144,-129,-34,-103,"); + add("-72,-18,-120,-116,-36,59,-11,0,-126,-95,-32,94,"); + add("12,7,-103,-111,-33,-55,-128,-42,81,-118,-41,121,"); + add("9,6,-99,-97,-29,-88,-120,-41,52,-76,-28,121,"); + add("-132,-45,25,-156,-52,-3,31,11,-43,-48,-11,-205,"); + add("55,18,52,82,24,128,114,40,-67,113,40,-102,"); + add("130,44,-64,145,46,-1,132,43,-41,135,42,-15,"); + add("136,40,48,138,41,56,119,33,92,89,26,-38,"); + add("6,5,-152,-47,-11,-143,-92,-26,-117,-137,-39,-88,"); + add("-116,-35,-60,-150,-46,-31,-133,-41,-51,-142,-45,-12,"); + add("-118,-39,-20,-147,-48,5,-147,-49,3,-69,-23,127,"); + add("-17,-7,159,-97,-35,131,-30,-9,-143,16,7,-160,"); + add("-128,-44,2,-123,-44,84,-87,-32,123,5,0,128,"); + add("48,15,108,-26,-10,41,-121,-45,61,-16,-9,122,"); + add("4,-3,150,-18,-12,161,16,-1,147,-33,-20,163,"); + add("142,56,-94,-32,-16,89,-94,-43,172,87,35,-57,"); + add("33,8,63,-16,-15,156,-31,-20,134,77,20,120,"); + add("224,86,-107,-50,-25,106,-45,-24,121,-143,-57,81,"); + add("-4,-6,52,-12,-10,76,-63,-30,87,-88,-41,97,"); + add("-89,-44,123,-97,-26,-101,-126,-48,6,104,26,133,"); + add("61,11,121,-78,-35,67,-48,-33,136,-7,-9,59,"); + add("-98,-47,90,-40,-27,104,-124,-58,86,-110,-55,90,"); + add("-119,-57,82,-121,-47,-10,-139,-52,-35,-26,-26,124,"); + add("28,-11,166,165,60,53,-23,-27,123,-19,-27,133,"); + add("-49,-40,137,-121,-51,7,-58,0,-158,-127,-38,-102,"); + add("72,37,-48,110,57,-83,22,29,-151,-29,8,-149,"); + add("-73,-16,-111,-128,-46,-65,-134,-47,-73,-106,-57,89,"); + add("-119,-68,133,-79,-22,-93,-88,-24,-123,-86,-20,-158,"); + add("-74,-40,60,-104,-51,36,15,11,-34,105,55,-70,"); + add("40,33,-139,8,24,-185,-97,-38,-54,-122,-47,-84,"); + add("-136,-60,-25,-121,-62,56,-57,-38,119,-8,-19,140,"); + add("53,12,112,102,35,117,51,13,85,22,-10,161,"); + add("136,69,-54,9,0,39,-73,-51,134,57,9,131,"); + add("-80,-45,58,-83,-53,109,-76,-54,126,-40,-37,125,"); + add("-10,-27,141,-118,-50,-33,-83,-49,60,-26,-39,160,"); + add("-43,-39,111,5,-29,182,-3,-24,125,-70,-55,117,"); + add("-21,-37,139,21,-21,160,19,-20,146,3,-29,150,"); + add("9,-29,158,108,53,-2,74,56,-98,77,62,-118,"); + add("33,42,-131,48,52,-147,29,36,-118,66,56,-133,"); + add("81,63,-139,58,14,68,-45,-49,153,69,32,-2,"); + add("5,-4,34,-65,-58,148,-52,-49,128,35,12,22,"); + add("6,0,13,-36,-43,131,3,-27,132,-51,-50,126,"); + add("48,17,25,94,46,-11,111,64,-64,148,89,-103,"); + add("-51,-52,135,106,52,-17,93,65,-109,46,40,-98,"); + add("104,66,-102,60,44,-88,59,48,-118,7,33,-157,"); + add("61,47,-111,96,62,-119,45,40,-122,45,33,-83,"); + add("124,73,-132,-1,-12,72,-14,-25,114,85,32,18,"); + add("104,68,-154,13,-7,76,64,28,-15,60,14,63,"); + add("-60,-47,133,21,-19,153,-70,-34,34,1,-17,94,"); + add("169,50,93,-76,-32,11,-140,-45,-62,-77,-48,87,"); + add("-46,-28,50,-52,-44,112,-24,-34,123,-24,-34,117,"); + add("48,9,49,121,63,-59,141,74,-81,41,-4,97,"); + add("74,22,40,108,55,-61,56,6,82,71,52,-120,"); + add("92,12,116,74,35,-30,82,28,15,84,54,-109,"); + add("-55,-3,-90,-92,-25,-50,27,17,-35,-66,-7,-93,"); + add("27,15,-25,168,65,-10,-77,-16,-67,-89,-7,-146,"); + add("62,29,-26,97,33,19,105,56,-96,-22,11,-108,"); + add("61,32,-54,-91,-27,-41,30,18,-40,-51,-10,-57,"); + add("79,38,-48,-64,-18,-37,23,20,-72,30,34,-145,"); + add(""); + //add("/*6*/"); + add("232,1,18592,-4797,-23051,"); + add("-106,15,-88,-120,-24,-91,-119,8,-94,-118,7,-93,"); + add("-120,-52,-82,-108,20,-87,-97,76,-88,-109,63,-95,"); + add("10,142,-19,95,107,50,118,58,78,117,25,84,"); + add("129,55,90,-36,0,-28,-107,-30,-77,-120,-9,-89,"); + add("-118,13,-91,-134,35,-107,36,120,6,-13,12,-11,"); + add("-146,-1,-108,61,204,10,-49,-33,-30,-119,-65,-75,"); + add("-99,38,-78,-75,44,-61,-122,-40,-80,-111,-70,-66,"); + add("-120,-44,-76,-131,-23,-86,-92,-37,-57,-116,-80,-64,"); + add("-78,-127,-30,-86,-126,-34,-63,-120,-20,-133,-100,-68,"); + add("-47,-112,-9,-98,-97,-45,-110,-83,-54,-81,-130,-25,"); + add("-117,-86,-56,-123,-29,-71,-124,-22,-72,-145,-4,-88,"); + add("-117,-41,-63,-131,-11,-75,-123,-34,-66,-185,-57,-96,"); + add("-47,-75,-11,-128,-41,-65,-123,32,-77,40,107,0,"); + add("-100,58,-68,45,25,20,127,31,66,127,50,61,"); + add("118,67,55,-31,116,-41,72,59,30,131,18,74,"); + add("117,87,52,6,176,-30,138,9,81,129,-9,80,"); + add("77,116,25,78,118,27,64,119,19,56,148,9,"); + add("114,75,59,107,85,53,93,102,44,110,89,56,"); + add("63,156,17,62,136,21,-86,71,-66,-129,-7,-82,"); + add("-135,30,-90,-20,131,-30,76,119,32,95,108,47,"); + add("124,25,76,123,42,74,116,64,69,117,74,68,"); + add("122,39,77,132,36,85,29,140,4,8,153,-11,"); + add("81,116,43,89,110,51,116,51,75,100,96,62,"); + add("100,82,63,95,92,60,126,13,89,114,54,78,"); + add("104,83,70,107,77,73,122,28,89,119,30,88,"); + add("117,44,86,115,52,84,111,58,82,111,59,84,"); + add("110,66,82,109,62,83,115,26,92,106,29,84,"); + add("116,62,92,108,32,88,115,2,96,110,49,91,"); + add("106,67,87,105,65,88,107,57,90,101,75,86,"); + add("109,46,94,104,60,91,102,33,91,102,-62,96,"); + add("99,-71,94,20,-114,24,54,-82,54,102,-52,98,"); + add("111,0,105,59,-109,62,65,-115,69,63,-110,69,"); + add("63,-114,69,76,-102,82,93,-48,96,111,34,107,"); + add("62,101,55,41,106,33,51,178,40,49,-74,54,"); + add("47,53,45,60,125,53,28,146,21,13,151,6,"); + add("-26,132,-32,-7,147,-13,49,159,46,26,101,24,"); + add("100,19,104,106,7,112,93,80,97,94,61,99,"); + add("99,46,107,103,0,112,92,-59,102,79,-95,89,"); + add("102,-47,116,95,-44,108,27,-144,35,66,-107,79,"); + add("-26,-80,-28,-89,10,-101,-113,-40,-126,-79,-43,-87,"); + add("-25,-126,-21,-48,-117,-49,-96,-86,-100,-104,-7,-113,"); + add("-103,-7,-111,-104,22,-113,-109,-1,-114,-95,41,-103,"); + add("-39,-73,-36,47,-135,57,106,-18,112,49,35,51,"); + add("92,22,96,70,-108,81,83,-45,93,94,29,101,"); + add("111,-45,126,-51,-80,-51,-99,-57,-104,-78,-112,-76,"); + add("-68,-98,-65,17,-122,30,-25,-150,-12,-85,-55,-86,"); + add("-90,52,-101,-34,127,-48,-36,147,-52,-73,194,-92,"); + add("21,-74,27,-15,-191,2,-79,-92,-74,-104,-65,-102,"); + add("-102,-37,-100,-121,16,-124,34,-53,39,-61,-124,-48,"); + add("-100,-76,-92,-105,-15,-103,-110,-21,-105,-106,-32,-100,"); + add("-102,-61,-90,-104,-53,-94,-108,-63,-94,-102,-25,-93,"); + add("-101,-45,-88,-111,-79,-92,-100,-81,-81,-87,-94,-67,"); + add("-89,-135,-61,-38,-138,-15,-47,-141,-22,-114,-156,-77,"); + add("-40,-83,-22,-121,-73,-93,17,-1,14,130,-9,115,"); + add("-146,-136,-105,90,-8,80,-9,-55,1,-90,-119,-58,"); + add("-3,-143,23,17,-176,48,-104,50,-100,-46,-39,-32,"); + add("-109,-13,-91,-167,68,-154,-25,-111,0,-104,-104,-67,"); + add("-94,-101,-59,-84,-116,-46,-96,-102,-57,"); + add(""); + //add("/*7*/"); + add("154,1,26493,2257,-13893,"); + add("-76,-31,-149,-74,37,-134,-66,79,-108,57,125,126,"); + add("-2,122,18,-70,10,-127,-71,7,-130,-74,49,-125,"); + add("-55,104,-77,43,75,91,54,35,105,57,73,117,"); + add("53,89,117,73,-38,129,-4,82,10,35,49,76,"); + add("65,-40,116,5,32,15,-31,140,-26,-9,133,15,"); + add("53,62,116,26,133,85,38,28,81,59,-90,93,"); + add("25,88,73,47,-149,54,56,-117,82,48,-93,74,"); + add("42,-130,54,50,-135,71,65,-82,116,50,-45,94,"); + add("7,-114,-9,4,-113,-15,66,-64,125,45,19,101,"); + add("66,-38,135,57,-93,104,62,-52,127,54,-50,112,"); + add("33,-153,44,46,-120,83,52,-101,102,42,-120,79,"); + add("45,-118,87,46,-102,92,58,-44,133,58,-36,134,"); + add("57,-37,135,57,-22,139,54,-54,127,26,-133,49,"); + add("25,-75,56,18,-121,35,29,-156,57,6,-124,5,"); + add("-9,-102,-29,81,61,215,46,78,129,40,25,111,"); + add("57,3,156,39,94,117,26,50,77,42,-95,109,"); + add("33,-121,83,9,-151,16,29,-118,75,13,-155,32,"); + add("-4,-158,-18,-19,-112,-56,-28,-126,-82,14,-146,40,"); + add("-12,-145,-30,-32,-83,-88,-10,-97,-26,-50,-35,-138,"); + add("-38,-109,-101,-29,-130,-70,7,-157,32,-8,-110,-14,"); + add("-22,-139,-46,-22,-167,-40,-8,-126,-4,-26,-111,-54,"); + add("-57,-16,-152,-43,-3,-113,-56,-11,-142,-51,28,-136,"); + add("-43,22,-113,-17,22,-44,-20,-161,-27,-26,-159,-42,"); + add("-61,77,-162,-61,-39,-142,-50,59,-128,-32,100,-89,"); + add("-26,34,-66,-52,-93,-110,-56,-29,-123,-35,-99,-66,"); + add("-53,64,-130,-44,15,-99,-56,-73,-114,-34,-133,-54,"); + add("-13,-154,-5,-33,-74,-59,-56,70,-131,-55,59,-128,"); + add("-58,55,-130,-56,67,-126,-38,95,-92,-27,130,-73,"); + add("4,111,-6,-20,68,-47,-22,171,-65,-39,115,-88,"); + add("28,83,49,20,62,35,10,163,7,-47,142,-102,"); + add("-36,123,-79,-12,41,-25,-60,19,-119,-48,126,-100,"); + add("-59,63,-115,-4,145,-12,19,146,35,-8,159,-15,"); + add("-17,144,-31,-32,136,-60,-51,96,-94,-20,76,-35,"); + add("-5,39,-8,-65,-89,-125,-68,-15,-126,-73,10,-133,"); + add("-26,105,-43,53,108,101,61,93,116,55,87,108,"); + add("53,95,104,32,132,70,-50,137,-83,32,133,71,"); + add("38,140,87,23,98,55,49,127,109,6,116,26,"); + add("20,83,51,-86,28,-162,-47,53,-82,38,99,86,"); + add("20,88,52,"); + add(""); + //add("/*8*/"); + add("165,1,-3761,29749,925,"); + add("105,16,-88,20,5,-115,-80,-9,-37,-29,-3,-31,"); + add("-47,-4,-80,-110,-14,-41,-136,-19,81,-100,-17,132,"); + add("1,1,-30,72,13,-169,33,6,-71,95,14,-116,"); + add("-71,-8,-70,-163,-23,48,0,1,-106,9,2,-129,"); + add("-147,-21,-153,-110,-16,31,-7,-1,135,-53,-8,-61,"); + add("-122,-19,-35,-63,-10,95,83,11,213,-84,-12,-44,"); + add("-61,-9,-181,-128,-21,73,71,11,96,120,18,87,"); + add("71,9,180,-31,-5,-34,-70,-9,-133,-142,-22,-76,"); + add("-76,-13,72,82,11,161,14,1,95,-8,-5,121,"); + add("111,15,104,152,24,26,154,20,94,-47,-7,-9,"); + add("-156,-22,-41,-25,-8,124,-41,-6,-17,-91,-11,-125,"); + add("-40,-8,50,-29,-4,-16,-67,-7,-129,-78,-9,-150,"); + add("-110,-19,4,-113,-22,102,-96,-21,116,-46,-7,-35,"); + add("58,13,-93,118,23,-94,104,20,-112,24,7,-151,"); + add("-68,-11,-87,-130,-23,56,-120,-22,56,-114,-23,91,"); + add("-158,-31,75,-82,-16,16,15,-2,197,-113,-21,-44,"); + add("25,8,-118,19,7,-151,-71,-13,-140,-128,-25,-53,"); + add("-165,-34,-4,8,0,136,119,23,111,-68,-14,33,"); + add("-86,-18,2,-119,-25,-28,-119,-27,44,-30,-9,120,"); + add("205,42,85,-71,-15,8,-158,-33,-60,-80,-16,-72,"); + add("15,6,-141,110,26,-69,106,24,-103,-43,-8,-138,"); + add("-141,-31,34,-114,-26,87,-72,-16,-23,-46,-10,-142,"); + add("-126,-28,-99,-150,-36,4,32,7,90,-57,-14,93,"); + add("15,2,148,-64,-18,122,50,10,115,89,18,123,"); + add("30,3,144,-27,-10,120,-120,-32,101,30,2,119,"); + add("126,25,109,91,18,84,144,33,-15,-11,3,-107,"); + add("91,23,-68,12,8,-124,0,6,-162,115,26,-25,"); + add("-3,-2,51,-49,-16,139,46,4,146,133,26,68,"); + add("161,36,-43,69,8,150,100,19,16,75,13,51,"); + add("97,23,-71,60,8,68,132,27,-12,35,13,-141,"); + add("-62,-5,-151,42,10,-41,84,13,67,50,5,82,"); + add("-5,-8,156,61,14,-56,-16,6,-192,78,13,33,"); + add("36,0,138,75,7,128,133,27,-61,21,0,70,"); + add("44,-1,150,152,29,-54,167,24,52,92,10,74,"); + add("145,21,23,139,18,43,150,19,39,151,18,47,"); + add("11,7,-78,-117,-10,-95,-148,-15,-126,48,7,13,"); + add("141,14,96,37,12,-110,20,0,43,101,6,127,"); + add("105,9,88,154,15,60,145,17,13,77,17,-129,"); + add("66,14,-106,21,9,-121,-130,-8,-126,76,8,5,"); + add("41,9,-86,-23,5,-159,-33,-1,-85,-109,-11,-52,"); + add("25,6,-75,8,5,-139,-90,-10,-11,-124,-18,83,"); + add(""); + //add("/*9*/"); + add("141,-1,-21883,20471,1436,"); + add("65,72,-30,87,96,-65,100,105,-11,107,111,-3,"); + add("102,102,54,109,109,17,92,90,60,101,90,127,"); + add("-65,-68,57,36,31,57,109,106,20,79,70,98,"); + add("111,104,51,-8,-21,150,-38,-50,135,-36,-49,136,"); + add("-43,-57,130,-92,-95,31,-111,-115,37,-111,-111,-3,"); + add("-90,-84,-66,-92,-84,-97,-97,-100,-2,16,3,123,"); + add("93,86,76,54,39,143,-62,-78,107,-99,-108,41,"); + add("-99,-110,38,-57,-72,90,77,63,126,93,86,74,"); + add("105,111,-16,107,112,-13,106,102,39,99,89,73,"); + add("106,107,-9,100,116,-107,24,10,84,-82,-96,103,"); + add("-64,-76,75,-8,-30,135,-15,-42,160,116,101,83,"); + add("60,64,-21,94,106,-86,61,78,-109,63,76,-93,"); + add("73,86,-101,3,26,-151,0,22,-151,9,29,-154,"); + add("2,22,-155,-15,3,-139,-8,9,-146,7,24,-151,"); + add("28,40,-138,43,54,-139,91,89,-30,73,74,-77,"); + add("119,111,-7,88,89,-104,118,108,-11,24,31,-124,"); + add("-13,-1,-150,60,61,-116,100,93,-69,110,101,-66,"); + add("28,31,-127,-2,5,-150,26,30,-153,34,34,-165,"); + add("-125,-107,-95,-72,-60,-133,-3,0,-117,-97,-86,-61,"); + add("-81,-72,-89,-64,-57,-131,-43,-39,-140,-43,-40,-140,"); + add("-67,-63,-120,-81,-77,-105,-74,-71,-112,-82,-81,-130,"); + add("-45,-39,74,36,37,155,35,36,139,-75,-70,33,"); + add("-34,-31,69,-4,-3,150,54,51,132,31,29,142,"); + add("51,45,135,68,61,144,-91,-86,86,-2,-5,78,"); + add("4,-1,145,-62,-61,110,-67,-69,114,-13,-20,160,"); + add("38,29,127,56,45,132,16,4,152,38,22,175,"); + add("-80,-81,76,-9,-21,153,-37,-46,111,-91,-95,80,"); + add("-42,-32,-78,-24,-11,-141,0,11,-124,24,35,-148,"); + add("-54,-41,-140,-27,-15,-151,-85,-77,-108,9,12,-37,"); + add("14,18,-89,-17,-13,-76,-97,-91,-71,-97,-92,-70,"); + add("-97,-94,-70,-126,-123,-92,37,32,153,-110,-113,18,"); + add("-105,-107,-20,-102,-103,-53,-103,-107,-10,-100,-104,-41,"); + add("-103,-108,0,-99,-109,34,-103,-112,0,-102,-112,13,"); + add("-90,-102,61,-85,-99,76,-3,-10,140,58,57,128,"); + add("87,91,82,94,99,65,100,107,35,102,110,3,"); + add(""); + //add("/*10*/"); + add("132,1,25827,-2922,-14981,"); + add("-63,23,-112,19,140,5,21,141,11,-16,138,-50,"); + add("13,153,-1,15,150,2,6,149,-11,-3,144,-22,"); + add("16,158,7,42,141,56,-44,112,-86,-60,83,-109,"); + add("-75,-8,-126,-28,-102,-36,-4,-168,10,29,-144,65,"); + add("-51,-124,-70,-63,-96,-91,-77,-86,-116,-10,-125,1,"); + add("4,-160,31,-56,-106,-75,-92,-2,-147,-29,144,-68,"); + add("-75,45,-127,-81,15,-127,-33,114,-68,61,79,85,"); + add("42,105,52,77,107,108,-6,149,-27,-10,119,-28,"); + add("50,128,66,63,116,89,43,135,59,58,105,86,"); + add("82,146,124,-61,9,-101,-61,102,-105,-75,53,-123,"); + add("-69,72,-112,-53,112,-89,-48,117,-79,-64,75,-102,"); + add("-81,-47,-121,-42,124,-68,69,87,103,89,-54,137,"); + add("55,-52,87,80,8,126,72,-53,115,74,-45,120,"); + add("77,43,124,66,-102,111,43,-122,76,61,-53,103,"); + add("75,38,125,38,141,57,63,82,104,52,115,88,"); + add("20,146,31,1,150,0,-27,141,-45,-44,124,-75,"); + add("-68,67,-115,-74,-34,-125,-76,-10,-127,-81,22,-133,"); + add("-73,11,-119,-75,-29,-121,-79,18,-125,-87,6,-138,"); + add("-72,-3,-112,-84,-17,-131,-72,-76,-110,-85,-8,-128,"); + add("-84,18,-126,-83,27,-122,-79,62,-115,-46,119,-65,"); + add("-62,111,-87,-57,114,-77,-48,140,-63,17,126,30,"); + add("71,-46,100,74,-113,101,46,-90,63,68,-92,97,"); + add("80,-71,115,82,-11,122,81,24,124,77,22,118,"); + add("83,-36,125,78,45,123,79,29,125,80,20,129,"); + add("77,10,124,72,58,119,63,41,105,81,33,135,"); + add("38,-108,60,49,-123,78,73,5,124,53,-60,89,"); + add("42,-121,70,42,-135,71,20,-165,34,-5,-129,-7,"); + add("-5,-218,-5,50,-60,89,37,-137,69,31,-131,61,"); + add("-2,-151,4,-6,-157,-1,35,-133,73,10,-147,30,"); + add("52,-105,103,11,-115,32,-4,-145,7,-35,-179,-41,"); + add("-67,-3,-120,-71,-23,-124,-23,-150,-21,-35,-129,-43,"); + add("-10,-165,6,8,-149,38,1,-148,26,17,-139,57,"); + add("-25,-158,-14,-61,-75,-93,-72,30,-132,"); + add(""); + //add("/*11*/"); + add("133,1,29737,2888,-2716,"); + add("9,-113,-12,8,-138,-52,6,-140,-72,-2,-106,-100,"); + add("-2,-111,-113,-5,-99,-114,-5,-101,-110,-4,-106,-109,"); + add("-16,-34,-151,-6,-108,-107,-4,-123,-92,-4,-124,-82,"); + add("-10,-97,-118,1,-147,-41,-1,-134,-54,-18,-43,-138,"); + add("-15,-85,-133,-17,-73,-129,-13,-126,-116,-1,-136,-24,"); + add("-5,-142,-55,-5,-144,-46,-5,-143,-50,-6,-154,-42,"); + add("-20,-65,-126,-23,-73,-133,-11,-130,-64,-16,-117,-89,"); + add("-18,-115,-96,-18,-122,-91,-10,-146,-42,-19,-126,-84,"); + add("-15,-136,-61,-19,-130,-78,-8,-149,-12,-19,-137,-69,"); + add("-25,-105,-103,-24,-111,-94,-22,-131,-73,-26,-107,-100,"); + add("-31,-88,-120,-31,-93,-119,-21,-139,-52,-30,-107,-102,"); + add("-33,-90,-116,-33,-98,-110,-35,-84,-122,-34,-94,-108,"); + add("-38,-70,-134,-36,-100,-107,-31,-118,-80,-38,-108,-108,"); + add("-50,-131,-143,11,129,-8,-21,16,-85,-51,-87,-158,"); + add("-12,85,-78,-28,-11,-98,-44,-106,-121,-14,86,-78,"); + add("11,150,-16,9,150,-19,11,150,-8,11,150,-5,"); + add("19,146,27,-2,156,-48,19,137,34,-6,148,-55,"); + add("-10,124,-58,31,104,87,28,122,77,29,133,80,"); + add("43,39,151,41,13,150,34,-129,151,1,99,-15,"); + add("-14,144,-74,34,85,116,16,106,50,12,151,27,"); + add("9,148,24,24,72,85,40,15,160,31,36,124,"); + add("31,99,122,-1,135,-10,6,103,22,-5,70,-21,"); + add("-27,80,-116,-8,134,-29,24,93,101,33,40,138,"); + add("30,-79,128,48,-65,208,-16,34,-70,-32,86,-138,"); + add("11,125,52,32,29,145,28,59,129,17,117,89,"); + add("8,142,49,21,102,112,25,64,128,25,57,130,"); + add("7,141,61,19,104,114,22,-104,94,17,33,97,"); + add("19,84,121,14,168,114,17,44,107,0,140,42,"); + add("12,110,102,17,81,126,13,95,116,16,79,127,"); + add("17,69,139,9,106,103,17,75,150,-6,95,13,"); + add("3,124,86,0,119,72,3,113,91,7,106,117,"); + add("19,1,150,14,39,141,19,-8,148,18,-11,149,"); + add("13,33,146,5,87,123,5,77,128,14,7,148,"); + add(""); + //add("/*12*/"); + add("129,-1,17606,18970,15171,"); + add("-13,-69,100,24,-118,119,79,-124,60,75,-119,57,"); + add("88,-117,38,105,-103,1,120,-58,-71,115,-15,-117,"); + add("107,-39,-82,114,-100,-19,119,-75,-55,119,-64,-69,"); + add("111,-41,-90,109,-28,-102,103,-17,-111,72,31,-131,"); + add("75,26,-129,69,33,-132,71,28,-131,83,13,-127,"); + add("26,2,-40,-103,181,-91,-89,118,-32,-85,121,-42,"); + add("-65,119,-69,-79,119,-52,-55,115,-80,-90,101,-15,"); + add("-97,78,26,-117,33,112,-71,83,-19,27,21,-65,"); + add("43,18,-83,-112,123,-21,-104,-5,146,-111,83,31,"); + add("-87,114,-44,-49,113,-96,-21,93,-105,128,-44,-107,"); + add("73,-19,-72,88,-33,-72,52,40,-132,35,56,-132,"); + add("-61,93,-54,-129,77,65,-119,82,41,-103,112,-27,"); + add("-111,101,-2,-98,4,127,-60,-33,129,37,-112,118,"); + add("76,-104,52,43,-80,60,-175,159,-1,-94,108,-37,"); + add("-68,104,-66,-36,102,-106,-71,91,-44,-136,52,97,"); + add("-108,31,93,-127,86,30,-99,45,57,-105,116,-45,"); + add("-116,93,3,-111,99,-15,-114,71,31,-118,47,69,"); + add("-37,83,-81,105,-3,-124,117,-34,-92,23,30,-75,"); + add("-173,114,35,-11,82,-119,-5,84,-127,73,16,-120,"); + add("99,0,-126,103,-17,-107,50,18,-95,-136,110,-8,"); + add("-28,92,-120,-61,101,-93,-100,104,-49,-77,98,-69,"); + add("-117,55,57,-84,-14,134,-69,-10,106,-112,43,68,"); + add("-117,32,91,-63,-37,142,-40,-45,124,-33,-54,130,"); + add("-51,-57,155,-69,-21,116,16,-82,112,-33,-62,136,"); + add("6,-73,108,-68,-55,161,-91,-26,142,-28,-31,78,"); + add("65,-125,116,26,-99,118,-5,-63,97,3,-96,136,"); + add("113,-74,-14,126,-73,-31,128,-109,16,69,-71,25,"); + add("101,-143,90,74,-109,72,117,-96,4,112,-93,3,"); + add("122,-91,-11,116,-97,3,118,-79,-27,124,-87,-23,"); + add("119,-92,-12,104,-107,22,117,-94,-11,115,-91,-14,"); + add("122,-32,-100,119,-63,-59,6,-38,42,-102,-1,123,"); + add("-37,-76,143,51,-113,87,48,-116,92,70,-87,27,"); + add(""); + //add("/*13*/"); + add("124,1,19067,-11237,20253,"); + add("-33,-122,-37,-29,-151,-59,-10,-135,-68,31,-113,-96,"); + add("-3,-132,-75,-21,-117,-50,-58,-142,-31,-39,-139,-48,"); + add("-8,-125,-70,25,-112,-96,-3,-132,-82,61,-101,-125,"); + add("57,-50,-88,90,-39,-116,62,-82,-117,98,-12,-107,"); + add("113,52,-80,114,71,-69,115,51,-85,112,14,-108,"); + add("112,48,-86,99,84,-50,84,137,2,78,132,5,"); + add("79,128,-2,81,128,-4,66,137,16,73,133,6,"); + add("68,135,11,59,138,20,67,136,10,71,133,3,"); + add("77,128,-9,71,135,1,69,135,2,65,138,8,"); + add("63,138,7,66,137,4,74,132,-11,62,123,-2,"); + add("67,148,4,69,134,-8,66,137,-2,71,133,-13,"); + add("70,134,-12,64,138,-4,50,138,11,55,142,6,"); + add("15,140,50,55,141,4,81,114,-42,53,86,-22,"); + add("56,154,5,10,135,49,5,138,55,14,146,47,"); + add("79,50,-71,13,-135,-75,51,-82,-97,83,123,-46,"); + add("60,141,-11,13,136,44,-18,131,76,3,142,54,"); + add("22,147,34,18,146,35,14,147,40,-2,145,57,"); + add("-2,136,52,-8,136,58,-47,91,89,-15,145,67,"); + add("-63,151,124,-75,-67,64,-95,-104,75,-2,-149,-48,"); + add("-41,-140,-2,-54,-146,9,-100,-65,91,-94,-118,63,"); + add("-71,56,100,-64,-50,53,-14,-217,-65,-54,-64,35,"); + add("-33,-189,-35,-79,-71,59,-81,-136,36,-8,95,45,"); + add("-59,-48,45,-115,-224,35,-47,52,72,-109,-77,85,"); + add("-93,-85,64,-42,-128,-9,-26,-34,14,-77,54,103,"); + add("-96,-1,98,-95,-83,64,-107,-29,96,-115,-54,94,"); + add("-101,-38,85,-108,-40,91,-38,-156,-28,-71,-134,14,"); + add("-84,-126,28,-80,-121,25,-45,-139,-18,-10,-135,-50,"); + add("-26,-143,-40,-12,-139,-52,16,-129,-77,-24,-134,-40,"); + add("6,-139,-73,2,-130,-66,-41,-141,-31,-45,-126,-20,"); + add("-86,-125,20,-83,-112,23,-94,-127,23,-69,-137,-6,"); + add("-101,-89,49,-79,-92,25,-68,-146,-15,"); + add(""); + //add("/*14*/"); + add("122,1,14146,19873,-17463,"); + add("104,-90,-18,-83,-22,-92,35,-96,-78,124,-19,79,"); + add("34,103,143,90,-59,8,110,-101,-22,114,-79,6,"); + add("38,-117,-98,122,-132,-43,-14,-100,-120,73,-117,-66,"); + add("97,-107,-32,92,-115,-44,111,-100,-11,100,-112,-31,"); + add("95,-109,-32,129,-66,43,117,-85,15,108,-105,-13,"); + add("122,-84,22,126,-56,55,128,-50,65,124,-60,52,"); + add("109,-21,80,-26,124,104,-148,120,-13,56,19,71,"); + add("123,-63,49,59,-112,-61,78,-122,-52,112,-100,3,"); + add("123,-89,27,116,-101,10,61,-129,-71,121,-80,37,"); + add("112,-15,95,39,56,95,115,1,116,111,-11,102,"); + add("120,-40,81,112,-13,103,119,3,127,79,17,103,"); + add("127,-51,83,113,-91,28,118,-84,42,118,-83,43,"); + add("122,-71,62,115,-81,46,105,-30,89,100,-76,36,"); + add("25,-102,-77,-105,-3,-123,-105,13,-106,-64,-64,-135,"); + add("-67,52,-22,-93,123,22,-79,-2,-89,-140,23,-128,"); + add("-81,13,-73,-106,51,-61,-130,25,-112,-119,61,-63,"); + add("-113,41,-75,-90,-25,-115,-91,-16,-107,-52,-37,-88,"); + add("133,-120,16,74,-125,-45,2,-108,-101,-17,-89,-99,"); + add("-88,-30,-115,-106,89,-20,-124,123,-4,-101,92,-11,"); + add("-128,42,-82,-65,56,-8,45,91,128,-73,118,44,"); + add("-75,-7,-77,-47,-80,-121,-48,-27,-69,-113,7,-97,"); + add("-123,-9,-120,-108,79,-23,-159,95,-51,5,-137,-123,"); + add("-122,86,-27,-72,118,46,-148,21,-106,-146,127,-5,"); + add("41,-97,-56,72,-134,-63,-73,11,-52,-131,69,-45,"); + add("-89,124,40,-123,82,-26,-54,64,16,6,109,107,"); + add("-49,118,71,-87,119,44,-104,108,19,-96,105,23,"); + add("-69,120,62,-46,118,80,-34,117,89,-106,120,36,"); + add("-113,25,-66,-58,35,-10,-57,106,63,-108,106,23,"); + add("-116,100,11,-90,116,51,-50,111,78,-30,116,99,"); + add("-18,105,98,26,93,122,-20,107,102,-61,115,79,"); + add("-36,99,82,"); + add(""); + //add("/*15*/"); + add("125,1,-1369,25599,15582,"); + add("-20,-57,92,-68,-54,82,2,-61,99,-37,-16,22,"); + add("-100,-31,38,-10,-85,134,26,-58,95,-46,-77,115,"); + add("-69,-80,116,34,-51,81,137,48,-60,11,-18,29,"); + add("-57,-58,82,-68,-102,148,-8,-72,106,-43,-121,173,"); + add("63,41,-53,40,81,-116,76,85,-120,50,-47,75,"); + add("20,-62,93,45,-78,120,-71,-85,116,-66,-81,111,"); + add("56,-59,90,165,12,-4,137,10,-5,179,39,-45,"); + add("-9,-27,39,-83,-86,117,38,-81,116,105,-49,74,"); + add("34,-64,90,-22,-82,111,-3,-101,137,-99,-17,17,"); + add("-155,-4,-5,-140,-41,46,-127,-85,103,77,-13,24,"); + add("88,-67,94,-29,-83,107,-108,-65,76,-141,-42,42,"); + add("-111,-69,79,75,-53,75,202,7,6,82,-38,55,"); + add("115,-27,42,136,-25,40,204,73,-82,-53,-57,69,"); + add("-93,-72,86,-150,-12,6,-157,0,-10,-113,-56,61,"); + add("-88,-76,87,-105,-74,82,-96,-71,78,-147,-70,71,"); + add("56,-32,44,112,17,-11,108,55,-57,163,21,-12,"); + add("143,-28,44,105,50,-54,71,78,-90,165,19,-14,"); + add("136,-37,50,150,25,-23,162,43,-49,127,8,-6,"); + add("109,-13,17,169,11,-12,154,-12,15,143,34,-43,"); + add("126,40,-51,112,90,-113,-210,52,-62,51,85,-108,"); + add("113,70,-92,97,61,-79,47,88,-116,0,90,-117,"); + add("-95,69,-88,-143,26,-32,-149,-21,30,-109,7,-8,"); + add("53,94,-126,-68,83,-110,-171,63,-86,117,-4,5,"); + add("-23,73,-99,-29,82,-113,-91,80,-113,-134,48,-69,"); + add("-81,47,-67,-50,85,-123,-36,83,-120,-40,84,-123,"); + add("-91,65,-98,-114,49,-77,-131,10,-21,-170,-1,-8,"); + add("40,14,-19,158,50,-66,-58,48,-74,3,15,-24,"); + add("128,39,-52,79,68,-101,63,78,-116,60,76,-117,"); + add("10,69,-108,-137,20,-37,-150,3,-12,-151,2,-11,"); + add("-198,-25,27,48,56,-86,63,67,-102,116,55,-81,"); + add("73,86,-136,-130,13,-29,-172,-18,17,-125,4,-17,"); + add(""); + //add("/*16*/"); + add("107,1,-8155,28629,-3723,"); + add("43,22,74,114,43,87,145,42,14,39,-6,-131,"); + add("-6,-21,-148,-12,-24,-151,-31,-28,-139,-45,-33,-139,"); + add("-123,-45,-76,-72,-40,-127,-132,-55,-107,-93,-12,98,"); + add("-74,-20,6,-81,-15,60,-49,9,155,-49,7,153,"); + add("-17,-12,-53,-6,-18,-105,12,-19,-152,17,-19,-152,"); + add("-76,-38,-93,-155,-41,44,-84,-7,118,-71,-3,126,"); + add("-63,2,143,-30,12,149,-75,-6,125,-103,-19,106,"); + add("-136,-31,101,-16,-15,-73,31,-7,-125,82,8,-136,"); + add("74,5,-129,44,-8,-146,35,-12,-147,24,-16,-149,"); + add("-75,-40,-97,-153,-48,19,-124,-37,26,-124,-25,98,"); + add("-70,-3,130,-87,-6,156,-108,-36,9,-131,-53,-43,"); + add("-145,-48,26,-55,1,138,-46,7,166,-26,8,121,"); + add("-37,7,149,-13,15,152,41,34,148,-9,14,143,"); + add("35,29,142,108,52,114,-85,-25,61,-85,-21,96,"); + add("-99,-27,92,-83,-19,116,-72,-14,140,-20,5,146,"); + add("75,42,168,150,55,-9,-25,-22,-156,57,21,0,"); + add("115,40,-23,5,9,95,60,32,128,-63,-12,140,"); + add("52,26,98,134,46,-35,97,27,-97,155,43,-139,"); + add("47,9,-88,125,37,-72,145,44,-49,139,50,50,"); + add("140,47,24,142,44,-22,144,45,1,147,45,5,"); + add("142,44,11,142,40,-31,131,32,-77,69,7,-136,"); + add("-56,-26,-110,-156,-49,-36,-143,-44,-18,-138,-44,-21,"); + add("-157,-48,5,-91,-36,-72,53,10,-68,141,45,13,"); + add("149,46,9,140,43,3,135,34,-52,119,26,-86,"); + add("-104,-33,-24,-118,-38,-32,3,-15,-141,-15,-17,-108,"); + add("21,4,-18,108,45,108,134,33,-41,111,19,-114,"); + add("-69,-37,-145,-15,-19,-114,"); + add(""); + //add("/*17*/"); + add("87,1,-27734,11163,2489,"); + add("19,13,151,8,-8,114,41,66,143,46,87,101,"); + add("23,15,150,38,58,119,51,92,110,48,75,125,"); + add("23,8,151,18,-5,151,6,-45,174,-52,-82,-123,"); + add("-24,-76,54,7,-30,134,17,-24,175,11,-4,84,"); + add("6,-40,142,33,17,158,-21,-103,125,-4,-70,140,"); + add("15,-33,154,8,-44,138,29,4,148,30,2,146,"); + add("-31,-125,96,-43,-133,48,-13,-95,115,-1,-71,127,"); + add("28,-12,151,33,-11,167,-25,-118,92,-62,-109,-91,"); + add("-74,-129,-116,17,-35,132,34,9,138,41,21,144,"); + add("40,10,150,39,11,143,33,-10,147,25,-31,147,"); + add("56,28,174,28,1,102,54,47,133,73,59,183,"); + add("6,95,-110,5,98,-119,-18,56,-147,-34,13,-147,"); + add("-26,37,-156,35,105,-27,-16,51,-142,-12,48,-123,"); + add("-27,26,-158,-10,45,-116,2,88,-143,-4,36,-84,"); + add("21,121,-126,-13,-44,25,-7,-7,-22,-7,70,-162,"); + add("6,72,-113,2,72,-129,-1,62,-134,-11,32,-121,"); + add("-30,7,-168,-3,53,-136,23,103,-108,13,79,-121,"); + add("-15,27,-150,-4,57,-164,-12,16,-116,-19,16,-168,"); + add("-24,-5,-136,-8,24,-127,-17,10,-152,-24,-7,-150,"); + add("-40,-51,-137,-30,-23,-156,-24,-20,-131,-39,-54,-141,"); + add("-37,-48,-143,-37,-57,-129,-54,-104,-106,-60,-143,-8,"); + add("-25,-50,-49,-33,-45,-160,"); + add(""); + //add("/*18*/"); + add("90,1,-15425,23492,10498,"); + add("-58,1,-87,-121,-46,-78,-123,-67,-36,-115,-76,-3,"); + add("-150,-98,-10,-111,-74,-9,-121,-91,15,-123,-90,8,"); + add("-140,-124,52,-108,-53,-58,-57,-91,109,-74,-19,-79,"); + add("-202,-127,-49,-95,-37,-76,59,-35,174,-100,-68,-17,"); + add("-123,-69,-56,-124,-80,-33,-59,-94,103,93,5,144,"); + add("92,25,97,70,-9,131,68,-15,139,65,-15,129,"); + add("77,6,109,128,39,115,109,47,69,-18,-33,37,"); + add("-91,-67,-3,22,-20,72,98,36,73,82,22,76,"); + add("29,-15,71,-129,-75,-42,-126,-83,-24,-120,-48,-86,"); + add("-25,-57,73,105,25,106,117,75,26,167,94,60,"); + add("55,14,53,138,110,-15,49,4,59,-67,-110,114,"); + add("-92,-81,24,-126,-104,16,10,-33,73,137,84,35,"); + add("2,-23,44,-76,-97,73,64,-24,128,138,100,5,"); + add("95,91,-35,139,135,-62,-112,-42,-70,7,42,-68,"); + add("168,143,-38,-94,-29,-72,-151,-107,-5,9,60,-100,"); + add("90,96,-57,109,58,39,166,93,46,-59,6,-90,"); + add("-109,-28,-94,50,45,-17,31,65,-82,110,82,-11,"); + add("122,87,-4,-28,62,-160,-90,-9,-107,-88,-16,-91,"); + add("-105,-24,-103,-11,43,-103,-60,20,-130,24,49,-67,"); + add("143,89,25,-21,50,-137,-98,-37,-69,-144,-84,-36,"); + add("14,29,-42,109,90,-28,142,98,3,114,74,10,"); + add("124,88,-10,127,75,23,36,67,-95,60,35,11,"); + add("112,50,53,"); + add(""); + //add("/*19*/"); + add("80,1,1236,-19143,-23066,"); + add("4,78,-64,-62,100,-85,-134,51,-49,-152,-25,15,"); + add("-51,9,-9,-6,134,-109,-98,76,-64,-52,106,-86,"); + add("-10,119,-94,-47,131,-104,132,74,-53,141,-39,35,"); + add("96,-86,71,153,-52,48,130,28,-16,140,50,-31,"); + add("184,72,-44,56,78,-56,49,121,-89,49,124,-90,"); + add("106,96,-64,26,-76,59,-28,-145,107,111,52,-31,"); + add("185,68,-34,34,89,-64,6,109,-81,60,113,-78,"); + add("86,128,-85,-13,95,-70,101,119,-75,101,59,-31,"); + add("124,67,-35,156,44,-13,120,51,-21,106,128,-77,"); + add("17,-60,44,-97,-101,58,-37,-121,81,-126,-90,50,"); + add("-22,-105,73,-98,-107,66,-161,-157,98,46,101,-70,"); + add("-19,-20,13,-150,-66,33,-21,-114,83,18,-66,51,"); + add("-79,-123,84,-127,-26,8,17,-62,48,-18,-95,71,"); + add("-63,-151,111,6,-115,90,33,-74,61,33,-132,109,"); + add("18,-117,95,106,-71,68,134,-48,53,68,-90,81,"); + add("-95,-89,64,-140,-46,24,-125,-73,48,-147,-47,27,"); + add("-111,-103,77,4,-80,69,30,-117,102,69,-104,96,"); + add("78,-95,91,-65,-52,40,-140,-75,54,-125,9,-18,"); + add("-117,69,-70,-87,88,-83,-64,99,-91,-71,102,-93,"); + add("-83,99,-89,-74,93,-83,-53,144,-123,"); + add(""); + //add("/*20*/"); + add("78,1,24076,9507,-15164,"); + add("72,-75,68,83,5,136,48,63,117,50,69,127,"); + add("79,-2,131,85,-69,98,67,-149,17,60,-142,10,"); + add("52,-139,2,27,-144,-44,40,-147,-23,64,-144,24,"); + add("35,-135,-20,25,-149,-43,59,-44,76,45,108,140,"); + add("61,-134,28,0,-120,-68,28,-143,-33,12,-137,-55,"); + add("20,-151,-45,-23,-78,-82,-26,-143,-118,-68,139,-44,"); + add("-67,-35,-130,24,-122,-21,90,-111,95,35,-131,-5,"); + add("-23,-58,-67,-46,-79,-116,-75,-39,-142,-69,93,-69,"); + add("-87,51,-117,-59,-72,-129,-41,-96,-108,-47,-146,-139,"); + add("-34,112,-4,-4,168,69,-58,-22,-101,-27,-107,-90,"); + add("-54,-93,-123,-9,-131,-71,-31,-83,-82,-93,-54,-162,"); + add("-1,-132,-55,-55,5,-80,-40,175,12,68,60,126,"); + add("0,101,43,28,143,103,-85,78,-93,13,73,52,"); + add("75,54,137,65,-48,78,35,93,96,45,111,120,"); + add("71,12,116,83,-91,88,54,-93,43,68,62,137,"); + add("8,122,73,-16,158,51,-19,113,25,3,134,74,"); + add("-11,130,50,-77,145,-48,-38,135,11,-128,111,-146,"); + add("-35,5,-54,-60,122,-28,-72,141,-35,-64,134,-25,"); + add("-26,135,36,23,98,92,-11,145,69,-46,146,16,"); + add("-67,132,-25,"); + add(""); + //add("/*21*/"); + add("83,1,2308,-19901,-22330,"); + add("-8,114,-102,37,64,-52,88,-4,12,15,49,-40,"); + add("143,-68,75,129,-20,33,58,130,-108,117,79,-53,"); + add("13,52,-44,159,-88,97,48,-95,90,-6,-118,104,"); + add("58,-104,101,115,-73,82,56,-86,87,28,-109,103,"); + add("-44,-49,39,-48,15,-21,137,-79,94,23,-106,102,"); + add("64,-21,31,128,-64,81,82,-62,72,125,-95,113,"); + add("111,-64,83,114,-43,62,54,-65,75,180,-33,68,"); + add("104,-70,91,75,-72,87,52,-95,106,89,-78,99,"); + add("92,-69,91,5,-84,88,28,-42,50,48,-41,54,"); + add("4,-88,93,43,-78,93,-69,-50,36,-151,-62,32,"); + add("-151,13,-47,-142,-55,28,-128,-40,15,-81,-36,22,"); + add("-166,-20,-10,-139,5,-32,-122,48,-75,-90,81,-102,"); + add("-75,81,-98,-121,75,-99,-19,93,-100,-36,101,-109,"); + add("-26,116,-123,95,51,-36,-142,51,-74,-6,106,-106,"); + add("64,76,-66,-8,10,-11,-117,26,-43,-130,40,-58,"); + add("-86,73,-83,130,90,-69,113,80,-60,71,52,-39,"); + add("-183,-124,91,-130,-69,48,-122,-15,-2,-89,-14,2,"); + add("-131,22,-38,101,77,-61,147,37,-17,75,28,-16,"); + add("-148,29,-47,47,27,-20,-128,29,-44,-120,64,-75,"); + add("-75,86,-89,-59,105,-105,-82,82,-84,-50,84,-81,"); + add("-93,114,-114,49,50,-39,"); + add(""); + //add("/*22*/"); + add("75,1,27917,-4121,-10180,"); + add("-55,-66,-125,-56,-60,-126,-57,-37,-134,-56,-23,-138,"); + add("-57,-18,-139,-57,-16,-138,-52,10,-134,-62,-21,-142,"); + add("-61,-38,-134,-55,13,-137,-48,51,-133,-62,-38,-130,"); + add("-64,-61,-123,-62,-52,-121,-63,-24,-134,-50,5,-112,"); + add("41,208,16,8,151,-34,46,99,69,64,39,130,"); + add("58,-28,139,58,-13,139,55,6,125,62,60,126,"); + add("35,106,46,37,122,49,42,130,59,62,14,144,"); + add("57,36,129,58,46,132,53,31,124,56,17,137,"); + add("49,109,92,42,-55,128,5,-142,61,33,-69,114,"); + add("52,21,133,54,10,146,53,21,139,49,-6,144,"); + add("49,22,134,52,36,139,37,135,61,50,96,115,"); + add("46,11,137,45,32,130,49,64,129,44,70,117,"); + add("32,-31,117,40,-15,136,44,24,140,45,29,144,"); + add("27,-48,110,-1,-141,51,9,-110,80,19,-109,115,"); + add("9,-45,53,-52,-16,-181,-41,3,-146,-48,-63,-137,"); + add("-36,-68,-93,-17,-140,4,-49,-31,-150,-46,-12,-146,"); + add("-49,-24,-145,-48,-52,-130,-49,-60,-128,-51,-35,-140,"); + add("-46,9,-142,-41,48,-142,-48,-18,-133,-52,-9,-148,"); + add("-52,-31,-132,-42,-26,-108,"); + add(""); + //add("/*23*/"); + add("73,1,11139,23963,-14202,"); + add("89,-95,-89,96,-86,-67,88,-87,-74,62,-93,-103,"); + add("27,-75,-102,-2,-91,-146,41,-93,-115,103,-92,-64,"); + add("82,-97,-84,49,-95,-108,72,-97,-91,71,-97,-90,"); + add("86,-97,-78,85,-98,-77,102,-97,-62,46,-94,-100,"); + add("21,-93,-116,65,-102,-94,106,-97,-53,82,-103,-79,"); + add("46,-100,-102,94,-101,-63,99,-102,-60,50,-103,-98,"); + add("-12,-80,-115,-153,136,60,-137,87,12,-101,-27,-114,"); + add("-59,-43,-100,5,-82,-103,-106,161,132,58,36,92,"); + add("-16,109,132,-15,93,115,18,72,113,-37,101,112,"); + add("-80,99,76,-103,98,60,-102,95,58,-98,96,63,"); + add("-108,86,43,-123,40,-33,-120,-28,-129,-46,-66,-128,"); + add("-22,-79,-126,-11,-17,-32,10,103,152,-23,94,117,"); + add("-41,96,110,-32,94,113,-21,90,119,-28,91,115,"); + add("-49,95,107,-44,93,110,-39,90,110,-28,92,123,"); + add("-42,94,116,-47,86,103,-77,88,84,-61,43,25,"); + add("-122,144,145,-50,96,124,-25,80,115,-34,76,105,"); + add("-87,97,101,32,59,126,80,-38,-4,18,-93,-149,"); + add("66,-71,-71,143,-69,-8,122,-18,64,55,-58,-55,"); + add(""); + //add("/*24*/"); + add("68,1,24092,5088,-17137,"); + add("14,-98,-10,-5,-145,-48,33,-140,7,93,-40,121,"); + add("96,-9,134,49,-171,25,57,-37,72,72,-13,102,"); + add("56,-137,47,123,-90,158,-21,70,-12,-5,154,32,"); + add("54,76,103,63,-11,91,88,-70,116,54,-134,47,"); + add("83,-56,112,82,-37,119,74,-87,95,36,-142,21,"); + add("41,-143,30,42,-141,33,-57,-49,-101,-54,145,-53,"); + add("-54,139,-51,-58,116,-63,-56,-80,-107,-75,2,-114,"); + add("-74,-50,-126,-60,146,-55,-78,-17,-121,-65,-72,-115,"); + add("-30,-130,-74,58,-132,56,28,-144,10,-1,-148,-32,"); + add("-21,-132,-58,-60,-86,-105,-70,-71,-115,-78,-52,-121,"); + add("-71,72,-88,-25,-40,-43,3,-135,-19,-55,-11,-80,"); + add("-62,126,-66,-30,143,-15,18,145,53,41,111,80,"); + add("-43,155,-30,-89,144,-92,-48,-107,-90,-25,-135,-62,"); + add("-6,-187,-45,-28,47,-29,-26,172,-2,-61,91,-64,"); + add("-61,132,-55,-17,146,9,25,128,63,-10,163,25,"); + add("4,129,36,30,118,71,-41,143,-19,15,171,66,"); + add("51,99,98,43,85,85,56,91,104,"); + add(""); + //add("/*25*/"); + add("68,1,-3077,27485,11624,"); + add("-135,-30,35,-65,39,-111,-105,10,-54,-99,-64,121,"); + add("-154,-21,2,-120,1,-38,-66,-57,110,-20,0,-4,"); + add("-33,53,-136,-80,19,-73,-139,-60,93,-102,32,-111,"); + add("-81,-55,100,-91,-36,52,-127,-52,72,-35,8,-32,"); + add("-7,58,-140,67,56,-108,-25,45,-117,-63,49,-144,"); + add("-114,16,-88,21,-24,67,-45,-62,133,-100,18,-85,"); + add("-92,-30,34,-25,-40,85,-48,-17,20,-111,-25,13,"); + add("-18,-25,52,131,3,50,151,20,17,116,-18,89,"); + add("-92,-52,85,59,-27,87,-70,-19,17,-141,-8,-40,"); + add("-184,-28,-14,47,-17,60,159,-3,75,33,-37,97,"); + add("90,-9,58,-7,-32,70,-65,-57,100,-173,-51,44,"); + add("79,-27,92,165,9,44,126,-28,110,44,-40,104,"); + add("116,-19,81,130,-23,95,170,15,27,110,36,-41,"); + add("101,29,-31,152,19,8,146,34,-28,138,43,-54,"); + add("144,30,-24,160,37,-36,77,51,-91,115,46,-73,"); + add("38,28,-52,37,37,-73,19,40,-85,-72,46,-121,"); + add("-70,39,-109,-20,60,-144,37,49,-104,"); + add(""); + //add("/*26*/"); + add("58,1,-26874,10130,8671,"); + add("-30,19,-117,-23,66,-151,-42,6,-144,-51,-24,-138,"); + add("-43,-88,-36,31,-48,163,11,-85,140,-45,-130,7,"); + add("-25,-118,58,4,-100,125,-32,-83,-7,-62,-49,-143,"); + add("-43,6,-149,-37,19,-145,-34,20,-136,-35,25,-152,"); + add("-32,27,-147,-55,-103,-67,2,-78,105,18,-88,166,"); + add("54,57,120,44,9,138,34,-28,142,40,-11,145,"); + add("50,23,132,51,8,154,28,-48,138,-3,-114,107,"); + add("-6,-95,79,34,16,85,63,116,69,64,135,53,"); + add("68,67,128,18,-60,109,53,-3,152,69,87,106,"); + add("54,3,144,53,-1,142,48,-14,141,27,-65,128,"); + add("48,29,96,70,121,68,2,113,-98,-17,86,-124,"); + add("-46,19,-139,-52,52,-189,58,60,97,-4,42,-55,"); + add("-57,-7,-146,0,99,-97,-7,69,-95,-41,28,-142,"); + add("-35,39,-140,-28,57,-142,-55,-27,-132,-47,19,-160,"); + add("-67,-83,-107,"); + add(""); + //add("/*27*/"); + add("56,1,12962,21402,-16551,"); + add("83,-38,16,93,-94,-47,24,-103,-113,56,-107,-91,"); + add("92,-105,-58,75,-108,-76,119,-90,-15,74,-104,-67,"); + add("76,-102,-64,114,-19,69,123,34,142,74,-101,-62,"); + add("123,-89,-5,138,-68,34,93,-120,-65,-16,-90,-120,"); + add("45,-102,-82,78,-121,-75,-106,20,-66,-130,85,-8,"); + add("-111,-5,-96,-35,58,38,51,73,126,74,50,120,"); + add("-52,98,73,-114,32,-57,-59,-67,-127,-156,66,-47,"); + add("-124,18,-77,-72,-56,-123,-64,-63,-122,-78,-53,-119,"); + add("-108,-43,-130,-113,119,50,-117,97,24,-127,81,-1,"); + add("-135,60,-29,-130,-6,-100,-136,31,-61,-222,90,-51,"); + add("53,27,67,-12,111,120,-41,101,89,-122,116,52,"); + add("50,-4,30,133,-79,0,125,-16,70,73,54,116,"); + add("107,29,113,63,62,122,53,69,124,39,77,125,"); + add("17,88,122,19,86,122,28,80,125,"); + add(""); + //add("/*28*/"); + add("49,1,-6596,29135,-2761,"); + add("64,5,-105,143,26,-49,-45,-23,-137,-7,-11,-80,"); + add("-52,-24,-120,-117,-14,109,-4,-7,-48,12,-16,-167,"); + add("-112,-12,117,-20,-17,-107,15,-13,-142,-115,-29,-16,"); + add("-102,-10,120,-70,-4,110,64,35,178,-97,-24,-2,"); + add("-46,4,143,-51,3,152,-58,-16,-15,11,-11,-139,"); + add("-6,-17,-145,-41,-26,-149,-146,-33,37,-68,-3,132,"); + add("2,16,151,51,28,150,21,17,128,12,17,157,"); + add("-43,0,130,-45,0,144,64,25,116,130,38,77,"); + add("128,36,64,141,33,-25,-48,-21,-136,56,7,-87,"); + add("145,32,-32,156,37,20,155,37,21,5,-7,-104,"); + add("-96,-31,-111,-131,-29,5,-136,-35,-40,-164,-37,32,"); + add("-15,-13,-109,72,4,-146,157,33,-47,128,29,-12,"); + add(""); + //add("/*29*/"); + add("50,1,-2179,24668,16933,"); + add("-94,-47,56,-114,2,-19,-121,-63,74,-71,-57,72,"); + add("55,-51,81,-74,-79,100,-74,-24,23,-140,1,-23,"); + add("-215,-15,-16,15,-80,115,25,-50,74,-131,-82,90,"); + add("69,-50,81,176,-48,94,-77,-77,92,-116,-97,110,"); + add("78,-13,30,150,24,-7,-7,-19,24,-155,-21,3,"); + add("-117,-60,58,-114,-68,70,-67,-96,113,136,-15,44,"); + add("-56,-41,42,101,-3,22,-24,-38,44,40,-22,35,"); + add("140,9,12,156,30,-14,130,61,-59,134,30,-19,"); + add("124,54,-53,169,33,-22,148,16,-3,87,67,-77,"); + add("60,91,-113,54,87,-110,-12,100,-135,4,79,-107,"); + add("-34,87,-123,50,59,-77,130,54,-61,66,69,-90,"); + add("-38,83,-120,-40,70,-104,-66,70,-108,-232,-9,-14,"); + add("-56,48,-76,"); + add(""); + //add("/*30*/"); + add("50,1,-8496,-28645,2696,"); + add("6,7,97,49,0,144,24,8,146,-32,25,135,"); + add("-71,36,135,-115,45,86,-123,47,78,-138,48,41,"); + add("-135,49,46,-138,49,36,-143,49,26,-145,47,-16,"); + add("-142,48,4,-141,51,18,-144,51,5,-134,43,-34,"); + add("-154,58,22,-65,9,-110,10,-22,-149,67,-40,-132,"); + add("140,-51,-5,133,-47,2,131,-52,-59,147,-52,-17,"); + add("62,-38,-146,114,-35,26,94,-18,115,144,-49,-11,"); + add("-14,-13,-167,-62,6,-134,96,-33,-22,-1,-9,-91,"); + add("43,-21,-74,-3,-8,-95,16,-15,-117,27,-18,-104,"); + add("129,-41,-1,104,-23,110,-59,29,117,5,7,92,"); + add("-49,28,130,53,-10,69,122,-30,76,62,-26,-69,"); + add("82,-16,90,54,-17,-7,-33,-5,-145,-65,6,-150,"); + add("110,-37,-35,"); + add(""); + //add("/*31*/"); + add("48,1,-16082,-24523,6323,"); + add("62,-6,135,71,-10,133,70,-10,134,98,-29,121,"); + add("35,19,149,50,7,135,-18,47,120,-72,37,-32,"); + add("-70,7,-129,-108,41,-100,-120,59,-71,-114,52,-85,"); + add("-119,59,-75,-119,66,-48,-126,76,-37,-158,98,-42,"); + add("-90,76,48,-125,77,-41,-60,16,-96,-79,27,-111,"); + add("6,-32,-100,10,-53,-177,66,-69,-86,106,-91,-66,"); + add("77,-31,92,56,6,173,62,-71,-105,26,-52,-137,"); + add("124,-87,-10,104,-47,95,106,-45,107,63,-54,-47,"); + add("-33,17,-21,-78,27,-102,-70,21,-104,-120,44,-157,"); + add("127,-72,60,-25,-5,-96,-64,3,-173,-15,-21,-138,"); + add("61,-36,23,33,3,116,90,-31,126,78,-22,127,"); + add("38,8,137,98,-37,112,48,5,145,"); + add(""); + //add("/*32*/"); + add("48,-1,-13245,26217,-6103,"); + add("-33,17,145,9,34,134,88,65,92,-23,16,132,"); + add("-12,24,141,56,55,134,71,62,134,67,53,99,"); + add("20,37,146,-27,10,130,31,23,44,30,2,-71,"); + add("45,45,128,43,-2,-129,7,-27,-165,-8,-15,-61,"); + add("47,61,209,-28,10,131,-81,-16,134,-34,-3,80,"); + add("147,46,-148,50,-2,-145,-7,-31,-150,-67,-54,-119,"); + add("-76,-59,-114,-44,-49,-140,20,-21,-151,57,0,-131,"); + add("122,46,-65,113,36,-81,117,32,-108,125,38,-90,"); + add("10,-8,-59,-144,-53,65,-133,-61,10,-154,-69,24,"); + add("-2,-31,-133,-11,-33,-121,-82,-67,-111,-15,-28,-88,"); + add("70,3,-126,39,-12,-127,20,0,-39,-135,-43,95,"); + add("-98,-23,100,-103,-25,110,-57,2,125,"); + add(""); + //add("/*33*/"); + add("47,1,-6930,29187,-252,"); + add("-51,-13,-133,84,20,-8,117,26,-82,65,13,-132,"); + add("-2,-5,-157,-116,-27,-23,-134,-30,78,-112,-25,89,"); + add("-11,1,173,-70,-16,98,-136,-33,52,-146,-37,22,"); + add("-139,-36,-46,-134,-35,28,-161,-44,34,-27,-6,117,"); + add("-79,-21,134,90,24,168,-115,-32,93,2,-2,158,"); + add("22,5,108,34,6,130,-10,-5,92,109,26,166,"); + add("-73,-24,108,-11,-8,138,67,12,154,164,41,55,"); + add("91,26,-33,146,35,46,85,27,-99,66,22,-142,"); + add("32,14,-143,-39,-5,-156,-64,-13,-131,-91,-20,-132,"); + add("-61,-15,-91,53,16,-144,-4,1,-154,36,9,-107,"); + add("132,34,-37,32,8,-118,82,20,-41,55,14,123,"); + add("133,32,-108,101,24,-60,"); + add(""); + //add("/*34*/"); + add("48,1,1042,29488,5419,"); + add("98,-20,87,52,-28,136,48,-30,145,90,-18,74,"); + add("119,-22,80,56,21,-116,10,26,-136,46,1,-20,"); + add("77,-17,65,58,4,-37,18,-24,117,-127,-21,144,"); + add("-84,-16,96,66,-25,107,145,9,-82,87,-4,-10,"); + add("-100,-22,137,57,-12,41,-157,-3,54,75,-34,135,"); + add("146,-18,44,54,-16,58,120,-27,82,3,44,-197,"); + add("-15,34,-151,32,26,-132,-23,34,-158,6,27,-135,"); + add("-22,32,-159,62,22,-133,69,16,-114,-170,29,-92,"); + add("-124,18,-61,-124,26,-103,-78,29,-141,-134,10,-20,"); + add("-23,-23,141,58,-27,135,68,-27,132,-9,-7,38,"); + add("-96,31,-142,-74,27,-129,-76,1,11,-52,-14,94,"); + add("-74,27,-137,-106,-7,63,-63,-14,94,"); + add(""); + //add("/*35*/"); + add("44,-1,14587,-2200,26122,"); + add("18,-53,-14,-39,-136,9,-28,-156,1,7,-151,-19,"); + add("52,-138,-43,34,-136,-35,-65,-137,21,28,-129,-31,"); + add("52,-143,-48,40,-135,-40,75,-119,-60,98,-83,-68,"); + add("86,-101,-64,19,-146,-33,37,-140,-44,83,-113,-67,"); + add("-4,-196,-31,100,-60,-69,118,-90,-87,54,91,-17,"); + add("-44,128,50,-47,126,49,-53,138,54,-57,134,55,"); + add("-15,150,31,-10,135,26,-63,145,57,-85,114,65,"); + add("-118,38,73,-68,131,56,69,122,-25,18,132,6,"); + add("-48,139,43,18,150,5,-67,130,52,3,147,12,"); + add("-9,143,18,-54,138,43,-47,140,37,-31,192,31,"); + add("-63,-85,29,-21,-147,1,-15,-153,-4,"); + add(""); + //add("/*36*/"); + add("44,-1,15944,24781,-5628,"); + add("93,-52,33,124,-87,-25,126,-79,19,127,-81,15,"); + add("127,-78,31,126,-81,22,126,-81,26,115,-62,80,"); + add("121,-74,51,111,-60,83,122,-74,64,118,-78,32,"); + add("107,-60,81,101,-54,99,119,-77,53,109,-66,77,"); + add("84,-39,121,67,-26,127,73,-22,171,52,-52,-63,"); + add("-4,-26,-148,-53,14,-135,-74,29,-129,-81,36,-126,"); + add("-113,69,-72,-121,88,-11,-87,45,-87,-77,36,-94,"); + add("-102,53,-98,-84,33,-122,-109,58,-87,-116,73,-41,"); + add("-107,52,-101,-84,68,40,-92,63,-6,-26,-2,-86,"); + add("-130,82,-29,-117,83,11,-119,89,37,-124,82,-1,"); + add("-123,85,16,-125,86,20,-122,95,65,"); + add(""); + //add("/*37*/"); + add("44,1,6601,28935,4379,"); + add("16,-21,118,74,-36,115,54,-21,53,5,-26,150,"); + add("77,-36,110,77,-8,-64,63,-35,120,137,-8,-153,"); + add("99,-9,-94,-67,34,-105,-78,32,-79,1,17,-112,"); + add("-95,35,-77,-28,26,-131,-93,35,-87,-13,23,-140,"); + add("-53,31,-142,-50,24,-95,-39,28,-148,-21,25,-161,"); + add("-7,20,-157,6,15,-149,-10,18,-150,-12,18,-148,"); + add("-31,21,-151,-53,22,-115,-115,35,-98,-143,30,10,"); + add("-62,2,131,40,-23,150,77,-27,112,14,-20,162,"); + add("-14,-14,160,-51,-2,116,-35,-8,136,20,-18,110,"); + add("-6,-21,176,29,-27,157,59,-32,142,15,-21,127,"); + add("45,-28,124,126,-39,69,80,-10,-54,"); + add(""); + //add("/*38*/"); + add("42,-1,-10564,27211,-6925,"); + add("-102,-15,98,-92,-3,131,66,56,126,44,48,128,"); + add("-57,9,136,-104,-63,-95,-54,-66,-186,-40,2,75,"); + add("9,41,155,35,51,160,133,62,44,-1,29,132,"); + add("-131,-12,184,91,59,109,63,45,100,124,63,73,"); + add("24,-12,-107,-3,-29,-133,85,0,-151,111,20,-101,"); + add("62,43,91,5,40,175,101,33,-17,61,-4,-125,"); + add("29,-22,-150,4,-30,-141,29,-27,-165,44,-16,-138,"); + add("31,-22,-139,26,-52,-249,-70,-3,91,-103,-4,137,"); + add("-17,20,107,-68,9,145,-127,-29,83,-63,-37,-57,"); + add("112,8,-146,-59,-26,-18,-81,-51,-84,-38,-43,-113,"); + add("-39,-46,-124,"); + add(""); + //add("/*39*/"); + add("42,-1,15744,-1075,25514,"); + add("6,-136,-9,63,-186,-49,95,83,-55,94,90,-55,"); + add("119,-70,-79,97,-30,-63,12,-169,-17,55,17,-35,"); + add("-7,158,13,95,44,-59,122,-38,-82,132,139,-81,"); + add("-154,62,105,36,92,-19,83,111,-51,82,122,-51,"); + add("58,107,-36,70,141,-44,14,129,-6,26,143,-16,"); + add("116,32,-79,133,71,-91,-25,92,18,-136,-72,93,"); + add("-92,61,63,-65,100,44,-74,99,49,-106,9,71,"); + add("-92,63,61,-106,-54,69,-100,-66,66,-117,11,75,"); + add("-123,-63,78,-116,-49,73,-53,-98,33,-59,-142,36,"); + add("-45,-145,26,35,-135,-25,-5,-167,0,-37,-133,19,"); + add("-39,-149,18,"); + add(""); + //add("/*40*/"); + add("41,-1,10098,22921,16512,"); + add("73,-48,22,138,-59,-3,139,-57,-9,146,-60,-11,"); + add("142,-45,-30,126,-12,-66,134,-54,-16,141,-51,-25,"); + add("138,-54,-20,147,-37,-50,94,-98,68,58,-99,93,"); + add("28,-94,108,-126,-8,97,-117,-8,91,-8,-77,107,"); + add("-15,-95,133,-18,-79,114,-148,-47,156,50,10,-45,"); + add("121,26,-112,31,60,-98,25,112,-163,21,49,-78,"); + add("108,22,-104,142,-26,-64,12,61,-90,-98,100,-65,"); + add("-59,95,-88,-67,119,-116,-45,3,27,-138,24,63,"); + add("-147,67,8,-111,47,11,-158,44,44,-137,49,23,"); + add("-164,88,-15,-109,6,60,-145,39,38,-141,48,21,"); + add(""); + //add("/*41*/"); + add("41,1,13989,-2192,-26448,"); + add("86,-38,49,159,11,84,-19,-147,3,-25,-168,2,"); + add("103,-47,60,110,-69,67,65,-124,49,84,-90,56,"); + add("118,-11,68,123,-16,72,99,59,50,-6,147,-20,"); + add("43,4,25,33,-150,35,103,-59,67,125,-26,76,"); + add("126,17,72,128,20,76,129,3,77,96,-39,64,"); + add("-67,-118,-28,-129,-48,-73,-115,-87,-58,-94,-19,-54,"); + add("-126,-33,-70,-108,-70,-55,-133,3,-77,-126,3,-73,"); + add("-125,47,-77,-109,65,-69,-126,46,-76,-104,90,-67,"); + add("-74,114,-54,-136,14,-74,-116,80,-71,47,156,9,"); + add("-83,70,-51,-84,109,-55,3,156,-13,72,103,29,"); + add(""); + //add("/*42*/"); + add("42,-1,119,4674,29633,"); + add("-31,-95,15,-26,-156,24,18,-132,19,-62,-159,23,"); + add("-136,104,-15,-64,53,-8,-123,30,-5,-88,126,-20,"); + add("-38,71,-11,-139,147,-25,-6,-84,13,-198,-34,1,"); + add("59,0,1,140,-44,10,126,-68,12,76,-142,22,"); + add("77,-71,11,119,-34,6,90,-119,17,-168,-97,12,"); + add("162,-8,2,59,-58,8,85,-120,15,-8,-136,17,"); + add("-64,-114,14,-133,-14,1,-143,29,-4,5,-38,4,"); + add("141,-66,9,144,-85,10,53,-82,9,12,12,-1,"); + add("65,176,-20,5,123,-15,18,141,-17,-3,172,-22,"); + add("-15,165,-22,-40,106,-15,22,154,-22,-38,130,-19,"); + add("37,142,-22,"); + add(""); + //add("/*43*/"); + add("38,-1,16496,-5129,24527,"); + add("30,-143,-51,63,-127,-70,-14,-142,-22,-2,-152,-34,"); + add("-16,-147,-24,6,-147,-40,-37,-135,-8,-79,-127,21,"); + add("-32,-147,-17,40,-121,-59,23,-149,-56,4,-137,-41,"); + add("-17,-147,-30,65,-116,-79,-4,-132,-36,-3,-139,-41,"); + add("80,-8,-57,66,36,-35,90,-60,-82,-28,223,88,"); + add("-65,92,72,4,149,41,4,148,40,24,146,23,"); + add("-14,143,49,31,146,18,82,121,-26,40,144,9,"); + add("-26,133,51,-64,103,69,-7,139,38,15,147,24,"); + add("-7,146,38,-7,149,37,-52,127,62,-73,108,73,"); + add("-84,19,60,"); + add(""); + //add("/*44*/"); + add("38,-1,18721,21147,10116,"); + add("-41,87,-107,-98,62,52,-143,106,36,-110,75,41,"); + add("-97,105,-49,-39,91,-123,-46,84,-102,-82,96,-61,"); + add("-35,-57,189,-109,39,111,-41,-10,94,-11,-64,155,"); + add("88,-98,52,-75,4,120,98,-117,73,-45,9,59,"); + add("-82,2,132,31,-83,115,63,-100,91,55,-99,103,"); + add("60,-102,97,96,-108,48,92,-108,53,108,-100,10,"); + add("112,-125,47,61,31,-157,50,-8,-69,81,-13,-111,"); + add("107,-67,-56,78,-43,-52,35,42,-143,60,12,-128,"); + add("7,52,-114,-103,91,4,-42,103,-130,-71,104,-81,"); + add("-14,51,-79,"); + add(""); + //add("/*45*/"); + add("36,1,-7108,28862,-4057,"); + add("112,21,-44,141,26,-58,70,-2,-127,59,-8,-140,"); + add("41,-15,-162,-132,-43,-72,-146,-39,-28,-93,-43,-120,"); + add("-79,-41,-127,-101,-41,-90,-99,-46,-118,-72,-42,-130,"); + add("-89,-47,-126,-104,-19,42,-139,-29,46,-140,-32,33,"); + add("-141,-45,-27,-129,-30,33,1,29,162,-10,20,126,"); + add("-22,20,151,107,46,95,125,53,110,13,24,123,"); + add("84,42,122,47,33,137,23,28,147,21,26,147,"); + add("19,25,147,47,31,140,148,38,-8,145,33,-34,"); + add("143,31,-45,90,7,-118,-2,-20,-139,"); + add(""); + //add("/*46*/"); + add("37,1,-12612,27178,1511,"); + add("72,38,-86,51,30,-137,29,20,-140,86,43,-98,"); + add("125,58,-54,2,5,-97,-129,-57,-48,-136,-62,-7,"); + add("-142,-65,0,-127,-59,-16,-136,-65,-10,-141,-68,27,"); + add("-101,-46,-110,-135,-65,-67,-7,-7,122,43,17,161,"); + add("-73,-39,70,-138,-70,15,-30,-19,113,92,41,116,"); + add("125,59,68,102,44,111,135,64,33,21,3,114,"); + add("-78,-46,138,-81,-44,78,-23,-22,149,-10,-16,146,"); + add("117,48,114,81,43,-43,56,36,-114,-34,-6,-149,"); + add("48,26,-31,141,69,-32,100,54,-100,42,28,-134,"); + add(""); + //add("/*47*/"); + add("37,1,29276,3899,5265,"); + add("22,-156,-12,20,-148,-7,25,-149,-40,23,-141,-38,"); + add("27,-130,-71,29,-62,-133,23,8,-143,17,59,-142,"); + add("16,48,-138,12,78,-134,5,102,-112,-8,137,-61,"); + add("-14,147,-29,-24,168,21,-25,121,59,-21,105,46,"); + add("-35,154,89,-29,151,46,-24,87,73,-36,155,77,"); + add("-27,94,71,-31,125,63,-36,109,111,-35,100,108,"); + add("-9,13,37,13,-41,-33,-21,12,111,40,-94,-140,"); + add("-21,-21,139,23,-150,12,9,-135,75,20,-154,24,"); + add("13,-144,45,8,-106,45,28,-187,-8,12,-81,-7,"); + add(""); + //add("/*48*/"); + add("36,1,23365,142,-18817,"); + add("54,94,69,71,84,90,55,106,71,-89,97,-109,"); + add("-51,107,-61,5,156,13,85,6,106,83,-108,102,"); + add("38,-107,44,63,-122,77,59,53,78,-71,119,-88,"); + add("-39,126,-45,12,149,21,2,179,13,60,-35,75,"); + add("58,-128,68,26,-140,27,34,-167,38,-33,-127,-46,"); + add("-5,-131,-9,-18,-143,-27,-26,-127,-33,5,-151,6,"); + add("-42,-120,-55,-55,-125,-68,-98,-123,-122,18,69,21,"); + add("51,128,63,35,139,44,20,146,25,-13,161,-16,"); + add("-91,11,-115,-90,-33,-115,-90,-48,-113,"); + add(""); + //add("/*49*/"); + add("37,1,12054,-19593,-19257,"); + add("58,-35,73,97,-42,105,128,-35,118,76,-28,78,"); + add("119,-11,92,139,38,53,138,60,31,139,47,46,"); + add("150,29,75,20,-63,80,-55,-105,73,-90,-108,53,"); + add("-102,-105,42,-115,-92,20,-144,-146,60,-2,-74,81,"); + add("-90,-96,45,-115,-98,31,-136,-92,12,-107,-61,-2,"); + add("-121,-47,-28,-125,-31,-47,-44,57,-94,2,89,-98,"); + add("-12,104,-125,-58,4,-41,-130,-56,-20,-12,60,-73,"); + add("56,106,-82,24,102,-94,-22,103,-124,4,65,-66,"); + add("55,112,-84,57,124,-94,51,106,-79,89,97,-43,"); + add(""); + //add("/*50*/"); + add("35,-1,19917,21699,5700,"); + add("29,-54,98,74,-89,80,71,-89,81,117,-98,-43,"); + add("149,-117,-89,-65,77,-55,-92,102,-55,-66,74,-48,"); + add("-63,79,-75,-15,46,-128,-73,99,-122,-7,36,-126,"); + add("0,20,-82,55,-15,-153,24,8,-132,59,-21,-154,"); + add("38,-6,-140,57,-21,-152,56,-26,-134,24,4,-131,"); + add("12,19,-164,-98,108,-91,-24,0,117,13,-42,160,"); + add("-47,15,150,-32,3,135,-31,-10,186,-40,10,120,"); + add("-62,32,114,-59,24,133,-18,-19,153,-60,19,148,"); + add("-14,-23,145,51,-77,121,"); + add(""); + //add("/*51*/"); + add("41,1,-4651,29635,-334,"); + add("-52,-9,-74,-147,-23,34,-42,-8,-77,-99,-18,-81,"); + add("-123,-20,85,-33,-7,-116,-111,-20,-20,-90,-14,125,"); + add("-50,-10,-19,-114,-21,-33,-8,1,154,-26,-4,153,"); + add("-56,-10,94,-19,-3,3,-17,-5,-154,-57,-12,-126,"); + add("-136,-26,27,-122,-24,97,-135,-27,24,-69,-14,135,"); + add("99,21,106,-44,-9,81,29,6,59,132,26,32,"); + add("192,38,20,-76,-15,25,68,13,79,90,16,80,"); + add("176,33,59,66,14,-123,115,21,-51,121,22,-35,"); + add("132,23,-23,-34,-5,-74,72,12,-59,92,16,-81,"); + add("130,21,-85,143,23,-50,127,19,-77,-47,-8,-78,"); + add(""); + //add("/*52*/"); + add("36,-1,-17857,23953,-2714,"); + add("-69,-60,-74,-114,-77,71,-109,-75,72,-111,-79,56,"); + add("-48,-29,82,11,18,91,-92,-64,75,-104,-78,30,"); + add("-34,-17,108,-110,-89,-23,-114,-97,-55,-121,-99,-25,"); + add("-87,-64,75,84,79,111,148,122,32,97,77,3,"); + add("108,81,-59,113,84,-44,119,88,-48,109,83,-14,"); + add("127,93,-33,122,88,-40,115,85,-19,118,82,-46,"); + add("120,84,-39,117,82,-19,111,82,21,20,10,-41,"); + add("-121,-93,-68,-89,-63,17,41,6,-221,-119,-96,-77,"); + add("-111,-88,-54,-84,-51,93,-21,-2,111,"); + add(""); + //add("/*53*/"); + add("35,1,18868,16148,-16830,"); + add("-118,111,-25,-43,93,43,11,86,96,13,65,80,"); + add("-48,105,49,114,-9,121,18,89,111,17,51,71,"); + add("110,-37,91,106,-88,33,119,-56,84,104,-67,55,"); + add("59,-94,-25,14,-90,-75,31,-109,-72,-118,47,-94,"); + add("-89,136,32,1,-144,-144,42,-99,-48,106,-129,-3,"); + add("109,-104,29,50,-132,-68,70,-135,-46,-4,-81,-81,"); + add("-71,16,-68,-57,139,63,-46,8,-45,42,-135,-77,"); + add("28,-89,-51,-151,124,-59,-109,73,-57,-77,126,31,"); + add("-77,126,31,-79,109,15,"); + add(""); + //add("/*54*/"); + add("34,-1,-21907,20246,3192,"); + add("-62,-57,-63,-62,-48,-135,-75,-66,-110,-9,14,-170,"); + add("89,99,-5,37,16,170,72,80,-15,8,22,-95,"); + add("-99,-99,-67,-102,-102,-62,-104,-108,-58,-69,-101,179,"); + add("-23,-35,65,4,-14,128,45,28,147,34,15,146,"); + add("79,69,114,66,51,126,59,41,134,78,57,154,"); + add("53,39,99,73,56,121,83,67,108,86,73,96,"); + add("96,95,30,-4,7,-52,-61,-36,-142,-38,-12,-144,"); + add("-92,-70,-152,-38,-33,-48,-3,24,-148,-11,13,-148,"); + add("-54,-35,-133,"); + add(""); + //add("/*55*/"); + add("35,-1,16309,24931,-3533,"); + add("24,-3,89,102,-57,80,68,-50,-39,119,-92,-89,"); + add("3,-15,-89,113,-84,-51,-16,8,-19,-118,83,21,"); + add("-65,59,106,-107,77,39,-82,40,-99,-36,5,-122,"); + add("95,-76,-91,106,-81,-69,108,-83,-62,121,-82,-3,"); + add("117,-79,4,120,-91,-49,114,-76,25,143,-110,-53,"); + add("45,-39,-40,151,-125,-101,-105,68,-46,-62,57,77,"); + add("-92,82,95,-114,79,-6,-96,70,18,-103,81,65,"); + add("-121,83,-3,-122,84,8,-113,84,57,-102,78,64,"); + add("-130,97,79,-13,30,141,"); + add(""); + //add("/*56*/"); + add("34,1,-15019,23246,-11578,"); + add("109,18,-104,-8,-59,-108,-129,-62,43,-61,-2,74,"); + add("-119,-114,-69,-118,-32,90,-114,-45,62,-120,-54,54,"); + add("-76,-47,10,-63,-67,-48,-110,-26,101,-106,-69,10,"); + add("-122,-55,61,-65,16,124,-4,20,46,-69,-112,-125,"); + add("-155,-65,94,-104,-37,77,-117,-37,99,-52,21,122,"); + add("94,83,26,134,97,-1,115,80,-6,112,50,-61,"); + add("129,45,-96,120,79,-9,126,83,-9,123,85,1,"); + add("117,61,-36,110,26,-100,108,20,-106,110,25,-95,"); + add("117,39,-76,"); + add(""); + //add("/*57*/"); + add("31,1,24179,-4896,-17070,"); + add("-65,75,-114,-78,42,-120,-77,49,-120,-76,50,-118,"); + add("-72,60,-113,-75,58,-116,-73,68,-113,-20,115,-55,"); + add("105,9,137,84,-42,122,87,-6,119,85,-18,122,"); + add("87,-9,122,82,-28,122,76,-55,122,38,-121,87,"); + add("63,-80,112,67,-61,115,75,-44,123,64,-73,116,"); + add("48,-105,102,6,-142,53,-20,-122,10,-9,-116,25,"); + add("-88,19,-138,-65,66,-119,-79,37,-127,-50,101,-104,"); + add("-46,108,-98,-25,98,-65,"); + add(""); + //add("/*58*/"); + add("32,-1,13075,24485,11382,"); + add("-40,52,-67,14,58,-144,17,52,-134,58,32,-141,"); + add("64,23,-131,84,3,-110,29,56,-168,-70,28,21,"); + add("28,-54,92,-76,-21,143,-85,-7,120,-75,-15,123,"); + add("-112,2,128,48,-60,76,21,-74,139,51,-82,117,"); + add("6,-62,126,108,-94,76,136,-62,-25,95,-80,56,"); + add("132,-88,31,-6,-35,77,19,-10,-1,87,45,-194,"); + add("-90,24,57,-82,74,-60,-55,107,-160,-47,-20,96,"); + add("-93,19,67,-130,74,-7,6,68,-152,"); + add(""); + //add("/*59*/"); + add("29,1,-3768,-29624,2870,"); + add("45,4,94,51,8,142,59,8,138,57,8,140,"); + add("32,14,147,-48,21,129,-31,19,118,-91,29,135,"); + add("-153,28,63,-79,26,117,-175,25,11,-15,23,147,"); + add("-106,32,113,-149,24,16,-144,16,-43,-99,-1,-109,"); + add("-16,-19,-150,25,-24,-149,63,-27,-134,90,-29,-121,"); + add("104,-29,-106,115,-28,-96,77,-26,-128,55,-24,-143,"); + add("18,-17,-146,25,-18,-143,94,-24,-118,135,-18,2,"); + add(""); + //add("/*60*/"); + add("30,1,-8205,28819,-1455,"); + add("-49,-18,-95,-107,-35,-74,-126,-34,63,-131,-39,-8,"); + add("-112,-37,-59,28,1,-121,135,35,-82,-84,-32,-116,"); + add("-139,-40,39,-129,-35,72,-87,-21,110,-125,-35,71,"); + add("-130,-38,69,-142,-45,39,-90,-25,91,165,60,100,"); + add("-39,-7,122,87,34,140,111,37,34,135,43,22,"); + add("151,48,-12,99,28,-61,93,23,-132,107,34,45,"); + add("114,37,99,118,37,66,92,23,-93,-35,-17,-168,"); + add("71,16,-104,"); + add(""); + //add("/*61*/"); + add("29,1,7341,28492,5857,"); + add("97,-32,32,101,-8,-91,129,-14,-97,162,-48,17,"); + add("98,-50,115,136,-21,-86,121,-12,-115,86,-3,-109,"); + add("72,-2,-102,-8,21,-96,-159,39,35,-146,40,12,"); + add("-144,44,-24,-140,46,-37,-124,42,-50,-140,56,-98,"); + add("-76,35,-88,-83,41,-114,-72,38,-113,-150,34,21,"); + add("-99,7,103,-38,-17,146,65,-39,131,10,-25,118,"); + add("113,-37,53,95,-48,123,24,-30,120,10,-30,139,"); + add(""); + //add("/*62*/"); + add("29,-1,13904,22523,14121,"); + add("-19,93,-130,-23,88,-121,-50,95,-107,-21,87,-123,"); + add("-56,98,-110,21,65,-132,94,11,-117,-1,23,-38,"); + add("-119,33,67,-106,103,-71,-21,80,-120,-112,91,-46,"); + add("-36,86,-118,14,66,-135,29,34,-93,-62,-54,165,"); + add("2,-75,134,67,-88,88,98,-84,48,7,-77,128,"); + add("102,-95,60,3,-81,136,40,-91,114,25,-96,136,"); + add("43,-85,97,37,-90,110,16,-85,122,27,-77,97,"); + add(""); + //add("/*63*/"); + add("28,1,25599,5928,-14475,"); + add("33,-94,20,47,-160,19,25,-90,9,54,-136,45,"); + add("62,-80,82,68,-111,82,64,-115,73,67,-111,84,"); + add("64,-114,80,67,-92,92,70,-85,104,66,-104,89,"); + add("83,-190,98,-58,18,-106,-67,77,-103,-69,92,-101,"); + add("-62,118,-76,-74,76,-112,-63,115,-76,-50,130,-45,"); + add("-49,115,-48,-82,54,-127,-63,120,-70,-85,80,-120,"); + add("-20,137,18,-2,140,50,-28,146,8,"); + add(""); + //add("/*64*/"); + add("32,-1,6784,26265,12812,"); + add("67,-5,-26,37,57,-138,-28,66,-122,80,12,-69,"); + add("61,44,-129,-45,71,-128,-100,88,-136,-27,-50,125,"); + add("-98,-3,60,-133,7,57,-138,81,-102,150,-27,-21,"); + add("-68,39,-49,-93,73,-111,-118,16,28,-118,39,-26,"); + add("-94,67,-101,3,-10,21,80,-70,114,132,-63,72,"); + add("51,-75,137,30,-24,37,111,-40,28,127,-51,42,"); + add("128,-39,13,-13,-32,75,-26,-49,117,-67,10,14,"); + add("-87,2,44,-6,-49,104,157,-56,33,"); + add(""); + //add("/*65*/"); + add("26,1,23238,12726,-14073,"); + add("76,-64,69,88,-121,37,88,-105,55,84,-121,34,"); + add("85,-121,37,85,-123,38,63,-143,-15,66,-149,-15,"); + add("20,-115,-62,24,-144,-78,-22,-86,-109,2,-174,-136,"); + add("-72,113,-31,-71,134,-10,-86,111,-53,-84,118,-43,"); + add("-72,126,-15,-71,138,0,-69,136,2,-69,134,1,"); + add("-84,129,-26,-57,123,16,-79,157,9,20,93,117,"); + add("66,-5,101,"); + add(""); + //add("/*66*/"); + add("30,-1,-15626,24491,7484,"); + add("-83,-67,46,-114,-88,46,-68,-5,-126,97,105,-140,"); + add("-44,-32,12,-109,-104,110,-71,-25,-74,17,58,-157,"); + add("56,86,-168,55,54,-62,99,90,-93,-46,-30,1,"); + add("-111,-81,30,-107,-95,90,51,32,2,18,-7,67,"); + add("-44,-71,143,-29,-57,126,-127,-117,107,61,42,-4,"); + add("84,48,25,129,58,89,23,-29,138,54,-12,150,"); + add("97,37,80,1,22,-66,-33,14,-112,39,65,-125,"); + add("78,80,-95,"); + add(""); + //add("/*67*/"); + add("28,1,5003,28957,-6038,"); + add("-142,13,-55,-88,-5,-93,-122,12,-36,6,39,188,"); + add("-80,41,141,-68,3,-37,111,-44,-128,-14,-26,-135,"); + add("-116,1,-81,-120,35,77,-93,33,90,63,26,174,"); + add("99,6,101,23,27,152,62,-3,38,127,-37,-87,"); + add("58,-6,16,1,28,142,27,27,171,115,-13,30,"); + add("134,-33,-55,109,-32,-70,98,-34,-89,43,-40,-165,"); + add("3,-30,-143,-109,2,-89,-95,20,19,"); + add(""); + //add("/*68*/"); + add("26,1,7323,-10567,-27106,"); + add("121,94,-3,142,73,11,122,50,15,31,-23,18,"); + add("-79,-118,23,-100,-126,21,-116,-102,8,-99,-88,8,"); + add("-118,-114,14,-116,-87,5,-129,-67,-7,-133,-64,-7,"); + add("-148,-82,-3,-104,-89,11,-126,-59,-5,-162,-43,-21,"); + add("-51,84,-47,121,97,-12,115,83,-7,115,86,-8,"); + add("145,83,2,105,59,3,128,90,-4,105,115,-18,"); + add("106,86,-6,"); + add(""); + //add("/*69*/"); + add("26,-1,-20783,20998,5211,"); + add("-67,-40,-109,-67,-36,-125,-76,-30,-203,-20,-37,79,"); + add("-61,-46,-71,-3,31,-149,-35,-6,-136,-49,-20,-142,"); + add("-48,-19,-142,-60,-36,-128,-82,-63,-113,-105,-93,-75,"); + add("-44,-64,90,45,20,138,58,32,135,44,16,144,"); + add("25,-6,149,1,-33,149,37,2,157,44,16,125,"); + add("87,62,112,80,63,76,114,121,-22,74,80,-27,"); + add("100,72,109,"); + add(""); + //add("/*70*/"); + add("27,1,-22450,-137,19899,"); + add("-70,14,-79,-99,23,-113,-98,19,-113,-86,-40,-100,"); + add("-104,11,-123,-96,32,-113,-97,9,-116,-84,-60,-104,"); + add("-22,-179,-28,-32,-108,-41,50,-137,58,-19,-49,-25,"); + add("-30,-140,-42,56,-135,63,66,-76,77,47,77,60,"); + add("23,0,27,79,-32,94,92,11,109,82,77,100,"); + add("97,22,114,89,69,105,33,101,41,70,117,83,"); + add("32,144,39,35,156,42,"); + add(""); + //add("/*71*/"); + add("25,1,23559,-1507,-18512,"); + add("27,-75,40,43,-174,71,-57,80,-80,-63,-34,-78,"); + add("-88,-88,-102,-96,83,-128,-85,-47,-100,-97,-34,-115,"); + add("-66,45,-84,-109,-20,-130,-84,-84,-92,-92,-58,-103,"); + add("-106,-83,-115,-37,97,-53,50,123,46,60,131,59,"); + add("87,78,95,102,9,121,87,54,99,99,35,117,"); + add("97,-53,123,84,32,102,97,-3,120,94,-4,119,"); + add(""); + //add("/*72*/"); + add("25,1,25640,-4315,-14965,"); + add("31,-45,66,54,-65,113,-15,-155,20,-76,-10,-128,"); + add("-74,-2,-127,-82,-20,-132,-78,-42,-117,-79,26,-139,"); + add("-74,13,-124,-72,1,-117,-70,50,-127,-81,13,-132,"); + add("-77,64,-138,-16,182,-75,15,-33,33,65,-78,123,"); + add("50,-80,100,83,61,115,72,4,114,69,-29,120,"); + add("79,35,120,80,57,116,85,40,131,72,15,117,"); + add(""); + //add("/*73*/"); + add("25,1,6329,18585,22684,"); + add("-107,-21,47,-119,-30,56,-133,-23,54,-136,-32,61,"); + add("-142,-5,39,-143,15,24,-151,47,-3,-153,-26,57,"); + add("-110,-33,51,-5,-114,92,127,-70,27,147,-37,-4,"); + add("135,-68,21,136,-61,15,141,-32,-11,132,-59,13,"); + add("114,-83,35,151,-27,-19,56,56,-58,26,118,-100,"); + add("-68,102,-61,-5,117,-92,38,106,-95,58,104,-101,"); + add(""); + //add("/*74*/"); + add("26,-1,7748,26705,11261,"); + add("129,-68,72,75,-7,-35,137,-55,31,-13,-50,125,"); + add("-161,55,-14,49,-48,77,-43,-4,39,-135,66,-60,"); + add("2,-12,25,126,-63,59,99,-70,91,122,-60,54,"); + add("141,-38,-16,147,-75,66,-108,0,77,30,-27,38,"); + add("172,-30,-57,50,41,-128,-18,56,-112,-120,65,-62,"); + add("-126,68,-62,-106,65,-74,-69,75,-127,-124,50,-29,"); + add("-152,41,9,"); + add(""); + //add("/*75*/"); + add("24,1,14610,-1401,-26164,"); + add("-43,-57,-21,-121,-61,-64,-114,-84,-57,-111,-85,-55,"); + add("-108,-95,-52,-127,-52,-64,-100,-97,-45,-86,-118,-37,"); + add("-64,-137,-22,-14,-151,6,-73,-146,-24,-89,52,-51,"); + add("-27,143,-26,41,133,10,95,100,40,117,78,55,"); + add("94,100,41,108,104,50,105,90,50,116,72,58,"); + add("117,80,58,121,59,63,112,86,57,"); + add(""); + //add("/*76*/"); + add("25,1,26396,-4371,-13570,"); + add("27,-28,63,47,-88,120,-11,-160,33,-56,-86,-80,"); + add("-64,15,-130,-65,22,-135,-62,42,-131,-63,33,-130,"); + add("-48,80,-115,-27,-30,-40,-87,-20,-155,-63,65,-133,"); + add("31,142,11,67,-4,122,35,47,51,74,2,136,"); + add("69,92,100,70,-21,139,-48,-125,-52,-73,-63,-118,"); + add("3,-64,27,69,-13,135,70,102,98,63,32,111,"); + add(""); + //add("/*77*/"); + add("23,1,26582,10216,-9436,"); + add("30,-17,65,49,-62,75,75,-102,105,70,-87,108,"); + add("50,-116,22,46,-147,-22,35,-144,-49,-19,-79,-135,"); + add("-30,-43,-131,-46,-32,-162,-77,83,-132,-44,43,-79,"); + add("-77,97,-116,-52,90,-53,-60,147,-15,-92,167,-77,"); + add("-58,74,-78,-40,143,40,36,48,144,48,-10,118,"); + add("63,-23,148,48,1,132,"); + add(""); + //add("/*78*/"); + add("23,1,-8254,28832,-761,"); + add("-97,-27,32,-31,-10,-50,-97,-30,-58,-158,-48,-10,"); + add("-145,-44,-22,-132,-40,25,-139,-43,23,-146,-46,14,"); + add("-16,-2,144,146,49,85,167,51,-32,34,13,112,"); + add("-19,-4,154,118,38,92,128,39,47,135,41,74,"); + add("140,41,77,82,23,-61,17,4,-155,43,11,-104,"); + add("41,10,-148,-16,-8,-141,"); + add(""); + //add("/*79*/"); + add("24,-1,14884,12125,23053,"); + add("-8,-117,67,30,-56,9,26,-101,36,-42,-130,92,"); + add("-29,-120,79,-101,-11,69,-108,-19,77,-76,-80,87,"); + add("-61,-124,97,-48,-109,82,-33,-127,80,-2,-59,28,"); + add("57,166,-112,62,118,-94,74,73,-82,52,104,-83,"); + add("117,0,-73,92,82,-99,54,95,-82,72,29,-62,"); + add("-24,146,-59,-33,131,-46,-56,133,-33,"); + add(""); + //add("/*80*/"); + add("24,1,-6839,29182,-1275,"); + add("-120,-28,3,-163,-38,26,40,6,-75,150,32,-101,"); + add("-80,-22,-42,-160,-38,24,-18,-7,-50,-43,-16,-102,"); + add("-84,-21,-8,-1,8,163,1,10,202,-56,-17,-58,"); + add("-100,-29,-83,-143,-37,2,-35,-4,135,14,11,157,"); + add("134,36,49,74,22,69,135,33,-19,158,41,35,"); + add("152,36,-3,91,18,-110,41,5,-116,"); + add(""); + //add("/*81*/"); + add("22,1,3600,19765,22280,"); + add("-77,-59,64,-106,-70,78,-159,-8,31,-4,-102,89,"); + add("93,-99,72,21,-114,94,35,-110,88,-12,-117,100,"); + add("13,-132,107,38,-71,53,123,-42,16,95,103,-100,"); + add("127,4,-24,82,36,-43,7,116,-98,-1,119,-100,"); + add("-19,110,-91,7,106,-91,-6,104,-89,-74,113,-87,"); + add("-86,90,-65,"); + add(""); + //add("/*82*/"); + add("22,1,17666,16854,-17432,"); + add("58,31,90,67,45,112,127,-40,93,77,-78,4,"); + add("118,-56,71,88,35,127,118,-100,28,110,-93,28,"); + add("132,-78,69,-25,0,-27,-25,-67,-93,41,-117,-70,"); + add("-50,-92,-141,-97,70,-37,-107,106,-14,-97,92,-15,"); + add("-122,47,-83,-86,-65,-151,-117,93,-33,-118,80,-43,"); + add("-51,74,19,"); + add(""); + //add("/*83*/"); + add("23,-1,5861,26752,12246,"); + add("82,-33,32,44,-67,125,76,-64,100,4,-66,137,"); + add("-2,-60,126,26,-61,114,56,-72,119,85,-65,91,"); + add("113,19,-91,-80,25,-13,-77,59,-82,-48,72,-125,"); + add("-16,64,-126,27,80,-182,83,25,-95,1,56,-122,"); + add("-73,49,-71,-16,-45,108,-29,-53,127,-52,-5,37,"); + add("-15,55,-111,-63,57,-93,"); + add(""); + //add("/*84*/"); + add("21,-1,-14603,25601,-5597,"); + add("-10,25,142,72,67,124,9,35,145,-23,16,145,"); + add("-38,6,147,-17,20,157,8,28,124,-63,-10,152,"); + add("-54,-3,159,20,6,-30,59,11,-131,70,16,-134,"); + add("72,16,-137,31,-8,-139,65,22,-75,81,21,-120,"); + add("-49,-52,-125,-49,-56,-141,-43,-51,-128,-51,-59,-142,"); + add(""); + //add("/*85*/"); + add("22,1,-5757,29270,-3178,"); + add("-36,-18,-100,-68,-28,-130,-59,-28,-136,-54,-28,-139,"); + add("-12,-22,-151,-104,-29,-57,-107,-3,153,-77,-12,39,"); + add("-63,-5,65,100,36,117,69,31,137,90,32,119,"); + add("-54,-10,14,-143,-35,-43,22,18,118,56,27,139,"); + add("125,32,58,110,32,92,119,26,24,9,-8,-107,"); + add("35,-5,-114,"); + add(""); + //add("/*86*/"); + add("21,-1,20081,22197,2006,"); + add("-52,51,-44,-84,68,86,-104,80,129,-69,58,28,"); + add("-120,102,37,-73,72,-95,-48,58,-182,-84,68,55,"); + add("-110,87,70,-18,8,85,64,-52,-33,78,-55,-118,"); + add("78,-70,26,34,-43,145,91,-86,70,115,-101,0,"); + add("61,-64,105,67,-57,-30,57,-37,-136,75,-56,-119,"); + add(""); + //add("/*87*/"); + add("20,1,-17819,21913,10114,"); + add("-28,11,-73,-142,-94,-50,-103,-82,-6,-124,-90,-31,"); + add("-113,-92,-6,-78,-105,82,23,-33,112,76,6,124,"); + add("103,33,114,116,67,63,95,87,-16,-56,30,-159,"); + add("-112,-81,-27,-102,-84,-3,-35,13,-90,78,74,-17,"); + add("142,85,72,90,79,-10,109,95,-13,"); + add(""); + //add("/*88*/"); + add("20,-1,7617,6776,28215,"); + add("-100,37,17,-132,61,21,-141,-23,42,-89,78,3,"); + add("-96,12,21,-102,53,13,7,147,-39,-119,93,6,"); + add("-141,-63,49,40,-153,29,77,-127,13,116,-87,-7,"); + add("54,-69,3,16,-124,25,121,-114,-4,95,65,-38,"); + add("115,89,-51,119,41,-40,150,29,-48,"); + add(""); + //add("/*89*/"); + add("19,1,10847,17337,21949,"); + add("-55,-34,54,-136,-1,68,-125,41,27,-145,19,54,"); + add("-134,22,45,-141,-18,79,-130,62,9,-164,26,53,"); + add("-47,-61,68,70,-81,33,147,-15,-54,141,-18,-50,"); + add("144,-61,-18,126,-37,-30,129,17,-74,133,12,-73,"); + add("135,5,-69,64,69,-85,"); + add(""); + //add("/*90*/"); + add("20,1,2092,29573,4591,"); + add("-46,-9,79,-90,13,-48,2,-21,135,-89,7,-11,"); + add("-133,16,-49,-43,-2,32,-29,-14,96,-26,-16,102,"); + add("78,-24,118,217,0,-82,-44,-15,105,58,-18,82,"); + add("160,-5,-33,149,-15,25,91,14,-122,30,20,-136,"); + add("19,23,-151,-57,26,-134,-157,12,-2,"); + add(""); + //add("/*91*/"); + add("20,-1,-20217,21829,-3845,"); + add("-71,-59,41,-110,-106,-18,-100,-95,2,-110,-103,7,"); + add("-95,-95,-14,-36,-35,-3,-92,-87,16,-71,-87,-94,"); + add("0,-28,-153,-18,-16,10,-98,-75,125,44,47,13,"); + add("84,99,88,78,86,54,114,110,-6,97,96,15,"); + add("98,90,-25,111,102,-14,116,111,14,"); + add(""); + //add("/*92*/"); + add("18,1,24559,5678,-16267,"); + add("45,23,76,82,-17,120,53,-117,40,48,-136,28,"); + add("29,-161,-10,79,-73,100,62,-105,63,-13,-129,-61,"); + add("-56,-87,-115,-34,-125,-90,-73,6,-110,-35,134,-13,"); + add("15,127,61,-34,158,-2,-54,138,-37,-51,138,-32,"); + add("-55,139,-37,"); + add(""); + //add("/*93*/"); + add("20,-1,7773,28919,-1814,"); + add("-89,16,-118,-83,13,-134,-41,10,2,-8,13,153,"); + add("162,-37,87,52,-6,135,18,3,148,-94,31,106,"); + add("-54,17,47,200,-56,-53,108,-26,75,31,-8,11,"); + add("11,-11,-150,130,-40,-79,27,-11,-54,-161,49,66,"); + add("-70,20,5,1,-8,-121,-91,22,-50,"); + add(""); + //add("/*94*/"); + add("19,1,28847,-786,-8199,"); + add("14,-81,55,17,10,63,33,-16,120,21,-153,93,"); + add("-27,-81,-85,-41,-5,-147,-26,-117,-78,-18,-132,-42,"); + add("-24,-120,-62,-43,-55,-138,-40,-73,-123,-13,54,-52,"); + add("-1,171,-32,26,67,75,42,57,133,23,143,60,"); + add("13,150,26,24,136,69,"); + add(""); + //add("/*95*/"); + add("19,-1,-13526,25075,-9397,"); + add("-104,-57,0,-169,-104,-31,-81,-44,5,-119,-56,27,"); + add("-136,-62,41,-155,-91,-5,21,21,24,125,71,-5,"); + add("135,72,-11,34,50,83,-79,4,130,-78,13,159,"); + add("39,17,-17,54,-22,-142,66,-7,-119,128,39,-89,"); + add("119,53,-33,130,72,1,"); + add(""); + //add("/*96*/"); + add("20,1,-8960,-28564,-1947,"); + add("-4,-7,116,-2,-8,149,17,-15,170,40,-19,128,"); + add("-19,-1,158,3,-7,144,-60,14,121,-106,34,-11,"); + add("-17,9,-106,-78,25,14,-77,27,-65,101,-30,-68,"); + add("12,1,-102,-83,31,-101,76,-21,-60,44,-10,-76,"); + add("-10,10,-123,16,4,-148,77,-15,-153,"); + add(""); + //add("/*97*/"); + add("17,-1,17593,2406,24180,"); + add("-46,-122,46,-2,-152,15,-14,-147,23,32,-145,-12,"); + add("61,-134,-35,60,-128,-35,91,-110,-59,82,-162,-52,"); + add("51,105,-43,-51,108,31,-94,101,62,-58,133,34,"); + add("-12,155,-3,-12,148,-4,-3,151,-11,-17,154,-2,"); + add(""); + //add("/*98*/"); + add("17,-1,7274,26419,12212,"); + add("-30,-53,132,-26,-63,149,90,-55,61,121,-62,59,"); + add("112,-69,77,111,-66,68,136,-77,76,45,47,-124,"); + add("109,9,-86,69,26,-97,-23,64,-119,-68,73,-111,"); + add("-118,65,-65,-148,50,-12,-139,44,-10,-135,48,-21,"); + add(""); + //add("/*99*/"); + add("18,1,-5378,29484,-1323,"); + add("7,-3,-94,-75,-18,-97,-134,-22,66,-123,-21,55,"); + add("-78,-18,-54,-45,-14,-99,-88,-13,91,-23,2,131,"); + add("-90,-13,129,-141,-28,38,-61,-8,119,130,29,54,"); + add("147,29,-35,140,28,5,121,21,-86,99,14,-122,"); + add("143,25,-49,"); + add(""); + //add("/*100*/"); + add("18,-1,13477,22776,14129,"); + add("109,-76,17,41,-79,87,-6,-77,128,-25,-78,145,"); + add("21,-91,121,32,-82,95,-81,-30,118,-6,-70,111,"); + add("92,-30,-39,85,48,-150,1,51,-78,-51,92,-93,"); + add("-5,96,-142,-21,78,-104,-25,85,-108,-32,83,-102,"); + add("-120,75,-7,"); + add(""); + //add("/*101*/"); + add("17,1,13832,17499,20061,"); + add("-49,-24,54,-87,-54,108,-99,-46,105,-113,-24,96,"); + add("-145,5,90,-63,-73,103,-121,-41,111,20,-94,65,"); + add("118,-79,-9,138,-22,-72,110,42,-106,81,58,-102,"); + add("102,48,-108,-30,92,-58,35,96,-105,73,73,-114,"); + add(""); + //add("/*102*/"); + add("17,1,24192,6529,-16496,"); + add("5,-81,-25,-12,-132,-68,-58,-89,-117,-44,-93,-99,"); + add("9,-107,-24,11,-90,-17,-48,-108,-106,-117,-38,-177,"); + add("-17,120,16,4,156,60,-22,140,20,-18,140,26,"); + add("28,112,82,69,65,123,82,-21,109,87,10,130,"); + add(""); + //add("/*103*/"); + add("16,-1,13005,-9227,25411,"); + add("89,107,-7,117,91,-28,96,129,-5,124,84,-36,"); + add("90,79,-20,135,59,-53,192,71,-80,-94,74,77,"); + add("-136,-44,59,-116,-94,30,-130,-64,47,-93,-97,15,"); + add("-108,-131,10,-73,-112,-2,-93,-119,5,"); + add(""); + //add("/*104*/"); + add("17,-1,12753,25778,8535,"); + add("52,-64,114,99,-58,27,-5,-49,150,9,-5,1,"); + add("88,-14,-90,143,-79,19,196,-98,-11,-76,66,-78,"); + add("-85,33,34,-159,84,-9,-83,82,-118,-127,73,-28,"); + add("-31,59,-134,-108,74,-64,-53,33,-23,131,-100,112,"); + add(""); + //add("/*105*/"); + add("17,-1,-16206,24956,-3814,"); + add("36,36,80,46,51,147,74,60,88,97,75,103,"); + add("123,82,32,170,122,119,112,64,-32,-8,-16,-86,"); + add("-85,-70,-130,-116,-86,-105,-110,-66,20,-171,-113,-32,"); + add("-59,-52,-95,72,44,-17,-35,-27,-34,-79,-59,-52,"); + add(""); + //add("/*106*/"); + add("16,1,-27904,9377,5782,"); + add("14,-34,121,-8,-99,117,14,-47,134,25,-36,169,"); + add("56,65,149,27,-4,118,34,-11,159,32,89,9,"); + add("-6,72,-124,-13,58,-137,-16,45,-140,-25,26,-147,"); + add("-27,16,-146,-35,-14,-143,-43,-42,-136,"); + add(""); + //add("/*107*/"); + add("16,1,24919,6169,-15523,"); + add("-15,-83,-57,15,-144,-32,30,-148,-7,46,-148,19,"); + add("27,-152,-11,-30,-15,-54,-79,68,-101,-85,43,-118,"); + add("-72,102,-77,-78,95,-86,-59,170,-28,55,27,94,"); + add("69,29,118,60,64,119,58,69,119,"); + add(""); + //add("/*108*/"); + add("15,1,25878,-4981,-14336,"); + add("-65,-92,-84,-74,-17,-126,-74,-48,-113,-75,-84,-102,"); + add("-71,-100,-87,-80,-25,-128,-62,61,-127,26,118,4,"); + add("71,113,81,76,61,110,79,105,100,67,7,115,"); + add("75,-1,131,72,-13,133,"); + add(""); + //add("/*109*/"); + add("16,1,5450,29486,-929,"); + add("-154,29,9,-133,25,53,15,0,102,55,-8,59,"); + add("-131,24,83,51,-6,146,117,-19,76,152,-27,86,"); + add("46,-9,-54,171,-34,-108,46,-11,-133,67,-16,-143,"); + add("2,-5,-140,-115,20,-79,-112,23,66,"); + add(""); + //add("/*110*/"); + add("16,-1,17357,24467,-289,"); + add("93,-67,-83,114,-83,-67,118,-86,-7,-13,8,-49,"); + add("-63,46,4,-131,96,35,-99,72,119,-113,81,37,"); + add("-79,53,-96,-30,19,-139,-102,66,-178,18,-10,75,"); + add("61,-39,123,40,-26,142,85,-58,90,"); + add(""); + //add("/*111*/"); + add("16,1,-10217,28170,-1431,"); + add("-65,-26,-59,-121,-47,-38,-112,-47,-83,-64,-32,-142,"); + add("-103,-35,66,-74,-21,123,-113,-36,147,-52,-14,123,"); + add("22,14,136,72,32,111,73,28,-15,127,46,-75,"); + add("129,46,-48,120,40,-116,91,30,-63,"); + add(""); + //add("/*112*/"); + add("15,1,29126,7027,-1524,"); + add("25,-95,61,35,-144,21,37,-153,29,32,-136,22,"); + add("32,-147,-4,36,-156,67,31,-153,-26,-10,34,-50,"); + add("-33,155,-14,-35,150,-55,-27,117,-36,-41,183,10,"); + add("-27,109,-30,-35,145,-19,"); + add(""); + //add("/*113*/"); + add("15,1,6145,29344,-1095,"); + add("-111,18,-111,-53,5,-138,-82,10,-139,-105,16,-86,"); + add("-147,32,55,-78,19,94,-45,14,107,69,-11,60,"); + add("-161,34,74,151,-26,74,141,-26,15,139,-26,36,"); + add("145,-29,16,127,-25,23,"); + add(""); + //add("/*114*/"); + add("15,1,24375,5854,-16479,"); + add("40,-64,35,43,-140,16,59,-133,43,58,-133,43,"); + add("65,-133,54,43,-126,24,37,-157,9,-33,-4,-52,"); + add("-54,137,-39,-51,140,-32,-78,112,-80,-58,111,-51,"); + add("-26,150,12,-23,147,17,"); + add(""); + //add("/*115*/"); + add("15,-1,-17689,24006,-3293,"); + add("3,-14,-112,-73,-60,-41,-34,-11,101,-70,-38,105,"); + add("-89,-57,66,-106,-88,-56,-163,-125,4,-104,-72,56,"); + add("44,39,37,120,91,-4,106,86,36,112,90,43,"); + add("115,84,-14,93,53,-126,"); + add(""); + //add("/*116*/"); + add("14,1,12744,-2905,-27003,"); + add("-5,-145,14,-77,-123,-22,-103,-99,-37,-63,-118,-14,"); + add("-67,-122,-15,-128,-69,-50,-133,51,-66,17,147,-12,"); + add("107,117,35,104,79,37,99,120,32,86,134,25,"); + add("119,58,49,"); + add(""); + //add("/*117*/"); + add("15,1,-12039,24973,-11465,"); + add("-64,-40,-18,-136,-75,-18,-97,-85,-81,-115,-86,-58,"); + add("-106,-47,12,-128,-64,5,-126,-69,-8,-7,38,87,"); + add("99,75,51,156,93,28,61,55,53,130,77,25,"); + add("140,57,-26,124,60,-2,"); + add(""); + //add("/*118*/"); + add("14,1,7404,28675,-4785,"); + add("-29,-17,-146,-17,-21,-148,7,-29,-149,-45,-11,-123,"); + add("-150,53,81,-131,42,51,-114,46,103,-17,24,116,"); + add("7,24,148,56,10,138,125,-25,35,146,-55,-111,"); + add("129,-30,17,"); + add(""); + //add("/*119*/"); + add("15,1,-18411,21935,8938,"); + add("-115,-81,-40,-37,-70,94,-16,-67,130,-6,-58,124,"); + add("71,2,136,-17,-59,103,77,18,109,131,91,45,"); + add("-20,35,-117,-69,-11,-111,-56,16,-148,-52,11,-130,"); + add("18,47,-75,70,90,-75,"); + add(""); + //add("/*120*/"); + add("16,-1,-19925,-10993,19549,"); + add("-85,60,-54,-81,131,-10,-95,132,-25,49,44,74,"); + add("124,-109,68,104,-49,79,-38,35,-20,-106,137,-32,"); + add("-67,38,-48,-111,-16,-125,11,-76,-29,64,-118,1,"); + add("29,-126,-41,51,-24,39,100,-47,78,"); + add(""); + //add("/*121*/"); + add("15,-1,-18321,23571,-2957,"); + add("-21,-25,-65,-55,-44,-12,-127,-88,93,-93,-71,26,"); + add("-105,-81,20,-118,-90,42,-124,-99,20,-24,-4,132,"); + add("89,77,41,107,79,-71,90,60,-111,99,80,11,"); + add("155,117,-44,66,45,-56,"); + add(""); + //add("/*122*/"); + add("13,1,-17336,22935,8569,"); + add("-77,9,-181,-36,-51,65,5,-50,144,-33,-72,123,"); + add("11,-49,149,36,-30,146,45,-23,142,99,30,115,"); + add("31,78,-136,-4,53,-140,-9,49,-144,-26,36,-146,"); + add(""); + //add("/*123*/"); + add("15,1,18292,-22847,6589,"); + add("17,51,129,65,27,-88,38,6,-87,81,84,64,"); + add("-109,-44,152,4,37,115,-16,21,109,75,88,88,"); + add("-100,-69,39,-92,-89,-47,-125,-112,-40,46,6,-100,"); + add("56,0,-148,7,-22,-92,"); + add(""); + //add("/*124*/"); + add("14,1,25183,6987,-14730,"); + add("-19,-68,-66,-34,-107,-106,-1,-140,-65,-8,-124,-68,"); + add("-18,-137,-89,-55,-30,-104,-61,102,-57,-40,142,-5,"); + add("-29,159,24,18,114,80,56,74,126,63,25,117,"); + add("76,10,133,"); + add(""); + //add("/*125*/"); + add("14,1,-8316,28793,1345,"); + add("-112,-33,14,-106,-36,84,-119,-39,70,-83,-31,115,"); + add("70,13,135,41,3,142,12,-7,156,99,28,19,"); + add("108,39,-100,95,35,-109,42,21,-148,-30,0,-150,"); + add("16,13,-150,"); + add(""); + //add("/*126*/"); + add("14,1,-20941,-20602,6087,"); + add("-57,78,65,-69,88,56,-96,95,-13,-76,82,8,"); + add("-54,95,123,-116,124,1,-64,28,-127,47,-74,-79,"); + add("82,-108,-69,97,-111,-29,98,-114,-42,84,-109,-75,"); + add("86,-65,78,"); + add(""); + //add("/*127*/"); + add("13,1,-4213,-29615,2279,"); + add("-54,18,127,-113,24,97,-128,26,79,-138,28,72,"); + add("-56,2,-82,112,-27,-103,78,-21,-118,-45,-5,-145,"); + add("-127,9,-160,135,-23,-23,80,-3,125,149,-19,48,"); + add(""); + //add("/*128*/"); + add("17,1,-7190,25393,-14265,"); + add("78,-15,-66,-8,-71,-121,96,22,-9,103,-22,-88,"); + add("-16,-69,-112,-123,-86,-89,-29,14,39,-51,17,54,"); + add("-61,-48,-53,-53,22,65,-54,65,139,-68,50,122,"); + add("-82,20,78,25,62,96,104,44,25,88,20,-10,"); + add(""); + //add("/*129*/"); + add("14,-1,-19493,22341,-4569,"); + add("21,-10,-138,-18,-17,-9,-18,15,150,-41,-7,140,"); + add("-104,-82,48,-110,-85,68,-76,-41,140,-11,27,201,"); + add("24,10,-64,19,-10,-144,124,90,-106,57,33,-93,"); + add("103,79,-54,"); + add(""); + //add("/*130*/"); + add("14,1,631,-8774,-28681,"); + add("-95,52,-18,-113,74,-25,-126,-17,4,-218,65,-21,"); + add("120,-18,6,3,62,-18,-151,163,-49,118,8,-2,"); + add("126,-59,18,142,-43,15,136,-62,21,142,-64,22,"); + add("-23,-89,26,"); + add(""); + //add("/*131*/"); + add("14,1,19698,-3856,-22297,"); + add("66,-19,63,94,-67,96,59,-115,73,41,-133,62,"); + add("33,-144,58,-56,-44,-42,-112,1,-101,-112,-2,-100,"); + add("-88,89,-95,-79,93,-87,-35,136,-55,18,126,-7,"); + add("109,85,80,"); + add(""); + //add("/*132*/"); + add("13,1,-11506,10377,-25689,"); + add("-24,-106,-32,45,-133,-73,-57,-146,-31,-32,-145,-41,"); + add("-112,-83,18,-96,90,78,-114,58,75,-114,81,84,"); + add("67,117,15,89,117,5,131,76,-30,133,55,-38,"); + add(""); + //add("/*133*/"); + add("13,1,3573,20459,21649,"); + add("-18,-82,80,-121,-55,70,-106,-79,91,11,-107,96,"); + add("42,-113,97,64,-95,76,145,-61,32,58,98,-98,"); + add("18,114,-107,15,110,-103,-40,114,-99,-24,107,-96,"); + add(""); + //add("/*134*/"); + add("14,1,-13127,24311,-11689,"); + add("32,-36,-111,-20,-65,-111,-11,-39,-67,119,108,88,"); + add("119,35,-57,12,-41,-96,-113,-93,-66,-148,-83,-6,"); + add("-78,-59,-31,-99,-15,79,15,71,124,81,88,89,"); + add("49,83,116,"); + add(""); + //add("/*135*/"); + add("14,-1,-27102,-7955,10108,"); + add("-41,40,-76,7,-121,-79,2,-95,-72,50,-76,73,"); + add("60,-59,116,54,-99,63,49,14,140,58,-112,59,"); + add("41,30,130,-56,115,-52,-55,104,-59,-68,105,-94,"); + add("-62,98,-88,"); + add(""); + //add("/*136*/"); + add("13,1,24282,5951,-16583,"); + add("1,-130,-43,-12,-124,-61,-62,-64,-112,21,-145,-17,"); + add("-12,-193,-80,-75,62,-87,-38,114,-17,22,137,75,"); + add("-22,152,20,1,137,49,74,1,106,62,51,109,"); + add(""); + //add("/*137*/"); + add("12,1,-26265,9394,11041,"); + add("-25,-130,52,61,-10,151,61,0,140,56,-11,136,"); + add("72,36,134,82,129,80,-33,84,-143,-47,8,-112,"); + add("-59,12,-145,-60,2,-141,-63,-12,-136,"); + add(""); + //add("/*138*/"); + add("13,1,959,-9398,-28474,"); + add("-96,40,-16,-137,30,-14,-46,96,-32,46,137,-43,"); + add("120,104,-29,106,43,-11,165,-34,17,122,-55,22,"); + add("71,-116,41,34,-132,44,-128,-70,17,-150,-39,7,"); + add(""); + //add("/*139*/"); + add("13,-1,14782,-8096,24818,"); + add("69,-20,-48,119,-33,-82,133,23,-74,129,-1,-79,"); + add("130,19,-76,172,44,-94,-52,24,41,-129,-22,74,"); + add("-124,-10,75,-135,-5,81,-127,-25,69,-127,11,80,"); + add(""); + //add("/*140*/"); + add("13,1,-18588,-22992,5084,"); + add("-30,41,75,-96,84,27,-117,108,51,-121,106,23,"); + add("-116,92,-23,16,-39,-112,126,-112,-27,33,-57,-133,"); + add("146,-119,7,-60,76,116,53,-45,-2,114,-97,-23,"); + add(""); + //add("/*141*/"); + add("13,1,10930,21399,-17962,"); + add("112,-57,2,131,-9,69,89,-43,5,131,-71,-1,"); + add("148,-86,-8,121,-90,-27,-34,-14,-38,-131,74,3,"); + add("-134,81,9,-140,53,-25,-138,61,-13,-155,53,-32,"); + add(""); + //add("/*142*/"); + add("13,-1,2123,5909,29336,"); + add("91,-78,9,130,-73,4,65,-131,20,-85,-112,28,"); + add("-40,-133,28,50,-162,25,34,36,-9,28,139,-28,"); + add("10,135,-25,8,152,-30,-103,116,-14,-132,66,-4,"); + add(""); + //add("/*143*/"); + add("14,-1,-17261,24337,-3127,"); + add("-106,-81,-41,-97,-73,-25,-70,-67,-119,-103,-69,48,"); + add("-89,-51,111,-27,0,147,30,31,74,43,21,-85,"); + add("52,29,-72,125,88,-25,82,75,129,15,1,-77,"); + add("94,67,-2,"); + add(""); + //add("/*144*/"); + add("15,-1,-17925,23424,5478,"); + add("-56,-22,-89,-109,-64,-90,-96,-63,-50,-158,-128,15,"); + add("-122,-105,33,71,48,36,88,74,-14,119,86,31,"); + add("133,87,74,-67,-52,0,43,22,48,109,65,81,"); + add("5,10,-29,16,17,-20,"); + add(""); + //add("/*145*/"); + add("12,1,-11151,25532,-11125,"); + add("-96,-60,-40,-113,-85,-80,-154,-96,-60,-89,-84,-95,"); + add("-39,41,132,43,56,79,187,120,81,-121,-59,-10,"); + add("37,33,37,135,73,29,132,34,-56,"); + add(""); + //add("/*146*/"); + add("13,1,-8245,28241,5871,"); + add("-116,-48,68,-111,-45,51,-55,-33,79,67,-11,142,"); + add("-65,-18,-4,-34,-28,75,111,13,96,134,24,67,"); + add("120,43,-35,8,38,-156,32,40,-143,-27,24,-145,"); + add(""); + //add("/*147*/"); + add("12,-1,-29258,6281,2126,"); + add("-23,-98,-32,-27,-136,29,-23,-141,72,-7,-82,123,"); + add("3,-46,145,8,-25,154,25,105,42,17,119,-83,"); + add("14,113,-102,8,88,-123,9,85,-120,"); + add(""); + //add("/*148*/"); + add("12,-1,15271,556,25816,"); + add("72,107,-45,84,120,-53,109,74,-69,73,123,-48,"); + add("14,199,-17,-60,-36,38,-94,-101,61,-101,-90,64,"); + add("-93,-105,59,-79,-120,50,19,-120,-8,"); + add(""); + //add("/*149*/"); + add("13,1,4573,29647,-405,"); + add("107,-16,122,127,-20,41,164,-26,40,74,-13,16,"); + add("63,-11,-54,48,-10,-152,-74,11,-130,-85,12,-108,"); + add("-165,28,-1,-109,18,26,-117,20,93,-78,13,54,"); + add(""); + //add("/*150*/"); + add("12,-1,9509,25746,12114,"); + add("-81,-25,114,107,-45,12,57,-63,87,-150,26,61,"); + add("42,-29,28,151,-65,19,165,-64,1,86,3,-73,"); + add("-2,67,-137,-128,58,-19,-139,62,-20,"); + add(""); + //add("/*151*/"); + add("12,1,10885,-3987,-27670,"); + add("-99,-113,-22,-113,-91,-30,-130,-74,-39,-127,-67,-37,"); + add("-158,-91,-44,-8,63,-13,108,109,23,122,81,33,"); + add("131,59,41,117,91,32,119,64,37,"); + add(""); + //add("/*152*/"); + add("12,1,-10784,27846,2885,"); + add("31,19,-71,-6,13,-150,-84,-23,-112,-140,-51,-40,"); + add("-139,-55,-1,-127,-56,54,-43,-30,122,55,9,143,"); + add("106,32,100,140,55,3,133,57,-42,"); + add(""); + //add("/*153*/"); + add("12,-1,-20095,-16594,14860,"); + add("-15,59,46,-47,134,85,5,91,106,32,39,83,"); + add("57,25,102,-93,188,76,-37,-61,-113,-25,-95,-134,"); + add("8,-95,-92,-9,-95,-115,80,-131,-38,"); + add(""); + //add("/*154*/"); + add("12,-1,-19229,22976,-1545,"); + add("-67,-58,-11,-88,-82,-108,-97,-85,-32,-80,-76,-92,"); + add("-72,-59,30,-25,-11,149,79,79,162,92,71,-119,"); + add("3,12,140,91,76,-35,97,78,-55,"); + add(""); + //add("/*155*/"); + add("11,1,-1931,-29525,-4956,"); + add("-34,25,-132,27,24,-147,46,23,-144,42,24,-147,"); + add("128,1,-45,118,-27,110,37,-28,139,-44,-23,143,"); + add("-82,-17,128,-119,-8,89,"); + add(""); + //add("/*156*/"); + add("11,1,-7314,-28817,-4011,"); + add("38,10,-135,63,4,-137,36,13,-147,80,3,-145,"); + add("86,-36,93,124,-44,90,31,-23,107,-108,11,103,"); + add("-109,12,101,-119,17,85,"); + add(""); + //add("/*157*/"); + add("14,1,-10998,25512,-11321,"); + add("41,-28,-103,-54,-61,-84,-107,-71,-54,-129,-62,-11,"); + add("25,48,82,-20,9,39,-150,-48,44,17,44,79,"); + add("187,57,-60,-74,-12,49,7,37,75,121,34,-43,"); + add("45,4,-36,"); + add(""); + //add("/*158*/"); + add("11,1,-29990,-14,-784,"); + add("-1,-139,84,-1,-155,84,4,-105,-129,1,-108,22,"); + add("-3,-4,154,-4,87,124,0,134,-44,0,128,-68,"); + add("1,125,-75,2,107,-82,"); + add(""); + //add("/*159*/"); + add("11,1,24220,-1670,-17623,"); + add("-21,-142,-16,-68,-99,-83,-84,-67,-106,-86,-7,-115,"); + add("-81,59,-114,-40,112,-64,55,102,63,79,92,96,"); + add("91,14,122,90,-31,124,"); + add(""); + //add("/*160*/"); + add("11,1,140,28342,-9835,"); + add("-148,16,46,-147,-2,-5,-152,14,45,-96,34,103,"); + add("101,41,118,139,17,48,150,-6,-21,122,-29,-85,"); + add("100,-38,-111,8,-41,-120,"); + add(""); + //add("/*161*/"); + add("11,1,9134,18840,21486,"); + add("134,-66,0,126,-91,25,135,-54,-13,113,-67,8,"); + add("137,-82,8,-43,62,-34,-97,100,-42,-91,95,-42,"); + add("-150,40,31,-124,74,-11,"); + add(""); + //add("/*162*/"); + add("11,1,-21516,19701,6996,"); + add("-54,-7,-149,-52,-18,-114,-56,-12,-145,-50,-13,-130,"); + add("-118,-89,-128,6,-28,106,77,37,149,69,26,145,"); + add("65,33,115,82,47,123,"); + add(""); + //add("/*163*/"); + add("12,1,-2471,26742,-13370,"); + add("-106,37,95,62,32,52,133,23,22,113,42,66,"); + add("158,-1,-29,145,13,5,63,-27,-64,-93,-46,-80,"); + add("-176,5,39,-113,-29,-42,-113,-42,-63,"); + add(""); + //add("/*164*/"); + add("12,1,-10150,-24537,13962,"); + add("-10,36,55,-102,82,68,-147,64,4,-127,49,-11,"); + add("-133,22,-63,-142,13,-86,47,-28,-11,123,-35,34,"); + add("144,-49,22,137,-52,12,136,-74,-31,"); + add(""); + //add("/*165*/"); + add("12,1,-15831,-23712,9333,"); + add("11,39,120,12,45,131,33,43,159,29,38,136,"); + add("-72,62,33,-54,0,-87,-65,29,-36,-103,35,-86,"); + add("60,-92,-122,18,-56,-109,34,-70,-119,"); + add(""); + //add("/*166*/"); + add("11,-1,-26860,12885,-3537,"); + add("-22,-68,-78,-64,-142,-24,-55,-120,-9,-54,-128,-42,"); + add("-98,-217,-5,28,66,16,59,138,29,57,135,39,"); + add("57,134,44,56,133,53,"); + add(""); + //add("/*167*/"); + add("10,-1,21555,20350,4610,"); + add("-13,-13,117,-23,-10,147,-11,-25,149,15,-65,193,"); + add("89,-66,-109,59,-32,-128,32,3,-154,-26,61,-143,"); + add("-71,111,-150,"); + add(""); + //add("/*168*/"); + add("12,1,25080,-2304,-16299,"); + add("36,-91,68,1,-152,24,5,-145,32,28,-138,68,"); + add("-28,-123,-22,-47,63,-85,-54,77,-96,14,96,4,"); + add("34,84,39,-33,137,-73,5,129,-10,"); + add(""); + //add("/*169*/"); + add("11,1,-5147,-29506,1706,"); + add("36,-1,84,-95,24,126,-104,26,108,-85,24,125,"); + add("-103,29,129,-55,5,-80,41,-19,-145,56,-20,-140,"); + add("89,-24,-121,131,-27,-73,"); + add(""); + //add("/*170*/"); + add("11,1,3601,24897,16346,"); + add("-94,-65,119,-106,-2,25,-143,-42,91,31,-83,117,"); + add("72,-63,79,161,-49,38,88,35,-69,12,73,-110,"); + add("37,67,-109,-8,83,-124,"); + add(""); + //add("/*171*/"); + add("12,1,-16031,-24558,6319,"); + add("-29,-8,-108,-28,-23,-166,19,-42,-123,130,-68,69,"); + add("-58,46,37,5,16,79,101,-54,43,132,-49,140,"); + add("-115,70,-13,-118,58,-72,14,12,83,"); + add(""); + //add("/*172*/"); + add("11,1,4179,29039,-6267,"); + add("73,-37,-121,-54,-26,-151,-57,-23,-136,-114,-7,-103,"); + add("-154,15,-24,-87,34,96,96,17,131,92,8,92,"); + add("101,10,108,59,10,82,"); + add(""); + //add("/*173*/"); + add("11,1,7225,28615,-5385,"); + add("-150,30,-40,-139,24,-51,-152,36,-3,-23,32,144,"); + add("-4,26,134,100,-10,76,124,-44,-80,137,-42,-45,"); + add("123,-46,-80,49,-24,-60,"); + add(""); + //add("/*174*/"); + add("10,1,27028,-4267,-12299,"); + add("-47,-101,-69,-68,-50,-128,-76,-143,-112,-39,74,-109,"); + add("-42,100,-123,53,124,69,69,41,132,55,-48,134,"); + add("67,29,136,"); + add(""); + //add("/*175*/"); + add("11,-1,17469,24240,2693,"); + add("-28,25,-38,-83,72,-130,-50,50,-130,-52,49,-133,"); + add("-57,55,-170,-37,23,45,59,-55,143,73,-63,123,"); + add("51,-50,127,70,-63,122,"); + add(""); + //add("/*176*/"); + add("11,1,9832,-4353,-28007,"); + add("-12,-95,11,-32,-144,12,-59,-142,3,-104,-107,-18,"); + add("-134,-122,-24,-2,72,-13,44,125,-7,81,123,7,"); + add("60,126,0,75,131,5,"); + add(""); + //add("/*177*/"); + add("11,-1,3662,25807,14853,"); + add("-135,2,28,-21,-77,138,-117,-27,73,-24,-53,95,"); + add("13,-75,123,53,-20,22,115,39,-92,129,32,-84,"); + add("65,57,-113,-8,65,-110,"); + add(""); + //add("/*178*/"); + add("10,1,-6841,-28848,-4579,"); + add("-89,40,-117,11,19,-132,-44,36,-150,0,26,-145,"); + add("120,-16,-75,82,-38,102,0,-25,145,26,-31,146,"); + add("-18,-20,148,"); + add(""); + //add("/*179*/"); + add("10,1,10303,-4850,-27755,"); + add("-3,-110,18,-87,-118,-10,-139,-39,-44,-145,-16,-49,"); + add("-168,-5,-59,51,128,-5,128,85,30,144,11,50,"); + add("127,49,38,"); + add(""); + //add("/*180*/"); + add("11,1,27435,-3603,-11592,"); + add("23,-70,78,-36,-77,-61,-56,-11,-129,-70,-5,-160,"); + add("-45,48,-118,-47,48,-121,14,73,10,61,-2,139,"); + add("60,0,137,60,1,140,"); + add(""); + //add("/*181*/"); + add("11,-1,-19573,-21914,6055,"); + add("-41,72,126,-22,58,133,28,17,146,73,-23,140,"); + add("-46,47,21,-91,40,-142,13,-52,-136,-19,-29,-159,"); + add("7,-23,-56,76,-90,-80,"); + add(""); + //add("/*182*/"); + add("10,1,-16090,-23678,8971,"); + add("67,-15,80,5,55,152,3,53,138,-68,112,164,"); + add("-100,20,-121,-81,-5,-154,100,-81,-30,55,-62,-63,"); + add("-13,-40,-128,"); + add(""); + //add("/*183*/"); + add("10,1,-7427,29059,-664,"); + add("-79,-23,-102,-94,-27,-62,-135,-36,-21,-102,-25,98,"); + add("-81,-19,122,31,12,139,154,41,18,142,38,-17,"); + add("130,32,-78,"); + add(""); + //add("/*184*/"); + add("10,1,22146,-6178,-19271,"); + add("-60,73,-92,-58,116,-102,55,130,23,75,-34,95,"); + add("107,-20,130,99,39,103,19,-78,46,-68,-127,-39,"); + add("-96,-82,-86,"); + add(""); + //add("/*185*/"); + add("11,-1,13300,25127,9578,"); + add("29,41,-150,-7,56,-141,23,35,-126,-131,89,-57,"); + add("-40,16,13,126,-92,70,-14,-37,123,9,-49,120,"); + add("-29,-40,146,39,-43,58,"); + add(""); + //add("/*186*/"); + add("10,-1,11562,21630,17276,"); + add("116,-40,-28,140,-47,-37,107,-42,-21,214,-140,24,"); + add("-64,64,-33,-121,92,-31,-136,91,-20,-132,38,42,"); + add("-104,7,62,"); + add(""); + //add("/*187*/"); + add("10,1,-25792,5633,14249,"); + add("-43,-12,-74,-78,-55,-120,-19,-181,35,-89,-108,-124,"); + add("22,-32,53,73,1,134,79,31,133,37,137,15,"); + add("34,178,-7,"); + add(""); + //add("/*188*/"); + add("10,1,-11381,25287,-11447,"); + add("56,-2,-59,-84,-68,-68,-114,-80,-60,-126,-71,-28,"); + add("-165,-107,-62,31,58,91,86,77,80,112,81,64,"); + add("118,75,46,"); + add(""); + //add("/*189*/"); + add("11,-1,-17257,23572,6821,"); + add("-79,-32,-89,-16,23,-121,-53,-38,-4,-103,-94,61,"); + add("-62,-78,109,-89,-94,93,16,8,12,124,83,35,"); + add("113,76,31,108,92,-44,"); + add(""); + //add("/*190*/"); + add("9,1,21029,-858,-21378,"); + add("-82,-38,-80,-104,-45,-99,-108,-41,-101,-166,25,-159,"); + add("75,53,68,106,28,100,109,16,104,108,13,105,"); + add(""); + //add("/*191*/"); + add("9,-1,16710,18554,16629,"); + add("40,-81,51,77,-100,31,90,-117,38,114,-123,18,"); + add("63,61,-130,-74,118,-54,-114,76,32,-75,122,-59,"); + add(""); + //add("/*192*/"); + add("10,1,-26154,13570,5641,"); + add("12,-36,142,-22,-92,112,-38,-97,53,-91,-175,-11,"); + add("33,46,40,70,120,43,37,119,-105,21,92,-118,"); + add("-14,33,-142,"); + add(""); + //add("/*193*/"); + add("10,1,-10691,-27735,4062,"); + add("89,-25,58,-53,43,153,-92,50,88,-103,49,54,"); + add("-119,59,77,-44,12,-36,69,-48,-127,98,-54,-100,"); + add("91,-52,-105,"); + add(""); + //add("/*194*/"); + add("9,1,5294,28803,-6509,"); + add("141,-38,-53,58,-14,-13,-125,-7,-132,-82,-14,-124,"); + add("-128,1,-92,-86,43,117,12,33,151,77,15,126,"); + add(""); + //add("/*195*/"); + add("10,1,-13366,24028,-12001,"); + add("65,-24,-120,-58,-49,-32,-118,-69,-5,-122,-71,-3,"); + add("-204,-95,43,57,44,22,133,68,-16,108,81,37,"); + add("61,66,65,"); + add(""); + //add("/*196*/"); + add("9,1,-13524,26719,1794,"); + add("-49,-16,-141,-59,-24,-103,-129,-63,-57,-127,-69,46,"); + add("11,-3,148,97,43,109,110,51,85,128,63,31,"); + add(""); + //add("/*197*/"); + add("10,-1,-19280,22118,-6250,"); + add("3,37,124,-25,20,152,-29,10,132,-36,9,154,"); + add("72,66,13,-1,-41,-155,5,-30,-131,31,-11,-139,"); + add("-4,-39,-126,"); + add(""); + //add("/*198*/"); + add("9,1,-5809,29420,-843,"); + add("-132,-27,-12,-164,-32,56,-135,-28,15,-23,-2,88,"); + add("83,20,143,154,33,14,113,21,-95,112,20,-106,"); + add(""); + //add("/*199*/"); + add("10,-1,-2866,4214,29564,"); + add("-77,-108,8,-26,-121,14,-26,-158,18,141,-133,31,"); + add("54,162,-16,-71,-12,-5,-48,38,-10,28,155,-18,"); + add("20,115,-14,"); + add(""); + //add("/*200*/"); + add("9,1,16380,-17659,-17885,"); + add("-77,86,-154,103,64,31,97,45,45,96,-26,114,"); + add("95,-32,121,-11,-89,78,-111,-41,-64,-107,11,-109,"); + add(""); + //add("/*201*/"); + add("8,1,2405,29362,5664,"); + add("-161,-1,74,55,-28,117,40,-40,180,167,-13,-2,"); + add("108,5,-68,27,32,-171,-115,17,-38,"); + add(""); + //add("/*202*/"); + add("10,-1,15812,18669,17362,"); + add("62,-1,-56,121,-24,-85,101,-18,-76,-52,103,-62,"); + add("26,105,-142,-85,18,62,-29,-52,84,-107,-11,112,"); + add("-38,-69,109,"); + add(""); + //add("/*203*/"); + add("9,-1,-22192,18429,-8241,"); + add("-24,-51,-48,-42,-105,-120,-45,-95,-83,3,-94,-206,"); + add("-31,-5,68,-7,65,158,63,115,82,45,106,111,"); + add(""); + //add("/*204*/"); + add("9,1,11904,-3476,-27317,"); + add("-52,-83,-12,-106,-103,-32,-102,-113,-28,-187,-67,-70,"); + add("48,72,10,85,121,20,114,88,37,122,81,42,"); + add(""); + //add("/*205*/"); + add("9,1,29712,544,-4112,"); + add("13,98,108,12,125,117,18,-20,133,2,-58,5,"); + add("-9,-130,-90,-10,-97,-91,-13,-138,-111,-12,92,-79,"); + add(""); + //add("/*206*/"); + add("9,1,9469,-5342,-27961,"); + add("-76,-64,-13,-89,-111,-8,-123,-76,-26,-193,-36,-55,"); + add("20,109,-15,111,75,21,140,40,38,133,73,30,"); + add(""); + //add("/*207*/"); + add("9,1,-4851,24586,-16492,"); + add("112,-15,-56,112,-35,-83,77,-73,-128,-49,-63,-78,"); + add("-117,34,82,-120,28,75,-155,20,75,46,45,53,"); + add(""); + //add("/*208*/"); + add("9,1,24496,6480,-16061,"); + add("42,-192,-12,-66,29,-89,-56,-72,-113,-60,-98,-126,"); + add("-32,66,-23,30,120,90,46,90,104,59,71,119,"); + add(""); + //add("/*209*/"); + add("9,1,-5809,29356,-2119,"); + add("25,-3,-102,10,-9,-147,-56,-22,-131,-154,-34,-30,"); + add("-109,-15,91,2,14,160,131,31,59,80,23,86,"); + add(""); + //add("/*210*/"); + add("9,-1,28373,6866,-6918,"); + add("16,-102,-31,-1,-97,-101,-9,-80,-107,-21,-107,-180,"); + add("-10,66,19,7,96,117,-9,131,86,7,89,112,"); + add(""); + //add("/*211*/"); + add("9,1,6654,-7693,-28223,"); + add("85,43,9,-37,-186,42,-30,-149,34,-106,-88,0,"); + add("-146,59,-50,24,144,-35,100,82,0,88,19,15,"); + add(""); + //add("/*212*/"); + add("9,1,23496,6501,17484,"); + add("57,-56,-56,91,-46,-107,87,15,-125,87,76,-150,"); + add("-52,72,45,-85,13,113,-84,-4,117,-82,-11,114,"); + add(""); + //add("/*213*/"); + add("9,-1,-6643,25925,-13555,"); + add("69,0,-34,128,-11,-84,105,-27,-99,109,-26,-98,"); + add("-71,-55,-69,-126,21,96,-97,28,97,-76,47,126,"); + add(""); + //add("/*214*/"); + add("9,1,-7497,28006,-7711,"); + add("-100,-11,58,-138,-24,49,27,14,24,77,47,98,"); + add("45,58,175,104,24,-16,36,-35,-168,12,-31,-128,"); + add(""); + //add("/*215*/"); + add("9,-1,-20663,19947,-8671,"); + add("-9,-40,-67,-99,-111,-19,-110,-98,41,-117,-97,63,"); + add("8,54,105,53,64,15,102,73,-80,114,93,-60,"); + add(""); + //add("/*216*/"); + add("9,1,4747,25258,15476,"); + add("-15,-47,81,-25,-76,129,-32,-73,126,23,-91,137,"); + add("39,12,-30,3,79,-126,12,80,-131,10,77,-128,"); + add(""); + //add("/*217*/"); + add("8,1,8037,27999,7173,"); + add("126,-37,4,70,13,-132,-8,42,-161,-67,37,-70,"); + add("-146,35,28,-97,4,97,30,-44,140,"); + add(""); + //add("/*218*/"); + add("8,1,-8206,28777,-2132,"); + add("89,20,-69,43,0,-147,-75,-30,-114,-146,-37,57,"); + add("-176,-46,61,49,22,105,122,42,81,"); + add(""); + //add("/*219*/"); + add("8,1,26623,-4311,-13138,"); + add("27,-94,85,6,-161,68,-36,-68,-50,-84,-1,-169,"); + add("-19,104,-74,-3,147,-55,61,86,94,"); + add(""); + //add("/*220*/"); + add("9,-1,-19193,23050,547,"); + add("-3,0,-116,-126,-104,-79,-91,-76,-9,-51,-45,93,"); + add("-32,-30,123,62,50,72,131,111,3,92,79,-39,"); + add(""); + //add("/*221*/"); + add("9,-1,-21968,17844,-9950,"); + add("-52,-145,-144,-65,-32,87,-53,11,139,-99,-72,94,"); + add("6,11,5,105,80,-92,45,-8,-115,86,123,27,"); + add(""); + //add("/*222*/"); + add("8,1,-9395,-28397,2317,"); + add("-3,14,145,-6,15,151,-50,30,144,-103,31,-45,"); + add("14,-17,-132,18,-21,-163,44,-26,-140,"); + add(""); + //add("/*223*/"); + add("8,1,-23532,-559,18600,"); + add("-51,-140,-71,78,10,100,72,112,94,44,111,58,"); + add("-18,153,-19,-74,-18,-94,-47,-129,-61,"); + add(""); + //add("/*224*/"); + add("8,1,29597,-880,-4821,"); + add("11,119,49,14,132,63,15,122,85,18,-57,120,"); + add("-6,-139,-20,-16,-129,-81,-21,-93,-116,"); + add(""); + //add("/*225*/"); + add("8,1,-4242,28374,8769,"); + add("-111,-19,10,-148,-19,-16,-174,-48,66,87,-11,80,"); + add("150,10,44,156,20,13,59,45,-115,"); + add(""); + //add("/*226*/"); + add("8,-1,23521,18132,-4238,"); + add("22,2,127,85,-98,57,62,-96,-62,2,-37,-146,"); + add("-18,-15,-158,-76,95,-24,-53,98,119,"); + add(""); + //add("/*227*/"); + add("9,-1,-12721,26335,-6680,"); + add("101,34,-59,-12,-37,-121,21,-30,-150,97,11,-132,"); + add("-22,-9,4,-87,-9,120,-32,24,149,-30,19,133,"); + add(""); + //add("/*228*/"); + add("8,1,28556,-1354,-9094,"); + add("4,-123,32,-10,-153,-7,-42,-14,-129,-41,-5,-126,"); + add("-13,145,-64,30,120,73,44,44,129,"); + add(""); + //add("/*229*/"); + add("9,-1,-13304,26737,-2855,"); + add("-76,-34,35,-77,-28,107,23,22,102,145,75,25,"); + add("91,53,92,49,18,-63,-12,-18,-126,-95,-61,-143,"); + add(""); + //add("/*230*/"); + add("9,1,-4166,24261,-17148,"); + add("79,-11,-35,76,-52,-91,33,-64,-96,128,-60,-112,"); + add("-52,-17,-11,-135,41,86,-105,58,105,-31,69,105,"); + add(""); + //add("/*231*/"); + add("10,-1,22208,16310,-11865,"); + add("-45,2,-82,-109,78,-95,-87,149,46,91,-49,101,"); + add("52,-108,-53,29,8,64,39,3,77,28,-4,47,"); + add("-22,-51,-112,"); + add(""); + //add("/*232*/"); + add("8,-1,18389,23461,-3379,"); + add("78,-58,17,126,-102,-8,148,-120,-6,-26,11,-72,"); + add("-120,91,-34,-120,92,-23,-123,105,59,"); + add(""); + //add("/*233*/"); + add("9,-1,-12115,27105,4305,"); + add("73,39,-40,98,61,-114,58,51,-174,-77,-33,0,"); + add("-134,-60,2,-95,-52,66,69,14,109,8,-12,101,"); + add(""); + //add("/*234*/"); + add("9,1,22705,-5,-19608,"); + add("49,-19,57,108,-56,126,-44,-88,-51,-88,25,-103,"); + add("-59,-15,-68,-104,-20,-119,-6,99,-7,89,57,101,"); + add(""); + //add("/*235*/"); + add("9,-1,-21304,20829,-3509,"); + add("-61,-67,-28,-89,-92,7,-93,-82,84,-97,-83,115,"); + add("17,17,-6,85,72,-102,93,83,-81,88,91,-4,"); + add(""); + //add("/*236*/"); + add("8,1,21301,-2864,-20930,"); + add("49,-109,66,-5,-141,14,-17,-126,3,-108,-60,-101,"); + add("-16,142,-38,0,130,-20,43,142,24,"); + add(""); + //add("/*237*/"); + add("8,1,-3541,26084,-14390,"); + add("91,-16,-52,143,-42,-108,-84,-54,-78,-183,-37,-22,"); + add("-110,17,58,-27,44,86,84,68,100,"); + add(""); + //add("/*238*/"); + add("9,1,-17503,-23888,4794,"); + add("98,-63,45,73,-33,99,90,-40,118,83,-41,84,"); + add("-47,33,-2,-82,42,-75,-89,41,-118,-87,42,-97,"); + add(""); + //add("/*239*/"); + add("8,1,-20659,21543,3021,"); + add("-20,-9,-74,-10,14,-179,-30,-5,-194,-34,-42,74,"); + add("-22,-39,146,-6,-28,161,69,56,82,"); + add(""); + //add("/*240*/"); + add("8,1,24748,-885,-16934,"); + add("0,-113,6,-74,-41,-105,-86,34,-125,-97,38,-141,"); + add("31,56,41,88,29,123,87,22,125,"); + add(""); + //add("/*241*/"); + add("8,1,22276,-3747,-19742,"); + add("48,-106,75,49,-132,82,14,-106,39,-61,-71,-56,"); + add("-56,105,-85,-48,125,-80,7,156,-22,"); + add(""); + //add("/*242*/"); + add("10,1,-16881,-24201,5419,"); + add("-73,37,-65,-75,32,-95,-64,29,-74,60,-59,-77,"); + add("117,-85,-15,9,15,101,70,-48,1,35,-8,76,"); + add("-39,49,98,"); + add(""); + //add("/*243*/"); + add("8,1,-26588,12735,5561,"); + add("-52,-110,-1,-64,-123,-29,-32,-112,98,26,1,117,"); + add("60,110,43,41,123,-81,39,119,-83,"); + add(""); + //add("/*244*/"); + add("8,-1,15516,21285,-14359,"); + add("23,35,76,93,9,115,97,-78,-10,65,-106,-84,"); + add("1,-79,-116,-126,63,-47,-117,100,21,"); + add(""); + //add("/*245*/"); + add("8,1,7216,28601,-5469,"); + add("-30,-19,-138,2,-31,-152,-102,13,-61,-63,39,115,"); + add("40,19,146,74,4,118,101,-17,42,"); + add(""); + //add("/*246*/"); + add("8,1,3833,29553,3454,"); + add("2,11,-94,-34,18,-128,11,16,-167,-129,16,5,"); + add("28,-19,150,-9,-15,145,51,-17,88,"); + add(""); + //add("/*247*/"); + add("8,1,8843,28172,5303,"); + add("87,-18,-50,96,-15,-85,-82,41,-80,-143,38,39,"); + add("-156,43,31,-1,-21,116,113,-45,51,"); + add(""); + //add("/*248*/"); + add("7,1,21050,-381,-21372,"); + add("-94,-69,-91,-60,-120,-55,-138,-33,-132,42,113,37,"); + add("87,98,82,100,30,97,"); + add(""); + //add("/*249*/"); + add("7,-1,3999,25672,14999,"); + add("-52,-42,85,-37,-69,127,-3,-123,204,68,48,-97,"); + add("34,74,-133,7,66,-113,"); + add(""); + //add("/*250*/"); + add("8,1,-26361,12892,6235,"); + add("1,-67,145,-25,-108,108,-66,-133,-7,7,-5,35,"); + add("64,140,-9,25,106,-109,6,79,-137,"); + add(""); + //add("/*251*/"); + add("7,1,5148,25410,15094,"); + add("-78,-27,72,-48,-71,134,82,-126,180,79,41,-93,"); + add("22,67,-118,-13,83,-135,"); + add(""); + //add("/*252*/"); + add("7,1,24083,-4111,-17411,"); + add("-86,-14,-114,-93,-6,-126,-79,82,-125,26,70,20,"); + add("82,-15,114,86,-24,122,"); + add(""); + //add("/*253*/"); + add("8,1,12234,-12996,-24113,"); + add("-13,134,-78,-26,127,-81,41,134,-49,38,-2,21,"); + add("7,-140,76,11,-113,66,-8,-133,66,"); + add(""); + //add("/*254*/"); + add("7,1,1263,19267,22961,"); + add("-88,-22,23,-158,-114,102,113,-77,58,145,-30,17,"); + add("99,111,-97,-85,84,-65,"); + add(""); + //add("/*255*/"); + add("7,1,24383,5280,-16661,"); + add("76,-40,99,82,-101,90,0,-112,-34,-83,-22,-130,"); + add("-94,69,-117,-28,126,-2,"); + add(""); + //add("/*256*/"); + add("7,1,-3500,28664,8132,"); + add("-101,3,-56,-87,-33,79,32,-31,122,146,-35,183,"); + add("74,35,-91,-25,38,-140,"); + add(""); + //add("/*257*/"); + add("8,-1,10996,25265,11864,"); + add("114,-70,44,116,-82,64,52,-26,5,-116,97,-94,"); + add("-74,86,-116,-38,46,-62,-72,-30,131,"); + add(""); + //add("/*258*/"); + add("7,1,-8489,-28676,2368,"); + add("-45,2,-135,100,-37,-107,135,-40,-4,125,-27,112,"); + add("-82,28,67,-130,43,60,"); + add(""); + //add("/*259*/"); + add("7,1,-8544,-28708,1696,"); + add("-64,29,149,-100,35,82,-99,28,-39,-66,10,-166,"); + add("105,-33,-17,131,-44,-61,"); + add(""); + //add("/*260*/"); + add("7,1,-13684,26583,2464,"); + add("-102,-45,-76,-137,-72,-1,-98,-61,98,57,23,82,"); + add("129,64,34,127,69,-25,"); + add(""); + //add("/*261*/"); + add("7,1,-26462,13710,-3429,"); + add("-39,-77,-11,-70,-135,9,-110,-205,50,42,81,-8,"); + add("70,130,-33,70,134,-11,"); + add(""); + //add("/*262*/"); + add("8,1,25177,-2424,-16132,"); + add("51,-55,88,15,-120,43,7,-149,35,-50,-56,-68,"); + add("-40,47,-72,-13,136,-42,-1,134,-23,"); + add(""); + //add("/*263*/"); + add("7,1,-3593,28752,7771,"); + add("-130,-26,38,52,-25,114,199,4,74,-100,25,-133,"); + add("94,-2,50,-8,17,-66,"); + add(""); + //add("/*264*/"); + add("7,-1,18992,23204,-949,"); + add("50,-38,79,76,-60,101,116,-98,-56,11,-14,-132,"); + add("-109,85,-121,-102,88,82,"); + add(""); + //add("/*265*/"); + add("8,-1,16204,715,25237,"); + add("81,6,-52,141,-44,-91,9,71,-7,57,116,-41,"); + add("-71,-2,46,-126,-45,84,-122,-29,79,"); + add(""); + //add("/*266*/"); + add("7,1,11947,21012,-17769,"); + add("90,-72,-26,194,-154,-48,-100,47,-12,-129,85,11,"); + add("-141,54,-30,6,35,45,"); + add(""); + //add("/*267*/"); + add("8,1,-16323,24985,3054,"); + add("-64,-37,-40,-137,-88,-25,45,14,127,106,64,47,"); + add("-94,-61,-2,45,28,14,119,78,0,"); + add(""); + //add("/*268*/"); + add("8,-1,7459,26926,10924,"); + add("54,-44,73,122,-54,47,141,-87,112,-11,22,-44,"); + add("-44,63,-124,-40,29,-43,-140,56,-39,"); + add(""); + //add("/*269*/"); + add("7,1,4421,25599,-15005,"); + add("-163,57,51,-149,43,31,21,58,107,177,-45,-28,"); + add("85,-78,-109,70,-35,-40,"); + add(""); + //add("/*270*/"); + add("7,1,-3740,24124,-17437,"); + add("101,-6,-30,60,-71,-110,103,-102,-159,-74,7,24,"); + add("-92,67,110,-103,58,101,"); + add(""); + //add("/*271*/"); + add("7,-1,1630,23899,18060,"); + add("-7,-73,97,26,-79,102,152,4,-20,36,74,-101,"); + add("-85,82,-100,-54,59,-73,"); + add(""); + //add("/*272*/"); + add("8,-1,17320,22752,-9075,"); + add("98,-58,42,126,-77,52,92,-86,-38,-16,-14,-65,"); + add("-118,74,-44,-114,64,-61,-33,40,37,"); + add(""); + //add("/*273*/"); + add("7,1,6068,25608,14403,"); + add("-109,-11,63,-81,-45,113,88,-96,131,38,13,-37,"); + add("76,40,-102,88,57,-137,"); + add(""); + //add("/*274*/"); + add("7,-1,17827,6043,23359,"); + add("31,69,-41,30,130,-58,-71,130,20,-122,-25,100,"); + add("-17,-150,53,104,-86,-57,"); + add(""); + //add("/*275*/"); + add("7,1,1364,-29308,-6258,"); + add("-135,6,-59,24,23,-99,160,6,5,116,9,-12,"); + add("-36,-41,177,-50,-18,77,"); + add(""); + //add("/*276*/"); + add("7,-1,-18191,-23193,5583,"); + add("-74,68,39,-13,62,212,-55,22,-91,-92,34,-161,"); + add("66,-58,-18,115,-88,14,"); + add(""); + //add("/*277*/"); + add("7,1,-5480,29422,-2079,"); + add("-34,-15,-115,-39,-20,-165,-65,-8,54,-52,0,129,"); + add("-26,6,157,144,28,11,"); + add(""); + //add("/*278*/"); + add("7,1,-26312,13467,5132,"); + add("-14,-64,92,38,20,140,63,44,193,-5,18,-68,"); + add("-32,5,-167,-49,-50,-118,"); + add(""); + //add("/*279*/"); + add("7,1,22241,13603,14842,"); + add("-48,6,67,-63,-46,135,-55,-108,176,47,-5,-64,"); + add("67,36,-130,39,71,-123,"); + add(""); + //add("/*280*/"); + add("7,-1,-10783,26096,-10136,"); + add("-73,-35,-11,-140,-53,13,-193,-93,-27,52,35,34,"); + add("133,61,9,143,53,-17,"); + add(""); + //add("/*281*/"); + add("7,1,29783,1256,-3378,"); + add("4,68,62,9,88,122,11,87,149,6,-96,12,"); + add("-11,-65,-136,-11,-87,-135,"); + add(""); + //add("/*282*/"); + add("6,1,-17758,24025,2727,"); + add("-29,-6,-136,-87,-59,-52,-36,-45,161,-5,-25,188,"); + add("115,91,-49,"); + add(""); + //add("/*283*/"); + add("7,-1,-23952,18049,730,"); + add("-55,-75,42,-87,-119,38,-109,-148,28,35,46,27,"); + add("86,118,-37,85,116,-45,"); + add(""); + //add("/*284*/"); + add("7,-1,-1959,8253,28776,"); + add("-85,-33,3,-109,-82,16,-4,-124,34,54,-81,27,"); + add("-38,210,-62,109,71,-12,"); + add(""); + //add("/*285*/"); + add("7,1,24446,-969,-17363,"); + add("-58,-41,-79,-90,6,-125,-105,28,-146,25,31,33,"); + add("90,3,124,90,-3,125,"); + add(""); + //add("/*286*/"); + add("8,1,2887,27868,10725,"); + add("80,24,-85,93,20,-77,7,53,-145,-59,-21,75,"); + add("-54,25,-53,-39,-26,81,-25,-45,125,"); + add(""); + //add("/*287*/"); + add("7,1,21419,-3233,-20756,"); + add("-24,-119,-5,12,-123,32,-51,-112,-33,-75,85,-91,"); + add("2,117,-17,84,108,68,"); + add(""); + //add("/*288*/"); + add("8,1,20078,-7369,-21038,"); + add("-57,-7,-51,-117,-24,-103,-4,61,-24,22,130,-24,"); + add("47,74,19,75,-19,78,19,-139,65,"); + add(""); + //add("/*289*/"); + add("7,1,10608,21446,-18098,"); + add("-155,71,-6,-130,74,14,-41,49,34,179,-75,14,"); + add("129,-71,-9,65,-54,-26,"); + add(""); + //add("/*290*/"); + add("7,1,16151,-1050,-25260,"); + add("73,-1,47,122,24,78,149,-61,101,-61,-44,-39,"); + add("-138,-12,-89,-119,62,-80,"); + add(""); + //add("/*291*/"); + add("7,1,6256,-8530,-28073,"); + add("-89,-10,-17,-70,70,-36,128,113,-6,110,109,-7,"); + add("42,-69,29,-89,-109,12,"); + add(""); + //add("/*292*/"); + add("7,1,21026,13541,-16569,"); + add("85,-69,51,75,-69,41,109,-154,15,-55,43,-35,"); + add("-94,98,-42,-107,95,-60,"); + add(""); + //add("/*293*/"); + add("8,-1,-18859,-22602,5789,"); + add("106,-54,128,-49,49,33,-140,115,-9,47,-48,-33,"); + add("-95,67,-50,48,-51,-39,45,-53,-57,"); + add(""); + //add("/*294*/"); + add("7,-1,13656,23661,12396,"); + add("32,42,-116,-54,77,-89,-37,92,-139,-18,-4,28,"); + add("39,-82,118,30,-82,124,"); + add(""); + //add("/*295*/"); + add("6,1,8006,23007,-17510,"); + add("-151,56,6,-121,86,60,17,53,78,158,-90,-50,"); + add("129,-58,-17,"); + add(""); + //add("/*296*/"); + add("6,1,3087,24735,16693,"); + add("-183,-19,61,72,-85,112,104,-38,36,118,33,-70,"); + add("-33,81,-113,"); + add(""); + //add("/*297*/"); + add("8,1,-12618,24857,-11088,"); + add("2,-45,-102,-53,-74,-102,-86,-31,27,-39,-19,5,"); + add("-60,-22,19,43,77,120,114,79,46,"); + add(""); + //add("/*298*/"); + add("7,1,-11749,25130,-11421,"); + add("-35,-49,-71,-110,-76,-53,-90,-82,-83,-13,29,76,"); + add("66,77,98,79,60,49,"); + add(""); + //add("/*299*/"); + add("6,1,25018,-660,-16543,"); + add("66,-4,101,79,41,119,27,-147,48,-86,-7,-132,"); + add("-78,19,-120,"); + add(""); + //add("/*300*/"); + add("6,1,-15854,-24577,6681,"); + add("-80,25,-102,-66,-1,-162,84,-61,-26,86,-28,105,"); + add("62,-4,134,"); + add(""); + //add("/*301*/"); + add("7,-1,-17115,24557,-2011,"); + add("-4,-10,-84,-33,-36,-146,-32,-36,-148,-29,-18,28,"); + add("31,35,137,43,41,129,"); + add(""); + //add("/*302*/"); + add("6,1,11398,-4172,-27435,"); + add("70,-114,47,-117,-58,-40,-136,-105,-39,19,127,-12,"); + add("86,103,19,"); + add(""); + //add("/*303*/"); + add("6,1,-7436,14318,25292,"); + add("-138,-58,-8,-83,-61,10,93,-96,81,117,106,-25,"); + add("98,110,-33,"); + add(""); + //add("/*304*/"); + add("6,1,23814,-745,-18231,"); + add("5,-93,11,-74,-60,-93,-123,36,-160,55,113,66,"); + add("88,29,112,"); + add(""); + //add("/*305*/"); + add("6,1,-1698,25570,15597,"); + add("-88,-23,28,-115,-50,69,-31,-88,138,120,34,-41,"); + add("93,65,-95,"); + add(""); + //add("/*306*/"); + add("6,1,-11912,25153,-11200,"); + add("122,17,-91,-65,-58,-60,-143,-93,-55,-30,42,124,"); + add("22,55,98,"); + add(""); + //add("/*307*/"); + add("7,-1,-20089,-9689,20064,"); + add("-66,89,-24,-76,153,-4,-18,-81,-56,69,-127,9,"); + add("0,-83,-41,39,-9,36,"); + add(""); + //add("/*308*/"); + add("6,-1,22251,15516,-12811,"); + add("-4,-87,-113,-86,26,-115,-20,54,30,-35,135,102,"); + add("72,-15,105,"); + add(""); + //add("/*309*/"); + add("6,1,-6458,14255,25595,"); + add("-96,-106,34,-5,-26,13,156,64,4,89,105,-36,"); + add("-32,97,-62,"); + add(""); + //add("/*310*/"); + add("6,1,24489,-4261,-16797,"); + add("-10,-92,9,-89,-34,-121,-92,55,-144,55,71,59,"); + add("88,1,127,"); + add(""); + //add("/*311*/"); + add("6,1,-3316,28682,8146,"); + add("-99,13,-88,-180,-9,-46,35,-13,63,114,-17,109,"); + add("104,-4,57,"); + add(""); + //add("/*312*/"); + add("6,1,23528,1053,-18582,"); + add("-67,39,-83,-53,129,-59,31,123,48,82,-81,98,"); + add("24,-132,22,"); + add(""); + //add("/*313*/"); + add("6,1,-6353,29317,-386,"); + add("14,2,-107,-3,-4,-150,-118,-26,-18,-33,-4,162,"); + add("41,10,114,"); + add(""); + //add("/*314*/"); + add("6,1,23124,-10704,15834,"); + add("-88,-20,114,-37,-123,-29,45,-75,-117,87,56,-90,"); + add("11,96,50,"); + add(""); + //add("/*315*/"); + add("6,1,-10965,-27064,6879,"); + add("25,16,101,-67,56,109,-142,44,-53,-20,-23,-122,"); + add("130,-66,-46,"); + add(""); + //add("/*316*/"); + add("6,-1,4917,27988,9617,"); + add("96,-21,12,87,14,-86,-36,72,-196,-54,-7,52,"); + add("-60,-39,146,"); + add(""); + //add("/*317*/"); + add("6,1,-11542,-27125,5570,"); + add("69,-16,65,6,36,182,-109,54,35,-56,5,-86,"); + add("48,-47,-128,"); + add(""); + //add("/*318*/"); + add("6,1,22858,-880,-19409,"); + add("54,-24,64,110,-68,135,-61,-87,-69,-99,7,-118,"); + add("-23,91,-31,"); + add(""); + //add("/*319*/"); + add("6,1,-27648,11150,3354,"); + add("-39,-102,17,-24,-74,43,36,42,159,49,126,-16,"); + add("5,55,-140,"); + add(""); + //add("/*320*/"); + add("6,1,4612,1962,29578,"); + add("-94,-31,17,-91,-132,22,33,-105,1,110,57,-20,"); + add("72,140,-20,"); + add(""); + //add("/*321*/"); + add("6,1,-1839,23767,-18214,"); + add("43,-51,-70,184,-58,-92,-78,-8,-5,-124,19,37,"); + add("-76,60,86,"); + add(""); + //add("/*322*/"); + add("6,1,-26596,11995,6985,"); + add("-39,-139,86,-29,-85,33,2,-50,90,31,136,-108,"); + add("38,127,-73,"); + add(""); + //add("/*323*/"); + add("6,1,23795,-164,-18269,"); + add("46,-55,61,-29,-158,-37,-96,-53,-122,18,74,22,"); + add("25,130,30,"); + add(""); + //add("/*324*/"); + add("6,-1,-22867,-15404,11824,"); + add("41,24,111,-8,76,82,-82,57,-84,-53,-42,-157,"); + add("49,-85,-16,"); + add(""); + //add("/*325*/"); + add("6,1,11693,24510,-12748,"); + add("-64,-20,-97,-125,88,56,42,40,114,136,-64,1,"); + add("67,-45,-25,"); + add(""); + //add("/*326*/"); + add("6,1,-11168,-26833,7435,"); + add("18,20,99,82,1,123,-42,34,56,-107,16,-99,"); + add("-14,-37,-154,"); + add(""); + //add("/*327*/"); + add("6,1,-13936,24051,-11284,"); + add("-74,-76,-70,-60,-62,-58,-96,-32,54,16,53,90,"); + add("118,80,24,"); + add(""); + //add("/*328*/"); + add("6,1,29225,434,-6762,"); + add("18,61,82,30,61,138,16,-62,70,-16,-81,-79,"); + add("-37,-17,-167,"); + add(""); + //add("/*329*/"); + add("5,1,-3608,-29413,4678,"); + add("-92,6,-37,-199,3,-144,96,-6,43,125,-3,78,"); + add(""); + //add("/*330*/"); + add("5,1,27658,11617,-322,"); + add("34,-81,36,84,-207,-52,-36,85,-79,-53,132,33,"); + add(""); + //add("/*331*/"); + add("5,1,-2705,-28959,7352,"); + add("-24,22,78,-115,57,175,-66,-24,-114,139,-38,-97,"); + add(""); + //add("/*332*/"); + add("5,-1,-15874,23873,-8837,"); + add("-68,-40,15,-221,-126,61,94,56,-19,128,75,-31,"); + add(""); + //add("/*333*/"); + add("5,1,-22981,137,19284,"); + add("-96,-29,-116,4,-81,5,107,-35,129,62,114,74,"); + add(""); + //add("/*334*/"); + add("6,1,-7340,25545,-13913,"); + add("87,9,-28,74,-38,-109,-2,-50,-89,-113,4,66,"); + add("-83,37,110,"); + add(""); + //add("/*335*/"); + add("5,1,1932,28169,-10137,"); + add("142,19,82,88,-34,-77,-105,-34,-118,-115,11,8,"); + add(""); + //add("/*336*/"); + add("5,1,-2239,29202,6500,"); + add("-27,-20,78,-46,-58,238,41,25,-94,42,36,-144,"); + add(""); + //add("/*337*/"); + add("5,-1,-24505,2604,17110,"); + add("-50,-99,-58,-20,-122,-12,90,19,128,35,129,31,"); + add(""); + //add("/*338*/"); + add("6,1,-20336,-21189,6121,"); + add("-11,37,90,-61,85,91,-79,63,-47,19,-48,-101,"); + add("71,-85,-53,"); + add(""); + //add("/*339*/"); + add("4,1,4254,3683,-29468,"); + add("320,25,52,-163,-16,-27,-105,-40,-21,"); + add(""); + //add("/*340*/"); + add("5,1,4284,29586,2515,"); + add("59,0,-105,-86,24,-147,-98,6,99,20,-12,112,"); + add(""); + //add("/*341*/"); + add("5,1,-26886,10733,7871,"); + add("29,-12,114,85,100,149,-24,16,-99,-51,-28,-135,"); + add(""); + //add("/*342*/"); + add("5,1,-13498,24234,-11425,"); + add("-105,-65,-12,-169,-85,22,68,62,51,135,68,-19,"); + add(""); + //add("/*343*/"); + add("6,-1,22043,16210,-12301,"); + add("-56,32,-58,-70,134,52,64,2,117,-33,-4,-66,"); + add("48,-85,-26,"); + add(""); + //add("/*344*/"); + add("5,1,22450,-6144,-18928,"); + add("-111,30,-140,55,152,16,59,16,65,15,-137,61,"); + add(""); + //add("/*345*/"); + add("5,1,20013,16577,-14989,"); + add("52,-6,63,140,-83,97,-48,-44,-114,-124,73,-85,"); + add(""); + //add("/*346*/"); + add("5,1,8227,28696,2972,"); + add("-15,23,-188,-99,29,-5,-66,8,107,111,-40,86,"); + add(""); + //add("/*347*/"); + add("5,1,-6380,29120,-3367,"); + add("-28,-18,-102,-113,-43,-141,-18,11,124,101,37,117,"); + add(""); + //add("/*348*/"); + add("5,1,23793,-10289,15101,"); + add("-94,-116,68,-13,-97,-48,94,56,-108,39,97,6,"); + add(""); + //add("/*349*/"); + add("5,1,18853,-3180,23118,"); + add("48,-117,-55,67,16,-53,-36,157,51,-37,80,41,"); + add(""); + //add("/*350*/"); + add("5,1,-2898,29718,2905,"); + add("106,19,-87,-6,15,-174,-95,-14,55,-20,-16,149,"); + add(""); + //add("/*351*/"); + add("5,1,4133,24673,-16558,"); + add("22,-39,-52,-49,-76,-124,-81,-28,-61,43,111,173,"); + add(""); + //add("/*352*/"); + add("5,1,-17359,23518,6748,"); + add("-106,-60,-61,-67,-75,87,88,36,99,82,64,-9,"); + add(""); + //add("/*353*/"); + add("5,1,24745,-5658,-15990,"); + add("-70,25,-116,-48,118,-113,42,17,57,54,-81,111,"); + add(""); + //add("/*354*/"); + add("5,1,-6134,29314,-1752,"); + add("-118,-26,-10,-166,-33,39,76,20,58,144,29,-27,"); + add(""); + //add("/*355*/"); + add("5,-1,-18455,-22892,5946,"); + add("-81,50,-58,-89,38,-136,53,-53,-39,76,-27,138,"); + add(""); + //add("/*356*/"); + add("5,1,7506,28869,-3200,"); + add("-114,35,46,63,-2,141,110,-29,-5,21,-19,-124,"); + add(""); + //add("/*357*/"); + add("5,1,-19149,-22531,5067,"); + add("-69,67,39,-156,123,-52,66,-66,-41,108,-86,30,"); + add(""); + //add("/*358*/"); + add("4,1,-11154,10714,-25706,"); + add("-86,-136,-19,-138,16,67,39,94,22,"); + add(""); + //add("/*359*/"); + add("5,1,-11977,-26541,7220,"); + add("35,14,107,21,37,167,-80,16,-72,-11,-35,-141,"); + add(""); + //add("/*360*/"); + add("5,-1,12975,18669,19573,"); + add("11,61,-65,-125,125,-37,-62,-53,91,109,-97,21,"); + add(""); + //add("/*361*/"); + add("5,1,-10778,27815,3183,"); + add("3,14,-112,-37,-4,-95,-103,-47,69,52,2,161,"); + add(""); + //add("/*362*/"); + add("5,1,5802,24352,16532,"); + add("54,21,-49,116,84,-168,-73,-13,47,-91,-61,122,"); + add(""); + //add("/*363*/"); + add("5,1,10271,19027,20796,"); + add("-105,-43,91,86,-57,9,138,-37,-34,-25,72,-53,"); + add(""); + //add("/*364*/"); + add("5,1,-3812,-7158,-28883,"); + add("-111,23,9,13,124,-32,177,-2,-23,-12,-93,24,"); + add(""); + //add("/*365*/"); + add("5,-1,-26344,13706,4261,"); + add("-48,-69,-76,-47,-96,15,4,-31,122,74,139,13,"); + add(""); + //add("/*366*/"); + add("4,1,4332,-21849,-20096,"); + add("26,-143,162,-151,20,-55,29,71,-71,"); + add(""); + //add("/*367*/"); + add("5,1,11385,17811,21287,"); + add("-72,-41,73,-16,-121,108,94,11,-58,28,107,-104,"); + add(""); + //add("/*368*/"); + add("5,1,-25127,12810,-10224,"); + add("-25,-70,-26,-55,-132,-27,-31,-66,-6,84,203,43,"); + add(""); + //add("/*369*/"); + add("5,1,12061,-19379,-19468,"); + add("5,59,-55,129,111,-29,57,-24,58,-99,-108,46,"); + add(""); + //add("/*370*/"); + add("5,1,14601,-4888,-25747,"); + add("-33,-105,1,-141,-47,-70,-24,67,-26,108,73,46,"); + add(""); + //add("/*371*/"); + add("5,1,3182,28027,10215,"); + add("85,25,-94,-63,50,-119,-84,-20,80,0,-45,125,"); + add(""); + //add("/*372*/"); + add("5,1,24760,-13205,-10611,"); + add("48,83,9,95,156,31,-11,-49,34,-80,-123,-34,"); + add(""); + //add("/*373*/"); + add("5,1,22676,-468,-19636,"); + add("56,-46,66,-18,-132,-18,-76,-21,-86,-5,159,-11,"); + add(""); + //add("/*374*/"); + add("5,1,-8077,26065,-12464,"); + add("24,-25,-69,23,-83,-185,-55,7,48,-13,63,140,"); + add(""); + //add("/*375*/"); + add("5,1,-16783,-24152,5918,"); + add("73,-71,-85,118,-89,-31,-30,39,75,-98,81,53,"); + add(""); + //add("/*376*/"); + add("5,1,3471,29597,3461,"); + add("97,-6,-45,40,14,-168,-80,10,-3,-41,-11,138,"); + add(""); + //add("/*377*/"); + add("5,1,-23913,14805,-10440,"); + add("-45,-76,-3,-118,-129,90,31,66,22,92,106,-63,"); + add(""); + //add("/*378*/"); + add("5,1,-13537,24149,-11558,"); + add("-78,-47,-6,-155,-73,31,19,38,57,133,62,-27,"); + add(""); + //add("/*379*/"); + add("5,1,25723,-3019,-15140,"); + add("2,-81,20,-24,-199,1,-13,55,-33,15,150,-7,"); + add(""); + //add("/*380*/"); + add("5,1,18791,-8648,-21728,"); + add("-47,28,-51,-101,94,-124,74,33,50,73,-79,94,"); + add(""); + //add("/*381*/"); + add("5,1,-8993,-28620,-183,"); + add("89,-27,-50,148,-46,22,-1,0,52,-139,43,28,"); + add(""); + //add("/*382*/"); + add("5,1,-8768,-28641,-1673,"); + add("23,-13,95,-32,2,151,-70,24,-46,16,3,-153,"); + add(""); + //add("/*383*/"); + add("5,-1,16062,838,25324,"); + add("49,20,-32,167,83,-110,-83,-10,54,-116,-55,76,"); + add(""); + //add("/*384*/"); + add("5,1,-26157,14015,4405,"); + add("-30,-67,29,-77,-171,83,22,47,-18,57,127,-58,"); + add(""); + //add("/*385*/"); + add("5,1,21813,15801,-13211,"); + add("-2,-58,-71,-52,-66,-164,-11,47,39,26,72,126,"); + add(""); + //add("/*386*/"); + add("5,-1,-19641,22184,4702,"); + add("-76,-56,-55,-110,-117,85,52,40,29,78,83,-59,"); + add(""); + //add("/*387*/"); + add("5,1,15005,-1299,-25945,"); + add("-59,-53,-32,-124,-41,-69,-8,102,-9,133,23,75,"); + add(""); + //add("/*388*/"); + add("5,1,-10453,11094,-25839,"); + add("67,-43,-46,-1,-102,-42,-151,-27,49,32,108,33,"); + add(""); + //add("/*389*/"); + add("5,1,-26735,12315,5795,"); + add("-46,-82,-39,-37,-127,97,35,47,62,40,120,-67,"); + add(""); + //add("/*390*/"); + add("5,-1,-16802,23231,-8833,"); + add("-19,-44,-78,-139,-124,-58,33,33,22,101,96,58,"); + add(""); + //add("/*391*/"); + add("5,1,14422,-5109,-25805,"); + add("-79,-114,-21,-125,-36,-62,57,63,19,112,85,45,"); + add(""); + //add("/*392*/"); + add("5,1,10064,-5982,-27621,"); + add("-68,-60,-12,-159,-76,-40,16,47,-5,131,70,32,"); + add(""); + //add("/*393*/"); + add("5,1,24783,-4317,-16345,"); + add("6,-74,28,-42,-75,-43,-68,125,-136,56,14,81,"); + add(""); + //add("/*394*/"); + add("5,1,-13180,26791,2922,"); + add("52,32,-58,2,16,-147,-90,-46,20,-26,-27,133,"); + add(""); + //add("/*395*/"); + add("4,1,-1749,25344,15957,"); + add("-94,-46,62,119,-78,137,-3,58,-93,"); + add(""); + //add("/*396*/"); + add("5,1,-26328,14008,-3259,"); + add("-27,-66,-62,-66,-147,-86,14,34,27,52,118,77,"); + add(""); + //add("/*397*/"); + add("4,1,24089,7261,-16340,"); + add("48,-182,-10,-71,8,-101,-20,136,32,"); + add(""); + //add("/*398*/"); + add("4,1,-7194,13999,25540,"); + add("129,4,33,19,128,-65,-131,-13,-29,"); + add(""); + //add("/*399*/"); + add("5,-1,-24613,17122,1025,"); + add("-3,-11,108,-31,-55,138,11,15,3,31,54,-135,"); + add(""); + //add("/*400*/"); + add("5,1,20152,-5943,21414,"); + add("-22,-105,-8,22,-119,-55,45,37,-32,-6,160,52,"); + add(""); + //add("/*401*/"); + add("5,1,-1915,23677,-18322,"); + add("-91,-20,-17,-173,3,23,42,15,15,142,5,-9,"); + add(""); + //add("/*402*/"); + add("5,1,-23760,17289,6048,"); + add("47,40,67,89,121,3,20,27,-4,-112,-147,-13,"); + add(""); + //add("/*403*/"); + add("5,1,-14558,23775,-11081,"); + add("15,-31,-86,-12,-74,-142,-40,-5,41,4,69,142,"); + add(""); + //add("/*404*/"); + add("5,1,-12479,24643,-11704,"); + add("-55,-50,-48,-152,-89,-22,17,26,36,120,74,27,"); + add(""); + //add("/*405*/"); + add("4,1,5264,29534,-120,"); + add("82,-15,-121,-123,21,-60,-42,9,160,"); + add(""); + //add("/*406*/"); + add("5,1,13262,-5908,-26253,"); + add("-65,-72,-16,-137,-56,-56,7,54,-9,131,60,52,"); + add(""); + //add("/*407*/"); + add("4,1,-20288,22087,756,"); + add("19,19,-81,-118,-104,-125,29,23,110,"); + add(""); + //add("/*408*/"); + add("5,1,19086,-2847,22970,"); + add("38,55,-25,26,149,-4,-46,33,42,-22,-149,1,"); + add(""); + //add("/*409*/"); + add("4,1,-2873,28899,7523,"); + add("-133,-13,0,14,-30,117,144,12,10,"); + add(""); + //add("/*410*/"); + add("5,1,15596,18597,-17633,"); + add("67,-43,14,89,-115,-41,-45,-18,-58,-66,96,41,"); + add(""); + //add("/*411*/"); + add("5,-1,-28925,7951,348,"); + add("9,27,78,35,121,116,-1,-1,-35,-24,-79,-152,"); + add(""); + //add("/*412*/"); + add("5,-1,9541,23385,16190,"); + add("-2,-50,73,79,-109,108,19,19,-38,-53,97,-107,"); + add(""); + //add("/*413*/"); + add("5,1,29210,473,-6823,"); + add("15,77,72,31,35,138,-2,-56,-13,-30,-68,-138,"); + add(""); + //add("/*414*/"); + add("5,1,-25829,15180,1561,"); + add("-4,2,-86,-23,-24,-175,1,0,31,20,19,148,"); + add(""); + //add("/*415*/"); + add("5,1,-20000,22355,530,"); + add("-25,-22,-75,-69,-59,-143,-15,-14,47,64,55,123,"); + add(""); + //add("/*416*/"); + add("4,1,-444,-28368,9750,"); + add("52,35,103,-161,22,54,22,-47,-132,"); + add(""); + //add("/*417*/"); + add("4,1,2286,29384,5600,"); + add("-108,22,-73,-64,-19,124,98,-19,59,"); + add(""); + //add("/*418*/"); + add("4,1,-9750,11346,-26004,"); + add("114,-63,-70,-93,-91,-4,-88,65,60,"); + add(""); + //add("/*419*/"); + add("4,1,29357,1075,-6086,"); + add("26,-12,125,3,-133,-7,-25,20,-118,"); + add(""); + //add("/*420*/"); + add("5,1,-4180,-7285,-28800,"); + add("-96,6,12,12,67,-18,173,35,-34,-21,-79,23,"); + add(""); + //add("/*421*/"); + add("4,1,21812,-2819,-20403,"); + add("43,-216,77,-30,61,-41,-39,132,-60,"); + add(""); + //add("/*422*/"); + add("4,1,-6475,29293,-129,"); + add("-137,-31,54,34,8,102,130,29,-57,"); + add(""); + //add("/*423*/"); + add("4,1,-9851,-28219,2574,"); + add("-20,18,125,-123,38,-61,54,-29,-113,"); + add(""); + //add("/*424*/"); + add("4,1,6163,-10670,-27353,"); + add("84,30,8,-8,-122,46,-130,-35,-16,"); + add(""); + //add("/*425*/"); + add("5,1,24033,10600,14493,"); + add("-1,-61,47,-4,-116,90,29,-16,-37,-1,119,-84,"); + add(""); + //add("/*426*/"); + add("4,1,-10404,28061,2080,"); + add("-168,-58,-65,15,0,83,149,52,44,"); + add(""); + //add("/*427*/"); + add("4,-1,-6287,25435,-14613,"); + add("-175,-65,-37,-33,20,50,109,54,46,"); + add(""); + //add("/*428*/"); + add("4,1,3313,24533,16946,"); + add("72,-54,64,137,8,-41,-83,49,-52,"); + add(""); + //add("/*429*/"); + add("5,1,-17749,22168,9672,"); + add("-55,-22,-51,-134,-84,-55,35,14,33,110,69,45,"); + add(""); + //add("/*430*/"); + add("4,1,-24211,14614,-10014,"); + add("-45,-101,-37,-61,-44,84,77,151,33,"); + add(""); + //add("/*431*/"); + add("5,1,6168,20534,20984,"); + add("78,-19,-5,155,-9,-37,-14,11,-7,-148,19,25,"); + add(""); + //add("/*432*/"); + add("4,1,25249,3517,-15816,"); + add("54,-55,75,-32,-104,-73,-61,98,-77,"); + add(""); + //add("/*433*/"); + add("5,1,24510,6812,-15901,"); + add("-3,-70,-35,-47,-99,-113,-7,16,-4,32,110,94,"); + add(""); + //add("/*434*/"); + add("4,1,8900,28579,2013,"); + add("-28,18,-145,-98,29,17,48,-23,129,"); + add(""); + //add("/*435*/"); + add("4,1,-19110,-22514,5287,"); + add("-134,112,-16,34,-47,-73,77,-68,-7,"); + add(""); + //add("/*436*/"); + add("4,1,-26431,12476,6763,"); + add("-53,-173,112,21,25,32,28,120,-106,"); + add(""); + //add("/*437*/"); + add("4,1,-6923,29146,-1603,"); + add("-11,-10,-135,-86,-21,-1,12,12,153,"); + add(""); + //add("/*438*/"); + add("4,1,-7322,29032,-1885,"); + add("-93,-29,-71,-84,-16,84,116,34,54,"); + add(""); + //add("/*439*/"); + add("4,1,3874,29626,2697,"); + add("158,-14,-71,-62,11,-39,-140,12,75,"); + add(""); + //add("/*440*/"); + add("5,-1,-20399,-10562,19296,"); + add("-47,54,-21,-103,82,-64,4,-32,-13,72,-61,43,"); + add(""); + //add("/*441*/"); + add("4,1,-12040,-26645,6714,"); + add("91,-7,132,-57,34,35,-79,-3,-151,"); + add(""); + //add("/*442*/"); + add("4,1,-8141,28851,-1154,"); + add("-44,-19,-149,-67,-18,19,46,19,149,"); + add(""); + //add("/*443*/"); + add("4,1,-26611,11542,7659,"); + add("-88,-157,-73,26,23,58,70,125,54,"); + add(""); + //add("/*444*/"); + add("4,1,-25420,7629,13987,"); + add("24,-119,108,39,84,24,-21,80,-81,"); + add(""); + //add("/*445*/"); + add("4,1,-361,26098,14791,"); + add("-10,-64,111,54,-28,50,26,82,-142,"); + add(""); + //add("/*446*/"); + add("4,1,-10298,18382,21356,"); + add("130,-27,85,49,46,-16,-147,13,-81,"); + add(""); + //add("/*447*/"); + add("4,1,-6714,29188,-1727,"); + add("-94,-24,-29,-73,-10,108,114,26,-7,"); + add(""); + //add("/*448*/"); + add("4,1,-14486,-9145,-24628,"); + add("-107,-23,72,0,72,-27,104,40,-76,"); + add(""); + //add("/*449*/"); + add("3,1,-12116,27417,1220,"); + add("-145,-70,134,73,33,-17,"); + add(""); + //add("/*450*/"); + add("4,1,12149,-27337,-2254,"); + add("-8,3,-82,91,46,-59,-14,-19,153,"); + add(""); + //add("/*451*/"); + add("3,1,4304,29609,2188,"); + add("-48,20,-185,-38,-3,124,"); + add(""); + //add("/*452*/"); + add("4,1,-12276,24972,-11211,"); + add("-4,-43,-90,-130,-57,15,74,60,50,"); + add(""); + //add("/*453*/"); + add("4,1,3993,24360,17048,"); + add("106,2,-27,-55,80,-102,-56,-28,53,"); + add(""); + //add("/*454*/"); + add("4,1,4361,29555,2736,"); + add("-38,14,-91,-116,16,2,75,-20,101,"); + add(""); + //add("/*455*/"); + add("4,1,-18479,-23127,4866,"); + add("-52,67,118,-61,35,-66,59,-62,-71,"); + add(""); + //add("/*456*/"); + add("4,-1,2259,21690,20602,"); + add("163,40,-61,-51,30,-26,-119,-48,64,"); + add(""); + //add("/*457*/"); + add("4,1,20331,14288,-16807,"); + add("113,-62,84,2,-51,-41,-116,87,-67,"); + add(""); + //add("/*458*/"); + add("4,1,-16786,-24244,5517,"); + add("-13,-14,-98,115,-77,10,-36,41,70,"); + add(""); + //add("/*459*/"); + add("4,1,-1657,25010,16486,"); + add("-107,31,-59,-27,-59,86,106,-9,25,"); + add(""); + //add("/*460*/"); + add("4,1,-1331,-20857,-21523,"); + add("-32,87,-81,12,31,-31,94,-42,35,"); + add(""); + //add("/*461*/"); + add("3,1,-26552,5728,12735,"); + add("86,-10,182,-41,30,-98,"); + add(""); + //add("/*462*/"); + add("3,1,-11118,27856,637,"); + add("-170,-68,5,82,32,63,"); + add(""); + //add("/*463*/"); + add("4,1,2831,-28218,9783,"); + add("42,27,67,-99,15,70,-19,-40,-108,"); + add(""); + //add("/*464*/"); + add("3,1,23950,2362,-17911,"); + add("20,-179,4,-44,82,-49,"); + add(""); + //add("/*465*/"); + add("3,1,29304,688,-6390,"); + add("3,-151,3,-18,18,-82,"); + add(""); + //add("/*466*/"); + add("3,1,-9197,-28136,4878,"); + add("-159,68,85,75,-37,-64,"); + add(""); + //add("/*467*/"); + add("4,1,-10259,28140,1705,"); + add("-56,-25,63,62,17,101,34,17,-76,"); + add(""); + //add("/*468*/"); + add("3,1,29280,766,-6487,"); + add("34,42,158,-23,-96,-116,"); + add(""); + //add("/*469*/"); + add("4,1,6865,26520,12229,"); + add("-38,-15,54,43,-56,96,50,31,-93,"); + add(""); + //add("/*470*/"); + add("3,1,13499,-19327,-18554,"); + add("45,135,-107,13,-80,93,"); + add(""); + //add("/*471*/"); + add("3,-1,16732,5918,24187,"); + add("-123,131,53,50,-84,-14,"); + add(""); + //add("/*472*/"); + add("3,1,13670,-4696,-26288,"); + add("-146,-71,-63,60,85,15,"); + add(""); + //add("/*473*/"); + add("3,1,2313,23926,-17950,"); + add("-161,-16,-41,80,47,72,"); + add(""); + //add("/*474*/"); + add("3,1,3781,28274,9290,"); + add("93,34,-146,-91,-6,58,"); + add(""); + //add("/*475*/"); + add("3,1,25584,3122,-15352,"); + add("-85,-26,-147,17,59,39,"); + add(""); + //add("/*476*/"); + add("3,1,29702,3744,-1936,"); + add("17,-153,-35,-15,89,-55,"); + add(""); + //add("/*477*/"); + add("3,1,24789,6574,-15566,"); + add("65,-169,34,-52,102,-40,"); + add(""); + //add("/*478*/"); + add("3,-1,-29247,6430,1802,"); + add("-11,-85,122,17,72,23,"); + add(""); + //add("/*479*/"); + add("3,1,-6095,14636,25468,"); + add("-135,-95,22,97,7,20,"); + add(""); + //add("/*480*/"); + add("3,1,-10821,10826,-25801,"); + add("-167,-23,61,65,41,-11,"); + add(""); + //add("/*481*/"); + add("3,1,29023,590,-7570,"); + add("34,-5,129,-19,-95,-79,"); + add(""); + //add("/*482*/"); + add("3,1,23976,5439,-17192,"); + add("39,-177,-1,-33,87,-18,"); + add(""); + //add("/*483*/"); + add("4,1,5247,29038,-5412,"); + add("-99,36,100,26,0,28,97,-32,-81,"); + add(""); + //add("/*484*/"); + add("4,1,-18202,-23335,4919,"); + add("15,5,73,-62,62,68,2,-22,-100,"); + add(""); + //add("/*485*/"); + add("3,1,5756,-9056,-28015,"); + add("57,-84,39,-130,-10,-23,"); + add(""); + //add("/*486*/"); + add("3,1,-11472,-27071,5962,"); + add("-89,67,132,14,-25,-86,"); + add(""); + //add("/*487*/"); + add("3,1,-12893,26395,6088,"); + add("-47,3,-113,-50,-50,112,"); + add(""); + //add("/*488*/"); + add("3,1,5886,-8242,-28239,"); + add("26,166,-42,24,-67,24,"); + add(""); + //add("/*489*/"); + add("4,1,8245,18657,21999,"); + add("-25,-59,59,73,-66,28,2,70,-60,"); + add(""); + //add("/*490*/"); + add("3,1,5232,21275,20494,"); + add("58,-123,112,-13,69,-68,"); + add(""); + //add("/*491*/"); + add("4,1,-16253,-24546,5776,"); + add("-9,-21,-120,76,-43,33,-12,23,62,"); + add(""); + //add("/*492*/"); + add("3,-1,9502,25942,11694,"); + add("165,-65,8,-75,35,-15,"); + add(""); + //add("/*493*/"); + add("3,1,-12159,27406,1045,"); + add("-141,-66,59,88,39,12,"); + add(""); + //add("/*494*/"); + add("3,1,5425,21100,20624,"); + add("135,-94,60,-70,58,-40,"); + add(""); + //add("/*495*/"); + add("3,-1,3389,22127,19973,"); + add("-144,69,-53,28,-42,42,"); + add(""); + //add("/*496*/"); + add("3,1,-29998,-271,-211,"); + add("1,-103,-27,-1,44,124,"); + add(""); + //add("/*497*/"); + add("3,1,-6646,3953,28986,"); + add("154,-35,40,-66,64,-23,"); + add(""); + //add("/*498*/"); + add("3,1,17776,-4397,-23763,"); + add("-125,-94,-76,59,61,33,"); + add(""); + //add("/*499*/"); + add("3,1,15919,-2901,-25262,"); + add("-86,-113,-41,2,103,-10,"); + add(""); + //add("/*500*/"); + add("3,1,10276,18702,21087,"); + add("34,-115,84,49,48,-65,"); + add(""); + //add("/*501*/"); + add("3,1,-27182,9729,8156,"); + add("24,-63,152,0,71,-83,"); + add(""); + //add("/*502*/"); + add("3,1,-5062,29557,-877,"); + add("-151,-26,15,102,19,47,"); + add(""); + //add("/*503*/"); + add("3,1,5323,-9639,-27906,"); + add("94,-7,20,-115,-91,10,"); + add(""); + //add("/*504*/"); + add("3,1,9566,21962,-18060,"); + add("80,-60,-30,-146,87,28,"); + add(""); + //add("/*505*/"); + add("3,1,7782,19198,21700,"); + add("98,-114,65,-23,74,-57,"); + add(""); + //add("/*506*/"); + add("3,1,-25374,8277,13699,"); + add("37,132,-12,-48,-43,-63,"); + add(""); + //add("/*507*/"); + add("3,1,-21077,21320,1096,"); + add("-106,-101,-82,53,50,70,"); + add(""); + //add("/*508*/"); + add("3,1,24281,-1036,-17589,"); + add("-21,-166,-18,-1,96,-8,"); + add(""); + //add("/*509*/"); + add("3,1,-22788,37,19512,"); + add("-85,-52,-100,83,-20,97,"); + add(""); + //add("/*510*/"); + add("3,1,5240,28832,-6422,"); + add("-69,36,103,119,-31,-39,"); + add(""); + //add("/*511*/"); + add("3,1,-7468,-28825,-3652,"); + add("127,-23,-73,-26,-5,83,"); + add(""); + //add("/*512*/"); + add("3,1,24788,6981,-15389,"); + add("-28,-91,-85,-27,111,6,"); + add(""); + //add("/*513*/"); + add("3,1,-23208,-6,19010,"); + add("-80,-82,-98,74,14,91,"); + add(""); + //add("/*514*/"); + add("3,1,-2403,29024,7200,"); + add("6,-38,153,37,26,-90,"); + add(""); + //add("/*515*/"); + add("3,1,-8354,27070,9869,"); + add("31,63,-147,-39,-31,53,"); + add(""); + //add("/*516*/"); + add("3,1,25819,2792,-15019,"); + add("68,-90,100,-56,16,-93,"); + add(""); + //add("/*517*/"); + add("3,1,-13037,26839,3117,"); + add("36,33,-139,-71,-42,72,"); + add(""); + //add("/*518*/"); + add("3,1,19424,15377,-16920,"); + add("93,-132,-12,-64,64,-15,"); + add(""); + //add("/*519*/"); + add("3,1,25368,-2667,-15790,"); + add("-16,-138,-3,-25,82,-54,"); + add(""); + //add("/*520*/"); + add("3,1,-27385,6432,10424,"); + add("17,-117,116,-6,67,-55,"); + add(""); + //add("/*521*/"); + add("3,1,-16689,-24298,5573,"); + add("100,-55,59,-44,42,51,"); + add(""); + //add("/*522*/"); + add("3,1,7818,28361,5876,"); + add("-144,51,-56,68,-29,50,"); + add(""); + //add("/*523*/"); + add("3,1,-1083,23630,-18452,"); + add("50,-78,-102,-92,30,44,"); + add(""); + //add("/*524*/"); + add("3,1,25414,6393,-14604,"); + add("-41,-106,-116,11,70,48,"); + add(""); + //add("/*525*/"); + add("3,1,-11631,906,-27639,"); + add("120,91,-47,-49,-80,18,"); + add(""); + //add("/*526*/"); + add("3,1,3474,212,29797,"); + add("-59,-123,8,98,50,-12,"); + add(""); + //add("/*527*/"); + add("3,1,2829,27930,10580,"); + add("17,48,-134,-69,-20,73,"); + add(""); + //add("/*528*/"); + add("3,1,-18229,-23261,5161,"); + add("-120,85,-43,79,-65,-12,"); + add(""); + //add("/*529*/"); + add("3,1,1852,23822,18140,"); + add("-125,-44,70,101,2,-12,"); + add(""); + //add("/*530*/"); + add("3,1,17469,17022,-17466,"); + add("116,-106,12,-62,33,-30,"); + add(""); + //add("/*531*/"); + add("3,1,-13668,26130,5512,"); + add("-117,-58,-16,61,16,79,"); + add(""); + //add("/*532*/"); + add("3,1,-16825,22385,-10761,"); + add("-69,-60,-18,116,107,41,"); + add(""); + //add("/*533*/"); + add("3,1,-17801,-23670,4779,"); + add("-107,95,71,39,-40,-52,"); + add(""); + //add("/*534*/"); + add("3,-1,-16972,24643,-2166,"); + add("-50,-47,-138,-6,3,78,"); + add(""); + //add("/*535*/"); + add("3,1,-29510,-1408,5213,"); + add("-15,-102,-117,12,23,79,"); + add(""); + //add("/*536*/"); + add("3,1,-8023,14394,25068,"); + add("-68,34,-40,15,-116,71,"); + add(""); + //add("/*537*/"); + add("3,1,18663,8080,22054,"); + add("-75,93,30,-31,-36,39,"); + add(""); + //add("/*538*/"); + add("3,1,20234,-5953,-21335,"); + add("-49,130,-81,31,-57,45,"); + add(""); + //add("/*539*/"); + add("3,1,9465,-4873,-28048,"); + add("-62,-145,5,10,86,-12,"); + add(""); + //add("/*540*/"); + add("3,1,11849,-3988,-27271,"); + add("-79,-106,-18,-3,100,-16,"); + add(""); + //add("/*541*/"); + add("3,1,19173,8661,21387,"); + add("61,-39,-39,-116,87,69,"); + add(""); + //add("/*542*/"); + add("3,1,-25383,8079,13799,"); + add("-8,-129,61,32,94,5,"); + add(""); + //add("/*543*/"); + add("3,1,-947,23612,-18482,"); + add("119,-50,-69,-79,-3,0,"); + add(""); + //add("/*544*/"); + add("3,1,-20303,-21276,5923,"); + add("-76,41,-110,64,-56,18,"); + add(""); + //add("/*545*/"); + add("3,1,-3266,29707,2611,"); + add("37,16,-138,-65,-11,47,"); + add(""); + //add("/*546*/"); + add("3,1,29437,5643,-1268,"); + add("24,-114,44,-6,9,-82,"); + add(""); + //add("/*547*/"); + add("3,1,5941,-8348,-28196,"); + add("33,-77,30,-118,6,-27,"); + add(""); + //add("/*548*/"); + add("3,1,8674,28665,1747,"); + add("63,-15,-64,-102,33,-41,"); + add(""); + //add("/*549*/"); + add("3,1,12119,-27290,-2892,"); + add("132,54,46,-68,-33,16,"); + add(""); + //add("/*550*/"); + add("3,1,16774,7079,-23844,"); + add("82,-124,22,-73,54,-36,"); + add(""); + //add("/*551*/"); + add("3,1,20757,13260,17126,"); + add("63,-128,22,-13,88,-51,"); + add(""); + //add("/*552*/"); + add("3,1,-23106,319,19132,"); + add("-14,-153,-16,23,75,27,"); + add(""); + //add("/*553*/"); + add("3,1,28708,8390,-2334,"); + add("41,-117,87,-18,41,-74,"); + add(""); + //add("/*554*/"); + add("3,-1,-17143,22854,-9157,"); + add("-56,-49,-15,111,102,47,"); + add(""); + //add("/*555*/"); + add("3,1,24593,-4420,-16602,"); + add("-58,81,-108,42,-1,63,"); + add(""); + //add("/*556*/"); + add("3,1,-5670,29343,-2618,"); + add("-124,-24,0,70,19,69,"); + add(""); + //add("/*557*/"); + add("3,1,29384,4265,-4286,"); + add("19,-142,-11,-16,73,-41,"); + add(""); + //add("/*558*/"); + add("3,-1,-26493,13413,-4266,"); + add("73,129,-48,-41,-79,9,"); + add(""); + //add("/*559*/"); + add("3,1,-12215,8751,25965,"); + add("50,90,-6,-110,-43,-38,"); + add(""); + //add("/*560*/"); + add("3,1,942,-9821,-28331,"); + add("-127,40,-18,18,36,-12,"); + add(""); + //add("/*561*/"); + add("3,1,5791,-10962,-27318,"); + add("72,-41,31,-101,-56,1,"); + add(""); + //add("/*562*/"); + add("3,1,-16110,-24557,6118,"); + add("-55,1,-140,52,-15,77,"); + add(""); + //add("/*563*/"); + add("3,1,24603,7780,-15303,"); + add("19,-130,-35,-41,81,-25,"); + add(""); + //add("/*564*/"); + add("3,1,-11587,7787,26554,"); + add("-77,78,-57,3,-100,31,"); + add(""); + //add("/*565*/"); + add("3,-1,-16566,24953,-1701,"); + add("-34,-32,-139,-15,-5,72,"); + add(""); + //add("/*566*/"); + add("3,1,-10538,27951,2769,"); + add("-113,-50,71,82,32,-2,"); + add(""); + //add("/*567*/"); + add("3,1,-26227,14265,-2946,"); + add("-29,-81,-126,8,32,76,"); + add(""); + //add("/*568*/"); + add("3,1,-29996,-410,275,"); + add("1,-64,-4,0,96,102,"); + add(""); + //add("/*569*/"); + add("3,1,-1328,24397,17407,"); + add("-88,-68,88,79,22,-24,"); + add(""); + //add("/*570*/"); + add("3,1,28640,5411,-7103,"); + add("16,-124,-30,-25,81,-41,"); + add(""); + //add("/*571*/"); + add("3,1,2879,27986,10415,"); + add("44,45,-133,-48,-14,52,"); + add(""); + //add("/*572*/"); + add("3,1,-10402,-26170,10341,"); + add("-140,40,-40,64,-24,4,"); + add(""); + //add("/*573*/"); + add("3,1,-10281,28087,2329,"); + add("-106,-42,34,78,24,50,"); + add(""); + //add("/*574*/"); + add("3,1,2742,27846,10820,"); + add("85,35,-111,-70,-7,34,"); + add(""); + //add("/*575*/"); + add("3,1,-3438,-29243,-5748,"); + add("43,20,-125,29,-18,76,"); + add(""); + //add("/*576*/"); + add("3,1,-26723,12841,4584,"); + add("-66,-110,-80,29,43,47,"); + add(""); + //add("/*577*/"); + add("3,1,-1401,24087,17828,"); + add("-1,-60,81,89,26,-28,"); + add(""); + //add("/*578*/"); + add("3,1,5935,-7944,-28314,"); + add("15,145,-37,11,-47,15,"); + add(""); + //add("/*579*/"); + add("3,1,22691,-404,-19620,"); + add("90,-40,105,-74,0,-86,"); + add(""); + //add("/*580*/"); + add("3,1,-615,23609,-18500,"); + add("-27,-62,-78,-73,25,34,"); + add(""); + //add("/*581*/"); + add("3,1,-7610,27327,9765,"); + add("86,9,39,11,34,-85,"); + add(""); + //add("/*582*/"); + add("3,1,3275,28106,9967,"); + add("66,34,-120,-66,-8,46,"); + add(""); + //add("/*583*/"); + add("3,1,-1798,26125,-14637,"); + add("-125,-47,-69,60,25,37,"); + add(""); + //add("/*584*/"); + add("3,1,3404,28154,9786,"); + add("16,34,-104,-83,-3,38,"); + add(""); + //add("/*585*/"); + add("3,1,-19236,-22431,5182,"); + add("-95,81,-4,41,-48,-59,"); + add(""); + //add("/*586*/"); + add("3,1,16386,-1104,25106,"); + add("-73,82,50,-24,-52,14,"); + add(""); + //add("/*587*/"); + add("3,1,19553,-4260,-22350,"); + add("63,-51,65,-69,-44,-52,"); + add(""); + //add("/*588*/"); + add("3,1,-22905,18425,5990,"); + add("96,104,47,-33,-35,-18,"); + add(""); + //add("/*589*/"); + add("3,1,-12241,25010,-11164,"); + add("-117,-70,-28,42,42,46,"); + add(""); + //add("/*590*/"); + add("3,1,-6089,-28902,-5253,"); + add("34,14,-117,43,-22,71,"); + add(""); + //add("/*591*/"); + add("3,1,14736,-4824,-25682,"); + add("-43,-106,-5,-40,63,-34,"); + add(""); + //add("/*592*/"); + add("3,1,19044,17073,-15679,"); + add("94,-108,-3,-64,54,-19,"); + add(""); + //add("/*593*/"); + add("3,1,-16277,25021,3001,"); + add("-102,-58,-78,32,15,59,"); + add(""); + //add("/*594*/"); + add("3,1,3248,24619,16833,"); + add("-38,-76,118,31,32,-52,"); + add(""); + //add("/*595*/"); + add("3,1,-19337,-22287,5420,"); + add("18,15,122,-54,25,-89,"); + add(""); + //add("/*596*/"); + add("3,1,3510,24558,16869,"); + add("47,-68,89,36,36,-59,"); + add(""); + //add("/*597*/"); + add("3,1,-6842,29209,-35,"); + add("-123,-29,15,65,16,45,"); + add(""); + //add("/*598*/"); + add("3,1,-15937,22907,-11013,"); + add("-119,-62,44,55,39,1,"); + add(""); + //add("/*599*/"); + add("3,1,27779,11315,-526,"); + add("-49,121,-23,9,-22,44,"); + add(""); + //add("/*600*/"); + add("3,1,-12034,25103,-11183,"); + add("-63,-58,-60,-41,5,55,"); + add(""); + //add("/*601*/"); + add("3,1,11603,-4113,-27358,"); + add("-14,-103,10,-64,53,-35,"); + add(""); + //add("/*602*/"); + add("3,1,12813,-2626,-26999,"); + add("-4,-132,12,-36,71,-25,"); + add(""); + //add("/*603*/"); + add("3,1,-25308,8431,13728,"); + add("38,-43,95,1,89,-52,"); + add(""); + //add("/*604*/"); + add("3,1,-25475,7114,14157,"); + add("31,120,-5,-42,-62,-45,"); + add(""); + //add("/*605*/"); + add("3,1,13199,-12085,-24077,"); + add("70,108,-16,5,-60,32,"); + add(""); + //add("/*606*/"); + add("3,1,-14219,23894,-11265,"); + add("-85,-85,-73,26,40,52,"); + add(""); + //add("/*607*/"); + add("3,1,4551,-23163,-18514,"); + add("29,-77,104,-49,25,-44,"); + add(""); + //add("/*608*/"); + add("3,1,5199,-9999,-27803,"); + add("75,10,11,-79,-92,18,"); + add(""); + //add("/*609*/"); + add("3,1,-3465,-29255,-5667,"); + add("-50,-13,95,-26,22,-95,"); + add(""); + //add("/*610*/"); + add("3,1,20448,-6320,21022,"); + add("74,-52,-87,-11,63,29,"); + add(""); + //add("/*611*/"); + add("3,1,-11210,-27380,4968,"); + add("-67,47,106,7,-15,-70,"); + add(""); + //add("/*612*/"); + add("3,1,-7114,29104,-1523,"); + add("-31,-14,-125,-26,-3,61,"); + add(""); + //add("/*613*/"); + add("3,1,11126,17559,21631,"); + add("8,-111,86,4,44,-38,"); + add(""); + //add("/*614*/"); + add("3,-1,-17516,22482,-9368,"); + add("-37,-44,-36,77,91,75,"); + add(""); + //add("/*615*/"); + add("3,1,23571,-1939,-18457,"); + add("-68,34,-90,37,41,43,"); + add(""); + //add("/*616*/"); + add("3,1,-6394,-28910,-4832,"); + add("-27,25,-112,68,-24,51,"); + add(""); + //add("/*617*/"); + add("3,1,5794,26057,13692,"); + add("-56,-45,108,58,8,-38,"); + add(""); + //add("/*618*/"); + add("3,1,-23934,17129,5813,"); + add("-32,-36,-30,79,85,78,"); + add(""); + //add("/*619*/"); + add("3,1,-23357,-76,18827,"); + add("-56,-97,-71,41,25,52,"); + add(""); + //add("/*620*/"); + add("3,1,7231,-5628,-28566,"); + add("-117,22,-34,64,34,9,"); + add(""); + //add("/*621*/"); + add("3,-1,8011,-2165,28829,"); + add("-86,-20,23,42,-72,-17,"); + add(""); + //add("/*622*/"); + add("3,1,-17637,-23714,5158,"); + add("-108,70,-51,50,-34,13,"); + add(""); + //add("/*623*/"); + add("3,1,21913,-8820,18494,"); + add("66,118,-23,-34,-46,20,"); + add(""); + //add("/*624*/"); + add("3,1,9869,19293,20746,"); + add("-85,-38,75,55,-24,-4,"); + add(""); + //add("/*625*/"); + add("3,1,22899,-4077,-18947,"); + add("-26,-86,-13,-37,52,-57,"); + add(""); + //add("/*626*/"); + add("3,1,-14038,23901,-11476,"); + add("-107,-72,-17,35,39,38,"); + add(""); + //add("/*627*/"); + add("3,1,4353,24653,16531,"); + add("69,-61,72,12,41,-63,"); + add(""); + //add("/*628*/"); + add("3,1,-18051,-23470,4832,"); + add("-30,48,118,-10,-6,-67,"); + add(""); + //add("/*629*/"); + add("3,1,28220,10019,-1806,"); + add("23,-82,-83,-25,72,3,"); + add(""); + //add("/*630*/"); + add("3,1,-20490,-21140,5764,"); + add("-5,32,100,-44,19,-85,"); + add(""); + //add("/*631*/"); + add("3,1,3983,28240,9309,"); + add("12,35,-113,-52,-6,40,"); + add(""); + //add("/*632*/"); + add("3,1,-18699,-22936,4930,"); + add("-91,67,-33,37,-37,-36,"); + add(""); + //add("/*633*/"); + add("3,1,627,18932,23264,"); + add("-84,-62,52,85,7,-8,"); + add(""); + //add("/*634*/"); + add("3,1,19354,14991,17340,"); + add("50,-98,28,14,46,-55,"); + add(""); + //add("/*635*/"); + add("3,1,-28747,8411,1693,"); + add("22,50,121,-5,-4,-59,"); + add(""); + //add("/*636*/"); + add("3,1,-8901,26791,10151,"); + add("-2,39,-105,-41,-14,0,"); + add(""); + //add("/*637*/"); + add("3,1,-1847,24835,16728,"); + add("-27,-53,75,84,19,-19,"); + add(""); + //add("/*638*/"); + add("3,1,-10396,25971,10836,"); + add("84,12,51,-45,21,-93,"); + add(""); + //add("/*639*/"); + add("3,1,-1746,26561,13836,"); + add("46,-54,110,4,27,-50,"); + add(""); + //add("/*640*/"); + add("3,-1,-16548,24985,-1391,"); + add("30,12,-123,-40,-23,44,"); + add(""); + //add("/*641*/"); + add("3,1,-23092,1143,19117,"); + add("-29,-97,-30,49,20,58,"); + add(""); + //add("/*642*/"); + add("3,-1,-9616,27575,-6867,"); + add("-86,-18,48,81,35,28,"); + add(""); + //add("/*643*/"); + add("3,1,37,-8773,-28689,"); + add("-83,89,-27,70,-24,8,"); + add(""); + //add("/*644*/"); + add("3,1,-5877,24660,-16042,"); + add("29,-63,-107,-41,19,43,"); + add(""); + //add("/*645*/"); + add("3,1,-7063,29124,1383,"); + add("-106,-24,-46,12,1,50,"); + add(""); + //add("/*646*/"); + add("3,1,9491,-28294,3062,"); + add("88,35,49,-28,-5,40,"); + add(""); + //add("/*647*/"); + add("3,1,-10563,28011,-1955,"); + add("-92,-37,-31,2,5,62,"); + add(""); + //add("/*648*/"); + add("3,1,-23006,339,19251,"); + add("-51,-80,-59,52,6,61,"); + add(""); + //add("/*649*/"); + add("3,-1,24368,17193,-3258,"); + add("40,-67,-52,-54,71,-25,"); + add(""); + //add("/*650*/"); + add("3,1,-8017,28176,6466,"); + add("-87,-36,52,72,15,24,"); + add(""); + //add("/*651*/"); + add("3,1,-26550,11424,8038,"); + add("29,-20,121,-1,36,-53,"); + add(""); + //add("/*652*/"); + add("3,1,28996,6412,-4254,"); + add("-29,112,-31,13,-29,48,"); + add(""); + //add("/*653*/"); + add("3,1,-11839,8554,26204,"); + add("61,27,19,-107,18,-54,"); + add(""); + //add("/*654*/"); + add("3,1,-20098,-21617,5362,"); + add("-31,53,101,-18,2,-58,"); + add(""); + //add("/*655*/"); + add("3,1,21155,4033,-20886,"); + add("40,-117,19,-35,34,-29,"); + add(""); + //add("/*656*/"); + add("3,1,5515,20897,20806,"); + add("103,-68,41,-37,35,-25,"); + add(""); + //add("/*657*/"); + add("3,1,-29988,-222,-832,"); + add("-2,50,61,3,22,-100,"); + add(""); + //add("/*658*/"); + add("3,1,5034,26084,13938,"); + add("21,-49,84,54,10,-38,"); + add(""); + //add("/*659*/"); + add("3,1,1691,19298,22907,"); + add("-89,3,4,81,-54,40,"); + add(""); + //add("/*660*/"); + add("3,1,2119,26865,13182,"); + add("-116,-3,25,58,-16,24,"); + add(""); + //add("/*661*/"); + add("3,1,10789,18377,21116,"); + add("-103,-6,58,62,-29,-7,"); + add(""); + //add("/*662*/"); + add("3,1,-11870,-26301,8207,"); + add("27,19,101,-65,14,-51,"); + add(""); + //add("/*663*/"); + add("3,1,-18344,-23246,4807,"); + add("-84,74,38,27,-34,-58,"); + add(""); + //add("/*664*/"); + add("3,1,-11295,25251,-11610,"); + add("-65,-58,-63,-15,21,60,"); + add(""); + //add("/*665*/"); + add("3,1,6300,20443,21033,"); + add("123,-14,-23,-36,19,-8,"); + add(""); + //add("/*666*/"); + add("3,1,29102,725,-7249,"); + add("27,3,111,-11,-45,-52,"); + add(""); + //add("/*667*/"); + add("3,1,-29997,-152,-412,"); + add("-1,22,82,1,52,-85,"); + add(""); + //add("/*668*/"); + add("3,1,-28040,10545,1595,"); + add("-32,-71,-94,4,4,55,"); + add(""); + //add("/*669*/"); + add("3,1,11026,18001,21316,"); + add("-97,-31,76,47,1,-24,"); + add(""); + //add("/*670*/"); + add("3,1,24332,1794,-17457,"); + add("32,101,56,1,-69,-6,"); + add(""); + //add("/*671*/"); + add("3,1,4781,16690,24466,"); + add("-96,20,5,32,-59,34,"); + add(""); + //add("/*672*/"); + add("3,1,21656,-5891,-19908,"); + add("21,116,-11,16,-38,28,"); + add(""); + //add("/*673*/"); + add("3,1,-19012,-22658,5013,"); + add("-83,57,-54,41,-38,-15,"); + add(""); + //add("/*674*/"); + add("3,-1,-25345,15903,2173,"); + add("-67,-106,-3,15,21,14,"); + add(""); + //add("/*675*/"); + add("3,1,22404,-4219,-19500,"); + add("44,-78,68,-52,23,-66,"); + add(""); + //add("/*676*/"); + add("3,1,-10163,28146,2130,"); + add("-89,-29,-52,21,3,69,"); + add(""); + //add("/*677*/"); + add("3,1,-725,25703,15454,"); + add("-107,19,-37,23,-25,44,"); + add(""); + //add("/*678*/"); + add("3,1,25446,6214,-14625,"); + add("2,-95,-36,-28,38,-33,"); + add(""); + //add("/*679*/"); + add("3,1,-18014,-23519,4728,"); + add("-68,67,75,12,-18,-46,"); + add(""); + //add("/*680*/"); + add("3,1,8350,18419,22159,"); + add("86,-67,23,-8,45,-34,"); + add(""); + //add("/*681*/"); + add("3,1,-16265,24998,3250,"); + add("-89,-55,-27,11,2,45,"); + add(""); + //add("/*682*/"); + add("3,1,-29435,3954,4235,"); + add("-7,-102,43,10,58,20,"); + add(""); + //add("/*683*/"); + add("3,1,14345,-4396,-25979,"); + add("-2,-120,20,-17,45,-17,"); + add(""); + //add("/*684*/"); + add("3,1,-20159,-21497,5615,"); + add("-47,63,68,-11,-7,-64,"); + add(""); + //add("/*685*/"); + add("3,1,17291,-23956,5209,"); + add("-23,-40,-109,33,32,41,"); + add(""); + //add("/*686*/"); + add("3,1,6171,20591,20926,"); + add("108,-24,-8,-25,33,-25,"); + add(""); + //add("/*687*/"); + add("3,1,-8736,-28700,-52,"); + add("-34,11,92,-38,11,-52,"); + add(""); + //add("/*688*/"); + add("3,1,-5134,25663,-14664,"); + add("63,-34,-82,-50,-7,5,"); + add(""); + //add("/*689*/"); + add("3,1,23474,-4238,-18194,"); + add("-71,-46,-80,21,43,16,"); + add(""); + //add("/*690*/"); + add("3,1,-12945,26676,4562,"); + add("4,17,-91,-51,-38,80,"); + add(""); + //add("/*691*/"); + add("3,1,11880,-13958,-23749,"); + add("-2,99,-60,27,-28,31,"); + add(""); + //add("/*692*/"); + add("3,1,9893,18457,21482,"); + add("67,-72,30,17,31,-34,"); + add(""); + //add("/*693*/"); + add("3,1,-14530,23658,-11366,"); + add("-35,-60,-80,-23,11,53,"); + add(""); + //add("/*694*/"); + add("3,1,-17616,-23753,5046,"); + add("-93,61,-37,33,-27,-10,"); + add(""); + //add("/*695*/"); + add("3,1,25086,-5507,-15503,"); + add("-51,11,-86,23,44,21,"); + add(""); + //add("/*696*/"); + add("3,1,-15610,-24492,7515,"); + add("-12,-16,-78,52,-2,101,"); + add(""); + //add("/*697*/"); + add("3,1,-15472,22928,-11615,"); + add("-58,-51,-24,-15,24,68,"); + add(""); + //add("/*698*/"); + add("3,1,-12165,24913,-11461,"); + add("34,-28,-96,-48,-12,24,"); + add(""); + //add("/*699*/"); + add("3,1,5310,21296,20452,"); + add("21,-66,64,46,12,-25,"); + add(""); + //add("/*700*/"); + add("3,-1,17800,23716,-4555,"); + add("58,-61,-85,-31,27,21,"); + add(""); + //add("/*701*/"); + add("3,1,18987,-4163,22851,"); + add("56,89,-31,-54,-31,40,"); + add(""); + //add("/*702*/"); + add("3,1,-13833,24181,-11133,"); + add("4,-47,-107,-21,7,43,"); + add(""); + //add("/*703*/"); + add("3,1,6651,29245,-700,"); + add("50,-11,4,-96,20,-60,"); + add(""); + //add("/*704*/"); + add("3,1,-25607,5901,14473,"); + add("-58,-52,-82,27,-3,49,"); + add(""); + //add("/*705*/"); + add("3,1,-19397,-22308,5108,"); + add("1,25,114,-14,3,-42,"); + add(""); + //add("/*706*/"); + add("3,1,-23259,-297,18946,"); + add("-53,-60,-67,39,-10,48,"); + add(""); + //add("/*707*/"); + add("3,1,-13405,24297,-11400,"); + add("11,-34,-86,-50,-16,26,"); + add(""); + //add("/*708*/"); + add("3,1,25842,-4398,-14590,"); + add("-3,-99,25,-21,27,-45,"); + add(""); + //add("/*709*/"); + add("3,1,-25303,12454,-10231,"); + add("-57,-52,78,24,41,-8,"); + add(""); + //add("/*710*/"); + add("3,1,-8255,26088,-12300,"); + add("82,-6,-67,-56,-15,5,"); + add(""); + //add("/*711*/"); + add("3,1,6152,-8008,-28249,"); + add("-89,40,-31,63,17,9,"); + add(""); + //add("/*712*/"); + add("3,1,-25934,14888,2405,"); + add("-36,-47,-101,8,8,37,"); + add(""); + //add("/*713*/"); + add("3,1,-6774,29199,-1229,"); + add("-15,-8,-109,-22,-3,41,"); + add(""); + //add("/*714*/"); + add("3,1,-1560,24786,16830,"); + add("-10,-53,77,53,17,-21,"); + add(""); + //add("/*715*/"); + add("3,-1,-21338,21065,-960,"); + add("-45,-41,97,19,19,-19,"); + add(""); + //add("/*716*/"); + add("3,1,-5625,24695,-16078,"); + add("11,-41,-67,-64,-5,15,"); + add(""); + //add("/*717*/"); + add("3,1,-26663,12045,6635,"); + add("-9,-70,90,11,38,-27,"); + add(""); + //add("/*718*/"); + add("3,1,-27183,11286,5804,"); + add("-3,-54,92,15,44,-17,"); + add(""); + //add("/*719*/"); + add("3,1,-20085,-21491,5891,"); + add("-63,66,28,2,-16,-51,"); + add(""); + //add("/*720*/"); + add("3,1,11920,-13784,-23831,"); + add("22,98,-45,15,-28,23,"); + add(""); + //add("/*721*/"); + add("3,1,-19179,-22536,4928,"); + add("-34,47,83,-13,-1,-57,"); + add(""); + //add("/*722*/"); + add("3,1,-355,23212,19002,"); + add("-92,11,-15,20,-33,40,"); + add(""); + //add("/*723*/"); + add("3,1,10541,18339,21273,"); + add("-78,-33,68,42,-8,-15,"); + add(""); + //add("/*724*/"); + add("3,1,-14382,25139,7820,"); + add("-90,-56,16,38,15,21,"); + add(""); + //add("/*725*/"); + add("3,1,-17775,-23685,4805,"); + add("-61,60,70,10,-16,-41,"); + add(""); + //add("/*726*/"); + add("3,1,15192,-711,-25859,"); + add("-36,-88,-18,-22,47,-15,"); + add(""); + //add("/*727*/"); + add("3,1,-25173,6788,14841,"); + add("3,81,-33,-30,-45,-31,"); + add(""); + //add("/*728*/"); + add("3,1,23886,-136,-18151,"); + add("33,-60,45,-38,-20,-50,"); + add(""); + //add("/*729*/"); + add("3,1,-17001,21978,11312,"); + add("-63,-71,42,24,10,16,"); + add(""); + //add("/*730*/"); + add("3,1,11428,-4389,-27389,"); + add("22,-99,25,-34,23,-17,"); + add(""); + //add("/*731*/"); + add("3,1,-14644,23549,-11447,"); + add("-47,-58,-57,-17,11,44,"); + add(""); + //add("/*732*/"); + add("3,1,20716,-6655,20653,"); + add("26,-20,-32,-11,92,40,"); + add(""); + //add("/*733*/"); + add("3,1,-27252,6392,10793,"); + add("0,-79,45,16,25,26,"); + add(""); + //add("/*734*/"); + add("3,1,8257,18817,21858,"); + add("-26,-56,57,41,-17,-1,"); + add(""); + //add("/*735*/"); + add("3,1,17728,-4370,-23804,"); + add("-69,-43,-43,-2,40,-9,"); + add(""); + //add("/*736*/"); + add("3,1,7081,29143,-744,"); + add("46,-10,33,-16,1,-93,"); + add(""); + //add("/*737*/"); + add("3,1,20340,-6075,-21198,"); + add("-58,54,-71,24,-5,24,"); + add(""); + //add("/*738*/"); + add("3,1,-10500,-27772,4297,"); + add("13,7,78,-57,18,-24,"); + add(""); + //add("/*739*/"); + add("3,1,-21551,16797,-12387,"); + add("-61,-25,74,20,27,1,"); + add(""); + //add("/*740*/"); + add("3,1,-23937,14156,-11253,"); + add("40,42,-32,-29,-72,-28,"); + add(""); + //add("/*741*/"); + add("3,1,2497,24497,17137,"); + add("31,52,-79,-35,-7,14,"); + add(""); + //add("/*742*/"); + add("3,1,21770,-2150,-20529,"); + add("-61,-66,-57,14,28,12,"); + add(""); + //add("/*743*/"); + add("3,1,-10876,-27085,6937,"); + add("24,15,94,-38,8,-29,"); + add(""); + //add("/*744*/"); + add("3,1,-26625,11639,7461,"); + add("-2,-58,82,13,34,-9,"); + add(""); + //add("/*745*/"); + add("3,-1,-25621,14760,-5070,"); + add("-8,16,87,27,22,-74,"); + add(""); + //add("/*746*/"); + add("3,1,-16344,22674,-10897,"); + add("-89,-53,23,21,14,-3,"); + add(""); + //add("/*747*/"); + add("3,1,-15599,23126,-11040,"); + add("-60,-53,-25,-14,9,38,"); + add(""); + //add("/*748*/"); + add("3,1,2618,27824,10908,"); + add("49,19,-60,-43,11,-19,"); + add(""); + //add("/*749*/"); + add("3,-1,13838,15180,21865,"); + add("70,-66,2,3,22,-18,"); + add(""); + //add("/*750*/"); + add("3,1,29104,5954,-4186,"); + add("-25,89,-43,9,-21,32,"); + add(""); + //add("/*751*/"); + add("3,-1,-17298,24161,-4125,"); + add("-9,-22,-94,-19,-8,36,"); + add(""); + //add("/*752*/"); + add("3,1,7494,29029,1081,"); + add("29,-6,-36,-80,21,-19,"); + add(""); + //add("/*753*/"); + add("3,-1,-19537,-11007,19928,"); + add("-32,64,4,-30,8,-25,"); + add(""); + //add("/*754*/"); + add("3,1,-18953,-22734,4895,"); + add("-43,49,59,-8,-4,-50,"); + add(""); + //add("/*755*/"); + add("3,1,13593,-5535,-26165,"); + add("-86,-27,-39,14,23,3,"); + add(""); + //add("/*756*/"); + add("3,-1,-19136,21815,-7612,"); + add("-73,-60,14,6,12,19,"); + add(""); + //add("/*757*/"); + add("3,1,-24002,17079,5677,"); + add("-28,-7,-99,6,1,24,"); + add(""); + //add("/*758*/"); + add("3,1,-26057,14705,-2194,"); + add("-28,-61,-74,6,16,44,"); + add(""); + //add("/*759*/"); + add("3,1,-25874,9131,12130,"); + add("37,-3,82,4,26,-11,"); + add(""); + //add("/*760*/"); + add("3,-1,-22516,16997,-10205,"); + add("-66,-59,49,14,16,-6,"); + add(""); + //add("/*761*/"); + add("3,1,15992,-257,25381,"); + add("-2,95,2,-18,-43,11,"); + add(""); + //add("/*762*/"); + add("3,1,-8284,26137,-12175,"); + add("54,-16,-71,-23,-10,-5,"); + add(""); + //add("/*763*/"); + add("3,1,-20414,-21222,5734,"); + add("10,12,81,-31,24,-22,"); + add(""); + //add("/*764*/"); + add("3,1,-15647,23076,-11075,"); + add("-62,-58,-33,0,15,30,"); + add(""); + //add("/*765*/"); + add("3,1,-28391,9662,-763,"); + add("-10,-37,-88,-2,-1,37,"); + add(""); + //add("/*766*/"); + add("3,1,23132,6353,18016,"); + add("60,-29,-68,-13,23,9,"); + add(""); + //add("/*767*/"); + add("3,-1,-24613,16950,2623,"); + add("-44,-58,-39,16,15,55,"); + add(""); + //add("/*768*/"); + add("3,-1,10870,-14991,23603,"); + add("35,-65,-58,7,21,11,"); + add(""); + //add("/*769*/"); + add("3,1,-27204,11625,4977,"); + add("-5,-47,82,5,20,-16,"); + add(""); + //add("/*770*/"); + add("3,1,-26269,14142,-3158,"); + add("-28,-66,-58,-1,3,22,"); + add(""); + //add("/*771*/"); + add("3,1,2537,27833,10903,"); + add("-20,-29,79,23,2,-9,"); + add(""); + //add("/*772*/"); + add("3,1,-27160,11434,5619,"); + add("0,-35,71,12,28,5,"); + add(""); + //add("/*773*/"); + add("3,1,29168,5584,-4248,"); + add("-10,72,27,7,-18,25,"); + add(""); + //add("/*774*/"); + add("3,1,29735,1076,-3832,"); + add("3,68,47,2,-31,8,"); + add(""); + //add("/*775*/"); + add("3,-1,-1224,25269,16124,"); + add("-57,-36,52,10,1,0,"); + add(""); + //add("/*776*/"); + add("3,1,-28530,9221,1000,"); + add("22,64,44,0,1,-17,"); + add(""); + add("0,"); + } + + private void add(String s) { + d.add(s); + } + + public List getLines() { + return d; + } + + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/MapDataReader.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,110 @@ +package ext.plantuml.com.ctreber.acearth; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.StringTokenizer; + +import ext.plantuml.com.ctreber.acearth.util.Point3D; +import ext.plantuml.com.ctreber.acearth.util.Polygon; + +/** + * The map data file is a big array of short (16-bit) ints, as follows: - it is + * a sequence of closed curves - the first value in a curve is the number of + * points in the curve - the second value in a curve indicates land/water (1 or + * -1, respectively) - this is followed by an [x,y,z] triple that indicates a + * point on the unit sphere (each of x, y, and z has been scaled by 30000), + * where the x axis points "to the right" (towards 0 N 90 E), the y axis points + * "up" (towards the north pole), and the z axis points "out of the screen" + * (towards 0 N 0 E). this is the starting point of the curve. - this is + * followed by (one less than the number of points in the curve) triples + * [dx,dy,dz]; the [x,y,z] triple for each successive point in the curve is + * obtained by adding [dx,dy,dz] onto the previous [x,y,z] values. - the curves + * are [must be!] non-self-intersecting and traced in a counter-clockwise + * direction + * + * the curves are sampled at a (roughly) a 20 mile resolution. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class MapDataReader { + /** Point value scale (devide value by this number). */ + private static final double MAP_DATA_SCALE = 30000.0; + + private static List fData; + private static List fPolygons; + private static int fIndex; + + /** + *

+ * Read map data. + * + * @param pFileName + * Map data file name. + * @return Array of map polygons. + * @throws IOException + */ + public static Polygon[] readMapData() throws IOException { + final List lines = new MapData().getLines(); + + fData = new ArrayList(); + for (Iterator it = lines.iterator(); it.hasNext(); ) { + String lLine = (String) it.next(); + if (lLine.indexOf("/*") != -1) { + // Filter out comments. + continue; + } + + StringTokenizer lST = new StringTokenizer(lLine, ", "); + while (lST.hasMoreTokens()) { + String lToken = lST.nextToken(); + final Integer lValue = new Integer(lToken); + fData.add(lValue); + } + } + + fPolygons = new ArrayList(); + fIndex = 0; + while (getValue(fIndex) != 0) { + processCurve(); + } + + return (Polygon[]) fPolygons.toArray(new Polygon[0]); + } + + private static void processCurve() { + final int lNPoint = getValue(fIndex++); + final int lType = getValue(fIndex++); + + final Point3D[] lPoints = new Point3D[lNPoint]; + final Point3D lPoint3D = new Point3D(getValue(fIndex++) / MAP_DATA_SCALE, getValue(fIndex++) / MAP_DATA_SCALE, + getValue(fIndex++) / MAP_DATA_SCALE); + + lPoints[0] = lPoint3D; + for (int i = 1; i < lNPoint; i++) { + lPoints[i] = new Point3D(lPoints[i - 1].getX() + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getY() + + getValue(fIndex++) / MAP_DATA_SCALE, lPoints[i - 1].getZ() + getValue(fIndex++) / MAP_DATA_SCALE); + } + + final Polygon lPolygon = new Polygon(lType, lPoints); + fPolygons.add(lPolygon); + } + + /** + *

+ * Get value of raw data at specified point. + * + * @param pIndex + * Index of value. + * @return Value of raw data at specified point. + */ + private static int getValue(int pIndex) { + return ((Integer) fData.get(pIndex)).intValue(); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/markers/Marker.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,187 @@ +package ext.plantuml.com.ctreber.acearth.plugins.markers; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics2D; +import java.util.List; + +import ext.plantuml.com.ctreber.acearth.gui.PixelCanvas; +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.projection.ProjectionOrtho; +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; +import ext.plantuml.com.ctreber.acearth.util.StringParser; + +/** + *

+ * Marks a location on the globe. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class Marker { + private static final int MARKER_SIZE = 4; + + // types of marker label alignment + private static final int MarkerAlignDefault = 0; + private static final int MarkerAlignLeft = 1; + private static final int MarkerAlignRight = 2; + private static final int MarkerAlignAbove = 3; + private static final int MarkerAlignBelow = 4; + + private Marker(Coordinate pCoordinate, String pLabel, int pAlign) { + fCoordinate = pCoordinate; + fLabel = pLabel; + fAlign = pAlign; + } + + private Coordinate fCoordinate; + private String fLabel; + private int fAlign; + + // private static List fMarkers; + + /* + * builtin_marker_data[] contains the "built-in" marker data that is + * compiled into AC.earth. (My apologies for misspellings, omissions of your + * favorite location, or geographic inaccuracies. This is primarily just a + * pile of data that I had handy instead of an attempt to provide a sample + * that is "globally correct" in some sense.) + */ + // public static List loadMarkerFile(String pFileName) throws IOException { + // fMarkers = new ArrayList(); + // + // final LineNumberReader lReader = new LineNumberReader(new + // FileReader(pFileName)); + // String lLine; + // while ((lLine = lReader.readLine()) != null) { + // processLine(lLine); + // } + // + // lReader.close(); + // + // return fMarkers; + // } + // + // private static void processLine(String pLine) { + // final int lPos = pLine.indexOf('#'); + // if (lPos != -1) { + // // Remove comment + // pLine = pLine.substring(0, lPos); + // } + // + // final Marker lMarkerInfo = createFromLine(pLine); + // if (lMarkerInfo != null) { + // fMarkers.add(lMarkerInfo); + // } + // } + private static Marker createFromLine(String pLine) { + final List lWords = StringParser.parse(pLine); + + final double lLat = Double.parseDouble((String) lWords.get(0)); + final double lLong = Double.parseDouble((String) lWords.get(1)); + final String lLabel = (String) lWords.get(2); + + int lAlign = MarkerAlignDefault; + if (lWords.size() >= 4) { + String lAlignString = (String) lWords.get(3); + if (lAlignString.equalsIgnoreCase("left")) { + lAlign = MarkerAlignLeft; + } + if (lAlignString.equalsIgnoreCase("right")) { + lAlign = MarkerAlignRight; + } + if (lAlignString.equalsIgnoreCase("above")) { + lAlign = MarkerAlignAbove; + } + if (lAlignString.equalsIgnoreCase("below")) { + lAlign = MarkerAlignBelow; + } + } + + final Coordinate lPos = new Coordinate(lLat, lLong); + if (!lPos.check()) { + // ACearth.logError("latitude must be between -90 and 90, and + // longitude must be between -180 and 180"); + return null; + } + + return new Marker(lPos, lLabel, lAlign); + } + + public String toString() { + return fLabel + " (" + fCoordinate + "), align: " + fAlign; + } + + // --Recycle Bin START (10/28/02 2:24 PM): + // public String getLabel() + // { + // return fLabel; + // } + // --Recycle Bin STOP (10/28/02 2:24 PM) + + // --Recycle Bin START (10/28/02 2:24 PM): + // public int getAlign() + // { + // return fAlign; + // } + // --Recycle Bin STOP (10/28/02 2:24 PM) + + // --Recycle Bin START (10/28/02 2:24 PM): + // public Coordinate getLocation() + // { + // return fCoordinate; + // } + // --Recycle Bin STOP (10/28/02 2:24 PM) + + public void render(PixelCanvas pCanvas, Projection pProjection) { + final Point3D lPos = pProjection.rotate(fCoordinate.getPoint3D()); + + if ((pProjection instanceof ProjectionOrtho) && (lPos.getZ() <= 0)) { + // Back side of the Earth. + // Insight: We don't need to check if the marker is visible in other + // projections because they always show the whole earth - and all + // markers! + return; + } + + Point2D lPoint = pProjection.finalize(pProjection.project2D(lPos)); + final int lX = (int) lPoint.getX(); + final int lY = (int) lPoint.getY(); + + // Draw a circle + Graphics2D g2d = pCanvas.getGraphics2D(); + g2d.setColor(Color.red); + // pCanvas.drawCircle(lX, lY, MARKER_SIZE); + g2d.drawOval(lX, lY, MARKER_SIZE, MARKER_SIZE); + + if (fLabel != null) { + switch (fAlign) { + case Marker.MarkerAlignLeft: + break; + + case Marker.MarkerAlignRight: + case Marker.MarkerAlignDefault: + // pCanvas.drawText(lX + MARKER_SIZE, lY + 4, fLabel); + // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); + g2d.setFont(new Font("", Font.PLAIN, 9)); + g2d.drawString(fLabel, lX + MARKER_SIZE + 1, lY + 2); + break; + + case Marker.MarkerAlignAbove: + break; + + case Marker.MarkerAlignBelow: + break; + } + } + } + + public static Marker loadMarkerFile(String line) { + return createFromLine(line); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/markers/PluginMarkers.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,72 @@ +package ext.plantuml.com.ctreber.acearth.plugins.markers; + +import java.util.Iterator; +import java.util.List; + +import ext.plantuml.com.ctreber.acearth.plugins.Plugin; + +/** + *

+ * Renders markers to the render target. a + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class PluginMarkers extends Plugin { + private List fMarkers; + + // private String fMarkerFileName = ACearth.getHomeDir() + + // "markersDefault.txt"; + + public PluginMarkers(List markers) { + // ACearth.indent("AC.earth Markers plug-in"); + // + // ACearth.log("Reading markers"); + // + // if(fMarkerFileName == null) + // { + // throw new RuntimeException("Marker file name not set"); + // } + + // try + // { + // fMarkers = Marker.loadMarkerFile(fMarkerFileName); + // } catch(IOException e) + // { + // ACearth.logError("Marker file not found"); + // return; + // } + + fMarkers = markers; + + // ACearth.outdent(); + } + + public boolean hasGUIP() { + return false; + } + + public void render() { + if (!fActiveP) { + return; + } + + // fRenderTarget.setTextFont(fRenderTarget.getTextFont().deriveFont(9.0f)); + Iterator lIt = fMarkers.iterator(); + while (lIt.hasNext()) { + Marker lMarker = (Marker) lIt.next(); + lMarker.render(fRenderTarget, fProjection); + } + } + + // public void setMarkerFileName(String pMarkerFileName) + // { + // fMarkerFileName = pMarkerFileName; + // } + + public String toString() { + return "AC.earth Markers plug-in"; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/plugins/Plugin.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,46 @@ +package ext.plantuml.com.ctreber.acearth.plugins; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import ext.plantuml.com.ctreber.acearth.ACearth; +import ext.plantuml.com.ctreber.acearth.gui.PixelCanvas; +import ext.plantuml.com.ctreber.acearth.projection.Projection; + +/** + *

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 6, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class Plugin implements ActionListener +{ + protected ACearth fParent; + protected boolean fActiveP = true; + protected Projection fProjection; + protected PixelCanvas fRenderTarget; + + public void actionPerformed(ActionEvent e) + { + } + + abstract public boolean hasGUIP(); + + abstract public void render(); + + public void setProjection(Projection pProjection) + { + fProjection = pProjection; + } + + public void setRenderTarget(PixelCanvas pRenderTarget) + { + fRenderTarget = pRenderTarget; + } + + public void setParent(ACearth pParent) + { + fParent = pParent; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionCyl.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,72 @@ +package ext.plantuml.com.ctreber.acearth.projection; + +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + +/** + *

Cylindrical projection. Show Earth flatly spread out on rectangle. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class ProjectionCyl extends Projection +{ + /** + *

All of Earth is visible. + * + * @param pPoint + * @return + */ + public boolean isVisible(Point3D pPoint) + { + return true; + } + + public Coordinate getLocation(int pX, int pY) + { + final Coordinate lRaw = new Coordinate(Math.atan(inverseFinalizeY(pY)), + inverseFinalizeX(pX)); + + return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); + } + + /** + *

The scale is set so that a value of + * 2PI gets mapped to the full image width times the magnification. + * But see ProjectionOrtho.setScale(). + */ + protected void setScale() + { + // Makes 2PI come out as full image width + fScale = fViewMagnification * fImageWidth / (2 * Math.PI); + } + + /** + * @return Longitude (-PI to PI), linearly on x axis. + */ + public double projectX(double pX, double pZ) + { + return Math.atan2(pX, pZ); + } + + public double inverseProjectX(double pX) + { + return Math.sin(pX); + } + + /** + * @return Latitude (-PI/2 to PI/2), projected from center of Earth on + * y axis with a linear scale. + */ + public double projectY(double pY) + { + return (pY >= 0.9999999999) ? 1e6 : + (pY <= -0.9999999999) ? -1e6 : Math.tan(Math.asin(pY)); + } + + public double inverseProjectY(double y) + { + return Math.sin(Math.atan(y)); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/Projection.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,274 @@ +package ext.plantuml.com.ctreber.acearth.projection; + +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; +import ext.plantuml.com.ctreber.acearth.util.Toolkit; + +/** + *

A projection for a globe on a flat surface (must be subclassed). + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class Projection +{ + // Target information + int fImageHeight; + int fImageWidth; + private double fXOffset; + private double fYOffset; + + //Viewing information + private int fShiftX; + private int fShiftY; + double fScale; + + private Coordinate fViewPos; + /**

In rads */ + private double fViewRotation; + double fViewMagnification; + + + //Transformation matrix parameters */ + private double fCosLat; + private double fSinLat; + private double fCosLon; + private double fSinLon; + private double fCosRot; + private double fSinRot; + + /** + *

Initialize transform parameters, set offset to center of image + * (plus shifts), set scale + */ + public void initTransformTable() + { + // Set transformation parameters + fCosLat = Math.cos(Toolkit.degsToRads(fViewPos.getLat())); + fSinLat = Math.sin(Toolkit.degsToRads(fViewPos.getLat())); + fCosLon = Math.cos(Toolkit.degsToRads(fViewPos.getLong())); + fSinLon = Math.sin(Toolkit.degsToRads(fViewPos.getLong())); + fCosRot = Math.cos(Toolkit.degsToRads(fViewRotation)); + fSinRot = Math.sin(Toolkit.degsToRads(fViewRotation)); + + fXOffset = (double)fImageWidth / 2 + fShiftX; + fYOffset = (double)fImageHeight / 2 + fShiftY; + + setScale(); + } + + abstract protected void setScale(); + + /** + *

Project 3D point on y axis. + */ + abstract public double projectY(double pY); + + abstract public double inverseProjectY(double pY); + + /** + *

Project 3D point on x axis. + */ + abstract protected double projectX(double pX, double pZ); + + abstract public double inverseProjectX(double pX); + + public abstract boolean isVisible(Point3D pPoint); + + public boolean isWithinImage(Point2D pPoint) + { + return (pPoint.getX() >= 0) && (pPoint.getX() < fImageWidth) && + (pPoint.getY() >= 0) && (pPoint.getY() < fImageHeight); + } + + /** + *

Translate screen point into coordinate on Earth. + * + * @param pX + * @param pY + * @return + */ + abstract public Coordinate getLocation(int pX, int pY); + + /** + *

Imagine view the globe, N is up, S is down, and N0E0 is in the center. + * x is right/left, y is up/down, and z is front/rear. + * + *

Map points are located on the surface of a unit sphere (diameter = 1). + * Latitude is the angle between x and y or z and y. Longitude is the angle + * between x and z. + * + *

Why? The way we choose our global coordinate system, longitude circles + * (latidude variable) always have the same size while the size of + * latidude circles (longitude variable) depends on the latitude. + * + * @param pPoint + * @return + */ + public Point2D project2D(Point3D pPoint) + { + return new Point2D(projectX(pPoint.getX(), pPoint.getZ()), + projectY(pPoint.getY())); + } + + public Point2D finalize(Point2D pPoint) + { + return new Point2D(finalizeX(pPoint.getX()), finalizeY(pPoint.getY())); + } + + /** + *

Since the final mapping is relative to the center of the image + * -PI and PI get mapped to the left and right border respectively. + * But see ProjectionOrtho.setScale(). + */ + public double finalizeX(double pX) + { + return fXOffset + fScale * pX; + } + + /** + *

Since the final mapping is relative to the center of the image + * -PI and PI get mapped to the bottom and top border respectively. + * But see ProjectionOrtho.setScale(). + */ + public double finalizeY(double pY) + { + return fYOffset - fScale * pY; + } + + /** + *

Transform screen to image coordinates. + */ + public double inverseFinalizeX(double x) + { + return (x - fXOffset) / fScale; + } + + /** + *

Transform screen to image coordinates. + */ + public double inverseFinalizeY(double y) + { + return (fYOffset - y) / fScale; + } + + /** + *

Rotate the point according to the current rotation of Earth. + */ + public Point3D rotate(Point3D pPoint) + { + double lX = pPoint.getX(); + double lY = pPoint.getY(); + double lZ = pPoint.getZ(); + + // Do NOT inline vars - it does not work (just inline _t_ for a try). + double _c_ = fCosLon; + double _s_ = fSinLon; + double _t_ = _c_ * lX - _s_ * lZ; + lZ = _s_ * lX + _c_ * lZ; + lX = _t_; + + _c_ = fCosLat; + _s_ = fSinLat; + _t_ = (_c_ * lY) - (_s_ * lZ); + lZ = (_s_ * lY) + (_c_ * lZ); + lY = _t_; + + _c_ = fCosRot; + _s_ = fSinRot; + _t_ = (_c_ * lX) - (_s_ * lY); + lY = (_s_ * lX) + (_c_ * lY); + lX = _t_; + + return new Point3D(lX, lY, lZ); + } + + public Point3D rotateReverse(Point3D pPoint) + { + // Set transformation parameters + final double fCosLat = Math.cos(Toolkit.degsToRads(-fViewPos.getLat())); + final double fSinLat = Math.sin(Toolkit.degsToRads(-fViewPos.getLat())); + final double fCosLon = Math.cos(Toolkit.degsToRads(-fViewPos.getLong())); + final double fSinLon = Math.sin(Toolkit.degsToRads(-fViewPos.getLong())); + final double fCosRot = Math.cos(Toolkit.degsToRads(-fViewRotation)); + final double fSinRot = Math.sin(Toolkit.degsToRads(-fViewRotation)); + + double lX = pPoint.getX(); + double lY = pPoint.getY(); + double lZ = pPoint.getZ(); + + // Do NOT inline vars - it does not work (just inline lTmp for a try). + double lCosFac; + double lSinFac; + double lTmp; + + // Note that the order of the three rotation had to be reversed as well. + lCosFac = fCosRot; + lSinFac = fSinRot; + lTmp = (lCosFac * lX) - (lSinFac * lY); + lY = (lSinFac * lX) + (lCosFac * lY); + lX = lTmp; + + lCosFac = fCosLat; + lSinFac = fSinLat; + lTmp = (lCosFac * lY) - (lSinFac * lZ); + lZ = (lSinFac * lY) + (lCosFac * lZ); + lY = lTmp; + + lCosFac = fCosLon; + lSinFac = fSinLon; + lTmp = (lCosFac * lX) - (lSinFac * lZ); + lZ = (lSinFac * lX) + (lCosFac * lZ); + lX = lTmp; + + return new Point3D(lX, lY, lZ); + } + + public double getScale() + { + return fScale; + } + + public Coordinate getViewPos() + { + return fViewPos; + } + + public void setViewMagnification(double pViewMagnification) + { + fViewMagnification = pViewMagnification; + setScale(); + } + + public void setViewPos(Coordinate pViewPos) + { + fViewPos = pViewPos; + } + + public void setShiftX(int pX) + { + fShiftX = pX; + } + + public void setShiftY(int pY) + { + fShiftY = pY; + } + + public void setViewRotation(double pViewRotation) + { + fViewRotation = pViewRotation; + } + + public void setImageWidth(int pImageWidth) + { + fImageWidth = pImageWidth; + } + + public void setImageHeight(int pImageHeight) + { + fImageHeight = pImageHeight; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionMerc.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,75 @@ +package ext.plantuml.com.ctreber.acearth.projection; + +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + + +/** + *

Mercator projection. Show Earth flatly spread out on rectangle. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class ProjectionMerc extends Projection +{ + /** + *

All of Earth is visible. + * + * @param pPoint + * @return + */ + public boolean isVisible(Point3D pPoint) + { + return true; + } + + public Coordinate getLocation(int pX, int pY) + { + final Coordinate lRaw = new Coordinate( + 2 * (Math.atan(Math.exp(inverseFinalizeY(pY))) - Math.PI / 4), + inverseFinalizeX(pX)); + + return rotateReverse(lRaw.getPoint3DRads()).getCoordinate(); + } + + /** + *

The scale is set so that a value of + * 2PI gets mapped to the full image width times the magnification. + * But see ProjectionOrtho.setScale(). + */ + protected void setScale() + { + // Makes 2PI come out as full image width + fScale = fViewMagnification * fImageWidth / (2 * Math.PI); + } + + /** + * @return Longitude (-PI to PI), linearly on x axis. + */ + public double projectX(double pX, double pZ) + { + return Math.atan2(pX, pZ); + } + + public double inverseProjectX(double pX) + { + return Math.sin(pX); + } + + /** + * @return Latitude (-PI/2 to PI/2), projected from center of Earth on + * y axis with a twist and a log scale. + */ + public double projectY(double pY) + { + return (pY >= 0.9999999999) ? 1e6 + : (pY <= -0.9999999999) ? -1e6 + : Math.log(Math.tan(Math.asin(pY) / 2 + Math.PI / 4)); + } + + public double inverseProjectY(double y) + { + return Math.sin(2 * (Math.atan(Math.exp(y)) - Math.PI / 4)); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/projection/ProjectionOrtho.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,71 @@ +package ext.plantuml.com.ctreber.acearth.projection; + +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + + +/** + *

Orthographic projection (show Earth as a ball). + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class ProjectionOrtho extends Projection +{ + /** + *

All of Earth is visible. + * + * @param pPoint + * @return + */ + public boolean isVisible(Point3D pPoint) + { + return pPoint.getZ() >= 0; + } + + public Coordinate getLocation(int pX, int pY) + { + final double lX = inverseFinalizeX(pX); + final double lY = inverseFinalizeY(pY); + final double lZ = Math.sqrt(1 - lX * lX - lY * lY); + final Point3D lP = new Point3D(lX, lY, lZ); + + return rotateReverse(lP).getCoordinate(); + } + + /** + * @return Longitude, not in rad but from -1 to 1. + */ + public double projectX(double pX, double pZ) + { + return pX; + } + + public double inverseProjectX(double pX) + { + return pX; + } + + /** + * @return Latitude, not in rad but from -1 to 1. + */ + public double projectY(double pY) + { + return pY; + } + + public double inverseProjectY(double pY) + { + return pY; + } + + /** + *

The scale is not from -PI to PI but from -1 to 1 in this case + * (the range of x, y, z of the points). + */ + protected void setScale() + { + fScale = Math.min(fImageHeight, fImageWidth) * fViewMagnification * 0.99 / 2; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/Renderer.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,92 @@ +package ext.plantuml.com.ctreber.acearth.renderer; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import ext.plantuml.com.ctreber.acearth.shader.Shader; + +/** + *

+ * Uses defined RowTypeRenderers and Shader to render to render target. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class Renderer { + private Shader fShader; + private RenderTarget fRenderTarget; + private List fRowTypeRenderers = new ArrayList(); + + public Renderer(RenderTarget pRenderTarget) { + fRenderTarget = pRenderTarget; + } + + public void render() { + final Iterator lIt = fRowTypeRenderers.iterator(); + while (lIt.hasNext()) { + RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); + lRowRenderer.startNewRun(); + } + renderRows(); + } + + private void renderRows() { + for (int lRowNo = 0; lRowNo < fRenderTarget.getImageHeight(); lRowNo++) { + int[] lPixelTypes = getPixelTypes(lRowNo); + renderRow(lRowNo, lPixelTypes); + } + } + + /** + *

+ * Get pixel types for whole row from all registered RowRenderers. + * + * @param pRowNo + * Row number. + * @return Pixel types for row. + */ + private int[] getPixelTypes(int pRowNo) { + // Create the types array + final int[] lPixelTypes = new int[fRenderTarget.getImageWidth()]; + + final Iterator lIt = fRowTypeRenderers.iterator(); + while (lIt.hasNext()) { + RowTypeRenderer lRowRenderer = (RowTypeRenderer) lIt.next(); + lRowRenderer.getPixelTypes(pRowNo, lPixelTypes); + } + + return lPixelTypes; + } + + /** + *

+ * With help of Shader, render pixel types to actual colored pixels. + * + * @param pRowNo + * @param pPixelTypes + */ + private void renderRow(int pRowNo, int[] pPixelTypes) { + // For each pixel in row, render it. + final Color[] lPixelColors = fShader.getShadedColors(pRowNo, pPixelTypes); + for (int lColNo = 0; lColNo < fRenderTarget.getImageWidth(); lColNo++) { + fRenderTarget.setPixel(lColNo, pRowNo, lPixelColors[lColNo]); + } + } + + public void setShader(Shader pShader) { + fShader = pShader; + } + + public void setRenderTarget(RenderTarget pRenderTarget) { + fRenderTarget = pRenderTarget; + } + + public void addRowTypeRenderer(RowTypeRenderer pRowRenderer) { + fRowTypeRenderers.add(pRowRenderer); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RenderTarget.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,24 @@ +package ext.plantuml.com.ctreber.acearth.renderer; + +import java.awt.Color; + +/** + *

. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public interface RenderTarget { + + public void setPixel(int pX, int pY, int pA, int pR, int pG, int pB); + + public void setPixel(int pX, int pY, Color pColor); + + public int getImageWidth(); + + public int getImageHeight(); + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRenderer.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,26 @@ +package ext.plantuml.com.ctreber.acearth.renderer; + +/** + *

Renders a row of pixel types.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public interface RowTypeRenderer +{ + /** + *

Each time when rendering an image, call startNewRun() first. + */ + public void startNewRun(); + + /** + *

Set pixel type for specified row number. Note some pixel types + * might be already set. The renderer can build on this information + * or overwrite it. + * + * @param pRowNo + * @param pPixelTypes + */ + public void getPixelTypes(int pRowNo, final int[] pPixelTypes); +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanBit.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,82 @@ +package ext.plantuml.com.ctreber.acearth.renderer; + +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import ext.plantuml.com.ctreber.acearth.scanbit.ScanBit; + +/** + *

Renders a row of ScanBits to pixel types.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class RowTypeRendererScanBit implements RowTypeRenderer +{ + private int fScanBitIndex; + private ScanBit[] fScanBits; + private final int[] fScanToPixelType = new int[256]; + + public void startNewRun() + { + fScanBitIndex = 0; + generateScanToPixelTypeTable(); + } + + public void getPixelTypes(int pRowNo, int[] pPixelTypes) + { + // For all ScanBits in specified row... + while((fScanBitIndex < fScanBits.length) && + (fScanBits[fScanBitIndex].getY() == pRowNo)) + { + for(int i = fScanBits[fScanBitIndex].getlXFrom(); + i <= fScanBits[fScanBitIndex].getXTo(); i++) + { + /** + * This is weird... why summing up the types? Note the row stays the + * same, but it possibly gets paved over a couple of times (There + * might be ScanBits painting on the same pixels). + * + * The polygons specify -1 as water and 1 as land. + * The type table says space is 0, Water is 1 to 64, Land is 65+. + * + * The outline paints the whole world as water (64). Adding a + * land pixel (1) creates a value of 65 (land). Adding a water + * pixel (-1) changes this back to 64 (water). + */ + pPixelTypes[i] += fScanBits[fScanBitIndex].getType(); + } + fScanBitIndex++; + } + + // Translate generateScanBits values into pixels types. + for(int lCol = 0; lCol < pPixelTypes.length; lCol++) + { + pPixelTypes[lCol] = fScanToPixelType[pPixelTypes[lCol] & 0xff]; + } + } + + private void generateScanToPixelTypeTable() + { + for(int i = 0; i < 256; i++) + { + if(i == 0) + { + // 0 is Space. + fScanToPixelType[i] = BitGeneratorMap.PixTypeSpace; + } else if(i > 64) + { + // Above 64 it's land. + fScanToPixelType[i] = BitGeneratorMap.PixTypeLand; + } else + { + // From 1 to 64 incl. it's water + fScanToPixelType[i] = BitGeneratorMap.PixTypeWater; + } + } + } + + public void setScanBits(ScanBit[] pScanBits) + { + fScanBits = pScanBits; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/renderer/RowTypeRendererScanDot.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,60 @@ +package ext.plantuml.com.ctreber.acearth.renderer; + +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import ext.plantuml.com.ctreber.acearth.scandot.ScanDot; + +/** + *

Renders a row of ScanDots to pixel types.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class RowTypeRendererScanDot implements RowTypeRenderer +{ + private int fScanDotIndex; + private ScanDot[] fScanDots; + + public void startNewRun() + { + fScanDotIndex = 0; + } + + public void getPixelTypes(int pRowNo, int[] pPixelTypes) + { + // For all ScanDots in specified row... + while((fScanDotIndex < fScanDots.length) && + (fScanDots[fScanDotIndex].getY() == pRowNo)) + { + ScanDot lDot = fScanDots[fScanDotIndex]; + + if(lDot.getType() == ScanDot.DotTypeStar) + { + if(pPixelTypes[lDot.getX()] == BitGeneratorMap.PixTypeSpace) + { + // Stars get only painted on Space. + pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeStar; + } + } else + { + // The only other type for a dot (so far) is "grid". + switch(pPixelTypes[lDot.getX()]) + { + case BitGeneratorMap.PixTypeLand: + pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridLand; + break; + + case BitGeneratorMap.PixTypeWater: + pPixelTypes[lDot.getX()] = BitGeneratorMap.PixTypeGridWater; + break; + } + } + fScanDotIndex++; + } + } + + public void setScanDots(ScanDot[] pScanDots) + { + fScanDots = pScanDots; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapDefault.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,265 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +import java.util.Comparator; + +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + +/** + *

Map scanner for mercator and cylindrical projections. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class BitGeneratorMapDefault extends BitGeneratorMap +{ + public BitGeneratorMapDefault(Projection pProjection) + { + super(pProjection); + } + + protected Comparator getEdgeXingComparator() + { + return new EdgeXingComparator(); + } + + /** + * Seems to: walk along outline of projected area. + */ + protected ScanBuf scanOutline() + { + final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); + + final double lLeft = fProjection.finalizeX(-Math.PI); + final double lRight = fProjection.finalizeX(Math.PI); + // Will be adjusted to fit height. + final double lTop = fProjection.finalizeY(1e6); + final double lBottom = fProjection.finalizeY(-1e6); + + // Top + lScanBuf.addLine(lRight, lTop, lLeft, lTop); + // Left + lScanBuf.addLine(lLeft, lTop, lLeft, lBottom); + // Bottom + lScanBuf.addLine(lLeft, lBottom, lRight, lBottom); + // Right + lScanBuf.addLine(lRight, lBottom, lRight, lTop); + + return lScanBuf; + } + + /** + *

Look at 2 neighboring points in polygon and find edge crossings - + * edge of the globe?! Edge of image? + */ + protected void scanPolygon(ScanBuf pScanBuf, + Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) + { + final Point2D lCurr = pPoints2D[pIndex]; + final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; + final Point2D lPrev = pPoints2D[lIndexPrev]; + double dx = lCurr.getX() - lPrev.getX(); + + if(Math.abs(dx) <= Math.PI) + { + // Perimeter not crossed. + pScanBuf.addLine( + fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), + fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); + return; + } + + // Perimeter crossed, we need to wrap the line around the edge. + int lAngle; + double mx; + double my = getYMidPoint(pPoints3D[lIndexPrev], pPoints3D[pIndex]); + if(dx > 0) + { + // Curve runs right + mx = -Math.PI; + lAngle = 2; + } else + { + mx = Math.PI; + lAngle = 0; + } + + // From previous point to edge... + pScanBuf.addLine( + fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), + fProjection.finalizeX(mx), fProjection.finalizeY(my)); + addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, mx, my, lAngle)); + + if(dx > 0) + { + mx = Math.PI; + lAngle = 0; + } else + { + mx = -Math.PI; + lAngle = 2; + } + + // ...and from edge to current point. + pScanBuf.addLine( + fProjection.finalizeX(mx), fProjection.finalizeY(my), + fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); + addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, mx, my, lAngle)); + } + + /** + *

My educated guess is that the mid point between the current and + * the previous point is calculated, and - kind of - y of that point + * is returned. + */ + private double getYMidPoint(Point3D pPrev, Point3D pCurr) + { + double lY; + final double lZ; + + if(pCurr.getX() != 0) + { + // if xPrev is twice xCurr, ratio is 2 + double ratio = (pPrev.getX() / pCurr.getX()); + lY = pPrev.getY() - ratio * pCurr.getY(); + lZ = pPrev.getZ() - ratio * pCurr.getZ(); + } else + { + lY = pCurr.getY(); + lZ = pCurr.getZ(); + } + + final double lDistance = Math.sqrt((lY * lY) + (lZ * lZ)); + lY *= ((lZ > 0) ? -1 : 1) / lDistance; + + return fProjection.projectY(lY); + } + + /** + *

Side effect: Creates ScanBuf lines. + */ + protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) + { + EdgeCrossing from; + EdgeCrossing to; + int lStart; + + if(xings[0].getType() == EdgeCrossing.XingTypeExit) + { + lStart = 0; + } else + { + // Type "entry". + from = xings[xings.length - 1]; + to = xings[0]; + addEdgeToScanbuf(pScanBuf, from, to); + lStart = 1; + } + + for(int i = lStart; i < xings.length - 1; i += 2) + { + from = xings[i]; + to = xings[i + 1]; + addEdgeToScanbuf(pScanBuf, from, to); + } + } + + /** + *

For handleCrossing(). Side effect: Creates ScanBuf lines. + * + * @param pScanBuf + * @param from + * @param to + */ + private void addEdgeToScanbuf(ScanBuf pScanBuf, EdgeCrossing from, + EdgeCrossing to) + { + int lAngleFrom = (int)from.getAngle(); + double lXFrom = fProjection.finalizeX(from.getX()); + double lYFrom = fProjection.finalizeY(from.getY()); + + // Step around in 90 degree increments until target angle is reached + while(lAngleFrom != (int)to.getAngle()) + { + int lAngleNew = 0; + double lXNew = 0; + double lYNew = 0; + + switch(lAngleFrom) + { + case 0: + // Top right + lXNew = fProjection.finalizeX(Math.PI); + lYNew = fProjection.finalizeY(1e6); + lAngleNew = 1; + break; + + case 1: + // Top left + lXNew = fProjection.finalizeX(-Math.PI); + lYNew = fProjection.finalizeY(1e6); + lAngleNew = 2; + break; + + case 2: + // Bottom left + lXNew = fProjection.finalizeX(-Math.PI); + lYNew = fProjection.finalizeY(-1e6); + lAngleNew = 3; + break; + + case 3: + // Bottom right + lXNew = fProjection.finalizeX(Math.PI); + lYNew = fProjection.finalizeY(-1e6); + lAngleNew = 0; + break; + } + + pScanBuf.addLine(lXFrom, lYFrom, lXNew, lYNew); + + lAngleFrom = lAngleNew; + lXFrom = lXNew; + lYFrom = lYNew; + } + + // ...and from last to final. + pScanBuf.addLine(lXFrom, lYFrom, fProjection.finalizeX(to.getX()), + fProjection.finalizeY(to.getY())); + } + + private static class EdgeXingComparator implements Comparator + { + public int compare(Object o1, Object o2) + { + final EdgeCrossing a = (EdgeCrossing)o1; + final EdgeCrossing b = (EdgeCrossing)o2; + + if(a.getAngle() < b.getAngle()) + { + return -1; + } + + if(a.getAngle() > b.getAngle()) + { + return 1; + } + + // Angles are equal. + if(a.getAngle() == 0) + { + return (a.getY() < b.getY()) ? -1 : (a.getY() > b.getY()) ? 1 : 0; + } + + if(a.getAngle() == 2) + { + return (a.getY() > b.getY()) ? -1 : (a.getY() < b.getY()) ? 1 : 0; + } + + throw new RuntimeException("No result"); + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMap.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,125 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; +import ext.plantuml.com.ctreber.acearth.util.Polygon; +import ext.plantuml.com.ctreber.aclib.sort.CTSort; +import ext.plantuml.com.ctreber.aclib.sort.QuickSort; + +/** + *

+ * A BitGeneratorMap scans a map into ScanBits. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public abstract class BitGeneratorMap extends ScanBitGenerator { + // Types of pixels. + public static final int PixTypeSpace = 0; + public static final int PixTypeLand = 1; + public static final int PixTypeWater = 2; + public static final int PixTypeStar = 3; + public static final int PixTypeGridLand = 4; + public static final int PixTypeGridWater = 5; + + // Parameters influencing generateScanBits buffer genertion. + private Polygon[] fMapData; + Projection fProjection; + private List fScanbitsVector = new ArrayList(); + // Created by scanPolygon + List fEdgeCrossings; + + abstract protected ScanBuf scanOutline(); + + abstract protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] pEdgeCrossings); + + abstract protected Comparator getEdgeXingComparator(); + + abstract protected void scanPolygon(ScanBuf pScanBuf, Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex); + + public BitGeneratorMap(Projection pProjection) { + fProjection = pProjection; + } + + /** + *

+ * Create outline for the map, scan all polygons. + */ + public void generateScanBits() { + // Prepare data. + fScanbitsVector = new ArrayList(); + fProjection.setImageWidth(fImageWidth); + fProjection.setImageHeight(fImageHeight); + fProjection.initTransformTable(); + + // Trace outling and polygons. + final ScanBuf lScanBuf = scanOutline(); + fScanbitsVector.addAll(lScanBuf.getScanbits(64)); + scanPolygons(); + + // Dress results. + final CTSort lSort = new QuickSort(); + fScanBitsArray = (ScanBit[]) fScanbitsVector.toArray(new ScanBit[0]); + lSort.sort(fScanBitsArray); + } + + private void scanPolygons() { + for (int lPolyNo = 0; lPolyNo < fMapData.length; lPolyNo++) { + Polygon lPolygon = fMapData[lPolyNo]; + + Point3D[] lPoints3D = new Point3D[lPolygon.getSize()]; + Point2D[] lPoints2D = new Point2D[lPolygon.getSize()]; + transformPolygonPoints(lPolygon, lPoints3D, lPoints2D); + + // For all points in polygon... + fEdgeCrossings = new ArrayList(); + ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); + for (int i = 0; i < lPoints2D.length; i++) { + scanPolygon(lScanBuf, lPoints3D, lPoints2D, i); + } + + if (fEdgeCrossings.size() > 0) { + // Edge crossings have been generated, deal with them. + final EdgeCrossing[] xings = (EdgeCrossing[]) fEdgeCrossings.toArray(new EdgeCrossing[0]); + final CTSort lSort = new QuickSort(); + lSort.sort(xings, getEdgeXingComparator()); + handleCrossings(lScanBuf, xings); + } + + if (lScanBuf.containsPoints()) { + // Scan lines have been generated, transform them into ScanBit. + fScanbitsVector.addAll(lScanBuf.getScanbits(lPolygon.getType())); + } + } + } + + /** + * The transformation rotates 3D and projects 2D points from it + */ + private void transformPolygonPoints(Polygon pPolygon, Point3D[] pPoints3D, Point2D[] pPoints2D) { + for (int i = 0; i < pPolygon.getPoints().length; i++) { + Point3D lPoint = pPolygon.getPoints()[i]; + + Point3D lPointRotated = fProjection.rotate(lPoint); + pPoints3D[i] = lPointRotated; + pPoints2D[i] = fProjection.project2D(lPointRotated); + } + } + + public void setMapData(Polygon[] pMapData) { + fMapData = pMapData; + } + + protected void addEdgeXing(EdgeCrossing pEdgeXing) { + fEdgeCrossings.add(pEdgeXing); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/BitGeneratorMapOrtho.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,170 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +import java.util.Comparator; + +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.util.EdgeCrossing; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + +/** + *

Map scanner for orthographic projection. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class BitGeneratorMapOrtho extends BitGeneratorMap +{ + public BitGeneratorMapOrtho(Projection pProjection) + { + super(pProjection); + } + + protected Comparator getEdgeXingComparator() + { + return new EdgeCrossingComparator(); + } + + protected ScanBuf scanOutline() + { + final ScanBuf lScanBuf = new ScanBuf(fImageHeight, fImageWidth); + addArcToScanbuf(lScanBuf, 1.0, 0.0, 0.0, 1.0, 0.0, 2 * Math.PI); + + return lScanBuf; + } + + private void addArcToScanbuf(ScanBuf pScanBuf, double pXFrom, double pYFrom, + double pAngleFrom, double pXTo, double pYTo, double pAngleTo) + { + double step = 1 / fProjection.getScale() * 10; + if(step > 0.05) + { + step = 0.05; + } + final int lAngleFrom = (int)Math.ceil(pAngleFrom / step); + final int lAngleTo = (int)Math.floor(pAngleTo / step); + + double prev_x = fProjection.finalizeX(pXFrom); + double prev_y = fProjection.finalizeY(pYFrom); + double curr_x; + double curr_y; + if(lAngleFrom <= lAngleTo) + { + double c_step = Math.cos(step); + double s_step = Math.sin(step); + + double angle = lAngleFrom * step; + double arc_x = Math.cos(angle); + double arc_y = Math.sin(angle); + + for(int i = lAngleFrom; i <= lAngleTo; i++) + { + curr_x = fProjection.finalizeX(arc_x); + curr_y = fProjection.finalizeY(arc_y); + pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); + + /* instead of repeatedly calling cos() and sin() to get the next + * values for arc_x and arc_y, simply rotate the existing values + */ + double tmp = (c_step * arc_x) - (s_step * arc_y); + arc_y = (s_step * arc_x) + (c_step * arc_y); + arc_x = tmp; + + prev_x = curr_x; + prev_y = curr_y; + } + } + + curr_x = fProjection.finalizeX(pXTo); + curr_y = fProjection.finalizeY(pYTo); + pScanBuf.addLine(prev_x, prev_y, curr_x, curr_y); + } + + protected void scanPolygon(ScanBuf pScanBuf, + Point3D[] pPoints3D, Point2D[] pPoints2D, int pIndex) + { + Point3D extra; + + Point3D lCurr = pPoints3D[pIndex]; + final int lIndexPrev = pIndex - 1 >= 0 ? pIndex - 1 : pPoints2D.length - 1; + Point3D lPrev = pPoints3D[lIndexPrev]; + + if(lPrev.getZ() <= 0) + { + if(lCurr.getZ() <= 0) + { + return; + } + + // Previous point not visible, but current one is: horizon crossed. + extra = findEdgeCrossing(lPrev, lCurr); + addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeEntry, pIndex, + extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); + lPrev = extra; + } else + { + if(lCurr.getZ() <= 0) + { + // Previous point visible, but current is not: horizon crossed. + extra = findEdgeCrossing(lPrev, lCurr); + addEdgeXing(new EdgeCrossing(EdgeCrossing.XingTypeExit, pIndex, + extra.getX(), extra.getY(), Math.atan2(extra.getY(), extra.getX()))); + lCurr = extra; + } + } + + pScanBuf.addLine( + fProjection.finalizeX(lPrev.getX()), fProjection.finalizeY(lPrev.getY()), + fProjection.finalizeX(lCurr.getX()), fProjection.finalizeY(lCurr.getY())); + } + + private Point3D findEdgeCrossing(Point3D pPrev, Point3D pCurr) + { + double tmp = pCurr.getZ() / (pCurr.getZ() - pPrev.getZ()); + final double r0 = pCurr.getX() - tmp * (pCurr.getX() - pPrev.getX()); + final double r1 = pCurr.getY() - tmp * (pCurr.getY() - pPrev.getY()); + + tmp = Math.sqrt((r0 * r0) + (r1 * r1)); + + return new Point3D(r0 / tmp, r1 / tmp, 0); + } + + protected void handleCrossings(ScanBuf pScanBuf, EdgeCrossing[] xings) + { + EdgeCrossing from; + EdgeCrossing to; + int lStart; + + if(xings[0].getType() == EdgeCrossing.XingTypeExit) + { + lStart = 0; + } else + { + from = xings[xings.length - 1]; + to = xings[0]; + addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), + to.getX(), to.getY(), to.getAngle() + 2 * Math.PI); + lStart = 1; + } + + for(int i = lStart; i < xings.length - 1; i += 2) + { + from = xings[i]; + to = xings[i + 1]; + addArcToScanbuf(pScanBuf, from.getX(), from.getY(), from.getAngle(), + to.getX(), to.getY(), to.getAngle()); + } + } + + private static class EdgeCrossingComparator implements Comparator + { + public int compare(Object o1, Object o2) + { + final EdgeCrossing a = (EdgeCrossing)o1; + final EdgeCrossing b = (EdgeCrossing)o2; + + return (a.getAngle() < b.getAngle()) ? -1 : (a.getAngle() > b.getAngle()) ? 1 : 0; + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBitGenerator.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,32 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +/** + *

A ScanBitGenerator produces ScanBits.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class ScanBitGenerator +{ + int fImageHeight; + int fImageWidth; + protected ScanBit[] fScanBitsArray; + + abstract public void generateScanBits(); + + public void setImageHeight(int pImageHeight) + { + fImageHeight = pImageHeight; + } + + public void setImageWidth(int pImageWidth) + { + fImageWidth = pImageWidth; + } + + public ScanBit[] getScanBits() + { + return fScanBitsArray; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBit.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,62 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +/** + *

Instruction to paint points xFrom to xTo on line y. + * + *

What I don't understand: why do values get summed to determine the + * pixel type? + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class ScanBit implements Comparable +{ + private int fY; + private int lXFrom; + private int fXTo; + private int fType; + + public ScanBit(int pY, int pLoX, int pHiX, int pType) + { + fY = pY; + lXFrom = pLoX; + fXTo = pHiX; + fType = pType; + } + + public int compareTo(Object o) + { + if(o instanceof ScanBit) + { + ScanBit lOther = (ScanBit)o; + return (fY > lOther.fY) ? 1 : (fY < lOther.fY) ? -1 : 0; + } + + throw new IllegalArgumentException("Can't compare with " + o.getClass()); + } + + public int getY() + { + return fY; + } + + public int getlXFrom() + { + return lXFrom; + } + + public int getXTo() + { + return fXTo; + } + + /** + *

See values for + * @see ext.plantuml.com.ctreber.acearth.util.Polygon + */ + public int getType() + { + return fType; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scanbit/ScanBuf.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,193 @@ +package ext.plantuml.com.ctreber.acearth.scanbit; + +import java.util.ArrayList; +import java.util.List; + +import ext.plantuml.com.ctreber.aclib.sort.CTSort; +import ext.plantuml.com.ctreber.aclib.sort.QuickSort; + +/** + *

For each line, the scanbuffer (= a raster divice) records the points hit + * I.e., line 5 (y=5) contains the values 2, 6, 40, and 46 (these line have + * been crossed). The values always come as pairs because we're dealing with + * polygons, which have a left and a right side which consists of a line. + * The points in between two values painted as filled. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +class ScanBuf +{ + private List[] fScanbuf; + private int fLineMin; + private int fLineMax; + private final int fLines; + private final int fPoints; + private boolean fScanBufsAdded; + + /** + *

Create a list for each line. + * + * @param pLines Number of lines aka screen height. + * @param pPoints Number of points per line aka screen width. + */ + public ScanBuf(int pLines, int pPoints) + { + fLines = pLines; + fPoints = pPoints; + + fLineMin = Integer.MAX_VALUE; + fLineMax = Integer.MIN_VALUE; + fScanBufsAdded = false; + + fScanbuf = new ArrayList[fLines]; + for(int i = 0; i < fScanbuf.length; i++) + { + fScanbuf[i] = new ArrayList(); + } + } + + /** + *

Add a line to the generateScanBits buffer. + */ + public void addLine(double pXFrom, double pYFrom, double pXTo, double pYTo) + { + int lYFrom; + int lYTo; + + // Do some rounding (but not in the way we expect it), limit values + if(pYFrom < pYTo) + { + // Round lYFrom (but .5 is handled oddly) + // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 + lYFrom = (int)Math.ceil(pYFrom - 0.5); + // Round lYTo, substract 1 + // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 + lYTo = (int)Math.floor(pYTo - 0.5); + + /** + * I don't know if this is intended, but in Java 3 == 3.001 is false + * (the left arg is converted to double), so the expr is true only when + * pYTo - 0.5 is exactly lYTo + */ + if(lYTo == pYTo - 0.5) + { + lYTo--; + } + } else + { + lYFrom = (int)Math.ceil(pYTo - 0.5); + lYTo = (int)Math.floor(pYFrom - 0.5); + + if(lYTo == pYFrom - 0.5) + { + lYTo--; + } + } + + // Limit y to size of image + if(lYFrom < 0) + { + lYFrom = 0; + } + if(lYTo >= fLines) + { + lYTo = fLines - 1; + } + + if(lYFrom > lYTo) + { + // No lines crossed. + return; + } + + // Note min/max settings so far + if(lYFrom < fLineMin) + { + fLineMin = lYFrom; + } + if(lYTo > fLineMax) + { + fLineMax = lYTo; + } + + // todo Curious: What happens if yFrom and yTo are equal? Shit? Or can't they be? + double lDx = (pXTo - pXFrom) / (pYTo - pYFrom); + double lX = pXFrom + lDx * ((lYFrom + 0.5) - pYFrom); + + // Record the x value for every line (y). + for(int lLineNo = lYFrom; lLineNo <= lYTo; lLineNo++) + { + fScanbuf[lLineNo].add(new Double(lX)); + lX += lDx; + } + fScanBufsAdded = true; + } + + public boolean containsPoints() + { + return fScanBufsAdded; + } + + /** + *

For each line, for each x value pair in line, create one ScanBit. + */ + public List getScanbits(int pCurveType) + { + final List fScanBits = new ArrayList(); + + // For each generateScanBits line containing points + for(int lLineNo = fLineMin; lLineNo <= fLineMax; lLineNo++) + { + // Sort so that lowest x values come first. + Double[] lScanLine = (Double[])fScanbuf[lLineNo].toArray(new Double[0]); + CTSort lSort = new QuickSort(); + lSort.sort(lScanLine); + + // The length will be divisible by 2 because we render closed polyons, + // so every generateScanBits line is crossed twice (left and right edge of polygon, + // no intersections allowed!). + for(int n = 0; n < lScanLine.length; n += 2) + { + // Round lLineFrom (but .5 is handled oddly) + // 1.5001 - 2.5 -> 1.0001 - 2.0 -> 2 + int lXLo = (int)Math.ceil(lScanLine[n].doubleValue() - 0.5); + // Round lLineTo, substract 1 + // 1.5 - 2.4999 -> 1.0 - 1.9999 -> 1 + int lXHi = (int)Math.floor(lScanLine[n + 1].doubleValue() - 0.5); + + // Limit low and high x to image dimensions + if(lXLo < 0) + { + lXLo = 0; + } + if(lXHi >= fPoints) + { + lXHi = fPoints - 1; + } + + if(lXLo <= lXHi) + { + /** + * Shouldn't that always be true since we sorted? "Yes", BUT the + * rounding might create lo 3.6 -> 4.0 and hi 3.7 -> 3.0 + */ + fScanBits.add(new ScanBit(lLineNo, lXLo, lXHi, pCurveType)); + } + } + } + + return fScanBits; + } + + public int getYMax() + { + return fLineMax; + } + + public int getYMin() + { + return fLineMin; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorLines.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,72 @@ +package ext.plantuml.com.ctreber.acearth.scandot; + +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point2D; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + +/** + *

Generate latitude and longitude grid as dots. + * + *

Refactored 08.11.2002 + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class DotGeneratorLines extends ScanDotGenerator +{ + private Projection fProjection; + private int fLineDivider; + private int fPointDivider; + private static final double PI = Math.PI; + private static final double TWOPI = 2 * PI; + private static final double HALFPI = PI / 2; + + public DotGeneratorLines(Projection pProjection, + int pLineDevider, int pPointDivider) + { + fProjection = pProjection; + fLineDivider = pLineDevider; + fPointDivider = pPointDivider; + } + + /** + *

Paint grid. + */ + public void generateScanDots() + { + double lLonStep = TWOPI / (fLineDivider * 4); + double lLatStep = PI / (fLineDivider * 2 * fPointDivider); + for(double lLon = -PI; lLon <= PI; lLon += lLonStep) + { + for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) + { + transformAndAddDot(new Coordinate(lLat, lLon)); + } + } + + lLatStep = TWOPI / (fLineDivider * 4); + lLonStep = PI / (fLineDivider * 2 * fPointDivider); + for(double lLat = -HALFPI; lLat <= HALFPI; lLat += lLatStep) + { + for(double lLon = -PI; lLon <= PI; lLon += lLonStep) + { + transformAndAddDot(new Coordinate(lLat, lLon)); + } + } + } + + private void transformAndAddDot(Coordinate pPos) + { + final Point3D lPointRotated = fProjection.rotate(pPos.getPoint3DRads()); + if(fProjection.isVisible(lPointRotated)) + { + Point2D lPoint = fProjection.finalize(fProjection.project2D(lPointRotated)); + if(fProjection.isWithinImage(lPoint)) + { + fDots.add(new ScanDot(ScanDot.DotTypeGrid, lPoint)); + } + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/DotGeneratorStars.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,51 @@ +package ext.plantuml.com.ctreber.acearth.scandot; + +import java.util.Random; + +/** + *

Generate random stars as dots. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class DotGeneratorStars extends ScanDotGenerator +{ + private final int fImageWidth; + private final int fImageHeight; + private int fBigStars; + private double fStarFrequency; + private final Random lRandom; + + public DotGeneratorStars(int pWidth, int pHeight, + double pStarFrequency, int pBigStars, Random rnd) + { + lRandom = rnd; + fImageWidth = pWidth; + fImageHeight = pHeight; + fStarFrequency = pStarFrequency; + fBigStars = pBigStars; + } + + public void generateScanDots() + { + // Make sure stars don't jump around between updates. + // final Random lRandom = new Random(ACearth.getStartTime()); + + final int lStarsMax = (int)(fImageWidth * fImageHeight * fStarFrequency); + for(int i = 0; i < lStarsMax; i++) + { + // "-1" to leave space for big stars. + int x = (int)(lRandom.nextDouble() * (fImageWidth - 1)); + int y = (int)(lRandom.nextDouble() * fImageHeight); + + fDots.add(new ScanDot(ScanDot.DotTypeStar, x, y)); + + // A big star is just two pixels wide. + if((fBigStars != 0) && (Math.random() * 100 < fBigStars)) + { + fDots.add(new ScanDot(ScanDot.DotTypeStar, x + 1, y)); + } + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDotGenerator.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,27 @@ +package ext.plantuml.com.ctreber.acearth.scandot; + +import java.util.ArrayList; +import java.util.List; + + +/** + *

A ScanDotGenerator produces ScanDots. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class ScanDotGenerator +{ + List fDots = new ArrayList(); + + /** + *

Generate whatever dots are generated. + */ + abstract public void generateScanDots(); + + public List getScanDots() + { + return fDots; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/scandot/ScanDot.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,67 @@ +package ext.plantuml.com.ctreber.acearth.scandot; + +import ext.plantuml.com.ctreber.acearth.util.Point2D; + +/** + *

A single scandot (opposed to a Polygon). + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class ScanDot implements Comparable +{ + // types of dots + public static final int DotTypeStar = 0; + public static final int DotTypeGrid = 1; + + private int fX; + private int fY; + private int fType; + + public ScanDot(int pType, int pX, int pY) + { + fType = pType; + fX = pX; + fY = pY; + } + + public ScanDot(int pType, Point2D pPoint) + { + fType = pType; + fX = (int)pPoint.getX(); + fY = (int)pPoint.getY(); + } + + public int compareTo(Object o) + { + if(o instanceof ScanDot) + { + ScanDot lOther = (ScanDot)o; + + return fY > lOther.fY ? 1 : (fY < lOther.fY ? -1 : 0); + } + + throw new IllegalArgumentException("Can't compare to " + o.getClass()); + } + + public int getType() + { + return fType; + } + + public int getX() + { + return fX; + } + + public int getY() + { + return fY; + } + + public String toString() + { + return fX + ", " + fY + ": " + fType; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderDefault.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,59 @@ +package ext.plantuml.com.ctreber.acearth.shader; + +import java.awt.Color; + +/** + *

Shader for projections which display the whole surface.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class ShaderDefault extends Shader +{ + public Color[] getShadedColors(int pRowNo, int[] pRowTypes) + { + final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); + + // conceptually, on each iteration of the i loop, we want: + // + // x = Math.sin(INV_XPROJECT(i)) * sqrt(1 - (y*y)); + // z = cos(INV_XPROJECT(i)) * sqrt(1 - (y*y)); + // + // computing this directly is rather expensive, however, so we only + // compute the first (i=0) pair of values directly; all other pairs + // (i>0) are obtained through successive rotations of the original + // pair (by inv_proj_scale radians). + // + + // compute initial (x, z) values + double tmp = Math.sqrt(1 - (y * y)); + double x = Math.sin(fProjection.inverseFinalizeX(0)) * tmp; + double z = Math.cos(fProjection.inverseFinalizeX(0)) * tmp; + + // compute rotation coefficients used + // to find subsequent (x, z) values + tmp = 1 / fProjection.getScale(); + final double sin_theta = Math.sin(tmp); + final double cos_theta = Math.cos(tmp); + + // save a little computation in the inner loop + final double lYBySunVectorY = y * fLightVector.getY(); + + // use i_lim to encourage compilers to register loop limit + final Color[] lColors = new Color[pRowTypes.length]; + for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) + { + double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + + (z * fLightVector.getZ()); + lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); + + // compute next (x, z) values via 2-d rotation + tmp = (cos_theta * z) - (sin_theta * x); + x = (sin_theta * z) + (cos_theta * x); + z = tmp; + } + + return lColors; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderFlat.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,24 @@ +package ext.plantuml.com.ctreber.acearth.shader; + +import java.awt.Color; + +/** + *

Flat shader (does not care for Projection).

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class ShaderFlat extends Shader +{ + public Color[] getShadedColors(int pRowNo, int[] pRowTypes) + { + final Color[] lColors = new Color[pRowTypes.length]; + for(int i = 0; i < pRowTypes.length; i++) + { + lColors[i] = getShadedColorForType(pRowTypes[i], 1.0); + } + + return lColors; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/Shader.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,131 @@ +package ext.plantuml.com.ctreber.acearth.shader; + +import java.awt.Color; + +import ext.plantuml.com.ctreber.acearth.projection.Projection; +import ext.plantuml.com.ctreber.acearth.scanbit.BitGeneratorMap; +import ext.plantuml.com.ctreber.acearth.util.Coordinate; +import ext.plantuml.com.ctreber.acearth.util.Point3D; + +/** + *

A shader computes Colors for a row of pixel types, depending + * on lighting parameters.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class Shader +{ + private static final Color COLOR_SPACE = Color.black; + private static final Color COLOR_STAR = Color.white; + private static final Color COLOR_WATER = Color.blue; + private static final Color COLOR_LAND = Color.green; + // Brown + //static final Color COLOR_LAND = new Color(255, 136, 25); + private static final Color COLOR_GRID_LAND = Color.white; + // Bright blue + private static final Color COLOR_GRID_WATER = new Color(128, 128, 255); + + /**

Needed to calculate lighting vectors. */ + Projection fProjection; + + // Stuff below only needed when shading. + private Coordinate fSunPos; + private double fNightSideBrightness; + private double fDaySideBrightness; + private double fTerminatorDiscontinuity; + + private double fDaySideValueBase; + private double fDaySideValueRange; + Point3D fLightVector; + + abstract public Color[] getShadedColors(int pRowNo, int[] pRowTypes); + + public void init() + { + // Precompute shading parameters. I personally find the terminator + // stuff is obscure and might as well be left out. + final double tmp = fTerminatorDiscontinuity / 100; + // 100%: day, 0%: night + fDaySideValueBase = (int)(tmp * fDaySideBrightness + + (1 - tmp) * fNightSideBrightness); + fDaySideValueRange = fDaySideBrightness - fDaySideValueBase; + fLightVector = fProjection.rotate(fSunPos.getPoint3D()); + } + + Color getShadedColorForType(int pType, double pSunValue) + { + double lBrightness; + + if(pSunValue < 0) + { + // The sun is below the horizon. + lBrightness = fNightSideBrightness / 100; + } else + { + // The sun is above the horizon. The brightness will range from + // the base to the maximum value. + lBrightness = (fDaySideValueBase + pSunValue * fDaySideValueRange) / 100; + } + if(lBrightness > 1.0) + { + lBrightness = 1.0; + } + + switch(pType) + { + case BitGeneratorMap.PixTypeSpace: + return COLOR_SPACE; + + case BitGeneratorMap.PixTypeStar: + return COLOR_STAR; + + case BitGeneratorMap.PixTypeGridLand: + return shade(COLOR_GRID_LAND, lBrightness); + + case BitGeneratorMap.PixTypeGridWater: + return shade(COLOR_GRID_WATER, lBrightness); + + case BitGeneratorMap.PixTypeLand: + return shade(COLOR_LAND, lBrightness); + + case BitGeneratorMap.PixTypeWater: + return shade(COLOR_WATER, lBrightness); + } + + return null; + } + + private static Color shade(Color pColor, double pBrightness) + { + return new Color((int)(pColor.getRed() * pBrightness), + (int)(pColor.getGreen() * pBrightness), + (int)(pColor.getBlue() * pBrightness)); + } + + public void setProjection(Projection pProjection) + { + fProjection = pProjection; + } + + public void setSunPos(Coordinate pSunPos) + { + fSunPos = pSunPos; + } + + public void setDaySideBrightness(double pDaySideBrightness) + { + fDaySideBrightness = pDaySideBrightness; + } + + public void setNightSideBrightness(double pNightSideBrightness) + { + fNightSideBrightness = pNightSideBrightness; + } + + public void setTerminatorDiscontinuity(double pTerminatorDiscontinuity) + { + fTerminatorDiscontinuity = pTerminatorDiscontinuity; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/shader/ShaderOrtho.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,55 @@ +package ext.plantuml.com.ctreber.acearth.shader; + +import java.awt.Color; + +/** + *

Shader for the orthographic projection.

+ * + *

© 2002 Christian Treber, ct@ctreber.com (Nov 11, 2002)

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class ShaderOrtho extends Shader +{ + private static double[] fXValues; + + public Color[] getShadedColors(int pRowNo, int[] pRowTypes) + { + if(pRowNo == 0) + { + fXValues = computeXValues(pRowTypes.length); + } + + final double y = fProjection.inverseProjectY(fProjection.inverseFinalizeY(pRowNo)); + final double tmp = 1 - (y * y); + final double lYBySunVectorY = y * fLightVector.getY(); + + final Color[] lColors = new Color[pRowTypes.length]; + for(int lColNo = 0; lColNo < pRowTypes.length; lColNo++) + { + double x = fXValues[lColNo]; + double z = Math.sqrt(tmp - (x * x)); + + double lSunValue = (x * fLightVector.getX()) + lYBySunVectorY + (z * fLightVector.getZ()); + lColors[lColNo] = getShadedColorForType(pRowTypes[lColNo], lSunValue); + } + + return lColors; + } + + /** + * + * @return X value for each column in image. + */ + private double[] computeXValues(int pWidth) + { + final double[] lTable = new double[pWidth]; + + for(int lColNo = 0; lColNo < pWidth; lColNo++) + { + lTable[lColNo] = fProjection.inverseProjectX(fProjection.inverseFinalizeX(lColNo)); + } + + return lTable; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Coordinate.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,153 @@ +package ext.plantuml.com.ctreber.acearth.util; + +import java.io.IOException; +import java.io.Writer; + +/** + *

+ * Latitude and longitude coordinate. Can be used as declination and right + * ascension as well. + * + *

+ * © 2002 Christian Treber, ct@ctreber.com + * + * @author Christian Treber, ct@ctreber.com + * + */ +public class Coordinate { + /* + * MeanObliquity gives the mean obliquity of the earth's axis at epoch + * 1990.0 (computed as 23.440592 degrees according to the method given in + * duffett-smith, section 27) + */ + private static final double MEAN_OBLIQUITY = 23.440592 * Toolkit.TWOPI / 360; + + // Or DE + private double fLat; + // Or RA + private double fLong; + + public Coordinate() { + } + + /** + *

+ * Construct a location specfied by two angles. Your choice if in degrees or + * rads, but keep track! + * + * @param pLong + * Longitude or RA + * @param pLat + * Latitude or DE + */ + public Coordinate(double pLat, double pLong) { + fLat = pLat; + fLong = pLong; + } + + public void renderAsXML(Writer writer) throws IOException { + writer.write("\n"); + writer.write(" " + fLat + "\n"); + writer.write(" " + fLong + "\n"); + writer.write("\n"); + } + + public Point3D getPoint3D() { + final double lLatRad = Toolkit.degsToRads(fLat); + final double lLongRad = Toolkit.degsToRads(fLong); + + final double lX = Math.cos(lLatRad) * Math.sin(lLongRad); + final double lY = Math.sin(lLatRad); + final double lZ = Math.cos(lLatRad) * Math.cos(lLongRad); + + return new Point3D(lX, lY, lZ); + } + + /** + *

+ * Assumes coordinate is not in degrees but rads. + * + * @return + */ + public Point3D getPoint3DRads() { + final double lX = Math.cos(fLat) * Math.sin(fLong); + final double lY = Math.sin(fLat); + final double lZ = Math.cos(fLat) * Math.cos(fLong); + + return new Point3D(lX, lY, lZ); + } + + /** + *

+ * Convert from ecliptic to equatorial coordinates (after duffett-smith, + * section 27) + */ + public Coordinate eclipticToEquatorial() { + final double sin_e = Math.sin(MEAN_OBLIQUITY); + final double cos_e = Math.cos(MEAN_OBLIQUITY); + + final double lRA = Math.atan2(Math.sin(fLong) * cos_e - Math.tan(fLat) * sin_e, Math.cos(fLong)); + final double lDE = Math.asin(Math.sin(fLat) * cos_e + Math.cos(fLat) * sin_e * Math.sin(fLong)); + + return new Coordinate(lDE, lRA); + } + + /** + *

+ * Add position to this position, make sure coordinates are valid. + */ + public void add(Coordinate lOther) { + fLat += lOther.fLat; + fLong += lOther.fLong; + wrap(); + } + + /** + *

+ * Warp coordinates exceeding valid values. Happens when latitudes and + * longitudes are added or substracted. + */ + public void wrap() { + if (fLat > 90) { + fLat = 180 - fLat; + fLong += 180; + } else if (fLat < -90) { + fLat = -180 - fLat; + fLong += 180; + } + + if (fLong > 180) { + do { + fLong -= 360; + } while (fLong > 180); + } else if (fLong < -180) { + do { + fLong += 360; + } while (fLong < -180); + } + } + + public double getLat() { + return fLat; + } + + public double getDE() { + return fLat; + } + + public double getLong() { + return fLong; + } + + public double getRA() { + return fLong; + } + + public boolean check() { + return (-90 <= fLat) && (fLat <= 90) && (-180 <= fLong) && (fLong <= 180); + } + + public String toString() { + return "lat: " + fLat + ", long: " + fLong; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/EdgeCrossing.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,59 @@ +package ext.plantuml.com.ctreber.acearth.util; + +/** + *

Holds information about a line crossing "the edge of Earth". + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class EdgeCrossing +{ + public static final int XingTypeEntry = 0; + public static final int XingTypeExit = 1; + + private int fType; + private int fIndex; + private double fX; + private double fY; + private double fAngle; + + public EdgeCrossing(int pType, int pIndex, double pX, double pY, double pAngle) + { + fType = pType; + fX = pX; + fY = pY; + fAngle = pAngle; + fIndex = pIndex; + } + + public String toString() + { + return fType + ": " + fX + ", " + fY + ", " + fAngle + " (" + fIndex + ")"; + } + + public int getType() + { + return fType; + } + + public double getX() + { + return fX; + } + + public double getY() + { + return fY; + } + + public double getAngle() + { + return fAngle; + } + + public int getIndex() + { + return fIndex; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Point2D.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,35 @@ +package ext.plantuml.com.ctreber.acearth.util; + +/** + *

A point in a 2 axis space. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class Point2D +{ + private double fX; + private double fY; + + public Point2D(double pX, double pY) + { + fX = pX; + fY = pY; + } + + public double getX() + { + return fX; + } + + public double getY() + { + return fY; + } + + public String toString() + { + return "x: " + fX + ", y: " + fY; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Point3D.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,48 @@ +package ext.plantuml.com.ctreber.acearth.util; + +/** + *

A point in a 2 axis space. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class Point3D +{ + private double fX; + private double fY; + private double fZ; + + public Point3D(double pX, double pY, double pZ) + { + fX = pX; + fY = pY; + fZ = pZ; + } + + public double getX() + { + return fX; + } + + public double getY() + { + return fY; + } + + public double getZ() + { + return fZ; + } + + public String toString() + { + return "x: " + fX + ", y: " + fY + ", z: " + fZ; + } + + public Coordinate getCoordinate() + { + return new Coordinate(Toolkit.radsToDegs(Math.asin(fY)), + Toolkit.radsToDegs(Math.atan2(fX, fZ))); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Polygon.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,49 @@ +package ext.plantuml.com.ctreber.acearth.util; + + +/** + *

A polygon in a 3 axis space. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class Polygon +{ + public static final int LAND = 1; + public static final int WATER = -1; + + private int fType; + private Point3D[] fPoints; + + public Polygon(int pType, Point3D[] pPoints) + { + fType = pType; + fPoints = pPoints; + } + + public int getType() + { + return fType; + } + + public Point3D[] getPoints() + { + return fPoints; + } + + public Point3D getPoint(int pIndex) + { + return fPoints[pIndex]; + } + + public int getSize() + { + return fPoints.length; + } + + public String toString() + { + return "Type " + fType + ", " + fPoints.length + " points"; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/StringParser.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,99 @@ +package ext.plantuml.com.ctreber.acearth.util; + +import java.util.ArrayList; +import java.util.List; + +/** + *

Cuts a string in words separated by white space. Quotes and square + * brackets are recognized (that is, white space within is ignored). + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class StringParser +{ + public static List parse(String pLine) + { + final List lSections = new ArrayList(); + + // True if within word. + boolean lInSectionP = false; + // Current char + char lChar; + // Wait for this character before switching back to normal parsing. + char lSeparator = ' '; + // Part count. + int lSectionNo = 0; + // Part start position + int lSectionStart = 0; + // Part end position + int lSectionEnd = 0; + + final int lLen = pLine.length(); + for(int lCharNo = 0; lCharNo <= lLen; lCharNo++) + { + if(lCharNo < lLen) + { + lChar = pLine.charAt(lCharNo); + } else + { + // This is a fictional last character. + lChar = ' '; + } + + if(lInSectionP) + { + // In section. Termination is by space or specific separator. + if((lChar != ' ') || (lSeparator != ' ')) + { + // It's not a space, or it is a space, but we wait for a special separator. + if(lChar == lSeparator) + { + // We waited for this separator. Switch back to normal parsing. + lSeparator = ' '; + lSectionEnd = lCharNo - 1; + } else + { + lSectionEnd = lCharNo; + } + } else + { + // Section has ended (with a space). + lSections.add(pLine.substring(lSectionStart, lSectionEnd + 1)); + lSectionNo++; + lInSectionP = false; + } + } else + { + // Not in a section, skipping white space. + if(lChar != ' ') + { + // No white space: a section has started. + if(lChar == '"') + { + // Special parsing "string" + lSeparator = '"'; + lSectionStart = lCharNo + 1; + } else if(lChar == '[') + { + // Special parsing "square brackets" + lSeparator = ']'; + lSectionStart = lCharNo + 1; + } else + { + // Use normal parsing. + lSeparator = ' '; + lSectionEnd = lSectionStart = lCharNo; + } + lInSectionP = true; + } else + { + // More void... + } + } + } + + return lSections; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/SunPositionCalculator.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,260 @@ +package ext.plantuml.com.ctreber.acearth.util; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +/** + *

Calculates the position of the point on Earth which is directly + * below the sun or the moon. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class SunPositionCalculator +{ + /* + * the epoch upon which these astronomical calculations are based is + * 1990 january 0.0, 631065600 seconds since the beginning of the + * "unix epoch" (00:00:00 GMT, Jan. 1, 1970) + * + * given a number of seconds since the start of the unix epoch, + * daysSinceEpoch() computes the number of days since the start of the + * astronomical epoch (1990 january 0.0) + */ + + private static final long EPOCH_START = 631065600000l; + + /* + * assuming the apparent orbit of the sun about the earth is circular, + * the rate at which the orbit progresses is given by RadsPerDay -- + * TWOPI radians per orbit divided by 365.242191 days per year: + */ + + private static final double RADS_PER_DAY = Toolkit.TWOPI / 365.242191; + + /* + * details of sun's apparent orbit at epoch 1990.0 (after + * duffett-smith, table 6, section 46) + * + * Epsilon_g (ecliptic longitude at epoch 1990.0) 279.403303 degrees + * OmegaBar_g (ecliptic longitude of perigee) 282.768422 degrees + * Eccentricity (eccentricity of orbit) 0.016713 + */ + + private static final double EPSILON_G = Toolkit.degsToRads(279.403303); + private static final double OMEGA_BAR_G = Toolkit.degsToRads(282.768422); + private static final double ECCENTRICITY = 0.016713; + + /* + * Lunar parameters, epoch January 0, 1990.0 + */ + private static final double MOON_MEAN_LONGITUDE = Toolkit.degsToRads(318.351648); + private static final double MOON_MEAN_LONGITUDE_PERIGEE = Toolkit.degsToRads(36.340410); + private static final double MOON_MEAN_LONGITUDE_NODE = Toolkit.degsToRads(318.510107); + private static final double MOON_INCLINATION = Toolkit.degsToRads(5.145396); + + private static final double SIDERAL_MONTH = 27.3217; + + /** + *

Calculate the position of the mean sun: where the sun would + * be if the earth's orbit were circular instead of ellipictal. + * + *

Verified. + * + * @param pDays days since ephemeris epoch + */ + private static double getMeanSunLongitude(double pDays) + { + double N, M; + + N = RADS_PER_DAY * pDays; + N = Toolkit.fmod(N, 0, Toolkit.TWOPI); + if(N < 0) + { + N += Toolkit.TWOPI; + } + + M = N + EPSILON_G - OMEGA_BAR_G; + if(M < 0) + { + M += Toolkit.TWOPI; + } + + return M; + } + + /** + *

Compute ecliptic longitude of sun (in radians) + * (after duffett-smith, section 47) + * + *

Verified. + * + * @param pMillis Milliseconds since unix epoch + */ + private static double getSunEclipticLongitude(long pMillis) + { + final double lDays = daysSinceEpoch(pMillis); + final double M_sun = getMeanSunLongitude(lDays); + + final double E = doKepler(M_sun); + final double v = 2 * Math.atan(Math.sqrt((1 + ECCENTRICITY) / (1 - ECCENTRICITY)) * Math.tan(E / 2)); + + return (v + OMEGA_BAR_G); + } + + static double daysSinceEpoch(long pMillis) + { + return (double)(pMillis - EPOCH_START) / 24 / 3600 / 1000; + } + + /** + * solve Kepler's equation via Newton's method + * (after duffett-smith, section 47) + * + *

Verified. + */ + private static double doKepler(double M) + { + double E; + double lDelta; + + E = M; + while(true) + { + lDelta = E - ECCENTRICITY * Math.sin(E) - M; + if(Math.abs(lDelta) <= 1e-10) + { + break; + } + E -= lDelta / (1 - ECCENTRICITY * Math.cos(E)); + } + + return E; + } + + + /** + *

computing julian dates (assuming gregorian calendar, thus this is + * only valid for dates of 1582 oct 15 or later) + * (after duffett-smith, section 4) + * + *

Verified. + * + * @param pYear year (e.g. 19xx) + * @param pMonth month (jan=1, feb=2, ...) + * @param pDay day of month + */ + private static double getJulianDate(int pYear, int pMonth, int pDay) + { + if((pMonth == 1) || (pMonth == 2)) + { + pYear -= 1; + pMonth += 12; + } + + final int A = pYear / 100; + final int B = 2 - A + (A / 4); + final int C = (int)(365.25 * pYear); + final int D = (int)(30.6001 * (pMonth + 1)); + + return B + C + D + pDay + 1720994.5; + } + + + /** + *

compute greenwich mean sidereal time (getGST) corresponding to a given + * number of milliseconds since the unix epoch + * (after duffett-smith, section 12) + * + *

Verified. + */ + private static double getGST(long pMillis) + { + final Calendar lCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); + lCal.setTime(new Date(pMillis)); + + final double lJulianDate = getJulianDate(lCal.get(Calendar.YEAR), lCal.get(Calendar.MONTH) + 1, + lCal.get(Calendar.DAY_OF_MONTH)); + final double T = (lJulianDate - 2451545) / 36525; + double T0 = ((T + 2.5862e-5) * T + 2400.051336) * T + 6.697374558; + + T0 = Toolkit.fmod(T0, 0, 24.0); + if(T0 < 0) + { + T0 += 24; + } + + final double UT = lCal.get(Calendar.HOUR_OF_DAY) + + (lCal.get(Calendar.MINUTE) + lCal.get(Calendar.SECOND) / 60.0) / 60.0; + + T0 += UT * 1.002737909; + T0 = Toolkit.fmod(T0, 0, 24.0); + if(T0 < 0) + { + T0 += 24; + } + + return T0; + } + + /** + *

Given a particular time (expressed in milliseconds since the unix + * epoch), compute position on the earth (lat, lon) such that sun is + * directly overhead. + * + *

Verified. + * + * @param pMillis seconds since unix epoch + * + */ + public static Coordinate getSunPositionOnEarth(long pMillis) + { + final Coordinate lSunPosEc = new Coordinate(0.0, getSunEclipticLongitude(pMillis)); + final Coordinate lSunPosEq = lSunPosEc.eclipticToEquatorial(); + + final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); + + return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); + } + + /** + *

Given a particular time (expressed in milliseconds since the unix + * epoch), compute position on the earth (lat, lon) such that the + * moon is directly overhead. + * + * Based on duffett-smith **2nd ed** section 61; combines some steps + * into single expressions to reduce the number of extra variables. + * + *

Verified. + */ + public static Coordinate getMoonPositionOnEarth(long pMillis) + { + final double lDays = daysSinceEpoch(pMillis); + double lSunLongEc = getSunEclipticLongitude(pMillis); + final double Ms = getMeanSunLongitude(lDays); + + double L = Toolkit.limitRads(Toolkit.fmod(lDays / SIDERAL_MONTH, 0, 1.0) * Toolkit.TWOPI + MOON_MEAN_LONGITUDE); + double Mm = Toolkit.limitRads(L - Toolkit.degsToRads(0.1114041 * lDays) - MOON_MEAN_LONGITUDE_PERIGEE); + double N = Toolkit.limitRads(MOON_MEAN_LONGITUDE_NODE - Toolkit.degsToRads(0.0529539 * lDays)); + final double Ev = Toolkit.degsToRads(1.2739) * Math.sin(2.0 * (L - lSunLongEc) - Mm); + final double Ae = Toolkit.degsToRads(0.1858) * Math.sin(Ms); + Mm += Ev - Ae - Toolkit.degsToRads(0.37) * Math.sin(Ms); + final double Ec = Toolkit.degsToRads(6.2886) * Math.sin(Mm); + L += Ev + Ec - Ae + Toolkit.degsToRads(0.214) * Math.sin(2.0 * Mm); + L += Toolkit.degsToRads(0.6583) * Math.sin(2.0 * (L - lSunLongEc)); + N -= Toolkit.degsToRads(0.16) * Math.sin(Ms); + + L -= N; + lSunLongEc = Toolkit.limitRads((Math.abs(Math.cos(L)) < 1e-12) ? + (N + Math.sin(L) * Math.cos(MOON_INCLINATION) * Math.PI / 2) : + (N + Math.atan2(Math.sin(L) * Math.cos(MOON_INCLINATION), Math.cos(L)))); + final double lSunLatEc = Math.asin(Math.sin(L) * Math.sin(MOON_INCLINATION)); + + final Coordinate lSunPosEq = new Coordinate(lSunLatEc, lSunLongEc).eclipticToEquatorial(); + final double lRA = Toolkit.limitRads(lSunPosEq.getRA() - (Toolkit.TWOPI / 24) * getGST(pMillis)); + + return new Coordinate(Toolkit.radsToDegs(lSunPosEq.getDE()), Toolkit.radsToDegs(lRA)); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/acearth/util/Toolkit.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,135 @@ +package ext.plantuml.com.ctreber.acearth.util; + +import java.util.HashSet; +import java.util.StringTokenizer; + +/** + *

Some tools. + * + *

© 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class Toolkit +{ + public static final double TWOPI = Math.PI * 2; + public static final double PI = Math.PI; + public static final double HALFPI = Math.PI / 2; + private static final HashSet fsNoCap; + + static + { + fsNoCap = new HashSet(); + fsNoCap.add("a"); + fsNoCap.add("as"); + fsNoCap.add("to"); + fsNoCap.add("of"); + fsNoCap.add("the"); + fsNoCap.add("off"); + fsNoCap.add("and"); + fsNoCap.add("mid"); + } + + public static double degsToRads(double pDegrees) + { + return pDegrees * TWOPI / 360; + } + + public static double radsToDegs(double pRadians) + { + return pRadians * 360 / TWOPI; + } + + /** + * Force an angular value into the range [-PI, +PI] + */ + public static double limitRads(double x) + { + return fmod(x, -Math.PI, Math.PI); + } + + /** + *

Verified. + */ + public static double fmod(double pValue, double pMod) + { + while(pValue < 0) + { + pValue += pMod; + } + while(pValue > pMod) + { + pValue -= pMod; + } + + return pValue; + } + + /** + *

Examples: min -2, max 2: range 4 + * + *

    + *
  • value 1: lFact = 0 + *
  • value 3: lFact = 1, value -1 + *
  • value 9: lFact = 2, value 1 + *
  • value -3: lFact = -1, value 1 + *
+ */ + public static double fmod(double pValue, double pMinValue, double pMaxValue) + { + final double lRange = pMaxValue - pMinValue; + int lFact = (int)((pValue - pMinValue) / lRange); + if(pValue < pMinValue) + { + lFact--; + } + + return pValue - lFact * lRange; + } + + /** + *

Capitalize String. Uppercase words smaller/equal than 3 chars, + * lowercase defined exceptions. Capitalize within word after '.' and '-'. + * Capitalize all others. + */ + public static String intelligentCapitalize(String pText) + { + boolean lDoCap = false; + final StringTokenizer lST = new StringTokenizer(pText, ".- ", true); + final StringBuffer lSB = new StringBuffer(50); + while(lST.hasMoreTokens()) + { + String lWord = lST.nextToken(); + + if(lWord.equals(".") || lWord.equals("-")) + { + lDoCap = true; + lSB.append(lWord); + continue; + } + if(lWord.equals(" ")) + { + lDoCap = false; + lSB.append(lWord); + continue; + } + + if(lDoCap || (lWord.length() > 3)) + { + lSB.append(Character.toUpperCase(lWord.charAt(0))); + lSB.append(lWord.substring(1).toLowerCase()); + } else + { + if(fsNoCap.contains(lWord.toLowerCase())) + { + lSB.append(lWord.toLowerCase()); + } else + { + lSB.append(lWord.toUpperCase()); + } + } + } + + return lSB.toString(); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOBoolean.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,38 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +/** + *

+ * + *

© 2002 Christian Treber, ct@ctreber.com

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class MOBoolean extends MonitoredObject +{ + private boolean fBoolean; + + public MOBoolean() + { + } + + public MOBoolean(boolean pBoolean) + { + fBoolean = pBoolean; + } + + public void set(boolean pValue) + { + fBoolean = pValue; + fireValueChanged(); + } + + public boolean get() + { + return fBoolean; + } + + public boolean checkRange() + { + return true; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOChangeListener.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,13 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +/** + *

Implemented by classes interetested in MonitoredObject values changes.

+ * + *

© 2002 Christian Treber, ct@ctreber.com

+ * @author Christian Treber, ct@ctreber.com + * + */ +public interface MOChangeListener +{ + public void valueChanged(MonitoredObject pObject); +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MODouble.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,74 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +/** + *

+ * + *

© 2002 Christian Treber, ct@ctreber.com

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class MODouble extends MonitoredObject +{ + private double fDouble; + private boolean fCheckRange = false; + private double fMin; + private double fMax; + + public MODouble() + { + } + + public MODouble(double pDouble) + { + fDouble = pDouble; + } + + public MODouble(double pDouble, double pMin, double pMax) + { + fMin = pMin; + fMax = pMax; + fCheckRange = true; + set(pDouble); + } + + public void set(double pDouble) + { + if(!checkRange(pDouble)) + { + throw new IllegalArgumentException("Argument '" + pDouble + + "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); + } + fDouble = pDouble; + fireValueChanged(); + } + + private static String niceFormat(double pDouble) + { + if(pDouble == Double.MAX_VALUE) + { + return "Infinity"; + } + + if(pDouble == Double.MIN_VALUE) + { + return "-Infinity"; + } + + return Double.toString(pDouble); + } + + public double get() + { + return fDouble; + } + + private boolean checkRange(double pDouble) + { + return !fCheckRange || (fMin <= pDouble) && (pDouble <= fMax); + } + + public boolean checkRange() + { + return checkRange(fDouble); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOEnum.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,86 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +import java.util.HashSet; + +/** + *

+ * Monitored enumeration value. + *

+ * + *

+ * © 2002 Christian Treber, ct@ctreber.com + *

+ * + * @author Christian Treber, ct@ctreber.com + * + */ +public class MOEnum extends MonitoredObject { + private HashSet fValidValues = new HashSet(); + /** + *

+ * null if no value selected + */ + private Object fValue; + + public void addValidValue(Object pValue) { + fValidValues.add(pValue); + } + + public void set(Object pValue) { + if (pValue != null) { + checkValue(pValue); + } + + fValue = pValue; + fireValueChanged(); + } + + public Object get() { + return fValue; + } + + public boolean is(Object pObject) { + checkValue(pObject); + + return this.equals(pObject); + } + + public int hashCode() { + if (fValue == null) { + return 0; + } + + return fValue.hashCode(); + } + + private void checkValue(Object pValue) { + if (!fValidValues.contains(pValue)) { + throw new IllegalArgumentException("Illegal enum value '" + pValue + "'"); + } + } + + public boolean equals(Object obj) { + if (obj instanceof MOEnum) { + MOEnum lOther = (MOEnum) obj; + if (fValue == null) { + return lOther.fValue == null; + } + + return fValue.equals(lOther.fValue); + } + + if (fValue == null) { + return obj.equals(null); + } + + return fValue.equals(obj); + } + + public HashSet getValidValues() { + return fValidValues; + } + + public boolean checkRange() { + return true; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOInteger.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,74 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +/** + *

+ * + *

© 2002 Christian Treber, ct@ctreber.com

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class MOInteger extends MonitoredObject +{ + private int fInteger; + private boolean fCheckRange = false; + private int fMin; + private int fMax; + + public MOInteger() + { + } + + public MOInteger(int pInteger) + { + fInteger = pInteger; + } + + public MOInteger(int pInteger, int pMin, int pMax) + { + fMin = pMin; + fMax = pMax; + fCheckRange = true; + set(pInteger); + } + + public void set(int pInteger) + { + if(!checkRange(pInteger)) + { + throw new IllegalArgumentException("Argument '" + pInteger + + "' out of range [" + niceFormat(fMin) + "; " + niceFormat(fMax) + "]"); + } + fInteger = pInteger; + fireValueChanged(); + } + + private static String niceFormat(int pInteger) + { + if(pInteger == Integer.MAX_VALUE) + { + return "Infinity"; + } + + if(pInteger == Integer.MIN_VALUE) + { + return "-Infinity"; + } + + return Integer.toString(pInteger); + } + + public int get() + { + return fInteger; + } + + private boolean checkRange(int pInteger) + { + return !fCheckRange || (fMin <= pInteger) && (pInteger <= fMax); + } + + public boolean checkRange() + { + return checkRange(fInteger); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MonitoredObject.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,44 @@ +package ext.plantuml.com.ctreber.aclib.gui; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + *

+ *

+ * + *

+ * © 2002 Christian Treber, ct@ctreber.com + *

+ * + * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class MonitoredObject { + private List fListeners = new ArrayList(); + + public void addChangeListener(MOChangeListener pListener) { + fListeners.add(pListener); + } + + public void removeChangeListener(MOChangeListener pListener) { + fListeners.remove(pListener); + } + + void fireValueChanged() { + final Iterator lIt = fListeners.iterator(); + while (lIt.hasNext()) { + MOChangeListener lListener = (MOChangeListener) lIt.next(); + lListener.valueChanged(this); + } + } + + /** + *

+ * Check value agains (possibly defined) constraints. + * + * @return True if value is within range or range is not checked. + */ + abstract public boolean checkRange(); +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/gui/MOString.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,36 @@ +package ext.plantuml.com.ctreber.aclib.gui; + + + +/** + *

+ * + *

© 2002 Christian Treber, ct@ctreber.com

+ * @author Christian Treber, ct@ctreber.com + * + */ +public class MOString extends MonitoredObject +{ + private String fString; + + public MOString(String pString) + { + fString = pString; + } + + public void set(String pString) + { + fString = pString; + fireValueChanged(); + } + + public String get() + { + return fString; + } + + public boolean checkRange() + { + return true; + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/CTSort.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,20 @@ +package ext.plantuml.com.ctreber.aclib.sort; + +import java.util.Comparator; + +/** + *

Teehee - found that Comparator allready exists. + * + * © 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +abstract public class CTSort +{ + public void sort(Object[] items) + { + sort(items, new DefaultComparator()); + } + + abstract public void sort(Object[] items, Comparator comparator); +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/DefaultComparator.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,19 @@ +package ext.plantuml.com.ctreber.aclib.sort; + +import java.util.Comparator; + +/** + *

Implements a default Comparator based on Comparable and a ascending + * sort order. Requires that the two objects are Comparable. + * + * © 2002 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + * + */ +public class DefaultComparator implements Comparator +{ + public int compare(Object o1, Object o2) + { + return ((Comparable)o1).compareTo(o2); + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java --- plantuml-1.2017.15/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/ctreber/aclib/sort/QuickSort.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,96 @@ +package ext.plantuml.com.ctreber.aclib.sort; + +import java.util.Comparator; + +/** + * © 2001 Christian Treber, ct@ctreber.com + * @author Christian Treber, ct@ctreber.com + */ +public class QuickSort extends CTSort +{ + public void sort(Object[] items, Comparator comparator) + { + if(items.length <= 1) + { + // Nothing to sort t all or only one element. + return; + } + + qsort(items, comparator, 0, items.length - 1); + insertionSort(items, comparator, 0, items.length - 1); + } + + private void qsort(Object[] items, Comparator comparator, int l, int r) + { + final int M = 4; + int i; + int j; + Object v; + + if((r - l) > M) + { + i = (r + l) / 2; + if(comparator.compare(items[l], items[i]) > 0) + { + swap(items, l, i); + } + if(comparator.compare(items[l], items[r]) > 0) + { + swap(items, l, r); + } + if(comparator.compare(items[i], items[r]) > 0) + { + swap(items, i, r); + } + + j = r - 1; + swap(items, i, j); + i = l; + v = items[j]; + while(true) + { + while(comparator.compare(items[++i], v) < 0) + { + } + while(comparator.compare(items[--j], v) > 0) + { + } + if(j < i) + { + break; + } + swap(items, i, j); + } + swap(items, i, r - 1); + qsort(items, comparator, l, j); + qsort(items, comparator, i + 1, r); + } + } + + private static void swap(Object[] items, int i, int j) + { + final Object tmp; + tmp = items[i]; + items[i] = items[j]; + items[j] = tmp; + } + + private static void insertionSort(Object[] items, Comparator comparator, int lo0, int hi0) + { + int i; + int j; + Object v; + + for(i = lo0 + 1; i <= hi0; i++) + { + v = items[i]; + j = i; + while((j > lo0) && (comparator.compare(items[j - 1], v) > 0)) + { + items[j] = items[j - 1]; + j--; + } + items[j] = v; + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/BarcodeFormat.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/BarcodeFormat.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/BarcodeFormat.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/BarcodeFormat.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,103 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +import java.util.Hashtable; + +/** + * Enumerates barcode formats known to this package. + * + * @author Sean Owen + */ +public final class BarcodeFormat { + + // No, we can't use an enum here. J2ME doesn't support it. + + private static final Hashtable VALUES = new Hashtable(); + + /** QR Code 2D barcode format. */ + public static final BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE"); + + /** Data Matrix 2D barcode format. */ + public static final BarcodeFormat DATA_MATRIX = new BarcodeFormat("DATA_MATRIX"); + + /** UPC-E 1D format. */ + public static final BarcodeFormat UPC_E = new BarcodeFormat("UPC_E"); + + /** UPC-A 1D format. */ + public static final BarcodeFormat UPC_A = new BarcodeFormat("UPC_A"); + + /** EAN-8 1D format. */ + public static final BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8"); + + /** EAN-13 1D format. */ + public static final BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13"); + + /** UPC/EAN extension format. Not a stand-alone format. */ + public static final BarcodeFormat UPC_EAN_EXTENSION = new BarcodeFormat("UPC_EAN_EXTENSION"); + + /** Code 128 1D format. */ + public static final BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128"); + + /** Code 39 1D format. */ + public static final BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39"); + + /** Code 93 1D format. */ + public static final BarcodeFormat CODE_93 = new BarcodeFormat("CODE_93"); + + /** CODABAR 1D format. */ + public static final BarcodeFormat CODABAR = new BarcodeFormat("CODABAR"); + + /** ITF (Interleaved Two of Five) 1D format. */ + public static final BarcodeFormat ITF = new BarcodeFormat("ITF"); + + /** RSS 14 */ + public static final BarcodeFormat RSS14 = new BarcodeFormat("RSS14"); + + /** PDF417 format. */ + public static final BarcodeFormat PDF417 = new BarcodeFormat("PDF417"); + + /** RSS EXPANDED */ + public static final BarcodeFormat RSS_EXPANDED = new BarcodeFormat("RSS_EXPANDED"); + + private final String name; + + private BarcodeFormat(String name) { + this.name = name; + VALUES.put(name, this); + } + + public String getName() { + return name; + } + + public String toString() { + return name; + } + + public static BarcodeFormat valueOf(String name) { + if (name == null || name.length() == 0) { + throw new IllegalArgumentException(); + } + BarcodeFormat format = (BarcodeFormat) VALUES.get(name); + if (format == null) { + throw new IllegalArgumentException(); + } + return format; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ChecksumException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ChecksumException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ChecksumException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ChecksumException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * Thrown when a barcode was successfully detected and decoded, but + * was not returned because its checksum feature failed. + * + * @author Sean Owen + */ +public final class ChecksumException extends ReaderException { + + private static final ChecksumException instance = new ChecksumException(); + + private ChecksumException() { + // do nothing + } + + public static ChecksumException getChecksumInstance() { + return instance; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,80 @@ +/* + * Copyright 2009 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.client.j2se; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; + +import javax.imageio.ImageIO; + +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + * Writes a {@link BitMatrix} to {@link BufferedImage}, + * file or stream. Provided here instead of core since it depends on + * Java SE libraries. + * + * @author Sean Owen + */ +public final class MatrixToImageWriter { + + private static final int BLACK = 0xFF000000; + private static final int WHITE = 0xFFFFFFFF; + + private MatrixToImageWriter() {} + + /** + * Renders a {@link BitMatrix} as an image, where "false" bits are rendered + * as white, and "true" bits are rendered as black. + */ + public static BufferedImage toBufferedImage(BitMatrix matrix) { + int width = matrix.getWidth(); + int height = matrix.getHeight(); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE); + } + } + return image; + } + + /** + * Writes a {@link BitMatrix} to a file. + * + * @see #toBufferedImage(BitMatrix) + */ + public static void writeToFile(BitMatrix matrix, String format, File file) + throws IOException { + BufferedImage image = toBufferedImage(matrix); + ImageIO.write(image, format, file); + } + + /** + * Writes a {@link BitMatrix} to a stream. + * + * @see #toBufferedImage(BitMatrix) + */ + public static void writeToStream(BitMatrix matrix, String format, OutputStream stream) + throws IOException { + BufferedImage image = toBufferedImage(matrix); + ImageIO.write(image, format, stream); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitArray.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitArray.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitArray.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitArray.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,247 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +/** + *

A simple, fast array of bits, represented compactly by an array of ints internally.

+ * + * @author Sean Owen + */ +public final class BitArray { + + // TODO: I have changed these members to be public so ProGuard can inline get() and set(). Ideally + // they'd be private and we'd use the -allowaccessmodification flag, but Dalvik rejects the + // resulting binary at runtime on Android. If we find a solution to this, these should be changed + // back to private. + public int[] bits; + public int size; + + public BitArray() { + this.size = 0; + this.bits = new int[1]; + } + + public BitArray(int size) { + this.size = size; + this.bits = makeArray(size); + } + + public int getSize() { + return size; + } + + public int getSizeInBytes() { + return (size + 7) >> 3; + } + + private void ensureCapacity(int size) { + if (size > bits.length << 5) { + int[] newBits = makeArray(size); + System.arraycopy(bits, 0, newBits, 0, bits.length); + this.bits = newBits; + } + } + + /** + * @param i bit to get + * @return true iff bit i is set + */ + public boolean get(int i) { + return (bits[i >> 5] & (1 << (i & 0x1F))) != 0; + } + + /** + * Sets bit i. + * + * @param i bit to set + */ + public void set(int i) { + bits[i >> 5] |= 1 << (i & 0x1F); + } + + /** + * Flips bit i. + * + * @param i bit to set + */ + public void flip(int i) { + bits[i >> 5] ^= 1 << (i & 0x1F); + } + + /** + * Sets a block of 32 bits, starting at bit i. + * + * @param i first bit to set + * @param newBits the new value of the next 32 bits. Note again that the least-significant bit + * corresponds to bit i, the next-least-significant to i+1, and so on. + */ + public void setBulk(int i, int newBits) { + bits[i >> 5] = newBits; + } + + /** + * Clears all bits (sets to false). + */ + public void clear() { + int max = bits.length; + for (int i = 0; i < max; i++) { + bits[i] = 0; + } + } + + /** + * Efficient method to check if a range of bits is set, or not set. + * + * @param start start of range, inclusive. + * @param end end of range, exclusive + * @param value if true, checks that bits in range are set, otherwise checks that they are not set + * @return true iff all bits are set or not set in range, according to value argument + * @throws IllegalArgumentException if end is less than or equal to start + */ + public boolean isRange(int start, int end, boolean value) { + if (end < start) { + throw new IllegalArgumentException(); + } + if (end == start) { + return true; // empty range matches + } + end--; // will be easier to treat this as the last actually set bit -- inclusive + int firstInt = start >> 5; + int lastInt = end >> 5; + for (int i = firstInt; i <= lastInt; i++) { + int firstBit = i > firstInt ? 0 : start & 0x1F; + int lastBit = i < lastInt ? 31 : end & 0x1F; + int mask; + if (firstBit == 0 && lastBit == 31) { + mask = -1; + } else { + mask = 0; + for (int j = firstBit; j <= lastBit; j++) { + mask |= 1 << j; + } + } + + // Return false if we're looking for 1s and the masked bits[i] isn't all 1s (that is, + // equals the mask, or we're looking for 0s and the masked portion is not all 0s + if ((bits[i] & mask) != (value ? mask : 0)) { + return false; + } + } + return true; + } + + public void appendBit(boolean bit) { + ensureCapacity(size + 1); + if (bit) { + bits[size >> 5] |= (1 << (size & 0x1F)); + } + size++; + } + + /** + * Appends the least-significant bits, from value, in order from most-significant to + * least-significant. For example, appending 6 bits from 0x000001E will append the bits + * 0, 1, 1, 1, 1, 0 in that order. + */ + public void appendBits(int value, int numBits) { + if (numBits < 0 || numBits > 32) { + throw new IllegalArgumentException("Num bits must be between 0 and 32"); + } + ensureCapacity(size + numBits); + for (int numBitsLeft = numBits; numBitsLeft > 0; numBitsLeft--) { + appendBit(((value >> (numBitsLeft - 1)) & 0x01) == 1); + } + } + + public void appendBitArray(BitArray other) { + int otherSize = other.getSize(); + ensureCapacity(size + otherSize); + for (int i = 0; i < otherSize; i++) { + appendBit(other.get(i)); + } + } + + public void xor(BitArray other) { + if (bits.length != other.bits.length) { + throw new IllegalArgumentException("Sizes don't match"); + } + for (int i = 0; i < bits.length; i++) { + // The last byte could be incomplete (i.e. not have 8 bits in + // it) but there is no problem since 0 XOR 0 == 0. + bits[i] ^= other.bits[i]; + } + } + + /** + * + * @param bitOffset first bit to start writing + * @param array array to write into. Bytes are written most-significant byte first. This is the opposite + * of the internal representation, which is exposed by {@link #getBitArray()} + * @param offset position in array to start writing + * @param numBytes how many bytes to write + */ + public void toBytes(int bitOffset, byte[] array, int offset, int numBytes) { + for (int i = 0; i < numBytes; i++) { + int theByte = 0; + for (int j = 0; j < 8; j++) { + if (get(bitOffset)) { + theByte |= 1 << (7 - j); + } + bitOffset++; + } + array[offset + i] = (byte) theByte; + } + } + + /** + * @return underlying array of ints. The first element holds the first 32 bits, and the least + * significant bit is bit 0. + */ + public int[] getBitArray() { + return bits; + } + + /** + * Reverses all bits in the array. + */ + public void reverse() { + int[] newBits = new int[bits.length]; + int size = this.size; + for (int i = 0; i < size; i++) { + if (get(size - i - 1)) { + newBits[i >> 5] |= 1 << (i & 0x1F); + } + } + bits = newBits; + } + + private static int[] makeArray(int size) { + return new int[(size + 31) >> 5]; + } + + public String toString() { + StringBuffer result = new StringBuffer(size); + for (int i = 0; i < size; i++) { + if ((i & 0x07) == 0) { + result.append(' '); + } + result.append(get(i) ? 'X' : '.'); + } + return result.toString(); + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitMatrix.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitMatrix.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitMatrix.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitMatrix.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,226 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +/** + *

Represents a 2D matrix of bits. In function arguments below, and throughout the common + * module, x is the column position, and y is the row position. The ordering is always x, y. + * The origin is at the top-left.

+ * + *

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + * with a new int. This is done intentionally so that we can copy out a row into a BitArray very + * efficiently.

+ * + *

The ordering of bits is row-major. Within each int, the least significant bits are used first, + * meaning they represent lower x values. This is compatible with BitArray's implementation.

+ * + * @author Sean Owen + * @author dswitkin@google.com (Daniel Switkin) + */ +public final class BitMatrix { + + // TODO: Just like BitArray, these need to be public so ProGuard can inline them. + public final int width; + public final int height; + public final int rowSize; + public final int[] bits; + + // A helper to construct a square matrix. + public BitMatrix(int dimension) { + this(dimension, dimension); + } + + public BitMatrix(int width, int height) { + if (width < 1 || height < 1) { + throw new IllegalArgumentException("Both dimensions must be greater than 0"); + } + this.width = width; + this.height = height; + this.rowSize = (width + 31) >> 5; + bits = new int[rowSize * height]; + } + + /** + *

Gets the requested bit, where true means black.

+ * + * @param x The horizontal component (i.e. which column) + * @param y The vertical component (i.e. which row) + * @return value of given bit in matrix + */ + public boolean get(int x, int y) { + int offset = y * rowSize + (x >> 5); + return ((bits[offset] >>> (x & 0x1f)) & 1) != 0; + } + + /** + *

Sets the given bit to true.

+ * + * @param x The horizontal component (i.e. which column) + * @param y The vertical component (i.e. which row) + */ + public void set(int x, int y) { + int offset = y * rowSize + (x >> 5); + bits[offset] |= 1 << (x & 0x1f); + } + + /** + *

Flips the given bit.

+ * + * @param x The horizontal component (i.e. which column) + * @param y The vertical component (i.e. which row) + */ + public void flip(int x, int y) { + int offset = y * rowSize + (x >> 5); + bits[offset] ^= 1 << (x & 0x1f); + } + + /** + * Clears all bits (sets to false). + */ + public void clear() { + int max = bits.length; + for (int i = 0; i < max; i++) { + bits[i] = 0; + } + } + + /** + *

Sets a square region of the bit matrix to true.

+ * + * @param left The horizontal position to begin at (inclusive) + * @param top The vertical position to begin at (inclusive) + * @param width The width of the region + * @param height The height of the region + */ + public void setRegion(int left, int top, int width, int height) { + if (top < 0 || left < 0) { + throw new IllegalArgumentException("Left and top must be nonnegative"); + } + if (height < 1 || width < 1) { + throw new IllegalArgumentException("Height and width must be at least 1"); + } + int right = left + width; + int bottom = top + height; + if (bottom > this.height || right > this.width) { + throw new IllegalArgumentException("The region must fit inside the matrix"); + } + for (int y = top; y < bottom; y++) { + int offset = y * rowSize; + for (int x = left; x < right; x++) { + bits[offset + (x >> 5)] |= 1 << (x & 0x1f); + } + } + } + + /** + * A fast method to retrieve one row of data from the matrix as a BitArray. + * + * @param y The row to retrieve + * @param row An optional caller-allocated BitArray, will be allocated if null or too small + * @return The resulting BitArray - this reference should always be used even when passing + * your own row + */ + public BitArray getRow(int y, BitArray row) { + if (row == null || row.getSize() < width) { + row = new BitArray(width); + } + int offset = y * rowSize; + for (int x = 0; x < rowSize; x++) { + row.setBulk(x << 5, bits[offset + x]); + } + return row; + } + + /** + * This is useful in detecting a corner of a 'pure' barcode. + * + * @return {x,y} coordinate of top-left-most 1 bit, or null if it is all white + */ + public int[] getTopLeftOnBit() { + int bitsOffset = 0; + while (bitsOffset < bits.length && bits[bitsOffset] == 0) { + bitsOffset++; + } + if (bitsOffset == bits.length) { + return null; + } + int y = bitsOffset / rowSize; + int x = (bitsOffset % rowSize) << 5; + + int theBits = bits[bitsOffset]; + int bit = 0; + while ((theBits << (31-bit)) == 0) { + bit++; + } + x += bit; + return new int[] {x, y}; + } + + /** + * @return The width of the matrix + */ + public int getWidth() { + return width; + } + + /** + * @return The height of the matrix + */ + public int getHeight() { + return height; + } + + public boolean equals(Object o) { + if (!(o instanceof BitMatrix)) { + return false; + } + BitMatrix other = (BitMatrix) o; + if (width != other.width || height != other.height || + rowSize != other.rowSize || bits.length != other.bits.length) { + return false; + } + for (int i = 0; i < bits.length; i++) { + if (bits[i] != other.bits[i]) { + return false; + } + } + return true; + } + + public int hashCode() { + int hash = width; + hash = 31 * hash + width; + hash = 31 * hash + height; + hash = 31 * hash + rowSize; + for (int i = 0; i < bits.length; i++) { + hash = 31 * hash + bits[i]; + } + return hash; + } + + public String toString() { + StringBuffer result = new StringBuffer(height * (width + 1)); + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + result.append(get(x, y) ? "X " : " "); + } + result.append('\n'); + } + return result.toString(); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitSource.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitSource.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/BitSource.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/BitSource.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +/** + *

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + * number of bits read is not often a multiple of 8.

+ * + *

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + * it passed in, in which case all bets are off.

+ * + * @author Sean Owen + */ +public final class BitSource { + + private final byte[] bytes; + private int byteOffset; + private int bitOffset; + + /** + * @param bytes bytes from which this will read bits. Bits will be read from the first byte first. + * Bits are read within a byte from most-significant to least-significant bit. + */ + public BitSource(byte[] bytes) { + this.bytes = bytes; + } + + /** + * @param numBits number of bits to read + * @return int representing the bits read. The bits will appear as the least-significant + * bits of the int + * @throws IllegalArgumentException if numBits isn't in [1,32] + */ + public int readBits(int numBits) { + if (numBits < 1 || numBits > 32) { + throw new IllegalArgumentException(); + } + + int result = 0; + + // First, read remainder from current byte + if (bitOffset > 0) { + int bitsLeft = 8 - bitOffset; + int toRead = numBits < bitsLeft ? numBits : bitsLeft; + int bitsToNotRead = bitsLeft - toRead; + int mask = (0xFF >> (8 - toRead)) << bitsToNotRead; + result = (bytes[byteOffset] & mask) >> bitsToNotRead; + numBits -= toRead; + bitOffset += toRead; + if (bitOffset == 8) { + bitOffset = 0; + byteOffset++; + } + } + + // Next read whole bytes + if (numBits > 0) { + while (numBits >= 8) { + result = (result << 8) | (bytes[byteOffset] & 0xFF); + byteOffset++; + numBits -= 8; + } + + // Finally read a partial byte + if (numBits > 0) { + int bitsToNotRead = 8 - numBits; + int mask = (0xFF >> bitsToNotRead) << bitsToNotRead; + result = (result << numBits) | ((bytes[byteOffset] & mask) >> bitsToNotRead); + bitOffset += numBits; + } + } + + return result; + } + + /** + * @return number of bits that can be read successfully + */ + public int available() { + return 8 * (bytes.length - byteOffset) - bitOffset; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/CharacterSetECI.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +import java.util.Hashtable; + +/** + * Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + * of ISO 18004. + * + * @author Sean Owen + */ +public final class CharacterSetECI extends ECI { + + private static Hashtable VALUE_TO_ECI; + private static Hashtable NAME_TO_ECI; + + private static void initialize() { + VALUE_TO_ECI = new Hashtable(29); + NAME_TO_ECI = new Hashtable(29); + // TODO figure out if these values are even right! + addCharacterSet(0, "Cp437"); + addCharacterSet(1, new String[] {"ISO8859_1", "ISO-8859-1"}); + addCharacterSet(2, "Cp437"); + addCharacterSet(3, new String[] {"ISO8859_1", "ISO-8859-1"}); + addCharacterSet(4, "ISO8859_2"); + addCharacterSet(5, "ISO8859_3"); + addCharacterSet(6, "ISO8859_4"); + addCharacterSet(7, "ISO8859_5"); + addCharacterSet(8, "ISO8859_6"); + addCharacterSet(9, "ISO8859_7"); + addCharacterSet(10, "ISO8859_8"); + addCharacterSet(11, "ISO8859_9"); + addCharacterSet(12, "ISO8859_10"); + addCharacterSet(13, "ISO8859_11"); + addCharacterSet(15, "ISO8859_13"); + addCharacterSet(16, "ISO8859_14"); + addCharacterSet(17, "ISO8859_15"); + addCharacterSet(18, "ISO8859_16"); + addCharacterSet(20, new String[] {"SJIS", "Shift_JIS"}); + } + + private final String encodingName; + + private CharacterSetECI(int value, String encodingName) { + super(value); + this.encodingName = encodingName; + } + + public String getEncodingName() { + return encodingName; + } + + private static void addCharacterSet(int value, String encodingName) { + CharacterSetECI eci = new CharacterSetECI(value, encodingName); + VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf + NAME_TO_ECI.put(encodingName, eci); + } + + private static void addCharacterSet(int value, String[] encodingNames) { + CharacterSetECI eci = new CharacterSetECI(value, encodingNames[0]); + VALUE_TO_ECI.put(new Integer(value), eci); // can't use valueOf + for (int i = 0; i < encodingNames.length; i++) { + NAME_TO_ECI.put(encodingNames[i], eci); + } + } + + /** + * @param value character set ECI value + * @return {@link CharacterSetECI} representing ECI of given value, or null if it is legal but + * unsupported + * @throws IllegalArgumentException if ECI value is invalid + */ + public static CharacterSetECI getCharacterSetECIByValue(int value) { + if (VALUE_TO_ECI == null) { + initialize(); + } + if (value < 0 || value >= 900) { + throw new IllegalArgumentException("Bad ECI value: " + value); + } + return (CharacterSetECI) VALUE_TO_ECI.get(new Integer(value)); + } + + /** + * @param name character set ECI encoding name + * @return {@link CharacterSetECI} representing ECI for character encoding, or null if it is legal + * but unsupported + */ + public static CharacterSetECI getCharacterSetECIByName(String name) { + if (NAME_TO_ECI == null) { + initialize(); + } + return (CharacterSetECI) NAME_TO_ECI.get(name); + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/DecoderResult.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/DecoderResult.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/DecoderResult.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/DecoderResult.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +import java.util.Vector; + +import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; + +/** + *

Encapsulates the result of decoding a matrix of bits. This typically + * applies to 2D barcode formats. For now it contains the raw bytes obtained, + * as well as a String interpretation of those bytes, if applicable.

+ * + * @author Sean Owen + */ +public final class DecoderResult { + + private final byte[] rawBytes; + private final String text; + private final Vector byteSegments; + private final ErrorCorrectionLevel ecLevel; + + public DecoderResult(byte[] rawBytes, String text, Vector byteSegments, ErrorCorrectionLevel ecLevel) { + if (rawBytes == null && text == null) { + throw new IllegalArgumentException(); + } + this.rawBytes = rawBytes; + this.text = text; + this.byteSegments = byteSegments; + this.ecLevel = ecLevel; + } + + public byte[] getRawBytes() { + return rawBytes; + } + + public String getText() { + return text; + } + + public Vector getByteSegments() { + return byteSegments; + } + + public ErrorCorrectionLevel getECLevel() { + return ecLevel; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/DetectorResult.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/DetectorResult.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/DetectorResult.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/DetectorResult.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +import ext.plantuml.com.google.zxing.ResultPoint; + +/** + *

Encapsulates the result of detecting a barcode in an image. This includes the raw + * matrix of black/white pixels corresponding to the barcode, and possibly points of interest + * in the image, like the location of finder patterns or corners of the barcode in the image.

+ * + * @author Sean Owen + */ +public final class DetectorResult { + + private final BitMatrix bits; + private final ResultPoint[] points; + + public DetectorResult(BitMatrix bits, ResultPoint[] points) { + this.bits = bits; + this.points = points; + } + + public BitMatrix getBits() { + return bits; + } + + public ResultPoint[] getPoints() { + return points; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/ECI.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/ECI.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/ECI.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/ECI.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +/** + * Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + * 5.3 of ISO 18004. + * + * @author Sean Owen + */ +public abstract class ECI { + + private final int value; + + ECI(int value) { + this.value = value; + } + + public int getValue() { + return value; + } + + /** + * @param value ECI value + * @return {@link ECI} representing ECI of given value, or null if it is legal but unsupported + * @throws IllegalArgumentException if ECI value is invalid + */ + public static ECI getECIByValue(int value) { + if (value < 0 || value > 999999) { + throw new IllegalArgumentException("Bad ECI value: " + value); + } + if (value < 900) { // Character set ECIs use 000000 - 000899 + return CharacterSetECI.getCharacterSetECIByValue(value); + } + return null; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common.reedsolomon; + +/** + *

This class contains utility methods for performing mathematical operations over + * the Galois Field GF(256). Operations use a given primitive polynomial in calculations.

+ * + *

Throughout this package, elements of GF(256) are represented as an int + * for convenience and speed (but at the cost of memory). + * Only the bottom 8 bits are really used.

+ * + * @author Sean Owen + */ +public final class GF256 { + + public static final GF256 QR_CODE_FIELD = new GF256(0x011D); // x^8 + x^4 + x^3 + x^2 + 1 + public static final GF256 DATA_MATRIX_FIELD = new GF256(0x012D); // x^8 + x^5 + x^3 + x^2 + 1 + + private final int[] expTable; + private final int[] logTable; + private final GF256Poly zero; + private final GF256Poly one; + + /** + * Create a representation of GF(256) using the given primitive polynomial. + * + * @param primitive irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + */ + private GF256(int primitive) { + expTable = new int[256]; + logTable = new int[256]; + int x = 1; + for (int i = 0; i < 256; i++) { + expTable[i] = x; + x <<= 1; // x = x * 2; we're assuming the generator alpha is 2 + if (x >= 0x100) { + x ^= primitive; + } + } + for (int i = 0; i < 255; i++) { + logTable[expTable[i]] = i; + } + // logTable[0] == 0 but this should never be used + zero = new GF256Poly(this, new int[]{0}); + one = new GF256Poly(this, new int[]{1}); + } + + GF256Poly getZero() { + return zero; + } + + GF256Poly getOne() { + return one; + } + + /** + * @return the monomial representing coefficient * x^degree + */ + GF256Poly buildMonomial(int degree, int coefficient) { + if (degree < 0) { + throw new IllegalArgumentException(); + } + if (coefficient == 0) { + return zero; + } + int[] coefficients = new int[degree + 1]; + coefficients[0] = coefficient; + return new GF256Poly(this, coefficients); + } + + /** + * Implements both addition and subtraction -- they are the same in GF(256). + * + * @return sum/difference of a and b + */ + static int addOrSubtract(int a, int b) { + return a ^ b; + } + + /** + * @return 2 to the power of a in GF(256) + */ + int exp(int a) { + return expTable[a]; + } + + /** + * @return base 2 log of a in GF(256) + */ + int log(int a) { + if (a == 0) { + throw new IllegalArgumentException(); + } + return logTable[a]; + } + + /** + * @return multiplicative inverse of a + */ + int inverse(int a) { + if (a == 0) { + throw new ArithmeticException(); + } + return expTable[255 - logTable[a]]; + } + + /** + * @param a + * @param b + * @return product of a and b in GF(256) + */ + int multiply(int a, int b) { + if (a == 0 || b == 0) { + return 0; + } + int logSum = logTable[a] + logTable[b]; + // index is a sped-up alternative to logSum % 255 since sum + // is in [0,510]. Thanks to jmsachs for the idea + return expTable[(logSum & 0xFF) + (logSum >>> 8)]; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/GF256Poly.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,263 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common.reedsolomon; + +/** + *

Represents a polynomial whose coefficients are elements of GF(256). + * Instances of this class are immutable.

+ * + *

Much credit is due to William Rucklidge since portions of this code are an indirect + * port of his C++ Reed-Solomon implementation.

+ * + * @author Sean Owen + */ +final class GF256Poly { + + private final GF256 field; + private final int[] coefficients; + + /** + * @param field the {@link GF256} instance representing the field to use + * to perform computations + * @param coefficients coefficients as ints representing elements of GF(256), arranged + * from most significant (highest-power term) coefficient to least significant + * @throws IllegalArgumentException if argument is null or empty, + * or if leading coefficient is 0 and this is not a + * constant polynomial (that is, it is not the monomial "0") + */ + GF256Poly(GF256 field, int[] coefficients) { + if (coefficients == null || coefficients.length == 0) { + throw new IllegalArgumentException(); + } + this.field = field; + int coefficientsLength = coefficients.length; + if (coefficientsLength > 1 && coefficients[0] == 0) { + // Leading term must be non-zero for anything except the constant polynomial "0" + int firstNonZero = 1; + while (firstNonZero < coefficientsLength && coefficients[firstNonZero] == 0) { + firstNonZero++; + } + if (firstNonZero == coefficientsLength) { + this.coefficients = field.getZero().coefficients; + } else { + this.coefficients = new int[coefficientsLength - firstNonZero]; + System.arraycopy(coefficients, + firstNonZero, + this.coefficients, + 0, + this.coefficients.length); + } + } else { + this.coefficients = coefficients; + } + } + + int[] getCoefficients() { + return coefficients; + } + + /** + * @return degree of this polynomial + */ + int getDegree() { + return coefficients.length - 1; + } + + /** + * @return true iff this polynomial is the monomial "0" + */ + boolean isZero() { + return coefficients[0] == 0; + } + + /** + * @return coefficient of x^degree term in this polynomial + */ + int getCoefficient(int degree) { + return coefficients[coefficients.length - 1 - degree]; + } + + /** + * @return evaluation of this polynomial at a given point + */ + int evaluateAt(int a) { + if (a == 0) { + // Just return the x^0 coefficient + return getCoefficient(0); + } + int size = coefficients.length; + if (a == 1) { + // Just the sum of the coefficients + int result = 0; + for (int i = 0; i < size; i++) { + result = GF256.addOrSubtract(result, coefficients[i]); + } + return result; + } + int result = coefficients[0]; + for (int i = 1; i < size; i++) { + result = GF256.addOrSubtract(field.multiply(a, result), coefficients[i]); + } + return result; + } + + GF256Poly addOrSubtract(GF256Poly other) { + if (!field.equals(other.field)) { + throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); + } + if (isZero()) { + return other; + } + if (other.isZero()) { + return this; + } + + int[] smallerCoefficients = this.coefficients; + int[] largerCoefficients = other.coefficients; + if (smallerCoefficients.length > largerCoefficients.length) { + int[] temp = smallerCoefficients; + smallerCoefficients = largerCoefficients; + largerCoefficients = temp; + } + int[] sumDiff = new int[largerCoefficients.length]; + int lengthDiff = largerCoefficients.length - smallerCoefficients.length; + // Copy high-order terms only found in higher-degree polynomial's coefficients + System.arraycopy(largerCoefficients, 0, sumDiff, 0, lengthDiff); + + for (int i = lengthDiff; i < largerCoefficients.length; i++) { + sumDiff[i] = GF256.addOrSubtract(smallerCoefficients[i - lengthDiff], largerCoefficients[i]); + } + + return new GF256Poly(field, sumDiff); + } + + GF256Poly multiply(GF256Poly other) { + if (!field.equals(other.field)) { + throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); + } + if (isZero() || other.isZero()) { + return field.getZero(); + } + int[] aCoefficients = this.coefficients; + int aLength = aCoefficients.length; + int[] bCoefficients = other.coefficients; + int bLength = bCoefficients.length; + int[] product = new int[aLength + bLength - 1]; + for (int i = 0; i < aLength; i++) { + int aCoeff = aCoefficients[i]; + for (int j = 0; j < bLength; j++) { + product[i + j] = GF256.addOrSubtract(product[i + j], + field.multiply(aCoeff, bCoefficients[j])); + } + } + return new GF256Poly(field, product); + } + + GF256Poly multiply(int scalar) { + if (scalar == 0) { + return field.getZero(); + } + if (scalar == 1) { + return this; + } + int size = coefficients.length; + int[] product = new int[size]; + for (int i = 0; i < size; i++) { + product[i] = field.multiply(coefficients[i], scalar); + } + return new GF256Poly(field, product); + } + + GF256Poly multiplyByMonomial(int degree, int coefficient) { + if (degree < 0) { + throw new IllegalArgumentException(); + } + if (coefficient == 0) { + return field.getZero(); + } + int size = coefficients.length; + int[] product = new int[size + degree]; + for (int i = 0; i < size; i++) { + product[i] = field.multiply(coefficients[i], coefficient); + } + return new GF256Poly(field, product); + } + + GF256Poly[] divide(GF256Poly other) { + if (!field.equals(other.field)) { + throw new IllegalArgumentException("GF256Polys do not have same GF256 field"); + } + if (other.isZero()) { + throw new IllegalArgumentException("Divide by 0"); + } + + GF256Poly quotient = field.getZero(); + GF256Poly remainder = this; + + int denominatorLeadingTerm = other.getCoefficient(other.getDegree()); + int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm); + + while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) { + int degreeDifference = remainder.getDegree() - other.getDegree(); + int scale = field.multiply(remainder.getCoefficient(remainder.getDegree()), inverseDenominatorLeadingTerm); + GF256Poly term = other.multiplyByMonomial(degreeDifference, scale); + GF256Poly iterationQuotient = field.buildMonomial(degreeDifference, scale); + quotient = quotient.addOrSubtract(iterationQuotient); + remainder = remainder.addOrSubtract(term); + } + + return new GF256Poly[] { quotient, remainder }; + } + + public String toString() { + StringBuffer result = new StringBuffer(8 * getDegree()); + for (int degree = getDegree(); degree >= 0; degree--) { + int coefficient = getCoefficient(degree); + if (coefficient != 0) { + if (coefficient < 0) { + result.append(" - "); + coefficient = -coefficient; + } else { + if (result.length() > 0) { + result.append(" + "); + } + } + if (degree == 0 || coefficient != 1) { + int alphaPower = field.log(coefficient); + if (alphaPower == 0) { + result.append('1'); + } else if (alphaPower == 1) { + result.append('a'); + } else { + result.append("a^"); + result.append(alphaPower); + } + } + if (degree != 0) { + if (degree == 1) { + result.append('x'); + } else { + result.append("x^"); + result.append(degree); + } + } + } + } + return result.toString(); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common.reedsolomon; + +import java.util.Vector; + +/** + *

Implements Reed-Solomon enbcoding, as the name implies.

+ * + * @author Sean Owen + * @author William Rucklidge + */ +public final class ReedSolomonEncoder { + + private final GF256 field; + private final Vector cachedGenerators; + + public ReedSolomonEncoder(GF256 field) { + if (!GF256.QR_CODE_FIELD.equals(field)) { + throw new IllegalArgumentException("Only QR Code is supported at this time"); + } + this.field = field; + this.cachedGenerators = new Vector(); + cachedGenerators.addElement(new GF256Poly(field, new int[] { 1 })); + } + + private GF256Poly buildGenerator(int degree) { + if (degree >= cachedGenerators.size()) { + GF256Poly lastGenerator = (GF256Poly) cachedGenerators.elementAt(cachedGenerators.size() - 1); + for (int d = cachedGenerators.size(); d <= degree; d++) { + GF256Poly nextGenerator = lastGenerator.multiply(new GF256Poly(field, new int[] { 1, field.exp(d - 1) })); + cachedGenerators.addElement(nextGenerator); + lastGenerator = nextGenerator; + } + } + return (GF256Poly) cachedGenerators.elementAt(degree); + } + + public void encode(int[] toEncode, int ecBytes) { + if (ecBytes == 0) { + throw new IllegalArgumentException("No error correction bytes"); + } + int dataBytes = toEncode.length - ecBytes; + if (dataBytes <= 0) { + throw new IllegalArgumentException("No data bytes provided"); + } + GF256Poly generator = buildGenerator(ecBytes); + int[] infoCoefficients = new int[dataBytes]; + System.arraycopy(toEncode, 0, infoCoefficients, 0, dataBytes); + GF256Poly info = new GF256Poly(field, infoCoefficients); + info = info.multiplyByMonomial(ecBytes, 1); + GF256Poly remainder = info.divide(generator)[1]; + int[] coefficients = remainder.getCoefficients(); + int numZeroCoefficients = ecBytes - coefficients.length; + for (int i = 0; i < numZeroCoefficients; i++) { + toEncode[dataBytes + i] = 0; + } + System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/reedsolomon/ReedSolomonException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common.reedsolomon; + +/** + *

Thrown when an exception occurs during Reed-Solomon decoding, such as when + * there are too many errors to correct.

+ * + * @author Sean Owen + */ +public final class ReedSolomonException extends Exception { + + public ReedSolomonException(String message) { + super(message); + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/StringUtils.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/StringUtils.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/common/StringUtils.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/common/StringUtils.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2010 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.common; + +import java.util.Hashtable; + +import ext.plantuml.com.google.zxing.DecodeHintType; + +/** + * Common string-related functions. + * + * @author Sean Owen + */ +public final class StringUtils { + + private static final String PLATFORM_DEFAULT_ENCODING = + System.getProperty("file.encoding"); + public static final String SHIFT_JIS = "SJIS"; + private static final String EUC_JP = "EUC_JP"; + private static final String UTF8 = "UTF8"; + private static final String ISO88591 = "ISO8859_1"; + private static final boolean ASSUME_SHIFT_JIS = + SHIFT_JIS.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING) || + EUC_JP.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING); + + private StringUtils() {} + + /** + * @param bytes bytes encoding a string, whose encoding should be guessed + * @param hints decode hints if applicable + * @return name of guessed encoding; at the moment will only guess one of: + * {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + * default encoding if none of these can possibly be correct + */ + public static String guessEncoding(byte[] bytes, Hashtable hints) { + if (hints != null) { + String characterSet = (String) hints.get(DecodeHintType.CHARACTER_SET); + if (characterSet != null) { + return characterSet; + } + } + // Does it start with the UTF-8 byte order mark? then guess it's UTF-8 + if (bytes.length > 3 && + bytes[0] == (byte) 0xEF && + bytes[1] == (byte) 0xBB && + bytes[2] == (byte) 0xBF) { + return UTF8; + } + // For now, merely tries to distinguish ISO-8859-1, UTF-8 and Shift_JIS, + // which should be by far the most common encodings. ISO-8859-1 + // should not have bytes in the 0x80 - 0x9F range, while Shift_JIS + // uses this as a first byte of a two-byte character. If we see this + // followed by a valid second byte in Shift_JIS, assume it is Shift_JIS. + // If we see something else in that second byte, we'll make the risky guess + // that it's UTF-8. + int length = bytes.length; + boolean canBeISO88591 = true; + boolean canBeShiftJIS = true; + boolean canBeUTF8 = true; + int utf8BytesLeft = 0; + int maybeDoubleByteCount = 0; + int maybeSingleByteKatakanaCount = 0; + boolean sawLatin1Supplement = false; + boolean sawUTF8Start = false; + boolean lastWasPossibleDoubleByteStart = false; + + for (int i = 0; + i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8); + i++) { + + int value = bytes[i] & 0xFF; + + // UTF-8 stuff + if (value >= 0x80 && value <= 0xBF) { + if (utf8BytesLeft > 0) { + utf8BytesLeft--; + } + } else { + if (utf8BytesLeft > 0) { + canBeUTF8 = false; + } + if (value >= 0xC0 && value <= 0xFD) { + sawUTF8Start = true; + int valueCopy = value; + while ((valueCopy & 0x40) != 0) { + utf8BytesLeft++; + valueCopy <<= 1; + } + } + } + + // ISO-8859-1 stuff + + if ((value == 0xC2 || value == 0xC3) && i < length - 1) { + // This is really a poor hack. The slightly more exotic characters people might want to put in + // a QR Code, by which I mean the Latin-1 supplement characters (e.g. u-umlaut) have encodings + // that start with 0xC2 followed by [0xA0,0xBF], or start with 0xC3 followed by [0x80,0xBF]. + int nextValue = bytes[i + 1] & 0xFF; + if (nextValue <= 0xBF && + ((value == 0xC2 && nextValue >= 0xA0) || (value == 0xC3 && nextValue >= 0x80))) { + sawLatin1Supplement = true; + } + } + if (value >= 0x7F && value <= 0x9F) { + canBeISO88591 = false; + } + + // Shift_JIS stuff + + if (value >= 0xA1 && value <= 0xDF) { + // count the number of characters that might be a Shift_JIS single-byte Katakana character + if (!lastWasPossibleDoubleByteStart) { + maybeSingleByteKatakanaCount++; + } + } + if (!lastWasPossibleDoubleByteStart && + ((value >= 0xF0 && value <= 0xFF) || value == 0x80 || value == 0xA0)) { + canBeShiftJIS = false; + } + if (((value >= 0x81 && value <= 0x9F) || (value >= 0xE0 && value <= 0xEF))) { + // These start double-byte characters in Shift_JIS. Let's see if it's followed by a valid + // second byte. + if (lastWasPossibleDoubleByteStart) { + // If we just checked this and the last byte for being a valid double-byte + // char, don't check starting on this byte. If this and the last byte + // formed a valid pair, then this shouldn't be checked to see if it starts + // a double byte pair of course. + lastWasPossibleDoubleByteStart = false; + } else { + // ... otherwise do check to see if this plus the next byte form a valid + // double byte pair encoding a character. + lastWasPossibleDoubleByteStart = true; + if (i >= bytes.length - 1) { + canBeShiftJIS = false; + } else { + int nextValue = bytes[i + 1] & 0xFF; + if (nextValue < 0x40 || nextValue > 0xFC) { + canBeShiftJIS = false; + } else { + maybeDoubleByteCount++; + } + // There is some conflicting information out there about which bytes can follow which in + // double-byte Shift_JIS characters. The rule above seems to be the one that matches practice. + } + } + } else { + lastWasPossibleDoubleByteStart = false; + } + } + if (utf8BytesLeft > 0) { + canBeUTF8 = false; + } + + // Easy -- if assuming Shift_JIS and no evidence it can't be, done + if (canBeShiftJIS && ASSUME_SHIFT_JIS) { + return SHIFT_JIS; + } + if (canBeUTF8 && sawUTF8Start) { + return UTF8; + } + // Distinguishing Shift_JIS and ISO-8859-1 can be a little tough. The crude heuristic is: + // - If we saw + // - at least 3 bytes that starts a double-byte value (bytes that are rare in ISO-8859-1), or + // - over 5% of bytes could be single-byte Katakana (also rare in ISO-8859-1), + // - and, saw no sequences that are invalid in Shift_JIS, then we conclude Shift_JIS + if (canBeShiftJIS && (maybeDoubleByteCount >= 3 || 20 * maybeSingleByteKatakanaCount > length)) { + return SHIFT_JIS; + } + // Otherwise, we default to ISO-8859-1 unless we know it can't be + if (!sawLatin1Supplement && canBeISO88591) { + return ISO88591; + } + // Otherwise, we take a wild guess with platform encoding + return PLATFORM_DEFAULT_ENCODING; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/BitMatrixParser.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,446 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.datamatrix.decoder; + +import ext.plantuml.com.google.zxing.FormatException; +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + * @author bbrown@google.com (Brian Brown) + */ +final class BitMatrixParser { + + private final BitMatrix mappingBitMatrix; + private final BitMatrix readMappingMatrix; + private final Version version; + + /** + * @param bitMatrix {@link BitMatrix} to parse + * @throws FormatException if dimension is < 10 or > 144 or not 0 mod 2 + */ + BitMatrixParser(BitMatrix bitMatrix) throws FormatException { + int dimension = bitMatrix.getHeight(); + if (dimension < 10 || dimension > 144 || (dimension & 0x01) != 0) { + throw FormatException.getFormatInstance(); + } + + version = readVersion(bitMatrix); + this.mappingBitMatrix = extractDataRegion(bitMatrix); + // TODO(bbrown): Make this work for rectangular symbols + this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.getHeight()); + } + + /** + *

Creates the version object based on the dimension of the original bit matrix from + * the datamatrix code.

+ * + *

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ * + * @param bitMatrix Original {@link BitMatrix} including alignment patterns + * @return {@link Version} encapsulating the Data Matrix Code's "version" + * @throws FormatException if the dimensions of the mapping matrix are not valid + * Data Matrix dimensions. + */ + Version readVersion(BitMatrix bitMatrix) throws FormatException { + + if (version != null) { + return version; + } + + // TODO(bbrown): make this work for rectangular dimensions as well. + int numRows = bitMatrix.getHeight(); + int numColumns = numRows; + + return Version.getVersionForDimensions(numRows, numColumns); + } + + /** + *

Reads the bits in the {@link BitMatrix} representing the mapping matrix (No alignment patterns) + * in the correct order in order to reconstitute the codewords bytes contained within the + * Data Matrix Code.

+ * + * @return bytes encoded within the Data Matrix Code + * @throws FormatException if the exact number of bytes expected is not read + */ + byte[] readCodewords() throws FormatException { + + byte[] result = new byte[version.getTotalCodewords()]; + int resultOffset = 0; + + int row = 4; + int column = 0; + // TODO(bbrown): Data Matrix can be rectangular, assuming square for now + int numRows = mappingBitMatrix.getHeight(); + int numColumns = numRows; + + boolean corner1Read = false; + boolean corner2Read = false; + boolean corner3Read = false; + boolean corner4Read = false; + + // Read all of the codewords + do { + // Check the four corner cases + if ((row == numRows) && (column == 0) && !corner1Read) { + result[resultOffset++] = (byte) readCorner1(numRows, numColumns); + row -= 2; + column +=2; + corner1Read = true; + } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x03) != 0) && !corner2Read) { + result[resultOffset++] = (byte) readCorner2(numRows, numColumns); + row -= 2; + column +=2; + corner2Read = true; + } else if ((row == numRows+4) && (column == 2) && ((numColumns & 0x07) == 0) && !corner3Read) { + result[resultOffset++] = (byte) readCorner3(numRows, numColumns); + row -= 2; + column +=2; + corner3Read = true; + } else if ((row == numRows-2) && (column == 0) && ((numColumns & 0x07) == 4) && !corner4Read) { + result[resultOffset++] = (byte) readCorner4(numRows, numColumns); + row -= 2; + column +=2; + corner4Read = true; + } else { + // Sweep upward diagonally to the right + do { + if ((row < numRows) && (column >= 0) && !readMappingMatrix.get(column, row)) { + result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); + } + row -= 2; + column +=2; + } while ((row >= 0) && (column < numColumns)); + row += 1; + column +=3; + + // Sweep downward diagonally to the left + do { + if ((row >= 0) && (column < numColumns) && !readMappingMatrix.get(column, row)) { + result[resultOffset++] = (byte) readUtah(row, column, numRows, numColumns); + } + row += 2; + column -=2; + } while ((row < numRows) && (column >= 0)); + row += 3; + column +=1; + } + } while ((row < numRows) || (column < numColumns)); + + if (resultOffset != version.getTotalCodewords()) { + throw FormatException.getFormatInstance(); + } + return result; + } + + /** + *

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ * + * @param row Row to read in the mapping matrix + * @param column Column to read in the mapping matrix + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return value of the given bit in the mapping matrix + */ + boolean readModule(int row, int column, int numRows, int numColumns) { + // Adjust the row and column indices based on boundary wrapping + if (row < 0) { + row += numRows; + column += 4 - ((numRows + 4) & 0x07); + } + if (column < 0) { + column += numColumns; + row += 4 - ((numColumns + 4) & 0x07); + } + readMappingMatrix.set(column, row); + return mappingBitMatrix.get(column, row); + } + + /** + *

Reads the 8 bits of the standard Utah-shaped pattern.

+ * + *

See ISO 16022:2006, 5.8.1 Figure 6

+ * + * @param row Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + * @param column Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return byte from the utah shape + */ + int readUtah(int row, int column, int numRows, int numColumns) { + int currentByte = 0; + if (readModule(row - 2, column - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row - 2, column - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row - 1, column - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row - 1, column - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row - 1, column, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row, column - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row, column - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(row, column, numRows, numColumns)) { + currentByte |= 1; + } + return currentByte; + } + + /** + *

Reads the 8 bits of the special corner condition 1.

+ * + *

See ISO 16022:2006, Figure F.3

+ * + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return byte from the Corner condition 1 + */ + int readCorner1(int numRows, int numColumns) { + int currentByte = 0; + if (readModule(numRows - 1, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 1, 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 1, 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(2, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(3, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + return currentByte; + } + + /** + *

Reads the 8 bits of the special corner condition 2.

+ * + *

See ISO 16022:2006, Figure F.4

+ * + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return byte from the Corner condition 2 + */ + int readCorner2(int numRows, int numColumns) { + int currentByte = 0; + if (readModule(numRows - 3, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 2, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 1, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 4, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 3, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + return currentByte; + } + + /** + *

Reads the 8 bits of the special corner condition 3.

+ * + *

See ISO 16022:2006, Figure F.5

+ * + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return byte from the Corner condition 3 + */ + int readCorner3(int numRows, int numColumns) { + int currentByte = 0; + if (readModule(numRows - 1, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 1, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 3, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 3, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + return currentByte; + } + + /** + *

Reads the 8 bits of the special corner condition 4.

+ * + *

See ISO 16022:2006, Figure F.6

+ * + * @param numRows Number of rows in the mapping matrix + * @param numColumns Number of columns in the mapping matrix + * @return byte from the Corner condition 4 + */ + int readCorner4(int numRows, int numColumns) { + int currentByte = 0; + if (readModule(numRows - 3, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 2, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(numRows - 1, 0, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 2, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(0, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(1, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(2, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + currentByte <<= 1; + if (readModule(3, numColumns - 1, numRows, numColumns)) { + currentByte |= 1; + } + return currentByte; + } + + /** + *

Extracts the data region from a {@link BitMatrix} that contains + * alignment patterns.

+ * + * @param bitMatrix Original {@link BitMatrix} with alignment patterns + * @return BitMatrix that has the alignment patterns removed + */ + BitMatrix extractDataRegion(BitMatrix bitMatrix) { + int symbolSizeRows = version.getSymbolSizeRows(); + int symbolSizeColumns = version.getSymbolSizeColumns(); + + // TODO(bbrown): Make this work with rectangular codes + if (bitMatrix.getHeight() != symbolSizeRows) { + throw new IllegalArgumentException("Dimension of bitMarix must match the version size"); + } + + int dataRegionSizeRows = version.getDataRegionSizeRows(); + int dataRegionSizeColumns = version.getDataRegionSizeColumns(); + + int numDataRegionsRow = symbolSizeRows / dataRegionSizeRows; + int numDataRegionsColumn = symbolSizeColumns / dataRegionSizeColumns; + + int sizeDataRegionRow = numDataRegionsRow * dataRegionSizeRows; + //int sizeDataRegionColumn = numDataRegionsColumn * dataRegionSizeColumns; + + // TODO(bbrown): Make this work with rectangular codes + BitMatrix bitMatrixWithoutAlignment = new BitMatrix(sizeDataRegionRow); + for (int dataRegionRow = 0; dataRegionRow < numDataRegionsRow; ++dataRegionRow) { + int dataRegionRowOffset = dataRegionRow * dataRegionSizeRows; + for (int dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) { + int dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns; + for (int i = 0; i < dataRegionSizeRows; ++i) { + int readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i; + int writeRowOffset = dataRegionRowOffset + i; + for (int j = 0; j < dataRegionSizeColumns; ++j) { + int readColumnOffset = dataRegionColumn * (dataRegionSizeColumns + 2) + 1 + j; + if (bitMatrix.get(readColumnOffset, readRowOffset)) { + int writeColumnOffset = dataRegionColumnOffset + j; + bitMatrixWithoutAlignment.set(writeColumnOffset, writeRowOffset); + } + } + } + } + } + return bitMatrixWithoutAlignment; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/DataBlock.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.datamatrix.decoder; + +/** + *

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + * multiple blocks, each of which is a unit of data and error-correction codewords. Each + * is represented by an instance of this class.

+ * + * @author bbrown@google.com (Brian Brown) + */ +final class DataBlock { + + private final int numDataCodewords; + private final byte[] codewords; + + private DataBlock(int numDataCodewords, byte[] codewords) { + this.numDataCodewords = numDataCodewords; + this.codewords = codewords; + } + + /** + *

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + * method will separate the data into original blocks.

+ * + * @param rawCodewords bytes as read directly from the Data Matrix Code + * @param version version of the Data Matrix Code + * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + * Data Matrix Code + */ + static DataBlock[] getDataBlocks(byte[] rawCodewords, + Version version) { + // Figure out the number and size of data blocks used by this version + Version.ECBlocks ecBlocks = version.getECBlocks(); + + // First count the total number of data blocks + int totalBlocks = 0; + Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); + for (int i = 0; i < ecBlockArray.length; i++) { + totalBlocks += ecBlockArray[i].getCount(); + } + + // Now establish DataBlocks of the appropriate size and number of data codewords + DataBlock[] result = new DataBlock[totalBlocks]; + int numResultBlocks = 0; + for (int j = 0; j < ecBlockArray.length; j++) { + Version.ECB ecBlock = ecBlockArray[j]; + for (int i = 0; i < ecBlock.getCount(); i++) { + int numDataCodewords = ecBlock.getDataCodewords(); + int numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords; + result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); + } + } + + // All blocks have the same amount of data, except that the last n + // (where n may be 0) have 1 less byte. Figure out where these start. + // TODO(bbrown): There is only one case where there is a difference for Data Matrix for size 144 + int longerBlocksTotalCodewords = result[0].codewords.length; + //int shorterBlocksTotalCodewords = longerBlocksTotalCodewords - 1; + + int longerBlocksNumDataCodewords = longerBlocksTotalCodewords - ecBlocks.getECCodewords(); + int shorterBlocksNumDataCodewords = longerBlocksNumDataCodewords - 1; + // The last elements of result may be 1 element shorter for 144 matrix + // first fill out as many elements as all of them have minus 1 + int rawCodewordsOffset = 0; + for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { + for (int j = 0; j < numResultBlocks; j++) { + result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; + } + } + + // Fill out the last data block in the longer ones + boolean specialVersion = version.getVersionNumber() == 24; + int numLongerBlocks = specialVersion ? 8 : numResultBlocks; + for (int j = 0; j < numLongerBlocks; j++) { + result[j].codewords[longerBlocksNumDataCodewords - 1] = rawCodewords[rawCodewordsOffset++]; + } + + // Now add in error correction blocks + int max = result[0].codewords.length; + for (int i = longerBlocksNumDataCodewords; i < max; i++) { + for (int j = 0; j < numResultBlocks; j++) { + int iOffset = (specialVersion && j > 7) ? i - 1 : i; + result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; + } + } + + if (rawCodewordsOffset != rawCodewords.length) { + throw new IllegalArgumentException(); + } + + return result; + } + + int getNumDataCodewords() { + return numDataCodewords; + } + + byte[] getCodewords() { + return codewords; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/datamatrix/decoder/Version.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,242 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.datamatrix.decoder; + +import ext.plantuml.com.google.zxing.FormatException; + +/** + * The Version object encapsulates attributes about a particular + * size Data Matrix Code. + * + * @author bbrown@google.com (Brian Brown) + */ +public final class Version { + + private static final Version[] VERSIONS = buildVersions(); + + private final int versionNumber; + private final int symbolSizeRows; + private final int symbolSizeColumns; + private final int dataRegionSizeRows; + private final int dataRegionSizeColumns; + private final ECBlocks ecBlocks; + private final int totalCodewords; + + private Version(int versionNumber, + int symbolSizeRows, + int symbolSizeColumns, + int dataRegionSizeRows, + int dataRegionSizeColumns, + ECBlocks ecBlocks) { + this.versionNumber = versionNumber; + this.symbolSizeRows = symbolSizeRows; + this.symbolSizeColumns = symbolSizeColumns; + this.dataRegionSizeRows = dataRegionSizeRows; + this.dataRegionSizeColumns = dataRegionSizeColumns; + this.ecBlocks = ecBlocks; + + // Calculate the total number of codewords + int total = 0; + int ecCodewords = ecBlocks.getECCodewords(); + ECB[] ecbArray = ecBlocks.getECBlocks(); + for (int i = 0; i < ecbArray.length; i++) { + ECB ecBlock = ecbArray[i]; + total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); + } + this.totalCodewords = total; + } + + public int getVersionNumber() { + return versionNumber; + } + + public int getSymbolSizeRows() { + return symbolSizeRows; + } + + public int getSymbolSizeColumns() { + return symbolSizeColumns; + } + + public int getDataRegionSizeRows() { + return dataRegionSizeRows; + } + + public int getDataRegionSizeColumns() { + return dataRegionSizeColumns; + } + + public int getTotalCodewords() { + return totalCodewords; + } + + ECBlocks getECBlocks() { + return ecBlocks; + } + + /** + *

Deduces version information from Data Matrix dimensions.

+ * + * @param numRows Number of rows in modules + * @param numColumns Number of columns in modules + * @return {@link Version} for a Data Matrix Code of those dimensions + * @throws FormatException if dimensions do correspond to a valid Data Matrix size + */ + public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { + if ((numRows & 0x01) != 0 || (numColumns & 0x01) != 0) { + throw FormatException.getFormatInstance(); + } + + // TODO(bbrown): This is doing a linear search through the array of versions. + // If we interleave the rectangular versions with the square versions we could + // do a binary search. + int numVersions = VERSIONS.length; + for (int i = 0; i < numVersions; ++i){ + Version version = VERSIONS[i]; + if (version.symbolSizeRows == numRows && version.symbolSizeColumns == numColumns) { + return version; + } + } + + throw FormatException.getFormatInstance(); + } + + /** + *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + * use blocks of differing sizes within one version, so, this encapsulates the parameters for + * each set of blocks. It also holds the number of error-correction codewords per block since it + * will be the same across all blocks within one version.

+ */ + static final class ECBlocks { + private final int ecCodewords; + private final ECB[] ecBlocks; + + private ECBlocks(int ecCodewords, ECB ecBlocks) { + this.ecCodewords = ecCodewords; + this.ecBlocks = new ECB[] { ecBlocks }; + } + + private ECBlocks(int ecCodewords, ECB ecBlocks1, ECB ecBlocks2) { + this.ecCodewords = ecCodewords; + this.ecBlocks = new ECB[] { ecBlocks1, ecBlocks2 }; + } + + int getECCodewords() { + return ecCodewords; + } + + ECB[] getECBlocks() { + return ecBlocks; + } + } + + /** + *

Encapsualtes the parameters for one error-correction block in one symbol version. + * This includes the number of data codewords, and the number of times a block with these + * parameters is used consecutively in the Data Matrix code version's format.

+ */ + static final class ECB { + private final int count; + private final int dataCodewords; + + private ECB(int count, int dataCodewords) { + this.count = count; + this.dataCodewords = dataCodewords; + } + + int getCount() { + return count; + } + + int getDataCodewords() { + return dataCodewords; + } + } + + public String toString() { + return String.valueOf(versionNumber); + } + + /** + * See ISO 16022:2006 5.5.1 Table 7 + */ + private static Version[] buildVersions() { + return new Version[]{ + new Version(1, 10, 10, 8, 8, + new ECBlocks(5, new ECB(1, 3))), + new Version(2, 12, 12, 10, 10, + new ECBlocks(7, new ECB(1, 5))), + new Version(3, 14, 14, 12, 12, + new ECBlocks(10, new ECB(1, 8))), + new Version(4, 16, 16, 14, 14, + new ECBlocks(12, new ECB(1, 12))), + new Version(5, 18, 18, 16, 16, + new ECBlocks(14, new ECB(1, 18))), + new Version(6, 20, 20, 18, 18, + new ECBlocks(18, new ECB(1, 22))), + new Version(7, 22, 22, 20, 20, + new ECBlocks(20, new ECB(1, 30))), + new Version(8, 24, 24, 22, 22, + new ECBlocks(24, new ECB(1, 36))), + new Version(9, 26, 26, 24, 24, + new ECBlocks(28, new ECB(1, 44))), + new Version(10, 32, 32, 14, 14, + new ECBlocks(36, new ECB(1, 62))), + new Version(11, 36, 36, 16, 16, + new ECBlocks(42, new ECB(1, 86))), + new Version(12, 40, 40, 18, 18, + new ECBlocks(48, new ECB(1, 114))), + new Version(13, 44, 44, 20, 20, + new ECBlocks(56, new ECB(1, 144))), + new Version(14, 48, 48, 22, 22, + new ECBlocks(68, new ECB(1, 174))), + new Version(15, 52, 52, 24, 24, + new ECBlocks(42, new ECB(2, 102))), + new Version(16, 64, 64, 14, 14, + new ECBlocks(56, new ECB(2, 140))), + new Version(17, 72, 72, 16, 16, + new ECBlocks(36, new ECB(4, 92))), + new Version(18, 80, 80, 18, 18, + new ECBlocks(48, new ECB(4, 114))), + new Version(19, 88, 88, 20, 20, + new ECBlocks(56, new ECB(4, 144))), + new Version(20, 96, 96, 22, 22, + new ECBlocks(68, new ECB(4, 174))), + new Version(21, 104, 104, 24, 24, + new ECBlocks(56, new ECB(6, 136))), + new Version(22, 120, 120, 18, 18, + new ECBlocks(68, new ECB(6, 175))), + new Version(23, 132, 132, 20, 20, + new ECBlocks(62, new ECB(8, 163))), + new Version(24, 144, 144, 22, 22, + new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))), + new Version(25, 8, 18, 6, 16, + new ECBlocks(7, new ECB(1, 5))), + new Version(26, 8, 32, 6, 14, + new ECBlocks(11, new ECB(1, 10))), + new Version(27, 12, 26, 10, 24, + new ECBlocks(14, new ECB(1, 16))), + new Version(28, 12, 36, 10, 16, + new ECBlocks(18, new ECB(1, 22))), + new Version(29, 16, 36, 10, 16, + new ECBlocks(24, new ECB(1, 32))), + new Version(30, 16, 48, 14, 22, + new ECBlocks(28, new ECB(1, 49))) + }; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/DecodeHintType.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/DecodeHintType.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/DecodeHintType.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/DecodeHintType.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +import java.io.Reader; + +/** + * Encapsulates a type of hint that a caller may pass to a barcode reader to help it + * more quickly or accurately decode it. It is up to implementations to decide what, + * if anything, to do with the information that is supplied. + * + * @author Sean Owen + * @author dswitkin@google.com (Daniel Switkin) + * @see Reader#decode(BinaryBitmap,java.util.Hashtable) + */ +public final class DecodeHintType { + + // No, we can't use an enum here. J2ME doesn't support it. + + /** + * Unspecified, application-specific hint. Maps to an unspecified {@link Object}. + */ + public static final DecodeHintType OTHER = new DecodeHintType(); + + /** + * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + * use {@link Boolean#TRUE}. + */ + public static final DecodeHintType PURE_BARCODE = new DecodeHintType(); + + /** + * Image is known to be of one of a few possible formats. + * Maps to a {@link java.util.Vector} of {@link BarcodeFormat}s. + */ + public static final DecodeHintType POSSIBLE_FORMATS = new DecodeHintType(); + + /** + * Spend more time to try to find a barcode; optimize for accuracy, not speed. + * Doesn't matter what it maps to; use {@link Boolean#TRUE}. + */ + public static final DecodeHintType TRY_HARDER = new DecodeHintType(); + + /** + * Specifies what character encoding to use when decoding, where applicable (type String) + */ + public static final DecodeHintType CHARACTER_SET = new DecodeHintType(); + + /** + * Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + */ + public static final DecodeHintType ALLOWED_LENGTHS = new DecodeHintType(); + + /** + * Assume Code 39 codes employ a check digit. Maps to {@link Boolean}. + */ + public static final DecodeHintType ASSUME_CODE_39_CHECK_DIGIT = new DecodeHintType(); + + /** + * The caller needs to be notified via callback when a possible {@link ResultPoint} + * is found. Maps to a {@link ResultPointCallback}. + */ + public static final DecodeHintType NEED_RESULT_POINT_CALLBACK = new DecodeHintType(); + + private DecodeHintType() { + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/EncodeHintType.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/EncodeHintType.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/EncodeHintType.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/EncodeHintType.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * These are a set of hints that you may pass to Writers to specify their behavior. + * + * @author dswitkin@google.com (Daniel Switkin) + */ +public final class EncodeHintType { + + /** + * Specifies what degree of error correction to use, for example in QR Codes (type Integer). + */ + public static final EncodeHintType ERROR_CORRECTION = new EncodeHintType(); + + /** + * Specifies what character encoding to use where applicable (type String) + */ + public static final EncodeHintType CHARACTER_SET = new EncodeHintType(); + + private EncodeHintType() { + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/FormatException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/FormatException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/FormatException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/FormatException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * Thrown when a barcode was successfully detected, but some aspect of + * the content did not conform to the barcode's format rules. This could have + * been due to a mis-detection. + * + * @author Sean Owen + */ +public final class FormatException extends ReaderException { + + private static final FormatException instance = new FormatException(); + + private FormatException() { + // do nothing + } + + public static FormatException getFormatInstance() { + return instance; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/NotFoundException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/NotFoundException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/NotFoundException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/NotFoundException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * Thrown when a barcode was not found in the image. It might have been + * partially detected but could not be confirmed. + * + * @author Sean Owen + */ +public final class NotFoundException extends ReaderException { + + private static final NotFoundException instance = new NotFoundException(); + + private NotFoundException() { + // do nothing + } + + public static NotFoundException getNotFoundInstance() { + return instance; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/BitMatrixParser.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,203 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +import ext.plantuml.com.google.zxing.FormatException; +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + * @author Sean Owen + */ +final class BitMatrixParser { + + private final BitMatrix bitMatrix; + private Version parsedVersion; + private FormatInformation parsedFormatInfo; + + /** + * @param bitMatrix {@link BitMatrix} to parse + * @throws FormatException if dimension is not >= 21 and 1 mod 4 + */ + BitMatrixParser(BitMatrix bitMatrix) throws FormatException { + int dimension = bitMatrix.getHeight(); + if (dimension < 21 || (dimension & 0x03) != 1) { + throw FormatException.getFormatInstance(); + } + this.bitMatrix = bitMatrix; + } + + /** + *

Reads format information from one of its two locations within the QR Code.

+ * + * @return {@link FormatInformation} encapsulating the QR Code's format info + * @throws FormatException if both format information locations cannot be parsed as + * the valid encoding of format information + */ + FormatInformation readFormatInformation() throws FormatException { + + if (parsedFormatInfo != null) { + return parsedFormatInfo; + } + + // Read top-left format info bits + int formatInfoBits1 = 0; + for (int i = 0; i < 6; i++) { + formatInfoBits1 = copyBit(i, 8, formatInfoBits1); + } + // .. and skip a bit in the timing pattern ... + formatInfoBits1 = copyBit(7, 8, formatInfoBits1); + formatInfoBits1 = copyBit(8, 8, formatInfoBits1); + formatInfoBits1 = copyBit(8, 7, formatInfoBits1); + // .. and skip a bit in the timing pattern ... + for (int j = 5; j >= 0; j--) { + formatInfoBits1 = copyBit(8, j, formatInfoBits1); + } + + // Read the top-right/bottom-left pattern too + int dimension = bitMatrix.getHeight(); + int formatInfoBits2 = 0; + int iMin = dimension - 8; + for (int i = dimension - 1; i >= iMin; i--) { + formatInfoBits2 = copyBit(i, 8, formatInfoBits2); + } + for (int j = dimension - 7; j < dimension; j++) { + formatInfoBits2 = copyBit(8, j, formatInfoBits2); + } + + parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2); + if (parsedFormatInfo != null) { + return parsedFormatInfo; + } + throw FormatException.getFormatInstance(); + } + + /** + *

Reads version information from one of its two locations within the QR Code.

+ * + * @return {@link Version} encapsulating the QR Code's version + * @throws FormatException if both version information locations cannot be parsed as + * the valid encoding of version information + */ + Version readVersion() throws FormatException { + + if (parsedVersion != null) { + return parsedVersion; + } + + int dimension = bitMatrix.getHeight(); + + int provisionalVersion = (dimension - 17) >> 2; + if (provisionalVersion <= 6) { + return Version.getVersionForNumber(provisionalVersion); + } + + // Read top-right version info: 3 wide by 6 tall + int versionBits = 0; + int ijMin = dimension - 11; + for (int j = 5; j >= 0; j--) { + for (int i = dimension - 9; i >= ijMin; i--) { + versionBits = copyBit(i, j, versionBits); + } + } + + parsedVersion = Version.decodeVersionInformation(versionBits); + if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { + return parsedVersion; + } + + // Hmm, failed. Try bottom left: 6 wide by 3 tall + versionBits = 0; + for (int i = 5; i >= 0; i--) { + for (int j = dimension - 9; j >= ijMin; j--) { + versionBits = copyBit(i, j, versionBits); + } + } + + parsedVersion = Version.decodeVersionInformation(versionBits); + if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) { + return parsedVersion; + } + throw FormatException.getFormatInstance(); + } + + private int copyBit(int i, int j, int versionBits) { + return bitMatrix.get(i, j) ? (versionBits << 1) | 0x1 : versionBits << 1; + } + + /** + *

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + * correct order in order to reconstitute the codewords bytes contained within the + * QR Code.

+ * + * @return bytes encoded within the QR Code + * @throws FormatException if the exact number of bytes expected is not read + */ + byte[] readCodewords() throws FormatException { + + FormatInformation formatInfo = readFormatInformation(); + Version version = readVersion(); + + // Get the data mask for the format used in this QR Code. This will exclude + // some bits from reading as we wind through the bit matrix. + DataMask dataMask = DataMask.forReference((int) formatInfo.getDataMask()); + int dimension = bitMatrix.getHeight(); + dataMask.unmaskBitMatrix(bitMatrix, dimension); + + BitMatrix functionPattern = version.buildFunctionPattern(); + + boolean readingUp = true; + byte[] result = new byte[version.getTotalCodewords()]; + int resultOffset = 0; + int currentByte = 0; + int bitsRead = 0; + // Read columns in pairs, from right to left + for (int j = dimension - 1; j > 0; j -= 2) { + if (j == 6) { + // Skip whole column with vertical alignment pattern; + // saves time and makes the other code proceed more cleanly + j--; + } + // Read alternatingly from bottom to top then top to bottom + for (int count = 0; count < dimension; count++) { + int i = readingUp ? dimension - 1 - count : count; + for (int col = 0; col < 2; col++) { + // Ignore bits covered by the function pattern + if (!functionPattern.get(j - col, i)) { + // Read a bit + bitsRead++; + currentByte <<= 1; + if (bitMatrix.get(j - col, i)) { + currentByte |= 1; + } + // If we've made a whole byte, save it off + if (bitsRead == 8) { + result[resultOffset++] = (byte) currentByte; + bitsRead = 0; + currentByte = 0; + } + } + } + } + readingUp ^= true; // readingUp = !readingUp; // switch directions + } + if (resultOffset != version.getTotalCodewords()) { + throw FormatException.getFormatInstance(); + } + return result; + } + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataBlock.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +/** + *

Encapsulates a block of data within a QR Code. QR Codes may split their data into + * multiple blocks, each of which is a unit of data and error-correction codewords. Each + * is represented by an instance of this class.

+ * + * @author Sean Owen + */ +final class DataBlock { + + private final int numDataCodewords; + private final byte[] codewords; + + private DataBlock(int numDataCodewords, byte[] codewords) { + this.numDataCodewords = numDataCodewords; + this.codewords = codewords; + } + + /** + *

When QR Codes use multiple data blocks, they are actually interleaved. + * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + * method will separate the data into original blocks.

+ * + * @param rawCodewords bytes as read directly from the QR Code + * @param version version of the QR Code + * @param ecLevel error-correction level of the QR Code + * @return {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + * QR Code + */ + static DataBlock[] getDataBlocks(byte[] rawCodewords, + Version version, + ErrorCorrectionLevel ecLevel) { + + if (rawCodewords.length != version.getTotalCodewords()) { + throw new IllegalArgumentException(); + } + + // Figure out the number and size of data blocks used by this version and + // error correction level + Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); + + // First count the total number of data blocks + int totalBlocks = 0; + Version.ECB[] ecBlockArray = ecBlocks.getECBlocks(); + for (int i = 0; i < ecBlockArray.length; i++) { + totalBlocks += ecBlockArray[i].getCount(); + } + + // Now establish DataBlocks of the appropriate size and number of data codewords + DataBlock[] result = new DataBlock[totalBlocks]; + int numResultBlocks = 0; + for (int j = 0; j < ecBlockArray.length; j++) { + Version.ECB ecBlock = ecBlockArray[j]; + for (int i = 0; i < ecBlock.getCount(); i++) { + int numDataCodewords = ecBlock.getDataCodewords(); + int numBlockCodewords = ecBlocks.getECCodewordsPerBlock() + numDataCodewords; + result[numResultBlocks++] = new DataBlock(numDataCodewords, new byte[numBlockCodewords]); + } + } + + // All blocks have the same amount of data, except that the last n + // (where n may be 0) have 1 more byte. Figure out where these start. + int shorterBlocksTotalCodewords = result[0].codewords.length; + int longerBlocksStartAt = result.length - 1; + while (longerBlocksStartAt >= 0) { + int numCodewords = result[longerBlocksStartAt].codewords.length; + if (numCodewords == shorterBlocksTotalCodewords) { + break; + } + longerBlocksStartAt--; + } + longerBlocksStartAt++; + + int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBlock(); + // The last elements of result may be 1 element longer; + // first fill out as many elements as all of them have + int rawCodewordsOffset = 0; + for (int i = 0; i < shorterBlocksNumDataCodewords; i++) { + for (int j = 0; j < numResultBlocks; j++) { + result[j].codewords[i] = rawCodewords[rawCodewordsOffset++]; + } + } + // Fill out the last data block in the longer ones + for (int j = longerBlocksStartAt; j < numResultBlocks; j++) { + result[j].codewords[shorterBlocksNumDataCodewords] = rawCodewords[rawCodewordsOffset++]; + } + // Now add in error correction blocks + int max = result[0].codewords.length; + for (int i = shorterBlocksNumDataCodewords; i < max; i++) { + for (int j = 0; j < numResultBlocks; j++) { + int iOffset = j < longerBlocksStartAt ? i : i + 1; + result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; + } + } + return result; + } + + int getNumDataCodewords() { + return numDataCodewords; + } + + byte[] getCodewords() { + return codewords; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/DataMask.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + *

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + * including areas used for finder patterns, timing patterns, etc. These areas should be unused + * after the point they are unmasked anyway.

+ * + *

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + * and j is row position. In fact, as the text says, i is row position and j is column position.

+ * + * @author Sean Owen + */ +abstract class DataMask { + + /** + * See ISO 18004:2006 6.8.1 + */ + private static final DataMask[] DATA_MASKS = { + new DataMask000(), + new DataMask001(), + new DataMask010(), + new DataMask011(), + new DataMask100(), + new DataMask101(), + new DataMask110(), + new DataMask111(), + }; + + private DataMask() { + } + + /** + *

Implementations of this method reverse the data masking process applied to a QR Code and + * make its bits ready to read.

+ * + * @param bits representation of QR Code bits + * @param dimension dimension of QR Code, represented by bits, being unmasked + */ + final void unmaskBitMatrix(BitMatrix bits, int dimension) { + for (int i = 0; i < dimension; i++) { + for (int j = 0; j < dimension; j++) { + if (isMasked(i, j)) { + bits.flip(j, i); + } + } + } + } + + abstract boolean isMasked(int i, int j); + + /** + * @param reference a value between 0 and 7 indicating one of the eight possible + * data mask patterns a QR Code may use + * @return {@link DataMask} encapsulating the data mask pattern + */ + static DataMask forReference(int reference) { + if (reference < 0 || reference > 7) { + throw new IllegalArgumentException(); + } + return DATA_MASKS[reference]; + } + + /** + * 000: mask bits for which (x + y) mod 2 == 0 + */ + private static class DataMask000 extends DataMask { + boolean isMasked(int i, int j) { + return ((i + j) & 0x01) == 0; + } + } + + /** + * 001: mask bits for which x mod 2 == 0 + */ + private static class DataMask001 extends DataMask { + boolean isMasked(int i, int j) { + return (i & 0x01) == 0; + } + } + + /** + * 010: mask bits for which y mod 3 == 0 + */ + private static class DataMask010 extends DataMask { + boolean isMasked(int i, int j) { + return j % 3 == 0; + } + } + + /** + * 011: mask bits for which (x + y) mod 3 == 0 + */ + private static class DataMask011 extends DataMask { + boolean isMasked(int i, int j) { + return (i + j) % 3 == 0; + } + } + + /** + * 100: mask bits for which (x/2 + y/3) mod 2 == 0 + */ + private static class DataMask100 extends DataMask { + boolean isMasked(int i, int j) { + return (((i >>> 1) + (j /3)) & 0x01) == 0; + } + } + + /** + * 101: mask bits for which xy mod 2 + xy mod 3 == 0 + */ + private static class DataMask101 extends DataMask { + boolean isMasked(int i, int j) { + int temp = i * j; + return (temp & 0x01) + (temp % 3) == 0; + } + } + + /** + * 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0 + */ + private static class DataMask110 extends DataMask { + boolean isMasked(int i, int j) { + int temp = i * j; + return (((temp & 0x01) + (temp % 3)) & 0x01) == 0; + } + } + + /** + * 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0 + */ + private static class DataMask111 extends DataMask { + boolean isMasked(int i, int j) { + return ((((i + j) & 0x01) + ((i * j) % 3)) & 0x01) == 0; + } + } +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +/** + *

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + * defined by the QR code standard.

+ * + * @author Sean Owen + */ +public final class ErrorCorrectionLevel { + + // No, we can't use an enum here. J2ME doesn't support it. + + /** + * L = ~7% correction + */ + public static final ErrorCorrectionLevel L = new ErrorCorrectionLevel(0, 0x01, "L"); + /** + * M = ~15% correction + */ + public static final ErrorCorrectionLevel M = new ErrorCorrectionLevel(1, 0x00, "M"); + /** + * Q = ~25% correction + */ + public static final ErrorCorrectionLevel Q = new ErrorCorrectionLevel(2, 0x03, "Q"); + /** + * H = ~30% correction + */ + public static final ErrorCorrectionLevel H = new ErrorCorrectionLevel(3, 0x02, "H"); + + private static final ErrorCorrectionLevel[] FOR_BITS = {M, L, H, Q}; + + private final int ordinal; + private final int bits; + private final String name; + + private ErrorCorrectionLevel(int ordinal, int bits, String name) { + this.ordinal = ordinal; + this.bits = bits; + this.name = name; + } + + public int ordinal() { + return ordinal; + } + + public int getBits() { + return bits; + } + + public String getName() { + return name; + } + + public String toString() { + return name; + } + + /** + * @param bits int containing the two bits encoding a QR Code's error correction level + * @return {@link ErrorCorrectionLevel} representing the encoded error correction level + */ + public static ErrorCorrectionLevel forBits(int bits) { + if (bits < 0 || bits >= FOR_BITS.length) { + throw new IllegalArgumentException(); + } + return FOR_BITS[bits]; + } + + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/FormatInformation.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,171 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +/** + *

Encapsulates a QR Code's format information, including the data mask used and + * error correction level.

+ * + * @author Sean Owen + * @see DataMask + * @see ErrorCorrectionLevel + */ +final class FormatInformation { + + private static final int FORMAT_INFO_MASK_QR = 0x5412; + + /** + * See ISO 18004:2006, Annex C, Table C.1 + */ + private static final int[][] FORMAT_INFO_DECODE_LOOKUP = { + {0x5412, 0x00}, + {0x5125, 0x01}, + {0x5E7C, 0x02}, + {0x5B4B, 0x03}, + {0x45F9, 0x04}, + {0x40CE, 0x05}, + {0x4F97, 0x06}, + {0x4AA0, 0x07}, + {0x77C4, 0x08}, + {0x72F3, 0x09}, + {0x7DAA, 0x0A}, + {0x789D, 0x0B}, + {0x662F, 0x0C}, + {0x6318, 0x0D}, + {0x6C41, 0x0E}, + {0x6976, 0x0F}, + {0x1689, 0x10}, + {0x13BE, 0x11}, + {0x1CE7, 0x12}, + {0x19D0, 0x13}, + {0x0762, 0x14}, + {0x0255, 0x15}, + {0x0D0C, 0x16}, + {0x083B, 0x17}, + {0x355F, 0x18}, + {0x3068, 0x19}, + {0x3F31, 0x1A}, + {0x3A06, 0x1B}, + {0x24B4, 0x1C}, + {0x2183, 0x1D}, + {0x2EDA, 0x1E}, + {0x2BED, 0x1F}, + }; + + /** + * Offset i holds the number of 1 bits in the binary representation of i + */ + private static final int[] BITS_SET_IN_HALF_BYTE = + {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; + + private final ErrorCorrectionLevel errorCorrectionLevel; + private final byte dataMask; + + private FormatInformation(int formatInfo) { + // Bits 3,4 + errorCorrectionLevel = ErrorCorrectionLevel.forBits((formatInfo >> 3) & 0x03); + // Bottom 3 bits + dataMask = (byte) (formatInfo & 0x07); + } + + static int numBitsDiffering(int a, int b) { + a ^= b; // a now has a 1 bit exactly where its bit differs with b's + // Count bits set quickly with a series of lookups: + return BITS_SET_IN_HALF_BYTE[a & 0x0F] + + BITS_SET_IN_HALF_BYTE[(a >>> 4 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 8 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 12 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 16 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 20 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 24 & 0x0F)] + + BITS_SET_IN_HALF_BYTE[(a >>> 28 & 0x0F)]; + } + + /** + * @param maskedFormatInfo1 format info indicator, with mask still applied + * @param maskedFormatInfo2 second copy of same info; both are checked at the same time + * to establish best match + * @return information about the format it specifies, or null + * if doesn't seem to match any known pattern + */ + static FormatInformation decodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { + FormatInformation formatInfo = doDecodeFormatInformation(maskedFormatInfo1, maskedFormatInfo2); + if (formatInfo != null) { + return formatInfo; + } + // Should return null, but, some QR codes apparently + // do not mask this info. Try again by actually masking the pattern + // first + return doDecodeFormatInformation(maskedFormatInfo1 ^ FORMAT_INFO_MASK_QR, + maskedFormatInfo2 ^ FORMAT_INFO_MASK_QR); + } + + private static FormatInformation doDecodeFormatInformation(int maskedFormatInfo1, int maskedFormatInfo2) { + // Find the int in FORMAT_INFO_DECODE_LOOKUP with fewest bits differing + int bestDifference = Integer.MAX_VALUE; + int bestFormatInfo = 0; + for (int i = 0; i < FORMAT_INFO_DECODE_LOOKUP.length; i++) { + int[] decodeInfo = FORMAT_INFO_DECODE_LOOKUP[i]; + int targetInfo = decodeInfo[0]; + if (targetInfo == maskedFormatInfo1 || targetInfo == maskedFormatInfo2) { + // Found an exact match + return new FormatInformation(decodeInfo[1]); + } + int bitsDifference = numBitsDiffering(maskedFormatInfo1, targetInfo); + if (bitsDifference < bestDifference) { + bestFormatInfo = decodeInfo[1]; + bestDifference = bitsDifference; + } + if (maskedFormatInfo1 != maskedFormatInfo2) { + // also try the other option + bitsDifference = numBitsDiffering(maskedFormatInfo2, targetInfo); + if (bitsDifference < bestDifference) { + bestFormatInfo = decodeInfo[1]; + bestDifference = bitsDifference; + } + } + } + // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits + // differing means we found a match + if (bestDifference <= 3) { + return new FormatInformation(bestFormatInfo); + } + return null; + } + + ErrorCorrectionLevel getErrorCorrectionLevel() { + return errorCorrectionLevel; + } + + byte getDataMask() { + return dataMask; + } + + public int hashCode() { + return (errorCorrectionLevel.ordinal() << 3) | (int) dataMask; + } + + public boolean equals(Object o) { + if (!(o instanceof FormatInformation)) { + return false; + } + FormatInformation other = (FormatInformation) o; + return this.errorCorrectionLevel == other.errorCorrectionLevel && + this.dataMask == other.dataMask; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/Mode.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,112 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +/** + *

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + * data can be encoded to bits in the QR code standard.

+ * + * @author Sean Owen + */ +public final class Mode { + + // No, we can't use an enum here. J2ME doesn't support it. + + public static final Mode TERMINATOR = new Mode(new int[]{0, 0, 0}, 0x00, "TERMINATOR"); // Not really a mode... + public static final Mode NUMERIC = new Mode(new int[]{10, 12, 14}, 0x01, "NUMERIC"); + public static final Mode ALPHANUMERIC = new Mode(new int[]{9, 11, 13}, 0x02, "ALPHANUMERIC"); + public static final Mode STRUCTURED_APPEND = new Mode(new int[]{0, 0, 0}, 0x03, "STRUCTURED_APPEND"); // Not supported + public static final Mode BYTE = new Mode(new int[]{8, 16, 16}, 0x04, "BYTE"); + public static final Mode ECI = new Mode(null, 0x07, "ECI"); // character counts don't apply + public static final Mode KANJI = new Mode(new int[]{8, 10, 12}, 0x08, "KANJI"); + public static final Mode FNC1_FIRST_POSITION = new Mode(null, 0x05, "FNC1_FIRST_POSITION"); + public static final Mode FNC1_SECOND_POSITION = new Mode(null, 0x09, "FNC1_SECOND_POSITION"); + + private final int[] characterCountBitsForVersions; + private final int bits; + private final String name; + + private Mode(int[] characterCountBitsForVersions, int bits, String name) { + this.characterCountBitsForVersions = characterCountBitsForVersions; + this.bits = bits; + this.name = name; + } + + /** + * @param bits four bits encoding a QR Code data mode + * @return {@link Mode} encoded by these bits + * @throws IllegalArgumentException if bits do not correspond to a known mode + */ + public static Mode forBits(int bits) { + switch (bits) { + case 0x0: + return TERMINATOR; + case 0x1: + return NUMERIC; + case 0x2: + return ALPHANUMERIC; + case 0x3: + return STRUCTURED_APPEND; + case 0x4: + return BYTE; + case 0x5: + return FNC1_FIRST_POSITION; + case 0x7: + return ECI; + case 0x8: + return KANJI; + case 0x9: + return FNC1_SECOND_POSITION; + default: + throw new IllegalArgumentException(); + } + } + + /** + * @param version version in question + * @return number of bits used, in this QR Code symbol {@link Version}, to encode the + * count of characters that will follow encoded in this {@link Mode} + */ + public int getCharacterCountBits(Version version) { + if (characterCountBitsForVersions == null) { + throw new IllegalArgumentException("Character count doesn't apply to this mode"); + } + int number = version.getVersionNumber(); + int offset; + if (number <= 9) { + offset = 0; + } else if (number <= 26) { + offset = 1; + } else { + offset = 2; + } + return characterCountBitsForVersions[offset]; + } + + public int getBits() { + return bits; + } + + public String getName() { + return name; + } + + public String toString() { + return name; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/decoder/Version.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,586 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.decoder; + +import ext.plantuml.com.google.zxing.FormatException; +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + * See ISO 18004:2006 Annex D + * + * @author Sean Owen + */ +public final class Version { + + /** + * See ISO 18004:2006 Annex D. + * Element i represents the raw version bits that specify version i + 7 + */ + private static final int[] VERSION_DECODE_INFO = { + 0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6, + 0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78, + 0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683, + 0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB, + 0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250, + 0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B, + 0x2542E, 0x26A64, 0x27541, 0x28C69 + }; + + private static final Version[] VERSIONS = buildVersions(); + + private final int versionNumber; + private final int[] alignmentPatternCenters; + private final ECBlocks[] ecBlocks; + private final int totalCodewords; + + private Version(int versionNumber, + int[] alignmentPatternCenters, + ECBlocks ecBlocks1, + ECBlocks ecBlocks2, + ECBlocks ecBlocks3, + ECBlocks ecBlocks4) { + this.versionNumber = versionNumber; + this.alignmentPatternCenters = alignmentPatternCenters; + this.ecBlocks = new ECBlocks[]{ecBlocks1, ecBlocks2, ecBlocks3, ecBlocks4}; + int total = 0; + int ecCodewords = ecBlocks1.getECCodewordsPerBlock(); + ECB[] ecbArray = ecBlocks1.getECBlocks(); + for (int i = 0; i < ecbArray.length; i++) { + ECB ecBlock = ecbArray[i]; + total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords); + } + this.totalCodewords = total; + } + + public int getVersionNumber() { + return versionNumber; + } + + public int[] getAlignmentPatternCenters() { + return alignmentPatternCenters; + } + + public int getTotalCodewords() { + return totalCodewords; + } + + public int getDimensionForVersion() { + return 17 + 4 * versionNumber; + } + + public ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel) { + return ecBlocks[ecLevel.ordinal()]; + } + + /** + *

Deduces version information purely from QR Code dimensions.

+ * + * @param dimension dimension in modules + * @return {@link Version} for a QR Code of that dimension + * @throws FormatException if dimension is not 1 mod 4 + */ + public static Version getProvisionalVersionForDimension(int dimension) throws FormatException { + if (dimension % 4 != 1) { + throw FormatException.getFormatInstance(); + } + try { + return getVersionForNumber((dimension - 17) >> 2); + } catch (IllegalArgumentException iae) { + throw FormatException.getFormatInstance(); + } + } + + public static Version getVersionForNumber(int versionNumber) { + if (versionNumber < 1 || versionNumber > 40) { + throw new IllegalArgumentException(); + } + return VERSIONS[versionNumber - 1]; + } + + static Version decodeVersionInformation(int versionBits) { + int bestDifference = Integer.MAX_VALUE; + int bestVersion = 0; + for (int i = 0; i < VERSION_DECODE_INFO.length; i++) { + int targetVersion = VERSION_DECODE_INFO[i]; + // Do the version info bits match exactly? done. + if (targetVersion == versionBits) { + return getVersionForNumber(i + 7); + } + // Otherwise see if this is the closest to a real version info bit string + // we have seen so far + int bitsDifference = FormatInformation.numBitsDiffering(versionBits, targetVersion); + if (bitsDifference < bestDifference) { + bestVersion = i + 7; + bestDifference = bitsDifference; + } + } + // We can tolerate up to 3 bits of error since no two version info codewords will + // differ in less than 8 bits. + if (bestDifference <= 3) { + return getVersionForNumber(bestVersion); + } + // If we didn't find a close enough match, fail + return null; + } + + /** + * See ISO 18004:2006 Annex E + */ + BitMatrix buildFunctionPattern() { + int dimension = getDimensionForVersion(); + BitMatrix bitMatrix = new BitMatrix(dimension); + + // Top left finder pattern + separator + format + bitMatrix.setRegion(0, 0, 9, 9); + // Top right finder pattern + separator + format + bitMatrix.setRegion(dimension - 8, 0, 8, 9); + // Bottom left finder pattern + separator + format + bitMatrix.setRegion(0, dimension - 8, 9, 8); + + // Alignment patterns + int max = alignmentPatternCenters.length; + for (int x = 0; x < max; x++) { + int i = alignmentPatternCenters[x] - 2; + for (int y = 0; y < max; y++) { + if ((x == 0 && (y == 0 || y == max - 1)) || (x == max - 1 && y == 0)) { + // No alignment patterns near the three finder paterns + continue; + } + bitMatrix.setRegion(alignmentPatternCenters[y] - 2, i, 5, 5); + } + } + + // Vertical timing pattern + bitMatrix.setRegion(6, 9, 1, dimension - 17); + // Horizontal timing pattern + bitMatrix.setRegion(9, 6, dimension - 17, 1); + + if (versionNumber > 6) { + // Version info, top right + bitMatrix.setRegion(dimension - 11, 0, 3, 6); + // Version info, bottom left + bitMatrix.setRegion(0, dimension - 11, 6, 3); + } + + return bitMatrix; + } + + /** + *

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + * use blocks of differing sizes within one version, so, this encapsulates the parameters for + * each set of blocks. It also holds the number of error-correction codewords per block since it + * will be the same across all blocks within one version.

+ */ + public static final class ECBlocks { + private final int ecCodewordsPerBlock; + private final ECB[] ecBlocks; + + ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks) { + this.ecCodewordsPerBlock = ecCodewordsPerBlock; + this.ecBlocks = new ECB[]{ecBlocks}; + } + + ECBlocks(int ecCodewordsPerBlock, ECB ecBlocks1, ECB ecBlocks2) { + this.ecCodewordsPerBlock = ecCodewordsPerBlock; + this.ecBlocks = new ECB[]{ecBlocks1, ecBlocks2}; + } + + public int getECCodewordsPerBlock() { + return ecCodewordsPerBlock; + } + + public int getNumBlocks() { + int total = 0; + for (int i = 0; i < ecBlocks.length; i++) { + total += ecBlocks[i].getCount(); + } + return total; + } + + public int getTotalECCodewords() { + return ecCodewordsPerBlock * getNumBlocks(); + } + + public ECB[] getECBlocks() { + return ecBlocks; + } + } + + /** + *

Encapsualtes the parameters for one error-correction block in one symbol version. + * This includes the number of data codewords, and the number of times a block with these + * parameters is used consecutively in the QR code version's format.

+ */ + public static final class ECB { + private final int count; + private final int dataCodewords; + + ECB(int count, int dataCodewords) { + this.count = count; + this.dataCodewords = dataCodewords; + } + + public int getCount() { + return count; + } + + public int getDataCodewords() { + return dataCodewords; + } + } + + public String toString() { + return String.valueOf(versionNumber); + } + + /** + * See ISO 18004:2006 6.5.1 Table 9 + */ + private static Version[] buildVersions() { + return new Version[]{ + new Version(1, new int[]{}, + new ECBlocks(7, new ECB(1, 19)), + new ECBlocks(10, new ECB(1, 16)), + new ECBlocks(13, new ECB(1, 13)), + new ECBlocks(17, new ECB(1, 9))), + new Version(2, new int[]{6, 18}, + new ECBlocks(10, new ECB(1, 34)), + new ECBlocks(16, new ECB(1, 28)), + new ECBlocks(22, new ECB(1, 22)), + new ECBlocks(28, new ECB(1, 16))), + new Version(3, new int[]{6, 22}, + new ECBlocks(15, new ECB(1, 55)), + new ECBlocks(26, new ECB(1, 44)), + new ECBlocks(18, new ECB(2, 17)), + new ECBlocks(22, new ECB(2, 13))), + new Version(4, new int[]{6, 26}, + new ECBlocks(20, new ECB(1, 80)), + new ECBlocks(18, new ECB(2, 32)), + new ECBlocks(26, new ECB(2, 24)), + new ECBlocks(16, new ECB(4, 9))), + new Version(5, new int[]{6, 30}, + new ECBlocks(26, new ECB(1, 108)), + new ECBlocks(24, new ECB(2, 43)), + new ECBlocks(18, new ECB(2, 15), + new ECB(2, 16)), + new ECBlocks(22, new ECB(2, 11), + new ECB(2, 12))), + new Version(6, new int[]{6, 34}, + new ECBlocks(18, new ECB(2, 68)), + new ECBlocks(16, new ECB(4, 27)), + new ECBlocks(24, new ECB(4, 19)), + new ECBlocks(28, new ECB(4, 15))), + new Version(7, new int[]{6, 22, 38}, + new ECBlocks(20, new ECB(2, 78)), + new ECBlocks(18, new ECB(4, 31)), + new ECBlocks(18, new ECB(2, 14), + new ECB(4, 15)), + new ECBlocks(26, new ECB(4, 13), + new ECB(1, 14))), + new Version(8, new int[]{6, 24, 42}, + new ECBlocks(24, new ECB(2, 97)), + new ECBlocks(22, new ECB(2, 38), + new ECB(2, 39)), + new ECBlocks(22, new ECB(4, 18), + new ECB(2, 19)), + new ECBlocks(26, new ECB(4, 14), + new ECB(2, 15))), + new Version(9, new int[]{6, 26, 46}, + new ECBlocks(30, new ECB(2, 116)), + new ECBlocks(22, new ECB(3, 36), + new ECB(2, 37)), + new ECBlocks(20, new ECB(4, 16), + new ECB(4, 17)), + new ECBlocks(24, new ECB(4, 12), + new ECB(4, 13))), + new Version(10, new int[]{6, 28, 50}, + new ECBlocks(18, new ECB(2, 68), + new ECB(2, 69)), + new ECBlocks(26, new ECB(4, 43), + new ECB(1, 44)), + new ECBlocks(24, new ECB(6, 19), + new ECB(2, 20)), + new ECBlocks(28, new ECB(6, 15), + new ECB(2, 16))), + new Version(11, new int[]{6, 30, 54}, + new ECBlocks(20, new ECB(4, 81)), + new ECBlocks(30, new ECB(1, 50), + new ECB(4, 51)), + new ECBlocks(28, new ECB(4, 22), + new ECB(4, 23)), + new ECBlocks(24, new ECB(3, 12), + new ECB(8, 13))), + new Version(12, new int[]{6, 32, 58}, + new ECBlocks(24, new ECB(2, 92), + new ECB(2, 93)), + new ECBlocks(22, new ECB(6, 36), + new ECB(2, 37)), + new ECBlocks(26, new ECB(4, 20), + new ECB(6, 21)), + new ECBlocks(28, new ECB(7, 14), + new ECB(4, 15))), + new Version(13, new int[]{6, 34, 62}, + new ECBlocks(26, new ECB(4, 107)), + new ECBlocks(22, new ECB(8, 37), + new ECB(1, 38)), + new ECBlocks(24, new ECB(8, 20), + new ECB(4, 21)), + new ECBlocks(22, new ECB(12, 11), + new ECB(4, 12))), + new Version(14, new int[]{6, 26, 46, 66}, + new ECBlocks(30, new ECB(3, 115), + new ECB(1, 116)), + new ECBlocks(24, new ECB(4, 40), + new ECB(5, 41)), + new ECBlocks(20, new ECB(11, 16), + new ECB(5, 17)), + new ECBlocks(24, new ECB(11, 12), + new ECB(5, 13))), + new Version(15, new int[]{6, 26, 48, 70}, + new ECBlocks(22, new ECB(5, 87), + new ECB(1, 88)), + new ECBlocks(24, new ECB(5, 41), + new ECB(5, 42)), + new ECBlocks(30, new ECB(5, 24), + new ECB(7, 25)), + new ECBlocks(24, new ECB(11, 12), + new ECB(7, 13))), + new Version(16, new int[]{6, 26, 50, 74}, + new ECBlocks(24, new ECB(5, 98), + new ECB(1, 99)), + new ECBlocks(28, new ECB(7, 45), + new ECB(3, 46)), + new ECBlocks(24, new ECB(15, 19), + new ECB(2, 20)), + new ECBlocks(30, new ECB(3, 15), + new ECB(13, 16))), + new Version(17, new int[]{6, 30, 54, 78}, + new ECBlocks(28, new ECB(1, 107), + new ECB(5, 108)), + new ECBlocks(28, new ECB(10, 46), + new ECB(1, 47)), + new ECBlocks(28, new ECB(1, 22), + new ECB(15, 23)), + new ECBlocks(28, new ECB(2, 14), + new ECB(17, 15))), + new Version(18, new int[]{6, 30, 56, 82}, + new ECBlocks(30, new ECB(5, 120), + new ECB(1, 121)), + new ECBlocks(26, new ECB(9, 43), + new ECB(4, 44)), + new ECBlocks(28, new ECB(17, 22), + new ECB(1, 23)), + new ECBlocks(28, new ECB(2, 14), + new ECB(19, 15))), + new Version(19, new int[]{6, 30, 58, 86}, + new ECBlocks(28, new ECB(3, 113), + new ECB(4, 114)), + new ECBlocks(26, new ECB(3, 44), + new ECB(11, 45)), + new ECBlocks(26, new ECB(17, 21), + new ECB(4, 22)), + new ECBlocks(26, new ECB(9, 13), + new ECB(16, 14))), + new Version(20, new int[]{6, 34, 62, 90}, + new ECBlocks(28, new ECB(3, 107), + new ECB(5, 108)), + new ECBlocks(26, new ECB(3, 41), + new ECB(13, 42)), + new ECBlocks(30, new ECB(15, 24), + new ECB(5, 25)), + new ECBlocks(28, new ECB(15, 15), + new ECB(10, 16))), + new Version(21, new int[]{6, 28, 50, 72, 94}, + new ECBlocks(28, new ECB(4, 116), + new ECB(4, 117)), + new ECBlocks(26, new ECB(17, 42)), + new ECBlocks(28, new ECB(17, 22), + new ECB(6, 23)), + new ECBlocks(30, new ECB(19, 16), + new ECB(6, 17))), + new Version(22, new int[]{6, 26, 50, 74, 98}, + new ECBlocks(28, new ECB(2, 111), + new ECB(7, 112)), + new ECBlocks(28, new ECB(17, 46)), + new ECBlocks(30, new ECB(7, 24), + new ECB(16, 25)), + new ECBlocks(24, new ECB(34, 13))), + new Version(23, new int[]{6, 30, 54, 78, 102}, + new ECBlocks(30, new ECB(4, 121), + new ECB(5, 122)), + new ECBlocks(28, new ECB(4, 47), + new ECB(14, 48)), + new ECBlocks(30, new ECB(11, 24), + new ECB(14, 25)), + new ECBlocks(30, new ECB(16, 15), + new ECB(14, 16))), + new Version(24, new int[]{6, 28, 54, 80, 106}, + new ECBlocks(30, new ECB(6, 117), + new ECB(4, 118)), + new ECBlocks(28, new ECB(6, 45), + new ECB(14, 46)), + new ECBlocks(30, new ECB(11, 24), + new ECB(16, 25)), + new ECBlocks(30, new ECB(30, 16), + new ECB(2, 17))), + new Version(25, new int[]{6, 32, 58, 84, 110}, + new ECBlocks(26, new ECB(8, 106), + new ECB(4, 107)), + new ECBlocks(28, new ECB(8, 47), + new ECB(13, 48)), + new ECBlocks(30, new ECB(7, 24), + new ECB(22, 25)), + new ECBlocks(30, new ECB(22, 15), + new ECB(13, 16))), + new Version(26, new int[]{6, 30, 58, 86, 114}, + new ECBlocks(28, new ECB(10, 114), + new ECB(2, 115)), + new ECBlocks(28, new ECB(19, 46), + new ECB(4, 47)), + new ECBlocks(28, new ECB(28, 22), + new ECB(6, 23)), + new ECBlocks(30, new ECB(33, 16), + new ECB(4, 17))), + new Version(27, new int[]{6, 34, 62, 90, 118}, + new ECBlocks(30, new ECB(8, 122), + new ECB(4, 123)), + new ECBlocks(28, new ECB(22, 45), + new ECB(3, 46)), + new ECBlocks(30, new ECB(8, 23), + new ECB(26, 24)), + new ECBlocks(30, new ECB(12, 15), + new ECB(28, 16))), + new Version(28, new int[]{6, 26, 50, 74, 98, 122}, + new ECBlocks(30, new ECB(3, 117), + new ECB(10, 118)), + new ECBlocks(28, new ECB(3, 45), + new ECB(23, 46)), + new ECBlocks(30, new ECB(4, 24), + new ECB(31, 25)), + new ECBlocks(30, new ECB(11, 15), + new ECB(31, 16))), + new Version(29, new int[]{6, 30, 54, 78, 102, 126}, + new ECBlocks(30, new ECB(7, 116), + new ECB(7, 117)), + new ECBlocks(28, new ECB(21, 45), + new ECB(7, 46)), + new ECBlocks(30, new ECB(1, 23), + new ECB(37, 24)), + new ECBlocks(30, new ECB(19, 15), + new ECB(26, 16))), + new Version(30, new int[]{6, 26, 52, 78, 104, 130}, + new ECBlocks(30, new ECB(5, 115), + new ECB(10, 116)), + new ECBlocks(28, new ECB(19, 47), + new ECB(10, 48)), + new ECBlocks(30, new ECB(15, 24), + new ECB(25, 25)), + new ECBlocks(30, new ECB(23, 15), + new ECB(25, 16))), + new Version(31, new int[]{6, 30, 56, 82, 108, 134}, + new ECBlocks(30, new ECB(13, 115), + new ECB(3, 116)), + new ECBlocks(28, new ECB(2, 46), + new ECB(29, 47)), + new ECBlocks(30, new ECB(42, 24), + new ECB(1, 25)), + new ECBlocks(30, new ECB(23, 15), + new ECB(28, 16))), + new Version(32, new int[]{6, 34, 60, 86, 112, 138}, + new ECBlocks(30, new ECB(17, 115)), + new ECBlocks(28, new ECB(10, 46), + new ECB(23, 47)), + new ECBlocks(30, new ECB(10, 24), + new ECB(35, 25)), + new ECBlocks(30, new ECB(19, 15), + new ECB(35, 16))), + new Version(33, new int[]{6, 30, 58, 86, 114, 142}, + new ECBlocks(30, new ECB(17, 115), + new ECB(1, 116)), + new ECBlocks(28, new ECB(14, 46), + new ECB(21, 47)), + new ECBlocks(30, new ECB(29, 24), + new ECB(19, 25)), + new ECBlocks(30, new ECB(11, 15), + new ECB(46, 16))), + new Version(34, new int[]{6, 34, 62, 90, 118, 146}, + new ECBlocks(30, new ECB(13, 115), + new ECB(6, 116)), + new ECBlocks(28, new ECB(14, 46), + new ECB(23, 47)), + new ECBlocks(30, new ECB(44, 24), + new ECB(7, 25)), + new ECBlocks(30, new ECB(59, 16), + new ECB(1, 17))), + new Version(35, new int[]{6, 30, 54, 78, 102, 126, 150}, + new ECBlocks(30, new ECB(12, 121), + new ECB(7, 122)), + new ECBlocks(28, new ECB(12, 47), + new ECB(26, 48)), + new ECBlocks(30, new ECB(39, 24), + new ECB(14, 25)), + new ECBlocks(30, new ECB(22, 15), + new ECB(41, 16))), + new Version(36, new int[]{6, 24, 50, 76, 102, 128, 154}, + new ECBlocks(30, new ECB(6, 121), + new ECB(14, 122)), + new ECBlocks(28, new ECB(6, 47), + new ECB(34, 48)), + new ECBlocks(30, new ECB(46, 24), + new ECB(10, 25)), + new ECBlocks(30, new ECB(2, 15), + new ECB(64, 16))), + new Version(37, new int[]{6, 28, 54, 80, 106, 132, 158}, + new ECBlocks(30, new ECB(17, 122), + new ECB(4, 123)), + new ECBlocks(28, new ECB(29, 46), + new ECB(14, 47)), + new ECBlocks(30, new ECB(49, 24), + new ECB(10, 25)), + new ECBlocks(30, new ECB(24, 15), + new ECB(46, 16))), + new Version(38, new int[]{6, 32, 58, 84, 110, 136, 162}, + new ECBlocks(30, new ECB(4, 122), + new ECB(18, 123)), + new ECBlocks(28, new ECB(13, 46), + new ECB(32, 47)), + new ECBlocks(30, new ECB(48, 24), + new ECB(14, 25)), + new ECBlocks(30, new ECB(42, 15), + new ECB(32, 16))), + new Version(39, new int[]{6, 26, 54, 82, 110, 138, 166}, + new ECBlocks(30, new ECB(20, 117), + new ECB(4, 118)), + new ECBlocks(28, new ECB(40, 47), + new ECB(7, 48)), + new ECBlocks(30, new ECB(43, 24), + new ECB(22, 25)), + new ECBlocks(30, new ECB(10, 15), + new ECB(67, 16))), + new Version(40, new int[]{6, 30, 58, 86, 114, 142, 170}, + new ECBlocks(30, new ECB(19, 118), + new ECB(6, 119)), + new ECBlocks(28, new ECB(18, 47), + new ECB(31, 48)), + new ECBlocks(30, new ECB(34, 24), + new ECB(34, 25)), + new ECBlocks(30, new ECB(20, 15), + new ECB(61, 16))) + }; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/BlockPair.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +final class BlockPair { + + private final byte[] dataBytes; + private final byte[] errorCorrectionBytes; + + BlockPair(byte[] data, byte[] errorCorrection) { + dataBytes = data; + errorCorrectionBytes = errorCorrection; + } + + public byte[] getDataBytes() { + return dataBytes; + } + + public byte[] getErrorCorrectionBytes() { + return errorCorrectionBytes; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/ByteMatrix.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +/** + * A class which wraps a 2D array of bytes. The default usage is signed. If you want to use it as a + * unsigned container, it's up to you to do byteValue & 0xff at each location. + * + * JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + * -1, 0, and 1, I'm going to use less memory and go with bytes. + * + * @author dswitkin@google.com (Daniel Switkin) + */ +public final class ByteMatrix { + + private final byte[][] bytes; + private final int width; + private final int height; + + public ByteMatrix(int width, int height) { + bytes = new byte[height][width]; + this.width = width; + this.height = height; + } + + public int getHeight() { + return height; + } + + public int getWidth() { + return width; + } + + public byte get(int x, int y) { + return bytes[y][x]; + } + + public byte[][] getArray() { + return bytes; + } + + public void set(int x, int y, byte value) { + bytes[y][x] = value; + } + + public void set(int x, int y, int value) { + bytes[y][x] = (byte) value; + } + + public void set(int x, int y, boolean value) { + bytes[y][x] = (byte) (value ? 1 : 0); + } + + public void clear(byte value) { + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + bytes[y][x] = value; + } + } + } + + public String toString() { + StringBuffer result = new StringBuffer(2 * width * height + 2); + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + switch (bytes[y][x]) { + case 0: + result.append(" 0"); + break; + case 1: + result.append(" 1"); + break; + default: + result.append(" "); + break; + } + } + result.append('\n'); + } + return result.toString(); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/Encoder.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,557 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +import java.io.UnsupportedEncodingException; +import java.util.Hashtable; +import java.util.Vector; + +import ext.plantuml.com.google.zxing.EncodeHintType; +import ext.plantuml.com.google.zxing.WriterException; +import ext.plantuml.com.google.zxing.common.BitArray; +import ext.plantuml.com.google.zxing.common.CharacterSetECI; +import ext.plantuml.com.google.zxing.common.ECI; +import ext.plantuml.com.google.zxing.common.reedsolomon.GF256; +import ext.plantuml.com.google.zxing.common.reedsolomon.ReedSolomonEncoder; +import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import ext.plantuml.com.google.zxing.qrcode.decoder.Mode; +import ext.plantuml.com.google.zxing.qrcode.decoder.Version; + +/** + * @author satorux@google.com (Satoru Takabayashi) - creator + * @author dswitkin@google.com (Daniel Switkin) - ported from C++ + */ +public final class Encoder { + + // The original table is defined in the table 5 of JISX0510:2004 (p.19). + private static final int[] ALPHANUMERIC_TABLE = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x00-0x0f + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x10-0x1f + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // 0x20-0x2f + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // 0x30-0x3f + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 0x40-0x4f + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 0x50-0x5f + }; + + static final String DEFAULT_BYTE_MODE_ENCODING = "ISO-8859-1"; + + private Encoder() { + } + + // The mask penalty calculation is complicated. See Table 21 of JISX0510:2004 (p.45) for details. + // Basically it applies four rules and summate all penalties. + private static int calculateMaskPenalty(ByteMatrix matrix) { + int penalty = 0; + penalty += MaskUtil.applyMaskPenaltyRule1(matrix); + penalty += MaskUtil.applyMaskPenaltyRule2(matrix); + penalty += MaskUtil.applyMaskPenaltyRule3(matrix); + penalty += MaskUtil.applyMaskPenaltyRule4(matrix); + return penalty; + } + + /** + * Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + * internally by chooseMode(). On success, store the result in "qrCode". + * + * We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + * "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + * strong error correction for this purpose. + * + * Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + * with which clients can specify the encoding mode. For now, we don't need the functionality. + */ + public static void encode(String content, ErrorCorrectionLevel ecLevel, QRCode qrCode) + throws WriterException { + encode(content, ecLevel, null, qrCode); + } + + public static void encode(String content, ErrorCorrectionLevel ecLevel, Hashtable hints, + QRCode qrCode) throws WriterException { + + String encoding = hints == null ? null : (String) hints.get(EncodeHintType.CHARACTER_SET); + if (encoding == null) { + encoding = DEFAULT_BYTE_MODE_ENCODING; + } + + // Step 1: Choose the mode (encoding). + Mode mode = chooseMode(content, encoding); + + // Step 2: Append "bytes" into "dataBits" in appropriate encoding. + BitArray dataBits = new BitArray(); + appendBytes(content, mode, dataBits, encoding); + // Step 3: Initialize QR code that can contain "dataBits". + int numInputBytes = dataBits.getSizeInBytes(); + initQRCode(numInputBytes, ecLevel, mode, qrCode); + + // Step 4: Build another bit vector that contains header and data. + BitArray headerAndDataBits = new BitArray(); + + // Step 4.5: Append ECI message if applicable + if (mode == Mode.BYTE && !DEFAULT_BYTE_MODE_ENCODING.equals(encoding)) { + CharacterSetECI eci = CharacterSetECI.getCharacterSetECIByName(encoding); + if (eci != null) { + appendECI(eci, headerAndDataBits); + } + } + + appendModeInfo(mode, headerAndDataBits); + + int numLetters = mode.equals(Mode.BYTE) ? dataBits.getSizeInBytes() : content.length(); + appendLengthInfo(numLetters, qrCode.getVersion(), mode, headerAndDataBits); + headerAndDataBits.appendBitArray(dataBits); + + // Step 5: Terminate the bits properly. + terminateBits(qrCode.getNumDataBytes(), headerAndDataBits); + + // Step 6: Interleave data bits with error correction code. + BitArray finalBits = new BitArray(); + interleaveWithECBytes(headerAndDataBits, qrCode.getNumTotalBytes(), qrCode.getNumDataBytes(), + qrCode.getNumRSBlocks(), finalBits); + + // Step 7: Choose the mask pattern and set to "qrCode". + ByteMatrix matrix = new ByteMatrix(qrCode.getMatrixWidth(), qrCode.getMatrixWidth()); + qrCode.setMaskPattern(chooseMaskPattern(finalBits, qrCode.getECLevel(), qrCode.getVersion(), + matrix)); + + // Step 8. Build the matrix and set it to "qrCode". + MatrixUtil.buildMatrix(finalBits, qrCode.getECLevel(), qrCode.getVersion(), + qrCode.getMaskPattern(), matrix); + qrCode.setMatrix(matrix); + // Step 9. Make sure we have a valid QR Code. + if (!qrCode.isValid()) { + throw new WriterException("Invalid QR code: " + qrCode.toString()); + } + } + + /** + * @return the code point of the table used in alphanumeric mode or + * -1 if there is no corresponding code in the table. + */ + static int getAlphanumericCode(int code) { + if (code < ALPHANUMERIC_TABLE.length) { + return ALPHANUMERIC_TABLE[code]; + } + return -1; + } + + public static Mode chooseMode(String content) { + return chooseMode(content, null); + } + + /** + * Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + * if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + */ + public static Mode chooseMode(String content, String encoding) { + if ("Shift_JIS".equals(encoding)) { + // Choose Kanji mode if all input are double-byte characters + return isOnlyDoubleByteKanji(content) ? Mode.KANJI : Mode.BYTE; + } + boolean hasNumeric = false; + boolean hasAlphanumeric = false; + for (int i = 0; i < content.length(); ++i) { + char c = content.charAt(i); + if (c >= '0' && c <= '9') { + hasNumeric = true; + } else if (getAlphanumericCode(c) != -1) { + hasAlphanumeric = true; + } else { + return Mode.BYTE; + } + } + if (hasAlphanumeric) { + return Mode.ALPHANUMERIC; + } else if (hasNumeric) { + return Mode.NUMERIC; + } + return Mode.BYTE; + } + + private static boolean isOnlyDoubleByteKanji(String content) { + byte[] bytes; + try { + bytes = content.getBytes("Shift_JIS"); + } catch (UnsupportedEncodingException uee) { + return false; + } + int length = bytes.length; + if (length % 2 != 0) { + return false; + } + for (int i = 0; i < length; i += 2) { + int byte1 = bytes[i] & 0xFF; + if ((byte1 < 0x81 || byte1 > 0x9F) && (byte1 < 0xE0 || byte1 > 0xEB)) { + return false; + } + } + return true; + } + + private static int chooseMaskPattern(BitArray bits, ErrorCorrectionLevel ecLevel, int version, + ByteMatrix matrix) throws WriterException { + + int minPenalty = Integer.MAX_VALUE; // Lower penalty is better. + int bestMaskPattern = -1; + // We try all mask patterns to choose the best one. + for (int maskPattern = 0; maskPattern < QRCode.NUM_MASK_PATTERNS; maskPattern++) { + MatrixUtil.buildMatrix(bits, ecLevel, version, maskPattern, matrix); + int penalty = calculateMaskPenalty(matrix); + if (penalty < minPenalty) { + minPenalty = penalty; + bestMaskPattern = maskPattern; + } + } + return bestMaskPattern; + } + + /** + * Initialize "qrCode" according to "numInputBytes", "ecLevel", and "mode". On success, + * modify "qrCode". + */ + private static void initQRCode(int numInputBytes, ErrorCorrectionLevel ecLevel, Mode mode, + QRCode qrCode) throws WriterException { + qrCode.setECLevel(ecLevel); + qrCode.setMode(mode); + + // In the following comments, we use numbers of Version 7-H. + for (int versionNum = 1; versionNum <= 40; versionNum++) { + Version version = Version.getVersionForNumber(versionNum); + // numBytes = 196 + int numBytes = version.getTotalCodewords(); + // getNumECBytes = 130 + Version.ECBlocks ecBlocks = version.getECBlocksForLevel(ecLevel); + int numEcBytes = ecBlocks.getTotalECCodewords(); + // getNumRSBlocks = 5 + int numRSBlocks = ecBlocks.getNumBlocks(); + // getNumDataBytes = 196 - 130 = 66 + int numDataBytes = numBytes - numEcBytes; + // We want to choose the smallest version which can contain data of "numInputBytes" + some + // extra bits for the header (mode info and length info). The header can be three bytes + // (precisely 4 + 16 bits) at most. Hence we do +3 here. + if (numDataBytes >= numInputBytes + 3) { + // Yay, we found the proper rs block info! + qrCode.setVersion(versionNum); + qrCode.setNumTotalBytes(numBytes); + qrCode.setNumDataBytes(numDataBytes); + qrCode.setNumRSBlocks(numRSBlocks); + // getNumECBytes = 196 - 66 = 130 + qrCode.setNumECBytes(numEcBytes); + // matrix width = 21 + 6 * 4 = 45 + qrCode.setMatrixWidth(version.getDimensionForVersion()); + return; + } + } + throw new WriterException("Cannot find proper rs block info (input data too big?)"); + } + + /** + * Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + */ + static void terminateBits(int numDataBytes, BitArray bits) throws WriterException { + int capacity = numDataBytes << 3; + if (bits.getSize() > capacity) { + throw new WriterException("data bits cannot fit in the QR Code" + bits.getSize() + " > " + + capacity); + } + for (int i = 0; i < 4 && bits.getSize() < capacity; ++i) { + bits.appendBit(false); + } + // Append termination bits. See 8.4.8 of JISX0510:2004 (p.24) for details. + // If the last byte isn't 8-bit aligned, we'll add padding bits. + int numBitsInLastByte = bits.getSize() & 0x07; + if (numBitsInLastByte > 0) { + for (int i = numBitsInLastByte; i < 8; i++) { + bits.appendBit(false); + } + } + // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24). + int numPaddingBytes = numDataBytes - bits.getSizeInBytes(); + for (int i = 0; i < numPaddingBytes; ++i) { + bits.appendBits(((i & 0x01) == 0) ? 0xEC : 0x11, 8); + } + if (bits.getSize() != capacity) { + throw new WriterException("Bits size does not equal capacity"); + } + } + + /** + * Get number of data bytes and number of error correction bytes for block id "blockID". Store + * the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + * JISX0510:2004 (p.30) + */ + static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes, int numDataBytes, + int numRSBlocks, int blockID, int[] numDataBytesInBlock, + int[] numECBytesInBlock) throws WriterException { + if (blockID >= numRSBlocks) { + throw new WriterException("Block ID too large"); + } + // numRsBlocksInGroup2 = 196 % 5 = 1 + int numRsBlocksInGroup2 = numTotalBytes % numRSBlocks; + // numRsBlocksInGroup1 = 5 - 1 = 4 + int numRsBlocksInGroup1 = numRSBlocks - numRsBlocksInGroup2; + // numTotalBytesInGroup1 = 196 / 5 = 39 + int numTotalBytesInGroup1 = numTotalBytes / numRSBlocks; + // numTotalBytesInGroup2 = 39 + 1 = 40 + int numTotalBytesInGroup2 = numTotalBytesInGroup1 + 1; + // numDataBytesInGroup1 = 66 / 5 = 13 + int numDataBytesInGroup1 = numDataBytes / numRSBlocks; + // numDataBytesInGroup2 = 13 + 1 = 14 + int numDataBytesInGroup2 = numDataBytesInGroup1 + 1; + // numEcBytesInGroup1 = 39 - 13 = 26 + int numEcBytesInGroup1 = numTotalBytesInGroup1 - numDataBytesInGroup1; + // numEcBytesInGroup2 = 40 - 14 = 26 + int numEcBytesInGroup2 = numTotalBytesInGroup2 - numDataBytesInGroup2; + // Sanity checks. + // 26 = 26 + if (numEcBytesInGroup1 != numEcBytesInGroup2) { + throw new WriterException("EC bytes mismatch"); + } + // 5 = 4 + 1. + if (numRSBlocks != numRsBlocksInGroup1 + numRsBlocksInGroup2) { + throw new WriterException("RS blocks mismatch"); + } + // 196 = (13 + 26) * 4 + (14 + 26) * 1 + if (numTotalBytes != + ((numDataBytesInGroup1 + numEcBytesInGroup1) * + numRsBlocksInGroup1) + + ((numDataBytesInGroup2 + numEcBytesInGroup2) * + numRsBlocksInGroup2)) { + throw new WriterException("Total bytes mismatch"); + } + + if (blockID < numRsBlocksInGroup1) { + numDataBytesInBlock[0] = numDataBytesInGroup1; + numECBytesInBlock[0] = numEcBytesInGroup1; + } else { + numDataBytesInBlock[0] = numDataBytesInGroup2; + numECBytesInBlock[0] = numEcBytesInGroup2; + } + } + + /** + * Interleave "bits" with corresponding error correction bytes. On success, store the result in + * "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + */ + static void interleaveWithECBytes(BitArray bits, int numTotalBytes, + int numDataBytes, int numRSBlocks, BitArray result) throws WriterException { + + // "bits" must have "getNumDataBytes" bytes of data. + if (bits.getSizeInBytes() != numDataBytes) { + throw new WriterException("Number of bits and data bytes does not match"); + } + + // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll + // store the divided data bytes blocks and error correction bytes blocks into "blocks". + int dataBytesOffset = 0; + int maxNumDataBytes = 0; + int maxNumEcBytes = 0; + + // Since, we know the number of reedsolmon blocks, we can initialize the vector with the number. + Vector blocks = new Vector(numRSBlocks); + + for (int i = 0; i < numRSBlocks; ++i) { + int[] numDataBytesInBlock = new int[1]; + int[] numEcBytesInBlock = new int[1]; + getNumDataBytesAndNumECBytesForBlockID( + numTotalBytes, numDataBytes, numRSBlocks, i, + numDataBytesInBlock, numEcBytesInBlock); + + int size = numDataBytesInBlock[0]; + byte[] dataBytes = new byte[size]; + bits.toBytes(8*dataBytesOffset, dataBytes, 0, size); + byte[] ecBytes = generateECBytes(dataBytes, numEcBytesInBlock[0]); + blocks.addElement(new BlockPair(dataBytes, ecBytes)); + + maxNumDataBytes = Math.max(maxNumDataBytes, size); + maxNumEcBytes = Math.max(maxNumEcBytes, ecBytes.length); + dataBytesOffset += numDataBytesInBlock[0]; + } + if (numDataBytes != dataBytesOffset) { + throw new WriterException("Data bytes does not match offset"); + } + + // First, place data blocks. + for (int i = 0; i < maxNumDataBytes; ++i) { + for (int j = 0; j < blocks.size(); ++j) { + byte[] dataBytes = ((BlockPair) blocks.elementAt(j)).getDataBytes(); + if (i < dataBytes.length) { + result.appendBits(dataBytes[i], 8); + } + } + } + // Then, place error correction blocks. + for (int i = 0; i < maxNumEcBytes; ++i) { + for (int j = 0; j < blocks.size(); ++j) { + byte[] ecBytes = ((BlockPair) blocks.elementAt(j)).getErrorCorrectionBytes(); + if (i < ecBytes.length) { + result.appendBits(ecBytes[i], 8); + } + } + } + if (numTotalBytes != result.getSizeInBytes()) { // Should be same. + throw new WriterException("Interleaving error: " + numTotalBytes + " and " + + result.getSizeInBytes() + " differ."); + } + } + + static byte[] generateECBytes(byte[] dataBytes, int numEcBytesInBlock) { + int numDataBytes = dataBytes.length; + int[] toEncode = new int[numDataBytes + numEcBytesInBlock]; + for (int i = 0; i < numDataBytes; i++) { + toEncode[i] = dataBytes[i] & 0xFF; + } + new ReedSolomonEncoder(GF256.QR_CODE_FIELD).encode(toEncode, numEcBytesInBlock); + + byte[] ecBytes = new byte[numEcBytesInBlock]; + for (int i = 0; i < numEcBytesInBlock; i++) { + ecBytes[i] = (byte) toEncode[numDataBytes + i]; + } + return ecBytes; + } + + /** + * Append mode info. On success, store the result in "bits". + */ + static void appendModeInfo(Mode mode, BitArray bits) { + bits.appendBits(mode.getBits(), 4); + } + + + /** + * Append length info. On success, store the result in "bits". + */ + static void appendLengthInfo(int numLetters, int version, Mode mode, BitArray bits) + throws WriterException { + int numBits = mode.getCharacterCountBits(Version.getVersionForNumber(version)); + if (numLetters > ((1 << numBits) - 1)) { + throw new WriterException(numLetters + "is bigger than" + ((1 << numBits) - 1)); + } + bits.appendBits(numLetters, numBits); + } + + /** + * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + */ + static void appendBytes(String content, Mode mode, BitArray bits, String encoding) + throws WriterException { + if (mode.equals(Mode.NUMERIC)) { + appendNumericBytes(content, bits); + } else if (mode.equals(Mode.ALPHANUMERIC)) { + appendAlphanumericBytes(content, bits); + } else if (mode.equals(Mode.BYTE)) { + append8BitBytes(content, bits, encoding); + } else if (mode.equals(Mode.KANJI)) { + appendKanjiBytes(content, bits); + } else { + throw new WriterException("Invalid mode: " + mode); + } + } + + static void appendNumericBytes(String content, BitArray bits) { + int length = content.length(); + int i = 0; + while (i < length) { + int num1 = content.charAt(i) - '0'; + if (i + 2 < length) { + // Encode three numeric letters in ten bits. + int num2 = content.charAt(i + 1) - '0'; + int num3 = content.charAt(i + 2) - '0'; + bits.appendBits(num1 * 100 + num2 * 10 + num3, 10); + i += 3; + } else if (i + 1 < length) { + // Encode two numeric letters in seven bits. + int num2 = content.charAt(i + 1) - '0'; + bits.appendBits(num1 * 10 + num2, 7); + i += 2; + } else { + // Encode one numeric letter in four bits. + bits.appendBits(num1, 4); + i++; + } + } + } + + static void appendAlphanumericBytes(String content, BitArray bits) throws WriterException { + int length = content.length(); + int i = 0; + while (i < length) { + int code1 = getAlphanumericCode(content.charAt(i)); + if (code1 == -1) { + throw new WriterException(); + } + if (i + 1 < length) { + int code2 = getAlphanumericCode(content.charAt(i + 1)); + if (code2 == -1) { + throw new WriterException(); + } + // Encode two alphanumeric letters in 11 bits. + bits.appendBits(code1 * 45 + code2, 11); + i += 2; + } else { + // Encode one alphanumeric letter in six bits. + bits.appendBits(code1, 6); + i++; + } + } + } + + static void append8BitBytes(String content, BitArray bits, String encoding) + throws WriterException { + byte[] bytes; + try { + bytes = content.getBytes(encoding); + } catch (UnsupportedEncodingException uee) { + throw new WriterException(uee.toString()); + } + for (int i = 0; i < bytes.length; ++i) { + bits.appendBits(bytes[i], 8); + } + } + + static void appendKanjiBytes(String content, BitArray bits) throws WriterException { + byte[] bytes; + try { + bytes = content.getBytes("Shift_JIS"); + } catch (UnsupportedEncodingException uee) { + throw new WriterException(uee.toString()); + } + int length = bytes.length; + for (int i = 0; i < length; i += 2) { + int byte1 = bytes[i] & 0xFF; + int byte2 = bytes[i + 1] & 0xFF; + int code = (byte1 << 8) | byte2; + int subtracted = -1; + if (code >= 0x8140 && code <= 0x9ffc) { + subtracted = code - 0x8140; + } else if (code >= 0xe040 && code <= 0xebbf) { + subtracted = code - 0xc140; + } + if (subtracted == -1) { + throw new WriterException("Invalid byte sequence"); + } + int encoded = ((subtracted >> 8) * 0xc0) + (subtracted & 0xff); + bits.appendBits(encoded, 13); + } + } + + private static void appendECI(ECI eci, BitArray bits) { + bits.appendBits(Mode.ECI.getBits(), 4); + // This is correct for values up to 127, which is all we need now. + bits.appendBits(eci.getValue(), 8); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/MaskUtil.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,217 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +/** + * @author satorux@google.com (Satoru Takabayashi) - creator + * @author dswitkin@google.com (Daniel Switkin) - ported from C++ + */ +public final class MaskUtil { + + private MaskUtil() { + // do nothing + } + + // Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + // give penalty to them. Example: 00000 or 11111. + public static int applyMaskPenaltyRule1(ByteMatrix matrix) { + return applyMaskPenaltyRule1Internal(matrix, true) + applyMaskPenaltyRule1Internal(matrix, false); + } + + // Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + // penalty to them. + public static int applyMaskPenaltyRule2(ByteMatrix matrix) { + int penalty = 0; + byte[][] array = matrix.getArray(); + int width = matrix.getWidth(); + int height = matrix.getHeight(); + for (int y = 0; y < height - 1; ++y) { + for (int x = 0; x < width - 1; ++x) { + int value = array[y][x]; + if (value == array[y][x + 1] && value == array[y + 1][x] && value == array[y + 1][x + 1]) { + penalty += 3; + } + } + } + return penalty; + } + + // Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + // 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + // penalties twice (i.e. 40 * 2). + public static int applyMaskPenaltyRule3(ByteMatrix matrix) { + int penalty = 0; + byte[][] array = matrix.getArray(); + int width = matrix.getWidth(); + int height = matrix.getHeight(); + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + // Tried to simplify following conditions but failed. + if (x + 6 < width && + array[y][x] == 1 && + array[y][x + 1] == 0 && + array[y][x + 2] == 1 && + array[y][x + 3] == 1 && + array[y][x + 4] == 1 && + array[y][x + 5] == 0 && + array[y][x + 6] == 1 && + ((x + 10 < width && + array[y][x + 7] == 0 && + array[y][x + 8] == 0 && + array[y][x + 9] == 0 && + array[y][x + 10] == 0) || + (x - 4 >= 0 && + array[y][x - 1] == 0 && + array[y][x - 2] == 0 && + array[y][x - 3] == 0 && + array[y][x - 4] == 0))) { + penalty += 40; + } + if (y + 6 < height && + array[y][x] == 1 && + array[y + 1][x] == 0 && + array[y + 2][x] == 1 && + array[y + 3][x] == 1 && + array[y + 4][x] == 1 && + array[y + 5][x] == 0 && + array[y + 6][x] == 1 && + ((y + 10 < height && + array[y + 7][x] == 0 && + array[y + 8][x] == 0 && + array[y + 9][x] == 0 && + array[y + 10][x] == 0) || + (y - 4 >= 0 && + array[y - 1][x] == 0 && + array[y - 2][x] == 0 && + array[y - 3][x] == 0 && + array[y - 4][x] == 0))) { + penalty += 40; + } + } + } + return penalty; + } + + // Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + // penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. Examples: + // - 0% => 100 + // - 40% => 20 + // - 45% => 10 + // - 50% => 0 + // - 55% => 10 + // - 55% => 20 + // - 100% => 100 + public static int applyMaskPenaltyRule4(ByteMatrix matrix) { + int numDarkCells = 0; + byte[][] array = matrix.getArray(); + int width = matrix.getWidth(); + int height = matrix.getHeight(); + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + if (array[y][x] == 1) { + numDarkCells += 1; + } + } + } + int numTotalCells = matrix.getHeight() * matrix.getWidth(); + double darkRatio = (double) numDarkCells / numTotalCells; + return Math.abs((int) (darkRatio * 100 - 50)) / 5 * 10; + } + + // Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + // pattern conditions. + public static boolean getDataMaskBit(int maskPattern, int x, int y) { + if (!QRCode.isValidMaskPattern(maskPattern)) { + throw new IllegalArgumentException("Invalid mask pattern"); + } + int intermediate, temp; + switch (maskPattern) { + case 0: + intermediate = (y + x) & 0x1; + break; + case 1: + intermediate = y & 0x1; + break; + case 2: + intermediate = x % 3; + break; + case 3: + intermediate = (y + x) % 3; + break; + case 4: + intermediate = ((y >>> 1) + (x / 3)) & 0x1; + break; + case 5: + temp = y * x; + intermediate = (temp & 0x1) + (temp % 3); + break; + case 6: + temp = y * x; + intermediate = (((temp & 0x1) + (temp % 3)) & 0x1); + break; + case 7: + temp = y * x; + intermediate = (((temp % 3) + ((y + x) & 0x1)) & 0x1); + break; + default: + throw new IllegalArgumentException("Invalid mask pattern: " + maskPattern); + } + return intermediate == 0; + } + + // Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + // vertical and horizontal orders respectively. + private static int applyMaskPenaltyRule1Internal(ByteMatrix matrix, boolean isHorizontal) { + int penalty = 0; + int numSameBitCells = 0; + int prevBit = -1; + // Horizontal mode: + // for (int i = 0; i < matrix.height(); ++i) { + // for (int j = 0; j < matrix.width(); ++j) { + // int bit = matrix.get(i, j); + // Vertical mode: + // for (int i = 0; i < matrix.width(); ++i) { + // for (int j = 0; j < matrix.height(); ++j) { + // int bit = matrix.get(j, i); + int iLimit = isHorizontal ? matrix.getHeight() : matrix.getWidth(); + int jLimit = isHorizontal ? matrix.getWidth() : matrix.getHeight(); + byte[][] array = matrix.getArray(); + for (int i = 0; i < iLimit; ++i) { + for (int j = 0; j < jLimit; ++j) { + int bit = isHorizontal ? array[i][j] : array[j][i]; + if (bit == prevBit) { + numSameBitCells += 1; + // Found five repetitive cells with the same color (bit). + // We'll give penalty of 3. + if (numSameBitCells == 5) { + penalty += 3; + } else if (numSameBitCells > 5) { + // After five repetitive cells, we'll add the penalty one + // by one. + penalty += 1; + } + } else { + numSameBitCells = 1; // Include the cell itself. + prevBit = bit; + } + } + numSameBitCells = 0; // Clear at each row/column. + } + return penalty; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/MatrixUtil.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,524 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +import ext.plantuml.com.google.zxing.WriterException; +import ext.plantuml.com.google.zxing.common.BitArray; +import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; + +/** + * @author satorux@google.com (Satoru Takabayashi) - creator + * @author dswitkin@google.com (Daniel Switkin) - ported from C++ + */ +public final class MatrixUtil { + + private MatrixUtil() { + // do nothing + } + + private static final int[][] POSITION_DETECTION_PATTERN = { + {1, 1, 1, 1, 1, 1, 1}, + {1, 0, 0, 0, 0, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 1, 1, 1, 0, 1}, + {1, 0, 0, 0, 0, 0, 1}, + {1, 1, 1, 1, 1, 1, 1}, + }; + + private static final int[][] HORIZONTAL_SEPARATION_PATTERN = { + {0, 0, 0, 0, 0, 0, 0, 0}, + }; + + private static final int[][] VERTICAL_SEPARATION_PATTERN = { + {0}, {0}, {0}, {0}, {0}, {0}, {0}, + }; + + private static final int[][] POSITION_ADJUSTMENT_PATTERN = { + {1, 1, 1, 1, 1}, + {1, 0, 0, 0, 1}, + {1, 0, 1, 0, 1}, + {1, 0, 0, 0, 1}, + {1, 1, 1, 1, 1}, + }; + + // From Appendix E. Table 1, JIS0510X:2004 (p 71). The table was double-checked by komatsu. + private static final int[][] POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = { + {-1, -1, -1, -1, -1, -1, -1}, // Version 1 + { 6, 18, -1, -1, -1, -1, -1}, // Version 2 + { 6, 22, -1, -1, -1, -1, -1}, // Version 3 + { 6, 26, -1, -1, -1, -1, -1}, // Version 4 + { 6, 30, -1, -1, -1, -1, -1}, // Version 5 + { 6, 34, -1, -1, -1, -1, -1}, // Version 6 + { 6, 22, 38, -1, -1, -1, -1}, // Version 7 + { 6, 24, 42, -1, -1, -1, -1}, // Version 8 + { 6, 26, 46, -1, -1, -1, -1}, // Version 9 + { 6, 28, 50, -1, -1, -1, -1}, // Version 10 + { 6, 30, 54, -1, -1, -1, -1}, // Version 11 + { 6, 32, 58, -1, -1, -1, -1}, // Version 12 + { 6, 34, 62, -1, -1, -1, -1}, // Version 13 + { 6, 26, 46, 66, -1, -1, -1}, // Version 14 + { 6, 26, 48, 70, -1, -1, -1}, // Version 15 + { 6, 26, 50, 74, -1, -1, -1}, // Version 16 + { 6, 30, 54, 78, -1, -1, -1}, // Version 17 + { 6, 30, 56, 82, -1, -1, -1}, // Version 18 + { 6, 30, 58, 86, -1, -1, -1}, // Version 19 + { 6, 34, 62, 90, -1, -1, -1}, // Version 20 + { 6, 28, 50, 72, 94, -1, -1}, // Version 21 + { 6, 26, 50, 74, 98, -1, -1}, // Version 22 + { 6, 30, 54, 78, 102, -1, -1}, // Version 23 + { 6, 28, 54, 80, 106, -1, -1}, // Version 24 + { 6, 32, 58, 84, 110, -1, -1}, // Version 25 + { 6, 30, 58, 86, 114, -1, -1}, // Version 26 + { 6, 34, 62, 90, 118, -1, -1}, // Version 27 + { 6, 26, 50, 74, 98, 122, -1}, // Version 28 + { 6, 30, 54, 78, 102, 126, -1}, // Version 29 + { 6, 26, 52, 78, 104, 130, -1}, // Version 30 + { 6, 30, 56, 82, 108, 134, -1}, // Version 31 + { 6, 34, 60, 86, 112, 138, -1}, // Version 32 + { 6, 30, 58, 86, 114, 142, -1}, // Version 33 + { 6, 34, 62, 90, 118, 146, -1}, // Version 34 + { 6, 30, 54, 78, 102, 126, 150}, // Version 35 + { 6, 24, 50, 76, 102, 128, 154}, // Version 36 + { 6, 28, 54, 80, 106, 132, 158}, // Version 37 + { 6, 32, 58, 84, 110, 136, 162}, // Version 38 + { 6, 26, 54, 82, 110, 138, 166}, // Version 39 + { 6, 30, 58, 86, 114, 142, 170}, // Version 40 + }; + + // Type info cells at the left top corner. + private static final int[][] TYPE_INFO_COORDINATES = { + {8, 0}, + {8, 1}, + {8, 2}, + {8, 3}, + {8, 4}, + {8, 5}, + {8, 7}, + {8, 8}, + {7, 8}, + {5, 8}, + {4, 8}, + {3, 8}, + {2, 8}, + {1, 8}, + {0, 8}, + }; + + // From Appendix D in JISX0510:2004 (p. 67) + private static final int VERSION_INFO_POLY = 0x1f25; // 1 1111 0010 0101 + + // From Appendix C in JISX0510:2004 (p.65). + private static final int TYPE_INFO_POLY = 0x537; + private static final int TYPE_INFO_MASK_PATTERN = 0x5412; + + // Set all cells to -1. -1 means that the cell is empty (not set yet). + // + // JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + // with the ByteMatrix initialized all to zero. + public static void clearMatrix(ByteMatrix matrix) { + matrix.clear((byte) -1); + } + + // Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + // success, store the result in "matrix" and return true. + public static void buildMatrix(BitArray dataBits, ErrorCorrectionLevel ecLevel, int version, + int maskPattern, ByteMatrix matrix) throws WriterException { + clearMatrix(matrix); + embedBasicPatterns(version, matrix); + // Type information appear with any version. + embedTypeInfo(ecLevel, maskPattern, matrix); + // Version info appear if version >= 7. + maybeEmbedVersionInfo(version, matrix); + // Data should be embedded at end. + embedDataBits(dataBits, maskPattern, matrix); + } + + // Embed basic patterns. On success, modify the matrix and return true. + // The basic patterns are: + // - Position detection patterns + // - Timing patterns + // - Dark dot at the left bottom corner + // - Position adjustment patterns, if need be + public static void embedBasicPatterns(int version, ByteMatrix matrix) throws WriterException { + // Let's get started with embedding big squares at corners. + embedPositionDetectionPatternsAndSeparators(matrix); + // Then, embed the dark dot at the left bottom corner. + embedDarkDotAtLeftBottomCorner(matrix); + + // Position adjustment patterns appear if version >= 2. + maybeEmbedPositionAdjustmentPatterns(version, matrix); + // Timing patterns should be embedded after position adj. patterns. + embedTimingPatterns(matrix); + } + + // Embed type information. On success, modify the matrix. + public static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPattern, ByteMatrix matrix) + throws WriterException { + BitArray typeInfoBits = new BitArray(); + makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits); + + for (int i = 0; i < typeInfoBits.getSize(); ++i) { + // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in + // "typeInfoBits". + boolean bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i); + + // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46). + int x1 = TYPE_INFO_COORDINATES[i][0]; + int y1 = TYPE_INFO_COORDINATES[i][1]; + matrix.set(x1, y1, bit); + + if (i < 8) { + // Right top corner. + int x2 = matrix.getWidth() - i - 1; + int y2 = 8; + matrix.set(x2, y2, bit); + } else { + // Left bottom corner. + int x2 = 8; + int y2 = matrix.getHeight() - 7 + (i - 8); + matrix.set(x2, y2, bit); + } + } + } + + // Embed version information if need be. On success, modify the matrix and return true. + // See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + public static void maybeEmbedVersionInfo(int version, ByteMatrix matrix) throws WriterException { + if (version < 7) { // Version info is necessary if version >= 7. + return; // Don't need version info. + } + BitArray versionInfoBits = new BitArray(); + makeVersionInfoBits(version, versionInfoBits); + + int bitIndex = 6 * 3 - 1; // It will decrease from 17 to 0. + for (int i = 0; i < 6; ++i) { + for (int j = 0; j < 3; ++j) { + // Place bits in LSB (least significant bit) to MSB order. + boolean bit = versionInfoBits.get(bitIndex); + bitIndex--; + // Left bottom corner. + matrix.set(i, matrix.getHeight() - 11 + j, bit); + // Right bottom corner. + matrix.set(matrix.getHeight() - 11 + j, i, bit); + } + } + } + + // Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + // For debugging purposes, it skips masking process if "getMaskPattern" is -1. + // See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + public static void embedDataBits(BitArray dataBits, int maskPattern, ByteMatrix matrix) + throws WriterException { + int bitIndex = 0; + int direction = -1; + // Start from the right bottom cell. + int x = matrix.getWidth() - 1; + int y = matrix.getHeight() - 1; + while (x > 0) { + // Skip the vertical timing pattern. + if (x == 6) { + x -= 1; + } + while (y >= 0 && y < matrix.getHeight()) { + for (int i = 0; i < 2; ++i) { + int xx = x - i; + // Skip the cell if it's not empty. + if (!isEmpty(matrix.get(xx, y))) { + continue; + } + boolean bit; + if (bitIndex < dataBits.getSize()) { + bit = dataBits.get(bitIndex); + ++bitIndex; + } else { + // Padding bit. If there is no bit left, we'll fill the left cells with 0, as described + // in 8.4.9 of JISX0510:2004 (p. 24). + bit = false; + } + + // Skip masking if mask_pattern is -1. + if (maskPattern != -1) { + if (MaskUtil.getDataMaskBit(maskPattern, xx, y)) { + bit = !bit; + } + } + matrix.set(xx, y, bit); + } + y += direction; + } + direction = -direction; // Reverse the direction. + y += direction; + x -= 2; // Move to the left. + } + // All bits should be consumed. + if (bitIndex != dataBits.getSize()) { + throw new WriterException("Not all bits consumed: " + bitIndex + '/' + dataBits.getSize()); + } + } + + // Return the position of the most significant bit set (to one) in the "value". The most + // significant bit is position 32. If there is no bit set, return 0. Examples: + // - findMSBSet(0) => 0 + // - findMSBSet(1) => 1 + // - findMSBSet(255) => 8 + public static int findMSBSet(int value) { + int numDigits = 0; + while (value != 0) { + value >>>= 1; + ++numDigits; + } + return numDigits; + } + + // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + // code is used for encoding type information and version information. + // Example: Calculation of version information of 7. + // f(x) is created from 7. + // - 7 = 000111 in 6 bits + // - f(x) = x^2 + x^1 + x^0 + // g(x) is given by the standard (p. 67) + // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + // Multiply f(x) by x^(18 - 6) + // - f'(x) = f(x) * x^(18 - 6) + // - f'(x) = x^14 + x^13 + x^12 + // Calculate the remainder of f'(x) / g(x) + // x^2 + // __________________________________________________ + // g(x) )x^14 + x^13 + x^12 + // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + // -------------------------------------------------- + // x^11 + x^10 + x^7 + x^4 + x^2 + // + // The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + // Encode it in binary: 110010010100 + // The return value is 0xc94 (1100 1001 0100) + // + // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + // operations. We don't care if cofficients are positive or negative. + public static int calculateBCHCode(int value, int poly) { + // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1 + // from 13 to make it 12. + int msbSetInPoly = findMSBSet(poly); + value <<= msbSetInPoly - 1; + // Do the division business using exclusive-or operations. + while (findMSBSet(value) >= msbSetInPoly) { + value ^= poly << (findMSBSet(value) - msbSetInPoly); + } + // Now the "value" is the remainder (i.e. the BCH code) + return value; + } + + // Make bit vector of type information. On success, store the result in "bits" and return true. + // Encode error correction level and mask pattern. See 8.9 of + // JISX0510:2004 (p.45) for details. + public static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int maskPattern, BitArray bits) + throws WriterException { + if (!QRCode.isValidMaskPattern(maskPattern)) { + throw new WriterException("Invalid mask pattern"); + } + int typeInfo = (ecLevel.getBits() << 3) | maskPattern; + bits.appendBits(typeInfo, 5); + + int bchCode = calculateBCHCode(typeInfo, TYPE_INFO_POLY); + bits.appendBits(bchCode, 10); + + BitArray maskBits = new BitArray(); + maskBits.appendBits(TYPE_INFO_MASK_PATTERN, 15); + bits.xor(maskBits); + + if (bits.getSize() != 15) { // Just in case. + throw new WriterException("should not happen but we got: " + bits.getSize()); + } + } + + // Make bit vector of version information. On success, store the result in "bits" and return true. + // See 8.10 of JISX0510:2004 (p.45) for details. + public static void makeVersionInfoBits(int version, BitArray bits) throws WriterException { + bits.appendBits(version, 6); + int bchCode = calculateBCHCode(version, VERSION_INFO_POLY); + bits.appendBits(bchCode, 12); + + if (bits.getSize() != 18) { // Just in case. + throw new WriterException("should not happen but we got: " + bits.getSize()); + } + } + + // Check if "value" is empty. + private static boolean isEmpty(int value) { + return value == -1; + } + + // Check if "value" is valid. + private static boolean isValidValue(int value) { + return (value == -1 || // Empty. + value == 0 || // Light (white). + value == 1); // Dark (black). + } + + private static void embedTimingPatterns(ByteMatrix matrix) throws WriterException { + // -8 is for skipping position detection patterns (size 7), and two horizontal/vertical + // separation patterns (size 1). Thus, 8 = 7 + 1. + for (int i = 8; i < matrix.getWidth() - 8; ++i) { + int bit = (i + 1) % 2; + // Horizontal line. + if (!isValidValue(matrix.get(i, 6))) { + throw new WriterException(); + } + if (isEmpty(matrix.get(i, 6))) { + matrix.set(i, 6, bit); + } + // Vertical line. + if (!isValidValue(matrix.get(6, i))) { + throw new WriterException(); + } + if (isEmpty(matrix.get(6, i))) { + matrix.set(6, i, bit); + } + } + } + + // Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + private static void embedDarkDotAtLeftBottomCorner(ByteMatrix matrix) throws WriterException { + if (matrix.get(8, matrix.getHeight() - 8) == 0) { + throw new WriterException(); + } + matrix.set(8, matrix.getHeight() - 8, 1); + } + + private static void embedHorizontalSeparationPattern(int xStart, int yStart, + ByteMatrix matrix) throws WriterException { + // We know the width and height. + if (HORIZONTAL_SEPARATION_PATTERN[0].length != 8 || HORIZONTAL_SEPARATION_PATTERN.length != 1) { + throw new WriterException("Bad horizontal separation pattern"); + } + for (int x = 0; x < 8; ++x) { + if (!isEmpty(matrix.get(xStart + x, yStart))) { + throw new WriterException(); + } + matrix.set(xStart + x, yStart, HORIZONTAL_SEPARATION_PATTERN[0][x]); + } + } + + private static void embedVerticalSeparationPattern(int xStart, int yStart, + ByteMatrix matrix) throws WriterException { + // We know the width and height. + if (VERTICAL_SEPARATION_PATTERN[0].length != 1 || VERTICAL_SEPARATION_PATTERN.length != 7) { + throw new WriterException("Bad vertical separation pattern"); + } + for (int y = 0; y < 7; ++y) { + if (!isEmpty(matrix.get(xStart, yStart + y))) { + throw new WriterException(); + } + matrix.set(xStart, yStart + y, VERTICAL_SEPARATION_PATTERN[y][0]); + } + } + + // Note that we cannot unify the function with embedPositionDetectionPattern() despite they are + // almost identical, since we cannot write a function that takes 2D arrays in different sizes in + // C/C++. We should live with the fact. + private static void embedPositionAdjustmentPattern(int xStart, int yStart, + ByteMatrix matrix) throws WriterException { + // We know the width and height. + if (POSITION_ADJUSTMENT_PATTERN[0].length != 5 || POSITION_ADJUSTMENT_PATTERN.length != 5) { + throw new WriterException("Bad position adjustment"); + } + for (int y = 0; y < 5; ++y) { + for (int x = 0; x < 5; ++x) { + if (!isEmpty(matrix.get(xStart + x, yStart + y))) { + throw new WriterException(); + } + matrix.set(xStart + x, yStart + y, POSITION_ADJUSTMENT_PATTERN[y][x]); + } + } + } + + private static void embedPositionDetectionPattern(int xStart, int yStart, + ByteMatrix matrix) throws WriterException { + // We know the width and height. + if (POSITION_DETECTION_PATTERN[0].length != 7 || POSITION_DETECTION_PATTERN.length != 7) { + throw new WriterException("Bad position detection pattern"); + } + for (int y = 0; y < 7; ++y) { + for (int x = 0; x < 7; ++x) { + if (!isEmpty(matrix.get(xStart + x, yStart + y))) { + throw new WriterException(); + } + matrix.set(xStart + x, yStart + y, POSITION_DETECTION_PATTERN[y][x]); + } + } + } + + // Embed position detection patterns and surrounding vertical/horizontal separators. + private static void embedPositionDetectionPatternsAndSeparators(ByteMatrix matrix) throws WriterException { + // Embed three big squares at corners. + int pdpWidth = POSITION_DETECTION_PATTERN[0].length; + // Left top corner. + embedPositionDetectionPattern(0, 0, matrix); + // Right top corner. + embedPositionDetectionPattern(matrix.getWidth() - pdpWidth, 0, matrix); + // Left bottom corner. + embedPositionDetectionPattern(0, matrix.getWidth() - pdpWidth, matrix); + + // Embed horizontal separation patterns around the squares. + int hspWidth = HORIZONTAL_SEPARATION_PATTERN[0].length; + // Left top corner. + embedHorizontalSeparationPattern(0, hspWidth - 1, matrix); + // Right top corner. + embedHorizontalSeparationPattern(matrix.getWidth() - hspWidth, + hspWidth - 1, matrix); + // Left bottom corner. + embedHorizontalSeparationPattern(0, matrix.getWidth() - hspWidth, matrix); + + // Embed vertical separation patterns around the squares. + int vspSize = VERTICAL_SEPARATION_PATTERN.length; + // Left top corner. + embedVerticalSeparationPattern(vspSize, 0, matrix); + // Right top corner. + embedVerticalSeparationPattern(matrix.getHeight() - vspSize - 1, 0, matrix); + // Left bottom corner. + embedVerticalSeparationPattern(vspSize, matrix.getHeight() - vspSize, + matrix); + } + + // Embed position adjustment patterns if need be. + private static void maybeEmbedPositionAdjustmentPatterns(int version, ByteMatrix matrix) + throws WriterException { + if (version < 2) { // The patterns appear if version >= 2 + return; + } + int index = version - 1; + int[] coordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index]; + int numCoordinates = POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[index].length; + for (int i = 0; i < numCoordinates; ++i) { + for (int j = 0; j < numCoordinates; ++j) { + int y = coordinates[i]; + int x = coordinates[j]; + if (x == -1 || y == -1) { + continue; + } + // If the cell is unset, we embed the position adjustment pattern here. + if (isEmpty(matrix.get(x, y))) { + // -2 is necessary since the x/y coordinates point to the center of the pattern, not the + // left top corner. + embedPositionAdjustmentPattern(x - 2, y - 2, matrix); + } + } + } + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/encoder/QRCode.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,239 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode.encoder; + +import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import ext.plantuml.com.google.zxing.qrcode.decoder.Mode; + +/** + * @author satorux@google.com (Satoru Takabayashi) - creator + * @author dswitkin@google.com (Daniel Switkin) - ported from C++ + */ +public final class QRCode { + + public static final int NUM_MASK_PATTERNS = 8; + + private Mode mode; + private ErrorCorrectionLevel ecLevel; + private int version; + private int matrixWidth; + private int maskPattern; + private int numTotalBytes; + private int numDataBytes; + private int numECBytes; + private int numRSBlocks; + private ByteMatrix matrix; + + public QRCode() { + mode = null; + ecLevel = null; + version = -1; + matrixWidth = -1; + maskPattern = -1; + numTotalBytes = -1; + numDataBytes = -1; + numECBytes = -1; + numRSBlocks = -1; + matrix = null; + } + + // Mode of the QR Code. + public Mode getMode() { + return mode; + } + + // Error correction level of the QR Code. + public ErrorCorrectionLevel getECLevel() { + return ecLevel; + } + + // Version of the QR Code. The bigger size, the bigger version. + public int getVersion() { + return version; + } + + // ByteMatrix width of the QR Code. + public int getMatrixWidth() { + return matrixWidth; + } + + // Mask pattern of the QR Code. + public int getMaskPattern() { + return maskPattern; + } + + // Number of total bytes in the QR Code. + public int getNumTotalBytes() { + return numTotalBytes; + } + + // Number of data bytes in the QR Code. + public int getNumDataBytes() { + return numDataBytes; + } + + // Number of error correction bytes in the QR Code. + public int getNumECBytes() { + return numECBytes; + } + + // Number of Reedsolomon blocks in the QR Code. + public int getNumRSBlocks() { + return numRSBlocks; + } + + // ByteMatrix data of the QR Code. + public ByteMatrix getMatrix() { + return matrix; + } + + + // Return the value of the module (cell) pointed by "x" and "y" in the matrix of the QR Code. They + // call cells in the matrix "modules". 1 represents a black cell, and 0 represents a white cell. + public int at(int x, int y) { + // The value must be zero or one. + int value = matrix.get(x, y); + if (!(value == 0 || value == 1)) { + // this is really like an assert... not sure what better exception to use? + throw new RuntimeException("Bad value"); + } + return value; + } + + // Checks all the member variables are set properly. Returns true on success. Otherwise, returns + // false. + public boolean isValid() { + return + // First check if all version are not uninitialized. + mode != null && + ecLevel != null && + version != -1 && + matrixWidth != -1 && + maskPattern != -1 && + numTotalBytes != -1 && + numDataBytes != -1 && + numECBytes != -1 && + numRSBlocks != -1 && + // Then check them in other ways.. + isValidMaskPattern(maskPattern) && + numTotalBytes == numDataBytes + numECBytes && + // ByteMatrix stuff. + matrix != null && + matrixWidth == matrix.getWidth() && + // See 7.3.1 of JISX0510:2004 (p.5). + matrix.getWidth() == matrix.getHeight(); // Must be square. + } + + // Return debug String. + public String toString() { + StringBuffer result = new StringBuffer(200); + result.append("<<\n"); + result.append(" mode: "); + result.append(mode); + result.append("\n ecLevel: "); + result.append(ecLevel); + result.append("\n version: "); + result.append(version); + result.append("\n matrixWidth: "); + result.append(matrixWidth); + result.append("\n maskPattern: "); + result.append(maskPattern); + result.append("\n numTotalBytes: "); + result.append(numTotalBytes); + result.append("\n numDataBytes: "); + result.append(numDataBytes); + result.append("\n numECBytes: "); + result.append(numECBytes); + result.append("\n numRSBlocks: "); + result.append(numRSBlocks); + if (matrix == null) { + result.append("\n matrix: null\n"); + } else { + result.append("\n matrix:\n"); + result.append(matrix.toString()); + } + result.append(">>\n"); + return result.toString(); + } + + public void setMode(Mode value) { + mode = value; + } + + public void setECLevel(ErrorCorrectionLevel value) { + ecLevel = value; + } + + public void setVersion(int value) { + version = value; + } + + public void setMatrixWidth(int value) { + matrixWidth = value; + } + + public void setMaskPattern(int value) { + maskPattern = value; + } + + public void setNumTotalBytes(int value) { + numTotalBytes = value; + } + + public void setNumDataBytes(int value) { + numDataBytes = value; + } + + public void setNumECBytes(int value) { + numECBytes = value; + } + + public void setNumRSBlocks(int value) { + numRSBlocks = value; + } + + // This takes ownership of the 2D array. + public void setMatrix(ByteMatrix value) { + matrix = value; + } + + // Check if "mask_pattern" is valid. + public static boolean isValidMaskPattern(int maskPattern) { + return maskPattern >= 0 && maskPattern < NUM_MASK_PATTERNS; + } + + // Return true if the all values in the matrix are binary numbers. + // + // JAVAPORT: This is going to be super expensive and unnecessary, we should not call this in + // production. I'm leaving it because it may be useful for testing. It should be removed entirely + // if ByteMatrix is changed never to contain a -1. + /* + private static boolean EverythingIsBinary(final ByteMatrix matrix) { + for (int y = 0; y < matrix.height(); ++y) { + for (int x = 0; x < matrix.width(); ++x) { + int value = matrix.get(y, x); + if (!(value == 0 || value == 1)) { + // Found non zero/one value. + return false; + } + } + } + return true; + } + */ + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/qrcode/QRCodeWriter.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,106 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing.qrcode; + +import java.util.Hashtable; + +import ext.plantuml.com.google.zxing.BarcodeFormat; +import ext.plantuml.com.google.zxing.EncodeHintType; +import ext.plantuml.com.google.zxing.Writer; +import ext.plantuml.com.google.zxing.WriterException; +import ext.plantuml.com.google.zxing.common.BitMatrix; +import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import ext.plantuml.com.google.zxing.qrcode.encoder.ByteMatrix; +import ext.plantuml.com.google.zxing.qrcode.encoder.Encoder; +import ext.plantuml.com.google.zxing.qrcode.encoder.QRCode; + +/** + * This object renders a QR Code as a BitMatrix 2D array of greyscale values. + * + * @author dswitkin@google.com (Daniel Switkin) + */ +public final class QRCodeWriter implements Writer { + + private static final int QUIET_ZONE_SIZE = 4; + + public BitMatrix encode(String contents, BarcodeFormat format, int multiple) throws WriterException { + + return encode(contents, format, multiple, null); + } + + public BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) throws WriterException { + + if (contents == null || contents.length() == 0) { + throw new IllegalArgumentException("Found empty contents"); + } + + if (format != BarcodeFormat.QR_CODE) { + throw new IllegalArgumentException("Can only encode QR_CODE, but got " + format); + } + + ErrorCorrectionLevel errorCorrectionLevel = ErrorCorrectionLevel.L; + if (hints != null) { + ErrorCorrectionLevel requestedECLevel = (ErrorCorrectionLevel) hints.get(EncodeHintType.ERROR_CORRECTION); + if (requestedECLevel != null) { + errorCorrectionLevel = requestedECLevel; + } + } + + QRCode code = new QRCode(); + Encoder.encode(contents, errorCorrectionLevel, hints, code); + return renderResult(code, multiple); + } + + // Note that the input matrix uses 0 == white, 1 == black, while the output + // matrix uses + // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap). + private static BitMatrix renderResult(QRCode code, int multiple) { + ByteMatrix input = code.getMatrix(); + int inputWidth = input.getWidth(); + int inputHeight = input.getHeight(); + int qrWidth = inputWidth + (QUIET_ZONE_SIZE << 1); + int qrHeight = inputHeight + (QUIET_ZONE_SIZE << 1); + // int outputWidth = Math.max(width, qrWidth); + // int outputHeight = Math.max(height, qrHeight); + + // int multiple = Math.min(outputWidth / qrWidth, outputHeight / + // qrHeight); + // Padding includes both the quiet zone and the extra white pixels to + // accommodate the requested + // dimensions. For example, if input is 25x25 the QR will be 33x33 + // including the quiet zone. + // If the requested size is 200x160, the multiple will be 4, for a QR of + // 132x132. These will + // handle all the padding from 100x100 (the actual QR) up to 200x160. + int leftPadding = QUIET_ZONE_SIZE * multiple; + int topPadding = QUIET_ZONE_SIZE * multiple; + + BitMatrix output = new BitMatrix(qrWidth * multiple, qrHeight * multiple); + + for (int inputY = 0, outputY = topPadding; inputY < inputHeight; inputY++, outputY += multiple) { + // Write the contents of this row of the barcode + for (int inputX = 0, outputX = leftPadding; inputX < inputWidth; inputX++, outputX += multiple) { + if (input.get(inputX, inputY) == 1) { + output.setRegion(outputX, outputY, multiple, multiple); + } + } + } + + return output; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ReaderException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ReaderException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ReaderException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ReaderException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * The general exception class throw when something goes wrong during decoding of a barcode. + * This includes, but is not limited to, failing checksums / error correction algorithms, being + * unable to locate finder timing patterns, and so on. + * + * @author Sean Owen + */ +public abstract class ReaderException extends Exception { + + // TODO: Currently we throw up to 400 ReaderExceptions while scanning a single 240x240 image before + // rejecting it. This involves a lot of overhead and memory allocation, and affects both performance + // and latency on continuous scan clients. In the future, we should change all the decoders not to + // throw exceptions for routine events, like not finding a barcode on a given row. Instead, we + // should return error codes back to the callers, and simply delete this class. In the mean time, I + // have altered this class to be as lightweight as possible, by ignoring the exception string, and + // by disabling the generation of stack traces, which is especially time consuming. These are just + // temporary measures, pending the big cleanup. + + //private static final ReaderException instance = new ReaderException(); + + // EXCEPTION TRACKING SUPPORT + // Identifies who is throwing exceptions and how often. To use: + // + // 1. Uncomment these lines and the code below which uses them. + // 2. Uncomment the two corresponding lines in j2se/CommandLineRunner.decode() + // 3. Change core to build as Java 1.5 temporarily +// private static int exceptionCount = 0; +// private static Map throwers = new HashMap(32); + + ReaderException() { + // do nothing + } + + //public static ReaderException getInstance() { +// Exception e = new Exception(); +// // Take the stack frame before this one. +// StackTraceElement stack = e.getStackTrace()[1]; +// String key = stack.getClassName() + "." + stack.getMethodName() + "(), line " + +// stack.getLineNumber(); +// if (throwers.containsKey(key)) { +// Integer value = throwers.get(key); +// value++; +// throwers.put(key, value); +// } else { +// throwers.put(key, 1); +// } +// exceptionCount++; + + //return instance; + //} + +// public static int getExceptionCountAndReset() { +// int temp = exceptionCount; +// exceptionCount = 0; +// return temp; +// } +// +// public static String getThrowersAndReset() { +// StringBuilder builder = new StringBuilder(1024); +// Object[] keys = throwers.keySet().toArray(); +// for (int x = 0; x < keys.length; x++) { +// String key = (String) keys[x]; +// Integer value = throwers.get(key); +// builder.append(key); +// builder.append(": "); +// builder.append(value); +// builder.append("\n"); +// } +// throwers.clear(); +// return builder.toString(); +// } + + // Prevent stack traces from being taken + // srowen says: huh, my IDE is saying this is not an override. native methods can't be overridden? + // This, at least, does not hurt. Because we use a singleton pattern here, it doesn't matter anyhow. + public final Throwable fillInStackTrace() { + return null; + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ResultPoint.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ResultPoint.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/ResultPoint.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/ResultPoint.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,127 @@ +/* + * Copyright 2007 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + *

Encapsulates a point of interest in an image containing a barcode. Typically, this + * would be the location of a finder pattern or the corner of the barcode, for example.

+ * + * @author Sean Owen + */ +public class ResultPoint { + + private final float x; + private final float y; + + public ResultPoint(float x, float y) { + this.x = x; + this.y = y; + } + + public final float getX() { + return x; + } + + public final float getY() { + return y; + } + + public boolean equals(Object other) { + if (other instanceof ResultPoint) { + ResultPoint otherPoint = (ResultPoint) other; + return x == otherPoint.x && y == otherPoint.y; + } + return false; + } + + public int hashCode() { + return 31 * Float.floatToIntBits(x) + Float.floatToIntBits(y); + } + + public String toString() { + StringBuffer result = new StringBuffer(25); + result.append('('); + result.append(x); + result.append(','); + result.append(y); + result.append(')'); + return result.toString(); + } + + /** + *

Orders an array of three ResultPoints in an order [A,B,C] such that AB < AC and + * BC < AC and the angle between BC and BA is less than 180 degrees. + */ + public static void orderBestPatterns(ResultPoint[] patterns) { + + // Find distances between pattern centers + float zeroOneDistance = distance(patterns[0], patterns[1]); + float oneTwoDistance = distance(patterns[1], patterns[2]); + float zeroTwoDistance = distance(patterns[0], patterns[2]); + + ResultPoint pointA, pointB, pointC; + // Assume one closest to other two is B; A and C will just be guesses at first + if (oneTwoDistance >= zeroOneDistance && oneTwoDistance >= zeroTwoDistance) { + pointB = patterns[0]; + pointA = patterns[1]; + pointC = patterns[2]; + } else if (zeroTwoDistance >= oneTwoDistance && zeroTwoDistance >= zeroOneDistance) { + pointB = patterns[1]; + pointA = patterns[0]; + pointC = patterns[2]; + } else { + pointB = patterns[2]; + pointA = patterns[0]; + pointC = patterns[1]; + } + + // Use cross product to figure out whether A and C are correct or flipped. + // This asks whether BC x BA has a positive z component, which is the arrangement + // we want for A, B, C. If it's negative, then we've got it flipped around and + // should swap A and C. + if (crossProductZ(pointA, pointB, pointC) < 0.0f) { + ResultPoint temp = pointA; + pointA = pointC; + pointC = temp; + } + + patterns[0] = pointA; + patterns[1] = pointB; + patterns[2] = pointC; + } + + + /** + * @return distance between two points + */ + public static float distance(ResultPoint pattern1, ResultPoint pattern2) { + float xDiff = pattern1.getX() - pattern2.getX(); + float yDiff = pattern1.getY() - pattern2.getY(); + return (float) Math.sqrt((double) (xDiff * xDiff + yDiff * yDiff)); + } + + /** + * Returns the z component of the cross product between vectors BC and BA. + */ + private static float crossProductZ(ResultPoint pointA, ResultPoint pointB, ResultPoint pointC) { + float bX = pointB.x; + float bY = pointB.y; + return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX)); + } + + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/WriterException.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/WriterException.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/WriterException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/WriterException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +/** + * A base class which covers the range of exceptions which may occur when encoding a barcode using + * the Writer framework. + * + * @author dswitkin@google.com (Daniel Switkin) + */ +public final class WriterException extends Exception { + + public WriterException() { + super(); + } + + public WriterException(String message) { + super(message); + } + +} diff -Nru plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/Writer.java plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/Writer.java --- plantuml-1.2017.15/src/ext/plantuml/com/google/zxing/Writer.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/ext/plantuml/com/google/zxing/Writer.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright 2008 ZXing authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ext.plantuml.com.google.zxing; + +import java.util.Hashtable; + +import ext.plantuml.com.google.zxing.common.BitMatrix; + +/** + * The base class for all objects which encode/generate a barcode image. + * + * @author dswitkin@google.com (Daniel Switkin) + */ +public interface Writer { + + /** + * Encode a barcode using the default settings. + * + * @param contents The contents to encode in the barcode + * @param format The barcode format to generate + * @param width The preferred width in pixels + * @param height The preferred height in pixels + * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + */ + BitMatrix encode(String contents, BarcodeFormat format, int multiple) + throws WriterException; + + /** + * + * @param contents The contents to encode in the barcode + * @param format The barcode format to generate + * @param width The preferred width in pixels + * @param height The preferred height in pixels + * @param hints Additional parameters to supply to the encoder + * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + */ + BitMatrix encode(String contents, BarcodeFormat format, int multiple, Hashtable hints) + throws WriterException; + +} diff -Nru plantuml-1.2017.15/src/gen/lib/cdt/dtdisc__c.java plantuml-1.2018.9/src/gen/lib/cdt/dtdisc__c.java --- plantuml-1.2017.15/src/gen/lib/cdt/dtdisc__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/cdt/dtdisc__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -54,6 +54,7 @@ import h._dtdisc_s; import h._dtlink_s; import smetana.core.CString; +import smetana.core.size_t; public class dtdisc__c { //1 9k44uhd5foylaeoekf3llonjq @@ -124,19 +125,15 @@ //3 507t9jcy6v9twvl30rs9i2nwi // static void* dtmemory(Dt_t* dt,void* addr,size_t size,Dtdisc_t* disc) -public static Object dtmemory(Object... arg) { -UNSUPPORTED("18b3dn3pevbf7ajed6fftvnzk"); // static void* dtmemory(Dt_t* dt,void* addr,size_t size,Dtdisc_t* disc) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("cmb0rxzo3c2wr18j0upjz9iml"); // if(addr) -UNSUPPORTED("bn1cyxafod2777wzl55qh14xq"); // { if(size == 0) +public static Object dtmemory(_dt_s dt, Object addr, size_t size, _dtdisc_s disc) { +if(addr!=null) { +UNSUPPORTED("bn1cyxafod2777wzl55qh14xq"); // if(size == 0) UNSUPPORTED("15j5ccp5owse1ebc5ljhbzg59"); // { free(addr); UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("9ed8imo9cbvwtwe92qmavoqko"); // else return realloc(addr,size); -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("ew5p7pzg1fmdih1t3u25rqz6y"); // else return size > 0 ? malloc(size) : ((void*)0); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - +} +else return size.isStrictPositive() ? size.malloc() : null; throw new UnsupportedOperationException(); } diff -Nru plantuml-1.2017.15/src/gen/lib/cgraph/graph__c.java plantuml-1.2018.9/src/gen/lib/cgraph/graph__c.java --- plantuml-1.2017.15/src/gen/lib/cgraph/graph__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/cgraph/graph__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -241,7 +241,8 @@ rv.getStruct("disc").setPtr("mem", memdisc); rv.getStruct("state").setPtr("mem", memclosure); rv.getStruct("disc").setPtr("id", ((proto != null && proto.getPtr("id") != null) ? proto.getPtr("id") : Z.z().AgIdDisc.amp())); - rv.getStruct("disc").setPtr("io", ((proto != null && proto.getPtr("io") != null) ? proto.getPtr("io") : Z.z().AgIdDisc.amp())); + // Translation bug in next line: should be AgIoDisc and not AgIdDisc + // rv.getStruct("disc").setPtr("io", ((proto != null && proto.getPtr("io") != null) ? proto.getPtr("io") : Z.z().AgIdDisc.amp())); rv.setBoolean("callbacks_enabled", (N(0))); return rv; } finally { diff -Nru plantuml-1.2017.15/src/gen/lib/common/arrows__c.java plantuml-1.2018.9/src/gen/lib/common/arrows__c.java --- plantuml-1.2017.15/src/gen/lib/common/arrows__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/arrows__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -68,6 +68,7 @@ import smetana.core.MutableDouble; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -934,7 +935,7 @@ ENTERING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip"); try { final __struct__ inside_context = JUtils.from(inside_t.class); - final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4); double elen; MutableDouble elen2 = new MutableDouble(0); elen = arrow_length(e, eflag); @@ -971,7 +972,7 @@ ENTERING("q7y4oxn0paexbgynmtg2zmiv","arrowStartClip"); try { final __struct__ inside_context = JUtils.from(inside_t.class); - final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4); double slen; MutableDouble slen2 = new MutableDouble(0); slen = arrow_length(e, sflag); diff -Nru plantuml-1.2017.15/src/gen/lib/common/emit__c.java plantuml-1.2018.9/src/gen/lib/common/emit__c.java --- plantuml-1.2017.15/src/gen/lib/common/emit__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/emit__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -58,6 +58,7 @@ import smetana.core.CString; import smetana.core.JUtils; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -1444,8 +1445,8 @@ } } else { /* else refine the segment */ - final __array_of_struct__ left = __array_of_struct__.malloc(pointf.class, 4); - final __array_of_struct__ right = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ left = __array_of_struct_impl__.malloc(pointf.class, 4); + final __array_of_struct__ right = __array_of_struct_impl__.malloc(pointf.class, 4); Bezier (cp, 3, 0.5, left.asPtr(), right.asPtr()); update_bb_bz(bb, left); update_bb_bz(bb, right); diff -Nru plantuml-1.2017.15/src/gen/lib/common/labels__c.java plantuml-1.2018.9/src/gen/lib/common/labels__c.java --- plantuml-1.2017.15/src/gen/lib/common/labels__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/labels__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -1085,8 +1085,8 @@ h_len = strlen(h_str); tl = ED_label(obj.castTo(Agedge_s.class)); if (tl!=null) { -UNSUPPORTED("88b430s6vk0irhr2k7x9crz9l"); // l_str = tl->text; -UNSUPPORTED("5hjl5oveu3muui5b0fffh0dz2"); // if (str) l_len = strlen(l_str); + l_str = tl.getCString("text"); + if (str!=null) l_len = strlen(l_str); } if (agisdirected(agroot(agraphof(agtail((obj.castTo(Agedge_s.class))))))) e_str = new CString("->"); diff -Nru plantuml-1.2017.15/src/gen/lib/common/postproc__c.java plantuml-1.2018.9/src/gen/lib/common/postproc__c.java --- plantuml-1.2017.15/src/gen/lib/common/postproc__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/postproc__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -44,18 +44,26 @@ * */ package gen.lib.common; +import static gen.lib.cgraph.attr__c.agattr; import static gen.lib.cgraph.edge__c.agfstout; import static gen.lib.cgraph.edge__c.aghead; import static gen.lib.cgraph.edge__c.agnxtout; import static gen.lib.cgraph.edge__c.agtail; +import static gen.lib.cgraph.graph__c.agnnodes; import static gen.lib.cgraph.id__c.agnameof; import static gen.lib.cgraph.node__c.agfstnode; import static gen.lib.cgraph.node__c.agnxtnode; import static gen.lib.cgraph.obj__c.agroot; import static gen.lib.common.geom__c.ccwrotatepf; +import static gen.lib.common.memory__c.zmalloc; +import static gen.lib.common.splines__c.getsplinepoints; +import static gen.lib.common.utils__c.late_bool; +import static gen.lib.label.xlabels__c.placeLabels; import static smetana.core.JUtils.NEQ; +import static smetana.core.JUtils.sizeof; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; +import static smetana.core.Macro.AGRAPH; import static smetana.core.Macro.ED_edge_type; import static smetana.core.Macro.ED_head_label; import static smetana.core.Macro.ED_label; @@ -72,8 +80,13 @@ import static smetana.core.Macro.GD_label_pos; import static smetana.core.Macro.GD_n_cluster; import static smetana.core.Macro.GD_rankdir; +import static smetana.core.Macro.INT_MAX; +import static smetana.core.Macro.MAX; +import static smetana.core.Macro.MIN; import static smetana.core.Macro.N; import static smetana.core.Macro.ND_coord; +import static smetana.core.Macro.ND_height; +import static smetana.core.Macro.ND_width; import static smetana.core.Macro.ND_xlabel; import static smetana.core.Macro.NOT; import static smetana.core.Macro.UNSUPPORTED; @@ -87,10 +100,13 @@ import h.label_params_t; import h.object_t; import h.pointf; +import h.splines; import h.textlabel_t; import h.xlabel_t; +import smetana.core.CString; import smetana.core.JUtils; import smetana.core.Z; +import smetana.core.__ptr__; import smetana.core.__struct__; public class postproc__c { @@ -975,24 +991,25 @@ //3 av67wf2xi70ncgl90j1ttrjjs // static pointf edgeHeadpoint (Agedge_t* e) -public static Object edgeHeadpoint(Object... arg) { -UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf -UNSUPPORTED("ckf4uk77aptax4a60w2nhrdzl"); // edgeHeadpoint (Agedge_t* e) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl; -UNSUPPORTED("3hs99atzl1l857khumt6ycmbh"); // bezier *bez; -UNSUPPORTED("26m18ntdxgq9wp5vlh2x7auh5"); // if ((spl = getsplinepoints(e)) == NULL) { +public static __struct__ edgeHeadpoint(Agedge_s e) { + return edgeHeadpoint_(e).copy(); +} +private static __struct__ edgeHeadpoint_(Agedge_s e) { + splines spl; + __ptr__ bez; + spl = getsplinepoints(e); +if (spl == null) { UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p; UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0; UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("mjw3aaq1rghmemky1iymklp4"); // bez = &spl->list[spl->size - 1]; -UNSUPPORTED("5g1i4pbq9il9iba3urs6bxfa0"); // if (bez->eflag) { -UNSUPPORTED("5vt6gwb8d8689fuwqbt5uhb12"); // return bez->ep; -UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else { +} +bez = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr(); +// bez = &spl->list[spl->size - 1]; +if (bez.getBoolean("eflag")) { + return bez.getStruct("ep"); +} else { UNSUPPORTED("6qzm0hh4pxrspfbvxearcz9z8"); // return bez->list[bez->size - 1]; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } +} throw new UnsupportedOperationException(); } @@ -1002,22 +1019,19 @@ //3 1ca6fh8ns5bgzfzcz8al4eh4k // static boxf adjustBB (object_t* objp, boxf bb) -public static Object adjustBB(Object... arg) { -UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf -UNSUPPORTED("2gtud943baz3kfj1vqqhjeaj4"); // adjustBB (object_t* objp, boxf bb) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1ilrhzyqh05f2u3j3vzg0ys8u"); // pointf ur; -UNSUPPORTED("a4qac74i3mtrli231q9zmy8pn"); // /* Adjust bounding box */ -UNSUPPORTED("cgmwicrpoafwh8qt3zob8r2ye"); // bb.LL.x = MIN(bb.LL.x, objp->pos.x); -UNSUPPORTED("dqb32jehkpiyfzbiwusv0ex1n"); // bb.LL.y = MIN(bb.LL.y, objp->pos.y); -UNSUPPORTED("coywjj9bhu737b59inwiumkbc"); // ur.x = objp->pos.x + objp->sz.x; -UNSUPPORTED("4zg7x4gv3ox92n323b2vzaq32"); // ur.y = objp->pos.y + objp->sz.y; -UNSUPPORTED("p351si3o2tnvdcb1o5i8et1b"); // bb.UR.x = MAX(bb.UR.x, ur.x); -UNSUPPORTED("4a11bd6b7vdmcwc7r71y9k37z"); // bb.UR.y = MAX(bb.UR.y, ur.y); -UNSUPPORTED("5v5hh30squmit8o2i5hs25eig"); // return bb; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); +public static __struct__ adjustBB(__ptr__ objp, __struct__ bb) { + return adjustBB_(objp, bb.copy()).copy(); +} +private static __struct__ adjustBB_(__ptr__ objp, __struct__ bb) { + final __struct__ ur = JUtils.from(pointf.class); + /* Adjust bounding box */ + bb.getStruct("LL").setDouble("x", MIN(bb.getStruct("LL").getDouble("x"), objp.getPtr("pos").getDouble("x"))); + bb.getStruct("LL").setDouble("y", MIN(bb.getStruct("LL").getDouble("y"), objp.getPtr("pos").getDouble("y"))); + ur.setDouble("x", objp.getPtr("pos").getDouble("x") + objp.getPtr("sz").getDouble("x")); + ur.setDouble("y", objp.getPtr("pos").getDouble("y") + objp.getPtr("sz").getDouble("y")); + bb.getStruct("UR").setDouble("x", MAX(bb.getStruct("UR").getDouble("x"), ur.getDouble("x"))); + bb.getStruct("UR").setDouble("y", MAX(bb.getStruct("UR").getDouble("y"), ur.getDouble("y"))); + return bb; } @@ -1025,28 +1039,25 @@ //3 3mefe722uemyoa0czmkkw6hjb // static void addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos) -public static Object addXLabel(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("as13cbda9pe3uxi34emdcyw49"); // addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("47i4tbdfy05npmfnxoa2ljezv"); // if (initObj) { -UNSUPPORTED("4brnnjtxt9czl9vlvf1hi62hq"); // objp->sz.x = 0; -UNSUPPORTED("8vps14u07wyyud2ryypqvjgog"); // objp->sz.y = 0; -UNSUPPORTED("eiw9ykn654ml54rs1bw0lf55b"); // objp->pos = pos; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { +public static void addXLabel(textlabel_t lp, __ptr__ objp, __ptr__ xlp, int initObj, __struct__ pos) { + addXLabel_(lp, objp, xlp, initObj, pos.copy()); +} +private static void addXLabel_(textlabel_t lp, __ptr__ objp, __ptr__ xlp, int initObj, __struct__ pos) { +if (initObj!=0) { + objp.getStruct("sz").setDouble("x", 0); + objp.getStruct("sz").setDouble("y", 0); + objp.setStruct("pos", pos); +} +if (Z.z().Flip) { UNSUPPORTED("99tzt7erbvtfsbo0jbdz0lc8m"); // xlp->sz.x = lp->dimen.y; UNSUPPORTED("6v5t3ysaisj27bwc0r9zg3rpd"); // xlp->sz.y = lp->dimen.x; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { -UNSUPPORTED("3fr3ccpgshd8wywufcfat4rf5"); // xlp->sz = lp->dimen; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("jd8wxj8hvqwupmayd743a386"); // xlp->lbl = lp; -UNSUPPORTED("1z3b8kb1emm8lvcqvu8sm8r7j"); // xlp->set = 0; -UNSUPPORTED("a1r2pwxgnrpltol41p04axtld"); // objp->lbl = xlp; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); +} +else { + xlp.setStruct("sz", lp.getStruct("dimen")); +} +xlp.setPtr("lbl", lp); +xlp.setInt("set", 0); +objp.setPtr("lbl", xlp); } @@ -1054,25 +1065,28 @@ //3 dwxd5kvlanbcxqfuncjg0ea54 // static boxf addLabelObj (textlabel_t* lp, object_t* objp, boxf bb) -public static Object addLabelObj(Object... arg) { -UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf -UNSUPPORTED("9yg6tco97jfdkxvya77inw8xx"); // addLabelObj (textlabel_t* lp, object_t* objp, boxf bb) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { +public static __struct__ addLabelObj(textlabel_t lp, __ptr__ objp, __struct__ bb) { + // WARNING!! STRUCT + return addLabelObj_(lp, objp, bb.copy()).copy(); +} +private static __struct__ addLabelObj_(textlabel_t lp, __ptr__ objp, __struct__ bb) { + ENTERING("b8tjygxnwny5qoiir1mha1d62","map_point"); + try { + if (Z.z().Flip) { UNSUPPORTED("6z2yrwq81gtsk3q9c5pofow1x"); // objp->sz.x = lp->dimen.y; UNSUPPORTED("8xsm9kavrekjrsydqe1wh1pu"); // objp->sz.y = lp->dimen.x; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { -UNSUPPORTED("40zw1ce6j4iw8dzvp9musrk6g"); // objp->sz.x = lp->dimen.x; -UNSUPPORTED("3kmv74u3ihq63ptaixci1tlt5"); // objp->sz.y = lp->dimen.y; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("ekb3vmkpcdegpnlbuvebyijm8"); // objp->pos = lp->pos; -UNSUPPORTED("6c49iw60twquhten0558iva1c"); // objp->pos.x -= (objp->sz.x) / 2.0; -UNSUPPORTED("alrfakfz0nqemd3xl3m9q2gm4"); // objp->pos.y -= (objp->sz.y) / 2.0; -UNSUPPORTED("5r3oym45e21gwxn3nsjucxlbi"); // return adjustBB(objp, bb); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); + } + else { + objp.getPtr("sz").setDouble("x", lp.getStruct("dimen").getDouble("x")); + objp.getPtr("sz").setDouble("y", lp.getStruct("dimen").getDouble("y")); + } + objp.setStruct("pos", lp.getStruct("pos")); + objp.getStruct("pos").setDouble("x", objp.getStruct("pos").getDouble("x") - (objp.getStruct("sz").getDouble("x") / 2.0 )); + objp.getStruct("pos").setDouble("y", objp.getStruct("pos").getDouble("y") - (objp.getStruct("sz").getDouble("y") / 2.0 )); + return adjustBB(objp, bb); + } finally { + LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point"); + } } @@ -1080,25 +1094,28 @@ //3 b8tjygxnwny5qoiir1mha1d62 // static boxf addNodeObj (node_t* np, object_t* objp, boxf bb) -public static Object addNodeObj(Object... arg) { -UNSUPPORTED("d5qt6s97burjfu5qe0oxyyrmr"); // static boxf -UNSUPPORTED("cdh6qqtv45t605q7je7xomi2j"); // addNodeObj (node_t* np, object_t* objp, boxf bb) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("7e3xcf5dxjm2knry7yygcx3zv"); // if (Flip) { -UNSUPPORTED("1ri5uimcd1z58iix8tp528l1m"); // objp->sz.x = ((ND_height(np))*(double)72); -UNSUPPORTED("6r5gwwhz3sjxrssh8yo3v5c3v"); // objp->sz.y = ((ND_width(np))*(double)72); -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { -UNSUPPORTED("6cuxjl9g4nxwyz58c201qdb94"); // objp->sz.x = ((ND_width(np))*(double)72); -UNSUPPORTED("e3zk2j9kbexxv2xbsgu3pser6"); // objp->sz.y = ((ND_height(np))*(double)72); -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("d6gkdf4gkfagwtb6mkhxxvqrc"); // objp->pos = ND_coord(np); -UNSUPPORTED("6c49iw60twquhten0558iva1c"); // objp->pos.x -= (objp->sz.x) / 2.0; -UNSUPPORTED("alrfakfz0nqemd3xl3m9q2gm4"); // objp->pos.y -= (objp->sz.y) / 2.0; -UNSUPPORTED("5r3oym45e21gwxn3nsjucxlbi"); // return adjustBB(objp, bb); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); +public static __struct__ addNodeObj(Agnode_s np, __ptr__ objp, __struct__ bb) { + // WARNING!! STRUCT + return addNodeObj_(np, objp, bb.copy()).copy(); +} +public static __struct__ addNodeObj_(Agnode_s np, __ptr__ objp, __struct__ bb) { +ENTERING("b8tjygxnwny5qoiir1mha1d62","map_point"); +try { + if (Z.z().Flip) { + UNSUPPORTED("1ri5uimcd1z58iix8tp528l1m"); // objp->sz.x = ((ND_height(np))*(double)72); + UNSUPPORTED("6r5gwwhz3sjxrssh8yo3v5c3v"); // objp->sz.y = ((ND_width(np))*(double)72); + } + else { + objp.getPtr("sz").setDouble("x", ((ND_width(np))*(double)72)); + objp.getPtr("sz").setDouble("y", ((ND_height(np))*(double)72)); + } + objp.setPtr("pos", ND_coord(np)); + objp.getPtr("pos").setDouble("x", objp.getPtr("pos").getDouble("x") - objp.getPtr("sz").getDouble("x") / 2.0); + objp.getPtr("pos").setDouble("y", objp.getPtr("pos").getDouble("y") - objp.getPtr("sz").getDouble("y") / 2.0); + return adjustBB(objp, bb); +} finally { + LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point"); +} } @@ -1163,10 +1180,10 @@ final __struct__ ur = JUtils.from(pointf.class); textlabel_t lp; final __struct__ params = JUtils.from(label_params_t.class); - object_t objs; - xlabel_t lbls; - object_t objp; - xlabel_t xlp; + __ptr__ objs; + __ptr__ lbls; + __ptr__ objp; + __ptr__ xlp; Agsym_s force; int et = (GD_flags(gp) & (7 << 1)); if (N(GD_has_labels(gp) & (1 << 4)) && @@ -1175,56 +1192,59 @@ N(GD_has_labels(gp) & (1 << 1)) && (N(GD_has_labels(gp) & (1 << 0)) || Z.z().EdgeLabelsDone!=0)) return; -UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { -UNSUPPORTED("eezvruvdh9ueqsgad8k5xzbqi"); // if (ND_xlabel(np)) { + for (np = agfstnode(gp); np!=null; np = agnxtnode(gp, np)) { + if (ND_xlabel(np)!=null) { UNSUPPORTED("6oje33bnpp4jv5mclsrrhl005"); // if (ND_xlabel(np)->set) UNSUPPORTED("cfkrw6t4lrs7dfgx86sgrz26"); // n_set_lbls++; UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else UNSUPPORTED("26eewzzknvqt2nbcrqds5fmti"); // n_nlbls++; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { -UNSUPPORTED("9c5vwy3kfweqsgk827cpj3d6q"); // if (ED_xlabel(ep)) { + } + for (ep = agfstout(gp, np); ep!=null; ep = agnxtout(gp, ep)) { + if (ED_xlabel(ep)!=null) { UNSUPPORTED("appkettxihy2o612jk6fahbnh"); // if (ED_xlabel(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("1mk50yh8pbs8jzn7h8otaonfd"); // if (ED_head_label(ep)) { -UNSUPPORTED("4xstfnjw4gi0ja4inv8o0n8z"); // if (ED_head_label(ep)->set) -UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; -UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) -UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("4micw28bcx68bfiqihi9ruani"); // if (ED_tail_label(ep)) { + } + if (ED_head_label(ep)!=null) { + if (ED_head_label(ep).getBoolean("set")) + n_set_lbls++; + else if (((et != (0 << 1)) && (ED_spl(ep) != null))) + n_elbls++; + } + if (ED_tail_label(ep)!=null) { UNSUPPORTED("abwl715n01quq34u2qs1kn9xn"); // if (ED_tail_label(ep)->set) UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("92f340ohb0u21xl6jgpc2hieo"); // if (ED_label(ep)) { -UNSUPPORTED("5skvrpmqqjq5cj6a8uiylmjsw"); // if (ED_label(ep)->set) -UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++; -UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) -UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("2uqg2vrduqxs9hk9hmamj7wlu"); // if (GD_has_labels(gp) & (1 << 3)) + } + if (ED_label(ep)!=null) { + if (ED_label(ep).getBoolean("set")) + n_set_lbls++; + else if (((et != (0 << 1)) && (ED_spl(ep) != null))) + n_elbls++; + } + } + } + if ((GD_has_labels(gp) & (1 << 3))!=0) UNSUPPORTED("4z3bgexjlrmdrfgpdaajems8q"); // n_clbls = countClusterLabels (gp); -UNSUPPORTED("19labxj7f93ljlhkpmrde0zgt"); // /* A label for each unpositioned external label */ -UNSUPPORTED("5kla6rwar4q1ig2olguocajn6"); // n_lbls = n_nlbls + n_elbls; -UNSUPPORTED("apjqar4agmf5jlfd88kbn4f4d"); // if (n_lbls == 0) return; -UNSUPPORTED("4j54hc42lgojcuorb9p42tlr"); // /* An object for each node, each positioned external label, any cluster label, -UNSUPPORTED("adxf9gd6tasafb302px9vqgum"); // * and all unset edge labels and xlabels. -UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ -UNSUPPORTED("6id92o3db6qu5zuuj8q40n3zn"); // n_objs = agnnodes(gp) + n_set_lbls + n_clbls + n_elbls; -UNSUPPORTED("3e10kvi719e134x675xgwi1tj"); // objp = objs = (object_t*)zmalloc((n_objs)*sizeof(object_t)); -UNSUPPORTED("6z86cmeenod2nx8ej72n0qotk"); // xlp = lbls = (xlabel_t*)zmalloc((n_lbls)*sizeof(xlabel_t)); -UNSUPPORTED("f2nzvg1xnr11v28w2feg923cs"); // bb.LL = pointfof(INT_MAX, INT_MAX); -UNSUPPORTED("7tttoj8cnxfqgnq2aagnnav48"); // bb.UR = pointfof(-INT_MAX, -INT_MAX); -UNSUPPORTED("27ppdplfezcqw6rdrkzyrr8yg"); // for (np = agfstnode(gp); np; np = agnxtnode(gp, np)) { -UNSUPPORTED("38hh82sue091x6ybm9e34wy61"); // bb = addNodeObj (np, objp, bb); -UNSUPPORTED("ex5hwora23t1cl8hpjo4uvphm"); // if ((lp = ND_xlabel(np))) { + /* A label for each unpositioned external label */ + n_lbls = n_nlbls + n_elbls; + if (n_lbls == 0) return; + /* An object for each node, each positioned external label, any cluster label, + * and all unset edge labels and xlabels. + */ + n_objs = agnnodes(gp) + n_set_lbls + n_clbls + n_elbls; + objs = zmalloc(sizeof(object_t.class, n_objs)); + objp = objs; + lbls = zmalloc(sizeof(xlabel_t.class, n_lbls)); + xlp = lbls; + bb.setStruct("LL", pointfof(INT_MAX, INT_MAX)); + bb.setStruct("UR", pointfof(-INT_MAX, -INT_MAX)); + for (np = agfstnode(gp); np!=null; np = agnxtnode(gp, np)) { + bb.___(addNodeObj (np, objp, bb)); + lp = ND_xlabel(np); + if (lp != null) { UNSUPPORTED("d5pjy3dwui27jfdz550cy0cln"); // if (lp->set) { UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; UNSUPPORTED("3zy3jhlqyioeyh9mlrspjjgc6"); // bb = addLabelObj (lp, objp, bb); @@ -1233,28 +1253,30 @@ UNSUPPORTED("2msn58w2dse7pbq2esv7awk4r"); // addXLabel (lp, objp, xlp, 0, ur); UNSUPPORTED("1zpq9rd3nn9kjrmun8ivs9zx5"); // xlp++; UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("bhbvoj12subdn6905juhiubo2"); // objp++; -UNSUPPORTED("41dpbku41lh3gpb30ds9ex6aa"); // for (ep = agfstout(gp, np); ep; ep = agnxtout(gp, ep)) { -UNSUPPORTED("9zaprre819fwswan5wvid0h6g"); // if ((lp = ED_label(ep))) { -UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { -UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { + } + objp = objp.plus(1); + for (ep = agfstout(gp, np); ep!=null; ep = agnxtout(gp, ep)) { + lp = ED_label(ep); + if (lp != null) { + if (lp.getBoolean("set")) { + bb.___(addLabelObj (lp, objp, bb)); + } + else if (((et != (0 << 1)) && (ED_spl(ep) != null))) { UNSUPPORTED("9ffmrymv8cg4h4b3ea97t9qbp"); // addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { +} +else { UNSUPPORTED("3ia66n3hqrwmh3hybkoh6f8wa"); // agerr(AGWARN, "no position for edge with label %s", UNSUPPORTED("9npeksy1st7v005znerttzzzv"); // ED_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("d23ocobgp22a33eopdnqe9o4u"); // objp++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("a5mn7dpum21w95ku1l27m9rpk"); // if ((lp = ED_tail_label(ep))) { -UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { +} +objp = objp.plus(1); + } + lp = ED_tail_label(ep); + if (lp != null) { +if (lp.getBoolean("set")) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } +} UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { UNSUPPORTED("bqc6ukxlmt6l3osbpsmqbzutc"); // addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep)); UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; @@ -1264,24 +1286,26 @@ UNSUPPORTED("cf9qaysecgkvv4165la4uu6cb"); // ED_tail_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("6rvkuvq5nj7p2za2zqxf74l3c"); // if ((lp = ED_head_label(ep))) { -UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { + objp = objp.plus(1); + } + lp = ED_head_label(ep); + if (lp != null) { +if (lp.getBoolean("set")) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) { -UNSUPPORTED("7gewvtwwzj3unxzrtbqpwduzg"); // addXLabel (lp, objp, xlp, 1, edgeHeadpoint(ep)); -UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++; -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else { +} +else if (((et != (0 << 1)) && (ED_spl(ep) != null))) { +addXLabel (lp, objp, xlp, 1, edgeHeadpoint(ep)); +xlp = xlp.plus(1); +} +else { UNSUPPORTED("8nrkavpg9ifts9yylhfijn9rp"); // agerr(AGWARN, "no position for edge with head label %s", UNSUPPORTED("a5omwtwd411hsfrc37d8t6m8b"); // ED_head_label(ep)->text); UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("1pb88fhz51khiwboqgii8qayw"); // if ((lp = ED_xlabel(ep))) { +} + objp = objp.plus(1); + } + lp = ED_xlabel(ep); + if (lp != null) { UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) { UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb); UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } @@ -1295,20 +1319,20 @@ UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue; UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("5zntyu3vcfnjveucnumrmbjig"); // if (n_clbls) { + } + } +} +if (n_clbls!=0) { UNSUPPORTED("48ipxdlv7xlti99g0yhi5zuai"); // cinfo_t info; UNSUPPORTED("7c5iohb8t706p273ae1lxal8r"); // info.bb = bb; UNSUPPORTED("b1474fakrbyw7p5ja42jgv90c"); // info.objp = objp; UNSUPPORTED("6ygw8idplugc5u6w7ro3gakmb"); // info = addClusterObj (gp, info); UNSUPPORTED("1l2cwgzediv4hztjhtm052rl3"); // bb = info.bb; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("79ifzl4zpx3wbd5szboa2x2vb"); // force = (agattr(gp,AGRAPH,"forcelabels",NULL)); -UNSUPPORTED("1if7tdbcs4rwvb0polsdlbfh4"); // params.force = late_bool(gp, force, NOT(0)); -UNSUPPORTED("2ol916ffwy0e2vxinxn4v4sgt"); // params.bb = bb; -UNSUPPORTED("25rb35acbkepp55u3bkjxb1gc"); // placeLabels(objs, n_objs, lbls, n_lbls, ¶ms); +} +force = (agattr(gp,AGRAPH,new CString("forcelabels"),null)); +params.setBoolean("force", late_bool(gp, force, 1)); +params.setStruct("bb", bb); +placeLabels(objs, n_objs, lbls, n_lbls, params.amp()); UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose) UNSUPPORTED("4iypau1fdov37qnq2ub6iq5ra"); // printData(objs, n_objs, lbls, n_lbls, ¶ms); UNSUPPORTED("52mefujap7scy273ud7nyj9hn"); // xlp = lbls; diff -Nru plantuml-1.2017.15/src/gen/lib/common/routespl__c.java plantuml-1.2018.9/src/gen/lib/common/routespl__c.java --- plantuml-1.2017.15/src/gen/lib/common/routespl__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/routespl__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -80,6 +80,7 @@ import smetana.core.Z; import smetana.core.__array_of_ptr__; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -765,8 +766,8 @@ ENTERING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute"); try { final __struct__ pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class); - final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2); - final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2); + final __array_of_struct__ eps = __array_of_struct_impl__.malloc(pointf.class, 2); + final __array_of_struct__ evs = __array_of_struct_impl__.malloc(pointf.class, 2); int i; eps.plus(0).setDouble("x", tp.getDouble("x")); eps.plus(0).setDouble("y", tp.getDouble("y")); @@ -857,7 +858,7 @@ try { int bi, si, splinepi; double t; - final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4); int num_div = delta * boxn; for (splinepi = 0; splinepi + 3 < pn; splinepi += 3) { for (si = 0; si <= num_div; si++) { @@ -906,8 +907,8 @@ final __struct__ poly = JUtils.from(Ppoly_t.class); final __struct__ pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class); int splinepi; - final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2); - final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2); + final __array_of_struct__ eps = __array_of_struct_impl__.malloc(pointf.class, 2); + final __array_of_struct__ evs = __array_of_struct_impl__.malloc(pointf.class, 2); int edgei, prev, next; int pi=0, bi; __array_of_ptr__ boxes; @@ -1249,8 +1250,12 @@ bb.getStruct("UR").setDouble("x", xy); r = 0; } - else if (d == 1) -UNSUPPORTED("eg1w87s0blk4i583rqumhmv6n"); // xy = ba.getStruct("UR").getDouble("y"), ba.getStruct("UR").getDouble("y") = bb.getStruct("LL").getDouble("y"), bb.getStruct("LL").getDouble("y") = xy, d = 0; + else if (d == 1) { + xy = (int)(ba.getStruct("UR").getDouble("y")); + ba.getStruct("UR").setDouble("y", bb.getStruct("LL").getDouble("y")); + bb.getStruct("LL").setDouble("y", xy); + d = 0; + } else if (u == 1) UNSUPPORTED("5kcd52bwvbxxs0md0enfs100u"); // xy = ba.getStruct("LL").getDouble("y"), ba.getStruct("LL").getDouble("y") = bb.getStruct("UR").getDouble("y"), bb.getStruct("UR").getDouble("y") = xy, u = 0; for (i = 0; i < errs - 1; i++) { diff -Nru plantuml-1.2017.15/src/gen/lib/common/splines__c.java plantuml-1.2018.9/src/gen/lib/common/splines__c.java --- plantuml-1.2017.15/src/gen/lib/common/splines__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/splines__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -99,6 +99,7 @@ import smetana.core.JUtils; import smetana.core.MutableDouble; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -793,8 +794,8 @@ public static void bezier_clip(__ptr__ inside_context, __ptr__ inside, __array_of_struct__ sp, boolean left_inside) { ENTERING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip"); try { - final __array_of_struct__ seg = __array_of_struct__.malloc(pointf.class, 4); - final __array_of_struct__ best = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ seg = __array_of_struct_impl__.malloc(pointf.class, 4); + final __array_of_struct__ best = __array_of_struct_impl__.malloc(pointf.class, 4); final __struct__ pt = JUtils.from(pointf.class), opt = JUtils.from(pointf.class); __ptr__ left, right; final MutableDouble low = new MutableDouble(0), high = new MutableDouble(0); @@ -852,7 +853,7 @@ try { int i; double save_real_size; - final __array_of_struct__ c = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ c = __array_of_struct_impl__.malloc(pointf.class, 4); save_real_size = ND_rw(n); for (i = 0; i < 4; i++) { c.plus(i).setDouble("x", curve.plus(i).getDouble("x") - ND_coord(n).getDouble("x")); @@ -1001,7 +1002,7 @@ break; arrow_clip(fe, hn, ps, start, end, newspl, info); for (i = start[0]; i < end[0] + 4; ) { - final __array_of_struct__ cp = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ cp = __array_of_struct_impl__.malloc(pointf.class, 4); newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct()); cp.plus(0).setStruct(ps.plus(i).getStruct()); i++; @@ -1716,7 +1717,7 @@ final ST_pointf tp = new ST_pointf(), hp = new ST_pointf(), np = new ST_pointf(); Agnode_s n; Agedge_s e; - final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 1000); + final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 1000); int pointn; e = (Agedge_s) edges.plus(ind).getPtr(); n = agtail(e); diff -Nru plantuml-1.2017.15/src/gen/lib/common/utils__c.java plantuml-1.2018.9/src/gen/lib/common/utils__c.java --- plantuml-1.2017.15/src/gen/lib/common/utils__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/common/utils__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -68,6 +68,7 @@ import static smetana.core.JUtils.tolower; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; +import static smetana.core.Macro.ED_head_label; import static smetana.core.Macro.ED_head_port; import static smetana.core.Macro.ED_label; import static smetana.core.Macro.ED_label_ontop; @@ -94,6 +95,7 @@ import h.Agnode_s; import h.Agraph_s; import h.Agsym_s; +import h.ST_Agsym_s; import h.ST_boxf; import h.ST_port; import h.boxf; @@ -109,6 +111,7 @@ import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -932,11 +935,9 @@ //3 87ifze04q7qzigjj1fb9y9by2 // boolean late_bool(void *obj, attrsym_t * attr, int def) -public static Object late_bool(Object... arg) { -UNSUPPORTED("4p67t5j48pxpmswky3dw3s392"); // boolean late_bool(void *obj, attrsym_t * attr, int def) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("183nee60g5fytepk82gop4u8s"); // if (attr == (void *)0) -UNSUPPORTED("1jfc1szr9lzyizq62jp9jz7ah"); // return def; +public static boolean late_bool(__ptr__ obj, Agsym_s attr, int def) { +if (attr == null) + return def!=0; UNSUPPORTED("a0kh1y5n8u59z0xo7mag3zmt6"); // return mapbool(agxget(obj, attr)); UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } @@ -1074,12 +1075,12 @@ ENTERING("6p0ey2c2ujk2o7h221p0b4xon","Bezier"); try { int i, j; /* Index variables */ - final __array_of_struct__ Vtemp[] = new __array_of_struct__[] { __array_of_struct__.malloc(pointf.class, 5+1), - __array_of_struct__.malloc(pointf.class, 5+1), - __array_of_struct__.malloc(pointf.class, 5+1), - __array_of_struct__.malloc(pointf.class, 5+1), - __array_of_struct__.malloc(pointf.class, 5+1), - __array_of_struct__.malloc(pointf.class, 5+1) }; + final __array_of_struct__ Vtemp[] = new __array_of_struct__[] { __array_of_struct_impl__.malloc(pointf.class, 5+1), + __array_of_struct_impl__.malloc(pointf.class, 5+1), + __array_of_struct_impl__.malloc(pointf.class, 5+1), + __array_of_struct_impl__.malloc(pointf.class, 5+1), + __array_of_struct_impl__.malloc(pointf.class, 5+1), + __array_of_struct_impl__.malloc(pointf.class, 5+1) }; /* Copy control points */ for (j = 0; j <= degree; j++) { Vtemp[0].plus(j).setStruct(V.plus(j).getStruct()); @@ -1500,18 +1501,16 @@ //3 ak3pxrdrq900wymudwnjmbito // static void initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi, struct fontinfo *lfi) -public static Object initFontLabelEdgeAttr(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("64kdcuymwqrq619sxnmgnuyal"); // initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi, -UNSUPPORTED("rd78u02b7ldtc7gt7aw5t8fz"); // struct fontinfo *lfi) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("9rkwm6oonv051kf4hnage0877"); // if (!fi->fontname) initFontEdgeAttr(e, fi); -UNSUPPORTED("aok5f09eydgwsqtsl0xmmhft"); // lfi->fontsize = late_double(e, E_labelfontsize, fi->fontsize, 1.0); -UNSUPPORTED("aviu0lhq8s4ez3n8cil4bwac6"); // lfi->fontname = late_nnstring(e, E_labelfontname, fi->fontname); -UNSUPPORTED("75il36n46r24ag5njqgshp8xz"); // lfi->fontcolor = late_nnstring(e, E_labelfontcolor, fi->fontcolor); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); +public static void initFontLabelEdgeAttr(Agedge_s e, fontinfo fi, fontinfo lfi) { +ENTERING("ak3pxrdrq900wymudwnjmbito","initFontLabelEdgeAttr"); +try { + if (N(fi.getPtr("fontname"))) initFontEdgeAttr(e, fi); + lfi.setDouble("fontsize", late_double(e, Z.z().E_labelfontsize, fi.getDouble("fontsize"), 1.0)); + lfi.setPtr("fontname", late_nnstring(e, Z.z().E_labelfontname, fi.getCString("fontname"))); + lfi.setPtr("fontcolor", late_nnstring(e, Z.z().E_labelfontcolor, fi.getCString("fontcolor"))); +} finally { +LEAVING("ak3pxrdrq900wymudwnjmbito","initFontLabelEdgeAttr"); +} } @@ -1599,10 +1598,10 @@ } /* vladimir */ if (Z.z().E_headlabel!=null && (str = agxget(e, Z.z().E_headlabel))!=null && (str.charAt(0)!='\0')) { -UNSUPPORTED("cgznvdnh671wl8jq8q3tyhv1r"); // initFontLabelEdgeAttr(e, &fi, &lfi); -UNSUPPORTED("6nfh8swason2akjp45hm0o5b0"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->head_label) = make_label((void*)e, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)), -UNSUPPORTED("eu3ztkfva2x87y72tnu7vv4re"); // lfi.fontsize, lfi.fontname, lfi.fontcolor); -UNSUPPORTED("axtvdewh7zhtm1diu8c6dprx4"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->has_labels) |= (1 << 1); + initFontLabelEdgeAttr(e, fi.amp(), lfi.amp()); + ED_head_label(e, make_label(e, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)), + lfi.getDouble("fontsize"), lfi.getCString("fontname"), lfi.getCString("fontcolor"))); + GD_has_labels(sg, GD_has_labels(sg) | (1 << 1)); } if (Z.z().E_taillabel!=null && (str = agxget(e, Z.z().E_taillabel))!=null && (str.charAt(0)!='\0')) { UNSUPPORTED("6y6e1y496y6j6a6065nfesr8o"); // if (!lfi.fontname) diff -Nru plantuml-1.2017.15/src/gen/lib/dotgen/decomp__c.java plantuml-1.2018.9/src/gen/lib/dotgen/decomp__c.java --- plantuml-1.2017.15/src/gen/lib/dotgen/decomp__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/dotgen/decomp__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -76,6 +76,7 @@ import smetana.core.JUtils; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__struct__; public class decomp__c { @@ -790,7 +791,7 @@ ENTERING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component"); try { int c, i; - __array_of_struct__ vec = __array_of_struct__.malloc(elist.class, 4); + __array_of_struct__ vec = __array_of_struct_impl__.malloc(elist.class, 4); Agnode_s other; Agedge_s e; add_to_component(n); diff -Nru plantuml-1.2017.15/src/gen/lib/dotgen/dotsplines__c.java plantuml-1.2018.9/src/gen/lib/dotgen/dotsplines__c.java --- plantuml-1.2017.15/src/gen/lib/dotgen/dotsplines__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/dotgen/dotsplines__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -143,6 +143,7 @@ import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; @@ -1716,7 +1717,7 @@ final __struct__ poly = JUtils.from(Ppoly_t.class); int pn[] = new int[1]; Agedge_s e = (Agedge_s) edges.plus(ind).getPtr(); - final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10); + final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 10); final __struct__ tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class); int i, pointn; double leftend, rightend, ctrx=0, ctry=0, miny, maxy; @@ -1865,7 +1866,7 @@ ENTERING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat"); try { Agedge_s e = (Agedge_s) edges.plus(ind).getPtr(); - final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10); + final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 10); final __struct__ tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class); int i, pointn; double stepy, dy; @@ -2109,7 +2110,7 @@ int boxn, i, ydelta; int pn[] = new int[1]; Agedge_s f; - final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 7); + final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 7); tn = agtail(e); hn = aghead(e); for (f = ED_to_virt(e); ED_to_virt(f)!=null; f = ED_to_virt(f)); diff -Nru plantuml-1.2017.15/src/gen/lib/gvc/gvc__c.java plantuml-1.2018.9/src/gen/lib/gvc/gvc__c.java --- plantuml-1.2017.15/src/gen/lib/gvc/gvc__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/gvc/gvc__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,8 +45,9 @@ */ package gen.lib.gvc; import static gen.lib.cgraph.attr__c.agattr; -import static gen.lib.gvc.gvconfig__c.gvconfig; +import static gen.lib.common.textspan__c.textfont_dict_open; import static gen.lib.gvc.gvcontext__c.gvNEWcontext; +import static gen.lib.gvc.gvtextlayout__c.gvtextlayout_select; import static smetana.core.JUtilsDebug.ENTERING; import static smetana.core.JUtilsDebug.LEAVING; import static smetana.core.Macro.AGNODE; @@ -167,7 +168,10 @@ agattr(null, AGNODE, new CString("label"), new CString("\\N")); /* default to no builtins, demand loading enabled */ gvc = (GVC_s) gvNEWcontext(null, (NOT(0))); - gvconfig(gvc, false); /* configure for available plugins */ + /* builtins don't require LTDL */ + gvc.setInt("config_found", 0); + gvtextlayout_select(gvc); /* choose best available textlayout plugin immediately */ + textfont_dict_open(gvc); /* initialize font dict */ return gvc; } finally { LEAVING("f3vdhir2c7dz3pvmx9d3m4lx1","gvContext"); diff -Nru plantuml-1.2017.15/src/gen/lib/gvc/gvconfig__c.java plantuml-1.2018.9/src/gen/lib/gvc/gvconfig__c.java --- plantuml-1.2017.15/src/gen/lib/gvc/gvconfig__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/gvc/gvconfig__c.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of Smetana. - * Smetana is a partial translation of Graphviz/Dot sources from C to Java. - * - * (C) Copyright 2009-2017, Arnaud Roques - * - * This translation is distributed under the same Licence as the original C program: - * - ************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - ************************************************************************* - * - * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC - * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] - * - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - * - * You may obtain a copy of the License at - * - * http://www.eclipse.org/legal/epl-v10.html - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package gen.lib.gvc; -import static gen.lib.common.textspan__c.textfont_dict_open; -import static gen.lib.gvc.gvtextlayout__c.gvtextlayout_select; -import static smetana.core.JUtilsDebug.ENTERING; -import static smetana.core.JUtilsDebug.LEAVING; -import static smetana.core.Macro.UNSUPPORTED; -import h.GVC_s; -import h.lt_symlist_t; -import smetana.core.CString; - -public class gvconfig__c { -//1 2digov3edok6d5srhgtlmrycs -// extern lt_symlist_t lt_preloaded_symbols[] - - -//1 baedz5i9est5csw3epz3cv7z -// typedef Ppoly_t Ppolyline_t - - -//1 9k44uhd5foylaeoekf3llonjq -// extern Dtmethod_t* Dtset - - -//1 1ahfywsmzcpcig2oxm7pt9ihj -// extern Dtmethod_t* Dtbag - - -//1 anhghfj3k7dmkudy2n7rvt31v -// extern Dtmethod_t* Dtoset - - -//1 5l6oj1ux946zjwvir94ykejbc -// extern Dtmethod_t* Dtobag - - -//1 2wtf222ak6cui8cfjnw6w377z -// extern Dtmethod_t* Dtlist - - -//1 d1s1s6ibtcsmst88e3057u9r7 -// extern Dtmethod_t* Dtstack - - -//1 axa7mflo824p6fspjn1rdk0mt -// extern Dtmethod_t* Dtqueue - - -//1 ega812utobm4xx9oa9w9ayij6 -// extern Dtmethod_t* Dtdeque - - -//1 cyfr996ur43045jv1tjbelzmj -// extern Dtmethod_t* Dtorder - - -//1 wlofoiftbjgrrabzb2brkycg -// extern Dtmethod_t* Dttree - - -//1 12bds94t7voj7ulwpcvgf6agr -// extern Dtmethod_t* Dthash - - -//1 9lqknzty480cy7zsubmabkk8h -// extern Dtmethod_t _Dttree - - -//1 bvn6zkbcp8vjdhkccqo1xrkrb -// extern Dtmethod_t _Dthash - - -//1 9lidhtd6nsmmv3e7vjv9e10gw -// extern Dtmethod_t _Dtlist - - -//1 34ujfamjxo7xn89u90oh2k6f8 -// extern Dtmethod_t _Dtqueue - - -//1 3jy4aceckzkdv950h89p4wjc8 -// extern Dtmethod_t _Dtstack - - -//1 8dfqgf3u1v830qzcjqh9o8ha7 -// extern Agmemdisc_t AgMemDisc - - -//1 18k2oh2t6llfsdc5x0wlcnby8 -// extern Agiddisc_t AgIdDisc - - -//1 a4r7hi80gdxtsv4hdoqpyiivn -// extern Agiodisc_t AgIoDisc - - -//1 bnzt5syjb7mgeru19114vd6xx -// extern Agdisc_t AgDefaultDisc - - -//1 35y2gbegsdjilegaribes00mg -// extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected - - -//1 c2rygslq6bcuka3awmvy2b3ow -// typedef Agsubnode_t Agnoderef_t - - -//1 xam6yv0dcsx57dtg44igpbzn -// typedef Dtlink_t Agedgeref_t - - - - -//3 btaticnvqvav6giyqk5dhvl0b -// static gvplugin_package_t * gvplugin_package_record(GVC_t * gvc, char *path, char *name) -public static Object gvplugin_package_record(Object... arg) { -UNSUPPORTED("d0v4w7mmhzyohr3cydmk39msc"); // static gvplugin_package_t * gvplugin_package_record(GVC_t * gvc, char *path, char *name) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("3l201ckgkdpkadl64dgd5t34a"); // gvplugin_package_t *package = gmalloc(sizeof(gvplugin_package_t)); -UNSUPPORTED("e1ux222fnf2pzhlllspc0n9z6"); // package->path = (path) ? strdup(path) : NULL; -UNSUPPORTED("6tx9kbkb680t4nrzo9h6wmxt7"); // package->name = strdup(name); -UNSUPPORTED("2ddoa0el03kdry52dvxdp02xi"); // package->next = gvc->packages; -UNSUPPORTED("2wtcp1phunrqzsy2eyeelnisd"); // gvc->packages = package; -UNSUPPORTED("1cvdn1usbhmpxzhmfo5t0qhv0"); // return package; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 7b32j8w9cd211oy7f26zd2ld6 -// void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplugin_library_t *library) -public static Object gvconfig_plugin_install_from_library(Object... arg) { -UNSUPPORTED("9qlio5kiswebv40u9nmcxh1um"); // void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplugin_library_t *library) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1tb07tzg54jallfz0upl62c1g"); // gvplugin_api_t *apis; -UNSUPPORTED("2ihbo5t1nbmg4dq1qvwi9sqoh"); // gvplugin_installed_t *types; -UNSUPPORTED("as58mgqb4uw4c8n4sdq7m0qz3"); // gvplugin_package_t *package; -UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; -UNSUPPORTED("21xt0dglbm2xme4gg1b8b9tfl"); // package = gvplugin_package_record(gvc, path, library->packagename); -UNSUPPORTED("44g9muiwx72zahb9xx5xzmfyv"); // for (apis = library->apis; (types = apis->types); apis++) { -UNSUPPORTED("bslr2lh149d2y32qozijhg1pj"); // for (i = 0; types[i].type; i++) { -UNSUPPORTED("7xl5c8mkdfmtazqddql72rl4l"); // gvplugin_install(gvc, apis->api, types[i].type, -UNSUPPORTED("81elyir1t9mhizwx6bh2dy6fc"); // types[i].quality, package, &types[i]); -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 a0u25p4ndz2d3mpylo4jnz9cc -// static void gvconfig_plugin_install_builtins(GVC_t * gvc) -public static void gvconfig_plugin_install_builtins(GVC_s gvc) { -ENTERING("a0u25p4ndz2d3mpylo4jnz9cc","gvconfig_plugin_install_builtins"); -try { - lt_symlist_t s; - CString name; - if (gvc.getStruct("common").getPtr("builtins") == null) return; -UNSUPPORTED("5h6ty7bll7yb1rvxiy8b1a17y"); // for (s = gvc->common.builtins; (name = s->name); s++) -UNSUPPORTED("efvffxomvrmz7nbrcbcvananw"); // if (name[0] == 'g' && strstr(name, "_LTX_library")) -UNSUPPORTED("95pie5przmmzrwnym8ye97v2e"); // gvconfig_plugin_install_from_library(gvc, NULL, -UNSUPPORTED("ezsy5hnc71vs70pla8x24w5py"); // (gvplugin_library_t *)(s->address)); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} finally { -LEAVING("a0u25p4ndz2d3mpylo4jnz9cc","gvconfig_plugin_install_builtins"); -} -} - - - - -//3 f5fyxnkmknydgjt6dtc035z9w -// void gvconfig(GVC_t * gvc, boolean rescan) -public static void gvconfig(GVC_s gvc, boolean rescan) { -ENTERING("f5fyxnkmknydgjt6dtc035z9w","gvconfig"); -try { - /* builtins don't require LTDL */ - gvconfig_plugin_install_builtins(gvc); - gvc.setInt("config_found", 0); - gvtextlayout_select(gvc); /* choose best available textlayout plugin immediately */ - textfont_dict_open(gvc); /* initialize font dict */ -} finally { -LEAVING("f5fyxnkmknydgjt6dtc035z9w","gvconfig"); -} -} - - -} diff -Nru plantuml-1.2017.15/src/gen/lib/gvc/gvusershape__c.java plantuml-1.2018.9/src/gen/lib/gvc/gvusershape__c.java --- plantuml-1.2017.15/src/gen/lib/gvc/gvusershape__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/gvc/gvusershape__c.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,977 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of Smetana. - * Smetana is a partial translation of Graphviz/Dot sources from C to Java. - * - * (C) Copyright 2009-2017, Arnaud Roques - * - * This translation is distributed under the same Licence as the original C program: - * - ************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - ************************************************************************* - * - * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC - * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] - * - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - * - * You may obtain a copy of the License at - * - * http://www.eclipse.org/legal/epl-v10.html - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package gen.lib.gvc; -import static smetana.core.Macro.UNSUPPORTED; - -public class gvusershape__c { -//1 2digov3edok6d5srhgtlmrycs -// extern lt_symlist_t lt_preloaded_symbols[] - - -//1 baedz5i9est5csw3epz3cv7z -// typedef Ppoly_t Ppolyline_t - - -//1 9k44uhd5foylaeoekf3llonjq -// extern Dtmethod_t* Dtset - - -//1 1ahfywsmzcpcig2oxm7pt9ihj -// extern Dtmethod_t* Dtbag - - -//1 anhghfj3k7dmkudy2n7rvt31v -// extern Dtmethod_t* Dtoset - - -//1 5l6oj1ux946zjwvir94ykejbc -// extern Dtmethod_t* Dtobag - - -//1 2wtf222ak6cui8cfjnw6w377z -// extern Dtmethod_t* Dtlist - - -//1 d1s1s6ibtcsmst88e3057u9r7 -// extern Dtmethod_t* Dtstack - - -//1 axa7mflo824p6fspjn1rdk0mt -// extern Dtmethod_t* Dtqueue - - -//1 ega812utobm4xx9oa9w9ayij6 -// extern Dtmethod_t* Dtdeque - - -//1 cyfr996ur43045jv1tjbelzmj -// extern Dtmethod_t* Dtorder - - -//1 wlofoiftbjgrrabzb2brkycg -// extern Dtmethod_t* Dttree - - -//1 12bds94t7voj7ulwpcvgf6agr -// extern Dtmethod_t* Dthash - - -//1 9lqknzty480cy7zsubmabkk8h -// extern Dtmethod_t _Dttree - - -//1 bvn6zkbcp8vjdhkccqo1xrkrb -// extern Dtmethod_t _Dthash - - -//1 9lidhtd6nsmmv3e7vjv9e10gw -// extern Dtmethod_t _Dtlist - - -//1 34ujfamjxo7xn89u90oh2k6f8 -// extern Dtmethod_t _Dtqueue - - -//1 3jy4aceckzkdv950h89p4wjc8 -// extern Dtmethod_t _Dtstack - - -//1 8dfqgf3u1v830qzcjqh9o8ha7 -// extern Agmemdisc_t AgMemDisc - - -//1 18k2oh2t6llfsdc5x0wlcnby8 -// extern Agiddisc_t AgIdDisc - - -//1 a4r7hi80gdxtsv4hdoqpyiivn -// extern Agiodisc_t AgIoDisc - - -//1 bnzt5syjb7mgeru19114vd6xx -// extern Agdisc_t AgDefaultDisc - - -//1 35y2gbegsdjilegaribes00mg -// extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected - - -//1 c2rygslq6bcuka3awmvy2b3ow -// typedef Agsubnode_t Agnoderef_t - - -//1 xam6yv0dcsx57dtg44igpbzn -// typedef Dtlink_t Agedgeref_t - - -//1 9jp96pa73kseya3w6sulxzok6 -// extern char *Gvimagepath - - -//1 c6f8whijgjwwagjigmxlwz3gb -// extern char *HTTPServerEnVar - - -//1 9brvabw9vk27d2nrq4p8tf971 -// static Dict_t *ImageDict - - -//1 9pk2f9zg2k7nxk2pay6uw1ecz -// static knowntype_t knowntypes[] = - - - - -//3 afsdkf8ez5ohl6dd2prle0bgt -// static int imagetype (usershape_t *us) -public static Object imagetype(Object... arg) { -UNSUPPORTED("7vhzi3i3q0uu1byz03i34arpi"); // static int imagetype (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("4xkzi87btn54hoh901yqje0t2"); // char header[20]; -UNSUPPORTED("34btb8w1kvws7rrywxitht2dt"); // char line[200]; -UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i; -UNSUPPORTED("ayo4w7poqzsosr46zq587rive"); // if (us->f && fread(header, 1, 20, us->f) == 20) { -UNSUPPORTED("4f6p9x65zgxhi7g72c6rr85ez"); // for (i = 0; i < sizeof(knowntypes) / sizeof(knowntype_t); i++) { -UNSUPPORTED("ken197schvdfnlj4tbd1ajsg"); // if (!memcmp (header, knowntypes[i].template, knowntypes[i].size)) { -UNSUPPORTED("boxmes4yvhbhxz864uev9jrkn"); // us->stringtype = knowntypes[i].stringtype; -UNSUPPORTED("ot0inunld2mj1q1v9ubb1meg"); // us->type = knowntypes[i].type; -UNSUPPORTED("itn78hlno7a8ug22ta41xds5"); // if (us->type == FT_XML) { -UNSUPPORTED("152itmr8zxm9bdyohwofdarej"); // /* check for SVG in case of XML */ -UNSUPPORTED("3hr9t6mkxbajyo66bbwwo671x"); // while (fgets(line, sizeof(line), us->f) != (void *)0) { -UNSUPPORTED("3t6168qdbfqfv25fv7zx4xfms"); // if (!memcmp(line, "stringtype = "svg"; -UNSUPPORTED("ano6zabqu54wu0a40t35lj2q8"); // return (us->type = FT_SVG); -UNSUPPORTED("3rk33w1xf0jaka2h033sgnx06"); // } -UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("f1kxll0fswekbe2gwilmen2m7"); // else if (us->type == FT_RIFF) { -UNSUPPORTED("cm5s3kh98e66k97v45ofiyv82"); // /* check for WEBP in case of RIFF */ -UNSUPPORTED("4ma0gwqxr9j5qek6xkrskevsl"); // if (!memcmp(header+8, "WEBP", sizeof("WEBP")-1)) { -UNSUPPORTED("3zasc2uxnxlgetbuyifmr97bf"); // us->stringtype = "webp"; -UNSUPPORTED("cgno6et27of87vw0o38rnarxx"); // return (us->type = FT_WEBP); -UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // } -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("60vq78txdp1vk965f5jgtlboc"); // return us->type; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("775efiysp2o60ingiihr8o6kq"); // us->stringtype = "(lib)"; -UNSUPPORTED("acr9g7qhtz1yhdxvbzfapnlad"); // us->type = FT_NULL; -UNSUPPORTED("7yivuk2g5w938mbst7quo3jxa"); // return FT_NULL; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 bnikn3k3s008dmhsa2qu6lh34 -// static boolean get_int_lsb_first (FILE *f, unsigned int sz, unsigned int *val) -public static Object get_int_lsb_first(Object... arg) { -UNSUPPORTED("cj03ffwnafffjxcznknyyp45b"); // static boolean get_int_lsb_first (FILE *f, unsigned int sz, unsigned int *val) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("70g3qubiio6uxhg2gxt141bff"); // int ch, i; -UNSUPPORTED("f3wi4z18bhg0unx5i47wp28hb"); // *val = 0; -UNSUPPORTED("6p1fgfnk4itt60e21fa48roiq"); // for (i = 0; i < sz; i++) { -UNSUPPORTED("7zywfbf1jevwjemy5yzpfiiza"); // ch = fgetc(f); -UNSUPPORTED("1t7v5vi7ec6r3mhla23o1v3w2"); // if (feof(f)) -UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; -UNSUPPORTED("1ewc3hwvqjod1e2ou7c4u02h1"); // *val |= (ch << 8*i); -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 87ifzytv1xgex4vf4ffa1fx28 -// static boolean get_int_msb_first (FILE *f, unsigned int sz, unsigned int *val) -public static Object get_int_msb_first(Object... arg) { -UNSUPPORTED("ad8pamcrkweeq9xmkgw9docv9"); // static boolean get_int_msb_first (FILE *f, unsigned int sz, unsigned int *val) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("70g3qubiio6uxhg2gxt141bff"); // int ch, i; -UNSUPPORTED("f3wi4z18bhg0unx5i47wp28hb"); // *val = 0; -UNSUPPORTED("6p1fgfnk4itt60e21fa48roiq"); // for (i = 0; i < sz; i++) { -UNSUPPORTED("7zywfbf1jevwjemy5yzpfiiza"); // ch = fgetc(f); -UNSUPPORTED("1t7v5vi7ec6r3mhla23o1v3w2"); // if (feof(f)) -UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; -UNSUPPORTED("ac2fcmmhoviu6vu7od03xd2fz"); // *val <<= 8; -UNSUPPORTED("2aeq31k5bdbmozogiex8thool"); // *val |= ch; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 e6zw0qebmgir30wjyodre1w3q -// static unsigned int svg_units_convert(double n, char *u) -public static Object svg_units_convert(Object... arg) { -UNSUPPORTED("1q167s10zcp2ohq3mqsaucn6q"); // static unsigned int svg_units_convert(double n, char *u) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("as83qujnkumxgvltowl9k84pa"); // if (strcmp(u, "in") == 0) -UNSUPPORTED("cz9p5u3tzm0vtfcypzsqjjznz"); // return ROUND(n * 72); -UNSUPPORTED("a3ea8buut0466me8422yze7nk"); // if (strcmp(u, "px") == 0) -UNSUPPORTED("17k340tdedf8kyw8jjau617ji"); // return ROUND(n * 72 / 96); -UNSUPPORTED("e1voxws30sz7bauvt2nz3e43i"); // if (strcmp(u, "pc") == 0) -UNSUPPORTED("dgfrr8ul58nbz256i7zg3dfnv"); // return ROUND(n * 72 / 6); -UNSUPPORTED("3zt4017at03z9nmfg4b6j33nl"); // if (strcmp(u, "pt") == 0 || strcmp(u, "\"") == 0) /* ugly!! - if there are no inits then the %2s get the trailing '"' */ -UNSUPPORTED("3bme0piy1kqu5q9y4eqbrr5fm"); // return ROUND(n); -UNSUPPORTED("4kvfi7mn3m1cvs8748w6apqe6"); // if (strcmp(u, "cm") == 0) -UNSUPPORTED("40fcy0h4yq1mhgc6sig41xkiz"); // return ROUND(n * ((double)72 * 0.393700787)); -UNSUPPORTED("795vmm17p8fultyx81btq2qj7"); // if (strcmp(u, "mm") == 0) -UNSUPPORTED("2p58445vgby41tw5y37sb952f"); // return ROUND(n * ((double)72 * 0.0393700787)); -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -//1 48cx4t8oc5776gxxsx3wj1459 -// static char* svg_attr_value_re = - - -//1 urpt4udx4umgv15x10ssv67m -// static regex_t re, *pre = (void *)0 - - - - -//3 di4bxm03m9srcwmfu82mzqtu -// static void svg_size (usershape_t *us) -public static Object svg_size(Object... arg) { -UNSUPPORTED("3bpommb3a197xaax86ebpnapc"); // static void svg_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("16qpk89sms5wm32xxhdjsrhj1"); // unsigned int w = 0, h = 0; -UNSUPPORTED("3bfgwfzonzqutm2m3s241ggmq"); // double n, x0, y0, x1, y1; -UNSUPPORTED("5urpczqwzlgz812axw5w07irp"); // char u[10]; -UNSUPPORTED("e7xkcvvhzn89z17vzxp5d9wqf"); // char *attribute, *value, *re_string; -UNSUPPORTED("34btb8w1kvws7rrywxitht2dt"); // char line[200]; -UNSUPPORTED("1kfdqzk554dccavlk1sr8hc6k"); // boolean wFlag = 0, hFlag = 0; -UNSUPPORTED("txcitt9410z35lsx2a1qr3zb"); // regmatch_t re_pmatch[4]; -UNSUPPORTED("2elnezsihato03euhhcjmczz6"); // /* compile on first use */ -UNSUPPORTED("b3qk4y1nm971zossf7ba67c39"); // if (! pre) { -UNSUPPORTED("4k0rhf891tka3e5fomw7gygix"); // if (regcomp(&re, svg_attr_value_re, REG_EXTENDED) != 0) { -UNSUPPORTED("bvbawrzsgnxy8a4de3iuwaeqb"); // agerr(AGERR,"cannot compile regular expression %s", svg_attr_value_re); -UNSUPPORTED("klxoy56t7b20wxnwqm0qoofz"); // } -UNSUPPORTED("9let8u6jhsriwmr05bp3gwoy5"); // pre = &re; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); -UNSUPPORTED("40jwwwlrum66g8u94aha46ac6"); // while (fgets(line, sizeof(line), us->f) != (void *)0 && (!wFlag || !hFlag)) { -UNSUPPORTED("1d8ii0hljelb18gmpwwrtvano"); // re_string = line; -UNSUPPORTED("5bh0ae9np7zl19gk8h3h9317e"); // while (regexec(&re, re_string, 4, re_pmatch, 0) == 0) { -UNSUPPORTED("b355fkvcamz9jmg27def9b8x3"); // re_string[re_pmatch[1].rm_eo] = '\0'; -UNSUPPORTED("aef3m3p3zi96h0zt0sjw03lj4"); // re_string[re_pmatch[2].rm_eo] = '\0'; -UNSUPPORTED("eipkd5535u39a7ub3xbstkeu2"); // attribute = re_string + re_pmatch[1].rm_so; -UNSUPPORTED("bqe4861o77yhd2c4hm2q9ryqg"); // value = re_string + re_pmatch[2].rm_so; -UNSUPPORTED("c9y0ykkvqmbho7jwq1hq2v8rg"); // re_string += re_pmatch[0].rm_eo + 1; -UNSUPPORTED("4x0vivqfmvb5kxu3yv8zlj0z8"); // if (strcmp(attribute,"width") == 0) { -UNSUPPORTED("cjoilrknjlp3580a79aeduafs"); // if (sscanf(value, "%lf%2s", &n, u) == 2) { -UNSUPPORTED("5804xn01sb0nsqc4oand73j71"); // w = svg_units_convert(n, u); -UNSUPPORTED("boxr36cof383w0qjpos68wr3p"); // wFlag = (!(0)); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("coem1appm7al4by2xogxcf79v"); // else if (sscanf(value, "%lf", &n) == 1) { -UNSUPPORTED("d20bsvecsbla4zfrgr8vs0axk"); // w = svg_units_convert(n, "pt"); -UNSUPPORTED("boxr36cof383w0qjpos68wr3p"); // wFlag = (!(0)); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("bokpcg0aj7i7sody2nk55sn1m"); // if (hFlag) -UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("349wmcj9pjfzzogsgqytbecep"); // else if (strcmp(attribute,"height") == 0) { -UNSUPPORTED("cjoilrknjlp3580a79aeduafs"); // if (sscanf(value, "%lf%2s", &n, u) == 2) { -UNSUPPORTED("4e8rpne5p90nqhwswzkila8du"); // h = svg_units_convert(n, u); -UNSUPPORTED("75lsnpofiu7aq6tvk1bytezfx"); // hFlag = (!(0)); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("318wbwzbtyt293618awt8oi7j"); // else if (sscanf(value, "%lf", &n) == 1) { -UNSUPPORTED("8roq2ozo7ghuukkquxg4vi3o8"); // h = svg_units_convert(n, "pt"); -UNSUPPORTED("75lsnpofiu7aq6tvk1bytezfx"); // hFlag = (!(0)); -UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // } -UNSUPPORTED("3f72eveov59pnntffs33fh1o9"); // if (wFlag) -UNSUPPORTED("czyohktf9bkx4udfqhx42f4lu"); // break; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("evrgwvbtefbhi8c4vpurqyncz"); // else if (strcmp(attribute,"viewBox") == 0 -UNSUPPORTED("7knynrz6icv4twtp5re2u2tyu"); // && sscanf(value, "%lf %lf %lf %lf", &x0,&y0,&x1,&y1) == 4) { -UNSUPPORTED("b75jl7dtq9qf4ike38i53sb5b"); // w = x1 - x0 + 1; -UNSUPPORTED("ccjsgjzpqovbgplagso2d6wvk"); // h = y1 - y0 + 1; -UNSUPPORTED("agh2p3816w463hvgmt7pji00p"); // wFlag = (!(0)); -UNSUPPORTED("b0kbr8vydi49ibjics3e3mlip"); // hFlag = (!(0)); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // } -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("avyq4e4me4o2pteunxjmfehds"); // us->w = w; -UNSUPPORTED("evkuhplkb5xfea6ln3h8f6ly2"); // us->h = h; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 2phgl4coa8enkvltpf0938lit -// static void png_size (usershape_t *us) -public static Object png_size(Object... arg) { -UNSUPPORTED("5qra9bwfkjw5syv0odudm6gam"); // static void png_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("3135bp24afhqdzs2uj5l7sjr1"); // fseek(us->f, 16, SEEK_SET); -UNSUPPORTED("1luxqut1mknrn8qp0yakx9czw"); // if (get_int_msb_first(us->f, 4, &w) && get_int_msb_first(us->f, 4, &h)) { -UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; -UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 lqow6tkjqnnbqz6msa6cmzlk -// static void ico_size (usershape_t *us) -public static Object ico_size(Object... arg) { -UNSUPPORTED("6eqck7knu0bxd3sib3fpca2hf"); // static void ico_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("bunso4je5hrb29m4984fw7bh6"); // fseek(us->f, 6, SEEK_SET); -UNSUPPORTED("875b5zt62o9flpi731becymv4"); // if (get_int_msb_first(us->f, 1, &w) && get_int_msb_first(us->f, 1, &h)) { -UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; -UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 dleljswqxf1oa4gzr8l8fomcl -// static void webp_size (usershape_t *us) -public static Object webp_size(Object... arg) { -UNSUPPORTED("dl59ajg8cu2fj1vuagj6pumce"); // static void webp_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("3mt62dnri0kt6p9g6nmf6x78i"); // fseek(us->f, 15, SEEK_SET); -UNSUPPORTED("bro476e5tdpqu4kqzjhadepr8"); // if (fgetc(us->f) == 'X') { //VP8X -UNSUPPORTED("ciyvs7xrf1sc336ipavk7gjbs"); // fseek(us->f, 24, SEEK_SET); -UNSUPPORTED("77gjxe5g6u7c6371ziwedefxf"); // if (get_int_lsb_first(us->f, 4, &w) && get_int_lsb_first(us->f, 4, &h)) { -UNSUPPORTED("9htwijlhm4ad9uo70xn5d5tvl"); // us->w = w; -UNSUPPORTED("3hh8nl3qystuq8wcwsm411fej"); // us->h = h; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("bwt2eurukj3m7fsbr441rf1pj"); // else { //VP8 -UNSUPPORTED("5fthwx7kwgddogs4n4fsbb0o8"); // fseek(us->f, 26, SEEK_SET); -UNSUPPORTED("621fvdyd12vnbfyxpw6j0z7cr"); // if (get_int_lsb_first(us->f, 2, &w) && get_int_lsb_first(us->f, 2, &h)) { -UNSUPPORTED("9htwijlhm4ad9uo70xn5d5tvl"); // us->w = w; -UNSUPPORTED("3hh8nl3qystuq8wcwsm411fej"); // us->h = h; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 2s3ms72agp5gyfqz15zbpp3u1 -// static void gif_size (usershape_t *us) -public static Object gif_size(Object... arg) { -UNSUPPORTED("ac8be5d24wrrx24tnddiukvl7"); // static void gif_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8l3f9beos057zjxgk0cdj323o"); // unsigned int w, h; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("bunso4je5hrb29m4984fw7bh6"); // fseek(us->f, 6, SEEK_SET); -UNSUPPORTED("ezkdvuggkyj11n6ca6xrhm72g"); // if (get_int_lsb_first(us->f, 2, &w) && get_int_lsb_first(us->f, 2, &h)) { -UNSUPPORTED("73axoa9apyrx2829eqsezmfik"); // us->w = w; -UNSUPPORTED("993qcme7jlmcsi918hu491ld5"); // us->h = h; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 bpjeya6em7jp6m6l86m6t4u4a -// static void bmp_size (usershape_t *us) -public static Object bmp_size(Object... arg) { -UNSUPPORTED("ba2pylwi2xu10asnonw92pxw1"); // static void bmp_size (usershape_t *us) { -UNSUPPORTED("ct1272vz7j34sqkcwzdiq2x0i"); // unsigned int size_x_msw, size_x_lsw, size_y_msw, size_y_lsw; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("9b418veiss4t0o7s8cqq28owo"); // fseek (us->f, 16, SEEK_SET); -UNSUPPORTED("1q9kmvi2ajod9wlev8s5p50rv"); // if ( get_int_lsb_first (us->f, 2, &size_x_msw) && -UNSUPPORTED("5f5k6cp1ota9f8a2ciircybdh"); // get_int_lsb_first (us->f, 2, &size_x_lsw) && -UNSUPPORTED("9n6cqmhzmbkf1vt9fyu6zw0kp"); // get_int_lsb_first (us->f, 2, &size_y_msw) && -UNSUPPORTED("cid929pl3ogyk2kecod7opvz0"); // get_int_lsb_first (us->f, 2, &size_y_lsw) ) { -UNSUPPORTED("a6g25f4k8ew6jja5m9rnccf5o"); // us->w = size_x_msw << 16 | size_x_lsw; -UNSUPPORTED("8exqj264llut5d629ydwne5k2"); // us->h = size_y_msw << 16 | size_y_lsw; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 c7yvo5wd816hjqxejnluaol0a -// static void jpeg_size (usershape_t *us) -public static Object jpeg_size(Object... arg) { -UNSUPPORTED("c8uakwctlakoj06f07juq8r2a"); // static void jpeg_size (usershape_t *us) { -UNSUPPORTED("3o57tczyjy6z9uvry23b9xkw5"); // unsigned int marker, length, size_x, size_y, junk; -UNSUPPORTED("4ylph99ph3r2v7uhxyd2hq0io"); // /* These are the markers that follow 0xff in the file. -UNSUPPORTED("1pzctl0feh1bhiqnxtmawvxg4"); // * Other markers implicitly have a 2-byte length field that follows. -UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */ -UNSUPPORTED("1lgv3mem6buwpyuef4b9h8rzp"); // static unsigned char standalone_markers [] = { -UNSUPPORTED("e00djw6cjtdaxejgnewp8nus6"); // 0x01, /* Temporary */ -UNSUPPORTED("1urwngq6m3z6m5mr3egwgq9mr"); // 0xd0, 0xd1, 0xd2, 0xd3, /* Reset */ -UNSUPPORTED("e1vwc4842h5c84ojr8w3onuno"); // 0xd4, 0xd5, 0xd6, -UNSUPPORTED("1uig2kz9nbo8j6vj3r7493n8"); // 0xd7, -UNSUPPORTED("927bzm317ui2xj8ugbwhm5xb7"); // 0xd8, /* Start of image */ -UNSUPPORTED("9ybi9mcsggfw3zbh6zn9hotef"); // 0xd9, /* End of image */ -UNSUPPORTED("fbagrxdnmyjkvt7zaukczscg"); // 0 -UNSUPPORTED("9u8qqu9tw95qjbv3cxv3hj4bd"); // }; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("5owjshc6gmd9o9lmekzcl6rvg"); // while ((!(0))) { -UNSUPPORTED("7kq4b2hkhf3vcx97hwoelgcxz"); // /* Now we must be at a 0xff or at a series of 0xff's. -UNSUPPORTED("cga1geam6con9djkcofzmw0ko"); // * If that is not the case, or if we're at EOF, then there's -UNSUPPORTED("exr8s1ongonmgsucjdf4zsmb4"); // * a parsing error. -UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ -UNSUPPORTED("79jgtuw1xg9dgik49e3hx1068"); // if (! get_int_msb_first (us->f, 1, &marker)) -UNSUPPORTED("3zyp4vhegf9dl2g8a4ffmxah8"); // return; -UNSUPPORTED("e7cevpg68ih107a2ggfgkq1la"); // if (marker == 0xff) -UNSUPPORTED("9j8yk6fxm4tnpr3yrev0f9bhm"); // continue; -UNSUPPORTED("99hdbrpbwvb3lwfyhz43xnoxf"); // /* Ok.. marker now read. If it is not a stand-alone marker, -UNSUPPORTED("b7dntxmllxk3wzmg9mclxs71r"); // * then continue. If it's a Start Of Frame (0xc?), then we're there. -UNSUPPORTED("8aramua11q89c43osky6tgha5"); // * If it's another marker with a length field, then skip ahead -UNSUPPORTED("5w0fy7m3152rri519xzsydb2w"); // * over that length field. -UNSUPPORTED("3vesx4cskuo1q42jvwmoum2xs"); // */ -UNSUPPORTED("7itrbaa4e2u9uh86wydx2r1wq"); // /* A stand-alone... */ -UNSUPPORTED("7m1dttkv67ixwryn1ukl94hel"); // if (strchr ((char*)standalone_markers, marker)) -UNSUPPORTED("9j8yk6fxm4tnpr3yrev0f9bhm"); // continue; -UNSUPPORTED("sb3rjk9k59soh7qvm0qpkzoh"); // /* Incase of a 0xc0 marker: */ -UNSUPPORTED("6u3lv1x78jskc1qjam25s00h1"); // if (marker == 0xc0) { -UNSUPPORTED("4kucipi8uw6ujeuh489csoowf"); // /* Skip length and 2 lengths. */ -UNSUPPORTED("30gcyw02iuybxoyj28nhlbwbl"); // if ( get_int_msb_first (us->f, 3, &junk) && -UNSUPPORTED("b6ypup1v81rta7mfh68arftfd"); // get_int_msb_first (us->f, 2, &size_x) && -UNSUPPORTED("f2mbg2ezlyocn5228wkhy658f"); // get_int_msb_first (us->f, 2, &size_y) ) { -UNSUPPORTED("eps17wh894vxn0oojbitsn1lr"); // /* Store length. */ -UNSUPPORTED("danamcguxf0st13b0euh47y8v"); // us->h = size_x; -UNSUPPORTED("gva1bl1ygb6xzrrjwpma3dpp"); // us->w = size_y; -UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } -UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("7jc4v9i136pgfvwakfui3aupm"); // /* Incase of a 0xc2 marker: */ -UNSUPPORTED("a1ww3q31w3xsq697vt32phj9d"); // if (marker == 0xc2) { -UNSUPPORTED("7xwfuqyvolr45lp6gdcnmqyna"); // /* Skip length and one more byte */ -UNSUPPORTED("dhyz02dvhk6z01p9nh8knpdnp"); // if (! get_int_msb_first (us->f, 3, &junk)) -UNSUPPORTED("6an8ocqq0sjru42k4aathe94m"); // return; -UNSUPPORTED("7b106vc3jzqz2eyjlo758xw2n"); // /* Get length and store. */ -UNSUPPORTED("akbj7dadm0nq5ujmuwiw50ukl"); // if ( get_int_msb_first (us->f, 2, &size_x) && -UNSUPPORTED("f2mbg2ezlyocn5228wkhy658f"); // get_int_msb_first (us->f, 2, &size_y) ) { -UNSUPPORTED("danamcguxf0st13b0euh47y8v"); // us->h = size_x; -UNSUPPORTED("gva1bl1ygb6xzrrjwpma3dpp"); // us->w = size_y; -UNSUPPORTED("7g94ubxa48a1yi3mf9v521b7c"); // } -UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("9qz6tc2665rtirz7egtertjyl"); // /* Any other marker is assumed to be followed by 2 bytes length. */ -UNSUPPORTED("5xvajayqclvcxxqkozzorzbdi"); // if (! get_int_msb_first (us->f, 2, &length)) -UNSUPPORTED("3zyp4vhegf9dl2g8a4ffmxah8"); // return; -UNSUPPORTED("cv5sg5k6hy1kwgiinb4i5xr6"); // fseek (us->f, length - 2, SEEK_CUR); -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 9vi0gtfjnp35ie6bx15grm4gp -// static void ps_size (usershape_t *us) -public static Object ps_size(Object... arg) { -UNSUPPORTED("8kctdt9asc26knxxydik2v8ug"); // static void ps_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("18vi5vqd0r4k0kxsl3h3rwa4y"); // char line[BUFSIZ]; -UNSUPPORTED("4qk2wsv83bxm1lchsnd6splfr"); // boolean saw_bb; -UNSUPPORTED("5rcgzsa5rlhtyjz964tcthts2"); // int lx, ly, ux, uy; -UNSUPPORTED("5fewhg0dt0vbugqk2bmyfr34l"); // char* linep; -UNSUPPORTED("891wob6d9fi1zsdfvumw7tx5y"); // us->dpi = 72; -UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); -UNSUPPORTED("w6asn9e9wasakvoc3kn19lwt"); // saw_bb = 0; -UNSUPPORTED("cpypiyiyiq875wcq5pix66en2"); // while (fgets(line, sizeof(line), us->f)) { -UNSUPPORTED("7vmkqwijdn7elebqrq3q3qqlv"); // /* PostScript accepts \r as EOL, so using fgets () and looking for a -UNSUPPORTED("ccqysd4ji4ezs2u937a1tq93k"); // * bounding box comment at the beginning doesn't work in this case. -UNSUPPORTED("a548nncd0y8n2a01c5z3akmhg"); // * As a heuristic, we first search for a bounding box comment in line. -UNSUPPORTED("djrf0gim2rh71i0skg41uw6zn"); // * This obviously fails if not all of the numbers make it into the -UNSUPPORTED("x3dg0lfzyp7yc2hldpo3cbge"); // * current buffer. This shouldn't be a problem, as the comment is -UNSUPPORTED("4uvbwtwj71pylu4bfe3pu79le"); // * typically near the beginning, and so should be read within the first -UNSUPPORTED("426auswwt3iw0kmtesztdy9ff"); // * BUFSIZ bytes (even on Windows where this is 512). -UNSUPPORTED("62wb43w2xc6ex6hootjubbx22"); // */ -UNSUPPORTED("8iwr2d3ooqy0tw5eisixpectn"); // if (!(linep = strstr (line, "%%BoundingBox:"))) -UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue; -UNSUPPORTED("2s519tr2mhoj177f79vzllnyq"); // if (sscanf (linep, "%%%%BoundingBox: %d %d %d %d", &lx, &ly, &ux, &uy) == 4) { -UNSUPPORTED("6dekl3sp6brld4uq5ep5859l3"); // saw_bb = (!(0)); -UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("8p3jjm43yrzygpor71hdkfs1g"); // if (saw_bb) { -UNSUPPORTED("5dym7sjpxsgdgav57jvyuohe8"); // us->x = lx; -UNSUPPORTED("da04q03gf0w4upkkrsn74w1dc"); // us->y = ly; -UNSUPPORTED("6mpj1u4n7cyggpme1vsa6je8t"); // us->w = ux - lx; -UNSUPPORTED("dqnhfatraydhv6fdx3gsi22ao"); // us->h = uy - ly; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 87i5xtm6lbxo4asqfnu0v9rz1 -// static unsigned char nxtc (stream_t* str) -public static Object nxtc(Object... arg) { -UNSUPPORTED("at0aua2ntxsp0j1h4yidmr4si"); // static unsigned char -UNSUPPORTED("9rrtdlhn8kugpol3lky8rgp5n"); // nxtc (stream_t* str) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("9jyosg56ecd165ua22kq89ggj"); // if (fgets(str->buf, BUFSIZ, str->fp)) { -UNSUPPORTED("bo88dnmxymbe4e1rppc0ex9ve"); // str->s = str->buf; -UNSUPPORTED("8tdhptj2ed5dv8sew624q4jec"); // return *(str->s); -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("278hcy3fayv5vclqcgtpjbzdi"); // return '\0'; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 2fq3qaeuu4gjr89xmwwy7i4xe -// static void skipWS (stream_t* str) -public static Object skipWS(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("cactz8998uk8ou1c5zwtwg601"); // skipWS (stream_t* str) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("10sir32iwi5l2jyfgp65pihto"); // unsigned char c; -UNSUPPORTED("91zm214vvm6477gtei1ggjkef"); // while ((c = (*(str->s)?*(str->s):nxtc(str)))) { -UNSUPPORTED("dilzs0pemy12rvmpnko0iel59"); // if (isspace(c)) (str->s++); -UNSUPPORTED("9wafzg86cpce49qfuv8wsl6in"); // else return; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 dwmuhk2xjfndhxozxfrdz5nk8 -// static int scanNum (char* tok, double* dp) -public static Object scanNum(Object... arg) { -UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int -UNSUPPORTED("eq0ltrbhzwt422rffdlm4d20e"); // scanNum (char* tok, double* dp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("bkz9mqmemp1ljxdwdbu8xv3e9"); // char* endp; -UNSUPPORTED("avrsd77b596s5g291ozzdpxf8"); // double d = strtod(tok, &endp); -UNSUPPORTED("2qoq2nf2jpfoyc68njwm2ajkq"); // if (tok == endp) return 1; -UNSUPPORTED("636uh4i1x8w844yxwd2u322d1"); // *dp = d; -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 dhjmc8hrpmiohrejyu72mrhno -// static void getNum (stream_t* str, char* buf) -public static Object getNum(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("doymhclp9a2fukna3vd3r7xf8"); // getNum (stream_t* str, char* buf) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("bsj3r19ko668lwj5fqk8tlbhc"); // int len = 0; -UNSUPPORTED("wrvu9u7a8j6i6y6552zncxfk"); // char c; -UNSUPPORTED("936voey3mecmlo6hla9hyrmun"); // skipWS(str); -UNSUPPORTED("tuyymjn2lfs038e1rm6hbw8w"); // while ((c = (*(str->s)?*(str->s):nxtc(str))) && (isdigit(c) || (c == '.'))) { -UNSUPPORTED("4rvasxp4ert1zz5jaasrqeft1"); // buf[len++] = c; -UNSUPPORTED("8vm8y5ewr5ra87d4f8exah65d"); // (str->s++); -UNSUPPORTED("5zs9wc8ip6zkde4o33aadh30c"); // if (len == BUFSIZ-1) break; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("3w01p3l63zt07scumxz12foyc"); // buf[len] = '\0'; -UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 6kdhce4shbkw92wtfgufyqecs -// static int boxof (stream_t* str, boxf* bp) -public static Object boxof(Object... arg) { -UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int -UNSUPPORTED("d810hoc5e8uu0odpm097odpfu"); // boxof (stream_t* str, boxf* bp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1z7b1t0srtne632sd3ma9jbp7"); // char tok[BUFSIZ]; -UNSUPPORTED("araz8ffm0d5v424qzgyh7bsvy"); // skipWS(str); -UNSUPPORTED("1uwfhdftjs4loqhg7ecaermjd"); // if ((*(str->s)?*(str->s):nxtc(str)) != '[') return 1; -UNSUPPORTED("8vm8y5ewr5ra87d4f8exah65d"); // (str->s++); -UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); -UNSUPPORTED("1m5wgiebygd9j5o6m68etvwh0"); // if (scanNum(tok,&bp->LL.x)) return 1; -UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); -UNSUPPORTED("9bcg5vhxd4fqd8ykkbivfm3d4"); // if (scanNum(tok,&bp->LL.y)) return 1; -UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); -UNSUPPORTED("1z0q9nrhj393zbs1mok3h84tf"); // if (scanNum(tok,&bp->UR.x)) return 1; -UNSUPPORTED("6jh13u8w5qiy4ij2ebx6zmqwa"); // getNum(str, tok); -UNSUPPORTED("247082ftkwl5jzjorvyt3sgcl"); // if (scanNum(tok,&bp->UR.y)) return 1; -UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 dedr09vl6y9ax357arh6tayi -// static int bboxPDF (FILE* fp, boxf* bp) -public static Object bboxPDF(Object... arg) { -UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int -UNSUPPORTED("9icxkxwqm6flp3sl9ulkp4fyd"); // bboxPDF (FILE* fp, boxf* bp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("f3gl6562biaxa4139uus0d370"); // stream_t str; -UNSUPPORTED("5pjh3c3u4lxh1jdyyk966intb"); // char* s; -UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ]; -UNSUPPORTED("8w39jbbwqjx63enrf5fdvcm9r"); // while (fgets(buf, BUFSIZ, fp)) { -UNSUPPORTED("b7wioadlc5j3p2q8w7tsq1gam"); // if ((s = strstr(buf,"/MediaBox"))) { -UNSUPPORTED("ecmojjd7fnaeah045va2t5eg8"); // str.buf = buf; -UNSUPPORTED("5k89yh945d2crbir8397vkavv"); // str.s = s+(sizeof("/MediaBox")-1); -UNSUPPORTED("dj08qw9n5j8nlqx752hipu46u"); // str.fp = fp; -UNSUPPORTED("uhua7rc3vef3nawzjyh3w1k5"); // return boxof(&str,bp); -UNSUPPORTED("yoqd73ulpi5tn8snro7dt3jc"); // } -UNSUPPORTED("8nzcpbtoi924xzu8ze3z6dbft"); // } -UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 3fdvwmb09jpyu6h40pj206vv3 -// static void pdf_size (usershape_t *us) -public static Object pdf_size(Object... arg) { -UNSUPPORTED("97swmsrhwped1e1n72fyev1ai"); // static void pdf_size (usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("2lzsl1e035wt5epd1h8f4bn8m"); // boxf bb; -UNSUPPORTED("7337vyphkrv1lekq0dncy8j6s"); // us->dpi = 0; -UNSUPPORTED("7iygf89yc0kwp5pocixawdaed"); // fseek(us->f, 0, SEEK_SET); -UNSUPPORTED("cu1kld68jk8qm12c9f0n61vyd"); // if ( ! bboxPDF (us->f, &bb)) { -UNSUPPORTED("14kgzu9x57imt127uyibumhif"); // us->x = bb.LL.x; -UNSUPPORTED("51rq1d6stvtvjgfta18hxoiyg"); // us->y = bb.LL.y; -UNSUPPORTED("encm75ymc6wgridj70fk0jf47"); // us->w = bb.UR.x - bb.LL.x; -UNSUPPORTED("dy52i81burd516zy265e83wel"); // us->h = bb.UR.y - bb.LL.y; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 cxhbj2es2sky90cnd8qf89prs -// static void usershape_close (Dict_t * dict, void * p, Dtdisc_t * disc) -public static Object usershape_close(Object... arg) { -UNSUPPORTED("b7or8sf6zjmnj6wjf08brm0r"); // static void usershape_close (Dict_t * dict, void * p, Dtdisc_t * disc) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("58pwyr0d4numnoai5v987l5ml"); // usershape_t *us = (usershape_t *)p; -UNSUPPORTED("ad2wgtudijnm3bp4549lrva3l"); // if (us->f) -UNSUPPORTED("13i1v3mxl0sjnx4rgaden880d"); // fclose(us->f); -UNSUPPORTED("e5bs4fy1a1v5ptm2bcrm2m9ai"); // if (us->data && us->datafree) -UNSUPPORTED("1wod8ffcoluizmoc72db2htxb"); // us->datafree(us); -UNSUPPORTED("73p2w162ujnuoboekx5udlion"); // free (us); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -//1 es7jtx4lx7bg26412fcjit8ri -// static Dtdisc_t ImageDictDisc = - - - - -//3 9msk7qh9auq8w21r32k0ffcsa -// usershape_t *gvusershape_find(char *name) -public static Object gvusershape_find(Object... arg) { -UNSUPPORTED("a9366bkr4gt4nvcj5bnkjrtrd"); // usershape_t *gvusershape_find(char *name) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; -UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); -UNSUPPORTED("1av8we70pcc0ni7489zk2ttcg"); // assert(name[0]); -UNSUPPORTED("4qhyd93m9v57fwb1anljrxfd3"); // if (!ImageDict) -UNSUPPORTED("45tfw7tcm68298aro2tdiv8pc"); // return (void *)0; -UNSUPPORTED("dzt5b4nn4x2oidxk4g4wzt8et"); // us = (*(((Dt_t*)(ImageDict))->searchf))((ImageDict),(void*)(name),0001000); -UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 3cgay03dg8pq23kln9kuc0ym5 -// boolean gvusershape_file_access(usershape_t *us) -public static Object gvusershape_file_access(Object... arg) { -UNSUPPORTED("dm8po5i2hu4arliyfc2ea2a47"); // boolean gvusershape_file_access(usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8u0o5i27i1no60qjs9r4os0f9"); // static int usershape_files_open_cnt; -UNSUPPORTED("vadeh8lzzwz0ugk6azcwaayu"); // const char *fn; -UNSUPPORTED("7gqi0ait1bhc4v9zl8rnn0wbs"); // assert(us); -UNSUPPORTED("xlffgd4fqdckxg2nbs0mxtlj"); // assert(us->name); -UNSUPPORTED("fk4kdjctgb13swd2h14t0yvh"); // assert(us->name[0]); -UNSUPPORTED("ad2wgtudijnm3bp4549lrva3l"); // if (us->f) -UNSUPPORTED("1te90msr6mhllwn4y3ghlahc0"); // fseek(us->f, 0, SEEK_SET); -UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { -UNSUPPORTED("d6n6b94e02ntmefeqcoo0ueon"); // if (! (fn = safefile(us->name))) { -UNSUPPORTED("778vwup2lml5qa9eyxd88416u"); // agerr(AGWARN, "Filename \"%s\" is unsafe\n", us->name); -UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("31rnydpzhmzclqs3q4flw9ce2"); // us->f = fopen(fn, "r"); -UNSUPPORTED("cmb2imwpnm4tgu1dm9r5tgtj5"); // if (us->f == (void *)0) { -UNSUPPORTED("ebzon8h2oywxvasmfmyhnw5pq"); // agerr(AGWARN, "%s while opening %s\n", strerror(errno), fn); -UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("e17a7n92m8ieuby8sa8jm1r3o"); // if (usershape_files_open_cnt >= 50) -UNSUPPORTED("c9jo9gbhp1on7wctnk1o7q8vu"); // us->nocache = (!(0)); -UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else -UNSUPPORTED("81eb64f0supcvkt4drj4djmby"); // usershape_files_open_cnt++; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("3ebwn2weruwgdz4tfaxj2htek"); // assert(us->f); -UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0)); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 9y4wcbk4jp03lbul2i25xzmp6 -// void gvusershape_file_release(usershape_t *us) -public static Object gvusershape_file_release(Object... arg) { -UNSUPPORTED("6i3sc3o39zrjf80hb57rmbe1t"); // void gvusershape_file_release(usershape_t *us) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("5a8j5zrw7vbgoyy4ogtlsywui"); // if (us->nocache) { -UNSUPPORTED("47xp2oczqdec6db0z36u2n84r"); // if (us->f) { -UNSUPPORTED("bzvrsl2iafc3pw0qughvm761m"); // fclose(us->f); -UNSUPPORTED("amwbxewujlnkm7a19q6zl4xq0"); // us->f = (void *)0; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 8gvu7lmp0zomg3yy0a76n8pjh -// static usershape_t *gvusershape_open (char *name) -public static Object gvusershape_open(Object... arg) { -UNSUPPORTED("5kyko9vxn3aqt1awhp5hd8c6a"); // static usershape_t *gvusershape_open (char *name) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("exneoozy5g8al0a8y6fxb88zv"); // usershape_t *us; -UNSUPPORTED("265kxn69043hh3vmr1ma8pbpg"); // assert(name); -UNSUPPORTED("4qhyd93m9v57fwb1anljrxfd3"); // if (!ImageDict) -UNSUPPORTED("7tvne0duj1fh44ndje8hlq8nt"); // ImageDict = dtopen(&ImageDictDisc, Dttree); -UNSUPPORTED("be9pwrhxzz4ia299kongm87uq"); // if (! (us = gvusershape_find(name))) { -UNSUPPORTED("9suqlrwjg77jwdm7tlgzsc0by"); // if (! (us = zmalloc(sizeof(usershape_t)))) -UNSUPPORTED("7f8nrnyuywny79cpzv6a49d8v"); // return (void *)0; -UNSUPPORTED("6viwgw3bdyvknckol3dsh1s5v"); // us->name = agstrdup (0, name); -UNSUPPORTED("ewc238znlsx5axoejodocqoyp"); // if (!gvusershape_file_access(us)) -UNSUPPORTED("7f8nrnyuywny79cpzv6a49d8v"); // return (void *)0; -UNSUPPORTED("4i933mk1cyf6xcljbpn69na20"); // assert(us->f); -UNSUPPORTED("43qnzsg978s9yom42c0n33wx3"); // switch(imagetype(us)) { -UNSUPPORTED("7eenfnk5yzoj21g2agitce6kx"); // case FT_NULL: -UNSUPPORTED("azdoxaxgz4fzzdoeyruqj36jk"); // if (!(us->data = (void*)find_user_shape(us->name))) -UNSUPPORTED("9mepm6hu7uqhpdwcg60h6pc3o"); // agerr(AGWARN, "\"%s\" was not found as a file or as a shape library member\n", us->name); -UNSUPPORTED("9bu5332flxhc1ivhmzuiqcjdh"); // free(us); -UNSUPPORTED("6948880uywn56ppo1fuqbm2rt"); // return (void *)0; -UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; -UNSUPPORTED("4p4ayucon7vqli1ylni5hjrfb"); // case FT_GIF: -UNSUPPORTED("c68gkmazl6aratmtonsx4fan9"); // gif_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("7da7e6aavwlcxg7eglorxy23g"); // case FT_PNG: -UNSUPPORTED("ubixbe52lmq7uzqie7h12582"); // png_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("9ysbcxl45mbfo0lhfihqfby4d"); // case FT_BMP: -UNSUPPORTED("9xqkpupuhywfcx0rkky4pnu5q"); // bmp_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("bhf95qvvxhf47ek76yf2a45l0"); // case FT_JPEG: -UNSUPPORTED("bq0stf6n5x5tzvjir50smcifq"); // jpeg_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("bazpzxo4uq0pwp7j4k94ngrtz"); // case FT_PS: -UNSUPPORTED("7bs1bijtavu2jceudpors0jbp"); // ps_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("8xv8jf3eindz5gftkzluercwh"); // case FT_WEBP: -UNSUPPORTED("91d89xyv6dtk8a479p0cfwyy7"); // webp_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("c8km9iw5nmks5lp6jl9j5s5q2"); // case FT_SVG: -UNSUPPORTED("a147xv5hgfkmevlpr3jb7fzci"); // svg_size(us); -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("242ztnyfnn9hx8sb3u5z3omun"); // case FT_PDF: -UNSUPPORTED("9ef2eux36pp9nf00d1ijmfbhm"); // pdf_size(us); -UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; -UNSUPPORTED("3h2lioytqam297xdu0a7l0y6w"); // case FT_ICO: -UNSUPPORTED("dj7xjql9twvpafx4qoyb07ra8"); // ico_size(us); -UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break; -UNSUPPORTED("90yyikfl7j30g6npbi9n0jxyw"); // // case FT_TIFF: -UNSUPPORTED("72cnoy8x3q67t6323yzwcdim8"); // // tiff_size(us); -UNSUPPORTED("1sbah8d4teszwq6tgzsohjpba"); // // break; -UNSUPPORTED("2hkvwieff33mlzyovvk76tpzn"); // case FT_EPS: /* no eps_size code available */ -UNSUPPORTED("bt2g0yhsy3c7keqyftf3c98ut"); // default: -UNSUPPORTED("7f9nr53m374zf5jnncru7yfn6"); // break; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("1ju3i4hja8fc5wwdkk9ed70t0"); // gvusershape_file_release(us); -UNSUPPORTED("6ovs68xjm9urfsh1qtosv57gi"); // (*(((Dt_t*)(ImageDict))->searchf))((ImageDict),(void*)(us),0000001); -UNSUPPORTED("e7wyuaoyszuqilaizfjv1mnp9"); // return us; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("7xahvc82av8lspjlm80i6ycqx"); // gvusershape_file_release(us); -UNSUPPORTED("2iqrgjc97xskxvw6791yf0sl7"); // return us; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1uc6t1ylgvem0d3xb73wkh6k5 -// point gvusershape_size_dpi (usershape_t* us, pointf dpi) -public static Object gvusershape_size_dpi(Object... arg) { -UNSUPPORTED("5vjx3ewef6ht20ld1et4ghr4y"); // point -UNSUPPORTED("5mxbu6cb95ay6dfs0i5n8icbs"); // gvusershape_size_dpi (usershape_t* us, pointf dpi) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("e5r3mj8btrkw973m7l0rritko"); // point rv; -UNSUPPORTED("6n6sowowfpx2bppltl0zu5v7v"); // if (!us) { -UNSUPPORTED("4zusj5p9eg9pazvp0px1fxvhy"); // rv.x = rv.y = -1; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else { -UNSUPPORTED("8egqtg148lkga2f8fnti0xikl"); // if (us->dpi != 0) { -UNSUPPORTED("appsmczgq79si2bttb9rrlf1n"); // dpi.x = dpi.y = us->dpi; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("8z1a50vlhe7l1e7lnn7h5r90w"); // rv.x = us->w * 72 / dpi.x; -UNSUPPORTED("b8wlsi5z8klt27ehe7vr9ue61"); // rv.y = us->h * 72 / dpi.y; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1vqiwf4q9iqmxqvd9e5qa1vo7 -// point gvusershape_size(graph_t * g, char *name) -public static Object gvusershape_size(Object... arg) { -UNSUPPORTED("3a8kgtxwhe9qi1f5wde0npt4d"); // point gvusershape_size(graph_t * g, char *name) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("e5r3mj8btrkw973m7l0rritko"); // point rv; -UNSUPPORTED("aj7pw6lpv6z6nan96bx4pdfu2"); // pointf dpi; -UNSUPPORTED("114dkd9d0mrkmtgl0ncfy2y88"); // static char* oldpath; -UNSUPPORTED("709e07k0mmaqqdi3botr9zj87"); // usershape_t* us; -UNSUPPORTED("d5ucq7enfbvarib2hwpi6y9qi"); // /* no shape file, no shape size */ -UNSUPPORTED("crs7cps8buaugcwtbezaqxd0q"); // if (!name || (*name == '\0')) { -UNSUPPORTED("4zusj5p9eg9pazvp0px1fxvhy"); // rv.x = rv.y = -1; -UNSUPPORTED("cs1ejkx9cw658cl8cagdzqrzm"); // return rv; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("24me4s4cte11xoie4uxxwajbs"); // if (!HTTPServerEnVar && (oldpath != Gvimagepath)) { -UNSUPPORTED("ba3zx115acxf5hiob55lfwvhd"); // oldpath = Gvimagepath; -UNSUPPORTED("63hyc3s3c95h5g1lp6aypzd8k"); // if (ImageDict) { -UNSUPPORTED("50x4kwt6y5jkwbeqmhvki188q"); // dtclose(ImageDict); -UNSUPPORTED("75t9qfgcu2fz0o59mjqh5rruv"); // ImageDict = (void *)0; -UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // } -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("d77jz2hp035qgnn72uyy7evkj"); // if ((dpi.y = GD_drawing(g)->dpi) >= 1.0) -UNSUPPORTED("8kboj4mypdab20ax7qfuq8oyp"); // dpi.x = dpi.y; -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("6buslnzh8a0nuwlk9wkfaytt8"); // dpi.x = dpi.y = (double)DEFAULT_DPI; -UNSUPPORTED("16h3qy8ek57tauhtrw8xkodar"); // us = gvusershape_open (name); -UNSUPPORTED("6tq0lkl6cmjltetu68liok738"); // rv = gvusershape_size_dpi (us, dpi); -UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -} diff -Nru plantuml-1.2017.15/src/gen/lib/gvc/regex_win32__c.java plantuml-1.2018.9/src/gen/lib/gvc/regex_win32__c.java --- plantuml-1.2017.15/src/gen/lib/gvc/regex_win32__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/gvc/regex_win32__c.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,3083 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of Smetana. - * Smetana is a partial translation of Graphviz/Dot sources from C to Java. - * - * (C) Copyright 2009-2017, Arnaud Roques - * - * This translation is distributed under the same Licence as the original C program: - * - ************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - ************************************************************************* - * - * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC - * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] - * - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - * - * You may obtain a copy of the License at - * - * http://www.eclipse.org/legal/epl-v10.html - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package gen.lib.gvc; -import static smetana.core.Macro.UNSUPPORTED; - -public class regex_win32__c { -//1 11gt8s6kgcau21nr404v703de -// static char re_syntax_table[256] - - - - -//3 70j25rmarcwvzsh361zahv8zo -// static void init_syntax_once () -public static Object init_syntax_once(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("efoxnnabz2ejqjq7yhilggwkl"); // init_syntax_once () -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("ch8iyg809c0lyd0bc1ytqve9u"); // register int c; -UNSUPPORTED("e5h3t56qntljcivxieh5a2mkl"); // static int done = 0; -UNSUPPORTED("97t7ymgg630qac6285iprjw9v"); // if (done) -UNSUPPORTED("z22f11bf96kkfe4raxc9v85x"); // return; -UNSUPPORTED("9t38w19yl5jyjw7oodb9irryl"); // bzero (re_syntax_table, sizeof re_syntax_table); -UNSUPPORTED("2rmhh76mmq03za3zgh7h64oxo"); // for (c = 'a'; c <= 'z'; c++) -UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; -UNSUPPORTED("7su4oyfxw838uiaf1heiygrem"); // for (c = 'A'; c <= 'Z'; c++) -UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; -UNSUPPORTED("3204uyvac8xoymt69hx2jb6xy"); // for (c = '0'; c <= '9'; c++) -UNSUPPORTED("c9iqf6ajwc71dgjf9wrkrmbc4"); // re_syntax_table[c] = 1; -UNSUPPORTED("bh45yjprswi5um0lyt9x4oony"); // re_syntax_table['_'] = 1; -UNSUPPORTED("2py1y9xsuhv2b6cmhyzmcm7c5"); // done = 1; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -//1 cnkdb29e6yd10874mh5xc3onb -// typedef long int s_reg_t - - -//1 112kj8zza71a63rts3ariqovo -// typedef unsigned long int active_reg_t - - -//1 5mb2m65nd4m3w2de4v3md7o7m -// typedef unsigned long int reg_syntax_t - - -//1 289hb08yhe1j84wgbo0riknbd -// extern reg_syntax_t re_syntax_options - - -//1 3tctp51mbz3u1lyv5hope3jn4 -// typedef int regoff_t - - -//1 5bxw12pxo297kjn20mqjfmb86 -// reg_syntax_t re_syntax_options - - - - -//3 cxgvt7ypgdfqf2pew3m9adw9i -// reg_syntax_t re_set_syntax(reg_syntax_t syntax) -public static Object re_set_syntax(Object... arg) { -UNSUPPORTED("1jmrr8fkrd2tsxzkjzybt7zfh"); // reg_syntax_t -UNSUPPORTED("54rdixdzkwy1r5i8yfr9pfenx"); // re_set_syntax(reg_syntax_t syntax) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8mpejiyi92887r7wji6mys7nq"); // reg_syntax_t ret = re_syntax_options; -UNSUPPORTED("4kgq73hxpobga7t16qgh5znpe"); // re_syntax_options = syntax; -UNSUPPORTED("f3b7mj138albdr4lodyomke0z"); // return ret; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -//1 4vl073wk5uvf75of82q0v5yyo -// static const char *re_error_msgid[] = - - -//1 1nsczrbp8olzcxwsty8y22p1n -// static int re_max_failures = 20000 - - -//1 bktlq1f2qk5dg76humjskteaa -// static char reg_unset_dummy - - -//1 1lj2324om1rijb97q9h9lxrhv -// typedef unsigned regnum_t - - -//1 e3zkpgg5cfqoq1zcfbcl2p5au -// typedef long pattern_offset_t - - - - -//3 b8oct2odjhnzacejd6swmozqo -// static reg_errcode_t regex_compile (const char *pattern, size_t size, reg_syntax_t syntax, struct re_pattern_buffer *bufp) -public static Object regex_compile(Object... arg) { -UNSUPPORTED("9aerjmw5n52ektwk47t1r9bh0"); // static reg_errcode_t -UNSUPPORTED("d6mg3ls5pg233p4i2fdv7ex1n"); // regex_compile (const char *pattern, -UNSUPPORTED("6t71eiupt12wdbfduq8n5i2sz"); // size_t size, -UNSUPPORTED("rg73gczoqylzcinp4bt2p1bw"); // reg_syntax_t syntax, -UNSUPPORTED("86tpwausdjloqigvxe0g3anqv"); // struct re_pattern_buffer *bufp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("7mnubzvdt62l8vdiefqprs10u"); // /* We fetch characters from PATTERN here. Even though PATTERN is -UNSUPPORTED("a1g4ovz742smqh486dhwytetq"); // `char *' (i.e., signed), we declare these variables as unsigned, so -UNSUPPORTED("6yz29a8qermrzbhvqskuno14k"); // they can be reliably used as array indices. */ -UNSUPPORTED("9zgwtw1nsbdz6hcmyfrgkt63h"); // register unsigned char c, c1; -UNSUPPORTED("4z9j463uvcrdj4sj8xj9ye9py"); // /* A random temporary spot in PATTERN. */ -UNSUPPORTED("7ccacvizh7wnu163gfkc81hu9"); // const char *p1; -UNSUPPORTED("a293r2jyasseioor4io0pp504"); // /* Points to the end of the buffer, where we should append. */ -UNSUPPORTED("5o1tyy96cneoiw799jnb2n7ke"); // register unsigned char *b; -UNSUPPORTED("cb629v9wydhjaoevjdzc89oy7"); // /* Keeps track of unclosed groups. */ -UNSUPPORTED("dgr9dbgbyc1ook38b1euoeouv"); // compile_stack_type compile_stack; -UNSUPPORTED("39kpylizmi208i8v5yv2jhjp1"); // /* Points to the current (ending) position in the pattern. */ -UNSUPPORTED("9mu7yzuommm5kljxb28ceesow"); // const char *p = pattern; -UNSUPPORTED("9ok1q4b2nv6m90q14x6i0k0vm"); // const char *pend = pattern + size; -UNSUPPORTED("3oga1grlge5vw6xitb7bzcjw9"); // /* How to translate the characters in the pattern. */ -UNSUPPORTED("b6qhkmvrybk31a74eyxl9sf73"); // char * translate = bufp->translate; -UNSUPPORTED("34h9x8riezst40pxo4ww0500r"); // /* Address of the count-byte of the most recently inserted `exactn' -UNSUPPORTED("a8lirzoby6qul9ds74xai8gbs"); // command. This makes it possible to tell if a new exact-match -UNSUPPORTED("6w2dibeuk4g54m7pwlej7e8g8"); // character can be added to that command or if the character requires -UNSUPPORTED("atv0mvbd2maopv2ing97xuaph"); // a new `exactn' command. */ -UNSUPPORTED("s22nw5te3tpx7wkcpookrrve"); // unsigned char *pending_exact = 0; -UNSUPPORTED("er4ntnybigvcvnva5ls2gkx9f"); // /* Address of start of the most recently finished expression. -UNSUPPORTED("d9z7cp97wfgynilwmgxdn4w5p"); // This tells, e.g., postfix * where to find the start of its -UNSUPPORTED("cwisfez4xccc9t277piikcz7u"); // operand. Reset at the beginning of groups and alternatives. */ -UNSUPPORTED("5319mhfghffljm52aipkegz7i"); // unsigned char *laststart = 0; -UNSUPPORTED("asyqn8tnmhbn0u8yih4eowlsv"); // /* Address of beginning of regexp, or inside of last group. */ -UNSUPPORTED("2prv77rl1a0ic6cloa505n74"); // unsigned char *begalt; -UNSUPPORTED("1mpmicgb0aqvs4efkuf1423bb"); // /* Place in the uncompiled pattern (i.e., the {) to -UNSUPPORTED("6vlkvivbip6585ngqifn0yut3"); // which to go back if the interval is invalid. */ -UNSUPPORTED("dhc5wj4xmde53jd8j5mmpspo2"); // const char *beg_interval; -UNSUPPORTED("3gbwrgdnq67nw2ais7b1oaood"); // /* Address of the place where a forward jump should go to the end of -UNSUPPORTED("39t3zafmxkdw0y4k5jpg705xl"); // the containing expression. Each alternative of an `or' -- except the -UNSUPPORTED("7ax9rzx6regnwitqwud6fas5h"); // last -- ends with a forward jump of this sort. */ -UNSUPPORTED("c8bejewn623onq21mfqd22e2w"); // unsigned char *fixup_alt_jump = 0; -UNSUPPORTED("a0p6z20zonf6yhyd6u7i62l1f"); // /* Counts open-groups as they are encountered. Remembered for the -UNSUPPORTED("f3mw4fx5ayqshia0u0wfwq612"); // matching close-group on the compile stack, so the same register -UNSUPPORTED("albygnk4x6lv0oonnbwcx9zse"); // number is put in the stop_memory as the start_memory. */ -UNSUPPORTED("1jexufhhoiubt850z3ndj8ej5"); // regnum_t regnum = 0; -UNSUPPORTED("7481cz4i3vyo797cewvok0k4c"); // /* Initialize the compile stack. */ -UNSUPPORTED("ao1ytyamhvicfeyzqsidalxsk"); // compile_stack.stack = ((compile_stack_elt_t *) malloc ((32) * sizeof (compile_stack_elt_t))); -UNSUPPORTED("3pmfpvmkfjp9kx78cvcxd6cpy"); // if (compile_stack.stack == (void *)0) -UNSUPPORTED("ex5zj292r0bm8ons2oenc7d53"); // return REG_ESPACE; -UNSUPPORTED("6rth766rpftr2lf9tsj3ipcy3"); // compile_stack.size = 32; -UNSUPPORTED("7l76n0edqpze4bfgwt0jnlr23"); // compile_stack.avail = 0; -UNSUPPORTED("4d5adh0083zve5yjpmlxli8h1"); // /* Initialize the pattern buffer. */ -UNSUPPORTED("6qgussdbr9ruavpzcr0y58ts9"); // bufp->syntax = syntax; -UNSUPPORTED("c9tm2xzkehz9kbyrn2bkv3dwg"); // bufp->fastmap_accurate = 0; -UNSUPPORTED("91jbv9it8qe6sah0sxn6nd4w2"); // bufp->not_bol = bufp->not_eol = 0; -UNSUPPORTED("3rafz8q4yl9qbchg80xvodlsy"); // /* Set `used' to zero, so that if we return an error, the pattern -UNSUPPORTED("b6wnwmphpmnza6rdw0x8yy5kj"); // printer (for debugging) will think there's no pattern. We reset it -UNSUPPORTED("8xe4i97w2l1mmth54di1u7rrd"); // at the end. */ -UNSUPPORTED("b65vrlaj7a5mdhjx1m4vm2kzu"); // bufp->used = 0; -UNSUPPORTED("5v5ffm48jpbjz5t7q75z95oqu"); // /* Always count groups, whether or not bufp->no_sub is set. */ -UNSUPPORTED("fcycoe4nhtup93j74aqh2jlu"); // bufp->re_nsub = 0; -UNSUPPORTED("57cfyb08w4wnczh1o759ayl4l"); // /* Initialize the syntax table. */ -UNSUPPORTED("eoiuv77ltbli38ssdpi2gptkk"); // init_syntax_once (); -UNSUPPORTED("f0l0ry0lbt2gj40a13217dx11"); // if (bufp->allocated == 0) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("eblz85b36y9pboxm6zt66xr2h"); // if (bufp->buffer) -UNSUPPORTED("53s3p7apfgsn3pkcwkqznue34"); // { /* If zero allocated, but buffer is non-null, try to realloc -UNSUPPORTED("3mwc7vljmgej2pox1thi77h1t"); // enough space. This loses if buffer's address is bogus, but -UNSUPPORTED("2hni8mwtvtzlrz7iztjmo1gkm"); // that is the user's responsibility. */ -UNSUPPORTED("4soy7dr6bhuvmx7k9nk1d0ql8"); // ((bufp->buffer) = (unsigned char *) realloc (bufp->buffer, (32) * sizeof (unsigned char))); -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("17v9yg0xtevf2uu5v3tmolocu"); // { /* Caller did not allocate a buffer. Do it for them. */ -UNSUPPORTED("6fravsvvcv922fixqgd9sfp3z"); // bufp->buffer = ((unsigned char *) malloc ((32) * sizeof (unsigned char))); -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("4as6xhocbf55x8cvv0z11to2x"); // if (!bufp->buffer) return (free (compile_stack.stack), REG_ESPACE); -UNSUPPORTED("af932qywpz9q6n0xek5lztd84"); // bufp->allocated = 32; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("5mg602ef37gzyyfswwutbcqs8"); // begalt = b = bufp->buffer; -UNSUPPORTED("89ht4djrhvh6xphi9py7k3pam"); // /* Loop through the uncompiled pattern until we're at the end. */ -UNSUPPORTED("5r7butg5genmj9dzegcwao4et"); // while (p != pend) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("42vbjcv24l0oaozyfwaw4j5nc"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("719kmsx403baae0d0ox2gyi3a"); // switch (c) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("32y7yv66mqjhrdqaf9ck9oi4y"); // case '^': -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("3j5jurrtqcxdphc3jlcg8lu39"); // if ( /* If at start of pattern, it's an operator. */ -UNSUPPORTED("acrtuah53gidq3uywocguoav"); // p == pattern + 1 -UNSUPPORTED("bs7cbfp1wd9jknqlj749u3bj3"); // /* If context independent, it's an operator. */ -UNSUPPORTED("9sznx5vvd3orgqcisdh571wv9"); // || syntax & (((((unsigned long int) 1) << 1) << 1) << 1) -UNSUPPORTED("7gzhx2l4j1gaba7epz2kdwhlj"); // /* Otherwise, depends on what's come before. */ -UNSUPPORTED("10earmgj12izv0tbj9aimxmji"); // || at_begline_loc_p (pattern, p, syntax)) -UNSUPPORTED("clssp7ivct1ku99qbhyb7dtzy"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (begline); } while (0); -UNSUPPORTED("euvqyl9ihnvv92dr2v2zshlo"); // else -UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("9ogqrievi7oirs7cd4cs33egg"); // case '$': -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("hai791a97htfukh6iawb46oz"); // if ( /* If at end of pattern, it's an operator. */ -UNSUPPORTED("a0h309uru3crtdmsxpji7m2j3"); // p == pend -UNSUPPORTED("bs7cbfp1wd9jknqlj749u3bj3"); // /* If context independent, it's an operator. */ -UNSUPPORTED("9sznx5vvd3orgqcisdh571wv9"); // || syntax & (((((unsigned long int) 1) << 1) << 1) << 1) -UNSUPPORTED("2iqqtdvj90ata5pvx2o27gw4s"); // /* Otherwise, depends on what's next. */ -UNSUPPORTED("67wgd1do640yncemi3ce0qj90"); // || at_endline_loc_p (p, pend, syntax)) -UNSUPPORTED("35lv6vfpgmavt421g5ug4tdbc"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (endline); } while (0); -UNSUPPORTED("euvqyl9ihnvv92dr2v2zshlo"); // else -UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("4yw8evd0fubkfck5nezds5dhn"); // case '+': -UNSUPPORTED("f0rooqc2e80a2plohrq4c3c91"); // case '?': -UNSUPPORTED("1ku9g8vhwccbudpz9e300f03z"); // if ((syntax & (((unsigned long int) 1) << 1)) -UNSUPPORTED("7sxu3x1nkq0rp14piw14s336e"); // || (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("ak9il2l94xwmflwso0qxuq07i"); // handle_plus: -UNSUPPORTED("77sjlj9q2m2icdnuxqgd896ux"); // case '*': -UNSUPPORTED("bog9pqkld0m0t6ypotbesbb2s"); // /* If there is no previous pattern... */ -UNSUPPORTED("6horrl50ttv3j0vlv0d550qe5"); // if (!laststart) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("8qgst65bgbkg69wykq7paitn0"); // if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("4zp3pjt3o3sewewdrckac5e7t"); // return (free (compile_stack.stack), REG_BADRPT); -UNSUPPORTED("2ji76vo0qsyt5ldqyext7tdsg"); // else if (!(syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("2vnh9foicn3ppcbpvb6hdon87"); // /* Are we optimizing this jump? */ -UNSUPPORTED("60ry57pj80rgxp87816o6vpy2"); // boolean keep_string_p = 0; -UNSUPPORTED("6qwgte4fwcf1xqfiuge2ssau3"); // /* 1 means zero (many) matches is allowed. */ -UNSUPPORTED("7z75b80h28y72skvw3v96x2y5"); // char zero_times_ok = 0, many_times_ok = 0; -UNSUPPORTED("a3pm3eb949njdi5ypawoqc46v"); // /* If there is a sequence of repetition chars, collapse it -UNSUPPORTED("dovcg85ak5c45w4j2nz1vphpt"); // down to just one (the right one). We can't combine -UNSUPPORTED("enmqxu33e2oz4v7ad1h3regi1"); // interval operators with these because of, e.g., `a{2}*', -UNSUPPORTED("2ic453t1t5s0w63b328mvtw1h"); // which should only match an even number of `a's. */ -UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("1998skt4l5yp1v1sml3xtum0t"); // zero_times_ok |= c != '+'; -UNSUPPORTED("d4p0t1ujgqb32xcytuivs2m0m"); // many_times_ok |= c != '?'; -UNSUPPORTED("891uwttbfnv5bc58wpbg1fhgl"); // if (p == pend) -UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; -UNSUPPORTED("1ph6d2iv2trnwdx326iuetr4g"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("do4ccpdwh7h97tg1nxsm8tt4d"); // if (c == '*' -UNSUPPORTED("b9cokjueamyv69axw1ekph5qa"); // || (!(syntax & (((unsigned long int) 1) << 1)) && (c == '+' || c == '?'))) -UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; -UNSUPPORTED("4zyx7dzchkorh28bz90x76p2g"); // else if (syntax & (((unsigned long int) 1) << 1) && c == '\\') -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("e9xhg2qnbm79uk0vrkf792u29"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); -UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); -UNSUPPORTED("31364dtwzgpxty30b38zc4zkj"); // if (!(c1 == '+' || c1 == '?')) -UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { -UNSUPPORTED("2t22wkw5f3ffgm4ga51u5nrej"); // p--; -UNSUPPORTED("2t22wkw5f3ffgm4ga51u5nrej"); // p--; -UNSUPPORTED("brutz3uly6r5jyimug3eb5y9n"); // break; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("e31jqqw74li41ohhn86f6dom7"); // c = c1; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("5cyajgw0lqe5reqenlh6er6vk"); // p--; -UNSUPPORTED("7vckzntfuo1ibi8r53gsfg8al"); // break; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("5usbancvr06c7aua10b6rnz2v"); // /* If we get here, we found another repeat character. */ -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("4z09n9ulcj74vli0m0kclo5i"); // /* Star, etc. applied to an empty pattern is equivalent -UNSUPPORTED("1ixkehs9qjp0ehix96jklbcfm"); // to an empty pattern. */ -UNSUPPORTED("60xmx571g6e7xq9uvs63uu1eq"); // if (!laststart) -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("hi54423z7c97klm7jyc2i54y"); // /* Now we know whether or not zero matches is allowed -UNSUPPORTED("cdhyalprzmam31a4ky61gdsu5"); // and also whether or not two or more matches is allowed. */ -UNSUPPORTED("82umz1mp8urx9qjjtqh65sk5"); // if (many_times_ok) -UNSUPPORTED("8omf20fupbos0ngb4nxaz3sj"); // { /* More than one repetition is allowed, so put in at the -UNSUPPORTED("6vwybrs5isd11ynby19imvgnc"); // end a backward relative jump from `b' to before the next -UNSUPPORTED("7k3po89z1y12gwpxracwd1zwr"); // jump we're going to put in below (which jumps from -UNSUPPORTED("497rlrbp2r6kokgq8fic5z8li"); // laststart to after this jump). -UNSUPPORTED("elt3pujxvh1j9wbns2s7urafl"); // But if we are at the `*' in the exact sequence `.*\n', -UNSUPPORTED("aq9r7pdk4mwsuo46v85xd7nle"); // insert an unconditional jump backwards to the ., -UNSUPPORTED("afees40xo77whl3qvfrsjg0p2"); // instead of the beginning of the loop. This way we only -UNSUPPORTED("2f6wchn2e63ok4vso04jpeozp"); // push a failure point once, instead of every time -UNSUPPORTED("2mne6btvrwz6ly84kpb5k8fz2"); // through the loop. */ -UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; -UNSUPPORTED("7osfsgzoickbv6hh4uet35ib8"); // /* Allocate the space for the jump. */ -UNSUPPORTED("38dw1m55ji4uptkiga2iwgab7"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("2v0jxylpfaawr8vdl2dov0us5"); // /* We know we are not at the first character of the pattern, -UNSUPPORTED("djrrtgjb76xh1l5pw5u4kxcnv"); // because laststart was nonzero. And we've already -UNSUPPORTED("5f4ly8ng2ytcbc7ypdbpa8e11"); // incremented `p', by the way, to be the character after -UNSUPPORTED("4as3ltw89z2kch0mrty7q58ey"); // the `*'. Do we have to do something analogous here -UNSUPPORTED("d3grtqmpebse1zxznnwl3jm7c"); // for null bytes, because of RE_DOT_NOT_NULL? */ -UNSUPPORTED("vbl73uentmynsl9r6evk8ulc"); // if ((translate ? (char) translate[(unsigned char) (*(p - 2))] : (*(p - 2))) == (translate ? (char) translate[(unsigned char) ('.')] : ('.')) -UNSUPPORTED("3lbv5kv4tdnxzqobvqv6gz12l"); // && zero_times_ok -UNSUPPORTED("1ykhfelz1q80iguwwtohwqvm2"); // && p < pend && (translate ? (char) translate[(unsigned char) (*p)] : (*p)) == (translate ? (char) translate[(unsigned char) ('\n')] : ('\n')) -UNSUPPORTED("bxrp4x7jxoo38mvd9ft3k5db"); // && !(syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("741cloh2pdrplimiiruq6t4ct"); // { /* We have .*\n. */ -UNSUPPORTED("317e9s7jnbmgql8x4fdezgmv0"); // store_op1 (jump, b, (int) ((laststart) - (b) - 3)); -UNSUPPORTED("8ryrgqjl7v6ohb01o5em2psns"); // keep_string_p = 1; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("3ksp6xs2pd8hkq033e06g4a00"); // /* Anything else. */ -UNSUPPORTED("4ab5zrwtdkltgbt8onvdet2r1"); // store_op1 (maybe_pop_jump, b, (int) ((laststart - 3) - (b) - 3)); -UNSUPPORTED("f4gsd1otghvhc8czjmw8qq776"); // /* We've added more stuff to the buffer. */ -UNSUPPORTED("7hdmsj9mi4jwnv83ar1ez4kwn"); // b += 3; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("7htghz4zhsf1uqpwp6ytvbhih"); // /* On failure, jump from laststart to b + 3, which will be the -UNSUPPORTED("c630s54imd7p1b0raogcspf6p"); // end of the buffer after this jump is inserted. */ -UNSUPPORTED("5i16nim58sq8mvfckzqrj7q7e"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("e1gqwwg06ek9zwsxdqko22t8"); // insert_op1 (keep_string_p ? on_failure_keep_string_jump -UNSUPPORTED("od51xm1io9lvsdmwr60fm9nx"); // : on_failure_jump, -UNSUPPORTED("demgpwduvdu6c55lzwftle76m"); // laststart, (int) ((b + 3) - ( -UNSUPPORTED("a887hw7h3lz3jofwz10uxjcdp"); // laststart) - 3), b); -UNSUPPORTED("1t3kkww9qyeskw70p028ll4r1"); // pending_exact = 0; -UNSUPPORTED("1jpgahganw1gip7gnwn5n2vx6"); // b += 3; -UNSUPPORTED("38n9qcy0vfr2upedrm1d6by5o"); // if (!zero_times_ok) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("15rx6swjp6qikvp0jmiy5rm4m"); // /* At least one repetition is required, so insert a -UNSUPPORTED("5xq4uy1msul1zhp9ptz49bbvn"); // `dummy_failure_jump' before the initial -UNSUPPORTED("3q62p85szhotzr22iijxb1lzh"); // `on_failure_jump' instruction of the loop. This -UNSUPPORTED("5ukburrf5iegq4x208czcfxp7"); // effects a skip over that instruction the first time -UNSUPPORTED("9zr6wiepyct1g2798ohlu821l"); // we hit that loop. */ -UNSUPPORTED("38dw1m55ji4uptkiga2iwgab7"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("caftp211etknfq81tggr97kq3"); // insert_op1 (dummy_failure_jump, laststart, (int) ((laststart + 6) - (laststart) - 3), b); -UNSUPPORTED("7hdmsj9mi4jwnv83ar1ez4kwn"); // b += 3; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("a2evu0k4b91gqn1jmn3a0jwzw"); // case '.': -UNSUPPORTED("5nlf7z9fx92ejvc0jjc27l3ks"); // laststart = b; -UNSUPPORTED("14r433r50a5mz9kdbq4siwjqy"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (anychar); } while (0); -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("7r93xgyv26x925aap3ia8ymon"); // case '[': -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("2dyj1s6d9ag4nvt1f1crrdjfn"); // boolean had_char_class = 0; -UNSUPPORTED("4a3jhscbb3cd0w52yk8g7bkhm"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); -UNSUPPORTED("18lthbap52pmrc5qc0gdkqazi"); // /* Ensure that we have enough space to push a charset: the -UNSUPPORTED("64im3as1hhwe4tfm27p855icz"); // opcode, the length count, and the bitset; 34 bytes in all. */ -UNSUPPORTED("dtfdonlqdk0z7gsn1s36st33w"); // while ((unsigned long) (b - bufp->buffer + (34)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("8dx5294ey8snj5idlltwvrhb1"); // laststart = b; -UNSUPPORTED("610aa188uk96qcj24orwjx8fs"); // /* We test `*p == '^' twice, instead of using an if -UNSUPPORTED("5bc7brntk24ooxfmk1srxj8cb"); // statement, so we only need one BUF_PUSH. */ -UNSUPPORTED("f50kr5oskb25svx2g868njm8n"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (*p == '^' ? charset_not : charset); } while (0); -UNSUPPORTED("8evba7dkivr9l77jkvcmqcwz8"); // if (*p == '^') -UNSUPPORTED("6qmpdja8bt371mk2seyaa2gbr"); // p++; -UNSUPPORTED("7cikubv9dt5tpzkohonns5grc"); // /* Remember the first position in the bracket expression. */ -UNSUPPORTED("ams11hw6png742la6sel3atlf"); // p1 = p; -UNSUPPORTED("7xg1okqa5l3piclyijoek8ed8"); // /* Push the number of bytes in the bitmap. */ -UNSUPPORTED("attsgdtz0wo8uzzx0jzzakd9s"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) ((1 << 8) / 8); } while (0); -UNSUPPORTED("9i1ubvjzgw51kylobwxvkoguf"); // /* Clear the whole map. */ -UNSUPPORTED("3yt3lfhbs0hx9w9ci87vt4p51"); // bzero (b, (1 << 8) / 8); -UNSUPPORTED("2m8299zx4gtxg4ncikd476gkx"); // /* charset_not matches newline according to a syntax bit. */ -UNSUPPORTED("16flegxkvnil6me4t0kb73hcj"); // if ((re_opcode_t) b[-2] == charset_not -UNSUPPORTED("44gymzta58w37g7hbxz29z8ht"); // && (syntax & ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("bm4wsfgshzu6e47pvkdqzgoz6"); // (b[((unsigned char) ('\n')) / 8] |= 1 << (((unsigned char) '\n') % 8)); -UNSUPPORTED("2dle8bszohkrok9ivamd6wqu8"); // /* Read in characters and ranges, setting map bits. */ -UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("6jfb28a8r43ndwdevd7rrjlb2"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); -UNSUPPORTED("1ph6d2iv2trnwdx326iuetr4g"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("djf8gjrarnydrvlu8tzndsd4t"); // /* \ might escape characters inside [...] and [^...]. */ -UNSUPPORTED("89w50n0xz0xx1wgf8ls0sce25"); // if ((syntax & ((unsigned long int) 1)) && c == '\\') -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("e9xhg2qnbm79uk0vrkf792u29"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); -UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); -UNSUPPORTED("d1ssg2hoazmd76m91z40sp5sn"); // (b[((unsigned char) (c1)) / 8] |= 1 << (((unsigned char) c1) % 8)); -UNSUPPORTED("cke4ze78n6mw03utm8hpk0ozq"); // continue; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("bvll4h37ech1nvv3p44tc97ia"); // /* Could be the end of the bracket expression. If it's -UNSUPPORTED("464yveauwiujz5tkl76ikld18"); // not (i.e., when the bracket expression is `[]' so -UNSUPPORTED("ekv9yerdywogeillz767k3yq9"); // far), the ']' character bit gets set way below. */ -UNSUPPORTED("39qeut34k7f0lyjj4z495n6am"); // if (c == ']' && p != p1 + 1) -UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; -UNSUPPORTED("d3v48zs419s4mxk9yyv5xgccj"); // /* Look ahead to see if it's a range when the last thing -UNSUPPORTED("65vqnx3pinl0sxqecc7937imc"); // was a character class. */ -UNSUPPORTED("8dtiybchqrzjmzzltkvknsq96"); // if (had_char_class && c == '-' && *p != ']') -UNSUPPORTED("8zurthmteo7b71btgvw1ke4rg"); // return (free (compile_stack.stack), REG_ERANGE); -UNSUPPORTED("d3v48zs419s4mxk9yyv5xgccj"); // /* Look ahead to see if it's a range when the last thing -UNSUPPORTED("5wt9bnagn7y3isqyb5kxh04s7"); // was a character: if this is a hyphen not at the -UNSUPPORTED("342gxn589rm7wkuq6jbilt9fr"); // beginning or the end of a list, then it's the range -UNSUPPORTED("8a0p71nhvq7jckckna5u4qr7t"); // operator. */ -UNSUPPORTED("bfxjivoy25rc3bw7qrspkzv1k"); // if (c == '-' -UNSUPPORTED("93mph3xo98uvv6qn8e4tbid15"); // && !(p - 2 >= pattern && p[-2] == '[') -UNSUPPORTED("1ce2lptewofyiq5ojhwc5va79"); // && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') -UNSUPPORTED("5e843qj23bor49sf7nbcpwezc"); // && *p != ']') -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("f3s9czjbpp43p2benwj88e4vz"); // reg_errcode_t ret -UNSUPPORTED("bgzy0fkxhr0j88bt28d2oeo7m"); // = compile_range (&p, pend, translate, syntax, b); -UNSUPPORTED("6to7cm3b6s0m5pujlkqqm3m2x"); // if (ret != REG_NOERROR) return (free (compile_stack.stack), ret); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("65gxrs7y9lu8v93z6nz75m4ck"); // else if (p[0] == '-' && p[1] != ']') -UNSUPPORTED("5av67x62ybjftr7suvc3tfqay"); // { /* This handles ranges made up of characters only. */ -UNSUPPORTED("cmimxguouw0qbcmhrejq3dnrm"); // reg_errcode_t ret; -UNSUPPORTED("6th47hqx3651aqvqnkzfm9yhl"); // /* Move past the `-'. */ -UNSUPPORTED("518hxi8xgn35zetedpma2oo2k"); // do {if (p == pend) return REG_EEND; c1 = (unsigned char) *p++; if (translate) c1 = (unsigned char) translate[c1]; } while (0); -UNSUPPORTED("8tyv3mj3db8ezfohi5j249qg9"); // ret = compile_range (&p, pend, translate, syntax, b); -UNSUPPORTED("6to7cm3b6s0m5pujlkqqm3m2x"); // if (ret != REG_NOERROR) return (free (compile_stack.stack), ret); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("60ee1e25m2s16fec1vpvlz4n7"); // /* See if we're at the beginning of a possible character -UNSUPPORTED("5paafwhmjbew6wm1r82cmglhi"); // class. */ -UNSUPPORTED("1fxr5b7xujuw4t8tdfwstlhb5"); // else if (syntax & ((((unsigned long int) 1) << 1) << 1) && c == '[' && *p == ':') -UNSUPPORTED("c6rvznitpculxv2jbhy4ncxyq"); // { /* Leave room for the null. */ -UNSUPPORTED("35kxjv2sfddffc4bqeyh4imoc"); // char str[6 + 1]; -UNSUPPORTED("eqri2rfe7jnz1m2rij615jaj1"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("d4co4ddeumifnjey3eestnfzq"); // c1 = 0; -UNSUPPORTED("4w2zfigedythaavjy46j6zdev"); // /* If pattern is `[[:'. */ -UNSUPPORTED("7eef052f6ws02kwwd07t2gogt"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); -UNSUPPORTED("6rl79w31o26w7y9v243bzntd1"); // for (;;) -UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { -UNSUPPORTED("5rs5zp1k5smyekvir9pcnto9c"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("5epbd4u9xrfpj6miw9wkaw3as"); // if (c == ':' || c == ']' || p == pend -UNSUPPORTED("1xzx4vfazvv793wm3hh5e4ixz"); // || c1 == 6) -UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; -UNSUPPORTED("a6wcfy57u3wkrc8jiwpoxhutg"); // str[c1++] = c; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("6hm7an9ruv18077h9go7vsgf4"); // str[c1] = '\0'; -UNSUPPORTED("bi9fgjbp9y3y2pyuu9tszhyox"); // /* If isn't a word bracketed by `[:' and:`]': -UNSUPPORTED("7nvg1ljm6ad0h7g7s60ej9uca"); // undo the ending character, the letters, and leave -UNSUPPORTED("2272ea1yqp1bpznxgbrxbp00w"); // the leading `:' and `[' (but set bits for them). */ -UNSUPPORTED("5tqbx68w26ea5218a43fyowz3"); // if (c == ':' && *p == ']') -UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { -UNSUPPORTED("dicsp7memxlin76m5jtuhk6dv"); // int ch; -UNSUPPORTED("74i3rk9pefjb3y4b7o4aa2iq9"); // boolean is_alnum = ((strcmp (str, "alnum") == 0)); -UNSUPPORTED("89wnjt7xu39ig5ibxfz800la7"); // boolean is_alpha = ((strcmp (str, "alpha") == 0)); -UNSUPPORTED("70u6gm5ko26rbqgsh5w8iswjq"); // boolean is_blank = ((strcmp (str, "blank") == 0)); -UNSUPPORTED("1aaohxjchuctfrlc9v29p77u8"); // boolean is_cntrl = ((strcmp (str, "cntrl") == 0)); -UNSUPPORTED("74upuhtioo8extzco95rwsrj8"); // boolean is_digit = ((strcmp (str, "digit") == 0)); -UNSUPPORTED("44vvyq4v0mo3kf1e60wcz5pq1"); // boolean is_graph = ((strcmp (str, "graph") == 0)); -UNSUPPORTED("ampk1k6gw3p7tnpd7rlk9zpbh"); // boolean is_lower = ((strcmp (str, "lower") == 0)); -UNSUPPORTED("dfcf36k8u7asts9g1790th87m"); // boolean is_print = ((strcmp (str, "print") == 0)); -UNSUPPORTED("94toygdeo23h0nswi5ypjemuj"); // boolean is_punct = ((strcmp (str, "punct") == 0)); -UNSUPPORTED("5gzado7yzz8iw3b7wmsnnv1c"); // boolean is_space = ((strcmp (str, "space") == 0)); -UNSUPPORTED("brptc46jbde0ytz2cf57z0qj9"); // boolean is_upper = ((strcmp (str, "upper") == 0)); -UNSUPPORTED("6y30d6k6j6v6mo0u34x84x7pi"); // boolean is_xdigit = ((strcmp (str, "xdigit") == 0)); -UNSUPPORTED("5xbajy2nf78y44rt7wqi0ipvw"); // if (!(((strcmp (str, "alpha") == 0)) || ((strcmp (str, "upper") == 0)) || ((strcmp (str, "lower") == 0)) || ((strcmp (str, "digit") == 0)) || ((strcmp (str, "alnum") == 0)) || ((strcmp (str, "xdigit") == 0)) || ((strcmp (str, "space") == 0)) || ((strcmp (str, "print") == 0)) || ((strcmp (str, "punct") == 0)) || ((strcmp (str, "graph") == 0)) || ((strcmp (str, "cntrl") == 0)) || ((strcmp (str, "blank") == 0)))) -UNSUPPORTED("9roq2o5jp44jioxvumhpzhasp"); // return (free (compile_stack.stack), REG_ECTYPE); -UNSUPPORTED("b01volng00k0jszlwguip1za2"); // /* Throw away the ] at the end of the character -UNSUPPORTED("6v4ad7tk28ej4z6x4p9zfn9ip"); // class. */ -UNSUPPORTED("5rs5zp1k5smyekvir9pcnto9c"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("ahygyv10li3nm82zryhpg9mbm"); // if (p == pend) return (free (compile_stack.stack), REG_EBRACK); -UNSUPPORTED("e0htyvo32yvtsowvtr07q7jcw"); // for (ch = 0; ch < 1 << 8; ch++) -UNSUPPORTED("ednrjrwumcyqj77ytrr2eszv"); // { -UNSUPPORTED("3k2ocusl5iq9ds3ppdqj68572"); // /* This was split into 3 if's to -UNSUPPORTED("9gbw8s1phg1eyew1sfpr5kp3f"); // avoid an arbitrary limit in some compiler. */ -UNSUPPORTED("2cntwsg5hxbdi0ckf9y8w0mnq"); // if ( (is_alnum && (1 && isalnum (ch))) -UNSUPPORTED("1zgfij4s84eufjba2ozx3lkrk"); // || (is_alpha && (1 && isalpha (ch))) -UNSUPPORTED("bqa0xuagje3ikuybu56a5lsfa"); // || (is_blank && ((ch) == ' ' || (ch) == '\t')) -UNSUPPORTED("dnw7neodbiod4p16f06qsugzl"); // || (is_cntrl && (1 && iscntrl (ch)))) -UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); -UNSUPPORTED("6a1x5lr2tbh4dux8kqoyovq6z"); // if ( (is_digit && (1 && isdigit (ch))) -UNSUPPORTED("6uh9v7mcu8jqpc8ab1xqdpupe"); // || (is_graph && (1 && isprint (ch) && !isspace (ch))) -UNSUPPORTED("2kza3pwfg7co598ybwubyyjtb"); // || (is_lower && (1 && islower (ch))) -UNSUPPORTED("2ve5o48kbom0zknpyyo4nrw8b"); // || (is_print && (1 && isprint (ch)))) -UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); -UNSUPPORTED("eu7igk6hg1s58sklwzk61h4b7"); // if ( (is_punct && (1 && ispunct (ch))) -UNSUPPORTED("eu3t6ngjxiw3bd3n428dpndsz"); // || (is_space && (1 && isspace (ch))) -UNSUPPORTED("cyrylgd8tsf5lm7q40ozat1u6"); // || (is_upper && (1 && isupper (ch))) -UNSUPPORTED("6uhsgqbeke0ipkactcwfponfm"); // || (is_xdigit && (1 && isxdigit (ch)))) -UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); -UNSUPPORTED("d10pfpemohjrojtw32b9u288j"); // if ( translate && (is_upper || is_lower) -UNSUPPORTED("dn91c7ek6aq14v8orwpui41nf"); // && ((1 && isupper (ch)) || (1 && islower (ch)))) -UNSUPPORTED("6qfn7xakyg09tnfa2ie1sh8p6"); // (b[((unsigned char) (ch)) / 8] |= 1 << (((unsigned char) ch) % 8)); -UNSUPPORTED("4mlmk54q1pd097btjgvhds4or"); // } -UNSUPPORTED("377au4sk1ya757gr7n0hqcmrn"); // had_char_class = 1; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else -UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { -UNSUPPORTED("7m4co85wi9arl9dcdfqpb4za8"); // c1++; -UNSUPPORTED("20tgbjihyvtowact7dzcr1ecf"); // while (c1--) -UNSUPPORTED("8je1mldqzk080hkvqxenba16t"); // p--; -UNSUPPORTED("48kiij4wie0njh1vtga7it2dv"); // (b[((unsigned char) ('[')) / 8] |= 1 << (((unsigned char) '[') % 8)); -UNSUPPORTED("dv206lne3atc9xm9yvrhv1ybg"); // (b[((unsigned char) (':')) / 8] |= 1 << (((unsigned char) ':') % 8)); -UNSUPPORTED("41vc3rnsrwhzg40t2l6ddpjfb"); // had_char_class = 0; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("nugbt1in6a1t1qaxqdyyi3ep"); // had_char_class = 0; -UNSUPPORTED("17maz3hujafwurweozb151wdn"); // (b[((unsigned char) (c)) / 8] |= 1 << (((unsigned char) c) % 8)); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("ehzhyhula77mysp4xro2dci8t"); // /* Discard any (non)matching list bytes that are all 0 at the -UNSUPPORTED("el3n9zylp6tlrb6d73napyvmy"); // end of the map. Decrease the map-length byte too. */ -UNSUPPORTED("5aojv97eoyl5m04xfurgaavwm"); // while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) -UNSUPPORTED("ajlocpcq3igxmb5gmsoqvv2es"); // b[-1]--; -UNSUPPORTED("bhvngkxhzl8kmmso1yya535k3"); // b += b[-1]; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("6bh4kues0yl62d5yxc9atvjif"); // case '(': -UNSUPPORTED("10vjrts0i5hyw8tlbrt0z7rxn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("bmyrcl5ximm9vy0tneijgrytk"); // goto handle_open; -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("1e0dw1ejy35o3woadzbcsm7fr"); // case ')': -UNSUPPORTED("10vjrts0i5hyw8tlbrt0z7rxn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("3s6h8cwqnf4sxe6ctgnhnea58"); // goto handle_close; -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("e3rwmj3a70hs7pld4kwdx60mn"); // case '\n': -UNSUPPORTED("70gx6eoougt8rlinl56yw83xr"); // if (syntax & (((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("5jivfhwm58xf3nhm2fe6mhe63"); // goto handle_alt; -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("4alxh05h1fjl2sladyp35v6wj"); // case '|': -UNSUPPORTED("3torkuptfbkp3zjwrckz7pqdn"); // if (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("5jivfhwm58xf3nhm2fe6mhe63"); // goto handle_alt; -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("4pyfskl7wp2jd81x0kmp62qoi"); // case '{': -UNSUPPORTED("5b1d1n2on553ca86p9l993tzn"); // if (syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) && syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("48zoic9u273bq7o6wfz7y7fsv"); // goto handle_interval; -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("uivpjrr5me8j92jky5okan1c"); // goto normal_char; -UNSUPPORTED("5350k8qj9jz4pvuqs0weppxzm"); // case '\\': -UNSUPPORTED("drfl8x3xhp9nddd3popxg4kkf"); // if (p == pend) return (free (compile_stack.stack), REG_EESCAPE); -UNSUPPORTED("27v1be7swlc5n86wdyk7yqicm"); // /* Do not translate the character after the \, so that we can -UNSUPPORTED("aimxtldmdqlup4n4gcasbmjpm"); // distinguish, e.g., \B from \b, even if we normally would -UNSUPPORTED("8y750xv4fwoof20pgyb54iljp"); // translate, e.g., B to b. */ -UNSUPPORTED("emr80p3t30z3qcchdf6qsg7op"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; } while (0); -UNSUPPORTED("1wwqm41fujo96fngaibe11cs"); // switch (c) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("8jxolljx883gvj5ry1lre79rm"); // case '(': -UNSUPPORTED("59nlrexduxa9d2pv4p8p4wfyn"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; -UNSUPPORTED("1mo91efxfidrlkj7o2hpimm5g"); // handle_open: -UNSUPPORTED("cc2g9mgbjo7991epy9celv5dq"); // bufp->re_nsub++; -UNSUPPORTED("e816ua3kiygoarxwt4u3kjw2e"); // regnum++; -UNSUPPORTED("abfkotx8f2o71l3ungy2dc61b"); // if ((compile_stack.avail == compile_stack.size)) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("5r9ltvya89zzc88t9p8g86dxp"); // ((compile_stack.stack) = ( -UNSUPPORTED("5q6n9lfuwcrd4xf1g8vam0mqg"); // compile_stack_elt_t *) realloc (compile_stack.stack, (compile_stack.size << 1) * sizeof ( -UNSUPPORTED("2a7bsn9w2iinvqmd970g996fq"); // compile_stack_elt_t))); -UNSUPPORTED("dsrcc4quas84hhfjjm5yh2be8"); // if (compile_stack.stack == (void *)0) return REG_ESPACE; -UNSUPPORTED("8kq2kc3jebolynu1cy6403pl0"); // compile_stack.size <<= 1; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("e0bq2fat5uym1sf4darkcwl7v"); // /* These are the values to restore when we hit end of this -UNSUPPORTED("3vpixvd7xctqmc3ngtezp4xh4"); // group. They are all relative offsets, so that if the -UNSUPPORTED("2v6zztbhem2o09k7pqvggwe8h"); // whole pattern moves because of realloc, they will still -UNSUPPORTED("57di400em2riuffwpvny0f24u"); // be valid. */ -UNSUPPORTED("8rxnof37j5xup2c6z4diq79ou"); // (compile_stack.stack[compile_stack.avail]).begalt_offset = begalt - bufp->buffer; -UNSUPPORTED("9nay0qlhefwna3c6dilyk0ljp"); // (compile_stack.stack[compile_stack.avail]).fixup_alt_jump -UNSUPPORTED("aq269vu0tq0y8wvt7vg6y41u8"); // = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; -UNSUPPORTED("f2a1p7nj50nhzemnvvv85l9wp"); // (compile_stack.stack[compile_stack.avail]).laststart_offset = b - bufp->buffer; -UNSUPPORTED("3ikd9wh2ibpe6fnfbwac6mal"); // (compile_stack.stack[compile_stack.avail]).regnum = regnum; -UNSUPPORTED("1222t3yuwlm1hv92xmzgstlpj"); // /* We will eventually replace the 0 with the number of -UNSUPPORTED("b5a63c42wobd53sp3c64zj34u"); // groups inner to this one. But do not push a -UNSUPPORTED("1indupc2ufbt22ci1btaoi3w1"); // start_memory for groups beyond the last one we can -UNSUPPORTED("clbbjbwg9b4yr40r3qt26gayn"); // represent in the compiled pattern. */ -UNSUPPORTED("dn6qx81h224i04gen8lz36bur"); // if (regnum <= 255) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("b55i0sl0dvhuj7r94cz8uascg"); // (compile_stack.stack[compile_stack.avail]).inner_group_offset = b - bufp->buffer + 2; -UNSUPPORTED("crcx4g4ali1dijvt94wdz6nsm"); // do { while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (start_memory); *b++ = (unsigned char) (regnum); *b++ = (unsigned char) (0); } while (0); -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("94rzmxep7enhqkfnp2762ytyy"); // compile_stack.avail++; -UNSUPPORTED("dphv9qka2txhy68rnsif6jynt"); // fixup_alt_jump = 0; -UNSUPPORTED("dvt6va09huijx10zufnnjqgl3"); // laststart = 0; -UNSUPPORTED("90zo4it529eaunfkfdxoxrdgj"); // begalt = b; -UNSUPPORTED("dvj2nuag66y7el3zrpla0153y"); // /* If we've reached MAX_REGNUM groups, then this open -UNSUPPORTED("2u4e034ze821746znru3h0b45"); // won't actually generate any code, so we'll have to -UNSUPPORTED("dk5vb9d5gkrw8sibofm4qt4ue"); // clear pending_exact explicitly. */ -UNSUPPORTED("7s8z4qnugzgnbuvds8u8a5jep"); // pending_exact = 0; -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("f58m8dl8wsiu09tv3k6hddsnz"); // case ')': -UNSUPPORTED("8rxf228e9g6ihw68iqgw5ye4v"); // if (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) goto normal_backslash; -UNSUPPORTED("7yogipyu9e9xkgapyvsso5js4"); // if ((compile_stack.avail == 0)) { -UNSUPPORTED("8jaoyupj1e28u8vqk14htwrtv"); // if (syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("7twsisd1xmsx52xuobbqhozvn"); // goto normal_backslash; -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("dn8ttvbrvj1svr73kt4zmcugv"); // return (free (compile_stack.stack), REG_ERPAREN); -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3bc4i0fs7quuiznm2wabuv57g"); // handle_close: -UNSUPPORTED("cba08qms5w8uqvkd4p9iqz909"); // if (fixup_alt_jump) -UNSUPPORTED("1lzprxcdmzqjb9whh02ptkgin"); // { /* Push a dummy failure point at the end of the -UNSUPPORTED("cc7pak11xcdny8f782y93y6d4"); // alternative for a possible future -UNSUPPORTED("4iprb2tgw3ra22d8s7u4ny04z"); // `pop_failure_jump' to pop. See comments at -UNSUPPORTED("il2pao7ylwdupdmwkc63wt74"); // `push_dummy_failure' in `re_match_2'. */ -UNSUPPORTED("bsoqdb55d2fj7nrshha8baj79"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (push_dummy_failure); } while (0); -UNSUPPORTED("bsg3cvulx3vuba3c4g7h8wi9e"); // /* We allocated space for this jump when we assigned -UNSUPPORTED("81pcbxblcl9t5t7fqo3daz26"); // to `fixup_alt_jump', in the `handle_alt' case below. */ -UNSUPPORTED("42dp50c2b5kexwd7wxmwewwe1"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b - 1) - (fixup_alt_jump) - 3)); -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("172uzd85uuznm53m6t1nv9ke5"); // /* See similar code for backslashed left paren above. */ -UNSUPPORTED("7yogipyu9e9xkgapyvsso5js4"); // if ((compile_stack.avail == 0)) { -UNSUPPORTED("8jaoyupj1e28u8vqk14htwrtv"); // if (syntax & (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("6gqrsbcf35slq98fdu38ysotz"); // goto normal_char; -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("dn8ttvbrvj1svr73kt4zmcugv"); // return (free (compile_stack.stack), REG_ERPAREN); -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("eniovbcxrkcn8texhpvd1c3j"); // /* Since we just checked for an empty stack above, this -UNSUPPORTED("oah0j3x85xy0y5snf99b5uto"); // ``can't happen''. */ -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("zxem7lefmt7jmq1sphx8jq5d"); // /* We don't just want to restore into `regnum', because -UNSUPPORTED("eshff1bkln1euqcvo55z6arar"); // later groups should continue to be numbered higher, -UNSUPPORTED("hyn2g413dbg1jtec9jsz3ujb"); // as in `(ab)c(de)' -- the second group is #2. */ -UNSUPPORTED("e26xy4hqgvbad7pusqf04i868"); // regnum_t this_group_regnum; -UNSUPPORTED("6n0r61042a9cp17p8uaa2pvkk"); // compile_stack.avail--; -UNSUPPORTED("b8x4vi5eywvcxrfzoej5bwryf"); // begalt = bufp->buffer + (compile_stack.stack[compile_stack.avail]).begalt_offset; -UNSUPPORTED("1xvm5ivpx5tz8e199a7p2rmqz"); // fixup_alt_jump -UNSUPPORTED("4umag2hy9kw4kqozrwydhawfq"); // = (compile_stack.stack[compile_stack.avail]).fixup_alt_jump -UNSUPPORTED("5gcmnf7zgwup5dbu5kddwwfq5"); // ? bufp->buffer + (compile_stack.stack[compile_stack.avail]).fixup_alt_jump - 1 -UNSUPPORTED("1gewh4lotwkkm4iqn6ggzwkoq"); // : 0; -UNSUPPORTED("85k6r2lf00egr6wmh6ynrl2p5"); // laststart = bufp->buffer + (compile_stack.stack[compile_stack.avail]).laststart_offset; -UNSUPPORTED("8hnnnyzrlgnojw4fgthz9m20m"); // this_group_regnum = (compile_stack.stack[compile_stack.avail]).regnum; -UNSUPPORTED("dlko1f9w54peneqoca91cgrci"); // /* If we've reached MAX_REGNUM groups, then this open -UNSUPPORTED("74txdb0o7dhsdiultkxutc0e7"); // won't actually generate any code, so we'll have to -UNSUPPORTED("185wciv8bzl59e6kldksp04w4"); // clear pending_exact explicitly. */ -UNSUPPORTED("47qf9noup192j3ixvbaqfafxw"); // pending_exact = 0; -UNSUPPORTED("askuaehvoj7enatduzagqwmbk"); // /* We're at the end of the group, so now we know how many -UNSUPPORTED("autf5q3thbf8mmptmgx0msnh4"); // groups were inside this one. */ -UNSUPPORTED("a8riafizqdv5zjapabhopp72g"); // if (this_group_regnum <= 255) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("2wmjb2xbz36ytg6g1bgfd4hb1"); // unsigned char *inner_group_loc -UNSUPPORTED("bzfdj6g2ck20pq1mb50l27a9v"); // = bufp->buffer + (compile_stack.stack[compile_stack.avail]).inner_group_offset; -UNSUPPORTED("el3pwrfnbqiexy2sk0rffy0cf"); // *inner_group_loc = regnum - this_group_regnum; -UNSUPPORTED("cguv9rjc1iive3bv1yez75f03"); // do { while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (stop_memory); *b++ = (unsigned char) (this_group_regnum); *b++ = (unsigned char) ( -UNSUPPORTED("7sev1sdu00ye0rtlo3hndpvge"); // regnum - this_group_regnum); } while (0); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("1r6y7bujaca34ru0thv040wer"); // case '|': /* `\|'. */ -UNSUPPORTED("46dgptds7v1z98qko5xqgje7h"); // if (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; -UNSUPPORTED("4zdduwo0bies2nyvyh3rkqec5"); // handle_alt: -UNSUPPORTED("eh6qytrwlnojjauu38ckl7ieo"); // if (syntax & ((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("71lbycb6i00gg9x1a2qrb3eip"); // /* Insert before the previous alternative a jump which -UNSUPPORTED("7e4xxb42diyggtjzhyj0r4iht"); // jumps to this alternative if the former fails. */ -UNSUPPORTED("12a3mmfyhz3lv9g634sbhwpnl"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("e3r36lsf9nfoaplwmusccx2ko"); // insert_op1 (on_failure_jump, begalt, (int) ((b + 6) - (begalt) - 3), b); -UNSUPPORTED("7s8z4qnugzgnbuvds8u8a5jep"); // pending_exact = 0; -UNSUPPORTED("ebm7g0g1nuacoouvopi1thit2"); // b += 3; -UNSUPPORTED("2oav1ek69wp16iydew6ok9ox8"); // /* The alternative before this one has a jump after it -UNSUPPORTED("cmcbmjy59tx8k81e3ek6xwlvq"); // which gets executed if it gets matched. Adjust that -UNSUPPORTED("7jb4wxi0em6v0jucfjtw3a4up"); // jump so it will jump to this alternative's analogous -UNSUPPORTED("5zlorzwitjp83i56wns9w8u0r"); // jump (put in below, which in turn will jump to the next -UNSUPPORTED("3y12zjyrd8x7fd4xc7uz7wk9b"); // (if any) alternative's such jump, etc.). The last such -UNSUPPORTED("7oj6n4fel5k5oe1hc1w024dj5"); // jump jumps to the correct final destination. A picture: -UNSUPPORTED("ey74hniulk9kz47tqr8by3ul4"); // _____ _____ -UNSUPPORTED("ded5vl0okjroo4lbzal107hid"); // | | | | -UNSUPPORTED("8dlq9vw86vwqva8uk09fpjhnz"); // | v | v -UNSUPPORTED("6xr500bohtokobmkx1m276vk2"); // a | b | c -UNSUPPORTED("k27r9mjl8i2jpghyf3yd76ss"); // If we are at `b', then fixup_alt_jump right now points to a -UNSUPPORTED("9jlwvx46zdiyc0cgpc9aichx2"); // three-byte space after `a'. We'll put in the jump, set -UNSUPPORTED("7gw6bsjyzgswrermi9mrvnnd9"); // fixup_alt_jump to right after `b', and leave behind three -UNSUPPORTED("996t1kfvkq1wsgyy9twl2hmf5"); // bytes which we'll fill in when we get to after `c'. */ -UNSUPPORTED("cba08qms5w8uqvkd4p9iqz909"); // if (fixup_alt_jump) -UNSUPPORTED("1na9w390cmfhlvzr6zo51tmtb"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b) - (fixup_alt_jump) - 3)); -UNSUPPORTED("8ed964065ejrs0q6lzv94yez1"); // /* Mark and leave space for a jump after this alternative, -UNSUPPORTED("25baag8i46m3zhww0ac4k5o0x"); // to be filled in later either by next alternative or -UNSUPPORTED("87vumt536jh7giifqd1s7e35m"); // when know we're at the end of a series of alternatives. */ -UNSUPPORTED("ev3p48k8fo943q12gph5h8h5i"); // fixup_alt_jump = b; -UNSUPPORTED("12a3mmfyhz3lv9g634sbhwpnl"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("ebm7g0g1nuacoouvopi1thit2"); // b += 3; -UNSUPPORTED("dvt6va09huijx10zufnnjqgl3"); // laststart = 0; -UNSUPPORTED("90zo4it529eaunfkfdxoxrdgj"); // begalt = b; -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("99gf69q37flmk5nul07d806ch"); // case '{': -UNSUPPORTED("eh7o49r6vtoc1lilgh11tvn4b"); // /* If \{ is a literal. */ -UNSUPPORTED("bpfokxd4igwyfns09495mnyj8"); // if (!(syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("5qn7772e7nzkqvtlkiys53olq"); // /* If we're at `\{' and it's not the open-interval -UNSUPPORTED("8a0p71nhvq7jckckna5u4qr7t"); // operator. */ -UNSUPPORTED("cswuz8yxul8hsi2ysw71xb9rz"); // || ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("d0s744fq2fs9l9aaekpxlqj4e"); // || (p - 2 == pattern && p == pend)) -UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; -UNSUPPORTED("bxsvs3tj432mvaj55kae5o9ue"); // handle_interval: -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("ey78j6wwy5vn22b5iutepsjvj"); // /* If got here, then the syntax allows intervals. */ -UNSUPPORTED("22u5dv9jzoa3qwk32b1729l4r"); // /* At least (most) this many matches must be made. */ -UNSUPPORTED("8hhxunayr90degkndrot61r2v"); // int lower_bound = -1, upper_bound = -1; -UNSUPPORTED("b3m9z0v48oef8fma37xkjtew6"); // beg_interval = p - 1; -UNSUPPORTED("891uwttbfnv5bc58wpbg1fhgl"); // if (p == pend) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; -UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else -UNSUPPORTED("5ln10oel04ejmsrfm7uzyxmm3"); // return (free (compile_stack.stack), REG_EBRACE); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("3imw63qg7eb3mef09yezz6uj7"); // { if (p != pend) { do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); while ((1 && isdigit (c))) { if (lower_bound < 0) lower_bound = 0; lower_bound = lower_bound * 10 + c - '0'; if (p == pend) break; do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); } } }; -UNSUPPORTED("1uyn0tiw7bqjiss70oyjn9l7f"); // if (c == ',') -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("5xu6gzc4kvvybje2lnr7qdjka"); // { if (p != pend) { do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); while ((1 && isdigit (c))) { if (upper_bound < 0) upper_bound = 0; upper_bound = upper_bound * 10 + c - '0'; if (p == pend) break; do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); } } }; -UNSUPPORTED("36f9x0yetwobrju6guskv8zsf"); // if (upper_bound < 0) upper_bound = (0x7fff); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("76by7r7x6guk4yvf4na11j7fa"); // /* Interval such as `{1}' => match exactly once. */ -UNSUPPORTED("7oi51mz0kxn0ljkpu564jd1zz"); // upper_bound = lower_bound; -UNSUPPORTED("7ec3ilddc87ddo0ohyphhvkag"); // if (lower_bound < 0 || upper_bound > (0x7fff) -UNSUPPORTED("dg03lkmdnpyic7onasg3rhqv3"); // || lower_bound > upper_bound) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; -UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else -UNSUPPORTED("dncd6ntkh4fds08gm3c4f7y7z"); // return (free (compile_stack.stack), REG_BADBR); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("8zi6rfr6252dxyzqv0myhm4xm"); // if (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("3nwh4wgghtnfkscuiwfo0cu3y"); // if (c != '\\') return (free (compile_stack.stack), REG_EBRACE); -UNSUPPORTED("eqri2rfe7jnz1m2rij615jaj1"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("7yy5bnz36zs5pyi05n1qbbyfx"); // if (c != '}') -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("cbdohhh0bm6q3vbmnwn4e1vyq"); // if (syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; -UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else -UNSUPPORTED("dncd6ntkh4fds08gm3c4f7y7z"); // return (free (compile_stack.stack), REG_BADBR); -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("5wvp3nau0n8tyg9q5a45z6lyw"); // /* We just parsed a valid interval. */ -UNSUPPORTED("8abj2dxygzm4q2t6cik367htu"); // /* If it's invalid to have no preceding re. */ -UNSUPPORTED("7jmcihqsic23w36x8uyw6rgq0"); // if (!laststart) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("dhcq2d5ztdbu4o4zvyapxw6nh"); // if (syntax & (((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("1m9o7j67m70ez7l1kcm89n5hu"); // return (free (compile_stack.stack), REG_BADRPT); -UNSUPPORTED("cd9am2nn7ebpy7n4jg9h1ufr4"); // else if (syntax & ((((((unsigned long int) 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("9bhpbnocq89hcx0yaaav9o55q"); // laststart = b; -UNSUPPORTED("61qf7b2jxc7j3knm5ts69f0b6"); // else -UNSUPPORTED("ckqpiwbyjnqn5cpwu2kw8rzbb"); // goto unfetch_interval; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("4gb3yehghg1r4z81pfpjdfvgt"); // /* If the upper bound is zero, don't want to succeed at -UNSUPPORTED("aatlwtk51r4vhf2pwijmg9mp2"); // all; jump from `laststart' to `b + 3', which will be -UNSUPPORTED("5qe2o1vhmd60525scpziso3qd"); // the end of the buffer after we insert the jump. */ -UNSUPPORTED("7mu4hmjs37m7lx095ek5vdxxv"); // if (upper_bound == 0) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("a881bhs9uyxvv8hkudjh48ded"); // while ((unsigned long) (b - bufp->buffer + (3)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("1iszfmgzsydg6wplo0b3rdscs"); // insert_op1 (jump, laststart, (int) ((b + 3) - (laststart) - 3), b); -UNSUPPORTED("ef7wtmbarkb4uc7wd67hvt8vg"); // b += 3; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("er56h1ofqtaixpmzkkaco2esj"); // /* Otherwise, we have a nontrivial interval. When -UNSUPPORTED("as06jnzy16oy1d2k8yrsmnzce"); // we're all done, the pattern will look like: -UNSUPPORTED("2sy9ixs1qds1ov6cizjv2ekst"); // set_number_at -UNSUPPORTED("57q8h3cnrxlq45gvr3k5coz5l"); // set_number_at -UNSUPPORTED("9nr6blw8qubgah89xl4e7nkc9"); // succeed_n -UNSUPPORTED("3jejf324x7ol07x2qsz7dal9u"); // -UNSUPPORTED("91gylqgyabjgru87d2uf6v0sb"); // jump_n -UNSUPPORTED("3ef68fn6o1w25y5pabsc3ly4g"); // (The upper bound and `jump_n' are omitted if -UNSUPPORTED("bk78ox2ujcbxp08sj3dypdu4d"); // `upper_bound' is 1, though.) */ -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("efpf0x8clufa77cutrnkx4lcj"); // { /* If the upper bound is > 1, we need to insert -UNSUPPORTED("dzt6navygpg7km0wu0um9ly47"); // more at the end of the loop. */ -UNSUPPORTED("bj2zq9uzbacy1f5scg45mc8o7"); // unsigned nbytes = 10 + (upper_bound > 1) * 10; -UNSUPPORTED("a3dj4ob1sccvwmhsasm69xe72"); // while ((unsigned long) (b - bufp->buffer + (nbytes)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); -UNSUPPORTED("1su4wz7ud8htx57ifpl7dvcjb"); // /* Initialize lower bound of the `succeed_n', even -UNSUPPORTED("9j79ov5k583ecforn4p7uyj07"); // though it will be set during matching by its -UNSUPPORTED("8e98bgll3zoiy6g3o125b3q2f"); // attendant `set_number_at' (inserted next), -UNSUPPORTED("53ep471y7ys6dzp9yufebyily"); // because `re_compile_fastmap' needs to know. -UNSUPPORTED("14vynt5c8wnonl64olb8ttvtd"); // Jump to the `jump_n' we might insert below. */ -UNSUPPORTED("70iuvqfyzlre4zcn83hksrxn8"); // insert_op2 (succeed_n, laststart, (int) (( -UNSUPPORTED("5pma6876qpamutcafga5yib97"); // b + 5 +(upper_bound > 1) * 5) - (laststart) - 3), -UNSUPPORTED("6vch8eo9jutmcjre2de6d9gbd"); // lower_bound, b); -UNSUPPORTED("43kr4g9sdi8c4jh0s5i56vuom"); // b += 5; -UNSUPPORTED("9wq1ll164vusxqbxnhcmfglr2"); // /* Code to initialize the lower bound. Insert -UNSUPPORTED("8pvo9br1w68oucw65nlm51oyr"); // before the `succeed_n'. The `5' is the last two -UNSUPPORTED("a0wkdu3a33nzfqwoi97ucrydd"); // bytes of this `set_number_at', plus 3 bytes of -UNSUPPORTED("3f5d3pqpnky1yym79bby1sz14"); // the following `succeed_n'. */ -UNSUPPORTED("6tnprwkxn86sjk70t31xuoner"); // insert_op2 (set_number_at, laststart, 5, lower_bound, b); -UNSUPPORTED("43kr4g9sdi8c4jh0s5i56vuom"); // b += 5; -UNSUPPORTED("oi58bgxgyehr7fep6gg7b30i"); // if (upper_bound > 1) -UNSUPPORTED("8k5l99ygyd8csogbu2fv5zo"); // { /* More than one repetition is allowed, so -UNSUPPORTED("dfqu908jf8ce7624rr03va1d4"); // append a backward jump to the `succeed_n' -UNSUPPORTED("3bwv4hhwkxq1dxz91v6urcgft"); // that starts this interval. -UNSUPPORTED("9d1i5cmg65d2yqlnnwhhgb10d"); // When we've reached this during matching, -UNSUPPORTED("a4w172v3cp6ffpdtc6uecy35z"); // we'll have matched the interval once, so -UNSUPPORTED("ek50qyp6pxt5f0d13fhqk7gb3"); // jump back only `upper_bound - 1' times. */ -UNSUPPORTED("cw1t4ts9rzslpfolcfywhn3qn"); // store_op2 (jump_n, b, (int) ((laststart + 5) - (b) - 3), -UNSUPPORTED("3bkogjbp2zrhl1e57w52wgtur"); // upper_bound - 1); -UNSUPPORTED("e4xjnlgh2lwxl5rgrsy1t0lzp"); // b += 5; -UNSUPPORTED("9eb4sjjix0zbs0m5165ieamk0"); // /* The location we want to set is the second -UNSUPPORTED("5y1422w9b3ttxiq7uxejd8dl7"); // parameter of the `jump_n'; that is `b-2' as -UNSUPPORTED("7pbl00qw1iwl2shqi1boj4s0o"); // an absolute address. `laststart' will be -UNSUPPORTED("8nzimsq57reptkqovcwmi5is2"); // the `set_number_at' we're about to insert; -UNSUPPORTED("8zphslv1mlv2s77w43gkoi1ul"); // `laststart+3' the number to set, the source -UNSUPPORTED("d2f41o7p6x4ikqydu4firrznx"); // for the relative address. But we are -UNSUPPORTED("ykrtets348ms6o03g441goo7"); // inserting into the middle of the pattern -- -UNSUPPORTED("8wbqzkcrlw3e1ea51h8blhurv"); // so everything is getting moved up by 5. -UNSUPPORTED("a3f2u6qy5p003dtis6m0fpvl1"); // Conclusion: (b - 2) - (laststart + 3) + 5, -UNSUPPORTED("5emb5r1kvteh6n0qces39m5f2"); // i.e., b - laststart. -UNSUPPORTED("3zbu3199lym6vc2u1vakclmn6"); // We insert this at the beginning of the loop -UNSUPPORTED("csmu8b2er6ytie5e9nt8t4ii4"); // so that if we fail during matching, we'll -UNSUPPORTED("6i50gsk8v7o3h2xgwwmiiftk6"); // reinitialize the bounds. */ -UNSUPPORTED("87vlmr3dcbomq11myh4sw1fl6"); // insert_op2 (set_number_at, laststart, b - laststart, -UNSUPPORTED("9qs8k9xnugrbv80hqanlzsj0k"); // upper_bound - 1, b); -UNSUPPORTED("e4xjnlgh2lwxl5rgrsy1t0lzp"); // b += 5; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("47qf9noup192j3ixvbaqfafxw"); // pending_exact = 0; -UNSUPPORTED("5bsb6g154mdvmrq2r8pg7c57z"); // beg_interval = (void *)0; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("4g8id4otqpbtngfcwz2lvm1dj"); // unfetch_interval: -UNSUPPORTED("2uaon9lzacwcq3uk6um6vhs5b"); // /* If an invalid interval, match the characters as literals. */ -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("del20sog75q2qfuqvkporgtm0"); // p = beg_interval; -UNSUPPORTED("34xptp017sapmiseov6178cf4"); // beg_interval = (void *)0; -UNSUPPORTED("biznyjdfohe9yytw4pz3d8dox"); // /* normal_char and normal_backslash need `c'. */ -UNSUPPORTED("criokqqji74yuk47n1jhnpq75"); // do {if (p == pend) return REG_EEND; c = (unsigned char) *p++; if (translate) c = (unsigned char) translate[c]; } while (0); -UNSUPPORTED("axdhegkjispkpmlj1rwmr7893"); // if (!(syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("szfu82l2yyl4abpqquds47zb"); // if (p > pattern && p[-1] == '\\') -UNSUPPORTED("4pgdoo1pi0fajdrnqd2gl86zc"); // goto normal_backslash; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; -UNSUPPORTED("28ro2br1t858h9e64b2eclvsh"); // case 'w': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; -UNSUPPORTED("br0jt3hvd6j06mrnfv1j1du2c"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordchar); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("cgixiaqx7fff7w14lfzv9un9b"); // case 'W': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; -UNSUPPORTED("csd38b3d31jeqlokfvq1k1w8f"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (notwordchar); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("56yutn3bw63gli62ao6byqpz6"); // case '<': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("bvnndrb6xvkus381wvq683jko"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordbeg); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("b27z9bdaut5nhut2j9qtvrc6x"); // case '>': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("9x7h5ccf7d8cb7d008zc3fvnn"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordend); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("1lgl6j1beved5wkn8lbc9pj9v"); // case 'b': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("ee4emtgp2qmp2if03ztroprzx"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (wordbound); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("1rh1jh861iaq6ptkgabcumr89"); // case 'B': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("f1o6i9gjd99gwklmvn8viskl6"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (notwordbound); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("59swrjh32j9w6w9fnlmqjwqhm"); // case '`': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("21zy7115epyqb00qfyrak2wlh"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (begbuf); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("enp735bu0pvi1g2slk3f3xjlt"); // case '\'': -UNSUPPORTED("f3s47ztvpkb3579t2leyzyw26"); // if (re_syntax_options & (((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("efz3fdd9mbv7nl371w3u6ezhv"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (endbuf); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("5p5kyaam049yzq965bmdz6nnh"); // case '1': case '2': case '3': case '4': case '5': -UNSUPPORTED("9hv7da8hbwl3dpaoiieu3rdte"); // case '6': case '7': case '8': case '9': -UNSUPPORTED("8x9ia20e11qngbvg3030t63ib"); // if (syntax & ((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("984azd04wqga97vlg77nqw3hl"); // c1 = c - '0'; -UNSUPPORTED("2j8gb2lyb8b45sk2yf69wj6rw"); // if (c1 > regnum) -UNSUPPORTED("3t049zz47oarl9dkg8euljouk"); // return (free (compile_stack.stack), REG_ESUBREG); -UNSUPPORTED("b52s0xefwdzq23ebdsm2l635g"); // /* Can't back reference to a subexpression if inside of it. */ -UNSUPPORTED("289fpytgoqtnz6sbd26j596ma"); // if (group_in_compile_stack (compile_stack, (regnum_t) c1)) -UNSUPPORTED("ck4wdxm4o1ub3048vodmtvy6s"); // goto normal_char; -UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; -UNSUPPORTED("ayh7963cwi35nzazymns2xr4j"); // do { while ((unsigned long) (b - bufp->buffer + (2)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (duplicate); *b++ = (unsigned char) (c1); } while (0); -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("10rhhnvrykevpmqtifs3vfsbn"); // case '+': -UNSUPPORTED("5d03wz66bdkv7mubtsqfqptwh"); // case '?': -UNSUPPORTED("cmtz225wrrfrtyrfnva1w0xyx"); // if (syntax & (((unsigned long int) 1) << 1)) -UNSUPPORTED("1e36xo9vcfmetpl665flebmxr"); // goto handle_plus; -UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else -UNSUPPORTED("duzsz5s9lw56m1on7ajxgk9o2"); // goto normal_backslash; -UNSUPPORTED("623zujkdt9es8v0w13jz9jw8x"); // default: -UNSUPPORTED("beo8prktwmjyif35z778zfw1g"); // normal_backslash: -UNSUPPORTED("d6o76edxq0225kqke2hja81jl"); // /* You might think it would be useful for \ to mean -UNSUPPORTED("3ifiyvf5lf26yw26enbob7qmu"); // not to translate; but if we don't translate it -UNSUPPORTED("ecuhc5c6wpoj7vpzvjyv5x62r"); // it will never match anything. */ -UNSUPPORTED("1nghju7haq80s0kj7x01pojis"); // c = (translate ? (char) translate[(unsigned char) (c)] : (c)); -UNSUPPORTED("dxpbgmfj2w220xy1q99fxje94"); // goto normal_char; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: -UNSUPPORTED("egnm0qedqx5klxttjvckp1nh0"); // /* Expects the character in `c'. */ -UNSUPPORTED("4qeb36tm7edhyh2kuighgnt3l"); // normal_char: -UNSUPPORTED("1fk2r6llu2tyc89u61aqedfcu"); // /* If no exactn currently being built. */ -UNSUPPORTED("dvgbrbk801umnqbk21dcl1jqt"); // if (!pending_exact -UNSUPPORTED("4sk1dp6gncxrc6q5vqax6q1ff"); // /* If last exactn not at current position. */ -UNSUPPORTED("8ta654rp3f80109ds7wainnbo"); // || pending_exact + *pending_exact + 1 != b -UNSUPPORTED("77sazmv1hkm382fcbfgk2amhz"); // /* We have only one byte following the exactn for the count. */ -UNSUPPORTED("195b1d4l8t8zfx7373dninfqs"); // || *pending_exact == (1 << 8) - 1 -UNSUPPORTED("dfhnk487nvojvngpft8d1m5m6"); // /* If followed by a repetition operator. */ -UNSUPPORTED("3ub8lclci64fyijvq4kh6b7wv"); // || *p == '*' || *p == '^' -UNSUPPORTED("eus82vo98skwtodf1ct43m3j2"); // || ((syntax & (((unsigned long int) 1) << 1)) -UNSUPPORTED("c35rzowssstcdv8ruusljr55b"); // ? *p == '\\' && (p[1] == '+' || p[1] == '?') -UNSUPPORTED("an9wblbb8w5ryyrzneu7n5ko8"); // : (*p == '+' || *p == '?')) -UNSUPPORTED("9fpdj9n2jjcr421s2g9z3r4i5"); // || ((syntax & (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("doucnd8aksv0c0n2qke841f3d"); // && ((syntax & ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("3d5qlx6ctgmlvlyvps6mliwz5"); // ? *p == '{' -UNSUPPORTED("5g4kw7ayxlcp3eufwirvf96oj"); // : (p[0] == '\\' && p[1] == '{')))) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("nbxskwykyxkuuturxjw7zviw"); // /* Start building a new exactn. */ -UNSUPPORTED("bzlbs3vmfi1kf0101kec4qyco"); // laststart = b; -UNSUPPORTED("ejmhwadfnfrzhgtdtjhon9thk"); // do { while ((unsigned long) (b - bufp->buffer + (2)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (exactn); *b++ = (unsigned char) (0); } while (0); -UNSUPPORTED("3d84yn9kh97rpe3bpdhnhbnpc"); // pending_exact = b - 1; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("2k7zblp37vmofrhji8gga03t0"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (c); } while (0); -UNSUPPORTED("cib3f9ag6ywox7sedgbxkkmzk"); // (*pending_exact)++; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("61b5pg30vl032ddas1lgz7fom"); // } /* switch (c) */ -UNSUPPORTED("9758gpbrep7p4gr36dhunt05n"); // } /* while p != pend */ -UNSUPPORTED("93p2q85dy4ac5kim9nivyn79p"); // /* Through the pattern now. */ -UNSUPPORTED("1owvoxb3fhlen2k6t0r5ai42z"); // if (fixup_alt_jump) -UNSUPPORTED("13s484p9xd2bw2xbz1wlvdo2i"); // store_op1 (jump_past_alt, fixup_alt_jump, (int) ((b) - (fixup_alt_jump) - 3)); -UNSUPPORTED("aprj6xezpwmu3a179m5g8vbya"); // if (!(compile_stack.avail == 0)) -UNSUPPORTED("3qkjmx7dwj6otc7vge7e62fak"); // return (free (compile_stack.stack), REG_EPAREN); -UNSUPPORTED("bif9tomfcf0bfh8yujmms4e00"); // /* If we don't want backtracking, force success -UNSUPPORTED("6in6drehljv4k3imbk7ay9paw"); // the first time we reach the end of the compiled pattern. */ -UNSUPPORTED("65u4ochrazrfxoz1im3b6cxt5"); // if (syntax & ((((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) -UNSUPPORTED("2gp9v2s1qkxulysls2k1go519"); // do { while ((unsigned long) (b - bufp->buffer + (1)) > bufp->allocated) do { unsigned char *old_buffer = bufp->buffer; if (bufp->allocated == (1L << 16)) return REG_ESIZE; bufp->allocated <<= 1; if (bufp->allocated > (1L << 16)) bufp->allocated = (1L << 16); bufp->buffer = (unsigned char *) realloc ((bufp->buffer), (bufp->allocated)); if (bufp->buffer == (void *)0) return REG_ESPACE; if (old_buffer != bufp->buffer) { b = (b - old_buffer) + bufp->buffer; begalt = (begalt - old_buffer) + bufp->buffer; if (fixup_alt_jump) fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer; if (laststart) laststart = (laststart - old_buffer) + bufp->buffer; if (pending_exact) pending_exact = (pending_exact - old_buffer) + bufp->buffer; } } while (0); *b++ = (unsigned char) (succeed); } while (0); -UNSUPPORTED("cvaeac7ysy55222mdduh1aku9"); // free (compile_stack.stack); -UNSUPPORTED("588061fcmtocd9luhfsdk74at"); // /* We have succeeded; set the length of the buffer. */ -UNSUPPORTED("7at4a9mth8j1h0n9mhg91s816"); // bufp->used = b - bufp->buffer; -UNSUPPORTED("cwwrkrko9fc4redgkt1b13h6d"); // return REG_NOERROR; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1a5b1tkqolinqh3eydzvc550l -// static void store_op1 (re_opcode_t op, unsigned char *loc, int arg) -public static Object store_op1(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("eili3inuq1bw9eshdmskywxtg"); // store_op1 (re_opcode_t op, -UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, -UNSUPPORTED("4bho2a0suqymuq2e9rqlexiq3"); // int arg) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1hzyviac306vd3ph2a79xocx7"); // *loc = (unsigned char) op; -UNSUPPORTED("bmuizeo6n9t1qzeegovoyri2g"); // do { (loc + 1)[0] = (arg) & 0377; (loc + 1)[1] = (arg) >> 8; } while (0); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1dmpl1eqm04oq44hm3nqojfqi -// static void store_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2) -public static Object store_op2(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("3uuxvmysdrpmrqq4esv6u5jvy"); // store_op2(re_opcode_t op, -UNSUPPORTED("a8vol3cdyfu7j1q063xc83pt0"); // unsigned char *loc, -UNSUPPORTED("dk2zk2gteycj6jwc1rcuw4jot"); // int arg1, -UNSUPPORTED("afi4spwfrmjjgwzrd48g2eu1g"); // int arg2) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1hzyviac306vd3ph2a79xocx7"); // *loc = (unsigned char) op; -UNSUPPORTED("6ula40dcnni5p95iedvl6iz0p"); // do { (loc + 1)[0] = (arg1) & 0377; (loc + 1)[1] = (arg1) >> 8; } while (0); -UNSUPPORTED("692n1w538qervykzhu59yxbnn"); // do { (loc + 3)[0] = (arg2) & 0377; (loc + 3)[1] = (arg2) >> 8; } while (0); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 4oawjz5vt9t86ibo8qr5a5ot7 -// static void insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) -public static Object insert_op1(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("9kqafhtvgqir3019lsqbgnaik"); // insert_op1(re_opcode_t op, -UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, -UNSUPPORTED("epz3wdlgykwaxdrfpx2zq4v1l"); // int arg, -UNSUPPORTED("ebratu77atbhul7tuupzmelvf"); // unsigned char *end) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("169hmon34dm6xedl4afpa0i1j"); // register unsigned char *pfrom = end; -UNSUPPORTED("45zeyp0r8qs22j0ji3pvdf6z6"); // register unsigned char *pto = end + 3; -UNSUPPORTED("3022v7vf3t5s8s2dsxql29xo4"); // while (pfrom != loc) -UNSUPPORTED("648ldcfu6yydgsxc2w4dn9lep"); // *--pto = *--pfrom; -UNSUPPORTED("a9874mjpfiitct058pp2hkjid"); // store_op1 (op, loc, arg); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 v4p3krro14wk7jqs0uz06n05 -// static void insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) -public static Object insert_op2(Object... arg) { -UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void -UNSUPPORTED("2udn0ng3gbc8cd8v2x946r2ss"); // insert_op2(re_opcode_t op, -UNSUPPORTED("eqn95cpnpj01ulxvedlp62t24"); // unsigned char *loc, -UNSUPPORTED("9nlhn9pgj5kcxamj9gw78b0qw"); // int arg1, -UNSUPPORTED("e6ty8yiwetqhvokp26upcjwjt"); // int arg2, -UNSUPPORTED("ebratu77atbhul7tuupzmelvf"); // unsigned char *end) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("169hmon34dm6xedl4afpa0i1j"); // register unsigned char *pfrom = end; -UNSUPPORTED("b1q68dlnzwnkjo4hd7zcri3hx"); // register unsigned char *pto = end + 5; -UNSUPPORTED("3022v7vf3t5s8s2dsxql29xo4"); // while (pfrom != loc) -UNSUPPORTED("648ldcfu6yydgsxc2w4dn9lep"); // *--pto = *--pfrom; -UNSUPPORTED("cd1n16p68qnglebcy01f0qn6l"); // store_op2 (op, loc, arg1, arg2); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 e4latxw6wysh73m40r7m5x3jb -// static boolean at_begline_loc_p(const char *pattern, const char *p, reg_syntax_t syntax) -public static Object at_begline_loc_p(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("dvoumivore2yi3vu64r9o17rz"); // at_begline_loc_p(const char *pattern, -UNSUPPORTED("1ysotgxi8uwyxakudbb9firnu"); // const char *p, -UNSUPPORTED("3yknuo3jrjif745axkby3960n"); // reg_syntax_t syntax) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("8jnr30ihhlcqx0p7qembtdxv2"); // const char *prev = p - 2; -UNSUPPORTED("7v8vzv9bs9dhey9spvhvxxgyp"); // boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; -UNSUPPORTED("ef16816hd7el6q6461fnw6p1l"); // return -UNSUPPORTED("dumav0wvej216wv8szi4x00s7"); // /* After a subexpression? */ -UNSUPPORTED("3ki59spy9w7z11gtdahfx1ew3"); // (*prev == '(' && (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || prev_prev_backslash)) -UNSUPPORTED("ck5g71shir4kf9n8pbhvzz9ti"); // /* After an alternative? */ -UNSUPPORTED("6zvsscasxk7x2dzo9s2jr9okc"); // || (*prev == '|' && (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) || prev_prev_backslash)); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1c0buhtq2gms7qzzw7ql4drl1 -// static boolean at_endline_loc_p(const char *p, const char *pend, reg_syntax_t syntax) -public static Object at_endline_loc_p(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("8w70icoej05avtfcbstpra0d"); // at_endline_loc_p(const char *p, -UNSUPPORTED("eououd67tewr9lfimix16skdn"); // const char *pend, -UNSUPPORTED("3yknuo3jrjif745axkby3960n"); // reg_syntax_t syntax) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("eh8pwbqqa4049a7x1lhsxtsc1"); // const char *next = p; -UNSUPPORTED("4wxnm7brzem3ywa9ptyl6m3he"); // boolean next_backslash = *next == '\\'; -UNSUPPORTED("6yvr1bnbn14453b6eonom0ubu"); // const char *next_next = p + 1 < pend ? p + 1 : 0; -UNSUPPORTED("ef16816hd7el6q6461fnw6p1l"); // return -UNSUPPORTED("5zilqqenoq1qg4oaqhst16iny"); // /* Before a subexpression? */ -UNSUPPORTED("bt1ckpmadq6m2rwsptz7rdax4"); // (syntax & (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? *next == ')' -UNSUPPORTED("ch55eypsczed6pggvuky7qg54"); // : next_backslash && next_next && *next_next == ')') -UNSUPPORTED("cguaa6op9dr0opeabtp5b3ucn"); // /* Before an alternative? */ -UNSUPPORTED("8fq9j881kguwbavolyyz6299l"); // || (syntax & (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? *next == '|' -UNSUPPORTED("84irf5dgp7xptskletavd7lcl"); // : next_backslash && next_next && *next_next == '|'); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 35rs0qiyjwppzg2ck5atwxnul -// static boolean group_in_compile_stack(compile_stack_type compile_stack, regnum_t regnum) -public static Object group_in_compile_stack(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("aja1fo6z3x54rgftvbds69e"); // group_in_compile_stack(compile_stack_type compile_stack, -UNSUPPORTED("ddun09npytwyxleyy5nr14lky"); // regnum_t regnum) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("dfroqi0gdjuzge2bbdy5jzym0"); // int this_element; -UNSUPPORTED("cf73uwdus915lin6frmrap08w"); // for (this_element = compile_stack.avail - 1; -UNSUPPORTED("d8j8jtpe5iq1esx7uzvbvm14l"); // this_element >= 0; -UNSUPPORTED("1xpv8yktiv0jzqarajl3v79zc"); // this_element--) -UNSUPPORTED("bq2imq1log4s4jzgs1z1rv2lj"); // if (compile_stack.stack[this_element].regnum == regnum) -UNSUPPORTED("8qe9dt2l8vdfqmmg989im37zb"); // return 1; -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 b8zwgtmxpoyrzfdfecydtrxda -// static reg_errcode_t compile_range(const char **p_ptr, const char *pend, char * translate, reg_syntax_t syntax, unsigned char *b) -public static Object compile_range(Object... arg) { -UNSUPPORTED("9aerjmw5n52ektwk47t1r9bh0"); // static reg_errcode_t -UNSUPPORTED("banxmfbwacgp17kgyqg9m8x68"); // compile_range(const char **p_ptr, -UNSUPPORTED("ejc17tabtd2x12qzehf5o0sdm"); // const char *pend, -UNSUPPORTED("cgokv0yhej0pe8aib1t4cxlz2"); // char * translate, -UNSUPPORTED("1em1aqal71wcsn34n49xy07nb"); // reg_syntax_t syntax, -UNSUPPORTED("3n1ptb0viq6trnbcy4c86udvu"); // unsigned char *b) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1m07wmw0rmjh2kja0xep3mall"); // unsigned this_char; -UNSUPPORTED("yjjwp976mzzqbaq4la5vjvo"); // const char *p = *p_ptr; -UNSUPPORTED("77gsk1nkdba3ni503f93jkxhi"); // unsigned int range_start, range_end; -UNSUPPORTED("d8twi4xwvpjc0n8mumv8b1ht6"); // if (p == pend) -UNSUPPORTED("94ycrvh63vkb1re4zpw8hjmuq"); // return REG_ERANGE; -UNSUPPORTED("9fsyho4e2hiebyqb8qkinfir7"); // /* Even though the pattern is a signed `char *', we need to fetch -UNSUPPORTED("3pyxw5ydi3c4tot9rd8kfdojm"); // with unsigned char *'s; if the high bit of the pattern character -UNSUPPORTED("4cd58zz07lkzfj8p5blv29zy6"); // is set, the range endpoints will be negative if we fetch using a -UNSUPPORTED("5loab6k7g2in3add2emwojqiz"); // signed char *. -UNSUPPORTED("ktiibovpw3rzck0paixyi46"); // We also want to fetch the endpoints without translating them; the -UNSUPPORTED("44ikyyh3eyhoi57l6n4hpq24u"); // appropriate translation is done in the bit-setting loop below. */ -UNSUPPORTED("234jza0nhkmiwh04ymakixz0n"); // /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */ -UNSUPPORTED("bakbcowbgzdyup9hjat04heth"); // range_start = ((const unsigned char *) p)[-2]; -UNSUPPORTED("6thno4r8eqqdp5ffdk4l4xs3o"); // range_end = ((const unsigned char *) p)[0]; -UNSUPPORTED("eyt8946jvpa0gtrnsnyalwh7j"); // /* Have to increment the pointer into the pattern string, so the -UNSUPPORTED("3xddmz8ld8kco5vdujzs1mda5"); // caller isn't still at the ending character. */ -UNSUPPORTED("3fa4923s6t6yycjm4mwp7vra6"); // (*p_ptr)++; -UNSUPPORTED("deim4fwtozk7jqq58t4co6tpz"); // /* If the start is after the end, the range is empty. */ -UNSUPPORTED("a8txh7awa0h63gqw46mc6cesc"); // if (range_start > range_end) -UNSUPPORTED("4heoi1bxvv6q4nbsuw4o3n2up"); // return syntax & ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) ? REG_ERANGE : REG_NOERROR; -UNSUPPORTED("c04gtbipb7crea92dxobvfr2o"); // /* Here we see why `this_char' has to be larger than an `unsigned -UNSUPPORTED("1ylkxbvyuwl7mimub9q6r3fad"); // char' -- the range is inclusive, so if `range_end' == 0xff -UNSUPPORTED("1sabxy9r3dw93krw4s4a7jvs5"); // (assuming 8-bit characters), we would otherwise go into an infinite -UNSUPPORTED("akcgy517agwm89djtay996rlu"); // loop, since all characters <= 0xff. */ -UNSUPPORTED("8ascd4lg2uczakrabmoc2tbxc"); // for (this_char = range_start; this_char <= range_end; this_char++) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("96hzw7fz10m1eg84p3h8xw6md"); // (b[((unsigned char) ((translate ? (char) translate[(unsigned char) (this_char)] : (this_char)))) / 8] |= 1 << (((unsigned char) (translate ? (char) translate[(unsigned char) (this_char)] : (this_char))) % 8)); -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("cwwrkrko9fc4redgkt1b13h6d"); // return REG_NOERROR; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 2w5dx8i20qj29gqbasz6ieo34 -// int re_compile_fastmap(struct re_pattern_buffer *bufp) -public static Object re_compile_fastmap(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("bq6qjjl5z4ymj67dzg1sxznk"); // re_compile_fastmap(struct re_pattern_buffer *bufp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("9e6bnowy6jfhnib5uev3scpsu"); // int j, k; -UNSUPPORTED("5dndxq85ri0pdc1zsswjws66p"); // fail_stack_type fail_stack; -UNSUPPORTED("5vwwchpo0x2nq1kweizvzpx7r"); // char *destination; -UNSUPPORTED("4hjgjnhp72gq4oozv5vrn8v10"); // register char *fastmap = bufp->fastmap; -UNSUPPORTED("1j52put1dns981rqf534qs3le"); // unsigned char *pattern = bufp->buffer; -UNSUPPORTED("1jmcmh4kbvfcpijmdwn6jc3nj"); // unsigned char *p = pattern; -UNSUPPORTED("b53ls4akw5mhgh7jwfepoi7vo"); // register unsigned char *pend = pattern + bufp->used; -UNSUPPORTED("cs2p9nwy2lugscf16o02dzs8e"); // /* Assume that each path through the pattern can be null until -UNSUPPORTED("9dmmpbml2ftmau9q3col8nnct"); // proven otherwise. We set this false at the bottom of switch -UNSUPPORTED("b68s3vc4td13a333tqb4omf2a"); // statement, to which we get only if a particular path doesn't -UNSUPPORTED("et7h2ks857zgdavpz3yc5qe44"); // match the empty string. */ -UNSUPPORTED("51ynrqjxzi49qavh1cav2tkft"); // boolean path_can_be_null = 1; -UNSUPPORTED("1gbvpj2yj85p505am5rilkj6r"); // /* We aren't doing a `succeed_n' to begin with. */ -UNSUPPORTED("5xxc75r9op15sgdu02o4lgxav"); // boolean succeed_n_p = 0; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("bbul77ox50tuvngn3t4agr5uo"); // do { fail_stack.stack = (fail_stack_elt_t *) alloca (5 * sizeof (fail_stack_elt_t)); if (fail_stack.stack == (void *)0) return -2; fail_stack.size = 5; fail_stack.avail = 0; } while (0); -UNSUPPORTED("bzen69xwi5iake0fs9avj7zyk"); // bzero (fastmap, 1 << 8); /* Assume nothing's valid. */ -UNSUPPORTED("5t1sb7m6db0rmhvndw9dbiev3"); // bufp->fastmap_accurate = 1; /* It will be when we're done. */ -UNSUPPORTED("6jtlz1qyfqnlyp421hyq8of6x"); // bufp->can_be_null = 0; -UNSUPPORTED("epinmskuv2cgr5ahv1yieh4wx"); // while (1) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("d9novosz5eiozbi3d0qtrp39a"); // if (p == pend || *p == succeed) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("6kmea0xiqrfcm0nj8n7td2oex"); // /* We have reached the (effective) end of pattern. */ -UNSUPPORTED("m3xwmrnky21zpg13i5rj47jr"); // if (!(fail_stack.avail == 0)) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("44fedf1x4d76z1qso6huhgzfg"); // bufp->can_be_null |= path_can_be_null; -UNSUPPORTED("dr8ubpktswy9oks8vqmi0x94x"); // /* Reset for next path. */ -UNSUPPORTED("cqqk40u5ykr4up1khyq0hdreu"); // path_can_be_null = 1; -UNSUPPORTED("701062lrplwck0vemijk6tqcn"); // p = fail_stack.stack[--fail_stack.avail].pointer; -UNSUPPORTED("9rd1yahrea8hsebjyzzz61sl3"); // continue; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("a9id4zq8rzlovc4blpl12mdrm"); // /* We should never be about to go beyond the end of the pattern. */ -UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; -UNSUPPORTED("3d9jhchhw3lu8yajca4mi058b"); // switch (((re_opcode_t) *p++)) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("6y2d5u8u0sy9seg0d2wbqhh5e"); // /* I guess the idea here is to simply not bother with a fastmap -UNSUPPORTED("mj34lm9e61u2qvfpqzkhd5io"); // if a backreference is used, since it's too hard to figure out -UNSUPPORTED("9citude1apedkbhbg4qz50zt8"); // the fastmap for the corresponding group. Setting -UNSUPPORTED("a0ktcb92qa12q41u9ncckmzua"); // `can_be_null' stops `re_search_2' from using the fastmap, so -UNSUPPORTED("4rjoi86n2xfyhdheaakalexzv"); // that is all we do. */ -UNSUPPORTED("9zkejga7r0tbainhrb6zuw9os"); // case duplicate: -UNSUPPORTED("crvpgpa1og37lio7o6tvycmsg"); // bufp->can_be_null = 1; -UNSUPPORTED("7s6msojra17ajwq7l7wrmhhbx"); // goto done; -UNSUPPORTED("cr9angfhvv1ykkzaoo7x91pyz"); // /* Following are the cases which match a character. These end -UNSUPPORTED("5u9igxod775u9rmzhdtoj0uux"); // with `break'. */ -UNSUPPORTED("cw984demptqbnja38a25p2xi1"); // case exactn: -UNSUPPORTED("99pcdhcif67xm8lp80laisjza"); // fastmap[p[1]] = 1; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("2ro4nzmlhhrmitxu9446arhlo"); // case charset: -UNSUPPORTED("d5oxjemm2desl63l2fbifejay"); // for (j = *p++ * 8 - 1; j >= 0; j--) -UNSUPPORTED("34lg6n1mkddxpy07uf61o2pq1"); // if (p[j / 8] & (1 << (j % 8))) -UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("2zj0t91dpl66cu75cb0h2j1hu"); // case charset_not: -UNSUPPORTED("cagpd8yl8h3c4v8e4gh3f0z2w"); // /* Chars beyond end of map must be allowed. */ -UNSUPPORTED("7zzkrrvc3sqjxvhrr4s309imh"); // for (j = *p * 8; j < (1 << 8); j++) -UNSUPPORTED("b1s3rgvbln9pwub90llybu41x"); // fastmap[j] = 1; -UNSUPPORTED("d5oxjemm2desl63l2fbifejay"); // for (j = *p++ * 8 - 1; j >= 0; j--) -UNSUPPORTED("a9l035zjjirwoyk53mqv16l5n"); // if (!(p[j / 8] & (1 << (j % 8)))) -UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("buxp1030z7swkjl42wovj9hxd"); // case wordchar: -UNSUPPORTED("erc7fe209pzd8kqxh3h4huo03"); // for (j = 0; j < (1 << 8); j++) -UNSUPPORTED("e6f90hjwdfaen2gl195u9sabh"); // if (re_syntax_table[j] == 1) -UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("7frlpnfuvuphd3bzoulwg4vsr"); // case notwordchar: -UNSUPPORTED("erc7fe209pzd8kqxh3h4huo03"); // for (j = 0; j < (1 << 8); j++) -UNSUPPORTED("d6si8hs1n9s2q5b16vyt9ka5x"); // if (re_syntax_table[j] != 1) -UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("1bv8e740f9rna5i036bo292wc"); // case anychar: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("czlnu0hbyndj2sl7bud8algx4"); // int fastmap_newline = fastmap['\n']; -UNSUPPORTED("2q6r1vdt5x04pt3p41rzto4yl"); // /* `.' matches anything ... */ -UNSUPPORTED("5ftk445qjdfu62ddixb4p6q0i"); // for (j = 0; j < (1 << 8); j++) -UNSUPPORTED("ac5wgoqadttw9m0eqkmq93vpu"); // fastmap[j] = 1; -UNSUPPORTED("93vg14cvrax6ffdlubqre52zy"); // /* ... except perhaps newline. */ -UNSUPPORTED("53qidfpnvywpfz8jbsitg0hk2"); // if (!(bufp->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1))) -UNSUPPORTED("9wuk4mwn83ls1g7lick6497yp"); // fastmap['\n'] = fastmap_newline; -UNSUPPORTED("e47uuia66ybg7wem8m4h8zf1m"); // /* Return if we have already set `can_be_null'; if we have, -UNSUPPORTED("5o7fl6yjw81x2g5sww79aih3s"); // then the fastmap is irrelevant. Something's wrong here. */ -UNSUPPORTED("3750ces0c2deqeyn6w33ndhis"); // else if (bufp->can_be_null) -UNSUPPORTED("380tmjmsc0f2y0m6vckz8g0ox"); // goto done; -UNSUPPORTED("4nfkkkamxp2xfq2r2eg5c5880"); // /* Otherwise, have to check alternative paths. */ -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("anhhi3sf756j0lcm11sy9nyfc"); // case no_op: -UNSUPPORTED("7zj5ggx1l6hln4ude6h5p4hgw"); // case begline: -UNSUPPORTED("8pqai98vstdak51ot078dn1ut"); // case endline: -UNSUPPORTED("889sq08u5lsi3c6y2z7adu8ex"); // case begbuf: -UNSUPPORTED("cx4ezn3s02koh0pq7idm2xvxc"); // case endbuf: -UNSUPPORTED("a8jtmsnmpa4937exo9nhopyyb"); // case wordbound: -UNSUPPORTED("2jqqzr491mztwr9h8hvs55ja1"); // case notwordbound: -UNSUPPORTED("991vlwoc47i8p67jyv2qapdhy"); // case wordbeg: -UNSUPPORTED("65os7te2jc1i6uacyszvy5spd"); // case wordend: -UNSUPPORTED("9446ac5zvkn7r9yqkh2brh10l"); // case push_dummy_failure: -UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; -UNSUPPORTED("f41u8fntqiy246yy3btlg6w1v"); // case jump_n: -UNSUPPORTED("6coluo8cd7scxlqwnbvt3jqs5"); // case pop_failure_jump: -UNSUPPORTED("d7ziafib9p2sa0rqh34hv3hwj"); // case maybe_pop_jump: -UNSUPPORTED("9a1qj2mhg3oh4ehsjpp4d81on"); // case jump: -UNSUPPORTED("7ifq76or69643hqib3roiq9f4"); // case jump_past_alt: -UNSUPPORTED("ejqzfph0mmtiqin1hmi981bzm"); // case dummy_failure_jump: -UNSUPPORTED("ddwq2jxcrhkxhe1dqkaf3heul"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("3s98ctay3wrlwmgbs6jycommh"); // p += j; -UNSUPPORTED("4aknhsfjvky2yxmkba43w40on"); // if (j > 0) -UNSUPPORTED("6ux57x1tcbm5aung2xa8i26f1"); // continue; -UNSUPPORTED("1gcc9mlki3vcqxqcamgw15psl"); // /* Jump backward implies we just went through the body of a -UNSUPPORTED("dhbf21he6r14900wxjfhl23n8"); // loop and matched nothing. Opcode jumped to should be -UNSUPPORTED("b1z48ihpqy8w68mtnyaogzkre"); // `on_failure_jump' or `succeed_n'. Just treat it like an -UNSUPPORTED("8sudhkuaiqtvp0rzeztrzphwa"); // ordinary jump. For a * loop, it has pushed its failure -UNSUPPORTED("14e2cgrthjy5xos3c84nxu3b8"); // point already; if so, discard that as redundant. */ -UNSUPPORTED("eq8dnm5llhgszut0h62teamny"); // if ((re_opcode_t) *p != on_failure_jump -UNSUPPORTED("8sbpd0r7b4u37kj9inzim8nty"); // && (re_opcode_t) *p != succeed_n) -UNSUPPORTED("6ux57x1tcbm5aung2xa8i26f1"); // continue; -UNSUPPORTED("4s6jr3tssbvzb5ee96md1ncoi"); // p++; -UNSUPPORTED("ddwq2jxcrhkxhe1dqkaf3heul"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("3s98ctay3wrlwmgbs6jycommh"); // p += j; -UNSUPPORTED("7s373wkpewfatxsumkd67pyu7"); // /* If what's on the stack is where we are now, pop it. */ -UNSUPPORTED("80wyvh0vjsiujqym2stjdj4wh"); // if (!(fail_stack.avail == 0) -UNSUPPORTED("a3ueg01xdmhuq0grmerpgbvbb"); // && fail_stack.stack[fail_stack.avail - 1].pointer == p) -UNSUPPORTED("3s1nxe7g3rfik4tqx98en3cd8"); // fail_stack.avail--; -UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; -UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: -UNSUPPORTED("753el6ua6knou432p32d1kbcc"); // case on_failure_keep_string_jump: -UNSUPPORTED("ceceofttw3ld7litzqabu648u"); // handle_on_failure_jump: -UNSUPPORTED("665sufie9pj8i06aycoqewann"); // do { do { (j) = *(p) & 0377; (j) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("dc5yaeh41cb0brsq1pv7799eq"); // /* For some patterns, e.g., `(a?)?', `p+j' here points to the -UNSUPPORTED("2t3hud6hrminx80odtyp1iwa7"); // end of the pattern. We don't want to push such a point, -UNSUPPORTED("547mpa99j3jp91cc97q8bgppy"); // since when we restore it above, entering the switch will -UNSUPPORTED("d41nubecflssie5s3le3qh9ij"); // increment `p' past the end of the pattern. We don't need -UNSUPPORTED("2a6fei9v5xjokdzwz2ib426kh"); // to push such a point since we obviously won't find any more -UNSUPPORTED("9kvyfd4vo7d8i4eapffyigb8w"); // fastmap entries beyond `pend'. Such a pattern can match -UNSUPPORTED("921h84ug24r379ndj6u4ti857"); // the null string, though. */ -UNSUPPORTED("a3exq030sp29tpsjuxvbncjka"); // if (p + j < pend) -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("6actr5ig2vfyitfzjmpn5gcvs"); // if (!(((fail_stack.avail == fail_stack.size) && !((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) ? 0 : ((fail_stack).stack[(fail_stack).avail++].pointer = p + j, 1))) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; -UNSUPPORTED("cyqv0odsj3l93ykpf16zgxlh5"); // return -2; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("c0op0grmjt3kp22s10twqy66r"); // else -UNSUPPORTED("crvpgpa1og37lio7o6tvycmsg"); // bufp->can_be_null = 1; -UNSUPPORTED("3rb9irs4dl9mnesxjmb9f42vt"); // if (succeed_n_p) -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("vdcz3hf29s758qnvg2tdn3vc"); // do { do { (k) = *(p) & 0377; (k) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); /* Skip the n. */ -UNSUPPORTED("501xoe7qse6xea1u7i29ck0mi"); // succeed_n_p = 0; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("bam1am28aekae7y6j816hx07n"); // continue; -UNSUPPORTED("bdrmz6krrbsihqbsklz1j7d7a"); // case succeed_n: -UNSUPPORTED("3gsxz3wc6v485diavavhdc980"); // /* Get to the number of times to succeed. */ -UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; -UNSUPPORTED("8o2myd39fg1ragrtinpt906a8"); // /* Increment p past the n for when k != 0. */ -UNSUPPORTED("4chyl5sa2aguucbi2603y1r7c"); // do { do { (k) = *(p) & 0377; (k) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("6zxjfjfmip0xaqdemcjjztblg"); // if (k == 0) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("b4wfmlrv6zbxvwrfouk2eo7kw"); // p -= 4; -UNSUPPORTED("909biyv92rbqo3ayb2nd8yidv"); // succeed_n_p = 1; /* Spaghetti code alert. */ -UNSUPPORTED("1ubpxbj2kbf7554qirpm1k0mw"); // goto handle_on_failure_jump; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; -UNSUPPORTED("dmqxgjrlj5ddxj88dw919ujoj"); // case set_number_at: -UNSUPPORTED("9stirsnvehglwumsosptm8ngk"); // p += 4; -UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; -UNSUPPORTED("6c0ei34e676sv2kl1dxfzm5lm"); // case start_memory: -UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: -UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; -UNSUPPORTED("ci4p4wle87mwq773w72esmnae"); // continue; -UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: -UNSUPPORTED("55kbrxcqu6yyh19ldzw88t99r"); // abort (); /* We have listed all the cases. */ -UNSUPPORTED("88ufjis6u0ijo8dyph0trsd9f"); // } /* switch *p++ */ -UNSUPPORTED("cwq7qsz40n4bhj5dg5eym4pub"); // /* Getting here means we have found the possible starting -UNSUPPORTED("9cuw6gsavq5jezett5z0kqhtr"); // characters for one path of the pattern -- and that the empty -UNSUPPORTED("1nuw25jxiky0vsokzstwqjshg"); // string does not match. We need not follow this path further. -UNSUPPORTED("ir1qnihuj9d2pchsx533wqak"); // Instead, look at the next alternative (remembered on the -UNSUPPORTED("2yh8to75n640o6rt44ql2gpr1"); // stack), or quit if no more. The test at the top of the loop -UNSUPPORTED("48eepx7kyfmje1rnq1bcr79sq"); // does these things. */ -UNSUPPORTED("7b7dtwbvg82guicn1qbjlrm0i"); // path_can_be_null = 0; -UNSUPPORTED("9iqvxxuyvmn0bkipb04jv1fp2"); // p = pend; -UNSUPPORTED("8qk14yz36d7vk72ifwa7qiujq"); // } /* while p */ -UNSUPPORTED("fe2n2uj632yqtenyvepbd4on"); // /* Set `can_be_null' for the last path (also the first path, if the -UNSUPPORTED("eoc9k5utu0yxlarln062f7ebo"); // pattern is empty). */ -UNSUPPORTED("3uys3oae24dxx6zj9f9r0b80z"); // bufp->can_be_null |= path_can_be_null; -UNSUPPORTED("c1mu8v1bx1gc9xwu0pmd4wrmg"); // done: -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 aql5ifimwt0liaidklmsf048e -// void re_set_registers(struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends) -public static Object re_set_registers(Object... arg) { -UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void -UNSUPPORTED("4aeowny9csghzgfhys3rxd4bb"); // re_set_registers(struct re_pattern_buffer *bufp, -UNSUPPORTED("v08al94r6tf851td77qv1lrw"); // struct re_registers *regs, -UNSUPPORTED("cws3mkdihiuxfnp7ty29mle8p"); // unsigned num_regs, -UNSUPPORTED("3bn37bfn6icqtacq0lj8zj9cg"); // regoff_t *starts, -UNSUPPORTED("aqc83ygcz30vhx0fxtyw3a3gc"); // regoff_t *ends) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("d3ztzcne2cr4fi3m42q2opwfy"); // if (num_regs) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("9z36hkw7bkc2nch28htx6k0sp"); // bufp->regs_allocated = 1; -UNSUPPORTED("atb5wuee0ohtv7w4cswzrtdfh"); // regs->num_regs = num_regs; -UNSUPPORTED("6xqxd9992s4jjhafwdu58y4w3"); // regs->start = starts; -UNSUPPORTED("1dplqbibwb9py7ly7iqtemaka"); // regs->end = ends; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("5err36958fxwo1a5uvi85wj9r"); // bufp->regs_allocated = 0; -UNSUPPORTED("3jgm69kgp5moxxlzgyht3brgv"); // regs->num_regs = 0; -UNSUPPORTED("1b975m061jnwz38mhlafj6a72"); // regs->start = regs->end = (regoff_t *) 0; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 8wxth458oyuuwe1d7zeibvlq3 -// int re_search(struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs) -public static Object re_search(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("5punk3p7482f96e5oexdvqbus"); // re_search(struct re_pattern_buffer *bufp, -UNSUPPORTED("bagvrj9iq4kkqcdgysmduv9t1"); // const char *string, -UNSUPPORTED("1xy13yd3ws9kwbjft9qc97kcx"); // int size, -UNSUPPORTED("9ohmanngcm89n339btr8asvfv"); // int startpos, -UNSUPPORTED("23b7j6n4wp3b1b28bigxtgmnl"); // int range, -UNSUPPORTED("erz9qq7ug4oj13nqxxy6jbbsy"); // struct re_registers *regs) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("5eefi20lbvtfppz7qla7ovjwv"); // return re_search_2 (bufp, (void *)0, 0, string, size, startpos, range, -UNSUPPORTED("et83rvt66i87q8ub41vrx6w5v"); // regs, size); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 6aljedusbc3m5z49o0khre2m2 -// int re_search_2(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int startpos, int range, struct re_registers *regs, int stop) -public static Object re_search_2(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("5usfyqpnmi7csbuxwbxofoyw7"); // re_search_2(struct re_pattern_buffer *bufp, -UNSUPPORTED("74m54b0hvpnb34rks2y7z9363"); // const char *string1, -UNSUPPORTED("8nls60axvgy7utfkk3mgzdwb2"); // int size1, -UNSUPPORTED("1iaduxc33uthqae9ewpgmxil1"); // const char *string2, -UNSUPPORTED("dqei6asi26pdc31aztct1a8je"); // int size2, -UNSUPPORTED("3w9t84zdf75a4tulh53r5von1"); // int startpos, -UNSUPPORTED("5u62quyw1qekgwt8o4pnjcc5l"); // int range, -UNSUPPORTED("5f39e12vpxsielezt5ujbqvho"); // struct re_registers *regs, -UNSUPPORTED("7bd44vcdrb5ytkbgi2jb4dl2s"); // int stop) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("3z4qqbm5080y3sn2lfr6rs0nk"); // int val; -UNSUPPORTED("4hjgjnhp72gq4oozv5vrn8v10"); // register char *fastmap = bufp->fastmap; -UNSUPPORTED("e2n10ohqvssxiromz1ghi94lp"); // register char * translate = bufp->translate; -UNSUPPORTED("iaij8d98sbsjgborym38smlw"); // int total_size = size1 + size2; -UNSUPPORTED("cjv924qhstzo4k8fa23nn3y5t"); // int endpos = startpos + range; -UNSUPPORTED("7etis36i9hk8smvitf2zjrk21"); // /* Check for out-of-range STARTPOS. */ -UNSUPPORTED("dtj4vp5xpp6ux07kkppwzg5ao"); // if (startpos < 0 || startpos > total_size) -UNSUPPORTED("f3a98gxettwtewduvje9y3524"); // return -1; -UNSUPPORTED("abu2iwp6rjr8ppylnna5u9yqs"); // /* Fix up RANGE if it might eventually take us outside -UNSUPPORTED("9hmt2lbj7vhejhpf2d95tq14f"); // the virtual concatenation of STRING1 and STRING2. -UNSUPPORTED("d3ccdgft2wzndli7yy75yesc6"); // Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */ -UNSUPPORTED("7ynt8jnrj8clotz4nfyn2ysy9"); // if (endpos < 0) -UNSUPPORTED("5ra97p6qdpo5phvpk9fwd2h3j"); // range = 0 - startpos; -UNSUPPORTED("9w57i1mbsaq0ywxj3y6q7577v"); // else if (endpos > total_size) -UNSUPPORTED("6boq6ulbdze7abapaemgg7svh"); // range = total_size - startpos; -UNSUPPORTED("ds4p5oizcxuw4xycv8l0vcqdv"); // /* If the search isn't to be a backwards one, don't waste time in a -UNSUPPORTED("djej1eoe004hvk7gffedre39u"); // search for a pattern that must be anchored. */ -UNSUPPORTED("cvy0dazfbe38ki1z0hsl3dn1l"); // if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("bpeukjf6wgkfxtlskf398co2v"); // if (startpos > 0) -UNSUPPORTED("1bjpmpr3p20x2b029ko5zgklx"); // return -1; -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("ad8lfo0w7g7423hbhmk3ljtia"); // range = 1; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("86solugecvztzl7zf0cnd6cvd"); // /* Update the fastmap now if not correct already. */ -UNSUPPORTED("1d8z3kbyyw3rdl2mysjgwzxjl"); // if (fastmap && !bufp->fastmap_accurate) -UNSUPPORTED("ckj45nonmakbapzpe7kn1d15x"); // if (re_compile_fastmap (bufp) == -2) -UNSUPPORTED("kh5ykxeb4qomvs3j2wfbfj0v"); // return -2; -UNSUPPORTED("78edqutsfw99a52tozy5vek1b"); // /* Loop through the string, looking for a place to start matching. */ -UNSUPPORTED("3s761dh42eu37yg4q6j6rw0kx"); // for (;;) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("4sxzib864bpin10halp8eff8a"); // /* If a fastmap is supplied, skip quickly over characters that -UNSUPPORTED("d5j6rsa3cqak3dmcpdugforyy"); // cannot be the start of a match. If the pattern can match the -UNSUPPORTED("bwce0xep6mggs5v11uftrozcs"); // null string, however, we don't need to skip characters; we want -UNSUPPORTED("12gdm8hdukh6bx7z396xe3zzf"); // the first null string. */ -UNSUPPORTED("cj0pagb4mphhjuy0gimrygb50"); // if (fastmap && startpos < total_size && !bufp->can_be_null) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("6ofes2gdk56aoc5qpr3f4zr4a"); // if (range > 0) /* Searching forwards. */ -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("67v7cteuwrvbevvug4l85mak"); // register const char *d; -UNSUPPORTED("25rc040ywtpg6wfpwl19bnpyo"); // register int lim = 0; -UNSUPPORTED("9qdwkju7e5sftfnsb8qapaizw"); // int irange = range; -UNSUPPORTED("1wkzshwijxvvgs068kb4ducku"); // if (startpos < size1 && startpos + range >= size1) -UNSUPPORTED("eiy4fhjr94xbrb2h7bvte577b"); // lim = range - (size1 - startpos); -UNSUPPORTED("eu28a1ugba5e46l0ni4uhl4a"); // d = (startpos >= size1 ? string2 - size1 : string1) + startpos; -UNSUPPORTED("cvmf6f97q523j1gxuc06p4zaw"); // /* Written out as an if-else to avoid testing `translate' -UNSUPPORTED("42arvib5v1138qds1m4gq8ifq"); // inside the loop. */ -UNSUPPORTED("c1esipwvnh5vdk2nuoqprrzy9"); // if (translate) -UNSUPPORTED("99bsp1v6500gcigrncj819bmz"); // while (range > lim -UNSUPPORTED("7dwf7n5ce54ua4203lrcvsgyi"); // && !fastmap[(unsigned char) -UNSUPPORTED("7fd297npapod0yzvmotp0ad6j"); // translate[(unsigned char) *d++]]) -UNSUPPORTED("ede1n2qkk5dq4dchoitn0ij36"); // range--; -UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else -UNSUPPORTED("d6y3y331fli9a7o5dfc8fwn41"); // while (range > lim && !fastmap[(unsigned char) *d++]) -UNSUPPORTED("ede1n2qkk5dq4dchoitn0ij36"); // range--; -UNSUPPORTED("7ov5wkldv7ip6gr3qqe7r9fwz"); // startpos += irange - range; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("bvrbbagbquje7me47zpel7bq4"); // else /* Searching backwards. */ -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("84cdrx9bovy6vauwg0lqjqewy"); // register char c = (size1 == 0 || startpos >= size1 -UNSUPPORTED("4e056gfwhytvjg4a7elynhkew"); // ? string2[startpos - size1] -UNSUPPORTED("8xrw0w684a0sbx04150wtf94o"); // : string1[startpos]); -UNSUPPORTED("37wt6pwingk4yq2cmuffily2s"); // if (!fastmap[(unsigned char) (translate ? (char) translate[(unsigned char) (c)] : (c))]) -UNSUPPORTED("8vj5bzh7lvr4w2s7svhv0kgxc"); // goto advance; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("cgimbkjo920x6t1512vxlx8ko"); // /* If can't match the null string, and that's all we have left, fail. */ -UNSUPPORTED("445mlipz9ii8giv4yb08sv90e"); // if (range >= 0 && startpos == total_size && fastmap -UNSUPPORTED("10kowgvu386ep80mmzt22sc9v"); // && !bufp->can_be_null) -UNSUPPORTED("1bjpmpr3p20x2b029ko5zgklx"); // return -1; -UNSUPPORTED("5ry8yqv40slwqwx0mofc5x95i"); // val = re_match_2_internal (bufp, string1, size1, string2, size2, -UNSUPPORTED("3cfs2qe5fkkt6t09tbm9q025r"); // startpos, regs, stop); -UNSUPPORTED("2djilouwt96a4942a9xk0bq2j"); // if (val >= 0) -UNSUPPORTED("4bosd0hhkhi65o9tz6w39sd4r"); // return startpos; -UNSUPPORTED("7mnsrrb2kz0jaysx2jmdwxxhs"); // if (val == -2) -UNSUPPORTED("9hr24f7mnlogxg6ehbtrhe9ys"); // return -2; -UNSUPPORTED("5ztyn3js8nuvtozugmyim7k2"); // advance: -UNSUPPORTED("48h8uf83j8j6i9dl6uwpnxoai"); // if (!range) -UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; -UNSUPPORTED("9qvrpsi6e30j6d028sbxm75m8"); // else if (range > 0) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("9tfu9zglyv6ato7noi8by9cx7"); // range--; -UNSUPPORTED("bpejet1xdfpyxq7gb5gygl6c6"); // startpos++; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("c1l5bq4p029ozyiuq76a11c6c"); // range++; -UNSUPPORTED("1fnqbyp4904zoq2u6a0h2xo1u"); // startpos--; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 cese97kukrkyoho0nl5aeefuf -// int re_match(struct re_pattern_buffer *bufp, const char *string, int size, int pos, struct re_registers *regs) -public static Object re_match(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("dv1reldaciy8oglpt3lvrj467"); // re_match(struct re_pattern_buffer *bufp, -UNSUPPORTED("c9d38ul1z2b760kkkwbmup6aq"); // const char *string, -UNSUPPORTED("8ax0ba4mtdwcwwg0ygxfl2hyx"); // int size, -UNSUPPORTED("5wdd1vovm572huu99r72nr8kp"); // int pos, -UNSUPPORTED("ly5zx6ikzskn7s3qibi5tipo"); // struct re_registers *regs) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("f3va2gee7dhwlha1g39azqlfa"); // int result = re_match_2_internal (bufp, (void *)0, 0, string, size, -UNSUPPORTED("ea7wwobss2bdmnj8fhllcq46k"); // pos, regs, size); -UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 4bis6vnixbumphbwvjkcy4c2n -// int re_match_2(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) -public static Object re_match_2(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("bo3qvsxgxy71pt7n5tjlfpl7q"); // re_match_2(struct re_pattern_buffer *bufp, -UNSUPPORTED("8xwssdsckjeb1q0lmxlu07pk5"); // const char *string1, -UNSUPPORTED("chena2gcw8p49mjvwjotj1ue5"); // int size1, -UNSUPPORTED("7kll64nft07fqgencnx9f2u3h"); // const char *string2, -UNSUPPORTED("12hpd55p7b671svle7njxpr6c"); // int size2, -UNSUPPORTED("eyuz74k3yno3lawo6tmqeahqh"); // int pos, -UNSUPPORTED("5du4j7mghegymbd75ui1ml4fw"); // struct re_registers *regs, -UNSUPPORTED("2hcygji7llu5b02n114djuqj0"); // int stop) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("a2u8v8zl4azq1kujf4s4cuii1"); // int result = re_match_2_internal (bufp, string1, size1, string2, size2, -UNSUPPORTED("7l7rv6dwb5eaxilwku2m9z8we"); // pos, regs, stop); -UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 2xc3iz0d568vx4ken91tl6gyt -// static int re_match_2_internal(struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) -public static Object re_match_2_internal(Object... arg) { -UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int -UNSUPPORTED("6pa1vmha3pyewzpq2e2wsz00n"); // re_match_2_internal(struct re_pattern_buffer *bufp, -UNSUPPORTED("4itq0umd8n4zaefp01c54wxac"); // const char *string1, -UNSUPPORTED("2da6uko1m9uyu226zvu3kgswo"); // int size1, -UNSUPPORTED("62ljq7ee0r8hkx89qdr6zrcj1"); // const char *string2, -UNSUPPORTED("eu49m9ze4ikwzobpj8jmx8zjf"); // int size2, -UNSUPPORTED("fsoirv97r4lbqxpez1e1kh6l"); // int pos, -UNSUPPORTED("5das77r3z9spuajdb6a5zoqcg"); // struct re_registers *regs, -UNSUPPORTED("9byy70s4d1i719ix6yy7okfe0"); // int stop) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("n8hlkyr29gxgnkj4x75w0pbu"); // /* General temporaries. */ -UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; -UNSUPPORTED("7ijkchsbw8xrlcbwdzkzy7sg5"); // unsigned char *p1; -UNSUPPORTED("6wjea7744xso80td4x9ur7whp"); // /* Just past the end of the corresponding string. */ -UNSUPPORTED("1fqaa6ix61rs3yld0danksdzt"); // const char *end1, *end2; -UNSUPPORTED("4qjvhq2dmvddcpe2sq02ul57e"); // /* Pointers into string1 and string2, just past the last characters in -UNSUPPORTED("e2o1kagsjdr4x6alq0db0ex6"); // each to consider matching. */ -UNSUPPORTED("3lcnzq2ymn1yaonefakdi2gf9"); // const char *end_match_1, *end_match_2; -UNSUPPORTED("2x1qwx7dh9vq9oyh9l2ffuhki"); // /* Where we are in the data, and the end of the current string. */ -UNSUPPORTED("44aamau4r9tm9tp5eks2hjeeg"); // const char *d, *dend; -UNSUPPORTED("1v5unbhjqcfvkvfh3bwyzig4m"); // /* Where we are in the pattern, and the end of the pattern. */ -UNSUPPORTED("7juswz68hsy9xygg4vwwp1dk4"); // unsigned char *p = bufp->buffer; -UNSUPPORTED("egc1gcrry7bqm2rmed1tbm4p7"); // register unsigned char *pend = p + bufp->used; -UNSUPPORTED("e8rkyc240i479ffdjn5bis1o6"); // /* Mark the opcode just after a start_memory, so we can test for an -UNSUPPORTED("asrb0rht6g8nqkxfrpbqqwhji"); // empty subpattern when we get to the stop_memory. */ -UNSUPPORTED("1xod1essveohmbzqsm3chxtaa"); // unsigned char *just_past_start_mem = 0; -UNSUPPORTED("5cqk44skhero82pev2rwsxqod"); // /* We use this to map every character in the string. */ -UNSUPPORTED("b6qhkmvrybk31a74eyxl9sf73"); // char * translate = bufp->translate; -UNSUPPORTED("clib1bwajaiu950opbz65380n"); // /* Failure point stack. Each place that can handle a failure further -UNSUPPORTED("3lyfugbo3isunzbvdm5i0o4cj"); // down the line pushes a failure point on this stack. It consists of -UNSUPPORTED("1w6peyhoigpqgnv3qujk00vnp"); // restart, regend, and reg_info for all registers corresponding to -UNSUPPORTED("8qdk2kexk0h3w8v82dc1gi8fc"); // the subexpressions we're currently inside, plus the number of such -UNSUPPORTED("c464idhhkc8aqmfjb0s7zn2jq"); // registers, and, finally, two char *'s. The first char * is where -UNSUPPORTED("d39bcwihp0jxqnlaq775160n0"); // to resume scanning the pattern; the second one is where to resume -UNSUPPORTED("bt7bl5ufgmqudglf331090q99"); // scanning the strings. If the latter is zero, the failure point is -UNSUPPORTED("dxhf42bpkithht6k5midiilvm"); // a ``dummy''; if a failure happens and the failure point is a dummy, -UNSUPPORTED("7k01qsxjsxh1mzfj3zkxymge4"); // it gets discarded and the next next one is tried. */ -UNSUPPORTED("5dndxq85ri0pdc1zsswjws66p"); // fail_stack_type fail_stack; -UNSUPPORTED("3ussoc6j234lhv666usd1ujlb"); // /* We fill all the registers internally, independent of what we -UNSUPPORTED("7hukvye8ngqw8xf4c86mq7ksb"); // return, for use in backreferences. The number here includes -UNSUPPORTED("800kciibxx8zzy7gqlip12chx"); // an element for register zero. */ -UNSUPPORTED("9te8xao6v2wvrtemmbarxo8r7"); // size_t num_regs = bufp->re_nsub + 1; -UNSUPPORTED("69fqftzbp36nb88gj0hyzt7n5"); // /* The currently active registers. */ -UNSUPPORTED("210a4lsg6g1jyyakcj1y0z9co"); // active_reg_t lowest_active_reg = ((1 << 8) + 1); -UNSUPPORTED("cav7rdafkpj7lnazs9bzo4f01"); // active_reg_t highest_active_reg = (1 << 8); -UNSUPPORTED("9lffam35cw7ao19j9sq1na2kz"); // /* Information on the contents of registers. These are pointers into -UNSUPPORTED("ezs9s06ouogq0bo54g0m18dwg"); // the input strings; they record just what was matched (on this -UNSUPPORTED("cnjuuaptdt6ott2ct87p0obeb"); // attempt) by a subexpression part of the pattern, that is, the -UNSUPPORTED("74e8guuvf2ep3sm5wuwk3pvak"); // regnum-th regstart pointer points to where in the pattern we began -UNSUPPORTED("3bvo1nxt2ti5kli33880w0y4f"); // matching and the regnum-th regend points to right after where we -UNSUPPORTED("btmswfvhn3ofbmow8ypu5e13p"); // stopped matching the regnum-th subexpression. (The zeroth register -UNSUPPORTED("1kngd0q79bcbooydkquebsoaf"); // keeps track of what the whole pattern matches.) */ -UNSUPPORTED("3bagrvj67tgg2hcld2oq7uq12"); // const char **regstart, **regend; -UNSUPPORTED("cj6z5o1u5gz9fj1ldc50421nu"); // /* If a group that's operated upon by a repetition operator fails to -UNSUPPORTED("9h8hefhboxbyq3lbhmtfl4dbe"); // match anything, then the register for its start will need to be -UNSUPPORTED("269993sksx5a7dxx2skmjmuv0"); // restored because it will have been set to wherever in the string we -UNSUPPORTED("8sl9yewrsty5lu2b0b5210k4l"); // are when we last see its open-group operator. Similarly for a -UNSUPPORTED("64mro6c1shytou2fsehv14t6e"); // register's end. */ -UNSUPPORTED("dzseh4slrayug3iyhvd08tt7k"); // const char **old_regstart, **old_regend; -UNSUPPORTED("60rk8kklgq8pft794dlh37glr"); // /* The is_active field of reg_info helps us keep track of which (possibly -UNSUPPORTED("bavzn3th9ptlj1baje3pfbu2r"); // nested) subexpressions we are currently in. The matched_something -UNSUPPORTED("3wklpcvgm1mxc3ncudzv3u7er"); // field of reg_info[reg_num] helps us tell whether or not we have -UNSUPPORTED("9owj5d6jjiwrr65xe8b66ynmg"); // matched any of the pattern so far this time through the reg_num-th -UNSUPPORTED("5o4rfc4vl6f2f4i6gl8zb2c12"); // subexpression. These two fields get reset each time through any -UNSUPPORTED("jainf18l355wvb9svfolzfyu"); // loop their register is in. */ -UNSUPPORTED("cldhi92ebvv3qkzk7hcp1acpx"); // register_info_type *reg_info; -UNSUPPORTED("3tm9df4zwjcbf5wzasl5vbo41"); // /* The following record the register info as found in the above -UNSUPPORTED("62fw4aryj1l9mpyzofxartoaf"); // variables when we find a match better than any we've seen before. -UNSUPPORTED("3yswh3sslq5jxfw5qiqyposlu"); // This happens as we backtrack through the failure points, which in -UNSUPPORTED("7fwl7a78gtt9lpholdubg8h20"); // turn happens only if we have not yet matched the entire string. */ -UNSUPPORTED("bv3kpg4ykugxqsd55m9yhp5af"); // unsigned best_regs_set = 0; -UNSUPPORTED("boct5aaty3lmh8421fbwe811s"); // const char **best_regstart, **best_regend; -UNSUPPORTED("4rxhejgld2fxwm1gablnrag3j"); // /* Logically, this is `best_regend[0]'. But we don't want to have to -UNSUPPORTED("7qi1q2tujh3qj95sucmglupqv"); // allocate space for that if we're not allocating space for anything -UNSUPPORTED("awo7q2rkwc6jlfdsam4my1k84"); // else (see below). Also, we never need info about register 0 for -UNSUPPORTED("2f9d4yn8chlunlz3lckbg2mw0"); // any of the other register vectors, and it seems rather a kludge to -UNSUPPORTED("dixl88kjwfhphwh4xmk51px61"); // treat `best_regend' differently than the rest. So we keep track of -UNSUPPORTED("lthy8n6i428ea9wqx66x5syo"); // the end of the best match so far in a separate variable. We -UNSUPPORTED("1g3sl9fbv6pwfi9bysp5k62i"); // initialize this to NULL so that when we backtrack the first time -UNSUPPORTED("ek5k7ui0tsvl05jargwtlh04g"); // and need to test it, it's not garbage. */ -UNSUPPORTED("274v72hhp6qzltud0qx3natuw"); // const char *match_end = (void *)0; -UNSUPPORTED("ce5dox5nl3mnb89gapdwnz2co"); // /* This helps SET_REGS_MATCHED avoid doing redundant work. */ -UNSUPPORTED("7rtu9eogaexvklmhbd0nvi8rq"); // int set_regs_matched_done = 0; -UNSUPPORTED("6f52yhx59atis4v6w50r78tpr"); // /* Used when we pop values we don't care about. */ -UNSUPPORTED("cuer8lfpvninqja7rr37wv7vr"); // const char **reg_dummy; -UNSUPPORTED("1tfv2eq96tkv3dnxi9htt3ogy"); // register_info_type *reg_info_dummy; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("bbul77ox50tuvngn3t4agr5uo"); // do { fail_stack.stack = (fail_stack_elt_t *) alloca (5 * sizeof (fail_stack_elt_t)); if (fail_stack.stack == (void *)0) return -2; fail_stack.size = 5; fail_stack.avail = 0; } while (0); -UNSUPPORTED("f2odxckhb2j0jb0skzptkj1li"); // /* Do not bother to initialize all the register variables if there are -UNSUPPORTED("7rdujqxkgmrsifkkjc8uc4uf8"); // no groups in the pattern, as it takes a fair amount of time. If -UNSUPPORTED("a8btab3qm6qk1ruzu54espdbw"); // there are groups, we include space for register 0 (the whole -UNSUPPORTED("2fkpn3ylgs86igj0rin9q175c"); // pattern), even though we never use it, since it simplifies the -UNSUPPORTED("a82pq8o4xe5vl6izykmrmv80p"); // array indexing. We should fix this. */ -UNSUPPORTED("3b6nyivy298vtrccdf2yz5zfy"); // if (bufp->re_nsub) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("3s4x1dwphpxvwftzx6myntwof"); // regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("2q4zpv4cg2m1hlu19z7n20v0i"); // regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("dncg8rhgtq841coamkzozn70f"); // old_regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("dyvpshht388f50j2qsprkqq31"); // old_regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("dprck6oszi2zdnvn8ranbm5ax"); // best_regstart = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("3dm3mock6ighuyjpbnckimggr"); // best_regend = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("5732hglv8omqh0obbstzw9ovr"); // reg_info = ((register_info_type *) alloca ((num_regs) * sizeof (register_info_type))); -UNSUPPORTED("4itgi9p0hm10q9gc8ligcmjw9"); // reg_dummy = ((const char * *) alloca ((num_regs) * sizeof (const char *))); -UNSUPPORTED("2w784gfhj47yvqr5bkl3rnvb1"); // reg_info_dummy = ((register_info_type *) alloca ((num_regs) * sizeof (register_info_type))); -UNSUPPORTED("bknt92c4iiz2fki0ya4b4zu9l"); // if (!(regstart && regend && old_regstart && old_regend && reg_info -UNSUPPORTED("bvpk762fja9xad61rr2ecsbun"); // && best_regstart && best_regend && reg_dummy && reg_info_dummy)) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("8f1nfq1jn2ejt7ub9midgshrh"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("7ivse5do9752etnc6lpwep4id"); // return -2; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("9hkjvu3lvnwrjs0wre7judo3c"); // /* We must initialize all our variables to NULL, so that -UNSUPPORTED("45j98q6y8yuy75ls6dsgx1k64"); // `FREE_VARIABLES' doesn't try to free them. */ -UNSUPPORTED("2lkorxvitynsptmav1g59ixmb"); // regstart = regend = old_regstart = old_regend = best_regstart -UNSUPPORTED("bzn1un5rdvzm7al9b58svbna4"); // = best_regend = reg_dummy = (void *)0; -UNSUPPORTED("d9o9396ai0y6hfmg0mj1ebkq3"); // reg_info = reg_info_dummy = (register_info_type *) (void *)0; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("8w78v1mfbuuwhx2hypx8jcldw"); // /* The starting position is bogus. */ -UNSUPPORTED("a4wmr8zj9xfpfbqugg1rwnak2"); // if (pos < 0 || pos > size1 + size2) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("7sq147wjkuyi93ra9jbzwkvbf"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("62ko03w39aomt1h9y758mag0k"); // return -1; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("cqf83jwvi6ehnlngujy4qchdu"); // /* Initialize subexpression text positions to -1 to mark ones that no -UNSUPPORTED("57srgq1s42r2qebxntv9z4v5k"); // start_memory/stop_memory has been seen for. Also initialize the -UNSUPPORTED("1ow37crla9qcqw19bbyb805t9"); // register information struct. */ -UNSUPPORTED("9ydw7k6i7j7x2k6zngd59rojt"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("2kyhfd6kl7ms8bwg1wlvfqwap"); // regstart[mcnt] = regend[mcnt] -UNSUPPORTED("2kl8ke0fnk9nauyk9zokcxkoj"); // = old_regstart[mcnt] = old_regend[mcnt] = (®_unset_dummy); -UNSUPPORTED("91q00i6munm3i7qie7rj8jfei"); // ((reg_info[mcnt]).bits.match_null_string_p) = 3; -UNSUPPORTED("afk8kaqsmcxqe0q6zubefocrn"); // ((reg_info[mcnt]).bits.is_active) = 0; -UNSUPPORTED("df366kaag3ynqzmm60vrmh0vx"); // ((reg_info[mcnt]).bits.matched_something) = 0; -UNSUPPORTED("5mtz90agac60yikyx4k2p0tcy"); // ((reg_info[mcnt]).bits.ever_matched_something) = 0; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("j5sjexwvtormmkwlvyyw0j3m"); // /* We move `string1' into `string2' if the latter's empty -- but not if -UNSUPPORTED("22snitog4zamx1t4ccq83m95r"); // `string1' is null. */ -UNSUPPORTED("e5i3kugt3ww6rnm9voflfgawq"); // if (size2 == 0 && string1 != (void *)0) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("e42qfjjyl84hogtxnpbthj5rz"); // string2 = string1; -UNSUPPORTED("crben3jjw8pci91x5lvrk4w8q"); // size2 = size1; -UNSUPPORTED("f01lcid5mzfewcivqnd332urs"); // string1 = 0; -UNSUPPORTED("5c8judheb0ofzkgdnwqnml8z0"); // size1 = 0; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("e172015pwzssq7c0vo2tq5aq1"); // end1 = string1 + size1; -UNSUPPORTED("4m5wyc9k9qkl4sfiwwyvvla1h"); // end2 = string2 + size2; -UNSUPPORTED("92k1xad7xyoitcixjggddz2xx"); // /* Compute where to stop matching, within the two strings. */ -UNSUPPORTED("6gdkxgosf1sannyt40j9kmngq"); // if (stop <= size1) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("6cypxpgmpeoi6emdah5s9k61u"); // end_match_1 = string1 + stop; -UNSUPPORTED("14iyugw7zeo04abwg6k9mz77r"); // end_match_2 = string2; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("ubox1xzc7tf43rh7nzqo0y2w"); // end_match_1 = end1; -UNSUPPORTED("g15ad7lvemt1j3tfd3b2wy5n"); // end_match_2 = string2 + stop - size1; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("b72xjrsh15ceq6n0mp9o3dr3b"); // /* `p' scans through the pattern as `d' scans through the data. -UNSUPPORTED("ee8kj3n0j7z3zgw3x29pr4iwg"); // `dend' is the end of the input string that `d' points within. `d' -UNSUPPORTED("9ht9fo2bvlr07alij7ev6sc64"); // is advanced into the following input string whenever necessary, but -UNSUPPORTED("delvy2rsoiwhe79dztx86nhlo"); // this happens before fetching; therefore, at the beginning of the -UNSUPPORTED("4fil0e4w6u5hnt1i6cgmhslcj"); // loop, `d' can be pointing at the end of a string, but it cannot -UNSUPPORTED("3m773nmhi0vb3kvwhk5zj1fvx"); // equal `string2'. */ -UNSUPPORTED("1sztmr22bzx9qg638iuxf0qcf"); // if (size1 > 0 && pos <= size1) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("effnp1jm0qoqpcub7rcliiklk"); // d = string1 + pos; -UNSUPPORTED("a3z31vmcwv4izh4gaf0zzu63f"); // dend = end_match_1; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("a6h3karx5gb77i5icjwtr70s"); // d = string2 + pos - size1; -UNSUPPORTED("2mh3yoyin5cy0p7onls0cxs88"); // dend = end_match_2; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); // ; -UNSUPPORTED("99zhv2pwx2q8a48j197pw6xt4"); // /* This loops over pattern commands. It exits by returning from the -UNSUPPORTED("7e60h1pt63bigon94i6v0grl5"); // function if the match is complete, or it drops through if the match -UNSUPPORTED("b3n3kmzfara10ikrekjiv0woz"); // fails at this starting point in the input data. */ -UNSUPPORTED("3s761dh42eu37yg4q6j6rw0kx"); // for (;;) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; -UNSUPPORTED("coqe9flw9y84q7eb1xt2wxm8v"); // if (p == pend) -UNSUPPORTED("a41002aq4p23pyz97pvq70zys"); // { /* End of pattern means we might have succeeded. */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("c3on5mrar07ygte8kqbl2hntc"); // /* If we haven't matched the entire string, and we want the -UNSUPPORTED("apgoqswuwqwo0jdc88f1g6zjk"); // longest match, try backtracking. */ -UNSUPPORTED("6quev9lqtkd3rm2zf8o08q0d4"); // if (d != end_match_2) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("84ttk9zo6qwdugyag6bsfijsa"); // /* 1 if this match ends in the same string (string1 or string2) -UNSUPPORTED("3d7aa3i6sz2b5v1rdku8mfkve"); // as the best previous match. */ -UNSUPPORTED("99rxk6hqfc6820y8brqyzr1ix"); // boolean same_str_p = ((size1 && string1 <= (match_end) && (match_end) <= string1 + size1) -UNSUPPORTED("5h23tai9w26g9uu3555t1s2ko"); // == (dend == end_match_1)); -UNSUPPORTED("a9j7f142ppbm4bfda6vllbzkt"); // /* 1 if this match is the best seen so far. */ -UNSUPPORTED("7ssv33yt0mo7z7naegb53acst"); // boolean best_match_p; -UNSUPPORTED("406ocol9hh6qa1tg01aqw4fm4"); // /* AIX compiler got confused when this was combined -UNSUPPORTED("doec2mp5fgho754yj67fiufk6"); // with the previous declaration. */ -UNSUPPORTED("3olytwmx4gzy8yajx9lv0w470"); // if (same_str_p) -UNSUPPORTED("b8puesm16uljvnmkyguxlpjz2"); // best_match_p = d > match_end; -UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else -UNSUPPORTED("8g5axzy7uh94mclmd8107jt4r"); // best_match_p = !(dend == end_match_1); -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("61g695v6madw50govi0fpaymy"); // if (!(fail_stack.avail == 0)) -UNSUPPORTED("c5mtgdtcl0w9vn5m7roo5mclf"); // { /* More failure points to try. */ -UNSUPPORTED("6k0fj673itx4y90om89cfw4au"); // /* If exceeds best match so far, save it. */ -UNSUPPORTED("8lvy2hc2kk7wk0osmu4kt3b46"); // if (!best_regs_set || best_match_p) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("c1z8tnsgrw2hio3750gukv093"); // best_regs_set = 1; -UNSUPPORTED("6cvml1s44f1rz7ut1p9732o24"); // match_end = d; -UNSUPPORTED("a6r7lto035pp3gvk1bdixang2"); // ; -UNSUPPORTED("5lgbvvnv5vugg8j3y9jm7tmto"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) -UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { -UNSUPPORTED("36h25f46gwl1bjkvlv2hi12al"); // best_regstart[mcnt] = regstart[mcnt]; -UNSUPPORTED("38u63aln2507yexeleac5i5f6"); // best_regend[mcnt] = regend[mcnt]; -UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("9608e8vynn7blihqg1sa5x6hm"); // /* If no failure points, don't restore garbage. And if -UNSUPPORTED("cvm5ogwjizby9vpz4bh4t4kmf"); // last match is real best match, don't restore second -UNSUPPORTED("5019dps6elcptg07efvg8ytlp"); // best one. */ -UNSUPPORTED("31h7b1f1py5xliuo37yr49j0e"); // else if (best_regs_set && !best_match_p) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("51sj2rq6npgedmtb80qyu24n8"); // restore_best_regs: -UNSUPPORTED("eassx3c83qc4vxc85c75b9qjl"); // /* Restore best match. It may happen that `dend == -UNSUPPORTED("5pm2irkm5dt0s4qwuwz8u3q1h"); // end_match_1' while the restored d is in string2. -UNSUPPORTED("bc82mepahwmg9x3r4zc1uhtn2"); // For example, the pattern `x.*y.*z' against the -UNSUPPORTED("dux3vuywslng2dhkfnnw5vg60"); // strings `x-' and `y-z-', if the two strings are -UNSUPPORTED("8xrw6nr4f038b5khvfblfbvnn"); // not consecutive in memory. */ -UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; -UNSUPPORTED("20z1s97l71qromoe39rg38hm2"); // d = match_end; -UNSUPPORTED("3ue7lk6sdffqfud3cceri8m8b"); // dend = ((d >= string1 && d <= end1) -UNSUPPORTED("67n43dsreslafvliflcrjntcd"); // ? end_match_1 : end_match_2); -UNSUPPORTED("7f2q0145iwgp8w2wsim63zj7m"); // for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("f2o08vllkyap6mdqirtbkpmpk"); // regstart[mcnt] = best_regstart[mcnt]; -UNSUPPORTED("3pqb99yerpeb7fyy71o36q7nc"); // regend[mcnt] = best_regend[mcnt]; -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("7qpxyrpi9p8bv5o56myo9c2dh"); // } /* d != end_match_2 */ -UNSUPPORTED("eo36u7f29du5zdvcxohew6ccd"); // succeed_label: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ch5rhljwem9e6yq0bvid9b9dj"); // /* If caller wants register contents data back, do it. */ -UNSUPPORTED("1yp4u3stmh22ubjzoa5psbbuy"); // if (regs && !bufp->no_sub) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("3kol441pj0oa248vzhp3vv7ls"); // /* Have the register data arrays been allocated? */ -UNSUPPORTED("1gzi6m8z4rjss7i9b9wcz0nhw"); // if (bufp->regs_allocated == 0) -UNSUPPORTED("bfr9pjr2qri3sxl2k6brn5xer"); // { /* No. So allocate them with malloc. We need one -UNSUPPORTED("eo5lmm6txjqzwpnc51q2rr86p"); // extra element beyond `num_regs' for the `-1' marker -UNSUPPORTED("1qr602sxafqljujgz9tt6qcf9"); // GNU code uses. */ -UNSUPPORTED("w1tdx38yyrw1sowe6ghaj2nk"); // regs->num_regs = ((30) > (num_regs + 1) ? (30) : (num_regs + 1)); -UNSUPPORTED("be8i44ggcohl9z9hz4rhqk56n"); // regs->start = ((regoff_t *) malloc ((regs->num_regs) * sizeof (regoff_t))); -UNSUPPORTED("cyfi6zngbv1dslzcl7x1sr152"); // regs->end = ((regoff_t *) malloc ((regs->num_regs) * sizeof (regoff_t))); -UNSUPPORTED("cxow73omypjzg053jt8epepo8"); // if (regs->start == (void *)0 || regs->end == (void *)0) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("eb9qndp4gf1s242vxc2lh5maj"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("dqq88wul2lqxsx8tregfubikv"); // return -2; -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("i0ztbbhawtrpj2duc3ya6kdq"); // bufp->regs_allocated = 1; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("6c4alibipwc6an6jcy479a3m"); // else if (bufp->regs_allocated == 1) -UNSUPPORTED("73h0ws2srjiuc9g7nvfsil3p7"); // { /* Yes. If we need more elements than were already -UNSUPPORTED("3k4931vs4niesagz1oxg57nbg"); // allocated, reallocate them. If we need fewer, just -UNSUPPORTED("e6dbjm0iyzngr68xmg81z2z0m"); // leave it alone. */ -UNSUPPORTED("djowzzvskdbwjag9m9fnha4jh"); // if (regs->num_regs < num_regs + 1) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("9xesw41tb2u8ao5widm29kiyp"); // regs->num_regs = num_regs + 1; -UNSUPPORTED("87dmzxu9te8vokzvs3irtuxov"); // ((regs->start) = (regoff_t *) realloc (regs->start, (regs->num_regs) * sizeof (regoff_t))); -UNSUPPORTED("6e6qfl2iibo9mkatufr410gra"); // ((regs->end) = (regoff_t *) realloc (regs->end, (regs->num_regs) * sizeof (regoff_t))); -UNSUPPORTED("1vrn0xsco7imnquwgs11osuf6"); // if (regs->start == (void *)0 || regs->end == (void *)0) -UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { -UNSUPPORTED("93c8iop6pb7zwgnohfyvit0s"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("7l01rs860ssm9kixuhgx9hdbq"); // return -2; -UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("3fvt2dndjzd64gdhzxvql5d8b"); // /* These braces fend off a "empty body in an else-statement" -UNSUPPORTED("2luomnvf5pqa41oaxy8f8r9or"); // warning under GCC when assert expands to nothing. */ -UNSUPPORTED("c6tldeu5ffnykyfto7hi9ixau"); // ; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("87z47ijxyqp3enbpawsz2ln6c"); // /* Convert the pointer data in `regstart' and `regend' to -UNSUPPORTED("2au9uvntej9ho5mvvkamw1j5w"); // indices. Register zero has to be set differently, -UNSUPPORTED("7hnlk3p3u0dhyz803a3lfbxnj"); // since we haven't kept track of any info for it. */ -UNSUPPORTED("35mb19qsz9130m513vyoka7y0"); // if (regs->num_regs > 0) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("9009sy5tyjmheeqydo5wo4kwq"); // regs->start[0] = pos; -UNSUPPORTED("edxcovxefspqos0b0zuq6z7ha"); // regs->end[0] = ((dend == end_match_1) -UNSUPPORTED("99qit228aypztxnllw89nwokv"); // ? ((regoff_t) (d - string1)) -UNSUPPORTED("4aa9l4flk3x9zqpcce1dwt1ta"); // : ((regoff_t) (d - string2 + size1))); -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("egg8arm7ozeve9mx29jgkz7bs"); // /* Go through the first `min (num_regs, regs->num_regs)' -UNSUPPORTED("9c1fouoack9c0oqkqs0d1tbyn"); // registers, since that is all we initialized. */ -UNSUPPORTED("76y0zjrbtva0kjq7q5c1wths1"); // for (mcnt = 1; (unsigned) mcnt < ((num_regs) < (regs->num_regs) ? (num_regs) : (regs->num_regs)); -UNSUPPORTED("1eh3h1x9wgjp35deszyvz3o6e"); // mcnt++) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("b0l8ghi3p5kmv8ns6tw59wvuu"); // if (((regstart[mcnt]) == (®_unset_dummy)) || ((regend[mcnt]) == (®_unset_dummy))) -UNSUPPORTED("nmubntmt76n8354k37ekf09c"); // regs->start[mcnt] = regs->end[mcnt] = -1; -UNSUPPORTED("ecas48ylhxx9t2hquqr1nnwzj"); // else -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("elvx8lxakvbaqd1oax9ecwh6w"); // regs->start[mcnt] -UNSUPPORTED("2ftoc2pu10jb5p4scmxq2z1j2"); // = (regoff_t) ((size1 && string1 <= (regstart[mcnt]) && (regstart[mcnt]) <= string1 + size1) ? ((regoff_t) ((regstart[mcnt]) - string1)) : ((regoff_t) ((regstart[mcnt]) - string2 + size1))); -UNSUPPORTED("eblc8kac69cvh0xmx81t3z7qw"); // regs->end[mcnt] -UNSUPPORTED("7lahjjs9zz1e6q38t501ceam8"); // = (regoff_t) ((size1 && string1 <= (regend[mcnt]) && (regend[mcnt]) <= string1 + size1) ? ((regoff_t) ((regend[mcnt]) - string1)) : ((regoff_t) ((regend[mcnt]) - string2 + size1))); -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("dud4yeckicq4pijwz9m705cmx"); // /* If the regs structure we return has more elements than -UNSUPPORTED("dg2liz6izarfhgllr7c0lvfzx"); // were in the pattern, set the extra elements to -1. If -UNSUPPORTED("bgul1odz2k47e5yo08ifpsxux"); // we (re)allocated the registers, this is the case, -UNSUPPORTED("8pq9l6jwi4wy8aly679isfqnx"); // because we always allocate enough to have at least one -UNSUPPORTED("ccbog2f5misacunpi5lovnpm0"); // -1 at the end. */ -UNSUPPORTED("3rm0qbtrqgfau6g7gecmhdspm"); // for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++) -UNSUPPORTED("129q7ylakhk2gu6j7p4jpz372"); // regs->start[mcnt] = regs->end[mcnt] = -1; -UNSUPPORTED("93qdoi4cltvsoa26wtattpcrj"); // } /* regs && !bufp->no_sub */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("4wc9t8vouh3w18pod77gkuoaz"); // mcnt = d - pos - ((dend == end_match_1) -UNSUPPORTED("48tr2aou1bn895ggwv1qgo056"); // ? string1 -UNSUPPORTED("e9wr9ptogadx1o3labo85tlgf"); // : string2 - size1); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("8f1nfq1jn2ejt7ub9midgshrh"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("c0a9sr78bshk0e2ijyxlzxg7h"); // return mcnt; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("b0kkxy3zkf3f430688gewaj4w"); // /* Otherwise match next pattern command. */ -UNSUPPORTED("3d9jhchhw3lu8yajca4mi058b"); // switch (((re_opcode_t) *p++)) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("1cr7m9kscv8emiq2bhdx0l21"); // /* Ignore these. Used to ignore the n of succeed_n's which -UNSUPPORTED("4p7fiu2s102akmzhjtzxqkrdi"); // currently have n == 0. */ -UNSUPPORTED("anhhi3sf756j0lcm11sy9nyfc"); // case no_op: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("8xm4dpngfjaadz6e2suqjuja7"); // case succeed: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("97sc3afg030x5rva8s655k37e"); // goto succeed_label; -UNSUPPORTED("bsqnanqt8sp33wb2pm6xt6ulq"); // /* Match the next n pattern characters exactly. The following -UNSUPPORTED("4hpiyumzwmrkzpbtwhyro0nin"); // byte in the pattern defines n, and the n bytes after that -UNSUPPORTED("126jkfju6a6kncm4twhsy8b50"); // are the characters to match. */ -UNSUPPORTED("cw984demptqbnja38a25p2xi1"); // case exactn: -UNSUPPORTED("e299xchgd28m8kehs3yk4j0m0"); // mcnt = *p++; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("bh28o7qdz7h0u89in1fxom93a"); // /* This is written out as an if-else so we don't waste time -UNSUPPORTED("87zph5xuncm4m58n4ggl0buj8"); // testing `translate' inside the loop. */ -UNSUPPORTED("7jj6ay2afdj7lpspqsgwusj6m"); // if (translate) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("af97jdpx3vxfjkevna4yd8iu3"); // do -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("664ue5cxfdx7fkvvgla8dw3ko"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("4nbfd88egqevnftfub4el1t0p"); // if ((unsigned char) translate[(unsigned char) *d++] -UNSUPPORTED("c44weohee2ybnj7w12bc184r0"); // != (unsigned char) *p++) -UNSUPPORTED("bkcykqhkoe9lpop9i2qgzu9yp"); // goto fail; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("74t2bggypeoowelqm6xtisx30"); // while (--mcnt); -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("af97jdpx3vxfjkevna4yd8iu3"); // do -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("664ue5cxfdx7fkvvgla8dw3ko"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("aozx58qal2txvazcjwrwyio1g"); // if (*d++ != (char) *p++) goto fail; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("74t2bggypeoowelqm6xtisx30"); // while (--mcnt); -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("7tks8jmj7cqrcj4nyqm3djfno"); // /* Match any character except possibly a newline or a null. */ -UNSUPPORTED("1bv8e740f9rna5i036bo292wc"); // case anychar: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("avzqzqv7s0tr2npgctz1b2ana"); // if ((!(bufp->syntax & ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1)) && (translate ? (char) translate[(unsigned char) (*d)] : (*d)) == '\n') -UNSUPPORTED("83t3ma7nbx7fiz0zawdo05ob2"); // || (bufp->syntax & (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) && (translate ? (char) translate[(unsigned char) (*d)] : (*d)) == '\000')) -UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; -UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("2ro4nzmlhhrmitxu9446arhlo"); // case charset: -UNSUPPORTED("2zj0t91dpl66cu75cb0h2j1hu"); // case charset_not: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("8n4s0kz2yj50t5rvnitti5hyl"); // register unsigned char c; -UNSUPPORTED("deppcas7zridwg11cevwayois"); // boolean not = (re_opcode_t) *(p - 1) == charset_not; -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("6mf4c0e1oxwfped5hh8u7fz2n"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("9aaydk7f3la99u6jfo9kyxp5i"); // c = (translate ? (char) translate[(unsigned char) (*d)] : (*d)); /* The character to match. */ -UNSUPPORTED("cc3v2ndt3kmkt0r26mvu8ftfi"); // /* Cast to `unsigned' instead of `unsigned char' in case the -UNSUPPORTED("2szsk231obr0m7gvx69h0jje"); // bit list is a full 32 bytes long. */ -UNSUPPORTED("2bmmfw3dqxl0rnfrjgzxlk2gw"); // if (c < (unsigned) (*p * 8) -UNSUPPORTED("721an1atvtz1g2jzxegur68o9"); // && p[1 + c / 8] & (1 << (c % 8))) -UNSUPPORTED("16fenxsijr0vmtxzyb8psvofo"); // not = !not; -UNSUPPORTED("9pg86i2witmji2iwfc6jhm9j8"); // p += 1 + *p; -UNSUPPORTED("6rkrjn87jai9lq2d129w2h7g8"); // if (!not) goto fail; -UNSUPPORTED("632iqprva0k4cq9az0mwgy0ua"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("2ddfcenepkfjkw5qk64bs5pjs"); // d++; -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ax93bd9x56qib5q0g9wvm2qcy"); // /* The beginning of a group is represented by start_memory. -UNSUPPORTED("e38f63tkhbflv1p396hknxdwy"); // The arguments are the register number in the next byte, and the -UNSUPPORTED("c64u5xem18b4mqy79877eqfcs"); // number of groups inner to this one in the next. The text -UNSUPPORTED("dbdk515uk79zg5hip4kru378u"); // matched within the group is recorded (in the internal -UNSUPPORTED("8j4ek9641uur5fxjgkizkb06i"); // registers data structure) under the register number. */ -UNSUPPORTED("6c0ei34e676sv2kl1dxfzm5lm"); // case start_memory: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("dus38gizylomi1jon9xa9a9gi"); // /* Find out if this group can match the empty string. */ -UNSUPPORTED("1e0kjdjtknuzgjuge4nu2rvvv"); // p1 = p; /* To send to group_match_null_string_p. */ -UNSUPPORTED("1lvbl8fbh2kfnyp76ial3wyge"); // if (((reg_info[*p]).bits.match_null_string_p) == 3) -UNSUPPORTED("1yvuh3ye9g4wks9vy2jwlla11"); // ((reg_info[*p]).bits.match_null_string_p) -UNSUPPORTED("crq9r37sdaimjd51v7rr5rifz"); // = group_match_null_string_p (&p1, pend, reg_info); -UNSUPPORTED("ea7tbs2n5vp5hwe31r9ym79d1"); // /* Save the position in the string where we were the last time -UNSUPPORTED("b64kvidnxk3y1txigfo1pl99t"); // we were at this open-group operator in case the group is -UNSUPPORTED("6w4zb5o8illk23kubyigl5wig"); // operated upon by a repetition operator, e.g., with `(a*)*b' -UNSUPPORTED("9d7meouvzhwtqek5lj1q19d3n"); // against `ab'; then we want to ignore where we are now in -UNSUPPORTED("elzx65ahdc47yfgprdxj1sjl1"); // the string in case this attempt to match fails. */ -UNSUPPORTED("1qsu4c7bkuq3vofwjjijw1e3k"); // old_regstart[*p] = ((reg_info[*p]).bits.match_null_string_p) -UNSUPPORTED("6fd5qfd27ra7djj22yvjcis5j"); // ? ((regstart[*p]) == (®_unset_dummy)) ? d : regstart[*p] -UNSUPPORTED("eg76mx8hl74su6aktlwej5s9l"); // : regstart[*p]; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("837i1cwpv2l0eyw1m5ly72e5q"); // regstart[*p] = d; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("1pjvhqen01q14gt1u2ipmfn78"); // ((reg_info[*p]).bits.is_active) = 1; -UNSUPPORTED("7yf870aytlplqgsdoktbv23o8"); // ((reg_info[*p]).bits.matched_something) = 0; -UNSUPPORTED("5qe9dgngpf1z0x2gaouwzuh33"); // /* Clear this whenever we change the register activity status. */ -UNSUPPORTED("dckkxudermmywleu21wcsh6wk"); // set_regs_matched_done = 0; -UNSUPPORTED("4v5t4lf3m98srbm2dhq6otf2z"); // /* This is the new highest active register. */ -UNSUPPORTED("3z1903inbnuh0u7jl2xrmgjwy"); // highest_active_reg = *p; -UNSUPPORTED("c5um95y8m6g52hnhowkayvp2f"); // /* If nothing was active before, this is the new lowest active -UNSUPPORTED("33rqqd71rbnr2br416p5pko3h"); // register. */ -UNSUPPORTED("bbhu9dtas1n5xtephxw36fi5o"); // if (lowest_active_reg == ((1 << 8) + 1)) -UNSUPPORTED("2zewvmpnwbg7dwzrf032pngut"); // lowest_active_reg = *p; -UNSUPPORTED("247xejwk6ewf4ot2xglm0foep"); // /* Move past the register number and inner group count. */ -UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; -UNSUPPORTED("9h673b93wmz9abfvqdehryv9v"); // just_past_start_mem = p; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("958t8ufjo5g39llb7x2vk8gey"); // /* The stop_memory opcode represents the end of a group. Its -UNSUPPORTED("3diz7dyrj8z41hkn0gv0u90nj"); // arguments are the same as start_memory's: the register -UNSUPPORTED("ancmrtd12048bir4um1a42lk2"); // number, and the number of inner groups. */ -UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("6myxkco5k76etfo4hu8yr5wbc"); // /* We need to save the string position the last time we were at -UNSUPPORTED("79ss3fgfp7q2srolhcfv565wc"); // this close-group operator in case the group is operated -UNSUPPORTED("4g7o1h1hqyb3ed7o7xoukat2e"); // upon by a repetition operator, e.g., with `((a*)*(b*)*)*' -UNSUPPORTED("7ya5jxfxzzwl6gbtsm5gp06kq"); // against `aba'; then we want to ignore where we are now in -UNSUPPORTED("elzx65ahdc47yfgprdxj1sjl1"); // the string in case this attempt to match fails. */ -UNSUPPORTED("6tbn6td0l64kefdcsz4l5v4aq"); // old_regend[*p] = ((reg_info[*p]).bits.match_null_string_p) -UNSUPPORTED("6ei747c3h9zuuwuuoeuutcbvc"); // ? ((regend[*p]) == (®_unset_dummy)) ? d : regend[*p] -UNSUPPORTED("8mmdpk59qqy95iwnf47y5p6dl"); // : regend[*p]; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("1g18yrcifqxtxpfho7si6eeta"); // regend[*p] = d; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("7vycocnhdpq8h26dxroqf6qv3"); // /* This register isn't active anymore. */ -UNSUPPORTED("7ntazk8yalx2z9fbvgnqmgjyj"); // ((reg_info[*p]).bits.is_active) = 0; -UNSUPPORTED("5qe9dgngpf1z0x2gaouwzuh33"); // /* Clear this whenever we change the register activity status. */ -UNSUPPORTED("dckkxudermmywleu21wcsh6wk"); // set_regs_matched_done = 0; -UNSUPPORTED("42clmiwrmzlsyiozfpc5z4nc9"); // /* If this was the only register active, nothing is active -UNSUPPORTED("1ujxcs2n921afe94v57lwlhbh"); // anymore. */ -UNSUPPORTED("63r84tgp0e98zrp5vtjft0j7v"); // if (lowest_active_reg == highest_active_reg) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("8kmp96mmwzp28qyx61vh0flaz"); // lowest_active_reg = ((1 << 8) + 1); -UNSUPPORTED("7x2sqxkjont50piw66yo0dtpp"); // highest_active_reg = (1 << 8); -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("c1jewz2a8ue76qm3v9zzr62p2"); // { /* We must scan for the new highest active register, since -UNSUPPORTED("decsayupwmti5a04jbhouqvoo"); // it isn't necessarily one less than now: consider -UNSUPPORTED("2xmzbvq25xm2umlpe67f0xxcl"); // (a(b)c(d(e)f)g). When group 3 ends, after the f), the -UNSUPPORTED("epks85v9quym7a8m6zf2fqi3"); // new highest active register is 1. */ -UNSUPPORTED("2txbhcyz9wjvsf90upkqlpnc2"); // unsigned char r = *p - 1; -UNSUPPORTED("5734gbg5fpueutgkx1nymooqp"); // while (r > 0 && !((reg_info[r]).bits.is_active)) -UNSUPPORTED("bdia7d21cgyoa54eec4z33p89"); // r--; -UNSUPPORTED("8n4iy0kw6ecl8rffe6zhoim7f"); // /* If we end up at register zero, that means that we saved -UNSUPPORTED("euyoh0d7li8ww59zhb7bcmwss"); // the registers as the result of an `on_failure_jump', not -UNSUPPORTED("9b4zvqn8u6k8s7opuitogjuop"); // a `start_memory', and we jumped to past the innermost -UNSUPPORTED("2qdslp2g91aru02gnj2jzfngo"); // `stop_memory'. For example, in ((.)*) we save -UNSUPPORTED("c49yz0o5hen5lvybntd5j2fns"); // registers 1 and 2 as a result of the *, but when we pop -UNSUPPORTED("eqfql6meyzhinquampkweqzy6"); // back to the second ), we are at the stop_memory 1. -UNSUPPORTED("3y5zlgk5fpwzvouq2l6ssxmd1"); // Thus, nothing is active. */ -UNSUPPORTED("34eseuqzde8opwrs60ycvdlou"); // if (r == 0) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("6sxj2komvl2u668mxzv7uw1bk"); // lowest_active_reg = ((1 << 8) + 1); -UNSUPPORTED("4wvntivmvrdiicobd01fuopc1"); // highest_active_reg = (1 << 8); -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("ex6jbb36b02x7vzl22fq0yh2l"); // else -UNSUPPORTED("2gpimcvwuqcsn5m8kxgtrur9s"); // highest_active_reg = r; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("6tnujp0ji1y0x3qf7nnoewlwi"); // /* If just failed to match something this time around with a -UNSUPPORTED("c2a0wegxd9akp346q7kd756xk"); // group that's operated on by a repetition operator, try to -UNSUPPORTED("5sojth3d9jro95jciohpo41gv"); // force exit from the ``loop'', and restore the register -UNSUPPORTED("6y1gydjqgpmctcds7f5sg7r7a"); // information for this group that we had before trying this -UNSUPPORTED("7k609wk6ordqikf4gj9wim2mb"); // last match. */ -UNSUPPORTED("drsdlw7kcvkqlu9vl2ekb5pva"); // if ((!((reg_info[*p]).bits.matched_something) -UNSUPPORTED("djhystklzfwsz99ch5tg2mdul"); // || just_past_start_mem == p - 1) -UNSUPPORTED("73puidl4bjed2y05glwuha2tr"); // && (p + 2) < pend) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("5bmgzdh5rp0tqqvuep6upitw5"); // boolean is_a_jump_n = 0; -UNSUPPORTED("6i6e11jwv13din36enbo5swaa"); // p1 = p + 2; -UNSUPPORTED("wr9bhelppzmwslf6sw3zxs9m"); // mcnt = 0; -UNSUPPORTED("8y47wte4d9uar38b22v7dqq3g"); // switch ((re_opcode_t) *p1++) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("bok1esp1zekmbuklmyk3rk5rx"); // case jump_n: -UNSUPPORTED("38gwuf75sc2x4fup5mqsis4x6"); // is_a_jump_n = 1; -UNSUPPORTED("a8ugqe6z5croeioatypl4otaw"); // case pop_failure_jump: -UNSUPPORTED("75n3w229uzeshyir5i61r1043"); // case maybe_pop_jump: -UNSUPPORTED("6l3m2qx4riktyve4e2l0wh9fe"); // case jump: -UNSUPPORTED("dnliw06x9ef4nef4vszyc6y2o"); // case dummy_failure_jump: -UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("c286v7bq7t229rlti3rgsn6i4"); // if (is_a_jump_n) -UNSUPPORTED("70d9iq4l9znncby73z47xsgqd"); // p1 += 2; -UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; -UNSUPPORTED("cyzkq50b2b248lxpi6lj66jqs"); // default: -UNSUPPORTED("2oxjzlotqn0ba3akkxgs9h02q"); // /* do nothing */ ; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("8yasklhrgy6q7ca1rahwnp80l"); // p1 += mcnt; -UNSUPPORTED("efql51mwt6tl2tkzt0wc69svs"); // /* If the next operation is a jump backwards in the pattern -UNSUPPORTED("b1jwyhb9r9kdtn75700ivpm08"); // to an on_failure_jump right before the start_memory -UNSUPPORTED("32ioduqtcldpe0p955ukfx3zq"); // corresponding to this stop_memory, exit from the loop -UNSUPPORTED("7u1pbravuknawsh6n44eiljij"); // by forcing a failure after pushing on the stack the -UNSUPPORTED("1rtxd5d0unekapkzuv0h8bfs9"); // on_failure_jump's jump in the pattern, and d. */ -UNSUPPORTED("49ilcm43sqxuhnrflxjzpkyrz"); // if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump -UNSUPPORTED("bbntf9gewbymuo5dr9q61l4ad"); // && (re_opcode_t) p1[3] == start_memory && p1[4] == *p) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("82lu6y87gmwdhb71nwh4nyhlo"); // /* If this group ever matched anything, then restore -UNSUPPORTED("2hafp02wsznqsqyi5m15pval5"); // what its registers were before trying this last -UNSUPPORTED("d7lxjfsfhmoewr3xbgu83ccq6"); // failed match, e.g., with `(a*)*b' against `ab' for -UNSUPPORTED("2a1hjbfps60tel0gx3rexgyr7"); // regstart[1], and, e.g., with `((a*)*(b*)*)*' -UNSUPPORTED("c9ye99yclkdsse5qxjva6xyqv"); // against `aba' for regend[3]. -UNSUPPORTED("dwcg6me58csfjm6h83aoldo1o"); // Also restore the registers for inner groups for, -UNSUPPORTED("ainjqejclhkthdqm7hwkfddil"); // e.g., `((a*)(b*))*' against `aba' (register 3 would -UNSUPPORTED("8je91go3933r1lpui4r55qp19"); // otherwise get trashed). */ -UNSUPPORTED("1eohn7q2w1elvkijli82m25w4"); // if (((reg_info[*p]).bits.ever_matched_something)) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("bah7hcsvx8y54udzheryy1hzy"); // unsigned r; -UNSUPPORTED("8akg97mqbnr924ugno750b17t"); // ((reg_info[*p]).bits.ever_matched_something) = 0; -UNSUPPORTED("7m9djhctqynaualhx1nqdnjc0"); // /* Restore this and inner groups' (if any) registers. */ -UNSUPPORTED("7js4crblmtp6bs951tlz5pibu"); // for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1); -UNSUPPORTED("41t6k9ezn45tjk4rj4o95hvw7"); // r++) -UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { -UNSUPPORTED("89r32r5193oexr1uoui24rp55"); // regstart[r] = old_regstart[r]; -UNSUPPORTED("ie5lviszvuyotv6i5dfa0pe5"); // /* xx why this test? */ -UNSUPPORTED("caayksps71ouk9rtbgpk336bb"); // if (old_regend[r] >= regstart[r]) -UNSUPPORTED("13lqnupq8b5xodzv3xff3oze1"); // regend[r] = old_regend[r]; -UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("3aju47l7l855mt7l00l7xg11q"); // p1++; -UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("a9p5b9oxka3gxpe3wgzvhfj4b"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p1 + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (d); ; ; } while (0); -UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("2wofa1c2dglau2ufwmcabib0n"); // /* Move past the register number and the inner group count. */ -UNSUPPORTED("8mazj3o2k4ts6oo83xpc0clf6"); // p += 2; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("7ckwgnb7aasatvtyteljdqc2k"); // /* \ has been turned into a `duplicate' command which is -UNSUPPORTED("dmy8z2x1ttnsvz6kx6l9j4rtv"); // followed by the numeric value of as the register number. */ -UNSUPPORTED("9zkejga7r0tbainhrb6zuw9os"); // case duplicate: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("27u228yvq9k655bp1tq40v02i"); // register const char *d2, *dend2; -UNSUPPORTED("bq38n54ifn0fjxun9mtdpyxkj"); // int regno = *p++; /* Get which register to match against. */ -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("91m4oa28hi3m5f5icw5pumfab"); // /* Can't back reference a group which we've never matched. */ -UNSUPPORTED("9r6debcfgkrh9r4029g0p2tsz"); // if (((regstart[regno]) == (®_unset_dummy)) || ((regend[regno]) == (®_unset_dummy))) -UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; -UNSUPPORTED("dng36k157gcr0rr6l2hysesr7"); // /* Where in input to try to start matching. */ -UNSUPPORTED("209civ9l0k19m94b62pp4080r"); // d2 = regstart[regno]; -UNSUPPORTED("eexsdzuwnhjynwkc8g0u6hnwm"); // /* Where to stop matching; if both the place to start and -UNSUPPORTED("bup7nhzrolgesclm7ac7j3pke"); // the place to stop matching are in the same string, then -UNSUPPORTED("8kg60w180bvkgrv4dgbrd491u"); // set to the place to stop, otherwise, for now have to use -UNSUPPORTED("9tumayloc0nncf60m1sfzkjhl"); // the end of the first string. */ -UNSUPPORTED("9dfy4gfwxkdnc83mqwy6mg4hw"); // dend2 = (((size1 && string1 <= (regstart[regno]) && (regstart[regno]) <= string1 + size1) -UNSUPPORTED("c0t5y6icuv24moevxaqu2h4zx"); // == (size1 && string1 <= (regend[regno]) && (regend[regno]) <= string1 + size1)) -UNSUPPORTED("ebo6m6ze117x4ioed7wvc6omz"); // ? regend[regno] : end_match_1); -UNSUPPORTED("1nx31c51hb376ceydwsae35jq"); // for (;;) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("6bj5pjn8kja9qic9u7at0g4va"); // /* If necessary, advance to next segment in register -UNSUPPORTED("8qcz04tc3rbrg7kjuf9xezhks"); // contents. */ -UNSUPPORTED("braae8dlluapap8zd5o6ihc1u"); // while (d2 == dend2) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("47ijn5xqcu6vix8sa88nyj6g3"); // if (dend2 == end_match_2) break; -UNSUPPORTED("5wcf12qydzz346az1zp6sbphr"); // if (dend2 == regend[regno]) break; -UNSUPPORTED("36wliwq9pfherfng9wg1z2930"); // /* End of string1 => advance to string2. */ -UNSUPPORTED("97sxan60njmrt6lx6dhy0t35a"); // d2 = string2; -UNSUPPORTED("yedssw060ohvbc7klzkqa7ky"); // dend2 = regend[regno]; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("a3i8zhtb0tt9m1ilvwxr0yry6"); // /* At end of register contents => success */ -UNSUPPORTED("9zvbjhvrz5uc7k4zmhbwdfvr6"); // if (d2 == dend2) break; -UNSUPPORTED("afb4xzyk6gdokmo985hyfw8c9"); // /* If necessary, advance to next segment in data. */ -UNSUPPORTED("ey839udf98rupfliazw91iwf4"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("ecd7rg6163cvfm8v1rtt0jtpb"); // /* How many characters left in this segment to match. */ -UNSUPPORTED("az6v71e6bfrxdlm5zelm70aji"); // mcnt = dend - d; -UNSUPPORTED("96v7a28oxrisen4iasx18f02h"); // /* Want how many consecutive characters we can match in -UNSUPPORTED("1iug3sdumn7i4romdq11ea8gc"); // one shot, so, if necessary, adjust the count. */ -UNSUPPORTED("k5cjd1jaihwrz80htbwhcz1k"); // if (mcnt > dend2 - d2) -UNSUPPORTED("8sygn6fz8wegxhzaxpof9nfdy"); // mcnt = dend2 - d2; -UNSUPPORTED("cq9zkdhm0s7gm3of2ojllwxev"); // /* Compare that many; failure if mismatch, else move -UNSUPPORTED("cwb3st7nyauiej3bt6si7nk"); // past them. */ -UNSUPPORTED("8yrz36iknz8u14syi843ya22w"); // if (translate -UNSUPPORTED("1csum7liyqa4kjt5vzjgwl055"); // ? bcmp_translate (d, d2, mcnt, translate) -UNSUPPORTED("2mfklscfw9ja01nrbw8irsd34"); // : bcmp (d, d2, mcnt)) -UNSUPPORTED("3cl1in74qmmbb26vs4qw3mcuv"); // goto fail; -UNSUPPORTED("ejde9u9b01jxuvulwaibu252x"); // d += mcnt, d2 += mcnt; -UNSUPPORTED("egy6z5e2fbinnxr0gts3znpv4"); // /* Do this because we've match some characters. */ -UNSUPPORTED("b1re2muw6n42ivurg658dizzz"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("if344u3tlfkgjfkh9bwgpq8a"); // /* begline matches the empty string at the beginning of the string -UNSUPPORTED("ezwcv5j2ponvqm9xcbipsht8u"); // (unless `not_bol' is set in `bufp'), and, if -UNSUPPORTED("5elzkvlxjqh3r6z34t1j5y21o"); // `newline_anchor' is set, after newlines. */ -UNSUPPORTED("7zj5ggx1l6hln4ude6h5p4hgw"); // case begline: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("9vfz6wya8x71wz4tl74mnon03"); // if (((d) == (size1 ? string1 : string2) || !size2)) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("5xiy4c6bz8y6xryzgmegy61lb"); // if (!bufp->not_bol) break; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("5vfekfkt5mncyuqxnse5u327k"); // else if (d[-1] == '\n' && bufp->newline_anchor) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("cmda966opn67h0f3cl7lk5oaa"); // /* In all other cases, we fail. */ -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("6ab5d4s6v9zc6g10652lkpfxb"); // /* endline is the dual of begline. */ -UNSUPPORTED("8pqai98vstdak51ot078dn1ut"); // case endline: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ruaqj050rr07ll8b70yjadcf"); // if (((d) == end2)) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("3zg6eo8m095cishibd0umbzff"); // if (!bufp->not_eol) break; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("1n7gdt1mnk1dwyec8i0pk3vkx"); // /* We have to ``prefetch'' the next character. */ -UNSUPPORTED("67ozwfkze7vtbzog58zzkcvh7"); // else if ((d == end1 ? *string2 : *d) == '\n' -UNSUPPORTED("8whjciz1pz1blross2jpqly5f"); // && bufp->newline_anchor) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("1aa2xpr66utsdr273h0vay7rp"); // /* Match at the very beginning of the data. */ -UNSUPPORTED("889sq08u5lsi3c6y2z7adu8ex"); // case begbuf: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("9vfz6wya8x71wz4tl74mnon03"); // if (((d) == (size1 ? string1 : string2) || !size2)) -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("4z8rppnva31fi9mwshpp8kxvw"); // /* Match at the very end of the data. */ -UNSUPPORTED("cx4ezn3s02koh0pq7idm2xvxc"); // case endbuf: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ruaqj050rr07ll8b70yjadcf"); // if (((d) == end2)) -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("3wki3bf5yoz1vc1fprg2lncya"); // /* on_failure_keep_string_jump is used to optimize `.*\n'. It -UNSUPPORTED("pql30urhclx8h7lod7pnj4ip"); // pushes NULL as the value for the string on the stack. Then -UNSUPPORTED("dzwsld9trwycslc5k99jr9muh"); // `pop_failure_point' will keep the current value for the -UNSUPPORTED("3xl98pouep4b4iwcgj8vvabvc"); // string, instead of restoring it. To see why, consider -UNSUPPORTED("8wxp3mbfp1jdn6hlq6djbv5gj"); // matching `foo\nbar' against `.*\n'. The .* matches the foo; -UNSUPPORTED("djf7x62cv5c4kahfoqaehjrk9"); // then the . fails against the \n. But the next thing we want -UNSUPPORTED("4n6sotfrko2ssux5cwdwroytq"); // to do is match the \n against the \n; if we restored the -UNSUPPORTED("9gm1fhuma2g5732wasioh293h"); // string value, we would be back at the foo. -UNSUPPORTED("9pocj5oo194wevmdb2pun171k"); // Because this is used only in specific cases, we don't need to -UNSUPPORTED("22xw129jbwcohdom5on8mruf1"); // check all the things that `on_failure_jump' does, to make -UNSUPPORTED("ov1lrnfw4f23mi84a3odmle4"); // sure the right things get saved on the stack. Hence we don't -UNSUPPORTED("8xgl4y5ygq098dtwrbuwey6gq"); // share its code. The only reason to push anything on the -UNSUPPORTED("by06u3v9h2tr9d1hfpggutrts"); // stack at all is that otherwise we would have to change -UNSUPPORTED("cd2otw100j4q2pgbijt7jkkzt"); // `anychar's code to do something besides goto fail in this -UNSUPPORTED("32dqefvhlxi1u35k3ewta7mrl"); // case; that seems worse than this. */ -UNSUPPORTED("753el6ua6knou432p32d1kbcc"); // case on_failure_keep_string_jump: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("cxpumlm6doboe0ubkx51bqcx1"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("4l5nbs7foacbvjtuv07q72uuo"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) ((void *)0); ; ; } while (0); -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("18mowhc7dokjwwbpjm3c0jjz3"); // /* Uses of on_failure_jump: -UNSUPPORTED("6hohd1mhntprbr29uarcgbh63"); // Each alternative starts with an on_failure_jump that points -UNSUPPORTED("9ltnucad533b0qouy73o7txqh"); // to the beginning of the next alternative. Each alternative -UNSUPPORTED("56exr10nxswdfl6el06yzn1kl"); // except the last ends with a jump that in effect jumps past -UNSUPPORTED("7mx68jjud7wzo6avh55bb818j"); // the rest of the alternatives. (They really jump to the -UNSUPPORTED("9nytxeg7tfysw0cho7phep44z"); // ending jump of the following alternative, because tensioning -UNSUPPORTED("ax1r80aorhdnf7k83i580xkrd"); // these jumps is a hassle.) -UNSUPPORTED("b3w92k7mmdeshyrsyx5j12h3g"); // Repeats start with an on_failure_jump that points past both -UNSUPPORTED("aef21o4yg56obwkotdy9xg0ho"); // the repetition text and either the following jump or -UNSUPPORTED("3wjc6x34irsiejqg1kbgn3iyt"); // pop_failure_jump back to this on_failure_jump. */ -UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: -UNSUPPORTED("c776gsd8agjizu0u6zgrf49u3"); // on_failure: -UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; -UNSUPPORTED("6rhr1dl5qu710655mp1bqo0i6"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; -UNSUPPORTED("f46w21fc8pt03jhpnaepq03um"); // /* If this on_failure_jump comes right before a group (i.e., -UNSUPPORTED("4osoy23qvwvclpht018wy5fe"); // the original * applied to a group), save the information -UNSUPPORTED("bfbi4c30km7bjt8vdpfguqx3b"); // for that group and all inner ones, so that if we fail back -UNSUPPORTED("1ra232qtft0mi461dabhedxp4"); // to this point, the group's information will be correct. -UNSUPPORTED("b2mqhhpsbx6j245sm4leiu3dn"); // For example, in \(a*\)*\1, we need the preceding group, -UNSUPPORTED("6do6go4hsy6lmqykgor4s9ygv"); // and in \(zz\(a*\)b*\)\2, we need the inner group. */ -UNSUPPORTED("enwxe23t405zzw5yadk743a5r"); // /* We can't use `p' to check ahead because we push -UNSUPPORTED("6yxbydq88le4or0xwwq5siqmw"); // a failure point to `p + mcnt' after we do this. */ -UNSUPPORTED("di4spe1yrvg37sczy634usb7k"); // p1 = p; -UNSUPPORTED("816d2v18z6b4clqeuef1am657"); // /* We need to skip no_op's before we look for the -UNSUPPORTED("ch11lyve93ighowv1prcy2j8k"); // start_memory in case this on_failure_jump is happening as -UNSUPPORTED("6qg7rlv2r0m6k4j5x75pimlaa"); // the result of a completed succeed_n, as in \(a\)\{1,3\}b\1 -UNSUPPORTED("978ibng6ccfuidf65t6s6mgq0"); // against aba. */ -UNSUPPORTED("ajcmgk4q2zko19taooby9ydhf"); // while (p1 < pend && (re_opcode_t) *p1 == no_op) -UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; -UNSUPPORTED("6srqj3lww8szsp64bd64yus7k"); // if (p1 < pend && (re_opcode_t) *p1 == start_memory) -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("54s4csu4aujalr4c0swqowr5k"); // /* We have a new highest active register now. This will -UNSUPPORTED("4ig8j5bvaq59fsf9hfdn1q5ys"); // get reset at the start_memory we are about to get to, -UNSUPPORTED("6aatr095mst5lfh4soia9qpg2"); // but we will have saved all the registers relevant to -UNSUPPORTED("2a6e61mk8qy9pwnls9zifuok6"); // this repetition op, as described above. */ -UNSUPPORTED("50t6ewzx8ghn8hjs3qg8z17sc"); // highest_active_reg = *(p1 + 1) + *(p1 + 2); -UNSUPPORTED("bxlrtrilu12d2jxucjuex0vfp"); // if (lowest_active_reg == ((1 << 8) + 1)) -UNSUPPORTED("6li0h0b9p3vauo9vgyypu8fux"); // lowest_active_reg = *(p1 + 1); -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; -UNSUPPORTED("4637n0f945d4uznxowpb1ha4i"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (p + mcnt); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (d); ; ; } while (0); -UNSUPPORTED("d1pumbibe8xz2i7gr1wj6zdak"); // break; -UNSUPPORTED("ezli68qam5jhg7sd2n0z30pa1"); // /* A smart repeat ends with `maybe_pop_jump'. -UNSUPPORTED("5d7n4fkgg5a38sjzmkhaoa8hl"); // We change it to either `pop_failure_jump' or `jump'. */ -UNSUPPORTED("d7ziafib9p2sa0rqh34hv3hwj"); // case maybe_pop_jump: -UNSUPPORTED("cxpumlm6doboe0ubkx51bqcx1"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("4i49ynnzyaszs2krb0aw4uqa0"); // register unsigned char *p2 = p; -UNSUPPORTED("8b4raalmwo7274mwsk0kcdlbp"); // /* Compare the beginning of the repeat with what in the -UNSUPPORTED("6ox8v5j7jznz10vsvok39lx6h"); // pattern follows its end. If we can establish that there -UNSUPPORTED("1qm38p3f1vojknhw7v973ela0"); // is nothing that they would both match, i.e., that we -UNSUPPORTED("2wnj0iemov40iryz5lsfp3zi5"); // would have to backtrack because of (as in, e.g., `a*a') -UNSUPPORTED("9zp4vdc61w9qqpto61p74x8x0"); // then we can change to pop_failure_jump, because we'll -UNSUPPORTED("cdtoaohseagznp9y8u81kbpru"); // never have to backtrack. -UNSUPPORTED("63w8z2r32mq0x6xowpwds9vjb"); // This is not true in the case of alternatives: in -UNSUPPORTED("a98qcnnc9pzff1gk8kfj32f1i"); // `(a|ab)*' we do need to backtrack to the `ab' alternative -UNSUPPORTED("errex35giie09vkvn4e9fe4zk"); // (e.g., if the string was `ab'). But instead of trying to -UNSUPPORTED("1147ja0a6sr58jg8z4hjs19ji"); // detect that here, the alternative has put on a dummy -UNSUPPORTED("64mr7nyur7w7m85zrdx15fqli"); // failure point which is what we will end up popping. */ -UNSUPPORTED("amvyb0hgs5zfdebpexntlvwfd"); // /* Skip over open/close-group commands. -UNSUPPORTED("2lx4i6yu241papyqk442d7gf1"); // If what follows this loop is a ...+ construct, -UNSUPPORTED("1pvxwmxmctfoyisu33wn2tgym"); // look at what begins its body, since we will have to -UNSUPPORTED("8tbga6r8dqnryesfg5bmccsge"); // match at least one of that. */ -UNSUPPORTED("9nuuiq5ff5vu3ehueiarndup8"); // while (1) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("2dak6ikzsj12jm54tispfishb"); // if (p2 + 2 < pend -UNSUPPORTED("7yw7v0svrd5pmn1jcqlc4e3u1"); // && ((re_opcode_t) *p2 == stop_memory -UNSUPPORTED("2yx468hmjjmhvuzxlu2jyltzc"); // || (re_opcode_t) *p2 == start_memory)) -UNSUPPORTED("4hgr2e6ls0cizy5kicpo9i13a"); // p2 += 3; -UNSUPPORTED("1yuf55oz0qpsj5aqp5h5fpr42"); // else if (p2 + 6 < pend -UNSUPPORTED("bw2og6j9w6s47jv3rzusqgra5"); // && (re_opcode_t) *p2 == dummy_failure_jump) -UNSUPPORTED("6ennx95kxfn7n27tkdpz2xiun"); // p2 += 6; -UNSUPPORTED("a4hbs6luulhltmygux2zimbcc"); // else -UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("d2fh23u27kss8fzwuwtp0p6sf"); // p1 = p + mcnt; -UNSUPPORTED("90n7ynf24mp5fmsi2nznee8aj"); // /* p1[0] ... p1[2] are the `on_failure_jump' corresponding -UNSUPPORTED("4vso45anytez4cjlpkfnzk1ul"); // to the `maybe_finalize_jump' of this case. Examine what -UNSUPPORTED("b0juiqz00zb3viboquom9nj05"); // follows. */ -UNSUPPORTED("66jpg0e4bmb6ltcah5ku9m5wf"); // /* If we're at the end of the pattern, we can change. */ -UNSUPPORTED("5xkeog52k82g0w44z3mfurqp7"); // if (p2 == pend) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("e25zbxyj1st10oslj3hfvjw9a"); // /* Consider what happens when matching ":\(.*\)" -UNSUPPORTED("1qa8sj8fsagixe1jkmm9j7s4u"); // against ":/". I don't really understand this code -UNSUPPORTED("bawpwuc0i5d4c4v2365l038h3"); // yet. */ -UNSUPPORTED("5zj568kdmyc87wog3sgbfzsd2"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("9fy78dg2q1uu4c2t1zsyaestf"); // ; -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("2wredhzqyuxjyd1qy0vxr02p6"); // else if ((re_opcode_t) *p2 == exactn -UNSUPPORTED("5439ysolyacwtm0iroxxof9ja"); // || (bufp->newline_anchor && (re_opcode_t) *p2 == endline)) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("6ailij025yibbye551dmh9is0"); // register unsigned char c -UNSUPPORTED("68vch1mgcskmseij0qhms2rl9"); // = *p2 == (unsigned char) endline ? '\n' : p2[2]; -UNSUPPORTED("1yo80wyjqsiw1t17we6c8a6gr"); // if ((re_opcode_t) p1[3] == exactn && p1[5] != c) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("agl6h59gsalgrbxzq7fk4n0vn"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("czvlqjtrpajrtul735yf6cmfz"); // ; -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("exal5xqo67c7zaxk3gaoj3n0i"); // else if ((re_opcode_t) p1[3] == charset -UNSUPPORTED("e0kae24mabhgjjynwkmainteq"); // || (re_opcode_t) p1[3] == charset_not) -UNSUPPORTED("3trws9zymzc11hz9w8m2b4fl9"); // { -UNSUPPORTED("do2ngnlega9hi7rlbi6pwnera"); // int not = (re_opcode_t) p1[3] == charset_not; -UNSUPPORTED("5f33xcwhul4d1gb3t7lj27aam"); // if (c < (unsigned char) (p1[4] * 8) -UNSUPPORTED("78cradlgzgss8hx6xr31uun4d"); // && p1[5 + c / 8] & (1 << (c % 8))) -UNSUPPORTED("7n22hwonng6xigiqxvbruxroo"); // not = !not; -UNSUPPORTED("dpe5oc4fbt7r8mffvrkacad7a"); // /* `not' is equal to 1 if c would match, which means -UNSUPPORTED("bqyj06a9kascwc6t354y5gh61"); // that we can't change to pop_failure_jump. */ -UNSUPPORTED("z5vz9r2m8zndo9aeyvz3w07z"); // if (!not) -UNSUPPORTED("el767oi7fhlc4apdbx8dsvnk6"); // { -UNSUPPORTED("6aq9gjy2dwkpua80yonp1njtn"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("4eruune9bfskm05zy5ipimp2s"); // ; -UNSUPPORTED("b5m0ttlk23avgs4i47o8lbzg1"); // } -UNSUPPORTED("2v7ai112w6nt2xgs1gbzo22oe"); // } -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3ra1229golg94oou1y8zbvkkp"); // else if ((re_opcode_t) *p2 == charset) -UNSUPPORTED("9aq2ft2quyeattze0cwemwweo"); // { -UNSUPPORTED("auubej4lkmydm7wamwki5zgyp"); // if ((re_opcode_t) p1[3] == exactn -UNSUPPORTED("6zebpplfmgrbk07lmll1yrrsi"); // && ! ((int) p2[1] * 8 > (int) p1[4] -UNSUPPORTED("9wp8kzivj0sustlx4ftn0l36h"); // && (p2[2 + p1[4] / 8] -UNSUPPORTED("eyu63dq7uwiiwzvudc2gopty4"); // & (1 << (p1[4] % 8))))) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("8azfcbpc7h84lhyicbrd2yjqp"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("a6r7lto035pp3gvk1bdixang2"); // ; -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("dcwjh55x5f2wjp4ezmipdxn2b"); // else if ((re_opcode_t) p1[3] == charset_not) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("7gajjg3j6bbfnu7tfpv8vd1he"); // int idx; -UNSUPPORTED("dxd6z46rfort3j8amp5v1n0wb"); // /* We win if the charset_not inside the loop -UNSUPPORTED("5r3347hzknz05fu925j2m38f9"); // lists every character listed in the charset after. */ -UNSUPPORTED("drl6mtwfmrng8pxbu6xzqfb18"); // for (idx = 0; idx < (int) p2[1]; idx++) -UNSUPPORTED("9gmmtilb47lw5pq4j4sejrbj"); // if (! (p2[2 + idx] == 0 -UNSUPPORTED("74zwa83c3pcunsiarfams873p"); // || (idx < (int) p1[4] -UNSUPPORTED("3ytcwj384elha7evsxusun8r2"); // && ((p2[2 + idx] & ~ p1[5 + idx]) == 0)))) -UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; -UNSUPPORTED("etst8xjhq076idz2ki2lkc3kl"); // if (idx == p2[1]) -UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { -UNSUPPORTED("gi02bd0hnoko53b18tp6muxp"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("7ia8gpv947o65avjiwl96gln5"); // ; -UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("bfp6jy3jhgcx1qlqs2ugtk84o"); // else if ((re_opcode_t) p1[3] == charset) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("7gajjg3j6bbfnu7tfpv8vd1he"); // int idx; -UNSUPPORTED("3gf62oi7ics60q83j50ht4j54"); // /* We win if the charset inside the loop -UNSUPPORTED("axtgnnoh8n7p39m9fbbxipnxm"); // has no overlap with the one after the loop. */ -UNSUPPORTED("6fsyvlzx4skvg5xqoif9n2bli"); // for (idx = 0; -UNSUPPORTED("6d7whyux0667vbtt3aoh8j8mc"); // idx < (int) p2[1] && idx < (int) p1[4]; -UNSUPPORTED("d4o8f5f71ai8ygtqvrs77062h"); // idx++) -UNSUPPORTED("b029onao79pzr7fwgf9oboalu"); // if ((p2[2 + idx] & p1[5 + idx]) != 0) -UNSUPPORTED("1lzsscwayr2ygeagix6ouorzi"); // break; -UNSUPPORTED("6whqfrc9hpkwoqoqk2cpgstzz"); // if (idx == p2[1] || idx == p1[4]) -UNSUPPORTED("1fi5w21ki1vo1jwyr4xwgm27n"); // { -UNSUPPORTED("gi02bd0hnoko53b18tp6muxp"); // p[-3] = (unsigned char) pop_failure_jump; -UNSUPPORTED("7ia8gpv947o65avjiwl96gln5"); // ; -UNSUPPORTED("bf03xtomlwkahoqno8ua4cbpc"); // } -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("13jcwbk3vyfh9xrmwi5hbe7so"); // } -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("dtbtyud0b7t5ily0nm0qkjrov"); // p -= 2; /* Point at relative address again. */ -UNSUPPORTED("9hexwrt0gnjztdabmcy13w96a"); // if ((re_opcode_t) p[-1] != pop_failure_jump) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("ca1ptlw6k6dixmzbwm3a4iusp"); // p[-1] = (unsigned char) jump; -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("578iyred8hniiy6kj99i6zcx7"); // goto unconditional_jump; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("et4hfzxq1ccol7oenwuqop34c"); // /* Note fall through. */ -UNSUPPORTED("evkl6mpyrcnjwer6edp6j9emc"); // /* The end of a simple repeat has a pop_failure_jump back to -UNSUPPORTED("2jcckuegby5tkaf50t6wemnmz"); // its matching on_failure_jump, where the latter will push a -UNSUPPORTED("5971g2j40ktdkl0khlo1gpoy6"); // failure point. The pop_failure_jump takes off failure -UNSUPPORTED("byi3j1ugndbk3u7yo028ikqz3"); // points put on by this pop_failure_jump's matching -UNSUPPORTED("48etkzu6pax8j2rcmbcbd2s1k"); // on_failure_jump; we got through the pattern to here from the -UNSUPPORTED("8f9as95a103nww8jbbn2vx61n"); // matching on_failure_jump, so didn't fail. */ -UNSUPPORTED("6coluo8cd7scxlqwnbvt3jqs5"); // case pop_failure_jump: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("aaykmyayp7k026o2rgh0xnxtt"); // /* We need to pass separate storage for the lowest and -UNSUPPORTED("3w39tfh3tm57hhf0ob12sj5yk"); // highest registers, even though we don't care about the -UNSUPPORTED("angsr7u35nqld9m876d6dx7xq"); // actual values. Otherwise, we will restore only one -UNSUPPORTED("4ixesek08pb5l67pi00fqsriy"); // register from the stack, since lowest will == highest in -UNSUPPORTED("1rzihep5lcgvrl52235a9a2uy"); // `pop_failure_point'. */ -UNSUPPORTED("9m9v5kmsap0mtdznppskik3k"); // active_reg_t dummy_low_reg, dummy_high_reg; -UNSUPPORTED("5z662sre8crmvzwkqdm96nybf"); // unsigned char *pdummy; -UNSUPPORTED("35v2cyfyscndlz7rd41acza4q"); // const char *sdummy; -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("3g97rrgu1b7a7ep0xjxi3013b"); // { s_reg_t this_reg; const unsigned char *string_temp; ; ; ; ; ; ; ; string_temp = fail_stack.stack[--fail_stack.avail].pointer; if (string_temp != (void *)0) sdummy = (const char *) string_temp; ; ; ; pdummy = (unsigned char *) fail_stack.stack[--fail_stack.avail].pointer; ; ; dummy_high_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; -UNSUPPORTED("1zjxjg81gnrzmbjfvorezv23b"); // dummy_low_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; if (1) for (this_reg = dummy_high_reg; this_reg >= -UNSUPPORTED("5y05eeb8zcu1hnp1r7u72wea0"); // dummy_low_reg; this_reg--) { ; reg_info_dummy[this_reg].word = fail_stack.stack[--fail_stack.avail]; ; reg_dummy[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; -UNSUPPORTED("170qj0cyzc65li5h2h8nibj1a"); // reg_dummy[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; } else { for (this_reg = highest_active_reg; this_reg > dummy_high_reg; this_reg--) { reg_info_dummy[this_reg].word.integer = 0; reg_dummy[this_reg] = 0; -UNSUPPORTED("o5cb1sy4lw7ahxhb9ir34ywe"); // reg_dummy[this_reg] = 0; } highest_active_reg = dummy_high_reg; } set_regs_matched_done = 0; ; }; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("et4hfzxq1ccol7oenwuqop34c"); // /* Note fall through. */ -UNSUPPORTED("7jzfafc0e4ysay5587d498v0g"); // unconditional_jump: -UNSUPPORTED("7xijz1d7skix4nbsjyzbkawyz"); // ; -UNSUPPORTED("lbfv20cb4iwb8ilhovngktwp"); // /* Note fall through. */ -UNSUPPORTED("6d0r5m74qtbvaned81fau8l5f"); // /* Unconditionally jump (without popping any failure points). */ -UNSUPPORTED("9a1qj2mhg3oh4ehsjpp4d81on"); // case jump: -UNSUPPORTED("39nxr5mia7bkm0tyl5uoxm1i0"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); /* Get the amount to jump. */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ard612jdkjyh07vvh6p7xec5q"); // p += mcnt; /* Do the jump. */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("6eoc6h9g64ctzuyv0zhwzsp88"); // /* We need this opcode so we can detect where alternatives end -UNSUPPORTED("6m0nust2xxmwf4b1plaq3zle2"); // in `group_match_null_string_p' et al. */ -UNSUPPORTED("7ifq76or69643hqib3roiq9f4"); // case jump_past_alt: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("8efvwfkzonjvc0xgk7ss31fh2"); // goto unconditional_jump; -UNSUPPORTED("eiucbu410s7gabqq4tu08bg8c"); // /* Normally, the on_failure_jump pushes a failure point, which -UNSUPPORTED("ctsxylfj3puoijkz434hjg4jg"); // then gets popped at pop_failure_jump. We will end up at -UNSUPPORTED("7ociskstxycbbkh41vyojlnby"); // pop_failure_jump, also, and with a pattern of, say, `a+', we -UNSUPPORTED("7n2w2rey1jvho9kvlfgz2mero"); // are skipping over the on_failure_jump, so we have to push -UNSUPPORTED("ciwekfad3iz5mqjje8hiorvda"); // something meaningless for pop_failure_jump to pop. */ -UNSUPPORTED("ejqzfph0mmtiqin1hmi981bzm"); // case dummy_failure_jump: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("csbowj5rzwk0s0pqd3urbka91"); // /* It doesn't matter what we push for the string here. What -UNSUPPORTED("4qwf1zf8lyqii172mcx2gdsms"); // the code at `fail' tests is the value for the pattern. */ -UNSUPPORTED("359ip48et2ofltl9170r6hayz"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; } while (0); -UNSUPPORTED("8efvwfkzonjvc0xgk7ss31fh2"); // goto unconditional_jump; -UNSUPPORTED("9mevu5auyy39j4yiw0b2j9h2o"); // /* At the end of an alternative, we need to push a dummy failure -UNSUPPORTED("d2uf5y4x1b2hmxla6j6tlr1rb"); // point in case we are followed by a `pop_failure_jump', because -UNSUPPORTED("rnnvhhghy5jgw4jg1fhty1td"); // we don't want the failure point for the alternative to be -UNSUPPORTED("dkubbc7oql3ppqcdkgq9qelbn"); // popped. For example, matching `(a|ab)*' against `aab' -UNSUPPORTED("8eoqcy9m0jjec5bxgkzbvg1c7"); // requires that we match the `ab' alternative. */ -UNSUPPORTED("9446ac5zvkn7r9yqkh2brh10l"); // case push_dummy_failure: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("c992qnyh0yle1kop18y31trwb"); // /* See comments just above at `dummy_failure_jump' about the -UNSUPPORTED("5synfaxsw4ed7tb33m3un4m4s"); // two zeroes. */ -UNSUPPORTED("359ip48et2ofltl9170r6hayz"); // do { char *destination; s_reg_t this_reg; ; ; ; ; ; ; ; while (((fail_stack).size - (fail_stack).avail) < (((0 ? 0 : highest_active_reg - lowest_active_reg + 1) * 3) + 4)) { if (!((fail_stack).size > (unsigned) (re_max_failures * (5 * 3 + 4)) ? 0 : ((fail_stack).stack = (fail_stack_elt_t *) (destination = (char *) alloca (((fail_stack).size << 1) * sizeof(fail_stack_elt_t)), bcopy ((fail_stack).stack, destination, (fail_stack).size * sizeof(fail_stack_elt_t)), destination), (fail_stack).stack == (void *)0 ? 0 : ((fail_stack).size <<= 1, 1)))) return -2; ; ; } ; if (1) for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; this_reg++) { ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regstart[this_reg]); ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (regend[this_reg]); ; ; ; ; ; ; fail_stack.stack[fail_stack.avail++] = (reg_info[this_reg].word); } ; fail_stack.stack[fail_stack.avail++].integer = (lowest_active_reg); ; fail_stack.stack[fail_stack.avail++].integer = (highest_active_reg); ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; ; fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (0); ; ; } while (0); -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("cch41i8kiaadul49ef19omdn3"); // /* Have to succeed matching what follows at least n times. -UNSUPPORTED("8nb8fa32tplp2rqeqbr6hbn7m"); // After that, handle like `on_failure_jump'. */ -UNSUPPORTED("bdrmz6krrbsihqbsklz1j7d7a"); // case succeed_n: -UNSUPPORTED("84ijqow5jif2ajlhwgtdm91f7"); // do { (mcnt) = *(p + 2) & 0377; (mcnt) += ((((unsigned char) (*((p + 2) + 1))) ^ 128) - 128) << 8; } while (0); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("bgjxyv37kr5myctgyhh94vsi6"); // /* Originally, this is how many times we HAVE to succeed. */ -UNSUPPORTED("4hf4aztjmayqr0tjd70d8mo5l"); // if (mcnt > 0) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("e8xmciie2t26hwi49v7e64msh"); // mcnt--; -UNSUPPORTED("f0uzigopn4c90eyozalab8dsx"); // p += 2; -UNSUPPORTED("3trn8e2hbd5q9a392rlo55y4x"); // do { do { (p)[0] = (mcnt) & 0377; (p)[1] = (mcnt) >> 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("ach1i5r2ivzzx0xwwovmzz94b"); // else if (mcnt == 0) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("8kebz7kyb83b0vya08j7g1h0s"); // p[2] = (unsigned char) no_op; -UNSUPPORTED("7naalvvwte5koasfwykgk8jy7"); // p[3] = (unsigned char) no_op; -UNSUPPORTED("evigqo62udorsulmaru504u73"); // goto on_failure; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("f41u8fntqiy246yy3btlg6w1v"); // case jump_n: -UNSUPPORTED("84ijqow5jif2ajlhwgtdm91f7"); // do { (mcnt) = *(p + 2) & 0377; (mcnt) += ((((unsigned char) (*((p + 2) + 1))) ^ 128) - 128) << 8; } while (0); -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("45q1dm5e8czy7dfyydg2p0qre"); // /* Originally, this is how many times we CAN jump. */ -UNSUPPORTED("c925pgmxvmas9boqu5ovt7bwp"); // if (mcnt) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("e8xmciie2t26hwi49v7e64msh"); // mcnt--; -UNSUPPORTED("bj0025yphmeva1dnjc83w2d82"); // do { (p + 2)[0] = (mcnt) & 0377; (p + 2)[1] = (mcnt) >> 8; } while (0); -UNSUPPORTED("e4kt1tmmevqvy3cbyk6xnznck"); // ; -UNSUPPORTED("578iyred8hniiy6kj99i6zcx7"); // goto unconditional_jump; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("6xb6uhe949e197w3856eykp9b"); // /* If don't have to jump any more, skip over the rest of command. */ -UNSUPPORTED("cunk7vpvzj28y1x4gn62gxpce"); // else -UNSUPPORTED("4g9g5t2dqwtbpe7orh2oew0y9"); // p += 4; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("dmqxgjrlj5ddxj88dw919ujoj"); // case set_number_at: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("5pj3hnv50h51ji8ogyd48xedj"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("d2fh23u27kss8fzwuwtp0p6sf"); // p1 = p + mcnt; -UNSUPPORTED("5pj3hnv50h51ji8ogyd48xedj"); // do { do { (mcnt) = *(p) & 0377; (mcnt) += ((((unsigned char) (*((p) + 1))) ^ 128) - 128) << 8; } while (0); (p) += 2; } while (0); -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("7iin6qwm1f2j9sjclecva957u"); // do { (p1)[0] = (mcnt) & 0377; (p1)[1] = (mcnt) >> 8; } while (0); -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("a8jtmsnmpa4937exo9nhopyyb"); // case wordbound: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("1q5kvi9ggao878ze57ikl6vuk"); // boolean prevchar, thischar; -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("dugr1bul8t32joy65do0a7h6d"); // if (((d) == (size1 ? string1 : string2) || !size2) || ((d) == end2)) -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("8ijy2sdya91ygss8ru67qxx66"); // prevchar = (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1); -UNSUPPORTED("33zxkfaori9emq7m5ssmpr1rd"); // thischar = (re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1); -UNSUPPORTED("79ooz7jacd1z2sfddoakjbcze"); // if (prevchar != thischar) -UNSUPPORTED("7mosouhqcis2k8sbg88g9wol8"); // break; -UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("2jqqzr491mztwr9h8hvs55ja1"); // case notwordbound: -UNSUPPORTED("4vdjxw5o61xlsk38ouw1wsypc"); // { -UNSUPPORTED("1q5kvi9ggao878ze57ikl6vuk"); // boolean prevchar, thischar; -UNSUPPORTED("6mnx06fa3p4n9bhd9htqjy0il"); // ; -UNSUPPORTED("dugr1bul8t32joy65do0a7h6d"); // if (((d) == (size1 ? string1 : string2) || !size2) || ((d) == end2)) -UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; -UNSUPPORTED("8ijy2sdya91ygss8ru67qxx66"); // prevchar = (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1); -UNSUPPORTED("33zxkfaori9emq7m5ssmpr1rd"); // thischar = (re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1); -UNSUPPORTED("79ooz7jacd1z2sfddoakjbcze"); // if (prevchar != thischar) -UNSUPPORTED("1k6xdu198jqq8v2oj3209y50s"); // goto fail; -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("3e08x1y395304nd0y3uwffvim"); // } -UNSUPPORTED("991vlwoc47i8p67jyv2qapdhy"); // case wordbeg: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("721tzo9yoqf86tjgrubhs6lcg"); // if ((re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1) && (((d) == (size1 ? string1 : string2) || !size2) || !(re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1))) -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("65os7te2jc1i6uacyszvy5spd"); // case wordend: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("88nu0py5i2vups7wk3tj8wcf4"); // if (!((d) == (size1 ? string1 : string2) || !size2) && (re_syntax_table[(d - 1) == end1 ? *string2 :(d - 1) == string2 - 1 ? *(end1 - 1) : *(d - 1)] == 1) -UNSUPPORTED("1a0r7hi8r1po69cu5fxqrw4u8"); // && (!(re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1) || ((d) == end2))) -UNSUPPORTED("605r8o1isen77125aqrohs6ac"); // break; -UNSUPPORTED("9s7xl8jyc2iazjidoga852mei"); // goto fail; -UNSUPPORTED("buxp1030z7swkjl42wovj9hxd"); // case wordchar: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("7qor4v3lsqk2266u914165c3w"); // if (!(re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1)) -UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; -UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("7frlpnfuvuphd3bzoulwg4vsr"); // case notwordchar: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("6l2kf5tzbvscsr8vy2bos6ng7"); // while (d == dend) { if (dend == end_match_2) goto fail; d = string2; dend = end_match_2; }; -UNSUPPORTED("7efqv32ta2jk6dolelm1jju58"); // if ((re_syntax_table[(d) == end1 ? *string2 :(d) == string2 - 1 ? *(end1 - 1) : *(d)] == 1)) -UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; -UNSUPPORTED("2o2dzkzmcvnlj1d5ychre7cqo"); // do { if (!set_regs_matched_done) { active_reg_t r; set_regs_matched_done = 1; for (r = lowest_active_reg; r <= highest_active_reg; r++) { ((reg_info[r]).bits.matched_something) = ((reg_info[r]).bits.ever_matched_something) = 1; } } } while (0); -UNSUPPORTED("p26x5fh4zcf5ddyi146lh558"); // d++; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: -UNSUPPORTED("4ga2fk86no0o6rms0bh0zuh4t"); // abort (); -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("9vmmpq61luc1cbbupgqomzlw5"); // continue; /* Successfully executed one pattern command; keep going. */ -UNSUPPORTED("9ndw6vvwoffc31wvgwvgra578"); // /* We goto here if a matching operation fails. */ -UNSUPPORTED("1x3juxkh7bw5pjqp84ugtlmce"); // fail: -UNSUPPORTED("6j68ym8upocfb9ipivxd80ark"); // if (!(fail_stack.avail == 0)) -UNSUPPORTED("92q1l5zz5c3sr57dyzmui3e99"); // { /* A restart point is known. Restore to that state. */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("ayzf7vhhjnbynnstdi6n454f4"); // { s_reg_t this_reg; const unsigned char *string_temp; ; ; ; ; ; ; ; string_temp = fail_stack.stack[--fail_stack.avail].pointer; if (string_temp != (void *)0) d = (const char *) string_temp; ; ; ; p = (unsigned char *) fail_stack.stack[--fail_stack.avail].pointer; ; ; highest_active_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; -UNSUPPORTED("cb1z2qn566ao3l0dqcxiow6dp"); // lowest_active_reg = (active_reg_t) fail_stack.stack[--fail_stack.avail].integer; ; if (1) for (this_reg = highest_active_reg; this_reg >= -UNSUPPORTED("2g0zjfujimxzkr97d2g902f35"); // lowest_active_reg; this_reg--) { ; reg_info[this_reg].word = fail_stack.stack[--fail_stack.avail]; ; regend[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; -UNSUPPORTED("2qadsytv032wa95wodwip6p4p"); // regstart[this_reg] = (const char *) fail_stack.stack[--fail_stack.avail].pointer; ; } else { for (this_reg = highest_active_reg; this_reg > highest_active_reg; this_reg--) { reg_info[this_reg].word.integer = 0; regend[this_reg] = 0; -UNSUPPORTED("1sgt5yrkh4wqtk60f39qhmqyh"); // regstart[this_reg] = 0; } highest_active_reg = highest_active_reg; } set_regs_matched_done = 0; ; }; -UNSUPPORTED("a59azprq7sley0l2fkpr8iplf"); // /* If this failure point is a dummy, try the next one. */ -UNSUPPORTED("27dzlpjb6otkjse11xs60aoen"); // if (!p) -UNSUPPORTED("etjodgz127fwk1r4166wqxg7n"); // goto fail; -UNSUPPORTED("5ezd84f3c0gvxbdr48go3nu9d"); // /* If we failed to the end of the pattern, don't examine *p. */ -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("enro4gwm81mrbyp937vtdmluy"); // if (p < pend) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("5bmgzdh5rp0tqqvuep6upitw5"); // boolean is_a_jump_n = 0; -UNSUPPORTED("6rryel9f7nixy5bn6j0bu5pim"); // /* If failed to a backwards jump that's part of a repetition -UNSUPPORTED("6lkiil4jkazqh0sr2kuzl2a6n"); // loop, need to pop this failure point and use the next one. */ -UNSUPPORTED("3ov8y2d12vzh7q5i3tuyoelxe"); // switch ((re_opcode_t) *p) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("bok1esp1zekmbuklmyk3rk5rx"); // case jump_n: -UNSUPPORTED("38gwuf75sc2x4fup5mqsis4x6"); // is_a_jump_n = 1; -UNSUPPORTED("75n3w229uzeshyir5i61r1043"); // case maybe_pop_jump: -UNSUPPORTED("a8ugqe6z5croeioatypl4otaw"); // case pop_failure_jump: -UNSUPPORTED("6l3m2qx4riktyve4e2l0wh9fe"); // case jump: -UNSUPPORTED("84b1pj26tamclxb0mw5nrxg5g"); // p1 = p + 1; -UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("8ocr60qo89yr0vtq5dj8v1owo"); // p1 += mcnt; -UNSUPPORTED("6cxswairiyne2bjb1dmz6d26z"); // if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) -UNSUPPORTED("ekvd2x03u6gf8ylhhxyq7h336"); // || (!is_a_jump_n -UNSUPPORTED("cw8zksvsbjm3lb2eh5chm46x2"); // && (re_opcode_t) *p1 == on_failure_jump)) -UNSUPPORTED("bkcykqhkoe9lpop9i2qgzu9yp"); // goto fail; -UNSUPPORTED("1fg4xctmq8acy7m0oob45guaz"); // break; -UNSUPPORTED("cyzkq50b2b248lxpi6lj66jqs"); // default: -UNSUPPORTED("2oxjzlotqn0ba3akkxgs9h02q"); // /* do nothing */ ; -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("9g1qr2dsx4ng98gqf2c94flil"); // if (d >= string1 && d <= end1) -UNSUPPORTED("eb6uc0689wgv8mqsvkm38mu5z"); // dend = end_match_1; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("8dc5stfweb0p9s0z2aqvucjp7"); // break; /* Matching at this starting point really fails. */ -UNSUPPORTED("7mfls4p0ojvjkaotqvjflu5ht"); // } /* for (;;) */ -UNSUPPORTED("78m9mze1ip3qflmasmayufoml"); // if (best_regs_set) -UNSUPPORTED("2mqxvuzj0ksk0m6oea72s11bm"); // goto restore_best_regs; -UNSUPPORTED("d7ubx9odh5b3nkaac1zt1epbl"); // do { ; if ((void*) regstart) ((void)0); (void*) regstart = (void *)0; if ((void*) regend) ((void)0); (void*) regend = (void *)0; if ((void*) old_regstart) ((void)0); (void*) old_regstart = (void *)0; if ((void*) old_regend) ((void)0); (void*) old_regend = (void *)0; if ((void*) best_regstart) ((void)0); (void*) best_regstart = (void *)0; if ((void*) best_regend) ((void)0); (void*) best_regend = (void *)0; if ((void*) reg_info) ((void)0); (void*) reg_info = (void *)0; if ((void*) reg_dummy) ((void)0); (void*) reg_dummy = (void *)0; if ((void*) reg_info_dummy) ((void)0); (void*) reg_info_dummy = (void *)0; } while (0); -UNSUPPORTED("2k1latznr3ux22xinn931zwue"); // return -1; /* Failure to match. */ -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 cq5u8rqlecamd29odxfaybq58 -// static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info) -public static Object group_match_null_string_p(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("7fmzghcqs81ua3tkzybmg2t5u"); // group_match_null_string_p(unsigned char **p, -UNSUPPORTED("2800cclhjee5reqodgs0uz6jp"); // unsigned char *end, -UNSUPPORTED("1zudh11exsdumrcui0azslboo"); // register_info_type *reg_info) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; -UNSUPPORTED("dbm120px96ap42fmbuxy5yrj5"); // /* Point to after the args to the start_memory. */ -UNSUPPORTED("bjzqlm993x9boruj0kyeol53l"); // unsigned char *p1 = *p + 2; -UNSUPPORTED("azfsm7rfz2u17du52a0mrfyoq"); // while (p1 < end) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("23a56718i3eh15dzfmbft7w8p"); // /* Skip over opcodes that can match nothing, and return true or -UNSUPPORTED("bbrge68fsb7cmb7ocyo176sox"); // false, as appropriate, when we get to one that can't, or to the -UNSUPPORTED("9nn48i9apg1r7w3mm0yftr0gb"); // matching stop_memory. */ -UNSUPPORTED("3kakimebymsdj9dnon7o0iz9v"); // switch ((re_opcode_t) *p1) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("dpdkpfbea8z9xx4m3qriv0ks"); // /* Could be either a loop or a series of alternatives. */ -UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: -UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; -UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("7ysd5uwx66rnhuasuke0gw17h"); // /* If the next operation is not a jump backwards in the -UNSUPPORTED("chqkvvtqui6nji6p4nqjnxnc0"); // pattern. */ -UNSUPPORTED("clp8uz1ldh06ksh93asr2xtu6"); // if (mcnt >= 0) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("9vuq76qui8wedzsb144fnx8dd"); // /* Go through the on_failure_jumps of the alternatives, -UNSUPPORTED("4k14n5k0mqv0fovwitf4alxzx"); // seeing if any of the alternatives cannot match nothing. -UNSUPPORTED("clkpepohs7tguzyn8ncluhakf"); // The last alternative starts with only a jump, -UNSUPPORTED("49dbeehco6191jqwdivzoevhh"); // whereas the rest start with on_failure_jump and end -UNSUPPORTED("6h3f5m3yjc34la8qgzsbzbcsv"); // with a jump, e.g., here is the pattern for `a|b|c': -UNSUPPORTED("9m5jtr9332etcn1h5ctckidp4"); // /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 -UNSUPPORTED("ck48ad3kd04evjrca6aqzw2g"); // /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 -UNSUPPORTED("6vxw9gryj1dxtxoycbews4j87"); // /exactn/1/c -UNSUPPORTED("3p6xfpp9zbgix9sb10dz2cfhd"); // So, we have to first go through the first (n-1) -UNSUPPORTED("cp25hojwgralgldniw273kdj3"); // alternatives and then deal with the last one separately. */ -UNSUPPORTED("9a0det71z82exleln86167ddq"); // /* Deal with the first (n-1) alternatives, which start -UNSUPPORTED("az6wcsp2m1rn4g8e9nkvxomfi"); // with an on_failure_jump (see above) that jumps to right -UNSUPPORTED("cip7j7cjuis96j2g1tyo2fogf"); // past a jump_past_alt. */ -UNSUPPORTED("am40qiyqgt5i95zqw8gmfb43f"); // while ((re_opcode_t) p1[mcnt-3] == jump_past_alt) -UNSUPPORTED("4hzaau620c4rh7xorkrmxfut7"); // { -UNSUPPORTED("2lhz8ag4lccpzb4fzqq8rviyo"); // /* `mcnt' holds how many bytes long the alternative -UNSUPPORTED("bu59ahle478dwgxifr5a81zrn"); // is, including the ending `jump_past_alt' and -UNSUPPORTED("4xvr333ml76572j0cidzpewwy"); // its number. */ -UNSUPPORTED("6tqlvyqvppynpnuuf3j8ebtlu"); // if (!alt_match_null_string_p (p1, p1 + mcnt - 3, -UNSUPPORTED("3cqjfljoigoe1s3yctsmb49io"); // reg_info)) -UNSUPPORTED("5eqwqroxusaik54ze9ykumu4w"); // return 0; -UNSUPPORTED("1nweigx3aj1nu16la9727cgek"); // /* Move to right after this alternative, including the -UNSUPPORTED("9wjlfe40zk6mcnijph9zw3skr"); // jump_past_alt. */ -UNSUPPORTED("8ocr60qo89yr0vtq5dj8v1owo"); // p1 += mcnt; -UNSUPPORTED("7me1al3m500othjustdgp25s8"); // /* Break if it's the beginning of an n-th alternative -UNSUPPORTED("bsa0fgfj9n2wksuh9f164m03i"); // that doesn't begin with an on_failure_jump. */ -UNSUPPORTED("dxkrs3xxv5uhishofpjt2j6mb"); // if ((re_opcode_t) *p1 != on_failure_jump) -UNSUPPORTED("7vckzntfuo1ibi8r53gsfg8al"); // break; -UNSUPPORTED("dcrlv6lsj26x00kq7h5mb1tft"); // /* Still have to check that it's not an n-th -UNSUPPORTED("ehy9rg3hrcurcpp2ofykuu16t"); // alternative that starts with an on_failure_jump. */ -UNSUPPORTED("3aju47l7l855mt7l00l7xg11q"); // p1++; -UNSUPPORTED("4sq4b65a0bh8lf919g64pqica"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("7i4x97abeu0pj34gwgukjoe00"); // if ((re_opcode_t) p1[mcnt-3] != jump_past_alt) -UNSUPPORTED("bho20rvti5y7pi0voz7il3e40"); // { -UNSUPPORTED("7v0khgzw96aytjvy24azi9yi3"); // /* Get to the beginning of the n-th alternative. */ -UNSUPPORTED("d58xf2hqair572yx3r8pofa0e"); // p1 -= 3; -UNSUPPORTED("b4o9itamiw6ccgnlojl73v2fx"); // break; -UNSUPPORTED("ad3bk4xnx8bgy7plhun3c0mvv"); // } -UNSUPPORTED("2tfish0jog6m8uhlhaokmzvm3"); // } -UNSUPPORTED("j8cvgeroqesrtqchx5ejvs06"); // /* Deal with the last alternative: go back and get number -UNSUPPORTED("b74m2a2e9cgu2v8i8t1u5b2x1"); // of the `jump_past_alt' just before it. `mcnt' contains -UNSUPPORTED("cu400hxya6t1qs6iquuqabq0s"); // the length of the alternative. */ -UNSUPPORTED("26bdoghsw938ft3sgehp275kx"); // do { (mcnt) = *(p1 - 2) & 0377; (mcnt) += ((((unsigned char) (*((p1 - 2) + 1))) ^ 128) - 128) << 8; } while (0); -UNSUPPORTED("3xtanhdz88xahyfe15omt5obd"); // if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info)) -UNSUPPORTED("4h8qa3kxqmv2m8g445wmasnl"); // return 0; -UNSUPPORTED("f53vent58m68zyw39fxmgqbr0"); // p1 += mcnt; /* Get past the n-th alternative. */ -UNSUPPORTED("9euvgwd19qm3deiwc663wdzb0"); // } /* if mcnt > 0 */ -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("3q89uw4g68y7kyiitvliyykpb"); // case stop_memory: -UNSUPPORTED("1qe3sa29ntp5400stzdrrbgdg"); // ; -UNSUPPORTED("8jfkppp2w8v4t5gyqcelvinb4"); // *p = p1 + 2; -UNSUPPORTED("15lnhn427yvuetx9312e81jrg"); // return 1; -UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: -UNSUPPORTED("ir4atstqu8v5sqigzqbwdop4"); // if (!common_op_match_null_string_p (&p1, end, reg_info)) -UNSUPPORTED("bwb5ofkxp13uiyvgbvx70039w"); // return 0; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("55ht7a89z8ua4oqsrrwpapvpg"); // } /* while p1 < end */ -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 azrkydvahepcjvkkru2gdwg0m -// static boolean alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type *reg_info) -public static Object alt_match_null_string_p(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("7z4yu5m5t5mwjca6t6wpfajrj"); // alt_match_null_string_p(unsigned char *p, -UNSUPPORTED("91jh331pn45y9rnhwhm4fiavm"); // unsigned char *end, -UNSUPPORTED("ereoaeyy0phqbbu5cnhfb78ew"); // register_info_type *reg_info) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; -UNSUPPORTED("15ytldlmpb2i6cvtxquvhjs2m"); // unsigned char *p1 = p; -UNSUPPORTED("azfsm7rfz2u17du52a0mrfyoq"); // while (p1 < end) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("3e0wppcum116c0gyks4koglo6"); // /* Skip over opcodes that can match nothing, and break when we get -UNSUPPORTED("ei8lrs2smmn3h63q7rpj9sd0o"); // to one that can't. */ -UNSUPPORTED("3kakimebymsdj9dnon7o0iz9v"); // switch ((re_opcode_t) *p1) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("5n9m839emxb8of9xbq805onsd"); // /* It's a loop. */ -UNSUPPORTED("992rmruvdtrxnk46307iiqyjo"); // case on_failure_jump: -UNSUPPORTED("4hemvstzejy8d3hmd82kukj7v"); // p1++; -UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("28bkn6qebb96emlyztm3kg6wt"); // p1 += mcnt; -UNSUPPORTED("ctqmerohp1f69mb1v1t20jx33"); // break; -UNSUPPORTED("comxch6w0lbi64ejq9m4p0u7o"); // default: -UNSUPPORTED("ir4atstqu8v5sqigzqbwdop4"); // if (!common_op_match_null_string_p (&p1, end, reg_info)) -UNSUPPORTED("bwb5ofkxp13uiyvgbvx70039w"); // return 0; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("eixc7qyme2j14k5zjjghyiexn"); // } /* while p1 < end */ -UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 7hv0wkt4lrkp5whfzuke2qytb -// static boolean common_op_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info) -public static Object common_op_match_null_string_p(Object... arg) { -UNSUPPORTED("etarlz3ybg3wdofiesiw8dwbq"); // static boolean -UNSUPPORTED("8k0shz76dhg3w8h6nz5pjbbu2"); // common_op_match_null_string_p(unsigned char **p, -UNSUPPORTED("28yc2ksklc2vvzt1s5ynbtv0f"); // unsigned char *end, -UNSUPPORTED("6qhd2068gir26rtqc477pm6m1"); // register_info_type *reg_info) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("5rwd4tuvikkbfw1s56awbwtbe"); // int mcnt; -UNSUPPORTED("7n9r83dkya7i0zuq00imgrukd"); // boolean ret; -UNSUPPORTED("7ju59c3dbukl0mz5vgjdoozn5"); // int reg_no; -UNSUPPORTED("87zyg7fzbf21hmhh461pn9zf9"); // unsigned char *p1 = *p; -UNSUPPORTED("qr7u5j2ref5m7rf6d3wqgmps"); // switch ((re_opcode_t) *p1++) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("cf4augtxav7j1ap91bbu3vwy1"); // case no_op: -UNSUPPORTED("30ts9llmyexduvfuq7fczrer8"); // case begline: -UNSUPPORTED("db3lgui4636z7pglgbzpqe54h"); // case endline: -UNSUPPORTED("8fekxuxe035cl7l6pccwsy7fh"); // case begbuf: -UNSUPPORTED("16msnj7hxrfentkv031ct5vc3"); // case endbuf: -UNSUPPORTED("bcaajfoyi3jhpmdxhguo7iofc"); // case wordbeg: -UNSUPPORTED("bkapw3yogqx0sw1ngisv3mb5d"); // case wordend: -UNSUPPORTED("9pqp8vzoeyor0e1x4eqhthk8m"); // case wordbound: -UNSUPPORTED("7hyd3tgheqr4untlslak7uheb"); // case notwordbound: -UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; -UNSUPPORTED("1olrmh5xaxc4lppwfnwemvaej"); // case start_memory: -UNSUPPORTED("4rjnecf4q32xuk4ie6vozpkfh"); // reg_no = *p1; -UNSUPPORTED("cf8srqrmhz47tb7zdgoe9ufhv"); // ; -UNSUPPORTED("eluoqmhl3j8dyk8hyv680sy72"); // ret = group_match_null_string_p (&p1, end, reg_info); -UNSUPPORTED("8hm5umlf6osua8zn0w4y735nh"); // /* Have to set this here in case we're checking a group which -UNSUPPORTED("8xeab9le3ct3b2q7y6ly9yrhh"); // contains a group and a back reference to it. */ -UNSUPPORTED("5kozscfkat4mdav2anbiib5hw"); // if (((reg_info[reg_no]).bits.match_null_string_p) == 3) -UNSUPPORTED("7qym75wzdha4x8u9v6fik2mwy"); // ((reg_info[reg_no]).bits.match_null_string_p) = ret; -UNSUPPORTED("4cj58wdjt8jr4gsngmucb56o0"); // if (!ret) -UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; -UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; -UNSUPPORTED("608rfpgf7ytuxs7hkgnig1by5"); // /* If this is an optimized succeed_n for zero times, make the jump. */ -UNSUPPORTED("9agy5bj4opmh2vksf6lpzm8cd"); // case jump: -UNSUPPORTED("9ngggpjqcpnq88nnkxr6y7vpq"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("1fxhzdbiknha03fye9yen0bje"); // if (mcnt >= 0) -UNSUPPORTED("blqj2uomfewkrosqhn5f7bu73"); // p1 += mcnt; -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; -UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; -UNSUPPORTED("e7ahhsjjo9f2hw3bbtucupqlw"); // case succeed_n: -UNSUPPORTED("9gimh1u1p2gmf0q5weiqpbbop"); // /* Get to the number of times to succeed. */ -UNSUPPORTED("1xi9qxsoaehueyjhabvspqapk"); // p1 += 2; -UNSUPPORTED("9ngggpjqcpnq88nnkxr6y7vpq"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("1ju62vxdlb0sw55v80s2h9p8i"); // if (mcnt == 0) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("9o2tf6im70km8pb1v0mz4tbhc"); // p1 -= 4; -UNSUPPORTED("18pz18zbmozo48uq20alb8ok5"); // do { do { (mcnt) = *(p1) & 0377; (mcnt) += ((((unsigned char) (*((p1) + 1))) ^ 128) - 128) << 8; } while (0); (p1) += 2; } while (0); -UNSUPPORTED("28bkn6qebb96emlyztm3kg6wt"); // p1 += mcnt; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; -UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; -UNSUPPORTED("8qjtjs80wrz4f6y4td1b7mvma"); // case duplicate: -UNSUPPORTED("asaad7roragv1dquu2i7eek6v"); // if (!((reg_info[*p1]).bits.match_null_string_p)) -UNSUPPORTED("9co1titw8ibive55ugr6yfqa4"); // return 0; -UNSUPPORTED("dtx9szdvwh3uhziubh9zvgbk5"); // break; -UNSUPPORTED("75h4k3rjfi85b2x98vw0ydipc"); // case set_number_at: -UNSUPPORTED("4n2daij5pdw7lao7n4sjeg0jt"); // p1 += 4; -UNSUPPORTED("p0mt8wznalavjdm44ot4ykl7"); // default: -UNSUPPORTED("7clvngmkw0ra8af8a3iq45vx"); // /* All other opcodes mean we cannot match the empty string. */ -UNSUPPORTED("7opo20y2y6rg5i89ocvk6qi3c"); // return 0; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("7aoui9hygj5j6kdd0rxq44xxu"); // *p = p1; -UNSUPPORTED("3tcgz4dupb6kw5tdk7n3pca2l"); // return 1; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 bmn9h3qza6i9e7dqjjfrybinz -// static int bcmp_translate(const char *s1, const char *s2, register int len, char * translate) -public static Object bcmp_translate(Object... arg) { -UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int -UNSUPPORTED("49tjvn2d5kzof9i3764qd8gth"); // bcmp_translate(const char *s1, -UNSUPPORTED("5uinwhadus9kwopd7lyrqnv1a"); // const char *s2, -UNSUPPORTED("cmbl8wi47y4b1fybqcgqp3cad"); // register int len, -UNSUPPORTED("buglwifdxboeujcjzksjh6swn"); // char * translate) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("1ugbvzngjn5o1kzerkwa4adyp"); // register const unsigned char *p1 = (const unsigned char *) s1; -UNSUPPORTED("180lhbq291ugus1sv6zq5b3l5"); // register const unsigned char *p2 = (const unsigned char *) s2; -UNSUPPORTED("6wkqjlkf1iustuo36c77rrlrr"); // while (len) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("ezhykxoqbj0p9ighugfp2pi29"); // if (translate[*p1++] != translate[*p2++]) return 1; -UNSUPPORTED("bzd5vvu7ht1mg1wbv21csikm0"); // len--; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 34ah0o8fvtlfnsffbxiyqyidp -// const char * re_compile_pattern(const char *pattern, size_t length, struct re_pattern_buffer *bufp) -public static Object re_compile_pattern(Object... arg) { -UNSUPPORTED("6j2ty6zxx5788lqe504lttmv9"); // const char * -UNSUPPORTED("840rb5ffowq19aqwebzlrs0ix"); // re_compile_pattern(const char *pattern, -UNSUPPORTED("dl8tq4y4w9kpglxq4nad9nbg9"); // size_t length, -UNSUPPORTED("aoahpx5nic1p28er7zbeilibx"); // struct re_pattern_buffer *bufp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("3e5irvh3tz7ehf2px38xbca06"); // reg_errcode_t ret; -UNSUPPORTED("5e5qu4o19kt10axby5ksjp1wz"); // /* GNU code is written to assume at least RE_NREGS registers will be set -UNSUPPORTED("aj16ee11rx90k6v260pcrptdx"); // (and at least one extra will be -1). */ -UNSUPPORTED("45osi16xhss2jxm7u3qpsz7c8"); // bufp->regs_allocated = 0; -UNSUPPORTED("1s5igzhlf8kjprjkw59u0qgie"); // /* And GNU code determines whether or not to get register information -UNSUPPORTED("4guz1aey6odyu4c6y9tmn7zks"); // by passing null for the REGS argument to re_match, etc., not by -UNSUPPORTED("52atj9kiaa2ty4xp5v9tsxd36"); // setting no_sub. */ -UNSUPPORTED("bbp8v34kk2eq5jyypmrxegzfj"); // bufp->no_sub = 0; -UNSUPPORTED("9zh94yub2h9x6jb5ygl7zj9j3"); // /* Match anchors at newline. */ -UNSUPPORTED("e5hvlkcul9024me3za5w0z09"); // bufp->newline_anchor = 1; -UNSUPPORTED("f3zeg0ozvbzdxvagvz40uveju"); // ret = regex_compile (pattern, length, re_syntax_options, bufp); -UNSUPPORTED("2ymc69pz5pg0nhr5joxv3v743"); // if (!ret) -UNSUPPORTED("4mszslwsjcaxojerluqjpsu2v"); // return (void *)0; -UNSUPPORTED("d6waz7r04hy6vrqylyux3566y"); // return (re_error_msgid[(int) ret]); -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 ark6qnryn24fu1bsbt5806lp -// int regcomp(regex_t *preg, const char *pattern, int cflags) -public static Object regcomp(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("blyavrrspx8u7mmx6skbsrpuy"); // regcomp(regex_t *preg, -UNSUPPORTED("ez93viyirx32wiwx9ilmwnk2u"); // const char *pattern, -UNSUPPORTED("s47pwvnf26eqviz0566rtafr"); // int cflags) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("3e5irvh3tz7ehf2px38xbca06"); // reg_errcode_t ret; -UNSUPPORTED("arhekyz17wtkt6jcym8vpwl49"); // reg_syntax_t syntax -UNSUPPORTED("cbdjhw8vkpou2zuaqsu38y9nq"); // = (cflags & 1) ? -UNSUPPORTED("79wzspap1pncga08fi5fl45p3"); // ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((((unsigned long int) 1) << 1) << 1) << 1) | ((((((unsigned long int) 1) << 1) << 1) << 1) << 1) | ((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) : ((((((unsigned long int) 1) << 1) << 1) | ((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | (((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) | ((((((((((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1)) | (((unsigned long int) 1) << 1)); -UNSUPPORTED("2c2dfk6a0ejxysnnaajue8m3p"); // /* regex_compile will allocate the space for the compiled pattern. */ -UNSUPPORTED("ciyvseirt32x5s8n7w8wi9s8b"); // preg->buffer = 0; -UNSUPPORTED("b766kips3z6tm9tifbomnvtmy"); // preg->allocated = 0; -UNSUPPORTED("2ne52scg87du6fvmgx4iz1ysx"); // preg->used = 0; -UNSUPPORTED("dxwa3e8lqasfevebnvit8vz60"); // /* Don't bother to use a fastmap when searching. This simplifies the -UNSUPPORTED("d5umtgupwg9d4iorhfyjyv8h5"); // REG_NEWLINE case: if we used a fastmap, we'd have to put all the -UNSUPPORTED("ci8pjdo3b21gzu9zuu8df58su"); // characters after newlines into the fastmap. This way, we just try -UNSUPPORTED("b5ux13ie7uoiwgtxbhqxccoi6"); // every character. */ -UNSUPPORTED("57t8as5xu3zastwhuvl9x5qvx"); // preg->fastmap = 0; -UNSUPPORTED("enpzhkdq6ocdhen3xvl8ye5na"); // if (cflags & (1 << 1)) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("nujvj3hueebzfkhe2zarvfil"); // unsigned i; -UNSUPPORTED("1pg69zbhom0cik7h8kn6t7y3g"); // preg->translate -UNSUPPORTED("4nsrzyk2btcgmsdqjm2ar3vro"); // = (char *) malloc (256 -UNSUPPORTED("121bcje0610pzlltu9346d7c4"); // * sizeof (*(char *)0)); -UNSUPPORTED("bg80cnygjx78pa8v3kgmb63z4"); // if (preg->translate == (void *)0) -UNSUPPORTED("ez6fz5kzz38v9ggr3wcumi254"); // return (int) REG_ESPACE; -UNSUPPORTED("1vzdm7mgve5oi32ohhuqg8i00"); // /* Map uppercase characters to corresponding lowercase ones. */ -UNSUPPORTED("d532lt7aisdb9o1mkdskq134t"); // for (i = 0; i < 256; i++) -UNSUPPORTED("aty2mttvyracw7p9x8sls4efr"); // preg->translate[i] = (1 && isupper (i)) ? tolower (i) : i; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("c74ru7c24sev3knmidtcsy39e"); // preg->translate = (void *)0; -UNSUPPORTED("a5kyad26nzmqkixgei1o847n"); // /* If REG_NEWLINE is set, newlines are treated differently. */ -UNSUPPORTED("db72pzje2ov1p3o5omyykyi7e"); // if (cflags & ((1 << 1) << 1)) -UNSUPPORTED("bpj2wmqxauupj14jn3tkadfjh"); // { /* REG_NEWLINE implies neither . nor [^...] match newline. */ -UNSUPPORTED("359fgbemkmx8zzoobn2anh8hi"); // syntax &= ~((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1); -UNSUPPORTED("6g64qw2xiqubh3y7z9htmuzh5"); // syntax |= ((((((((((unsigned long int) 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1) << 1); -UNSUPPORTED("ciyi7qvu3im41264ljmdkdzcl"); // /* It also changes the matching behavior. */ -UNSUPPORTED("8qz1elzfwgfxjvri21nioniys"); // preg->newline_anchor = 1; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("div10atae09n36x269sl208r1"); // else -UNSUPPORTED("2vftf31ujo45k9qv67n4ycbkv"); // preg->newline_anchor = 0; -UNSUPPORTED("cx4zfp27tpwfh8xisrvqqbgks"); // preg->no_sub = !!(cflags & (((1 << 1) << 1) << 1)); -UNSUPPORTED("2x159h0yz24rnjci2cq7y1ntz"); // /* POSIX says a null character in the pattern terminates it, so we -UNSUPPORTED("d66drlhc8quicmkt8miicu0ea"); // can use strlen here in compiling the pattern. */ -UNSUPPORTED("d0cg1xygicxugayg5yya59guo"); // ret = regex_compile (pattern, strlen (pattern), syntax, preg); -UNSUPPORTED("erkyjok9d0k2psk0sb56f6vvz"); // /* POSIX doesn't distinguish between an unmatched open-group and an -UNSUPPORTED("1u6sohla9epfpyet1i7nzcgad"); // unmatched close-group: both are REG_EPAREN. */ -UNSUPPORTED("3e5v05pv5yk1o9jdj6bh0zg5w"); // if (ret == REG_ERPAREN) ret = REG_EPAREN; -UNSUPPORTED("7ancqvxv19g9moyznhw9my8xj"); // // printf("done with regcomp\n"); -UNSUPPORTED("f3hb5xwlfzeslhmq4ytwr8pgd"); // return (int) ret; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 9wdgvv1gwc1o7f0w05768p2i3 -// int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) -public static Object regexec(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("2v3o1uaqb2zp3puxfw779kms2"); // regexec(const regex_t *preg, -UNSUPPORTED("ekpgp0iac0e6o9udtd55uiuly"); // const char *string, -UNSUPPORTED("dvlw3353jood9rlb0w1geec5z"); // size_t nmatch, -UNSUPPORTED("2864eyed7whs62o97tq2npado"); // regmatch_t pmatch[], -UNSUPPORTED("3i4rg5r8fnniwlx6ybr4n906a"); // int eflags) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("7p7i4cv4qt10ow22vl9znw72j"); // int ret; -UNSUPPORTED("82u0gsptykltdsomlyhj9rk19"); // struct re_registers regs; -UNSUPPORTED("9z47qt0zii8jvt2jglo0lgszf"); // regex_t private_preg; -UNSUPPORTED("6tsm0ylmo6ex2b24vcrr2cim7"); // int len = strlen (string); -UNSUPPORTED("17kwuhblkqgc3mdapwyc395sz"); // boolean want_reg_info = !preg->no_sub && nmatch > 0; -UNSUPPORTED("agwedmhzs0prdnnlk9jnsfg9c"); // private_preg = *preg; -UNSUPPORTED("13e7wtxa8hlobsw8k2nqqg3r3"); // private_preg.not_bol = !!(eflags & 1); -UNSUPPORTED("57scmexrxxrwf0l9nzr1szrpt"); // private_preg.not_eol = !!(eflags & (1 << 1)); -UNSUPPORTED("mql47hhdnpgkjou517m3726f"); // /* The user has told us exactly how many registers to return -UNSUPPORTED("cqy8u5p4xwvs8y4q6w7fce3xv"); // information about, via `nmatch'. We have to pass that on to the -UNSUPPORTED("3rosx96qxeg0kqk0uxh7l1cl8"); // matching routines. */ -UNSUPPORTED("c013ob9fi1fg0vxd1oam5865g"); // private_preg.regs_allocated = 2; -UNSUPPORTED("9rkeiv1fdp19eb173sjfltu2t"); // if (want_reg_info) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("8a02jnbpnzttrw1ayq7w5mj62"); // regs.num_regs = nmatch; -UNSUPPORTED("aoe6tbrgjwbzymn65261rgcum"); // regs.start = ((regoff_t *) malloc ((nmatch) * sizeof (regoff_t))); -UNSUPPORTED("3hfltfy7wmk9a24vq9wzlmq9v"); // regs.end = ((regoff_t *) malloc ((nmatch) * sizeof (regoff_t))); -UNSUPPORTED("7njv4u89envwukxkawqtq0oto"); // if (regs.start == (void *)0 || regs.end == (void *)0) -UNSUPPORTED("873f3rccmawjgt3m3uqo8p3ci"); // return (int) REG_NOMATCH; -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("a8yuopeuk07ow83nm5njscoxn"); // /* Perform the searching operation. */ -UNSUPPORTED("cwamuwhai30lyfbzzvibn401x"); // ret = re_search (&private_preg, string, len, -UNSUPPORTED("6jnlnbkqqmvrtbxyne0meo7jt"); // /* start: */ 0, /* range: */ len, -UNSUPPORTED("1xnfnhd8hk3tln4va3uu7f2wm"); // want_reg_info ? ®s : (struct re_registers *) 0); -UNSUPPORTED("86oesm7mqi9hv2n08zwleh73m"); // /* Copy the register information to the POSIX structure. */ -UNSUPPORTED("9rkeiv1fdp19eb173sjfltu2t"); // if (want_reg_info) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("ce73wb0bbrngqy808tp6ppsrq"); // if (ret >= 0) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("bxs4m6oognafzhor2ww93b692"); // unsigned r; -UNSUPPORTED("8soywsau32kjtl93ct4sxxyma"); // for (r = 0; r < nmatch; r++) -UNSUPPORTED("5k2digv672hnrndhc9ktw0oii"); // { -UNSUPPORTED("cfq91dne0qag57cuzkcw5mxcg"); // pmatch[r].rm_so = regs.start[r]; -UNSUPPORTED("gibau4k00r5dzlvk4kcbwb56"); // pmatch[r].rm_eo = regs.end[r]; -UNSUPPORTED("b86ovw6olwwo6gnqlt1wqqzb4"); // } -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("c0xnifbhwrr011t5ogyy7sxk4"); // /* If we needed the temporary register info, free the space now. */ -UNSUPPORTED("ec72z8dmt4gcwsz42a7ubbvgx"); // free (regs.start); -UNSUPPORTED("8gandm25f5zvbvckszq77jha"); // free (regs.end); -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("7dob0tgisyvw4rk6jg4viupyw"); // /* We want zero return to mean success, unlike `re_search'. */ -UNSUPPORTED("246hp3joht768z00rf97n4yvo"); // return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 6u3voe6b7jao3ubd49rpvpmmx -// size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) -public static Object regerror(Object... arg) { -UNSUPPORTED("4hv4edbckfpx53agqilues063"); // size_t -UNSUPPORTED("72xsdxwxd93qf4oxx4jyhdo8z"); // regerror(int errcode, -UNSUPPORTED("asif8gxw337t4n3r3vlc5nfry"); // const regex_t *preg, -UNSUPPORTED("7k1ct0qwx3daob1tp19njd6q0"); // char *errbuf, -UNSUPPORTED("dx6x6qmmym6uzf7roqbw9kvt"); // size_t errbuf_size) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("91x25pzkmtzqo9hslez13lges"); // const char *msg; -UNSUPPORTED("6m38jprvakqd3ls3jeotcz1xg"); // size_t msg_size; -UNSUPPORTED("adpjyd1odey6jlw7vkjk429xt"); // if (errcode < 0 -UNSUPPORTED("8ybd3hnsngs38rh8ddk8q0w26"); // || errcode >= (int) (sizeof (re_error_msgid) -UNSUPPORTED("c9vfuy341wx3rri8wvq9sua5s"); // / sizeof (re_error_msgid[0]))) -UNSUPPORTED("7u1uewk6wx5joexwehp38vlng"); // /* Only error codes returned by the rest of the code should be passed -UNSUPPORTED("6hlmqhjzj6vqjlpwwklal6m89"); // to this routine. If we are given anything else, or if other regex -UNSUPPORTED("cbs38fwyo0gkko91u7cenjci"); // code generates an invalid error code, then the program has a bug. -UNSUPPORTED("8or7291qatc4r8j81dj07fgb4"); // Dump core so we can fix it. */ -UNSUPPORTED("68wdgoila4oldpk4gdc6i6uc3"); // abort (); -UNSUPPORTED("4yci96v8pzj722abptwqxdkso"); // msg = (re_error_msgid[errcode]); -UNSUPPORTED("dujj3eb9b3zvr0euc5s4itcj"); // msg_size = strlen (msg) + 1; /* Includes the null. */ -UNSUPPORTED("6oho364pztumj8yc7uc6bsusm"); // if (errbuf_size != 0) -UNSUPPORTED("6pjalxixg8dnhbhc46pm6e6ay"); // { -UNSUPPORTED("4oxtwxt5zv8auje423kp2f05r"); // if (msg_size > errbuf_size) -UNSUPPORTED("9ua540u2gx5jpu302s81qfxhi"); // { -UNSUPPORTED("3cof3rq3oujwsp8nrbb9snh96"); // strncpy (errbuf, msg, errbuf_size - 1); -UNSUPPORTED("17sh1j757ozjg8a39nvcnmean"); // errbuf[errbuf_size - 1] = 0; -UNSUPPORTED("7nxu74undh30brb8laojud3f9"); // } -UNSUPPORTED("1knjyao8ci3w18zqqcnmnitir"); // else -UNSUPPORTED("6ru8c1linplme96gzmn6v9ezn"); // strcpy (errbuf, msg); -UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // } -UNSUPPORTED("ban7kvxs6qguwfg0cz79w2fqe"); // return msg_size; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - - - -//3 1ydg62ufhooqvgftuuovy004y -// void regfree(regex_t *preg) -public static Object regfree(Object... arg) { -UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void -UNSUPPORTED("yxtwt5xf8mgfwucdzaq8xg0"); // regfree(regex_t *preg) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("axv8f27k41wevzbd8jorfk8em"); // if (preg->buffer != (void *)0) -UNSUPPORTED("4krgfpqw59bwla8p73a5potcs"); // free (preg->buffer); -UNSUPPORTED("duswsbmztnkjw8nmmpoanyq0l"); // preg->buffer = (void *)0; -UNSUPPORTED("b766kips3z6tm9tifbomnvtmy"); // preg->allocated = 0; -UNSUPPORTED("2ne52scg87du6fvmgx4iz1ysx"); // preg->used = 0; -UNSUPPORTED("ac48j1opcvu8p6bmkvhdmubhe"); // if (preg->fastmap != (void *)0) -UNSUPPORTED("43aaw7li7lbfcd1lewzzyp7to"); // free (preg->fastmap); -UNSUPPORTED("4lv04h2kcmrw99yqy6i26w8g4"); // preg->fastmap = (void *)0; -UNSUPPORTED("5e92vh1r7ol7emrm0ijcg45a9"); // preg->fastmap_accurate = 0; -UNSUPPORTED("e4iva4m5k6n7oj8enuvyimttj"); // if (preg->translate != (void *)0) -UNSUPPORTED("4mliivt4jjgt9njb860f17323"); // free (preg->translate); -UNSUPPORTED("7c5ulxpurhe3moa5q2eu01tom"); // preg->translate = (void *)0; -UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } - -throw new UnsupportedOperationException(); -} - - -} diff -Nru plantuml-1.2017.15/src/gen/lib/label/index__c.java plantuml-1.2018.9/src/gen/lib/label/index__c.java --- plantuml-1.2017.15/src/gen/lib/label/index__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/label/index__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -44,7 +44,13 @@ * */ package gen.lib.label; +import static gen.lib.label.node__c.*; +import static gen.lib.common.memory__c.zmalloc; +import static smetana.core.JUtils.sizeof; import static smetana.core.Macro.UNSUPPORTED; +import h.RTree; +import h._Node_t___; +import smetana.core.__ptr__; public class index__c { @@ -105,6 +111,140 @@ throw new UnsupportedOperationException(); } +///* Allocate space for a node in the list used in DeletRect to +// * store Nodes that are too empty. +// */ +//static struct ListNode *RTreeNewListNode(void) +//{ +// return (struct ListNode*)zmalloc(sizeof(struct ListNode)); +//} +// +///* Add a node to the reinsertion list. All its branches will later +// * be reinserted into the index structure. +// */ +//static int RTreeReInsert(RTree_t * rtp, Node_t * n, struct ListNode **ee) +//{ +// register struct ListNode *l; +// +// if (!(l = RTreeNewListNode())) +// return -1; +// l->node = n; +// l->next = *ee; +// *ee = l; +// return 0; +//} +// +//RTree_t *RTreeOpen() +public static __ptr__ RTreeOpen() { + RTree rtp; + rtp = (RTree) zmalloc(sizeof(RTree.class)); + if (rtp!=null) + rtp.setPtr("root", RTreeNewIndex(rtp)); + return rtp; +} + +///* Make a new index, empty. Consists of a single node. */ +//Node_t *RTreeNewIndex(RTree_t * rtp) +public static _Node_t___ RTreeNewIndex(RTree rtp) { + _Node_t___ x; + x = RTreeNewNode(rtp); +// x->level = 0; /* leaf */ +// rtp->LeafCount++; +// return x; +//} + throw new UnsupportedOperationException(); +} +// +//static int RTreeClose2(RTree_t * rtp, Node_t * n) +//{ +// int i; +// +// if (n->level > 0) { +// for (i = 0; i < 64; i++) { +// if (!n->branch[i].child) +// continue; +// if (!RTreeClose2(rtp, n->branch[i].child)) { +// free(n->branch[i].child); +// DisconBranch(n, i); +// rtp->EntryCount--; +// if (rtp->StatFlag) +// rtp->ElimCount++; +// } +// } +// } else { +// for (i = 0; i < 64; i++) { +// if (!n->branch[i].child) +// continue; +// // free(n->branch[i].child); +// DisconBranch(n, i); +// rtp->EntryCount--; +// if (rtp->StatFlag) +// rtp->ElimCount++; +// } +// //free(n); +// } +// return 0; +//} +// +//int RTreeClose(RTree_t * rtp) +//{ +// RTreeClose2(rtp, rtp->root); +// free(rtp->root); +// free(rtp); +// return 0; +//} +// +// +///* RTreeSearch in an index tree or subtree for all data retangles that +//** overlap the argument rectangle. +//** Returns the number of qualifying data rects. +//*/ +//LeafList_t *RTreeSearch(RTree_t * rtp, Node_t * n, Rect_t * r) +//{ +// register int i; +// LeafList_t *llp = 0; +// +// assert(n); +// assert(n->level >= 0); +// assert(r); +// +// rtp->SeTouchCount++; +// +// if (n->level > 0) { /* this is an internal node in the tree */ +// for (i = 0; i < 64; i++) +// if (n->branch[i].child && Overlap(r, &n->branch[i].rect)) { +// LeafList_t *tlp = RTreeSearch(rtp, n->branch[i].child, r); +// if (llp) { +// LeafList_t *xlp = llp; +// while (xlp->next) +// xlp = xlp->next; +// xlp->next = tlp; +// } else +// llp = tlp; +// } +// } else { /* this is a leaf node */ +// for (i = 0; i < 64; i++) { +// if (n->branch[i].child && Overlap(r, &n->branch[i].rect)) { +// llp = RTreeLeafListAdd(llp, (Leaf_t *) & n->branch[i]); +// +// +// +// } +// } +// } +// return llp; +//} +// +///* Insert a data rectangle into an index structure. +//** RTreeInsert provides for splitting the root; +//** returns 1 if root was split, 0 if it was not. +//** The level argument specifies the number of steps up from the leaf +//** level to insert; e.g. a data rectangle goes in at level = 0. +//** RTreeInsert2 does the recursion. +//*/ +//static int RTreeInsert2(RTree_t *, Rect_t *, void *, Node_t *, Node_t **, +// int); +///*static int RTreeInsert2(RTree_t*, Rect_t*, int, Node_t*, Node_t**, int); */ diff -Nru plantuml-1.2017.15/src/gen/lib/label/node__c.java plantuml-1.2018.9/src/gen/lib/label/node__c.java --- plantuml-1.2017.15/src/gen/lib/label/node__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/label/node__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,18 +45,19 @@ */ package gen.lib.label; import static smetana.core.Macro.UNSUPPORTED; +import h.RTree; +import h._Node_t___; +import smetana.core.Memory; public class node__c { //3 9uj7ni1m6q6drtoh56w82d6m4 // Node_t *RTreeNewNode(RTree_t * rtp) -public static Object RTreeNewNode(Object... arg) { -UNSUPPORTED("6r87cuk0qgu4wqagr86fr5tts"); // Node_t *RTreeNewNode(RTree_t * rtp) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("7wl3hkaktfhqdqsm6ubxboo1q"); // register Node_t *n; -UNSUPPORTED("4bwg40kiiowl2obspxcr4saa2"); // rtp->NodeCount++; -UNSUPPORTED("azoy4bfuupxwp4mi8hfbfb78g"); // n = (Node_t *) malloc(sizeof(Node_t)); +public static _Node_t___ RTreeNewNode(RTree rtp) { + _Node_t___ n; + rtp.setInt("NodeCount", rtp.getInt("NodeCount") + 1); + n = (_Node_t___) Memory.malloc(_Node_t___.class); UNSUPPORTED("a4ey5uckjqallol1ktyqe35bv"); // InitNode(n); UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n; UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // } diff -Nru plantuml-1.2017.15/src/gen/lib/label/xlabels__c.java plantuml-1.2018.9/src/gen/lib/label/xlabels__c.java --- plantuml-1.2017.15/src/gen/lib/label/xlabels__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/label/xlabels__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -44,7 +44,19 @@ * */ package gen.lib.label; +import static gen.lib.cdt.dtopen__c.dtopen; +import static gen.lib.common.memory__c.zmalloc; +import static gen.lib.label.index__c.RTreeOpen; +import static smetana.core.JUtils.sizeof; +import static smetana.core.Macro.N; import static smetana.core.Macro.UNSUPPORTED; +import h.BestPos_t; +import h.XLabels_t; +import h._dt_s; +import h._dtdisc_s; +import h.label_params_t; +import smetana.core.Z; +import smetana.core.__ptr__; public class xlabels__c { //1 9k44uhd5foylaeoekf3llonjq @@ -123,8 +135,7 @@ //3 5p3ac8qk4gnne5hj1dc21ysi // static int icompare(Dt_t * dt, void * v1, void * v2, Dtdisc_t * disc) -public static Object icompare(Object... arg) { -UNSUPPORTED("bpbhsdw4fe10xdxxfuegnvqt2"); // static int icompare(Dt_t * dt, void * v1, void * v2, Dtdisc_t * disc) +public static int icompare(_dt_s dt, __ptr__ v1, __ptr__ v2, _dtdisc_s disc) { UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { UNSUPPORTED("ehks25fxahyjbjd4lm6ryh9su"); // int k1 = *((int *) v1), k2 = *((int *) v2); UNSUPPORTED("6in30ubiocmaih693f0arymgc"); // return k1 - k2; @@ -138,24 +149,22 @@ //3 88mbfm305igsr7cew5qx6yldp // static XLabels_t *xlnew(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params) -public static Object xlnew(Object... arg) { -UNSUPPORTED("3le94zdf67vws2boexolzlx7k"); // static XLabels_t *xlnew(object_t * objs, int n_objs, -UNSUPPORTED("cb2wq8p902q5tlc1mh5hikgi2"); // xlabel_t * lbls, int n_lbls, -UNSUPPORTED("bz8hxsdu70exdmt52dnayj0c7"); // label_params_t * params) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("bkrrqfyt0mc9r9usgj4c7t9zs"); // XLabels_t *xlp; -UNSUPPORTED("5tfjcsm3vbxebkz2ev3uqptnx"); // xlp = (XLabels_t*)zmalloc(sizeof(XLabels_t)); -UNSUPPORTED("evg8rhuwggcno9jwcrub0i4y4"); // /* used to load the rtree in hilbert space filling curve order */ -UNSUPPORTED("8yj6rj5llf2mw5pp8tt355a7o"); // if (!(xlp->hdx = dtopen(&Hdisc, Dtobag))) { +public static XLabels_t xlnew(__ptr__ objs, int n_objs, __ptr__ lbls, int n_lbls, label_params_t params) { +__ptr__ xlp; +xlp = zmalloc(sizeof(XLabels_t.class)); +/* used to load the rtree in hilbert space filling curve order */ +xlp.setPtr("hdx", dtopen(Z.z().Hdisc.amp(), Z.z().Dtobag)); +if (N(xlp.getPtr("hdx"))) { UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n"); UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad; -UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("1bzq9uxiqzj7l6llb7e6gti7e"); // /* for querying intersection candidates */ +} +/* for querying intersection candidates */ +xlp.setPtr("spdx", RTreeOpen()); UNSUPPORTED("7elrkgy2129t2ut4mi03dhf75"); // if (!(xlp->spdx = RTreeOpen())) { UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n"); UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad; UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // } -UNSUPPORTED("85lb5m2umu5izyudq40of0dgi"); // /* save arg pointers in the handle */ +/* save arg pointers in the handle */ UNSUPPORTED("ava6c0wrmq2d6j1i4j7bd1lpp"); // xlp->objs = objs; UNSUPPORTED("85sh2ov52z31nsy9mk5su9p5p"); // xlp->n_objs = n_objs; UNSUPPORTED("3et8g76wlkf60sgxrmi3z1vom"); // xlp->lbls = lbls; @@ -804,14 +813,10 @@ //3 brqgbskh3z4ah8infjompibvu // int placeLabels(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params) -public static Object placeLabels(Object... arg) { -UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int -UNSUPPORTED("ec68cktfb4yv5ddz6c3prlrlz"); // placeLabels(object_t * objs, int n_objs, -UNSUPPORTED("5ldon0a05p5rangda7ft97vpf"); // xlabel_t * lbls, int n_lbls, label_params_t * params) -UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // { -UNSUPPORTED("ch9su7givqwexp175hzif4dga"); // int r, i; -UNSUPPORTED("ac14qcqjljksbh1ulqbhsnrnb"); // BestPos_t bp; -UNSUPPORTED("as2y5lue6yv2statqso3a65vn"); // XLabels_t *xlp = xlnew(objs, n_objs, lbls, n_lbls, params); +public static int placeLabels(__ptr__ objs, int n_objs, __ptr__ lbls, int n_lbls, label_params_t params) { +int r, i; +BestPos_t bp; +XLabels_t xlp = xlnew(objs, n_objs, lbls, n_lbls, params); UNSUPPORTED("dm5w2lmehr2rv6b2yi2v83i3g"); // if ((r = xlinitialize(xlp)) < 0) UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r; UNSUPPORTED("8izrf1sxed8y2dmpz5ju27b6h"); // /* Place xlabel_t* lp near lp->obj so that the rectangle whose lower-left diff -Nru plantuml-1.2017.15/src/gen/lib/pathplan/route__c.java plantuml-1.2018.9/src/gen/lib/pathplan/route__c.java --- plantuml-1.2017.15/src/gen/lib/pathplan/route__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/pathplan/route__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -60,6 +60,7 @@ import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.jmp_buf; @@ -271,7 +272,7 @@ private static int splinefits_w_(__ptr__ edges, int edgen, final __struct__ pa, final __struct__ va, final __struct__ pb, final __struct__ vb, __ptr__ inps, int inpn) { ENTERING("987ednrgu5qo9dzhpiox47mhb","splinefits"); try { - final __array_of_struct__ sps = __array_of_struct__.malloc(pointf.class, 4); + final __array_of_struct__ sps = __array_of_struct_impl__.malloc(pointf.class, 4); double a, b; int pi; int forceflag; @@ -344,7 +345,7 @@ double roots[] = new double[4]; int rooti, rootn; int ei; - final __array_of_struct__ lps = __array_of_struct__.malloc(pointf.class, 2); + final __array_of_struct__ lps = __array_of_struct_impl__.malloc(pointf.class, 2); final __struct__ ip = JUtils.from(pointf.class); double t, ta, tb, tc, td; for (ei = 0; ei < edgen; ei++) { diff -Nru plantuml-1.2017.15/src/gen/lib/pathplan/shortest__c.java plantuml-1.2018.9/src/gen/lib/pathplan/shortest__c.java --- plantuml-1.2017.15/src/gen/lib/pathplan/shortest__c.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/gen/lib/pathplan/shortest__c.java 2018-07-27 21:59:19.000000000 +0000 @@ -63,6 +63,7 @@ import smetana.core.Memory; import smetana.core.Z; import smetana.core.__array_of_struct__; +import smetana.core.__array_of_struct_impl__; import smetana.core.__ptr__; import smetana.core.__struct__; import smetana.core.jmp_buf; @@ -121,7 +122,7 @@ final __struct__ p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), p3 = JUtils.from(pointf.class); int trii, trij, ftrii, ltrii; int ei; - final __array_of_struct__ epnls = __array_of_struct__.malloc(pointnlink_t.class, 2); + final __array_of_struct__ epnls = __array_of_struct_impl__.malloc(pointnlink_t.class, 2); pointnlink_t lpnlp=null, rpnlp=null, pnlp=null; triangle_t trip; int splitindex; diff -Nru plantuml-1.2017.15/src/h/_Node_t___.java plantuml-1.2018.9/src/h/_Node_t___.java --- plantuml-1.2017.15/src/h/_Node_t___.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/_Node_t___.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,69 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; +import java.util.Arrays; +import java.util.List; + +import smetana.core.__ptr__; + +//2 aqoki3wwzhqcy2mpz21vzdona + +public interface _Node_t___ extends __ptr__ { + public static List DEFINITION = Arrays.asList( +"typedef struct Node", +"{", +"int count", +"int level", +"struct Branch branch[64]", +"}", +"Node_t"); +} + +// typedef struct Node { +// int count; +// int level; /* 0 is leaf, others positive */ +// struct Branch branch[64]; +// } Node_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/_Note_t___.java plantuml-1.2018.9/src/h/_Note_t___.java --- plantuml-1.2017.15/src/h/_Note_t___.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/_Note_t___.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of Smetana. - * Smetana is a partial translation of Graphviz/Dot sources from C to Java. - * - * (C) Copyright 2009-2017, Arnaud Roques - * - * This translation is distributed under the same Licence as the original C program: - * - ************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - ************************************************************************* - * - * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC - * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] - * - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - * - * You may obtain a copy of the License at - * - * http://www.eclipse.org/legal/epl-v10.html - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package h; -import java.util.Arrays; -import java.util.List; - -import smetana.core.__ptr__; - -//2 aqoki3wwzhqcy2mpz21vzdona - -public interface _Note_t___ extends __ptr__ { - public static List DEFINITION = Arrays.asList( -"typedef struct Node", -"{", -"int count", -"int level", -"struct Branch branch[64]", -"}", -"Node_t"); -} - -// typedef struct Node { -// int count; -// int level; /* 0 is leaf, others positive */ -// struct Branch branch[64]; -// } Node_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_adjmatrix_t.java plantuml-1.2018.9/src/h/ST_adjmatrix_t.java --- plantuml-1.2017.15/src/h/ST_adjmatrix_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_adjmatrix_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,139 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_integer__; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfInteger; +import smetana.core.amiga.StarStruct; + +public class ST_adjmatrix_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_adjmatrix_t() { + this(null); + } + + public ST_adjmatrix_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct adjmatrix_t", + // "{", + private int nrows, ncols; + + // "char *data", + private StarArrayOfInteger data; + + // "}", + // "adjmatrix_t"); + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("ncols")) { + this.ncols = data; + return; + } + if (fieldName.equals("nrows")) { + this.nrows = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("nrows")) { + return this.nrows; + } + if (fieldName.equals("ncols")) { + return this.ncols; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("data")) { + this.data = (StarArrayOfInteger) newData; + return data; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __array_of_integer__ getArrayOfInteger(String fieldName) { + if (fieldName.equals("data")) { + return data.getInternalArray(); + } + return super.getArrayOfInteger(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("data")) { + return data; + } + return super.getPtr(fieldName); + } +} + +// typedef struct adjmatrix_t { +// int nrows, ncols; +// char *data; +// } adjmatrix_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agattr_s.java plantuml-1.2018.9/src/h/ST_Agattr_s.java --- plantuml-1.2017.15/src/h/ST_Agattr_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agattr_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,125 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_cstring__; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfCString; +import smetana.core.amiga.StarStruct; + +public class ST_Agattr_s extends UnsupportedStructAndPtr { + + private final ST_Agrec_s h = new ST_Agrec_s(this); /* common data header */ + public ST_dt_s dict; /* shared dict to interpret attr field */ + public StarArrayOfCString str; /* the attribute string values */ + + private final StarStruct parent; + + public ST_Agattr_s() { + this(null); + } + + public ST_Agattr_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("dict")) { + return dict; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("dict")) { + this.dict = (ST_dt_s) newData; + return dict; + } + if (fieldName.equals("str")) { + this.str = (StarArrayOfCString) newData; + return str; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __array_of_cstring__ getArrayOfCString(String fieldName) { + if (fieldName.equals("str")) { + return str.getInternalArray(); + } + return super.getArrayOfCString(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agrec_s.class) { + return h; + // return h.amp(); + } + return super.castTo(dest); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agattr_s", + // "{", + // "Agrec_t h", + // "Dict_t *dict", + // "char **str", + // "}"); +} + +// struct Agattr_s { /* dynamic string attributes */ +// Agrec_t h; /* common data header */ +// Dict_t *dict; /* shared dict to interpret attr field */ +// char **str; /* the attribute string values */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agcbstack_s.java plantuml-1.2018.9/src/h/ST_Agcbstack_s.java --- plantuml-1.2017.15/src/h/ST_Agcbstack_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agcbstack_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,80 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Agcbstack_s extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_Agcbstack_s() { + this(null); + } + + public ST_Agcbstack_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agcbstack_s", + // "{", + // "Agcbdisc_t *f", + // "void *state", + // "Agcbstack_t *prev", + // "}"); +} + +// struct Agcbstack_s { /* object event callbacks */ +// Agcbdisc_t *f; /* methods */ +// void *state; /* closure */ +// Agcbstack_t *prev; /* kept in a stack, unlike other disciplines */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agclos_s.java plantuml-1.2018.9/src/h/ST_Agclos_s.java --- plantuml-1.2017.15/src/h/ST_Agclos_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agclos_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,203 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import java.util.ArrayList; +import java.util.List; + +import smetana.core.ArrayOfInteger; +import smetana.core.UnsupportedArrayOfPtr; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_integer__; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agclos_s extends UnsupportedStructAndPtr { + public final ST_Agdisc_s disc = new ST_Agdisc_s(this); /* resource discipline functions */ + public final ST_Agdstate_s state = new ST_Agdstate_s(this); /* resource closures */ + public ST_dt_s strdict; + private final int[] seq = new int[3]; + // "unsigned long seq[3]", + public ST_Agcbstack_s cb; + public boolean callbacks_enabled; /* issue user callbacks or hold them? */ + + // "Dict_t *lookup_by_name[3]", + // "Dict_t *lookup_by_id[3]", + private final ArrayOfThreePtrDict_t lookup_by_id = new ArrayOfThreePtrDict_t(); + + static class ArrayOfThreePtrDict_t extends UnsupportedArrayOfPtr implements __array_of_ptr__ { + private final List list; + private final int pos; + + private ArrayOfThreePtrDict_t(List list, int pos) { + this.list = list; + this.pos = pos; + } + + ArrayOfThreePtrDict_t() { + this(new ArrayList(), 0); + for (int i = 0; i < 3; i++) { + list.add(null); + } + } + + @Override + public __array_of_ptr__ plus(int delta) { + return new ArrayOfThreePtrDict_t(list, pos + delta); + } + + @Override + public __ptr__ getPtr() { + return list.get(0); + } + + } + + private final StarStruct parent; + + public ST_Agclos_s() { + this(null); + } + + public ST_Agclos_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("callbacks_enabled")) { + return callbacks_enabled; + } + return super.getBoolean(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("strdict")) { + return strdict; + } + if (fieldName.equals("cb")) { + return cb; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("strdict")) { + this.strdict = (ST_dt_s) newData; + return strdict; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("disc")) { + return disc; + } + if (fieldName.equals("state")) { + return state; + } + return super.getStruct(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("callbacks_enabled")) { + this.callbacks_enabled = data; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public __array_of_integer__ getArrayOfInteger(String fieldName) { + if (fieldName.equals("seq")) { + return new ArrayOfInteger(seq, 0); + } + return super.getArrayOfInteger(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("lookup_by_id")) { + return lookup_by_id; + } + return super.getArrayOfPtr(fieldName); + } + + // public interface ST_Agclos_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct Agclos_s", + // "{", + // "Agdisc_t disc", + // "Agdstate_t state", + // "Dict_t *strdict", + // "unsigned long seq[3]", + // "Agcbstack_t *cb", + // "unsigned char callbacks_enabled", + // "Dict_t *lookup_by_name[3]", + // "Dict_t *lookup_by_id[3]", + // "}"); +} + +// struct Agclos_s { +// Agdisc_t disc; /* resource discipline functions */ +// Agdstate_t state; /* resource closures */ +// Dict_t *strdict; /* shared string dict */ +// unsigned long seq[3]; /* local object sequence number counter */ +// Agcbstack_t *cb; /* user and system callback function stacks */ +// unsigned char callbacks_enabled; /* issue user callbacks or hold them? */ +// Dict_t *lookup_by_name[3]; +// Dict_t *lookup_by_id[3]; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agdatadict_s.java plantuml-1.2018.9/src/h/ST_Agdatadict_s.java --- plantuml-1.2017.15/src/h/ST_Agdatadict_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agdatadict_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,139 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_Agdatadict_s extends UnsupportedStructAndPtr { + + private final ST_Agrec_s h = new ST_Agrec_s(this); /* installed in list of graph recs */ + public ST_dt_s n; + public ST_dt_s e; + public ST_dt_s g; + + private final StarStruct parent; + + public ST_Agdatadict_s() { + this(null); + } + + public ST_Agdatadict_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("dict.n")) { + this.n = (ST_dt_s) newData; + return n; + } + if (fieldName.equals("dict.e")) { + this.e = (ST_dt_s) newData; + return e; + } + if (fieldName.equals("dict.g")) { + this.g = (ST_dt_s) newData; + return g; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("dict.n")) { + return n; + } + if (fieldName.equals("dict.e")) { + return e; + } + if (fieldName.equals("dict.g")) { + return g; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agrec_s.class) { + return h.amp(); + } + return super.castTo(dest); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agdatadict_s", + // "{", + // "Agrec_t h", + // "struct", + // "{", + // "Dict_t *n, *e, *g", + // "}", + // "dict", + // "}"); +} + +// struct Agdatadict_s { /* set of dictionaries per graph */ +// Agrec_t h; /* installed in list of graph recs */ +// struct { +// Dict_t *n, *e, *g; +// } dict; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agdesc_s.java plantuml-1.2018.9/src/h/ST_Agdesc_s.java --- plantuml-1.2017.15/src/h/ST_Agdesc_s.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agdesc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -47,7 +47,6 @@ import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; -import smetana.core.UnsupportedStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__struct__; import smetana.core.amiga.Area; diff -Nru plantuml-1.2017.15/src/h/ST_Agdisc_s.java plantuml-1.2018.9/src/h/ST_Agdisc_s.java --- plantuml-1.2017.15/src/h/ST_Agdisc_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agdisc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,113 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_Agdisc_s extends UnsupportedStructAndPtr { + + public ST_Agmemdisc_s.Amp mem; + public ST_Agiddisc_s.Amp id; + public ST_Agiodisc_s.Amp io; + + private final StarStruct parent; + + public ST_Agdisc_s() { + this(null); + } + + public ST_Agdisc_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("mem")) { + this.mem = (ST_Agmemdisc_s.Amp) newData; + return mem; + } + if (fieldName.equals("id")) { + this.id = (ST_Agiddisc_s.Amp) newData; + return id; + } + // if (fieldName.equals("io")) { + // this.io = (ST_Agiodisc_s.Amp) newData; + // return io; + // } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("mem")) { + return mem; + } + if (fieldName.equals("id")) { + return id; + } + return super.getPtr(fieldName); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agdisc_s", + // "{", + // "Agmemdisc_t *mem", + // "Agiddisc_t *id", + // "Agiodisc_t *io", + // "}"); +} + +// struct Agdisc_s { /* user's discipline */ +// Agmemdisc_t *mem; +// Agiddisc_t *id; +// Agiodisc_t *io; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agdstate_s.java plantuml-1.2018.9/src/h/ST_Agdstate_s.java --- plantuml-1.2017.15/src/h/ST_Agdstate_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agdstate_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,108 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_Agdstate_s extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public __ptr__ mem; + public __ptr__ id; + + public ST_Agdstate_s() { + this(null); + } + + public ST_Agdstate_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("mem")) { + this.mem = newData; + return mem; + } + if (fieldName.equals("id")) { + this.id = newData; + return id; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("mem")) { + return mem; + } + if (fieldName.equals("id")) { + return id; + } + return super.getPtr(fieldName); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agdstate_s", + // "{", + // "void *mem", + // "void *id", + // "}"); +} + +// struct Agdstate_s { +// void *mem; +// void *id; +// /* IO must be initialized and finalized outside Cgraph, +// * and channels (FILES) are passed as void* arguments. */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agedgeinfo_t.java plantuml-1.2018.9/src/h/ST_Agedgeinfo_t.java --- plantuml-1.2017.15/src/h/ST_Agedgeinfo_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agedgeinfo_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,368 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_Agedgeinfo_t() { + this(null); + } + + public ST_Agedgeinfo_t(StarStruct parent) { + this.parent = parent; + } + + private final ST_Agrec_s hdr = new ST_Agrec_s(this); + + private ST_splines spl; + private final ST_port tail_port = new ST_port(this), head_port = new ST_port(this); + private ST_textlabel_t label, head_label, tail_label, xlabel; + private int edge_type; + private int adjacent; + private boolean label_ontop; + // "unsigned char gui_state", + private ST_Agedge_s to_orig; + // "void *alg", + // "double factor", + private double dist; + // "Ppolyline_t path", + private int showboxes; + private boolean conc_opp_flag; + private int xpenalty; + private int weight; + private int cutvalue, tree_index; + private int count; + private int minlen; + + private ST_Agedge_s to_virt; + + @Override + public void copyDataFrom(__struct__ other) { + ST_Agedgeinfo_t this2 = (ST_Agedgeinfo_t) other; + this.hdr.copyDataFrom((__struct__) this2.hdr); + this.spl = this2.spl; + this.tail_port.copyDataFrom((__struct__) this2.tail_port); + this.head_port.copyDataFrom((__struct__) this2.head_port); + this.label = this2.label; + this.head_label = this2.head_label; + this.tail_label = this2.tail_label; + this.xlabel = this2.xlabel; + this.edge_type = this2.edge_type; + this.adjacent = this2.adjacent; + this.label_ontop = this2.label_ontop; + this.to_orig = this2.to_orig; + this.dist = this2.dist; + this.showboxes = this2.showboxes; + this.conc_opp_flag = this2.conc_opp_flag; + this.xpenalty = this2.xpenalty; + this.weight = this2.weight; + this.cutvalue = this2.cutvalue; + this.tree_index = this2.tree_index; + this.count = this2.count; + this.minlen = this2.minlen; + this.to_virt = this2.to_virt; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public __ptr__ castTo(Class dest) { + return ST_Agedgeinfo_t.this.castTo(dest); + } + + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agrec_s.class) { + return hdr; + } + if (dest == Agedgeinfo_t.class) { + return this; + } + return super.castTo(dest); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("tail_port")) { + this.tail_port.copyDataFrom(newData); + return; + } + if (fieldName.equals("head_port")) { + this.head_port.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("label_ontop")) { + this.label_ontop = data; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("dist")) { + this.dist = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("minlen")) { + this.minlen = data; + return; + } + if (fieldName.equals("weight")) { + this.weight = data; + return; + } + if (fieldName.equals("cutvalue")) { + this.cutvalue = data; + return; + } + if (fieldName.equals("tree_index")) { + this.tree_index = data; + return; + } + if (fieldName.equals("count")) { + this.count = data; + return; + } + if (fieldName.equals("xpenalty")) { + this.xpenalty = data; + return; + } + if (fieldName.equals("showboxes")) { + this.showboxes = data; + return; + } + if (fieldName.equals("edge_type")) { + this.edge_type = data; + return; + } + if (fieldName.equals("adjacent")) { + this.adjacent = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("dist")) { + return this.dist; + } + return super.getDouble(fieldName); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("conc_opp_flag")) { + return this.conc_opp_flag; + } + if (fieldName.equals("label_ontop")) { + return this.label_ontop; + } + return super.getBoolean(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("minlen")) { + return this.minlen; + } + if (fieldName.equals("weight")) { + return this.weight; + } + if (fieldName.equals("cutvalue")) { + return this.cutvalue; + } + if (fieldName.equals("tree_index")) { + return this.tree_index; + } + if (fieldName.equals("count")) { + return this.count; + } + if (fieldName.equals("xpenalty")) { + return this.xpenalty; + } + if (fieldName.equals("showboxes")) { + return this.showboxes; + } + if (fieldName.equals("edge_type")) { + return this.edge_type; + } + if (fieldName.equals("adjacent")) { + return this.adjacent; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("to_virt")) { + return this.to_virt; + } + if (fieldName.equals("to_orig")) { + return this.to_orig; + } + if (fieldName.equals("label")) { + return this.label; + } + if (fieldName.equals("spl")) { + return this.spl; + } + if (fieldName.equals("xlabel")) { + return this.xlabel; + } + if (fieldName.equals("head_label")) { + return this.head_label; + } + if (fieldName.equals("tail_label")) { + return this.tail_label; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("tail_port")) { + return this.tail_port; + } + if (fieldName.equals("head_port")) { + return this.head_port; + } + return super.getStruct(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("to_virt")) { + if (newData instanceof ST_Agedge_s.Amp) { + this.to_virt = ((ST_Agedge_s.Amp) newData).getObject(); + } else { + this.to_virt = (ST_Agedge_s) newData; + } + return this.to_virt; + } + if (fieldName.equals("to_orig")) { + if (newData instanceof ST_Agedge_s.Amp) { + this.to_orig = ((ST_Agedge_s.Amp) newData).getObject(); + } else { + this.to_orig = (ST_Agedge_s) newData; + } + return this.to_orig; + } + if (fieldName.equals("spl")) { + this.spl = (ST_splines) newData; + return this.spl; + } + if (fieldName.equals("label")) { + this.label = (ST_textlabel_t) newData; + return this.label; + } + if (fieldName.equals("head_label")) { + this.head_label = (ST_textlabel_t) newData; + return this.head_label; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __struct__ getStruct() { + return this; + } + +} + +// typedef struct Agedgeinfo_t { +// Agrec_t hdr; +// splines *spl; +// port tail_port, head_port; +// textlabel_t *label, *head_label, *tail_label, *xlabel; +// char edge_type; +// char adjacent; /* true for flat edge with adjacent nodes */ +// char label_ontop; +// unsigned char gui_state; /* Edge state for GUI ops */ +// edge_t *to_orig; /* for dot's shapes.c */ +// void *alg; +// +// +// double factor; +// double dist; +// Ppolyline_t path; +// +// +// unsigned char showboxes; +// boolean conc_opp_flag; +// short xpenalty; +// int weight; +// int cutvalue, tree_index; +// short count; +// unsigned short minlen; +// edge_t *to_virt; +// +// } Agedgeinfo_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agedgepair_s.java plantuml-1.2018.9/src/h/ST_Agedgepair_s.java --- plantuml-1.2017.15/src/h/ST_Agedgepair_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agedgepair_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,97 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agedgepair_s extends UnsupportedStructAndPtr implements HardcodedStruct { + + public final ST_Agedge_s out = new ST_Agedge_s(this); + public final ST_Agedge_s in = new ST_Agedge_s(this); + + private final StarStruct parent; + + public ST_Agedgepair_s() { + this(null); + } + + public ST_Agedgepair_s(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("out")) { + return out; + } + if (fieldName.equals("in")) { + return in; + } + return super.getStruct(fieldName); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agedgepair_s", + // "{", + // "Agedge_t out, in", + // "}"); +} + +// struct Agedgepair_s { +// Agedge_t out, in; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agedge_s.java plantuml-1.2018.9/src/h/ST_Agedge_s.java --- plantuml-1.2017.15/src/h/ST_Agedge_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agedge_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,315 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_Agrec_s.Amp; +import smetana.core.HardcodedStruct; +import smetana.core.OFFSET; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Agedge_s extends UnsupportedStructAndPtr implements HardcodedStruct { + + private final ST_Agobj_s base = new ST_Agobj_s(this); + private final ST_dtlink_s id_link = new ST_dtlink_s(this); + private final ST_dtlink_s seq_link = new ST_dtlink_s(this); + private ST_Agnode_s node; + + @Override + public void copyDataFrom(__ptr__ arg) { + if (arg instanceof Amp) { + arg = ((Amp) arg).getObject(); + } + ST_Agedge_s this2 = (ST_Agedge_s) arg; + this.base.copyDataFrom((__struct__) this2.base); + this.id_link.copyDataFrom((__struct__) this2.id_link); + this.seq_link.copyDataFrom((__struct__) this2.seq_link); + this.node = this2.node; + } + + private final StarStruct parent; + + public ST_Agedge_s() { + this(null); + } + + public ST_Agedge_s(StarStruct parent) { + this.parent = parent; + } + + @Override + public boolean isSameThan(StarStruct other) { + if (other instanceof Amp) { + Amp other2 = (Amp) other; + return this == other2.me; + } + ST_Agedge_s other2 = (ST_Agedge_s) other; + return this == other2; + } + + @Override + public StarStruct amp() { + return new Amp(this); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agedge_s me; + + public Amp(ST_Agedge_s me) { + this.me = me; + } + + public ST_Agedge_s getObject() { + return me; + } + + @Override + public boolean isSameThan(StarStruct other) { + if (other instanceof ST_Agedge_s) { + ST_Agedge_s other2 = (ST_Agedge_s) other; + return this.me == other2; + } + Amp other2 = (Amp) other; + return this.me == other2.me; + } + + @Override + public __ptr__ castTo(Class dest) { + return ST_Agedge_s.this.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agedge_s.this.setPtr(fieldName, newData); + } + + @Override + public void copyDataFrom(__struct__ other) { + ST_Agedge_s.this.copyDataFrom(other); + } + + @Override + public void copyDataFrom(__ptr__ other) { + ST_Agedge_s.this.copyDataFrom(other); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agedge_s.this.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + return ST_Agedge_s.this.getStruct(fieldName); + } + + @Override + public __ptr__ plus(int pointerMove) { + ST_Agedgepair_s pair = (ST_Agedgepair_s) me.parent; + // Order=out, in + if (pair.out == me && pointerMove == 1) { + return pair.in; + } + if (pair.in == me && pointerMove == -1) { + return pair.out; + } + return super.plus(pointerMove); + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agedge_s::seq_link")) { + return seq_link; + } + if (offset.toString().equals("h.Agedge_s::id_link")) { + return id_link; + } + System.err.println("offset1=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agedge_s::seq_link")) { + return seq_link; + } + if (offset.toString().equals("h.Agedge_s::id_link")) { + return id_link; + } + System.err.println("offset2=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public __ptr__ plus(int pointerMove) { + ST_Agedgepair_s pair = (ST_Agedgepair_s) parent; + // Order=out, in + if (pair.out == this && pointerMove == 1) { + return pair.in; + } + if (pair.in == this && pointerMove == -1) { + return pair.out; + } + return super.plus(pointerMove); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agobj_s.class) { + return base; + } + if (dest == Agedge_s.class) { + return this; + } + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("node")) { + if (newData instanceof ST_Agnode_s.Amp) { + this.node = ((ST_Agnode_s.Amp) newData).getObject(); + } else { + this.node = (ST_Agnode_s) newData; + } + return node; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("node")) { + return node; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("base")) { + return base; + } + return super.getStruct(fieldName); + } + + public StarStruct from_seq_link(ST_dtlink_s from) { + if (from == seq_link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + public StarStruct from_id_link(ST_dtlink_s from) { + if (from == id_link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + public static size_t sizeof_starstar_empty(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return STStarArrayOfPointer.malloc(nb); + } + + @Override + public Object realloc(Object old) { + if (old instanceof STStarArrayOfPointer) { + STStarArrayOfPointer old2 = (STStarArrayOfPointer) old; + old2.realloc(nb); + return old2; + } + // if (old instanceof StarArrayOfPtr) { + // StarArrayOfPtr old2 = (StarArrayOfPtr) old; + // old2.realloc(nb); + // return old2; + // } + return super.realloc(old); + } + + @Override + public int getInternalNb() { + return nb; + } + }; + } + + // public interface ST_Agedge_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct Agedge_s", + // "{", + // "Agobj_t base", + // "Dtlink_t id_link", + // "Dtlink_t seq_link", + // "Agnode_t *node", + // "}"); +} + +// struct Agedge_s { +// Agobj_t base; +// Dtlink_t id_link; /* main graph only */ +// Dtlink_t seq_link; +// Agnode_t *node; /* the endpoint node */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agiddisc_s.java plantuml-1.2018.9/src/h/ST_Agiddisc_s.java --- plantuml-1.2017.15/src/h/ST_Agiddisc_s.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agiddisc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -51,7 +51,6 @@ import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; - public class ST_Agiddisc_s extends UnsupportedStruct { public CFunction open; @@ -64,33 +63,34 @@ @Override public StarStruct amp() { - return new UnsupportedStarStruct() { - @Override - public Object call(String fieldName, Object... args) { - if (fieldName.equals("open")) { - return open.exe(args); - } - if (fieldName.equals("map")) { - return map.exe(args); - } - if (fieldName.equals("idregister")) { - return idregister.exe(args); - } - if (fieldName.equals("print")) { - return print.exe(args); - } - return super.call(fieldName, args); - } + return new Amp(); + } - @Override - public __ptr__ getPtr(String fieldName) { - if (fieldName.equals("print")) { - return print; - } - return super.getPtr(fieldName); + public class Amp extends UnsupportedStarStruct { + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("open")) { + return open.exe(args); + } + if (fieldName.equals("map")) { + return map.exe(args); } + if (fieldName.equals("idregister")) { + return idregister.exe(args); + } + if (fieldName.equals("print")) { + return print.exe(args); + } + return super.call(fieldName, args); + } - }; + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("print")) { + return print; + } + return super.getPtr(fieldName); + } } // public static List DEFINITION = Arrays.asList( diff -Nru plantuml-1.2017.15/src/h/ST_Agiodisc_s.java plantuml-1.2018.9/src/h/ST_Agiodisc_s.java --- plantuml-1.2017.15/src/h/ST_Agiodisc_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agiodisc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,105 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; +import smetana.core.CFunction; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStruct; +import smetana.core.amiga.StarStruct; + +public class ST_Agiodisc_s extends UnsupportedStruct { + + public CFunction afread; + public CFunction putstr; + public CFunction flush; + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { +// @Override +// public Object call(String fieldName, Object... args) { +// if (fieldName.equals("open")) { +// return open.exe(args); +// } +// if (fieldName.equals("map")) { +// return map.exe(args); +// } +// if (fieldName.equals("idregister")) { +// return idregister.exe(args); +// } +// if (fieldName.equals("print")) { +// return print.exe(args); +// } +// return super.call(fieldName, args); +// } +// +// @Override +// public __ptr__ getPtr(String fieldName) { +// if (fieldName.equals("print")) { +// return print; +// } +// return super.getPtr(fieldName); +// } + } + + + // public static List DEFINITION = Arrays.asList( + // "struct Agiodisc_s", + // "{", + // "int (*afread) (void *chan, char *buf, int bufsize)", + // "int (*putstr) (void *chan, const char *str)", + // "int (*flush) (void *chan)", + // "}"); +} + +// struct Agiodisc_s { +// int (*afread) (void *chan, char *buf, int bufsize); +// int (*putstr) (void *chan, const char *str); +// int (*flush) (void *chan); /* sync */ +// /* error messages? */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agmemdisc_s.java plantuml-1.2018.9/src/h/ST_Agmemdisc_s.java --- plantuml-1.2017.15/src/h/ST_Agmemdisc_s.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agmemdisc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -60,19 +60,20 @@ @Override public StarStruct amp() { - return new UnsupportedStarStruct() { + return new Amp(); + } - @Override - public Object call(String fieldName, Object... args) { - if (fieldName.equals("open")) { - return open.exe(args); - } - if (fieldName.equals("alloc")) { - return alloc.exe(args); - } - return super.call(fieldName, args); + public class Amp extends UnsupportedStarStruct { + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("open")) { + return open.exe(args); + } + if (fieldName.equals("alloc")) { + return alloc.exe(args); } - }; + return super.call(fieldName, args); + } } // public static List DEFINITION = Arrays.asList( diff -Nru plantuml-1.2017.15/src/h/ST_Agnodeinfo_t.java plantuml-1.2018.9/src/h/ST_Agnodeinfo_t.java --- plantuml-1.2017.15/src/h/ST_Agnodeinfo_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agnodeinfo_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,519 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_Agnodeinfo_t() { + this(null); + } + + public ST_Agnodeinfo_t(StarStruct parent) { + this.parent = parent; + } + + private final ST_Agrec_s hdr = new ST_Agrec_s(this); + + private ST_shape_desc shape; + private ST_polygon_t shape_info; + private final ST_pointf coord = new ST_pointf(this); + private double width, height; + + // "boxf bb", + private double ht, lw, rw; + private ST_textlabel_t label; + private ST_textlabel_t xlabel; + // "void *alg", + private ST_Agedge_s alg = null; + // "char state", + // "unsigned char gui_state", + // "boolean clustnode", + // "unsigned char pinned", + private int id, heapindex, hops; + // "double *pos, dist", + private int showboxes; + + private boolean has_port; + // "node_t* rep", + // "node_t *set", + private int node_type, mark, onstack; + private int ranktype, weight_class; + private ST_Agnode_s next; + private ST_Agnode_s prev; + // "elist in, out, flat_out, flat_in, other", + private final ST_elist in = new ST_elist(this); + private final ST_elist out = new ST_elist(this); + private final ST_elist flat_out = new ST_elist(this); + private final ST_elist flat_in = new ST_elist(this); + private final ST_elist other = new ST_elist(this); + private ST_Agraph_s.Amp clust; + private int UF_size; + + private ST_Agnode_s UF_parent; + + private ST_Agnode_s inleaf, outleaf; + private int rank, order; + private double mval; + private final ST_elist save_in = new ST_elist(this); + private final ST_elist save_out = new ST_elist(this); + private final ST_elist tree_in = new ST_elist(this); + private final ST_elist tree_out = new ST_elist(this); + private ST_Agedge_s par; + private int low, lim; + private int priority; + + // "double pad[1]", + // "}", + // "Agnodeinfo_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agrec_s.class) { + return hdr; + } + return super.castTo(dest); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("width")) { + this.width = data; + return; + } + if (fieldName.equals("height")) { + this.height = data; + return; + } + if (fieldName.equals("ht")) { + this.ht = data; + return; + } + if (fieldName.equals("lw")) { + this.lw = data; + return; + } + if (fieldName.equals("rw")) { + this.rw = data; + return; + } + if (fieldName.equals("mval")) { + this.mval = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("width")) { + return this.width; + } + if (fieldName.equals("height")) { + return this.height; + } + if (fieldName.equals("ht")) { + return this.ht; + } + if (fieldName.equals("lw")) { + return this.lw; + } + if (fieldName.equals("rw")) { + return this.rw; + } + if (fieldName.equals("mval")) { + return this.mval; + } + return super.getDouble(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("mark")) { + this.mark = data ? 1 : 0; + return; + } + if (fieldName.equals("onstack")) { + this.onstack = data ? 1 : 0; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("showboxes")) { + this.showboxes = data; + return; + } + if (fieldName.equals("UF_size")) { + this.UF_size = data; + return; + } + if (fieldName.equals("mark")) { + this.mark = data; + return; + } + if (fieldName.equals("onstack")) { + this.onstack = data; + return; + } + if (fieldName.equals("priority")) { + this.priority = data; + return; + } + if (fieldName.equals("node_type")) { + this.node_type = data; + return; + } + if (fieldName.equals("rank")) { + this.rank = data; + return; + } + if (fieldName.equals("order")) { + this.order = data; + return; + } + if (fieldName.equals("ranktype")) { + this.ranktype = data; + return; + } + if (fieldName.equals("low")) { + this.low = data; + return; + } + if (fieldName.equals("lim")) { + this.lim = data; + return; + } + if (fieldName.equals("weight_class")) { + this.weight_class = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("UF_size")) { + return this.UF_size; + } + if (fieldName.equals("ranktype")) { + return this.ranktype; + } + if (fieldName.equals("mark")) { + return this.mark; + } + if (fieldName.equals("onstack")) { + return this.onstack; + } + if (fieldName.equals("priority")) { + return this.priority; + } + if (fieldName.equals("node_type")) { + return this.node_type; + } + if (fieldName.equals("rank")) { + return this.rank; + } + if (fieldName.equals("order")) { + return this.order; + } + if (fieldName.equals("ranktype")) { + return this.ranktype; + } + if (fieldName.equals("low")) { + return this.low; + } + if (fieldName.equals("lim")) { + return this.lim; + } + if (fieldName.equals("weight_class")) { + return this.weight_class; + } + if (fieldName.equals("id")) { + return this.id; + } + if (fieldName.equals("heapindex")) { + return this.heapindex; + } + if (fieldName.equals("hops")) { + return this.hops; + } + return super.getInt(fieldName); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("onstack")) { + return this.onstack != 0; + } + if (fieldName.equals("has_port")) { + return this.has_port; + } + return super.getBoolean(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("shape")) { + this.shape = (ST_shape_desc) newData; + return shape; + } + if (fieldName.equals("shape_info")) { + this.shape_info = (ST_polygon_t) newData; + return shape_info; + } + if (fieldName.equals("label")) { + this.label = (ST_textlabel_t) newData; + return label; + } + if (fieldName.equals("clust")) { + if (newData instanceof ST_Agraph_s) { + this.clust = (h.ST_Agraph_s.Amp) ((ST_Agraph_s) newData).amp(); + } else { + this.clust = (ST_Agraph_s.Amp) newData; + } + return clust; + } + if (fieldName.equals("next")) { + this.next = (ST_Agnode_s) newData; + return next; + } + if (fieldName.equals("prev")) { + if (newData instanceof ST_Agnode_s.Amp) { + this.prev = ((ST_Agnode_s.Amp) newData).getObject(); + } else { + this.prev = (ST_Agnode_s) newData; + } + return prev; + } + if (fieldName.equals("UF_parent")) { + this.UF_parent = (ST_Agnode_s) newData; + return UF_parent; + } + if (fieldName.equals("par")) { + if (newData instanceof ST_Agedge_s.Amp) { + this.par = ((ST_Agedge_s.Amp) newData).getObject(); + } else { + this.par = (ST_Agedge_s) newData; + } + return par; + } + if (fieldName.equals("alg")) { + this.alg = (ST_Agedge_s) alg; + return alg; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("shape")) { + return shape; + } + if (fieldName.equals("label")) { + return label; + } + if (fieldName.equals("UF_parent")) { + return UF_parent; + } + if (fieldName.equals("next")) { + return next; + } + if (fieldName.equals("prev")) { + return prev; + } + if (fieldName.equals("clust")) { + return clust; + } + if (fieldName.equals("inleaf")) { + return inleaf; + } + if (fieldName.equals("outleaf")) { + return outleaf; + } + if (fieldName.equals("alg")) { + return alg; + } + if (fieldName.equals("par")) { + return par; + } + if (fieldName.equals("xlabel")) { + return xlabel; + } + if (fieldName.equals("shape_info")) { + return shape_info; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("in")) { + return in; + } + if (fieldName.equals("out")) { + return out; + } + if (fieldName.equals("flat_out")) { + return flat_out; + } + if (fieldName.equals("flat_in")) { + return flat_in; + } + if (fieldName.equals("other")) { + return other; + } + if (fieldName.equals("save_in")) { + return save_in; + } + if (fieldName.equals("save_out")) { + return save_out; + } + if (fieldName.equals("tree_in")) { + return tree_in; + } + if (fieldName.equals("tree_out")) { + return tree_out; + } + if (fieldName.equals("coord")) { + return coord; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("save_in")) { + save_in.copyDataFrom(newData); + return; + } + if (fieldName.equals("save_out")) { + save_out.copyDataFrom(newData); + return; + } + if (fieldName.equals("out")) { + out.copyDataFrom(newData); + return; + } + if (fieldName.equals("in")) { + in.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } +} + +// typedef struct Agnodeinfo_t { +// Agrec_t hdr; +// shape_desc *shape; +// void *shape_info; +// pointf coord; +// double width, height; /* inches */ +// boxf bb; +// double ht, lw, rw; +// textlabel_t *label; +// textlabel_t *xlabel; +// void *alg; +// char state; +// unsigned char gui_state; /* Node state for GUI ops */ +// boolean clustnode; +// +// +// unsigned char pinned; +// int id, heapindex, hops; +// double *pos, dist; +// +// +// unsigned char showboxes; +// boolean has_port; +// node_t* rep; +// node_t *set; +// +// /* fast graph */ +// char node_type, mark, onstack; +// char ranktype, weight_class; +// node_t *next, *prev; +// elist in, out, flat_out, flat_in, other; +// graph_t *clust; +// +// /* for union-find and collapsing nodes */ +// int UF_size; +// node_t *UF_parent; +// node_t *inleaf, *outleaf; +// +// /* for placing nodes */ +// int rank, order; /* initially, order = 1 for ordered edges */ +// double mval; +// elist save_in, save_out; +// +// /* for network-simplex */ +// elist tree_in, tree_out; +// edge_t *par; +// int low, lim; +// int priority; +// +// double pad[1]; +// +// +// } Agnodeinfo_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agnode_s.java plantuml-1.2018.9/src/h/ST_Agnode_s.java --- plantuml-1.2017.15/src/h/ST_Agnode_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agnode_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,231 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Agnode_s extends UnsupportedStructAndPtr { + + private final ST_Agobj_s base = new ST_Agobj_s(this); + private ST_Agraph_s root; + private ST_Agsubnode_s mainsub = new ST_Agsubnode_s(this); + + private final StarStruct parent; + + public ST_Agnode_s() { + this(null); + } + + public ST_Agnode_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public StarStruct amp() { + return new Amp(this); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agnode_s me; + + public Amp(ST_Agnode_s me) { + this.me = me; + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agobj_s.class) { + return base.amp(); + } + if (dest == Agnode_s.class) { + return me; + } + return super.castTo(dest); + } + + @Override + public __struct__ getStruct() { + return ST_Agnode_s.this.getStruct(); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agnode_s.this.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agnode_s.this.setPtr(fieldName, newData); + } + + public ST_Agnode_s getObject() { + return me; + } + + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agnode_s.class) { + return this; + } + if (dest == Agobj_s.class) { + return base; + } + return super.castTo(dest); + } + + @Override + public boolean isSameThan(StarStruct other) { + if (other instanceof Amp) { + Amp other2 = (Amp) other; + return this == other2.me; + } + ST_Agnode_s other2 = (ST_Agnode_s) other; + return this == other2; + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("base")) { + return base; + } + if (fieldName.equals("mainsub")) { + return mainsub; + } + return super.getStruct(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("root")) { + this.root = (ST_Agraph_s) newData; + return root; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("root")) { + return root; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct() { + return this; + } + + public static size_t sizeof_starstar_empty(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return STStarArrayOfPointer.malloc(nb); + } + + @Override + public int getInternalNb() { + return nb; + } + }; + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_Agnode_s.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + if (old instanceof STStarArrayOfPointer) { + STStarArrayOfPointer old2 = (STStarArrayOfPointer) old; + old2.realloc(nb); + return old2; + } + if (old instanceof StarArrayOfPtr) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + return super.realloc(old); + } + }; + } + // public static List DEFINITION = Arrays.asList( + // "struct Agnode_s", + // "{", + // "Agobj_t base", + // "Agraph_t *root", + // "Agsubnode_t mainsub", + // "}"); +} + +// struct Agnode_s { +// Agobj_t base; +// Agraph_t *root; +// Agsubnode_t mainsub; /* embedded for main graph */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agobj_s.java plantuml-1.2018.9/src/h/ST_Agobj_s.java --- plantuml-1.2017.15/src/h/ST_Agobj_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agobj_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,187 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agobj_s extends UnsupportedStructAndPtr implements WithParent, HardcodedStruct { + + public final ST_Agtag_s tag = new ST_Agtag_s(this); + public ST_Agrec_s.Amp data; + + @Override + public void copyDataFrom(__struct__ other) { + ST_Agobj_s this2 = (ST_Agobj_s) other; + this.tag.copyDataFrom((__struct__) this2.tag); + this.data = this2.data; + + } + + private final StarStruct parent; + + public ST_Agobj_s() { + this(null); + } + + public ST_Agobj_s(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public __struct__ getStruct(String fieldName) { + return ST_Agobj_s.this.getStruct(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agobj_s.this.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agobj_s.this.setPtr(fieldName, newData); + } + + @Override + public __ptr__ castTo(Class dest) { + return ST_Agobj_s.this.castTo(dest); + } + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agobj_s.class) { + return this; + } + if (dest == Agraph_s.class && parent instanceof ST_Agraph_s) { + return (ST_Agraph_s) parent; + } + if (dest == Agnode_s.class && parent instanceof ST_Agnode_s) { + return (ST_Agnode_s) parent; + } + if (dest == Agedge_s.class && parent instanceof ST_Agedge_s) { + return (ST_Agedge_s) parent; + } + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("data")) { + if (newData instanceof ST_Agnodeinfo_t) { + ST_Agnodeinfo_t info = (ST_Agnodeinfo_t) newData; + newData = (ST_Agrec_s) info.castTo(Agrec_s.class); + } else if (newData instanceof ST_Agedgeinfo_t) { + ST_Agedgeinfo_t info = (ST_Agedgeinfo_t) newData; + newData = (ST_Agrec_s) info.castTo(Agrec_s.class); + } else if (newData instanceof ST_Agedgeinfo_t.Amp) { + ST_Agedgeinfo_t.Amp info = (ST_Agedgeinfo_t.Amp) newData; + newData = (ST_Agrec_s) info.castTo(Agrec_s.class); + } + if (newData instanceof ST_Agrec_s) { + this.data = (ST_Agrec_s.Amp) ((ST_Agrec_s) newData).amp(); + } else { + this.data = (ST_Agrec_s.Amp) newData; + } + return data; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("data")) { + return data; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("tag")) { + return tag; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("tag")) { + this.tag.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + public StarStruct getParent() { + return parent; + } + + // public interface ST_Agobj_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct Agobj_s", + // "{", + // "Agtag_t tag", + // "Agrec_t *data", + // "}"); +} + +// struct Agobj_s { +// Agtag_t tag; +// Agrec_t *data; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agraphinfo_t.java plantuml-1.2018.9/src/h/ST_Agraphinfo_t.java --- plantuml-1.2017.15/src/h/ST_Agraphinfo_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agraphinfo_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,592 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedArrayOfStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_struct__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + private final ST_Agrec_s hdr = new ST_Agrec_s(this); + // /* to generate code */ + private ST_layout_t drawing; + private ST_textlabel_t label; /* if the cluster has a title */ + private final ST_boxf bb = new ST_boxf(this); /* bounding box */ + // pointf border[4]; /* sizes of margins for graph labels */ + private final ST_pointf border[] = new ST_pointf[] { new ST_pointf(), new ST_pointf(), new ST_pointf(), + new ST_pointf() }; + // unsigned char gui_state; /* Graph state for GUI ops */ + private int has_labels; + // boolean has_images; + private int charset; /* input character set */ + private int rankdir; + private double ht1, ht2; /* below and above extremal ranks */ + private int flags; + // void *alg; + private ST_GVC_s gvc; /* context for "globals" over multiple graphs */ + private CFunction cleanup; + // void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */ + // + // + // /* to place nodes */ + // node_t **neato_nlist; + // int move; + // double **dist, **spring, **sum_t, ***t; + // unsigned short ndim; + // unsigned short odim; + // + // + // /* to have subgraphs */ + private int n_cluster; + // graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */ + private StarArrayOfPtr clust; + private ST_Agraph_s dotroot; + private ST_Agnode_s nlist; + private StarArrayOfPtr rank; + private ST_Agraph_s parent; /* containing cluster (not parent subgraph) */ + // int level; /* cluster nesting level (not node level!) */ + // node_t *minrep, *maxrep; /* set leaders for min and max rank */ + // + // /* fast graph node list */ + private final ST_nlist_t comp = new ST_nlist_t(this); + // /* connected components */ + private ST_Agnode_s minset, maxset; /* set leaders */ + private int n_nodes; + // /* includes virtual */ + private int minrank, maxrank; + // + // /* various flags */ + private int has_flat_edges; + // boolean has_sourcerank; + // boolean has_sinkrank; + private int showboxes; + private int fontnames; /* to override mangling in SVG */ + // + private int nodesep, ranksep; + private ST_Agnode_s ln, rn; /* left, right nodes of bounding box */ + // + // /* for clusters */ + // node_t *leader, **rankleader; + private ST_Agnode_s leader; + private STStarArrayOfPointer rankleader; + private boolean expanded; + private int installed; + // char set_type; + private int label_pos; + private int exact_ranksep; + + private final StarStruct parent_; + + public ST_Agraphinfo_t() { + this(null); + } + + public ST_Agraphinfo_t(StarStruct parent) { + this.parent_ = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + class ArrayOfFour extends UnsupportedArrayOfStruct { + + final private int pos; + + public ArrayOfFour(int pos) { + this.pos = pos; + } + + @Override + public __array_of_struct__ plus(int delta) { + return new ArrayOfFour(pos + delta); + } + + @Override + public __struct__ getStruct() { + return border[pos]; + } + + @Override + public void setStruct(__struct__ value) { + border[pos].copyDataFrom(value); + } + + @Override + public double getDouble(String fieldName) { + return getStruct().getDouble(fieldName); + } + + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + if (fieldName.equals("border")) { + return new ArrayOfFour(0); + } + return super.getArrayOfStruct(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("comp")) { + return this.comp; + } + if (fieldName.equals("bb")) { + return this.bb; + } + return super.getStruct(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agrec_s.class) { + return hdr.amp(); + } + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("gvc")) { + this.gvc = (ST_GVC_s) newData; + return gvc; + } + if (fieldName.equals("drawing")) { + this.drawing = (ST_layout_t) newData; + return drawing; + } + if (fieldName.equals("dotroot")) { + this.dotroot = (ST_Agraph_s) newData; + return dotroot; + } + if (fieldName.equals("parent")) { + if (newData instanceof ST_Agraph_s.Amp) { + this.parent = ((ST_Agraph_s.Amp) newData).getObject(); + } else { + this.parent = (ST_Agraph_s) newData; + } + return parent; + } + if (fieldName.equals("clust")) { + this.clust = (StarArrayOfPtr) newData; + return clust; + } + if (fieldName.equals("label")) { + this.label = (ST_textlabel_t) newData; + return label; + } + if (fieldName.equals("maxset")) { + this.maxset = (ST_Agnode_s) newData; + return maxset; + } + if (fieldName.equals("minset")) { + this.minset = (ST_Agnode_s) newData; + return minset; + } + if (fieldName.equals("nlist")) { + if (newData instanceof ST_Agnode_s.Amp) { + this.nlist = ((ST_Agnode_s.Amp) newData).getObject(); + } else { + this.nlist = (ST_Agnode_s) newData; + } + return nlist; + } + if (fieldName.equals("leader")) { + this.leader = (ST_Agnode_s) newData; + return leader; + } + if (fieldName.equals("rankleader")) { + this.rankleader = (STStarArrayOfPointer) newData; + return rankleader; + } + if (fieldName.equals("rank")) { + this.rank = (StarArrayOfPtr) newData; + return rank; + } + if (fieldName.equals("ln")) { + this.ln = (ST_Agnode_s) newData; + return ln; + } + if (fieldName.equals("rn")) { + this.rn = (ST_Agnode_s) newData; + return rn; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("drawing")) { + return drawing; + } + if (fieldName.equals("gvc")) { + return gvc; + } + if (fieldName.equals("parent")) { + return parent; + } + if (fieldName.equals("dotroot")) { + return dotroot; + } + if (fieldName.equals("clust")) { + return clust; + } + if (fieldName.equals("label")) { + return label; + } + if (fieldName.equals("maxset")) { + return maxset; + } + if (fieldName.equals("minset")) { + return minset; + } + if (fieldName.equals("nlist")) { + return nlist; + } + if (fieldName.equals("leader")) { + return leader; + } + if (fieldName.equals("rankleader")) { + return rankleader; + } + if (fieldName.equals("rank")) { + return rank; + } + if (fieldName.equals("ln")) { + return ln; + } + if (fieldName.equals("rn")) { + return rn; + } + if (fieldName.equals("cleanup")) { + return cleanup; + } + return super.getPtr(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("expanded")) { + this.expanded = data; + return; + } + if (fieldName.equals("has_flat_edges")) { + this.has_flat_edges = data ? 1 : 0; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("charset")) { + this.charset = data; + return; + } + if (fieldName.equals("rankdir")) { + this.rankdir = data; + return; + } + if (fieldName.equals("nodesep")) { + this.nodesep = data; + return; + } + if (fieldName.equals("ranksep")) { + this.ranksep = data; + return; + } + if (fieldName.equals("showboxes")) { + this.showboxes = data; + return; + } + if (fieldName.equals("fontnames")) { + this.fontnames = data; + return; + } + if (fieldName.equals("flags")) { + this.flags = data; + return; + } + if (fieldName.equals("has_labels")) { + this.has_labels = data; + return; + } + if (fieldName.equals("n_cluster")) { + this.n_cluster = data; + return; + } + if (fieldName.equals("label_pos")) { + this.label_pos = data; + return; + } + if (fieldName.equals("n_nodes")) { + this.n_nodes = data; + return; + } + if (fieldName.equals("maxrank")) { + this.maxrank = data; + return; + } + if (fieldName.equals("minrank")) { + this.minrank = data; + return; + } + if (fieldName.equals("installed")) { + this.installed = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("expanded")) { + return expanded; + } + return super.getBoolean(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("flags")) { + return flags; + } + if (fieldName.equals("charset")) { + return charset; + } + if (fieldName.equals("rankdir")) { + return rankdir; + } + if (fieldName.equals("has_labels")) { + return has_labels; + } + if (fieldName.equals("n_cluster")) { + return n_cluster; + } + if (fieldName.equals("label_pos")) { + return label_pos; + } + if (fieldName.equals("n_nodes")) { + return n_nodes; + } + if (fieldName.equals("maxrank")) { + return maxrank; + } + if (fieldName.equals("minrank")) { + return minrank; + } + if (fieldName.equals("has_flat_edges")) { + return has_flat_edges; + } + if (fieldName.equals("installed")) { + return installed; + } + if (fieldName.equals("exact_ranksep")) { + return exact_ranksep; + } + if (fieldName.equals("nodesep")) { + return nodesep; + } + if (fieldName.equals("ranksep")) { + return ranksep; + } + return super.getInt(fieldName); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("ht1")) { + return ht1; + } + if (fieldName.equals("ht2")) { + return ht2; + } + return super.getDouble(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("ht1")) { + this.ht1 = data; + return; + } + if (fieldName.equals("ht2")) { + this.ht2 = data; + return; + } + super.setDouble(fieldName, data); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct Agraphinfo_t", + // "{", + // "Agrec_t hdr", + // "layout_t *drawing", + // "textlabel_t *label", + // "boxf bb", + // "pointf border[4]", + // "unsigned char gui_state", + // "unsigned char has_labels", + // "boolean has_images", + // "unsigned char charset", + // "int rankdir", + // "double ht1, ht2", + // "unsigned short flags", + // "void *alg", + // "GVC_t *gvc", + // "void (*cleanup) (graph_t * g)", + // "node_t **neato_nlist", + // "int move", + // "double **dist, **spring, **sum_t, ***t", + // "unsigned short ndim", + // "unsigned short odim", + // "int n_cluster", + // "graph_t **clust", + // "graph_t *dotroot", + // "node_t *nlist", + // "rank_t *rank", + // "graph_t *parent", + // "int level", + // "node_t *minrep, *maxrep", + // "nlist_t comp", + // "node_t *minset, *maxset", + // "long n_nodes", + // "short minrank, maxrank", + // "boolean has_flat_edges", + // "boolean has_sourcerank", + // "boolean has_sinkrank", + // "unsigned char showboxes", + // "fontname_kind fontnames", + // "int nodesep, ranksep", + // "node_t *ln, *rn", + // "node_t *leader, **rankleader", + // "boolean expanded", + // "char installed", + // "char set_type", + // "char label_pos", + // "boolean exact_ranksep", + // "}", + // "Agraphinfo_t"); +} + +// typedef struct Agraphinfo_t { +// Agrec_t hdr; +// /* to generate code */ +// layout_t *drawing; +// textlabel_t *label; /* if the cluster has a title */ +// boxf bb; /* bounding box */ +// pointf border[4]; /* sizes of margins for graph labels */ +// unsigned char gui_state; /* Graph state for GUI ops */ +// unsigned char has_labels; +// boolean has_images; +// unsigned char charset; /* input character set */ +// int rankdir; +// double ht1, ht2; /* below and above extremal ranks */ +// unsigned short flags; +// void *alg; +// GVC_t *gvc; /* context for "globals" over multiple graphs */ +// void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */ +// +// +// /* to place nodes */ +// node_t **neato_nlist; +// int move; +// double **dist, **spring, **sum_t, ***t; +// unsigned short ndim; +// unsigned short odim; +// +// +// /* to have subgraphs */ +// int n_cluster; +// graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */ +// graph_t *dotroot; +// node_t *nlist; +// rank_t *rank; +// graph_t *parent; /* containing cluster (not parent subgraph) */ +// int level; /* cluster nesting level (not node level!) */ +// node_t *minrep, *maxrep; /* set leaders for min and max rank */ +// +// /* fast graph node list */ +// nlist_t comp; +// /* connected components */ +// node_t *minset, *maxset; /* set leaders */ +// long n_nodes; +// /* includes virtual */ +// short minrank, maxrank; +// +// /* various flags */ +// boolean has_flat_edges; +// boolean has_sourcerank; +// boolean has_sinkrank; +// unsigned char showboxes; +// fontname_kind fontnames; /* to override mangling in SVG */ +// +// int nodesep, ranksep; +// node_t *ln, *rn; /* left, right nodes of bounding box */ +// +// /* for clusters */ +// node_t *leader, **rankleader; +// boolean expanded; +// char installed; +// char set_type; +// char label_pos; +// boolean exact_ranksep; +// +// +// } Agraphinfo_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agraph_s.java plantuml-1.2018.9/src/h/ST_Agraph_s.java --- plantuml-1.2017.15/src/h/ST_Agraph_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agraph_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,341 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.OFFSET; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Agraph_s extends UnsupportedStructAndPtr { + + public final ST_Agobj_s base = new ST_Agobj_s(this); + public final ST_Agdesc_s desc = new ST_Agdesc_s(this); + public final ST_dtlink_s link = new ST_dtlink_s(this); + + public ST_dt_s n_seq; /* the node set in sequence */ + public ST_dt_s n_id; /* the node set indexed by ID */ + public ST_dt_s e_seq; /* holders for edge sets */ + public ST_dt_s e_id; /* holders for edge sets */ + public ST_dt_s g_dict; /* subgraphs - descendants */ + public ST_Agraph_s parent; /* subgraphs - ancestors */ + // Agraph_t *parent, *root; /* subgraphs - ancestors */ + public ST_Agraph_s root; /* subgraphs - ancestors */ + public ST_Agclos_s clos; /* shared resources */ + + private final StarStruct _parent; + + public ST_Agraph_s() { + this(null); + } + + public ST_Agraph_s(StarStruct parent) { + this._parent = parent; + } + + public StarStruct getParent() { + return _parent; + } + + @Override + public __struct__ getStruct() { + return this; + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("desc")) { + desc.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public StarStruct amp() { + return new Amp(this); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agraph_s me; + + public Amp(ST_Agraph_s me) { + this.me = me; + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agraph_s.this.getPtr(fieldName); + } + + @Override + public __struct__ getStruct() { + return ST_Agraph_s.this.getStruct(); + } + + @Override + public __struct__ getStruct(String fieldName) { + return ST_Agraph_s.this.getStruct(fieldName); + } + + @Override + public boolean isSameThan(StarStruct other) { + if (other instanceof Amp) { + Amp other2 = (Amp) other; + return this.me == other2.me; + } + if (other instanceof ST_Agraph_s) { + ST_Agraph_s other2 = (ST_Agraph_s) other; + return this.me == other2; + } + return super.isSameThan(other); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agobj_s.class) { + return base.amp(); + } + if (dest == Agraph_s.class) { + return ST_Agraph_s.this; + } + + return super.castTo(dest); + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + OFFSET offset = OFFSET.fromInt(virtualBytes); + // if (offset.toString().equals("h.Agedge_s::seq_link")) { + // return seq_link; + // } + if (offset.toString().equals("h.Agraph_s::link")) { + return link; + } + System.err.println("offset176=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + public ST_Agraph_s getObject() { + return me; + } + + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + OFFSET offset = OFFSET.fromInt(virtualBytes); + // if (offset.toString().equals("h.Agedge_s::seq_link")) { + // return seq_link; + // } + if (offset.toString().equals("h.Agraph_s::link")) { + return link; + } + System.err.println("offset156=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("desc")) { + return desc; + } + return super.getStruct(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("clos")) { + this.clos = (ST_Agclos_s) newData; + return clos; + } + if (fieldName.equals("root")) { + this.root = (ST_Agraph_s) newData; + return root; + } + if (fieldName.equals("n_seq")) { + this.n_seq = (ST_dt_s) newData; + return n_seq; + } + if (fieldName.equals("n_id")) { + this.n_id = (ST_dt_s) newData; + return n_id; + } + if (fieldName.equals("e_seq")) { + this.e_seq = (ST_dt_s) newData; + return e_seq; + } + if (fieldName.equals("e_id")) { + this.e_id = (ST_dt_s) newData; + return e_id; + } + if (fieldName.equals("g_dict")) { + this.g_dict = (ST_dt_s) newData; + return g_dict; + } + if (fieldName.equals("parent")) { + this.parent = (ST_Agraph_s) newData; + return parent; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("clos")) { + return clos; + } + if (fieldName.equals("root")) { + return root; + } + if (fieldName.equals("parent")) { + return parent; + } + if (fieldName.equals("n_id")) { + return n_id; + } + if (fieldName.equals("n_seq")) { + return n_seq; + } + if (fieldName.equals("e_id")) { + return e_id; + } + if (fieldName.equals("e_seq")) { + return e_seq; + } + if (fieldName.equals("g_dict")) { + return g_dict; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agobj_s.class) { + return base; + } + if (dest == Agraph_s.class) { + return this; + } + return super.castTo(dest); + } + + @Override + public boolean isSameThan(StarStruct other) { + ST_Agraph_s other2 = (ST_Agraph_s) other; + return this == other2; + } + + public StarStruct from_link(ST_dtlink_s from) { + if (from == link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_Agraph_s.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + + + // + // public interface ST_Agraph_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct Agraph_s", + // "{", + // "Agobj_t base", + // "Agdesc_t desc", + // "Dtlink_t link", + // "Dict_t *n_seq", + // "Dict_t *n_id", + // "Dict_t *e_seq, *e_id", + // "Dict_t *g_dict", + // "Agraph_t *parent, *root", + // "Agclos_t *clos", + // "}"); +} + +// struct Agraph_s { +// Agobj_t base; +// Agdesc_t desc; +// Dtlink_t link; +// Dict_t *n_seq; /* the node set in sequence */ +// Dict_t *n_id; /* the node set indexed by ID */ +// Dict_t *e_seq, *e_id; /* holders for edge sets */ +// Dict_t *g_dict; /* subgraphs - descendants */ +// Agraph_t *parent, *root; /* subgraphs - ancestors */ +// Agclos_t *clos; /* shared resources */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agrec_s.java plantuml-1.2018.9/src/h/ST_Agrec_s.java --- plantuml-1.2017.15/src/h/ST_Agrec_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agrec_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,197 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_Agrec_s extends UnsupportedStructAndPtr implements WithParent { + + public CString name; + public ST_Agrec_s.Amp next; + + private final StarStruct parent; + + @Override + public void copyDataFrom(__struct__ other) { + if (other instanceof ST_Agedgeinfo_t && parent instanceof ST_Agedgeinfo_t) { + parent.copyDataFrom(other); + return; + } + ST_Agrec_s this2 = (ST_Agrec_s) other; + this.name = this2.name; + this.next = this2.next; + } + + public ST_Agrec_s() { + this(null); + } + + public ST_Agrec_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public StarStruct amp() { + return new Amp(this); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agrec_s me; + + public Amp(ST_Agrec_s me) { + this.me = me; + } + + @Override + public boolean isSameThan(StarStruct other) { + Amp other2 = (Amp) other; + return this.me == other2.me; + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agrec_s.this.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agrec_s.this.getPtr(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + return ST_Agrec_s.this.castTo(dest); + } + + @Override + public CString getCString(String fieldName) { + return ST_Agrec_s.this.getCString(fieldName); + } + + @Override + public void copyDataFrom(__struct__ other) { + ST_Agrec_s.this.copyDataFrom(other); + } + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("name")) { + return name; + } + return super.getCString(fieldName); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agdatadict_s.class && getParent() instanceof ST_Agdatadict_s) { + return (ST_Agdatadict_s) getParent(); + } + if (dest == Agattr_s.class && getParent() instanceof ST_Agattr_s) { + return (ST_Agattr_s) getParent(); + } + if (dest == Agraphinfo_t.class && getParent() instanceof ST_Agraphinfo_t) { + return (ST_Agraphinfo_t) getParent(); + } + if (dest == Agnodeinfo_t.class && getParent() instanceof ST_Agnodeinfo_t) { + return (ST_Agnodeinfo_t) getParent(); + } + if (dest == Agedgeinfo_t.class && getParent() instanceof ST_Agedgeinfo_t) { + return (ST_Agedgeinfo_t) getParent(); + } + System.err.println("dest=" + dest); + System.err.println("getParent=" + getParent().getClass()); + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("name")) { + this.name = (CString) newData; + return name; + } + if (fieldName.equals("next")) { + if (newData instanceof ST_Agrec_s) { + this.next = (ST_Agrec_s.Amp) ((ST_Agrec_s) newData).amp(); + } else { + this.next = (ST_Agrec_s.Amp) newData; + } + return next; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("next")) { + return next; + } + return super.getPtr(fieldName); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agrec_s", + // "{", + // "char *name", + // "Agrec_t *next", + // "}"); +} + +// struct Agrec_s { +// char *name; +// Agrec_t *next; +// /* following this would be any programmer-defined data */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agsubnode_s.java plantuml-1.2018.9/src/h/ST_Agsubnode_s.java --- plantuml-1.2017.15/src/h/ST_Agsubnode_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agsubnode_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,238 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_splineInfo.Amp; +import smetana.core.HardcodedStruct; +import smetana.core.OFFSET; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements HardcodedStruct { + + public final ST_dtlink_s seq_link = new ST_dtlink_s(this); + public final ST_dtlink_s id_link = new ST_dtlink_s(this); + public Agnode_s node; + public ST_dtlink_s.Amp in_id; + public ST_dtlink_s.Amp out_id; + public ST_dtlink_s.Amp in_seq; + public ST_dtlink_s.Amp out_seq; + + public ST_Agsubnode_s() { + this(null); + } + + public ST_Agsubnode_s(StarStruct parent) { + } + + public StarStruct from_id_link(ST_dtlink_s from) { + if (from == id_link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + public StarStruct from_seq_link(ST_dtlink_s from) { + if (from == seq_link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agsubnode_s me; + + public Amp(ST_Agsubnode_s me) { + this.me = me; + } + + @Override + public boolean isSameThan(StarStruct other) { + Amp other2 = (Amp) other; + return this.me == other2.me; + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agsubnode_s::id_link")) { + return id_link.amp(); + } + if (offset.toString().equals("h.Agsubnode_s::seq_link")) { + return seq_link.amp(); + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agsubnode_s.class) { + return this; + } + System.err.println("dest=" + dest); + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agsubnode_s.this.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_Agsubnode_s.this.getPtr(fieldName); + } + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agsubnode_s::id_link")) { + return id_link.amp(); + } + if (offset.toString().equals("h.Agsubnode_s::seq_link")) { + return seq_link.amp(); + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + + @Override + public StarStruct amp() { + return new Amp(this); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == Agsubnode_s.class) { + return this; + } + System.err.println("dest=" + dest); + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("node")) { + this.node = (Agnode_s) newData; + return node; + } + if (fieldName.equals("in_id")) { + this.in_id = (h.ST_dtlink_s.Amp) newData; + return in_id; + } + if (fieldName.equals("out_seq")) { + this.out_seq = (h.ST_dtlink_s.Amp) newData; + return out_seq; + } + if (fieldName.equals("out_id")) { + this.out_id = (h.ST_dtlink_s.Amp) newData; + return out_id; + } + if (fieldName.equals("seq_link")) { + this.seq_link.copyDataFrom(newData); + return seq_link; + } + if (fieldName.equals("in_seq")) { + this.in_seq = (h.ST_dtlink_s.Amp) newData; + return in_seq; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("node")) { + return node; + } + if (fieldName.equals("in_id")) { + return in_id; + } + if (fieldName.equals("out_seq")) { + return out_seq; + } + if (fieldName.equals("out_id")) { + return out_id; + } + if (fieldName.equals("in_seq")) { + return in_seq; + } + return super.getPtr(fieldName); + } + + + // public interface ST_Agsubnode_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct Agsubnode_s", + // "{", + // "Dtlink_t seq_link", + // "Dtlink_t id_link", + // "Agnode_t *node", + // "Dtlink_t *in_id, *out_id", + // "Dtlink_t *in_seq, *out_seq", + // "}"); +} + +// struct Agsubnode_s { /* the node-per-graph-or-subgraph record */ +// Dtlink_t seq_link; /* must be first */ +// Dtlink_t id_link; +// Agnode_t *node; /* the object */ +// Dtlink_t *in_id, *out_id; /* by node/ID for random access */ +// Dtlink_t *in_seq, *out_seq; /* by node/sequence for serial access */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Agsym_s.java plantuml-1.2018.9/src/h/ST_Agsym_s.java --- plantuml-1.2017.15/src/h/ST_Agsym_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Agsym_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,218 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.HardcodedStruct; +import smetana.core.OFFSET; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +//2 38c2s12koxcpi2c7vwl72qrsp + +public class ST_Agsym_s extends UnsupportedStructAndPtr implements HardcodedStruct { + public final ST_dtlink_s link = new ST_dtlink_s(this); + + public CString name; /* attribute's name */ + public CString defval; /* its default value for initialization */ + + public int id; /* its index in attr[] */ + public int kind; /* referent object type */ + public int fixed; /* immutable value */ + public int print; /* always print */ + + public ST_Agsym_s(StarStruct parent) { + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agsym_s::name")) { + return name; + } + if (offset.toString().equals("h.Agsym_s::link")) { + return link; + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + public ST_Agsym_s() { + this(null); + } + + public class Amp extends UnsupportedStarStruct { + + private final ST_Agsym_s me; + + public Amp(ST_Agsym_s me) { + this.me = me; + } + + @Override + public boolean isSameThan(StarStruct other) { + Amp other2 = (Amp) other; + return this.me == other2.me; + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.Agsym_s::name")) { + return name; + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public int getInt(String fieldName) { + return ST_Agsym_s.this.getInt(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_Agsym_s.this.setPtr(fieldName, newData); + } + + @Override + public CString getCString(String fieldName) { + return ST_Agsym_s.this.getCString(fieldName); + } + } + + @Override + public StarStruct amp() { + return new Amp(this); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("name")) { + this.name = (CString) newData; + return name; + } + if (fieldName.equals("defval")) { + this.defval = (CString) newData; + return defval; + } + return super.setPtr(fieldName, newData); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("kind")) { + this.kind = data; + return; + } + if (fieldName.equals("id")) { + this.id = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("kind")) { + return kind; + } + if (fieldName.equals("id")) { + return id; + } + return super.getInt(fieldName); + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("defval")) { + return defval; + } + if (fieldName.equals("name")) { + return name; + } + return super.getCString(fieldName); + } + + public StarStruct from_link(ST_dtlink_s from) { + if (from == link) { + return amp(); + } + throw new IllegalArgumentException(); + } + + // public static List DEFINITION = Arrays.asList( + // "struct Agsym_s", + // "{", + // "Dtlink_t link", + // "char *name", + // "char *defval", + // "int id", + // "unsigned char kind", + // "unsigned char fixed", + // "unsigned char print", + // "}"); +} + +// struct Agsym_s { /* symbol in one of the above dictionaries */ +// Dtlink_t link; +// char *name; /* attribute's name */ +// char *defval; /* its default value for initialization */ +// int id; /* its index in attr[] */ +// unsigned char kind; /* referent object type */ +// unsigned char fixed; /* immutable value */ +// unsigned char print; /* always print */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/STArray.java plantuml-1.2018.9/src/h/STArray.java --- plantuml-1.2017.15/src/h/STArray.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/STArray.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,156 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import java.util.ArrayList; +import java.util.List; + +import smetana.core.UnsupportedArrayOfPtr; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.Area; +import smetana.core.amiga.StarArrayOfPtr; + +public class STArray extends UnsupportedArrayOfPtr { + + private final int pos; + private final List list; + private final Class clazz; + + public STArray(int pos, List list, Class clazz) { + this.pos = pos; + this.list = list; + this.clazz = clazz; + } + + @Override + public int comparePointerInternal(__array_of_ptr__ other) { + STArray other2 = (STArray) other; + if (this.list != other2.list) { + throw new IllegalArgumentException(); + } + return this.pos - other2.pos; + } + + public STArray(int size, int pos, Class clazz) { + this.pos = pos; + this.list = new ArrayList(); + this.clazz = clazz; + for (int i = 0; i < size; i++) { + try { + this.list.add((O) clazz.newInstance()); + } catch (Exception e) { + throw new IllegalStateException(e.toString()); + } + } + } + + @Override + public void realloc(size_t nb) { + realloc(nb.getInternalNb()); + } + + @Override + public void realloc(int nb) { + while (list.size() < nb) { + try { + this.list.add((O) clazz.newInstance()); + } catch (Exception e) { + throw new IllegalStateException(e.toString()); + } + } + } + + @Override + public __array_of_ptr__ plus(int delta) { + return new STArray(pos + delta, this.list, clazz); + } + + @Override + public __array_of_ptr__ move(int delta) { + return new STArray(pos + delta, this.list, clazz); + } + + @Override + public void setStruct(__struct__ value) { + list.get(pos).setStruct(value); + } + + @Override + public __struct__ getStruct() { + return list.get(pos).getStruct(); + // return list.get(pos); + } + + @Override + public __struct__ getStruct(String fieldName) { + return list.get(pos).getStruct(fieldName); + } + + @Override + public __ptr__ getPtr() { + return list.get(pos).amp(); + } + + @Override + public __ptr__ asPtr() { + return new StarArrayOfPtr(this); + } + + @Override + public void setPtr(__ptr__ value) { + list.set(pos, (O) value.getStruct()); + } + + @Override + public Area getInternal(final int idx) { + return list.get(pos + idx); + } + +} diff -Nru plantuml-1.2017.15/src/h/ST_aspect_t.java plantuml-1.2018.9/src/h/ST_aspect_t.java --- plantuml-1.2017.15/src/h/ST_aspect_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_aspect_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,133 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.amiga.StarStruct; + +public class ST_aspect_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_aspect_t() { + this(null); + } + + public ST_aspect_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct aspect_t", + // "{", + // "double targetAR", + // "double combiAR", + private int prevIterations; + private int curIterations; + private int nextIter; + private int nPasses; + private int badGraph; + + // "}", + // "aspect_t"); + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("nextIter")) { + return this.nextIter; + } + if (fieldName.equals("nPasses")) { + return this.nPasses; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("nextIter")) { + this.nextIter = data; + return; + } + if (fieldName.equals("badGraph")) { + this.badGraph = data; + return; + } + if (fieldName.equals("nPasses")) { + this.nPasses = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("badGraph")) { + return this.badGraph != 0; + } + return super.getBoolean(fieldName); + } + +} + +// typedef struct aspect_t { +// double targetAR; /* target aspect ratio */ +// double combiAR; +// int prevIterations; /* no. of iterations in previous pass */ +// int curIterations; /* no. of iterations in current pass */ +// int nextIter; /* dynamically adjusted no. of iterations */ +// int nPasses; /* bound on no. of top-level passes */ +// int badGraph; /* hack: set if graph is disconnected or has +// * clusters. If so, turn off aspect */ +// } aspect_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_bezier.java plantuml-1.2018.9/src/h/ST_bezier.java --- plantuml-1.2017.15/src/h/ST_bezier.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_bezier.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,251 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_bezier extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_bezier() { + this(null); + } + + public ST_bezier(StarStruct parent) { + this.parent = parent; + } + + // "{", + // "pointf *list", + private StarArrayOfPtr list; + + private int size; + private int sflag, eflag; + + private final ST_pointf sp = new ST_pointf(this), ep = new ST_pointf(this); + + // "}", + // "bezier"); + + @Override + public void ___(__struct__ other) { + ST_bezier this2 = (ST_bezier) other; + this.list = this2.list; + this.size = this2.size; + this.sflag = this2.sflag; + this.eflag = this2.eflag; + this.sp.copyDataFrom((__struct__) this2.sp); + this.ep.copyDataFrom((__struct__) this2.ep); + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_bezier.this.getPtr(fieldName); + } + + @Override + public int getInt(String fieldName) { + return ST_bezier.this.getInt(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + return ST_bezier.this.getArrayOfPtr(fieldName); + } + + @Override + public boolean getBoolean(String fieldName) { + return ST_bezier.this.getBoolean(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + return ST_bezier.this.getStruct(fieldName); + } + + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("sflag")) { + return this.sflag != 0; + } + if (fieldName.equals("eflag")) { + return this.eflag != 0; + } + return super.getBoolean(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("list")) { + return list; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("list")) { + this.list = (StarArrayOfPtr) newData; + return list; + } + return super.setPtr(fieldName, newData); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("sp")) { + this.sp.copyDataFrom(newData); + return; + } + if (fieldName.equals("ep")) { + this.ep.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("size")) { + this.size = data; + return; + } + if (fieldName.equals("sflag")) { + this.sflag = data; + return; + } + if (fieldName.equals("eflag")) { + this.eflag = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("size")) { + return this.size; + } + if (fieldName.equals("sflag")) { + return this.sflag; + } + if (fieldName.equals("eflag")) { + return this.eflag; + } + return super.getInt(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("sp")) { + return this.sp; + } + if (fieldName.equals("ep")) { + return this.ep; + } + return super.getStruct(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("list")) { + return this.list.getInternalArray(); + } + return super.getArrayOfPtr(fieldName); + } + + @Override + public __struct__ getStruct() { + return this; + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_bezier.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct bezier { +// pointf *list; +// int size; +// int sflag, eflag; +// pointf sp, ep; +// } bezier; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_boxf.java plantuml-1.2018.9/src/h/ST_boxf.java --- plantuml-1.2017.15/src/h/ST_boxf.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_boxf.java 2018-07-27 21:59:19.000000000 +0000 @@ -46,10 +46,12 @@ package h; import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedSize_t; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; -import smetana.core.__ptr__; import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarStruct; public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct { @@ -71,13 +73,23 @@ // } @Override + public __struct__ getStruct() { + return this; + } + + @Override + public void setStruct(__struct__ value) { + copyDataFrom(value); + } + + @Override public __struct__ getStruct(String fieldName) { - // if (fieldName.equals("LL")) { - // return LL; - // } - // if (fieldName.equals("UR")) { - // return UR; - // } + if (fieldName.equals("LL")) { + return LL; + } + if (fieldName.equals("UR")) { + return UR; + } return super.getStruct(fieldName); } @@ -158,6 +170,15 @@ return new Amp(); } + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_boxf.class)); + } + }; + } + // public interface ST_boxf extends __ptr__ { // public static List DEFINITION = Arrays.asList( // "typedef struct", diff -Nru plantuml-1.2017.15/src/h/ST_deque_t.java plantuml-1.2018.9/src/h/ST_deque_t.java --- plantuml-1.2017.15/src/h/ST_deque_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_deque_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,133 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_deque_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + // "pointnlink_t **pnlps", + public __ptr__ pnlps; + public int pnlpn, fpnlpi, lpnlpi, apex; + + public ST_deque_t() { + this(null); + } + + public ST_deque_t(StarStruct parent) { + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("pnlps")) { + return pnlps; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("pnlps")) { + pnlps = newData; + return pnlps; + } + return super.setPtr(fieldName, newData); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("pnlpn")) { + return pnlpn; + } + if (fieldName.equals("fpnlpi")) { + return fpnlpi; + } + if (fieldName.equals("lpnlpi")) { + return lpnlpi; + } + if (fieldName.equals("apex")) { + return apex; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("pnlpn")) { + pnlpn = data; + return; + } + if (fieldName.equals("fpnlpi")) { + fpnlpi = data; + return; + } + if (fieldName.equals("lpnlpi")) { + lpnlpi = data; + return; + } + if (fieldName.equals("apex")) { + apex = data; + return; + } + super.setInt(fieldName, data); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct deque_t", + // "{", + // "pointnlink_t **pnlps", + // "int pnlpn, fpnlpi, lpnlpi, apex", + // "}", + // "deque_t"); +} + +// typedef struct deque_t { +// pointnlink_t **pnlps; +// int pnlpn, fpnlpi, lpnlpi, apex; +// } deque_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_dtdata_s.java plantuml-1.2018.9/src/h/ST_dtdata_s.java --- plantuml-1.2017.15/src/h/ST_dtdata_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dtdata_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,183 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_dtdisc_s.Amp; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_dtdata_s extends UnsupportedStructAndPtr { + + public int type; /* type of dictionary */ + public ST_dtlink_s.Amp here; /* finger to last search element */ + private __ptr__ _htab; /* hash table */ + // Dtlink_t* _head; /* linked list */ + // } hh; + public int ntab; /* number of hash slots */ + public int size; /* number of objects */ + public int loop; /* number of nested loops */ + public int minp; /* min path before splay, always even */ + + private final StarStruct parent; + + public ST_dtdata_s() { + this(null); + } + + public ST_dtdata_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("here")) { + if (newData instanceof ST_dtlink_s) { + this.here = (ST_dtlink_s.Amp) ((ST_dtlink_s) newData).amp(); + } else { + this.here = (ST_dtlink_s.Amp) newData; + } + return here; + } + if (fieldName.equals("hh._htab")) { + this._htab = newData; + return _htab; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("here")) { + return here; + } + return super.getPtr(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("type")) { + this.type = data; + return; + } + if (fieldName.equals("ntab")) { + this.ntab = data; + return; + } + if (fieldName.equals("size")) { + this.size = data; + return; + } + if (fieldName.equals("loop")) { + this.loop = data; + return; + } + if (fieldName.equals("minp")) { + this.minp = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("type")) { + return type; + } + if (fieldName.equals("size")) { + return size; + } + if (fieldName.equals("minp")) { + return minp; + } + return super.getInt(fieldName); + } + + // public interface ST_dtdata_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct _dtdata_s", + // "{", + // "int type", + // "Dtlink_t* here", + // "union", + // "{", + // "Dtlink_t** _htab", + // "Dtlink_t* _head", + // "}", + // "hh", + // "int ntab", + // "int size", + // "int loop", + // "int minp", + // "}"); +} + +// struct _dtdata_s +// { int type; /* type of dictionary */ +// Dtlink_t* here; /* finger to last search element */ +// union +// { Dtlink_t** _htab; /* hash table */ +// Dtlink_t* _head; /* linked list */ +// } hh; +// int ntab; /* number of hash slots */ +// int size; /* number of objects */ +// int loop; /* number of nested loops */ +// int minp; /* min path before splay, always even */ +// /* for hash dt, > 0: fixed table size */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_dtdisc_s.java plantuml-1.2018.9/src/h/ST_dtdisc_s.java --- plantuml-1.2017.15/src/h/ST_dtdisc_s.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dtdisc_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,6 +45,7 @@ */ package h; +import h.ST_dtmethod_s.Amp; import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; @@ -70,8 +71,12 @@ this(null); } - class Amp extends UnsupportedStarStruct { + @Override + public StarStruct amp() { + return new Amp(this); + } + public class Amp extends UnsupportedStarStruct { private final ST_dtdisc_s parent; public Amp(ST_dtdisc_s me) { @@ -123,12 +128,6 @@ } return super.setPtr(fieldName, newData); } - - } - - @Override - public StarStruct amp() { - return new Amp(this); } } diff -Nru plantuml-1.2017.15/src/h/ST_dthold_s.java plantuml-1.2018.9/src/h/ST_dthold_s.java --- plantuml-1.2017.15/src/h/ST_dthold_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dthold_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,115 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_dthold_s extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_dthold_s() { + this(null); + } + + public ST_dthold_s(StarStruct parent) { + this.parent = parent; + } + + // "struct _dthold_s", + // "{", + // "Dtlink_t hdr", + // "void* obj", + private final ST_dtlink_s hdr = new ST_dtlink_s(this); + private __ptr__ obj; + + // "}"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == _dthold_s.class) { + return this; + } + if (dest == _dtlink_s.class) { + return hdr; + } + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("obj")) { + this.obj = newData; + return this.obj; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("obj")) { + return this.obj; + } + return super.getPtr(fieldName); + } +} + +// struct _dthold_s +// { Dtlink_t hdr; /* header */ +// void* obj; /* user object */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_dtlink_s.java plantuml-1.2018.9/src/h/ST_dtlink_s.java --- plantuml-1.2017.15/src/h/ST_dtlink_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dtlink_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,227 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.OFFSET; +import smetana.core.UnsupportedC; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_dtlink_s extends UnsupportedStructAndPtr implements WithParent { + + public ST_dtlink_s.Amp right; + public ST_dtlink_s.Amp _left; + private final StarStruct parent; + + @Override + public void copyDataFrom(__struct__ other) { + ST_dtlink_s this2 = (ST_dtlink_s) other; + this.right = this2.right; + this._left = this2._left; + } + + public ST_dtlink_s() { + this(null); + } + + public ST_dtlink_s(StarStruct parent) { + this.parent = parent; + } + + public StarStruct getParent() { + return parent; + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == _dtlink_s.class) { + return amp(); + // return this; + } + if (dest == _dthold_s.class) { + return new LinkTo_dthold_s(); + } + return super.castTo(dest); + } + + class LinkTo_dthold_s extends UnsupportedStructAndPtr { + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("obj")) { + return new LinkTo_Obj(); + } + return super.getPtr(fieldName); + } + + } + + class LinkTo_Obj extends UnsupportedStructAndPtr { + + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public __ptr__ castTo(Class dest) { + if (dest == _dtlink_s.class) { + return this; + } + if (dest == refstr_t.class && getParent() instanceof ST_refstr_t) { + return (ST_refstr_t) getParent(); + } + if (dest == _dthold_s.class && getParent() instanceof ST_dthold_s) { + // System.err.println("ITSME"); + // System.err.println("getParent()=" + getParent()); + return (ST_dthold_s) getParent(); + + } + System.err.println("dest=" + dest); + return super.castTo(dest); + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + if (virtualBytes < 0) { + final OFFSET offset = OFFSET.fromInt(-virtualBytes); + if (offset.toString().equals("h.Agsubnode_s::id_link")) { + return ((ST_Agsubnode_s) parent).from_id_link(ST_dtlink_s.this); + } + if (offset.toString().equals("h.Agsubnode_s::seq_link")) { + return ((ST_Agsubnode_s) parent).from_seq_link(ST_dtlink_s.this); + } + if (offset.toString().equals("h.Agsym_s::link")) { + return ((ST_Agsym_s) parent).from_link(ST_dtlink_s.this); + } + if (offset.toString().equals("h.Agedge_s::seq_link")) { + return ((ST_Agedge_s) parent).from_seq_link(ST_dtlink_s.this); + } + if (offset.toString().equals("h.Agedge_s::id_link")) { + return ((ST_Agedge_s) parent).from_id_link(ST_dtlink_s.this); + } + if (offset.toString().equals("h.Agraph_s::link")) { + return ((ST_Agraph_s) parent).from_link(ST_dtlink_s.this); + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.refstr_t::s") && parent instanceof ST_refstr_t) { + return ((ST_refstr_t) parent).to_s(ST_dtlink_s.this); + + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_dtlink_s.this.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_dtlink_s.this.getPtr(fieldName); + } + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("hl._left")) { + this._left = (ST_dtlink_s.Amp) newData; + return _left; + } + if (fieldName.equals("right")) { + this.right = (ST_dtlink_s.Amp) newData; + return right; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("hl._left")) { + return _left; + } + if (fieldName.equals("right")) { + return right; + } + return super.getPtr(fieldName); + } + + // public interface ST_dtlink_s extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "struct _dtlink_s", + // "{", + // "Dtlink_t* right", + // "union", + // "{", + // "unsigned int _hash", + // "Dtlink_t* _left", + // "}", + // "hl", + // "}"); +} + +// struct _dtlink_s +// { Dtlink_t* right; /* right child */ +// union +// { unsigned int _hash; /* hash value */ +// Dtlink_t* _left; /* left child */ +// } hl; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_dtmethod_s.java plantuml-1.2018.9/src/h/ST_dtmethod_s.java --- plantuml-1.2017.15/src/h/ST_dtmethod_s.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dtmethod_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -47,11 +47,11 @@ import smetana.core.CFunction; import smetana.core.UnsupportedStarStruct; -import smetana.core.UnsupportedStruct; +import smetana.core.UnsupportedStructAndPtr; import smetana.core.__ptr__; import smetana.core.amiga.StarStruct; -public class ST_dtmethod_s extends UnsupportedStruct { +public class ST_dtmethod_s extends UnsupportedStructAndPtr { public CFunction searchf; public int type; @@ -72,30 +72,33 @@ @Override public StarStruct amp() { - return new UnsupportedStarStruct() { - @Override - public int getInt(String fieldName) { - if (fieldName.equals("type")) { - return type; - } - return super.getInt(fieldName); + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public int getInt(String fieldName) { + if (fieldName.equals("type")) { + return type; } + return super.getInt(fieldName); + } - @Override - public __ptr__ getPtr(String fieldName) { - if (fieldName.equals("searchf")) { - return searchf; - } - return super.getPtr(fieldName); + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("searchf")) { + return searchf; } + return super.getPtr(fieldName); + } - @Override - public Object call(String fieldName, Object... args) { - if (fieldName.equals("searchf")) { - return searchf.exe(args); - } - return super.call(fieldName, args); + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("searchf")) { + return searchf.exe(args); } - }; + return super.call(fieldName, args); + } } + } \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_dt_s.java plantuml-1.2018.9/src/h/ST_dt_s.java --- plantuml-1.2017.15/src/h/ST_dt_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_dt_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,206 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct { + + public CFunction searchf;/* search function */ + + public ST_dtdisc_s.Amp disc; /* method to manipulate objs */ + public ST_dtdata_s data; /* sharable data */ + public CFunction memoryf;/* function to alloc/free memory */ + public ST_dtmethod_s.Amp meth; /* dictionary method */ + + public int type; /* type information */ + public int nview; /* number of parent view dictionaries */ + public ST_dt_s view; /* next on viewpath */ + public ST_dt_s walk; /* dictionary being walked */ + public __ptr__ user; /* for user's usage */ + + public ST_dt_s() { + this(null); + } + + public ST_dt_s(StarStruct parent) { + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("searchf")) { + this.searchf = (CFunction) newData; + return searchf; + } + if (fieldName.equals("meth")) { + this.meth = (ST_dtmethod_s.Amp) newData; + return meth; + } + if (fieldName.equals("disc")) { + this.disc = (ST_dtdisc_s.Amp) newData; + return disc; + } + if (fieldName.equals("memoryf")) { + this.memoryf = (CFunction) newData; + return memoryf; + } + if (fieldName.equals("view")) { + this.view = (ST_dt_s) newData; + return view; + } + if (fieldName.equals("walk")) { + this.walk = (ST_dt_s) newData; + return walk; + } + if (fieldName.equals("user")) { + this.user = newData; + return user; + } + if (fieldName.equals("data")) { + this.data = (ST_dtdata_s) newData; + return data; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("disc")) { + return disc; + } + if (fieldName.equals("data")) { + return data; + } + if (fieldName.equals("meth")) { + return meth; + } + if (fieldName.equals("view")) { + return view; + } + return super.getPtr(fieldName); + } + + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("memoryf")) { + return this.memoryf.exe(args); + } + if (fieldName.equals("searchf")) { + return this.searchf.exe(args); + } + return super.call(fieldName, args); + } + + @Override + public __ptr__ castTo(Class dest) { + if (dest == _dt_s.class) { + return this; + } + return super.castTo(dest); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("type")) { + this.type = data; + return; + } + if (fieldName.equals("nview")) { + this.nview = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("type")) { + return type; + } + if (fieldName.equals("nview")) { + return nview; + } + return super.getInt(fieldName); + } + + @Override + public boolean isSameThan(StarStruct other) { + ST_dt_s other2 = (ST_dt_s) other; + return this == other2; + } + + // public static List DEFINITION = Arrays.asList( + // "struct _dt_s", + // "{", + // "Dtsearch_f searchf", + // "Dtdisc_t* disc", + // "Dtdata_t* data", + // "Dtmemory_f memoryf", + // "Dtmethod_t* meth", + // "int type", + // "int nview", + // "Dt_t* view", + // "Dt_t* walk", + // "void* user", + // "}"); +} + +// struct _dt_s +// { Dtsearch_f searchf;/* search function */ +// Dtdisc_t* disc; /* method to manipulate objs */ +// Dtdata_t* data; /* sharable data */ +// Dtmemory_f memoryf;/* function to alloc/free memory */ +// Dtmethod_t* meth; /* dictionary method */ +// int type; /* type information */ +// int nview; /* number of parent view dictionaries */ +// Dt_t* view; /* next on viewpath */ +// Dt_t* walk; /* dictionary being walked */ +// void* user; /* for user's usage */ +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_EMPTY.java plantuml-1.2018.9/src/h/ST_EMPTY.java --- plantuml-1.2017.15/src/h/ST_EMPTY.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_EMPTY.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,73 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.amiga.StarStruct; + +public class ST_EMPTY extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_EMPTY() { + this(null); + } + + public ST_EMPTY(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + +} diff -Nru plantuml-1.2017.15/src/h/ST_fontinfo.java plantuml-1.2018.9/src/h/ST_fontinfo.java --- plantuml-1.2017.15/src/h/ST_fontinfo.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_fontinfo.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,164 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_fontinfo extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_fontinfo() { + this(null); + } + + public ST_fontinfo(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public void setDouble(String fieldName, double data) { + ST_fontinfo.this.setDouble(fieldName, data); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_fontinfo.this.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_fontinfo.this.getPtr(fieldName); + } + + @Override + public double getDouble(String fieldName) { + return ST_fontinfo.this.getDouble(fieldName); + } + + @Override + public CString getCString(String fieldName) { + return ST_fontinfo.this.getCString(fieldName); + } + + } + + // "struct fontinfo", + // "{", + private double fontsize; + private CString fontname; + private CString fontcolor; + + // "}"); + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("fontsize")) { + return this.fontsize; + } + return super.getDouble(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("fontsize")) { + this.fontsize = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("fontname")) { + return this.fontname; + } + if (fieldName.equals("fontcolor")) { + return this.fontcolor; + } + return super.getCString(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("fontname")) { + return this.fontname; + } + if (fieldName.equals("fontcolor")) { + return this.fontcolor; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("fontname")) { + return this.fontname; + } + if (fieldName.equals("fontcolor")) { + return this.fontcolor; + } + return super.setPtr(fieldName, newData); + } + +} + +// struct fontinfo { +// double fontsize; +// char *fontname; +// char *fontcolor; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_GVCOMMON_t.java plantuml-1.2018.9/src/h/ST_GVCOMMON_t.java --- plantuml-1.2017.15/src/h/ST_GVCOMMON_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_GVCOMMON_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,142 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_GVCOMMON_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + // "typedef struct GVCOMMON_s", + // "{", + private __ptr__ info; + // "char *cmdname", + // "int verbose", + // "boolean config, auto_outfile_names", + // "void (*errorfn) (const char *fmt, ...)", + private CFunction errorfn; + // "const char **show_boxes", + // "const char **lib", + // "int viewNum", + // "const lt_symlist_t *builtins", + private __ptr__ builtins; + private boolean demand_loading; + // "}", + // "GVCOMMON_t"); + + private final StarStruct parent; + + public ST_GVCOMMON_t() { + this(null); + } + + public ST_GVCOMMON_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("info")) { + this.info = newData; + return newData; + } + if (fieldName.equals("errorfn")) { + this.errorfn = (CFunction) newData; + return newData; + } + if (fieldName.equals("builtins")) { + this.builtins = newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("builtins") && builtins == null) { + return builtins; + } + return super.getPtr(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("demand_loading")) { + this.demand_loading = data; + return; + } + super.setBoolean(fieldName, data); + } + +} + +// typedef struct GVCOMMON_s { +// char **info; +// char *cmdname; +// int verbose; +// boolean config, auto_outfile_names; +// void (*errorfn) (const char *fmt, ...); +// const char **show_boxes; /* emit code for correct box coordinates */ +// const char **lib; +// +// /* rendering state */ +// int viewNum; /* current view - 1 based count of views, +// all pages in all layers */ +// const lt_symlist_t *builtins; +// int demand_loading; +// } GVCOMMON_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_GVC_s.java plantuml-1.2018.9/src/h/ST_GVC_s.java --- plantuml-1.2017.15/src/h/ST_GVC_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_GVC_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,212 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_GVC_s extends UnsupportedStructAndPtr implements HardcodedStruct { + + // "struct GVC_s", + // "{", + private final ST_GVCOMMON_t common = new ST_GVCOMMON_t(this); + // "char *config_path", + private int config_found; + // "char **input_filenames", + // "GVG_t *gvgs", + // "GVG_t *gvg", + // "gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]", + // "gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]", + // "gvplugin_package_t *packages", + // "size_t (*write_fn) (GVJ_t *job, const char *s, size_t len)", + // "Dtdisc_t textfont_disc", + // "Dt_t *textfont_dt", + // "gvplugin_active_textlayout_t textlayout", + // "GVJ_t *jobs", + // "GVJ_t *job", + // "graph_t *g", + private final ST_gvplugin_active_layout_t layout = new ST_gvplugin_active_layout_t(); + // "char *graphname", + // "GVJ_t *active_jobs", + // "char *pagedir", + // "pointf margin", + // "pointf pad", + // "pointf pageSize", + // "point pb", + // "boxf bb", + // "int rotation", + // "boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation", + // "char *layerDelims", + // "char *layerListDelims", + // "char *layers", + // "char **layerIDs", + // "int numLayers", + // "int *layerlist", + // "char *defaultfontname", + // "double defaultfontsize", + // "char **defaultlinestyle", + // "gvcolor_t bgcolor", + // "int fontrenaming", + // "}"); + + private final StarStruct parent; + + public ST_GVC_s() { + this(null); + } + + public ST_GVC_s(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("common")) { + return common; + } + if (fieldName.equals("layout")) { + return layout; + } + return super.getStruct(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("config_found")) { + this.config_found = data; + return; + } + super.setInt(fieldName, data); + } + +} + +// struct GVC_s { +// GVCOMMON_t common; +// +// char *config_path; +// boolean config_found; +// +// /* gvParseArgs */ +// char **input_filenames; /* null terminated array of input filenames */ +// +// /* gvNextInputGraph() */ +// GVG_t *gvgs; /* linked list of graphs */ +// GVG_t *gvg; /* current graph */ +// +// /* plugins */ +// +// /* APIS expands to "+1 +1 ... +1" to give the number of APIs */ +// gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]; /* array of linked-list of plugins per api */ +// gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]; /* array of current plugins per api */ +// +// gvplugin_package_t *packages; /* list of available packages */ +// +// /* externally provided write() displine */ +// size_t (*write_fn) (GVJ_t *job, const char *s, size_t len); +// +// /* fonts and textlayout */ +// Dtdisc_t textfont_disc; +// Dt_t *textfont_dt; +// gvplugin_active_textlayout_t textlayout; /* always use best avail for all jobs */ +// // void (*free_layout) (void *layout); /* function for freeing layouts (mostly used by pango) */ +// +// /* FIXME - everything below should probably move to GVG_t */ +// +// /* gvrender_config() */ +// GVJ_t *jobs; /* linked list of jobs */ +// GVJ_t *job; /* current job */ +// +// graph_t *g; /* current graph */ +// +// /* gvrender_begin_job() */ +// gvplugin_active_layout_t layout; +// +// char *graphname; /* name from graph */ +// GVJ_t *active_jobs; /* linked list of active jobs */ +// +// /* pagination */ +// char *pagedir; /* pagination order */ +// pointf margin; /* margins in graph units */ +// pointf pad; /* pad in graph units */ +// pointf pageSize; /* pageSize in graph units, not including margins */ +// point pb; /* page size - including margins (inches) */ +// boxf bb; /* graph bb in graph units, not including margins */ +// int rotation; /* rotation - 0 = portrait, 90 = landscape */ +// boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation; +// +// /* layers */ +// char *layerDelims; /* delimiters in layer names */ +// char *layerListDelims; /* delimiters between layer ranges */ +// char *layers; /* null delimited list of layer names */ +// char **layerIDs; /* array of layer names */ +// int numLayers; /* number of layers */ +// int *layerlist; +// +// /* default font */ +// char *defaultfontname; +// double defaultfontsize; +// +// /* default line style */ +// char **defaultlinestyle; +// +// /* render defaults set from graph */ +// gvcolor_t bgcolor; /* background color */ +// +// /* whether to mangle font names (at least in SVG), usually false */ +// int fontrenaming; +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_gvlayout_engine_s.java plantuml-1.2018.9/src/h/ST_gvlayout_engine_s.java --- plantuml-1.2017.15/src/h/ST_gvlayout_engine_s.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_gvlayout_engine_s.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,117 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_gvlayout_engine_s extends UnsupportedStructAndPtr { + + private CFunction layout; + private CFunction cleanup; + + // "struct gvlayout_engine_s", + // "{", + // "void (*layout) (graph_t * g)", + // "void (*cleanup) (graph_t * g)", + // "}"); + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("layout")) { + this.layout = (CFunction) newData; + return newData; + } + if (fieldName.equals("cleanup")) { + this.cleanup = (CFunction) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("layout")) { + return layout; + } + if (fieldName.equals("cleanup")) { + return cleanup; + } + return super.getPtr(fieldName); + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_gvlayout_engine_s.this.getPtr(fieldName); + } + + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("layout")) { + return layout.exe(args); + } + if (fieldName.equals("cleanup")) { + return cleanup.exe(args); + } + return super.call(fieldName, args); + } + } +} + +// struct gvlayout_engine_s { +// void (*layout) (graph_t * g); +// void (*cleanup) (graph_t * g); +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_gvlayout_features_t.java plantuml-1.2018.9/src/h/ST_gvlayout_features_t.java --- plantuml-1.2017.15/src/h/ST_gvlayout_features_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_gvlayout_features_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,90 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.amiga.StarStruct; + +public class ST_gvlayout_features_t extends UnsupportedStructAndPtr { + + // "typedef struct", + // "{", + private int flags; + + // "}", + // "gvlayout_features_t"); + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("flags")) { + this.flags = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("flags")) { + return flags; + } + return super.getInt(fieldName); + } + } + +} + +// typedef struct { +// int flags; +// } gvlayout_features_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_gvplugin_active_layout_t.java plantuml-1.2018.9/src/h/ST_gvplugin_active_layout_t.java --- plantuml-1.2017.15/src/h/ST_gvplugin_active_layout_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_gvplugin_active_layout_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,104 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; + +public class ST_gvplugin_active_layout_t extends UnsupportedStructAndPtr { + + private ST_gvlayout_engine_s.Amp engine; + private int id; + private ST_gvlayout_features_t.Amp features; + private CString type; + + // "}", + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("type")) { + this.type = (CString) newData; + return newData; + } + if (fieldName.equals("engine")) { + this.engine = (ST_gvlayout_engine_s.Amp) newData; + return newData; + } + if (fieldName.equals("features")) { + this.features = (ST_gvlayout_features_t.Amp) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("engine")) { + return engine; + } + if (fieldName.equals("features")) { + return features; + } + return super.getPtr(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("id")) { + this.id = data; + return; + } + super.setInt(fieldName, data); + } +} + +// typedef struct gvplugin_active_layout_s { +// gvlayout_engine_t *engine; +// int id; +// gvlayout_features_t *features; +// const char *type; +// } gvplugin_active_layout_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_gvplugin_installed_t.java plantuml-1.2018.9/src/h/ST_gvplugin_installed_t.java --- plantuml-1.2017.15/src/h/ST_gvplugin_installed_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_gvplugin_installed_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,140 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_gvplugin_installed_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_gvplugin_installed_t() { + this(null); + } + + public ST_gvplugin_installed_t(StarStruct parent) { + this.parent = parent; + } + + private int id; + private CString type; + private int quality; + + private ST_gvlayout_engine_s.Amp engine; + private ST_gvlayout_features_t.Amp features; + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("id")) { + this.id = data; + return; + } + if (fieldName.equals("quality")) { + this.quality = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("id")) { + return this.id; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("type")) { + this.type = (CString) newData; + return newData; + } + if (fieldName.equals("engine")) { + this.engine = (ST_gvlayout_engine_s.Amp) newData; + return newData; + } + if (fieldName.equals("features")) { + this.features = (ST_gvlayout_features_t.Amp) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("type")) { + return type; + } + if (fieldName.equals("engine")) { + return engine; + } + if (fieldName.equals("features")) { + return features; + } + return super.getPtr(fieldName); + } + +} + +// typedef struct { +// int id; /* an id that is only unique within a package +// of plugins of the same api. +// A renderer-type such as "png" in the cairo package +// has an id that is different from the "ps" type +// in the same package */ +// const char *type; /* a string name, such as "png" or "ps" that +// distinguishes different types withing the same +// (renderer in this case) */ +// int quality; /* an arbitrary integer used for ordering plugins of +// the same type from different packages */ +// void *engine; /* pointer to the jump table for the plugin */ +// void *features; /* pointer to the feature description +// void* because type varies by api */ +// } gvplugin_installed_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_HDict_t.java plantuml-1.2018.9/src/h/ST_HDict_t.java --- plantuml-1.2017.15/src/h/ST_HDict_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_HDict_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,91 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_HDict_t.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_HDict_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_HDict_t() { + this(null); + } + + public ST_HDict_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + // "typedef struct obyh", + // "{", + // "Dtlink_t link", + // "int key", + // "Leaf_t d", + // "}", + // "HDict_t"); +} + +// typedef struct obyh { +// Dtlink_t link; +// int key; +// Leaf_t d; +// } HDict_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_IMapEntry_t.java plantuml-1.2018.9/src/h/ST_IMapEntry_t.java --- plantuml-1.2017.15/src/h/ST_IMapEntry_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_IMapEntry_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,93 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_IMapEntry_t.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_IMapEntry_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_IMapEntry_t() { + this(null); + } + + public ST_IMapEntry_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + // "typedef struct IMapEntry_s", + // "{", + // "Dtlink_t namedict_link", + // "Dtlink_t iddict_link", + // "unsigned long id", + // "char *str", + // "}", + // "IMapEntry_t"); +} + +// typedef struct IMapEntry_s { +// Dtlink_t namedict_link; +// Dtlink_t iddict_link; +// unsigned long id; +// char *str; +// } IMapEntry_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_inside_t.java plantuml-1.2018.9/src/h/ST_inside_t.java --- plantuml-1.2017.15/src/h/ST_inside_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_inside_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,150 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.MutableDoublePtr; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfStruct; +import smetana.core.amiga.StarStruct; + +public class ST_inside_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_inside_t() { + this(null); + } + + public ST_inside_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef union inside_t", + // "{", + // "struct", + // "{", + // "pointf* p", + private StarArrayOfStruct p; + private MutableDoublePtr r; + // "double* r", + // "}", + // "a", + // "struct", + // "{", + // "node_t* n", + private ST_Agnode_s n; + private ST_boxf bp; + + // "boxf* bp", + // "}", + // "s", + // "}", + // "inside_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public __ptr__ getPtr(String fieldName) { + return ST_inside_t.this.getPtr(fieldName); + } + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("s.n")) { + this.n = (ST_Agnode_s) newData; + return this.n; + } + if (fieldName.equals("s.bp")) { + this.bp = (ST_boxf) newData; + return this.bp; + } + if (fieldName.equals("a.p")) { + this.p = (StarArrayOfStruct) newData; + return this.p; + } + if (fieldName.equals("a.r")) { + this.r = (MutableDoublePtr) newData; + return this.r; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("s.n")) { + return this.n; + } + if (fieldName.equals("s.bp")) { + return this.bp; + } + if (fieldName.equals("a.p")) { + return this.p; + } + if (fieldName.equals("a.r")) { + return this.r; + } + return super.getPtr(fieldName); + } + +} + +// typedef union inside_t { +// struct { +// pointf* p; +// double* r; +// } a; +// struct { +// node_t* n; +// boxf* bp; +// } s; +// } inside_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_label_params_t.java plantuml-1.2018.9/src/h/ST_label_params_t.java --- plantuml-1.2017.15/src/h/ST_label_params_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_label_params_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,110 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_label_params_t.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_label_params_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_label_params_t() { + this(null); + } + + public ST_label_params_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef struct", + // "{", + private final ST_boxf bb = new ST_boxf(this); + private boolean force; + + // "}", + // "label_params_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("bb")) { + this.bb.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("force")) { + this.force = data; + return; + } + super.setBoolean(fieldName, data); + } +} + +// typedef struct { +// boxf bb; /* Bounding box of all objects */ +// unsigned char force; /* If true, all labels must be placed */ +// } label_params_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_layout_t.java plantuml-1.2018.9/src/h/ST_layout_t.java --- plantuml-1.2017.15/src/h/ST_layout_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_layout_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,192 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_layout_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_layout_t() { + this(null); + } + + public ST_layout_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + } + + private double quantum; + private double scale; + private double ratio; + private double dpi; + + private ST_pointf margin = new ST_pointf(this); + private ST_pointf page = new ST_pointf(this); + private ST_pointf size = new ST_pointf(this); + + private boolean filled; + private boolean landscape; + private boolean centered; + + // "ratio_t ratio_kind", + private int ratio_kind; + // "void* xdots", + // "char* id", + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("xdots") && newData == null) { + return null; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("margin")) { + return margin; + } + if (fieldName.equals("page")) { + return page; + } + if (fieldName.equals("size")) { + return size; + } + return super.getStruct(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("filled")) { + this.filled = data; + return; + } + if (fieldName.equals("landscape")) { + this.landscape = data; + return; + } + if (fieldName.equals("centered")) { + this.centered = data; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("quantum")) { + return this.quantum; + } + if (fieldName.equals("scale")) { + return this.scale; + } + if (fieldName.equals("ratio")) { + return this.ratio; + } + if (fieldName.equals("dpi")) { + return this.dpi; + } + return super.getDouble(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("quantum")) { + this.quantum = data; + return; + } + if (fieldName.equals("scale")) { + this.scale = data; + return; + } + if (fieldName.equals("ratio")) { + this.ratio = data; + return; + } + if (fieldName.equals("dpi")) { + this.dpi = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("ratio_kind")) { + return this.ratio_kind; + } + return super.getInt(fieldName); + } +} + +// typedef struct layout_t { +// double quantum; +// double scale; +// double ratio; /* set only if ratio_kind == R_VALUE */ +// double dpi; +// pointf margin; +// pointf page; +// pointf size; +// boolean filled; +// boolean landscape; +// boolean centered; +// ratio_t ratio_kind; +// void* xdots; +// char* id; +// } layout_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_nodequeue.java plantuml-1.2018.9/src/h/ST_nodequeue.java --- plantuml-1.2017.15/src/h/ST_nodequeue.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_nodequeue.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,145 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_nodequeue extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_nodequeue() { + this(null); + } + + public ST_nodequeue(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct nodequeue", + // "{", + // "node_t **store, **limit, **head, **tail", + private StarArrayOfPtr store; + private StarArrayOfPtr tail; + private StarArrayOfPtr head; + private StarArrayOfPtr limit; + + // "}", + // "nodequeue"); + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("store")) { + this.store = (StarArrayOfPtr) newData; + return this.store; + } + if (fieldName.equals("tail")) { + this.tail = (StarArrayOfPtr) newData; + return this.tail; + } + if (fieldName.equals("head")) { + this.head = (StarArrayOfPtr) newData; + return this.head; + } + if (fieldName.equals("limit")) { + this.limit = (StarArrayOfPtr) newData; + return this.limit; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("store")) { + return this.store.getInternalArray(); + } + if (fieldName.equals("tail")) { + return this.tail.getInternalArray(); + } + if (fieldName.equals("head")) { + return this.head.getInternalArray(); + } + if (fieldName.equals("limit")) { + return this.limit.getInternalArray(); + } + return super.getArrayOfPtr(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("store")) { + return this.store; + } + if (fieldName.equals("tail")) { + return this.tail; + } + if (fieldName.equals("head")) { + return this.head; + } + if (fieldName.equals("limit")) { + return this.limit; + } + return super.getPtr(fieldName); + } +} + +// typedef struct nodequeue { +// node_t **store, **limit, **head, **tail; +// } nodequeue; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Node_t___.java plantuml-1.2018.9/src/h/ST_Node_t___.java --- plantuml-1.2017.15/src/h/ST_Node_t___.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Node_t___.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,90 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; +import h.ST_Node_t___.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_Node_t___ extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_Node_t___() { + this(null); + } + + public ST_Node_t___(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } +//"typedef struct Node", +//"{", +//"int count", +//"int level", +//"struct Branch branch[64]", +//"}", +//"Node_t"); +} + +// typedef struct Node { +// int count; +// int level; /* 0 is leaf, others positive */ +// struct Branch branch[64]; +// } Node_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_object_t.java plantuml-1.2018.9/src/h/ST_object_t.java --- plantuml-1.2017.15/src/h/ST_object_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_object_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,168 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_object_t.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_object_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_object_t() { + this(null); + } + + public ST_object_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef struct", + // "{", + private final ST_pointf pos = new ST_pointf(this); + private final ST_pointf sz = new ST_pointf(this); + // "xlabel_t *lbl", + private StarArrayOfPtr lbl; + + // "}", + // "object_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("pos")) { + this.pos.copyDataFrom(newData); + return newData; + } + if (fieldName.equals("lbl")) { + this.lbl = (StarArrayOfPtr) newData; + return this.lbl; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("pos")) { + return this.pos; + } + if (fieldName.equals("sz")) { + return this.sz; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("pos")) { + this.pos.copyDataFrom(newData); + return; + } + if (fieldName.equals("sz")) { + this.sz.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("pos")) { + return this.pos; + } + if (fieldName.equals("sz")) { + return this.sz; + } + return super.getPtr(fieldName); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_object_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct { +// pointf pos; /* Position of lower-left corner of object */ +// pointf sz; /* Size of object; may be zero for a point */ +// xlabel_t *lbl; /* Label attached to object, or NULL */ +// } object_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_pack_info.java plantuml-1.2018.9/src/h/ST_pack_info.java --- plantuml-1.2017.15/src/h/ST_pack_info.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_pack_info.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,161 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_pack_info.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_pack_info extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_pack_info() { + this(null); + } + + public ST_pack_info(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct", + // "{", + // "float aspect", + private int sz; + private int margin; + private int doSplines; + // "pack_mode mode", + private int mode; + private __ptr__ fixed; + // "boolean *fixed", + // "packval_t* vals", + private __ptr__ vals; + private int flags; + + // "}", + // "pack_info"); + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("flags")) { + return this.flags; + } + if (fieldName.equals("mode")) { + return this.mode; + } + if (fieldName.equals("sz")) { + return this.sz; + } + if (fieldName.equals("margin")) { + return this.margin; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("flags")) { + this.flags = data; + return; + } + if (fieldName.equals("mode")) { + this.mode = data; + return; + } + if (fieldName.equals("sz")) { + this.sz = data; + return; + } + if (fieldName.equals("margin")) { + this.margin = data; + return; + } + if (fieldName.equals("doSplines")) { + this.doSplines = data; + return; + } + if (fieldName.equals("fixed") && data == 0) { + this.fixed = null; + return; + } + super.setInt(fieldName, data); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("vals") && newData == null) { + this.vals = newData; + return vals; + } + return super.setPtr(fieldName, newData); + } +} + +// typedef struct { +// float aspect; /* desired aspect ratio */ +// int sz; /* row/column size size */ +// unsigned int margin; /* margin left around objects, in points */ +// int doSplines; /* use splines in constructing graph shape */ +// pack_mode mode; /* granularity and method */ +// boolean *fixed; /* fixed[i] == true implies g[i] should not be moved */ +// packval_t* vals; /* for arrays, sort numbers */ +// int flags; +// } pack_info; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_pathend_t.java plantuml-1.2018.9/src/h/ST_pathend_t.java --- plantuml-1.2017.15/src/h/ST_pathend_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_pathend_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,210 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedArrayOfStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_struct__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_pathend_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_pathend_t() { + this(null); + } + + public ST_pathend_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef struct pathend_t", + // "{", + private final ST_boxf nb = new ST_boxf(this); + private final ST_pointf np = new ST_pointf(this); + private int sidemask; + private int boxn; + + private final ST_boxf boxes[] = new ST_boxf[] { new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), + new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), + new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), + new ST_boxf(), new ST_boxf() }; + + // "boxf boxes[20]", + // "}", + // "pathend_t"); + + class ArrayOfTwenty extends UnsupportedArrayOfStruct { + + final private int pos; + + public ArrayOfTwenty(int pos) { + this.pos = pos; + } + + @Override + public __array_of_struct__ plus(int delta) { + return new ArrayOfTwenty(pos + delta); + } + + @Override + public __struct__ getStruct() { + return boxes[pos]; + } + + @Override + public void setStruct(__struct__ value) { + boxes[pos].copyDataFrom(value); + } + + @Override + public double getDouble(String fieldName) { + return getStruct().getDouble(fieldName); + } + + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public void setStruct(String fieldName, __struct__ newData) { + ST_pathend_t.this.setStruct(fieldName, newData); + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + return ST_pathend_t.this.getArrayOfStruct(fieldName); + } + + @Override + public int getInt(String fieldName) { + return ST_pathend_t.this.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + ST_pathend_t.this.setInt(fieldName, data); + } + + @Override + public __struct__ getStruct(String fieldName) { + return ST_pathend_t.this.getStruct(fieldName); + } + + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("np")) { + this.np.___(newData); + return; + } + if (fieldName.equals("nb")) { + this.nb.___(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("nb")) { + return this.nb; + } + if (fieldName.equals("np")) { + return this.np; + } + return super.getStruct(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("boxn")) { + return this.boxn; + } + if (fieldName.equals("sidemask")) { + return this.sidemask; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("boxn")) { + this.boxn = data; + return; + } + if (fieldName.equals("sidemask")) { + this.sidemask = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + if (fieldName.equals("boxes")) { + return new ArrayOfTwenty(0); + } + return super.getArrayOfStruct(fieldName); + } + +} + +// typedef struct pathend_t { +// boxf nb; /* the node box */ +// pointf np; /* node port */ +// int sidemask; +// int boxn; +// boxf boxes[20]; +// } pathend_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_path.java plantuml-1.2018.9/src/h/ST_path.java --- plantuml-1.2017.15/src/h/ST_path.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_path.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,160 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_path extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_path() { + this(null); + } + + public ST_path(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct path", + // "{", + final ST_port start = new ST_port(this), end = new ST_port(this); + private int nbox; + // "boxf *boxes", + private StarArrayOfPtr boxes; + + private ST_Agedge_s.Amp data; + + // "void *data", + // "}", + // "path"); + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("boxes")) { + this.boxes = (StarArrayOfPtr) newData; + return this.boxes; + } + if (fieldName.equals("data")) { + if (newData instanceof ST_Agedge_s) { + newData = ((ST_Agedge_s) newData).amp(); + } + this.data = (ST_Agedge_s.Amp) newData; + return this.data; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("data")) { + return this.data; + } + if (fieldName.equals("boxes")) { + return this.boxes; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("start")) { + return start; + } + if (fieldName.equals("end")) { + return end; + } + return super.getStruct(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("boxes")) { + return boxes.getInternalArray(); + } + return super.getArrayOfPtr(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("nbox")) { + return this.nbox; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("nbox")) { + this.nbox = data; + return; + } + super.setInt(fieldName, data); + } + +} + +// typedef struct path { /* internal specification for an edge spline */ +// port start, end; +// int nbox; /* number of subdivisions */ +// boxf *boxes; /* rectangular regions of subdivision */ +// void *data; +// } path; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_Pedge_t.java plantuml-1.2018.9/src/h/ST_Pedge_t.java --- plantuml-1.2017.15/src/h/ST_Pedge_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Pedge_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,135 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_Pedge_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_Pedge_t() { + this(null); + } + + public ST_Pedge_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef struct Pedge_t", + // "{", + // "Ppoint_t a, b", + private final ST_pointf a = new ST_pointf(this); + private final ST_pointf b = new ST_pointf(this); + + // "}", + // "Pedge_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("a")) { + return a; + } + if (fieldName.equals("b")) { + return b; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("a")) { + this.a.copyDataFrom(newData); + return; + } + if (fieldName.equals("b")) { + this.b.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_Pedge_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct Pedge_t { +// Ppoint_t a, b; +// } Pedge_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_pointf.java plantuml-1.2018.9/src/h/ST_pointf.java --- plantuml-1.2017.15/src/h/ST_pointf.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_pointf.java 2018-07-27 21:59:19.000000000 +0000 @@ -46,11 +46,13 @@ package h; import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedSize_t; import smetana.core.UnsupportedStarStruct; import smetana.core.UnsupportedStructAndPtr; import smetana.core.__array_of_ptr__; import smetana.core.__ptr__; import smetana.core.__struct__; +import smetana.core.size_t; import smetana.core.amiga.Area; import smetana.core.amiga.StarArrayOfPtr; import smetana.core.amiga.StarArrayOfStruct; @@ -97,6 +99,12 @@ public void setStruct(__struct__ value) { ST_pointf.this.setStruct(value); } + + @Override + public boolean isSameThan(StarStruct other) { + ST_pointf.Amp other2 = (Amp) other; + return this.getStruct() == other2.getStruct(); + } } @Override @@ -113,6 +121,18 @@ this.x = other2.x; this.y = other2.y; } + + @Override + public void copyDataFrom(__ptr__ value) { + final ST_pointf other2 = (ST_pointf) value; + this.x = other2.x; + this.y = other2.y; + } + + @Override + public __struct__ getStruct() { + return this; + } @Override public void memcopyFrom(Area source) { @@ -199,6 +219,27 @@ public ST_pointf(StarStruct parent) { } + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_pointf.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + // public interface ST_pointf extends __ptr__ { // public static List DEFINITION = Arrays.asList( // "typedef struct pointf_s", diff -Nru plantuml-1.2017.15/src/h/ST_point.java plantuml-1.2018.9/src/h/ST_point.java --- plantuml-1.2017.15/src/h/ST_point.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_point.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,122 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_point extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_point() { + this(null); + } + + public ST_point(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct", + // "{", + private int x, y; + + // "}", + // "point"); + + @Override + public __struct__ copy() { + final ST_point result = new ST_point(); + result.x = this.x; + result.y = this.y; + return result; + } + + @Override + public void ___(__struct__ other) { + ST_point this2 = (ST_point) other; + this.x = this2.x; + this.y = this2.y; + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("x")) { + return this.x; + } + if (fieldName.equals("y")) { + return this.y; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("x")) { + this.x = data; + return; + } + if (fieldName.equals("y")) { + this.y = data; + return; + } + super.setInt(fieldName, data); + } + +} + +// typedef struct { int x, y; } point; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_pointnlink_t.java plantuml-1.2018.9/src/h/ST_pointnlink_t.java --- plantuml-1.2017.15/src/h/ST_pointnlink_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_pointnlink_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,233 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarArrayOfStruct; +import smetana.core.amiga.StarStruct; + +public class ST_pointnlink_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + public ST_pointf.Amp pp; + public ST_pointnlink_t.Amp link; + + public ST_pointnlink_t() { + this(null); + } + + public ST_pointnlink_t(StarStruct parent) { + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("pp")) { + return pp; + } + if (fieldName.equals("link")) { + return link; + } + return super.getPtr(fieldName); + } + + @Override + public __struct__ getStruct() { + return ST_pointnlink_t.this; + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_pointnlink_t.this.setPtr(fieldName, newData); + } + + @Override + public boolean isSameThan(StarStruct other) { + ST_pointnlink_t.Amp other2 = (Amp) other; + return this.getStruct() == other2.getStruct(); + } + + @Override + public Class getRealClass() { + return ST_pointnlink_t.class; + } + + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("pp")) { + return pp; + } + if (fieldName.equals("link")) { + return link; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("pp")) { + if (newData instanceof StarArrayOfPtr) { + StarArrayOfPtr tmp = (StarArrayOfPtr) newData; + ST_pointf data = (ST_pointf) tmp.getStruct(); + pp = (ST_pointf.Amp) data.amp(); + return pp; + } + if (newData instanceof StarArrayOfStruct) { + StarArrayOfStruct tmp = (StarArrayOfStruct) newData; + ST_pointf data = (ST_pointf) tmp.getStruct(); + pp = (ST_pointf.Amp) data.amp(); + return pp; + } + System.err.println("newData1=" + newData.getClass()); + pp = (ST_pointf.Amp) newData; + return pp; + } + if (fieldName.equals("link")) { + if (newData == null) { + link = null; + return link; + } + if (newData instanceof StarArrayOfPtr) { + StarArrayOfPtr tmp = (StarArrayOfPtr) newData; + ST_pointnlink_t data = (ST_pointnlink_t) tmp.getStruct(); + link = (ST_pointnlink_t.Amp) data.amp(); + return link; + } + if (newData instanceof StarArrayOfStruct) { + StarArrayOfStruct tmp = (StarArrayOfStruct) newData; + ST_pointnlink_t data = (ST_pointnlink_t) tmp.getStruct(); + link = (ST_pointnlink_t.Amp) data.amp(); + return link; + } + if (newData instanceof ST_pointnlink_t.Amp) { + ST_pointnlink_t.Amp tmp = (ST_pointnlink_t.Amp) newData; + link = tmp; + return link; + } + System.err.println("newData2A=" + newData.getClass()); + } + return super.setPtr(fieldName, newData); + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_pointnlink_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + }; + } + + @Override + public __struct__ getStruct() { + return this; + } + + class StarStructAdaptor extends UnsupportedStarStruct { + private final ST_pointnlink_t me; + + public StarStructAdaptor(ST_pointnlink_t me) { + this.me = me; + } + + @Override + public boolean isSameThan(StarStruct other) { + StarStructAdaptor other2 = (StarStructAdaptor) other; + return this.me == other2.me; + } + } + + @Override + public StarStruct getInternalData() { + return new StarStructAdaptor(this); + } + + public static size_t sizeof_starstar_empty(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return STStarArrayOfPointer.malloc(nb); + } + + @Override + public int getInternalNb() { + return nb; + } + }; + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct pointnlink_t", + // "{", + // "Ppoint_t *pp", + // "struct pointnlink_t *link", + // "}", + // "pointnlink_t"); +} + +// typedef struct pointnlink_t { +// Ppoint_t *pp; +// struct pointnlink_t *link; +// } pointnlink_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_polygon_t.java plantuml-1.2018.9/src/h/ST_polygon_t.java --- plantuml-1.2017.15/src/h/ST_polygon_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_polygon_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,221 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + public int regular; + public int peripheries; + public int sides; + public double orientation; + public double distortion; + public double skew; + public int option; + private StarArrayOfPtr vertices; + + // "pointf *vertices", + + public ST_polygon_t() { + this(null); + } + + public ST_polygon_t(StarStruct parent) { + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("regular")) { + return regular != 0; + } + return super.getBoolean(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("peripheries")) { + return peripheries; + } + if (fieldName.equals("sides")) { + return sides; + } + return super.getInt(fieldName); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("orientation")) { + return orientation; + } + if (fieldName.equals("skew")) { + return skew; + } + if (fieldName.equals("distortion")) { + return distortion; + } + return super.getDouble(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_polygon_t.this.getPtr(fieldName); + } + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("regular")) { + this.regular = data; + return; + } + if (fieldName.equals("peripheries")) { + this.peripheries = data; + return; + } + if (fieldName.equals("sides")) { + this.sides = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("option")) { + return option; + } + if (fieldName.equals("sides")) { + return sides; + } + if (fieldName.equals("peripheries")) { + return peripheries; + } + return super.getInt(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("orientation")) { + this.orientation = data; + return; + } + if (fieldName.equals("distortion")) { + this.distortion = data; + return; + } + if (fieldName.equals("skew")) { + this.skew = data; + return; + } + super.setDouble(fieldName, data); + } + + private __ptr__ getVertices() { + if (vertices == null) { + return null; + } + throw new IllegalStateException(); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("vertices")) { + return vertices; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("vertices") && newData == null) { + this.vertices = null; + return null; + } + if (fieldName.equals("vertices") && newData instanceof StarArrayOfPtr) { + this.vertices = (StarArrayOfPtr) newData; + return null; + } + return super.setPtr(fieldName, newData); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct polygon_t", + // "{", + // "int regular", + // "int peripheries", + // "int sides", + // "double orientation", + // "double distortion", + // "double skew", + // "int option", + // "pointf *vertices", + // "}", + // "polygon_t"); +} + +// typedef struct polygon_t { /* mutable shape information for a node */ +// int regular; /* true for symmetric shapes */ +// int peripheries; /* number of periphery lines */ +// int sides; /* number of sides */ +// double orientation; /* orientation of shape (+ve degrees) */ +// double distortion; /* distortion factor - as in trapezium */ +// double skew; /* skew factor - as in parallelogram */ +// int option; /* ROUNDED, DIAGONAL corners, etc. */ +// pointf *vertices; /* array of vertex points */ +// } polygon_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_port.java plantuml-1.2018.9/src/h/ST_port.java --- plantuml-1.2017.15/src/h/ST_port.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_port.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,8 +45,6 @@ */ package h; -import javax.swing.text.html.CSS; - import smetana.core.CString; import smetana.core.HardcodedStruct; import smetana.core.UnsupportedStarStruct; diff -Nru plantuml-1.2017.15/src/h/ST_Ppoly_t.java plantuml-1.2018.9/src/h/ST_Ppoly_t.java --- plantuml-1.2017.15/src/h/ST_Ppoly_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_Ppoly_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,258 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedArrayOfPtr; +import smetana.core.UnsupportedArrayOfStruct; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__array_of_struct__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.Area; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarArrayOfStruct; +import smetana.core.amiga.StarStruct; + +public class ST_Ppoly_t extends UnsupportedStructAndPtr implements HardcodedStruct { + + // public List ps1; + public StarArrayOfPtr ps2; + public int pn; + + public ST_Ppoly_t() { + this(null); + } + + public ST_Ppoly_t(StarStruct parent) { + } + + @Override + public __struct__ copy() { + ST_Ppoly_t result = new ST_Ppoly_t(); + result.ps2 = this.ps2; + result.pn = this.pn; + return result; + } + + class Adaptor extends UnsupportedArrayOfPtr { + + final private StarArrayOfStruct newData2; + final private int pos; + + public Adaptor(StarArrayOfStruct newData2, int pos) { + this.newData2 = newData2; + this.pos = pos; + } + + @Override + public __array_of_ptr__ move(int delta) { + return new Adaptor(newData2, pos + delta); + } + + @Override + public Area getInternal(int idx) { + return newData2.getInternalArray().getInternal(pos + idx); + } + + @Override + public __ptr__ getPtr() { + return newData2.plus(pos).getPtr(); + } + + @Override + public __struct__ getStruct() { + return newData2.plus(pos).getStruct(); + } + + @Override + public int comparePointerInternal(__array_of_ptr__ other) { + return super.comparePointerInternal(other); + } + + } + + class Adaptor2 extends UnsupportedArrayOfStruct { + + final private int pos; + + public Adaptor2(int pos) { + this.pos = pos; + } + + @Override + public __array_of_struct__ plus(int delta) { + return new Adaptor2(pos + delta); + } + + @Override + public __struct__ getStruct() { + return ps2.plus(pos).getStruct(); + } + + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("ps")) { + if (newData instanceof StarArrayOfStruct) { + StarArrayOfStruct newData2 = (StarArrayOfStruct) newData; + System.err.println("newData2B=" + newData2); + this.ps2 = new StarArrayOfPtr(new Adaptor(newData2, 0)); + return ps2; + } + this.ps2 = (StarArrayOfPtr) newData; + return ps2; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("ps")) { + return ps2; + } + return super.getPtr(fieldName); + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + if (fieldName.equals("ps")) { + return new Adaptor2(0); + // return ps2.getArrayOfStruct("ps"); + } + return super.getArrayOfStruct(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("ps")) { + return ps2.getInternalArray(); + } + return super.getArrayOfPtr(fieldName); + } + + @Override + public void memcopyFrom(Area source) { + ST_Ppoly_t source2 = (ST_Ppoly_t) source; + this.ps2 = source2.ps2; + this.pn = source2.pn; + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("pn")) { + this.pn = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("pn")) { + return pn; + } + return super.getInt(fieldName); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("pn")) { + return pn; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("pn")) { + pn = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("ps")) { + return ps2; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("ps")) { + ps2 = (StarArrayOfPtr) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct Ppoly_t", + // "{", + // "Ppoint_t *ps", + // "int pn", + // "}", + // "Ppoly_t"); +} + +// typedef struct Ppoly_t { +// Ppoint_t *ps; +// int pn; +// } Ppoly_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_rank_t.java plantuml-1.2018.9/src/h/ST_rank_t.java --- plantuml-1.2017.15/src/h/ST_rank_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_rank_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,375 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedArrayOfPtr; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_rank_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_rank_t() { + this(null); + } + + public ST_rank_t(StarStruct parent) { + this.parent = parent; + } + + private int n; + + // "node_t **v", + private STStarArrayOfPointer v; + private int an; + // "node_t **av", + private STStarArrayOfPointer av; + + private double ht1, ht2; + private double pht1, pht2; + private boolean candidate; + private int valid; + + private int cache_nc; + private ST_adjmatrix_t flat; + + // "}", + // "rank_t"); + + @Override + public void setStruct(__struct__ value) { + ST_rank_t this2 = (ST_rank_t) value; + this.n = this2.n; + this.v = this2.v; + this.an = this2.an; + this.av = this2.av; + this.ht1 = this2.ht1; + this.ht2 = this2.ht2; + this.pht1 = this2.pht1; + this.pht2 = this2.pht2; + this.candidate = this2.candidate; + this.valid = this2.valid; + this.cache_nc = this2.cache_nc; + this.flat = this2.flat; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public int getInt(String fieldName) { + return ST_rank_t.this.getInt(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + return ST_rank_t.this.getArrayOfPtr(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_rank_t.this.getPtr(fieldName); + } + + @Override + public __struct__ getStruct() { + return ST_rank_t.this.getStruct(); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + return ST_rank_t.this.setPtr(fieldName, newData); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + ST_rank_t.this.setBoolean(fieldName, data); + } + + @Override + public boolean getBoolean(String fieldName) { + return ST_rank_t.this.getBoolean(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + ST_rank_t.this.setInt(fieldName, data); + } + + @Override + public double getDouble(String fieldName) { + return ST_rank_t.this.getDouble(fieldName); + } + + @Override + public void setStruct(__struct__ value) { + ST_rank_t.this.setStruct(value); + } + + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("v")) { + return new ArrayOfPtr(v, 0); + } + return super.getArrayOfPtr(fieldName); + } + + static class ArrayOfPtr extends UnsupportedArrayOfPtr { + + private final int pos; + private final STStarArrayOfPointer tab; + + private ArrayOfPtr(STStarArrayOfPointer tab, int pos) { + this.pos = pos; + this.tab = tab; + } + + @Override + public __array_of_ptr__ plus(int delta) { + return new ArrayOfPtr(tab, pos + delta); + } + + @Override + public void setPtr(__ptr__ value) { + tab.plus(pos).setPtr(value); + } + + @Override + public __ptr__ getPtr() { + return tab.plus(pos).getPtr(); + } + + @Override + public __ptr__ asPtr() { + if (pos == 0) { + return tab; + } + return super.asPtr(); + } + + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("n")) { + return n; + } + if (fieldName.equals("an")) { + return an; + } + if (fieldName.equals("cache_nc")) { + return cache_nc; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("v")) { + return v; + } + if (fieldName.equals("av")) { + return av; + } + if (fieldName.equals("flat")) { + return flat; + } + return super.getPtr(fieldName); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("candidate")) { + this.candidate = data; + return; + } + if (fieldName.equals("valid")) { + this.valid = data ? 1 : 0; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("n")) { + this.n = data; + return; + } + if (fieldName.equals("an")) { + this.an = data; + return; + } + if (fieldName.equals("valid")) { + this.valid = data; + return; + } + if (fieldName.equals("cache_nc")) { + this.cache_nc = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("valid")) { + return valid != 0; + } + if (fieldName.equals("candidate")) { + return candidate; + } + return super.getBoolean(fieldName); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("pht1")) { + return pht1; + } + if (fieldName.equals("pht2")) { + return pht2; + } + if (fieldName.equals("ht1")) { + return ht1; + } + if (fieldName.equals("ht2")) { + return ht2; + } + return super.getDouble(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("pht1")) { + this.pht1 = data; + return; + } + if (fieldName.equals("pht2")) { + this.pht2 = data; + return; + } + if (fieldName.equals("ht1")) { + this.ht1 = data; + return; + } + if (fieldName.equals("ht2")) { + this.ht2 = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public __struct__ getStruct() { + return this; + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("v")) { + this.v = (STStarArrayOfPointer) newData; + return v; + } + if (fieldName.equals("av")) { + this.av = (STStarArrayOfPointer) newData; + return av; + } + if (fieldName.equals("flat")) { + this.flat = (ST_adjmatrix_t) newData; + return flat; + } + return super.setPtr(fieldName, newData); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_rank_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct rank_t { +// int n; /* number of nodes in this rank */ +// node_t **v; /* ordered list of nodes in rank */ +// int an; /* globally allocated number of nodes */ +// node_t **av; /* allocated list of nodes in rank */ +// double ht1, ht2; /* height below/above centerline */ +// double pht1, pht2; /* as above, but only primitive nodes */ +// boolean candidate; /* for transpose () */ +// boolean valid; +// int cache_nc; /* caches number of crossings */ +// adjmatrix_t *flat; +// } rank_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_refstr_t.java plantuml-1.2018.9/src/h/ST_refstr_t.java --- plantuml-1.2017.15/src/h/ST_refstr_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_refstr_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,190 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.OFFSET; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_refstr_t extends UnsupportedStructAndPtr /* implements WithParent */{ + + public final ST_dtlink_s link = new ST_dtlink_s(this); + public int refcnt; + public CString s; + + private final StarStruct parent; + + public ST_refstr_t() { + this(null); + } + + public ST_refstr_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("refcnt")) { + this.refcnt = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("refcnt")) { + return refcnt; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("s")) { + return s; + } + return super.getPtr(fieldName); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.refstr_t::s")) { + return s; + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + @Override + public Object addVirtualBytes(int virtualBytes) { + if (virtualBytes == 0) { + return this; + } + final OFFSET offset = OFFSET.fromInt(virtualBytes); + if (offset.toString().equals("h.refstr_t::s")) { + return s; + } + System.err.println("virtualBytes=" + virtualBytes); + System.err.println("offset=" + offset); + return super.addVirtualBytes(virtualBytes); + } + + @Override + public __ptr__ castTo(Class dest) { + // if (dest == refstr_t.class) { + // return this; + // } + if (dest == _dtlink_s.class) { + return link; + } + return super.castTo(dest); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("s")) { + this.s = (CString) newData; + this.s.setMyFather(this); + return s; + } + return super.setPtr(fieldName, newData); + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("s")) { + return s; + } + return super.getCString(fieldName); + } + + public CString to_s(ST_dtlink_s from) { + if (from == link) { + return s; + } + throw new IllegalArgumentException(); + } + + @Override + public Class getRealClass() { + return refstr_t.class; + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct refstr_t", + // "{", + // "Dtlink_t link", + // "unsigned long refcnt", + // "char *s", + // "char store[1]", + // "}", + // "refstr_t"); +} + +// typedef struct refstr_t { +// Dtlink_t link; +// unsigned long refcnt; +// char *s; +// char store[1]; /* this is actually a dynamic array */ +// } refstr_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_RTree.java plantuml-1.2018.9/src/h/ST_RTree.java --- plantuml-1.2017.15/src/h/ST_RTree.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_RTree.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,165 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_RTree.Amp; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_RTree extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_RTree() { + this(null); + } + + public ST_RTree(StarStruct parent) { + this.parent = parent; + } + + // "struct RTree", + // "{", + // "Node_t *root", + // "SplitQ_t split", + // "int MinFill", + // "long ElapsedTime", + // "float UserTime, SystemTime", + // "int Deleting", + // "int StatFlag", + // "int InsertCount", + // "int DeleteCount", + // "int ReInsertCount", + // "int InSplitCount", + // "int DeSplitCount", + // "int ElimCount", + // "int EvalCount", + // "int InTouchCount", + // "int DeTouchCount", + // "int SeTouchCount", + // "int CallCount", + // "float SplitMeritSum", + // "int RectCount", + private int NodeCount; + // "int LeafCount, NonLeafCount", + // "int EntryCount", + // "int SearchCount", + // "int HitCount", + // "}"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("NodeCount")) { + return NodeCount; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("NodeCount")) { + this.NodeCount = data; + return; + } + super.setInt(fieldName, data); + } + +} + +// struct RTree { +// Node_t *root; +// +// SplitQ_t split; +// +// /* balance criterion for node splitting */ +// int MinFill; +// +// /* times */ +// long ElapsedTime; +// float UserTime, SystemTime; +// +// int Deleting; +// +// /* variables for statistics */ +// int StatFlag; /* tells if we are counting or not */ +// /* counters affected only when StatFlag set */ +// int InsertCount; +// int DeleteCount; +// int ReInsertCount; +// int InSplitCount; +// int DeSplitCount; +// int ElimCount; +// int EvalCount; +// int InTouchCount; +// int DeTouchCount; +// int SeTouchCount; +// int CallCount; +// float SplitMeritSum; +// +// /* counters used even when StatFlag not set */ +// int RectCount; +// int NodeCount; +// int LeafCount, NonLeafCount; +// int EntryCount; +// int SearchCount; +// int HitCount; +// +// }; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_shape_desc.java plantuml-1.2018.9/src/h/ST_shape_desc.java --- plantuml-1.2017.15/src/h/ST_shape_desc.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_shape_desc.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,128 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.HardcodedStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_shape_desc extends UnsupportedStructAndPtr implements HardcodedStruct { + + public ST_shape_desc(StarStruct parent) { + } + + public ST_shape_desc() { + this(null); + } + + public CString name; + public ST_shape_functions.Amp fns; + public ST_polygon_t.Amp polygon; + public boolean usershape; + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("name")) { + this.name = (CString) newData; + return newData; + } + if (fieldName.equals("fns")) { + this.fns = (ST_shape_functions.Amp) newData; + return newData; + } + if (fieldName.equals("polygon")) { + this.polygon = (ST_polygon_t.Amp) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("name")) { + return name; + } + return super.getCString(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("fns")) { + return fns; + } + if (fieldName.equals("polygon")) { + return polygon; + } + return super.getPtr(fieldName); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("usershape")) { + return usershape; + } + return super.getBoolean(fieldName); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct shape_desc", + // "{", + // "char *name", + // "shape_functions *fns", + // "polygon_t *polygon", + // "boolean usershape", + // "}", + // "shape_desc"); +} + +// typedef struct shape_desc { /* read-only shape descriptor */ +// char *name; /* as read from graph file */ +// shape_functions *fns; +// polygon_t *polygon; /* base polygon info */ +// boolean usershape; +// } shape_desc; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_shape_functions.java plantuml-1.2018.9/src/h/ST_shape_functions.java --- plantuml-1.2017.15/src/h/ST_shape_functions.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_shape_functions.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,160 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_shape_functions extends UnsupportedStructAndPtr { + + public CFunction initfn; + public CFunction freefn; + public CFunction portfn; + public CFunction insidefn; + public CFunction pboxfn; + public CFunction codefn; + + public ST_shape_functions() { + this(null); + } + + public ST_shape_functions(StarStruct parent) { + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_shape_functions.this.getPtr(fieldName); + } + + @Override + public Object call(String fieldName, Object... args) { + return ((CFunction) getPtr(fieldName)).exe(args); + } + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("initfn")) { + return initfn; + } + if (fieldName.equals("freefn")) { + return freefn; + } + if (fieldName.equals("portfn")) { + return portfn; + } + if (fieldName.equals("insidefn")) { + return insidefn; + } + if (fieldName.equals("pboxfn")) { + return pboxfn; + } + if (fieldName.equals("codefn")) { + return codefn; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("initfn")) { + this.initfn = (CFunction) newData; + return newData; + } + if (fieldName.equals("freefn")) { + this.freefn = (CFunction) newData; + return newData; + } + if (fieldName.equals("portfn")) { + this.portfn = (CFunction) newData; + return newData; + } + if (fieldName.equals("insidefn")) { + this.insidefn = (CFunction) newData; + return newData; + } + if (fieldName.equals("pboxfn")) { + this.pboxfn = (CFunction) newData; + return newData; + } + if (fieldName.equals("codefn")) { + this.codefn = (CFunction) newData; + return newData; + } + return super.setPtr(fieldName, newData); + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct shape_functions", + // "{", + // "void (*initfn) (node_t *)", + // "void (*freefn) (node_t *)", + // "port(*portfn) (node_t *, char *, char *)", + // "boolean(*insidefn) (inside_t * inside_context, pointf)", + // "int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr)", + // "void (*codefn) (GVJ_t * job, node_t * n)", + // "}", + // "shape_functions"); +} + +// typedef struct shape_functions { /* read-only shape functions */ +// void (*initfn) (node_t *); /* initializes shape from node u.shape_info structure */ +// void (*freefn) (node_t *); /* frees shape from node u.shape_info structure */ +// port(*portfn) (node_t *, char *, char *); /* finds aiming point and slope of port */ +// boolean(*insidefn) (inside_t * inside_context, pointf); /* clips incident gvc->e spline on shape of gvc->n */ +// int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr); /* finds box path to reach port */ +// void (*codefn) (GVJ_t * job, node_t * n); /* emits graphics code for node */ +// } shape_functions; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_splineInfo.java plantuml-1.2018.9/src/h/ST_splineInfo.java --- plantuml-1.2017.15/src/h/ST_splineInfo.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_splineInfo.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,138 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CFunction; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_splineInfo extends UnsupportedStructAndPtr { + + public CFunction swapEnds; + public CFunction splineMerge; + public boolean ignoreSwap; + public boolean isOrtho; + + public ST_splineInfo() { + this(null); + } + + public ST_splineInfo(StarStruct parent) { + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + @Override + public boolean getBoolean(String fieldName) { + return ST_splineInfo.this.getBoolean(fieldName); + } + + @Override + public Object call(String fieldName, Object... args) { + return ST_splineInfo.this.call(fieldName, args); + } + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("swapEnds")) { + this.swapEnds = (CFunction) newData; + return swapEnds; + } + if (fieldName.equals("splineMerge")) { + this.splineMerge = (CFunction) newData; + return splineMerge; + } + return super.setPtr(fieldName, newData); + } + + @Override + public Object call(String fieldName, Object... args) { + if (fieldName.equals("swapEnds")) { + return swapEnds.exe(args); + } + if (fieldName.equals("splineMerge")) { + return splineMerge.exe(args); + } + return super.call(fieldName, args); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("ignoreSwap")) { + return ignoreSwap; + } + if (fieldName.equals("isOrtho")) { + return isOrtho; + } + return super.getBoolean(fieldName); + } + + // public interface ST_splineInfo extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "typedef struct", + // "{", + // "boolean(*swapEnds) (edge_t * e)", + // "boolean(*splineMerge) (node_t * n)", + // "boolean ignoreSwap", + // "boolean isOrtho", + // "}", + // "splineInfo"); +} + +// typedef struct { +// boolean(*swapEnds) (edge_t * e); /* Should head and tail be swapped? */ +// boolean(*splineMerge) (node_t * n); /* Is n a node in the middle of an edge? */ +// boolean ignoreSwap; /* Test for swapped edges if false */ +// boolean isOrtho; /* Orthogonal routing used */ +// } splineInfo; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_spline_info_t.java plantuml-1.2018.9/src/h/ST_spline_info_t.java --- plantuml-1.2017.15/src/h/ST_spline_info_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_spline_info_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,153 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_spline_info_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_spline_info_t() { + this(null); + } + + public ST_spline_info_t(StarStruct parent) { + this.parent = parent; + } + + // public static List DEFINITION = Arrays.asList( + // "typedef struct", + // "{", + private int LeftBound, RightBound, Splinesep, Multisep; + private StarArrayOfPtr Rank_box; + + // "}", + // "spline_info_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + @Override + public int getInt(String fieldName) { + return ST_spline_info_t.this.getInt(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return ST_spline_info_t.this.getPtr(fieldName); + } + + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("Rank_box")) { + this.Rank_box = (StarArrayOfPtr) newData; + return this.Rank_box; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("Rank_box")) { + return this.Rank_box; + } + return super.getPtr(fieldName); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("LeftBound")) { + return this.LeftBound; + } + if (fieldName.equals("RightBound")) { + return this.RightBound; + } + if (fieldName.equals("Splinesep")) { + return this.Splinesep; + } + if (fieldName.equals("Multisep")) { + return this.Multisep; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("LeftBound")) { + this.LeftBound = data; + return; + } + if (fieldName.equals("RightBound")) { + this.RightBound = data; + return; + } + if (fieldName.equals("Splinesep")) { + this.Splinesep = data; + return; + } + if (fieldName.equals("Multisep")) { + this.Multisep = data; + return; + } + super.setInt(fieldName, data); + } + +} + +// typedef struct { +// int LeftBound, RightBound, Splinesep, Multisep; +// boxf* Rank_box; +// } spline_info_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_splines.java plantuml-1.2018.9/src/h/ST_splines.java --- plantuml-1.2017.15/src/h/ST_splines.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_splines.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,133 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_splines extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_splines() { + this(null); + } + + public ST_splines(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct splines", + // "{", +// bezier *list; + private StarArrayOfPtr list; + private int size; + + // "boxf bb", + // "}", + // "splines"); + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("size")) { + this.size = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("size")) { + return this.size; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("list")) { + this.list = (StarArrayOfPtr) newData; + return list; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("list")) { + return this.list; + } + return super.getPtr(fieldName); + } + + @Override + public __array_of_ptr__ getArrayOfPtr(String fieldName) { + if (fieldName.equals("list")) { + return this.list.getInternalArray(); + } + return super.getArrayOfPtr(fieldName); + } +} + +// typedef struct splines { +// bezier *list; +// int size; +// boxf bb; +// } splines; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/STStarArrayOfPointer.java plantuml-1.2018.9/src/h/STStarArrayOfPointer.java --- plantuml-1.2017.15/src/h/STStarArrayOfPointer.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/STStarArrayOfPointer.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,117 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import java.util.ArrayList; +import java.util.List; + +import smetana.core.UnsupportedC; +import smetana.core.__array_of_integer__; +import smetana.core.__ptr__; +import smetana.core.amiga.Area; + +public class STStarArrayOfPointer extends UnsupportedC { + + private final int pos; + private final List<__ptr__> data; + + public void realloc(int nb) { + while (data.size() < nb) { + data.add(null); + } + } + + public static STStarArrayOfPointer malloc(int size) { + List<__ptr__> data = new ArrayList<__ptr__>(); + for (int i = 0; i < size; i++) { + data.add(null); + } + return new STStarArrayOfPointer(0, data); + } + + private STStarArrayOfPointer(int pos, List<__ptr__> data) { + this.pos = pos; + this.data = data; + } + + @Override + public int comparePointer(__ptr__ other) { + final STStarArrayOfPointer this2 = (STStarArrayOfPointer) other; + if (this.data != this2.data) { + throw new IllegalArgumentException(); + } + return this.pos - this2.pos; + } + + @Override + public __ptr__ plus(int pointerMove) { + return new STStarArrayOfPointer(pos + pointerMove, data); + } + + @Override + public void setPtr(__ptr__ value) { + data.set(pos, value); + } + + @Override + public __ptr__ getPtr(String fieldName) { + return data.get(pos).getPtr(fieldName); + } + + @Override + public __ptr__ getPtr() { + return data.get(pos); + } + + public void swap(int i, int j) { + __ptr__ e1 = data.get(i); + __ptr__ e2 = data.get(j); + data.set(i, e2); + data.set(j, e1); + + } + +} diff -Nru plantuml-1.2017.15/src/h/ST_tedge_t.java plantuml-1.2018.9/src/h/ST_tedge_t.java --- plantuml-1.2017.15/src/h/ST_tedge_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_tedge_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,206 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_Agclos_s.ArrayOfThreePtrDict_t; + +import java.util.ArrayList; +import java.util.List; + +import smetana.core.UnsupportedArrayOfPtr; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_ptr__; +import smetana.core.__ptr__; +import smetana.core.amiga.Area; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_tedge_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_tedge_t() { + this(null); + } + + public ST_tedge_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct tedge_t", + // "{", + private __ptr__ pnl0p; + private __ptr__ pnl1p; + // private ST_pointnlink_t.Amp pnl0p; + // private ST_pointnlink_t.Amp pnl1p; + + private StarArrayOfPtr ltp; + private StarArrayOfPtr rtp; + + // "struct triangle_t *ltp", + // "struct triangle_t *rtp", + // "}", + // "tedge_t"); + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("pnl0p")) { + return this.pnl0p; + } + if (fieldName.equals("pnl1p")) { + return this.pnl1p; + } + if (fieldName.equals("ltp")) { + return this.ltp; + } + if (fieldName.equals("rtp")) { + return this.rtp; + } + return super.getPtr(fieldName); + } + + // class Singleton extends UnsupportedArrayOfPtr implements __array_of_ptr__ { + // private final ST_pointnlink_t.Amp data; + // + // Singleton(ST_pointnlink_t.Amp data) { + // this.data = data; + // } + // + // @Override + // public __ptr__ getPtr() { + // return data; + // } + // + // @Override + // public Area getInternal(int idx) { + // if (idx == 0) { + // return data; + // } + // System.err.println("idx=" + idx); + // return super.getInternal(idx); + // } + // + // @Override + // public String toString() { + // return super.toString() + " " + data + " " + data.getStruct(); + // } + // + // @Override + // public int comparePointerInternal(__array_of_ptr__ other) { + // System.err.println("other=" + other); + // Singleton other2 = (Singleton) other; + // System.err.println("other2.data=" + other2.data); + // System.err.println("pnl0p=" + pnl0p); + // System.err.println("pnl0p=" + foo(pnl0p)); + // System.err.println("pnl1p=" + pnl1p); + // System.err.println("pnl0p=" + foo(pnl1p)); + // // TODO Auto-generated method stub + // return super.comparePointerInternal(other); + // } + // + // } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + // if (fieldName.equals("pnl0p")) { + // this.pnl0p = (ST_pointnlink_t.Amp) newData; + // return this.pnl0p; + // } + if (fieldName.equals("pnl0p")) { + if (newData instanceof ST_pointnlink_t.Amp) { + this.pnl0p = (ST_pointnlink_t.Amp) newData; + // newData = new StarArrayOfPtr(new Singleton((h.ST_pointnlink_t.Amp) newData)); + } else { + this.pnl0p = (StarArrayOfPtr) newData; + } + return this.pnl0p; + } + if (fieldName.equals("pnl1p")) { + if (newData instanceof ST_pointnlink_t.Amp) { + // newData = new StarArrayOfPtr(new Singleton((h.ST_pointnlink_t.Amp) newData)); + this.pnl1p = (ST_pointnlink_t.Amp) newData; + } else { + this.pnl1p = (StarArrayOfPtr) newData; + } + return this.pnl1p; + } + // if (fieldName.equals("pnl1p")) { + // this.pnl1p = (ST_pointnlink_t.Amp) newData; + // return this.pnl1p; + // } + if (fieldName.equals("ltp")) { + this.ltp = (StarArrayOfPtr) newData; + return this.ltp; + } + if (fieldName.equals("rtp")) { + this.rtp = (StarArrayOfPtr) newData; + return this.rtp; + } + return super.setPtr(fieldName, newData); + } + + public String foo(StarArrayOfPtr data) { + __array_of_ptr__ array = data.getInternalArray(); + return array.toString(); + } +} + +// typedef struct tedge_t { +// pointnlink_t *pnl0p; +// pointnlink_t *pnl1p; +// struct triangle_t *ltp; +// struct triangle_t *rtp; +// } tedge_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_textfont_t.java plantuml-1.2018.9/src/h/ST_textfont_t.java --- plantuml-1.2017.15/src/h/ST_textfont_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_textfont_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,104 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_textfont_t extends UnsupportedStructAndPtr { + + public CString name; + public double size; + + public ST_textfont_t() { + this(null); + } + + public ST_textfont_t(StarStruct parent) { + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("name")) { + this.name = (CString) newData; + return name; + } + return super.setPtr(fieldName, newData); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("size")) { + this.size = data; + return; + } + super.setDouble(fieldName, data); + } + + // public interface ST_textfont_t extends __ptr__ { + // public static List DEFINITION = Arrays.asList( + // "typedef struct", + // "{", + // "char* name", + // "char* color", + // "PostscriptAlias *postscript_alias", + // "double size", + // "unsigned int flags:7", + // "unsigned int cnt:(sizeof(unsigned int) * 8 - 7)", + // "}", + // "textfont_t"); +} + +// typedef struct { +// char* name; +// char* color; +// PostscriptAlias *postscript_alias; +// double size; +// unsigned int flags:7; /* HTML_UL, HTML_IF, HTML_BF, etc. */ +// unsigned int cnt:(sizeof(unsigned int) * 8 - 7); /* reference count */ +// } textfont_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_textlabel_t.java plantuml-1.2018.9/src/h/ST_textlabel_t.java --- plantuml-1.2017.15/src/h/ST_textlabel_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_textlabel_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,275 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.amiga.StarStruct; + +public class ST_textlabel_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_textlabel_t() { + this(null); + } + + public ST_textlabel_t(StarStruct parent) { + this.parent = parent; + } + + private CString text, fontname, fontcolor; + private int charset; + private double fontsize; + + private final ST_pointf dimen = new ST_pointf(this); + private final ST_pointf space = new ST_pointf(this); + private final ST_pointf pos = new ST_pointf(this); + + // "union", + // "{", + // "struct", + // "{", + // private ST_textspan_t span; + private __ptr__ span; + private int nspans; + + // "}", + // "txt", + // "htmllabel_t *html", + private final __ptr__ html = null; + // "}", + // "u", + private int valign; + + private int set; + + // "boolean html", + // "}", + // "textlabel_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("dimen")) { + return dimen; + } + if (fieldName.equals("space")) { + return space; + } + if (fieldName.equals("pos")) { + return pos; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("space")) { + space.copyDataFrom(newData); + return; + } + if (fieldName.equals("pos")) { + pos.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("text")) { + this.text = (CString) newData; + return text; + } + if (fieldName.equals("fontname")) { + this.fontname = (CString) newData; + return fontname; + } + if (fieldName.equals("fontcolor")) { + this.fontcolor = (CString) newData; + return fontcolor; + } + if (fieldName.equals("u.txt.span")) { + this.span = newData; + return span; + } + return super.setPtr(fieldName, newData); + } + + @Override + public CString getCString(String fieldName) { + if (fieldName.equals("text")) { + return text; + } + return super.getCString(fieldName); + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("text")) { + return text; + } + if (fieldName.equals("u.txt.span")) { + return span; + } + if (fieldName.equals("fontname")) { + return fontname; + } + return super.getPtr(fieldName); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("html")) { + return html != null; + } + if (fieldName.equals("set")) { + return set != 0; + } + return super.getBoolean(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("fontsize")) { + this.fontsize = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("fontsize")) { + return this.fontsize; + } + return super.getDouble(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("charset")) { + this.charset = data; + return; + } + if (fieldName.equals("valign")) { + this.valign = data; + return; + } + if (fieldName.equals("u.txt.nspans")) { + this.nspans = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public void setBoolean(String fieldName, boolean data) { + if (fieldName.equals("set")) { + this.set = data ? 1 : 0; + return; + } + super.setBoolean(fieldName, data); + } + + @Override + public boolean isSameThan(StarStruct other) { + ST_textlabel_t other2 = (ST_textlabel_t) other; + return this == other2; + } + + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("charset")) { + return this.charset; + } + if (fieldName.equals("valign")) { + return this.valign; + } + if (fieldName.equals("u.txt.nspans")) { + return this.nspans; + } + if (fieldName.equals("set")) { + return this.set; + } + return super.getInt(fieldName); + } + +} + +// typedef struct textlabel_t { +// char *text, *fontname, *fontcolor; +// int charset; +// double fontsize; +// pointf dimen; /* the diagonal size of the label (estimated by layout) */ +// pointf space; /* the diagonal size of the space for the label */ +// /* the rendered label is aligned in this box */ +// /* space does not include pad or margin */ +// pointf pos; /* the center of the space for the label */ +// union { +// struct { +// textspan_t *span; +// short nspans; +// } txt; +// htmllabel_t *html; +// } u; +// char valign; /* 't' 'c' 'b' */ +// boolean set; /* true if position is set */ +// boolean html; /* true if html label */ +// } textlabel_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_textspan_t.java plantuml-1.2018.9/src/h/ST_textspan_t.java --- plantuml-1.2017.15/src/h/ST_textspan_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_textspan_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,153 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.CString; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_textspan_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_textspan_t() { + this(null); + } + + public ST_textspan_t(StarStruct parent) { + this.parent = parent; + } + + private CString str; + + // "textfont_t *font", + // "void *layout", + // "void (*free_layout) (void *layout)", + // "double yoffset_layout, yoffset_centerline", + private final ST_pointf size = new ST_pointf(this); + private int just; + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("size")) { + return size; + } + return super.getStruct(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("just")) { + this.just = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("just")) { + return this.just; + } + return super.getInt(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("str")) { + this.str = (CString) newData; + return str; + } + return super.setPtr(fieldName, newData); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_textspan_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct { +// char *str; /* stored in utf-8 */ +// textfont_t *font; +// void *layout; +// void (*free_layout) (void *layout); /* FIXME - this is ugly */ +// double yoffset_layout, yoffset_centerline; +// pointf size; +// char just; /* 'l' 'n' 'r' */ /* FIXME */ +// } textspan_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_tna_t.java plantuml-1.2018.9/src/h/ST_tna_t.java --- plantuml-1.2017.15/src/h/ST_tna_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_tna_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,180 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_tna_t.Amp; +import h.ST_triangle_t.ArrayOfThree; + +import java.util.Arrays; +import java.util.List; + +import smetana.core.UnsupportedArrayOfStruct; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_struct__; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_tna_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_tna_t() { + this(null); + } + + public ST_tna_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct tna_t", + // "{", + // "Ppoint_t a[2]", + // "}", + // "tna_t"); + private double t; + private final ST_pointf a[] = new ST_pointf[] { new ST_pointf(), new ST_pointf() }; + + class ArrayOfTwo extends UnsupportedArrayOfStruct { + + final private int pos; + + public ArrayOfTwo(int pos) { + this.pos = pos; + } + + @Override + public __array_of_struct__ plus(int delta) { + return new ArrayOfTwo(pos + delta); + } + + @Override + public __struct__ getStruct() { + return a[pos]; + } + + @Override + public void setStruct(__struct__ value) { + a[pos].copyDataFrom(value); + } + + @Override + public double getDouble(String fieldName) { + return getStruct().getDouble(fieldName); + } + + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + if (fieldName.equals("a")) { + return new ArrayOfTwo(0); + } + return super.getArrayOfStruct(fieldName); + } + + @Override + public double getDouble(String fieldName) { + if (fieldName.equals("t")) { + return this.t; + } + return super.getDouble(fieldName); + } + + @Override + public void setDouble(String fieldName, double data) { + if (fieldName.equals("t")) { + this.t = data; + return; + } + super.setDouble(fieldName, data); + } + + @Override + public __struct__ getStruct() { + return this; + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_tna_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct tna_t { +// double t; +// Ppoint_t a[2]; +// } tna_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_triangle_t.java plantuml-1.2018.9/src/h/ST_triangle_t.java --- plantuml-1.2017.15/src/h/ST_triangle_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_triangle_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,179 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import h.ST_pathend_t.ArrayOfTwenty; +import smetana.core.UnsupportedArrayOfStruct; +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__array_of_struct__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_triangle_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_triangle_t() { + this(null); + } + + public ST_triangle_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct triangle_t", + // "{", + private int mark; + + private final ST_tedge_t e[] = new ST_tedge_t[] { new ST_tedge_t(), new ST_tedge_t(), new ST_tedge_t() }; + + class ArrayOfThree extends UnsupportedArrayOfStruct { + + final private int pos; + + public ArrayOfThree(int pos) { + this.pos = pos; + } + + @Override + public __array_of_struct__ plus(int delta) { + return new ArrayOfThree(pos + delta); + } + + @Override + public __struct__ getStruct() { + return e[pos]; + } + + @Override + public void setStruct(__struct__ value) { + e[pos].copyDataFrom(value); + } + + @Override + public double getDouble(String fieldName) { + return getStruct().getDouble(fieldName); + } + + } + + // "struct tedge_t e[3]", + // "}", + // "triangle_t"); + + @Override + public int getInt(String fieldName) { + if (fieldName.equals("mark")) { + return this.mark; + } + return super.getInt(fieldName); + } + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("mark")) { + this.mark = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public boolean getBoolean(String fieldName) { + if (fieldName.equals("mark")) { + return this.mark != 0; + } + return super.getBoolean(fieldName); + } + + @Override + public __array_of_struct__ getArrayOfStruct(String fieldName) { + if (fieldName.equals("e")) { + return new ArrayOfThree(0); + } + return super.getArrayOfStruct(fieldName); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_triangle_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct triangle_t { +// int mark; +// struct tedge_t e[3]; +// } triangle_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_XLabels_t.java plantuml-1.2018.9/src/h/ST_XLabels_t.java --- plantuml-1.2017.15/src/h/ST_XLabels_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_XLabels_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,116 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.amiga.StarStruct; + +public class ST_XLabels_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_XLabels_t() { + this(null); + } + + public ST_XLabels_t(StarStruct parent) { + this.parent = parent; + } + + // "typedef struct XLabels_s", + // "{", + // "object_t *objs", + // "int n_objs", + // "xlabel_t *lbls", + // "int n_lbls", + // "label_params_t *params", + private ST_dt_s hdx; + + // "RTree_t *spdx", + // "}", + // "XLabels_t"); + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + @Override + public __ptr__ getPtr(String fieldName) { + if (fieldName.equals("hdx")) { + return this.hdx; + } + return super.getPtr(fieldName); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("hdx")) { + this.hdx = (ST_dt_s) newData; + return this.hdx; + } + return super.setPtr(fieldName, newData); + } + +} + +// typedef struct XLabels_s { +// object_t *objs; +// int n_objs; +// xlabel_t *lbls; +// int n_lbls; +// label_params_t *params; +// +// Dt_t *hdx; // splay tree keyed with hilbert spatial codes +// RTree_t *spdx; // rtree +// +// } XLabels_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/ST_xlabel_t.java plantuml-1.2018.9/src/h/ST_xlabel_t.java --- plantuml-1.2017.15/src/h/ST_xlabel_t.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/ST_xlabel_t.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,161 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.UnsupportedSize_t; +import smetana.core.UnsupportedStarStruct; +import smetana.core.UnsupportedStructAndPtr; +import smetana.core.__ptr__; +import smetana.core.__struct__; +import smetana.core.size_t; +import smetana.core.amiga.StarArrayOfPtr; +import smetana.core.amiga.StarStruct; + +public class ST_xlabel_t extends UnsupportedStructAndPtr { + + private final StarStruct parent; + + public ST_xlabel_t() { + this(null); + } + + public ST_xlabel_t(StarStruct parent) { + this.parent = parent; + } + + @Override + public StarStruct amp() { + return new Amp(); + } + + public class Amp extends UnsupportedStarStruct { + + } + + // "typedef struct", + // "{", + final private ST_pointf sz = new ST_pointf(this); + final private ST_pointf pos = new ST_pointf(this); + + // "void *lbl", + private ST_textlabel_t lbl; + private int set; + + // "unsigned char set", + // "}", + // "xlabel_t"); + + @Override + public void setInt(String fieldName, int data) { + if (fieldName.equals("set")) { + this.set = data; + return; + } + super.setInt(fieldName, data); + } + + @Override + public __ptr__ setPtr(String fieldName, __ptr__ newData) { + if (fieldName.equals("lbl")) { + this.lbl = (ST_textlabel_t) newData; + return this.lbl; + } + return super.setPtr(fieldName, newData); + } + + @Override + public __struct__ getStruct(String fieldName) { + if (fieldName.equals("sz")) { + return this.sz; + } + if (fieldName.equals("pos")) { + return this.pos; + } + return super.getStruct(fieldName); + } + + @Override + public void setStruct(String fieldName, __struct__ newData) { + if (fieldName.equals("sz")) { + this.sz.copyDataFrom(newData); + return; + } + if (fieldName.equals("pos")) { + this.pos.copyDataFrom(newData); + return; + } + super.setStruct(fieldName, newData); + } + + public static size_t sizeof(final int nb) { + return new UnsupportedSize_t(nb) { + @Override + public Object malloc() { + return new StarArrayOfPtr(new STArray(nb, 0, ST_xlabel_t.class)); + } + + @Override + public int getInternalNb() { + return nb; + } + + @Override + public Object realloc(Object old) { + StarArrayOfPtr old2 = (StarArrayOfPtr) old; + old2.realloc(nb); + return old2; + } + }; + } + +} + +// typedef struct { +// pointf sz; /* Size of label (input) */ +// pointf pos; /* Position of lower-left corner of label (output) */ +// void *lbl; /* Pointer to label in the graph */ +// unsigned char set; /* True if the position has been set (input/output) */ +// } xlabel_t; \ No newline at end of file diff -Nru plantuml-1.2017.15/src/h/WithParent.java plantuml-1.2018.9/src/h/WithParent.java --- plantuml-1.2017.15/src/h/WithParent.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/h/WithParent.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,54 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of Smetana. + * Smetana is a partial translation of Graphviz/Dot sources from C to Java. + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * This translation is distributed under the same Licence as the original C program: + * + ************************************************************************* + * Copyright (c) 2011 AT&T Intellectual Property + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: See CVS logs. Details at http://www.graphviz.org/ + ************************************************************************* + * + * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC + * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] + * + * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES + * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + * + * You may obtain a copy of the License at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package h; + +import smetana.core.amiga.StarStruct; + +public interface WithParent { + + public StarStruct getParent(); + +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/AbstractPSystem.java plantuml-1.2018.9/src/net/sourceforge/plantuml/AbstractPSystem.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/AbstractPSystem.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/AbstractPSystem.java 2018-07-27 21:59:19.000000000 +0000 @@ -56,6 +56,7 @@ public abstract class AbstractPSystem implements Diagram { private UmlSource source; + private Scale scale; private String getVersion() { final StringBuilder toAppend = new StringBuilder(); @@ -98,9 +99,9 @@ public DisplayPositionned getTitle() { if (source == null) { - return new DisplayPositionned(Display.empty(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); + return DisplayPositionned.single(Display.empty(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); } - return new DisplayPositionned(source.getTitle(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); + return DisplayPositionned.single(source.getTitle(), HorizontalAlignment.CENTER, VerticalAlignment.TOP); } public String getWarningOrError() { @@ -140,6 +141,14 @@ } } + final public void setScale(Scale scale) { + this.scale = scale; + } + + final public Scale getScale() { + return scale; + } + protected abstract ImageData exportDiagramNow(OutputStream os, int index, FileFormatOption fileFormatOption, long seed) throws IOException; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java plantuml-1.2018.9/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,7 +45,7 @@ import net.sourceforge.plantuml.command.regex.MyPattern; import net.sourceforge.plantuml.command.regex.Pattern2; -import com.ctreber.acearth.plugins.markers.Marker; +import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; public class PSystemXearthFactory extends PSystemBasicFactory { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearth.java plantuml-1.2018.9/src/net/sourceforge/plantuml/acearth/PSystemXearth.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/acearth/PSystemXearth.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/acearth/PSystemXearth.java 2018-07-27 21:59:19.000000000 +0000 @@ -53,9 +53,9 @@ import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; -import com.ctreber.acearth.ACearth; -import com.ctreber.acearth.ConfigurationACearth; -import com.ctreber.acearth.plugins.markers.Marker; +import ext.plantuml.com.ctreber.acearth.ACearth; +import ext.plantuml.com.ctreber.acearth.ConfigurationACearth; +import ext.plantuml.com.ctreber.acearth.plugins.markers.Marker; public class PSystemXearth extends AbstractPSystem { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java 2018-07-27 21:59:19.000000000 +0000 @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.LeafType; +import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.utils.UniqueSequence; @@ -100,7 +101,7 @@ } private void updateLasts(final IEntity result) { - if (result.getLeafType() == LeafType.NOTE) { + if (result == null || result.getLeafType() == LeafType.NOTE) { return; } this.lastEntityConsulted = result; @@ -154,8 +155,9 @@ public IEntity createInnerActivity() { // Log.println("createInnerActivity A"); final Code code = Code.of("##" + UniqueSequence.getValue()); - final IEntity g = getOrCreateGroup(code, Display.getWithNewlines(code), GroupType.INNER_ACTIVITY, - getCurrentGroup()); + gotoGroup2(code, Display.getWithNewlines(code), GroupType.INNER_ACTIVITY, getCurrentGroup(), + NamespaceStrategy.SINGLE); + final IEntity g = getCurrentGroup(); // g.setRankdir(Rankdir.LEFT_TO_RIGHT); lastEntityConsulted = null; lastEntityBrancheConsulted = null; @@ -175,7 +177,8 @@ if (getCurrentGroup().getGroupType() != GroupType.INNER_ACTIVITY) { throw new IllegalStateException("type=" + getCurrentGroup().getGroupType()); } - getOrCreateGroup(code, Display.getWithNewlines("code"), GroupType.CONCURRENT_ACTIVITY, getCurrentGroup()); + gotoGroup2(code, Display.getWithNewlines("code"), GroupType.CONCURRENT_ACTIVITY, getCurrentGroup(), + NamespaceStrategy.SINGLE); lastEntityConsulted = null; lastEntityBrancheConsulted = null; } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkActivity.java 2018-07-27 21:59:19.000000000 +0000 @@ -58,7 +58,9 @@ import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; +import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.cucadiagram.Stereotype; +import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; @@ -84,11 +86,9 @@ new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("ARROW_BODY1", "([-.]+)"), // - new RegexLeaf("ARROW_STYLE1", - "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // + new RegexLeaf("ARROW_STYLE1", "(?:\\[(" + CommandLinkElement.LINE_STYLE + ")\\])?"), // new RegexLeaf("ARROW_DIRECTION", "(\\*|left|right|up|down|le?|ri?|up?|do?)?"), // - new RegexLeaf("ARROW_STYLE2", - "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // + new RegexLeaf("ARROW_STYLE2", "(?:\\[(" + CommandLinkElement.LINE_STYLE + ")\\])?"), // new RegexLeaf("ARROW_BODY2", "([-.]*)\\>"), // new RegexLeaf("[%s]*"), // @@ -150,7 +150,7 @@ LinkType type = new LinkType(LinkDecor.ARROW, LinkDecor.NONE); if ((arrowBody1 + arrowBody2).contains(".")) { - type = type.getDotted(); + type = type.goDotted(); } Link link = new Link(entity1, entity2, type, linkLabel, lenght); @@ -167,7 +167,7 @@ link.setUrl(urlLink); } - CommandLinkClass.applyStyle(arg.getLazzy("ARROW_STYLE", 0), link); + link.applyStyle(arg.getLazzy("ARROW_STYLE", 0)); diagram.addLink(link); return CommandExecutionResult.ok(); @@ -198,8 +198,8 @@ final Code code = Code.of(arg.get("CODE" + suf, 0)); if (code != null) { if (partition != null) { - system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, - system.getRootGroup()); + system.gotoGroup2(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, + system.getRootGroup(), NamespaceStrategy.SINGLE); } final IEntity result = system.getOrCreate(code, Display.getWithNewlines(code), CommandLinkActivity.getTypeIfExisting(system, code)); @@ -216,8 +216,8 @@ if (quoted.get(0) != null) { final Code quotedCode = Code.of(quoted.get(1) == null ? quoted.get(0) : quoted.get(1)); if (partition != null) { - system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, - system.getRootGroup()); + system.gotoGroup2(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, + system.getRootGroup(), NamespaceStrategy.SINGLE); } final IEntity result = system.getOrCreate(quotedCode, Display.getWithNewlines(quoted.get(0)), CommandLinkActivity.getTypeIfExisting(system, quotedCode)); @@ -229,8 +229,8 @@ final Code quotedInvisible = Code.of(arg.get("QUOTED_INVISIBLE" + suf, 0)); if (quotedInvisible != null) { if (partition != null) { - system.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, - system.getRootGroup()); + system.gotoGroup2(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, + system.getRootGroup(), NamespaceStrategy.SINGLE); } final IEntity result = system.getOrCreate(quotedInvisible, Display.getWithNewlines(quotedInvisible), LeafType.ACTIVITY); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandLinkLongActivity.java 2018-07-27 21:59:19.000000000 +0000 @@ -63,7 +63,9 @@ import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.LinkDecor; import net.sourceforge.plantuml.cucadiagram.LinkType; +import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.cucadiagram.Stereotype; +import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.graphic.color.ColorType; public class CommandLinkLongActivity extends CommandMultilines2 { @@ -93,11 +95,9 @@ new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), // new RegexLeaf("ARROW_BODY1", "([-.]+)"), // - new RegexLeaf("ARROW_STYLE1", - "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // + new RegexLeaf("ARROW_STYLE1", "(?:\\[(" + CommandLinkElement.LINE_STYLE + ")\\])?"), // new RegexLeaf("ARROW_DIRECTION", "(\\*|left|right|up|down|le?|ri?|up?|do?)?"), // - new RegexLeaf("ARROW_STYLE2", - "(?:\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)\\])?"), // + new RegexLeaf("ARROW_STYLE2", "(?:\\[(" + CommandLinkElement.LINE_STYLE + ")\\])?"), // new RegexLeaf("ARROW_BODY2", "([-.]*)\\>"), // new RegexLeaf("[%s]*"), // @@ -108,11 +108,14 @@ new RegexLeaf("$")); } - public CommandExecutionResult executeNow(final ActivityDiagram diagram, BlocLines lines) { + protected CommandExecutionResult executeNow(final ActivityDiagram diagram, BlocLines lines) { lines = lines.trim(false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final IEntity entity1 = CommandLinkActivity.getEntity(diagram, line0, true); + if (entity1 == null) { + return CommandExecutionResult.error("No such entity"); + } if (line0.get("STEREOTYPE", 0) != null) { entity1.setStereotype(new Stereotype(line0.get("STEREOTYPE", 0))); @@ -165,9 +168,14 @@ partition = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(partition); } if (partition != null) { - diagram.getOrCreateGroup(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, null); + diagram.gotoGroup2(Code.of(partition), Display.getWithNewlines(partition), GroupType.PACKAGE, null, + NamespaceStrategy.SINGLE); + } + final IEntity entity2 = diagram.getOrCreate(code, Display.getWithNewlines(display), LeafType.ACTIVITY); + if (entity2 == null) { + return CommandExecutionResult.error("No such entity"); } - final IEntity entity2 = diagram.createLeaf(code, Display.getWithNewlines(display), LeafType.ACTIVITY, null); + if (partition != null) { diagram.endGroup(); } @@ -179,11 +187,8 @@ entity2.setStereotype(new Stereotype(lineLast.get(2))); } if (lineLast.get(4) != null) { - entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(lineLast.get(4))); - } - - if (entity1 == null || entity2 == null) { - return CommandExecutionResult.error("No such entity"); + entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet() + .getColorIfValid(lineLast.get(4))); } final String arrowBody1 = CommandLinkClass.notNull(line0.get("ARROW_BODY1", 0)); @@ -198,7 +203,7 @@ LinkType type = new LinkType(LinkDecor.ARROW, LinkDecor.NONE); if (arrow.contains(".")) { - type = type.getDotted(); + type = type.goDotted(); } Link link = new Link(entity1, entity2, type, linkLabel, lenght); final Direction direction = StringUtils.getArrowDirection(arrowBody1 + arrowDirection + arrowBody2 + ">"); @@ -212,7 +217,7 @@ link.setUrl(urlLink); } - CommandLinkClass.applyStyle(line0.getLazzy("ARROW_STYLE", 0), link); + link.applyStyle(line0.getLazzy("ARROW_STYLE", 0)); diagram.addLink(link); return CommandExecutionResult.ok(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram/command/CommandPartition.java 2018-07-27 21:59:19.000000000 +0000 @@ -48,6 +48,7 @@ import net.sourceforge.plantuml.cucadiagram.GroupType; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IGroup; +import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.graphic.color.ColorParser; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; @@ -79,8 +80,9 @@ protected CommandExecutionResult executeArg(ActivityDiagram diagram, RegexResult arg) { final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0))); final IGroup currentPackage = diagram.getCurrentGroup(); - final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(code), GroupType.PACKAGE, - currentPackage); + diagram.gotoGroup2(code, Display.getWithNewlines(code), GroupType.PACKAGE, currentPackage, + NamespaceStrategy.SINGLE); + final IEntity p = diagram.getCurrentGroup(); final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); if (colors.isEmpty() == false) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java 2018-07-27 21:59:19.000000000 +0000 @@ -48,8 +48,7 @@ import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.activitydiagram3.ftile.BoxStyle; -import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; -import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlanes; +import net.sourceforge.plantuml.activitydiagram3.ftile.SwimlanesC; import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.ImageData; @@ -57,13 +56,13 @@ import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.graphic.TextBlock; -import net.sourceforge.plantuml.graphic.TextBlockCompressed; import net.sourceforge.plantuml.graphic.TextBlockRecentred; -import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.sequencediagram.NotePosition; import net.sourceforge.plantuml.sequencediagram.NoteType; import net.sourceforge.plantuml.ugraphic.ImageBuilder; +import net.sourceforge.plantuml.ugraphic.comp.CompressionMode; +import net.sourceforge.plantuml.ugraphic.comp.TextBlockCompressedOnXorY; public class ActivityDiagram3 extends UmlDiagram { @@ -73,7 +72,7 @@ private SwimlaneStrategy swimlaneStrategy; - private final Swimlanes swinlanes = new Swimlanes(getSkinParam(), getPragma()); + private final SwimlanesC swinlanes = new SwimlanesC(getSkinParam(), getPragma()); private void manageSwimlaneStrategy() { if (swimlaneStrategy == null) { @@ -117,6 +116,13 @@ } } + public void addSpot(String spot) { + final InstructionSpot ins = new InstructionSpot(spot, nextLinkRenderer(), swinlanes.getCurrentSwimlane()); + current().add(ins); + setNextLinkRendererInternal(LinkRendering.none()); + manageSwimlaneStrategy(); + } + public CommandExecutionResult addGoto(String name) { final InstructionGoto ins = new InstructionGoto(swinlanes.getCurrentSwimlane(), name); current().add(ins); @@ -186,13 +192,16 @@ throws IOException { // BUG42 // COMPRESSION - // TextBlock result = swinlanes; - TextBlock result = new TextBlockCompressed(swinlanes); + TextBlock result = swinlanes; + // result = new TextBlockCompressedOnY(CompressionMode.ON_Y, result); + // result = new TextBlockCompressedOnXorY(CompressionMode.ON_X, result); + result = new TextBlockCompressedOnXorY(CompressionMode.ON_Y, result); result = new TextBlockRecentred(result); final ISkinParam skinParam = getSkinParam(); result = new AnnotatedWorker(this, skinParam).addAdd(result); - final Dimension2D dim = TextBlockUtils.getMinMax(result, fileFormatOption.getDefaultStringBounder()) - .getDimension(); + // final Dimension2D dim = TextBlockUtils.getMinMax(result, fileFormatOption.getDefaultStringBounder()) + // .getDimension(); + final Dimension2D dim = result.getMinMax(fileFormatOption.getDefaultStringBounder()).getDimension(); final double margin = 10; final double dpiFactor = getDpiFactor(fileFormatOption, Dimension2DDouble.delta(dim, 2 * margin, 0)); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java 2018-07-27 21:59:19.000000000 +0000 @@ -45,6 +45,7 @@ import net.sourceforge.plantuml.activitydiagram3.command.CommandArrowLong3; import net.sourceforge.plantuml.activitydiagram3.command.CommandBackward3; import net.sourceforge.plantuml.activitydiagram3.command.CommandBreak; +import net.sourceforge.plantuml.activitydiagram3.command.CommandCircleSpot3; import net.sourceforge.plantuml.activitydiagram3.command.CommandElse3; import net.sourceforge.plantuml.activitydiagram3.command.CommandElseIf2; import net.sourceforge.plantuml.activitydiagram3.command.CommandElseLegacy1; @@ -126,6 +127,7 @@ // cmds.add(new CommandGroupEnd3()); cmds.add(new CommandStart3()); cmds.add(new CommandStop3()); + cmds.add(new CommandCircleSpot3()); cmds.add(new CommandBreak()); cmds.add(new CommandEnd3()); cmds.add(new CommandKill3()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/Branch.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/Branch.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/Branch.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/Branch.java 2018-07-27 21:59:19.000000000 +0000 @@ -149,8 +149,8 @@ return list.getLast(); } - public boolean isOnlySingleStop() { - return list.isOnlySingleStop(); + public boolean isOnlySingleStopOrSpot() { + return list.isOnlySingleStopOrSpot(); } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandActivityLong3.java 2018-07-27 21:59:19.000000000 +0000 @@ -72,7 +72,7 @@ new RegexLeaf("$")); } - public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { + protected CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.removeEmptyColumns(); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrow3.java 2018-07-27 21:59:19.000000000 +0000 @@ -43,11 +43,13 @@ import net.sourceforge.plantuml.command.regex.RegexOr; import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.cucadiagram.Display; +import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement; import net.sourceforge.plantuml.graphic.Rainbow; public class CommandArrow3 extends SingleLineCommand2 { - public static final String STYLE_COLORS = "-\\[((?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*(?:;(?:#\\w+|dotted|dashed|plain|bold|hidden)(?:,#\\w+|,dotted|,dashed|,plain|,bold|,hidden)*)*)\\]->"; + public static final String STYLE_COLORS = "-\\[(" + CommandLinkElement.LINE_STYLE + "(?:;" + + CommandLinkElement.LINE_STYLE + ")*)\\]->"; public CommandArrow3() { super(getRegexConcat()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrowLong3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrowLong3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrowLong3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandArrowLong3.java 2018-07-27 21:59:19.000000000 +0000 @@ -70,7 +70,7 @@ new RegexLeaf("$")); } - public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { + protected CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.removeEmptyColumns(); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); // final HtmlColor color = diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0)); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandCircleSpot3.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,64 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.command; + +import net.sourceforge.plantuml.activitydiagram3.ActivityDiagram3; +import net.sourceforge.plantuml.command.CommandExecutionResult; +import net.sourceforge.plantuml.command.SingleLineCommand2; +import net.sourceforge.plantuml.command.regex.RegexConcat; +import net.sourceforge.plantuml.command.regex.RegexLeaf; +import net.sourceforge.plantuml.command.regex.RegexResult; + +public class CommandCircleSpot3 extends SingleLineCommand2 { + + public CommandCircleSpot3() { + super(getRegexConcat()); + } + + static RegexConcat getRegexConcat() { + return new RegexConcat(// + new RegexLeaf("^"), // + new RegexLeaf("SPOT", "\\((\\S)\\)"), // + new RegexLeaf(";?$")); + } + + @Override + protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { + diagram.addSpot(arg.get("SPOT", 0)); + return CommandExecutionResult.ok(); + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandNoteLong3.java 2018-07-27 21:59:19.000000000 +0000 @@ -66,7 +66,7 @@ return "(?i)^end[%s]?note$"; } - public CommandExecutionResult executeNow(final ActivityDiagram3 diagram, BlocLines lines) { + protected CommandExecutionResult executeNow(final ActivityDiagram3 diagram, BlocLines lines) { // final List in = StringUtils.removeEmptyColumns2(lines.subList(1, lines.size() - 1)); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); lines = lines.subExtract(1, 1); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java 2018-07-27 21:59:19.000000000 +0000 @@ -63,24 +63,27 @@ new RegexLeaf("[%s]+"), // new RegexOptional(// new RegexConcat( // - color().getRegex(),// + color("BACK1").getRegex(),// new RegexLeaf("[%s]+"))), // - new RegexLeaf("TITLECOLOR", "(?:(#\\w+)[%s]+)?"), // new RegexLeaf("NAME", "([%g][^%g]+[%g]|\\S+)"), // + new RegexOptional(// + new RegexConcat( // + new RegexLeaf("[%s]+"), // + color("BACK2").getRegex())), // new RegexLeaf("[%s]*\\{?$")); } - private static ColorParser color() { - return ColorParser.simpleColor(ColorType.BACK); + private static ColorParser color(String id) { + return ColorParser.simpleColor(ColorType.BACK, id); } @Override protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) { final String partitionTitle = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0)); - final HtmlColor titleColor = diagram.getSkinParam().getIHtmlColorSet() - .getColorIfValid(arg.get("TITLECOLOR", 0)); - final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet()); + final String b1 = arg.get("BACK1", 0); + final Colors colors = color(b1 == null ? "BACK2" : "BACK1").getColor(arg, + diagram.getSkinParam().getIHtmlColorSet()); final HtmlColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBackground, null, false); @@ -89,9 +92,10 @@ backColor = colors.getColor(ColorType.BACK); } else { backColor = backColorInSkinparam; - } + final HtmlColor titleColor = colors.getColor(ColorType.HEADER); + // Warning : titleColor unused in FTileGroupW HtmlColor borderColor = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBorder, null, false); if (borderColor == null) { borderColor = HtmlColorUtils.BLACK; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeatWhile3Multilines.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeatWhile3Multilines.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeatWhile3Multilines.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/command/CommandRepeatWhile3Multilines.java 2018-07-27 21:59:19.000000000 +0000 @@ -74,7 +74,7 @@ } @Override - public CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { + protected CommandExecutionResult executeNow(ActivityDiagram3 diagram, BlocLines lines) { lines = lines.trim(false); final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499())); final RegexResult lineLast = getPatternEnd2().matcher(lines.getLast499().toString()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java 2018-07-27 21:59:19.000000000 +0000 @@ -39,28 +39,22 @@ import java.util.Collections; import java.util.List; -import net.sourceforge.plantuml.AlignParam; +import net.sourceforge.plantuml.AlignmentParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; public abstract class AbstractFtile extends AbstractTextBlock implements Ftile { - private final boolean shadowing; private final ISkinParam skinParam; - private AbstractFtile(boolean shadowing) { - this.shadowing = shadowing; - this.skinParam = null; - } - public AbstractFtile(ISkinParam skinParam) { - this.shadowing = skinParam.shadowing(); this.skinParam = skinParam; } @@ -101,10 +95,31 @@ public Collection getMyChildren() { throw new UnsupportedOperationException("" + getClass()); - // return Collections.emptyList(); } public HorizontalAlignment arrowHorizontalAlignment() { - return skinParam.getHorizontalAlignment(AlignParam.ARROW_MESSAGE_ALIGN, null); + return skinParam.getHorizontalAlignment(AlignmentParam.arrowMessageAlignment, null); + } + + private FtileGeometry cachedGeometry; + + final public FtileGeometry calculateDimension(StringBounder stringBounder) { + if (cachedGeometry == null) { + cachedGeometry = calculateDimensionFtile(stringBounder); + } + return cachedGeometry; } + + abstract protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder); + + @Override + final public MinMax getMinMax(StringBounder stringBounder) { + throw new UnsupportedOperationException(); + // return getMinMaxFtile(stringBounder); + } + + // protected MinMax getMinMaxFtile(StringBounder stringBounder) { + // throw new UnsupportedOperationException(); + // } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java 2018-07-27 21:59:19.000000000 +0000 @@ -221,4 +221,8 @@ return false; } + public double dpiFactor() { + return 1; + } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java 2018-07-27 21:59:19.000000000 +0000 @@ -40,8 +40,10 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.Set; import net.sourceforge.plantuml.ISkinParam; @@ -76,7 +78,18 @@ return tile2.getSwimlaneOut(); } + private final Map cachedTranslation = new HashMap(); + public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) { + UTranslate result = cachedTranslation.get(child); + if (result == null) { + result = getTranslateForSlow(child, stringBounder); + cachedTranslation.put(child, result); + } + return result; + } + + private UTranslate getTranslateForSlow(Ftile child, StringBounder stringBounder) { if (child == tile1) { return getTranslated1(stringBounder); } @@ -96,8 +109,8 @@ public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); - ug.apply(getTranslated1(stringBounder)).draw(tile1); - ug.apply(getTranslated2(stringBounder)).draw(tile2); + ug.apply(getTranslateFor(tile1, stringBounder)).draw(tile1); + ug.apply(getTranslateFor(tile2, stringBounder)).draw(tile2); } public LinkRendering getInLinkRendering() { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileBreak.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileBreak.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileBreak.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileBreak.java 2018-07-27 21:59:19.000000000 +0000 @@ -58,8 +58,9 @@ return "FtileBreak"; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { - return super.calculateDimension(stringBounder).withoutPointOut(); + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { + return calculateDimensionEmpty().withoutPointOut(); } @Override diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java 2018-07-27 21:59:19.000000000 +0000 @@ -85,7 +85,12 @@ public void drawU(UGraphic ug) { } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { + return calculateDimensionEmpty(); + } + + final protected FtileGeometry calculateDimensionEmpty() { return new FtileGeometry(width, height, width / 2, 0, height); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java 2018-07-27 21:59:19.000000000 +0000 @@ -111,6 +111,10 @@ return factory.stop(swimlane); } + public Ftile spot(Swimlane swimlane, String spot) { + return factory.spot(swimlane, spot); + } + public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors) { return factory.activity(label, swimlane, style, colors); } @@ -141,10 +145,11 @@ return factory.assembly(tile1, tile2); } - public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, - Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { - return factory.repeat(swimlane, swimlaneOut, startLabel, repeat, test, yes, out, color, backRepeatLinkRendering, - backward); + public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, + Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward, + boolean noOut) { + return factory.repeat(swimlane, swimlaneOut, startLabel, repeat, test, yes, out, color, + backRepeatLinkRendering, backward, noOut); } public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, @@ -181,4 +186,5 @@ protected FtileFactory getFactory() { return factory; } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java 2018-07-27 21:59:19.000000000 +0000 @@ -62,6 +62,8 @@ public Ftile end(Swimlane swimlane); + public Ftile spot(Swimlane swimlane, String spot); + public Ftile activity(Display label, Swimlane swimlane, BoxStyle style, Colors colors); public Ftile addNote(Ftile ftile, Swimlane swimlane, Collection notes); @@ -74,8 +76,9 @@ public Ftile assembly(Ftile tile1, Ftile tile2); - public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, - Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward); + public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, + Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward, + boolean noOut); public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGoto.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGoto.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGoto.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileGoto.java 2018-07-27 21:59:19.000000000 +0000 @@ -47,8 +47,9 @@ this.name = name; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { - return super.calculateDimension(stringBounder).withoutPointOut(); + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { + return calculateDimensionEmpty().withoutPointOut(); } public String getName() { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileHeightFixed.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileHeightFixed.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileHeightFixed.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileHeightFixed.java 2018-07-27 21:59:19.000000000 +0000 @@ -76,7 +76,8 @@ return tile.getSwimlaneOut(); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { return tile.calculateDimension(stringBounder).translate(getTranslate(stringBounder)).fixedHeight(fixedHeight); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileKilled.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileKilled.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileKilled.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileKilled.java 2018-07-27 21:59:19.000000000 +0000 @@ -61,7 +61,8 @@ return tile.getSwimlaneOut(); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry geo = tile.calculateDimension(stringBounder); return new FtileGeometry(tile.calculateDimension(stringBounder), geo.getLeft(), geo.getInY()); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMarged.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMarged.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMarged.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMarged.java 2018-07-27 21:59:19.000000000 +0000 @@ -85,7 +85,8 @@ return tile.getSwimlaneOut(); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry orig = tile.calculateDimension(stringBounder); return new FtileGeometry(orig.getWidth() + margin1 + margin2, orig.getHeight(), orig.getLeft() + margin1, orig.getInY(), orig.getOutY()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedRight.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedRight.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedRight.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedRight.java 2018-07-27 21:59:19.000000000 +0000 @@ -74,7 +74,8 @@ return tile.getSwimlaneOut(); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry orig = tile.calculateDimension(stringBounder); if (orig.getWidth() > maxX) { throw new IllegalStateException(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedVertically.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedVertically.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedVertically.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileMargedVertically.java 2018-07-27 21:59:19.000000000 +0000 @@ -58,7 +58,16 @@ ug.draw(getFtileDelegated()); } + private FtileGeometry cached; + public FtileGeometry calculateDimension(StringBounder stringBounder) { + if (cached == null) { + this.cached = calculateDimensionSlow(stringBounder); + } + return this.cached; + } + + private FtileGeometry calculateDimensionSlow(StringBounder stringBounder) { final FtileGeometry orig = getFtileDelegated().calculateDimension(stringBounder); return new FtileGeometry(orig.getWidth(), orig.getHeight() + margin1 + margin2, orig.getLeft(), orig.getInY() + margin1, orig.hasPointOut() ? orig.getOutY() + margin1 : orig.getOutY()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java 2018-07-27 21:59:19.000000000 +0000 @@ -39,6 +39,7 @@ import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import net.sourceforge.plantuml.Direction; @@ -48,11 +49,12 @@ import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; -import net.sourceforge.plantuml.ugraphic.CompressionTransform; +import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UPolygon; import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UTranslate; +import net.sourceforge.plantuml.ugraphic.comp.CompressionTransform; public class Snake implements UShape { @@ -140,10 +142,14 @@ } private void drawRainbow(UGraphic ug) { - final List colors = color.getColors(); + List colors = color.getColors(); final int colorArrowSeparationSpace = color.getColorArrowSeparationSpace(); final double move = 2 + colorArrowSeparationSpace; final WormMutation mutation = WormMutation.create(worm, move); + if (mutation.isDxNegative()) { + colors = new ArrayList(colors); + Collections.reverse(colors); + } final double globalMove = -1.0 * (colors.size() - 1) / 2.0; Worm current = worm.moveFirstPoint(mutation.getFirst().multiplyBy(globalMove)); if (mutation.size() > 2) { @@ -268,4 +274,8 @@ this.emphasizeDirection = direction; } + public boolean doesHorizontalCross(MinMax minMax) { + return worm.doesHorizontalCross(minMax); + } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlane.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlane.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlane.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlane.java 2018-07-27 21:59:19.000000000 +0000 @@ -50,7 +50,7 @@ private Display display; private UTranslate translate = new UTranslate(); - private double totalWidth; + private double actualWidth; public Swimlane(String name) { this.name = name; @@ -79,9 +79,9 @@ return translate; } - public final void setTranslateAndWidth(UTranslate translate, double totalWidth) { + public final void setTranslateAndWidth(UTranslate translate, double actualWidth) { this.translate = translate; - this.totalWidth = totalWidth; + this.actualWidth = actualWidth; } public Colors getColors(ISkinParam skinParam) { @@ -96,8 +96,8 @@ private Colors colors = Colors.empty(); - public final double getTotalWidth() { - return totalWidth; + public final double getActualWidth() { + return actualWidth; } public void setColors(Colors colors) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesA.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesA.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesA.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesA.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,309 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile; + +import java.awt.geom.Dimension2D; +import java.util.ArrayList; +import java.util.List; + +import net.sourceforge.plantuml.FontParam; +import net.sourceforge.plantuml.ISkinParam; +import net.sourceforge.plantuml.Pragma; +import net.sourceforge.plantuml.activitydiagram3.Instruction; +import net.sourceforge.plantuml.activitydiagram3.InstructionList; +import net.sourceforge.plantuml.activitydiagram3.LinkRendering; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAddNote; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAddUrl; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorAssembly; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorCreateGroup; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorCreateParallel; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorIf; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorRepeat; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileFactoryDelegatorWhile; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.UGraphicInterceptorOneSwimlane; +import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.VCompactFactory; +import net.sourceforge.plantuml.cucadiagram.Display; +import net.sourceforge.plantuml.graphic.AbstractTextBlock; +import net.sourceforge.plantuml.graphic.FontConfiguration; +import net.sourceforge.plantuml.graphic.HorizontalAlignment; +import net.sourceforge.plantuml.graphic.HtmlColor; +import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.graphic.TextBlock; +import net.sourceforge.plantuml.graphic.TextBlockUtils; +import net.sourceforge.plantuml.graphic.UGraphicDelegator; +import net.sourceforge.plantuml.graphic.color.ColorType; +import net.sourceforge.plantuml.svek.UGraphicForSnake; +import net.sourceforge.plantuml.ugraphic.LimitFinder; +import net.sourceforge.plantuml.ugraphic.MinMax; +import net.sourceforge.plantuml.ugraphic.UChange; +import net.sourceforge.plantuml.ugraphic.UChangeBackColor; +import net.sourceforge.plantuml.ugraphic.UChangeColor; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.URectangle; +import net.sourceforge.plantuml.ugraphic.UShape; +import net.sourceforge.plantuml.ugraphic.UTranslate; +import net.sourceforge.plantuml.ugraphic.comp.SlotSet; +import net.sourceforge.plantuml.utils.MathUtils; + +public class SwimlanesA extends AbstractTextBlock implements TextBlock { + + protected final ISkinParam skinParam;; + private final Pragma pragma; + + protected final List swimlanes = new ArrayList(); + private Swimlane currentSwimlane = null; + + private final Instruction root = new InstructionList(); + private Instruction currentInstruction = root; + + private LinkRendering nextLinkRenderer = LinkRendering.none(); + + public SwimlanesA(ISkinParam skinParam, Pragma pragma) { + this.skinParam = skinParam; + this.pragma = pragma; + } + + private FtileFactory getFtileFactory(StringBounder stringBounder) { + FtileFactory factory = new VCompactFactory(skinParam, stringBounder); + factory = new FtileFactoryDelegatorAddUrl(factory); + factory = new FtileFactoryDelegatorAssembly(factory); + factory = new FtileFactoryDelegatorIf(factory, pragma); + factory = new FtileFactoryDelegatorWhile(factory); + factory = new FtileFactoryDelegatorRepeat(factory); + factory = new FtileFactoryDelegatorCreateParallel(factory); + // factory = new FtileFactoryDelegatorCreateParallelAddingMargin(new + // FtileFactoryDelegatorCreateParallel1(factory)); + factory = new FtileFactoryDelegatorAddNote(factory); + factory = new FtileFactoryDelegatorCreateGroup(factory); + return factory; + } + + public void swimlane(String name, HtmlColor color, Display label) { + currentSwimlane = getOrCreate(name); + if (color != null) { + currentSwimlane.setSpecificColorTOBEREMOVED(ColorType.BACK, color); + } + if (Display.isNull(label) == false) { + currentSwimlane.setDisplay(label); + } + } + + private Swimlane getOrCreate(String name) { + for (Swimlane s : swimlanes) { + if (s.getName().equals(name)) { + return s; + } + } + final Swimlane result = new Swimlane(name); + swimlanes.add(result); + return result; + } + + class Cross extends UGraphicDelegator { + + private Cross(UGraphic ug) { + super(ug); + } + + @Override + public void draw(UShape shape) { + if (shape instanceof Ftile) { + final Ftile tile = (Ftile) shape; + tile.drawU(this); + } else if (shape instanceof Connection) { + final Connection connection = (Connection) shape; + final Ftile tile1 = connection.getFtile1(); + final Ftile tile2 = connection.getFtile2(); + + if (tile1 == null || tile2 == null) { + return; + } + if (tile1.getSwimlaneOut() != tile2.getSwimlaneIn()) { + final ConnectionCross connectionCross = new ConnectionCross(connection); + connectionCross.drawU(getUg()); + } + } + } + + public UGraphic apply(UChange change) { + return new Cross(getUg().apply(change)); + } + + } + + static protected final double separationMargin = 10; + + private TextBlock full; + + public void drawU(UGraphic ug) { + if (full == null) { + final FtileFactory factory = getFtileFactory(ug.getStringBounder()); + full = root.createFtile(factory); + if (swimlanes.size() <= 1) { + // BUG42 + full = new TextBlockInterceptorUDrawable(full); + } + } + + ug = new UGraphicForSnake(ug); + if (swimlanes.size() <= 1) { + full.drawU(ug); + ug.flushUg(); + return; + } + + drawWhenSwimlanes(ug, full); + } + + static private void printDebug(UGraphic ug, SlotSet slot, HtmlColor col, TextBlock full) { + slot.drawDebugX(ug.apply(new UChangeColor(col)).apply(new UChangeBackColor(col)), + full.calculateDimension(ug.getStringBounder()).getHeight()); + + } + + protected void drawWhenSwimlanes(final UGraphic ug, TextBlock full) { + final StringBounder stringBounder = ug.getStringBounder(); + final Dimension2D dimensionFull = full.calculateDimension(stringBounder); + + computeSize(ug, full); + final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder); + + double x2 = 0; + for (Swimlane swimlane : swimlanes) { + final HtmlColor back = swimlane.getColors(skinParam).getColor(ColorType.BACK); + if (back != null) { + final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back)) + .apply(new UTranslate(x2, 0)); + background.draw(new URectangle(swimlane.getActualWidth(), dimensionFull.getHeight() + + titleHeightTranslate.getDy())); + } + + full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane).apply(swimlane.getTranslate()).apply( + titleHeightTranslate)); + x2 += swimlane.getActualWidth(); + + } + final Cross cross = new Cross(ug.apply(titleHeightTranslate)); + full.drawU(cross); + cross.flushUg(); + } + + protected UTranslate getTitleHeightTranslate(final StringBounder stringBounder) { + return new UTranslate(); + } + + private void computeDrawingWidths(UGraphic ug, TextBlock full) { + final StringBounder stringBounder = ug.getStringBounder(); + for (Swimlane swimlane : swimlanes) { + final LimitFinder limitFinder = new LimitFinder(stringBounder, false); + final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(new UGraphicForSnake( + limitFinder), swimlane); + full.drawU(interceptor); + interceptor.flushUg(); + final MinMax minMax = limitFinder.getMinMax(); + swimlane.setMinMax(minMax); + } + } + + private void computeSize(UGraphic ug, TextBlock full) { + computeDrawingWidths(ug, full); + double x1 = 0; + + double swimlaneWidth = skinParam.swimlaneWidth(); + + if (swimlaneWidth == ISkinParam.SWIMLANE_WIDTH_SAME) { + for (Swimlane swimlane : swimlanes) { + swimlaneWidth = Math.max(swimlaneWidth, rawDrawingWidth(swimlane)); + } + + } + for (Swimlane swimlane : swimlanes) { + final double swimlaneActualWidth = swimlaneActualWidth(ug.getStringBounder(), swimlaneWidth, swimlane); + + final UTranslate translate = new UTranslate(x1 - swimlane.getMinMax().getMinX() + separationMargin + + (swimlaneActualWidth - rawDrawingWidth(swimlane)) / 2.0, 0); + swimlane.setTranslateAndWidth(translate, swimlaneActualWidth); + + x1 += swimlaneActualWidth; + } + } + + protected double swimlaneActualWidth(StringBounder stringBounder, double swimlaneWidth, Swimlane swimlane) { + return MathUtils.max(swimlaneWidth, rawDrawingWidth(swimlane)); + } + + private double rawDrawingWidth(Swimlane swimlane) { + return swimlane.getMinMax().getWidth() + 2 * separationMargin; + } + + public Dimension2D calculateDimension(StringBounder stringBounder) { + return getMinMax(stringBounder).getDimension(); + } + + public Instruction getCurrent() { + return currentInstruction; + } + + public void setCurrent(Instruction current) { + this.currentInstruction = current; + } + + public LinkRendering nextLinkRenderer() { + return nextLinkRenderer; + } + + public void setNextLinkRenderer(LinkRendering link) { + if (link == null) { + throw new IllegalArgumentException(); + } + this.nextLinkRenderer = link; + } + + public Swimlane getCurrentSwimlane() { + return currentSwimlane; + } + + private MinMax cachedMinMax; + + @Override + public MinMax getMinMax(StringBounder stringBounder) { + if (cachedMinMax == null) { + cachedMinMax = TextBlockUtils.getMinMax(this, stringBounder); + } + return cachedMinMax; + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesB.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesB.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesB.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesB.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,112 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile; + +import net.sourceforge.plantuml.FontParam; +import net.sourceforge.plantuml.ISkinParam; +import net.sourceforge.plantuml.LineBreakStrategy; +import net.sourceforge.plantuml.Pragma; +import net.sourceforge.plantuml.graphic.FontConfiguration; +import net.sourceforge.plantuml.graphic.HorizontalAlignment; +import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.graphic.TextBlock; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.UTranslate; +import net.sourceforge.plantuml.utils.MathUtils; + +public class SwimlanesB extends SwimlanesA { + + public SwimlanesB(ISkinParam skinParam, Pragma pragma) { + super(skinParam, pragma); + } + + @Override + protected void drawWhenSwimlanes(UGraphic ug, TextBlock full) { + super.drawWhenSwimlanes(ug, full); + double x2 = 0; + + final StringBounder stringBounder = ug.getStringBounder(); + for (Swimlane swimlane : swimlanes) { + final TextBlock swTitle = getTitle(swimlane); + final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); + final double posTitle = x2 + (swimlane.getActualWidth() - titleWidth) / 2; + swTitle.drawU(ug.apply(new UTranslate(posTitle, 0))); + x2 += swimlane.getActualWidth(); + } + } + + private TextBlock getTitle(Swimlane swimlane) { + final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.SWIMLANE_TITLE, null); + + LineBreakStrategy wrap = getWrap(); + if (wrap.isAuto()) { + wrap = new LineBreakStrategy("" + ((int) swimlane.getActualWidth())); + } + + return swimlane.getDisplay().create(fontConfiguration, HorizontalAlignment.LEFT, skinParam, wrap); + } + + private LineBreakStrategy getWrap() { + LineBreakStrategy wrap = skinParam.swimlaneWrapTitleWidth(); + if (wrap == LineBreakStrategy.NONE) { + wrap = skinParam.wrapWidth(); + } + return wrap; + } + + @Override + protected double swimlaneActualWidth(StringBounder stringBounder, double swimlaneWidth, Swimlane swimlane) { + final double m1 = super.swimlaneActualWidth(stringBounder, swimlaneWidth, swimlane); + if (getWrap().isAuto()) { + return m1; + } + + final double titleWidth = getTitle(swimlane).calculateDimension(stringBounder).getWidth(); + return MathUtils.max(m1, titleWidth + 2 * separationMargin); + + } + + @Override + protected UTranslate getTitleHeightTranslate(final StringBounder stringBounder) { + double titlesHeight = 0; + for (Swimlane swimlane : swimlanes) { + final TextBlock swTitle = getTitle(swimlane); + titlesHeight = Math.max(titlesHeight, swTitle.calculateDimension(stringBounder).getHeight()); + } + return new UTranslate(0, titlesHeight); + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesC.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesC.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesC.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/SwimlanesC.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,89 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile; + +import java.awt.geom.Dimension2D; + +import net.sourceforge.plantuml.ColorParam; +import net.sourceforge.plantuml.ISkinParam; +import net.sourceforge.plantuml.LineParam; +import net.sourceforge.plantuml.Pragma; +import net.sourceforge.plantuml.graphic.HtmlColor; +import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.graphic.TextBlock; +import net.sourceforge.plantuml.skin.rose.Rose; +import net.sourceforge.plantuml.ugraphic.UChangeColor; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.ULine; +import net.sourceforge.plantuml.ugraphic.UStroke; +import net.sourceforge.plantuml.ugraphic.UTranslate; + +public class SwimlanesC extends SwimlanesB { + + public SwimlanesC(ISkinParam skinParam, Pragma pragma) { + super(skinParam, pragma); + } + + @Override + protected void drawWhenSwimlanes(UGraphic ug, TextBlock full) { + super.drawWhenSwimlanes(ug, full); + double x2 = 0; + + final StringBounder stringBounder = ug.getStringBounder(); + final Dimension2D dimensionFull = full.calculateDimension(stringBounder); + + final UTranslate titleHeightTranslate = getTitleHeightTranslate(stringBounder); + + for (Swimlane swimlane : swimlanes) { + drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); + + x2 += swimlane.getActualWidth(); + + } + drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); + + } + + private void drawSeparation(UGraphic ug, double height) { + HtmlColor color = skinParam.getHtmlColor(ColorParam.swimlaneBorder, null, false); + if (color == null) { + color = ColorParam.swimlaneBorder.getDefaultValue(); + } + final UStroke thickness = Rose.getStroke(skinParam, LineParam.swimlaneBorder, 2); + ug.apply(thickness).apply(new UChangeColor(color)).draw(new ULine(0, height)); + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java 2018-07-27 21:59:19.000000000 +0000 @@ -71,7 +71,6 @@ import net.sourceforge.plantuml.svek.UGraphicForSnake; import net.sourceforge.plantuml.ugraphic.LimitFinder; import net.sourceforge.plantuml.ugraphic.MinMax; -import net.sourceforge.plantuml.ugraphic.SlotSet; import net.sourceforge.plantuml.ugraphic.UChange; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; @@ -81,6 +80,7 @@ import net.sourceforge.plantuml.ugraphic.UShape; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; +import net.sourceforge.plantuml.ugraphic.comp.SlotSet; import net.sourceforge.plantuml.utils.MathUtils; public class Swimlanes extends AbstractTextBlock implements TextBlock { @@ -113,7 +113,8 @@ factory = new FtileFactoryDelegatorWhile(factory); factory = new FtileFactoryDelegatorRepeat(factory); factory = new FtileFactoryDelegatorCreateParallel(factory); - // factory = new FtileFactoryDelegatorCreateParallelAddingMargin(new FtileFactoryDelegatorCreateParallel1(factory)); + // factory = new FtileFactoryDelegatorCreateParallelAddingMargin(new + // FtileFactoryDelegatorCreateParallel1(factory)); factory = new FtileFactoryDelegatorAddNote(factory); factory = new FtileFactoryDelegatorCreateGroup(factory); return factory; @@ -173,59 +174,26 @@ } static private final double separationMargin = 10; + private TextBlock full; public void drawU(UGraphic ug) { - final FtileFactory factory = getFtileFactory(ug.getStringBounder()); - TextBlock full = root.createFtile(factory); + if (full == null) { + final FtileFactory factory = getFtileFactory(ug.getStringBounder()); + full = root.createFtile(factory); + if (swimlanes.size() <= 1) { + // BUG42 + full = new TextBlockInterceptorUDrawable(full); + } + } ug = new UGraphicForSnake(ug); if (swimlanes.size() <= 1) { - full = new TextBlockInterceptorUDrawable(full); - // BUG42 - // full.drawU(ug); full.drawU(ug); ug.flushUg(); return; } - // if (OptionFlags.SWI2) { - // - // final SlotFinderX slotFinder = new SlotFinderX(ug.getStringBounder()); - // drawWhenSwimlanes(slotFinder, full); - // final SlotSet slotX = slotFinder.getXSlotSet().reverse(); - // // - // // // final SlotSet ysSlotSet = slotFinder.getYSlotSet().reverse().smaller(5.0); - // // - // System.err.println("slotX=" + slotX); - // - // printDebug(ug, slotX, HtmlColorUtils.GRAY, full); - // - // double x2 = 0; - // double y2 = 0; - // final double stepy = 40; - // int i = 0; - // final SlotSet deconnectedSwimlanes = new SlotSet(); - // for (Swimlane swimlane : swimlanes) { - // final UGraphic ug2 = ug.apply(new UChangeColor(HtmlColorUtils.GREEN)).apply( - // new UChangeBackColor(HtmlColorUtils.GREEN)); - // final double totalWidth = swimlane.getTotalWidth(); - // final SlotSet slot2 = slotX.filter(x2 + separationMargin, x2 + totalWidth - separationMargin); - // deconnectedSwimlanes.addAll(slot2); - // // ug2.apply(new UTranslate(x2, y2)).draw(new URectangle(totalWidth, stepy)); - // x2 += totalWidth; - // y2 += stepy; - // i++; - // } - // // printDebug(ug, deconnectedSwimlanes, HtmlColorUtils.GRAY, full); - // - // // - // final CompressionTransform compressionTransform = new CompressionTransform(deconnectedSwimlanes); - // // ug = new UGraphicCompress2(ug, compressionTransform); - // drawWhenSwimlanes(ug, full); - // } else { drawWhenSwimlanes(ug, full); - // } - // getCollisionDetector(ug, titleHeightTranslate).drawDebug(ug); } static private void printDebug(UGraphic ug, SlotSet slot, HtmlColor col, TextBlock full) { @@ -248,26 +216,24 @@ if (back != null) { final UGraphic background = ug.apply(new UChangeBackColor(back)).apply(new UChangeColor(back)) .apply(new UTranslate(x2, 0)); - background.draw(new URectangle(swimlane.getTotalWidth(), dimensionFull.getHeight() + background.draw(new URectangle(swimlane.getActualWidth(), dimensionFull.getHeight() + titleHeightTranslate.getDy())); } - // if (OptionFlags.SWI2 == false) { - final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, - skinParam); + final TextBlock swTitle = getTitle(swimlane); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); - final double posTitle = x2 + (swimlane.getTotalWidth() - titleWidth) / 2; + final double posTitle = x2 + (swimlane.getActualWidth() - titleWidth) / 2; swTitle.drawU(ug.apply(new UTranslate(posTitle, 0))); - // } drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); full.drawU(new UGraphicInterceptorOneSwimlane(ug, swimlane).apply(swimlane.getTranslate()).apply( titleHeightTranslate)); - x2 += swimlane.getTotalWidth(); + x2 += swimlane.getActualWidth(); } drawSeparation(ug.apply(new UTranslate(x2, 0)), dimensionFull.getHeight() + titleHeightTranslate.getDy()); + final Cross cross = new Cross(ug.apply(titleHeightTranslate)); full.drawU(cross); cross.flushUg(); @@ -303,8 +269,7 @@ final MinMax minMax = swimlane.getMinMax(); final double drawingWidth = minMax.getWidth() + 2 * separationMargin; - final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, - skinParam); + final TextBlock swTitle = getTitle(swimlane); final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); final double totalWidth = MathUtils.max(swimlaneWidth, drawingWidth, titleWidth + 2 * separationMargin); @@ -316,37 +281,10 @@ } } - private void computeSizeOld(UGraphic ug, TextBlock full) { - double x1 = 0; - final StringBounder stringBounder = ug.getStringBounder(); - for (Swimlane swimlane : swimlanes) { - - final LimitFinder limitFinder = new LimitFinder(stringBounder, false); - final UGraphicInterceptorOneSwimlane interceptor = new UGraphicInterceptorOneSwimlane(new UGraphicForSnake( - limitFinder), swimlane); - full.drawU(interceptor); - interceptor.flushUg(); - final MinMax minMax = limitFinder.getMinMax(); - - final double drawingWidth = minMax.getWidth() + 2 * separationMargin; - final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, - skinParam); - final double titleWidth = swTitle.calculateDimension(stringBounder).getWidth(); - final double totalWidth = Math.max(drawingWidth, titleWidth + 2 * separationMargin); - - final UTranslate translate = new UTranslate(x1 - minMax.getMinX() + separationMargin - + (totalWidth - drawingWidth) / 2.0, 0); - swimlane.setTranslateAndWidth(translate, totalWidth); - - x1 += totalWidth; - } - } - private UTranslate getTitleHeightTranslate(final StringBounder stringBounder) { double titlesHeight = 0; for (Swimlane swimlane : swimlanes) { - final TextBlock swTitle = swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, - skinParam); + final TextBlock swTitle = getTitle(swimlane); titlesHeight = Math.max(titlesHeight, swTitle.calculateDimension(stringBounder).getHeight()); } @@ -354,24 +292,9 @@ return titleHeightTranslate; } - private CollisionDetector getCollisionDetector(UGraphic ug, final UTranslate titleHeightTranslate) { - final FtileFactory factory = getFtileFactory(ug.getStringBounder()); - final TextBlock full = root.createFtile(factory); - ug = new UGraphicForSnake(ug); - - final CollisionDetector collisionDetector = new CollisionDetector(ug.getStringBounder()); - - for (Swimlane swimlane : swimlanes) { - full.drawU(new UGraphicInterceptorOneSwimlane(collisionDetector, swimlane).apply(swimlane.getTranslate()) - .apply(titleHeightTranslate)); - } - - collisionDetector.setManageSnakes(true); - final Cross cross = new Cross(collisionDetector.apply(titleHeightTranslate)); - full.drawU(cross); - cross.flushUg(); - - return collisionDetector; + private TextBlock getTitle(Swimlane swimlane) { + return swimlane.getDisplay().create(getFontConfiguration(), HorizontalAlignment.LEFT, skinParam, + skinParam.wrapWidth()); } private void drawSeparation(UGraphic ug, double height) { @@ -384,7 +307,7 @@ } public Dimension2D calculateDimension(StringBounder stringBounder) { - return TextBlockUtils.getMinMax(this, stringBounder).getDimension(); + return getMinMax(stringBounder).getDimension(); } public Instruction getCurrent() { @@ -410,4 +333,14 @@ return currentSwimlane; } + private MinMax cachedMinMax; + + @Override + public MinMax getMinMax(StringBounder stringBounder) { + if (cachedMinMax == null) { + cachedMinMax = TextBlockUtils.getMinMax(this, stringBounder); + } + return cachedMinMax; + } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/TextBlockInterceptorUDrawable.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/TextBlockInterceptorUDrawable.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/TextBlockInterceptorUDrawable.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/TextBlockInterceptorUDrawable.java 2018-07-27 21:59:19.000000000 +0000 @@ -41,7 +41,6 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; -import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; @@ -59,7 +58,8 @@ } public Dimension2D calculateDimension(StringBounder stringBounder) { - return TextBlockUtils.getMinMax(this, stringBounder).getDimension(); + // return TextBlockUtils.getMinMax(this, stringBounder).getDimension(); + throw new UnsupportedOperationException(); } } \ No newline at end of file diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/ConditionalBuilder.java 2018-07-27 21:59:19.000000000 +0000 @@ -108,16 +108,16 @@ ISkinParam skinParam, StringBounder stringBounder, FontConfiguration fcArrow, FontConfiguration fcTest) { final ConditionalBuilder builder = new ConditionalBuilder(swimlane, borderColor, backColor, arrowColor, ftileFactory, conditionStyle, branch1, branch2, skinParam, stringBounder, fcArrow, fcTest); - if (isEmptyOrOnlySingleStop(branch2) && isEmptyOrOnlySingleStop(branch1) == false) { + if (isEmptyOrOnlySingleStopOrSpot(branch2) && isEmptyOrOnlySingleStopOrSpot(branch1) == false) { return builder.createDown(builder.branch1, builder.branch2); } - if (branch1.isEmpty() && branch2.isOnlySingleStop()) { + if (branch1.isEmpty() && branch2.isOnlySingleStopOrSpot()) { return builder.createDown(builder.branch1, builder.branch2); } - if (isEmptyOrOnlySingleStop(branch1) && isEmptyOrOnlySingleStop(branch2) == false) { + if (isEmptyOrOnlySingleStopOrSpot(branch1) && isEmptyOrOnlySingleStopOrSpot(branch2) == false) { return builder.createDown(builder.branch2, builder.branch1); } - if (branch2.isEmpty() && branch1.isOnlySingleStop()) { + if (branch2.isEmpty() && branch1.isOnlySingleStopOrSpot()) { return builder.createDown(builder.branch2, builder.branch1); } return builder.createWithLinks(); @@ -125,8 +125,8 @@ // return builder.createNude(); } - private static boolean isEmptyOrOnlySingleStop(Branch branch) { - return branch.isEmpty() || branch.isOnlySingleStop(); + private static boolean isEmptyOrOnlySingleStopOrSpot(Branch branch) { + return branch.isEmpty() || branch.isOnlySingleStopOrSpot(); } private Ftile createDown(Branch branch1, Branch branch2) { @@ -136,11 +136,11 @@ final TextBlock tb2 = getLabelPositive(branch2); final Ftile diamond1 = getDiamond1(false, tb1, tb2); final Ftile diamond2 = getDiamond2(branch1, branch2, true); - if (branch2.isOnlySingleStop()) { + if (branch2.isOnlySingleStopOrSpot()) { return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile1, 10), arrowColor, ftileFactory, branch2.getFtile(), branch2.getInlinkRenderingColorAndStyle()); } - if (branch1.isOnlySingleStop()) { + if (branch1.isOnlySingleStopOrSpot()) { return FtileIfDown.create(diamond1, diamond2, swimlane, FtileUtils.addHorizontalMargin(tile2, 10), arrowColor, ftileFactory, branch1.getFtile(), branch1.getInlinkRenderingColorAndStyle()); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java 2018-07-27 21:59:19.000000000 +0000 @@ -128,7 +128,8 @@ ug.apply(getTranslate2(stringBounder)).draw(tile2); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); if (tile1.calculateDimension(stringBounder).hasPointOut() || tile2.calculateDimension(stringBounder).hasPointOut()) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorRepeat.java 2018-07-27 21:59:19.000000000 +0000 @@ -72,13 +72,14 @@ @Override public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, final Ftile repeat, Display test, - Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { + Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward, + boolean noOut) { final ConditionStyle conditionStyle = skinParam().getConditionStyle(); final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); - final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) - : color; + final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), + ColorParam.activityDiamondBackground) : color; final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final LinkRendering endRepeatLinkRendering = repeat.getOutLinkRendering(); @@ -92,7 +93,7 @@ Ftile result = FtileRepeat.create(backRepeatLinkRendering, swimlane, swimlaneOut, backStart, repeat, test, yes, out, borderColor, backColor, arrowColor, endRepeatLinkColor, conditionStyle, this.skinParam(), - fcDiamond, fcArrow, backward); + fcDiamond, fcArrow, backward, noOut); final List weldingPoints = repeat.getWeldingPoints(); if (weldingPoints.size() > 0) { @@ -110,7 +111,8 @@ final UTranslate tr2 = genealogy.getTranslate(diamondBreak, ug.getStringBounder()); final Dimension2D dimDiamond = diamondBreak.calculateDimension(ug.getStringBounder()); - final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor, Arrows.asToRight()); + final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor, Arrows + .asToRight()); snake.addPoint(tr1.getDx(), tr1.getDy()); snake.addPoint(0, tr1.getDy()); snake.addPoint(0, tr2.getDy() + dimDiamond.getHeight() / 2); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorWhile.java 2018-07-27 21:59:19.000000000 +0000 @@ -35,20 +35,33 @@ */ package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact; +import java.awt.geom.Dimension2D; +import java.util.List; + import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.activitydiagram3.Instruction; import net.sourceforge.plantuml.activitydiagram3.LinkRendering; +import net.sourceforge.plantuml.activitydiagram3.ftile.Arrows; +import net.sourceforge.plantuml.activitydiagram3.ftile.Connection; +import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileBreak; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; +import net.sourceforge.plantuml.activitydiagram3.ftile.Genealogy; +import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; +import net.sourceforge.plantuml.activitydiagram3.ftile.WeldingPoint; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; import net.sourceforge.plantuml.graphic.Rainbow; import net.sourceforge.plantuml.svek.ConditionStyle; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.UTranslate; public class FtileFactoryDelegatorWhile extends FtileFactoryDelegator { @@ -60,8 +73,8 @@ public Ftile createWhile(Swimlane swimlane, Ftile whileBlock, Display test, Display yes, Display out, LinkRendering afterEndwhile, HtmlColor color, Instruction specialOut) { final HtmlColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); - final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) - : color; + final HtmlColor backColor = color == null ? getRose().getHtmlColor(skinParam(), + ColorParam.activityDiamondBackground) : color; final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam()); final ConditionStyle conditionStyle = skinParam().getConditionStyle(); @@ -75,8 +88,39 @@ final FontConfiguration fontArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); - return FtileWhile.create(swimlane, whileBlock, test, borderColor, backColor, arrowColor, yes, out, + Ftile result = FtileWhile.create(swimlane, whileBlock, test, borderColor, backColor, arrowColor, yes, out, endInlinkColor, afterEndwhile, fontArrow, getFactory(), conditionStyle, fcTest, specialOut); + + final List weldingPoints = whileBlock.getWeldingPoints(); + if (weldingPoints.size() > 0) { + // printAllChild(repeat); + + final Genealogy genealogy = new Genealogy(result); + + final FtileBreak ftileBreak = (FtileBreak) weldingPoints.get(0); + + result = FtileUtils.addConnection(result, new Connection() { + public void drawU(UGraphic ug) { + final UTranslate tr1 = genealogy.getTranslate(ftileBreak, ug.getStringBounder()); + + final Snake snake = new Snake(getFtile1().arrowHorizontalAlignment(), arrowColor, Arrows.asToLeft()); + snake.addPoint(tr1.getDx(), tr1.getDy()); + snake.addPoint(Diamond.diamondHalfSize, tr1.getDy()); + ug.draw(snake); + } + + public Ftile getFtile1() { + return ftileBreak; + } + + public Ftile getFtile2() { + return null; + } + + }); + } + + return result; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java 2018-07-27 21:59:19.000000000 +0000 @@ -93,7 +93,8 @@ } } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java 2018-07-27 21:59:19.000000000 +0000 @@ -93,7 +93,8 @@ } } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java 2018-07-27 21:59:19.000000000 +0000 @@ -38,6 +38,7 @@ import java.awt.geom.Dimension2D; import java.util.Set; +import net.sourceforge.plantuml.AlignmentParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineParam; @@ -82,7 +83,7 @@ super(inner.skinParam()); this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor; this.inner = FtileUtils.addHorizontalMargin(inner, 10); - this.borderColor = backColor == null ? HtmlColorUtils.BLACK : borderColor; + this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor; final UFont font = skinParam.getFont(null, false, FontParam.PARTITION); final HtmlColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION); @@ -130,12 +131,12 @@ return new UTranslate(suppWidth / 2, diffHeightTitle(stringBounder) + headerNoteHeight(stringBounder)); } - private static MinMax getMinMax(TextBlock tb, StringBounder stringBounder) { + private MinMax getInnerMinMax(StringBounder stringBounder) { final LimitFinder limitFinder = new LimitFinder(stringBounder, false); final UGraphicForSnake interceptor = new UGraphicForSnake(limitFinder); final UGraphicInterceptorUDrawable interceptor2 = new UGraphicInterceptorUDrawable(interceptor); - tb.drawU(interceptor2); + inner.drawU(interceptor2); interceptor2.flushUg(); return limitFinder.getMinMax(); } @@ -149,9 +150,19 @@ return suppWidth; } + private FtileGeometry cachedInnerDimension; + private FtileGeometry getInnerDimension(StringBounder stringBounder) { + if (cachedInnerDimension == null) { + cachedInnerDimension = getInnerDimensionSlow(stringBounder); + } + return cachedInnerDimension; + + } + + private FtileGeometry getInnerDimensionSlow(StringBounder stringBounder) { final FtileGeometry orig = inner.calculateDimension(stringBounder); - final MinMax minMax = getMinMax(inner, stringBounder); + final MinMax minMax = getInnerMinMax(stringBounder); final double missingWidth = minMax.getMaxX() - orig.getWidth(); if (missingWidth > 0) { return orig.addDim(missingWidth + 5, 0); @@ -159,7 +170,8 @@ return orig; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry orig = getInnerDimension(stringBounder); final double suppWidth = suppWidth(stringBounder); final double width = orig.getWidth() + suppWidth; @@ -184,8 +196,8 @@ final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow( skinParam().shadowing()).withStroke(stroke); - USymbol.FRAME.asBig(name, TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext) - .drawU(ug); + USymbol.FRAME.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null), + TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext).drawU(ug); final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder); headerNote.drawU(ug.apply(new UTranslate(dimTotal.getWidth() - dimHeaderNote.getWidth() - 10, diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java 2018-07-27 21:59:19.000000000 +0000 @@ -271,7 +271,8 @@ ug.apply(getTranslateStop(stringBounder)).draw(stop2); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimStop2 = stop2.calculateDimension(stringBounder); final FtileGeometry dim1 = tile1.calculateDimension(stringBounder).addDim(0, getDiamondStopDistance() + dimStop2.getWidth()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java 2018-07-27 21:59:19.000000000 +0000 @@ -341,7 +341,8 @@ } } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry geoDiamond1 = diamond1.calculateDimension(stringBounder); final FtileGeometry geoThen = thenBlock.calculateDimension(stringBounder); final FtileGeometry geoDiamond2 = diamond2.calculateDimension(stringBounder); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java 2018-07-27 21:59:19.000000000 +0000 @@ -38,7 +38,6 @@ import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -561,7 +560,8 @@ return new FtileGeometry(result, result.getWidth() / 2, 0); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final List all = new ArrayList(tiles); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java 2018-07-27 21:59:19.000000000 +0000 @@ -571,7 +571,8 @@ return width; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final List all = new ArrayList(tiles); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java 2018-07-27 21:59:19.000000000 +0000 @@ -113,7 +113,8 @@ opale.drawU(ug); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); if (withOutPoint) { return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java 2018-07-27 21:59:19.000000000 +0000 @@ -54,6 +54,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.ConnectionTranslatable; import net.sourceforge.plantuml.activitydiagram3.ftile.Diamond; import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileEmpty; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; import net.sourceforge.plantuml.activitydiagram3.ftile.FtileUtils; import net.sourceforge.plantuml.activitydiagram3.ftile.Snake; @@ -111,7 +112,8 @@ public static Ftile create(LinkRendering backRepeatLinkRendering, Swimlane swimlane, Swimlane swimlaneOut, Ftile backStart, Ftile repeat, Display test, Display yes, Display out, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor, Rainbow endRepeatLinkColor, ConditionStyle conditionStyle, - ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward) { + ISkinSimple spriteContainer, FontConfiguration fcDiamond, FontConfiguration fcArrow, Ftile backward, + boolean noOut) { final FontConfiguration fontConfiguration1 = conditionStyle == ConditionStyle.INSIDE ? fcDiamond : fcArrow; @@ -123,14 +125,19 @@ final Ftile diamond1; if (backStart == null) { - diamond1 = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane); + diamond1 = new FtileDiamond(repeat.skinParam(), backColor, borderColor, repeat.getSwimlaneIn()); } else { diamond1 = backStart; } final FtileRepeat result; if (conditionStyle == ConditionStyle.INSIDE) { - final Ftile diamond2 = new FtileDiamondInside(repeat.skinParam(), backColor, borderColor, swimlaneOut, - tbTest).withEast(yesTb).withSouth(outTb); + final Ftile diamond2; + if (noOut && Display.isNull(test)) { + diamond2 = new FtileEmpty(repeat.skinParam()); + } else { + diamond2 = new FtileDiamondInside(repeat.skinParam(), backColor, borderColor, swimlaneOut, tbTest) + .withEast(yesTb).withSouth(outTb); + } result = new FtileRepeat(repeat, diamond1, diamond2, TextBlockUtils.empty(0, 0), backward); } else if (conditionStyle == ConditionStyle.DIAMOND) { final Ftile diamond2 = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane) @@ -483,7 +490,8 @@ } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); return new FtileGeometry(dimTotal, getLeft(stringBounder), 0, dimTotal.getHeight()); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java 2018-07-27 21:59:19.000000000 +0000 @@ -91,7 +91,8 @@ } } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { double height = 0; double width = 0; for (Ftile ftile : forks) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java 2018-07-27 21:59:19.000000000 +0000 @@ -38,6 +38,8 @@ import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -81,6 +83,14 @@ private final Ftile diamond1; private final Ftile specialOut; + @Override + public Collection getMyChildren() { + if (specialOut == null) { + return Arrays.asList(whileBlock, diamond1); + } + return Arrays.asList(whileBlock, diamond1, specialOut); + } + public Set getSwimlanes() { final Set result = new HashSet(whileBlock.getSwimlanes()); result.add(getSwimlaneIn()); @@ -240,7 +250,6 @@ final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); - // final double y2 = p2.getY() + dimDiamond1.getOutY() / 2; final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; final double y2 = p2.getY() + dimDiamond1.getInY() + half; @@ -258,8 +267,6 @@ ug.apply(new UTranslate(x1, y1bis)).draw(new UEmpty(5, Diamond.diamondHalfSize)); - // ug = ug.apply(new UChangeColor(endInlinkColor)).apply(new UChangeBackColor(endInlinkColor)); - // ug.apply(new UTranslate(xx, (y1 + y2) / 2)).draw(Arrows.asToUp()); } public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { @@ -271,12 +278,13 @@ final Point2D p1 = translate1.getTranslated(ap1); final Point2D p2 = translate2.getTranslated(ap2); - final Dimension2D dimDiamond1 = diamond1.calculateDimension(stringBounder); + final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder); final double x1 = p1.getX(); final double y1 = p1.getY(); final double x2 = p2.getX() + dimDiamond1.getWidth(); - final double y2 = p2.getY() + dimDiamond1.getHeight() / 2; + final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2; + final double y2 = p2.getY() + dimDiamond1.getInY() + half; snake.addPoint(x1, y1); snake.addPoint(x1, y1 + Diamond.diamondHalfSize); @@ -392,8 +400,6 @@ snake.goUnmergeable(MergeStrategy.LIMITED); ug.draw(snake); - // ug = ug.apply(new UChangeColor(afterEndwhileColor)).apply(new UChangeBackColor(afterEndwhileColor)); - // ug.apply(new UTranslate(Diamond.diamondHalfSize, (y1 + y2) / 2)).draw(Arrows.asToDown()); final Snake snake2 = new Snake(arrowHorizontalAlignment(), afterEndwhileColor); snake2.addPoint(Diamond.diamondHalfSize, y2); @@ -454,7 +460,8 @@ } } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry geoDiamond1 = diamond1.calculateDimension(stringBounder); FtileGeometry geoWhile = whileBlock.calculateDimension(stringBounder); final double diff = -geoWhile.getWidth(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java 2018-07-27 21:59:19.000000000 +0000 @@ -199,7 +199,8 @@ ug.apply(getTranslate(stringBounder)).draw(tile); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry orig = tile.calculateDimension(stringBounder); final UTranslate translate = getTranslate(stringBounder); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java 2018-07-27 21:59:19.000000000 +0000 @@ -173,7 +173,8 @@ ug.apply(getTranslate(stringBounder)).draw(tile); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); final FtileGeometry orig = tile.calculateDimension(stringBounder); final UTranslate translate = getTranslate(stringBounder); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java 2018-07-27 21:59:19.000000000 +0000 @@ -111,7 +111,8 @@ } final Rainbow thinColor = result.getInLinkRendering().getRainbow(HtmlColorAndStyle.build(skinParam())); - final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), getList().get(0).getSwimlaneIn()); + // final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), getList().get(0).getSwimlaneIn()); + final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlane()); result = new FtileAssemblySimple(result, out); final List conns = new ArrayList(); double x = 0; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java 2018-07-27 21:59:19.000000000 +0000 @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEnd; +import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleSpot; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop; import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateIn; @@ -91,6 +92,12 @@ return new FtileCircleStop(skinParam(), color, swimlane); } + public Ftile spot(Swimlane swimlane, String spot) { + // final HtmlColor color = rose.getHtmlColor(skinParam, ColorParam.activityBackground); + final UFont font = skinParam.getFont(null, false, FontParam.ACTIVITY); + return new FtileCircleSpot(skinParam(), swimlane, spot, font); + } + public Ftile end(Swimlane swimlane) { final HtmlColor color = rose.getHtmlColor(skinParam, ColorParam.activityEnd); return new FtileCircleEnd(skinParam(), color, swimlane); @@ -116,8 +123,9 @@ return new FtileAssemblySimple(tile1, tile2); } - public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, Display yes, - Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward) { + public Ftile repeat(Swimlane swimlane, Swimlane swimlaneOut, Display startLabel, Ftile repeat, Display test, + Display yes, Display out, HtmlColor color, LinkRendering backRepeatLinkRendering, Ftile backward, + boolean noOut) { return repeat; } @@ -162,5 +170,4 @@ public ISkinParam skinParam() { return skinParam; } - } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java 2018-07-27 21:59:19.000000000 +0000 @@ -81,7 +81,8 @@ this.label = label; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { double supp = label.calculateDimension(stringBounder).getWidth(); if (supp > 0) { supp += labelMargin; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java 2018-07-27 21:59:19.000000000 +0000 @@ -82,7 +82,7 @@ private final LinkRendering inRenreding; private final Swimlane swimlane; private final BoxStyle style; - private final ISkinParam skinParam; + // private final ISkinParam skinParam; final public LinkRendering getInLinkRendering() { return inRenreding; @@ -119,13 +119,13 @@ public FtileBox(ISkinParam skinParam, Display label, UFont font, Swimlane swimlane, BoxStyle style) { super(skinParam); this.style = style; - this.skinParam = skinParam; + // this.skinParam = skinParam; this.swimlane = swimlane; this.inRenreding = new LinkRendering(HtmlColorAndStyle.build(skinParam)); final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null); final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL).createSheet(label); - this.tb = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), new MyStencil(), new UStroke(1)); + this.tb = new SheetBlock2(new SheetBlock1(sheet, skinParam.wrapWidth(), skinParam.getPadding()), new MyStencil(), new UStroke(1)); this.print = label.toString(); } @@ -142,8 +142,8 @@ final double heightTotal = dimTotal.getHeight(); final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing()); - final HtmlColor borderColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBorder, null); - final HtmlColor backColor = SkinParamUtils.getColor(skinParam, ColorParam.activityBackground, null); + final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBorder, null); + final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null); ug = ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness()); rect.drawU(ug); @@ -151,7 +151,8 @@ tb.drawU(ug.apply(new UTranslate(MARGIN, MARGIN))); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dim = tb.calculateDimension(stringBounder); return new FtileGeometry(Dimension2DDouble.delta(dim, 2 * MARGIN, 2 * MARGIN), dim.getWidth() / 2 + MARGIN, 0, dim.getHeight() + 2 * MARGIN); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java 2018-07-27 21:59:19.000000000 +0000 @@ -111,7 +111,8 @@ } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,119 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile.vertical; + +import java.util.Collection; +import java.util.Collections; +import java.util.Set; + +import net.sourceforge.plantuml.ColorParam; +import net.sourceforge.plantuml.FontParam; +import net.sourceforge.plantuml.ISkinParam; +import net.sourceforge.plantuml.SkinParamUtils; +import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile; +import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry; +import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; +import net.sourceforge.plantuml.graphic.FontConfiguration; +import net.sourceforge.plantuml.graphic.HtmlColor; +import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.ugraphic.UCenteredCharacter; +import net.sourceforge.plantuml.ugraphic.UChangeBackColor; +import net.sourceforge.plantuml.ugraphic.UChangeColor; +import net.sourceforge.plantuml.ugraphic.UEllipse; +import net.sourceforge.plantuml.ugraphic.UFont; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.UTranslate; + +public class FtileCircleSpot extends AbstractFtile { + + private static final int SIZE = 20; + + private final Swimlane swimlane; + private final String spot; + private final FontConfiguration fc; + + public FtileCircleSpot(ISkinParam skinParam, Swimlane swimlane, String spot, UFont font) { + super(skinParam); + this.spot = spot; + this.swimlane = swimlane; + // this.font = font; + this.fc = new FontConfiguration(skinParam, FontParam.ACTIVITY, null); + } + + @Override + public Collection getMyChildren() { + return Collections.emptyList(); + } + + public Set getSwimlanes() { + if (swimlane == null) { + return Collections.emptySet(); + } + return Collections.singleton(swimlane); + } + + public Swimlane getSwimlaneIn() { + return swimlane; + } + + public Swimlane getSwimlaneOut() { + return swimlane; + } + + public void drawU(UGraphic ug) { + + final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBorder, null); + final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null); + + final UEllipse circle = new UEllipse(SIZE, SIZE); + if (skinParam().shadowing()) { + circle.setDeltaShadow(3); + } + ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness()) + .draw(circle); + + ug.apply(new UChangeColor(fc.getColor())).apply(new UTranslate(SIZE / 2, SIZE / 2)) + .draw(new UCenteredCharacter(spot.charAt(0), fc.getFont())); + + } + + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { + return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0, SIZE); + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java 2018-07-27 21:59:19.000000000 +0000 @@ -92,7 +92,8 @@ ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)).draw(circle); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0, SIZE); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java 2018-07-27 21:59:19.000000000 +0000 @@ -108,7 +108,8 @@ .draw(circleSmall); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java 2018-07-27 21:59:19.000000000 +0000 @@ -130,7 +130,8 @@ } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dim = calculateDimensionInternal(stringBounder); return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java 2018-07-27 21:59:19.000000000 +0000 @@ -150,7 +150,8 @@ return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D diamond = calculateDimensionAlone(stringBounder); final Dimension2D north = this.north.calculateDimension(stringBounder); final double height = diamond.getHeight() + north.getHeight(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java 2018-07-27 21:59:19.000000000 +0000 @@ -152,7 +152,8 @@ return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D diamond = calculateDimensionAlone(stringBounder); final Dimension2D north = this.north.calculateDimension(stringBounder); final double height = diamond.getHeight() + north.getHeight(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java 2018-07-27 21:59:19.000000000 +0000 @@ -161,7 +161,8 @@ return new FtileGeometry(dim, dim.getWidth() / 2, 0, dim.getHeight()); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry dimDiamonAlone = calculateDimensionAlone(stringBounder); final Dimension2D dimWest = west.calculateDimension(stringBounder); final Dimension2D dimEast = east.calculateDimension(stringBounder); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java 2018-07-27 21:59:19.000000000 +0000 @@ -147,7 +147,8 @@ + Diamond.diamondHalfSize))); } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final double suppY1 = north.calculateDimension(stringBounder).getHeight(); final Dimension2D dim = new Dimension2DDouble(Diamond.diamondHalfSize * 2, Diamond.diamondHalfSize * 2 + suppY1); return new FtileGeometry(dim, dim.getWidth() / 2, suppY1, dim.getHeight()); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileThinSplit.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileThinSplit.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileThinSplit.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileThinSplit.java 2018-07-27 21:59:19.000000000 +0000 @@ -44,7 +44,6 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; -import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; @@ -73,7 +72,8 @@ this.last = last; } - public FtileGeometry calculateDimension(StringBounder stringBounder) { + @Override + protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { return new FtileGeometry(width, height, width / 2, 0, height); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Worm.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Worm.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Worm.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Worm.java 2018-07-27 21:59:19.000000000 +0000 @@ -47,6 +47,7 @@ import net.sourceforge.plantuml.cucadiagram.LinkStyle; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.HtmlColorAndStyle; +import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; @@ -70,15 +71,15 @@ throw new IllegalArgumentException(); } final LinkStyle style = color.getStyle(); - if (style == LinkStyle.INVISIBLE) { + if (style.isInvisible()) { return; } ug = ug.apply(new UChangeColor(color2)); ug = ug.apply(new UChangeBackColor(color2)); - if (style == LinkStyle.NORMAL) { + if (style.isNormal()) { ug = ug.apply(new UStroke(stroke)); } else { - ug = ug.apply(LinkStyle.getStroke(style, stroke)); + ug = ug.apply(style.goThickness(stroke).getStroke3()); } boolean drawn = false; for (int i = 0; i < points.size() - 1; i++) { @@ -231,6 +232,17 @@ return Collections.unmodifiableCollection(points).iterator(); } + public boolean doesHorizontalCross(MinMax area) { + for (int i = 0; i < points.size() - 1; i++) { + final Point2D.Double pt1 = get(i); + final Point2D.Double pt2 = get(i + 1); + if (pt1.getY() == pt2.getY() && area.doesHorizontalCross(pt1, pt2)) { + return true; + } + } + return false; + } + public int size() { return this.points.size(); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java 2018-07-27 21:59:19.000000000 +0000 @@ -91,7 +91,7 @@ public UTranslate getFirst() { return translations.get(0); } - + public int size() { return translations.size(); } @@ -187,6 +187,10 @@ return new UTranslate(result.getExtreme() * (size - 1), 0); } + public boolean isDxNegative() { + return translations.get(0).getDx() < 0; + } + public Worm mute(Worm original) { final Worm result = new Worm(); for (int i = 0; i < original.size(); i++) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/ZadBuilder.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/ZadBuilder.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/ZadBuilder.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/ZadBuilder.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,135 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile; + +import net.sourceforge.plantuml.Url; +import net.sourceforge.plantuml.graphic.StringBounder; +import net.sourceforge.plantuml.ugraphic.ColorMapper; +import net.sourceforge.plantuml.ugraphic.MinMax; +import net.sourceforge.plantuml.ugraphic.UChange; +import net.sourceforge.plantuml.ugraphic.UChangeBackColor; +import net.sourceforge.plantuml.ugraphic.UChangeColor; +import net.sourceforge.plantuml.ugraphic.UGraphic; +import net.sourceforge.plantuml.ugraphic.UParam; +import net.sourceforge.plantuml.ugraphic.UParamNull; +import net.sourceforge.plantuml.ugraphic.URectangle; +import net.sourceforge.plantuml.ugraphic.UShape; +import net.sourceforge.plantuml.ugraphic.UStroke; +import net.sourceforge.plantuml.ugraphic.UTranslate; + +public class ZadBuilder implements UGraphic { + + public UGraphic apply(UChange change) { + if (change instanceof UTranslate) { + return new ZadBuilder(stringBounder, translate.compose((UTranslate) change), this.context); + } else if (change instanceof UStroke) { + return new ZadBuilder(this); + } else if (change instanceof UChangeBackColor) { + return new ZadBuilder(this); + } else if (change instanceof UChangeColor) { + return new ZadBuilder(this); + } + throw new UnsupportedOperationException(); + } + + private final StringBounder stringBounder; + private final UTranslate translate; + private final Context context; + + static class Context { + private final Zad zad = new Zad(); + } + + public ZadBuilder(StringBounder stringBounder) { + this(stringBounder, new UTranslate(), new Context()); + } + + private ZadBuilder(StringBounder stringBounder, UTranslate translate, Context context) { + this.stringBounder = stringBounder; + this.translate = translate; + this.context = context; + } + + private ZadBuilder(ZadBuilder other) { + this(other.stringBounder, other.translate, other.context); + } + + public StringBounder getStringBounder() { + return stringBounder; + } + + public UParam getParam() { + return new UParamNull(); + } + + public void draw(UShape shape) { + if (shape instanceof URectangle) { + drawRectangle((URectangle) shape); + } + } + + private void drawRectangle(URectangle shape) { + final MinMax area = shape.getMinMax().translate(translate); + // System.err.println("ZadBuilder " + shape + " " + area); + context.zad.add(area); + } + + public ColorMapper getColorMapper() { + throw new UnsupportedOperationException(); + } + + public void startUrl(Url url) { + } + + public void closeAction() { + } + + public void flushUg() { + } + + public boolean matchesProperty(String propertyName) { + return false; + } + + public double dpiFactor() { + return 1; + } + + public Zad getZad() { + return context.zad; + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,74 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3.ftile; + +import java.util.ArrayList; +import java.util.List; + +import net.sourceforge.plantuml.graphic.HtmlColorUtils; +import net.sourceforge.plantuml.ugraphic.MinMax; +import net.sourceforge.plantuml.ugraphic.UChangeBackColor; +import net.sourceforge.plantuml.ugraphic.UChangeColor; +import net.sourceforge.plantuml.ugraphic.UGraphic; + +public class Zad { + + private final List rectangles = new ArrayList(); + + public void add(MinMax rect) { + // System.err.println("add " + rect); + this.rectangles.add(rect); + + } + + public void drawDebug(UGraphic ug) { + ug = ug.apply(new UChangeBackColor(HtmlColorUtils.BLUE)).apply(new UChangeColor(HtmlColorUtils.RED_LIGHT)); + for (MinMax minMax : rectangles) { + System.err.println("minmax=" + minMax); + minMax.drawGrey(ug); + } + + } + + public boolean doesHorizontalCross(Snake snake) { + for (MinMax minMax : rectangles) { + if (snake.doesHorizontalCross(minMax)) { + return true; + } + } + return false; + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java 2018-07-27 21:59:19.000000000 +0000 @@ -65,9 +65,14 @@ return all.isEmpty(); } - public boolean isOnlySingleStop() { - return all.size() == 1 && getLast() instanceof InstructionStop - && ((InstructionStop) getLast()).hasNotes() == false; + public boolean isOnlySingleStopOrSpot() { + if (all.size() != 1) { + return false; + } + if (getLast() instanceof InstructionSpot) { + return true; + } + return getLast() instanceof InstructionStop && ((InstructionStop) getLast()).hasNotes() == false; } public InstructionList(Swimlane defaultSwimlane) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java 2018-07-27 21:59:19.000000000 +0000 @@ -78,6 +78,13 @@ this.color = color; } + private boolean isLastOfTheParent() { + if (parent instanceof InstructionList) { + return ((InstructionList) parent).getLast() == this; + } + return false; + } + public void setBackward(Display label) { this.backward = label; } @@ -89,9 +96,9 @@ public Ftile createFtile(FtileFactory factory) { final Ftile back = Display.isNull(backward) ? null : factory.activity(backward, swimlane, BoxStyle.PLAIN, Colors.empty()); - final Ftile result = factory.repeat(swimlane, repeatList.getSwimlaneOut(), - startLabel, factory.decorateOut(repeatList.createFtile(factory), endRepeatLinkRendering), test, yes, out, - color, backRepeatLinkRendering, back); + final Ftile result = factory.repeat(swimlane, repeatList.getSwimlaneOut(), startLabel, + factory.decorateOut(repeatList.createFtile(factory), endRepeatLinkRendering), test, yes, out, color, + backRepeatLinkRendering, back, isLastOfTheParent()); if (killed) { return new FtileKilled(result); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/activitydiagram3/InstructionSpot.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,80 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.activitydiagram3; + +import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory; +import net.sourceforge.plantuml.activitydiagram3.ftile.FtileKilled; +import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane; + +public class InstructionSpot extends MonoSwimable implements Instruction { + + private boolean killed = false; + private final LinkRendering inlinkRendering; + private final String spot; + + public InstructionSpot(String spot, LinkRendering inlinkRendering, Swimlane swimlane) { + super(swimlane); + this.spot = spot; + this.inlinkRendering = inlinkRendering; + if (inlinkRendering == null) { + throw new IllegalArgumentException(); + } + } + + public Ftile createFtile(FtileFactory factory) { + Ftile result = factory.spot(getSwimlaneIn(), spot); + result = eventuallyAddNote(factory, result, result.getSwimlaneIn()); + if (killed) { + return new FtileKilled(result); + } + return result; + } + + public void add(Instruction other) { + throw new UnsupportedOperationException(); + } + + final public boolean kill() { + this.killed = true; + return true; + } + + public LinkRendering getInLinkRendering() { + return inlinkRendering; + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/AlignmentParam.java plantuml-1.2018.9/src/net/sourceforge/plantuml/AlignmentParam.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/AlignmentParam.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/AlignmentParam.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,59 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml; + +import net.sourceforge.plantuml.graphic.HorizontalAlignment; + + +public enum AlignmentParam { + + arrowMessageAlignment(HorizontalAlignment.LEFT), + sequenceMessageAlignment(HorizontalAlignment.LEFT), + sequenceMessageTextAlignment(HorizontalAlignment.LEFT), + sequenceReferenceAlignment(HorizontalAlignment.CENTER), + packageTitleAlignment(HorizontalAlignment.CENTER), + noteTextAlignment(HorizontalAlignment.LEFT); + + private final HorizontalAlignment defaultValue; + + private AlignmentParam(HorizontalAlignment defaultValue) { + this.defaultValue = defaultValue; + } + + public final HorizontalAlignment getDefaultValue() { + return defaultValue; + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/AlignParam.java plantuml-1.2018.9/src/net/sourceforge/plantuml/AlignParam.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/AlignParam.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/AlignParam.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2017, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML 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. - * - * PlantUML 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml; - -import net.sourceforge.plantuml.graphic.HorizontalAlignment; - - -public enum AlignParam { - - ARROW_MESSAGE_ALIGN(HorizontalAlignment.LEFT), - SEQUENCE_MESSAGE_ALIGN(HorizontalAlignment.LEFT), - SEQUENCE_MESSAGETEXT_ALIGN(HorizontalAlignment.LEFT), - SEQUENCE_REFERENCE_ALIGN(HorizontalAlignment.CENTER); - - private final HorizontalAlignment defaultValue; - - private AlignParam(HorizontalAlignment defaultValue) { - this.defaultValue = defaultValue; - } - - public final HorizontalAlignment getDefaultValue() { - return defaultValue; - } -} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/Annotated.java plantuml-1.2018.9/src/net/sourceforge/plantuml/Annotated.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/Annotated.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/Annotated.java 2018-07-27 21:59:19.000000000 +0000 @@ -36,6 +36,7 @@ package net.sourceforge.plantuml; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; +import net.sourceforge.plantuml.cucadiagram.DisplaySection; public interface Annotated { @@ -45,8 +46,8 @@ public DisplayPositionned getLegend(); - public DisplayPositionned getHeader(); + public DisplaySection getHeader(); - public DisplayPositionned getFooter(); + public DisplaySection getFooter(); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/AnnotatedWorker.java plantuml-1.2018.9/src/net/sourceforge/plantuml/AnnotatedWorker.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/AnnotatedWorker.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/AnnotatedWorker.java 2018-07-27 21:59:19.000000000 +0000 @@ -37,6 +37,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; +import net.sourceforge.plantuml.cucadiagram.DisplaySection; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.TextBlock; @@ -64,13 +65,13 @@ } private TextBlock addLegend(TextBlock original) { - if (DisplayPositionned.isNull(annotated.getLegend())) { + final DisplayPositionned legend = annotated.getLegend(); + if (legend.isNull()) { return original; } - final TextBlock text = EntityImageLegend.create(annotated.getLegend().getDisplay(), getSkinParam()); + final TextBlock text = EntityImageLegend.create(legend.getDisplay(), getSkinParam()); - return DecorateEntityImage.add(original, text, annotated.getLegend().getHorizontalAlignment(), annotated - .getLegend().getVerticalAlignment()); + return DecorateEntityImage.add(original, text, legend.getHorizontalAlignment(), legend.getVerticalAlignment()); } private ISkinParam getSkinParam() { @@ -78,7 +79,8 @@ } private TextBlock addCaption(TextBlock original) { - if (DisplayPositionned.isNull(annotated.getCaption())) { + final DisplayPositionned caption = annotated.getCaption(); + if (caption.isNull()) { return original; } final TextBlock text = getCaption(); @@ -87,19 +89,17 @@ } public TextBlock getCaption() { - if (DisplayPositionned.isNull(annotated.getCaption())) { + final DisplayPositionned caption = annotated.getCaption(); + if (caption.isNull()) { return TextBlockUtils.empty(0, 0); } - return annotated - .getCaption() - .getDisplay() - .create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null), HorizontalAlignment.CENTER, - getSkinParam()); + return caption.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null), + HorizontalAlignment.CENTER, getSkinParam()); } private TextBlock addTitle(TextBlock original) { final DisplayPositionned title = annotated.getTitle(); - if (DisplayPositionned.isNull(title)) { + if (title.isNull()) { return original; } ISkinParam skinParam = getSkinParam(); @@ -110,22 +110,21 @@ } private TextBlock addHeaderAndFooter(TextBlock original) { - if (DisplayPositionned.isNull(annotated.getFooter()) && DisplayPositionned.isNull(annotated.getHeader())) { + final DisplaySection footer = annotated.getFooter(); + final DisplaySection header = annotated.getHeader(); + if (footer.isNull() && header.isNull()) { return original; } - final TextBlock textFooter = DisplayPositionned.isNull(annotated.getFooter()) ? null : annotated - .getFooter() - .getDisplay() - .create(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null), - annotated.getFooter().getHorizontalAlignment(), getSkinParam()); - final TextBlock textHeader = DisplayPositionned.isNull(annotated.getHeader()) ? null : annotated - .getHeader() - .getDisplay() - .create(new FontConfiguration(getSkinParam(), FontParam.HEADER, null), - annotated.getHeader().getHorizontalAlignment(), getSkinParam()); + TextBlock textFooter = null; + if (footer.isNull() == false) { + textFooter = footer.createRibbon(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null), getSkinParam()); + } + TextBlock textHeader = null; + if (header.isNull() == false) { + textHeader = header.createRibbon(new FontConfiguration(getSkinParam(), FontParam.HEADER, null), getSkinParam()); + } - return new DecorateEntityImage(original, textHeader, annotated.getHeader().getHorizontalAlignment(), - textFooter, annotated.getFooter().getHorizontalAlignment()); + return DecorateEntityImage.addTopAndBottom(original, textHeader, header.getHorizontalAlignment(), textFooter, + footer.getHorizontalAlignment()); } - } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/ant/PlantUmlTask.java plantuml-1.2018.9/src/net/sourceforge/plantuml/ant/PlantUmlTask.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/ant/PlantUmlTask.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/ant/PlantUmlTask.java 2018-07-27 21:59:19.000000000 +0000 @@ -362,10 +362,10 @@ setNbThread(s); } - public void setSuggestEngine(String s) { - OptionFlags.getInstance().setUseSuggestEngine( - "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s)); - } +// public void setSuggestEngine(String s) { +// OptionFlags.getInstance().setUseSuggestEngine( +// "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s)); +// } public void setFailFast(String s) { final boolean flag = "true".equalsIgnoreCase(s) || "yes".equalsIgnoreCase(s) || "on".equalsIgnoreCase(s); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataAbstract.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataAbstract.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataAbstract.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataAbstract.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,73 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * + * + */ +package net.sourceforge.plantuml.api; + +import java.awt.geom.Dimension2D; + +import net.sourceforge.plantuml.core.ImageData; + +public abstract class ImageDataAbstract implements ImageData { + + private final int width; + private final int height; + private int status; + + public ImageDataAbstract(int width, int height) { + this.width = width; + this.height = height; + } + + public ImageDataAbstract(Dimension2D dim) { + this((int) dim.getWidth(), (int) dim.getHeight()); + } + + public final int getWidth() { + return width; + } + + public final int getHeight() { + return height; + } + + public final int getStatus() { + return status; + } + + public final void setStatus(int status) { + this.status = status; + } + +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataComplex.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataComplex.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataComplex.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataComplex.java 2018-07-27 21:59:19.000000000 +0000 @@ -38,35 +38,18 @@ import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.CMapData; -import net.sourceforge.plantuml.core.ImageData; -public class ImageDataComplex implements ImageData { +public class ImageDataComplex extends ImageDataAbstract { - private final Dimension2D info; private final CMapData cmap; private final String warningOrError; -// public ImageDataComplex(Dimension2D info, CMapData cmap) { -// this(info, cmap, null); -// } - public ImageDataComplex(Dimension2D info, CMapData cmap, String warningOrError) { - if (info==null) { - throw new IllegalArgumentException(); - } - this.info = info; + super(info); this.cmap = cmap; this.warningOrError = warningOrError; } - public int getWidth() { - return (int) info.getWidth(); - } - - public int getHeight() { - return (int) info.getHeight(); - } - public boolean containsCMapData() { return cmap != null && cmap.containsData(); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataSimple.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataSimple.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/ImageDataSimple.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/ImageDataSimple.java 2018-07-27 21:59:19.000000000 +0000 @@ -39,30 +39,18 @@ import net.sourceforge.plantuml.core.ImageData; -public class ImageDataSimple implements ImageData { - - private final int width; - private final int height; +public class ImageDataSimple extends ImageDataAbstract { public ImageDataSimple(int width, int height) { - this.width = width; - this.height = height; - } - - public ImageDataSimple() { - this(0, 0); + super(width, height); } public ImageDataSimple(Dimension2D dim) { - this((int) dim.getWidth(), (int) dim.getHeight()); - } - - public int getWidth() { - return width; + super(dim); } - public int getHeight() { - return height; + private ImageDataSimple() { + this(0, 0); } public boolean containsCMapData() { @@ -77,4 +65,14 @@ return null; } + public static ImageData error() { + final ImageDataSimple result = new ImageDataSimple(); + result.setStatus(503); + return result; + } + + public static ImageData ok() { + return new ImageDataSimple(); + } + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/INumberAnalyzed.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/INumberAnalyzed.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/INumberAnalyzed.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/INumberAnalyzed.java 2018-07-27 21:59:19.000000000 +0000 @@ -40,4 +40,6 @@ public long getMean(); + public long getSliddingMean(); + } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed2.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/NumberAnalyzed2.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed2.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/NumberAnalyzed2.java 2018-07-27 21:59:19.000000000 +0000 @@ -162,9 +162,21 @@ if (nb.get() == 0) { return 0; } + // Bad return sum.get() / nb.get(); } + public final long getSliddingMean() { + if (nb.get() == 0) { + return 0; + } + if (nb.get() < SLIDING_WINDOW) { + return sum.get() / nb.get(); + } + // Bad + return sliddingSum.get() / nb.get(); + } + final public String getName() { return name; } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed.java plantuml-1.2018.9/src/net/sourceforge/plantuml/api/NumberAnalyzed.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/api/NumberAnalyzed.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/api/NumberAnalyzed.java 2018-07-27 21:59:19.000000000 +0000 @@ -29,7 +29,6 @@ package net.sourceforge.plantuml.api; import java.util.StringTokenizer; -import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.prefs.Preferences; @@ -38,7 +37,7 @@ public class NumberAnalyzed implements INumberAnalyzed { - private static final int SLIDING_WINDOW = 512; + private static final int SLIDING_WINDOW = 1024; private long nb; private long sum; @@ -211,6 +210,16 @@ return sum / nb; } + synchronized public final long getSliddingMean() { + if (nb == 0) { + return 0; + } + if (nb < SLIDING_WINDOW) { + return sum / nb; + } + return sliddingSum / nb; + } + public final long getStandardDeviation() { final long sum1; final long sumOfSquare1; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java 2018-07-27 21:59:19.000000000 +0000 @@ -78,6 +78,18 @@ } } + private boolean isLong(char c) { + final int wc = Wcwidth.of(c); + if (wc == 1) { + return false; + } + if (wc == 2) { + return true; + } + return false; +// throw new IllegalArgumentException("warning width=" + wc + " char=" + ((int) c)); + } + private void ensurePossible(int x, int y) { int newCharSize1 = charSize1; int newCharSize2 = charSize2; @@ -106,8 +118,15 @@ } public void drawStringLR(String string, int x, int y) { + int pos = x; for (int i = 0; i < string.length(); i++) { - drawChar(string.charAt(i), x + i, y); + final char c = string.charAt(i); + drawChar(c, pos, y); + pos++; + if (isLong(c)) { + drawChar('\0', pos, y); + pos++; + } } } @@ -120,7 +139,10 @@ public String getLine(int line) { final StringBuilder sb = new StringBuilder(charSize1); for (int x = 0; x < width; x++) { - sb.append(chars[x][line]); + final char c = chars[x][line]; + if (c != '\0') { + sb.append(c); + } } return sb.toString(); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextActor.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextActor.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextActor.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextActor.java 2018-07-27 21:59:19.000000000 +0000 @@ -100,7 +100,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextArrow.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextArrow.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextArrow.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextArrow.java 2018-07-27 21:59:19.000000000 +0000 @@ -96,7 +96,7 @@ final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); final int height = (int) dimensionToUse.getHeight(); - final int textWidth = StringUtils.getWidth(stringsToDisplay); + final int textWidth = StringUtils.getWcWidth(stringsToDisplay); final int yarrow = height - 2; charArea.drawHLine(fileFormat == FileFormat.UTXT ? '\u2500' : '-', yarrow, 1, width); @@ -125,7 +125,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - final int width = StringUtils.getWidth(stringsToDisplay) + 2; + final int width = StringUtils.getWcWidth(stringsToDisplay) + 2; if (maxAsciiMessageLength > 0) { return Math.min(maxAsciiMessageLength, width); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDelay.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextDelay.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDelay.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextDelay.java 2018-07-27 21:59:19.000000000 +0000 @@ -59,7 +59,7 @@ final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); - final int textWidth = StringUtils.getWidth(stringsToDisplay); + final int textWidth = StringUtils.getWcWidth(stringsToDisplay); final int textPos = (width - textWidth) / 2; if (stringsToDisplay.isWhite()) { @@ -75,7 +75,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDivider.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextDivider.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextDivider.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextDivider.java 2018-07-27 21:59:19.000000000 +0000 @@ -63,7 +63,7 @@ final Dimension2D dimensionToUse = area.getDimensionToUse(); final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea(); final int width = (int) dimensionToUse.getWidth(); - final int textWidth = StringUtils.getWidth(stringsToDisplay); + final int textWidth = StringUtils.getWcWidth(stringsToDisplay); // final int height = (int) dimensionToUse.getHeight(); final int textPos = (width - textWidth - 1) / 2; @@ -91,7 +91,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingHeader.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingHeader.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingHeader.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextGroupingHeader.java 2018-07-27 21:59:19.000000000 +0000 @@ -103,7 +103,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextNote.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextNote.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextNote.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextNote.java 2018-07-27 21:59:19.000000000 +0000 @@ -86,7 +86,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 7; + return StringUtils.getWcWidth(stringsToDisplay) + 7; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextParticipant.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextParticipant.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextParticipant.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextParticipant.java 2018-07-27 21:59:19.000000000 +0000 @@ -91,7 +91,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextSelfArrow.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextSelfArrow.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextSelfArrow.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextSelfArrow.java 2018-07-27 21:59:19.000000000 +0000 @@ -102,7 +102,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 6; + return StringUtils.getWcWidth(stringsToDisplay) + 6; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextShape.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextShape.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/ComponentTextShape.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/ComponentTextShape.java 2018-07-27 21:59:19.000000000 +0000 @@ -84,7 +84,7 @@ } public double getPreferredWidth(StringBounder stringBounder) { - return StringUtils.getWidth(stringsToDisplay) + 2; + return StringUtils.getWcWidth(stringsToDisplay) + 2; } } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/Wcwidth.java plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/Wcwidth.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/asciiart/Wcwidth.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/asciiart/Wcwidth.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,253 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2017, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * PlantUML 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. + * + * PlantUML 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * + * Original Author: Arnaud Roques + * Source code provided by Yasuhiro Matsumoto + * + */ +/** + * Source code provided by Yasuhiro Matsumoto. + * See: + * https://github.com/plantuml/plantuml/issues/74 + * + * Many thanks for his help! + */ +/** + *

See wcwidth.c

+ * + *

This is an implementation of wcwidth() and wcswidth() (defined in + * IEEE Std 1002.1-2001) for Unicode.

+ * + * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html + * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html + * + *

In fixed-width output devices, Latin characters all occupy a single + * "cell" position of equal width, whereas ideographic CJK characters + * occupy two such cells. Interoperability between terminal-line + * applications and (teletype-style) character terminals using the + * UTF-8 encoding requires agreement on which character should advance + * the cursor by how many cell positions. No established formal + * standards exist at present on which Unicode character shall occupy + * how many cell positions on character terminals. These routines are + * a first attempt of defining such behavior based on simple rules + * applied to data provided by the Unicode Consortium.

+ * + *

For some graphical characters, the Unicode standard explicitly + * defines a character-cell width via the definition of the East Asian + * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. + * In all these cases, there is no ambiguity about which width a + * terminal shall use. For characters in the East Asian Ambiguous (A) + * class, the width choice depends purely on a preference of backward + * compatibility with either historic CJK or Western practice. + * Choosing single-width for these characters is easy to justify as + * the appropriate long-term solution, as the CJK practice of + * displaying these characters as double-width comes from historic + * implementation simplicity (8-bit encoded characters were displayed + * single-width and 16-bit ones double-width, even for Greek, + * Cyrillic, etc.) and not any typographic considerations.

+ * + *

Much less clear is the choice of width for the Not East Asian + * (Neutral) class. Existing practice does not dictate a width for any + * of these characters. It would nevertheless make sense + * typographically to allocate two character cells to characters such + * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be + * represented adequately with a single-width glyph. The following + * routines at present merely assign a single-cell width to all + * neutral characters, in the interest of simplicity. This is not + * entirely satisfactory and should be reconsidered before + * establishing a formal standard in this area. At the moment, the + * decision which Not East Asian (Neutral) characters should be + * represented by double-width glyphs cannot yet be answered by + * applying a simple rule from the Unicode database content. Setting + * up a proper standard for the behavior of UTF-8 character terminals + * will require a careful analysis not only of each Unicode character, + * but also of each presentation form, something the author of these + * routines has avoided to do so far.

+ * + *

http://www.unicode.org/unicode/reports/tr11/

+ */ +package net.sourceforge.plantuml.asciiart; + +public class Wcwidth { + + /** + * sorted list of non-overlapping intervals of non-spacing characters + * generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" + */ + private static final int[][] COMBINING = { + {0x0300, 0x036F}, {0x0483, 0x0486}, {0x0488, 0x0489}, + {0x0591, 0x05BD}, {0x05BF, 0x05BF}, {0x05C1, 0x05C2}, + {0x05C4, 0x05C5}, {0x05C7, 0x05C7}, {0x0600, 0x0603}, + {0x0610, 0x0615}, {0x064B, 0x065E}, {0x0670, 0x0670}, + {0x06D6, 0x06E4}, {0x06E7, 0x06E8}, {0x06EA, 0x06ED}, + {0x070F, 0x070F}, {0x0711, 0x0711}, {0x0730, 0x074A}, + {0x07A6, 0x07B0}, {0x07EB, 0x07F3}, {0x0901, 0x0902}, + {0x093C, 0x093C}, {0x0941, 0x0948}, {0x094D, 0x094D}, + {0x0951, 0x0954}, {0x0962, 0x0963}, {0x0981, 0x0981}, + {0x09BC, 0x09BC}, {0x09C1, 0x09C4}, {0x09CD, 0x09CD}, + {0x09E2, 0x09E3}, {0x0A01, 0x0A02}, {0x0A3C, 0x0A3C}, + {0x0A41, 0x0A42}, {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, + {0x0A70, 0x0A71}, {0x0A81, 0x0A82}, {0x0ABC, 0x0ABC}, + {0x0AC1, 0x0AC5}, {0x0AC7, 0x0AC8}, {0x0ACD, 0x0ACD}, + {0x0AE2, 0x0AE3}, {0x0B01, 0x0B01}, {0x0B3C, 0x0B3C}, + {0x0B3F, 0x0B3F}, {0x0B41, 0x0B43}, {0x0B4D, 0x0B4D}, + {0x0B56, 0x0B56}, {0x0B82, 0x0B82}, {0x0BC0, 0x0BC0}, + {0x0BCD, 0x0BCD}, {0x0C3E, 0x0C40}, {0x0C46, 0x0C48}, + {0x0C4A, 0x0C4D}, {0x0C55, 0x0C56}, {0x0CBC, 0x0CBC}, + {0x0CBF, 0x0CBF}, {0x0CC6, 0x0CC6}, {0x0CCC, 0x0CCD}, + {0x0CE2, 0x0CE3}, {0x0D41, 0x0D43}, {0x0D4D, 0x0D4D}, + {0x0DCA, 0x0DCA}, {0x0DD2, 0x0DD4}, {0x0DD6, 0x0DD6}, + {0x0E31, 0x0E31}, {0x0E34, 0x0E3A}, {0x0E47, 0x0E4E}, + {0x0EB1, 0x0EB1}, {0x0EB4, 0x0EB9}, {0x0EBB, 0x0EBC}, + {0x0EC8, 0x0ECD}, {0x0F18, 0x0F19}, {0x0F35, 0x0F35}, + {0x0F37, 0x0F37}, {0x0F39, 0x0F39}, {0x0F71, 0x0F7E}, + {0x0F80, 0x0F84}, {0x0F86, 0x0F87}, {0x0F90, 0x0F97}, + {0x0F99, 0x0FBC}, {0x0FC6, 0x0FC6}, {0x102D, 0x1030}, + {0x1032, 0x1032}, {0x1036, 0x1037}, {0x1039, 0x1039}, + {0x1058, 0x1059}, {0x1160, 0x11FF}, {0x135F, 0x135F}, + {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, + {0x1772, 0x1773}, {0x17B4, 0x17B5}, {0x17B7, 0x17BD}, + {0x17C6, 0x17C6}, {0x17C9, 0x17D3}, {0x17DD, 0x17DD}, + {0x180B, 0x180D}, {0x18A9, 0x18A9}, {0x1920, 0x1922}, + {0x1927, 0x1928}, {0x1932, 0x1932}, {0x1939, 0x193B}, + {0x1A17, 0x1A18}, {0x1B00, 0x1B03}, {0x1B34, 0x1B34}, + {0x1B36, 0x1B3A}, {0x1B3C, 0x1B3C}, {0x1B42, 0x1B42}, + {0x1B6B, 0x1B73}, {0x1DC0, 0x1DCA}, {0x1DFE, 0x1DFF}, + {0x200B, 0x200F}, {0x202A, 0x202E}, {0x2060, 0x2063}, + {0x206A, 0x206F}, {0x20D0, 0x20EF}, {0x302A, 0x302F}, + {0x3099, 0x309A}, {0xA806, 0xA806}, {0xA80B, 0xA80B}, + {0xA825, 0xA826}, {0xFB1E, 0xFB1E}, {0xFE00, 0xFE0F}, + {0xFE20, 0xFE23}, {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, + {0x10A01, 0x10A03}, {0x10A05, 0x10A06}, {0x10A0C, 0x10A0F}, + {0x10A38, 0x10A3A}, {0x10A3F, 0x10A3F}, {0x1D167, 0x1D169}, + {0x1D173, 0x1D182}, {0x1D185, 0x1D18B}, {0x1D1AA, 0x1D1AD}, + {0x1D242, 0x1D244}, {0xE0001, 0xE0001}, {0xE0020, 0xE007F}, + {0xE0100, 0xE01EF} + }; + + static boolean bisearch(int ucs) { + int min = 0; + int mid; + int max = COMBINING.length - 1; + + if (ucs < COMBINING[0][0] || ucs > COMBINING[max][1]) { + return false; + } + while (max >= min) { + mid = (min + max) / 2; + if (ucs > COMBINING[mid][1]) { + min = mid + 1; + } else if (ucs < COMBINING[mid][0]) { + max = mid - 1; + } else { + return true; + } + } + + return false; + } + + /** + * See : http://www.cl.cam.ac.uk/%7Emgk25/ucs/wcwidth.c + * + * The following two functions define the column width of an ISO 10646 + * character as follows: + * + * - The null character (U+0000) has a column width of 0. + * + * - Other C0/C1 control characters and DEL will lead to a return + * value of -1. + * + * - Non-spacing and enclosing combining characters (general + * category code Mn or Me in the Unicode database) have a + * column width of 0. + * + * - SOFT HYPHEN (U+00AD) has a column width of 1. + * + * - Other format characters (general category code Cf in the Unicode + * database) and ZERO WIDTH SPACE (U+200B) have a column width of 0. + * + * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) + * have a column width of 0. + * + * - Spacing characters in the East Asian Wide (W) or East Asian + * Full-width (F) category as defined in Unicode Technical + * Report #11 have a column width of 2. + * + * - All remaining characters (including all printable + * ISO 8859-1 and WGL4 characters, Unicode control characters, + * etc.) have a column width of 1. + * + * This implementation assumes that wchar_t characters are encoded + * in ISO 10646. + */ + public static int of(int codePoint) { + // test for 8-bit control characters + if (codePoint == 0) { + return 0; + } + if (codePoint < 32 || (codePoint >= 0x7f && codePoint < 0xa0)) { + return -1; + } + // Added by Arnaud : Usual 8 bit char + if (codePoint < 127) { + return 1; + } + // binary search in table of non-spacing characters + if (bisearch(codePoint)) { + return 0; + } + + // if we arrive here, ucs is not a combining or C0/C1 control character + return 1 + + ((codePoint >= 0x1100 && + (codePoint <= 0x115f || // Hangul Jamo init. consonants + codePoint == 0x2329 || codePoint == 0x232a || + (codePoint >= 0x2e80 && codePoint <= 0xa4cf && + codePoint != 0x303f) || // CJK ... Yi + (codePoint >= 0xac00 && codePoint <= 0xd7a3) || // Hangul Syllables + (codePoint >= 0xf900 && codePoint <= 0xfaff) || // CJK Compatibility Ideographs + (codePoint >= 0xfe10 && codePoint <= 0xfe19) || // Vertical forms + (codePoint >= 0xfe30 && codePoint <= 0xfe6f) || // CJK Compatibility Forms + (codePoint >= 0xff00 && codePoint <= 0xff60) || // Fullwidth Forms + (codePoint >= 0xffe0 && codePoint <= 0xffe6) || + (codePoint >= 0x20000 && codePoint <= 0x2fffd) || + (codePoint >= 0x30000 && codePoint <= 0x3fffd))) ? 1 : 0); + } + + public static int length(CharSequence s) { + int result = 0; + for (int i = 0; i < s.length(); i++) { + result += of(s.charAt(i)); + } + return result; + } +} \ No newline at end of file diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/BackSlash.java plantuml-1.2018.9/src/net/sourceforge/plantuml/BackSlash.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/BackSlash.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/BackSlash.java 2018-07-27 21:59:19.000000000 +0000 @@ -99,7 +99,7 @@ final StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); - if (c == '\\' && i < s.length() - 1 && isEnglishLetter(s.charAt(i + 1))) { + if (c == '\\' && i < s.length() - 1 && isEnglishLetterOfBackSlash(s.charAt(i + 1))) { result.append('\\'); result.append(translateChar(s.charAt(i + 1))); i++; @@ -110,6 +110,11 @@ return result.toString(); } + private static boolean isEnglishLetterOfBackSlash(char c) { + return c == 'n'; + // return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + } + public static String untranslateBackSlashes(CharSequence s) { if (s == null) { return null; @@ -125,10 +130,6 @@ return result.toString(); } - private static boolean isEnglishLetter(char c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); - } - private static char translateChar(char c) { if (c > 128) { throw new IllegalArgumentException(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/BasicEnsureVisible.java plantuml-1.2018.9/src/net/sourceforge/plantuml/BasicEnsureVisible.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/BasicEnsureVisible.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/BasicEnsureVisible.java 2018-07-27 21:59:19.000000000 +0000 @@ -57,6 +57,10 @@ } } + public boolean hasData() { + return minX != Double.MAX_VALUE; + } + public String getCoords(double scale) { if (minX == Double.MAX_VALUE) { return "0,0,0,0"; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUmlBuilder.java plantuml-1.2018.9/src/net/sourceforge/plantuml/BlockUmlBuilder.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUmlBuilder.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/BlockUmlBuilder.java 2018-07-27 21:59:19.000000000 +0000 @@ -39,7 +39,6 @@ import java.io.IOException; import java.io.Reader; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -64,9 +63,9 @@ Preprocessor includer = null; this.defines = defines; try { - reader2 = new UncommentReadLine(new ReadLineReader(reader, desc)); - includer = new Preprocessor(reader2, charset, defines, newCurrentDir, this); - init(includer, config); + reader2 = new UncommentReadLine(ReadLineReader.create(reader, desc)); + includer = new Preprocessor(config, reader2, charset, defines, newCurrentDir, this); + init(includer); } finally { if (includer != null) { includer.close(); @@ -79,7 +78,7 @@ this(config, charset, defines, reader, null, null); } - private void init(Preprocessor includer, List config) throws IOException { + private void init(Preprocessor includer) throws IOException { CharSequence2 s = null; List current2 = null; boolean paused = false; @@ -94,6 +93,10 @@ paused = true; reader2.setPaused(true); } + if (StartUtils.isExit(s)) { + paused = true; + reader2.setPaused(true); + } if (current2 != null && paused == false) { current2.add(s); } else if (paused) { @@ -108,21 +111,23 @@ reader2.setPaused(false); } if (StartUtils.isArobaseEndDiagram(s) && current2 != null) { - current2.addAll(1, convert(config, new LineLocationImpl(null, null).oneLineRead())); - blocks.add(new BlockUml(current2, startLine - config.size(), defines.cloneMe())); + if (paused) { + current2.add(s); + } + blocks.add(new BlockUml(current2, startLine/* - config.size() */, defines.cloneMe())); current2 = null; reader2.setPaused(false); } } } - private Collection convert(List config, LineLocation location) { - final List result = new ArrayList(); - for (String s : config) { - result.add(new CharSequence2Impl(s, location)); - } - return result; - } + // private Collection convert(List config, LineLocation location) { + // final List result = new ArrayList(); + // for (String s : config) { + // result.add(new CharSequence2Impl(s, location)); + // } + // return result; + // } public List getBlockUmls() { return Collections.unmodifiableList(blocks); @@ -136,7 +141,7 @@ for (BlockUml block : blocks) { if (block.isStartDef(name)) { this.defines.importFrom(block.getLocalDefines()); - return block.getDefinition(); + return block.getDefinition(false); } } return Collections.emptyList(); diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUml.java plantuml-1.2018.9/src/net/sourceforge/plantuml/BlockUml.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/BlockUml.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/BlockUml.java 2018-07-27 21:59:19.000000000 +0000 @@ -173,9 +173,9 @@ return data.get(0).toString().equalsIgnoreCase(signature); } - public List getDefinition() { - if (data.get(0).toString().startsWith("@startdef") == false) { - throw new IllegalStateException(); + public List getDefinition(boolean withHeader) { + if (withHeader) { + return Collections.unmodifiableList(data); } return Collections.unmodifiableList(data.subList(1, data.size() - 1)); } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmElement.java plantuml-1.2018.9/src/net/sourceforge/plantuml/bpm/BpmElement.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/BpmElement.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/bpm/BpmElement.java 2018-07-27 21:59:19.000000000 +0000 @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; +import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UFont; import net.sourceforge.plantuml.ugraphic.UGraphic; @@ -111,6 +112,10 @@ public Dimension2D calculateDimension(StringBounder stringBounder) { return raw.calculateDimension(stringBounder); } + + public MinMax getMinMax(StringBounder stringBounder) { + return raw.getMinMax(stringBounder); + } }; } diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/ConnectorPuzzleEmpty.java plantuml-1.2018.9/src/net/sourceforge/plantuml/bpm/ConnectorPuzzleEmpty.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/bpm/ConnectorPuzzleEmpty.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/bpm/ConnectorPuzzleEmpty.java 2018-07-27 21:59:19.000000000 +0000 @@ -44,6 +44,7 @@ import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; +import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.ULine; @@ -115,6 +116,11 @@ public Dimension2D calculateDimension(StringBounder stringBounder) { return new Dimension2DDouble(20, 20); } + + public MinMax getMinMax(StringBounder stringBounder) { + throw new UnsupportedOperationException(); + } + public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) { return null; diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/UGraphicBraille.java plantuml-1.2018.9/src/net/sourceforge/plantuml/braille/UGraphicBraille.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/braille/UGraphicBraille.java 2017-07-03 17:59:53.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/braille/UGraphicBraille.java 2018-07-27 21:59:19.000000000 +0000 @@ -39,6 +39,7 @@ import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; +import net.sourceforge.plantuml.TikzFontDistortion; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.graphic.HtmlColorUtils; import net.sourceforge.plantuml.graphic.StringBounder; @@ -117,7 +118,7 @@ } public StringBounder getStringBounder() { - return FileFormat.BRAILLE_PNG.getDefaultStringBounder(); + return FileFormat.BRAILLE_PNG.getDefaultStringBounder(TikzFontDistortion.getDefault()); } public void startUrl(Url url) { diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BitReader.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BitReader.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BitReader.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BitReader.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,269 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +/** + * Bit reading helpers. + */ +final class BitReader { + + // Added by Arnaud... not very beautifull + private static final boolean CHECK_UNUSED_BYTES_AFTER_END = false; + + // Possible values: {5, 6}. 5 corresponds to 32-bit build, 6 to 64-bit. This value is used for + // conditional compilation -> produced artifacts might be binary INCOMPATIBLE (JLS 13.2). + private static final int LOG_BITNESS = 6; + private static final int BITNESS = 1 << LOG_BITNESS; + + private static final int BYTENESS = BITNESS / 8; + private static final int CAPACITY = 4096; + // After encountering the end of the input stream, this amount of zero bytes will be appended. + private static final int SLACK = 64; + private static final int BUFFER_SIZE = CAPACITY + SLACK; + // Don't bother to replenish the buffer while this number of bytes is available. + private static final int SAFEGUARD = 36; + private static final int WATERLINE = CAPACITY - SAFEGUARD; + + // "Half" refers to "half of native integer type", i.e. on 64-bit machines it is 32-bit type, + // on 32-bit machines it is 16-bit. + private static final int HALF_BITNESS = BITNESS / 2; + private static final int HALF_SIZE = BYTENESS / 2; + private static final int HALVES_CAPACITY = CAPACITY / HALF_SIZE; + private static final int HALF_BUFFER_SIZE = BUFFER_SIZE / HALF_SIZE; + private static final int HALF_WATERLINE = WATERLINE / HALF_SIZE; + + private static final int LOG_HALF_SIZE = LOG_BITNESS - 4; + + /** + * Fills up the input buffer. + * + *

No-op if there are at least 36 bytes present after current position. + * + *

After encountering the end of the input stream, 64 additional zero bytes are copied to the + * buffer. + */ + static void readMoreInput(State s) { + if (s.halfOffset > HALF_WATERLINE) { + doReadMoreInput(s); + } + } + + static void doReadMoreInput(State s) { + if (s.endOfStreamReached != 0) { + if (halfAvailable(s) >= -2) { + return; + } + throw new BrotliRuntimeException("No more input"); + } + int readOffset = s.halfOffset << LOG_HALF_SIZE; + int bytesInBuffer = CAPACITY - readOffset; + // Move unused bytes to the head of the buffer. + Utils.copyBytesWithin(s.byteBuffer, 0, readOffset, CAPACITY); + s.halfOffset = 0; + while (bytesInBuffer < CAPACITY) { + int spaceLeft = CAPACITY - bytesInBuffer; + int len = Utils.readInput(s.input, s.byteBuffer, bytesInBuffer, spaceLeft); + // EOF is -1 in Java, but 0 in C#. + if (len <= 0) { + s.endOfStreamReached = 1; + s.tailBytes = bytesInBuffer; + bytesInBuffer += HALF_SIZE - 1; + break; + } + bytesInBuffer += len; + } + bytesToNibbles(s, bytesInBuffer); + } + + static void checkHealth(State s, int endOfStream) { + if (s.endOfStreamReached == 0) { + return; + } + int byteOffset = (s.halfOffset << LOG_HALF_SIZE) + ((s.bitOffset + 7) >> 3) - BYTENESS; + if (byteOffset > s.tailBytes) { + throw new BrotliRuntimeException("Read after end"); + } + if (CHECK_UNUSED_BYTES_AFTER_END && (endOfStream != 0) && (byteOffset != s.tailBytes)) { + throw new BrotliRuntimeException("Unused bytes after end"); + } + } + + static void fillBitWindow(State s) { + if (s.bitOffset >= HALF_BITNESS) { + // Same as doFillBitWindow. JVM fails to inline it. + if (BITNESS == 64) { + s.accumulator64 = ((long) s.intBuffer[s.halfOffset++] << HALF_BITNESS) + | (s.accumulator64 >>> HALF_BITNESS); + } else { + s.accumulator32 = ((int) s.shortBuffer[s.halfOffset++] << HALF_BITNESS) + | (s.accumulator32 >>> HALF_BITNESS); + } + s.bitOffset -= HALF_BITNESS; + } + } + + private static void doFillBitWindow(State s) { + if (BITNESS == 64) { + s.accumulator64 = ((long) s.intBuffer[s.halfOffset++] << HALF_BITNESS) + | (s.accumulator64 >>> HALF_BITNESS); + } else { + s.accumulator32 = ((int) s.shortBuffer[s.halfOffset++] << HALF_BITNESS) + | (s.accumulator32 >>> HALF_BITNESS); + } + s.bitOffset -= HALF_BITNESS; + } + + static int peekBits(State s) { + if (BITNESS == 64) { + return (int) (s.accumulator64 >>> s.bitOffset); + } else { + return s.accumulator32 >>> s.bitOffset; + } + } + + static int readFewBits(State s, int n) { + int val = peekBits(s) & ((1 << n) - 1); + s.bitOffset += n; + return val; + } + + static int readBits(State s, int n) { + if (HALF_BITNESS >= 24) { + return readFewBits(s, n); + } else { + return (n <= 16) ? readFewBits(s, n) : readManyBits(s, n); + } + } + + private static int readManyBits(State s, int n) { + int low = readFewBits(s, 16); + doFillBitWindow(s); + return low | (readFewBits(s, n - 16) << 16); + } + + static void initBitReader(State s) { + s.byteBuffer = new byte[BUFFER_SIZE]; + if (BITNESS == 64) { + s.accumulator64 = 0; + s.intBuffer = new int[HALF_BUFFER_SIZE]; + } else { + s.accumulator32 = 0; + s.shortBuffer = new short[HALF_BUFFER_SIZE]; + } + s.bitOffset = BITNESS; + s.halfOffset = HALVES_CAPACITY; + s.endOfStreamReached = 0; + prepare(s); + } + + private static void prepare(State s) { + readMoreInput(s); + checkHealth(s, 0); + doFillBitWindow(s); + doFillBitWindow(s); + } + + static void reload(State s) { + if (s.bitOffset == BITNESS) { + prepare(s); + } + } + + static void jumpToByteBoundary(State s) { + int padding = (BITNESS - s.bitOffset) & 7; + if (padding != 0) { + int paddingBits = readFewBits(s, padding); + if (paddingBits != 0) { + throw new BrotliRuntimeException("Corrupted padding bits"); + } + } + } + + static int halfAvailable(State s) { + int limit = HALVES_CAPACITY; + if (s.endOfStreamReached != 0) { + limit = (s.tailBytes + (HALF_SIZE - 1)) >> LOG_HALF_SIZE; + } + return limit - s.halfOffset; + } + + static void copyBytes(State s, byte[] data, int offset, int length) { + if ((s.bitOffset & 7) != 0) { + throw new BrotliRuntimeException("Unaligned copyBytes"); + } + + // Drain accumulator. + while ((s.bitOffset != BITNESS) && (length != 0)) { + data[offset++] = (byte) peekBits(s); + s.bitOffset += 8; + length--; + } + if (length == 0) { + return; + } + + // Get data from shadow buffer with "sizeof(int)" granularity. + int copyNibbles = Math.min(halfAvailable(s), length >> LOG_HALF_SIZE); + if (copyNibbles > 0) { + int readOffset = s.halfOffset << LOG_HALF_SIZE; + int delta = copyNibbles << LOG_HALF_SIZE; + System.arraycopy(s.byteBuffer, readOffset, data, offset, delta); + offset += delta; + length -= delta; + s.halfOffset += copyNibbles; + } + if (length == 0) { + return; + } + + // Read tail bytes. + if (halfAvailable(s) > 0) { + // length = 1..3 + fillBitWindow(s); + while (length != 0) { + data[offset++] = (byte) peekBits(s); + s.bitOffset += 8; + length--; + } + checkHealth(s, 0); + return; + } + + // Now it is possible to copy bytes directly. + while (length > 0) { + int len = Utils.readInput(s.input, data, offset, length); + if (len == -1) { + throw new BrotliRuntimeException("Unexpected end of input"); + } + offset += len; + length -= len; + } + } + + /** + * Translates bytes to halves (int/short). + */ + static void bytesToNibbles(State s, int byteLen) { + byte[] byteBuffer = s.byteBuffer; + int halfLen = byteLen >> LOG_HALF_SIZE; + if (BITNESS == 64) { + int[] intBuffer = s.intBuffer; + for (int i = 0; i < halfLen; ++i) { + intBuffer[i] = ((byteBuffer[i * 4] & 0xFF)) + | ((byteBuffer[(i * 4) + 1] & 0xFF) << 8) + | ((byteBuffer[(i * 4) + 2] & 0xFF) << 16) + | ((byteBuffer[(i * 4) + 3] & 0xFF) << 24); + } + } else { + short[] shortBuffer = s.shortBuffer; + for (int i = 0; i < halfLen; ++i) { + shortBuffer[i] = (short) ((byteBuffer[i * 2] & 0xFF) + | ((byteBuffer[(i * 2) + 1] & 0xFF) << 8)); + } + } + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,150 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +import java.io.IOException; +import java.io.InputStream; + +/** + * {@link InputStream} decorator that decompresses brotli data. + * + *

Not thread-safe. + */ +public class BrotliInputStream extends InputStream { + + public static final int DEFAULT_INTERNAL_BUFFER_SIZE = 16384; + + /** + * Internal buffer used for efficient byte-by-byte reading. + */ + private byte[] buffer; + + /** + * Number of decoded but still unused bytes in internal buffer. + */ + private int remainingBufferBytes; + + /** + * Next unused byte offset. + */ + private int bufferOffset; + + /** + * Decoder state. + */ + private final State state = new State(); + + /** + * Creates a {@link InputStream} wrapper that decompresses brotli data. + * + *

For byte-by-byte reading ({@link #read()}) internal buffer with + * {@link #DEFAULT_INTERNAL_BUFFER_SIZE} size is allocated and used. + * + *

Will block the thread until first kilobyte of data of source is available. + * + * @param source underlying data source + * @throws IOException in case of corrupted data or source stream problems + */ + public BrotliInputStream(InputStream source) throws IOException { + this(source, DEFAULT_INTERNAL_BUFFER_SIZE); + } + + /** + * Creates a {@link InputStream} wrapper that decompresses brotli data. + * + *

For byte-by-byte reading ({@link #read()}) internal buffer of specified size is + * allocated and used. + * + *

Will block the thread until first kilobyte of data of source is available. + * + * @param source compressed data source + * @param byteReadBufferSize size of internal buffer used in case of + * byte-by-byte reading + * @throws IOException in case of corrupted data or source stream problems + */ + public BrotliInputStream(InputStream source, int byteReadBufferSize) throws IOException { + if (byteReadBufferSize <= 0) { + throw new IllegalArgumentException("Bad buffer size:" + byteReadBufferSize); + } else if (source == null) { + throw new IllegalArgumentException("source is null"); + } + this.buffer = new byte[byteReadBufferSize]; + this.remainingBufferBytes = 0; + this.bufferOffset = 0; + try { + Decode.initState(state, source); + } catch (BrotliRuntimeException ex) { + throw new IOException("Brotli decoder initialization failed", ex); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void close() throws IOException { + Decode.close(state); + } + + /** + * {@inheritDoc} + */ + @Override + public int read() throws IOException { + if (bufferOffset >= remainingBufferBytes) { + remainingBufferBytes = read(buffer, 0, buffer.length); + bufferOffset = 0; + if (remainingBufferBytes == -1) { + return -1; + } + } + return buffer[bufferOffset++] & 0xFF; + } + + /** + * {@inheritDoc} + */ + @Override + public int read(byte[] destBuffer, int destOffset, int destLen) throws IOException { + if (destOffset < 0) { + throw new IllegalArgumentException("Bad offset: " + destOffset); + } else if (destLen < 0) { + throw new IllegalArgumentException("Bad length: " + destLen); + } else if (destOffset + destLen > destBuffer.length) { + throw new IllegalArgumentException( + "Buffer overflow: " + (destOffset + destLen) + " > " + destBuffer.length); + } else if (destLen == 0) { + return 0; + } + int copyLen = Math.max(remainingBufferBytes - bufferOffset, 0); + if (copyLen != 0) { + copyLen = Math.min(copyLen, destLen); + System.arraycopy(buffer, bufferOffset, destBuffer, destOffset, copyLen); + bufferOffset += copyLen; + destOffset += copyLen; + destLen -= copyLen; + if (destLen == 0) { + return copyLen; + } + } + try { + state.output = destBuffer; + state.outputOffset = destOffset; + state.outputLength = destLen; + state.outputUsed = 0; + Decode.decompress(state); + if (state.outputUsed == 0) { + return -1; + } + return state.outputUsed + copyLen; + } catch (BrotliRuntimeException ex) { + throw new IOException("Brotli stream decoding failed", ex); + } + + // <{[INJECTED CODE]}> + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,21 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +/** + * Unchecked exception used internally. + */ +class BrotliRuntimeException extends RuntimeException { + + BrotliRuntimeException(String message) { + super(message); + } + + BrotliRuntimeException(String message, Throwable cause) { + super(message, cause); + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/Context.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/Context.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/Context.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/Context.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,58 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +/** + * Common context lookup table for all context modes. + */ +final class Context { + + static final int[] LOOKUP = new int[2048]; + + private static final String UTF_MAP = " !! ! \"#$##%#$&'##(#)#+++++++++" + + "+((&*'##,---,---,-----,-----,-----&#'###.///.///./////./////./////&#'# "; + private static final String UTF_RLE = "A/* ': & : $ \u0081 @"; + + private static void unpackLookupTable(int[] lookup, String map, String rle) { + // LSB6, MSB6, SIGNED + for (int i = 0; i < 256; ++i) { + lookup[i] = i & 0x3F; + lookup[512 + i] = i >> 2; + lookup[1792 + i] = 2 + (i >> 6); + } + // UTF8 + for (int i = 0; i < 128; ++i) { + lookup[1024 + i] = 4 * (map.charAt(i) - 32); + } + for (int i = 0; i < 64; ++i) { + lookup[1152 + i] = i & 1; + lookup[1216 + i] = 2 + (i & 1); + } + int offset = 1280; + for (int k = 0; k < 19; ++k) { + int value = k & 3; + int rep = rle.charAt(k) - 32; + for (int i = 0; i < rep; ++i) { + lookup[offset++] = value; + } + } + // SIGNED + for (int i = 0; i < 16; ++i) { + lookup[1792 + i] = 1; + lookup[2032 + i] = 6; + } + lookup[1792] = 0; + lookup[2047] = 7; + for (int i = 0; i < 256; ++i) { + lookup[1536 + i] = lookup[1792 + i] << 3; + } + } + + static { + unpackLookupTable(LOOKUP, UTF_MAP, UTF_RLE); + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/Decode.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/Decode.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/Decode.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/Decode.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,1002 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +import java.io.IOException; +import java.io.InputStream; + +/** + * API for Brotli decompression. + */ +final class Decode { + + //---------------------------------------------------------------------------- + // RunningState + //---------------------------------------------------------------------------- + private static final int UNINITIALIZED = 0; + private static final int BLOCK_START = 1; + private static final int COMPRESSED_BLOCK_START = 2; + private static final int MAIN_LOOP = 3; + private static final int READ_METADATA = 4; + private static final int COPY_UNCOMPRESSED = 5; + private static final int INSERT_LOOP = 6; + private static final int COPY_LOOP = 7; + private static final int COPY_WRAP_BUFFER = 8; + private static final int TRANSFORM = 9; + private static final int FINISHED = 10; + private static final int CLOSED = 11; + private static final int WRITE = 12; + + private static final int DEFAULT_CODE_LENGTH = 8; + private static final int CODE_LENGTH_REPEAT_CODE = 16; + private static final int NUM_LITERAL_CODES = 256; + private static final int NUM_INSERT_AND_COPY_CODES = 704; + private static final int NUM_BLOCK_LENGTH_CODES = 26; + private static final int LITERAL_CONTEXT_BITS = 6; + private static final int DISTANCE_CONTEXT_BITS = 2; + + private static final int HUFFMAN_TABLE_BITS = 8; + private static final int HUFFMAN_TABLE_MASK = 0xFF; + + /** + * Maximum possible Huffman table size for an alphabet size of 704, max code length 15 and root + * table bits 8. + */ + static final int HUFFMAN_TABLE_SIZE = 1080; + + private static final int CODE_LENGTH_CODES = 18; + private static final int[] CODE_LENGTH_CODE_ORDER = { + 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, + }; + + private static final int NUM_DISTANCE_SHORT_CODES = 16; + private static final int[] DISTANCE_SHORT_CODE_INDEX_OFFSET = { + 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 + }; + + private static final int[] DISTANCE_SHORT_CODE_VALUE_OFFSET = { + 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3 + }; + + /** + * Static Huffman code for the code length code lengths. + */ + private static final int[] FIXED_TABLE = { + 0x020000, 0x020004, 0x020003, 0x030002, 0x020000, 0x020004, 0x020003, 0x040001, + 0x020000, 0x020004, 0x020003, 0x030002, 0x020000, 0x020004, 0x020003, 0x040005 + }; + + static final int[] DICTIONARY_OFFSETS_BY_LENGTH = { + 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248, 63488, 74752, 87040, 93696, 100864, + 104704, 106752, 108928, 113536, 115968, 118528, 119872, 121280, 122016 + }; + + static final int[] DICTIONARY_SIZE_BITS_BY_LENGTH = { + 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, 7, 6, 6, 5, 5 + }; + + static final int MIN_WORD_LENGTH = 4; + + static final int MAX_WORD_LENGTH = 24; + + static final int MAX_TRANSFORMED_WORD_LENGTH = 5 + MAX_WORD_LENGTH + 8; + + //---------------------------------------------------------------------------- + // Prefix code LUT. + //---------------------------------------------------------------------------- + static final int[] BLOCK_LENGTH_OFFSET = { + 1, 5, 9, 13, 17, 25, 33, 41, 49, 65, 81, 97, 113, 145, 177, 209, 241, 305, 369, 497, + 753, 1265, 2289, 4337, 8433, 16625 + }; + + static final int[] BLOCK_LENGTH_N_BITS = { + 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 24 + }; + + static final int[] INSERT_LENGTH_OFFSET = { + 0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26, 34, 50, 66, 98, 130, 194, 322, 578, 1090, 2114, 6210, + 22594 + }; + + static final int[] INSERT_LENGTH_N_BITS = { + 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 24 + }; + + static final int[] COPY_LENGTH_OFFSET = { + 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 18, 22, 30, 38, 54, 70, 102, 134, 198, 326, 582, 1094, + 2118 + }; + + static final int[] COPY_LENGTH_N_BITS = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24 + }; + + static final int[] INSERT_RANGE_LUT = { + 0, 0, 8, 8, 0, 16, 8, 16, 16 + }; + + static final int[] COPY_RANGE_LUT = { + 0, 8, 0, 8, 16, 0, 16, 8, 16 + }; + + private static int decodeWindowBits(State s) { + BitReader.fillBitWindow(s); + if (BitReader.readFewBits(s, 1) == 0) { + return 16; + } + int n = BitReader.readFewBits(s, 3); + if (n != 0) { + return 17 + n; + } + n = BitReader.readFewBits(s, 3); + if (n != 0) { + return 8 + n; + } + return 17; + } + + /** + * Associate input with decoder state. + * + * @param s uninitialized state without associated input + * @param input compressed data source + */ + static void initState(State s, InputStream input) { + if (s.runningState != UNINITIALIZED) { + throw new IllegalStateException("State MUST be uninitialized"); + } + s.blockTrees = new int[6 * HUFFMAN_TABLE_SIZE]; + s.input = input; + BitReader.initBitReader(s); + int windowBits = decodeWindowBits(s); + if (windowBits == 9) { /* Reserved case for future expansion. */ + throw new BrotliRuntimeException("Invalid 'windowBits' code"); + } + s.maxRingBufferSize = 1 << windowBits; + s.maxBackwardDistance = s.maxRingBufferSize - 16; + s.runningState = BLOCK_START; + } + + static void close(State s) throws IOException { + if (s.runningState == UNINITIALIZED) { + throw new IllegalStateException("State MUST be initialized"); + } + if (s.runningState == CLOSED) { + return; + } + s.runningState = CLOSED; + if (s.input != null) { + Utils.closeInput(s.input); + s.input = null; + } + } + + /** + * Decodes a number in the range [0..255], by reading 1 - 11 bits. + */ + private static int decodeVarLenUnsignedByte(State s) { + BitReader.fillBitWindow(s); + if (BitReader.readFewBits(s, 1) != 0) { + int n = BitReader.readFewBits(s, 3); + if (n == 0) { + return 1; + } else { + return BitReader.readFewBits(s, n) + (1 << n); + } + } + return 0; + } + + private static void decodeMetaBlockLength(State s) { + BitReader.fillBitWindow(s); + s.inputEnd = BitReader.readFewBits(s, 1); + s.metaBlockLength = 0; + s.isUncompressed = 0; + s.isMetadata = 0; + if ((s.inputEnd != 0) && BitReader.readFewBits(s, 1) != 0) { + return; + } + int sizeNibbles = BitReader.readFewBits(s, 2) + 4; + if (sizeNibbles == 7) { + s.isMetadata = 1; + if (BitReader.readFewBits(s, 1) != 0) { + throw new BrotliRuntimeException("Corrupted reserved bit"); + } + int sizeBytes = BitReader.readFewBits(s, 2); + if (sizeBytes == 0) { + return; + } + for (int i = 0; i < sizeBytes; i++) { + BitReader.fillBitWindow(s); + int bits = BitReader.readFewBits(s, 8); + if (bits == 0 && i + 1 == sizeBytes && sizeBytes > 1) { + throw new BrotliRuntimeException("Exuberant nibble"); + } + s.metaBlockLength |= bits << (i * 8); + } + } else { + for (int i = 0; i < sizeNibbles; i++) { + BitReader.fillBitWindow(s); + int bits = BitReader.readFewBits(s, 4); + if (bits == 0 && i + 1 == sizeNibbles && sizeNibbles > 4) { + throw new BrotliRuntimeException("Exuberant nibble"); + } + s.metaBlockLength |= bits << (i * 4); + } + } + s.metaBlockLength++; + if (s.inputEnd == 0) { + s.isUncompressed = BitReader.readFewBits(s, 1); + } + } + + /** + * Decodes the next Huffman code from bit-stream. + */ + private static int readSymbol(int[] table, int offset, State s) { + int val = BitReader.peekBits(s); + offset += val & HUFFMAN_TABLE_MASK; + int bits = table[offset] >> 16; + int sym = table[offset] & 0xFFFF; + if (bits <= HUFFMAN_TABLE_BITS) { + s.bitOffset += bits; + return sym; + } + offset += sym; + int mask = (1 << bits) - 1; + offset += (val & mask) >>> HUFFMAN_TABLE_BITS; + s.bitOffset += ((table[offset] >> 16) + HUFFMAN_TABLE_BITS); + return table[offset] & 0xFFFF; + } + + private static int readBlockLength(int[] table, int offset, State s) { + BitReader.fillBitWindow(s); + int code = readSymbol(table, offset, s); + int n = BLOCK_LENGTH_N_BITS[code]; + BitReader.fillBitWindow(s); + return BLOCK_LENGTH_OFFSET[code] + BitReader.readBits(s, n); + } + + private static int translateShortCodes(int code, int[] ringBuffer, int index) { + if (code < NUM_DISTANCE_SHORT_CODES) { + index += DISTANCE_SHORT_CODE_INDEX_OFFSET[code]; + index &= 3; + return ringBuffer[index] + DISTANCE_SHORT_CODE_VALUE_OFFSET[code]; + } + return code - NUM_DISTANCE_SHORT_CODES + 1; + } + + private static void moveToFront(int[] v, int index) { + int value = v[index]; + for (; index > 0; index--) { + v[index] = v[index - 1]; + } + v[0] = value; + } + + private static void inverseMoveToFrontTransform(byte[] v, int vLen) { + int[] mtf = new int[256]; + for (int i = 0; i < 256; i++) { + mtf[i] = i; + } + for (int i = 0; i < vLen; i++) { + int index = v[i] & 0xFF; + v[i] = (byte) mtf[index]; + if (index != 0) { + moveToFront(mtf, index); + } + } + } + + private static void readHuffmanCodeLengths( + int[] codeLengthCodeLengths, int numSymbols, int[] codeLengths, State s) { + int symbol = 0; + int prevCodeLen = DEFAULT_CODE_LENGTH; + int repeat = 0; + int repeatCodeLen = 0; + int space = 32768; + int[] table = new int[32]; + + Huffman.buildHuffmanTable(table, 0, 5, codeLengthCodeLengths, CODE_LENGTH_CODES); + + while (symbol < numSymbols && space > 0) { + BitReader.readMoreInput(s); + BitReader.fillBitWindow(s); + int p = BitReader.peekBits(s) & 31; + s.bitOffset += table[p] >> 16; + int codeLen = table[p] & 0xFFFF; + if (codeLen < CODE_LENGTH_REPEAT_CODE) { + repeat = 0; + codeLengths[symbol++] = codeLen; + if (codeLen != 0) { + prevCodeLen = codeLen; + space -= 32768 >> codeLen; + } + } else { + int extraBits = codeLen - 14; + int newLen = 0; + if (codeLen == CODE_LENGTH_REPEAT_CODE) { + newLen = prevCodeLen; + } + if (repeatCodeLen != newLen) { + repeat = 0; + repeatCodeLen = newLen; + } + int oldRepeat = repeat; + if (repeat > 0) { + repeat -= 2; + repeat <<= extraBits; + } + BitReader.fillBitWindow(s); + repeat += BitReader.readFewBits(s, extraBits) + 3; + int repeatDelta = repeat - oldRepeat; + if (symbol + repeatDelta > numSymbols) { + throw new BrotliRuntimeException("symbol + repeatDelta > numSymbols"); // COV_NF_LINE + } + for (int i = 0; i < repeatDelta; i++) { + codeLengths[symbol++] = repeatCodeLen; + } + if (repeatCodeLen != 0) { + space -= repeatDelta << (15 - repeatCodeLen); + } + } + } + if (space != 0) { + throw new BrotliRuntimeException("Unused space"); // COV_NF_LINE + } + // TODO: Pass max_symbol to Huffman table builder instead? + Utils.fillIntsWithZeroes(codeLengths, symbol, numSymbols); + } + + static int checkDupes(int[] symbols, int length) { + for (int i = 0; i < length - 1; ++i) { + for (int j = i + 1; j < length; ++j) { + if (symbols[i] == symbols[j]) { + return 0; + } + } + } + return 1; + } + + // TODO: Use specialized versions for smaller tables. + static void readHuffmanCode(int alphabetSize, int[] table, int offset, State s) { + int ok = 1; + int simpleCodeOrSkip; + BitReader.readMoreInput(s); + // TODO: Avoid allocation. + int[] codeLengths = new int[alphabetSize]; + BitReader.fillBitWindow(s); + simpleCodeOrSkip = BitReader.readFewBits(s, 2); + if (simpleCodeOrSkip == 1) { // Read symbols, codes & code lengths directly. + int maxBitsCounter = alphabetSize - 1; + int maxBits = 0; + int[] symbols = new int[4]; + int numSymbols = BitReader.readFewBits(s, 2) + 1; + while (maxBitsCounter != 0) { + maxBitsCounter >>= 1; + maxBits++; + } + // TODO: uncomment when codeLengths is reused. + // Utils.fillWithZeroes(codeLengths, 0, alphabetSize); + for (int i = 0; i < numSymbols; i++) { + BitReader.fillBitWindow(s); + symbols[i] = BitReader.readFewBits(s, maxBits) % alphabetSize; + codeLengths[symbols[i]] = 2; + } + codeLengths[symbols[0]] = 1; + switch (numSymbols) { + case 2: + codeLengths[symbols[1]] = 1; + break; + case 4: + if (BitReader.readFewBits(s, 1) == 1) { + codeLengths[symbols[2]] = 3; + codeLengths[symbols[3]] = 3; + } else { + codeLengths[symbols[0]] = 2; + } + break; + default: + break; + } + ok = checkDupes(symbols, numSymbols); + } else { // Decode Huffman-coded code lengths. + int[] codeLengthCodeLengths = new int[CODE_LENGTH_CODES]; + int space = 32; + int numCodes = 0; + for (int i = simpleCodeOrSkip; i < CODE_LENGTH_CODES && space > 0; i++) { + int codeLenIdx = CODE_LENGTH_CODE_ORDER[i]; + BitReader.fillBitWindow(s); + int p = BitReader.peekBits(s) & 15; + // TODO: Demultiplex FIXED_TABLE. + s.bitOffset += FIXED_TABLE[p] >> 16; + int v = FIXED_TABLE[p] & 0xFFFF; + codeLengthCodeLengths[codeLenIdx] = v; + if (v != 0) { + space -= (32 >> v); + numCodes++; + } + } + if (space != 0 && numCodes != 1) { + ok = 0; + } + readHuffmanCodeLengths(codeLengthCodeLengths, alphabetSize, codeLengths, s); + } + if (ok == 0) { + throw new BrotliRuntimeException("Can't readHuffmanCode"); // COV_NF_LINE + } + Huffman.buildHuffmanTable(table, offset, HUFFMAN_TABLE_BITS, codeLengths, alphabetSize); + } + + private static int decodeContextMap(int contextMapSize, byte[] contextMap, State s) { + BitReader.readMoreInput(s); + int numTrees = decodeVarLenUnsignedByte(s) + 1; + + if (numTrees == 1) { + Utils.fillBytesWithZeroes(contextMap, 0, contextMapSize); + return numTrees; + } + + BitReader.fillBitWindow(s); + int useRleForZeros = BitReader.readFewBits(s, 1); + int maxRunLengthPrefix = 0; + if (useRleForZeros != 0) { + maxRunLengthPrefix = BitReader.readFewBits(s, 4) + 1; + } + int[] table = new int[HUFFMAN_TABLE_SIZE]; + readHuffmanCode(numTrees + maxRunLengthPrefix, table, 0, s); + for (int i = 0; i < contextMapSize; ) { + BitReader.readMoreInput(s); + BitReader.fillBitWindow(s); + int code = readSymbol(table, 0, s); + if (code == 0) { + contextMap[i] = 0; + i++; + } else if (code <= maxRunLengthPrefix) { + BitReader.fillBitWindow(s); + int reps = (1 << code) + BitReader.readFewBits(s, code); + while (reps != 0) { + if (i >= contextMapSize) { + throw new BrotliRuntimeException("Corrupted context map"); // COV_NF_LINE + } + contextMap[i] = 0; + i++; + reps--; + } + } else { + contextMap[i] = (byte) (code - maxRunLengthPrefix); + i++; + } + } + BitReader.fillBitWindow(s); + if (BitReader.readFewBits(s, 1) == 1) { + inverseMoveToFrontTransform(contextMap, contextMapSize); + } + return numTrees; + } + + private static int decodeBlockTypeAndLength(State s, int treeType, int numBlockTypes) { + final int[] ringBuffers = s.rings; + final int offset = 4 + treeType * 2; + BitReader.fillBitWindow(s); + int blockType = readSymbol(s.blockTrees, treeType * HUFFMAN_TABLE_SIZE, s); + int result = readBlockLength(s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); + + if (blockType == 1) { + blockType = ringBuffers[offset + 1] + 1; + } else if (blockType == 0) { + blockType = ringBuffers[offset]; + } else { + blockType -= 2; + } + if (blockType >= numBlockTypes) { + blockType -= numBlockTypes; + } + ringBuffers[offset] = ringBuffers[offset + 1]; + ringBuffers[offset + 1] = blockType; + return result; + } + + private static void decodeLiteralBlockSwitch(State s) { + s.literalBlockLength = decodeBlockTypeAndLength(s, 0, s.numLiteralBlockTypes); + int literalBlockType = s.rings[5]; + s.contextMapSlice = literalBlockType << LITERAL_CONTEXT_BITS; + s.literalTreeIndex = s.contextMap[s.contextMapSlice] & 0xFF; + s.literalTree = s.hGroup0[s.literalTreeIndex]; + int contextMode = s.contextModes[literalBlockType]; + s.contextLookupOffset1 = contextMode << 9; + s.contextLookupOffset2 = s.contextLookupOffset1 + 256; + } + + private static void decodeCommandBlockSwitch(State s) { + s.commandBlockLength = decodeBlockTypeAndLength(s, 1, s.numCommandBlockTypes); + s.treeCommandOffset = s.hGroup1[s.rings[7]]; + } + + private static void decodeDistanceBlockSwitch(State s) { + s.distanceBlockLength = decodeBlockTypeAndLength(s, 2, s.numDistanceBlockTypes); + s.distContextMapSlice = s.rings[9] << DISTANCE_CONTEXT_BITS; + } + + private static void maybeReallocateRingBuffer(State s) { + int newSize = s.maxRingBufferSize; + if (newSize > s.expectedTotalSize) { + /* TODO: Handle 2GB+ cases more gracefully. */ + int minimalNewSize = s.expectedTotalSize; + while ((newSize >> 1) > minimalNewSize) { + newSize >>= 1; + } + if ((s.inputEnd == 0) && newSize < 16384 && s.maxRingBufferSize >= 16384) { + newSize = 16384; + } + } + if (newSize <= s.ringBufferSize) { + return; + } + int ringBufferSizeWithSlack = newSize + MAX_TRANSFORMED_WORD_LENGTH; + byte[] newBuffer = new byte[ringBufferSizeWithSlack]; + if (s.ringBuffer.length != 0) { + System.arraycopy(s.ringBuffer, 0, newBuffer, 0, s.ringBufferSize); + } + s.ringBuffer = newBuffer; + s.ringBufferSize = newSize; + } + + private static void readNextMetablockHeader(State s) { + if (s.inputEnd != 0) { + s.nextRunningState = FINISHED; + s.bytesToWrite = s.pos; + s.bytesWritten = 0; + s.runningState = WRITE; + return; + } + // TODO: Reset? Do we need this? + s.hGroup0 = new int[0]; + s.hGroup1 = new int[0]; + s.hGroup2 = new int[0]; + + BitReader.readMoreInput(s); + decodeMetaBlockLength(s); + if ((s.metaBlockLength == 0) && (s.isMetadata == 0)) { + return; + } + if ((s.isUncompressed != 0) || (s.isMetadata != 0)) { + BitReader.jumpToByteBoundary(s); + s.runningState = (s.isMetadata != 0) ? READ_METADATA : COPY_UNCOMPRESSED; + } else { + s.runningState = COMPRESSED_BLOCK_START; + } + + if (s.isMetadata != 0) { + return; + } + s.expectedTotalSize += s.metaBlockLength; + if (s.expectedTotalSize > 1 << 30) { + s.expectedTotalSize = 1 << 30; + } + if (s.ringBufferSize < s.maxRingBufferSize) { + maybeReallocateRingBuffer(s); + } + } + + private static int readMetablockPartition(State s, int treeType, int numBlockTypes) { + if (numBlockTypes <= 1) { + return 1 << 28; + } + readHuffmanCode(numBlockTypes + 2, s.blockTrees, treeType * HUFFMAN_TABLE_SIZE, s); + readHuffmanCode(NUM_BLOCK_LENGTH_CODES, s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); + return readBlockLength(s.blockTrees, (treeType + 3) * HUFFMAN_TABLE_SIZE, s); + } + + private static void readMetablockHuffmanCodesAndContextMaps(State s) { + s.numLiteralBlockTypes = decodeVarLenUnsignedByte(s) + 1; + s.literalBlockLength = readMetablockPartition(s, 0, s.numLiteralBlockTypes); + s.numCommandBlockTypes = decodeVarLenUnsignedByte(s) + 1; + s.commandBlockLength = readMetablockPartition(s, 1, s.numCommandBlockTypes); + s.numDistanceBlockTypes = decodeVarLenUnsignedByte(s) + 1; + s.distanceBlockLength = readMetablockPartition(s, 2, s.numDistanceBlockTypes); + + BitReader.readMoreInput(s); + BitReader.fillBitWindow(s); + s.distancePostfixBits = BitReader.readFewBits(s, 2); + s.numDirectDistanceCodes = + NUM_DISTANCE_SHORT_CODES + (BitReader.readFewBits(s, 4) << s.distancePostfixBits); + s.distancePostfixMask = (1 << s.distancePostfixBits) - 1; + int numDistanceCodes = s.numDirectDistanceCodes + (48 << s.distancePostfixBits); + // TODO: Reuse? + s.contextModes = new byte[s.numLiteralBlockTypes]; + for (int i = 0; i < s.numLiteralBlockTypes;) { + /* Ensure that less than 256 bits read between readMoreInput. */ + int limit = Math.min(i + 96, s.numLiteralBlockTypes); + for (; i < limit; ++i) { + BitReader.fillBitWindow(s); + s.contextModes[i] = (byte) (BitReader.readFewBits(s, 2)); + } + BitReader.readMoreInput(s); + } + + // TODO: Reuse? + s.contextMap = new byte[s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS]; + int numLiteralTrees = decodeContextMap(s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS, + s.contextMap, s); + s.trivialLiteralContext = 1; + for (int j = 0; j < s.numLiteralBlockTypes << LITERAL_CONTEXT_BITS; j++) { + if (s.contextMap[j] != j >> LITERAL_CONTEXT_BITS) { + s.trivialLiteralContext = 0; + break; + } + } + + // TODO: Reuse? + s.distContextMap = new byte[s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS]; + int numDistTrees = decodeContextMap(s.numDistanceBlockTypes << DISTANCE_CONTEXT_BITS, + s.distContextMap, s); + + s.hGroup0 = decodeHuffmanTreeGroup(NUM_LITERAL_CODES, numLiteralTrees, s); + s.hGroup1 = + decodeHuffmanTreeGroup(NUM_INSERT_AND_COPY_CODES, s.numCommandBlockTypes, s); + s.hGroup2 = decodeHuffmanTreeGroup(numDistanceCodes, numDistTrees, s); + + s.contextMapSlice = 0; + s.distContextMapSlice = 0; + s.contextLookupOffset1 = (int) (s.contextModes[0]) << 9; + s.contextLookupOffset2 = s.contextLookupOffset1 + 256; + s.literalTreeIndex = 0; + s.literalTree = s.hGroup0[0]; + s.treeCommandOffset = s.hGroup1[0]; + + s.rings[4] = 1; + s.rings[5] = 0; + s.rings[6] = 1; + s.rings[7] = 0; + s.rings[8] = 1; + s.rings[9] = 0; + } + + private static void copyUncompressedData(State s) { + final byte[] ringBuffer = s.ringBuffer; + + // Could happen if block ends at ring buffer end. + if (s.metaBlockLength <= 0) { + BitReader.reload(s); + s.runningState = BLOCK_START; + return; + } + + int chunkLength = Math.min(s.ringBufferSize - s.pos, s.metaBlockLength); + BitReader.copyBytes(s, ringBuffer, s.pos, chunkLength); + s.metaBlockLength -= chunkLength; + s.pos += chunkLength; + if (s.pos == s.ringBufferSize) { + s.nextRunningState = COPY_UNCOMPRESSED; + s.bytesToWrite = s.ringBufferSize; + s.bytesWritten = 0; + s.runningState = WRITE; + return; + } + + BitReader.reload(s); + s.runningState = BLOCK_START; + } + + private static int writeRingBuffer(State s) { + int toWrite = Math.min(s.outputLength - s.outputUsed, + s.bytesToWrite - s.bytesWritten); + if (toWrite != 0) { + System.arraycopy(s.ringBuffer, s.bytesWritten, s.output, + s.outputOffset + s.outputUsed, toWrite); + s.outputUsed += toWrite; + s.bytesWritten += toWrite; + } + + if (s.outputUsed < s.outputLength) { + return 1; + } else { + return 0; + } + } + + private static int[] decodeHuffmanTreeGroup(int alphabetSize, int n, State s) { + int[] group = new int[n + (n * HUFFMAN_TABLE_SIZE)]; + int next = n; + for (int i = 0; i < n; i++) { + group[i] = next; + Decode.readHuffmanCode(alphabetSize, group, next, s); + next += HUFFMAN_TABLE_SIZE; + } + return group; + } + + /** + * Actual decompress implementation. + */ + static void decompress(State s) { + if (s.runningState == UNINITIALIZED) { + throw new IllegalStateException("Can't decompress until initialized"); + } + if (s.runningState == CLOSED) { + throw new IllegalStateException("Can't decompress after close"); + } + int ringBufferMask = s.ringBufferSize - 1; + byte[] ringBuffer = s.ringBuffer; + + while (s.runningState != FINISHED) { + // TODO: extract cases to methods for the better readability. + switch (s.runningState) { + case BLOCK_START: + if (s.metaBlockLength < 0) { + throw new BrotliRuntimeException("Invalid metablock length"); + } + readNextMetablockHeader(s); + /* Ring-buffer would be reallocated here. */ + ringBufferMask = s.ringBufferSize - 1; + ringBuffer = s.ringBuffer; + continue; + + case COMPRESSED_BLOCK_START: + readMetablockHuffmanCodesAndContextMaps(s); + s.runningState = MAIN_LOOP; + // Fall through + + case MAIN_LOOP: + if (s.metaBlockLength <= 0) { + s.runningState = BLOCK_START; + continue; + } + BitReader.readMoreInput(s); + if (s.commandBlockLength == 0) { + decodeCommandBlockSwitch(s); + } + s.commandBlockLength--; + BitReader.fillBitWindow(s); + int cmdCode = readSymbol(s.hGroup1, s.treeCommandOffset, s); + int rangeIdx = cmdCode >>> 6; + s.distanceCode = 0; + if (rangeIdx >= 2) { + rangeIdx -= 2; + s.distanceCode = -1; + } + int insertCode = INSERT_RANGE_LUT[rangeIdx] + ((cmdCode >>> 3) & 7); + BitReader.fillBitWindow(s); + int insertBits = INSERT_LENGTH_N_BITS[insertCode]; + int insertExtra = BitReader.readBits(s, insertBits); + s.insertLength = INSERT_LENGTH_OFFSET[insertCode] + insertExtra; + int copyCode = COPY_RANGE_LUT[rangeIdx] + (cmdCode & 7); + BitReader.fillBitWindow(s); + int copyBits = COPY_LENGTH_N_BITS[copyCode]; + int copyExtra = BitReader.readBits(s, copyBits); + s.copyLength = COPY_LENGTH_OFFSET[copyCode] + copyExtra; + + s.j = 0; + s.runningState = INSERT_LOOP; + + // Fall through + case INSERT_LOOP: + if (s.trivialLiteralContext != 0) { + while (s.j < s.insertLength) { + BitReader.readMoreInput(s); + if (s.literalBlockLength == 0) { + decodeLiteralBlockSwitch(s); + } + s.literalBlockLength--; + BitReader.fillBitWindow(s); + ringBuffer[s.pos] = + (byte) readSymbol(s.hGroup0, s.literalTree, s); + s.j++; + if (s.pos++ == ringBufferMask) { + s.nextRunningState = INSERT_LOOP; + s.bytesToWrite = s.ringBufferSize; + s.bytesWritten = 0; + s.runningState = WRITE; + break; + } + } + } else { + int prevByte1 = ringBuffer[(s.pos - 1) & ringBufferMask] & 0xFF; + int prevByte2 = ringBuffer[(s.pos - 2) & ringBufferMask] & 0xFF; + while (s.j < s.insertLength) { + BitReader.readMoreInput(s); + if (s.literalBlockLength == 0) { + decodeLiteralBlockSwitch(s); + } + int literalTreeIndex = s.contextMap[s.contextMapSlice + + (Context.LOOKUP[s.contextLookupOffset1 + prevByte1] + | Context.LOOKUP[s.contextLookupOffset2 + prevByte2])] & 0xFF; + s.literalBlockLength--; + prevByte2 = prevByte1; + BitReader.fillBitWindow(s); + prevByte1 = readSymbol( + s.hGroup0, s.hGroup0[literalTreeIndex], s); + ringBuffer[s.pos] = (byte) prevByte1; + s.j++; + if (s.pos++ == ringBufferMask) { + s.nextRunningState = INSERT_LOOP; + s.bytesToWrite = s.ringBufferSize; + s.bytesWritten = 0; + s.runningState = WRITE; + break; + } + } + } + if (s.runningState != INSERT_LOOP) { + continue; + } + s.metaBlockLength -= s.insertLength; + if (s.metaBlockLength <= 0) { + s.runningState = MAIN_LOOP; + continue; + } + if (s.distanceCode < 0) { + BitReader.readMoreInput(s); + if (s.distanceBlockLength == 0) { + decodeDistanceBlockSwitch(s); + } + s.distanceBlockLength--; + BitReader.fillBitWindow(s); + s.distanceCode = readSymbol(s.hGroup2, s.hGroup2[ + s.distContextMap[s.distContextMapSlice + + (s.copyLength > 4 ? 3 : s.copyLength - 2)] & 0xFF], s); + if (s.distanceCode >= s.numDirectDistanceCodes) { + s.distanceCode -= s.numDirectDistanceCodes; + int postfix = s.distanceCode & s.distancePostfixMask; + s.distanceCode >>>= s.distancePostfixBits; + int n = (s.distanceCode >>> 1) + 1; + int offset = ((2 + (s.distanceCode & 1)) << n) - 4; + BitReader.fillBitWindow(s); + int distanceExtra = BitReader.readBits(s, n); + s.distanceCode = s.numDirectDistanceCodes + postfix + + ((offset + distanceExtra) << s.distancePostfixBits); + } + } + + // Convert the distance code to the actual distance by possibly looking up past distances + // from the ringBuffer. + s.distance = translateShortCodes(s.distanceCode, s.rings, s.distRbIdx); + if (s.distance < 0) { + throw new BrotliRuntimeException("Negative distance"); // COV_NF_LINE + } + + if (s.maxDistance != s.maxBackwardDistance + && s.pos < s.maxBackwardDistance) { + s.maxDistance = s.pos; + } else { + s.maxDistance = s.maxBackwardDistance; + } + + s.copyDst = s.pos; + if (s.distance > s.maxDistance) { + s.runningState = TRANSFORM; + continue; + } + + if (s.distanceCode > 0) { + s.rings[s.distRbIdx & 3] = s.distance; + s.distRbIdx++; + } + + if (s.copyLength > s.metaBlockLength) { + throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE + } + s.j = 0; + s.runningState = COPY_LOOP; + // fall through + case COPY_LOOP: + int src = (s.pos - s.distance) & ringBufferMask; + int dst = s.pos; + int copyLength = s.copyLength - s.j; + int srcEnd = src + copyLength; + int dstEnd = dst + copyLength; + if ((srcEnd < ringBufferMask) && (dstEnd < ringBufferMask)) { + if (copyLength < 12 || (srcEnd > dst && dstEnd > src)) { + for (int k = 0; k < copyLength; ++k) { + ringBuffer[dst++] = ringBuffer[src++]; + } + } else { + Utils.copyBytesWithin(ringBuffer, dst, src, srcEnd); + } + s.j += copyLength; + s.metaBlockLength -= copyLength; + s.pos += copyLength; + } else { + for (; s.j < s.copyLength;) { + ringBuffer[s.pos] = + ringBuffer[(s.pos - s.distance) & ringBufferMask]; + s.metaBlockLength--; + s.j++; + if (s.pos++ == ringBufferMask) { + s.nextRunningState = COPY_LOOP; + s.bytesToWrite = s.ringBufferSize; + s.bytesWritten = 0; + s.runningState = WRITE; + break; + } + } + } + if (s.runningState == COPY_LOOP) { + s.runningState = MAIN_LOOP; + } + continue; + + case TRANSFORM: + if (s.copyLength >= MIN_WORD_LENGTH + && s.copyLength <= MAX_WORD_LENGTH) { + int offset = DICTIONARY_OFFSETS_BY_LENGTH[s.copyLength]; + int wordId = s.distance - s.maxDistance - 1; + int shift = DICTIONARY_SIZE_BITS_BY_LENGTH[s.copyLength]; + int mask = (1 << shift) - 1; + int wordIdx = wordId & mask; + int transformIdx = wordId >>> shift; + offset += wordIdx * s.copyLength; + if (transformIdx < Transform.NUM_TRANSFORMS) { + int len = Transform.transformDictionaryWord(ringBuffer, s.copyDst, + Dictionary.getData(), offset, s.copyLength, transformIdx); + s.copyDst += len; + s.pos += len; + s.metaBlockLength -= len; + if (s.copyDst >= s.ringBufferSize) { + s.nextRunningState = COPY_WRAP_BUFFER; + s.bytesToWrite = s.ringBufferSize; + s.bytesWritten = 0; + s.runningState = WRITE; + continue; + } + } else { + throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE + } + } else { + throw new BrotliRuntimeException("Invalid backward reference"); // COV_NF_LINE + } + s.runningState = MAIN_LOOP; + continue; + + case COPY_WRAP_BUFFER: + Utils.copyBytesWithin(ringBuffer, 0, s.ringBufferSize, s.copyDst); + s.runningState = MAIN_LOOP; + continue; + + case READ_METADATA: + while (s.metaBlockLength > 0) { + BitReader.readMoreInput(s); + // Optimize + BitReader.fillBitWindow(s); + BitReader.readFewBits(s, 8); + s.metaBlockLength--; + } + s.runningState = BLOCK_START; + continue; + + + case COPY_UNCOMPRESSED: + copyUncompressedData(s); + continue; + + case WRITE: + if (writeRingBuffer(s) == 0) { + // Output buffer is full. + return; + } + if (s.pos >= s.maxBackwardDistance) { + s.maxDistance = s.maxBackwardDistance; + } + s.pos &= ringBufferMask; + s.runningState = s.nextRunningState; + continue; + + default: + throw new BrotliRuntimeException("Unexpected state " + s.runningState); + } + } + if (s.runningState == FINISHED) { + if (s.metaBlockLength < 0) { + throw new BrotliRuntimeException("Invalid metablock length"); + } + BitReader.jumpToByteBoundary(s); + BitReader.checkHealth(s, 1); + } + } +} diff -Nru plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/DictionaryData.java plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/DictionaryData.java --- plantuml-1.2017.15/src/net/sourceforge/plantuml/brotli/DictionaryData.java 1970-01-01 00:00:00.000000000 +0000 +++ plantuml-1.2018.9/src/net/sourceforge/plantuml/brotli/DictionaryData.java 2018-07-27 21:59:19.000000000 +0000 @@ -0,0 +1,55 @@ +/* Copyright 2015 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +package net.sourceforge.plantuml.brotli; + +import java.nio.ByteBuffer; + +/** + * Built-in dictionary data. + * + * When this class is loaded, it sets its data: {@link Dictionary#setData(ByteBuffer)}. + */ +final class DictionaryData { + private static final String DATA0 = "timedownlifeleftbackcodedatashowonlysitecityopenjustlikefreeworktextyearoverbodyloveformbookplaylivelinehelphomesidemorewordlongthemviewfindpagedaysfullheadtermeachareafromtruemarkableuponhighdatelandnewsevennextcasebothpostusedmadehandherewhatnameLinkblogsizebaseheldmakemainuser') +holdendswithNewsreadweresigntakehavegameseencallpathwellplusmenufilmpartjointhislistgoodneedwayswestjobsmindalsologorichuseslastteamarmyfoodkingwilleastwardbestfirePageknowaway.pngmovethanloadgiveselfnotemuchfeedmanyrockicononcelookhidediedHomerulehostajaxinfoclublawslesshalfsomesuchzone100%onescareTimeracebluefourweekfacehopegavehardlostwhenparkkeptpassshiproomHTMLplanTypedonesavekeepflaglinksoldfivetookratetownjumpthusdarkcardfilefearstaykillthatfallautoever.comtalkshopvotedeepmoderestturnbornbandfellroseurl(skinrolecomeactsagesmeetgold.jpgitemvaryfeltthensenddropViewcopy1.0\"stopelseliestourpack.gifpastcss?graymean>rideshotlatesaidroadvar feeljohnrickportfast'UA-deadpoorbilltypeU.S.woodmust2px;Inforankwidewantwalllead[0];paulwavesure$('#waitmassarmsgoesgainlangpaid!-- lockunitrootwalkfirmwifexml\"songtest20pxkindrowstoolfontmailsafestarmapscorerainflowbabyspansays4px;6px;artsfootrealwikiheatsteptriporg/lakeweaktoldFormcastfansbankveryrunsjulytask1px;goalgrewslowedgeid=\"sets5px;.js?40pxif (soonseatnonetubezerosentreedfactintogiftharm18pxcamehillboldzoomvoideasyringfillpeakinitcost3px;jacktagsbitsrolleditknewnearironfreddiskwentsoilputs/js/holyT22:ISBNT20:adamsees

json', 'contT21: RSSloopasiamoon

soulLINEfortcartT14:

80px!--<9px;T04:mike:46ZniceinchYorkricezh:d'));puremageparatonebond:37Z_of_']);000,zh:gtankyardbowlbush:56ZJava30px\n|}\n%C3%:34ZjeffEXPIcashvisagolfsnowzh:iquer.csssickmeatmin.binddellhirepicsrent:36ZHTTP-201fotowolfEND xbox:54ZBODYdick;\n}\nexit:35Zvarsbeat'});diet999;anne}}sonyguysfuckpipe|-\n!002)ndow[1];[];\nLog salt\r\n\t\tbangtrimbath){\r\n00px\n});ko:lfeesad>\rs:// [];tollplug(){\n{\r\n .js'200pdualboat.JPG);\n}quot);\n\n');\n\r\n}\r201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037201320122011201020092008200720062005200420032002200120001999199819971996199519941993199219911990198919881987198619851984198319821981198019791978197719761975197419731972197119701969196819671966196519641963196219611960195919581957195619551954195319521951195010001024139400009999comomC!sesteestaperotodohacecadaaC1obiendC-aasC-vidacasootroforosolootracualdijosidograntipotemadebealgoquC)estonadatrespococasabajotodasinoaguapuesunosantediceluisellamayozonaamorpisoobraclicellodioshoracasiP7P0P=P0P>PP>Q\u0002P8P7P=P>P4P>Q\u0002P>P6P5P>P=P8Q\u0005P\u001DP0P5P5P1Q\u000BPP2Q\u000BP2P>P\u001DP>P>P1P\u001FP>P;P8P=P8P P$P\u001DP5P\u001CQ\u000BQ\u0002Q\u000BP\u001EP=P8Pthing.org/multiheardPowerstandtokensolid(thisbringshipsstafftriedcallsfullyfactsagentThis //-->adminegyptEvent15px;Emailtrue\"crossspentblogsbox\">notedleavechinasizesguest

robotheavytrue,sevengrandcrimesignsawaredancephase>\n\n\r\nname=diegopage swiss-->\n\n#fff;\">Log.com\"treatsheet) && 14px;sleepntentfiledja:c\u0003id=\"cName\"worseshots-box-delta\n<bears:48Z spendbakershops= \"\";php\">ction13px;brianhellosize=o=%2F joinmaybe, fjsimg\" \")[0]MTopBType\"newlyDanskczechtrailknowsfaq\">zh-cn10);\n-1\");type=bluestrulydavis.js';>\r\n\r\nform jesus100% menu.\r\n\t\r\nwalesrisksumentddingb-likteachgif\" vegasdanskeestishqipsuomisobredesdeentretodospuedeaC1osestC!tienehastaotrospartedondenuevohacerformamismomejormundoaquC-dC-assC3loayudafechatodastantomenosdatosotrassitiomuchoahoralugarmayorestoshorastenerantesfotosestaspaC-snuevasaludforosmedioquienmesespoderchileserC!vecesdecirjosC)estarventagrupohechoellostengoamigocosasnivelgentemismaairesjuliotemashaciafavorjuniolibrepuntobuenoautorabrilbuenatextomarzosaberlistaluegocC3moenerojuegoperC:haberestoynuncamujervalorfueralibrogustaigualvotoscasosguC-apuedosomosavisousteddebennochebuscafaltaeurosseriedichocursoclavecasasleC3nplazolargoobrasvistaapoyojuntotratavistocrearcampohemoscincocargopisosordenhacenC!readiscopedrocercapuedapapelmenorC:tilclarojorgecalleponertardenadiemarcasigueellassiglocochemotosmadreclaserestoniC1oquedapasarbancohijosviajepabloC)stevienereinodejarfondocanalnorteletracausatomarmanoslunesautosvillavendopesartipostengamarcollevapadreunidovamoszonasambosbandamariaabusomuchasubirriojavivirgradochicaallC-jovendichaestantalessalirsuelopesosfinesllamabuscoC)stalleganegroplazahumorpagarjuntadobleislasbolsabaC1ohablaluchaC\u0001readicenjugarnotasvalleallC!cargadolorabajoestC)gustomentemariofirmacostofichaplatahogarartesleyesaquelmuseobasespocosmitadcielochicomiedoganarsantoetapadebesplayaredessietecortecoreadudasdeseoviejodeseaaguas"domaincommonstatuseventsmastersystemactionbannerremovescrollupdateglobalmediumfilternumberchangeresultpublicscreenchoosenormaltravelissuessourcetargetspringmodulemobileswitchphotosborderregionitselfsocialactivecolumnrecordfollowtitle>eitherlengthfamilyfriendlayoutauthorcreatereviewsummerserverplayedplayerexpandpolicyformatdoublepointsseriespersonlivingdesignmonthsforcesuniqueweightpeopleenergynaturesearchfigurehavingcustomoffsetletterwindowsubmitrendergroupsuploadhealthmethodvideosschoolfutureshadowdebatevaluesObjectothersrightsleaguechromesimplenoticesharedendingseasonreportonlinesquarebuttonimagesenablemovinglatestwinterFranceperiodstrongrepeatLondondetailformeddemandsecurepassedtoggleplacesdevicestaticcitiesstreamyellowattackstreetflighthiddeninfo\">openedusefulvalleycausesleadersecretseconddamagesportsexceptratingsignedthingseffectfieldsstatesofficevisualeditorvolumeReportmuseummoviesparentaccessmostlymother\" id=\"marketgroundchancesurveybeforesymbolmomentspeechmotioninsidematterCenterobjectexistsmiddleEuropegrowthlegacymannerenoughcareeransweroriginportalclientselectrandomclosedtopicscomingfatheroptionsimplyraisedescapechosenchurchdefinereasoncorneroutputmemoryiframepolicemodelsNumberduringoffersstyleskilledlistedcalledsilvermargindeletebetterbrowselimitsGlobalsinglewidgetcenterbudgetnowrapcreditclaimsenginesafetychoicespirit-stylespreadmakingneededrussiapleaseextentScriptbrokenallowschargedividefactormember-basedtheoryconfigaroundworkedhelpedChurchimpactshouldalwayslogo\" bottomlist\">){var prefixorangeHeader.push(couplegardenbridgelaunchReviewtakingvisionlittledatingButtonbeautythemesforgotSearchanchoralmostloadedChangereturnstringreloadMobileincomesupplySourceordersviewed courseAbout island: The dialoghousesBEGIN MexicostartscentreheightaddingIslandassetsEmpireSchooleffortdirectnearlymanualSelect.\n\nOnejoinedmenu\">PhilipawardshandleimportOfficeregardskillsnationSportsdegreeweekly (e.g.behinddoctorloggedunitedbeyond-scaleacceptservedmarineFootercamera\n_form\"leavesstress\" />\r\n.gif\" onloadloaderOxfordsistersurvivlistenfemaleDesignsize=\"appealtext\">levelsthankshigherforcedanimalanyoneAfricaagreedrecentPeople
wonderpricesturned|| {};main\">inlinesundaywrap\">failedcensusminutebeaconquotes150px|estateremoteemail\"linkedright;signalformal1.htmlsignupprincefloat:.png\" forum.AccesspaperssoundsextendHeightsliderUTF-8\"& Before. WithstudioownersmanageprofitjQueryannualparamsboughtfamousgooglelongeri++) {israelsayingdecidehome\">headerensurebranchpiecesblock;statedtop\">boston.test(avatartested_countforumsschemaindex,filledsharesreaderalert(appearSubmitline\">body\">\n* TheThoughseeingjerseyNews\nSystem DavidcancertablesprovedApril reallydriveritem\">more\">boardscolorscampusfirst || [];media.guitarfinishwidth:showedOther .php\" assumelayerswilsonstoresreliefswedenCustomeasily your String\n\nWhiltaylorclear:resortfrenchthough\") + \"buyingbrandsMembername\">oppingsector5px;\">vspacepostermajor coffeemartinmaturehappenkansaslink\">Images=falsewhile hspace0& \n\nIn powerPolski-colorjordanBottomStart -count2.htmlnews\">01.jpgOnline-rightmillerseniorISBN 00,000 guidesvalue)ectionrepair.xml\" rights.html-blockregExp:hoverwithinvirginphones\rusing \n\tvar >');\n\t\n\nbahasabrasilgalegomagyarpolskisrpskiX1X/Y\u0008d8-f\u0016\u0007g.\u0000d=\u0013g9\u0001i+\u0014d?!f\u0001/d8-e\u001B=f\u0008\u0011d;,d8\u0000d8*e\u0005,e\u000F8g.!g\u0010\u0006h.:e\u001D\u001Be\u000F/d;%f\u001C\re\n!f\u00176i\u00174d8*d::d:'e\u0013\u0001h\u0007*e71d<\u0001d8\u001Af\u001F%g\u001C\u000Be7%d=\u001Ch\u0001\u0014g3;f2!f\u001C\tg=\u0011g+\u0019f\t\u0000f\u001C\th/\u0004h.:d8-e?\u0003f\u0016\u0007g+ g\u0014(f\u00087i&\u0016i!5d=\u001Ch\u0000\u0005f\n\u0000f\u001C/i\u0017.i\"\u0018g\u001B8e\u00053d8\u000Bh==f\u0010\u001Cg4\"d=?g\u0014(h=/d;6e\u001C(g:?d8;i\"\u0018h5\u0004f\u0016\u0019h'\u0006i\"\u0011e\u001B\u001Ee$\rf3(e\u0006\u000Cg=\u0011g;\u001Cf\u00146h\u0017\u000Fe\u0006\u0005e.9f\u000E(h\r\u0010e8\u0002e\u001C:f6\u0008f\u0001/g):i\u00174e\u000F\u0011e8\u0003d;\u0000d9\u0008e%=e\u000F\u000Bg\u0014\u001Ff4;e\u001B>g\t\u0007e\u000F\u0011e1\u0015e&\u0002f\u001E\u001Cf\t\u000Bf\u001C:f\u00160i\u0017;f\u001C\u0000f\u00160f\u00169e<\u000Fe\u000C\u0017d:,f\u000F\u0010d>\u001Be\u00053d:\u000Ef\u001B4e$\u001Ah?\u0019d8*g3;g;\u001Fg\u001F%i\u0001\u0013f88f\u0008\u000Fe9?e\u0011\ne\u00056d;\u0016e\u000F\u0011h!(e.\te\u0005(g,,d8\u0000d<\u001Ae\u0011\u0018h?\u001Bh!\u000Cg\u00029e\u0007;g\t\u0008f\u001D\u0003g\u00145e-\u0010d8\u0016g\u0015\u000Ch.>h.!e\u0005\rh49f\u0015\u0019h\u00022e\n e\u0005%f4;e\n(d;\u0016d;,e\u0015\u0006e\u0013\u0001e\r\u001Ae.\"g\u000E0e\u001C(d8\nf57e&\u0002d=\u0015e72g;\u000Fg\u0015\u0019h(\u0000h/&g;\u0006g$>e\u000C:g\u0019;e=\u0015f\u001C,g+\u0019i\u001C\u0000h&\u0001d;7f f\u000E%e\u001B=e.6e;:h.>f\u001C\u000Be\u000F\u000Bi\u0018\u0005h/;f3\u0015e>\u000Bd=\rg=.g;\u000Ff5\u000Ei\u0000\tf\u000B)h?\u0019f 7e=\u0013e\t\re\u0008\u0006g1;f\u000E\u0012h!\u000Ce\u001B d8:d:$f\u0018\u0013f\u001C\u0000e\u0010\u000Ei\u001F3d9\u0010d8\rh\u0003=i\u0000\u001Ah?\u0007h!\u000Cd8\u001Ag'\u0011f\n\u0000e\u000F/h\u0003=h.>e$\u0007e\u0010\u0008d=\u001Ce$'e.6g$>d<\u001Ag \u0014g)6d8\u0013d8\u001Ae\u0005(i\u0003(i!9g\u001B.h?\u0019i\u0007\u000Ch?\u0018f\u0018/e<\u0000e'\u000Bf\u0003\u0005e\u00065g\u00145h\u0004\u0011f\u0016\u0007d;6e\u0013\u0001g\t\u000Ce8.e\n)f\u0016\u0007e\u000C\u0016h5\u0004f:\u0010e$'e-&e-&d9 e\u001C0e\u001D\u0000f5\u000Fh'\u0008f\n\u0015h5\u0004e7%g(\u000Bh&\u0001f1\u0002f\u0000\u000Ed9\u0008f\u00176e\u0000\u0019e\n\u001Fh\u0003=d8;h&\u0001g\u001B.e\t\rh5\u0004h./e\u001F\u000Ee8\u0002f\u00169f3\u0015g\u00145e=1f\u000B\u001Bh\u0001\u0018e#0f\u0018\u000Ed;;d=\u0015e\u0001%e:7f\u00150f\r.g>\u000Ee\u001B=f1=h=&d;\u000Bg;\rd=\u0006f\u0018/d:$f5\u0001g\u0014\u001Fd:'f\t\u0000d;%g\u00145h/\u001Df\u0018>g$:d8\u0000d:\u001Be\r\u0015d=\rd::e\u0011\u0018e\u0008\u0006f\u001E\u0010e\u001C0e\u001B>f\u0017\u0005f88e7%e\u00057e-&g\u0014\u001Fg3;e\u0008\u0017g=\u0011e\u000F\u000Be8\u0016e-\u0010e/\u0006g \u0001i\"\u0011i\u0001\u0013f\u000E'e\u00086e\u001C0e\u000C:e\u001F:f\u001C,e\u0005(e\u001B=g=\u0011d8\ni\u0007\rh&\u0001g,,d:\u000Ce\u0016\u001Cf,\"h?\u001Be\u0005%e\u000F\u000Bf\u0003\u0005h?\u0019d:\u001Bh\u0000\u0003h/\u0015e\u000F\u0011g\u000E0e\u001F9h.-d;%d8\nf\u0014?e:\u001Cf\u0008\u0010d8:g\u000E/e\"\u0003i&\u0019f8/e\u0010\u000Cf\u00176e(1d9\u0010e\u000F\u0011i\u0000\u0001d8\u0000e.\u001Ae<\u0000e\u000F\u0011d=\u001Ce\u0013\u0001f \u0007e\u0007\u0006f,\"h?\u000Eh'#e\u00063e\u001C0f\u00169d8\u0000d8\u000Bd;%e\u000F\nh4#d;;f\u0008\u0016h\u0000\u0005e.\"f\u00087d;#h!(g'/e\u0008\u0006e%3d::f\u00150g \u0001i\u0014\u0000e\u0014.e\u0007:g\u000E0g&;g:?e:\u0014g\u0014(e\u0008\u0017h!(d8\re\u0010\u000Cg<\u0016h>\u0011g;\u001Fh.!f\u001F%h/\"d8\rh&\u0001f\u001C\te\u00053f\u001C:f\u001E\u0004e>\u0008e$\u001Af\u0012-f\u0014>g;\u0004g;\u0007f\u0014?g-\u0016g\u001B4f\u000E%h\u0003=e\n\u001Bf\u001D%f:\u0010f\u0019\u0002i\u0016\u0013g\u001C\u000Be\u00080g\u0003-i\u0017(e\u00053i\u0014.d8\u0013e\u000C:i\u001D\u001Ee88h\u000B1h/-g\u0019>e:&e8\u000Cf\u001C\u001Bg>\u000Ee%3f/\u0014h>\u0003g\u001F%h/\u0006h'\u0004e.\u001Ae;:h..i\u0003(i\u0017(f\u0004\u000Fh'\u0001g2>e=)f\u0017%f\u001C,f\u000F\u0010i+\u0018e\u000F\u0011h(\u0000f\u00169i\u001D\"e\u001F:i\u0007\u0011e$\u0004g\u0010\u0006f\u001D\u0003i\u0019\u0010e=1g\t\u0007i\u00136h!\u000Ch?\u0018f\u001C\te\u0008\u0006d:+g\t)e\u0013\u0001g;\u000Fh\u0010%f7;e\n d8\u0013e.6h?\u0019g'\rh/\u001Di\"\u0018h57f\u001D%d8\u001Ae\n!e\u0005,e\u0011\nh.0e=\u0015g.\u0000d;\u000Bh4(i\u0007\u000Fg\u00147d::e=1e\u0013\re<\u0015g\u0014(f\n%e\u0011\ni\u0003(e\u0008\u0006e?+i\u0000\u001Fe\u0012(h/\"f\u00176e0\u001Af3(f\u0004\u000Fg\u00143h/7e-&f !e:\u0014h/%e\u000E\u0006e\u000F2e\u000F*f\u0018/h?\u0014e\u001B\u001Eh4-d90e\u0010\rg'0d8:d:\u0006f\u0008\u0010e\n\u001Fh/4f\u0018\u000Ed>\u001Be:\u0014e-)e-\u0010d8\u0013i\"\u0018g(\u000Be:\u000Fd8\u0000h\u0008,f\u001C\u0003e\u0013!e\u000F*f\u001C\te\u00056e.\u0003d?\u001Df\n$h\u0000\u000Cd8\u0014d;\ne$)g*\u0017e\u000F#e\n(f\u0000\u0001g\n6f\u0000\u0001g\t9e\u0008+h.$d8:e?\u0005i!;f\u001B4f\u00160e0\u000Fh/4f\u0008\u0011e\u0000\u0011d=\u001Cd8:e*\u0012d=\u0013e\u000C\u0005f\u000B,i\u0002#d9\u0008d8\u0000f 7e\u001B=e\u0006\u0005f\u0018/e\u0010&f 9f\r.g\u00145h'\u0006e-&i\u0019\"e\u00057f\u001C\th?\u0007g(\u000Bg\u00141d:\u000Ed::f\t\re\u0007:f\u001D%d8\rh?\u0007f-#e\u001C(f\u0018\u000Ef\u0018\u001Ff\u0015\u0005d:\u000Be\u00053g3;f \u0007i\"\u0018e\u0015\u0006e\n!h>\u0013e\u0005%d8\u0000g\u001B4e\u001F:g!\u0000f\u0015\u0019e-&d:\u0006h'#e;:g-\u0011g;\u0013f\u001E\u001Ce\u0005(g\u0010\u0003i\u0000\u001Ag\u001F%h.!e\u0008\u0012e/9d:\u000Eh\t:f\u001C/g\u001B8e\u0006\u000Ce\u000F\u0011g\u0014\u001Fg\u001C\u001Fg\u001A\u0004e;:g+\u000Bg-\tg:'g1;e\u001E\u000Bg;\u000Fi*\u000Ce.\u001Eg\u000E0e\u00086d=\u001Cf\u001D%h\u0007*f \u0007g->d;%d8\u000Be\u000E\u001Fe\u0008\u001Bf\u0017 f3\u0015e\u00056d8-e\u0000\u000Bd::d8\u0000e\u0008\u0007f\u000C\u0007e\r\u0017e\u00053i\u0017-i\u001B\u0006e\u001B\"g,,d8\te\u00053f3(e\u001B f-$g\u0005'g\t\u0007f71e\u001C3e\u0015\u0006d8\u001Ae9?e7\u001Ef\u0017%f\u001C\u001Fi+\u0018g:'f\u001C\u0000h?\u0011g;\u0011h!\u000Cd8:d:$i\u0000\u001Ah/\u0004d;7h'\te>\u0017g2>e\r\u000Ee.6e:-e.\u000Cf\u0008\u0010f\u0004\u001Fh'\te.\th#\u0005e>\u0017e\u00080i\u0002.d;6e\u00086e:&i#\u001Fe\u0013\u0001h\u0019=g\u00046h=,h==f\n%d;7h.0h\u0000\u0005f\u00169f!\u0008h!\u000Cf\u0014?d::f0\u0011g\u0014(e\u0013\u0001d8\u001Ch%?f\u000F\u0010e\u0007:i\u0005\u0012e:\u0017g\u00046e\u0010\u000Ed;\u0018f,>g\u0003-g\u00029d;%e\t\re.\u000Ce\u0005(e\u000F\u0011e8\u0016h.>g=.i\"\u0006e/g%\u001Eh\u000E7e>\u0017e\u0008)g\u0014(g;'g;-d= d;,h?\u0019d9\u0008f(!e<\u000Fh/-h(\u0000h\u0003=e$\u001Fi\u001B\u0005h\u0019\u000Ef\u0013\rd=\u001Ci#\u000Ef d9&f\u001C\tf\u0015\u0008f5\u000Bh/\u0015g';e\n(f\t\rh\u0003=e\u00063e.\u001Ah\u0002!g%(d8\rf\u0016-i\u001C\u0000f1\u0002d8\re>\u0017e\n\u001Ef3\u0015d9\u000Bi\u00174i\u0007\u0007g\u0014(h\u0010%i\u0014\u0000f\n\u0015h/\tg\u001B.f \u0007g\u00081f\u0003\u0005f\u0011\u0004e=1f\u001C\td:\u001Bh$\u0007h#=f\u0016\u0007e-&f\u001C:d<\u001Af\u00150e-\u0017h#\u0005d?.h4-g\t)e\u0006\u001Cf\u001D\u0011e\u0005(i\u001D\"g2>e\u0013\u0001e\u00056e.\u001Ed:\u000Bf\u0003\u0005f04e93f\u000F\u0010g$:d8\ne8\u0002h0\"h0\"f\u0019.i\u0000\u001Af\u0015\u0019e8\u0008d8\nd< g1;e\u0008+f-\u000Cf\u001B2f\u000B%f\u001C\te\u0008\u001Bf\u00160i\u0005\rd;6e\u000F*h&\u0001f\u00176d;#h3\u0007h(\nh>>e\u00080d::g\u0014\u001Fh.\"i\u0018\u0005h\u0000\u0001e8\u0008e1\u0015g$:e?\u0003g\u0010\u0006h44e-\u0010g62g+\u0019d8;i!\u000Ch\u0007*g\u00046g:'e\u0008+g.\u0000e\r\u0015f\u00149i\u001D)i\u0002#d:\u001Bf\u001D%h/4f\t\u0013e<\u0000d;#g \u0001e\u0008 i\u0019$h/\u0001e\u00088h\n\u0002g\u001B.i\u0007\rg\u00029f,!f\u00158e$\u001Ae0\u0011h'\u0004e\u0008\u0012h5\u0004i\u0007\u0011f\t>e\u00080d;%e\u0010\u000Ee$'e\u0005(d8;i!5f\u001C\u0000d=3e\u001B\u001Eg-\u0014e$)d8\u000Bd?\u001Di\u001A\u001Cg\u000E0d;#f#\u0000f\u001F%f\n\u0015g%(e0\u000Ff\u00176f2\u0012f\u001C\tf-#e88g\u0014\u001Ah\u00073d;#g\u0010\u0006g\u001B.e=\u0015e\u0005,e<\u0000e$\re\u00086i\u0007\u0011h\u001E\re98g&\u000Fg\t\u0008f\u001C,e=\"f\u0008\u0010e\u0007\u0006e$\u0007h!\u000Cf\u0003\u0005e\u001B\u001Ee\u00080f\u0000\u001Df\u00033f\u0000\u000Ef 7e\r\u000Fh..h.$h/\u0001f\u001C\u0000e%=d:'g\u0014\u001Ff\u000C\tg\u0005'f\u001C\rh#\u0005e9?d8\u001Ce\n(f<+i\u0007\u0007h4-f\u00160f\t\u000Bg;\u0004e\u001B>i\u001D\"f\u001D?e\u000F\u0002h\u0000\u0003f\u0014?f2;e.9f\u0018\u0013e$)e\u001C0e\n*e\n\u001Bd::d;,e\r\u0007g:'i\u0000\u001Fe:&d::g\t)h0\u0003f\u00154f5\u0001h!\u000Ci\u0000 f\u0008\u0010f\u0016\u0007e-\u0017i\u001F)e\u001B=h48f\u0018\u0013e<\u0000e1\u0015g\u001B8i\u0017\u001Ch!(g\u000E0e=1h'\u0006e&\u0002f-$g>\u000Ee.9e$'e0\u000Ff\n%i\u0001\u0013f\u001D!f,>e?\u0003f\u0003\u0005h.8e$\u001Af3\u0015h'\u0004e.6e1\u0005d9&e:\u0017h?\u001Ef\u000E%g+\u000Be\r3d8>f\n%f\n\u0000e7'e%%h?\u0010g\u0019;e\u0005%d;%f\u001D%g\u0010\u0006h.:d:\u000Bd;6h\u0007*g\u00141d8-e\r\u000Ee\n\u001Ee\u0005,e&\u0008e&\u0008g\u001C\u001Ff-#d8\ri\u0014\u0019e\u0005(f\u0016\u0007e\u0010\u0008e\u0010\u000Cd;7e\u0000e7&e\u000F3h\u0002!d;=g-\u0014f!\u0008e.\u001Ei\u0019\u0005g\u00145d?!g;\u000Fg\u0010\u0006g\u0014\u001Fe\u0011=e.#d< d;;e\n!f-#e<\u000Fg\t9h\t2d8\u000Bf\u001D%e\r\u000Fd<\u001Ae\u000F*h\u0003=e=\u0013g\u00046i\u0007\rf\u00160e\u0005'e.9f\u000C\u0007e/g(\u000Be\u000C;g\u0016\u0017g;\u000Fh?\u0007h?\u0007e\u000E;d9\u000Be\t\rf\u00146e\u0005%e94e:&f\u001D\u0002e?\u0017g>\u000Ed8=f\u001C\u0000i+\u0018g\u0019;i\u0019\u0006f\u001C*f\u001D%e\n e7%e\u0005\rh4#f\u0015\u0019g(\u000Bg\t\u0008e\u001D\u0017h:+d=\u0013i\u0007\re:\u0006e\u0007:e\u0014.f\u0008\u0010f\u001C,e=\"e<\u000Fe\u001C\u001Fh1\u0006e\u0007:e\u00039d8\u001Cf\u00169i\u0002.g.1e\r\u0017d:,f1\u0002h\u0001\u000Ce\u000F\u0016e>\u0017h\u0001\u000Cd=\rg\u001B8d?!i!5i\u001D\"e\u0008\u0006i\u0012\u001Fg=\u0011i!5g!.e.\u001Ae\u001B>d>\u000Bg=\u0011e\u001D\u0000g'/f\u001E\u0001i\u0014\u0019h//g\u001B.g\u001A\u0004e.\u001Dh4\u001Df\u001C:e\u00053i#\u000Ei\u0019)f\u000E\u0008f\u001D\u0003g\u0017\u0005f/\u0012e. g\t)i\u0019$d:\u0006h)\u0015h+\u0016g\u0016>g\u0017\u0005e\u000F\nf\u00176f1\u0002h4-g+\u0019g\u00029e\u0004?g+%f/\u000Fe$)d8-e$.h.$h/\u0006f/\u000Fd8*e$)f4%e-\u0017d=\u0013e\u000F0g\u0001#g;4f\n$f\u001C,i!5d8*f\u0000'e.\u0018f\u00169e88h'\u0001g\u001B8f\u001C:f\u0008\u0018g\u0015%e:\u0014e=\u0013e>\u000Be8\u0008f\u00169d>?f !e\u001B-h\u0002!e8\u0002f\u0008?e1\u000Bf \u000Fg\u001B.e\u0011\u0018e7%e/\u000Ee\u0005\u0003e<\u0015h57f\u00149e\u000F\u0018g,,e\u001B\u001Bd<\u001Ah.!h**f\u0018\u000Ei\u001A\u0010g'\u0001e.\u001De.\u001Dh'\u0004h\u000C\u0003f6\u0008h49e\u00051e\u0010\u000Ce?\u0018h.0d=\u0013g3;e8&f\u001D%e\u0010\re-\u0017g\u0019e\n g\u001B\u001Fe\u000F\u0017e\u00080d:\u000Cf\t\u000Be$'i\u0007\u000Ff\u0008\u0010d::f\u00150i\u0007\u000Fe\u00051d:+e\u000C:e\u001F\u001Fe%3e-)e\u000E\u001Fe\u0008\u0019f\t\u0000e\u001C(g;\u0013f\u001D\u001Fi\u0000\u001Ad?!h6\u0005g:'i\u0005\rg=.e=\u0013f\u00176d<\u0018g'\u0000f\u0000'f\u0004\u001Ff\u0008?d:'i\u0001\nf\u00082e\u0007:e\u000F#f\u000F\u0010d:$e01d8\u001Ad?\u001De\u0001%g(\u000Be:&e\u000F\u0002f\u00150d:\u000Bd8\u001Af\u00154d8*e11d8\u001Cf\u0003\u0005f\u0004\u001Fg\t9f.\ne\u0008\u0006i!\u001Ef\u0010\u001Ce0\u000Be1\u001Ed:\u000Ei\u0017(f\u00087h4\"e\n!e#0i\u001F3e\u000F\ne\u00056h4\"g;\u000Fe\u001D\u001Af\u000C\u0001e92i\u0003(f\u0008\u0010g+\u000Be\u0008)g\u001B\nh\u0000\u0003h\u0019\u0011f\u0008\u0010i\u0003=e\u000C\u0005h#\u0005g\u0014(f\u00086f/\u0014h5\u001Bf\u0016\u0007f\u0018\u000Ef\u000B\u001Be\u0015\u0006e.\u000Cf\u00154g\u001C\u001Ff\u0018/g\u001Ce/\u0006g\"\u000Ei#\u001Fg;?h\t2g(3e.\u001Ag;\u0008d:\u000Eg\u0014\u001Fg\t)d>\u001Bf1\u0002f\u0010\u001Cg\u000B\u0010e\n\u001Bi\u0007\u000Fd8%i\u0007\rf08h?\u001Ce\u0006\u0019g\u001C\u001Ff\u001C\ti\u0019\u0010g+\u001Ed:\te/9h1!h49g\u0014(d8\re%=g;\u001De/9e\r\u0001e\u0008\u0006d?\u0003h?\u001Bg\u00029h/\u0004e=1i\u001F3d<\u0018e\n?d8\re0\u0011f,#h5\u000Fe96d8\u0014f\u001C\tg\u00029f\u00169e\u0010\u0011e\u0005(f\u00160d?!g\u0014(h.>f\u0016=e=\"h1!h5\u0004f \u000Ee\u0015\u0006e\u001F\u000Eg;\u001Fd8\u0000e\u0007:g\t\u0008f\t\u0013i\u0000 g\u0014\"e\u0013\u0001f&\u0002e\u00065g\u0014(d:\u000Ed?\u001Dg\u0015\u0019e\u001B g4 d8-e\u001C\u000Be-\u0018e\u0002(h44e\u001B>f\u001C\u0000f\u0004\u001Bi\u0015?f\u001C\u001Fe\u000F#d;7g\u0010\u0006h4\"e\u001F:e\u001C0e.\tf\u000E\u0012f-&f1\ti\u0007\u000Ci\u001D\"e\u0008\u001Be;:e$)g):i&\u0016e\u0005\u0008e.\u000Ce\u0016\u0004i)1e\n(d8\u000Bi\u001D\"d8\re\u0006\rh/\u001Ad?!f\u0004\u000Fd9\ti\u00183e\u0005\th\u000B1e\u001B=f<\u0002d:.e\u0006\u001Bd:\u000Bg\u000E)e.6g>$d<\u0017e\u0006\u001Cf0\u0011e\r3e\u000F/e\u0010\rg(1e.6e\u00057e\n(g\u0014;f\u00033e\u00080f3(f\u0018\u000Ee0\u000Fe-&f\u0000'h\u0003=h\u0000\u0003g \u0014g!,d;6h'\u0002g\u001C\u000Bf8\u0005f%\u001Af\u0010\u001Eg,\u0011i&\u0016i \u0001i;\u0004i\u0007\u0011i\u0000\u0002g\u0014(f1\u001Fh\u000B\u000Fg\u001C\u001Fe.\u001Ed8;g.!i\u00186f.5h(;e\u0006\ng?;h/\u0011f\u001D\u0003e\u0008)e\u0001\u001Ae%=d<P:P0P:P8P;P8Q\rQ\u0002P>P2Q\u0001P5P5P3P>P?Q\u0000P8Q\u0002P0P:P5Q\tP5Q\u0003P6P5P\u001AP0P:P1P5P7P1Q\u000BP;P>P=P8P\u0012Q\u0001P5P?P>P4P-Q\u0002P>Q\u0002P>PP=P0P3P4P5PP3P>P4P2P>Q\u0002Q\u0002P0PP2P0Q\u0001P2P0PQ\u0002Q\u0003Q\u0002P=P0P4P4P=Q\u000FP\u0012P>Q\u0002Q\u0002Q\u0000P8P=P5P9P\u0012P0Q\u0001P=P8PQ\u0002Q\u0000Q\u0003P1P\u001EP=P8PPP9P4P2P5P>P=P>Q\u0001Q\u0003P4`$\u0015`%\u0007`$9`%\u0008`$\u0015`%\u0000`$8`%\u0007`$\u0015`$>`$\u0015`%\u000B`$\u0014`$0`$*`$0`$(`%\u0007`$\u000F`$\u0015`$\u0015`$?`$-`%\u0000`$\u0007`$8`$\u0015`$0`$$`%\u000B`$9`%\u000B`$\u0006`$*`$9`%\u0000`$/`$9`$/`$>`$$`$\u0015`$%`$>jagran`$\u0006`$\u001C`$\u001C`%\u000B`$\u0005`$,`$&`%\u000B`$\u0017`$\u0008`$\u001C`$>`$\u0017`$\u000F`$9`$.`$\u0007`$(`$5`$9`$/`%\u0007`$%`%\u0007`$%`%\u0000`$\u0018`$0`$\u001C`$,`$&`%\u0000`$\u0015`$\u0008`$\u001C`%\u0000`$5`%\u0007`$(`$\u0008`$(`$\u000F`$9`$0`$\t`$8`$.`%\u0007`$\u0015`$.`$5`%\u000B`$2`%\u0007`$8`$,`$.`$\u0008`$&`%\u0007`$\u0013`$0`$\u0006`$.`$,`$8`$-`$0`$,`$(`$\u001A`$2`$.`$(`$\u0006`$\u0017`$8`%\u0000`$2`%\u0000X9Y\u0004Y\tX%Y\u0004Y\tY\u0007X0X'X\"X.X1X9X/X/X'Y\u0004Y\tY\u0007X0Y\u0007X5Y\u0008X1X:Y\nX1Y\u0003X'Y\u0006Y\u0008Y\u0004X'X(Y\nY\u0006X9X1X6X0Y\u0004Y\u0003Y\u0007Y\u0006X'Y\nY\u0008Y\u0005Y\u0002X'Y\u0004X9Y\u0004Y\nX'Y\u0006X'Y\u0004Y\u0003Y\u0006X-X*Y\tY\u0002X(Y\u0004Y\u0008X-X)X'X.X1Y\u0001Y\u0002X7X9X(X/X1Y\u0003Y\u0006X%X0X'Y\u0003Y\u0005X'X'X-X/X%Y\u0004X'Y\u0001Y\nY\u0007X(X9X6Y\u0003Y\nY\u0001X(X-X+Y\u0008Y\u0005Y\u0006Y\u0008Y\u0007Y\u0008X#Y\u0006X'X,X/X'Y\u0004Y\u0007X'X3Y\u0004Y\u0005X9Y\u0006X/Y\u0004Y\nX3X9X(X1X5Y\u0004Y\tY\u0005Y\u0006X0X(Y\u0007X'X#Y\u0006Y\u0007Y\u0005X+Y\u0004Y\u0003Y\u0006X*X'Y\u0004X'X-Y\nX+Y\u0005X5X1X4X1X-X-Y\u0008Y\u0004Y\u0008Y\u0001Y\nX'X0X'Y\u0004Y\u0003Y\u0004Y\u0005X1X)X'Y\u0006X*X'Y\u0004Y\u0001X#X(Y\u0008X.X'X5X#Y\u0006X*X'Y\u0006Y\u0007X'Y\u0004Y\nX9X6Y\u0008Y\u0008Y\u0002X/X'X(Y\u0006X.Y\nX1X(Y\u0006X*Y\u0004Y\u0003Y\u0005X4X'X!Y\u0008Y\u0007Y\nX'X(Y\u0008Y\u0002X5X5Y\u0008Y\u0005X'X1Y\u0002Y\u0005X#X-X/Y\u0006X-Y\u0006X9X/Y\u0005X1X#Y\nX'X-X)Y\u0003X*X(X/Y\u0008Y\u0006Y\nX,X(Y\u0005Y\u0006Y\u0007X*X-X*X,Y\u0007X)X3Y\u0006X)Y\nX*Y\u0005Y\u0003X1X)X:X2X)Y\u0006Y\u0001X3X(Y\nX*Y\u0004Y\u0004Y\u0007Y\u0004Y\u0006X'X*Y\u0004Y\u0003Y\u0002Y\u0004X(Y\u0004Y\u0005X'X9Y\u0006Y\u0007X#Y\u0008Y\u0004X4Y\nX!Y\u0006Y\u0008X1X#Y\u0005X'Y\u0001Y\nY\u0003X(Y\u0003Y\u0004X0X'X*X1X*X(X(X#Y\u0006Y\u0007Y\u0005X3X'Y\u0006Y\u0003X(Y\nX9Y\u0001Y\u0002X/X-X3Y\u0006Y\u0004Y\u0007Y\u0005X4X9X1X#Y\u0007Y\u0004X4Y\u0007X1Y\u0002X7X1X7Y\u0004X(profileservicedefaulthimselfdetailscontentsupportstartedmessagesuccessfashioncountryaccountcreatedstoriesresultsrunningprocesswritingobjectsvisiblewelcomearticleunknownnetworkcompanydynamicbrowserprivacyproblemServicerespectdisplayrequestreservewebsitehistoryfriendsoptionsworkingversionmillionchannelwindow.addressvisitedweathercorrectproductedirectforwardyou canremovedsubjectcontrolarchivecurrentreadinglibrarylimitedmanagerfurthersummarymachineminutesprivatecontextprogramsocietynumberswrittenenabledtriggersourcesloadingelementpartnerfinallyperfectmeaningsystemskeepingculture",journalprojectsurfaces"expiresreviewsbalanceEnglishContentthroughPlease opinioncontactaverageprimaryvillageSpanishgallerydeclinemeetingmissionpopularqualitymeasuregeneralspeciessessionsectionwriterscounterinitialreportsfiguresmembersholdingdisputeearlierexpressdigitalpictureAnothermarriedtrafficleadingchangedcentralvictoryimages/reasonsstudiesfeaturelistingmust beschoolsVersionusuallyepisodeplayinggrowingobviousoverlaypresentactions</ul>\r\nwrapperalreadycertainrealitystorageanotherdesktopofferedpatternunusualDigitalcapitalWebsitefailureconnectreducedAndroiddecadesregular & animalsreleaseAutomatgettingmethodsnothingPopularcaptionletterscapturesciencelicensechangesEngland=1&History = new CentralupdatedSpecialNetworkrequirecommentwarningCollegetoolbarremainsbecauseelectedDeutschfinanceworkersquicklybetweenexactlysettingdiseaseSocietyweaponsexhibit<!--Controlclassescoveredoutlineattacksdevices(windowpurposetitle=\"Mobile killingshowingItaliandroppedheavilyeffects-1']);\nconfirmCurrentadvancesharingopeningdrawingbillionorderedGermanyrelated</form>includewhetherdefinedSciencecatalogArticlebuttonslargestuniformjourneysidebarChicagoholidayGeneralpassage,"animatefeelingarrivedpassingnaturalroughly.\n\nThe but notdensityBritainChineselack oftributeIreland\" data-factorsreceivethat isLibraryhusbandin factaffairsCharlesradicalbroughtfindinglanding:lang=\"return leadersplannedpremiumpackageAmericaEdition]"Messageneed tovalue=\"complexlookingstationbelievesmaller-mobilerecordswant tokind ofFirefoxyou aresimilarstudiedmaximumheadingrapidlyclimatekingdomemergedamountsfoundedpioneerformuladynastyhow to SupportrevenueeconomyResultsbrothersoldierlargelycalling."AccountEdward segmentRobert effortsPacificlearnedup withheight:we haveAngelesnations_searchappliedacquiremassivegranted: falsetreatedbiggestbenefitdrivingStudiesminimumperhapsmorningsellingis usedreversevariant role=\"missingachievepromotestudentsomeoneextremerestorebottom:evolvedall thesitemapenglishway to AugustsymbolsCompanymattersmusicalagainstserving})();\r\npaymenttroubleconceptcompareparentsplayersregionsmonitor ''The winningexploreadaptedGalleryproduceabilityenhancecareers). The collectSearch ancientexistedfooter handlerprintedconsoleEasternexportswindowsChannelillegalneutralsuggest_headersigning.html\">settledwesterncausing-webkitclaimedJusticechaptervictimsThomas mozillapromisepartieseditionoutside:false,hundredOlympic_buttonauthorsreachedchronicdemandssecondsprotectadoptedprepareneithergreatlygreateroverallimprovecommandspecialsearch.worshipfundingthoughthighestinsteadutilityquarterCulturetestingclearlyexposedBrowserliberal} catchProjectexamplehide();FloridaanswersallowedEmperordefenseseriousfreedomSeveral-buttonFurtherout of != nulltrainedDenmarkvoid(0)/all.jspreventRequestStephen\n\nWhen observe</h2>\r\nModern provide\" alt=\"borders.\n\nFor \n\nMany artistspoweredperformfictiontype ofmedicalticketsopposedCouncilwitnessjusticeGeorge Belgium...</a>twitternotablywaitingwarfare Other rankingphrasesmentionsurvivescholar</p>\r\n Countryignoredloss ofjust asGeorgiastrange<head><stopped1']);\r\nislandsnotableborder:list ofcarried100,000</h3>\n severalbecomesselect wedding00.htmlmonarchoff theteacherhighly biologylife ofor evenrise of»plusonehunting(thoughDouglasjoiningcirclesFor theAncientVietnamvehiclesuch ascrystalvalue =Windowsenjoyeda smallassumed<a id=\"foreign All rihow theDisplayretiredhoweverhidden;battlesseekingcabinetwas notlook atconductget theJanuaryhappensturninga:hoverOnline French lackingtypicalextractenemieseven ifgeneratdecidedare not/searchbeliefs-image:locatedstatic.login\">convertviolententeredfirst\">circuitFinlandchemistshe was10px;\">as suchdivided</span>will beline ofa greatmystery/index.fallingdue to railwaycollegemonsterdescentit withnuclearJewish protestBritishflowerspredictreformsbutton who waslectureinstantsuicidegenericperiodsmarketsSocial fishingcombinegraphicwinners<br /><by the NaturalPrivacycookiesoutcomeresolveSwedishbrieflyPersianso muchCenturydepictscolumnshousingscriptsnext tobearingmappingrevisedjQuery(-width:title\">tooltipSectiondesignsTurkishyounger.match(})();\n\nburningoperatedegreessource=Richardcloselyplasticentries</tr>\r\ncolor:#ul id=\"possessrollingphysicsfailingexecutecontestlink toDefault<br />\n: true,chartertourismclassicproceedexplain</h1>\r\nonline.?xml vehelpingdiamonduse theairlineend -->).attr(readershosting#ffffffrealizeVincentsignals src=\"/ProductdespitediversetellingPublic held inJoseph theatreaffects<style>a largedoesn'tlater, ElementfaviconcreatorHungaryAirportsee theso thatMichaelSystemsPrograms, and width=e"tradingleft\">\npersonsGolden Affairsgrammarformingdestroyidea ofcase ofoldest this is.src = cartoonregistrCommonsMuslimsWhat isin manymarkingrevealsIndeed,equally/show_aoutdoorescape(Austriageneticsystem,In the sittingHe alsoIslandsAcademy\n\t\t<!--Daniel bindingblock\">imposedutilizeAbraham(except{width:putting).html(|| [];\nDATA[ *kitchenmountedactual dialectmainly _blank'installexpertsif(typeIt also© \">Termsborn inOptionseasterntalkingconcerngained ongoingjustifycriticsfactoryits ownassaultinvitedlastinghis ownhref=\"/\" rel=\"developconcertdiagramdollarsclusterphp?id=alcohol);})();using a><span>vesselsrevivalAddressamateurandroidallegedillnesswalkingcentersqualifymatchesunifiedextinctDefensedied in\n\t<!-- customslinkingLittle Book ofeveningmin.js?are thekontakttoday's.html\" target=wearingAll Rig;\n})();raising Also, crucialabout\">declare-->\n<scfirefoxas muchappliesindex, s, but type = \n\r\n<!--towardsRecordsPrivateForeignPremierchoicesVirtualreturnsCommentPoweredinline;povertychamberLiving volumesAnthonylogin\" RelatedEconomyreachescuttinggravitylife inChapter-shadowNotable</td>\r\n returnstadiumwidgetsvaryingtravelsheld bywho arework infacultyangularwho hadairporttown of\n\nSome 'click'chargeskeywordit willcity of(this);Andrew unique checkedor more300px; return;rsion=\"pluginswithin herselfStationFederalventurepublishsent totensionactresscome tofingersDuke ofpeople,exploitwhat isharmonya major\":\"httpin his menu\">\nmonthlyofficercouncilgainingeven inSummarydate ofloyaltyfitnessand wasemperorsupremeSecond hearingRussianlongestAlbertalateralset of small\">.appenddo withfederalbank ofbeneathDespiteCapitalgrounds), and percentit fromclosingcontainInsteadfifteenas well.yahoo.respondfighterobscurereflectorganic= Math.editingonline paddinga wholeonerroryear ofend of barrierwhen itheader home ofresumedrenamedstrong>heatingretainscloudfrway of March 1knowingin partBetweenlessonsclosestvirtuallinks\">crossedEND -->famous awardedLicenseHealth fairly wealthyminimalAfricancompetelabel\">singingfarmersBrasil)discussreplaceGregoryfont copursuedappearsmake uproundedboth ofblockedsaw theofficescoloursif(docuwhen heenforcepush(fuAugust UTF-8\">Fantasyin mostinjuredUsuallyfarmingclosureobject defenceuse of Medical<body>\nevidentbe usedkeyCodesixteenIslamic#000000entire widely active (typeofone cancolor =speakerextendsPhysicsterrain<tbody>funeralviewingmiddle cricketprophetshifteddoctorsRussell targetcompactalgebrasocial-bulk ofman and</td>\n he left).val()false);logicalbankinghome tonaming Arizonacredits);\n});\nfounderin turnCollinsbefore But thechargedTitle\">CaptainspelledgoddessTag -->Adding:but wasRecent patientback in=false&Lincolnwe knowCounterJudaismscript altered']);\n has theunclearEvent',both innot all\n\n<!-- placinghard to centersort ofclientsstreetsBernardassertstend tofantasydown inharbourFreedomjewelry/about..searchlegendsis mademodern only ononly toimage\" linear painterand notrarely acronymdelivershorter00&as manywidth=\"/* <![Ctitle =of the lowest picked escapeduses ofpeoples PublicMatthewtacticsdamagedway forlaws ofeasy to windowstrong simple}catch(seventhinfoboxwent topaintedcitizenI don'tretreat. Some ww.\");\nbombingmailto:made in. Many carries||{};wiwork ofsynonymdefeatsfavoredopticalpageTraunless sendingleft\"><comScorAll thejQuery.touristClassicfalse\" Wilhelmsuburbsgenuinebishops.split(global followsbody ofnominalContactsecularleft tochiefly-hidden-banner</li>\n\n. When in bothdismissExplorealways via thespaC1olwelfareruling arrangecaptainhis sonrule ofhe tookitself,=0&(calledsamplesto makecom/pagMartin Kennedyacceptsfull ofhandledBesides//--></able totargetsessencehim to its by common.mineralto takeways tos.org/ladvisedpenaltysimple:if theyLettersa shortHerbertstrikes groups.lengthflightsoverlapslowly lesser social </p>\n\t\tit intoranked rate oful>\r\n attemptpair ofmake itKontaktAntoniohaving ratings activestreamstrapped\").css(hostilelead tolittle groups,Picture-->\r\n\r\n rows=\" objectinverse<footerCustomV><\\/scrsolvingChamberslaverywoundedwhereas!= 'undfor allpartly -right:Arabianbacked centuryunit ofmobile-Europe,is homerisk ofdesiredClintoncost ofage of become none ofp"Middle ead')[0Criticsstudios>©group\">assemblmaking pressedwidget.ps:\" ? rebuiltby someFormer editorsdelayedCanonichad thepushingclass=\"but arepartialBabylonbottom carrierCommandits useAs withcoursesa thirddenotesalso inHouston20px;\">accuseddouble goal ofFamous ).bind(priests Onlinein Julyst + \"gconsultdecimalhelpfulrevivedis veryr'+'iptlosing femalesis alsostringsdays ofarrivalfuture <objectforcingString(\" />\n\t\there isencoded. The balloondone by/commonbgcolorlaw of Indianaavoidedbut the2px 3pxjquery.after apolicy.men andfooter-= true;for usescreen.Indian image =family,http://  driverseternalsame asnoticedviewers})();\n is moreseasonsformer the newis justconsent Searchwas thewhy theshippedbr><br>width: height=made ofcuisineis thata very Admiral fixed;normal MissionPress, ontariocharsettry to invaded=\"true\"spacingis mosta more totallyfall of});\r\n immensetime inset outsatisfyto finddown tolot of Playersin Junequantumnot thetime todistantFinnishsrc = (single help ofGerman law andlabeledforestscookingspace\">header-well asStanleybridges/globalCroatia About [0];\n it, andgroupedbeing a){throwhe madelighterethicalFFFFFF\"bottom\"like a employslive inas seenprintermost ofub-linkrejectsand useimage\">succeedfeedingNuclearinformato helpWomen'sNeitherMexicanprotein<table by manyhealthylawsuitdevised.push({sellerssimply Through.cookie Image(older\">us.js\"> Since universlarger open to!-- endlies in']);\r\n marketwho is (\"DOMComanagedone fortypeof Kingdomprofitsproposeto showcenter;made itdressedwere inmixtureprecisearisingsrc = 'make a securedBaptistvoting \n\t\tvar March 2grew upClimate.removeskilledway the</head>face ofacting right\">to workreduceshas haderectedshow();action=book ofan area== \"htt<header\n<html>conformfacing cookie.rely onhosted .customhe wentbut forspread Family a meansout theforums.footage\">MobilClements\" id=\"as highintense--><!--female is seenimpliedset thea stateand hisfastestbesidesbutton_bounded\"><img Infoboxevents,a youngand areNative cheaperTimeoutand hasengineswon the(mostlyright: find a -bottomPrince area ofmore ofsearch_nature,legallyperiod,land ofor withinducedprovingmissilelocallyAgainstthe wayk"px;\">\r\npushed abandonnumeralCertainIn thismore inor somename isand, incrownedISBN 0-createsOctobermay notcenter late inDefenceenactedwish tobroadlycoolingonload=it. TherecoverMembersheight assumes<html>\npeople.in one =windowfooter_a good reklamaothers,to this_cookiepanel\">London,definescrushedbaptismcoastalstatus title\" move tolost inbetter impliesrivalryservers SystemPerhapses and contendflowinglasted rise inGenesisview ofrising seem tobut in backinghe willgiven agiving cities.flow of Later all butHighwayonly bysign ofhe doesdiffersbattery&lasinglesthreatsintegertake onrefusedcalled =US&See thenativesby thissystem.head of:hover,lesbiansurnameand allcommon/header__paramsHarvard/pixel.removalso longrole ofjointlyskyscraUnicodebr />\r\nAtlantanucleusCounty,purely count\">easily build aonclicka givenpointerh"events else {\nditionsnow the, with man whoorg/Webone andcavalryHe diedseattle00,000 {windowhave toif(windand itssolely m"renewedDetroitamongsteither them inSenatorUs</a><King ofFrancis-produche usedart andhim andused byscoringat hometo haverelatesibilityfactionBuffalolink\"><what hefree toCity ofcome insectorscountedone daynervoussquare };if(goin whatimg\" alis onlysearch/tuesdaylooselySolomonsexual - <a hrmedium\"DO NOT France,with a war andsecond take a >\r\n\r\n\r\nmarket.highwaydone inctivity\"last\">obligedrise to\"undefimade to Early praisedin its for hisathleteJupiterYahoo! termed so manyreally s. The a woman?value=direct right\" bicycleacing=\"day andstatingRather,higher Office are nowtimes, when a pay foron this-link\">;borderaround annual the Newput the.com\" takin toa brief(in thegroups.; widthenzymessimple in late{returntherapya pointbanninginks\">\n();\" rea place\\u003Caabout atr>\r\n\t\tccount gives a<SCRIPTRailwaythemes/toolboxById(\"xhumans,watchesin some if (wicoming formats Under but hashanded made bythan infear ofdenoted/iframeleft involtagein eacha"base ofIn manyundergoregimesaction </p>\r\n<ustomVa;></importsor thatmostly &re size=\"</a></ha classpassiveHost = WhetherfertileVarious=[];(fucameras/></td>acts asIn some>\r\n\r\n<!organis <br />BeijingcatalC deutscheuropeueuskaragaeilgesvenskaespaC1amensajeusuariotrabajomC)xicopC!ginasiempresistemaoctubreduranteaC1adirempresamomentonuestroprimeratravC)sgraciasnuestraprocesoestadoscalidadpersonanC:meroacuerdomC:sicamiembroofertasalgunospaC-sesejemploderechoademC!sprivadoagregarenlacesposiblehotelessevillaprimeroC:ltimoeventosarchivoculturamujeresentradaanuncioembargomercadograndesestudiomejoresfebrerodiseC1oturismocC3digoportadaespaciofamiliaantoniopermiteguardaralgunaspreciosalguiensentidovisitastC-tuloconocersegundoconsejofranciaminutossegundatenemosefectosmC!lagasesiC3nrevistagranadacompraringresogarcC-aacciC3necuadorquienesinclusodeberC!materiahombresmuestrapodrC-amaC1anaC:ltimaestamosoficialtambienningC:nsaludospodemosmejorarpositionbusinesshomepagesecuritylanguagestandardcampaignfeaturescategoryexternalchildrenreservedresearchexchangefavoritetemplatemilitaryindustryservicesmaterialproductsz-index:commentssoftwarecompletecalendarplatformarticlesrequiredmovementquestionbuildingpoliticspossiblereligionphysicalfeedbackregisterpicturesdisabledprotocolaudiencesettingsactivityelementslearninganythingabstractprogressoverviewmagazineeconomictrainingpressurevarious <strong>propertyshoppingtogetheradvancedbehaviordownloadfeaturedfootballselectedLanguagedistanceremembertrackingpasswordmodifiedstudentsdirectlyfightingnortherndatabasefestivalbreakinglocationinternetdropdownpracticeevidencefunctionmarriageresponseproblemsnegativeprogramsanalysisreleasedbanner\">purchasepoliciesregionalcreativeargumentbookmarkreferrerchemicaldivisioncallbackseparateprojectsconflicthardwareinterestdeliverymountainobtained= false;for(var acceptedcapacitycomputeridentityaircraftemployedproposeddomesticincludesprovidedhospitalverticalcollapseapproachpartnerslogo\"><adaughterauthor\" culturalfamilies/images/assemblypowerfulteachingfinisheddistrictcriticalcgi-bin/purposesrequireselectionbecomingprovidesacademicexerciseactuallymedicineconstantaccidentMagazinedocumentstartingbottom\">observed: "extendedpreviousSoftwarecustomerdecisionstrengthdetailedslightlyplanningtextareacurrencyeveryonestraighttransferpositiveproducedheritageshippingabsolutereceivedrelevantbutton\" violenceanywherebenefitslaunchedrecentlyalliancefollowedmultiplebulletinincludedoccurredinternal$(this).republic><tr><tdcongressrecordedultimatesolution<ul id=\"discoverHome</a>websitesnetworksalthoughentirelymemorialmessagescontinueactive\">somewhatvictoriaWestern title=\"LocationcontractvisitorsDownloadwithout right\">\nmeasureswidth = variableinvolvedvirginianormallyhappenedaccountsstandingnationalRegisterpreparedcontrolsaccuratebirthdaystrategyofficialgraphicscriminalpossiblyconsumerPersonalspeakingvalidateachieved.jpg\" />machines</h2>\n keywordsfriendlybrotherscombinedoriginalcomposedexpectedadequatepakistanfollow\" valuable</label>relativebringingincreasegovernorplugins/List of Header\">\" name=\" ("graduate</head>\ncommercemalaysiadirectormaintain;height:schedulechangingback to catholicpatternscolor: #greatestsuppliesreliable</ul>\n\t\t<select citizensclothingwatching<li id=\"specificcarryingsentence<center>contrastthinkingcatch(e)southernMichael merchantcarouselpadding:interior.split(\"lizationOctober ){returnimproved-->\n\ncoveragechairman.png\" />subjectsRichard whateverprobablyrecoverybaseballjudgmentconnect..css\" /> websitereporteddefault\"/></a>\r\nelectricscotlandcreationquantity. ISBN 0did not instance-search-\" lang=\"speakersComputercontainsarchivesministerreactiondiscountItalianocriteriastrongly: 'http:'script'coveringofferingappearedBritish identifyFacebooknumerousvehiclesconcernsAmericanhandlingdiv id=\"William provider_contentaccuracysection andersonflexibleCategorylawrence<script>layout=\"approved maximumheader\"></table>Serviceshamiltoncurrent canadianchannels/themes//articleoptionalportugalvalue=\"\"intervalwirelessentitledagenciesSearch\" measuredthousandspending…new Date\" size=\"pageNamemiddle\" \" /></a>hidden\">sequencepersonaloverflowopinionsillinoislinks\">\n\t<title>versionssaturdayterminalitempropengineersectionsdesignerproposal=\"false\"EspaC1olreleasessubmit\" er"additionsymptomsorientedresourceright\"><pleasurestationshistory.leaving border=contentscenter\">.\n\nSome directedsuitablebulgaria.show();designedGeneral conceptsExampleswilliamsOriginal\"><span>search\">operatorrequestsa "allowingDocumentrevision. \n\nThe yourselfContact michiganEnglish columbiapriorityprintingdrinkingfacilityreturnedContent officersRussian generate-8859-1\"indicatefamiliar qualitymargin:0 contentviewportcontacts-title\">portable.length eligibleinvolvesatlanticonload=\"default.suppliedpaymentsglossary\n\nAfter guidance</td><tdencodingmiddle\">came to displaysscottishjonathanmajoritywidgets.clinicalthailandteachers<head>\n\taffectedsupportspointer;toString</small>oklahomawill be investor0\" alt=\"holidaysResourcelicensed (which . After considervisitingexplorerprimary search\" android\"quickly meetingsestimate;return ;color:# height=approval, " checked.min.js\"magnetic></a></hforecast. While thursdaydvertiseéhasClassevaluateorderingexistingpatients Online coloradoOptions\"campbell<!-- end</span><<br />\r\n_popups|sciences," quality Windows assignedheight: <b classle" value=\" Companyexamples<iframe believespresentsmarshallpart of properly).\n\nThe taxonomymuch of </span>\n\" data-srtuguC*sscrollTo project<head>\r\nattorneyemphasissponsorsfancyboxworld's wildlifechecked=sessionsprogrammpx;font- Projectjournalsbelievedvacationthompsonlightingand the special border=0checking</tbody><button Completeclearfix\n<head>\narticle <sectionfindingsrole in popular Octoberwebsite exposureused to changesoperatedclickingenteringcommandsinformed numbers </div>creatingonSubmitmarylandcollegesanalyticlistingscontact.loggedInadvisorysiblingscontent\"s")s. This packagescheckboxsuggestspregnanttomorrowspacing=icon.pngjapanesecodebasebutton\">gamblingsuch as , while </span> missourisportingtop:1px .</span>tensionswidth=\"2lazyloadnovemberused in height=\"cript\">\n </<tr><td height:2/productcountry include footer\" <!-- title\"></jquery.</form>\n(g.\u0000d=\u0013)(g9\u0001i+\u0014)hrvatskiitalianoromC\"nD\u0003tC<rkC'eX'X1X/Y\u0008tambiC)nnoticiasmensajespersonasderechosnacionalserviciocontactousuariosprogramagobiernoempresasanunciosvalenciacolombiadespuC)sdeportesproyectoproductopC:bliconosotroshistoriapresentemillonesmediantepreguntaanteriorrecursosproblemasantiagonuestrosopiniC3nimprimirmientrasamC)ricavendedorsociedadrespectorealizarregistropalabrasinterC)sentoncesespecialmiembrosrealidadcC3rdobazaragozapC!ginassocialesbloqueargestiC3nalquilersistemascienciascompletoversiC3ncompletaestudiospC:blicaobjetivoalicantebuscadorcantidadentradasaccionesarchivossuperiormayorC-aalemaniafunciC3nC:ltimoshaciendoaquellosediciC3nfernandoambientefacebooknuestrasclientesprocesosbastantepresentareportarcongresopublicarcomerciocontratojC3venesdistritotC)cnicaconjuntoenergC-atrabajarasturiasrecienteutilizarboletC-nsalvadorcorrectatrabajosprimerosnegocioslibertaddetallespantallaprC3ximoalmerC-aanimalesquiC)nescorazC3nsecciC3nbuscandoopcionesexteriorconceptotodavC-agalerC-aescribirmedicinalicenciaconsultaaspectoscrC-ticadC3laresjusticiadeberC!nperC-odonecesitamantenerpequeC1orecibidatribunaltenerifecanciC3ncanariasdescargadiversosmallorcarequieretC)cnicodeberC-aviviendafinanzasadelantefuncionaconsejosdifC-cilciudadesantiguasavanzadatC)rminounidadessC!nchezcampaC1asoftonicrevistascontienesectoresmomentosfacultadcrC)ditodiversassupuestofactoressegundospequeC1aP3P>P4P0P5Q\u0001P;P8P5Q\u0001Q\u0002Q\u000CP1Q\u000BP;P>P1Q\u000BQ\u0002Q\u000CQ\rQ\u0002P>P<P\u0015Q\u0001P;P8Q\u0002P>P3P>P<P5P=Q\u000FP2Q\u0001P5Q\u0005Q\rQ\u0002P>P9P4P0P6P5P1Q\u000BP;P8P3P>P4Q\u0003P4P5P=Q\u000CQ\rQ\u0002P>Q\u0002P1Q\u000BP;P0Q\u0001P5P1Q\u000FP>P4P8P=Q\u0001P5P1P5P=P0P4P>Q\u0001P0P9Q\u0002Q\u0004P>Q\u0002P>P=P5P3P>Q\u0001P2P>P8Q\u0001P2P>P9P8P3Q\u0000Q\u000BQ\u0002P>P6P5P2Q\u0001P5P<Q\u0001P2P>Q\u000EP;P8Q\u0008Q\u000CQ\rQ\u0002P8Q\u0005P?P>P:P0P4P=P5P9P4P>P<P0P<P8Q\u0000P0P;P8P1P>Q\u0002P5P<Q\u0003Q\u0005P>Q\u0002Q\u000FP4P2Q\u0003Q\u0005Q\u0001P5Q\u0002P8P;Q\u000EP4P8P4P5P;P>P<P8Q\u0000P5Q\u0002P5P1Q\u000FQ\u0001P2P>P5P2P8P4P5Q\u0007P5P3P>Q\rQ\u0002P8P<Q\u0001Q\u0007P5Q\u0002Q\u0002P5P<Q\u000BQ\u0006P5P=Q\u000BQ\u0001Q\u0002P0P;P2P5P4Q\u000CQ\u0002P5P<P5P2P>P4Q\u000BQ\u0002P5P1P5P2Q\u000BQ\u0008P5P=P0P<P8Q\u0002P8P?P0Q\u0002P>P<Q\u0003P?Q\u0000P0P2P;P8Q\u0006P0P>P4P=P0P3P>P4Q\u000BP7P=P0Q\u000EP<P>P3Q\u0003P4Q\u0000Q\u0003P3P2Q\u0001P5P9P8P4P5Q\u0002P:P8P=P>P>P4P=P>P4P5P;P0P4P5P;P5Q\u0001Q\u0000P>P:P8Q\u000EP=Q\u000FP2P5Q\u0001Q\u000CP\u0015Q\u0001Q\u0002Q\u000CQ\u0000P0P7P0P=P0Q\u0008P8X'Y\u0004Y\u0004Y\u0007X'Y\u0004X*Y\nX,Y\u0005Y\nX9X.X'X5X)X'Y\u0004X0Y\nX9Y\u0004Y\nY\u0007X,X/Y\nX/X'Y\u0004X\"Y\u0006X'Y\u0004X1X/X*X-Y\u0003Y\u0005X5Y\u0001X-X)Y\u0003X'Y\u0006X*X'Y\u0004Y\u0004Y\nY\nY\u0003Y\u0008Y\u0006X4X(Y\u0003X)Y\u0001Y\nY\u0007X'X(Y\u0006X'X*X-Y\u0008X'X!X#Y\u0003X+X1X.Y\u0004X'Y\u0004X'Y\u0004X-X(X/Y\u0004Y\nY\u0004X/X1Y\u0008X3X'X6X:X7X*Y\u0003Y\u0008Y\u0006Y\u0007Y\u0006X'Y\u0003X3X'X-X)Y\u0006X'X/Y\nX'Y\u0004X7X(X9Y\u0004Y\nY\u0003X4Y\u0003X1X'Y\nY\u0005Y\u0003Y\u0006Y\u0005Y\u0006Y\u0007X'X4X1Y\u0003X)X1X&Y\nX3Y\u0006X4Y\nX7Y\u0005X'X0X'X'Y\u0004Y\u0001Y\u0006X4X(X'X(X*X9X(X1X1X-Y\u0005X)Y\u0003X'Y\u0001X)Y\nY\u0002Y\u0008Y\u0004Y\u0005X1Y\u0003X2Y\u0003Y\u0004Y\u0005X)X#X-Y\u0005X/Y\u0002Y\u0004X(Y\nY\nX9Y\u0006Y\nX5Y\u0008X1X)X7X1Y\nY\u0002X4X'X1Y\u0003X,Y\u0008X'Y\u0004X#X.X1Y\tY\u0005X9Y\u0006X'X'X(X-X+X9X1Y\u0008X6X(X4Y\u0003Y\u0004Y\u0005X3X,Y\u0004X(Y\u0006X'Y\u0006X.X'Y\u0004X/Y\u0003X*X'X(Y\u0003Y\u0004Y\nX)X(X/Y\u0008Y\u0006X#Y\nX6X'Y\nY\u0008X,X/Y\u0001X1Y\nY\u0002Y\u0003X*X(X*X#Y\u0001X6Y\u0004Y\u0005X7X(X.X'Y\u0003X+X1X(X'X1Y\u0003X'Y\u0001X6Y\u0004X'X-Y\u0004Y\tY\u0006Y\u0001X3Y\u0007X#Y\nX'Y\u0005X1X/Y\u0008X/X#Y\u0006Y\u0007X'X/Y\nY\u0006X'X'Y\u0004X'Y\u0006Y\u0005X9X1X6X*X9Y\u0004Y\u0005X/X'X.Y\u0004Y\u0005Y\u0005Y\u0003Y\u0006\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0002\u0000\u0002\u0000\u0002\u0000\u0002\u0000\u0004\u0000\u0004\u0000\u0004\u0000\u0004\u0000\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0007\u0006\u0005\u0004\u0003\u0002\u0001\u0000\u0008\t\n\u000B\u000C\r\u000E\u000F\u000F\u000E\r\u000C\u000B\n\t\u0008\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0017\u0016\u0015\u0014\u0013\u0012\u0011\u0010\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u001F\u001E\u001D\u001C\u001B\u001A\u0019\u0018\u007F\u007F\u007F\u007F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u007F\u007F\u007F\u007F\u0001\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0003\u0000\u0000\u0000\u007F\u007F\u0000\u0001\u0000\u0000\u0000\u0001\u0000\u0000\u007F\u007F\u0000\u0001\u0000\u0000\u0000\u0008\u0000\u0008\u0000\u0008\u0000\u0008\u0000\u0000\u0000\u0001\u0000\u0002\u0000\u0003\u0000\u0004\u0000\u0005\u0000\u0006\u0000\u0007resourcescountriesquestionsequipmentcommunityavailablehighlightDTD/xhtmlmarketingknowledgesomethingcontainerdirectionsubscribeadvertisecharacter\" value=\"</select>Australia\" class=\"situationauthorityfollowingprimarilyoperationchallengedevelopedanonymousfunction functionscompaniesstructureagreement\" title=\"potentialeducationargumentssecondarycopyrightlanguagesexclusivecondition</form>\r\nstatementattentionBiography} else {\nsolutionswhen the Analyticstemplatesdangeroussatellitedocumentspublisherimportantprototypeinfluence»</effectivegenerallytransformbeautifultransportorganizedpublishedprominentuntil thethumbnailNational .focus();over the migrationannouncedfooter\">\nexceptionless thanexpensiveformationframeworkterritoryndicationcurrentlyclassNamecriticismtraditionelsewhereAlexanderappointedmaterialsbroadcastmentionedaffiliate</option>treatmentdifferent/default.Presidentonclick=\"biographyotherwisepermanentFranC'aisHollywoodexpansionstandards</style>\nreductionDecember preferredCambridgeopponentsBusiness confusion>\n<title>presentedexplaineddoes not worldwideinterfacepositionsnewspaper</table>\nmountainslike the essentialfinancialselectionaction=\"/abandonedEducationparseInt(stabilityunable to\nrelationsNote thatefficientperformedtwo yearsSince thethereforewrapper\">alternateincreasedBattle ofperceivedtrying tonecessaryportrayedelectionsElizabethdiscoveryinsurances.length;legendaryGeographycandidatecorporatesometimesservices.inheritedCommunityreligiouslocationsCommitteebuildingsthe worldno longerbeginningreferencecannot befrequencytypicallyinto the relative;recordingpresidentinitiallytechniquethe otherit can beexistenceunderlinethis timetelephoneitemscopepracticesadvantage);return For otherprovidingdemocracyboth the extensivesufferingsupportedcomputers functionpracticalsaid thatit may beEnglish\nsuspectedmargin: 0spiritual\n\nmicrosoftgraduallydiscussedhe becameexecutivejquery.jshouseholdconfirmedpurchasedliterallydestroyedup to thevariationremainingit is notcenturiesJapanese among thecompletedalgorithminterestsrebellionundefinedencourageresizableinvolvingsensitiveuniversalprovision(althoughfeaturingconducted), which continued-header\">February numerous overflow:componentfragmentsexcellentcolspan=\"technicalnear the Advanced source ofexpressedHong Kong Facebookmultiple mechanismelevationoffensive\n\tsponsoreddocument.or "there arethose whomovementsprocessesdifficultsubmittedrecommendconvincedpromoting\" width=\".replace(classicalcoalitionhis firstdecisionsassistantindicatedevolution-wrapper\"enough toalong thedelivered-->\r\n\n\r\n
Archbishop class=\"nobeing usedapproachesprivilegesnoscript>\nresults inmay be theEaster eggmechanismsreasonablePopulationCollectionselected\">noscript>\r/index.phparrival of-jssdk'));managed toincompletecasualtiescompletionChristiansSeptember arithmeticproceduresmight haveProductionit appearsPhilosophyfriendshipleading togiving thetoward theguaranteeddocumentedcolor:#000video gamecommissionreflectingchange theassociatedsans-serifonkeypress; padding:He was theunderlyingtypically , and the srcElementsuccessivesince the should be networkingaccountinguse of thelower thanshows that\n\t\tcomplaintscontinuousquantitiesastronomerhe did notdue to itsapplied toan averageefforts tothe futureattempt toTherefore,capabilityRepublicanwas formedElectronickilometerschallengespublishingthe formerindigenousdirectionssubsidiaryconspiracydetails ofand in theaffordablesubstancesreason forconventionitemtype=\"absolutelysupposedlyremained aattractivetravellingseparatelyfocuses onelementaryapplicablefound thatstylesheetmanuscriptstands for no-repeat(sometimesCommercialin Americaundertakenquarter ofan examplepersonallyindex.php?\npercentagebest-knowncreating a\" dir=\"ltrLieutenant\n
is said tostructuralreferendummost oftena separate->\n
soundtracksearchFormtend to beinput id=\"opening ofrestrictedadopted byaddressingtheologianmethods ofvariant ofChristian very largeautomotiveby far therange frompursuit offollow thebrought toin Englandagree thataccused ofcomes frompreventingdiv style=his or hertremendousfreedom ofconcerning0 1em 1em;Basketball/style.cssan earliereven after/\" title=\".com/indextaking thepittsburghcontent\">\rimplementedcan be seenthere was ademonstratecontainer\">connectionsthe Britishwas written!important;px; margin-followed byability to complicatedduring the immigrationalso called

\n

acquisitioncalled the persecutiondesignation{font-size:appeared ininvestigateexperiencedmost likelywidely useddiscussionspresence of (document.extensivelyIt has beenit does notcontrary toinhabitantsimprovementscholarshipconsumptioninstructionfor exampleone or morepx; paddingthe currenta series ofare usuallyrole in thepreviously derivativesevidence ofexperiencescolorschemestated thatcertificate
\n selected=\"high schoolresponse tocomfortableadoption ofthree yearsthe countryin Februaryso that thepeople who provided by\nhaving been\r\n\r\n< "The compilationhe had beenproduced byphilosopherconstructedintended toamong othercompared toto say thatEngineeringa differentreferred todifferencesbelief thatphotographsidentifyingHistory of Republic ofnecessarilyprobabilitytechnicallyleaving thespectacularfraction ofelectricityhead of therestaurantspartnershipemphasis onmost recentshare with saying thatfilled withdesigned toit is often\">as follows:merged withthrough thecommercial pointed outopportunityview of therequirementdivision ofprogramminghe receivedsetInterval\">maintainingChristopherMuch of thewritings of\" height=\"2size of theversion of mixture of between theExamples ofeducationalcompetitive onsubmit=\"director ofdistinctive/DTD XHTML relating totendency toprovince ofwhich woulddespite thescientific legislature.innerHTML allegationsAgriculturewas used inapproach tointelligentyears later,sans-serifdeterminingPerformanceappearances, which is foundationsabbreviatedhigher thans from the individual composed ofsupposed toclaims thatattributionfont-size:1elements ofHistorical his brotherat the timeanniversarygoverned byrelated to ultimately innovationsit is stillcan only bedefinitionstoGMTStringA number ofimg class=\"Eventually,was changedoccurred inneighboringdistinguishwhen he wasintroducingterrestrialMany of theargues thatan Americanconquest ofwidespread were killedscreen and In order toexpected todescendantsare locatedlegislativegenerations backgroundmost peopleyears afterthere is nothe highestfrequently they do notargued thatshowed thatpredominanttheologicalby the timeconsideringshort-livedcan be usedvery littleone of the had alreadyinterpretedcommunicatefeatures ofgovernment,entered the\" height=\"3Independentpopulationslarge-scale. Although used in thedestructionpossibilitystarting intwo or moreexpressionssubordinatelarger thanhistory and\r\nContinentaleliminatingwill not bepractice ofin front ofsite of theensure thatto create amississippipotentiallyoutstandingbetter thanwhat is nowsituated inmeta name=\"TraditionalsuggestionsTranslationthe form ofatmosphericideologicalenterprisescalculatingeast of theremnants ofpluginspage/index.php?remained intransformedHe was alsowas alreadystatisticalin favor ofMinistry ofmovement offormulationis required\nquestion ofwas electedto become abecause of some peopleinspired bysuccessful a time whenmore commonamongst thean officialwidth:100%;technology,was adoptedto keep thesettlementslive birthsindex.html\"Connecticutassigned to&times;account foralign=rightthe companyalways beenreturned toinvolvementBecause thethis period\" name=\"q\" confined toa result ofvalue=\"\" />is actuallyEnvironment\r\n\r\nConversely,>\n
this is notthe presentif they areand finallya matter of\r\n\t
\r\n\r\nfaster thanmajority ofafter whichcomparativeto maintainimprove theawarded theer\" class=\"frameborderrestorationin the sameanalysis oftheir firstDuring the continentalsequence offunction(){font-size: work on the\nadopted theproperty ofdirected byeffectivelywas broughtchildren ofProgramminglonger thanmanuscriptswar againstby means ofand most ofsimilar to proprietaryoriginatingprestigiousgrammaticalexperience.to make theIt was alsois found incompetitorsin the U.S.replace thebrought thecalculationfall of thethe generalpracticallyin honor ofreleased inresidentialand some ofking of thereaction to1st Earl ofculture andprincipally\n they can beback to thesome of hisexposure toare similarform of theaddFavoritecitizenshippart in thepeople within practiceto continue&minus;approved by the first allowed theand for thefunctioningplaying thesolution toheight=\"0\" in his bookmore than afollows thecreated thepresence in nationalistthe idea ofa characterwere forced class=\"btndays of thefeatured inshowing theinterest inin place ofturn of thethe head ofLord of thepoliticallyhas its ownEducationalapproval ofsome of theeach other,behavior ofand becauseand anotherappeared onrecorded inblack"may includethe world'scan lead torefers to aborder=\"0\" government winning theresulted in while the Washington,the subjectcity in the>\r\n\t\treflect theto completebecame moreradioactiverejected bywithout anyhis father,which couldcopy of theto indicatea politicalaccounts ofconstitutesworked wither
of his lifeaccompaniedclientWidthprevent theLegislativedifferentlytogether inhas severalfor anothertext of thefounded thee with the is used forchanged theusually theplace wherewhereas the> \nHowever thelead to the\tThe currentthe site ofsubstantialexperience,in the Westthey shouldslovenD\rinacomentariosuniversidadcondicionesactividadesexperienciatecnologC-aproducciC3npuntuaciC3naplicaciC3ncontraseC1acategorC-asregistrarseprofesionaltratamientoregC-stratesecretarC-aprincipalesprotecciC3nimportantesimportanciaposibilidadinteresantecrecimientonecesidadessuscribirseasociaciC3ndisponiblesevaluaciC3nestudiantesresponsableresoluciC3nguadalajararegistradosoportunidadcomercialesfotografC-aautoridadesingenierC-atelevisiC3ncompetenciaoperacionesestablecidosimplementeactualmentenavegaciC3nconformidadline-height:font-family:\" : \"http://applicationslink\" href=\"specifically//\n/index.html\"window.open( !important;application/independence//www.googleorganizationautocompleterequirementsconservative
most notably/>notification'undefined')Furthermore,believe thatinnerHTML = prior to thedramaticallyreferring tonegotiationsheadquartersSouth AfricaunsuccessfulPennsylvaniaAs a result,\npadding-top:experimentalgetAttributeinstructionstechnologiespart of the =function(){subscriptionl.dtd\">\r\nEnglish (US)appendChild(transmissions. However, intelligence\" tabindex=\"float:right;Commonwealthranging fromin which theat least onereproductionencyclopedia;font-size:1jurisdictionat that time\">compensationchampionshipmedia=\"all\" violation ofreference toreturn true;Strict//EN\" transactionsinterventionverificationInformation difficultiesChampionshipcapabilities}\n\nChristianityfor example,Professionalrestrictionssuggest thatwas released(such as theremoveClass(unemploymentthe Americanstructure of/index.html published inspan class=\"\">\n\nf (document.border: 1px {font-size:1treatment of0\" height=\"1modificationIndependencedivided intogreater thanachievementsestablishingJavaScript\" neverthelesssignificanceBroadcasting> container\">\nsuch as the influence ofa particularsrc='http://navigation\" half of the substantial  advantage ofdiscovery offundamental metropolitanthe opposite\" xml:lang=\"deliberatelyalign=centerevolution ofpreservationimprovementsbeginning inJesus ChristPublicationsdisagreementtext-align:r, function()similaritiesbody>is currentlyalphabeticalis sometimestype=\"image/many of the flow:hidden;available indescribe theexistence ofall over thethe Internet\t