Merge
diff --git a/.hgtags b/.hgtags
index 1a27baa..8c3ca49 100644
--- a/.hgtags
+++ b/.hgtags
@@ -47,3 +47,5 @@
893bcca951b747ddcf6986362b877f0e1dbb835b jdk7-b70
b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71
460639b036f327282832a4fe52b7aa45688afd50 jdk7-b72
+f708138c9aca4b389872838fe6773872fce3609e jdk7-b73
+eacb36e30327e7ae33baa068e82ddccbd91eaae2 jdk7-b74
diff --git a/make/common/shared/Defs-java.gmk b/make/common/shared/Defs-java.gmk
index eb63179..f9ed635 100644
--- a/make/common/shared/Defs-java.gmk
+++ b/make/common/shared/Defs-java.gmk
@@ -165,11 +165,6 @@
JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%)
endif
-#always use the bootstrap javah until bug-ID 6889255 is fixed. These
-#five lines should be removed as part of that fix:
-JAVAH_CMD = $(JAVA_TOOLS_DIR)/javah \
- $(JAVAHFLAGS)
-
# Override of what javac to use (see deploy workspace)
ifdef JAVAC
JAVAC_CMD = $(JAVAC)
diff --git a/make/sun/awt/FILES_export_windows.gmk b/make/sun/awt/FILES_export_windows.gmk
index 2762749..a58f35c 100644
--- a/make/sun/awt/FILES_export_windows.gmk
+++ b/make/sun/awt/FILES_export_windows.gmk
@@ -1,249 +1,250 @@
-#
-# Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-# FILES_export definitions for Win32
-
-FILES_export = \
- java/awt/AlphaComposite.java \
- java/awt/MouseInfo.java \
- java/awt/Graphics.java \
- java/awt/Color.java \
- java/awt/Image.java \
- java/awt/Rectangle.java \
- java/awt/Event.java \
- java/awt/Font.java \
- java/awt/FontMetrics.java \
- java/awt/Toolkit.java \
- java/awt/Component.java \
- java/awt/Container.java \
- java/awt/Canvas.java \
- java/awt/Button.java \
- java/awt/List.java \
- java/awt/Adjustable.java \
- java/awt/Scrollbar.java \
- java/awt/ScrollPane.java \
- java/awt/ScrollPaneAdjustable.java \
- java/awt/Transparency.java \
- java/awt/Window.java \
- java/awt/TextField.java \
- java/awt/Label.java \
- java/awt/Choice.java \
- java/awt/TextComponent.java \
- java/awt/TextArea.java \
- java/awt/MenuBar.java \
- java/awt/Menu.java \
- java/awt/Dialog.java \
- java/awt/FileDialog.java \
- java/awt/MenuItem.java \
- java/awt/MenuComponent.java \
- java/awt/Checkbox.java \
- java/awt/CheckboxGroup.java \
- java/awt/CheckboxMenuItem.java \
- java/awt/Frame.java \
- java/awt/Insets.java \
- java/awt/Cursor.java \
- java/awt/Dimension.java \
- java/awt/PopupMenu.java \
- java/awt/AWTEvent.java \
- java/awt/AWTException.java \
- java/awt/AWTKeyStroke.java \
- java/awt/KeyboardFocusManager.java \
- java/awt/DisplayMode.java \
- java/awt/TrayIcon.java \
- java/awt/datatransfer/StringSelection.java \
- java/awt/datatransfer/Transferable.java \
- java/awt/dnd/DnDConstants.java \
- java/awt/event/ActionEvent.java \
- java/awt/event/AdjustmentEvent.java \
- java/awt/event/ComponentEvent.java \
- java/awt/event/FocusEvent.java \
- java/awt/event/ItemEvent.java \
- java/awt/event/InputEvent.java \
- java/awt/event/InvocationEvent.java \
- java/awt/event/KeyEvent.java \
- java/awt/event/MouseEvent.java \
- java/awt/event/MouseWheelEvent.java \
- java/awt/event/WindowEvent.java \
- java/awt/event/InputMethodEvent.java \
- java/awt/im/InputMethodHighlight.java \
- java/awt/im/spi/InputMethod.java \
- java/awt/font/TextHitInfo.java \
- java/text/AttributedCharacterIterator.java \
- java/text/AttributedString.java \
- java/awt/geom/PathIterator.java \
- java/awt/image/AffineTransformOp.java \
- java/awt/image/ImageConsumer.java \
- java/awt/image/ImageObserver.java \
- java/awt/image/BufferedImage.java \
- java/awt/image/ColorModel.java \
- java/awt/image/ConvolveOp.java \
- java/awt/image/DirectColorModel.java \
- java/awt/image/IndexColorModel.java \
- java/awt/image/Raster.java \
- java/awt/color/ColorSpace.java \
- java/awt/color/ICC_Profile.java \
- java/awt/peer/ComponentPeer.java \
- java/awt/peer/MenuComponentPeer.java \
- java/io/InputStream.java
-
-FILES_export2 = \
- sun/awt/im/InputMethodContext.java \
- sun/awt/EmbeddedFrame.java \
- sun/awt/KeyboardFocusManagerPeerImpl.java \
- sun/awt/windows/WEmbeddedFrame.java \
- sun/awt/windows/WEmbeddedFramePeer.java \
- sun/awt/Win32GraphicsEnvironment.java \
- sun/awt/Win32GraphicsDevice.java \
- sun/awt/Win32GraphicsConfig.java \
- sun/java2d/SunGraphicsEnvironment.java \
- sun/java2d/SunGraphics2D.java \
- sun/java2d/SurfaceData.java \
- sun/awt/image/IntegerComponentRaster.java \
- sun/awt/image/ImagingLib.java \
- sun/awt/image/BufImgSurfaceData.java \
- sun/awt/image/DataBufferNative.java \
- sun/awt/shell/Win32ShellFolder2.java \
- sun/java2d/windows/GDIBlitLoops.java \
- sun/java2d/windows/GDIRenderer.java \
- sun/java2d/windows/GDIWindowSurfaceData.java \
- sun/java2d/windows/WindowsFlags.java \
- sun/java2d/loops/Blit.java \
- sun/java2d/loops/BlitBg.java \
- sun/java2d/loops/ScaledBlit.java \
- sun/java2d/loops/FillRect.java \
- sun/java2d/loops/FillSpans.java \
- sun/java2d/loops/DrawGlyphList.java \
- sun/java2d/loops/DrawGlyphListAA.java \
- sun/java2d/loops/DrawGlyphListLCD.java \
- sun/java2d/loops/DrawLine.java \
- sun/java2d/loops/DrawRect.java \
- sun/java2d/loops/DrawPolygons.java \
- sun/java2d/loops/DrawPath.java \
- sun/java2d/loops/FillPath.java \
- sun/java2d/loops/MaskBlit.java \
- sun/java2d/loops/MaskFill.java \
- sun/java2d/loops/TransformHelper.java \
- sun/java2d/loops/GraphicsPrimitiveMgr.java \
- sun/java2d/loops/GraphicsPrimitive.java \
- sun/java2d/cmm/CMSManager.java \
- sun/java2d/cmm/PCMM.java \
- sun/java2d/cmm/ColorTransform.java \
- sun/awt/ScrollPaneWheelScroller.java \
- sun/awt/datatransfer/DataTransferer.java \
- sun/awt/datatransfer/SunClipboard.java \
- sun/awt/dnd/SunDragSourceContextPeer.java \
- sun/awt/windows/WToolkitThreadBlockedHandler.java
-
-FILES_export3 = \
- java/awt/CheckboxMenuItem.java \
- java/awt/Menu.java \
- java/awt/MenuBar.java \
- java/awt/MenuComponent.java \
- java/awt/MenuItem.java \
- sun/awt/PlatformFont.java \
- sun/awt/FontDescriptor.java \
- sun/awt/CharsetString.java \
- java/awt/image/DataBuffer.java \
- sun/awt/image/GifImageDecoder.java \
- sun/awt/image/ImageRepresentation.java \
- sun/awt/windows/WCustomCursor.java \
- sun/awt/windows/WDefaultFontCharset.java \
- sun/awt/windows/WButtonPeer.java \
- sun/awt/windows/WCanvasPeer.java \
- sun/awt/windows/WCheckboxPeer.java \
- sun/awt/windows/WCheckboxMenuItemPeer.java \
- sun/awt/windows/WChoicePeer.java \
- sun/awt/windows/WClipboard.java \
- sun/awt/windows/WColor.java \
- sun/awt/windows/WDataTransferer.java \
- sun/awt/windows/WDesktopPeer.java \
- sun/awt/windows/WDesktopProperties.java \
- sun/awt/windows/WDialogPeer.java \
- sun/awt/windows/WDragSourceContextPeer.java \
- sun/awt/windows/WDropTargetContextPeer.java \
- sun/awt/windows/WFileDialogPeer.java \
- sun/awt/windows/WFontPeer.java \
- sun/awt/windows/WFontMetrics.java \
- sun/awt/windows/WFramePeer.java \
- sun/awt/windows/WGlobalCursorManager.java \
- sun/awt/windows/WInputMethod.java \
- sun/awt/windows/WInputMethodDescriptor.java \
- sun/awt/windows/WComponentPeer.java \
- sun/awt/windows/WLabelPeer.java \
- sun/awt/windows/WListPeer.java \
- sun/awt/windows/WMenuBarPeer.java \
- sun/awt/windows/WMenuItemPeer.java \
- sun/awt/windows/WMenuPeer.java \
- sun/awt/windows/WObjectPeer.java \
- sun/awt/windows/WPopupMenuPeer.java \
- sun/awt/windows/WPrintDialog.java \
- sun/awt/windows/WPrintDialogPeer.java \
- sun/awt/windows/WPrinterJob.java \
- sun/awt/windows/WRobotPeer.java \
- sun/awt/windows/WScrollbarPeer.java \
- sun/awt/windows/WScrollPanePeer.java \
- sun/awt/windows/WTextAreaPeer.java \
- sun/awt/windows/WTextComponentPeer.java \
- sun/awt/windows/WTextFieldPeer.java \
- sun/awt/windows/WPanelPeer.java \
- sun/awt/windows/WToolkit.java \
- sun/awt/windows/WWindowPeer.java \
- sun/awt/windows/ThemeReader.java \
- sun/awt/windows/WBufferStrategy.java \
- sun/awt/windows/WTrayIconPeer.java \
- sun/awt/image/ImagingLib.java \
- sun/awt/ExtendedKeyCodes.java \
- sun/java2d/pipe/hw/AccelSurface.java \
- sun/java2d/pipe/hw/AccelDeviceEventNotifier.java \
- sun/java2d/pipe/hw/ContextCapabilities.java \
- sun/java2d/pipe/BufferedContext.java \
- sun/java2d/pipe/BufferedMaskBlit.java \
- sun/java2d/pipe/BufferedOpCodes.java \
- sun/java2d/pipe/BufferedPaints.java \
- sun/java2d/pipe/BufferedRenderPipe.java \
- sun/java2d/pipe/BufferedTextPipe.java \
- sun/java2d/pipe/RenderBuffer.java \
- sun/java2d/pipe/ShapeSpanIterator.java \
- sun/java2d/pipe/SpanClipRenderer.java \
- sun/java2d/pipe/RegionIterator.java \
- sun/java2d/opengl/OGLBlitLoops.java \
- sun/java2d/opengl/OGLContext.java \
- sun/java2d/opengl/OGLMaskFill.java \
- sun/java2d/opengl/OGLPaints.java \
- sun/java2d/opengl/OGLRenderQueue.java \
- sun/java2d/opengl/OGLRenderer.java \
- sun/java2d/opengl/OGLSurfaceData.java \
- sun/java2d/opengl/OGLTextRenderer.java \
- sun/java2d/opengl/WGLGraphicsConfig.java \
- sun/java2d/opengl/WGLSurfaceData.java \
- sun/java2d/d3d/D3DBlitLoops.java \
- sun/java2d/d3d/D3DGraphicsDevice.java \
- sun/java2d/d3d/D3DSurfaceData.java \
- sun/java2d/d3d/D3DMaskFill.java \
- sun/java2d/d3d/D3DPaints.java \
- sun/java2d/d3d/D3DRenderQueue.java \
- sun/java2d/d3d/D3DRenderer.java \
- sun/java2d/d3d/D3DTextRenderer.java \
- sun/java2d/d3d/D3DContext.java
+#
+# Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# FILES_export definitions for Win32
+
+FILES_export = \
+ java/awt/AlphaComposite.java \
+ java/awt/MouseInfo.java \
+ java/awt/Graphics.java \
+ java/awt/Color.java \
+ java/awt/Image.java \
+ java/awt/Rectangle.java \
+ java/awt/Event.java \
+ java/awt/Font.java \
+ java/awt/FontMetrics.java \
+ java/awt/Toolkit.java \
+ java/awt/Component.java \
+ java/awt/Container.java \
+ java/awt/Canvas.java \
+ java/awt/Button.java \
+ java/awt/List.java \
+ java/awt/Adjustable.java \
+ java/awt/Scrollbar.java \
+ java/awt/ScrollPane.java \
+ java/awt/ScrollPaneAdjustable.java \
+ java/awt/Transparency.java \
+ java/awt/Window.java \
+ java/awt/TextField.java \
+ java/awt/Label.java \
+ java/awt/Choice.java \
+ java/awt/TextComponent.java \
+ java/awt/TextArea.java \
+ java/awt/MenuBar.java \
+ java/awt/Menu.java \
+ java/awt/Dialog.java \
+ java/awt/FileDialog.java \
+ java/awt/MenuItem.java \
+ java/awt/MenuComponent.java \
+ java/awt/Checkbox.java \
+ java/awt/CheckboxGroup.java \
+ java/awt/CheckboxMenuItem.java \
+ java/awt/Frame.java \
+ java/awt/Insets.java \
+ java/awt/Cursor.java \
+ java/awt/Dimension.java \
+ java/awt/PopupMenu.java \
+ java/awt/AWTEvent.java \
+ java/awt/AWTException.java \
+ java/awt/AWTKeyStroke.java \
+ java/awt/KeyboardFocusManager.java \
+ java/awt/DisplayMode.java \
+ java/awt/TrayIcon.java \
+ java/awt/datatransfer/StringSelection.java \
+ java/awt/datatransfer/Transferable.java \
+ java/awt/dnd/DnDConstants.java \
+ java/awt/event/ActionEvent.java \
+ java/awt/event/AdjustmentEvent.java \
+ java/awt/event/ComponentEvent.java \
+ java/awt/event/FocusEvent.java \
+ java/awt/event/ItemEvent.java \
+ java/awt/event/InputEvent.java \
+ java/awt/event/InvocationEvent.java \
+ java/awt/event/KeyEvent.java \
+ java/awt/event/MouseEvent.java \
+ java/awt/event/MouseWheelEvent.java \
+ java/awt/event/WindowEvent.java \
+ java/awt/event/InputMethodEvent.java \
+ java/awt/im/InputMethodHighlight.java \
+ java/awt/im/spi/InputMethod.java \
+ java/awt/font/TextHitInfo.java \
+ java/text/AttributedCharacterIterator.java \
+ java/text/AttributedString.java \
+ java/awt/geom/PathIterator.java \
+ java/awt/image/AffineTransformOp.java \
+ java/awt/image/ImageConsumer.java \
+ java/awt/image/ImageObserver.java \
+ java/awt/image/BufferedImage.java \
+ java/awt/image/ColorModel.java \
+ java/awt/image/ConvolveOp.java \
+ java/awt/image/DirectColorModel.java \
+ java/awt/image/IndexColorModel.java \
+ java/awt/image/Raster.java \
+ java/awt/color/ColorSpace.java \
+ java/awt/color/ICC_Profile.java \
+ java/awt/peer/ComponentPeer.java \
+ java/awt/peer/MenuComponentPeer.java \
+ java/io/InputStream.java
+
+FILES_export2 = \
+ sun/awt/im/InputMethodContext.java \
+ sun/awt/EmbeddedFrame.java \
+ sun/awt/KeyboardFocusManagerPeerImpl.java \
+ sun/awt/windows/WEmbeddedFrame.java \
+ sun/awt/windows/WEmbeddedFramePeer.java \
+ sun/awt/Win32FontManager.java \
+ sun/awt/Win32GraphicsEnvironment.java \
+ sun/awt/Win32GraphicsDevice.java \
+ sun/awt/Win32GraphicsConfig.java \
+ sun/java2d/SunGraphicsEnvironment.java \
+ sun/java2d/SunGraphics2D.java \
+ sun/java2d/SurfaceData.java \
+ sun/awt/image/IntegerComponentRaster.java \
+ sun/awt/image/ImagingLib.java \
+ sun/awt/image/BufImgSurfaceData.java \
+ sun/awt/image/DataBufferNative.java \
+ sun/awt/shell/Win32ShellFolder2.java \
+ sun/java2d/windows/GDIBlitLoops.java \
+ sun/java2d/windows/GDIRenderer.java \
+ sun/java2d/windows/GDIWindowSurfaceData.java \
+ sun/java2d/windows/WindowsFlags.java \
+ sun/java2d/loops/Blit.java \
+ sun/java2d/loops/BlitBg.java \
+ sun/java2d/loops/ScaledBlit.java \
+ sun/java2d/loops/FillRect.java \
+ sun/java2d/loops/FillSpans.java \
+ sun/java2d/loops/DrawGlyphList.java \
+ sun/java2d/loops/DrawGlyphListAA.java \
+ sun/java2d/loops/DrawGlyphListLCD.java \
+ sun/java2d/loops/DrawLine.java \
+ sun/java2d/loops/DrawRect.java \
+ sun/java2d/loops/DrawPolygons.java \
+ sun/java2d/loops/DrawPath.java \
+ sun/java2d/loops/FillPath.java \
+ sun/java2d/loops/MaskBlit.java \
+ sun/java2d/loops/MaskFill.java \
+ sun/java2d/loops/TransformHelper.java \
+ sun/java2d/loops/GraphicsPrimitiveMgr.java \
+ sun/java2d/loops/GraphicsPrimitive.java \
+ sun/java2d/cmm/CMSManager.java \
+ sun/java2d/cmm/PCMM.java \
+ sun/java2d/cmm/ColorTransform.java \
+ sun/awt/ScrollPaneWheelScroller.java \
+ sun/awt/datatransfer/DataTransferer.java \
+ sun/awt/datatransfer/SunClipboard.java \
+ sun/awt/dnd/SunDragSourceContextPeer.java \
+ sun/awt/windows/WToolkitThreadBlockedHandler.java
+
+FILES_export3 = \
+ java/awt/CheckboxMenuItem.java \
+ java/awt/Menu.java \
+ java/awt/MenuBar.java \
+ java/awt/MenuComponent.java \
+ java/awt/MenuItem.java \
+ sun/awt/PlatformFont.java \
+ sun/awt/FontDescriptor.java \
+ sun/awt/CharsetString.java \
+ java/awt/image/DataBuffer.java \
+ sun/awt/image/GifImageDecoder.java \
+ sun/awt/image/ImageRepresentation.java \
+ sun/awt/windows/WCustomCursor.java \
+ sun/awt/windows/WDefaultFontCharset.java \
+ sun/awt/windows/WButtonPeer.java \
+ sun/awt/windows/WCanvasPeer.java \
+ sun/awt/windows/WCheckboxPeer.java \
+ sun/awt/windows/WCheckboxMenuItemPeer.java \
+ sun/awt/windows/WChoicePeer.java \
+ sun/awt/windows/WClipboard.java \
+ sun/awt/windows/WColor.java \
+ sun/awt/windows/WDataTransferer.java \
+ sun/awt/windows/WDesktopPeer.java \
+ sun/awt/windows/WDesktopProperties.java \
+ sun/awt/windows/WDialogPeer.java \
+ sun/awt/windows/WDragSourceContextPeer.java \
+ sun/awt/windows/WDropTargetContextPeer.java \
+ sun/awt/windows/WFileDialogPeer.java \
+ sun/awt/windows/WFontPeer.java \
+ sun/awt/windows/WFontMetrics.java \
+ sun/awt/windows/WFramePeer.java \
+ sun/awt/windows/WGlobalCursorManager.java \
+ sun/awt/windows/WInputMethod.java \
+ sun/awt/windows/WInputMethodDescriptor.java \
+ sun/awt/windows/WComponentPeer.java \
+ sun/awt/windows/WLabelPeer.java \
+ sun/awt/windows/WListPeer.java \
+ sun/awt/windows/WMenuBarPeer.java \
+ sun/awt/windows/WMenuItemPeer.java \
+ sun/awt/windows/WMenuPeer.java \
+ sun/awt/windows/WObjectPeer.java \
+ sun/awt/windows/WPopupMenuPeer.java \
+ sun/awt/windows/WPrintDialog.java \
+ sun/awt/windows/WPrintDialogPeer.java \
+ sun/awt/windows/WPrinterJob.java \
+ sun/awt/windows/WRobotPeer.java \
+ sun/awt/windows/WScrollbarPeer.java \
+ sun/awt/windows/WScrollPanePeer.java \
+ sun/awt/windows/WTextAreaPeer.java \
+ sun/awt/windows/WTextComponentPeer.java \
+ sun/awt/windows/WTextFieldPeer.java \
+ sun/awt/windows/WPanelPeer.java \
+ sun/awt/windows/WToolkit.java \
+ sun/awt/windows/WWindowPeer.java \
+ sun/awt/windows/ThemeReader.java \
+ sun/awt/windows/WBufferStrategy.java \
+ sun/awt/windows/WTrayIconPeer.java \
+ sun/awt/image/ImagingLib.java \
+ sun/awt/ExtendedKeyCodes.java \
+ sun/java2d/pipe/hw/AccelSurface.java \
+ sun/java2d/pipe/hw/AccelDeviceEventNotifier.java \
+ sun/java2d/pipe/hw/ContextCapabilities.java \
+ sun/java2d/pipe/BufferedContext.java \
+ sun/java2d/pipe/BufferedMaskBlit.java \
+ sun/java2d/pipe/BufferedOpCodes.java \
+ sun/java2d/pipe/BufferedPaints.java \
+ sun/java2d/pipe/BufferedRenderPipe.java \
+ sun/java2d/pipe/BufferedTextPipe.java \
+ sun/java2d/pipe/RenderBuffer.java \
+ sun/java2d/pipe/ShapeSpanIterator.java \
+ sun/java2d/pipe/SpanClipRenderer.java \
+ sun/java2d/pipe/RegionIterator.java \
+ sun/java2d/opengl/OGLBlitLoops.java \
+ sun/java2d/opengl/OGLContext.java \
+ sun/java2d/opengl/OGLMaskFill.java \
+ sun/java2d/opengl/OGLPaints.java \
+ sun/java2d/opengl/OGLRenderQueue.java \
+ sun/java2d/opengl/OGLRenderer.java \
+ sun/java2d/opengl/OGLSurfaceData.java \
+ sun/java2d/opengl/OGLTextRenderer.java \
+ sun/java2d/opengl/WGLGraphicsConfig.java \
+ sun/java2d/opengl/WGLSurfaceData.java \
+ sun/java2d/d3d/D3DBlitLoops.java \
+ sun/java2d/d3d/D3DGraphicsDevice.java \
+ sun/java2d/d3d/D3DSurfaceData.java \
+ sun/java2d/d3d/D3DMaskFill.java \
+ sun/java2d/d3d/D3DPaints.java \
+ sun/java2d/d3d/D3DRenderQueue.java \
+ sun/java2d/d3d/D3DRenderer.java \
+ sun/java2d/d3d/D3DTextRenderer.java \
+ sun/java2d/d3d/D3DContext.java
diff --git a/make/sun/awt/make.depend b/make/sun/awt/make.depend
index ed367d7..8c0fa65 100644
--- a/make/sun/awt/make.depend
+++ b/make/sun/awt/make.depend
@@ -1,351 +1,351 @@
-$(OBJDIR)/AccelGlyphCache.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/AlphaMacros.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AlphaMath.obj:: ../../../src/share/native/sun/java2d/loops/AlphaMath.h
-
-$(OBJDIR)/Any3Byte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Any4Byte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyByte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyInt.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/AnyShort.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/awt_AWTEvent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_BitmapUtil.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Brush.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Button.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Canvas.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Checkbox.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Choice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Clipboard.obj:: $(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Color.obj:: $(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Container.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Cursor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DataTransferer.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Debug.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Desktop.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DesktopProperties.obj:: $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Dialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Dimension.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DnDDS.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DnDDT.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_DrawingSurface.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Event.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_FileDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Font.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Frame.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_GDIObject.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_IconCursor.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_ImageRep.obj:: $(CLASSHDRDIR)/sun_awt_image_ImageRepresentation.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/awt_ImagingLib.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_image_ConvolveOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
-
-$(OBJDIR)/awt_InputEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_InputMethod.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_InputTextInfor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Insets.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_KeyboardFocusManager.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_KeyEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Label.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_List.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MenuBar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MenuItem.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Menu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Mlib.obj:: $(CLASSHDRDIR)/java_awt_image_BufferedImage.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Mlib.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_MouseEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_new.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Object.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Palette.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Panel.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_parseImage.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
-
-$(OBJDIR)/awt_Pen.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PopupMenu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintControl.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_PrintJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Rectangle.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Robot.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Scrollbar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_ScrollPane.obj:: $(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextArea.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextComponent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TextField.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Toolkit.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_TrayIcon.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Win32GraphicsEnv.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/awt_Window.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/BlitBg.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Blit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/BufferedMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedMaskBlit.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/BufferedRenderPipe.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/BufImgSurfaceData.obj:: $(CLASSHDRDIR)/sun_awt_image_BufImgSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/BufImgSurfaceData.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/img_util_md.h
-
-$(OBJDIR)/ByteBinary1Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary1Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteBinary2Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary2Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteBinary4Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary4Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteGray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ByteIndexed.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/CmdIDList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ComCtl32Util.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DBufImgOps.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DShaders.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DGlyphCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DGraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DMaskFill.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DMaskFill.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DPaints.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DPipelineManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DRenderer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DResourceManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DTextRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/D3DVertexCacher.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/DataBufferNative.obj:: $(CLASSHDRDIR)/sun_awt_image_DataBufferNative.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_assert.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_mem.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_trace.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/debug_util.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/Devices.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/Disposer.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/dither.obj:: ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/windows/native/sun/windows/colordata.h
-
-$(OBJDIR)/DllUtil.obj:: ../../../src/windows/native/sun/windows/DllUtil.h
-
-$(OBJDIR)/DrawLine.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawLine.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawPath.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawPolygons.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPolygons.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/DrawRect.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillPath.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillRect.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FillSpans.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillSpans.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FourByteAbgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgr.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/FourByteAbgrPre.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgrPre.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/GDIBlitLoops.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIHashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIRenderer.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/gifdecoder.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/GraphicsPrimitiveMgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Hashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/imageInitIDs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/img_colors.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/img_globals.obj:: $(CLASSHDRDIR)/java_awt_image_DirectColorModel.h $(CLASSHDRDIR)/java_awt_image_IndexColorModel.h $(CLASSHDRDIR)/java_awt_Transparency.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/windows/javavm/export/jni_md.h
-
-$(OBJDIR)/Index12Gray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Index8Gray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/initIDs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/IntArgbBm.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntArgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntArgbPre.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntBgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntRgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/IntRgbx.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/IntRgbx.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MaskFill.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/MouseInfo.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ObjectList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/OGLBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLBufImgOps.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLFuncs.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLMaskFill.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLMaskFill.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLPaints.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedPaints.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLRenderer.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLTextRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/OGLVertexCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
-
-$(OBJDIR)/ProcessPath.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Region.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/RenderBuffer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RenderBuffer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/ScaledBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ShapeSpanIterator.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/ShellFolder2.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/SpanClipRenderer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RegionIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_SpanClipRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/SurfaceData.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/ThemeReader.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/ThreeByteBgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Trace.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
-
-$(OBJDIR)/TransformHelper.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort4444Argb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort555Rgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort555Rgbx.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgbx.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/Ushort565Rgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/UshortGray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/UshortIndexed.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/loops/UshortIndexed.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
-
-$(OBJDIR)/WGLGraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLGraphicsConfig.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
-
-$(OBJDIR)/WGLSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
-
-$(OBJDIR)/WindowsFlags.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
-
-$(OBJDIR)/WPrinterJob.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+$(OBJDIR)/AccelGlyphCache.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/AlphaMacros.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AlphaMath.obj:: ../../../src/share/native/sun/java2d/loops/AlphaMath.h
+
+$(OBJDIR)/Any3Byte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Any4Byte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyByte.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyInt.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/AnyShort.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/awt_AWTEvent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_BitmapUtil.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Brush.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Button.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Canvas.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Checkbox.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Choice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Clipboard.obj:: $(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Color.obj:: $(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Container.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Cursor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DataTransferer.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Debug.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Desktop.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DesktopProperties.obj:: $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Dialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Dimension.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DnDDS.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DnDDT.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_DrawingSurface.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Event.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_FileDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Font.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Frame.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_GDIObject.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_IconCursor.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_ImageRep.obj:: $(CLASSHDRDIR)/sun_awt_image_ImageRepresentation.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/awt_ImagingLib.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_image_ConvolveOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
+
+$(OBJDIR)/awt_InputEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_InputMethod.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_InputTextInfor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Insets.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_KeyboardFocusManager.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_KeyEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Label.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_List.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MenuBar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MenuItem.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Menu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Mlib.obj:: $(CLASSHDRDIR)/java_awt_image_BufferedImage.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Mlib.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_MouseEvent.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_new.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Object.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Palette.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Panel.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_parseImage.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h
+
+$(OBJDIR)/awt_Pen.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PopupMenu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintControl.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_PrintJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Rectangle.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Robot.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Scrollbar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_ScrollPane.obj:: $(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextArea.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextComponent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TextField.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Toolkit.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_TrayIcon.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Win32GraphicsEnv.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_Win32FontManager.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/DllUtil.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/awt_Window.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/BlitBg.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Blit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/BufferedMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedMaskBlit.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/BufferedRenderPipe.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/BufImgSurfaceData.obj:: $(CLASSHDRDIR)/sun_awt_image_BufImgSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/BufImgSurfaceData.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/img_util_md.h
+
+$(OBJDIR)/ByteBinary1Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary1Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteBinary2Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary2Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteBinary4Bit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByteBinary.h ../../../src/share/native/sun/java2d/loops/ByteBinary4Bit.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteGray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ByteIndexed.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/CmdIDList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ComCtl32Util.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DBufImgOps.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DShaders.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DGlyphCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DGraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DMaskFill.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DMaskFill.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DPaints.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DPipelineManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DRenderer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DResourceManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DTextRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/D3DVertexCacher.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/DataBufferNative.obj:: $(CLASSHDRDIR)/sun_awt_image_DataBufferNative.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_assert.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_mem.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_trace.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/debug_util.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/Devices.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/Disposer.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/dither.obj:: ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/windows/native/sun/windows/colordata.h
+
+$(OBJDIR)/DllUtil.obj:: ../../../src/windows/native/sun/windows/DllUtil.h
+
+$(OBJDIR)/DrawLine.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawLine.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawPath.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawPolygons.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawPolygons.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/DrawRect.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_DrawRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillPath.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillPath.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/DrawPath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillRect.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillRect.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FillSpans.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_FillSpans.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FourByteAbgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgr.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/FourByteAbgrPre.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgrPre.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/GDIBlitLoops.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIHashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIRenderer.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/gifdecoder.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/GraphicsPrimitiveMgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Hashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/imageInitIDs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/img_colors.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/img_globals.obj:: $(CLASSHDRDIR)/java_awt_image_DirectColorModel.h $(CLASSHDRDIR)/java_awt_image_IndexColorModel.h $(CLASSHDRDIR)/java_awt_Transparency.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/windows/javavm/export/jni_md.h
+
+$(OBJDIR)/Index12Gray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Index8Gray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/initIDs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/IntArgbBm.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntArgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntArgbPre.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntBgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/Index8Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntRgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/IntRgbx.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/IntRgbx.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MaskFill.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/MouseInfo.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ObjectList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/OGLBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLBufImgOps.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLFuncs.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLMaskFill.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLMaskFill.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLPaints.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedPaints.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLRenderer.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLMaskBlit.h ../../../src/share/native/sun/java2d/opengl/OGLMaskFill.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLTextRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLTextRenderer.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/OGLVertexCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLPaints.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/opengl/OGLVertexCache.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h
+
+$(OBJDIR)/ProcessPath.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Region.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/RenderBuffer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RenderBuffer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/ScaledBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ShapeSpanIterator.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/ShellFolder2.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/SpanClipRenderer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RegionIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_SpanClipRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/SurfaceData.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/ThemeReader.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/ThreeByteBgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Trace.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h
+
+$(OBJDIR)/TransformHelper.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort4444Argb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort555Rgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort555Rgbx.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgbx.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/Ushort565Rgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/UshortGray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/UshortIndexed.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/loops/UshortIndexed.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h
+
+$(OBJDIR)/WGLGraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLGraphicsConfig.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
+
+$(OBJDIR)/WGLSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h
+
+$(OBJDIR)/WindowsFlags.obj:: ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/stdhdrs.h
+
+$(OBJDIR)/WPrinterJob.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/classfile_constants.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h
diff --git a/make/sun/awt/mapfile-mawt-vers b/make/sun/awt/mapfile-mawt-vers
index d04e646..d47675d 100644
--- a/make/sun/awt/mapfile-mawt-vers
+++ b/make/sun/awt/mapfile-mawt-vers
@@ -477,11 +477,11 @@
X11SurfaceData_GetOps;
getDefaultConfig;
- Java_sun_font_FontManager_getFontConfig;
- Java_sun_font_FontManager_getFontConfigAASettings;
- Java_sun_font_FontManager_getFontPath;
- Java_sun_font_FontManager_setNativeFontPath;
- Java_sun_font_FontManager_populateFontFileNameMap;
+ Java_sun_font_FontConfigManager_getFontConfig;
+ Java_sun_font_FontConfigManager_getFontConfigAASettings;
+ Java_sun_awt_X11FontManager_getFontPath;
+ Java_sun_awt_X11FontManager_setNativeFontPath;
+ Java_sun_font_SunFontManager_populateFontFileNameMap;
# CDE private entry point
Java_sun_awt_motif_XsessionWMcommand;
diff --git a/make/sun/awt/mapfile-vers-linux b/make/sun/awt/mapfile-vers-linux
index 05a7d2b..e56dba3 100644
--- a/make/sun/awt/mapfile-vers-linux
+++ b/make/sun/awt/mapfile-vers-linux
@@ -532,11 +532,11 @@
X11SurfaceData_GetOps;
getDefaultConfig;
- Java_sun_font_FontManager_getFontConfig;
- Java_sun_font_FontManager_getFontConfigAASettings;
- Java_sun_font_FontManager_getFontPath;
- Java_sun_font_FontManager_setNativeFontPath;
- Java_sun_font_FontManager_populateFontFileNameMap;
+ Java_sun_font_FontConfigManager_getFontConfig;
+ Java_sun_font_FontConfigManager_getFontConfigAASettings;
+ Java_sun_awt_X11FontManager_getFontPath;
+ Java_sun_awt_X11FontManager_setNativeFontPath;
+ Java_sun_font_SunFontManager_populateFontFileNameMap;
# CDE private entry point
Java_sun_awt_motif_XsessionWMcommand;
diff --git a/make/sun/font/Makefile b/make/sun/font/Makefile
index b81918d..f513a64 100644
--- a/make/sun/font/Makefile
+++ b/make/sun/font/Makefile
@@ -199,3 +199,7 @@
CPPFLAGS += -I$(PLATFORM_SRC)/native/sun/windows
endif
+# Make the Layout Engine build standalone
+CPPFLAGS += -DLE_STANDALONE
+
+
diff --git a/make/sun/font/mapfile-vers b/make/sun/font/mapfile-vers
index 8d1b6af..7dcbe37 100644
--- a/make/sun/font/mapfile-vers
+++ b/make/sun/font/mapfile-vers
@@ -33,12 +33,7 @@
isNullScalerContext;
Java_sun_font_NullFontScaler_getNullScalerContext;
Java_sun_font_NullFontScaler_getGlyphImage;
- Java_sun_font_FontManager_getPlatformFontVar;
- Java_sun_font_FontManager_initIDs;
- Java_sun_font_FontManager_getFont2D;
- Java_sun_font_FontManager_setFont2D;
- Java_sun_font_FontManager_isCreatedFont;
- Java_sun_font_FontManager_setCreatedFont;
+ Java_sun_font_SunFontManager_initIDs;
Java_sun_font_StrikeCache_getGlyphCacheDescription;
Java_sun_font_StrikeCache_freeIntPointer;
Java_sun_font_StrikeCache_freeLongPointer;
diff --git a/make/sun/font/mapfile-vers.openjdk b/make/sun/font/mapfile-vers.openjdk
index 2977f35..9ae0710 100644
--- a/make/sun/font/mapfile-vers.openjdk
+++ b/make/sun/font/mapfile-vers.openjdk
@@ -35,12 +35,7 @@
isNullScalerContext;
Java_sun_font_NullFontScaler_getNullScalerContext;
Java_sun_font_NullFontScaler_getGlyphImage;
- Java_sun_font_FontManager_getPlatformFontVar;
- Java_sun_font_FontManager_initIDs;
- Java_sun_font_FontManager_getFont2D;
- Java_sun_font_FontManager_setFont2D;
- Java_sun_font_FontManager_isCreatedFont;
- Java_sun_font_FontManager_setCreatedFont;
+ Java_sun_font_SunFontManager_initIDs;
Java_sun_font_StrikeCache_getGlyphCacheDescription;
Java_sun_font_StrikeCache_freeIntPointer;
Java_sun_font_StrikeCache_freeLongPointer;
diff --git a/make/sun/headless/mapfile-vers b/make/sun/headless/mapfile-vers
index a94d5a5..cd838a6 100644
--- a/make/sun/headless/mapfile-vers
+++ b/make/sun/headless/mapfile-vers
@@ -59,12 +59,10 @@
X11SurfaceData_GetOps;
Java_java_awt_Font_initIDs;
- Java_sun_font_FontManager_getFontConfig;
- Java_sun_font_FontManager_getFontConfigVersion;
- Java_sun_font_FontManager_getFontConfigAASettings;
- Java_sun_font_FontManager_getFontPath;
- Java_sun_font_FontManager_setNativeFontPath;
- Java_sun_font_FontManager_populateFontFileNameMap;
+ Java_sun_font_FontConfigManager_getFontConfig;
+ Java_sun_font_FontConfigManager_getFontConfigAASettings;
+ Java_sun_font_FontConfigManager_getFontConfigVersion;
+ Java_sun_awt_X11FontManager_getFontPath;
Java_sun_awt_FontDescriptor_initIDs;
Java_sun_awt_PlatformFont_initIDs;
diff --git a/make/sun/xawt/mapfile-vers b/make/sun/xawt/mapfile-vers
index ce536f7..d880ebb 100644
--- a/make/sun/xawt/mapfile-vers
+++ b/make/sun/xawt/mapfile-vers
@@ -182,12 +182,11 @@
Java_java_awt_ScrollPane_initIDs;
Java_java_awt_TextField_initIDs;
Java_java_awt_TrayIcon_initIDs;
- Java_sun_font_FontManager_getFontConfig;
- Java_sun_font_FontManager_getFontConfigVersion;
- Java_sun_font_FontManager_getFontConfigAASettings;
- Java_sun_font_FontManager_getFontPath;
- Java_sun_font_FontManager_setNativeFontPath;
- Java_sun_font_FontManager_populateFontFileNameMap;
+ Java_sun_font_FontConfigManager_getFontConfig;
+ Java_sun_font_FontConfigManager_getFontConfigAASettings;
+ Java_sun_font_FontConfigManager_getFontConfigVersion;
+ Java_sun_awt_X11FontManager_getFontPath;
+ Java_sun_font_X11FontManager_setNativeFontPath;
Java_sun_awt_X11GraphicsEnvironment_initDisplay;
Java_sun_awt_X11GraphicsEnvironment_initGLX;
Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
diff --git a/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java b/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java
index 9b1f1d2..783c000 100644
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java
@@ -29,7 +29,9 @@
import java.awt.geom.AffineTransform;
import javax.swing.plaf.FontUIResource;
import java.util.StringTokenizer;
-import sun.font.FontManager;
+
+import sun.font.FontConfigManager;
+import sun.font.FontUtilities;
/**
* @author Shannon Hickey
@@ -193,13 +195,13 @@
}
String fcFamilyLC = family.toLowerCase();
- if (FontManager.mapFcName(fcFamilyLC) != null) {
+ if (FontUtilities.mapFcName(fcFamilyLC) != null) {
/* family is a Fc/Pango logical font which we need to expand. */
- return FontManager.getFontConfigFUIR(fcFamilyLC, style, size);
+ return FontUtilities.getFontConfigFUIR(fcFamilyLC, style, size);
} else {
/* It's a physical font which we will create with a fallback */
Font font = new FontUIResource(family, style, size);
- return FontManager.getCompositeFontUIResource(font);
+ return FontUtilities.getCompositeFontUIResource(font);
}
}
diff --git a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java
index c388f80..0572802 100644
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java
@@ -63,7 +63,7 @@
import sun.awt.SunToolkit;
import sun.awt.OSInfo;
import sun.awt.shell.ShellFolder;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
import sun.security.action.GetPropertyAction;
import sun.swing.DefaultLayoutStyle;
@@ -2289,13 +2289,14 @@
font.getStyle(), size);
}
}
- if (FontManager.fontSupportsDefaultEncoding(font)) {
+
+ if (FontUtilities.fontSupportsDefaultEncoding(font)) {
if (!(font instanceof UIResource)) {
font = new FontUIResource(font);
}
}
else {
- font = FontManager.getCompositeFontUIResource(font);
+ font = FontUtilities.getCompositeFontUIResource(font);
}
return font;
diff --git a/src/share/classes/java/awt/AWTEvent.java b/src/share/classes/java/awt/AWTEvent.java
index 3fa0113..a6d46c1 100644
--- a/src/share/classes/java/awt/AWTEvent.java
+++ b/src/share/classes/java/awt/AWTEvent.java
@@ -30,9 +30,8 @@
import java.awt.peer.ComponentPeer;
import java.awt.peer.LightweightPeer;
import java.lang.reflect.Field;
-import java.util.logging.Logger;
-import java.util.logging.Level;
import sun.awt.AWTAccessor;
+import sun.util.logging.PlatformLogger;
/**
* The root event class for all AWT events.
@@ -76,7 +75,7 @@
* @since 1.1
*/
public abstract class AWTEvent extends EventObject {
- private static final Logger log = Logger.getLogger("java.awt.AWTEvent");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AWTEvent");
private byte bdata[];
/**
@@ -252,12 +251,12 @@
field.setAccessible(true);
return field;
} catch (SecurityException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
}
} catch (NoSuchFieldException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
}
}
return null;
@@ -549,8 +548,8 @@
boolean b = field.getBoolean(this);
field.setBoolean(that, b);
} catch(IllegalAccessException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
}
}
}
@@ -564,8 +563,8 @@
try {
field.setBoolean(this, false);
} catch(IllegalAccessException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "AWTEvent.dispatched() got IllegalAccessException ", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
}
}
}
diff --git a/src/share/classes/java/awt/AttributeValue.java b/src/share/classes/java/awt/AttributeValue.java
index 25c298c..e4f708c 100644
--- a/src/share/classes/java/awt/AttributeValue.java
+++ b/src/share/classes/java/awt/AttributeValue.java
@@ -25,21 +25,21 @@
package java.awt;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
abstract class AttributeValue {
- private static final Logger log = Logger.getLogger("java.awt.AttributeValue");
-
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AttributeValue");
private final int value;
private final String[] names;
protected AttributeValue(int value, String[] names) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "value = " + value + ", names = " + names);
+ if (log.isLoggable(PlatformLogger.FINEST)) {
+ log.finest("value = " + value + ", names = " + names);
}
- if (log.isLoggable(Level.FINER)) {
+
+ if (log.isLoggable(PlatformLogger.FINER)) {
if ((value < 0) || (names == null) || (value >= names.length)) {
- log.log(Level.FINER, "Assertion failed");
+ log.finer("Assertion failed");
}
}
this.value = value;
diff --git a/src/share/classes/java/awt/Component.java b/src/share/classes/java/awt/Component.java
index 7c73f27..e9c274f 100644
--- a/src/share/classes/java/awt/Component.java
+++ b/src/share/classes/java/awt/Component.java
@@ -60,7 +60,6 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import javax.accessibility.*;
-import java.util.logging.*;
import java.applet.Applet;
import sun.security.action.GetPropertyAction;
@@ -74,6 +73,9 @@
import sun.awt.EmbeddedFrame;
import sun.awt.dnd.SunDropTargetEvent;
import sun.awt.im.CompositionArea;
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
import sun.java2d.SunGraphics2D;
import sun.java2d.pipe.Region;
import sun.awt.image.VSyncedBSManager;
@@ -81,6 +83,7 @@
import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
import sun.awt.RequestFocusController;
import sun.java2d.SunGraphicsEnvironment;
+import sun.util.logging.PlatformLogger;
/**
* A <em>component</em> is an object having a graphical representation
@@ -91,7 +94,17 @@
* the nonmenu-related Abstract Window Toolkit components. Class
* <code>Component</code> can also be extended directly to create a
* lightweight component. A lightweight component is a component that is
- * not associated with a native opaque window.
+ * not associated with a native window. On the contrary, a heavyweight
+ * component is associated with a native window. The {@link #isLightweight()}
+ * method may be used to distinguish between the two kinds of the components.
+ * <p>
+ * Lightweight and heavyweight components may be mixed in a single component
+ * hierarchy. However, for correct operating of such a mixed hierarchy of
+ * components, the whole hierarchy must be valid. When the hierarchy gets
+ * invalidated, like after changing the bounds of components, or
+ * adding/removing components to/from containers, the whole hierarchy must be
+ * validated afterwards by means of the {@link Container#validate()} method
+ * invoked on the top-most invalid container of the hierarchy.
* <p>
* <h3>Serialization</h3>
* It is important to note that only AWT listeners which conform
@@ -175,10 +188,10 @@
Serializable
{
- private static final Logger log = Logger.getLogger("java.awt.Component");
- private static final Logger eventLog = Logger.getLogger("java.awt.event.Component");
- private static final Logger focusLog = Logger.getLogger("java.awt.focus.Component");
- private static final Logger mixingLog = Logger.getLogger("java.awt.mixing.Component");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Component");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Component");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
+ private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
/**
* The peer of the component. The peer implements the component's
@@ -1489,9 +1502,14 @@
/**
* Shows or hides this component depending on the value of parameter
* <code>b</code>.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param b if <code>true</code>, shows this component;
* otherwise, hides this component
* @see #isVisible
+ * @see #invalidate
* @since JDK1.1
*/
public void setVisible(boolean b) {
@@ -1750,10 +1768,15 @@
/**
* Sets the font of this component.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param f the font to become this component's font;
* if this parameter is <code>null</code> then this
* component will inherit the font of its parent
* @see #getFont
+ * @see #invalidate
* @since JDK1.0
* @beaninfo
* bound: true
@@ -1827,8 +1850,13 @@
/**
* Sets the locale of this component. This is a bound property.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param l the locale to become this component's locale
* @see #getLocale
+ * @see #invalidate
* @since JDK1.1
*/
public void setLocale(Locale l) {
@@ -1948,12 +1976,17 @@
* Moves this component to a new location. The top-left corner of
* the new location is specified by the <code>x</code> and <code>y</code>
* parameters in the coordinate space of this component's parent.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param x the <i>x</i>-coordinate of the new location's
* top-left corner in the parent's coordinate space
* @param y the <i>y</i>-coordinate of the new location's
* top-left corner in the parent's coordinate space
* @see #getLocation
* @see #setBounds
+ * @see #invalidate
* @since JDK1.1
*/
public void setLocation(int x, int y) {
@@ -1976,11 +2009,16 @@
* Moves this component to a new location. The top-left corner of
* the new location is specified by point <code>p</code>. Point
* <code>p</code> is given in the parent's coordinate space.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param p the point defining the top-left corner
* of the new location, given in the coordinate space of this
* component's parent
* @see #getLocation
* @see #setBounds
+ * @see #invalidate
* @since JDK1.1
*/
public void setLocation(Point p) {
@@ -2015,10 +2053,15 @@
/**
* Resizes this component so that it has width <code>width</code>
* and height <code>height</code>.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param width the new width of this component in pixels
* @param height the new height of this component in pixels
* @see #getSize
* @see #setBounds
+ * @see #invalidate
* @since JDK1.1
*/
public void setSize(int width, int height) {
@@ -2040,10 +2083,15 @@
/**
* Resizes this component so that it has width <code>d.width</code>
* and height <code>d.height</code>.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param d the dimension specifying the new size
* of this component
* @see #setSize
* @see #setBounds
+ * @see #invalidate
* @since JDK1.1
*/
public void setSize(Dimension d) {
@@ -2086,6 +2134,10 @@
* Moves and resizes this component. The new location of the top-left
* corner is specified by <code>x</code> and <code>y</code>, and the
* new size is specified by <code>width</code> and <code>height</code>.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param x the new <i>x</i>-coordinate of this component
* @param y the new <i>y</i>-coordinate of this component
* @param width the new <code>width</code> of this component
@@ -2096,6 +2148,7 @@
* @see #setLocation(Point)
* @see #setSize(int, int)
* @see #setSize(Dimension)
+ * @see #invalidate
* @since JDK1.1
*/
public void setBounds(int x, int y, int width, int height) {
@@ -2228,12 +2281,17 @@
* position is specified by <code>r.x</code> and <code>r.y</code>,
* and its new size is specified by <code>r.width</code> and
* <code>r.height</code>
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param r the new bounding rectangle for this component
* @see #getBounds
* @see #setLocation(int, int)
* @see #setLocation(Point)
* @see #setSize(int, int)
* @see #setSize(Dimension)
+ * @see #invalidate
* @since JDK1.1
*/
public void setBounds(Rectangle r) {
@@ -2848,8 +2906,12 @@
* @since JDK1.0
*/
public FontMetrics getFontMetrics(Font font) {
- // REMIND: PlatformFont flag should be obsolete soon...
- if (sun.font.FontManager.usePlatformFontMetrics()) {
+ // This is an unsupported hack, but left in for a customer.
+ // Do not remove.
+ FontManager fm = FontManagerFactory.getInstance();
+ if (fm instanceof SunFontManager
+ && ((SunFontManager) fm).usePlatformFontMetrics()) {
+
if (peer != null &&
!(peer instanceof LightweightPeer)) {
return peer.getFontMetrics(font);
@@ -4471,13 +4533,13 @@
// Check that this component belongs to this app-context
AppContext compContext = appContext;
if (compContext != null && !compContext.equals(AppContext.getAppContext())) {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "Event " + e + " is being dispatched on the wrong AppContext");
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext");
}
}
- if (eventLog.isLoggable(Level.FINEST)) {
- eventLog.log(Level.FINEST, "{0}", String.valueOf(e));
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+ eventLog.finest("{0}", e);
}
/*
@@ -4512,8 +4574,8 @@
return;
}
}
- if ((e instanceof FocusEvent) && focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "" + e);
+ if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("" + e);
}
// MouseWheel may need to be retargeted here so that
// AWTEventListener sees the event go to the correct
@@ -4570,8 +4632,8 @@
if (inputContext != null) {
inputContext.dispatchEvent(e);
if (e.isConsumed()) {
- if ((e instanceof FocusEvent) && focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "3579: Skipping " + e);
+ if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("3579: Skipping " + e);
}
return;
}
@@ -4605,8 +4667,8 @@
if (p != null) {
p.preProcessKeyEvent((KeyEvent)e);
if (e.isConsumed()) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Pre-process consumed event");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Pre-process consumed event");
}
return;
}
@@ -4738,9 +4800,9 @@
// position relative to its parent.
MouseWheelEvent newMWE;
- if (eventLog.isLoggable(Level.FINEST)) {
- eventLog.log(Level.FINEST, "dispatchMouseWheelToAncestor");
- eventLog.log(Level.FINEST, "orig event src is of " + e.getSource().getClass());
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+ eventLog.finest("dispatchMouseWheelToAncestor");
+ eventLog.finest("orig event src is of " + e.getSource().getClass());
}
/* parent field for Window refers to the owning Window.
@@ -4761,8 +4823,8 @@
}
}
- if (eventLog.isLoggable(Level.FINEST)) {
- eventLog.log(Level.FINEST, "new event src is " + anc.getClass());
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+ eventLog.finest("new event src is " + anc.getClass());
}
if (anc != null && anc.eventEnabled(e)) {
@@ -5257,11 +5319,11 @@
// Should only be called while holding the tree lock
int numListening(long mask) {
// One mask or the other, but not neither or both.
- if (eventLog.isLoggable(Level.FINE)) {
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
(mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK))
{
- eventLog.log(Level.FINE, "Assertion failed");
+ eventLog.fine("Assertion failed");
}
}
if ((mask == AWTEvent.HIERARCHY_EVENT_MASK &&
@@ -5298,9 +5360,9 @@
break;
case HierarchyEvent.ANCESTOR_MOVED:
case HierarchyEvent.ANCESTOR_RESIZED:
- if (eventLog.isLoggable(Level.FINE)) {
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
if (changeFlags != 0) {
- eventLog.log(Level.FINE, "Assertion (changeFlags == 0) failed");
+ eventLog.fine("Assertion (changeFlags == 0) failed");
}
}
if (hierarchyBoundsListener != null ||
@@ -5314,8 +5376,8 @@
break;
default:
// assert false
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "This code must never be reached");
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("This code must never be reached");
}
break;
}
@@ -6618,8 +6680,13 @@
* native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @see #isDisplayable
* @see #removeNotify
+ * @see #invalidate
* @since JDK1.0
*/
public void addNotify() {
@@ -7376,8 +7443,8 @@
CausedFocusEvent.Cause cause)
{
if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "requestFocus is not accepted");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("requestFocus is not accepted");
}
return false;
}
@@ -7388,8 +7455,8 @@
Component window = this;
while ( (window != null) && !(window instanceof Window)) {
if (!window.isVisible()) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "component is recurively invisible");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("component is recurively invisible");
}
return false;
}
@@ -7400,15 +7467,15 @@
Component heavyweight = (peer instanceof LightweightPeer)
? getNativeContainer() : this;
if (heavyweight == null || !heavyweight.isVisible()) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Component is not a part of visible hierarchy");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Component is not a part of visible hierarchy");
}
return false;
}
peer = heavyweight.peer;
if (peer == null) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Peer is null");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Peer is null");
}
return false;
}
@@ -7420,12 +7487,12 @@
if (!success) {
KeyboardFocusManager.getCurrentKeyboardFocusManager
(appContext).dequeueKeyEvents(time, this);
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Peer request failed");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Peer request failed");
}
} else {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Pass for " + this);
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Pass for " + this);
}
}
return success;
@@ -7436,24 +7503,24 @@
CausedFocusEvent.Cause cause)
{
if (!isFocusable() || !isVisible()) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Not focusable or not visible");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Not focusable or not visible");
}
return false;
}
ComponentPeer peer = this.peer;
if (peer == null) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "peer is null");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("peer is null");
}
return false;
}
Window window = getContainingWindow();
if (window == null || !((Window)window).isFocusableWindow()) {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Component doesn't have toplevel");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("Component doesn't have toplevel");
}
return false;
}
@@ -7474,8 +7541,8 @@
// Controller is supposed to verify focus transfers and for this it
// should know both from and to components. And it shouldn't verify
// transfers from when these components are equal.
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "focus owner is null or this");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("focus owner is null or this");
}
return true;
}
@@ -7487,8 +7554,8 @@
// most recent focus owner. But most recent focus owner can be
// changed by requestFocsuXXX() call only, so this transfer has
// been already approved.
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "cause is activation");
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("cause is activation");
}
return true;
}
@@ -7498,8 +7565,8 @@
temporary,
focusedWindowChangeAllowed,
cause);
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "RequestFocusController returns {0}", ret);
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest("RequestFocusController returns {0}", ret);
}
return ret;
@@ -7590,7 +7657,7 @@
}
boolean transferFocus(boolean clearOnFailure) {
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clearOnFailure = " + clearOnFailure);
}
Component toFocus = getNextFocusCandidate();
@@ -7599,12 +7666,12 @@
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
}
if (clearOnFailure && !res) {
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
}
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
@@ -7619,19 +7686,19 @@
comp = rootAncestor;
rootAncestor = comp.getFocusCycleRootAncestor();
}
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
}
Component candidate = null;
if (rootAncestor != null) {
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component toFocus = policy.getComponentAfter(rootAncestor, comp);
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("component after is " + toFocus);
}
if (toFocus == null) {
toFocus = policy.getDefaultComponent(rootAncestor);
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("default component is " + toFocus);
}
}
@@ -7643,7 +7710,7 @@
}
candidate = toFocus;
}
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("Focus transfer candidate: " + candidate);
}
return candidate;
@@ -7680,12 +7747,12 @@
}
}
if (!res) {
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
}
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
@@ -8586,8 +8653,13 @@
* To set the orientation of an entire component
* hierarchy, use
* {@link #applyComponentOrientation applyComponentOrientation}.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
*
* @see ComponentOrientation
+ * @see #invalidate
*
* @author Laura Werner, IBM
* @beaninfo
@@ -8623,12 +8695,17 @@
/**
* Sets the <code>ComponentOrientation</code> property of this component
* and all components contained within it.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
*
* @param orientation the new component orientation of this component and
* the components contained within it.
* @exception NullPointerException if <code>orientation</code> is null.
* @see #setComponentOrientation
* @see #getComponentOrientation
+ * @see #invalidate
* @since 1.4
*/
public void applyComponentOrientation(ComponentOrientation orientation) {
@@ -9441,7 +9518,7 @@
checkTreeLock();
if (!areBoundsValid()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return;
@@ -9477,7 +9554,7 @@
}
this.compoundShape = shape;
Point compAbsolute = getLocationOnWindow();
- if (mixingLog.isLoggable(Level.FINER)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINER)) {
mixingLog.fine("this = " + this +
"; compAbsolute=" + compAbsolute + "; shape=" + shape);
}
@@ -9611,7 +9688,7 @@
checkTreeLock();
Region s = getNormalShape();
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; normalShape=" + s);
}
@@ -9645,7 +9722,7 @@
}
}
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("currentShape=" + s);
}
@@ -9655,12 +9732,12 @@
void applyCurrentShape() {
checkTreeLock();
if (!areBoundsValid()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return; // Because applyCompoundShape() ignores such components anyway
}
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
applyCompoundShape(calculateCurrentShape());
@@ -9669,7 +9746,7 @@
final void subtractAndApplyShape(Region s) {
checkTreeLock();
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; s=" + s);
}
@@ -9716,7 +9793,7 @@
void mixOnShowing() {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
@@ -9734,7 +9811,7 @@
// We cannot be sure that the peer exists at this point, so we need the argument
// to find out whether the hiding component is (well, actually was) a LW or a HW.
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight);
}
if (!isMixingNeeded()) {
@@ -9748,7 +9825,7 @@
void mixOnReshaping() {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
@@ -9767,7 +9844,7 @@
boolean becameHigher = newZorder < oldZorder;
Container parent = getContainer();
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent);
}
@@ -9811,13 +9888,13 @@
final boolean isMixingNeeded() {
if (SunToolkit.getSunAwtDisableMixing()) {
- if (mixingLog.isLoggable(Level.FINEST)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINEST)) {
mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
}
return false;
}
if (!areBoundsValid()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return false;
@@ -9825,7 +9902,7 @@
Window window = getContainingWindow();
if (window != null) {
if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("containing window = " + window +
"; has h/w descendants = " + window.hasHeavyweightDescendants() +
"; has l/w descendants = " + window.hasLightweightDescendants());
@@ -9833,8 +9910,8 @@
return false;
}
} else {
- if (mixingLog.isLoggable(Level.FINE)) {
- mixingLog.finest("this = " + this + "; containing window is null");
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
+ mixingLog.fine("this = " + this + "; containing window is null");
}
return false;
}
diff --git a/src/share/classes/java/awt/Container.java b/src/share/classes/java/awt/Container.java
index 6456583..010d8b0 100644
--- a/src/share/classes/java/awt/Container.java
+++ b/src/share/classes/java/awt/Container.java
@@ -46,10 +46,10 @@
import java.util.HashSet;
import java.util.Set;
-import java.util.logging.*;
-
import javax.accessibility.*;
+import sun.util.logging.PlatformLogger;
+
import sun.awt.AppContext;
import sun.awt.CausedFocusEvent;
import sun.awt.PeerEvent;
@@ -85,8 +85,8 @@
*/
public class Container extends Component {
- private static final Logger log = Logger.getLogger("java.awt.Container");
- private static final Logger eventLog = Logger.getLogger("java.awt.event.Container");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Container");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Container");
private static final Component[] EMPTY_ARRAY = new Component[0];
@@ -201,7 +201,7 @@
private transient int numOfHWComponents = 0;
private transient int numOfLWComponents = 0;
- private static final Logger mixingLog = Logger.getLogger("java.awt.mixing.Container");
+ private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Container");
/**
* @serialField ncomponents int
@@ -381,16 +381,15 @@
* Appends the specified component to the end of this container.
* This is a convenience method for {@link #addImpl}.
* <p>
- * Note: If a component has been added to a container that
- * has been displayed, <code>validate</code> must be
- * called on that container to display the new component.
- * If multiple components are being added, you can improve
- * efficiency by calling <code>validate</code> only once,
- * after all the components have been added.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
*
* @param comp the component to be added
* @exception NullPointerException if {@code comp} is {@code null}
* @see #addImpl
+ * @see #invalidate
* @see #validate
* @see javax.swing.JComponent#revalidate()
* @return the component argument
@@ -406,8 +405,15 @@
* <p>
* This method is obsolete as of 1.1. Please use the
* method <code>add(Component, Object)</code> instead.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
+ *
* @exception NullPointerException if {@code comp} is {@code null}
* @see #add(Component, Object)
+ * @see #invalidate
*/
public Component add(String name, Component comp) {
addImpl(comp, name, -1);
@@ -419,12 +425,11 @@
* position.
* This is a convenience method for {@link #addImpl}.
* <p>
- * Note: If a component has been added to a container that
- * has been displayed, <code>validate</code> must be
- * called on that container to display the new component.
- * If multiple components are being added, you can improve
- * efficiency by calling <code>validate</code> only once,
- * after all the components have been added.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
+ *
*
* @param comp the component to be added
* @param index the position at which to insert the component,
@@ -435,6 +440,7 @@
* @return the component <code>comp</code>
* @see #addImpl
* @see #remove
+ * @see #invalidate
* @see #validate
* @see javax.swing.JComponent#revalidate()
*/
@@ -700,6 +706,9 @@
* This property is guaranteed to apply only to lightweight
* non-<code>Container</code> components.
* <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ * <p>
* <b>Note</b>: Not all platforms support changing the z-order of
* heavyweight components from one container into another without
* the call to <code>removeNotify</code>. There is no way to detect
@@ -723,6 +732,7 @@
* @exception IllegalArgumentException if adding a <code>Window</code>
* to a container
* @see #getComponentZOrder(java.awt.Component)
+ * @see #invalidate
* @since 1.5
*/
public void setComponentZOrder(Component comp, int index) {
@@ -923,18 +933,18 @@
* this container's layout using the specified constraints object.
* This is a convenience method for {@link #addImpl}.
* <p>
- * Note: If a component has been added to a container that
- * has been displayed, <code>validate</code> must be
- * called on that container to display the new component.
- * If multiple components are being added, you can improve
- * efficiency by calling <code>validate</code> only once,
- * after all the components have been added.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
+ *
*
* @param comp the component to be added
* @param constraints an object expressing
* layout contraints for this component
* @exception NullPointerException if {@code comp} is {@code null}
* @see #addImpl
+ * @see #invalidate
* @see #validate
* @see javax.swing.JComponent#revalidate()
* @see LayoutManager
@@ -951,12 +961,11 @@
* the specified constraints object.
* This is a convenience method for {@link #addImpl}.
* <p>
- * Note: If a component has been added to a container that
- * has been displayed, <code>validate</code> must be
- * called on that container to display the new component.
- * If multiple components are being added, you can improve
- * efficiency by calling <code>validate</code> only once,
- * after all the components have been added.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
+ *
*
* @param comp the component to be added
* @param constraints an object expressing layout contraints for this
@@ -967,6 +976,7 @@
* @exception IllegalArgumentException if {@code index} is invalid (see
* {@link #addImpl} for details)
* @see #addImpl
+ * @see #invalidate
* @see #validate
* @see javax.swing.JComponent#revalidate()
* @see #remove
@@ -1014,6 +1024,11 @@
* <code>super.addImpl(comp, constraints, index)</code>
* </blockquote>
* <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * display the added component.
+ *
* @param comp the component to be added
* @param constraints an object expressing layout constraints
* for this component
@@ -1033,6 +1048,7 @@
* @see #add(Component)
* @see #add(Component, int)
* @see #add(Component, java.lang.Object)
+ * @see #invalidate
* @see LayoutManager
* @see LayoutManager2
* @since JDK1.1
@@ -1145,19 +1161,18 @@
* This method also notifies the layout manager to remove the
* component from this container's layout via the
* <code>removeLayoutComponent</code> method.
- *
* <p>
- * Note: If a component has been removed from a container that
- * had been displayed, {@link #validate} must be
- * called on that container to reflect changes.
- * If multiple components are being removed, you can improve
- * efficiency by calling {@link #validate} only once,
- * after all the components have been removed.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * reflect the changes.
+ *
*
* @param index the index of the component to be removed
* @throws ArrayIndexOutOfBoundsException if {@code index} is not in
* range {@code [0, getComponentCount()-1]}
* @see #add
+ * @see #invalidate
* @see #validate
* @see #getComponentCount
* @since JDK1.1
@@ -1209,17 +1224,15 @@
* This method also notifies the layout manager to remove the
* component from this container's layout via the
* <code>removeLayoutComponent</code> method.
- *
* <p>
- * Note: If a component has been removed from a container that
- * had been displayed, {@link #validate} must be
- * called on that container to reflect changes.
- * If multiple components are being removed, you can improve
- * efficiency by calling {@link #validate} only once,
- * after all the components have been removed.
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * reflect the changes.
*
* @param comp the component to be removed
* @see #add
+ * @see #invalidate
* @see #validate
* @see #remove(int)
*/
@@ -1239,8 +1252,15 @@
* This method also notifies the layout manager to remove the
* components from this container's layout via the
* <code>removeLayoutComponent</code> method.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy. If the container has already been
+ * displayed, the hierarchy must be validated thereafter in order to
+ * reflect the changes.
+ *
* @see #add
* @see #remove
+ * @see #invalidate
*/
public void removeAll() {
synchronized (getTreeLock()) {
@@ -1287,33 +1307,33 @@
int superListening = super.numListening(mask);
if (mask == AWTEvent.HIERARCHY_EVENT_MASK) {
- if (eventLog.isLoggable(Level.FINE)) {
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
if (listeningChildren != sum) {
- eventLog.log(Level.FINE, "Assertion (listeningChildren == sum) failed");
+ eventLog.fine("Assertion (listeningChildren == sum) failed");
}
}
return listeningChildren + superListening;
} else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
- if (eventLog.isLoggable(Level.FINE)) {
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningBoundsChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
if (listeningBoundsChildren != sum) {
- eventLog.log(Level.FINE, "Assertion (listeningBoundsChildren == sum) failed");
+ eventLog.fine("Assertion (listeningBoundsChildren == sum) failed");
}
}
return listeningBoundsChildren + superListening;
} else {
// assert false;
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "This code must never be reached");
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("This code must never be reached");
}
return superListening;
}
@@ -1321,13 +1341,13 @@
// Should only be called while holding tree lock
void adjustListeningChildren(long mask, int num) {
- if (eventLog.isLoggable(Level.FINE)) {
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
mask == (AWTEvent.HIERARCHY_EVENT_MASK |
AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
if (!toAssert) {
- eventLog.log(Level.FINE, "Assertion failed");
+ eventLog.fine("Assertion failed");
}
}
@@ -1362,14 +1382,14 @@
// Should only be called while holding tree lock
int countHierarchyMembers() {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
// Verify descendantsCount is correct
int sum = 0;
for (Component comp : component) {
sum += comp.countHierarchyMembers();
}
if (descendantsCount != sum) {
- log.log(Level.FINE, "Assertion (descendantsCount == sum) failed");
+ log.fine("Assertion (descendantsCount == sum) failed");
}
}
return descendantsCount + 1;
@@ -1432,9 +1452,14 @@
/**
* Sets the layout manager for this container.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param mgr the specified layout manager
* @see #doLayout
* @see #getLayout
+ * @see #invalidate
*/
public void setLayout(LayoutManager mgr) {
layoutMgr = mgr;
@@ -1502,9 +1527,17 @@
* <p>If this {@code Container} is not valid, this method invokes
* the {@code validateTree} method and marks this {@code Container}
* as valid. Otherwise, no action is performed.
+ * <p>
+ * Note that the {@code invalidate()} method may invalidate not only the
+ * component it is called upon, but also the parents of the component.
+ * Therefore, to restore the validity of the hierarchy, the {@code
+ * validate()} method must be invoked on the top-most invalid container of
+ * the hierarchy. For performance reasons a developer may postpone the
+ * validation of the hierarchy till a bunch of layout-related operations
+ * completes, e.g. after adding all the children to the container.
*
* @see #add(java.awt.Component)
- * @see Component#invalidate
+ * @see #invalidate
* @see javax.swing.JComponent#revalidate()
* @see #validateTree
*/
@@ -1588,8 +1621,13 @@
/**
* Sets the font of this container.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
+ *
* @param f The font to become this container's font.
* @see Component#getFont
+ * @see #invalidate
* @since JDK1.0
*/
public void setFont(Font f) {
@@ -3386,12 +3424,16 @@
/**
* Sets the <code>ComponentOrientation</code> property of this container
* and all components contained within it.
+ * <p>
+ * This method changes layout-related information, and therefore,
+ * invalidates the component hierarchy.
*
* @param o the new component orientation of this container and
* the components contained within it.
* @exception NullPointerException if <code>orientation</code> is null.
* @see Component#setComponentOrientation
* @see Component#getComponentOrientation
+ * @see #invalidate
* @since 1.4
*/
public void applyComponentOrientation(ComponentOrientation o) {
@@ -3924,7 +3966,7 @@
final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) {
checkTreeLock();
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
@@ -3961,7 +4003,7 @@
final void recursiveApplyCurrentShape(int fromZorder, int toZorder) {
checkTreeLock();
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
@@ -4065,20 +4107,20 @@
@Override
void mixOnShowing() {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
- if (!isMixingNeeded()) {
- return;
- }
-
boolean isLightweight = isLightweight();
if (isLightweight && isRecursivelyVisibleUpToHeavyweightContainer()) {
recursiveShowHeavyweightChildren();
}
+ if (!isMixingNeeded()) {
+ return;
+ }
+
if (!isLightweight || (isLightweight && hasHeavyweightDescendants())) {
recursiveApplyCurrentShape();
}
@@ -4090,7 +4132,7 @@
@Override
void mixOnHiding(boolean isLightweight) {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; isLightweight=" + isLightweight);
}
@@ -4104,7 +4146,7 @@
@Override
void mixOnReshaping() {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
@@ -4139,7 +4181,7 @@
@Override
void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; oldZ=" + oldZorder + "; newZ=" + newZorder);
}
@@ -4160,7 +4202,7 @@
@Override
void mixOnValidating() {
synchronized (getTreeLock()) {
- if (mixingLog.isLoggable(Level.FINE)) {
+ if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
@@ -4206,7 +4248,7 @@
*/
private static final int LWD_MOUSE_DRAGGED_OVER = 1500;
- private static final Logger eventLog = Logger.getLogger("java.awt.event.LightweightDispatcher");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
LightweightDispatcher(Container nativeContainer) {
this.nativeContainer = nativeContainer;
@@ -4348,10 +4390,10 @@
// This may send it somewhere that doesn't have MouseWheelEvents
// enabled. In this case, Component.dispatchEventImpl() will
// retarget the event to a parent that DOES have the events enabled.
- if (eventLog.isLoggable(Level.FINEST) && (mouseOver != null)) {
- eventLog.log(Level.FINEST, "retargeting mouse wheel to " +
- mouseOver.getName() + ", " +
- mouseOver.getClass());
+ if (eventLog.isLoggable(PlatformLogger.FINEST) && (mouseOver != null)) {
+ eventLog.finest("retargeting mouse wheel to " +
+ mouseOver.getName() + ", " +
+ mouseOver.getClass());
}
retargetMouseEvent(mouseOver, id, e);
break;
diff --git a/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java b/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
index e3913a7..dc5f830 100644
--- a/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
+++ b/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
@@ -24,9 +24,9 @@
*/
package java.awt;
-import java.util.logging.*;
import java.util.List;
import java.util.ArrayList;
+import sun.util.logging.PlatformLogger;
/**
* A FocusTraversalPolicy that determines traversal order based on the order
@@ -60,7 +60,7 @@
public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
implements java.io.Serializable
{
- private static final Logger log = Logger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
final private int FORWARD_TRAVERSAL = 0;
final private int BACKWARD_TRAVERSAL = 1;
@@ -165,7 +165,7 @@
if (getImplicitDownCycleTraversal()) {
retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
- if (retComp != null && log.isLoggable(Level.FINE)) {
+ if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Transfered focus down-cycle to " + retComp +
" in the focus cycle root " + cont);
}
@@ -177,7 +177,7 @@
cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
cont.getFocusTraversalPolicy().getLastComponent(cont));
- if (retComp != null && log.isLoggable(Level.FINE)) {
+ if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
}
}
@@ -208,7 +208,7 @@
* aComponent is null
*/
public Component getComponentAfter(Container aContainer, Component aComponent) {
- if (log.isLoggable(Level.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
if (aContainer == null || aComponent == null) {
throw new IllegalArgumentException("aContainer and aComponent cannot be null");
@@ -236,7 +236,7 @@
// See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent);
}
@@ -247,7 +247,7 @@
// Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found.
if (afterComp != null) {
- if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + afterComp);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
return afterComp;
}
aComponent = provider;
@@ -255,12 +255,12 @@
List<Component> cycle = getFocusTraversalCycle(aContainer);
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
int index = getComponentIndex(cycle, aComponent);
if (index < 0) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
}
return getFirstComponent(aContainer);
@@ -325,7 +325,7 @@
// See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent);
}
@@ -336,7 +336,7 @@
// Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found.
if (beforeComp != null) {
- if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + beforeComp);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
return beforeComp;
}
aComponent = provider;
@@ -349,12 +349,12 @@
List<Component> cycle = getFocusTraversalCycle(aContainer);
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
int index = getComponentIndex(cycle, aComponent);
if (index < 0) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
}
return getLastComponent(aContainer);
@@ -401,7 +401,7 @@
public Component getFirstComponent(Container aContainer) {
List<Component> cycle;
- if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null");
@@ -420,10 +420,10 @@
}
if (cycle.size() == 0) {
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null;
}
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (Component comp : cycle) {
if (accept(comp)) {
@@ -451,7 +451,7 @@
*/
public Component getLastComponent(Container aContainer) {
List<Component> cycle;
- if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null");
@@ -470,10 +470,10 @@
}
if (cycle.size() == 0) {
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null;
}
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (int i= cycle.size() - 1; i >= 0; i--) {
Component comp = cycle.get(i);
diff --git a/src/share/classes/java/awt/Cursor.java b/src/share/classes/java/awt/Cursor.java
index b5e7e36..9f841f1 100644
--- a/src/share/classes/java/awt/Cursor.java
+++ b/src/share/classes/java/awt/Cursor.java
@@ -36,10 +36,10 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import java.util.logging.*;
-
import java.security.AccessController;
+import sun.util.logging.PlatformLogger;
+
/**
* A class to encapsulate the bitmap representation of the mouse cursor.
*
@@ -191,7 +191,7 @@
*/
private static final long serialVersionUID = 8028237497568985504L;
- private static final Logger log = Logger.getLogger("java.awt.Cursor");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Cursor");
static {
/* ensure that the necessary native libraries are loaded */
@@ -298,8 +298,8 @@
String key = prefix + DotFileSuffix;
if (!systemCustomCursorProperties.containsKey(key)) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
}
return null;
}
@@ -353,8 +353,8 @@
}
if (cursor == null) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
}
} else {
systemCustomCursors.put(name, cursor);
diff --git a/src/share/classes/java/awt/DefaultKeyboardFocusManager.java b/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
index d7e5cba..4bc8b8f 100644
--- a/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
+++ b/src/share/classes/java/awt/DefaultKeyboardFocusManager.java
@@ -35,8 +35,7 @@
import java.util.ListIterator;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
@@ -62,7 +61,7 @@
* @since 1.4
*/
public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
- private static final Logger focusLog = Logger.getLogger("java.awt.focus.DefaultKeyboardFocusManager");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.DefaultKeyboardFocusManager");
// null weak references to not create too many objects
private static final WeakReference<Window> NULL_WINDOW_WR =
@@ -275,7 +274,7 @@
* <code>false</code> otherwise
*/
public boolean dispatchEvent(AWTEvent e) {
- if (focusLog.isLoggable(Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e);
+ if (focusLog.isLoggable(PlatformLogger.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e);
switch (e.getID()) {
case WindowEvent.WINDOW_GAINED_FOCUS: {
WindowEvent we = (WindowEvent)e;
@@ -378,9 +377,9 @@
// The component which last has the focus when this window was focused
// should receive focus first
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "tempLost {0}, toFocus {1}",
- new Object[]{String.valueOf(tempLost), String.valueOf(toFocus)});
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
+ focusLog.finer("tempLost {0}, toFocus {1}",
+ tempLost, toFocus);
}
if (tempLost != null) {
tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION);
@@ -447,9 +446,8 @@
Component oldFocusOwner = getGlobalFocusOwner();
Component newFocusOwner = fe.getComponent();
if (oldFocusOwner == newFocusOwner) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "Skipping {0} because focus owner is the same",
- new Object[] {String.valueOf(e)});
+ if (focusLog.isLoggable(PlatformLogger.FINE)) {
+ focusLog.fine("Skipping {0} because focus owner is the same", e);
}
// We can't just drop the event - there could be
// type-ahead markers associated with it.
@@ -566,20 +564,16 @@
FocusEvent fe = (FocusEvent)e;
Component currentFocusOwner = getGlobalFocusOwner();
if (currentFocusOwner == null) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "Skipping {0} because focus owner is null",
- new Object[] {String.valueOf(e)});
- }
+ if (focusLog.isLoggable(PlatformLogger.FINE))
+ focusLog.fine("Skipping {0} because focus owner is null", e);
break;
}
// Ignore cases where a Component loses focus to itself.
// If we make a mistake because of retargeting, then the
// FOCUS_GAINED handler will correct it.
if (currentFocusOwner == fe.getOppositeComponent()) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "Skipping {0} because current focus owner is equal to opposite",
- new Object[] {String.valueOf(e)});
- }
+ if (focusLog.isLoggable(PlatformLogger.FINE))
+ focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e);
break;
}
@@ -647,11 +641,10 @@
Window losingFocusWindow = we.getWindow();
Window activeWindow = getGlobalActiveWindow();
Window oppositeWindow = we.getOppositeWindow();
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "Active {0}, Current focused {1}, losing focus {2} opposite {3}",
- new Object[] {String.valueOf(activeWindow), String.valueOf(currentFocusedWindow),
- String.valueOf(losingFocusWindow), String.valueOf(oppositeWindow)});
- }
+ if (focusLog.isLoggable(PlatformLogger.FINE))
+ focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}",
+ activeWindow, currentFocusedWindow,
+ losingFocusWindow, oppositeWindow);
if (currentFocusedWindow == null) {
break;
}
@@ -835,10 +828,7 @@
}
}
if (ke != null) {
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "Pumping approved event {0}",
- new Object[] {String.valueOf(ke)});
- }
+ focusLog.finer("Pumping approved event {0}", ke);
enqueuedKeyEvents.removeFirst();
}
}
@@ -853,14 +843,14 @@
* Dumps the list of type-ahead queue markers to stderr
*/
void dumpMarkers() {
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, ">>> Markers dump, time: {0}", System.currentTimeMillis());
+ if (focusLog.isLoggable(PlatformLogger.FINEST)) {
+ focusLog.finest(">>> Markers dump, time: {0}", System.currentTimeMillis());
synchronized (this) {
if (typeAheadMarkers.size() != 0) {
Iterator iter = typeAheadMarkers.iterator();
while (iter.hasNext()) {
TypeAheadMarker marker = (TypeAheadMarker)iter.next();
- focusLog.log(Level.FINEST, " {0}", String.valueOf(marker));
+ focusLog.finest(" {0}", marker);
}
}
}
@@ -888,10 +878,7 @@
// The fix is rolled out.
if (ke.getWhen() > marker.after) {
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "Storing event {0} because of marker {1}",
- new Object[] {String.valueOf(ke), String.valueOf(marker)});
- }
+ focusLog.finer("Storing event {0} because of marker {1}", ke, marker);
enqueuedKeyEvents.addLast(ke);
return true;
}
@@ -903,10 +890,7 @@
}
case FocusEvent.FOCUS_GAINED:
- if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Markers before FOCUS_GAINED on {0}",
- new Object[] {String.valueOf(target)});
- }
+ focusLog.finest("Markers before FOCUS_GAINED on {0}", target);
dumpMarkers();
// Search the marker list for the first marker tied to
// the Component which just gained focus. Then remove
@@ -935,14 +919,10 @@
}
} else {
// Exception condition - event without marker
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "Event without marker {0}", String.valueOf(e));
- }
+ focusLog.finer("Event without marker {0}", e);
}
}
-
- focusLog.log(Level.FINEST, "Markers after FOCUS_GAINED");
-
+ focusLog.finest("Markers after FOCUS_GAINED");
dumpMarkers();
redispatchEvent(target, e);
@@ -1179,10 +1159,8 @@
return;
}
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "Enqueue at {0} for {1}",
- new Object[] {after, String.valueOf(untilFocused)});
- }
+ focusLog.finer("Enqueue at {0} for {1}",
+ after, untilFocused);
int insertionIndex = 0,
i = typeAheadMarkers.size();
@@ -1221,10 +1199,8 @@
return;
}
- if (focusLog.isLoggable(Level.FINER)) {
- focusLog.log(Level.FINER, "Dequeue at {0} for {1}",
- new Object[] {after, String.valueOf(untilFocused)});
- }
+ focusLog.finer("Dequeue at {0} for {1}",
+ after, untilFocused);
TypeAheadMarker marker;
ListIterator iter = typeAheadMarkers.listIterator
diff --git a/src/share/classes/java/awt/EventDispatchThread.java b/src/share/classes/java/awt/EventDispatchThread.java
index f35ff91..e0c46a3 100644
--- a/src/share/classes/java/awt/EventDispatchThread.java
+++ b/src/share/classes/java/awt/EventDispatchThread.java
@@ -36,7 +36,7 @@
import sun.awt.SunToolkit;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.dnd.SunDragSourceContextPeer;
import sun.awt.EventQueueDelegate;
@@ -61,7 +61,7 @@
* @since 1.1
*/
class EventDispatchThread extends Thread {
- private static final Logger eventLog = Logger.getLogger("java.awt.event.EventDispatchThread");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
private EventQueue theQueue;
private boolean doDispatch = true;
@@ -275,8 +275,8 @@
}
while (eventOK == false);
- if (eventLog.isLoggable(Level.FINEST)) {
- eventLog.log(Level.FINEST, "Dispatching: " + event);
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) {
+ eventLog.finest("Dispatching: " + event);
}
Object handle = null;
@@ -308,8 +308,8 @@
}
private void processException(Throwable e) {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "Processing exception: " + e);
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("Processing exception: " + e);
}
getUncaughtExceptionHandler().uncaughtException(this, e);
// don't rethrow the exception to avoid EDT recreation
diff --git a/src/share/classes/java/awt/EventQueue.java b/src/share/classes/java/awt/EventQueue.java
index 4523051..3e9febf 100644
--- a/src/share/classes/java/awt/EventQueue.java
+++ b/src/share/classes/java/awt/EventQueue.java
@@ -36,7 +36,7 @@
import java.security.PrivilegedAction;
import java.util.EmptyStackException;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.AWTAutoShutdown;
@@ -153,7 +153,7 @@
private final String name = "AWT-EventQueue-" + nextThreadNum();
- private static final Logger eventLog = Logger.getLogger("java.awt.event.EventQueue");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventQueue");
static {
AWTAccessor.setEventQueueAccessor(
@@ -707,8 +707,8 @@
* @since 1.2
*/
public synchronized void push(EventQueue newEventQueue) {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "EventQueue.push(" + newEventQueue + ")");
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("EventQueue.push(" + newEventQueue + ")");
}
if (nextQueue != null) {
@@ -722,8 +722,8 @@
try {
newEventQueue.postEventPrivate(getNextEvent());
} catch (InterruptedException ie) {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "Interrupted push", ie);
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("Interrupted push", ie);
}
}
}
@@ -766,8 +766,8 @@
* @since 1.2
*/
protected void pop() throws EmptyStackException {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "EventQueue.pop(" + this + ")");
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("EventQueue.pop(" + this + ")");
}
// To prevent deadlock, we lock on the previous EventQueue before
@@ -790,8 +790,8 @@
try {
previousQueue.postEventPrivate(getNextEvent());
} catch (InterruptedException ie) {
- if (eventLog.isLoggable(Level.FINE)) {
- eventLog.log(Level.FINE, "Interrupted pop", ie);
+ if (eventLog.isLoggable(PlatformLogger.FINE)) {
+ eventLog.fine("Interrupted pop", ie);
}
}
}
@@ -843,7 +843,8 @@
final void initDispatchThread() {
synchronized (this) {
- if (dispatchThread == null && !threadGroup.isDestroyed()) {
+ AppContext appContext = AppContext.getAppContext();
+ if (dispatchThread == null && !threadGroup.isDestroyed() && !appContext.isDisposed()) {
dispatchThread = (EventDispatchThread)
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
diff --git a/src/share/classes/java/awt/Font.java b/src/share/classes/java/awt/Font.java
index 9777314..792acdd 100644
--- a/src/share/classes/java/awt/Font.java
+++ b/src/share/classes/java/awt/Font.java
@@ -30,7 +30,6 @@
import java.awt.font.LineMetrics;
import java.awt.font.TextAttribute;
import java.awt.font.TextLayout;
-import java.awt.font.TransformAttribute;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
@@ -42,21 +41,21 @@
import java.text.AttributedCharacterIterator.Attribute;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
-import java.util.HashMap;
import java.util.Hashtable;
import java.util.Locale;
import java.util.Map;
import sun.font.StandardGlyphVector;
-import sun.java2d.FontSupport;
import sun.font.AttributeMap;
import sun.font.AttributeValues;
-import sun.font.EAttribute;
import sun.font.CompositeFont;
import sun.font.CreatedFontTracker;
import sun.font.Font2D;
import sun.font.Font2DHandle;
+import sun.font.FontAccess;
import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
import sun.font.GlyphLayout;
import sun.font.FontLineMetrics;
import sun.font.CoreMetrics;
@@ -223,10 +222,29 @@
*/
public class Font implements java.io.Serializable
{
+ private static class FontAccessImpl extends FontAccess {
+ public Font2D getFont2D(Font font) {
+ return font.getFont2D();
+ }
+
+ public void setFont2D(Font font, Font2DHandle handle) {
+ font.font2DHandle = handle;
+ }
+
+ public void setCreatedFont(Font font) {
+ font.createdFont = true;
+ }
+
+ public boolean isCreatedFont(Font font) {
+ return font.createdFont;
+ }
+ }
+
static {
/* ensure that the necessary native libraries are loaded */
Toolkit.loadLibraries();
initIDs();
+ FontAccess.setFontAccess(new FontAccessImpl());
}
/**
@@ -464,16 +482,17 @@
}
private Font2D getFont2D() {
- if (FontManager.usingPerAppContextComposites &&
+ FontManager fm = FontManagerFactory.getInstance();
+ if (fm.usingPerAppContextComposites() &&
font2DHandle != null &&
font2DHandle.font2D instanceof CompositeFont &&
((CompositeFont)(font2DHandle.font2D)).isStdComposite()) {
- return FontManager.findFont2D(name, style,
+ return fm.findFont2D(name, style,
FontManager.LOGICAL_FALLBACK);
} else if (font2DHandle == null) {
font2DHandle =
- FontManager.findFont2D(name, style,
- FontManager.LOGICAL_FALLBACK).handle;
+ fm.findFont2D(name, style,
+ FontManager.LOGICAL_FALLBACK).handle;
}
/* Do not cache the de-referenced font2D. It must be explicitly
* de-referenced to pick up a valid font in the event that the
@@ -570,8 +589,8 @@
if (created) {
if (handle.font2D instanceof CompositeFont &&
handle.font2D.getStyle() != style) {
- this.font2DHandle =
- FontManager.getNewComposite(null, style, handle);
+ FontManager fm = FontManagerFactory.getInstance();
+ this.font2DHandle = fm.getNewComposite(null, style, handle);
} else {
this.font2DHandle = handle;
}
@@ -586,9 +605,9 @@
/* Font2D instances created by this method track their font file
* so that when the Font2D is GC'd it can also remove the file.
*/
- this.font2DHandle =
- FontManager.createFont2D(fontFile, fontFormat,
- isCopy, tracker).handle;
+ FontManager fm = FontManagerFactory.getInstance();
+ this.font2DHandle = fm.createFont2D(fontFile, fontFormat, isCopy,
+ tracker).handle;
this.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());
this.style = Font.PLAIN;
this.size = 1;
@@ -640,8 +659,9 @@
}
if (handle.font2D instanceof CompositeFont) {
if (newStyle != -1 || newName != null) {
+ FontManager fm = FontManagerFactory.getInstance();
this.font2DHandle =
- FontManager.getNewComposite(newName, newStyle, handle);
+ fm.getNewComposite(newName, newStyle, handle);
}
} else if (newName != null) {
this.createdFont = false;
@@ -852,7 +872,6 @@
throw new IllegalArgumentException ("font format not recognized");
}
boolean copiedFontData = false;
-
try {
final File tFile = AccessController.doPrivileged(
new PrivilegedExceptionAction<File>() {
@@ -2320,7 +2339,7 @@
(values.getKerning() == 0 && values.getLigatures() == 0 &&
values.getBaselineTransform() == null);
if (simple) {
- simple = !FontManager.isComplexText(chars, beginIndex, limit);
+ simple = ! FontUtilities.isComplexText(chars, beginIndex, limit);
}
if (simple) {
diff --git a/src/share/classes/java/awt/GraphicsEnvironment.java b/src/share/classes/java/awt/GraphicsEnvironment.java
index d77b2f2..392a447 100644
--- a/src/share/classes/java/awt/GraphicsEnvironment.java
+++ b/src/share/classes/java/awt/GraphicsEnvironment.java
@@ -27,9 +27,14 @@
package java.awt;
import java.awt.image.BufferedImage;
+import java.security.AccessController;
import java.util.Locale;
+
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
import sun.java2d.HeadlessGraphicsEnvironment;
import sun.java2d.SunGraphicsEnvironment;
+import sun.security.action.GetPropertyAction;
/**
*
@@ -73,35 +78,53 @@
*/
public static synchronized GraphicsEnvironment getLocalGraphicsEnvironment() {
if (localEnv == null) {
- String nm = (String) java.security.AccessController.doPrivileged
- (new sun.security.action.GetPropertyAction
- ("java.awt.graphicsenv", null));
-
- try {
-// long t0 = System.currentTimeMillis();
- ClassLoader cl = ClassLoader.getSystemClassLoader();
- Class geCls = Class.forName(nm, true, cl);
- localEnv = (GraphicsEnvironment)geCls.newInstance();
-// long t1 = System.currentTimeMillis();
-// System.out.println("GE creation took " + (t1-t0)+ "ms.");
- if (isHeadless()) {
- localEnv = new HeadlessGraphicsEnvironment(localEnv);
- }
- } catch (ClassNotFoundException e) {
- throw new Error("Could not find class: "+nm);
- } catch (InstantiationException e) {
- throw new Error("Could not instantiate Graphics Environment: "
- + nm);
- } catch (IllegalAccessException e) {
- throw new Error ("Could not access Graphics Environment: "
- + nm);
- }
+ localEnv = createGE();
}
return localEnv;
}
/**
+ * Creates and returns the GraphicsEnvironment, according to the
+ * system property 'java.awt.graphicsenv'.
+ *
+ * @return the graphics environment
+ */
+ private static GraphicsEnvironment createGE() {
+ GraphicsEnvironment ge;
+ String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
+ try {
+// long t0 = System.currentTimeMillis();
+ Class geCls;
+ try {
+ // First we try if the bootclassloader finds the requested
+ // class. This way we can avoid to run in a privileged block.
+ geCls = Class.forName(nm);
+ } catch (ClassNotFoundException ex) {
+ // If the bootclassloader fails, we try again with the
+ // application classloader.
+ ClassLoader cl = ClassLoader.getSystemClassLoader();
+ geCls = Class.forName(nm, true, cl);
+ }
+ ge = (GraphicsEnvironment) geCls.newInstance();
+// long t1 = System.currentTimeMillis();
+// System.out.println("GE creation took " + (t1-t0)+ "ms.");
+ if (isHeadless()) {
+ localEnv = new HeadlessGraphicsEnvironment(localEnv);
+ }
+ } catch (ClassNotFoundException e) {
+ throw new Error("Could not find class: "+nm);
+ } catch (InstantiationException e) {
+ throw new Error("Could not instantiate Graphics Environment: "
+ + nm);
+ } catch (IllegalAccessException e) {
+ throw new Error ("Could not access Graphics Environment: "
+ + nm);
+ }
+ return ge;
+ }
+
+ /**
* Tests whether or not a display, keyboard, and mouse can be
* supported in this environment. If this method returns true,
* a HeadlessException is thrown from areas of the Toolkit
@@ -333,7 +356,8 @@
if (font == null) {
throw new NullPointerException("font cannot be null.");
}
- return sun.font.FontManager.registerFont(font);
+ FontManager fm = FontManagerFactory.getInstance();
+ return fm.registerFont(font);
}
/**
@@ -357,10 +381,8 @@
* @since 1.5
*/
public void preferLocaleFonts() {
- if (!(this instanceof SunGraphicsEnvironment)) {
- return;
- }
- sun.font.FontManager.preferLocaleFonts();
+ FontManager fm = FontManagerFactory.getInstance();
+ fm.preferLocaleFonts();
}
/**
@@ -380,10 +402,8 @@
* @since 1.5
*/
public void preferProportionalFonts() {
- if (!(this instanceof SunGraphicsEnvironment)) {
- return;
- }
- sun.font.FontManager.preferProportionalFonts();
+ FontManager fm = FontManagerFactory.getInstance();
+ fm.preferProportionalFonts();
}
/**
diff --git a/src/share/classes/java/awt/SplashScreen.java b/src/share/classes/java/awt/SplashScreen.java
index cc172fc..c0c6fc6 100644
--- a/src/share/classes/java/awt/SplashScreen.java
+++ b/src/share/classes/java/awt/SplashScreen.java
@@ -29,8 +29,7 @@
import java.net.URL;
import java.net.URLConnection;
import java.io.File;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
import sun.awt.image.SunWritableRaster;
/**
@@ -204,8 +203,8 @@
}
}
catch(java.net.MalformedURLException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "MalformedURLException caught in the getImageURL() method", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("MalformedURLException caught in the getImageURL() method", e);
}
}
}
@@ -355,7 +354,7 @@
*/
private static SplashScreen theInstance = null;
- private static final Logger log = Logger.getLogger("java.awt.SplashScreen");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.SplashScreen");
private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
private native static boolean _isVisible(long splashPtr);
diff --git a/src/share/classes/java/awt/Toolkit.java b/src/share/classes/java/awt/Toolkit.java
index 129b1f0..5dca887 100644
--- a/src/share/classes/java/awt/Toolkit.java
+++ b/src/share/classes/java/awt/Toolkit.java
@@ -48,7 +48,7 @@
import java.io.FileInputStream;
import java.util.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -1956,7 +1956,7 @@
*/
public abstract boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType);
- private static final Logger log = Logger.getLogger("java.awt.Toolkit");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Toolkit");
private static final int LONG_BITS = 64;
private int[] calls = new int[LONG_BITS];
@@ -2123,9 +2123,9 @@
}
synchronized int countAWTEventListeners(long eventMask) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (eventMask == 0) {
- log.log(Level.FINE, "Assertion (eventMask != 0) failed");
+ log.fine("Assertion (eventMask != 0) failed");
}
}
diff --git a/src/share/classes/java/awt/Window.java b/src/share/classes/java/awt/Window.java
index c526107..8ea9ec8 100644
--- a/src/share/classes/java/awt/Window.java
+++ b/src/share/classes/java/awt/Window.java
@@ -48,8 +48,6 @@
import java.util.ResourceBundle;
import java.util.Set;
import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.accessibility.*;
import sun.awt.AWTAccessor;
@@ -61,6 +59,7 @@
import sun.java2d.pipe.Region;
import sun.security.action.GetPropertyAction;
import sun.security.util.SecurityConstants;
+import sun.util.logging.PlatformLogger;
/**
* A <code>Window</code> object is a top-level window with no borders and no
@@ -324,7 +323,7 @@
*/
private static final long serialVersionUID = 4497834738069338734L;
- private static final Logger log = Logger.getLogger("java.awt.Window");
+ private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
private static final boolean locationByPlatformProp;
@@ -2985,7 +2984,7 @@
}
synchronized (getTreeLock()) {
super.setGraphicsConfiguration(gc);
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("+ Window.setGraphicsConfiguration(): new GC is \n+ " + getGraphicsConfiguration_NoClientCode() + "\n+ this is " + this);
}
}
diff --git a/src/share/classes/java/awt/event/InputEvent.java b/src/share/classes/java/awt/event/InputEvent.java
index 06492d1..d465a0f 100644
--- a/src/share/classes/java/awt/event/InputEvent.java
+++ b/src/share/classes/java/awt/event/InputEvent.java
@@ -29,8 +29,7 @@
import java.awt.Component;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
import java.util.Arrays;
/**
@@ -55,7 +54,7 @@
* @since 1.1
*/
public abstract class InputEvent extends ComponentEvent {
- private static final Logger log = Logger.getLogger("java.awt.event.InputEvent");
+ private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent");
/**
* The Shift key modifier constant.
@@ -344,8 +343,8 @@
sm.checkSystemClipboardAccess();
b = true;
} catch (SecurityException se) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "InputEvent.canAccessSystemClipboard() got SecurityException ", se);
+ if (logger.isLoggable(PlatformLogger.FINE)) {
+ logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
}
}
} else {
diff --git a/src/share/classes/java/nio/file/Path.java b/src/share/classes/java/nio/file/Path.java
index d9ba6de..8aa970c 100644
--- a/src/share/classes/java/nio/file/Path.java
+++ b/src/share/classes/java/nio/file/Path.java
@@ -412,7 +412,7 @@
* dependent if {@code "a/b/../x"} would locate the same file as {@code "/a/x"}.
*
* @param other
- * the resulting path
+ * the path to relativize against this path
*
* @return the resulting relative path, or {@code null} if both paths are
* equal
@@ -1615,23 +1615,23 @@
* Tests if the file referenced by this object is the same file referenced
* by another object.
*
- * <p> If this {@code FileRef} and the given {@code FileRef} are {@link
+ * <p> If this {@code Path} and the given {@code Path} are {@link
* #equals(Object) equal} then this method returns {@code true} without checking
- * if the file exists. If the {@code FileRef} and the given {@code FileRef}
- * are associated with different providers, or the given {@code FileRef} is
+ * if the file exists. If the {@code Path} and the given {@code Path}
+ * are associated with different providers, or the given {@code Path} is
* {@code null} then this method returns {@code false}. Otherwise, this method
- * checks if both {@code FileRefs} locate the same file, and depending on the
+ * checks if both {@code Paths} locate the same file, and depending on the
* implementation, may require to open or access both files.
*
* <p> If the file system and files remain static, then this method implements
- * an equivalence relation for non-null {@code FileRefs}.
+ * an equivalence relation for non-null {@code Paths}.
* <ul>
- * <li>It is <i>reflexive</i>: for a non-null {@code FileRef} {@code f},
+ * <li>It is <i>reflexive</i>: for a non-null {@code Path} {@code f},
* {@code f.isSameFile(f)} should return {@code true}.
- * <li>It is <i>symmetric</i>: for two non-null {@code FileRefs}
+ * <li>It is <i>symmetric</i>: for two non-null {@code Path}
* {@code f} and {@code g}, {@code f.isSameFile(g)} will equal
* {@code g.isSameFile(f)}.
- * <li>It is <i>transitive</i>: for three {@code FileRefs}
+ * <li>It is <i>transitive</i>: for three {@code Paths}
* {@code f}, {@code g}, and {@code h}, if {@code f.isSameFile(g)} returns
* {@code true} and {@code g.isSameFile(h)} returns {@code true}, then
* {@code f.isSameFile(h)} will return return {@code true}.
diff --git a/src/share/classes/java/util/Objects.java b/src/share/classes/java/util/Objects.java
index 9d05c31..638eaaa 100644
--- a/src/share/classes/java/util/Objects.java
+++ b/src/share/classes/java/util/Objects.java
@@ -107,4 +107,50 @@
public static <T> int compare(T a, T b, Comparator<? super T> c) {
return (a == b) ? 0 : c.compare(a, b);
}
+
+ /**
+ * Checks that the specified object reference is not {@code null}. This
+ * method is designed primarily for doing parameter validation in methods
+ * and constructors, as demonstrated below:
+ * <blockquote><pre>
+ * public Foo(Bar bar) {
+ * this.bar = Objects.nonNull(bar);
+ * }
+ * </pre></blockquote>
+ *
+ * @param obj the object reference to check for nullity
+ * @param <T> the type of the reference
+ * @return {@code obj} if not {@code null}
+ * @throws NullPointerException if {@code obj} is {@code null}
+ */
+ public static <T> T nonNull(T obj) {
+ if (obj == null)
+ throw new NullPointerException();
+ return obj;
+ }
+
+ /**
+ * Checks that the specified object reference is not {@code null} and
+ * throws a customized {@link NullPointerException} if it is. This method
+ * is designed primarily for doing parameter validation in methods and
+ * constructors with multiple parameters, as demonstrated below:
+ * <blockquote><pre>
+ * public Foo(Bar bar, Baz baz) {
+ * this.bar = Objects.nonNull(bar, "bar must not be null");
+ * this.baz = Objects.nonNull(baz, "baz must not be null");
+ * }
+ * </pre></blockquote>
+ *
+ * @param obj the object reference to check for nullity
+ * @param message detail message to be used in the event that a {@code
+ * NullPointerException} is thrown
+ * @param <T> the type of the reference
+ * @return {@code obj} if not {@code null}
+ * @throws NullPointerException if {@code obj} is {@code null}
+ */
+ public static <T> T nonNull(T obj, String message) {
+ if (obj == null)
+ throw new NullPointerException(message);
+ return obj;
+ }
}
diff --git a/src/share/classes/javax/swing/BufferStrategyPaintManager.java b/src/share/classes/javax/swing/BufferStrategyPaintManager.java
index eb230a0..faeae5f 100644
--- a/src/share/classes/javax/swing/BufferStrategyPaintManager.java
+++ b/src/share/classes/javax/swing/BufferStrategyPaintManager.java
@@ -32,7 +32,6 @@
import java.lang.ref.WeakReference;
import java.security.AccessController;
import java.util.*;
-import java.util.logging.*;
import com.sun.java.swing.SwingUtilities3;
@@ -41,6 +40,7 @@
import sun.security.action.GetPropertyAction;
import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
import sun.awt.SunToolkit;
+import sun.util.logging.PlatformLogger;
/**
* A PaintManager implementation that uses a BufferStrategy for
@@ -78,7 +78,7 @@
private static Method COMPONENT_CREATE_BUFFER_STRATEGY_METHOD;
private static Method COMPONENT_GET_BUFFER_STRATEGY_METHOD;
- private static final Logger LOGGER = Logger.getLogger(
+ private static final PlatformLogger LOGGER = PlatformLogger.getLogger(
"javax.swing.BufferStrategyPaintManager");
/**
@@ -222,9 +222,9 @@
}
private void dispose(java.util.List<BufferInfo> bufferInfos) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, "BufferStrategyPaintManager disposed",
- new RuntimeException());
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+ LOGGER.finer("BufferStrategyPaintManager disposed",
+ new RuntimeException());
}
if (bufferInfos != null) {
for (BufferInfo bufferInfo : bufferInfos) {
@@ -305,7 +305,7 @@
}
}
// Invalid root, do what Swing has always done.
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("prepare failed");
}
return super.paint(paintingComponent, bufferComponent, g, x, y, w, h);
@@ -335,7 +335,7 @@
}
accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h);
} else {
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("copyArea: prepare failed or not in sync");
}
// Prepare failed, or not in sync. By calling super.copyArea
@@ -363,7 +363,7 @@
}
}
}
- if (LOGGER.isLoggable(Level.FINEST)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
LOGGER.finest("beginPaint");
}
// Reset the area that needs to be painted.
@@ -371,7 +371,7 @@
}
public void endPaint() {
- if (LOGGER.isLoggable(Level.FINEST)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
LOGGER.finest("endPaint: region " + accumulatedX + " " +
accumulatedY + " " + accumulatedMaxX + " " +
accumulatedMaxY);
@@ -420,7 +420,7 @@
contentsLost = bufferStrategy.contentsLost();
}
if (contentsLost) {
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("endPaint: contents lost");
}
// Shown region was bogus, mark buffer as out of sync.
@@ -514,7 +514,7 @@
contentsLost = true;
bufferInfo = new BufferInfo(root);
bufferInfos.add(bufferInfo);
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("prepare: new BufferInfo: " + root);
}
}
@@ -525,7 +525,7 @@
bsg = bufferStrategy.getDrawGraphics();
if (bufferStrategy.contentsRestored()) {
contentsLost = true;
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer(
"prepare: contents restored in prepare");
}
@@ -539,7 +539,7 @@
if (bufferInfo.getContentsLostDuringExpose()) {
contentsLost = true;
bufferInfo.setContentsLostDuringExpose(false);
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("prepare: contents lost on expose");
}
}
@@ -642,7 +642,7 @@
if (biRoot == null) {
// Window gc'ed
bufferInfos.remove(counter);
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("BufferInfo pruned, root null");
}
}
@@ -748,7 +748,7 @@
if (bs != null) {
weakBS = new WeakReference<BufferStrategy>(bs);
}
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("getBufferStrategy: created bs: " + bs);
}
}
@@ -806,7 +806,7 @@
BufferStrategy bs = null;
if (SwingUtilities3.isVsyncRequested(root)) {
bs = createBufferStrategy(root, true);
- if (LOGGER.isLoggable(Level.FINER)) {
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("createBufferStrategy: using vsynced strategy");
}
}
@@ -848,9 +848,9 @@
invoke(root);
} catch (InvocationTargetException ite) {
// Type is not supported
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, "createBufferStratety failed",
- ite);
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+ LOGGER.finer("createBufferStratety failed",
+ ite);
}
} catch (IllegalArgumentException iae) {
assert false;
@@ -864,9 +864,9 @@
bs = ((Window)root).getBufferStrategy();
} catch (AWTException e) {
// Type not supported
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, "createBufferStratety failed",
- e);
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+ LOGGER.finer("createBufferStratety failed",
+ e);
}
}
}
@@ -878,8 +878,8 @@
*/
public void dispose() {
Container root = getRoot();
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, "disposed BufferInfo for: " + root);
+ if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+ LOGGER.finer("disposed BufferInfo for: " + root);
}
if (root != null) {
root.removeComponentListener(this);
diff --git a/src/share/classes/javax/swing/JFileChooser.java b/src/share/classes/javax/swing/JFileChooser.java
index 8ba9c7c..dae4a1c 100644
--- a/src/share/classes/javax/swing/JFileChooser.java
+++ b/src/share/classes/javax/swing/JFileChooser.java
@@ -715,7 +715,7 @@
* <ul>
* <li>JFileChooser.CANCEL_OPTION
* <li>JFileChooser.APPROVE_OPTION
- * <li>JFileCHooser.ERROR_OPTION if an error occurs or the
+ * <li>JFileChooser.ERROR_OPTION if an error occurs or the
* dialog is dismissed
* </ul>
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
@@ -724,6 +724,11 @@
*/
public int showDialog(Component parent, String approveButtonText)
throws HeadlessException {
+ if (dialog != null) {
+ // Prevent to show second instance of dialog if the previous one still exists
+ return JFileChooser.ERROR_OPTION;
+ }
+
if(approveButtonText != null) {
setApproveButtonText(approveButtonText);
setDialogType(CUSTOM_DIALOG);
diff --git a/src/share/classes/javax/swing/JLayer.java b/src/share/classes/javax/swing/JLayer.java
index 1ce679b..93f4b79 100644
--- a/src/share/classes/javax/swing/JLayer.java
+++ b/src/share/classes/javax/swing/JLayer.java
@@ -56,28 +56,70 @@
* {@code JLayer} is a good solution if you only need to do custom painting
* over compound component or catch input events from its subcomponents.
* <pre>
+ * import javax.swing.*;
+ * import javax.swing.plaf.LayerUI;
+ * import java.awt.*;
+ *
+ * public class JLayerSample {
+ *
+ * private static JLayer<JComponent> createLayer() {
+ * // This custom layerUI will fill the layer with translucent green
+ * // and print out all mouseMotion events generated within its borders
+ * LayerUI<JComponent> layerUI = new LayerUI<JComponent>() {
+ *
+ * public void paint(Graphics g, JComponent c) {
+ * // paint the layer as is
+ * super.paint(g, c);
+ * // fill it with the translucent green
+ * g.setColor(new Color(0, 128, 0, 128));
+ * g.fillRect(0, 0, c.getWidth(), c.getHeight());
+ * }
+ *
+ * public void installUI(JComponent c) {
+ * super.installUI(c);
+ * // enable mouse motion events for the layer's subcomponents
+ * ((JLayer) c).setLayerEventMask(AWTEvent.MOUSE_MOTION_EVENT_MASK);
+ * }
+ *
+ * public void uninstallUI(JComponent c) {
+ * super.uninstallUI(c);
+ * // reset the layer event mask
+ * ((JLayer) c).setLayerEventMask(0);
+ * }
+ *
+ * // overridden method which catches MouseMotion events
+ * public void eventDispatched(AWTEvent e, JLayer<? extends JComponent> l) {
+ * System.out.println("AWTEvent detected: " + e);
+ * }
+ * };
* // create a component to be decorated with the layer
- * JPanel panel = new JPanel();
- * panel.add(new JButton("JButton"));
- * // This custom layerUI will fill the layer with translucent green
- * // and print out all mouseMotion events generated within its borders
- * LayerUI<JPanel> layerUI = new LayerUI<JPanel>() {
- * public void paint(Graphics g, JCompo nent c) {
- * // paint the layer as is
- * super.paint(g, c);
- * // fill it with the translucent green
- * g.setColor(new Color(0, 128, 0, 128));
- * g.fillRect(0, 0, c.getWidth(), c.getHeight());
- * }
- * // overridden method which catches MouseMotion events
- * public void eventDispatched(AWTEvent e, JLayer<JPanel> l) {
- * System.out.println("AWTEvent detected: " + e);
- * }
- * };
- * // create the layer for the panel using our custom layerUI
- * JLayer<JPanel> layer = new JLayer<JPanel>(panel, layerUI);
- * // work with the layer as with any other Swing component
- * frame.add(layer);
+ * JPanel panel = new JPanel();
+ * panel.add(new JButton("JButton"));
+ *
+ * // create the layer for the panel using our custom layerUI
+ * return new JLayer<JComponent>(panel, layerUI);
+ * }
+ *
+ * private static void createAndShowGUI() {
+ * final JFrame frame = new JFrame();
+ * frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ *
+ * // work with the layer as with any other Swing component
+ * frame.add(createLayer());
+ *
+ * frame.setSize(200, 200);
+ * frame.setLocationRelativeTo(null);
+ * frame.setVisible(true);
+ * }
+ *
+ * public static void main(String[] args) throws Exception {
+ * SwingUtilities.invokeAndWait(new Runnable() {
+ * public void run() {
+ * createAndShowGUI();
+ * }
+ * });
+ * }
+ * }
* </pre>
*
* <b>Note:</b> {@code JLayer} doesn't support the following methods:
@@ -291,7 +333,9 @@
* {@inheritDoc}
*/
public void remove(Component comp) {
- if (comp == getView()) {
+ if (comp == null) {
+ super.remove(comp);
+ } else if (comp == getView()) {
setView(null);
} else if (comp == getGlassPane()) {
setGlassPane(null);
diff --git a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
index 715732f..c856c88 100644
--- a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
+++ b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
@@ -29,7 +29,7 @@
import java.awt.Window;
import java.util.*;
import java.awt.FocusTraversalPolicy;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/**
* A FocusTraversalPolicy that determines traversal order by sorting the
@@ -64,7 +64,7 @@
private Comparator<? super Component> comparator;
private boolean implicitDownCycleTraversal = true;
- private Logger log = Logger.getLogger("javax.swing.SortingFocusTraversalPolicy");
+ private PlatformLogger log = PlatformLogger.getLogger("javax.swing.SortingFocusTraversalPolicy");
/**
* Used by getComponentAfter and getComponentBefore for efficiency. In
@@ -115,8 +115,8 @@
try {
index = Collections.binarySearch(cycle, aComponent, comparator);
} catch (ClassCastException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "### During the binary search for " + aComponent + " the exception occured: ", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("### During the binary search for " + aComponent + " the exception occured: ", e);
}
return -1;
}
@@ -193,7 +193,7 @@
if (getImplicitDownCycleTraversal()) {
retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
- if (retComp != null && log.isLoggable(Level.FINE)) {
+ if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Transfered focus down-cycle to " + retComp +
" in the focus cycle root " + cont);
}
@@ -205,7 +205,7 @@
cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
cont.getFocusTraversalPolicy().getLastComponent(cont));
- if (retComp != null && log.isLoggable(Level.FINE)) {
+ if (retComp != null && log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
}
}
@@ -236,7 +236,7 @@
* aComponent is null
*/
public Component getComponentAfter(Container aContainer, Component aComponent) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Searching in " + aContainer + " for component after " + aComponent);
}
@@ -260,7 +260,7 @@
// See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent);
}
@@ -271,7 +271,7 @@
// Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found.
if (afterComp != null) {
- if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + afterComp);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
return afterComp;
}
aComponent = provider;
@@ -279,12 +279,12 @@
List<Component> cycle = getFocusTraversalCycle(aContainer);
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
int index = getComponentIndex(cycle, aComponent);
if (index < 0) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
}
return getFirstComponent(aContainer);
@@ -349,7 +349,7 @@
// See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent);
}
@@ -360,7 +360,7 @@
// Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found.
if (beforeComp != null) {
- if (log.isLoggable(Level.FINE)) log.fine("### FTP returned " + beforeComp);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
return beforeComp;
}
aComponent = provider;
@@ -373,12 +373,12 @@
List<Component> cycle = getFocusTraversalCycle(aContainer);
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent);
int index = getComponentIndex(cycle, aComponent);
if (index < 0) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
}
return getLastComponent(aContainer);
@@ -424,7 +424,7 @@
public Component getFirstComponent(Container aContainer) {
List<Component> cycle;
- if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null");
}
@@ -436,10 +436,10 @@
}
if (cycle.size() == 0) {
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null;
}
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (Component comp : cycle) {
if (accept(comp)) {
@@ -466,7 +466,7 @@
*/
public Component getLastComponent(Container aContainer) {
List<Component> cycle;
- if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null");
@@ -479,10 +479,10 @@
}
if (cycle.size() == 0) {
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null;
}
- if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (int i= cycle.size() - 1; i >= 0; i--) {
Component comp = cycle.get(i);
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
index 80b449c..3b2fa97 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -1766,7 +1766,7 @@
}
private boolean isTypeAheadKey( KeyEvent e ) {
- return !e.isAltDown() && !e.isControlDown() && !e.isMetaDown();
+ return !e.isAltDown() && !BasicGraphicsUtils.isMenuShortcutKeyDown(e);
}
//
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
index a994032..fca8b93 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
@@ -483,11 +483,12 @@
protected JList createList() {
return new JList( comboBox.getModel() ) {
public void processMouseEvent(MouseEvent e) {
- if (e.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
// Fix for 4234053. Filter out the Control Key from the list.
// ie., don't allow CTRL key deselection.
+ Toolkit toolkit = Toolkit.getDefaultToolkit();
e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(),
- e.getModifiers() ^ InputEvent.CTRL_MASK,
+ e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
e.getX(), e.getY(),
e.getXOnScreen(), e.getYOnScreen(),
e.getClickCount(),
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
index 44f99d6..7056676 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
@@ -924,7 +924,8 @@
boolean isTrav = (selectedFile != null && chooser.isTraversable(selectedFile));
boolean isDirSelEnabled = chooser.isDirectorySelectionEnabled();
boolean isFileSelEnabled = chooser.isFileSelectionEnabled();
- boolean isCtrl = (e != null && (e.getModifiers() & ActionEvent.CTRL_MASK) != 0);
+ boolean isCtrl = (e != null && (e.getModifiers() &
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0);
if (isDir && isTrav && (isCtrl || !isDirSelEnabled)) {
changeDirectory(selectedFile);
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
index 6d83149..0683012 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -33,7 +33,10 @@
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
+import java.awt.Toolkit;
import java.awt.event.KeyEvent;
+import java.awt.event.InputEvent;
+
import sun.swing.SwingUtilities2;
@@ -303,4 +306,9 @@
static boolean isLeftToRight( Component c ) {
return c.getComponentOrientation().isLeftToRight();
}
+
+ static boolean isMenuShortcutKeyDown(InputEvent event) {
+ return (event.getModifiers() &
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
+ }
}
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicListUI.java b/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
index 7704d10..1d3ee7b 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicListUI.java
@@ -2371,8 +2371,9 @@
JList src = (JList)e.getSource();
ListModel model = src.getModel();
- if (model.getSize() == 0 || e.isAltDown() || e.isControlDown() || e.isMetaDown() ||
- isNavigationKey(e)) {
+ if (model.getSize() == 0 || e.isAltDown() ||
+ BasicGraphicsUtils.isMenuShortcutKeyDown(e) ||
+ isNavigationKey(e)) {
// Nothing to select
return;
}
@@ -2665,7 +2666,7 @@
if (row != -1 && DragRecognitionSupport.mousePressed(e)) {
dragPressDidSelection = false;
- if (e.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
// do nothing for control - will be handled on release
// or when drag starts
return;
@@ -2717,7 +2718,7 @@
anchorSelected = list.isSelectedIndex(anchorIndex);
}
- if (e.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
if (e.isShiftDown()) {
if (anchorSelected) {
list.addSelectionInterval(anchorIndex, row);
@@ -2742,7 +2743,7 @@
}
public void dragStarting(MouseEvent me) {
- if (me.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(me)) {
int row = SwingUtilities2.loc2IndexFileList(list, me.getPoint());
list.addSelectionInterval(row, row);
}
@@ -2758,7 +2759,7 @@
return;
}
- if (e.isShiftDown() || e.isControlDown()) {
+ if (e.isShiftDown() || BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
return;
}
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java b/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
index ba31712..02febb9 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
@@ -196,10 +196,6 @@
return getHandler();
}
- protected MenuKeyListener createMenuKeyListener(JComponent c) {
- return (MenuKeyListener)getHandler();
- }
-
public Dimension getMaximumSize(JComponent c) {
if (((JMenu)menuItem).isTopLevelMenu() == true) {
Dimension d = c.getPreferredSize();
@@ -401,8 +397,7 @@
public void stateChanged(ChangeEvent e) { }
}
- private class Handler extends BasicMenuItemUI.Handler implements
- MenuKeyListener {
+ private class Handler extends BasicMenuItemUI.Handler {
//
// PropertyChangeListener
//
@@ -585,45 +580,5 @@
}
public void menuDragMouseExited(MenuDragMouseEvent e) {}
public void menuDragMouseReleased(MenuDragMouseEvent e) {}
-
-
- //
- // MenuKeyListener
- //
- /**
- * Open the Menu
- */
- public void menuKeyTyped(MenuKeyEvent e) {
- if (!crossMenuMnemonic && BasicPopupMenuUI.getLastPopup() != null) {
- // when crossMenuMnemonic is not set, we don't open a toplevel
- // menu if another toplevel menu is already open
- return;
- }
-
- char key = Character.toLowerCase((char)menuItem.getMnemonic());
- MenuElement path[] = e.getPath();
- MenuSelectionManager manager = e.getMenuSelectionManager();
- if (key == Character.toLowerCase(e.getKeyChar())) {
- JPopupMenu popupMenu = ((JMenu)menuItem).getPopupMenu();
- ArrayList<MenuElement> newList = new ArrayList<MenuElement>(Arrays.asList(path));
- newList.add(popupMenu);
- MenuElement subs[] = popupMenu.getSubElements();
- MenuElement sub =
- BasicPopupMenuUI.findEnabledChild(subs, -1, true);
- if(sub != null) {
- newList.add(sub);
- }
- MenuElement newPath[] = new MenuElement[0];
- newPath = newList.toArray(newPath);
- manager.setSelectedPath(newPath);
- e.consume();
- } else if (((JMenu)menuItem).isTopLevelMenu()
- && BasicPopupMenuUI.getLastPopup() == null) {
- manager.clearSelectedPath();
- }
- }
-
- public void menuKeyPressed(MenuKeyEvent e) {}
- public void menuKeyReleased(MenuKeyEvent e) {}
}
}
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java b/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
index dc94bf5..90f9830 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
@@ -339,7 +339,7 @@
indexes[matches++] = j;
}
}
- if (item.isArmed()) {
+ if (item.isArmed() || item.isSelected()) {
currentIndex = matches - 1;
}
}
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java b/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java
index 16ceab7..7e85bee 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java
@@ -1027,7 +1027,7 @@
shouldStartTimer =
table.isCellSelected(pressedRow, pressedCol) &&
!e.isShiftDown() &&
- !e.isControlDown() &&
+ !BasicGraphicsUtils.isMenuShortcutKeyDown(e) &&
!outsidePrefSize;
}
@@ -1051,7 +1051,7 @@
dragPressDidSelection = false;
- if (e.isControlDown() && isFileList) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(e) && isFileList) {
// do nothing for control - will be handled on release
// or when drag starts
return;
@@ -1115,7 +1115,9 @@
CellEditor editor = table.getCellEditor();
if (dragEnabled || editor == null || editor.shouldSelectCell(e)) {
- table.changeSelection(pressedRow, pressedCol, e.isControlDown(), e.isShiftDown());
+ table.changeSelection(pressedRow, pressedCol,
+ BasicGraphicsUtils.isMenuShortcutKeyDown(e),
+ e.isShiftDown());
}
}
@@ -1212,7 +1214,7 @@
public void dragStarting(MouseEvent me) {
dragStarted = true;
- if (me.isControlDown() && isFileList) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(me) && isFileList) {
table.getSelectionModel().addSelectionInterval(pressedRow,
pressedRow);
table.getColumnModel().getSelectionModel().
@@ -1251,7 +1253,8 @@
return;
}
- table.changeSelection(row, column, e.isControlDown(), true);
+ table.changeSelection(row, column,
+ BasicGraphicsUtils.isMenuShortcutKeyDown(e), true);
}
diff --git a/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
index 8fdc88d..22fa61f 100644
--- a/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
@@ -2265,7 +2265,7 @@
*/
protected boolean isToggleSelectionEvent(MouseEvent event) {
return (SwingUtilities.isLeftMouseButton(event) &&
- event.isControlDown());
+ BasicGraphicsUtils.isMenuShortcutKeyDown(event));
}
/**
@@ -3255,7 +3255,7 @@
// handle first letter navigation
if(tree != null && tree.getRowCount()>0 && tree.hasFocus() &&
tree.isEnabled()) {
- if (e.isAltDown() || e.isControlDown() || e.isMetaDown() ||
+ if (e.isAltDown() || BasicGraphicsUtils.isMenuShortcutKeyDown(e) ||
isNavigationKey(e)) {
return;
}
@@ -3511,7 +3511,7 @@
dragPressDidSelection = false;
- if (e.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(e)) {
// do nothing for control - will be handled on release
// or when drag starts
return;
@@ -3565,7 +3565,7 @@
public void dragStarting(MouseEvent me) {
dragStarted = true;
- if (me.isControlDown()) {
+ if (BasicGraphicsUtils.isMenuShortcutKeyDown(me)) {
tree.addSelectionPath(pressedPath);
setAnchorSelectionPath(pressedPath);
setLeadSelectionPath(pressedPath, true);
diff --git a/src/share/classes/javax/swing/plaf/nimbus/Defaults.template b/src/share/classes/javax/swing/plaf/nimbus/Defaults.template
index 7f4250b..caff0b2 100644
--- a/src/share/classes/javax/swing/plaf/nimbus/Defaults.template
+++ b/src/share/classes/javax/swing/plaf/nimbus/Defaults.template
@@ -26,7 +26,7 @@
import javax.swing.Painter;
import java.awt.Graphics;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
import sun.swing.plaf.synth.DefaultSynthStyle;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
@@ -131,7 +131,7 @@
//regions and their states that this class will use for later lookup.
//Additional regions can be registered later by 3rd party components.
//These are simply the default registrations.
- defaultFont = FontManager.getFontConfigFUIR("sans", Font.PLAIN, 12);
+ defaultFont = FontUtilities.getFontConfigFUIR("sans", Font.PLAIN, 12);
defaultStyle = new DefaultSynthStyle();
defaultStyle.setFont(defaultFont);
diff --git a/src/share/classes/javax/swing/plaf/nimbus/skin.laf b/src/share/classes/javax/swing/plaf/nimbus/skin.laf
index b44da31..1553278 100644
--- a/src/share/classes/javax/swing/plaf/nimbus/skin.laf
+++ b/src/share/classes/javax/swing/plaf/nimbus/skin.laf
@@ -14824,7 +14824,9 @@
<background/>
<cacheSettingsInherited>false</cacheSettingsInherited>
<cacheMode>NO_CACHING</cacheMode>
- <uiproperties/>
+ <uiproperties>
+ <uiProperty name="textIconGap" type="INT" value="5"/>
+ </uiproperties>
</style>
<backgroundStates>
<state stateKeys="Disabled">
diff --git a/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java b/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java
index a8ec772..c775a4b 100644
--- a/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java
+++ b/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java
@@ -475,11 +475,11 @@
return result;
}
- static void applyInsets(Rectangle rect, Insets insets) {
+ static void applyInsets(Rectangle rect, Insets insets, boolean leftToRight) {
if (insets != null) {
- rect.x += insets.left;
+ rect.x += (leftToRight ? insets.left : insets.right);
rect.y += insets.top;
- rect.width -= (insets.right + rect.x);
+ rect.width -= (leftToRight ? insets.right : insets.left) + rect.x;
rect.height -= (insets.bottom + rect.y);
}
}
@@ -492,12 +492,12 @@
g.setFont(style.getFont(context));
Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
- applyInsets(viewRect, mi.getInsets());
+ boolean leftToRight = SynthLookAndFeel.isLeftToRight(mi);
+ applyInsets(viewRect, mi.getInsets(), leftToRight);
SynthMenuItemLayoutHelper lh = new SynthMenuItemLayoutHelper(
- context, accContext, mi, checkIcon,
- arrowIcon, viewRect, defaultTextIconGap, acceleratorDelimiter,
- SynthLookAndFeel.isLeftToRight(mi),
+ context, accContext, mi, checkIcon, arrowIcon, viewRect,
+ defaultTextIconGap, acceleratorDelimiter, leftToRight,
MenuItemLayoutHelper.useCheckAndArrow(mi), propertyPrefix);
MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
diff --git a/src/share/classes/javax/swing/text/DefaultCaret.java b/src/share/classes/javax/swing/text/DefaultCaret.java
index 80d0610..6adb54f 100644
--- a/src/share/classes/javax/swing/text/DefaultCaret.java
+++ b/src/share/classes/javax/swing/text/DefaultCaret.java
@@ -510,7 +510,7 @@
if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0 &&
getDot() != -1) {
moveCaret(e);
- } else {
+ } else if (!e.isPopupTrigger()) {
positionCaret(e);
}
}
diff --git a/src/share/classes/javax/swing/text/StyleContext.java b/src/share/classes/javax/swing/text/StyleContext.java
index 4d194eb..2ee0b57 100644
--- a/src/share/classes/javax/swing/text/StyleContext.java
+++ b/src/share/classes/javax/swing/text/StyleContext.java
@@ -35,7 +35,7 @@
import java.lang.ref.WeakReference;
import java.util.WeakHashMap;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
/**
* A pool of styles and their associated resources. This class determines
@@ -263,8 +263,8 @@
if (f == null) {
f = new Font(family, style, size);
}
- if (! FontManager.fontSupportsDefaultEncoding(f)) {
- f = FontManager.getCompositeFontUIResource(f);
+ if (! FontUtilities.fontSupportsDefaultEncoding(f)) {
+ f = FontUtilities.getCompositeFontUIResource(f);
}
FontKey key = new FontKey(family, style, size);
fontTable.put(key, f);
diff --git a/src/share/classes/javax/swing/text/TextLayoutStrategy.java b/src/share/classes/javax/swing/text/TextLayoutStrategy.java
index 85afd75..0e3f987 100644
--- a/src/share/classes/javax/swing/text/TextLayoutStrategy.java
+++ b/src/share/classes/javax/swing/text/TextLayoutStrategy.java
@@ -30,6 +30,7 @@
import java.text.BreakIterator;
import java.awt.font.*;
import java.awt.geom.AffineTransform;
+import javax.swing.JComponent;
import javax.swing.event.DocumentEvent;
import sun.font.BidiUtils;
@@ -301,6 +302,13 @@
iter = BreakIterator.getLineInstance();
}
+ Object shaper = null;
+ if (c instanceof JComponent) {
+ shaper = ((JComponent) c).getClientProperty(
+ TextAttribute.NUMERIC_SHAPING);
+ }
+ text.setShaper(shaper);
+
measurer = new LineBreakMeasurer(text, iter, frc);
// If the children of the FlowView's logical view are GlyphViews, they
@@ -399,6 +407,10 @@
return pos - v.getStartOffset() + getBeginIndex();
}
+ private void setShaper(Object shaper) {
+ this.shaper = shaper;
+ }
+
// --- AttributedCharacterIterator methods -------------------------
/**
@@ -511,6 +523,8 @@
} else if( attribute == TextAttribute.RUN_DIRECTION ) {
return
v.getDocument().getProperty(TextAttribute.RUN_DIRECTION);
+ } else if (attribute == TextAttribute.NUMERIC_SHAPING) {
+ return shaper;
}
return null;
}
@@ -532,8 +546,10 @@
keys = new HashSet<Attribute>();
keys.add(TextAttribute.FONT);
keys.add(TextAttribute.RUN_DIRECTION);
+ keys.add(TextAttribute.NUMERIC_SHAPING);
}
+ private Object shaper = null;
}
}
diff --git a/src/share/classes/sun/awt/AWTAutoShutdown.java b/src/share/classes/sun/awt/AWTAutoShutdown.java
index 871da0c..e513569 100644
--- a/src/share/classes/sun/awt/AWTAutoShutdown.java
+++ b/src/share/classes/sun/awt/AWTAutoShutdown.java
@@ -30,7 +30,7 @@
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Map;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
/**
* This class is to let AWT shutdown automatically when a user is done
@@ -154,14 +154,17 @@
/**
* Add a specified thread to the set of busy event dispatch threads.
- * If this set already contains the specified thread, the call leaves
- * this set unchanged and returns silently.
+ * If this set already contains the specified thread or the thread is null,
+ * the call leaves this set unchanged and returns silently.
*
* @param thread thread to be added to this set, if not present.
* @see AWTAutoShutdown#notifyThreadFree
* @see AWTAutoShutdown#isReadyToShutdown
*/
public void notifyThreadBusy(final Thread thread) {
+ if (thread == null) {
+ return;
+ }
synchronized (activationLock) {
synchronized (mainLock) {
if (blockerThread == null) {
@@ -177,14 +180,17 @@
/**
* Remove a specified thread from the set of busy event dispatch threads.
- * If this set doesn't contain the specified thread, the call leaves
- * this set unchanged and returns silently.
+ * If this set doesn't contain the specified thread or the thread is null,
+ * the call leaves this set unchanged and returns silently.
*
* @param thread thread to be removed from this set, if present.
* @see AWTAutoShutdown#notifyThreadBusy
* @see AWTAutoShutdown#isReadyToShutdown
*/
public void notifyThreadFree(final Thread thread) {
+ if (thread == null) {
+ return;
+ }
synchronized (activationLock) {
synchronized (mainLock) {
busyThreadSet.remove(thread);
@@ -363,7 +369,7 @@
}
}
- final void dumpPeers(final Logger aLog) {
+ final void dumpPeers(final PlatformLogger aLog) {
synchronized (activationLock) {
synchronized (mainLock) {
aLog.fine("Mapped peers:");
diff --git a/src/share/classes/sun/awt/AppContext.java b/src/share/classes/sun/awt/AppContext.java
index 4bdc337..3dcabdc 100644
--- a/src/share/classes/sun/awt/AppContext.java
+++ b/src/share/classes/sun/awt/AppContext.java
@@ -40,10 +40,9 @@
import java.util.Map;
import java.util.Set;
import java.util.HashSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
+import sun.util.logging.PlatformLogger;
/**
* The AppContext is a table referenced by ThreadGroup which stores
@@ -128,7 +127,7 @@
* @author Fred Ecks
*/
public final class AppContext {
- private static final Logger log = Logger.getLogger("sun.awt.AppContext");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.AppContext");
/* Since the contents of an AppContext are unique to each Java
* session, this class should never be serialized. */
@@ -380,9 +379,7 @@
try {
w.dispose();
} catch (Throwable t) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "exception occured while disposing app context", t);
- }
+ log.finer("exception occured while disposing app context", t);
}
}
AccessController.doPrivileged(new PrivilegedAction() {
diff --git a/src/share/classes/sun/awt/ComponentAccessor.java b/src/share/classes/sun/awt/ComponentAccessor.java
index 49a3838..d186363 100644
--- a/src/share/classes/sun/awt/ComponentAccessor.java
+++ b/src/share/classes/sun/awt/ComponentAccessor.java
@@ -39,8 +39,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -78,7 +77,7 @@
private static Method methodGetCursorNoClientCode;
private static Method methodLocationNoClientCode;
- private static final Logger log = Logger.getLogger("sun.awt.ComponentAccessor");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ComponentAccessor");
private ComponentAccessor() {
}
@@ -136,13 +135,13 @@
methodLocationNoClientCode.setAccessible(true);
}
catch (NoSuchFieldException e) {
- log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+ log.fine("Unable to initialize ComponentAccessor", e);
}
catch (ClassNotFoundException e) {
- log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+ log.fine("Unable to initialize ComponentAccessor", e);
}
catch (NoSuchMethodException e) {
- log.log(Level.FINE, "Unable to initialize ComponentAccessor", e);
+ log.fine("Unable to initialize ComponentAccessor", e);
}
// to please javac
return null;
@@ -157,7 +156,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -168,7 +167,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -179,7 +178,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -190,7 +189,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -204,7 +203,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -214,7 +213,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return 0;
}
@@ -225,7 +224,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return 0;
}
@@ -236,7 +235,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return 0;
}
@@ -247,7 +246,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return 0;
}
@@ -258,7 +257,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return false;
}
@@ -271,10 +270,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
return parent;
@@ -288,10 +287,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
return font;
@@ -307,10 +306,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
}
@@ -322,10 +321,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
}
@@ -336,7 +335,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -348,7 +347,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return color;
}
@@ -361,7 +360,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return color;
}
@@ -372,7 +371,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -384,7 +383,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return f;
}
@@ -396,7 +395,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return peer;
}
@@ -406,7 +405,7 @@
fieldPeer.set(c, peer);
} catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
}
@@ -415,7 +414,7 @@
return fieldIgnoreRepaint.getBoolean(comp);
}
catch (IllegalAccessException e) {
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return false;
@@ -427,7 +426,7 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
return false;
}
@@ -439,10 +438,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
return enabled;
}
@@ -455,10 +454,10 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
return cursor;
@@ -472,12 +471,13 @@
}
catch (IllegalAccessException e)
{
- log.log(Level.FINE, "Unable to access the Component object", e);
+ log.fine("Unable to access the Component object", e);
}
catch (InvocationTargetException e) {
- log.log(Level.FINE, "Unable to invoke on the Component object", e);
+ log.fine("Unable to invoke on the Component object", e);
}
return loc;
}
+
}
diff --git a/src/share/classes/sun/awt/DebugSettings.java b/src/share/classes/sun/awt/DebugSettings.java
index ac343ff..9f0f474 100644
--- a/src/share/classes/sun/awt/DebugSettings.java
+++ b/src/share/classes/sun/awt/DebugSettings.java
@@ -28,7 +28,7 @@
import java.io.*;
import java.util.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/*
* Internal class that manages sun.awt.Debug settings.
@@ -72,7 +72,7 @@
* the fix for 4638447).
*/
final class DebugSettings {
- private static final Logger log = Logger.getLogger("sun.awt.debug.DebugSettings");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings");
/* standard debug property key names */
static final String PREFIX = "awtdebug";
@@ -128,8 +128,8 @@
});
// echo the initial property settings to stdout
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "DebugSettings:\n{0}", String.valueOf(this));
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("DebugSettings:\n{0}" + this);
}
}
@@ -258,8 +258,8 @@
}
private void println(Object object) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, object.toString());
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer(object.toString());
}
}
diff --git a/src/share/classes/sun/awt/FontConfiguration.java b/src/share/classes/sun/awt/FontConfiguration.java
index 4504af2..27cee5e 100644
--- a/src/share/classes/sun/awt/FontConfiguration.java
+++ b/src/share/classes/sun/awt/FontConfiguration.java
@@ -30,7 +30,6 @@
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
@@ -38,7 +37,6 @@
import java.nio.charset.CharsetEncoder;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.logging.Logger;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
@@ -49,7 +47,10 @@
import java.util.Set;
import java.util.Vector;
import sun.font.CompositeFontDescriptor;
-import sun.java2d.SunGraphicsEnvironment;
+import sun.font.SunFontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
+import sun.util.logging.PlatformLogger;
/**
* Provides the definitions of the five logical fonts: Serif, SansSerif,
@@ -65,10 +66,10 @@
protected static Locale startupLocale = null;
protected static Hashtable localeMap = null;
private static FontConfiguration fontConfig;
- private static Logger logger;
+ private static PlatformLogger logger;
protected static boolean isProperties = true;
- protected SunGraphicsEnvironment environment;
+ protected SunFontManager fontManager;
protected boolean preferLocaleFonts;
protected boolean preferPropFonts;
@@ -80,11 +81,11 @@
/* A default FontConfiguration must be created before an alternate
* one to ensure proper static initialisation takes place.
*/
- public FontConfiguration(SunGraphicsEnvironment environment) {
- if (SunGraphicsEnvironment.debugFonts && logger == null) {
- logger = Logger.getLogger("sun.awt.FontConfiguration");
+ public FontConfiguration(SunFontManager fm) {
+ if (FontUtilities.debugFonts() && logger == null) {
+ logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
}
- this.environment = environment;
+ fontManager = fm;
setOsNameAndVersion(); /* static initialization */
setEncoding(); /* static initialization */
/* Separating out the file location from the rest of the
@@ -106,10 +107,10 @@
return true;
}
- public FontConfiguration(SunGraphicsEnvironment environment,
+ public FontConfiguration(SunFontManager fm,
boolean preferLocaleFonts,
boolean preferPropFonts) {
- this.environment = environment;
+ fontManager = fm;
this.preferLocaleFonts = preferLocaleFonts;
this.preferPropFonts = preferPropFonts;
/* fontConfig should be initialised by default constructor, and
@@ -198,17 +199,17 @@
loadBinary(in);
}
in.close();
- if (SunGraphicsEnvironment.debugFonts) {
+ if (FontUtilities.debugFonts()) {
logger.config("Read logical font configuration from " + f);
}
} catch (IOException e) {
- if (SunGraphicsEnvironment.debugFonts) {
+ if (FontUtilities.debugFonts()) {
logger.config("Failed to read logical font configuration from " + f);
}
}
}
String version = getVersion();
- if (!"1".equals(version) && SunGraphicsEnvironment.debugFonts) {
+ if (!"1".equals(version) && FontUtilities.debugFonts()) {
logger.config("Unsupported fontconfig version: " + version);
}
}
@@ -219,8 +220,8 @@
File fallbackDir = new File(fallbackDirName);
if (fallbackDir.exists() && fallbackDir.isDirectory()) {
- String[] ttfs = fallbackDir.list(SunGraphicsEnvironment.ttFilter);
- String[] t1s = fallbackDir.list(SunGraphicsEnvironment.t1Filter);
+ String[] ttfs = fallbackDir.list(fontManager.getTrueTypeFilter());
+ String[] t1s = fallbackDir.list(fontManager.getType1Filter());
int numTTFs = (ttfs == null) ? 0 : ttfs.length;
int numT1s = (t1s == null) ? 0 : t1s.length;
int len = numTTFs + numT1s;
@@ -236,7 +237,7 @@
installedFallbackFontFiles[i+numTTFs] =
fallbackDir + File.separator + t1s[i];
}
- environment.registerFontsInDir(fallbackDirName);
+ fontManager.registerFontsInDir(fallbackDirName);
}
}
@@ -365,7 +366,7 @@
stringTable = new StringBuilder(4096);
if (verbose && logger == null) {
- logger = Logger.getLogger("sun.awt.FontConfiguration");
+ logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
}
new PropertiesHandler().load(in);
@@ -465,7 +466,7 @@
nameIDs[index] = getComponentFontID(coreScripts[index],
fontIndex, styleIndex);
if (preferLocaleFonts && localeMap != null &&
- sun.font.FontManager.usingAlternateFontforJALocales()) {
+ fontManager.usingAlternateFontforJALocales()) {
nameIDs[index] = remapLocaleMap(fontIndex, styleIndex,
coreScripts[index], nameIDs[index]);
}
@@ -480,7 +481,7 @@
short id = getComponentFontID(fallbackScripts[i],
fontIndex, styleIndex);
if (preferLocaleFonts && localeMap != null &&
- sun.font.FontManager.usingAlternateFontforJALocales()) {
+ fontManager.usingAlternateFontforJALocales()) {
id = remapLocaleMap(fontIndex, styleIndex, fallbackScripts[i], id);
}
if (preferPropFonts) {
@@ -973,8 +974,8 @@
public CompositeFontDescriptor[] get2DCompositeFontInfo() {
CompositeFontDescriptor[] result =
new CompositeFontDescriptor[NUM_FONTS * NUM_STYLES];
- String defaultFontFile = environment.getDefaultFontFile();
- String defaultFontFaceName = environment.getDefaultFontFaceName();
+ String defaultFontFile = fontManager.getDefaultFontFile();
+ String defaultFontFaceName = fontManager.getDefaultFontFaceName();
for (int fontIndex = 0; fontIndex < NUM_FONTS; fontIndex++) {
String fontName = publicFontNames[fontIndex];
@@ -1121,7 +1122,7 @@
*/
HashMap<String, Boolean> existsMap;
public boolean needToSearchForFile(String fileName) {
- if (!environment.isLinux) {
+ if (!FontUtilities.isLinux) {
return false;
} else if (existsMap == null) {
existsMap = new HashMap<String, Boolean>();
@@ -1139,7 +1140,7 @@
} else {
exists = Boolean.valueOf((new File(fileName)).exists());
existsMap.put(fileName, exists);
- if (SunGraphicsEnvironment.debugFonts &&
+ if (FontUtilities.debugFonts() &&
exists == Boolean.FALSE) {
logger.warning("Couldn't locate font file " + fileName);
}
@@ -2067,7 +2068,8 @@
throw new Exception();
}
} catch (Exception e) {
- if (SunGraphicsEnvironment.debugFonts && logger != null) {
+ if (FontUtilities.debugFonts() &&
+ logger != null) {
logger.config("Failed parsing " + key +
" property of font configuration.");
diff --git a/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java b/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java
index 6a8708a..8a1743e 100644
--- a/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java
+++ b/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java
@@ -39,12 +39,11 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
- private static final Logger focusLog = Logger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor =
AWTAccessor.getKeyboardFocusManagerAccessor();
@@ -64,7 +63,8 @@
public void clearGlobalFocusOwner(Window activeWindow) {
if (activeWindow != null) {
Component focusOwner = activeWindow.getFocusOwner();
- if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Clearing global focus owner " + focusOwner);
+ if (focusLog.isLoggable(PlatformLogger.FINE))
+ focusLog.fine("Clearing global focus owner " + focusOwner);
if (focusOwner != null) {
FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
@@ -130,14 +130,16 @@
FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
false, lightweightChild, cause);
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Posting focus event: " + fl);
+ if (focusLog.isLoggable(PlatformLogger.FINER))
+ focusLog.finer("Posting focus event: " + fl);
SunToolkit.postPriorityEvent(fl);
}
FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
false, currentOwner, cause);
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Posting focus event: " + fg);
+ if (focusLog.isLoggable(PlatformLogger.FINER))
+ focusLog.finer("Posting focus event: " + fg);
SunToolkit.postPriorityEvent(fg);
return true;
}
diff --git a/src/share/classes/sun/awt/ScrollPaneWheelScroller.java b/src/share/classes/sun/awt/ScrollPaneWheelScroller.java
index 8035f3f..c68829e 100644
--- a/src/share/classes/sun/awt/ScrollPaneWheelScroller.java
+++ b/src/share/classes/sun/awt/ScrollPaneWheelScroller.java
@@ -30,7 +30,7 @@
import java.awt.Adjustable;
import java.awt.event.MouseWheelEvent;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/*
* ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel
@@ -39,7 +39,7 @@
*/
public abstract class ScrollPaneWheelScroller {
- private static final Logger log = Logger.getLogger("sun.awt.ScrollPaneWheelScroller");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ScrollPaneWheelScroller");
private ScrollPaneWheelScroller() {}
@@ -47,8 +47,8 @@
* Called from ScrollPane.processMouseWheelEvent()
*/
public static void handleWheelScrolling(ScrollPane sp, MouseWheelEvent e) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
}
int increment = 0;
@@ -56,8 +56,8 @@
Adjustable adj = getAdjustableToScroll(sp);
if (adj != null) {
increment = getIncrementFromAdjustable(adj, e);
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "increment from adjustable(" + adj.getClass() + ") : " + increment);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
}
scrollAdjustable(adj, increment);
}
@@ -74,8 +74,8 @@
// if policy is display always or never, use vert
if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
policy == ScrollPane.SCROLLBARS_NEVER) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "using vertical scrolling due to scrollbar policy");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("using vertical scrolling due to scrollbar policy");
}
return sp.getVAdjustable();
@@ -85,31 +85,31 @@
Insets ins = sp.getInsets();
int vertScrollWidth = sp.getVScrollbarWidth();
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "insets: l = " + ins.left + ", r = " + ins.right +
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("insets: l = " + ins.left + ", r = " + ins.right +
", t = " + ins.top + ", b = " + ins.bottom);
- log.log(Level.FINER, "vertScrollWidth = " + vertScrollWidth);
+ log.finer("vertScrollWidth = " + vertScrollWidth);
}
// Check if scrollbar is showing by examining insets of the
// ScrollPane
if (ins.right >= vertScrollWidth) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "using vertical scrolling because scrollbar is present");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("using vertical scrolling because scrollbar is present");
}
return sp.getVAdjustable();
}
else {
int horizScrollHeight = sp.getHScrollbarHeight();
if (ins.bottom >= horizScrollHeight) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "using horiz scrolling because scrollbar is present");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("using horiz scrolling because scrollbar is present");
}
return sp.getHAdjustable();
}
else {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "using NO scrollbar becsause neither is present");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("using NO scrollbar becsause neither is present");
}
return null;
}
@@ -124,9 +124,9 @@
*/
public static int getIncrementFromAdjustable(Adjustable adj,
MouseWheelEvent e) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (adj == null) {
- log.log(Level.FINE, "Assertion (adj != null) failed");
+ log.fine("Assertion (adj != null) failed");
}
}
@@ -146,19 +146,19 @@
* bounds and sets the new value to the Adjustable.
*/
public static void scrollAdjustable(Adjustable adj, int amount) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (adj == null) {
- log.log(Level.FINE, "Assertion (adj != null) failed");
+ log.fine("Assertion (adj != null) failed");
}
if (amount == 0) {
- log.log(Level.FINE, "Assertion (amount != 0) failed");
+ log.fine("Assertion (amount != 0) failed");
}
}
int current = adj.getValue();
int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "doScrolling by " + amount);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("doScrolling by " + amount);
}
if (amount > 0 && current < upperLimit) { // still some room to scroll
diff --git a/src/share/classes/sun/awt/SunDisplayChanger.java b/src/share/classes/sun/awt/SunDisplayChanger.java
index b4c7f49..b586e78 100644
--- a/src/share/classes/sun/awt/SunDisplayChanger.java
+++ b/src/share/classes/sun/awt/SunDisplayChanger.java
@@ -33,7 +33,7 @@
import java.util.HashMap;
import java.util.WeakHashMap;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/**
* This class is used to aid in keeping track of DisplayChangedListeners and
@@ -54,7 +54,7 @@
* screen to another on a system equipped with multiple displays.
*/
public class SunDisplayChanger {
- private static final Logger log = Logger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
// Create a new synchronizedMap with initial capacity of one listener.
// It is asserted that the most common case is to have one GraphicsDevice
@@ -68,13 +68,13 @@
* notified when the display is changed.
*/
public void add(DisplayChangedListener theListener) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (theListener == null) {
- log.log(Level.FINE, "Assertion (theListener != null) failed");
+ log.fine("Assertion (theListener != null) failed");
}
}
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Adding listener: " + theListener);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Adding listener: " + theListener);
}
listeners.put(theListener, null);
}
@@ -83,13 +83,13 @@
* Remove the given DisplayChangeListener from this SunDisplayChanger.
*/
public void remove(DisplayChangedListener theListener) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (theListener == null) {
- log.log(Level.FINE, "Assertion (theListener != null) failed");
+ log.fine("Assertion (theListener != null) failed");
}
}
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Removing listener: " + theListener);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Removing listener: " + theListener);
}
listeners.remove(theListener);
}
@@ -99,8 +99,8 @@
* taken place by calling their displayChanged() methods.
*/
public void notifyListeners() {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "notifyListeners");
+ if (log.isLoggable(PlatformLogger.FINEST)) {
+ log.finest("notifyListeners");
}
// This method is implemented by making a clone of the set of listeners,
// and then iterating over the clone. This is because during the course
@@ -126,8 +126,8 @@
DisplayChangedListener current =
(DisplayChangedListener) itr.next();
try {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "displayChanged for listener: " + current);
+ if (log.isLoggable(PlatformLogger.FINEST)) {
+ log.finest("displayChanged for listener: " + current);
}
current.displayChanged();
} catch (IllegalComponentStateException e) {
@@ -146,7 +146,7 @@
* taken place by calling their paletteChanged() methods.
*/
public void notifyPaletteChanged() {
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("notifyPaletteChanged");
}
// This method is implemented by making a clone of the set of listeners,
@@ -172,8 +172,8 @@
DisplayChangedListener current =
(DisplayChangedListener) itr.next();
try {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "paletteChanged for listener: " + current);
+ if (log.isLoggable(PlatformLogger.FINEST)) {
+ log.finest("paletteChanged for listener: " + current);
}
current.paletteChanged();
} catch (IllegalComponentStateException e) {
diff --git a/src/share/classes/sun/awt/SunGraphicsCallback.java b/src/share/classes/sun/awt/SunGraphicsCallback.java
index a856034..da54418 100644
--- a/src/share/classes/sun/awt/SunGraphicsCallback.java
+++ b/src/share/classes/sun/awt/SunGraphicsCallback.java
@@ -27,14 +27,14 @@
import java.awt.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
public abstract class SunGraphicsCallback {
public static final int HEAVYWEIGHTS = 0x1;
public static final int LIGHTWEIGHTS = 0x2;
public static final int TWO_PASSES = 0x4;
- private static final Logger log = Logger.getLogger("sun.awt.SunGraphicsCallback");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunGraphicsCallback");
public abstract void run(Component comp, Graphics cg);
@@ -87,11 +87,11 @@
int ncomponents = comps.length;
Shape clip = g.getClip();
- if (log.isLoggable(Level.FINER) && (clip != null)) {
+ if (log.isLoggable(PlatformLogger.FINER) && (clip != null)) {
Rectangle newrect = clip.getBounds();
- log.log(Level.FINER, "x = " + newrect.x + ", y = " + newrect.y +
- ", width = " + newrect.width +
- ", height = " + newrect.height);
+ log.finer("x = " + newrect.x + ", y = " + newrect.y +
+ ", width = " + newrect.width +
+ ", height = " + newrect.height);
}
// A seriously sad hack--
diff --git a/src/share/classes/sun/awt/SunToolkit.java b/src/share/classes/sun/awt/SunToolkit.java
index b4dd06a..e9bc045 100644
--- a/src/share/classes/sun/awt/SunToolkit.java
+++ b/src/share/classes/sun/awt/SunToolkit.java
@@ -40,8 +40,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.misc.SoftCache;
import sun.font.FontDesignMetrics;
import sun.awt.im.InputContext;
@@ -61,7 +60,7 @@
implements WindowClosingSupport, WindowClosingListener,
ComponentFactory, InputMethodSupport, KeyboardFocusManagerPeerProvider {
- private static final Logger log = Logger.getLogger("sun.awt.SunToolkit");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunToolkit");
/* Load debug settings for native code */
static {
@@ -986,9 +985,9 @@
//with scale factors x1, x3/4, x2/3, xN, x1/N.
Image im = i.next();
if (im == null) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "SunToolkit.getScaledIconImage: " +
- "Skipping the image passed into Java because it's null.");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("SunToolkit.getScaledIconImage: " +
+ "Skipping the image passed into Java because it's null.");
}
continue;
}
@@ -1002,9 +1001,9 @@
iw = im.getWidth(null);
ih = im.getHeight(null);
} catch (Exception e){
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "SunToolkit.getScaledIconImage: " +
- "Perhaps the image passed into Java is broken. Skipping this icon.");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("SunToolkit.getScaledIconImage: " +
+ "Perhaps the image passed into Java is broken. Skipping this icon.");
}
continue;
}
@@ -1077,8 +1076,8 @@
try {
int x = (width - bestWidth) / 2;
int y = (height - bestHeight) / 2;
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "WWindowPeer.getScaledIconData() result : " +
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("WWindowPeer.getScaledIconData() result : " +
"w : " + width + " h : " + height +
" iW : " + bestImage.getWidth(null) + " iH : " + bestImage.getHeight(null) +
" sim : " + bestSimilarity + " sf : " + bestScaleFactor +
@@ -1095,9 +1094,9 @@
public static DataBufferInt getScaledIconData(java.util.List<Image> imageList, int width, int height) {
BufferedImage bimage = getScaledIconImage(imageList, width, height);
if (bimage == null) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "SunToolkit.getScaledIconData: " +
- "Perhaps the image passed into Java is broken. Skipping this icon.");
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("SunToolkit.getScaledIconData: " +
+ "Perhaps the image passed into Java is broken. Skipping this icon.");
}
return null;
}
@@ -1913,7 +1912,7 @@
}
}
- protected static void dumpPeers(final Logger aLog) {
+ protected static void dumpPeers(final PlatformLogger aLog) {
AWTAutoShutdown.getInstance().dumpPeers(aLog);
}
diff --git a/src/share/classes/sun/awt/WindowAccessor.java b/src/share/classes/sun/awt/WindowAccessor.java
index 10368ef..e1fb7c4 100644
--- a/src/share/classes/sun/awt/WindowAccessor.java
+++ b/src/share/classes/sun/awt/WindowAccessor.java
@@ -29,8 +29,7 @@
import java.lang.reflect.Field;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -41,7 +40,7 @@
private static Field fieldIsAutoRequestFocus;
private static Field fieldIsTrayIconWindow;
- private static final Logger log = Logger.getLogger("sun.awt.WindowAccessor");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.WindowAccessor");
private WindowAccessor() {
}
@@ -57,9 +56,9 @@
fieldIsTrayIconWindow.setAccessible(true);
} catch (NoSuchFieldException e) {
- log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e);
+ log.fine("Unable to initialize WindowAccessor: ", e);
} catch (ClassNotFoundException e) {
- log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e);
+ log.fine("Unable to initialize WindowAccessor: ", e);
}
return null;
}
@@ -71,7 +70,7 @@
return fieldIsAutoRequestFocus.getBoolean(w);
} catch (IllegalAccessException e) {
- log.log(Level.FINE, "Unable to access the Window object", e);
+ log.fine("Unable to access the Window object", e);
}
return true;
}
@@ -81,7 +80,7 @@
return fieldIsTrayIconWindow.getBoolean(w);
} catch (IllegalAccessException e) {
- log.log(Level.FINE, "Unable to access the Window object", e);
+ log.fine("Unable to access the Window object", e);
}
return false;
}
@@ -91,7 +90,7 @@
fieldIsTrayIconWindow.set(w, isTrayIconWindow);
} catch (IllegalAccessException e) {
- log.log(Level.FINE, "Unable to access the Window object", e);
+ log.fine("Unable to access the Window object", e);
}
}
}
diff --git a/src/share/classes/sun/awt/datatransfer/DataTransferer.java b/src/share/classes/sun/awt/datatransfer/DataTransferer.java
index cfe0190..521e691 100644
--- a/src/share/classes/sun/awt/datatransfer/DataTransferer.java
+++ b/src/share/classes/sun/awt/datatransfer/DataTransferer.java
@@ -89,7 +89,7 @@
import java.util.TreeMap;
import java.util.TreeSet;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
@@ -222,7 +222,7 @@
*/
private static DataTransferer transferer;
- private static final Logger dtLog = Logger.getLogger("sun.awt.datatransfer.DataTransfer");
+ private static final PlatformLogger dtLog = PlatformLogger.getLogger("sun.awt.datatransfer.DataTransfer");
static {
Class tCharArrayClass = null, tByteArrayClass = null;
@@ -382,9 +382,9 @@
* "text".
*/
public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
- if (dtLog.isLoggable(Level.FINE)) {
+ if (dtLog.isLoggable(PlatformLogger.FINE)) {
if (!"text".equals(flavor.getPrimaryType())) {
- dtLog.log(Level.FINE, "Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
+ dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
}
}
diff --git a/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java
index 6e9b44d..c137800 100644
--- a/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java
+++ b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java
@@ -48,7 +48,7 @@
import java.util.Map;
import java.util.Arrays;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.io.IOException;
import java.io.InputStream;
@@ -99,7 +99,7 @@
protected static final Object _globalLock = new Object();
- private static final Logger dndLog = Logger.getLogger("sun.awt.dnd.SunDropTargetContextPeer");
+ private static final PlatformLogger dndLog = PlatformLogger.getLogger("sun.awt.dnd.SunDropTargetContextPeer");
/*
* a primitive mechanism for advertising intra-JVM Transferables
@@ -845,8 +845,8 @@
void registerEvent(SunDropTargetEvent e) {
handler.lock();
- if (!eventSet.add(e) && dndLog.isLoggable(Level.FINE)) {
- dndLog.log(Level.FINE, "Event is already registered: " + e);
+ if (!eventSet.add(e) && dndLog.isLoggable(PlatformLogger.FINE)) {
+ dndLog.fine("Event is already registered: " + e);
}
handler.unlock();
}
diff --git a/src/share/classes/sun/awt/im/InputContext.java b/src/share/classes/sun/awt/im/InputContext.java
index d0c84c7..4a077cf 100644
--- a/src/share/classes/sun/awt/im/InputContext.java
+++ b/src/share/classes/sun/awt/im/InputContext.java
@@ -50,9 +50,9 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
-import java.util.logging.*;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit;
/**
@@ -67,7 +67,7 @@
public class InputContext extends java.awt.im.InputContext
implements ComponentListener, WindowListener {
- private static final Logger log = Logger.getLogger("sun.awt.im.InputContext");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.im.InputContext");
// The current input method is represented by two objects:
// a locator is used to keep information about the selected
// input method and locale until we actually need a real input
@@ -386,7 +386,7 @@
}
previousInputMethod = null;
- if (log.isLoggable(Level.FINE)) log.fine("Current client component " + currentClientComponent);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Current client component " + currentClientComponent);
if (inputMethod instanceof InputMethodAdapter) {
((InputMethodAdapter) inputMethod).setClientComponent(currentClientComponent);
}
@@ -889,7 +889,7 @@
{inputMethodLocator.getDescriptor().getInputMethodDisplayName(null, Locale.getDefault()),
throwable.getLocalizedMessage()};
MessageFormat mf = new MessageFormat(errorTextFormat);
- Logger logger = Logger.getLogger("sun.awt.im");
+ PlatformLogger logger = PlatformLogger.getLogger("sun.awt.im");
logger.config(mf.format(args));
}
diff --git a/src/share/classes/sun/awt/shell/ShellFolderManager.java b/src/share/classes/sun/awt/shell/ShellFolderManager.java
index fe00063..ce42bd3 100644
--- a/src/share/classes/sun/awt/shell/ShellFolderManager.java
+++ b/src/share/classes/sun/awt/shell/ShellFolderManager.java
@@ -57,8 +57,9 @@
* folders, such as Desktop, Documents, History, Network, Home, etc.
* This is used in the shortcut panel of the filechooser on Windows 2000
* and Windows Me.
- * "fileChooserIcon nn":
- * Returns an <code>Image</code> - icon nn from resource 124 in comctl32.dll (Windows only).
+ * "fileChooserIcon <icon>":
+ * Returns an <code>Image</code> - icon can be ListView, DetailsView, UpFolder, NewFolder or
+ * ViewMenu (Windows only).
*
* @return An Object matching the key string.
*/
diff --git a/src/share/classes/sun/font/CMap.java b/src/share/classes/sun/font/CMap.java
index d144518..1d3d950 100644
--- a/src/share/classes/sun/font/CMap.java
+++ b/src/share/classes/sun/font/CMap.java
@@ -232,7 +232,7 @@
* fonts are using gb2312 encoding, have to use this
* workaround to make Solaris zh_CN locale work. -sherman
*/
- if (FontManager.isSolaris && font.platName != null &&
+ if (FontUtilities.isSolaris && font.platName != null &&
(font.platName.startsWith(
"/usr/openwin/lib/locale/zh_CN.EUC/X11/fonts/TrueType") ||
font.platName.startsWith(
@@ -407,8 +407,8 @@
subtableLength = buffer.getInt(offset+4) & INTMASK;
}
if (offset+subtableLength > buffer.capacity()) {
- if (FontManager.logging) {
- FontManager.logger.warning("Cmap subtable overflows buffer.");
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().warning("Cmap subtable overflows buffer.");
}
}
switch (subtableFormat) {
diff --git a/src/share/classes/sun/font/CompositeFont.java b/src/share/classes/sun/font/CompositeFont.java
index 4712dc0..7d51e47 100644
--- a/src/share/classes/sun/font/CompositeFont.java
+++ b/src/share/classes/sun/font/CompositeFont.java
@@ -60,7 +60,7 @@
public CompositeFont(String name, String[] compFileNames,
String[] compNames, int metricsSlotCnt,
int[] exclRanges, int[] maxIndexes,
- boolean defer) {
+ boolean defer, SunFontManager fm) {
handle = new Font2DHandle(this);
fullName = name;
@@ -85,13 +85,13 @@
* The caller could be responsible for this, but for now it seems
* better that it is handled internally to the CompositeFont class.
*/
- if (FontManager.eudcFont != null) {
+ if (fm.getEUDCFont() != null) {
numSlots++;
if (componentNames != null) {
componentNames = new String[numSlots];
System.arraycopy(compNames, 0, componentNames, 0, numSlots-1);
componentNames[numSlots-1] =
- FontManager.eudcFont.getFontName(null);
+ fm.getEUDCFont().getFontName(null);
}
if (componentFileNames != null) {
componentFileNames = new String[numSlots];
@@ -99,7 +99,7 @@
componentFileNames, 0, numSlots-1);
}
components = new PhysicalFont[numSlots];
- components[numSlots-1] = FontManager.eudcFont;
+ components[numSlots-1] = fm.getEUDCFont();
deferredInitialisation = new boolean[numSlots];
if (defer) {
for (int i=0; i<numSlots-1; i++) {
@@ -165,7 +165,7 @@
* it is harmless that we do not know a slot is already initialised
* and just need to discover that and mark it so.
*/
- synchronized (FontManager.class) {
+ synchronized (FontManagerFactory.getInstance()) {
components = new PhysicalFont[numSlots];
components[0] = physFont;
System.arraycopy(compFont.components, 0,
@@ -235,7 +235,8 @@
* This global lock is rarely likely to be an issue as there
* are only going to be a few calls into this code.
*/
- synchronized (FontManager.class) {
+ SunFontManager fm = SunFontManager.getInstance();
+ synchronized (fm) {
if (componentNames == null) {
componentNames = new String[numSlots];
}
@@ -251,22 +252,21 @@
*/
if (componentFileNames != null &&
componentFileNames[slot] != null) {
- components[slot] = FontManager.initialiseDeferredFont
- (componentFileNames[slot]);
+ components[slot] =
+ fm.initialiseDeferredFont(componentFileNames[slot]);
}
if (components[slot] == null) {
- components[slot] = FontManager.getDefaultPhysicalFont();
+ components[slot] = fm.getDefaultPhysicalFont();
}
String name = components[slot].getFontName(null);
if (componentNames[slot] == null) {
componentNames[slot] = name;
} else if (!componentNames[slot].equalsIgnoreCase(name)) {
components[slot] =
- (PhysicalFont)
- FontManager.findFont2D(componentNames[slot],
- style,
- FontManager.PHYSICAL_FALLBACK);
+ (PhysicalFont) fm.findFont2D(componentNames[slot],
+ style,
+ FontManager.PHYSICAL_FALLBACK);
}
}
deferredInitialisation[slot] = false;
@@ -333,21 +333,22 @@
if (deferredInitialisation[slot]) {
doDeferredInitialisation(slot);
}
+ SunFontManager fm = SunFontManager.getInstance();
try {
PhysicalFont font = components[slot];
if (font == null) {
try {
- font = (PhysicalFont)FontManager.
+ font = (PhysicalFont) fm.
findFont2D(componentNames[slot], style,
FontManager.PHYSICAL_FALLBACK);
components[slot] = font;
} catch (ClassCastException cce) {
- font = FontManager.getDefaultPhysicalFont();
+ font = fm.getDefaultPhysicalFont();
}
}
return font;
} catch (Exception e) {
- return FontManager.getDefaultPhysicalFont();
+ return fm.getDefaultPhysicalFont();
}
}
diff --git a/src/share/classes/sun/font/CompositeGlyphMapper.java b/src/share/classes/sun/font/CompositeGlyphMapper.java
index f9227de..93e68df 100644
--- a/src/share/classes/sun/font/CompositeGlyphMapper.java
+++ b/src/share/classes/sun/font/CompositeGlyphMapper.java
@@ -211,10 +211,10 @@
glyphs[i] = convertToGlyph(code);
}
- if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+ if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
continue;
}
- else if (FontManager.isComplexCharCode(code)) {
+ else if (FontUtilities.isComplexCharCode(code)) {
return true;
}
else if (code >= 0x10000) {
diff --git a/src/share/classes/sun/font/FileFont.java b/src/share/classes/sun/font/FileFont.java
index 5aad11b..74a07af 100644
--- a/src/share/classes/sun/font/FileFont.java
+++ b/src/share/classes/sun/font/FileFont.java
@@ -158,7 +158,8 @@
* rare maybe it is not worth doing this last part.
*/
synchronized void deregisterFontAndClearStrikeCache() {
- FontManager.deRegisterBadFont(this);
+ SunFontManager fm = SunFontManager.getInstance();
+ fm.deRegisterBadFont(this);
for (Reference strikeRef : strikeCache.values()) {
if (strikeRef != null) {
@@ -172,14 +173,14 @@
}
}
scaler.dispose();
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
}
StrikeMetrics getFontMetrics(long pScalerContext) {
try {
return getScaler().getFontMetrics(pScalerContext);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getFontMetrics(pScalerContext);
}
}
@@ -188,7 +189,7 @@
try {
return getScaler().getGlyphAdvance(pScalerContext, glyphCode);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphAdvance(pScalerContext, glyphCode);
}
}
@@ -197,7 +198,7 @@
try {
getScaler().getGlyphMetrics(pScalerContext, glyphCode, metrics);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
getGlyphMetrics(pScalerContext, glyphCode, metrics);
}
}
@@ -206,7 +207,7 @@
try {
return getScaler().getGlyphImage(pScalerContext, glyphCode);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphImage(pScalerContext, glyphCode);
}
}
@@ -215,7 +216,7 @@
try {
return getScaler().getGlyphOutlineBounds(pScalerContext, glyphCode);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphOutlineBounds(pScalerContext, glyphCode);
}
}
@@ -224,7 +225,7 @@
try {
return getScaler().getGlyphOutline(pScalerContext, glyphCode, x, y);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphOutline(pScalerContext, glyphCode, x, y);
}
}
@@ -233,7 +234,7 @@
try {
return getScaler().getGlyphVectorOutline(pScalerContext, glyphs, numGlyphs, x, y);
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphVectorOutline(pScalerContext, glyphs, numGlyphs, x, y);
}
}
@@ -275,7 +276,8 @@
*/
fontFile.delete();
/* remove from delete on exit hook list : */
- FontManager.tmpFontFiles.remove(fontFile);
+ // FIXME: still need to be refactored
+ SunFontManager.getInstance().tmpFontFiles.remove(fontFile);
} catch (Exception e) {
}
}
diff --git a/src/share/classes/sun/font/FileFontStrike.java b/src/share/classes/sun/font/FileFontStrike.java
index 11dff8a..b6c6352 100644
--- a/src/share/classes/sun/font/FileFontStrike.java
+++ b/src/share/classes/sun/font/FileFontStrike.java
@@ -114,7 +114,7 @@
private static native boolean initNative();
private static boolean isXPorLater = false;
static {
- if (FontManager.isWindows && !FontManager.useT2K &&
+ if (FontUtilities.isWindows && !FontUtilities.useT2K &&
!GraphicsEnvironment.isHeadless()) {
isXPorLater = initNative();
}
@@ -201,7 +201,7 @@
this.disposer = new FontStrikeDisposer(fileFont, desc);
initGlyphCache();
pScalerContext = NullFontScaler.getNullScalerContext();
- FontManager.deRegisterBadFont(fileFont);
+ SunFontManager.getInstance().deRegisterBadFont(fileFont);
return;
}
/* First, see if native code should be used to create the glyph.
@@ -211,8 +211,8 @@
* except that the advance returned by GDI is always overwritten by
* the JDK rasteriser supplied one (see getGlyphImageFromWindows()).
*/
- if (FontManager.isWindows && isXPorLater &&
- !FontManager.useT2K &&
+ if (FontUtilities.isWindows && isXPorLater &&
+ !FontUtilities.useT2K &&
!GraphicsEnvironment.isHeadless() &&
!fileFont.useJavaRasterizer &&
(desc.aaHint == INTVAL_TEXT_ANTIALIAS_LCD_HRGB ||
@@ -241,8 +241,8 @@
}
}
}
- if (FontManager.logging && FontManager.isWindows) {
- FontManager.logger.info
+ if (FontUtilities.isLogging() && FontUtilities.isWindows) {
+ FontUtilities.getLogger().info
("Strike for " + fileFont + " at size = " + intPtSize +
" use natives = " + useNatives +
" useJavaRasteriser = " + fileFont.useJavaRasterizer +
@@ -298,7 +298,7 @@
}
long getGlyphImageFromNative(int glyphCode) {
- if (FontManager.isWindows) {
+ if (FontUtilities.isWindows) {
return getGlyphImageFromWindows(glyphCode);
} else {
return getGlyphImageFromX11(glyphCode);
@@ -366,8 +366,8 @@
} else {
if (useNatives) {
glyphPtr = getGlyphImageFromNative(glyphCode);
- if (glyphPtr == 0L && FontManager.logging) {
- FontManager.logger.info
+ if (glyphPtr == 0L && FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info
("Strike for " + fileFont +
" at size = " + intPtSize +
" couldn't get native glyph for code = " + glyphCode);
@@ -528,7 +528,7 @@
if (segmentedCache) {
int numSegments = (numGlyphs + SEGSIZE-1)/SEGSIZE;
- if (FontManager.longAddresses) {
+ if (longAddresses) {
glyphCacheFormat = SEGLONGARRAY;
segLongGlyphImages = new long[numSegments][];
this.disposer.segLongGlyphImages = segLongGlyphImages;
@@ -538,7 +538,7 @@
this.disposer.segIntGlyphImages = segIntGlyphImages;
}
} else {
- if (FontManager.longAddresses) {
+ if (longAddresses) {
glyphCacheFormat = LONGARRAY;
longGlyphImages = new long[numGlyphs];
this.disposer.longGlyphImages = longGlyphImages;
diff --git a/src/share/classes/sun/font/FontAccess.java b/src/share/classes/sun/font/FontAccess.java
new file mode 100644
index 0000000..442fb5a
--- /dev/null
+++ b/src/share/classes/sun/font/FontAccess.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+
+public abstract class FontAccess {
+
+ private static FontAccess access;
+ public static synchronized void setFontAccess(FontAccess acc) {
+ if (access != null) {
+ throw new InternalError("Attempt to set FontAccessor twice");
+ }
+ access = acc;
+ }
+
+ public static synchronized FontAccess getFontAccess() {
+ return access;
+ }
+
+ public abstract Font2D getFont2D(Font f);
+ public abstract void setFont2D(Font f, Font2DHandle h);
+ public abstract void setCreatedFont(Font f);
+ public abstract boolean isCreatedFont(Font f);
+}
diff --git a/src/share/classes/sun/font/FontDesignMetrics.java b/src/share/classes/sun/font/FontDesignMetrics.java
index d594f11..929c0d2 100644
--- a/src/share/classes/sun/font/FontDesignMetrics.java
+++ b/src/share/classes/sun/font/FontDesignMetrics.java
@@ -261,8 +261,9 @@
* Note that currently Swing native L&F composites are not handled
* by this code as they use the metrics of the physical anyway.
*/
- if (FontManager.maybeUsingAlternateCompositeFonts() &&
- FontManager.getFont2D(font) instanceof CompositeFont) {
+ SunFontManager fm = SunFontManager.getInstance();
+ if (fm.maybeUsingAlternateCompositeFonts() &&
+ FontUtilities.getFont2D(font) instanceof CompositeFont) {
return new FontDesignMetrics(font, frc);
}
@@ -353,7 +354,7 @@
private void initMatrixAndMetrics() {
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
fontStrike = font2D.getStrike(font, frc);
StrikeMetrics metrics = fontStrike.getFontMetrics();
this.ascent = metrics.getAscent();
@@ -473,7 +474,7 @@
char ch = str.charAt(i);
if (ch < 0x100) {
width += getLatinCharWidth(ch);
- } else if (FontManager.isNonSimpleChar(ch)) {
+ } else if (FontUtilities.isNonSimpleChar(ch)) {
width = new TextLayout(str, font, frc).getAdvance();
break;
} else {
@@ -504,7 +505,7 @@
char ch = data[i];
if (ch < 0x100) {
width += getLatinCharWidth(ch);
- } else if (FontManager.isNonSimpleChar(ch)) {
+ } else if (FontUtilities.isNonSimpleChar(ch)) {
String str = new String(data, off, len);
width = new TextLayout(str, font, frc).getAdvance();
break;
diff --git a/src/share/classes/sun/font/FontFamily.java b/src/share/classes/sun/font/FontFamily.java
index 3f0d5fd..ca2d1bf 100644
--- a/src/share/classes/sun/font/FontFamily.java
+++ b/src/share/classes/sun/font/FontFamily.java
@@ -107,8 +107,9 @@
public void setFont(Font2D font, int style) {
if (font.getRank() > familyRank) {
- if (FontManager.logging) {
- FontManager.logger.warning("Rejecting adding " + font +
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .warning("Rejecting adding " + font +
" of lower rank " + font.getRank() +
" to family " + this +
" of rank " + familyRank);
diff --git a/src/share/classes/sun/font/FontManager.java b/src/share/classes/sun/font/FontManager.java
index 6ac8962..f79adfc 100644
--- a/src/share/classes/sun/font/FontManager.java
+++ b/src/share/classes/sun/font/FontManager.java
@@ -22,3831 +22,124 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
-
package sun.font;
import java.awt.Font;
-import java.awt.GraphicsEnvironment;
import java.awt.FontFormatException;
import java.io.File;
-import java.io.FilenameFilter;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
import java.util.Locale;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
import java.util.TreeMap;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
import javax.swing.plaf.FontUIResource;
-import sun.awt.AppContext;
-import sun.awt.FontConfiguration;
-import sun.awt.SunHints;
-import sun.awt.SunToolkit;
-import sun.java2d.HeadlessGraphicsEnvironment;
-import sun.java2d.SunGraphicsEnvironment;
-
-import java.awt.geom.GeneralPath;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-
-import java.lang.reflect.Constructor;
-
-import sun.java2d.Disposer;
-
-/*
+/**
* Interface between Java Fonts (java.awt.Font) and the underlying
* font files/native font resources and the Java and native font scalers.
*/
-public final class FontManager {
+public interface FontManager {
- public static final int FONTFORMAT_NONE = -1;
- public static final int FONTFORMAT_TRUETYPE = 0;
- public static final int FONTFORMAT_TYPE1 = 1;
- public static final int FONTFORMAT_T2K = 2;
- public static final int FONTFORMAT_TTC = 3;
- public static final int FONTFORMAT_COMPOSITE = 4;
- public static final int FONTFORMAT_NATIVE = 5;
-
- public static final int NO_FALLBACK = 0;
- public static final int PHYSICAL_FALLBACK = 1;
- public static final int LOGICAL_FALLBACK = 2;
-
- public static final int QUADPATHTYPE = 1;
- public static final int CUBICPATHTYPE = 2;
-
- /* Pool of 20 font file channels chosen because some UTF-8 locale
- * composite fonts can use up to 16 platform fonts (including the
- * Lucida fall back). This should prevent channel thrashing when
- * dealing with one of these fonts.
- * The pool array stores the fonts, rather than directly referencing
- * the channels, as the font needs to do the open/close work.
- */
- private static final int CHANNELPOOLSIZE = 20;
- private static int lastPoolIndex = 0;
- private static FileFont fontFileCache[] = new FileFont[CHANNELPOOLSIZE];
-
- /* Need to implement a simple linked list scheme for fast
- * traversal and lookup.
- * Also want to "fast path" dialog so there's minimal overhead.
- */
- /* There are at exactly 20 composite fonts: 5 faces (but some are not
- * usually different), in 4 styles. The array may be auto-expanded
- * later if more are needed, eg for user-defined composites or locale
- * variants.
- */
- private static int maxCompFont = 0;
- private static CompositeFont [] compFonts = new CompositeFont[20];
- private static ConcurrentHashMap<String, CompositeFont>
- compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
- private static ConcurrentHashMap<String, PhysicalFont>
- physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
- private static ConcurrentHashMap<String, PhysicalFont>
- registeredFontFiles = new ConcurrentHashMap<String, PhysicalFont>();
-
- /* given a full name find the Font. Remind: there's duplication
- * here in that this contains the content of compositeFonts +
- * physicalFonts.
- */
- private static ConcurrentHashMap<String, Font2D>
- fullNameToFont = new ConcurrentHashMap<String, Font2D>();
-
- /* TrueType fonts have localised names. Support searching all
- * of these before giving up on a name.
- */
- private static HashMap<String, TrueTypeFont> localeFullNamesToFont;
-
- private static PhysicalFont defaultPhysicalFont;
-
- /* deprecated, unsupported hack - actually invokes a bug! */
- private static boolean usePlatformFontMetrics = false;
-
- public static Logger logger = null;
- public static boolean logging;
- static boolean longAddresses;
- static String osName;
- static boolean useT2K;
- static boolean isWindows;
- static boolean isSolaris;
- public static boolean isSolaris8; // needed to check for JA wavedash fix.
- public static boolean isSolaris9; // needed to check for songti font usage.
- private static boolean loaded1dot0Fonts = false;
- static SunGraphicsEnvironment sgEnv;
- static boolean loadedAllFonts = false;
- static boolean loadedAllFontFiles = false;
- static TrueTypeFont eudcFont;
- static HashMap<String,String> jreFontMap;
- static HashSet<String> jreLucidaFontFiles;
- static String[] jreOtherFontFiles;
- static boolean noOtherJREFontFiles = false; // initial assumption.
- static boolean fontConfigFailed = false;
-
- /* Used to indicate required return type from toArray(..); */
- private static String[] STR_ARRAY = new String[0];
-
- private static void initJREFontMap() {
-
- /* Key is familyname+style value as an int.
- * Value is filename containing the font.
- * If no mapping exists, it means there is no font file for the style
- * If the mapping exists but the file doesn't exist in the deferred
- * list then it means its not installed.
- * This looks like a lot of code and strings but if it saves even
- * a single file being opened at JRE start-up there's a big payoff.
- * Lucida Sans is probably the only important case as the others
- * are rarely used. Consider removing the other mappings if there's
- * no evidence they are useful in practice.
- */
- jreFontMap = new HashMap<String,String>();
- jreLucidaFontFiles = new HashSet<String>();
- if (SunGraphicsEnvironment.isOpenJDK()) {
- return;
- }
- /* Lucida Sans Family */
- jreFontMap.put("lucida sans0", "LucidaSansRegular.ttf");
- jreFontMap.put("lucida sans1", "LucidaSansDemiBold.ttf");
- /* Lucida Sans full names (map Bold and DemiBold to same file) */
- jreFontMap.put("lucida sans regular0", "LucidaSansRegular.ttf");
- jreFontMap.put("lucida sans regular1", "LucidaSansDemiBold.ttf");
- jreFontMap.put("lucida sans bold1", "LucidaSansDemiBold.ttf");
- jreFontMap.put("lucida sans demibold1", "LucidaSansDemiBold.ttf");
-
- /* Lucida Sans Typewriter Family */
- jreFontMap.put("lucida sans typewriter0",
- "LucidaTypewriterRegular.ttf");
- jreFontMap.put("lucida sans typewriter1", "LucidaTypewriterBold.ttf");
- /* Typewriter full names (map Bold and DemiBold to same file) */
- jreFontMap.put("lucida sans typewriter regular0",
- "LucidaTypewriter.ttf");
- jreFontMap.put("lucida sans typewriter regular1",
- "LucidaTypewriterBold.ttf");
- jreFontMap.put("lucida sans typewriter bold1",
- "LucidaTypewriterBold.ttf");
- jreFontMap.put("lucida sans typewriter demibold1",
- "LucidaTypewriterBold.ttf");
-
- /* Lucida Bright Family */
- jreFontMap.put("lucida bright0", "LucidaBrightRegular.ttf");
- jreFontMap.put("lucida bright1", "LucidaBrightDemiBold.ttf");
- jreFontMap.put("lucida bright2", "LucidaBrightItalic.ttf");
- jreFontMap.put("lucida bright3", "LucidaBrightDemiItalic.ttf");
- /* Lucida Bright full names (map Bold and DemiBold to same file) */
- jreFontMap.put("lucida bright regular0", "LucidaBrightRegular.ttf");
- jreFontMap.put("lucida bright regular1", "LucidaBrightDemiBold.ttf");
- jreFontMap.put("lucida bright regular2", "LucidaBrightItalic.ttf");
- jreFontMap.put("lucida bright regular3", "LucidaBrightDemiItalic.ttf");
- jreFontMap.put("lucida bright bold1", "LucidaBrightDemiBold.ttf");
- jreFontMap.put("lucida bright bold3", "LucidaBrightDemiItalic.ttf");
- jreFontMap.put("lucida bright demibold1", "LucidaBrightDemiBold.ttf");
- jreFontMap.put("lucida bright demibold3","LucidaBrightDemiItalic.ttf");
- jreFontMap.put("lucida bright italic2", "LucidaBrightItalic.ttf");
- jreFontMap.put("lucida bright italic3", "LucidaBrightDemiItalic.ttf");
- jreFontMap.put("lucida bright bold italic3",
- "LucidaBrightDemiItalic.ttf");
- jreFontMap.put("lucida bright demibold italic3",
- "LucidaBrightDemiItalic.ttf");
- for (String ffile : jreFontMap.values()) {
- jreLucidaFontFiles.add(ffile);
- }
- }
-
- static {
-
- if (SunGraphicsEnvironment.debugFonts) {
- logger = Logger.getLogger("sun.java2d", null);
- logging = logger.getLevel() != Level.OFF;
- }
- initJREFontMap();
-
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- FontManagerNativeLibrary.load();
-
- // JNI throws an exception if a class/method/field is not found,
- // so there's no need to do anything explicit here.
- initIDs();
-
- switch (StrikeCache.nativeAddressSize) {
- case 8: longAddresses = true; break;
- case 4: longAddresses = false; break;
- default: throw new RuntimeException("Unexpected address size");
- }
-
- osName = System.getProperty("os.name", "unknownOS");
- isSolaris = osName.startsWith("SunOS");
-
- String t2kStr = System.getProperty("sun.java2d.font.scaler");
- if (t2kStr != null) {
- useT2K = "t2k".equals(t2kStr);
- }
- if (isSolaris) {
- String version = System.getProperty("os.version", "unk");
- isSolaris8 = version.equals("5.8");
- isSolaris9 = version.equals("5.9");
- } else {
- isWindows = osName.startsWith("Windows");
- if (isWindows) {
- String eudcFile =
- SunGraphicsEnvironment.eudcFontFileName;
- if (eudcFile != null) {
- try {
- eudcFont = new TrueTypeFont(eudcFile, null, 0,
- true);
- } catch (FontFormatException e) {
- }
- }
- String prop =
- System.getProperty("java2d.font.usePlatformFont");
- if (("true".equals(prop) || getPlatformFontVar())) {
- usePlatformFontMetrics = true;
- System.out.println("Enabling platform font metrics for win32. This is an unsupported option.");
- System.out.println("This yields incorrect composite font metrics as reported by 1.1.x releases.");
- System.out.println("It is appropriate only for use by applications which do not use any Java 2");
- System.out.println("functionality. This property will be removed in a later release.");
- }
- }
- }
- return null;
- }
- });
- }
-
- /* Initialise ptrs used by JNI methods */
- private static native void initIDs();
-
- public static void addToPool(FileFont font) {
-
- FileFont fontFileToClose = null;
- int freeSlot = -1;
-
- synchronized (fontFileCache) {
- /* Avoid duplicate entries in the pool, and don't close() it,
- * since this method is called only from within open().
- * Seeing a duplicate is most likely to happen if the thread
- * was interrupted during a read, forcing perhaps repeated
- * close and open calls and it eventually it ends up pointing
- * at the same slot.
- */
- for (int i=0;i<CHANNELPOOLSIZE;i++) {
- if (fontFileCache[i] == font) {
- return;
- }
- if (fontFileCache[i] == null && freeSlot < 0) {
- freeSlot = i;
- }
- }
- if (freeSlot >= 0) {
- fontFileCache[freeSlot] = font;
- return;
- } else {
- /* replace with new font. */
- fontFileToClose = fontFileCache[lastPoolIndex];
- fontFileCache[lastPoolIndex] = font;
- /* lastPoolIndex is updated so that the least recently opened
- * file will be closed next.
- */
- lastPoolIndex = (lastPoolIndex+1) % CHANNELPOOLSIZE;
- }
- }
- /* Need to close the font file outside of the synchronized block,
- * since its possible some other thread is in an open() call on
- * this font file, and could be holding its lock and the pool lock.
- * Releasing the pool lock allows that thread to continue, so it can
- * then release the lock on this font, allowing the close() call
- * below to proceed.
- * Also, calling close() is safe because any other thread using
- * the font we are closing() synchronizes all reading, so we
- * will not close the file while its in use.
- */
- if (fontFileToClose != null) {
- fontFileToClose.close();
- }
- }
-
- /*
- * In the normal course of events, the pool of fonts can remain open
- * ready for quick access to their contents. The pool is sized so
- * that it is not an excessive consumer of system resources whilst
- * facilitating performance by providing ready access to the most
- * recently used set of font files.
- * The only reason to call removeFromPool(..) is for a Font that
- * you want to to have GC'd. Currently this would apply only to fonts
- * created with java.awt.Font.createFont(..).
- * In this case, the caller is expected to have arranged for the file
- * to be closed.
- * REMIND: consider how to know when a createFont created font should
- * be closed.
- */
- public static void removeFromPool(FileFont font) {
- synchronized (fontFileCache) {
- for (int i=0; i<CHANNELPOOLSIZE; i++) {
- if (fontFileCache[i] == font) {
- fontFileCache[i] = null;
- }
- }
- }
- }
+ // These constants are used in findFont().
+ public static final int NO_FALLBACK = 0;
+ public static final int PHYSICAL_FALLBACK = 1;
+ public static final int LOGICAL_FALLBACK = 2;
/**
- * This method is provided for internal and exclusive use by Swing.
+ * Register a new font. Please, note that {@code null} is not a valid
+ * argument, and it's caller's responsibility to ensure that, but to keep
+ * compatibility, if {@code null} is passed as an argument, {@code false}
+ * is returned, and no {@link NullPointerException}
+ * is thrown.
*
- * @param font representing a physical font.
- * @return true if the underlying font is a TrueType or OpenType font
- * that claims to support the Microsoft Windows encoding corresponding to
- * the default file.encoding property of this JRE instance.
- * This narrow value is useful for Swing to decide if the font is useful
- * for the the Windows Look and Feel, or, if a composite font should be
- * used instead.
- * The information used to make the decision is obtained from
- * the ulCodePageRange fields in the font.
- * A caller can use isLogicalFont(Font) in this class before calling
- * this method and would not need to call this method if that
- * returns true.
+ * As additional note, an implementation should ensure that this font
+ * cannot override existing installed fonts.
+ *
+ * @param font
+ * @return {@code true} is the font is successfully registered,
+ * {@code false} otherwise.
*/
-// static boolean fontSupportsDefaultEncoding(Font font) {
-// String encoding =
-// (String) java.security.AccessController.doPrivileged(
-// new sun.security.action.GetPropertyAction("file.encoding"));
+ public boolean registerFont(Font font);
-// if (encoding == null || font == null) {
-// return false;
-// }
-
-// encoding = encoding.toLowerCase(Locale.ENGLISH);
-
-// return FontManager.fontSupportsEncoding(font, encoding);
-// }
-
- /* Revise the implementation to in fact mean "font is a composite font.
- * This ensures that Swing components will always benefit from the
- * fall back fonts
- */
- public static boolean fontSupportsDefaultEncoding(Font font) {
- return getFont2D(font) instanceof CompositeFont;
- }
+ public void deRegisterBadFont(Font2D font2D);
/**
- * This method is provided for internal and exclusive use by Swing.
- *
- * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
- * In the event that a desktop properties font doesn't directly
- * support the default encoding, (ie because the host OS supports
- * adding support for the current locale automatically for native apps),
- * then Swing calls this method to get a font which uses the specified
- * font for the code points it covers, but also supports this locale
- * just as the standard composite fonts do.
- * Note: this will over-ride any setting where an application
- * specifies it prefers locale specific composite fonts.
- * The logic for this, is that this method is used only where the user or
- * application has specified that the native L&F be used, and that
- * we should honour that request to use the same font as native apps use.
- *
- * The behaviour of this method is to construct a new composite
- * Font object that uses the specified physical font as its first
- * component, and adds all the components of "dialog" as fall back
- * components.
- * The method currently assumes that only the size and style attributes
- * are set on the specified font. It doesn't copy the font transform or
- * other attributes because they aren't set on a font created from
- * the desktop. This will need to be fixed if use is broadened.
- *
- * Operations such as Font.deriveFont will work properly on the
- * font returned by this method for deriving a different point size.
- * Additionally it tries to support a different style by calling
- * getNewComposite() below. That also supports replacing slot zero
- * with a different physical font but that is expected to be "rare".
- * Deriving with a different style is needed because its been shown
- * that some applications try to do this for Swing FontUIResources.
- * Also operations such as new Font(font.getFontName(..), Font.PLAIN, 14);
- * will NOT yield the same result, as the new underlying CompositeFont
- * cannot be "looked up" in the font registry.
- * This returns a FontUIResource as that is the Font sub-class needed
- * by Swing.
- * Suggested usage is something like :
- * FontUIResource fuir;
- * Font desktopFont = getDesktopFont(..);
- * // NOTE even if fontSupportsDefaultEncoding returns true because
- * // you get Tahoma and are running in an English locale, you may
- * // still want to just call getCompositeFontUIResource() anyway
- * // as only then will you get fallback fonts - eg for CJK.
- * if (FontManager.fontSupportsDefaultEncoding(desktopFont)) {
- * fuir = new FontUIResource(..);
- * } else {
- * fuir = FontManager.getCompositeFontUIResource(desktopFont);
- * }
- * return fuir;
- */
- public static FontUIResource getCompositeFontUIResource(Font font) {
-
- FontUIResource fuir =
- new FontUIResource(font.getName(),font.getStyle(),font.getSize());
- Font2D font2D = getFont2D(font);
-
- if (!(font2D instanceof PhysicalFont)) {
- /* Swing should only be calling this when a font is obtained
- * from desktop properties, so should generally be a physical font,
- * an exception might be for names like "MS Serif" which are
- * automatically mapped to "Serif", so there's no need to do
- * anything special in that case. But note that suggested usage
- * is first to call fontSupportsDefaultEncoding(Font) and this
- * method should not be called if that were to return true.
- */
- return fuir;
- }
-
- CompositeFont dialog2D =
- (CompositeFont)findFont2D("dialog", font.getStyle(), NO_FALLBACK);
- if (dialog2D == null) { /* shouldn't happen */
- return fuir;
- }
- PhysicalFont physicalFont = (PhysicalFont)font2D;
- CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
- setFont2D(fuir, compFont.handle);
- /* marking this as a created font is needed as only created fonts
- * copy their creator's handles.
- */
- setCreatedFont(fuir);
- return fuir;
- }
-
- public static Font2DHandle getNewComposite(String family, int style,
- Font2DHandle handle) {
-
- if (!(handle.font2D instanceof CompositeFont)) {
- return handle;
- }
-
- CompositeFont oldComp = (CompositeFont)handle.font2D;
- PhysicalFont oldFont = oldComp.getSlotFont(0);
-
- if (family == null) {
- family = oldFont.getFamilyName(null);
- }
- if (style == -1) {
- style = oldComp.getStyle();
- }
-
- Font2D newFont = findFont2D(family, style, NO_FALLBACK);
- if (!(newFont instanceof PhysicalFont)) {
- newFont = oldFont;
- }
- PhysicalFont physicalFont = (PhysicalFont)newFont;
- CompositeFont dialog2D =
- (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
- if (dialog2D == null) { /* shouldn't happen */
- return handle;
- }
- CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
- Font2DHandle newHandle = new Font2DHandle(compFont);
- return newHandle;
- }
-
- public static native void setFont2D(Font font, Font2DHandle font2DHandle);
-
- private static native boolean isCreatedFont(Font font);
- private static native void setCreatedFont(Font font);
-
- public static void registerCompositeFont(String compositeName,
- String[] componentFileNames,
- String[] componentNames,
- int numMetricsSlots,
- int[] exclusionRanges,
- int[] exclusionMaxIndex,
- boolean defer) {
-
- CompositeFont cf = new CompositeFont(compositeName,
- componentFileNames,
- componentNames,
- numMetricsSlots,
- exclusionRanges,
- exclusionMaxIndex, defer);
- addCompositeToFontList(cf, Font2D.FONT_CONFIG_RANK);
- synchronized (compFonts) {
- compFonts[maxCompFont++] = cf;
- }
- }
-
- /* This variant is used only when the application specifies
- * a variant of composite fonts which prefers locale specific or
- * proportional fonts.
- */
- public static void registerCompositeFont(String compositeName,
- String[] componentFileNames,
- String[] componentNames,
- int numMetricsSlots,
- int[] exclusionRanges,
- int[] exclusionMaxIndex,
- boolean defer,
- ConcurrentHashMap<String, Font2D>
- altNameCache) {
-
- CompositeFont cf = new CompositeFont(compositeName,
- componentFileNames,
- componentNames,
- numMetricsSlots,
- exclusionRanges,
- exclusionMaxIndex, defer);
- /* if the cache has an existing composite for this case, make
- * its handle point to this new font.
- * This ensures that when the altNameCache that is passed in
- * is the global mapNameCache - ie we are running as an application -
- * that any statically created java.awt.Font instances which already
- * have a Font2D instance will have that re-directed to the new Font
- * on subsequent uses. This is particularly important for "the"
- * default font instance, or similar cases where a UI toolkit (eg
- * Swing) has cached a java.awt.Font. Note that if Swing is using
- * a custom composite APIs which update the standard composites have
- * no effect - this is typically the case only when using the Windows
- * L&F where these APIs would conflict with that L&F anyway.
- */
- Font2D oldFont = (Font2D)
- altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
- if (oldFont instanceof CompositeFont) {
- oldFont.handle.font2D = cf;
- }
- altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
- }
-
- private static void addCompositeToFontList(CompositeFont f, int rank) {
-
- if (logging) {
- logger.info("Add to Family "+ f.familyName +
- ", Font " + f.fullName + " rank="+rank);
- }
- f.setRank(rank);
- compositeFonts.put(f.fullName, f);
- fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
-
- FontFamily family = FontFamily.getFamily(f.familyName);
- if (family == null) {
- family = new FontFamily(f.familyName, true, rank);
- }
- family.setFont(f, f.style);
- }
-
- /*
- * Systems may have fonts with the same name.
- * We want to register only one of such fonts (at least until
- * such time as there might be APIs which can accommodate > 1).
- * Rank is 1) font configuration fonts, 2) JRE fonts, 3) OT/TT fonts,
- * 4) Type1 fonts, 5) native fonts.
- *
- * If the new font has the same name as the old font, the higher
- * ranked font gets added, replacing the lower ranked one.
- * If the fonts are of equal rank, then make a special case of
- * font configuration rank fonts, which are on closer inspection,
- * OT/TT fonts such that the larger font is registered. This is
- * a heuristic since a font may be "larger" in the sense of more
- * code points, or be a larger "file" because it has more bitmaps.
- * So it is possible that using filesize may lead to less glyphs, and
- * using glyphs may lead to lower quality display. Probably number
- * of glyphs is the ideal, but filesize is information we already
- * have and is good enough for the known cases.
- * Also don't want to register fonts that match JRE font families
- * but are coming from a source other than the JRE.
- * This will ensure that we will algorithmically style the JRE
- * plain font and get the same set of glyphs for all styles.
- *
- * Note that this method returns a value
- * if it returns the same object as its argument that means this
- * font was newly registered.
- * If it returns a different object it means this font already exists,
- * and you should use that one.
- * If it returns null means this font was not registered and none
- * in that name is registered. The caller must find a substitute
- */
- private static PhysicalFont addToFontList(PhysicalFont f, int rank) {
-
- String fontName = f.fullName;
- String familyName = f.familyName;
- if (fontName == null || "".equals(fontName)) {
- return null;
- }
- if (compositeFonts.containsKey(fontName)) {
- /* Don't register any font that has the same name as a composite */
- return null;
- }
- f.setRank(rank);
- if (!physicalFonts.containsKey(fontName)) {
- if (logging) {
- logger.info("Add to Family "+familyName +
- ", Font " + fontName + " rank="+rank);
- }
- physicalFonts.put(fontName, f);
- FontFamily family = FontFamily.getFamily(familyName);
- if (family == null) {
- family = new FontFamily(familyName, false, rank);
- family.setFont(f, f.style);
- } else if (family.getRank() >= rank) {
- family.setFont(f, f.style);
- }
- fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH), f);
- return f;
- } else {
- PhysicalFont newFont = f;
- PhysicalFont oldFont = physicalFonts.get(fontName);
- if (oldFont == null) {
- return null;
- }
- /* If the new font is of an equal or higher rank, it is a
- * candidate to replace the current one, subject to further tests.
- */
- if (oldFont.getRank() >= rank) {
-
- /* All fonts initialise their mapper when first
- * used. If the mapper is non-null then this font
- * has been accessed at least once. In that case
- * do not replace it. This may be overly stringent,
- * but its probably better not to replace a font that
- * someone is already using without a compelling reason.
- * Additionally the primary case where it is known
- * this behaviour is important is in certain composite
- * fonts, and since all the components of a given
- * composite are usually initialised together this
- * is unlikely. For this to be a problem, there would
- * have to be a case where two different composites used
- * different versions of the same-named font, and they
- * were initialised and used at separate times.
- * In that case we continue on and allow the new font to
- * be installed, but replaceFont will continue to allow
- * the original font to be used in Composite fonts.
- */
- if (oldFont.mapper != null && rank > Font2D.FONT_CONFIG_RANK) {
- return oldFont;
- }
-
- /* Normally we require a higher rank to replace a font,
- * but as a special case, if the two fonts are the same rank,
- * and are instances of TrueTypeFont we want the
- * more complete (larger) one.
- */
- if (oldFont.getRank() == rank) {
- if (oldFont instanceof TrueTypeFont &&
- newFont instanceof TrueTypeFont) {
- TrueTypeFont oldTTFont = (TrueTypeFont)oldFont;
- TrueTypeFont newTTFont = (TrueTypeFont)newFont;
- if (oldTTFont.fileSize >= newTTFont.fileSize) {
- return oldFont;
- }
- } else {
- return oldFont;
- }
- }
- /* Don't replace ever JRE fonts.
- * This test is in case a font configuration references
- * a Lucida font, which has been mapped to a Lucida
- * from the host O/S. The assumption here is that any
- * such font configuration file is probably incorrect, or
- * the host O/S version is for the use of AWT.
- * In other words if we reach here, there's a possible
- * problem with our choice of font configuration fonts.
- */
- if (oldFont.platName.startsWith(
- SunGraphicsEnvironment.jreFontDirName)) {
- if (logging) {
- logger.warning("Unexpected attempt to replace a JRE " +
- " font " + fontName + " from " +
- oldFont.platName +
- " with " + newFont.platName);
- }
- return oldFont;
- }
-
- if (logging) {
- logger.info("Replace in Family " + familyName +
- ",Font " + fontName + " new rank="+rank +
- " from " + oldFont.platName +
- " with " + newFont.platName);
- }
- replaceFont(oldFont, newFont);
- physicalFonts.put(fontName, newFont);
- fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
- newFont);
-
- FontFamily family = FontFamily.getFamily(familyName);
- if (family == null) {
- family = new FontFamily(familyName, false, rank);
- family.setFont(newFont, newFont.style);
- } else if (family.getRank() >= rank) {
- family.setFont(newFont, newFont.style);
- }
- return newFont;
- } else {
- return oldFont;
- }
- }
- }
-
- public static Font2D[] getRegisteredFonts() {
- PhysicalFont[] physFonts = getPhysicalFonts();
- int mcf = maxCompFont; /* for MT-safety */
- Font2D[] regFonts = new Font2D[physFonts.length+mcf];
- System.arraycopy(compFonts, 0, regFonts, 0, mcf);
- System.arraycopy(physFonts, 0, regFonts, mcf, physFonts.length);
- return regFonts;
- }
-
- public static PhysicalFont[] getPhysicalFonts() {
- return physicalFonts.values().toArray(new PhysicalFont[0]);
- }
-
-
- /* The class FontRegistrationInfo is used when a client says not
- * to register a font immediately. This mechanism is used to defer
- * initialisation of all the components of composite fonts at JRE
- * start-up. The CompositeFont class is "aware" of this and when it
- * is first used it asks for the registration of its components.
- * Also in the event that any physical font is requested the
- * deferred fonts are initialised before triggering a search of the
- * system.
- * Two maps are used. One to track the deferred fonts. The
- * other to track the fonts that have been initialised through this
- * mechanism.
- */
-
- private static final class FontRegistrationInfo {
-
- String fontFilePath;
- String[] nativeNames;
- int fontFormat;
- boolean javaRasterizer;
- int fontRank;
-
- FontRegistrationInfo(String fontPath, String[] names, int format,
- boolean useJavaRasterizer, int rank) {
- this.fontFilePath = fontPath;
- this.nativeNames = names;
- this.fontFormat = format;
- this.javaRasterizer = useJavaRasterizer;
- this.fontRank = rank;
- }
- }
-
- private static final ConcurrentHashMap<String, FontRegistrationInfo>
- deferredFontFiles =
- new ConcurrentHashMap<String, FontRegistrationInfo>();
- private static final ConcurrentHashMap<String, Font2DHandle>
- initialisedFonts = new ConcurrentHashMap<String, Font2DHandle>();
-
- /* Remind: possibly enhance initialiseDeferredFonts() to be
- * optionally given a name and a style and it could stop when it
- * finds that font - but this would be a problem if two of the
- * fonts reference the same font face name (cf the Solaris
- * euro fonts).
- */
- public static synchronized void initialiseDeferredFonts() {
- for (String fileName : deferredFontFiles.keySet()) {
- initialiseDeferredFont(fileName);
- }
- }
-
- public static synchronized void registerDeferredJREFonts(String jreDir) {
- for (FontRegistrationInfo info : deferredFontFiles.values()) {
- if (info.fontFilePath != null &&
- info.fontFilePath.startsWith(jreDir)) {
- initialiseDeferredFont(info.fontFilePath);
- }
- }
- }
-
- /* We keep a map of the files which contain the Lucida fonts so we
- * don't need to search for them.
- * But since we know what fonts these files contain, we can also avoid
- * opening them to look for a font name we don't recognise - see
- * findDeferredFont().
- * For typical cases where the font isn't a JRE one the overhead is
- * this method call, HashMap.get() and null reference test, then
- * a boolean test of noOtherJREFontFiles.
- */
- private static PhysicalFont findJREDeferredFont(String name, int style) {
-
- PhysicalFont physicalFont;
- String nameAndStyle = name.toLowerCase(Locale.ENGLISH) + style;
- String fileName = jreFontMap.get(nameAndStyle);
- if (fileName != null) {
- initSGEnv(); /* ensure jreFontDirName is initialised */
- fileName = SunGraphicsEnvironment.jreFontDirName +
- File.separator + fileName;
- if (deferredFontFiles.get(fileName) != null) {
- physicalFont = initialiseDeferredFont(fileName);
- if (physicalFont != null &&
- (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
- physicalFont.getFamilyName(null).equalsIgnoreCase(name))
- && physicalFont.style == style) {
- return physicalFont;
- }
- }
- }
-
- /* Iterate over the deferred font files looking for any in the
- * jre directory that we didn't recognise, open each of these.
- * In almost all installations this will quickly fall through
- * because only the Lucidas will be present and jreOtherFontFiles
- * will be empty.
- * noOtherJREFontFiles is used so we can skip this block as soon
- * as its determined that its not needed - almost always after the
- * very first time through.
- */
- if (noOtherJREFontFiles) {
- return null;
- }
- synchronized (jreLucidaFontFiles) {
- if (jreOtherFontFiles == null) {
- HashSet<String> otherFontFiles = new HashSet<String>();
- for (String deferredFile : deferredFontFiles.keySet()) {
- File file = new File(deferredFile);
- String dir = file.getParent();
- String fname = file.getName();
- /* skip names which aren't absolute, aren't in the JRE
- * directory, or are known Lucida fonts.
- */
- if (dir == null ||
- !dir.equals(SunGraphicsEnvironment.jreFontDirName) ||
- jreLucidaFontFiles.contains(fname)) {
- continue;
- }
- otherFontFiles.add(deferredFile);
- }
- jreOtherFontFiles = otherFontFiles.toArray(STR_ARRAY);
- if (jreOtherFontFiles.length == 0) {
- noOtherJREFontFiles = true;
- }
- }
-
- for (int i=0; i<jreOtherFontFiles.length;i++) {
- fileName = jreOtherFontFiles[i];
- if (fileName == null) {
- continue;
- }
- jreOtherFontFiles[i] = null;
- physicalFont = initialiseDeferredFont(fileName);
- if (physicalFont != null &&
- (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
- physicalFont.getFamilyName(null).equalsIgnoreCase(name))
- && physicalFont.style == style) {
- return physicalFont;
- }
- }
- }
-
- return null;
- }
-
- /* This skips JRE installed fonts. */
- private static PhysicalFont findOtherDeferredFont(String name, int style) {
- for (String fileName : deferredFontFiles.keySet()) {
- File file = new File(fileName);
- String dir = file.getParent();
- String fname = file.getName();
- if (dir != null &&
- dir.equals(SunGraphicsEnvironment.jreFontDirName) &&
- jreLucidaFontFiles.contains(fname)) {
- continue;
- }
- PhysicalFont physicalFont = initialiseDeferredFont(fileName);
- if (physicalFont != null &&
- (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
- physicalFont.getFamilyName(null).equalsIgnoreCase(name)) &&
- physicalFont.style == style) {
- return physicalFont;
- }
- }
- return null;
- }
-
- private static PhysicalFont findDeferredFont(String name, int style) {
-
- PhysicalFont physicalFont = findJREDeferredFont(name, style);
- if (physicalFont != null) {
- return physicalFont;
- } else {
- return findOtherDeferredFont(name, style);
- }
- }
-
- public static void registerDeferredFont(String fileNameKey,
- String fullPathName,
- String[] nativeNames,
- int fontFormat,
- boolean useJavaRasterizer,
- int fontRank) {
- FontRegistrationInfo regInfo =
- new FontRegistrationInfo(fullPathName, nativeNames, fontFormat,
- useJavaRasterizer, fontRank);
- deferredFontFiles.put(fileNameKey, regInfo);
- }
-
-
- public static synchronized
- PhysicalFont initialiseDeferredFont(String fileNameKey) {
-
- if (fileNameKey == null) {
- return null;
- }
- if (logging) {
- logger.info("Opening deferred font file " + fileNameKey);
- }
-
- PhysicalFont physicalFont;
- FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
- if (regInfo != null) {
- deferredFontFiles.remove(fileNameKey);
- physicalFont = registerFontFile(regInfo.fontFilePath,
- regInfo.nativeNames,
- regInfo.fontFormat,
- regInfo.javaRasterizer,
- regInfo.fontRank);
-
-
- if (physicalFont != null) {
- /* Store the handle, so that if a font is bad, we
- * retrieve the substituted font.
- */
- initialisedFonts.put(fileNameKey, physicalFont.handle);
- } else {
- initialisedFonts.put(fileNameKey,
- getDefaultPhysicalFont().handle);
- }
- } else {
- Font2DHandle handle = initialisedFonts.get(fileNameKey);
- if (handle == null) {
- /* Probably shouldn't happen, but just in case */
- physicalFont = getDefaultPhysicalFont();
- } else {
- physicalFont = (PhysicalFont)(handle.font2D);
- }
- }
- return physicalFont;
- }
-
- /* Note that the return value from this method is not always
- * derived from this file, and may be null. See addToFontList for
- * some explanation of this.
- */
- public static PhysicalFont registerFontFile(String fileName,
- String[] nativeNames,
- int fontFormat,
- boolean useJavaRasterizer,
- int fontRank) {
-
- PhysicalFont regFont = registeredFontFiles.get(fileName);
- if (regFont != null) {
- return regFont;
- }
-
- PhysicalFont physicalFont = null;
- try {
- String name;
-
- switch (fontFormat) {
-
- case FontManager.FONTFORMAT_TRUETYPE:
- int fn = 0;
- TrueTypeFont ttf;
- do {
- ttf = new TrueTypeFont(fileName, nativeNames, fn++,
- useJavaRasterizer);
- PhysicalFont pf = addToFontList(ttf, fontRank);
- if (physicalFont == null) {
- physicalFont = pf;
- }
- }
- while (fn < ttf.getFontCount());
- break;
-
- case FontManager.FONTFORMAT_TYPE1:
- Type1Font t1f = new Type1Font(fileName, nativeNames);
- physicalFont = addToFontList(t1f, fontRank);
- break;
-
- case FontManager.FONTFORMAT_NATIVE:
- NativeFont nf = new NativeFont(fileName, false);
- physicalFont = addToFontList(nf, fontRank);
- default:
-
- }
- if (logging) {
- logger.info("Registered file " + fileName + " as font " +
- physicalFont + " rank=" + fontRank);
- }
- } catch (FontFormatException ffe) {
- if (logging) {
- logger.warning("Unusable font: " +
- fileName + " " + ffe.toString());
- }
- }
- if (physicalFont != null &&
- fontFormat != FontManager.FONTFORMAT_NATIVE) {
- registeredFontFiles.put(fileName, physicalFont);
- }
- return physicalFont;
- }
-
- public static void registerFonts(String[] fileNames,
- String[][] nativeNames,
- int fontCount,
- int fontFormat,
- boolean useJavaRasterizer,
- int fontRank, boolean defer) {
-
- for (int i=0; i < fontCount; i++) {
- if (defer) {
- registerDeferredFont(fileNames[i],fileNames[i], nativeNames[i],
- fontFormat, useJavaRasterizer, fontRank);
- } else {
- registerFontFile(fileNames[i], nativeNames[i],
- fontFormat, useJavaRasterizer, fontRank);
- }
- }
- }
-
- /*
- * This is the Physical font used when some other font on the system
- * can't be located. There has to be at least one font or the font
- * system is not useful and the graphics environment cannot sustain
- * the Java platform.
- */
- public static PhysicalFont getDefaultPhysicalFont() {
- if (defaultPhysicalFont == null) {
- /* findFont2D will load all fonts before giving up the search.
- * If the JRE Lucida isn't found (eg because the JRE fonts
- * directory is missing), it could find another version of Lucida
- * from the host system. This is OK because at that point we are
- * trying to gracefully handle/recover from a system
- * misconfiguration and this is probably a reasonable substitution.
- */
- defaultPhysicalFont = (PhysicalFont)
- findFont2D("Lucida Sans Regular", Font.PLAIN, NO_FALLBACK);
- if (defaultPhysicalFont == null) {
- defaultPhysicalFont = (PhysicalFont)
- findFont2D("Arial", Font.PLAIN, NO_FALLBACK);
- }
- if (defaultPhysicalFont == null) {
- /* Because of the findFont2D call above, if we reach here, we
- * know all fonts have already been loaded, just accept any
- * match at this point. If this fails we are in real trouble
- * and I don't know how to recover from there being absolutely
- * no fonts anywhere on the system.
- */
- Iterator i = physicalFonts.values().iterator();
- if (i.hasNext()) {
- defaultPhysicalFont = (PhysicalFont)i.next();
- } else {
- throw new Error("Probable fatal error:No fonts found.");
- }
- }
- }
- return defaultPhysicalFont;
- }
-
- public static CompositeFont getDefaultLogicalFont(int style) {
- return (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
- }
-
- /*
- * return String representation of style prepended with "."
- * This is useful for performance to avoid unnecessary string operations.
- */
- private static String dotStyleStr(int num) {
- switch(num){
- case Font.BOLD:
- return ".bold";
- case Font.ITALIC:
- return ".italic";
- case Font.ITALIC | Font.BOLD:
- return ".bolditalic";
- default:
- return ".plain";
- }
- }
-
- static void initSGEnv() {
- if (sgEnv == null) {
- GraphicsEnvironment ge =
- GraphicsEnvironment.getLocalGraphicsEnvironment();
- if (ge instanceof HeadlessGraphicsEnvironment) {
- HeadlessGraphicsEnvironment hgEnv =
- (HeadlessGraphicsEnvironment)ge;
- sgEnv = (SunGraphicsEnvironment)
- hgEnv.getSunGraphicsEnvironment();
- } else {
- sgEnv = (SunGraphicsEnvironment)ge;
- }
- }
- }
-
- /* This is implemented only on windows and is called from code that
- * executes only on windows. This isn't pretty but its not a precedent
- * in this file. This very probably should be cleaned up at some point.
- */
- private static native void
- populateFontFileNameMap(HashMap<String,String> fontToFileMap,
- HashMap<String,String> fontToFamilyNameMap,
- HashMap<String,ArrayList<String>>
- familyToFontListMap,
- Locale locale);
-
- /* Obtained from Platform APIs (windows only)
- * Map from lower-case font full name to basename of font file.
- * Eg "arial bold" -> ARIALBD.TTF.
- * For TTC files, there is a mapping for each font in the file.
- */
- private static HashMap<String,String> fontToFileMap = null;
-
- /* Obtained from Platform APIs (windows only)
- * Map from lower-case font full name to the name of its font family
- * Eg "arial bold" -> "Arial"
- */
- private static HashMap<String,String> fontToFamilyNameMap = null;
-
- /* Obtained from Platform APIs (windows only)
- * Map from a lower-case family name to a list of full names of
- * the member fonts, eg:
- * "arial" -> ["Arial", "Arial Bold", "Arial Italic","Arial Bold Italic"]
- */
- private static HashMap<String,ArrayList<String>> familyToFontListMap= null;
-
- /* The directories which contain platform fonts */
- private static String[] pathDirs = null;
-
- private static boolean haveCheckedUnreferencedFontFiles;
-
- private static String[] getFontFilesFromPath(boolean noType1) {
- final FilenameFilter filter;
- if (noType1) {
- filter = SunGraphicsEnvironment.ttFilter;
- } else {
- filter = new SunGraphicsEnvironment.TTorT1Filter();
- }
- return (String[])AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- if (pathDirs.length == 1) {
- File dir = new File(pathDirs[0]);
- String[] files = dir.list(filter);
- if (files == null) {
- return new String[0];
- }
- for (int f=0; f<files.length; f++) {
- files[f] = files[f].toLowerCase();
- }
- return files;
- } else {
- ArrayList<String> fileList = new ArrayList<String>();
- for (int i = 0; i< pathDirs.length; i++) {
- File dir = new File(pathDirs[i]);
- String[] files = dir.list(filter);
- if (files == null) {
- continue;
- }
- for (int f=0; f<files.length ; f++) {
- fileList.add(files[f].toLowerCase());
- }
- }
- return fileList.toArray(STR_ARRAY);
- }
- }
- });
- }
-
- /* This is needed since some windows registry names don't match
- * the font names.
- * - UPC styled font names have a double space, but the
- * registry entry mapping to a file doesn't.
- * - Marlett is in a hidden file not listed in the registry
- * - The registry advertises that the file david.ttf contains a
- * font with the full name "David Regular" when in fact its
- * just "David".
- * Directly fix up these known cases as this is faster.
- * If a font which doesn't match these known cases has no file,
- * it may be a font that has been temporarily added to the known set
- * or it may be an installed font with a missing registry entry.
- * Installed fonts are those in the windows font directories.
- * Make a best effort attempt to locate these.
- * We obtain the list of TrueType fonts in these directories and
- * filter out all the font files we already know about from the registry.
- * What remains may be "bad" fonts, duplicate fonts, or perhaps the
- * missing font(s) we are looking for.
- * Open each of these files to find out.
- */
- private static void resolveWindowsFonts() {
-
- ArrayList<String> unmappedFontNames = null;
- for (String font : fontToFamilyNameMap.keySet()) {
- String file = fontToFileMap.get(font);
- if (file == null) {
- if (font.indexOf(" ") > 0) {
- String newName = font.replaceFirst(" ", " ");
- file = fontToFileMap.get(newName);
- /* If this name exists and isn't for a valid name
- * replace the mapping to the file with this font
- */
- if (file != null &&
- !fontToFamilyNameMap.containsKey(newName)) {
- fontToFileMap.remove(newName);
- fontToFileMap.put(font, file);
- }
- } else if (font.equals("marlett")) {
- fontToFileMap.put(font, "marlett.ttf");
- } else if (font.equals("david")) {
- file = fontToFileMap.get("david regular");
- if (file != null) {
- fontToFileMap.remove("david regular");
- fontToFileMap.put("david", file);
- }
- } else {
- if (unmappedFontNames == null) {
- unmappedFontNames = new ArrayList<String>();
- }
- unmappedFontNames.add(font);
- }
- }
- }
-
- if (unmappedFontNames != null) {
- HashSet<String> unmappedFontFiles = new HashSet<String>();
-
- /* Every font key in fontToFileMap ought to correspond to a
- * font key in fontToFamilyNameMap. Entries that don't seem
- * to correspond are likely fonts that were named differently
- * by GDI than in the registry. One known cause of this is when
- * Windows has had its regional settings changed so that from
- * GDI we get a localised (eg Chinese or Japanese) name for the
- * font, but the registry retains the English version of the name
- * that corresponded to the "install" locale for windows.
- * Since we are in this code block because there are unmapped
- * font names, we can look to find unused font->file mappings
- * and then open the files to read the names. We don't generally
- * want to open font files, as its a performance hit, but this
- * occurs only for a small number of fonts on specific system
- * configs - ie is believed that a "true" Japanese windows would
- * have JA names in the registry too.
- * Clone fontToFileMap and remove from the clone all keys which
- * match a fontToFamilyNameMap key. What remains maps to the
- * files we want to open to find the fonts GDI returned.
- * A font in such a file is added to the fontToFileMap after
- * checking its one of the unmappedFontNames we are looking for.
- * The original name that didn't map is removed from fontToFileMap
- * so essentially this "fixes up" fontToFileMap to use the same
- * name as GDI.
- * Also note that typically the fonts for which this occurs in
- * CJK locales are TTC fonts and not all fonts in a TTC may have
- * localised names. Eg MSGOTHIC.TTC contains 3 fonts and one of
- * them "MS UI Gothic" has no JA name whereas the other two do.
- * So not every font in these files is unmapped or new.
- */
- HashMap<String,String> ffmapCopy =
- (HashMap<String,String>)(fontToFileMap.clone());
- for (String key : fontToFamilyNameMap.keySet()) {
- ffmapCopy.remove(key);
- }
- for (String key : ffmapCopy.keySet()) {
- unmappedFontFiles.add(ffmapCopy.get(key));
- fontToFileMap.remove(key);
- }
-
- resolveFontFiles(unmappedFontFiles, unmappedFontNames);
-
- /* If there are still unmapped font names, this means there's
- * something that wasn't in the registry. We need to get all
- * the font files directly and look at the ones that weren't
- * found in the registry.
- */
- if (unmappedFontNames.size() > 0) {
-
- /* getFontFilesFromPath() returns all lower case names.
- * To compare we also need lower case
- * versions of the names from the registry.
- */
- ArrayList<String> registryFiles = new ArrayList<String>();
-
- for (String regFile : fontToFileMap.values()) {
- registryFiles.add(regFile.toLowerCase());
- }
- /* We don't look for Type1 files here as windows will
- * not enumerate these, so aren't useful in reconciling
- * GDI's unmapped files. We do find these later when
- * we enumerate all fonts.
- */
- for (String pathFile : getFontFilesFromPath(true)) {
- if (!registryFiles.contains(pathFile)) {
- unmappedFontFiles.add(pathFile);
- }
- }
-
- resolveFontFiles(unmappedFontFiles, unmappedFontNames);
- }
-
- /* remove from the set of names that will be returned to the
- * user any fonts that can't be mapped to files.
- */
- if (unmappedFontNames.size() > 0) {
- int sz = unmappedFontNames.size();
- for (int i=0; i<sz; i++) {
- String name = unmappedFontNames.get(i);
- String familyName = fontToFamilyNameMap.get(name);
- if (familyName != null) {
- ArrayList family = familyToFontListMap.get(familyName);
- if (family != null) {
- if (family.size() <= 1) {
- familyToFontListMap.remove(familyName);
- }
- }
- }
- fontToFamilyNameMap.remove(name);
- if (logging) {
- logger.info("No file for font:" + name);
- }
- }
- }
- }
- }
-
- /**
- * In some cases windows may have fonts in the fonts folder that
- * don't show up in the registry or in the GDI calls to enumerate fonts.
- * The only way to find these is to list the directory. We invoke this
- * only in getAllFonts/Families, so most searches for a specific
- * font that is satisfied by the GDI/registry calls don't take the
- * additional hit of listing the directory. This hit is small enough
- * that its not significant in these 'enumerate all the fonts' cases.
- * The basic approach is to cross-reference the files windows found
- * with the ones in the directory listing approach, and for each
- * in the latter list that is missing from the former list, register it.
- */
- private static synchronized void checkForUnreferencedFontFiles() {
- if (haveCheckedUnreferencedFontFiles) {
- return;
- }
- haveCheckedUnreferencedFontFiles = true;
- if (!isWindows) {
- return;
- }
- /* getFontFilesFromPath() returns all lower case names.
- * To compare we also need lower case
- * versions of the names from the registry.
- */
- ArrayList<String> registryFiles = new ArrayList<String>();
- for (String regFile : fontToFileMap.values()) {
- registryFiles.add(regFile.toLowerCase());
- }
-
- /* To avoid any issues with concurrent modification, create
- * copies of the existing maps, add the new fonts into these
- * and then replace the references to the old ones with the
- * new maps. ConcurrentHashmap is another option but its a lot
- * more changes and with this exception, these maps are intended
- * to be static.
- */
- HashMap<String,String> fontToFileMap2 = null;
- HashMap<String,String> fontToFamilyNameMap2 = null;
- HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
-
- for (String pathFile : getFontFilesFromPath(false)) {
- if (!registryFiles.contains(pathFile)) {
- if (logging) {
- logger.info("Found non-registry file : " + pathFile);
- }
- PhysicalFont f = registerFontFile(getPathName(pathFile));
- if (f == null) {
- continue;
- }
- if (fontToFileMap2 == null) {
- fontToFileMap2 = new HashMap<String,String>(fontToFileMap);
- fontToFamilyNameMap2 =
- new HashMap<String,String>(fontToFamilyNameMap);
- familyToFontListMap2 = new
- HashMap<String,ArrayList<String>>(familyToFontListMap);
- }
- String fontName = f.getFontName(null);
- String family = f.getFamilyName(null);
- String familyLC = family.toLowerCase();
- fontToFamilyNameMap2.put(fontName, family);
- fontToFileMap2.put(fontName, pathFile);
- ArrayList<String> fonts = familyToFontListMap2.get(familyLC);
- if (fonts == null) {
- fonts = new ArrayList<String>();
- } else {
- fonts = new ArrayList<String>(fonts);
- }
- fonts.add(fontName);
- familyToFontListMap2.put(familyLC, fonts);
- }
- }
- if (fontToFileMap2 != null) {
- fontToFileMap = fontToFileMap2;
- familyToFontListMap = familyToFontListMap2;
- fontToFamilyNameMap = fontToFamilyNameMap2;
- }
- }
-
- private static void resolveFontFiles(HashSet<String> unmappedFiles,
- ArrayList<String> unmappedFonts) {
-
- Locale l = SunToolkit.getStartupLocale();
-
- for (String file : unmappedFiles) {
- try {
- int fn = 0;
- TrueTypeFont ttf;
- String fullPath = getPathName(file);
- if (logging) {
- logger.info("Trying to resolve file " + fullPath);
- }
- do {
- ttf = new TrueTypeFont(fullPath, null, fn++, true);
- // prefer the font's locale name.
- String fontName = ttf.getFontName(l).toLowerCase();
- if (unmappedFonts.contains(fontName)) {
- fontToFileMap.put(fontName, file);
- unmappedFonts.remove(fontName);
- if (logging) {
- logger.info("Resolved absent registry entry for " +
- fontName + " located in " + fullPath);
- }
- }
- }
- while (fn < ttf.getFontCount());
- } catch (Exception e) {
- }
- }
- }
-
- private static synchronized HashMap<String,String> getFullNameToFileMap() {
- if (fontToFileMap == null) {
-
- initSGEnv();
- pathDirs = sgEnv.getPlatformFontDirs();
-
- fontToFileMap = new HashMap<String,String>(100);
- fontToFamilyNameMap = new HashMap<String,String>(100);
- familyToFontListMap = new HashMap<String,ArrayList<String>>(50);
- populateFontFileNameMap(fontToFileMap,
- fontToFamilyNameMap,
- familyToFontListMap,
- Locale.ENGLISH);
- if (isWindows) {
- resolveWindowsFonts();
- }
- if (logging) {
- logPlatformFontInfo();
- }
- }
- return fontToFileMap;
- }
-
- private static void logPlatformFontInfo() {
- for (int i=0; i< pathDirs.length;i++) {
- logger.info("fontdir="+pathDirs[i]);
- }
- for (String keyName : fontToFileMap.keySet()) {
- logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName));
- }
- for (String keyName : fontToFamilyNameMap.keySet()) {
- logger.info("font="+keyName+" family="+
- fontToFamilyNameMap.get(keyName));
- }
- for (String keyName : familyToFontListMap.keySet()) {
- logger.info("family="+keyName+ " fonts="+
- familyToFontListMap.get(keyName));
- }
- }
-
- /* Note this return list excludes logical fonts and JRE fonts */
- public static String[] getFontNamesFromPlatform() {
- if (getFullNameToFileMap().size() == 0) {
- return null;
- }
- checkForUnreferencedFontFiles();
- /* This odd code with TreeMap is used to preserve a historical
- * behaviour wrt the sorting order .. */
- ArrayList<String> fontNames = new ArrayList<String>();
- for (ArrayList<String> a : familyToFontListMap.values()) {
- for (String s : a) {
- fontNames.add(s);
- }
- }
- return fontNames.toArray(STR_ARRAY);
- }
-
- public static boolean gotFontsFromPlatform() {
- return getFullNameToFileMap().size() != 0;
- }
-
- public static String getFileNameForFontName(String fontName) {
- String fontNameLC = fontName.toLowerCase(Locale.ENGLISH);
- return fontToFileMap.get(fontNameLC);
- }
-
- private static PhysicalFont registerFontFile(String file) {
- if (new File(file).isAbsolute() &&
- !registeredFontFiles.contains(file)) {
- int fontFormat = FONTFORMAT_NONE;
- int fontRank = Font2D.UNKNOWN_RANK;
- if (SunGraphicsEnvironment.ttFilter.accept(null, file)) {
- fontFormat = FONTFORMAT_TRUETYPE;
- fontRank = Font2D.TTF_RANK;
- } else if
- (SunGraphicsEnvironment.t1Filter.accept(null, file)) {
- fontFormat = FONTFORMAT_TYPE1;
- fontRank = Font2D.TYPE1_RANK;
- }
- if (fontFormat == FONTFORMAT_NONE) {
- return null;
- }
- return registerFontFile(file, null, fontFormat, false, fontRank);
- }
- return null;
- }
-
- /* Used to register any font files that are found by platform APIs
- * that weren't previously found in the standard font locations.
- * the isAbsolute() check is needed since that's whats stored in the
- * set, and on windows, the fonts in the system font directory that
- * are in the fontToFileMap are just basenames. We don't want to try
- * to register those again, but we do want to register other registry
- * installed fonts.
- */
- public static void registerOtherFontFiles(HashSet registeredFontFiles) {
- if (getFullNameToFileMap().size() == 0) {
- return;
- }
- for (String file : fontToFileMap.values()) {
- registerFontFile(file);
- }
- }
-
- public static boolean
- getFamilyNamesFromPlatform(TreeMap<String,String> familyNames,
- Locale requestedLocale) {
- if (getFullNameToFileMap().size() == 0) {
- return false;
- }
- checkForUnreferencedFontFiles();
- for (String name : fontToFamilyNameMap.values()) {
- familyNames.put(name.toLowerCase(requestedLocale), name);
- }
- return true;
- }
-
- /* Path may be absolute or a base file name relative to one of
- * the platform font directories
- */
- private static String getPathName(final String s) {
- File f = new File(s);
- if (f.isAbsolute()) {
- return s;
- } else if (pathDirs.length==1) {
- return pathDirs[0] + File.separator + s;
- } else {
- String path = java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<String>() {
- public String run() {
- for (int p=0; p<pathDirs.length; p++) {
- File f = new File(pathDirs[p] +File.separator+ s);
- if (f.exists()) {
- return f.getAbsolutePath();
- }
- }
- return null;
- }
- });
- if (path != null) {
- return path;
- }
- }
- return s; // shouldn't happen, but harmless
- }
-
- /* lcName is required to be lower case for use as a key.
- * lcName may be a full name, or a family name, and style may
- * be specified in addition to either of these. So be sure to
- * get the right one. Since an app *could* ask for "Foo Regular"
- * and later ask for "Foo Italic", if we don't register all the
- * styles, then logic in findFont2D may try to style the original
- * so we register the entire family if we get a match here.
- * This is still a big win because this code is invoked where
- * otherwise we would register all fonts.
- * It's also useful for the case where "Foo Bold" was specified with
- * style Font.ITALIC, as we would want in that case to try to return
- * "Foo Bold Italic" if it exists, and it is only by locating "Foo Bold"
- * and opening it that we really "know" it's Bold, and can look for
- * a font that supports that and the italic style.
- * The code in here is not overtly windows-specific but in fact it
- * is unlikely to be useful as is on other platforms. It is maintained
- * in this shared source file to be close to its sole client and
- * because so much of the logic is intertwined with the logic in
- * findFont2D.
- */
- private static Font2D findFontFromPlatform(String lcName, int style) {
- if (getFullNameToFileMap().size() == 0) {
- return null;
- }
-
- ArrayList<String> family = null;
- String fontFile = null;
- String familyName = fontToFamilyNameMap.get(lcName);
- if (familyName != null) {
- fontFile = fontToFileMap.get(lcName);
- family = familyToFontListMap.get
- (familyName.toLowerCase(Locale.ENGLISH));
- } else {
- family = familyToFontListMap.get(lcName); // is lcName is a family?
- if (family != null && family.size() > 0) {
- String lcFontName = family.get(0).toLowerCase(Locale.ENGLISH);
- if (lcFontName != null) {
- familyName = fontToFamilyNameMap.get(lcFontName);
- }
- }
- }
- if (family == null || familyName == null) {
- return null;
- }
- String [] fontList = (String[])family.toArray(STR_ARRAY);
- if (fontList.length == 0) {
- return null;
- }
-
- /* first check that for every font in this family we can find
- * a font file. The specific reason for doing this is that
- * in at least one case on Windows a font has the face name "David"
- * but the registry entry is "David Regular". That is the "unique"
- * name of the font but in other cases the registry contains the
- * "full" name. See the specifications of name ids 3 and 4 in the
- * TrueType 'name' table.
- * In general this could cause a problem that we fail to register
- * if we all members of a family that we may end up mapping to
- * the wrong font member: eg return Bold when Plain is needed.
- */
- for (int f=0;f<fontList.length;f++) {
- String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
- String fileName = fontToFileMap.get(fontNameLC);
- if (fileName == null) {
- if (logging) {
- logger.info("Platform lookup : No file for font " +
- fontList[f] + " in family " +familyName);
- }
- return null;
- }
- }
-
- /* Currently this code only looks for TrueType fonts, so format
- * and rank can be specified without looking at the filename.
- */
- PhysicalFont physicalFont = null;
- if (fontFile != null) {
- physicalFont = registerFontFile(getPathName(fontFile), null,
- FONTFORMAT_TRUETYPE, false,
- Font2D.TTF_RANK);
- }
- /* Register all fonts in this family. */
- for (int f=0;f<fontList.length;f++) {
- String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
- String fileName = fontToFileMap.get(fontNameLC);
- if (fontFile != null && fontFile.equals(fileName)) {
- continue;
- }
- /* Currently this code only looks for TrueType fonts, so format
- * and rank can be specified without looking at the filename.
- */
- registerFontFile(getPathName(fileName), null,
- FONTFORMAT_TRUETYPE, false, Font2D.TTF_RANK);
- }
-
- Font2D font = null;
- FontFamily fontFamily = FontFamily.getFamily(familyName);
- /* Handle case where request "MyFont Bold", style=Font.ITALIC */
- if (physicalFont != null) {
- style |= physicalFont.style;
- }
- if (fontFamily != null) {
- font = fontFamily.getFont(style);
- if (font == null) {
- font = fontFamily.getClosestStyle(style);
- }
- }
- return font;
- }
-
- private static ConcurrentHashMap<String, Font2D> fontNameCache =
- new ConcurrentHashMap<String, Font2D>();
-
- /*
* The client supplies a name and a style.
* The name could be a family name, or a full name.
* A font may exist with the specified style, or it may
* exist only in some other style. For non-native fonts the scaler
* may be able to emulate the required style.
*/
- public static Font2D findFont2D(String name, int style, int fallback) {
- String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
- String mapName = lowerCaseName + dotStyleStr(style);
- Font2D font;
+ public Font2D findFont2D(String name, int style, int fallback);
- /* If preferLocaleFonts() or preferProportionalFonts() has been
- * called we may be using an alternate set of composite fonts in this
- * app context. The presence of a pre-built name map indicates whether
- * this is so, and gives access to the alternate composite for the
- * name.
- */
- if (usingPerAppContextComposites) {
- ConcurrentHashMap<String, Font2D> altNameCache =
- (ConcurrentHashMap<String, Font2D>)
- AppContext.getAppContext().get(CompositeFont.class);
- if (altNameCache != null) {
- font = (Font2D)altNameCache.get(mapName);
- } else {
- font = null;
- }
- } else {
- font = fontNameCache.get(mapName);
- }
- if (font != null) {
- return font;
- }
-
- if (logging) {
- logger.info("Search for font: " + name);
- }
-
- // The check below is just so that the bitmap fonts being set by
- // AWT and Swing thru the desktop properties do not trigger the
- // the load fonts case. The two bitmap fonts are now mapped to
- // appropriate equivalents for serif and sansserif.
- // Note that the cost of this comparison is only for the first
- // call until the map is filled.
- if (isWindows) {
- if (lowerCaseName.equals("ms sans serif")) {
- name = "sansserif";
- } else if (lowerCaseName.equals("ms serif")) {
- name = "serif";
- }
- }
-
- /* This isn't intended to support a client passing in the
- * string default, but if a client passes in null for the name
- * the java.awt.Font class internally substitutes this name.
- * So we need to recognise it here to prevent a loadFonts
- * on the unrecognised name. The only potential problem with
- * this is it would hide any real font called "default"!
- * But that seems like a potential problem we can ignore for now.
- */
- if (lowerCaseName.equals("default")) {
- name = "dialog";
- }
-
- /* First see if its a family name. */
- FontFamily family = FontFamily.getFamily(name);
- if (family != null) {
- font = family.getFontWithExactStyleMatch(style);
- if (font == null) {
- font = findDeferredFont(name, style);
- }
- if (font == null) {
- font = family.getFont(style);
- }
- if (font == null) {
- font = family.getClosestStyle(style);
- }
- if (font != null) {
- fontNameCache.put(mapName, font);
- return font;
- }
- }
-
- /* If it wasn't a family name, it should be a full name of
- * either a composite, or a physical font
- */
- font = fullNameToFont.get(lowerCaseName);
- if (font != null) {
- /* Check that the requested style matches the matched font's style.
- * But also match style automatically if the requested style is
- * "plain". This because the existing behaviour is that the fonts
- * listed via getAllFonts etc always list their style as PLAIN.
- * This does lead to non-commutative behaviours where you might
- * start with "Lucida Sans Regular" and ask for a BOLD version
- * and get "Lucida Sans DemiBold" but if you ask for the PLAIN
- * style of "Lucida Sans DemiBold" you get "Lucida Sans DemiBold".
- * This consistent however with what happens if you have a bold
- * version of a font and no plain version exists - alg. styling
- * doesn't "unbolden" the font.
- */
- if (font.style == style || style == Font.PLAIN) {
- fontNameCache.put(mapName, font);
- return font;
- } else {
- /* If it was a full name like "Lucida Sans Regular", but
- * the style requested is "bold", then we want to see if
- * there's the appropriate match against another font in
- * that family before trying to load all fonts, or applying a
- * algorithmic styling
- */
- family = FontFamily.getFamily(font.getFamilyName(null));
- if (family != null) {
- Font2D familyFont = family.getFont(style|font.style);
- /* We exactly matched the requested style, use it! */
- if (familyFont != null) {
- fontNameCache.put(mapName, familyFont);
- return familyFont;
- } else {
- /* This next call is designed to support the case
- * where bold italic is requested, and if we must
- * style, then base it on either bold or italic -
- * not on plain!
- */
- familyFont = family.getClosestStyle(style|font.style);
- if (familyFont != null) {
- /* The next check is perhaps one
- * that shouldn't be done. ie if we get this
- * far we have probably as close a match as we
- * are going to get. We could load all fonts to
- * see if somehow some parts of the family are
- * loaded but not all of it.
- */
- if (familyFont.canDoStyle(style|font.style)) {
- fontNameCache.put(mapName, familyFont);
- return familyFont;
- }
- }
- }
- }
- }
- }
-
- /* If reach here its possible that this is in a client which never
- * loaded the GraphicsEnvironment, so we haven't even loaded ANY of
- * the fonts from the environment. Do so now and recurse.
- */
- if (sgEnv == null) {
- initSGEnv();
- return findFont2D(name, style, fallback);
- }
-
- if (isWindows) {
- /* Don't want Windows to return a Lucida Sans font from
- * C:\Windows\Fonts
- */
- if (deferredFontFiles.size() > 0) {
- font = findJREDeferredFont(lowerCaseName, style);
- if (font != null) {
- fontNameCache.put(mapName, font);
- return font;
- }
- }
- font = findFontFromPlatform(lowerCaseName, style);
- if (font != null) {
- if (logging) {
- logger.info("Found font via platform API for request:\"" +
- name + "\":, style="+style+
- " found font: " + font);
- }
- fontNameCache.put(mapName, font);
- return font;
- }
- }
-
- /* If reach here and no match has been located, then if there are
- * uninitialised deferred fonts, load as many of those as needed
- * to find the deferred font. If none is found through that
- * search continue on.
- * There is possibly a minor issue when more than one
- * deferred font implements the same font face. Since deferred
- * fonts are only those in font configuration files, this is a
- * controlled situation, the known case being Solaris euro_fonts
- * versions of Arial, Times New Roman, Courier New. However
- * the larger font will transparently replace the smaller one
- * - see addToFontList() - when it is needed by the composite font.
- */
- if (deferredFontFiles.size() > 0) {
- font = findDeferredFont(name, style);
- if (font != null) {
- fontNameCache.put(mapName, font);
- return font;
- }
- }
-
- /* Some apps use deprecated 1.0 names such as helvetica and courier. On
- * Solaris these are Type1 fonts in /usr/openwin/lib/X11/fonts/Type1.
- * If running on Solaris will register all the fonts in this
- * directory.
- * May as well register the whole directory without actually testing
- * the font name is one of the deprecated names as the next step would
- * load all fonts which are in this directory anyway.
- * In the event that this lookup is successful it potentially "hides"
- * TrueType versions of such fonts that are elsewhere but since they
- * do not exist on Solaris this is not a problem.
- * Set a flag to indicate we've done this registration to avoid
- * repetition and more seriously, to avoid recursion.
- */
- if (isSolaris&&!loaded1dot0Fonts) {
- /* "timesroman" is a special case since that's not the
- * name of any known font on Solaris or elsewhere.
- */
- if (lowerCaseName.equals("timesroman")) {
- font = findFont2D("serif", style, fallback);
- fontNameCache.put(mapName, font);
- }
- sgEnv.register1dot0Fonts();
- loaded1dot0Fonts = true;
- Font2D ff = findFont2D(name, style, fallback);
- return ff;
- }
-
- /* We check for application registered fonts before
- * explicitly loading all fonts as if necessary the registration
- * code will have done so anyway. And we don't want to needlessly
- * load the actual files for all fonts.
- * Just as for installed fonts we check for family before fullname.
- * We do not add these fonts to fontNameCache for the
- * app context case which eliminates the overhead of a per context
- * cache for these.
- */
-
- if (fontsAreRegistered || fontsAreRegisteredPerAppContext) {
- Hashtable<String, FontFamily> familyTable = null;
- Hashtable<String, Font2D> nameTable;
-
- if (fontsAreRegistered) {
- familyTable = createdByFamilyName;
- nameTable = createdByFullName;
- } else {
- AppContext appContext = AppContext.getAppContext();
- familyTable =
- (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
- nameTable =
- (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
- }
-
- family = familyTable.get(lowerCaseName);
- if (family != null) {
- font = family.getFontWithExactStyleMatch(style);
- if (font == null) {
- font = family.getFont(style);
- }
- if (font == null) {
- font = family.getClosestStyle(style);
- }
- if (font != null) {
- if (fontsAreRegistered) {
- fontNameCache.put(mapName, font);
- }
- return font;
- }
- }
- font = nameTable.get(lowerCaseName);
- if (font != null) {
- if (fontsAreRegistered) {
- fontNameCache.put(mapName, font);
- }
- return font;
- }
- }
-
- /* If reach here and no match has been located, then if all fonts
- * are not yet loaded, do so, and then recurse.
- */
- if (!loadedAllFonts) {
- if (logging) {
- logger.info("Load fonts looking for:" + name);
- }
- sgEnv.loadFonts();
- loadedAllFonts = true;
- return findFont2D(name, style, fallback);
- }
-
- if (!loadedAllFontFiles) {
- if (logging) {
- logger.info("Load font files looking for:" + name);
- }
- sgEnv.loadFontFiles();
- loadedAllFontFiles = true;
- return findFont2D(name, style, fallback);
- }
-
- /* The primary name is the locale default - ie not US/English but
- * whatever is the default in this locale. This is the way it always
- * has been but may be surprising to some developers if "Arial Regular"
- * were hard-coded in their app and yet "Arial Regular" was not the
- * default name. Fortunately for them, as a consequence of the JDK
- * supporting returning names and family names for arbitrary locales,
- * we also need to support searching all localised names for a match.
- * But because this case of the name used to reference a font is not
- * the same as the default for this locale is rare, it makes sense to
- * search a much shorter list of default locale names and only go to
- * a longer list of names in the event that no match was found.
- * So add here code which searches localised names too.
- * As in 1.4.x this happens only after loading all fonts, which
- * is probably the right order.
- */
- if ((font = findFont2DAllLocales(name, style)) != null) {
- fontNameCache.put(mapName, font);
- return font;
- }
-
- /* Perhaps its a "compatibility" name - timesroman, helvetica,
- * or courier, which 1.0 apps used for logical fonts.
- * We look for these "late" after a loadFonts as we must not
- * hide real fonts of these names.
- * Map these appropriately:
- * On windows this means according to the rules specified by the
- * FontConfiguration : do it only for encoding==Cp1252
- *
- * REMIND: this is something we plan to remove.
- */
- if (isWindows) {
- String compatName =
- sgEnv.getFontConfiguration().getFallbackFamilyName(name, null);
- if (compatName != null) {
- font = findFont2D(compatName, style, fallback);
- fontNameCache.put(mapName, font);
- return font;
- }
- } else if (lowerCaseName.equals("timesroman")) {
- font = findFont2D("serif", style, fallback);
- fontNameCache.put(mapName, font);
- return font;
- } else if (lowerCaseName.equals("helvetica")) {
- font = findFont2D("sansserif", style, fallback);
- fontNameCache.put(mapName, font);
- return font;
- } else if (lowerCaseName.equals("courier")) {
- font = findFont2D("monospaced", style, fallback);
- fontNameCache.put(mapName, font);
- return font;
- }
-
- if (logging) {
- logger.info("No font found for:" + name);
- }
-
- switch (fallback) {
- case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
- case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
- default: return null;
- }
- }
-
- /* This method can be more efficient as it will only need to
- * do the lookup once, and subsequent calls on the java.awt.Font
- * instance can utilise the cached Font2D on that object.
- * Its unfortunate it needs to be a native method, but the font2D
- * variable has to be private.
- */
- public static native Font2D getFont2D(Font font);
-
- /* Stuff below was in NativeFontWrapper and needed a new home */
-
- /*
- * Workaround for apps which are dependent on a font metrics bug
- * in JDK 1.1. This is an unsupported win32 private setting.
- */
- public static boolean usePlatformFontMetrics() {
- return usePlatformFontMetrics;
- }
-
- static native boolean getPlatformFontVar();
-
- private static final short US_LCID = 0x0409; // US English - default
- private static Map<String, Short> lcidMap;
-
- // Return a Microsoft LCID from the given Locale.
- // Used when getting localized font data.
-
- public static short getLCIDFromLocale(Locale locale) {
- // optimize for common case
- if (locale.equals(Locale.US)) {
- return US_LCID;
- }
-
- if (lcidMap == null) {
- createLCIDMap();
- }
-
- String key = locale.toString();
- while (!"".equals(key)) {
- Short lcidObject = (Short) lcidMap.get(key);
- if (lcidObject != null) {
- return lcidObject.shortValue();
- }
- int pos = key.lastIndexOf('_');
- if (pos < 1) {
- return US_LCID;
- }
- key = key.substring(0, pos);
- }
-
- return US_LCID;
- }
-
-
- private static void addLCIDMapEntry(Map<String, Short> map,
- String key, short value) {
- map.put(key, Short.valueOf(value));
- }
-
- private static synchronized void createLCIDMap() {
- if (lcidMap != null) {
- return;
- }
-
- Map<String, Short> map = new HashMap<String, Short>(200);
-
- // the following statements are derived from the langIDMap
- // in src/windows/native/java/lang/java_props_md.c using the following
- // awk script:
- // $1~/\/\*/ { next}
- // $3~/\?\?/ { next }
- // $3!~/_/ { next }
- // $1~/0x0409/ { next }
- // $1~/0x0c0a/ { next }
- // $1~/0x042c/ { next }
- // $1~/0x0443/ { next }
- // $1~/0x0812/ { next }
- // $1~/0x04/ { print " addLCIDMapEntry(map, " substr($3, 0, 3) "\", (short) " substr($1, 0, 6) ");" ; next }
- // $3~/,/ { print " addLCIDMapEntry(map, " $3 " (short) " substr($1, 0, 6) ");" ; next }
- // { print " addLCIDMapEntry(map, " $3 ", (short) " substr($1, 0, 6) ");" ; next }
- // The lines of this script:
- // - eliminate comments
- // - eliminate questionable locales
- // - eliminate language-only locales
- // - eliminate the default LCID value
- // - eliminate a few other unneeded LCID values
- // - print language-only locale entries for x04* LCID values
- // (apparently Microsoft doesn't use language-only LCID values -
- // see http://www.microsoft.com/OpenType/otspec/name.htm
- // - print complete entries for all other LCID values
- // Run
- // awk -f awk-script langIDMap > statements
- addLCIDMapEntry(map, "ar", (short) 0x0401);
- addLCIDMapEntry(map, "bg", (short) 0x0402);
- addLCIDMapEntry(map, "ca", (short) 0x0403);
- addLCIDMapEntry(map, "zh", (short) 0x0404);
- addLCIDMapEntry(map, "cs", (short) 0x0405);
- addLCIDMapEntry(map, "da", (short) 0x0406);
- addLCIDMapEntry(map, "de", (short) 0x0407);
- addLCIDMapEntry(map, "el", (short) 0x0408);
- addLCIDMapEntry(map, "es", (short) 0x040a);
- addLCIDMapEntry(map, "fi", (short) 0x040b);
- addLCIDMapEntry(map, "fr", (short) 0x040c);
- addLCIDMapEntry(map, "iw", (short) 0x040d);
- addLCIDMapEntry(map, "hu", (short) 0x040e);
- addLCIDMapEntry(map, "is", (short) 0x040f);
- addLCIDMapEntry(map, "it", (short) 0x0410);
- addLCIDMapEntry(map, "ja", (short) 0x0411);
- addLCIDMapEntry(map, "ko", (short) 0x0412);
- addLCIDMapEntry(map, "nl", (short) 0x0413);
- addLCIDMapEntry(map, "no", (short) 0x0414);
- addLCIDMapEntry(map, "pl", (short) 0x0415);
- addLCIDMapEntry(map, "pt", (short) 0x0416);
- addLCIDMapEntry(map, "rm", (short) 0x0417);
- addLCIDMapEntry(map, "ro", (short) 0x0418);
- addLCIDMapEntry(map, "ru", (short) 0x0419);
- addLCIDMapEntry(map, "hr", (short) 0x041a);
- addLCIDMapEntry(map, "sk", (short) 0x041b);
- addLCIDMapEntry(map, "sq", (short) 0x041c);
- addLCIDMapEntry(map, "sv", (short) 0x041d);
- addLCIDMapEntry(map, "th", (short) 0x041e);
- addLCIDMapEntry(map, "tr", (short) 0x041f);
- addLCIDMapEntry(map, "ur", (short) 0x0420);
- addLCIDMapEntry(map, "in", (short) 0x0421);
- addLCIDMapEntry(map, "uk", (short) 0x0422);
- addLCIDMapEntry(map, "be", (short) 0x0423);
- addLCIDMapEntry(map, "sl", (short) 0x0424);
- addLCIDMapEntry(map, "et", (short) 0x0425);
- addLCIDMapEntry(map, "lv", (short) 0x0426);
- addLCIDMapEntry(map, "lt", (short) 0x0427);
- addLCIDMapEntry(map, "fa", (short) 0x0429);
- addLCIDMapEntry(map, "vi", (short) 0x042a);
- addLCIDMapEntry(map, "hy", (short) 0x042b);
- addLCIDMapEntry(map, "eu", (short) 0x042d);
- addLCIDMapEntry(map, "mk", (short) 0x042f);
- addLCIDMapEntry(map, "tn", (short) 0x0432);
- addLCIDMapEntry(map, "xh", (short) 0x0434);
- addLCIDMapEntry(map, "zu", (short) 0x0435);
- addLCIDMapEntry(map, "af", (short) 0x0436);
- addLCIDMapEntry(map, "ka", (short) 0x0437);
- addLCIDMapEntry(map, "fo", (short) 0x0438);
- addLCIDMapEntry(map, "hi", (short) 0x0439);
- addLCIDMapEntry(map, "mt", (short) 0x043a);
- addLCIDMapEntry(map, "se", (short) 0x043b);
- addLCIDMapEntry(map, "gd", (short) 0x043c);
- addLCIDMapEntry(map, "ms", (short) 0x043e);
- addLCIDMapEntry(map, "kk", (short) 0x043f);
- addLCIDMapEntry(map, "ky", (short) 0x0440);
- addLCIDMapEntry(map, "sw", (short) 0x0441);
- addLCIDMapEntry(map, "tt", (short) 0x0444);
- addLCIDMapEntry(map, "bn", (short) 0x0445);
- addLCIDMapEntry(map, "pa", (short) 0x0446);
- addLCIDMapEntry(map, "gu", (short) 0x0447);
- addLCIDMapEntry(map, "ta", (short) 0x0449);
- addLCIDMapEntry(map, "te", (short) 0x044a);
- addLCIDMapEntry(map, "kn", (short) 0x044b);
- addLCIDMapEntry(map, "ml", (short) 0x044c);
- addLCIDMapEntry(map, "mr", (short) 0x044e);
- addLCIDMapEntry(map, "sa", (short) 0x044f);
- addLCIDMapEntry(map, "mn", (short) 0x0450);
- addLCIDMapEntry(map, "cy", (short) 0x0452);
- addLCIDMapEntry(map, "gl", (short) 0x0456);
- addLCIDMapEntry(map, "dv", (short) 0x0465);
- addLCIDMapEntry(map, "qu", (short) 0x046b);
- addLCIDMapEntry(map, "mi", (short) 0x0481);
- addLCIDMapEntry(map, "ar_IQ", (short) 0x0801);
- addLCIDMapEntry(map, "zh_CN", (short) 0x0804);
- addLCIDMapEntry(map, "de_CH", (short) 0x0807);
- addLCIDMapEntry(map, "en_GB", (short) 0x0809);
- addLCIDMapEntry(map, "es_MX", (short) 0x080a);
- addLCIDMapEntry(map, "fr_BE", (short) 0x080c);
- addLCIDMapEntry(map, "it_CH", (short) 0x0810);
- addLCIDMapEntry(map, "nl_BE", (short) 0x0813);
- addLCIDMapEntry(map, "no_NO_NY", (short) 0x0814);
- addLCIDMapEntry(map, "pt_PT", (short) 0x0816);
- addLCIDMapEntry(map, "ro_MD", (short) 0x0818);
- addLCIDMapEntry(map, "ru_MD", (short) 0x0819);
- addLCIDMapEntry(map, "sr_CS", (short) 0x081a);
- addLCIDMapEntry(map, "sv_FI", (short) 0x081d);
- addLCIDMapEntry(map, "az_AZ", (short) 0x082c);
- addLCIDMapEntry(map, "se_SE", (short) 0x083b);
- addLCIDMapEntry(map, "ga_IE", (short) 0x083c);
- addLCIDMapEntry(map, "ms_BN", (short) 0x083e);
- addLCIDMapEntry(map, "uz_UZ", (short) 0x0843);
- addLCIDMapEntry(map, "qu_EC", (short) 0x086b);
- addLCIDMapEntry(map, "ar_EG", (short) 0x0c01);
- addLCIDMapEntry(map, "zh_HK", (short) 0x0c04);
- addLCIDMapEntry(map, "de_AT", (short) 0x0c07);
- addLCIDMapEntry(map, "en_AU", (short) 0x0c09);
- addLCIDMapEntry(map, "fr_CA", (short) 0x0c0c);
- addLCIDMapEntry(map, "sr_CS", (short) 0x0c1a);
- addLCIDMapEntry(map, "se_FI", (short) 0x0c3b);
- addLCIDMapEntry(map, "qu_PE", (short) 0x0c6b);
- addLCIDMapEntry(map, "ar_LY", (short) 0x1001);
- addLCIDMapEntry(map, "zh_SG", (short) 0x1004);
- addLCIDMapEntry(map, "de_LU", (short) 0x1007);
- addLCIDMapEntry(map, "en_CA", (short) 0x1009);
- addLCIDMapEntry(map, "es_GT", (short) 0x100a);
- addLCIDMapEntry(map, "fr_CH", (short) 0x100c);
- addLCIDMapEntry(map, "hr_BA", (short) 0x101a);
- addLCIDMapEntry(map, "ar_DZ", (short) 0x1401);
- addLCIDMapEntry(map, "zh_MO", (short) 0x1404);
- addLCIDMapEntry(map, "de_LI", (short) 0x1407);
- addLCIDMapEntry(map, "en_NZ", (short) 0x1409);
- addLCIDMapEntry(map, "es_CR", (short) 0x140a);
- addLCIDMapEntry(map, "fr_LU", (short) 0x140c);
- addLCIDMapEntry(map, "bs_BA", (short) 0x141a);
- addLCIDMapEntry(map, "ar_MA", (short) 0x1801);
- addLCIDMapEntry(map, "en_IE", (short) 0x1809);
- addLCIDMapEntry(map, "es_PA", (short) 0x180a);
- addLCIDMapEntry(map, "fr_MC", (short) 0x180c);
- addLCIDMapEntry(map, "sr_BA", (short) 0x181a);
- addLCIDMapEntry(map, "ar_TN", (short) 0x1c01);
- addLCIDMapEntry(map, "en_ZA", (short) 0x1c09);
- addLCIDMapEntry(map, "es_DO", (short) 0x1c0a);
- addLCIDMapEntry(map, "sr_BA", (short) 0x1c1a);
- addLCIDMapEntry(map, "ar_OM", (short) 0x2001);
- addLCIDMapEntry(map, "en_JM", (short) 0x2009);
- addLCIDMapEntry(map, "es_VE", (short) 0x200a);
- addLCIDMapEntry(map, "ar_YE", (short) 0x2401);
- addLCIDMapEntry(map, "es_CO", (short) 0x240a);
- addLCIDMapEntry(map, "ar_SY", (short) 0x2801);
- addLCIDMapEntry(map, "en_BZ", (short) 0x2809);
- addLCIDMapEntry(map, "es_PE", (short) 0x280a);
- addLCIDMapEntry(map, "ar_JO", (short) 0x2c01);
- addLCIDMapEntry(map, "en_TT", (short) 0x2c09);
- addLCIDMapEntry(map, "es_AR", (short) 0x2c0a);
- addLCIDMapEntry(map, "ar_LB", (short) 0x3001);
- addLCIDMapEntry(map, "en_ZW", (short) 0x3009);
- addLCIDMapEntry(map, "es_EC", (short) 0x300a);
- addLCIDMapEntry(map, "ar_KW", (short) 0x3401);
- addLCIDMapEntry(map, "en_PH", (short) 0x3409);
- addLCIDMapEntry(map, "es_CL", (short) 0x340a);
- addLCIDMapEntry(map, "ar_AE", (short) 0x3801);
- addLCIDMapEntry(map, "es_UY", (short) 0x380a);
- addLCIDMapEntry(map, "ar_BH", (short) 0x3c01);
- addLCIDMapEntry(map, "es_PY", (short) 0x3c0a);
- addLCIDMapEntry(map, "ar_QA", (short) 0x4001);
- addLCIDMapEntry(map, "es_BO", (short) 0x400a);
- addLCIDMapEntry(map, "es_SV", (short) 0x440a);
- addLCIDMapEntry(map, "es_HN", (short) 0x480a);
- addLCIDMapEntry(map, "es_NI", (short) 0x4c0a);
- addLCIDMapEntry(map, "es_PR", (short) 0x500a);
-
- lcidMap = map;
- }
-
- public static int getNumFonts() {
- return physicalFonts.size()+maxCompFont;
- }
-
- private static boolean fontSupportsEncoding(Font font, String encoding) {
- return getFont2D(font).supportsEncoding(encoding);
- }
-
- public synchronized static native String getFontPath(boolean noType1Fonts);
- public synchronized static native void setNativeFontPath(String fontPath);
-
-
- private static Thread fileCloser = null;
- static Vector<File> tmpFontFiles = null;
-
- public static Font2D createFont2D(File fontFile, int fontFormat,
- boolean isCopy,
- CreatedFontTracker tracker)
- throws FontFormatException {
-
- String fontFilePath = fontFile.getPath();
- FileFont font2D = null;
- final File fFile = fontFile;
- final CreatedFontTracker _tracker = tracker;
- try {
- switch (fontFormat) {
- case Font.TRUETYPE_FONT:
- font2D = new TrueTypeFont(fontFilePath, null, 0, true);
- break;
- case Font.TYPE1_FONT:
- font2D = new Type1Font(fontFilePath, null, isCopy);
- break;
- default:
- throw new FontFormatException("Unrecognised Font Format");
- }
- } catch (FontFormatException e) {
- if (isCopy) {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- if (_tracker != null) {
- _tracker.subBytes((int)fFile.length());
- }
- fFile.delete();
- return null;
- }
- });
- }
- throw(e);
- }
- if (isCopy) {
- font2D.setFileToRemove(fontFile, tracker);
- synchronized (FontManager.class) {
-
- if (tmpFontFiles == null) {
- tmpFontFiles = new Vector<File>();
- }
- tmpFontFiles.add(fontFile);
-
- if (fileCloser == null) {
- final Runnable fileCloserRunnable = new Runnable() {
- public void run() {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
-
- for (int i=0;i<CHANNELPOOLSIZE;i++) {
- if (fontFileCache[i] != null) {
- try {
- fontFileCache[i].close();
- } catch (Exception e) {
- }
- }
- }
- if (tmpFontFiles != null) {
- File[] files = new File[tmpFontFiles.size()];
- files = tmpFontFiles.toArray(files);
- for (int f=0; f<files.length;f++) {
- try {
- files[f].delete();
- } catch (Exception e) {
- }
- }
- }
-
- return null;
- }
-
- });
- }
- };
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- /* The thread must be a member of a thread group
- * which will not get GCed before VM exit.
- * Make its parent the top-level thread group.
- */
- ThreadGroup tg =
- Thread.currentThread().getThreadGroup();
- for (ThreadGroup tgn = tg;
- tgn != null;
- tg = tgn, tgn = tg.getParent());
- fileCloser = new Thread(tg, fileCloserRunnable);
- Runtime.getRuntime().addShutdownHook(fileCloser);
- return null;
- }
- });
- }
- }
- }
- return font2D;
- }
-
- /* remind: used in X11GraphicsEnvironment and called often enough
- * that we ought to obsolete this code
- */
- public synchronized static String getFullNameByFileName(String fileName) {
- PhysicalFont[] physFonts = getPhysicalFonts();
- for (int i=0;i<physFonts.length;i++) {
- if (physFonts[i].platName.equals(fileName)) {
- return (physFonts[i].getFontName(null));
- }
- }
- return null;
- }
-
- /*
- * This is called when font is determined to be invalid/bad.
- * It designed to be called (for example) by the font scaler
- * when in processing a font file it is discovered to be incorrect.
- * This is different than the case where fonts are discovered to
- * be incorrect during initial verification, as such fonts are
- * never registered.
- * Handles to this font held are re-directed to a default font.
- * This default may not be an ideal substitute buts it better than
- * crashing This code assumes a PhysicalFont parameter as it doesn't
- * make sense for a Composite to be "bad".
- */
- public static synchronized void deRegisterBadFont(Font2D font2D) {
- if (!(font2D instanceof PhysicalFont)) {
- /* We should never reach here, but just in case */
- return;
- } else {
- if (logging) {
- logger.severe("Deregister bad font: " + font2D);
- }
- replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
- }
- }
-
- /*
- * This encapsulates all the work that needs to be done when a
- * Font2D is replaced by a different Font2D.
- */
- public static synchronized void replaceFont(PhysicalFont oldFont,
- PhysicalFont newFont) {
-
- if (oldFont.handle.font2D != oldFont) {
- /* already done */
- return;
- }
-
- /* If we try to replace the font with itself, that won't work,
- * so pick any alternative physical font
- */
- if (oldFont == newFont) {
- if (logging) {
- logger.severe("Can't replace bad font with itself " + oldFont);
- }
- PhysicalFont[] physFonts = getPhysicalFonts();
- for (int i=0; i<physFonts.length;i++) {
- if (physFonts[i] != newFont) {
- newFont = physFonts[i];
- break;
- }
- }
- if (oldFont == newFont) {
- if (logging) {
- logger.severe("This is bad. No good physicalFonts found.");
- }
- return;
- }
- }
-
- /* eliminate references to this font, so it won't be located
- * by future callers, and will be eligible for GC when all
- * references are removed
- */
- oldFont.handle.font2D = newFont;
- physicalFonts.remove(oldFont.fullName);
- fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
- FontFamily.remove(oldFont);
-
- if (localeFullNamesToFont != null) {
- Map.Entry[] mapEntries =
- (Map.Entry[])localeFullNamesToFont.entrySet().
- toArray(new Map.Entry[0]);
- /* Should I be replacing these, or just I just remove
- * the names from the map?
- */
- for (int i=0; i<mapEntries.length;i++) {
- if (mapEntries[i].getValue() == oldFont) {
- try {
- mapEntries[i].setValue(newFont);
- } catch (Exception e) {
- /* some maps don't support this operation.
- * In this case just give up and remove the entry.
- */
- localeFullNamesToFont.remove(mapEntries[i].getKey());
- }
- }
- }
- }
-
- for (int i=0; i<maxCompFont; i++) {
- /* Deferred initialization of composites shouldn't be
- * a problem for this case, since a font must have been
- * initialised to be discovered to be bad.
- * Some JRE composites on Solaris use two versions of the same
- * font. The replaced font isn't bad, just "smaller" so there's
- * no need to make the slot point to the new font.
- * Since composites have a direct reference to the Font2D (not
- * via a handle) making this substitution is not safe and could
- * cause an additional problem and so this substitution is
- * warranted only when a font is truly "bad" and could cause
- * a crash. So we now replace it only if its being substituted
- * with some font other than a fontconfig rank font
- * Since in practice a substitution will have the same rank
- * this may never happen, but the code is safer even if its
- * also now a no-op.
- * The only obvious "glitch" from this stems from the current
- * implementation that when asked for the number of glyphs in a
- * composite it lies and returns the number in slot 0 because
- * composite glyphs aren't contiguous. Since we live with that
- * we can live with the glitch that depending on how it was
- * initialised a composite may return different values for this.
- * Fixing the issues with composite glyph ids is tricky as
- * there are exclusion ranges and unlike other fonts even the
- * true "numGlyphs" isn't a contiguous range. Likely the only
- * solution is an API that returns an array of glyph ranges
- * which takes precedence over the existing API. That might
- * also need to address excluding ranges which represent a
- * code point supported by an earlier component.
- */
- if (newFont.getRank() > Font2D.FONT_CONFIG_RANK) {
- compFonts[i].replaceComponentFont(oldFont, newFont);
- }
- }
- }
-
- private static synchronized void loadLocaleNames() {
- if (localeFullNamesToFont != null) {
- return;
- }
- localeFullNamesToFont = new HashMap<String, TrueTypeFont>();
- Font2D[] fonts = getRegisteredFonts();
- for (int i=0; i<fonts.length; i++) {
- if (fonts[i] instanceof TrueTypeFont) {
- TrueTypeFont ttf = (TrueTypeFont)fonts[i];
- String[] fullNames = ttf.getAllFullNames();
- for (int n=0; n<fullNames.length; n++) {
- localeFullNamesToFont.put(fullNames[n], ttf);
- }
- FontFamily family = FontFamily.getFamily(ttf.familyName);
- if (family != null) {
- FontFamily.addLocaleNames(family, ttf.getAllFamilyNames());
- }
- }
- }
- }
-
- /* This replicate the core logic of findFont2D but operates on
- * all the locale names. This hasn't been merged into findFont2D to
- * keep the logic simpler and reduce overhead, since this case is
- * almost never used. The main case in which it is called is when
- * a bogus font name is used and we need to check all possible names
- * before returning the default case.
- */
- private static Font2D findFont2DAllLocales(String name, int style) {
-
- if (logging) {
- logger.info("Searching localised font names for:" + name);
- }
-
- /* If reach here and no match has been located, then if we have
- * not yet built the map of localeFullNamesToFont for TT fonts, do so
- * now. This method must be called after all fonts have been loaded.
- */
- if (localeFullNamesToFont == null) {
- loadLocaleNames();
- }
- String lowerCaseName = name.toLowerCase();
- Font2D font = null;
-
- /* First see if its a family name. */
- FontFamily family = FontFamily.getLocaleFamily(lowerCaseName);
- if (family != null) {
- font = family.getFont(style);
- if (font == null) {
- font = family.getClosestStyle(style);
- }
- if (font != null) {
- return font;
- }
- }
-
- /* If it wasn't a family name, it should be a full name. */
- synchronized (FontManager.class) {
- font = localeFullNamesToFont.get(name);
- }
- if (font != null) {
- if (font.style == style || style == Font.PLAIN) {
- return font;
- } else {
- family = FontFamily.getFamily(font.getFamilyName(null));
- if (family != null) {
- Font2D familyFont = family.getFont(style);
- /* We exactly matched the requested style, use it! */
- if (familyFont != null) {
- return familyFont;
- } else {
- familyFont = family.getClosestStyle(style);
- if (familyFont != null) {
- /* The next check is perhaps one
- * that shouldn't be done. ie if we get this
- * far we have probably as close a match as we
- * are going to get. We could load all fonts to
- * see if somehow some parts of the family are
- * loaded but not all of it.
- * This check is commented out for now.
- */
- if (!familyFont.canDoStyle(style)) {
- familyFont = null;
- }
- return familyFont;
- }
- }
- }
- }
- }
- return font;
- }
-
- /* Supporting "alternate" composite fonts on 2D graphics objects
- * is accessed by the application by calling methods on the local
- * GraphicsEnvironment. The overall implementation is described
- * in one place, here, since otherwise the implementation is spread
- * around it may be difficult to track.
- * The methods below call into SunGraphicsEnvironment which creates a
- * new FontConfiguration instance. The FontConfiguration class,
- * and its platform sub-classes are updated to take parameters requesting
- * these behaviours. This is then used to create new composite font
- * instances. Since this calls the initCompositeFont method in
- * SunGraphicsEnvironment it performs the same initialization as is
- * performed normally. There may be some duplication of effort, but
- * that code is already written to be able to perform properly if called
- * to duplicate work. The main difference is that if we detect we are
- * running in an applet/browser/Java plugin environment these new fonts
- * are not placed in the "default" maps but into an AppContext instance.
- * The font lookup mechanism in java.awt.Font.getFont2D() is also updated
- * so that look-up for composite fonts will in that case always
- * do a lookup rather than returning a cached result.
- * This is inefficient but necessary else singleton java.awt.Font
- * instances would not retrieve the correct Font2D for the appcontext.
- * sun.font.FontManager.findFont2D is also updated to that it uses
- * a name map cache specific to that appcontext.
+ /**
+ * Creates a Font2D for the specified font file, that is expected
+ * to be in the specified font format (according to the constants
+ * in java.awt.Font). The parameter {@code isCopy} is set to true
+ * when the specified font file is actually a copy of the font data
+ * and needs to be deleted afterwards. This method is called
+ * for the Font.createFont() methods.
*
- * Getting an AppContext is expensive, so there is a global variable
- * that records whether these methods have ever been called and can
- * avoid the expense for almost all applications. Once the correct
- * CompositeFont is associated with the Font, everything should work
- * through existing mechanisms.
- * A special case is that GraphicsEnvironment.getAllFonts() must
- * return an AppContext specific list.
+ * @param fontFile the file holding the font data
+ * @param fontFormat the expected font format
+ * @param isCopy {@code true} if the file is a copy and needs to be
+ * deleted, {@code false} otherwise
*
- * Calling the methods below is "heavyweight" but it is expected that
- * these methods will be called very rarely.
- *
+ * @return the created Font2D instance
+ */
+ public Font2D createFont2D(File fontFile, int fontFormat,
+ boolean isCopy, CreatedFontTracker tracker)
+ throws FontFormatException;
+
+ /**
* If usingPerAppContextComposites is true, we are in "applet"
* (eg browser) enviroment and at least one context has selected
* an alternate composite font behaviour.
- * If usingAlternateComposites is true, we are not in an "applet"
- * environment and the (single) application has selected
- * an alternate composite font behaviour.
+ */
+ public boolean usingPerAppContextComposites();
+
+ /**
+ * Creates a derived composite font from the specified font (handle).
*
- * - Printing: The implementation delegates logical fonts to an AWT
- * mechanism which cannot use these alternate configurations.
- * We can detect that alternate fonts are in use and back-off to 2D, but
- * that uses outlines. Much of this can be fixed with additional work
- * but that may have to wait. The results should be correct, just not
- * optimal.
+ * @param family the font family of the derived font
+ * @param style the font style of the derived font
+ * @param handle the original font (handle)
+ *
+ * @return the handle for the derived font
*/
- private static final Object altJAFontKey = new Object();
- private static final Object localeFontKey = new Object();
- private static final Object proportionalFontKey = new Object();
- public static boolean usingPerAppContextComposites = false;
- private static boolean usingAlternateComposites = false;
-
- /* These values are used only if we are running as a standalone
- * application, as determined by maybeMultiAppContext();
- */
- private static boolean gAltJAFont = false;
- private static boolean gLocalePref = false;
- private static boolean gPropPref = false;
-
- /* This method doesn't check if alternates are selected in this app
- * context. Its used by the FontMetrics caching code which in such
- * a case cannot retrieve a cached metrics solely on the basis of
- * the Font.equals() method since it needs to also check if the Font2D
- * is the same.
- * We also use non-standard composites for Swing native L&F fonts on
- * Windows. In that case the policy is that the metrics reported are
- * based solely on the physical font in the first slot which is the
- * visible java.awt.Font. So in that case the metrics cache which tests
- * the Font does what we want. In the near future when we expand the GTK
- * logical font definitions we may need to revisit this if GTK reports
- * combined metrics instead. For now though this test can be simple.
- */
- static boolean maybeUsingAlternateCompositeFonts() {
- return usingAlternateComposites || usingPerAppContextComposites;
- }
-
- public static boolean usingAlternateCompositeFonts() {
- return (usingAlternateComposites ||
- (usingPerAppContextComposites &&
- AppContext.getAppContext().get(CompositeFont.class) != null));
- }
-
- private static boolean maybeMultiAppContext() {
- Boolean appletSM = (Boolean)
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- SecurityManager sm = System.getSecurityManager();
- return new Boolean
- (sm instanceof sun.applet.AppletSecurity);
- }
- });
- return appletSM.booleanValue();
- }
-
- /* Modifies the behaviour of a subsequent call to preferLocaleFonts()
- * to use Mincho instead of Gothic for dialoginput in JA locales
- * on windows. Not needed on other platforms.
- */
- public static synchronized void useAlternateFontforJALocales() {
-
- if (!isWindows) {
- return;
- }
-
- initSGEnv();
- if (!maybeMultiAppContext()) {
- gAltJAFont = true;
- } else {
- AppContext appContext = AppContext.getAppContext();
- appContext.put(altJAFontKey, altJAFontKey);
- }
- }
-
- public static boolean usingAlternateFontforJALocales() {
- if (!maybeMultiAppContext()) {
- return gAltJAFont;
- } else {
- AppContext appContext = AppContext.getAppContext();
- return appContext.get(altJAFontKey) == altJAFontKey;
- }
- }
-
- public static synchronized void preferLocaleFonts() {
-
- initSGEnv();
-
- /* Test if re-ordering will have any effect */
- if (!FontConfiguration.willReorderForStartupLocale()) {
- return;
- }
-
- if (!maybeMultiAppContext()) {
- if (gLocalePref == true) {
- return;
- }
- gLocalePref = true;
- sgEnv.createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
- usingAlternateComposites = true;
- } else {
- AppContext appContext = AppContext.getAppContext();
- if (appContext.get(localeFontKey) == localeFontKey) {
- return;
- }
- appContext.put(localeFontKey, localeFontKey);
- boolean acPropPref =
- appContext.get(proportionalFontKey) == proportionalFontKey;
- ConcurrentHashMap<String, Font2D>
- altNameCache = new ConcurrentHashMap<String, Font2D> ();
- /* If there is an existing hashtable, we can drop it. */
- appContext.put(CompositeFont.class, altNameCache);
- usingPerAppContextComposites = true;
- sgEnv.createCompositeFonts(altNameCache, true, acPropPref);
- }
- }
-
- public static synchronized void preferProportionalFonts() {
-
- /* If no proportional fonts are configured, there's no need
- * to take any action.
- */
- if (!FontConfiguration.hasMonoToPropMap()) {
- return;
- }
-
- initSGEnv();
-
- if (!maybeMultiAppContext()) {
- if (gPropPref == true) {
- return;
- }
- gPropPref = true;
- sgEnv.createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
- usingAlternateComposites = true;
- } else {
- AppContext appContext = AppContext.getAppContext();
- if (appContext.get(proportionalFontKey) == proportionalFontKey) {
- return;
- }
- appContext.put(proportionalFontKey, proportionalFontKey);
- boolean acLocalePref =
- appContext.get(localeFontKey) == localeFontKey;
- ConcurrentHashMap<String, Font2D>
- altNameCache = new ConcurrentHashMap<String, Font2D> ();
- /* If there is an existing hashtable, we can drop it. */
- appContext.put(CompositeFont.class, altNameCache);
- usingPerAppContextComposites = true;
- sgEnv.createCompositeFonts(altNameCache, acLocalePref, true);
- }
- }
-
- private static HashSet<String> installedNames = null;
- private static HashSet<String> getInstalledNames() {
- if (installedNames == null) {
- Locale l = sgEnv.getSystemStartupLocale();
- String[] installedFamilies = sgEnv.getInstalledFontFamilyNames(l);
- Font[] installedFonts = sgEnv.getAllInstalledFonts();
- HashSet<String> names = new HashSet<String>();
- for (int i=0; i<installedFamilies.length; i++) {
- names.add(installedFamilies[i].toLowerCase(l));
- }
- for (int i=0; i<installedFonts.length; i++) {
- names.add(installedFonts[i].getFontName(l).toLowerCase(l));
- }
- installedNames = names;
- }
- return installedNames;
- }
-
- /* Keys are used to lookup per-AppContext Hashtables */
- private static final Object regFamilyKey = new Object();
- private static final Object regFullNameKey = new Object();
- private static Hashtable<String,FontFamily> createdByFamilyName;
- private static Hashtable<String,Font2D> createdByFullName;
- private static boolean fontsAreRegistered = false;
- private static boolean fontsAreRegisteredPerAppContext = false;
-
- public static boolean registerFont(Font font) {
- /* This method should not be called with "null".
- * It is the caller's responsibility to ensure that.
- */
- if (font == null) {
- return false;
- }
-
- /* Initialise these objects only once we start to use this API */
- synchronized (regFamilyKey) {
- if (createdByFamilyName == null) {
- createdByFamilyName = new Hashtable<String,FontFamily>();
- createdByFullName = new Hashtable<String,Font2D>();
- }
- }
-
- if (!isCreatedFont(font)) {
- return false;
- }
- if (sgEnv == null) {
- initSGEnv();
- }
- /* We want to ensure that this font cannot override existing
- * installed fonts. Check these conditions :
- * - family name is not that of an installed font
- * - full name is not that of an installed font
- * - family name is not the same as the full name of an installed font
- * - full name is not the same as the family name of an installed font
- * The last two of these may initially look odd but the reason is
- * that (unfortunately) Font constructors do not distinuguish these.
- * An extreme example of such a problem would be a font which has
- * family name "Dialog.Plain" and full name of "Dialog".
- * The one arguably overly stringent restriction here is that if an
- * application wants to supply a new member of an existing family
- * It will get rejected. But since the JRE can perform synthetic
- * styling in many cases its not necessary.
- * We don't apply the same logic to registered fonts. If apps want
- * to do this lets assume they have a reason. It won't cause problems
- * except for themselves.
- */
- HashSet<String> names = getInstalledNames();
- Locale l = sgEnv.getSystemStartupLocale();
- String familyName = font.getFamily(l).toLowerCase();
- String fullName = font.getFontName(l).toLowerCase();
- if (names.contains(familyName) || names.contains(fullName)) {
- return false;
- }
-
- /* Checks passed, now register the font */
- Hashtable<String,FontFamily> familyTable;
- Hashtable<String,Font2D> fullNameTable;
- if (!maybeMultiAppContext()) {
- familyTable = createdByFamilyName;
- fullNameTable = createdByFullName;
- fontsAreRegistered = true;
- } else {
- AppContext appContext = AppContext.getAppContext();
- familyTable =
- (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
- fullNameTable =
- (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
- if (familyTable == null) {
- familyTable = new Hashtable<String,FontFamily>();
- fullNameTable = new Hashtable<String,Font2D>();
- appContext.put(regFamilyKey, familyTable);
- appContext.put(regFullNameKey, fullNameTable);
- }
- fontsAreRegisteredPerAppContext = true;
- }
- /* Create the FontFamily and add font to the tables */
- Font2D font2D = getFont2D(font);
- int style = font2D.getStyle();
- FontFamily family = familyTable.get(familyName);
- if (family == null) {
- family = new FontFamily(font.getFamily(l));
- familyTable.put(familyName, family);
- }
- /* Remove name cache entries if not using app contexts.
- * To accommodate a case where code may have registered first a plain
- * family member and then used it and is now registering a bold family
- * member, we need to remove all members of the family, so that the
- * new style can get picked up rather than continuing to synthesise.
- */
- if (fontsAreRegistered) {
- removeFromCache(family.getFont(Font.PLAIN));
- removeFromCache(family.getFont(Font.BOLD));
- removeFromCache(family.getFont(Font.ITALIC));
- removeFromCache(family.getFont(Font.BOLD|Font.ITALIC));
- removeFromCache(fullNameTable.get(fullName));
- }
- family.setFont(font2D, style);
- fullNameTable.put(fullName, font2D);
- return true;
- }
-
- /* Remove from the name cache all references to the Font2D */
- private static void removeFromCache(Font2D font) {
- if (font == null) {
- return;
- }
- String[] keys = (String[])(fontNameCache.keySet().toArray(STR_ARRAY));
- for (int k=0; k<keys.length;k++) {
- if (fontNameCache.get(keys[k]) == font) {
- fontNameCache.remove(keys[k]);
- }
- }
- }
-
- // It may look odd to use TreeMap but its more convenient to the caller.
- public static TreeMap<String, String> getCreatedFontFamilyNames() {
-
- Hashtable<String,FontFamily> familyTable;
- if (fontsAreRegistered) {
- familyTable = createdByFamilyName;
- } else if (fontsAreRegisteredPerAppContext) {
- AppContext appContext = AppContext.getAppContext();
- familyTable =
- (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
- } else {
- return null;
- }
-
- Locale l = sgEnv.getSystemStartupLocale();
- synchronized (familyTable) {
- TreeMap<String, String> map = new TreeMap<String, String>();
- for (FontFamily f : familyTable.values()) {
- Font2D font2D = f.getFont(Font.PLAIN);
- if (font2D == null) {
- font2D = f.getClosestStyle(Font.PLAIN);
- }
- String name = font2D.getFamilyName(l);
- map.put(name.toLowerCase(l), name);
- }
- return map;
- }
- }
-
- public static Font[] getCreatedFonts() {
-
- Hashtable<String,Font2D> nameTable;
- if (fontsAreRegistered) {
- nameTable = createdByFullName;
- } else if (fontsAreRegisteredPerAppContext) {
- AppContext appContext = AppContext.getAppContext();
- nameTable =
- (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
- } else {
- return null;
- }
-
- Locale l = sgEnv.getSystemStartupLocale();
- synchronized (nameTable) {
- Font[] fonts = new Font[nameTable.size()];
- int i=0;
- for (Font2D font2D : nameTable.values()) {
- fonts[i++] = new Font(font2D.getFontName(l), Font.PLAIN, 1);
- }
- return fonts;
- }
- }
-
- /* Begin support for GTK Look and Feel - query libfontconfig and
- * return a composite Font to Swing that uses the desktop font(s).
- */
-
- /* A small "map" from GTK/fontconfig names to the equivalent JDK
- * logical font name.
- */
- private static final String[][] nameMap = {
- {"sans", "sansserif"},
- {"sans-serif", "sansserif"},
- {"serif", "serif"},
- {"monospace", "monospaced"}
- };
-
- public static String mapFcName(String name) {
- for (int i = 0; i < nameMap.length; i++) {
- if (name.equals(nameMap[i][0])) {
- return nameMap[i][1];
- }
- }
- return null;
- }
-
- /* fontconfig recognises slants roman, italic, as well as oblique,
- * and a slew of weights, where the ones that matter here are
- * regular and bold.
- * To fully qualify what we want, we can for example ask for (eg)
- * Font.PLAIN : "serif:regular:roman"
- * Font.BOLD : "serif:bold:roman"
- * Font.ITALIC : "serif:regular:italic"
- * Font.BOLD|Font.ITALIC : "serif:bold:italic"
- */
- private static String[] fontConfigNames = {
- "sans:regular:roman",
- "sans:bold:roman",
- "sans:regular:italic",
- "sans:bold:italic",
-
- "serif:regular:roman",
- "serif:bold:roman",
- "serif:regular:italic",
- "serif:bold:italic",
-
- "monospace:regular:roman",
- "monospace:bold:roman",
- "monospace:regular:italic",
- "monospace:bold:italic",
- };
-
- /* These next three classes are just data structures.
- */
- static class FontConfigFont {
- String familyName; // eg Bitstream Vera Sans
- String styleStr; // eg Bold
- String fullName; // eg Bitstream Vera Sans Bold
- String fontFile; // eg /usr/X11/lib/fonts/foo.ttf
- }
-
- static class FcCompFont {
- String fcName; // eg sans
- String fcFamily; // eg sans
- String jdkName; // eg sansserif
- int style; // eg 0=PLAIN
- FontConfigFont firstFont;
- FontConfigFont[] allFonts;
- //boolean preferBitmaps; // if embedded bitmaps preferred over AA
- CompositeFont compFont; // null if not yet created/known.
- }
-
- static class FontConfigInfo {
- int fcVersion;
- String[] cacheDirs = new String[4];
- }
-
- private static String getFCLocaleStr() {
- Locale l = SunToolkit.getStartupLocale();
- String localeStr = l.getLanguage();
- String country = l.getCountry();
- if (!country.equals("")) {
- localeStr = localeStr + "-" + country;
- }
- return localeStr;
- }
-
- /* This does cause the native libfontconfig to be loaded and unloaded,
- * but it does not incur the overhead of initialisation of its
- * data structures, so shouldn't have a measurable impact.
- */
- public static native int getFontConfigVersion();
-
- private static native int
- getFontConfigAASettings(String locale, String fcFamily);
-
- /* This is public solely so that for debugging purposes it can be called
- * with other names, which might (eg) include a size, eg "sans-24"
- * The return value is a text aa rendering hint value.
- * Normally we should call the no-args version.
- */
- public static Object getFontConfigAAHint(String fcFamily) {
- if (isWindows) {
- return null;
- } else {
- int hint = getFontConfigAASettings(getFCLocaleStr(), fcFamily);
- if (hint < 0) {
- return null;
- } else {
- return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
- hint);
- }
- }
- }
-
- /* Called from code that needs to know what are the AA settings
- * that apps using FC would pick up for the default desktop font.
- * Note apps can change the default desktop font. etc, so this
- * isn't certain to be right but its going to correct for most cases.
- * Native return values map to the text aa values in sun.awt.SunHints.
- * which is used to look up the renderinghint value object.
- */
- public static Object getFontConfigAAHint() {
- return getFontConfigAAHint("sans");
- }
-
- /* This is populated by native */
- private static final FontConfigInfo fcInfo = new FontConfigInfo();
-
- /* This array has the array elements created in Java code and is
- * passed down to native to be filled in.
- */
- private static FcCompFont[] fontConfigFonts;
-
- /* Return an array of FcCompFont structs describing the primary
- * font located for each of fontconfig/GTK/Pango's logical font names.
- */
- private static native void getFontConfig(String locale,
- FontConfigInfo fcInfo,
- FcCompFont[] fonts,
- boolean includeFallbacks);
-
- static void populateFontConfig(FcCompFont[] fcInfo) {
- fontConfigFonts = fcInfo;
- }
-
- static FcCompFont[] loadFontConfig() {
- initFontConfigFonts(true);
- return fontConfigFonts;
- }
-
- static FontConfigInfo getFontConfigInfo() {
- initFontConfigFonts(true);
- return fcInfo;
- }
-
- /* This can be made public if it's needed to force a re-read
- * rather than using the cached values. The re-read would be needed
- * only if some event signalled that the fontconfig has changed.
- * In that event this method would need to return directly the array
- * to be used by the caller in case it subsequently changed.
- */
- private static synchronized void
- initFontConfigFonts(boolean includeFallbacks) {
-
- if (fontConfigFonts != null) {
- if (!includeFallbacks || (fontConfigFonts[0].allFonts != null)) {
- return;
- }
- }
-
- if (isWindows || fontConfigFailed) {
- return;
- }
-
- long t0 = 0;
- if (logging) {
- t0 = System.nanoTime();
- }
-
- FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length];
- for (int i = 0; i< fontArr.length; i++) {
- fontArr[i] = new FcCompFont();
- fontArr[i].fcName = fontConfigNames[i];
- int colonPos = fontArr[i].fcName.indexOf(':');
- fontArr[i].fcFamily = fontArr[i].fcName.substring(0, colonPos);
- fontArr[i].jdkName = mapFcName(fontArr[i].fcFamily);
- fontArr[i].style = i % 4; // depends on array order.
- }
- getFontConfig(getFCLocaleStr(), fcInfo, fontArr, includeFallbacks);
- /* If don't find anything (eg no libfontconfig), then just return */
- for (int i = 0; i< fontArr.length; i++) {
- FcCompFont fci = fontArr[i];
- if (fci.firstFont == null) {
- if (logging) {
- logger.info("Fontconfig returned no fonts.");
- }
- fontConfigFailed = true;
- return;
- }
- }
- fontConfigFonts = fontArr;
-
- if (logging) {
- long t1 = System.nanoTime();
- logger.info("Time spent accessing fontconfig="+
- (t1-t0)/1000000+"ms.");
-
- for (int i = 0; i< fontConfigFonts.length; i++) {
- FcCompFont fci = fontConfigFonts[i];
- logger.info("FC font " + fci.fcName+" maps to family " +
- fci.firstFont.familyName +
- " in file " + fci.firstFont.fontFile);
- if (fci.allFonts != null) {
- for (int f=0;f<fci.allFonts.length;f++) {
- FontConfigFont fcf = fci.allFonts[f];
- logger.info("Family=" + fcf.familyName +
- " Style="+ fcf.styleStr +
- " Fullname="+fcf.fullName +
- " File="+fcf.fontFile);
- }
- }
- }
- }
- }
-
- private static PhysicalFont registerFromFcInfo(FcCompFont fcInfo) {
-
- /* If it's a TTC file we need to know that as we will need to
- * make sure we return the right font */
- String fontFile = fcInfo.firstFont.fontFile;
- int offset = fontFile.length()-4;
- if (offset <= 0) {
- return null;
- }
- String ext = fontFile.substring(offset).toLowerCase();
- boolean isTTC = ext.equals(".ttc");
-
- /* If this file is already registered, can just return its font.
- * However we do need to check in case it's a TTC as we need
- * a specific font, so rather than directly returning it, let
- * findFont2D resolve that.
- */
- PhysicalFont physFont = registeredFontFiles.get(fontFile);
- if (physFont != null) {
- if (isTTC) {
- Font2D f2d = findFont2D(fcInfo.firstFont.familyName,
- fcInfo.style, NO_FALLBACK);
- if (f2d instanceof PhysicalFont) { /* paranoia */
- return (PhysicalFont)f2d;
- } else {
- return null;
- }
- } else {
- return physFont;
- }
- }
-
- /* If the font may hide a JRE font (eg fontconfig says it is
- * Lucida Sans), we want to use the JRE version, so make it
- * point to the JRE font.
- */
- physFont = findJREDeferredFont(fcInfo.firstFont.familyName,
- fcInfo.style);
-
- /* It is also possible the font file is on the "deferred" list,
- * in which case we can just initialise it now.
- */
- if (physFont == null &&
- deferredFontFiles.get(fontFile) != null)
- {
- physFont = initialiseDeferredFont(fcInfo.firstFont.fontFile);
- /* use findFont2D to get the right font from TTC's */
- if (physFont != null) {
- if (isTTC) {
- Font2D f2d = findFont2D(fcInfo.firstFont.familyName,
- fcInfo.style, NO_FALLBACK);
- if (f2d instanceof PhysicalFont) { /* paranoia */
- return (PhysicalFont)f2d;
- } else {
- return null;
- }
- } else {
- return physFont;
- }
- }
- }
-
- /* In the majority of cases we reach here, and need to determine
- * the type and rank to register the font.
- */
- if (physFont == null) {
- int fontFormat = FONTFORMAT_NONE;
- int fontRank = Font2D.UNKNOWN_RANK;
-
- if (ext.equals(".ttf") || ext.equals(".otf") || isTTC) {
- fontFormat = FONTFORMAT_TRUETYPE;
- fontRank = Font2D.TTF_RANK;
- } else if (ext.equals(".pfa") || ext.equals(".pfb")) {
- fontFormat = FONTFORMAT_TYPE1;
- fontRank = Font2D.TYPE1_RANK;
- }
- physFont = registerFontFile(fcInfo.firstFont.fontFile, null,
- fontFormat, true, fontRank);
- }
- return physFont;
- }
-
- private static String[] getPlatformFontDirs() {
- String path = getFontPath(true);
- StringTokenizer parser =
- new StringTokenizer(path, File.pathSeparator);
- ArrayList<String> pathList = new ArrayList<String>();
- try {
- while (parser.hasMoreTokens()) {
- pathList.add(parser.nextToken());
- }
- } catch (NoSuchElementException e) {
- }
- return pathList.toArray(new String[0]);
- }
-
- /** returns an array of two strings. The first element is the
- * name of the font. The second element is the file name.
- */
- private static String[] defaultPlatformFont = null;
- public static String[] getDefaultPlatformFont() {
-
- if (defaultPlatformFont != null) {
- return defaultPlatformFont;
- }
-
- String[] info = new String[2];
- if (isWindows) {
- info[0] = "Arial";
- info[1] = "c:\\windows\\fonts";
- final String[] dirs = getPlatformFontDirs();
- if (dirs.length > 1) {
- String dir = (String)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- for (int i=0; i<dirs.length; i++) {
- String path =
- dirs[i] + File.separator + "arial.ttf";
- File file = new File(path);
- if (file.exists()) {
- return dirs[i];
- }
- }
- return null;
- }
- });
- if (dir != null) {
- info[1] = dir;
- }
- } else {
- info[1] = dirs[0];
- }
- info[1] = info[1] + File.separator + "arial.ttf";
- } else {
- initFontConfigFonts(false);
- for (int i=0; i<fontConfigFonts.length; i++) {
- if ("sans".equals(fontConfigFonts[i].fcFamily) &&
- 0 == fontConfigFonts[i].style) {
- info[0] = fontConfigFonts[i].firstFont.familyName;
- info[1] = fontConfigFonts[i].firstFont.fontFile;
- break;
- }
- }
- /* Absolute last ditch attempt in the face of fontconfig problems.
- * If we didn't match, pick the first, or just make something
- * up so we don't NPE.
- */
- if (info[0] == null) {
- if (fontConfigFonts.length > 0 &&
- fontConfigFonts[0].firstFont.fontFile != null) {
- info[0] = fontConfigFonts[0].firstFont.familyName;
- info[1] = fontConfigFonts[0].firstFont.fontFile;
- } else {
- info[0] = "Dialog";
- info[1] = "/dialog.ttf";
- }
- }
- }
- defaultPlatformFont = info;
- return defaultPlatformFont;
- }
-
- private FcCompFont getFcCompFont() {
- initFontConfigFonts(false);
- for (int i=0; i<fontConfigFonts.length; i++) {
- if ("sans".equals(fontConfigFonts[i].fcFamily) &&
- 0 == fontConfigFonts[i].style) {
- return fontConfigFonts[i];
- }
- }
- return null;
- }
- /*
- * We need to return a Composite font which has as the font in
- * its first slot one obtained from fontconfig.
- */
- private static CompositeFont getFontConfigFont(String name, int style) {
-
- name = name.toLowerCase();
-
- initFontConfigFonts(false);
-
- FcCompFont fcInfo = null;
- for (int i=0; i<fontConfigFonts.length; i++) {
- if (name.equals(fontConfigFonts[i].fcFamily) &&
- style == fontConfigFonts[i].style) {
- fcInfo = fontConfigFonts[i];
- break;
- }
- }
- if (fcInfo == null) {
- fcInfo = fontConfigFonts[0];
- }
-
- if (logging) {
- logger.info("FC name=" + name + " style=" + style + " uses " +
- fcInfo.firstFont.familyName +
- " in file: " + fcInfo.firstFont.fontFile);
- }
-
- if (fcInfo.compFont != null) {
- return fcInfo.compFont;
- }
-
- /* jdkFont is going to be used for slots 1..N and as a fallback.
- * Slot 0 will be the physical font from fontconfig.
- */
- CompositeFont jdkFont = (CompositeFont)
- findFont2D(fcInfo.jdkName, style, LOGICAL_FALLBACK);
-
- if (fcInfo.firstFont.familyName == null ||
- fcInfo.firstFont.fontFile == null) {
- return (fcInfo.compFont = jdkFont);
- }
-
- /* First, see if the family and exact style is already registered.
- * If it is, use it. If it's not, then try to register it.
- * If that registration fails (signalled by null) just return the
- * regular JDK composite.
- * Algorithmically styled fonts won't match on exact style, so
- * will fall through this code, but the regisration code will
- * find that file already registered and return its font.
- */
- FontFamily family = FontFamily.getFamily(fcInfo.firstFont.familyName);
- PhysicalFont physFont = null;
- if (family != null) {
- Font2D f2D = family.getFontWithExactStyleMatch(fcInfo.style);
- if (f2D instanceof PhysicalFont) {
- physFont = (PhysicalFont)f2D;
- }
- }
-
- if (physFont == null ||
- !fcInfo.firstFont.fontFile.equals(physFont.platName)) {
- physFont = registerFromFcInfo(fcInfo);
- if (physFont == null) {
- return (fcInfo.compFont = jdkFont);
- }
- family = FontFamily.getFamily(physFont.getFamilyName(null));
- }
-
- /* Now register the fonts in the family (the other styles) after
- * checking that they aren't already registered and are actually in
- * a different file. They may be the same file in CJK cases.
- * For cases where they are different font files - eg as is common for
- * Latin fonts, then we rely on fontconfig to report these correctly.
- * Assume that all styles of this font are found by fontconfig,
- * so we can find all the family members which must be registered
- * together to prevent synthetic styling.
- */
- for (int i=0; i<fontConfigFonts.length; i++) {
- FcCompFont fc = fontConfigFonts[i];
- if (fc != fcInfo &&
- physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
- !fc.firstFont.fontFile.equals(physFont.platName) &&
- family.getFontWithExactStyleMatch(fc.style) == null) {
-
- registerFromFcInfo(fontConfigFonts[i]);
- }
- }
-
- /* Now we have a physical font. We will back this up with the JDK
- * logical font (sansserif, serif, or monospaced) that corresponds
- * to the Pango/GTK/FC logical font name.
- */
- return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
- }
-
- /* This is called by Swing passing in a fontconfig family name
- * such as "sans". In return Swing gets a FontUIResource instance
- * that has queried fontconfig to resolve the font(s) used for this.
- * Fontconfig will if asked return a list of fonts to give the largest
- * possible code point coverage.
- * For now we use only the first font returned by fontconfig, and
- * back it up with the most closely matching JDK logical font.
- * Essentially this means pre-pending what we return now with fontconfig's
- * preferred physical font. This could lead to some duplication in cases,
- * if we already included that font later. We probably should remove such
- * duplicates, but it is not a significant problem. It can be addressed
- * later as part of creating a Composite which uses more of the
- * same fonts as fontconfig. At that time we also should pay more
- * attention to the special rendering instructions fontconfig returns,
- * such as whether we should prefer embedded bitmaps over antialiasing.
- * There's no way to express that via a Font at present.
- */
- public static FontUIResource getFontConfigFUIR(String fcFamily,
- int style, int size) {
-
- String mappedName = mapFcName(fcFamily);
- if (mappedName == null) {
- mappedName = "sansserif";
- }
-
- /* If GTK L&F were to be used on windows, we need to return
- * something. Since on windows Swing won't have the code to
- * call fontconfig, even if it is present, fcFamily and mapped
- * name will default to sans and therefore sansserif so this
- * should be fine.
- */
- if (isWindows) {
- return new FontUIResource(mappedName, style, size);
- }
-
- CompositeFont font2D = getFontConfigFont(fcFamily, style);
- if (font2D == null) { // Not expected, just a precaution.
- return new FontUIResource(mappedName, style, size);
- }
-
- /* The name of the font will be that of the physical font in slot,
- * but by setting the handle to that of the CompositeFont it
- * renders as that CompositeFont.
- * It also needs to be marked as a created font which is the
- * current mechanism to signal that deriveFont etc must copy
- * the handle from the original font.
- */
- FontUIResource fuir =
- new FontUIResource(font2D.getFamilyName(null), style, size);
- setFont2D(fuir, font2D.handle);
- setCreatedFont(fuir);
- return fuir;
- }
-
- /* The following fields and methods which relate to layout
- * perhaps belong in some other class but FontManager is already
- * widely used as an entry point for other JDK code that needs
- * access to the font system internals.
- */
+ public Font2DHandle getNewComposite(String family, int style,
+ Font2DHandle handle);
/**
- * Referenced by code in the JDK which wants to test for the
- * minimum char code for which layout may be required.
- * Note that even basic latin text can benefit from ligatures,
- * eg "ffi" but we presently apply those only if explicitly
- * requested with TextAttribute.LIGATURES_ON.
- * The value here indicates the lowest char code for which failing
- * to invoke layout would prevent acceptable rendering.
+ * Indicates a preference for locale-specific fonts in the mapping of
+ * logical fonts to physical fonts. Calling this method indicates that font
+ * rendering should primarily use fonts specific to the primary writing
+ * system (the one indicated by the default encoding and the initial
+ * default locale). For example, if the primary writing system is
+ * Japanese, then characters should be rendered using a Japanese font
+ * if possible, and other fonts should only be used for characters for
+ * which the Japanese font doesn't have glyphs.
+ * <p>
+ * The actual change in font rendering behavior resulting from a call
+ * to this method is implementation dependent; it may have no effect at
+ * all, or the requested behavior may already match the default behavior.
+ * The behavior may differ between font rendering in lightweight
+ * and peered components. Since calling this method requests a
+ * different font, clients should expect different metrics, and may need
+ * to recalculate window sizes and layout. Therefore this method should
+ * be called before user interface initialisation.
+ *
+ * @see #preferProportionalFonts()
+ * @since 1.5
*/
- public static final int MIN_LAYOUT_CHARCODE = 0x0300;
+ public void preferLocaleFonts();
/**
- * Referenced by code in the JDK which wants to test for the
- * maximum char code for which layout may be required.
- * Note this does not account for supplementary characters
- * where the caller interprets 'layout' to mean any case where
- * one 'char' (ie the java type char) does not map to one glyph
+ * preferLocaleFonts() and preferProportionalFonts() are called to inform
+ * that the application could be using an alternate set of composite
+ * fonts, and so the implementation should try to create a CompositeFonts
+ * with this directive in mind.
+ *
+ * @see #preferLocaleFonts()
*/
- public static final int MAX_LAYOUT_CHARCODE = 0x206F;
+ public void preferProportionalFonts();
- /* If the character code falls into any of a number of unicode ranges
- * where we know that simple left->right layout mapping chars to glyphs
- * 1:1 and accumulating advances is going to produce incorrect results,
- * we want to know this so the caller can use a more intelligent layout
- * approach. A caller who cares about optimum performance may want to
- * check the first case and skip the method call if its in that range.
- * Although there's a lot of tests in here, knowing you can skip
- * CTL saves a great deal more. The rest of the checks are ordered
- * so that rather than checking explicitly if (>= start & <= end)
- * which would mean all ranges would need to be checked so be sure
- * CTL is not needed, the method returns as soon as it recognises
- * the code point is outside of a CTL ranges.
- * NOTE: Since this method accepts an 'int' it is asssumed to properly
- * represent a CHARACTER. ie it assumes the caller has already
- * converted surrogate pairs into supplementary characters, and so
- * can handle this case and doesn't need to be told such a case is
- * 'complex'.
- */
- static boolean isComplexCharCode(int code) {
-
- if (code < MIN_LAYOUT_CHARCODE || code > MAX_LAYOUT_CHARCODE) {
- return false;
- }
- else if (code <= 0x036f) {
- // Trigger layout for combining diacriticals 0x0300->0x036f
- return true;
- }
- else if (code < 0x0590) {
- // No automatic layout for Greek, Cyrillic, Armenian.
- return false;
- }
- else if (code <= 0x06ff) {
- // Hebrew 0590 - 05ff
- // Arabic 0600 - 06ff
- return true;
- }
- else if (code < 0x0900) {
- return false; // Syriac and Thaana
- }
- else if (code <= 0x0e7f) {
- // if Indic, assume shaping for conjuncts, reordering:
- // 0900 - 097F Devanagari
- // 0980 - 09FF Bengali
- // 0A00 - 0A7F Gurmukhi
- // 0A80 - 0AFF Gujarati
- // 0B00 - 0B7F Oriya
- // 0B80 - 0BFF Tamil
- // 0C00 - 0C7F Telugu
- // 0C80 - 0CFF Kannada
- // 0D00 - 0D7F Malayalam
- // 0D80 - 0DFF Sinhala
- // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
- return true;
- }
- else if (code < 0x1780) {
- return false;
- }
- else if (code <= 0x17ff) { // 1780 - 17FF Khmer
- return true;
- }
- else if (code < 0x200c) {
- return false;
- }
- else if (code <= 0x200d) { // zwj or zwnj
- return true;
- }
- else if (code >= 0x202a && code <= 0x202e) { // directional control
- return true;
- }
- else if (code >= 0x206a && code <= 0x206f) { // directional control
- return true;
- }
- return false;
- }
-
- /* This is almost the same as the method above, except it takes a
- * char which means it may include undecoded surrogate pairs.
- * The distinction is made so that code which needs to identify all
- * cases in which we do not have a simple mapping from
- * char->unicode character->glyph can be be identified.
- * For example measurement cannot simply sum advances of 'chars',
- * the caret in editable text cannot advance one 'char' at a time, etc.
- * These callers really are asking for more than whether 'layout'
- * needs to be run, they need to know if they can assume 1->1
- * char->glyph mapping.
- */
- static boolean isNonSimpleChar(char ch) {
- return
- isComplexCharCode(ch) ||
- (ch >= CharToGlyphMapper.HI_SURROGATE_START &&
- ch <= CharToGlyphMapper.LO_SURROGATE_END);
- }
-
- /**
- * If there is anything in the text which triggers a case
- * where char->glyph does not map 1:1 in straightforward
- * left->right ordering, then this method returns true.
- * Scripts which might require it but are not treated as such
- * due to JDK implementations will not return true.
- * ie a 'true' return is an indication of the treatment by
- * the implementation.
- * Whether supplementary characters should be considered is dependent
- * on the needs of the caller. Since this method accepts the 'char' type
- * then such chars are always represented by a pair. From a rendering
- * perspective these will all (in the cases I know of) still be one
- * unicode character -> one glyph. But if a caller is using this to
- * discover any case where it cannot make naive assumptions about
- * the number of chars, and how to index through them, then it may
- * need the option to have a 'true' return in such a case.
- */
- public static boolean isComplexText(char [] chs, int start, int limit) {
-
- for (int i = start; i < limit; i++) {
- if (chs[i] < MIN_LAYOUT_CHARCODE) {
- continue;
- }
- else if (isNonSimpleChar(chs[i])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Used by windows printing to assess if a font is likely to
- * be layout compatible with JDK
- * TrueType fonts should be, but if they have no GPOS table,
- * but do have a GSUB table, then they are probably older
- * fonts GDI handles differently.
- */
- public static boolean textLayoutIsCompatible(Font font) {
-
- Font2D font2D = FontManager.getFont2D(font);
- if (font2D instanceof TrueTypeFont) {
- TrueTypeFont ttf = (TrueTypeFont)font2D;
- return
- ttf.getDirectoryEntry(TrueTypeFont.GSUBTag) == null ||
- ttf.getDirectoryEntry(TrueTypeFont.GPOSTag) != null;
- } else {
- return false;
- }
- }
-
- private static FontScaler nullScaler = null;
- private static Constructor<FontScaler> scalerConstructor = null;
-
- //Find preferred font scaler
- //
- //NB: we can allow property based preferences
- // (theoretically logic can be font type specific)
- static {
- Class scalerClass = null;
- Class arglst[] = new Class[] {Font2D.class, int.class,
- boolean.class, int.class};
-
- try {
- if (SunGraphicsEnvironment.isOpenJDK()) {
- scalerClass = Class.forName("sun.font.FreetypeFontScaler");
- } else {
- scalerClass = Class.forName("sun.font.T2KFontScaler");
- }
- } catch (ClassNotFoundException e) {
- scalerClass = NullFontScaler.class;
- }
-
- //NB: rewrite using factory? constructor is ugly way
- try {
- scalerConstructor = scalerClass.getConstructor(arglst);
- } catch (NoSuchMethodException e) {
- //should not happen
- }
- }
-
- /* At the moment it is harmless to create 2 null scalers
- so, technically, syncronized keyword is not needed.
-
- But it is safer to keep it to avoid subtle problems if we will be
- adding checks like whether scaler is null scaler. */
- public synchronized static FontScaler getNullScaler() {
- if (nullScaler == null) {
- nullScaler = new NullFontScaler();
- }
- return nullScaler;
- }
-
- /* This is the only place to instantiate new FontScaler.
- * Therefore this is very convinient place to register
- * scaler with Disposer as well as trigger deregistring bad font
- * in case when scaler reports this.
- */
-
- public static FontScaler getScaler(Font2D font,
- int indexInCollection,
- boolean supportsCJK,
- int filesize) {
- FontScaler scaler = null;
-
- try {
- Object args[] = new Object[] {font, indexInCollection,
- supportsCJK, filesize};
- scaler = scalerConstructor.newInstance(args);
- Disposer.addObjectRecord(font, scaler);
- } catch (Throwable e) {
- scaler = nullScaler;
-
- //if we can not instantiate scaler assume bad font
- //NB: technically it could be also because of internal scaler
- // error but here we are assuming scaler is ok.
- deRegisterBadFont(font);
- }
- return scaler;
- }
}
diff --git a/src/share/classes/sun/font/FontManagerFactory.java b/src/share/classes/sun/font/FontManagerFactory.java
new file mode 100644
index 0000000..44bfe68
--- /dev/null
+++ b/src/share/classes/sun/font/FontManagerFactory.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.AWTError;
+import java.awt.Font;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import sun.security.action.GetPropertyAction;
+
+
+/**
+ * Factory class used to retrieve a valid FontManager instance for the current
+ * platform.
+ *
+ * A default implementation is given for Linux, Solaris and Windows.
+ * You can alter the behaviour of the {@link #getInstance()} method by setting
+ * the {@code sun.font.fontmanager} property. For example:
+ * {@code sun.font.fontmanager=sun.awt.X11FontManager}
+ */
+public final class FontManagerFactory {
+
+ /** Our singleton instance. */
+ private static FontManager instance = null;
+
+ private static final String DEFAULT_CLASS;
+ static {
+ if (FontUtilities.isWindows)
+ DEFAULT_CLASS = "sun.awt.Win32FontManager";
+ else
+ DEFAULT_CLASS = "sun.awt.X11FontManager";
+ }
+
+ /**
+ * Get a valid FontManager implementation for the current platform.
+ *
+ * @return a valid FontManager instance for the current platform
+ */
+ public static synchronized FontManager getInstance() {
+
+ if (instance != null) {
+ return instance;
+ }
+
+ String fmClassName = AccessController.doPrivileged(
+ new GetPropertyAction("sun.font.fontmanager",
+ DEFAULT_CLASS));
+
+ try {
+ @SuppressWarnings("unchecked")
+ ClassLoader cl = (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return ClassLoader.getSystemClassLoader();
+ }
+ });
+
+ @SuppressWarnings("unchecked")
+ Class fmClass = Class.forName(fmClassName, true, cl);
+ instance = (FontManager) fmClass.newInstance();
+
+ } catch (ClassNotFoundException ex) {
+ InternalError err = new InternalError();
+ err.initCause(ex);
+ throw err;
+
+ } catch (InstantiationException ex) {
+ InternalError err = new InternalError();
+ err.initCause(ex);
+ throw err;
+
+ } catch (IllegalAccessException ex) {
+ InternalError err = new InternalError();
+ err.initCause(ex);
+ throw err;
+ }
+
+ return instance;
+ }
+}
diff --git a/src/share/classes/sun/font/FontManagerForSGE.java b/src/share/classes/sun/font/FontManagerForSGE.java
new file mode 100644
index 0000000..05d1971
--- /dev/null
+++ b/src/share/classes/sun/font/FontManagerForSGE.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.util.Locale;
+import java.util.TreeMap;
+
+/**
+ * This is an extension of the {@link FontManager} interface which has to
+ * be implemented on systems that want to use SunGraphicsEnvironment. It
+ * adds a couple of methods that are only required by SGE. Graphics
+ * implementations that use their own GraphicsEnvironment are not required
+ * to implement this and can use plain FontManager instead.
+ */
+public interface FontManagerForSGE extends FontManager {
+
+ /**
+ * Return an array of created Fonts, or null, if no fonts were created yet.
+ */
+ public Font[] getCreatedFonts();
+
+ /**
+ * Similar to getCreatedFonts, but returns a TreeMap of fonts by family name.
+ */
+ public TreeMap<String, String> getCreatedFontFamilyNames();
+
+ /**
+ * Returns all fonts installed in this environment.
+ */
+ public Font[] getAllInstalledFonts();
+
+ public String[] getInstalledFontFamilyNames(Locale requestedLocale);
+}
diff --git a/src/share/classes/sun/font/FontManagerNativeLibrary.java b/src/share/classes/sun/font/FontManagerNativeLibrary.java
index ddb8306..f1227f0 100644
--- a/src/share/classes/sun/font/FontManagerNativeLibrary.java
+++ b/src/share/classes/sun/font/FontManagerNativeLibrary.java
@@ -34,7 +34,7 @@
public Object run() {
/* REMIND do we really have to load awt here? */
System.loadLibrary("awt");
- if (SunGraphicsEnvironment.isOpenJDK() &&
+ if (FontUtilities.isOpenJDK &&
System.getProperty("os.name").startsWith("Windows")) {
/* Ideally fontmanager library should not depend on
particular implementation of the font scaler.
diff --git a/src/share/classes/sun/font/FontResolver.java b/src/share/classes/sun/font/FontResolver.java
index 9c3f892..2cad874 100644
--- a/src/share/classes/sun/font/FontResolver.java
+++ b/src/share/classes/sun/font/FontResolver.java
@@ -114,7 +114,7 @@
for (int i=0; i<getAllFonts().length; i++) {
Font font = allFonts[i];
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
if (font2D.hasSupplementaryChars()) {
fonts.add(font);
indices.add(Integer.valueOf(i));
diff --git a/src/share/classes/sun/font/FontScaler.java b/src/share/classes/sun/font/FontScaler.java
index f332280..7f8a199 100644
--- a/src/share/classes/sun/font/FontScaler.java
+++ b/src/share/classes/sun/font/FontScaler.java
@@ -29,6 +29,9 @@
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
+
+import sun.java2d.Disposer;
import sun.java2d.DisposerRecord;
/* FontScaler is "internal interface" to font rasterizer library.
@@ -77,6 +80,79 @@
* this (and this is probably more important for Type1 fonts).
*/
public abstract class FontScaler implements DisposerRecord {
+
+ private static FontScaler nullScaler = null;
+ private static Constructor<FontScaler> scalerConstructor = null;
+
+ //Find preferred font scaler
+ //
+ //NB: we can allow property based preferences
+ // (theoretically logic can be font type specific)
+ static {
+ Class scalerClass = null;
+ Class arglst[] = new Class[] {Font2D.class, int.class,
+ boolean.class, int.class};
+
+ try {
+ if (FontUtilities.isOpenJDK) {
+ scalerClass = Class.forName("sun.font.FreetypeFontScaler");
+ } else {
+ scalerClass = Class.forName("sun.font.T2KFontScaler");
+ }
+ } catch (ClassNotFoundException e) {
+ scalerClass = NullFontScaler.class;
+ }
+
+ //NB: rewrite using factory? constructor is ugly way
+ try {
+ scalerConstructor = scalerClass.getConstructor(arglst);
+ } catch (NoSuchMethodException e) {
+ //should not happen
+ }
+ }
+
+ /* This is the only place to instantiate new FontScaler.
+ * Therefore this is very convinient place to register
+ * scaler with Disposer as well as trigger deregistring bad font
+ * in case when scaler reports this.
+ */
+ public static FontScaler getScaler(Font2D font,
+ int indexInCollection,
+ boolean supportsCJK,
+ int filesize) {
+ FontScaler scaler = null;
+
+ try {
+ Object args[] = new Object[] {font, indexInCollection,
+ supportsCJK, filesize};
+ scaler = scalerConstructor.newInstance(args);
+ Disposer.addObjectRecord(font, scaler);
+ } catch (Throwable e) {
+ scaler = nullScaler;
+
+ //if we can not instantiate scaler assume bad font
+ //NB: technically it could be also because of internal scaler
+ // error but here we are assuming scaler is ok.
+ FontManager fm = FontManagerFactory.getInstance();
+ fm.deRegisterBadFont(font);
+ }
+ return scaler;
+ }
+
+ /*
+ * At the moment it is harmless to create 2 null scalers so, technically,
+ * syncronized keyword is not needed.
+ *
+ * But it is safer to keep it to avoid subtle problems if we will be adding
+ * checks like whether scaler is null scaler.
+ */
+ public static synchronized FontScaler getNullScaler() {
+ if (nullScaler == null) {
+ nullScaler = new NullFontScaler();
+ }
+ return nullScaler;
+ }
+
protected WeakReference<Font2D> font = null;
protected long nativeScaler = 0; //used by decendants
//that have native state
diff --git a/src/share/classes/sun/font/FontUtilities.java b/src/share/classes/sun/font/FontUtilities.java
new file mode 100644
index 0000000..0c492b4
--- /dev/null
+++ b/src/share/classes/sun/font/FontUtilities.java
@@ -0,0 +1,485 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+
+import javax.swing.plaf.FontUIResource;
+
+import sun.security.action.GetPropertyAction;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * A collection of utility methods.
+ */
+public final class FontUtilities {
+
+ public static final boolean isSolaris;
+
+ public static final boolean isLinux;
+
+ public static final boolean isSolaris8;
+
+ public static final boolean isSolaris9;
+
+ public static final boolean isOpenSolaris;
+
+ public static final boolean useT2K;
+
+ public static final boolean isWindows;
+
+ public static final boolean isOpenJDK;
+
+ static final String LUCIDA_FILE_NAME = "LucidaSansRegular.ttf";
+
+ // This static initializer block figures out the OS constants.
+ static {
+
+ String osName = AccessController.doPrivileged(
+ new GetPropertyAction("os.name", "unknownOS"));
+ isSolaris = osName.startsWith("SunOS");
+
+ isLinux = osName.startsWith("Linux");
+
+ String t2kStr = AccessController.doPrivileged(
+ new GetPropertyAction("sun.java2d.font.scaler"));
+ if (t2kStr != null) {
+ useT2K = "t2k".equals(t2kStr);
+ } else {
+ useT2K = false;
+ }
+ if (isSolaris) {
+ String version = AccessController.doPrivileged(
+ new GetPropertyAction("os.version", "0.0"));
+ isSolaris8 = version.startsWith("5.8");
+ isSolaris9 = version.startsWith("5.9");
+ float ver = Float.parseFloat(version);
+ if (ver > 5.10f) {
+ File f = new File("/etc/release");
+ String line = null;
+ try {
+ FileInputStream fis = new FileInputStream(f);
+ InputStreamReader isr = new InputStreamReader(
+ fis, "ISO-8859-1");
+ BufferedReader br = new BufferedReader(isr);
+ line = br.readLine();
+ fis.close();
+ } catch (Exception ex) {
+ // Nothing to do here.
+ }
+ if (line != null && line.indexOf("OpenSolaris") >= 0) {
+ isOpenSolaris = true;
+ } else {
+ isOpenSolaris = false;
+ }
+ } else {
+ isOpenSolaris= false;
+ }
+ } else {
+ isSolaris8 = false;
+ isSolaris9 = false;
+ isOpenSolaris = false;
+ }
+ isWindows = osName.startsWith("Windows");
+ String jreLibDirName = AccessController.doPrivileged(
+ new GetPropertyAction("java.home","")) + File.separator + "lib";
+ String jreFontDirName = jreLibDirName + File.separator + "fonts";
+ File lucidaFile =
+ new File(jreFontDirName + File.separator + LUCIDA_FILE_NAME);
+ isOpenJDK = !lucidaFile.exists();
+ }
+
+ /**
+ * Referenced by code in the JDK which wants to test for the
+ * minimum char code for which layout may be required.
+ * Note that even basic latin text can benefit from ligatures,
+ * eg "ffi" but we presently apply those only if explicitly
+ * requested with TextAttribute.LIGATURES_ON.
+ * The value here indicates the lowest char code for which failing
+ * to invoke layout would prevent acceptable rendering.
+ */
+ public static final int MIN_LAYOUT_CHARCODE = 0x0300;
+
+ /**
+ * Referenced by code in the JDK which wants to test for the
+ * maximum char code for which layout may be required.
+ * Note this does not account for supplementary characters
+ * where the caller interprets 'layout' to mean any case where
+ * one 'char' (ie the java type char) does not map to one glyph
+ */
+ public static final int MAX_LAYOUT_CHARCODE = 0x206F;
+
+ private static boolean debugFonts = false;
+ private static PlatformLogger logger = null;
+ private static boolean logging;
+
+ static {
+
+ String debugLevel =
+ System.getProperty("sun.java2d.debugfonts");
+
+ if (debugLevel != null && !debugLevel.equals("false")) {
+ debugFonts = true;
+ logger = PlatformLogger.getLogger("sun.java2d");
+ if (debugLevel.equals("warning")) {
+ logger.setLevel(PlatformLogger.WARNING);
+ } else if (debugLevel.equals("severe")) {
+ logger.setLevel(PlatformLogger.SEVERE);
+ }
+ }
+
+ if (debugFonts) {
+ logger = PlatformLogger.getLogger("sun.java2d");
+ logging = logger.isEnabled();
+ }
+
+ }
+
+ /**
+ * Calls the private getFont2D() method in java.awt.Font objects.
+ *
+ * @param font the font object to call
+ *
+ * @return the Font2D object returned by Font.getFont2D()
+ */
+ public static Font2D getFont2D(Font font) {
+ return FontAccess.getFontAccess().getFont2D(font);
+ }
+
+ /**
+ * If there is anything in the text which triggers a case
+ * where char->glyph does not map 1:1 in straightforward
+ * left->right ordering, then this method returns true.
+ * Scripts which might require it but are not treated as such
+ * due to JDK implementations will not return true.
+ * ie a 'true' return is an indication of the treatment by
+ * the implementation.
+ * Whether supplementary characters should be considered is dependent
+ * on the needs of the caller. Since this method accepts the 'char' type
+ * then such chars are always represented by a pair. From a rendering
+ * perspective these will all (in the cases I know of) still be one
+ * unicode character -> one glyph. But if a caller is using this to
+ * discover any case where it cannot make naive assumptions about
+ * the number of chars, and how to index through them, then it may
+ * need the option to have a 'true' return in such a case.
+ */
+ public static boolean isComplexText(char [] chs, int start, int limit) {
+
+ for (int i = start; i < limit; i++) {
+ if (chs[i] < MIN_LAYOUT_CHARCODE) {
+ continue;
+ }
+ else if (isNonSimpleChar(chs[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /* This is almost the same as the method above, except it takes a
+ * char which means it may include undecoded surrogate pairs.
+ * The distinction is made so that code which needs to identify all
+ * cases in which we do not have a simple mapping from
+ * char->unicode character->glyph can be be identified.
+ * For example measurement cannot simply sum advances of 'chars',
+ * the caret in editable text cannot advance one 'char' at a time, etc.
+ * These callers really are asking for more than whether 'layout'
+ * needs to be run, they need to know if they can assume 1->1
+ * char->glyph mapping.
+ */
+ public static boolean isNonSimpleChar(char ch) {
+ return
+ isComplexCharCode(ch) ||
+ (ch >= CharToGlyphMapper.HI_SURROGATE_START &&
+ ch <= CharToGlyphMapper.LO_SURROGATE_END);
+ }
+
+ /* If the character code falls into any of a number of unicode ranges
+ * where we know that simple left->right layout mapping chars to glyphs
+ * 1:1 and accumulating advances is going to produce incorrect results,
+ * we want to know this so the caller can use a more intelligent layout
+ * approach. A caller who cares about optimum performance may want to
+ * check the first case and skip the method call if its in that range.
+ * Although there's a lot of tests in here, knowing you can skip
+ * CTL saves a great deal more. The rest of the checks are ordered
+ * so that rather than checking explicitly if (>= start & <= end)
+ * which would mean all ranges would need to be checked so be sure
+ * CTL is not needed, the method returns as soon as it recognises
+ * the code point is outside of a CTL ranges.
+ * NOTE: Since this method accepts an 'int' it is asssumed to properly
+ * represent a CHARACTER. ie it assumes the caller has already
+ * converted surrogate pairs into supplementary characters, and so
+ * can handle this case and doesn't need to be told such a case is
+ * 'complex'.
+ */
+ public static boolean isComplexCharCode(int code) {
+
+ if (code < MIN_LAYOUT_CHARCODE || code > MAX_LAYOUT_CHARCODE) {
+ return false;
+ }
+ else if (code <= 0x036f) {
+ // Trigger layout for combining diacriticals 0x0300->0x036f
+ return true;
+ }
+ else if (code < 0x0590) {
+ // No automatic layout for Greek, Cyrillic, Armenian.
+ return false;
+ }
+ else if (code <= 0x06ff) {
+ // Hebrew 0590 - 05ff
+ // Arabic 0600 - 06ff
+ return true;
+ }
+ else if (code < 0x0900) {
+ return false; // Syriac and Thaana
+ }
+ else if (code <= 0x0e7f) {
+ // if Indic, assume shaping for conjuncts, reordering:
+ // 0900 - 097F Devanagari
+ // 0980 - 09FF Bengali
+ // 0A00 - 0A7F Gurmukhi
+ // 0A80 - 0AFF Gujarati
+ // 0B00 - 0B7F Oriya
+ // 0B80 - 0BFF Tamil
+ // 0C00 - 0C7F Telugu
+ // 0C80 - 0CFF Kannada
+ // 0D00 - 0D7F Malayalam
+ // 0D80 - 0DFF Sinhala
+ // 0E00 - 0E7F if Thai, assume shaping for vowel, tone marks
+ return true;
+ }
+ else if (code < 0x1780) {
+ return false;
+ }
+ else if (code <= 0x17ff) { // 1780 - 17FF Khmer
+ return true;
+ }
+ else if (code < 0x200c) {
+ return false;
+ }
+ else if (code <= 0x200d) { // zwj or zwnj
+ return true;
+ }
+ else if (code >= 0x202a && code <= 0x202e) { // directional control
+ return true;
+ }
+ else if (code >= 0x206a && code <= 0x206f) { // directional control
+ return true;
+ }
+ return false;
+ }
+
+ public static PlatformLogger getLogger() {
+ return logger;
+ }
+
+ public static boolean isLogging() {
+ return logging;
+ }
+
+ public static boolean debugFonts() {
+ return debugFonts;
+ }
+
+
+ // The following methods are used by Swing.
+
+ /* Revise the implementation to in fact mean "font is a composite font.
+ * This ensures that Swing components will always benefit from the
+ * fall back fonts
+ */
+ public static boolean fontSupportsDefaultEncoding(Font font) {
+ return getFont2D(font) instanceof CompositeFont;
+ }
+
+ /**
+ * This method is provided for internal and exclusive use by Swing.
+ *
+ * It may be used in conjunction with fontSupportsDefaultEncoding(Font)
+ * In the event that a desktop properties font doesn't directly
+ * support the default encoding, (ie because the host OS supports
+ * adding support for the current locale automatically for native apps),
+ * then Swing calls this method to get a font which uses the specified
+ * font for the code points it covers, but also supports this locale
+ * just as the standard composite fonts do.
+ * Note: this will over-ride any setting where an application
+ * specifies it prefers locale specific composite fonts.
+ * The logic for this, is that this method is used only where the user or
+ * application has specified that the native L&F be used, and that
+ * we should honour that request to use the same font as native apps use.
+ *
+ * The behaviour of this method is to construct a new composite
+ * Font object that uses the specified physical font as its first
+ * component, and adds all the components of "dialog" as fall back
+ * components.
+ * The method currently assumes that only the size and style attributes
+ * are set on the specified font. It doesn't copy the font transform or
+ * other attributes because they aren't set on a font created from
+ * the desktop. This will need to be fixed if use is broadened.
+ *
+ * Operations such as Font.deriveFont will work properly on the
+ * font returned by this method for deriving a different point size.
+ * Additionally it tries to support a different style by calling
+ * getNewComposite() below. That also supports replacing slot zero
+ * with a different physical font but that is expected to be "rare".
+ * Deriving with a different style is needed because its been shown
+ * that some applications try to do this for Swing FontUIResources.
+ * Also operations such as new Font(font.getFontName(..), Font.PLAIN, 14);
+ * will NOT yield the same result, as the new underlying CompositeFont
+ * cannot be "looked up" in the font registry.
+ * This returns a FontUIResource as that is the Font sub-class needed
+ * by Swing.
+ * Suggested usage is something like :
+ * FontUIResource fuir;
+ * Font desktopFont = getDesktopFont(..);
+ * // NOTE even if fontSupportsDefaultEncoding returns true because
+ * // you get Tahoma and are running in an English locale, you may
+ * // still want to just call getCompositeFontUIResource() anyway
+ * // as only then will you get fallback fonts - eg for CJK.
+ * if (FontManager.fontSupportsDefaultEncoding(desktopFont)) {
+ * fuir = new FontUIResource(..);
+ * } else {
+ * fuir = FontManager.getCompositeFontUIResource(desktopFont);
+ * }
+ * return fuir;
+ */
+ public static FontUIResource getCompositeFontUIResource(Font font) {
+
+ FontUIResource fuir =
+ new FontUIResource(font.getName(),font.getStyle(),font.getSize());
+ Font2D font2D = FontUtilities.getFont2D(font);
+
+ if (!(font2D instanceof PhysicalFont)) {
+ /* Swing should only be calling this when a font is obtained
+ * from desktop properties, so should generally be a physical font,
+ * an exception might be for names like "MS Serif" which are
+ * automatically mapped to "Serif", so there's no need to do
+ * anything special in that case. But note that suggested usage
+ * is first to call fontSupportsDefaultEncoding(Font) and this
+ * method should not be called if that were to return true.
+ */
+ return fuir;
+ }
+
+ FontManager fm = FontManagerFactory.getInstance();
+ CompositeFont dialog2D =
+ (CompositeFont) fm.findFont2D("dialog", font.getStyle(), FontManager.NO_FALLBACK);
+ if (dialog2D == null) { /* shouldn't happen */
+ return fuir;
+ }
+ PhysicalFont physicalFont = (PhysicalFont)font2D;
+ CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
+ FontAccess.getFontAccess().setFont2D(fuir, compFont.handle);
+ /* marking this as a created font is needed as only created fonts
+ * copy their creator's handles.
+ */
+ FontAccess.getFontAccess().setCreatedFont(fuir);
+ return fuir;
+ }
+
+ /* A small "map" from GTK/fontconfig names to the equivalent JDK
+ * logical font name.
+ */
+ private static final String[][] nameMap = {
+ {"sans", "sansserif"},
+ {"sans-serif", "sansserif"},
+ {"serif", "serif"},
+ {"monospace", "monospaced"}
+ };
+
+ public static String mapFcName(String name) {
+ for (int i = 0; i < nameMap.length; i++) {
+ if (name.equals(nameMap[i][0])) {
+ return nameMap[i][1];
+ }
+ }
+ return null;
+ }
+
+
+ /* This is called by Swing passing in a fontconfig family name
+ * such as "sans". In return Swing gets a FontUIResource instance
+ * that has queried fontconfig to resolve the font(s) used for this.
+ * Fontconfig will if asked return a list of fonts to give the largest
+ * possible code point coverage.
+ * For now we use only the first font returned by fontconfig, and
+ * back it up with the most closely matching JDK logical font.
+ * Essentially this means pre-pending what we return now with fontconfig's
+ * preferred physical font. This could lead to some duplication in cases,
+ * if we already included that font later. We probably should remove such
+ * duplicates, but it is not a significant problem. It can be addressed
+ * later as part of creating a Composite which uses more of the
+ * same fonts as fontconfig. At that time we also should pay more
+ * attention to the special rendering instructions fontconfig returns,
+ * such as whether we should prefer embedded bitmaps over antialiasing.
+ * There's no way to express that via a Font at present.
+ */
+ public static FontUIResource getFontConfigFUIR(String fcFamily,
+ int style, int size) {
+
+ String mapped = mapFcName(fcFamily);
+ if (mapped == null) {
+ mapped = "sansserif";
+ }
+
+ FontUIResource fuir;
+ FontManager fm = FontManagerFactory.getInstance();
+ if (fm instanceof SunFontManager) {
+ SunFontManager sfm = (SunFontManager) fm;
+ fuir = sfm.getFontConfigFUIR(mapped, style, size);
+ } else {
+ fuir = new FontUIResource(mapped, style, size);
+ }
+ return fuir;
+ }
+
+
+ /**
+ * Used by windows printing to assess if a font is likely to
+ * be layout compatible with JDK
+ * TrueType fonts should be, but if they have no GPOS table,
+ * but do have a GSUB table, then they are probably older
+ * fonts GDI handles differently.
+ */
+ public static boolean textLayoutIsCompatible(Font font) {
+
+ Font2D font2D = getFont2D(font);
+ if (font2D instanceof TrueTypeFont) {
+ TrueTypeFont ttf = (TrueTypeFont) font2D;
+ return
+ ttf.getDirectoryEntry(TrueTypeFont.GSUBTag) == null ||
+ ttf.getDirectoryEntry(TrueTypeFont.GPOSTag) != null;
+ } else {
+ return false;
+ }
+ }
+
+}
diff --git a/src/share/classes/sun/font/FreetypeFontScaler.java b/src/share/classes/sun/font/FreetypeFontScaler.java
index 404dd18..59bc450 100644
--- a/src/share/classes/sun/font/FreetypeFontScaler.java
+++ b/src/share/classes/sun/font/FreetypeFontScaler.java
@@ -79,7 +79,7 @@
pScalerContext,
nativeScaler);
}
- return FontManager.getNullScaler().getFontMetrics(0L);
+ return FontScaler.getNullScaler().getFontMetrics(0L);
}
synchronized float getGlyphAdvance(long pScalerContext, int glyphCode)
@@ -90,7 +90,8 @@
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphAdvance(0L, glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphAdvance(0L, glyphCode);
}
synchronized void getGlyphMetrics(long pScalerContext,
@@ -104,7 +105,8 @@
metrics);
return;
}
- FontManager.getNullScaler().getGlyphMetrics(0L, glyphCode, metrics);
+ FontScaler.getNullScaler().
+ getGlyphMetrics(0L, glyphCode, metrics);
}
synchronized long getGlyphImage(long pScalerContext, int glyphCode)
@@ -115,7 +117,8 @@
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphImage(0L, glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphImage(0L, glyphCode);
}
synchronized Rectangle2D.Float getGlyphOutlineBounds(
@@ -127,7 +130,8 @@
nativeScaler,
glyphCode);
}
- return FontManager.getNullScaler().getGlyphOutlineBounds(0L,glyphCode);
+ return FontScaler.getNullScaler().
+ getGlyphOutlineBounds(0L,glyphCode);
}
synchronized GeneralPath getGlyphOutline(
@@ -140,7 +144,8 @@
glyphCode,
x, y);
}
- return FontManager.getNullScaler().getGlyphOutline(0L, glyphCode, x,y);
+ return FontScaler.getNullScaler().
+ getGlyphOutline(0L, glyphCode, x,y);
}
synchronized GeneralPath getGlyphVectorOutline(
@@ -154,8 +159,8 @@
numGlyphs,
x, y);
}
- return FontManager.getNullScaler().getGlyphVectorOutline(
- 0L, glyphs, numGlyphs, x, y);
+ return FontScaler
+ .getNullScaler().getGlyphVectorOutline(0L, glyphs, numGlyphs, x, y);
}
synchronized long getLayoutTableCache() throws FontScalerException {
@@ -173,21 +178,21 @@
if (nativeScaler != 0L) {
return getNumGlyphsNative(nativeScaler);
}
- return FontManager.getNullScaler().getNumGlyphs();
+ return FontScaler.getNullScaler().getNumGlyphs();
}
synchronized int getMissingGlyphCode() throws FontScalerException {
if (nativeScaler != 0L) {
return getMissingGlyphCodeNative(nativeScaler);
}
- return FontManager.getNullScaler().getMissingGlyphCode();
+ return FontScaler.getNullScaler().getMissingGlyphCode();
}
synchronized int getGlyphCode(char charCode) throws FontScalerException {
if (nativeScaler != 0L) {
return getGlyphCodeNative(nativeScaler, charCode);
}
- return FontManager.getNullScaler().getGlyphCode(charCode);
+ return FontScaler.getNullScaler().getGlyphCode(charCode);
}
synchronized Point2D.Float getGlyphPoint(long pScalerContext,
@@ -197,7 +202,7 @@
return getGlyphPointNative(font.get(), pScalerContext,
nativeScaler, glyphCode, ptNumber);
}
- return FontManager.getNullScaler().getGlyphPoint(
+ return FontScaler.getNullScaler().getGlyphPoint(
pScalerContext, glyphCode, ptNumber);
}
diff --git a/src/share/classes/sun/font/GlyphLayout.java b/src/share/classes/sun/font/GlyphLayout.java
index 91162cb..3fc333f 100644
--- a/src/share/classes/sun/font/GlyphLayout.java
+++ b/src/share/classes/sun/font/GlyphLayout.java
@@ -259,7 +259,7 @@
*/
int aa =
FontStrikeDesc.getAAHintIntVal(frc.getAntiAliasingHint(),
- FontManager.getFont2D(font),
+ FontUtilities.getFont2D(font),
(int)Math.abs(ptSize));
int fm = FontStrikeDesc.getFMHintIntVal
(frc.getFractionalMetricsHint());
@@ -407,7 +407,7 @@
int lang = -1; // default for now
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
_textRecord.init(text, offset, lim, min, max);
int start = offset;
diff --git a/src/share/classes/sun/font/PhysicalStrike.java b/src/share/classes/sun/font/PhysicalStrike.java
index 0befebf..05b3e17 100644
--- a/src/share/classes/sun/font/PhysicalStrike.java
+++ b/src/share/classes/sun/font/PhysicalStrike.java
@@ -36,6 +36,14 @@
public abstract class PhysicalStrike extends FontStrike {
static final long INTMASK = 0xffffffffL;
+ static boolean longAddresses;
+ static {
+ switch (StrikeCache.nativeAddressSize) {
+ case 8: longAddresses = true; break;
+ case 4: longAddresses = false; break;
+ default: throw new RuntimeException("Unexpected address size");
+ }
+ }
private PhysicalFont physicalFont;
protected CharToGlyphMapper mapper;
diff --git a/src/share/classes/sun/font/StandardGlyphVector.java b/src/share/classes/sun/font/StandardGlyphVector.java
index 3bfa86a..347a44b 100644
--- a/src/share/classes/sun/font/StandardGlyphVector.java
+++ b/src/share/classes/sun/font/StandardGlyphVector.java
@@ -197,7 +197,7 @@
// how do we know its a base glyph
// for now, it is if the natural advance of the glyph is non-zero
- Font2D f2d = FontManager.getFont2D(font);
+ Font2D f2d = FontUtilities.getFont2D(font);
FontStrike strike = f2d.getStrike(font, frc);
float[] deltas = { trackPt.x, trackPt.y };
@@ -1116,7 +1116,7 @@
}
private void initFontData() {
- font2D = FontManager.getFont2D(font);
+ font2D = FontUtilities.getFont2D(font);
float s = font.getSize2D();
if (font.isTransformed()) {
ftx = font.getTransform();
diff --git a/src/share/classes/sun/font/StrikeCache.java b/src/share/classes/sun/font/StrikeCache.java
index 56539e7..945b01f 100644
--- a/src/share/classes/sun/font/StrikeCache.java
+++ b/src/share/classes/sun/font/StrikeCache.java
@@ -237,7 +237,7 @@
* any glyphs. In this case we still want to free the scaler
* context.
*/
- if (FontManager.longAddresses) {
+ if (longAddresses()) {
freeLongMemory(new long[0], disposer.pScalerContext);
} else {
freeIntMemory(new int[0], disposer.pScalerContext);
@@ -245,6 +245,10 @@
}
}
+ private static boolean longAddresses() {
+ return nativeAddressSize == 8;
+ }
+
static void disposeStrike(final FontStrikeDisposer disposer) {
// we need to execute the strike disposal on the rendering thread
// because they may be accessed on that thread at the time of the
diff --git a/src/share/classes/sun/font/SunFontManager.java b/src/share/classes/sun/font/SunFontManager.java
new file mode 100644
index 0000000..a10c549
--- /dev/null
+++ b/src/share/classes/sun/font/SunFontManager.java
@@ -0,0 +1,3674 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.awt.Font;
+import java.awt.FontFormatException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.swing.plaf.FontUIResource;
+import sun.awt.AppContext;
+import sun.awt.FontConfiguration;
+import sun.awt.SunToolkit;
+import sun.java2d.FontSupport;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * The base implementation of the {@link FontManager} interface. It implements
+ * the platform independent, shared parts of OpenJDK's FontManager
+ * implementations. The platform specific parts are declared as abstract
+ * methods that have to be implemented by specific implementations.
+ */
+public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
+
+ private static class TTFilter implements FilenameFilter {
+ public boolean accept(File dir,String name) {
+ /* all conveniently have the same suffix length */
+ int offset = name.length()-4;
+ if (offset <= 0) { /* must be at least A.ttf */
+ return false;
+ } else {
+ return(name.startsWith(".ttf", offset) ||
+ name.startsWith(".TTF", offset) ||
+ name.startsWith(".ttc", offset) ||
+ name.startsWith(".TTC", offset));
+ }
+ }
+ }
+
+ private static class T1Filter implements FilenameFilter {
+ public boolean accept(File dir,String name) {
+ if (noType1Font) {
+ return false;
+ }
+ /* all conveniently have the same suffix length */
+ int offset = name.length()-4;
+ if (offset <= 0) { /* must be at least A.pfa */
+ return false;
+ } else {
+ return(name.startsWith(".pfa", offset) ||
+ name.startsWith(".pfb", offset) ||
+ name.startsWith(".PFA", offset) ||
+ name.startsWith(".PFB", offset));
+ }
+ }
+ }
+
+ private static class TTorT1Filter implements FilenameFilter {
+ public boolean accept(File dir, String name) {
+
+ /* all conveniently have the same suffix length */
+ int offset = name.length()-4;
+ if (offset <= 0) { /* must be at least A.ttf or A.pfa */
+ return false;
+ } else {
+ boolean isTT =
+ name.startsWith(".ttf", offset) ||
+ name.startsWith(".TTF", offset) ||
+ name.startsWith(".ttc", offset) ||
+ name.startsWith(".TTC", offset);
+ if (isTT) {
+ return true;
+ } else if (noType1Font) {
+ return false;
+ } else {
+ return(name.startsWith(".pfa", offset) ||
+ name.startsWith(".pfb", offset) ||
+ name.startsWith(".PFA", offset) ||
+ name.startsWith(".PFB", offset));
+ }
+ }
+ }
+ }
+
+ public static final int FONTFORMAT_NONE = -1;
+ public static final int FONTFORMAT_TRUETYPE = 0;
+ public static final int FONTFORMAT_TYPE1 = 1;
+ public static final int FONTFORMAT_T2K = 2;
+ public static final int FONTFORMAT_TTC = 3;
+ public static final int FONTFORMAT_COMPOSITE = 4;
+ public static final int FONTFORMAT_NATIVE = 5;
+
+ /* Pool of 20 font file channels chosen because some UTF-8 locale
+ * composite fonts can use up to 16 platform fonts (including the
+ * Lucida fall back). This should prevent channel thrashing when
+ * dealing with one of these fonts.
+ * The pool array stores the fonts, rather than directly referencing
+ * the channels, as the font needs to do the open/close work.
+ */
+ private static final int CHANNELPOOLSIZE = 20;
+ private int lastPoolIndex = 0;
+ private FileFont fontFileCache[] = new FileFont[CHANNELPOOLSIZE];
+
+ /* Need to implement a simple linked list scheme for fast
+ * traversal and lookup.
+ * Also want to "fast path" dialog so there's minimal overhead.
+ */
+ /* There are at exactly 20 composite fonts: 5 faces (but some are not
+ * usually different), in 4 styles. The array may be auto-expanded
+ * later if more are needed, eg for user-defined composites or locale
+ * variants.
+ */
+ private int maxCompFont = 0;
+ private CompositeFont [] compFonts = new CompositeFont[20];
+ private ConcurrentHashMap<String, CompositeFont>
+ compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
+ private ConcurrentHashMap<String, PhysicalFont>
+ physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
+ private ConcurrentHashMap<String, PhysicalFont>
+ registeredFonts = new ConcurrentHashMap<String, PhysicalFont>();
+
+ /* given a full name find the Font. Remind: there's duplication
+ * here in that this contains the content of compositeFonts +
+ * physicalFonts.
+ */
+ private ConcurrentHashMap<String, Font2D>
+ fullNameToFont = new ConcurrentHashMap<String, Font2D>();
+
+ /* TrueType fonts have localised names. Support searching all
+ * of these before giving up on a name.
+ */
+ private HashMap<String, TrueTypeFont> localeFullNamesToFont;
+
+ private PhysicalFont defaultPhysicalFont;
+
+ static boolean longAddresses;
+ private boolean loaded1dot0Fonts = false;
+ boolean loadedAllFonts = false;
+ boolean loadedAllFontFiles = false;
+ HashMap<String,String> jreFontMap;
+ HashSet<String> jreLucidaFontFiles;
+ String[] jreOtherFontFiles;
+ boolean noOtherJREFontFiles = false; // initial assumption.
+
+ public static final String lucidaFontName = "Lucida Sans Regular";
+ public static String jreLibDirName;
+ public static String jreFontDirName;
+ private static HashSet<String> missingFontFiles = null;
+ private String defaultFontName;
+ private String defaultFontFileName;
+ protected HashSet registeredFontFiles = new HashSet();
+
+ private ArrayList badFonts;
+ /* fontPath is the location of all fonts on the system, excluding the
+ * JRE's own font directory but including any path specified using the
+ * sun.java2d.fontpath property. Together with that property, it is
+ * initialised by the getPlatformFontPath() method
+ * This call must be followed by a call to registerFontDirs(fontPath)
+ * once any extra debugging path has been appended.
+ */
+ protected String fontPath;
+ private FontConfiguration fontConfig;
+ /* discoveredAllFonts is set to true when all fonts on the font path are
+ * discovered. This usually also implies opening, validating and
+ * registering, but an implementation may be optimized to avold this.
+ * So see also "loadedAllFontFiles"
+ */
+ private boolean discoveredAllFonts = false;
+
+ /* No need to keep consing up new instances - reuse a singleton.
+ * The trade-off is that these objects don't get GC'd.
+ */
+ private static final FilenameFilter ttFilter = new TTFilter();
+ private static final FilenameFilter t1Filter = new T1Filter();
+
+ private Font[] allFonts;
+ private String[] allFamilies; // cache for default locale only
+ private Locale lastDefaultLocale;
+
+ public static boolean noType1Font;
+
+ /* Used to indicate required return type from toArray(..); */
+ private static String[] STR_ARRAY = new String[0];
+
+ /**
+ * Deprecated, unsupported hack - actually invokes a bug!
+ * Left in for a customer, don't remove.
+ */
+ private boolean usePlatformFontMetrics = false;
+
+ /**
+ * Returns the global SunFontManager instance. This is similar to
+ * {@link FontManagerFactory#getInstance()} but it returns a
+ * SunFontManager instance instead. This is only used in internal classes
+ * where we can safely assume that a SunFontManager is to be used.
+ *
+ * @return the global SunFontManager instance
+ */
+ public static SunFontManager getInstance() {
+ FontManager fm = FontManagerFactory.getInstance();
+ return (SunFontManager) fm;
+ }
+
+ public FilenameFilter getTrueTypeFilter() {
+ return ttFilter;
+ }
+
+ public FilenameFilter getType1Filter() {
+ return t1Filter;
+ }
+
+ @Override
+ public boolean usingPerAppContextComposites() {
+ return _usingPerAppContextComposites;
+ }
+
+ private void initJREFontMap() {
+
+ /* Key is familyname+style value as an int.
+ * Value is filename containing the font.
+ * If no mapping exists, it means there is no font file for the style
+ * If the mapping exists but the file doesn't exist in the deferred
+ * list then it means its not installed.
+ * This looks like a lot of code and strings but if it saves even
+ * a single file being opened at JRE start-up there's a big payoff.
+ * Lucida Sans is probably the only important case as the others
+ * are rarely used. Consider removing the other mappings if there's
+ * no evidence they are useful in practice.
+ */
+ jreFontMap = new HashMap<String,String>();
+ jreLucidaFontFiles = new HashSet<String>();
+ if (isOpenJDK()) {
+ return;
+ }
+ /* Lucida Sans Family */
+ jreFontMap.put("lucida sans0", "LucidaSansRegular.ttf");
+ jreFontMap.put("lucida sans1", "LucidaSansDemiBold.ttf");
+ /* Lucida Sans full names (map Bold and DemiBold to same file) */
+ jreFontMap.put("lucida sans regular0", "LucidaSansRegular.ttf");
+ jreFontMap.put("lucida sans regular1", "LucidaSansDemiBold.ttf");
+ jreFontMap.put("lucida sans bold1", "LucidaSansDemiBold.ttf");
+ jreFontMap.put("lucida sans demibold1", "LucidaSansDemiBold.ttf");
+
+ /* Lucida Sans Typewriter Family */
+ jreFontMap.put("lucida sans typewriter0",
+ "LucidaTypewriterRegular.ttf");
+ jreFontMap.put("lucida sans typewriter1", "LucidaTypewriterBold.ttf");
+ /* Typewriter full names (map Bold and DemiBold to same file) */
+ jreFontMap.put("lucida sans typewriter regular0",
+ "LucidaTypewriter.ttf");
+ jreFontMap.put("lucida sans typewriter regular1",
+ "LucidaTypewriterBold.ttf");
+ jreFontMap.put("lucida sans typewriter bold1",
+ "LucidaTypewriterBold.ttf");
+ jreFontMap.put("lucida sans typewriter demibold1",
+ "LucidaTypewriterBold.ttf");
+
+ /* Lucida Bright Family */
+ jreFontMap.put("lucida bright0", "LucidaBrightRegular.ttf");
+ jreFontMap.put("lucida bright1", "LucidaBrightDemiBold.ttf");
+ jreFontMap.put("lucida bright2", "LucidaBrightItalic.ttf");
+ jreFontMap.put("lucida bright3", "LucidaBrightDemiItalic.ttf");
+ /* Lucida Bright full names (map Bold and DemiBold to same file) */
+ jreFontMap.put("lucida bright regular0", "LucidaBrightRegular.ttf");
+ jreFontMap.put("lucida bright regular1", "LucidaBrightDemiBold.ttf");
+ jreFontMap.put("lucida bright regular2", "LucidaBrightItalic.ttf");
+ jreFontMap.put("lucida bright regular3", "LucidaBrightDemiItalic.ttf");
+ jreFontMap.put("lucida bright bold1", "LucidaBrightDemiBold.ttf");
+ jreFontMap.put("lucida bright bold3", "LucidaBrightDemiItalic.ttf");
+ jreFontMap.put("lucida bright demibold1", "LucidaBrightDemiBold.ttf");
+ jreFontMap.put("lucida bright demibold3","LucidaBrightDemiItalic.ttf");
+ jreFontMap.put("lucida bright italic2", "LucidaBrightItalic.ttf");
+ jreFontMap.put("lucida bright italic3", "LucidaBrightDemiItalic.ttf");
+ jreFontMap.put("lucida bright bold italic3",
+ "LucidaBrightDemiItalic.ttf");
+ jreFontMap.put("lucida bright demibold italic3",
+ "LucidaBrightDemiItalic.ttf");
+ for (String ffile : jreFontMap.values()) {
+ jreLucidaFontFiles.add(ffile);
+ }
+ }
+
+ static {
+
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+
+ public Object run() {
+ FontManagerNativeLibrary.load();
+
+ // JNI throws an exception if a class/method/field is not found,
+ // so there's no need to do anything explicit here.
+ initIDs();
+
+ switch (StrikeCache.nativeAddressSize) {
+ case 8: longAddresses = true; break;
+ case 4: longAddresses = false; break;
+ default: throw new RuntimeException("Unexpected address size");
+ }
+
+ noType1Font =
+ "true".equals(System.getProperty("sun.java2d.noType1Font"));
+ jreLibDirName =
+ System.getProperty("java.home","") + File.separator + "lib";
+ jreFontDirName = jreLibDirName + File.separator + "fonts";
+ File lucidaFile =
+ new File(jreFontDirName + File.separator + FontUtilities.LUCIDA_FILE_NAME);
+
+ return null;
+ }
+ });
+ }
+
+ public TrueTypeFont getEUDCFont() {
+ // Overridden in Windows.
+ return null;
+ }
+
+ /* Initialise ptrs used by JNI methods */
+ private static native void initIDs();
+
+ @SuppressWarnings("unchecked")
+ protected SunFontManager() {
+
+ initJREFontMap();
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ File badFontFile =
+ new File(jreFontDirName + File.separator +
+ "badfonts.txt");
+ if (badFontFile.exists()) {
+ FileInputStream fis = null;
+ try {
+ badFonts = new ArrayList();
+ fis = new FileInputStream(badFontFile);
+ InputStreamReader isr = new InputStreamReader(fis);
+ BufferedReader br = new BufferedReader(isr);
+ while (true) {
+ String name = br.readLine();
+ if (name == null) {
+ break;
+ } else {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger().warning("read bad font: " +
+ name);
+ }
+ badFonts.add(name);
+ }
+ }
+ } catch (IOException e) {
+ try {
+ if (fis != null) {
+ fis.close();
+ }
+ } catch (IOException ioe) {
+ }
+ }
+ }
+
+ /* Here we get the fonts in jre/lib/fonts and register
+ * them so they are always available and preferred over
+ * other fonts. This needs to be registered before the
+ * composite fonts as otherwise some native font that
+ * corresponds may be found as we don't have a way to
+ * handle two fonts of the same name, so the JRE one
+ * must be the first one registered. Pass "true" to
+ * registerFonts method as on-screen these JRE fonts
+ * always go through the T2K rasteriser.
+ */
+ if (FontUtilities.isLinux) {
+ /* Linux font configuration uses these fonts */
+ registerFontDir(jreFontDirName);
+ }
+ registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
+ true, false);
+
+ /* Create the font configuration and get any font path
+ * that might be specified.
+ */
+ fontConfig = createFontConfiguration();
+ if (isOpenJDK()) {
+ String[] fontInfo = getDefaultPlatformFont();
+ defaultFontName = fontInfo[0];
+ defaultFontFileName = fontInfo[1];
+ }
+
+ String extraFontPath = fontConfig.getExtraFontPath();
+
+ /* In prior releases the debugging font path replaced
+ * all normally located font directories except for the
+ * JRE fonts dir. This directory is still always located
+ * and placed at the head of the path but as an
+ * augmentation to the previous behaviour the
+ * changes below allow you to additionally append to
+ * the font path by starting with append: or prepend by
+ * starting with a prepend: sign. Eg: to append
+ * -Dsun.java2d.fontpath=append:/usr/local/myfonts
+ * and to prepend
+ * -Dsun.java2d.fontpath=prepend:/usr/local/myfonts Disp
+ *
+ * If there is an appendedfontpath it in the font
+ * configuration it is used instead of searching the
+ * system for dirs.
+ * The behaviour of append and prepend is then similar
+ * to the normal case. ie it goes after what
+ * you prepend and * before what you append. If the
+ * sun.java2d.fontpath property is used, but it
+ * neither the append or prepend syntaxes is used then
+ * as except for the JRE dir the path is replaced and it
+ * is up to you to make sure that all the right
+ * directories are located. This is platform and
+ * locale-specific so its almost impossible to get
+ * right, so it should be used with caution.
+ */
+ boolean prependToPath = false;
+ boolean appendToPath = false;
+ String dbgFontPath =
+ System.getProperty("sun.java2d.fontpath");
+
+ if (dbgFontPath != null) {
+ if (dbgFontPath.startsWith("prepend:")) {
+ prependToPath = true;
+ dbgFontPath =
+ dbgFontPath.substring("prepend:".length());
+ } else if (dbgFontPath.startsWith("append:")) {
+ appendToPath = true;
+ dbgFontPath =
+ dbgFontPath.substring("append:".length());
+ }
+ }
+
+ if (FontUtilities.debugFonts()) {
+ PlatformLogger logger = FontUtilities.getLogger();
+ logger.info("JRE font directory: " + jreFontDirName);
+ logger.info("Extra font path: " + extraFontPath);
+ logger.info("Debug font path: " + dbgFontPath);
+ }
+
+ if (dbgFontPath != null) {
+ /* In debugging mode we register all the paths
+ * Caution: this is a very expensive call on Solaris:-
+ */
+ fontPath = getPlatformFontPath(noType1Font);
+
+ if (extraFontPath != null) {
+ fontPath =
+ extraFontPath + File.pathSeparator + fontPath;
+ }
+ if (appendToPath) {
+ fontPath =
+ fontPath + File.pathSeparator + dbgFontPath;
+ } else if (prependToPath) {
+ fontPath =
+ dbgFontPath + File.pathSeparator + fontPath;
+ } else {
+ fontPath = dbgFontPath;
+ }
+ registerFontDirs(fontPath);
+ } else if (extraFontPath != null) {
+ /* If the font configuration contains an
+ * "appendedfontpath" entry, it is interpreted as a
+ * set of locations that should always be registered.
+ * It may be additional to locations normally found
+ * for that place, or it may be locations that need
+ * to have all their paths registered to locate all
+ * the needed platform names.
+ * This is typically when the same .TTF file is
+ * referenced from multiple font.dir files and all
+ * of these must be read to find all the native
+ * (XLFD) names for the font, so that X11 font APIs
+ * can be used for as many code points as possible.
+ */
+ registerFontDirs(extraFontPath);
+ }
+
+ /* On Solaris, we need to register the Japanese TrueType
+ * directory so that we can find the corresponding
+ * bitmap fonts. This could be done by listing the
+ * directory in the font configuration file, but we
+ * don't want to confuse users with this quirk. There
+ * are no bitmap fonts for other writing systems that
+ * correspond to TrueType fonts and have matching XLFDs.
+ * We need to register the bitmap fonts only in
+ * environments where they're on the X font path, i.e.,
+ * in the Japanese locale. Note that if the X Toolkit
+ * is in use the font path isn't set up by JDK, but
+ * users of a JA locale should have it
+ * set up already by their login environment.
+ */
+ if (FontUtilities.isSolaris && Locale.JAPAN.equals(Locale.getDefault())) {
+ registerFontDir("/usr/openwin/lib/locale/ja/X11/fonts/TT");
+ }
+
+ initCompositeFonts(fontConfig, null);
+
+ return null;
+ }
+ });
+
+ boolean platformFont = AccessController.doPrivileged(
+ new PrivilegedAction<Boolean>() {
+ public Boolean run() {
+ String prop =
+ System.getProperty("java2d.font.usePlatformFont");
+ String env = System.getenv("JAVA2D_USEPLATFORMFONT");
+ return "true".equals(prop) || env != null;
+ }
+ });
+
+ if (platformFont) {
+ usePlatformFontMetrics = true;
+ System.out.println("Enabling platform font metrics for win32. This is an unsupported option.");
+ System.out.println("This yields incorrect composite font metrics as reported by 1.1.x releases.");
+ System.out.println("It is appropriate only for use by applications which do not use any Java 2");
+ System.out.println("functionality. This property will be removed in a later release.");
+ }
+ }
+
+ /**
+ * This method is provided for internal and exclusive use by Swing.
+ *
+ * @param font representing a physical font.
+ * @return true if the underlying font is a TrueType or OpenType font
+ * that claims to support the Microsoft Windows encoding corresponding to
+ * the default file.encoding property of this JRE instance.
+ * This narrow value is useful for Swing to decide if the font is useful
+ * for the the Windows Look and Feel, or, if a composite font should be
+ * used instead.
+ * The information used to make the decision is obtained from
+ * the ulCodePageRange fields in the font.
+ * A caller can use isLogicalFont(Font) in this class before calling
+ * this method and would not need to call this method if that
+ * returns true.
+ */
+// static boolean fontSupportsDefaultEncoding(Font font) {
+// String encoding =
+// (String) java.security.AccessController.doPrivileged(
+// new sun.security.action.GetPropertyAction("file.encoding"));
+
+// if (encoding == null || font == null) {
+// return false;
+// }
+
+// encoding = encoding.toLowerCase(Locale.ENGLISH);
+
+// return FontManager.fontSupportsEncoding(font, encoding);
+// }
+
+ public Font2DHandle getNewComposite(String family, int style,
+ Font2DHandle handle) {
+
+ if (!(handle.font2D instanceof CompositeFont)) {
+ return handle;
+ }
+
+ CompositeFont oldComp = (CompositeFont)handle.font2D;
+ PhysicalFont oldFont = oldComp.getSlotFont(0);
+
+ if (family == null) {
+ family = oldFont.getFamilyName(null);
+ }
+ if (style == -1) {
+ style = oldComp.getStyle();
+ }
+
+ Font2D newFont = findFont2D(family, style, NO_FALLBACK);
+ if (!(newFont instanceof PhysicalFont)) {
+ newFont = oldFont;
+ }
+ PhysicalFont physicalFont = (PhysicalFont)newFont;
+ CompositeFont dialog2D =
+ (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
+ if (dialog2D == null) { /* shouldn't happen */
+ return handle;
+ }
+ CompositeFont compFont = new CompositeFont(physicalFont, dialog2D);
+ Font2DHandle newHandle = new Font2DHandle(compFont);
+ return newHandle;
+ }
+
+ protected void registerCompositeFont(String compositeName,
+ String[] componentFileNames,
+ String[] componentNames,
+ int numMetricsSlots,
+ int[] exclusionRanges,
+ int[] exclusionMaxIndex,
+ boolean defer) {
+
+ CompositeFont cf = new CompositeFont(compositeName,
+ componentFileNames,
+ componentNames,
+ numMetricsSlots,
+ exclusionRanges,
+ exclusionMaxIndex, defer, this);
+ addCompositeToFontList(cf, Font2D.FONT_CONFIG_RANK);
+ synchronized (compFonts) {
+ compFonts[maxCompFont++] = cf;
+ }
+ }
+
+ /* This variant is used only when the application specifies
+ * a variant of composite fonts which prefers locale specific or
+ * proportional fonts.
+ */
+ protected static void registerCompositeFont(String compositeName,
+ String[] componentFileNames,
+ String[] componentNames,
+ int numMetricsSlots,
+ int[] exclusionRanges,
+ int[] exclusionMaxIndex,
+ boolean defer,
+ ConcurrentHashMap<String, Font2D>
+ altNameCache) {
+
+ CompositeFont cf = new CompositeFont(compositeName,
+ componentFileNames,
+ componentNames,
+ numMetricsSlots,
+ exclusionRanges,
+ exclusionMaxIndex, defer,
+ SunFontManager.getInstance());
+
+ /* if the cache has an existing composite for this case, make
+ * its handle point to this new font.
+ * This ensures that when the altNameCache that is passed in
+ * is the global mapNameCache - ie we are running as an application -
+ * that any statically created java.awt.Font instances which already
+ * have a Font2D instance will have that re-directed to the new Font
+ * on subsequent uses. This is particularly important for "the"
+ * default font instance, or similar cases where a UI toolkit (eg
+ * Swing) has cached a java.awt.Font. Note that if Swing is using
+ * a custom composite APIs which update the standard composites have
+ * no effect - this is typically the case only when using the Windows
+ * L&F where these APIs would conflict with that L&F anyway.
+ */
+ Font2D oldFont = (Font2D)
+ altNameCache.get(compositeName.toLowerCase(Locale.ENGLISH));
+ if (oldFont instanceof CompositeFont) {
+ oldFont.handle.font2D = cf;
+ }
+ altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
+ }
+
+ private void addCompositeToFontList(CompositeFont f, int rank) {
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info("Add to Family "+ f.familyName +
+ ", Font " + f.fullName + " rank="+rank);
+ }
+ f.setRank(rank);
+ compositeFonts.put(f.fullName, f);
+ fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
+
+ FontFamily family = FontFamily.getFamily(f.familyName);
+ if (family == null) {
+ family = new FontFamily(f.familyName, true, rank);
+ }
+ family.setFont(f, f.style);
+ }
+
+ /*
+ * Systems may have fonts with the same name.
+ * We want to register only one of such fonts (at least until
+ * such time as there might be APIs which can accommodate > 1).
+ * Rank is 1) font configuration fonts, 2) JRE fonts, 3) OT/TT fonts,
+ * 4) Type1 fonts, 5) native fonts.
+ *
+ * If the new font has the same name as the old font, the higher
+ * ranked font gets added, replacing the lower ranked one.
+ * If the fonts are of equal rank, then make a special case of
+ * font configuration rank fonts, which are on closer inspection,
+ * OT/TT fonts such that the larger font is registered. This is
+ * a heuristic since a font may be "larger" in the sense of more
+ * code points, or be a larger "file" because it has more bitmaps.
+ * So it is possible that using filesize may lead to less glyphs, and
+ * using glyphs may lead to lower quality display. Probably number
+ * of glyphs is the ideal, but filesize is information we already
+ * have and is good enough for the known cases.
+ * Also don't want to register fonts that match JRE font families
+ * but are coming from a source other than the JRE.
+ * This will ensure that we will algorithmically style the JRE
+ * plain font and get the same set of glyphs for all styles.
+ *
+ * Note that this method returns a value
+ * if it returns the same object as its argument that means this
+ * font was newly registered.
+ * If it returns a different object it means this font already exists,
+ * and you should use that one.
+ * If it returns null means this font was not registered and none
+ * in that name is registered. The caller must find a substitute
+ */
+ private PhysicalFont addToFontList(PhysicalFont f, int rank) {
+
+ String fontName = f.fullName;
+ String familyName = f.familyName;
+ if (fontName == null || "".equals(fontName)) {
+ return null;
+ }
+ if (compositeFonts.containsKey(fontName)) {
+ /* Don't register any font that has the same name as a composite */
+ return null;
+ }
+ f.setRank(rank);
+ if (!physicalFonts.containsKey(fontName)) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info("Add to Family "+familyName +
+ ", Font " + fontName + " rank="+rank);
+ }
+ physicalFonts.put(fontName, f);
+ FontFamily family = FontFamily.getFamily(familyName);
+ if (family == null) {
+ family = new FontFamily(familyName, false, rank);
+ family.setFont(f, f.style);
+ } else if (family.getRank() >= rank) {
+ family.setFont(f, f.style);
+ }
+ fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH), f);
+ return f;
+ } else {
+ PhysicalFont newFont = f;
+ PhysicalFont oldFont = physicalFonts.get(fontName);
+ if (oldFont == null) {
+ return null;
+ }
+ /* If the new font is of an equal or higher rank, it is a
+ * candidate to replace the current one, subject to further tests.
+ */
+ if (oldFont.getRank() >= rank) {
+
+ /* All fonts initialise their mapper when first
+ * used. If the mapper is non-null then this font
+ * has been accessed at least once. In that case
+ * do not replace it. This may be overly stringent,
+ * but its probably better not to replace a font that
+ * someone is already using without a compelling reason.
+ * Additionally the primary case where it is known
+ * this behaviour is important is in certain composite
+ * fonts, and since all the components of a given
+ * composite are usually initialised together this
+ * is unlikely. For this to be a problem, there would
+ * have to be a case where two different composites used
+ * different versions of the same-named font, and they
+ * were initialised and used at separate times.
+ * In that case we continue on and allow the new font to
+ * be installed, but replaceFont will continue to allow
+ * the original font to be used in Composite fonts.
+ */
+ if (oldFont.mapper != null && rank > Font2D.FONT_CONFIG_RANK) {
+ return oldFont;
+ }
+
+ /* Normally we require a higher rank to replace a font,
+ * but as a special case, if the two fonts are the same rank,
+ * and are instances of TrueTypeFont we want the
+ * more complete (larger) one.
+ */
+ if (oldFont.getRank() == rank) {
+ if (oldFont instanceof TrueTypeFont &&
+ newFont instanceof TrueTypeFont) {
+ TrueTypeFont oldTTFont = (TrueTypeFont)oldFont;
+ TrueTypeFont newTTFont = (TrueTypeFont)newFont;
+ if (oldTTFont.fileSize >= newTTFont.fileSize) {
+ return oldFont;
+ }
+ } else {
+ return oldFont;
+ }
+ }
+ /* Don't replace ever JRE fonts.
+ * This test is in case a font configuration references
+ * a Lucida font, which has been mapped to a Lucida
+ * from the host O/S. The assumption here is that any
+ * such font configuration file is probably incorrect, or
+ * the host O/S version is for the use of AWT.
+ * In other words if we reach here, there's a possible
+ * problem with our choice of font configuration fonts.
+ */
+ if (oldFont.platName.startsWith(jreFontDirName)) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .warning("Unexpected attempt to replace a JRE " +
+ " font " + fontName + " from " +
+ oldFont.platName +
+ " with " + newFont.platName);
+ }
+ return oldFont;
+ }
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Replace in Family " + familyName +
+ ",Font " + fontName + " new rank="+rank +
+ " from " + oldFont.platName +
+ " with " + newFont.platName);
+ }
+ replaceFont(oldFont, newFont);
+ physicalFonts.put(fontName, newFont);
+ fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
+ newFont);
+
+ FontFamily family = FontFamily.getFamily(familyName);
+ if (family == null) {
+ family = new FontFamily(familyName, false, rank);
+ family.setFont(newFont, newFont.style);
+ } else if (family.getRank() >= rank) {
+ family.setFont(newFont, newFont.style);
+ }
+ return newFont;
+ } else {
+ return oldFont;
+ }
+ }
+ }
+
+ public Font2D[] getRegisteredFonts() {
+ PhysicalFont[] physFonts = getPhysicalFonts();
+ int mcf = maxCompFont; /* for MT-safety */
+ Font2D[] regFonts = new Font2D[physFonts.length+mcf];
+ System.arraycopy(compFonts, 0, regFonts, 0, mcf);
+ System.arraycopy(physFonts, 0, regFonts, mcf, physFonts.length);
+ return regFonts;
+ }
+
+ protected PhysicalFont[] getPhysicalFonts() {
+ return physicalFonts.values().toArray(new PhysicalFont[0]);
+ }
+
+
+ /* The class FontRegistrationInfo is used when a client says not
+ * to register a font immediately. This mechanism is used to defer
+ * initialisation of all the components of composite fonts at JRE
+ * start-up. The CompositeFont class is "aware" of this and when it
+ * is first used it asks for the registration of its components.
+ * Also in the event that any physical font is requested the
+ * deferred fonts are initialised before triggering a search of the
+ * system.
+ * Two maps are used. One to track the deferred fonts. The
+ * other to track the fonts that have been initialised through this
+ * mechanism.
+ */
+
+ private static final class FontRegistrationInfo {
+
+ String fontFilePath;
+ String[] nativeNames;
+ int fontFormat;
+ boolean javaRasterizer;
+ int fontRank;
+
+ FontRegistrationInfo(String fontPath, String[] names, int format,
+ boolean useJavaRasterizer, int rank) {
+ this.fontFilePath = fontPath;
+ this.nativeNames = names;
+ this.fontFormat = format;
+ this.javaRasterizer = useJavaRasterizer;
+ this.fontRank = rank;
+ }
+ }
+
+ private final ConcurrentHashMap<String, FontRegistrationInfo>
+ deferredFontFiles =
+ new ConcurrentHashMap<String, FontRegistrationInfo>();
+ private final ConcurrentHashMap<String, Font2DHandle>
+ initialisedFonts = new ConcurrentHashMap<String, Font2DHandle>();
+
+ /* Remind: possibly enhance initialiseDeferredFonts() to be
+ * optionally given a name and a style and it could stop when it
+ * finds that font - but this would be a problem if two of the
+ * fonts reference the same font face name (cf the Solaris
+ * euro fonts).
+ */
+ protected synchronized void initialiseDeferredFonts() {
+ for (String fileName : deferredFontFiles.keySet()) {
+ initialiseDeferredFont(fileName);
+ }
+ }
+
+ protected synchronized void registerDeferredJREFonts(String jreDir) {
+ for (FontRegistrationInfo info : deferredFontFiles.values()) {
+ if (info.fontFilePath != null &&
+ info.fontFilePath.startsWith(jreDir)) {
+ initialiseDeferredFont(info.fontFilePath);
+ }
+ }
+ }
+
+ public boolean isDeferredFont(String fileName) {
+ return deferredFontFiles.containsKey(fileName);
+ }
+
+ /* We keep a map of the files which contain the Lucida fonts so we
+ * don't need to search for them.
+ * But since we know what fonts these files contain, we can also avoid
+ * opening them to look for a font name we don't recognise - see
+ * findDeferredFont().
+ * For typical cases where the font isn't a JRE one the overhead is
+ * this method call, HashMap.get() and null reference test, then
+ * a boolean test of noOtherJREFontFiles.
+ */
+ public
+ /*private*/ PhysicalFont findJREDeferredFont(String name, int style) {
+
+ PhysicalFont physicalFont;
+ String nameAndStyle = name.toLowerCase(Locale.ENGLISH) + style;
+ String fileName = jreFontMap.get(nameAndStyle);
+ if (fileName != null) {
+ fileName = jreFontDirName + File.separator + fileName;
+ if (deferredFontFiles.get(fileName) != null) {
+ physicalFont = initialiseDeferredFont(fileName);
+ if (physicalFont != null &&
+ (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+ physicalFont.getFamilyName(null).equalsIgnoreCase(name))
+ && physicalFont.style == style) {
+ return physicalFont;
+ }
+ }
+ }
+
+ /* Iterate over the deferred font files looking for any in the
+ * jre directory that we didn't recognise, open each of these.
+ * In almost all installations this will quickly fall through
+ * because only the Lucidas will be present and jreOtherFontFiles
+ * will be empty.
+ * noOtherJREFontFiles is used so we can skip this block as soon
+ * as its determined that its not needed - almost always after the
+ * very first time through.
+ */
+ if (noOtherJREFontFiles) {
+ return null;
+ }
+ synchronized (jreLucidaFontFiles) {
+ if (jreOtherFontFiles == null) {
+ HashSet<String> otherFontFiles = new HashSet<String>();
+ for (String deferredFile : deferredFontFiles.keySet()) {
+ File file = new File(deferredFile);
+ String dir = file.getParent();
+ String fname = file.getName();
+ /* skip names which aren't absolute, aren't in the JRE
+ * directory, or are known Lucida fonts.
+ */
+ if (dir == null ||
+ !dir.equals(jreFontDirName) ||
+ jreLucidaFontFiles.contains(fname)) {
+ continue;
+ }
+ otherFontFiles.add(deferredFile);
+ }
+ jreOtherFontFiles = otherFontFiles.toArray(STR_ARRAY);
+ if (jreOtherFontFiles.length == 0) {
+ noOtherJREFontFiles = true;
+ }
+ }
+
+ for (int i=0; i<jreOtherFontFiles.length;i++) {
+ fileName = jreOtherFontFiles[i];
+ if (fileName == null) {
+ continue;
+ }
+ jreOtherFontFiles[i] = null;
+ physicalFont = initialiseDeferredFont(fileName);
+ if (physicalFont != null &&
+ (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+ physicalFont.getFamilyName(null).equalsIgnoreCase(name))
+ && physicalFont.style == style) {
+ return physicalFont;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /* This skips JRE installed fonts. */
+ private PhysicalFont findOtherDeferredFont(String name, int style) {
+ for (String fileName : deferredFontFiles.keySet()) {
+ File file = new File(fileName);
+ String dir = file.getParent();
+ String fname = file.getName();
+ if (dir != null &&
+ dir.equals(jreFontDirName) &&
+ jreLucidaFontFiles.contains(fname)) {
+ continue;
+ }
+ PhysicalFont physicalFont = initialiseDeferredFont(fileName);
+ if (physicalFont != null &&
+ (physicalFont.getFontName(null).equalsIgnoreCase(name) ||
+ physicalFont.getFamilyName(null).equalsIgnoreCase(name)) &&
+ physicalFont.style == style) {
+ return physicalFont;
+ }
+ }
+ return null;
+ }
+
+ private PhysicalFont findDeferredFont(String name, int style) {
+
+ PhysicalFont physicalFont = findJREDeferredFont(name, style);
+ if (physicalFont != null) {
+ return physicalFont;
+ } else {
+ return findOtherDeferredFont(name, style);
+ }
+ }
+
+ public void registerDeferredFont(String fileNameKey,
+ String fullPathName,
+ String[] nativeNames,
+ int fontFormat,
+ boolean useJavaRasterizer,
+ int fontRank) {
+ FontRegistrationInfo regInfo =
+ new FontRegistrationInfo(fullPathName, nativeNames, fontFormat,
+ useJavaRasterizer, fontRank);
+ deferredFontFiles.put(fileNameKey, regInfo);
+ }
+
+
+ public synchronized
+ PhysicalFont initialiseDeferredFont(String fileNameKey) {
+
+ if (fileNameKey == null) {
+ return null;
+ }
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Opening deferred font file " + fileNameKey);
+ }
+
+ PhysicalFont physicalFont;
+ FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
+ if (regInfo != null) {
+ deferredFontFiles.remove(fileNameKey);
+ physicalFont = registerFontFile(regInfo.fontFilePath,
+ regInfo.nativeNames,
+ regInfo.fontFormat,
+ regInfo.javaRasterizer,
+ regInfo.fontRank);
+
+
+ if (physicalFont != null) {
+ /* Store the handle, so that if a font is bad, we
+ * retrieve the substituted font.
+ */
+ initialisedFonts.put(fileNameKey, physicalFont.handle);
+ } else {
+ initialisedFonts.put(fileNameKey,
+ getDefaultPhysicalFont().handle);
+ }
+ } else {
+ Font2DHandle handle = initialisedFonts.get(fileNameKey);
+ if (handle == null) {
+ /* Probably shouldn't happen, but just in case */
+ physicalFont = getDefaultPhysicalFont();
+ } else {
+ physicalFont = (PhysicalFont)(handle.font2D);
+ }
+ }
+ return physicalFont;
+ }
+
+ public boolean isRegisteredFontFile(String name) {
+ return registeredFonts.containsKey(name);
+ }
+
+ public PhysicalFont getRegisteredFontFile(String name) {
+ return registeredFonts.get(name);
+ }
+
+ /* Note that the return value from this method is not always
+ * derived from this file, and may be null. See addToFontList for
+ * some explanation of this.
+ */
+ public PhysicalFont registerFontFile(String fileName,
+ String[] nativeNames,
+ int fontFormat,
+ boolean useJavaRasterizer,
+ int fontRank) {
+
+ PhysicalFont regFont = registeredFonts.get(fileName);
+ if (regFont != null) {
+ return regFont;
+ }
+
+ PhysicalFont physicalFont = null;
+ try {
+ String name;
+
+ switch (fontFormat) {
+
+ case FONTFORMAT_TRUETYPE:
+ int fn = 0;
+ TrueTypeFont ttf;
+ do {
+ ttf = new TrueTypeFont(fileName, nativeNames, fn++,
+ useJavaRasterizer);
+ PhysicalFont pf = addToFontList(ttf, fontRank);
+ if (physicalFont == null) {
+ physicalFont = pf;
+ }
+ }
+ while (fn < ttf.getFontCount());
+ break;
+
+ case FONTFORMAT_TYPE1:
+ Type1Font t1f = new Type1Font(fileName, nativeNames);
+ physicalFont = addToFontList(t1f, fontRank);
+ break;
+
+ case FONTFORMAT_NATIVE:
+ NativeFont nf = new NativeFont(fileName, false);
+ physicalFont = addToFontList(nf, fontRank);
+ default:
+
+ }
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Registered file " + fileName + " as font " +
+ physicalFont + " rank=" + fontRank);
+ }
+ } catch (FontFormatException ffe) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().warning("Unusable font: " +
+ fileName + " " + ffe.toString());
+ }
+ }
+ if (physicalFont != null &&
+ fontFormat != FONTFORMAT_NATIVE) {
+ registeredFonts.put(fileName, physicalFont);
+ }
+ return physicalFont;
+ }
+
+ public void registerFonts(String[] fileNames,
+ String[][] nativeNames,
+ int fontCount,
+ int fontFormat,
+ boolean useJavaRasterizer,
+ int fontRank, boolean defer) {
+
+ for (int i=0; i < fontCount; i++) {
+ if (defer) {
+ registerDeferredFont(fileNames[i],fileNames[i], nativeNames[i],
+ fontFormat, useJavaRasterizer, fontRank);
+ } else {
+ registerFontFile(fileNames[i], nativeNames[i],
+ fontFormat, useJavaRasterizer, fontRank);
+ }
+ }
+ }
+
+ /*
+ * This is the Physical font used when some other font on the system
+ * can't be located. There has to be at least one font or the font
+ * system is not useful and the graphics environment cannot sustain
+ * the Java platform.
+ */
+ public PhysicalFont getDefaultPhysicalFont() {
+ if (defaultPhysicalFont == null) {
+ /* findFont2D will load all fonts before giving up the search.
+ * If the JRE Lucida isn't found (eg because the JRE fonts
+ * directory is missing), it could find another version of Lucida
+ * from the host system. This is OK because at that point we are
+ * trying to gracefully handle/recover from a system
+ * misconfiguration and this is probably a reasonable substitution.
+ */
+ defaultPhysicalFont = (PhysicalFont)
+ findFont2D("Lucida Sans Regular", Font.PLAIN, NO_FALLBACK);
+ if (defaultPhysicalFont == null) {
+ defaultPhysicalFont = (PhysicalFont)
+ findFont2D("Arial", Font.PLAIN, NO_FALLBACK);
+ }
+ if (defaultPhysicalFont == null) {
+ /* Because of the findFont2D call above, if we reach here, we
+ * know all fonts have already been loaded, just accept any
+ * match at this point. If this fails we are in real trouble
+ * and I don't know how to recover from there being absolutely
+ * no fonts anywhere on the system.
+ */
+ Iterator i = physicalFonts.values().iterator();
+ if (i.hasNext()) {
+ defaultPhysicalFont = (PhysicalFont)i.next();
+ } else {
+ throw new Error("Probable fatal error:No fonts found.");
+ }
+ }
+ }
+ return defaultPhysicalFont;
+ }
+
+ public CompositeFont getDefaultLogicalFont(int style) {
+ return (CompositeFont)findFont2D("dialog", style, NO_FALLBACK);
+ }
+
+ /*
+ * return String representation of style prepended with "."
+ * This is useful for performance to avoid unnecessary string operations.
+ */
+ private static String dotStyleStr(int num) {
+ switch(num){
+ case Font.BOLD:
+ return ".bold";
+ case Font.ITALIC:
+ return ".italic";
+ case Font.ITALIC | Font.BOLD:
+ return ".bolditalic";
+ default:
+ return ".plain";
+ }
+ }
+
+ /* This is implemented only on windows and is called from code that
+ * executes only on windows. This isn't pretty but its not a precedent
+ * in this file. This very probably should be cleaned up at some point.
+ */
+ protected void
+ populateFontFileNameMap(HashMap<String,String> fontToFileMap,
+ HashMap<String,String> fontToFamilyNameMap,
+ HashMap<String,ArrayList<String>>
+ familyToFontListMap,
+ Locale locale) {
+ }
+
+ /* Obtained from Platform APIs (windows only)
+ * Map from lower-case font full name to basename of font file.
+ * Eg "arial bold" -> ARIALBD.TTF.
+ * For TTC files, there is a mapping for each font in the file.
+ */
+ private HashMap<String,String> fontToFileMap = null;
+
+ /* Obtained from Platform APIs (windows only)
+ * Map from lower-case font full name to the name of its font family
+ * Eg "arial bold" -> "Arial"
+ */
+ private HashMap<String,String> fontToFamilyNameMap = null;
+
+ /* Obtained from Platform APIs (windows only)
+ * Map from a lower-case family name to a list of full names of
+ * the member fonts, eg:
+ * "arial" -> ["Arial", "Arial Bold", "Arial Italic","Arial Bold Italic"]
+ */
+ private HashMap<String,ArrayList<String>> familyToFontListMap= null;
+
+ /* The directories which contain platform fonts */
+ private String[] pathDirs = null;
+
+ private boolean haveCheckedUnreferencedFontFiles;
+
+ private String[] getFontFilesFromPath(boolean noType1) {
+ final FilenameFilter filter;
+ if (noType1) {
+ filter = ttFilter;
+ } else {
+ filter = new TTorT1Filter();
+ }
+ return (String[])AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ if (pathDirs.length == 1) {
+ File dir = new File(pathDirs[0]);
+ String[] files = dir.list(filter);
+ if (files == null) {
+ return new String[0];
+ }
+ for (int f=0; f<files.length; f++) {
+ files[f] = files[f].toLowerCase();
+ }
+ return files;
+ } else {
+ ArrayList<String> fileList = new ArrayList<String>();
+ for (int i = 0; i< pathDirs.length; i++) {
+ File dir = new File(pathDirs[i]);
+ String[] files = dir.list(filter);
+ if (files == null) {
+ continue;
+ }
+ for (int f=0; f<files.length ; f++) {
+ fileList.add(files[f].toLowerCase());
+ }
+ }
+ return fileList.toArray(STR_ARRAY);
+ }
+ }
+ });
+ }
+
+ /* This is needed since some windows registry names don't match
+ * the font names.
+ * - UPC styled font names have a double space, but the
+ * registry entry mapping to a file doesn't.
+ * - Marlett is in a hidden file not listed in the registry
+ * - The registry advertises that the file david.ttf contains a
+ * font with the full name "David Regular" when in fact its
+ * just "David".
+ * Directly fix up these known cases as this is faster.
+ * If a font which doesn't match these known cases has no file,
+ * it may be a font that has been temporarily added to the known set
+ * or it may be an installed font with a missing registry entry.
+ * Installed fonts are those in the windows font directories.
+ * Make a best effort attempt to locate these.
+ * We obtain the list of TrueType fonts in these directories and
+ * filter out all the font files we already know about from the registry.
+ * What remains may be "bad" fonts, duplicate fonts, or perhaps the
+ * missing font(s) we are looking for.
+ * Open each of these files to find out.
+ */
+ private void resolveWindowsFonts() {
+
+ ArrayList<String> unmappedFontNames = null;
+ for (String font : fontToFamilyNameMap.keySet()) {
+ String file = fontToFileMap.get(font);
+ if (file == null) {
+ if (font.indexOf(" ") > 0) {
+ String newName = font.replaceFirst(" ", " ");
+ file = fontToFileMap.get(newName);
+ /* If this name exists and isn't for a valid name
+ * replace the mapping to the file with this font
+ */
+ if (file != null &&
+ !fontToFamilyNameMap.containsKey(newName)) {
+ fontToFileMap.remove(newName);
+ fontToFileMap.put(font, file);
+ }
+ } else if (font.equals("marlett")) {
+ fontToFileMap.put(font, "marlett.ttf");
+ } else if (font.equals("david")) {
+ file = fontToFileMap.get("david regular");
+ if (file != null) {
+ fontToFileMap.remove("david regular");
+ fontToFileMap.put("david", file);
+ }
+ } else {
+ if (unmappedFontNames == null) {
+ unmappedFontNames = new ArrayList<String>();
+ }
+ unmappedFontNames.add(font);
+ }
+ }
+ }
+
+ if (unmappedFontNames != null) {
+ HashSet<String> unmappedFontFiles = new HashSet<String>();
+
+ /* Every font key in fontToFileMap ought to correspond to a
+ * font key in fontToFamilyNameMap. Entries that don't seem
+ * to correspond are likely fonts that were named differently
+ * by GDI than in the registry. One known cause of this is when
+ * Windows has had its regional settings changed so that from
+ * GDI we get a localised (eg Chinese or Japanese) name for the
+ * font, but the registry retains the English version of the name
+ * that corresponded to the "install" locale for windows.
+ * Since we are in this code block because there are unmapped
+ * font names, we can look to find unused font->file mappings
+ * and then open the files to read the names. We don't generally
+ * want to open font files, as its a performance hit, but this
+ * occurs only for a small number of fonts on specific system
+ * configs - ie is believed that a "true" Japanese windows would
+ * have JA names in the registry too.
+ * Clone fontToFileMap and remove from the clone all keys which
+ * match a fontToFamilyNameMap key. What remains maps to the
+ * files we want to open to find the fonts GDI returned.
+ * A font in such a file is added to the fontToFileMap after
+ * checking its one of the unmappedFontNames we are looking for.
+ * The original name that didn't map is removed from fontToFileMap
+ * so essentially this "fixes up" fontToFileMap to use the same
+ * name as GDI.
+ * Also note that typically the fonts for which this occurs in
+ * CJK locales are TTC fonts and not all fonts in a TTC may have
+ * localised names. Eg MSGOTHIC.TTC contains 3 fonts and one of
+ * them "MS UI Gothic" has no JA name whereas the other two do.
+ * So not every font in these files is unmapped or new.
+ */
+ HashMap<String,String> ffmapCopy =
+ (HashMap<String,String>)(fontToFileMap.clone());
+ for (String key : fontToFamilyNameMap.keySet()) {
+ ffmapCopy.remove(key);
+ }
+ for (String key : ffmapCopy.keySet()) {
+ unmappedFontFiles.add(ffmapCopy.get(key));
+ fontToFileMap.remove(key);
+ }
+
+ resolveFontFiles(unmappedFontFiles, unmappedFontNames);
+
+ /* If there are still unmapped font names, this means there's
+ * something that wasn't in the registry. We need to get all
+ * the font files directly and look at the ones that weren't
+ * found in the registry.
+ */
+ if (unmappedFontNames.size() > 0) {
+
+ /* getFontFilesFromPath() returns all lower case names.
+ * To compare we also need lower case
+ * versions of the names from the registry.
+ */
+ ArrayList<String> registryFiles = new ArrayList<String>();
+
+ for (String regFile : fontToFileMap.values()) {
+ registryFiles.add(regFile.toLowerCase());
+ }
+ /* We don't look for Type1 files here as windows will
+ * not enumerate these, so aren't useful in reconciling
+ * GDI's unmapped files. We do find these later when
+ * we enumerate all fonts.
+ */
+ for (String pathFile : getFontFilesFromPath(true)) {
+ if (!registryFiles.contains(pathFile)) {
+ unmappedFontFiles.add(pathFile);
+ }
+ }
+
+ resolveFontFiles(unmappedFontFiles, unmappedFontNames);
+ }
+
+ /* remove from the set of names that will be returned to the
+ * user any fonts that can't be mapped to files.
+ */
+ if (unmappedFontNames.size() > 0) {
+ int sz = unmappedFontNames.size();
+ for (int i=0; i<sz; i++) {
+ String name = unmappedFontNames.get(i);
+ String familyName = fontToFamilyNameMap.get(name);
+ if (familyName != null) {
+ ArrayList family = familyToFontListMap.get(familyName);
+ if (family != null) {
+ if (family.size() <= 1) {
+ familyToFontListMap.remove(familyName);
+ }
+ }
+ }
+ fontToFamilyNameMap.remove(name);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("No file for font:" + name);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * In some cases windows may have fonts in the fonts folder that
+ * don't show up in the registry or in the GDI calls to enumerate fonts.
+ * The only way to find these is to list the directory. We invoke this
+ * only in getAllFonts/Families, so most searches for a specific
+ * font that is satisfied by the GDI/registry calls don't take the
+ * additional hit of listing the directory. This hit is small enough
+ * that its not significant in these 'enumerate all the fonts' cases.
+ * The basic approach is to cross-reference the files windows found
+ * with the ones in the directory listing approach, and for each
+ * in the latter list that is missing from the former list, register it.
+ */
+ private synchronized void checkForUnreferencedFontFiles() {
+ if (haveCheckedUnreferencedFontFiles) {
+ return;
+ }
+ haveCheckedUnreferencedFontFiles = true;
+ if (!FontUtilities.isWindows) {
+ return;
+ }
+ /* getFontFilesFromPath() returns all lower case names.
+ * To compare we also need lower case
+ * versions of the names from the registry.
+ */
+ ArrayList<String> registryFiles = new ArrayList<String>();
+ for (String regFile : fontToFileMap.values()) {
+ registryFiles.add(regFile.toLowerCase());
+ }
+
+ /* To avoid any issues with concurrent modification, create
+ * copies of the existing maps, add the new fonts into these
+ * and then replace the references to the old ones with the
+ * new maps. ConcurrentHashmap is another option but its a lot
+ * more changes and with this exception, these maps are intended
+ * to be static.
+ */
+ HashMap<String,String> fontToFileMap2 = null;
+ HashMap<String,String> fontToFamilyNameMap2 = null;
+ HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
+
+ for (String pathFile : getFontFilesFromPath(false)) {
+ if (!registryFiles.contains(pathFile)) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Found non-registry file : " + pathFile);
+ }
+ PhysicalFont f = registerFontFile(getPathName(pathFile));
+ if (f == null) {
+ continue;
+ }
+ if (fontToFileMap2 == null) {
+ fontToFileMap2 = new HashMap<String,String>(fontToFileMap);
+ fontToFamilyNameMap2 =
+ new HashMap<String,String>(fontToFamilyNameMap);
+ familyToFontListMap2 = new
+ HashMap<String,ArrayList<String>>(familyToFontListMap);
+ }
+ String fontName = f.getFontName(null);
+ String family = f.getFamilyName(null);
+ String familyLC = family.toLowerCase();
+ fontToFamilyNameMap2.put(fontName, family);
+ fontToFileMap2.put(fontName, pathFile);
+ ArrayList<String> fonts = familyToFontListMap2.get(familyLC);
+ if (fonts == null) {
+ fonts = new ArrayList<String>();
+ } else {
+ fonts = new ArrayList<String>(fonts);
+ }
+ fonts.add(fontName);
+ familyToFontListMap2.put(familyLC, fonts);
+ }
+ }
+ if (fontToFileMap2 != null) {
+ fontToFileMap = fontToFileMap2;
+ familyToFontListMap = familyToFontListMap2;
+ fontToFamilyNameMap = fontToFamilyNameMap2;
+ }
+ }
+
+ private void resolveFontFiles(HashSet<String> unmappedFiles,
+ ArrayList<String> unmappedFonts) {
+
+ Locale l = SunToolkit.getStartupLocale();
+
+ for (String file : unmappedFiles) {
+ try {
+ int fn = 0;
+ TrueTypeFont ttf;
+ String fullPath = getPathName(file);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Trying to resolve file " + fullPath);
+ }
+ do {
+ ttf = new TrueTypeFont(fullPath, null, fn++, true);
+ // prefer the font's locale name.
+ String fontName = ttf.getFontName(l).toLowerCase();
+ if (unmappedFonts.contains(fontName)) {
+ fontToFileMap.put(fontName, file);
+ unmappedFonts.remove(fontName);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Resolved absent registry entry for " +
+ fontName + " located in " + fullPath);
+ }
+ }
+ }
+ while (fn < ttf.getFontCount());
+ } catch (Exception e) {
+ }
+ }
+ }
+
+ private synchronized HashMap<String,String> getFullNameToFileMap() {
+ if (fontToFileMap == null) {
+
+ pathDirs = getPlatformFontDirs(noType1Font);
+
+ fontToFileMap = new HashMap<String,String>(100);
+ fontToFamilyNameMap = new HashMap<String,String>(100);
+ familyToFontListMap = new HashMap<String,ArrayList<String>>(50);
+ populateFontFileNameMap(fontToFileMap,
+ fontToFamilyNameMap,
+ familyToFontListMap,
+ Locale.ENGLISH);
+ if (FontUtilities.isWindows) {
+ resolveWindowsFonts();
+ }
+ if (FontUtilities.isLogging()) {
+ logPlatformFontInfo();
+ }
+ }
+ return fontToFileMap;
+ }
+
+ private void logPlatformFontInfo() {
+ PlatformLogger logger = FontUtilities.getLogger();
+ for (int i=0; i< pathDirs.length;i++) {
+ logger.info("fontdir="+pathDirs[i]);
+ }
+ for (String keyName : fontToFileMap.keySet()) {
+ logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName));
+ }
+ for (String keyName : fontToFamilyNameMap.keySet()) {
+ logger.info("font="+keyName+" family="+
+ fontToFamilyNameMap.get(keyName));
+ }
+ for (String keyName : familyToFontListMap.keySet()) {
+ logger.info("family="+keyName+ " fonts="+
+ familyToFontListMap.get(keyName));
+ }
+ }
+
+ /* Note this return list excludes logical fonts and JRE fonts */
+ protected String[] getFontNamesFromPlatform() {
+ if (getFullNameToFileMap().size() == 0) {
+ return null;
+ }
+ checkForUnreferencedFontFiles();
+ /* This odd code with TreeMap is used to preserve a historical
+ * behaviour wrt the sorting order .. */
+ ArrayList<String> fontNames = new ArrayList<String>();
+ for (ArrayList<String> a : familyToFontListMap.values()) {
+ for (String s : a) {
+ fontNames.add(s);
+ }
+ }
+ return fontNames.toArray(STR_ARRAY);
+ }
+
+ public boolean gotFontsFromPlatform() {
+ return getFullNameToFileMap().size() != 0;
+ }
+
+ public String getFileNameForFontName(String fontName) {
+ String fontNameLC = fontName.toLowerCase(Locale.ENGLISH);
+ return fontToFileMap.get(fontNameLC);
+ }
+
+ private PhysicalFont registerFontFile(String file) {
+ if (new File(file).isAbsolute() &&
+ !registeredFonts.contains(file)) {
+ int fontFormat = FONTFORMAT_NONE;
+ int fontRank = Font2D.UNKNOWN_RANK;
+ if (ttFilter.accept(null, file)) {
+ fontFormat = FONTFORMAT_TRUETYPE;
+ fontRank = Font2D.TTF_RANK;
+ } else if
+ (t1Filter.accept(null, file)) {
+ fontFormat = FONTFORMAT_TYPE1;
+ fontRank = Font2D.TYPE1_RANK;
+ }
+ if (fontFormat == FONTFORMAT_NONE) {
+ return null;
+ }
+ return registerFontFile(file, null, fontFormat, false, fontRank);
+ }
+ return null;
+ }
+
+ /* Used to register any font files that are found by platform APIs
+ * that weren't previously found in the standard font locations.
+ * the isAbsolute() check is needed since that's whats stored in the
+ * set, and on windows, the fonts in the system font directory that
+ * are in the fontToFileMap are just basenames. We don't want to try
+ * to register those again, but we do want to register other registry
+ * installed fonts.
+ */
+ protected void registerOtherFontFiles(HashSet registeredFontFiles) {
+ if (getFullNameToFileMap().size() == 0) {
+ return;
+ }
+ for (String file : fontToFileMap.values()) {
+ registerFontFile(file);
+ }
+ }
+
+ public boolean
+ getFamilyNamesFromPlatform(TreeMap<String,String> familyNames,
+ Locale requestedLocale) {
+ if (getFullNameToFileMap().size() == 0) {
+ return false;
+ }
+ checkForUnreferencedFontFiles();
+ for (String name : fontToFamilyNameMap.values()) {
+ familyNames.put(name.toLowerCase(requestedLocale), name);
+ }
+ return true;
+ }
+
+ /* Path may be absolute or a base file name relative to one of
+ * the platform font directories
+ */
+ private String getPathName(final String s) {
+ File f = new File(s);
+ if (f.isAbsolute()) {
+ return s;
+ } else if (pathDirs.length==1) {
+ return pathDirs[0] + File.separator + s;
+ } else {
+ String path = java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<String>() {
+ public String run() {
+ for (int p=0; p<pathDirs.length; p++) {
+ File f = new File(pathDirs[p] +File.separator+ s);
+ if (f.exists()) {
+ return f.getAbsolutePath();
+ }
+ }
+ return null;
+ }
+ });
+ if (path != null) {
+ return path;
+ }
+ }
+ return s; // shouldn't happen, but harmless
+ }
+
+ /* lcName is required to be lower case for use as a key.
+ * lcName may be a full name, or a family name, and style may
+ * be specified in addition to either of these. So be sure to
+ * get the right one. Since an app *could* ask for "Foo Regular"
+ * and later ask for "Foo Italic", if we don't register all the
+ * styles, then logic in findFont2D may try to style the original
+ * so we register the entire family if we get a match here.
+ * This is still a big win because this code is invoked where
+ * otherwise we would register all fonts.
+ * It's also useful for the case where "Foo Bold" was specified with
+ * style Font.ITALIC, as we would want in that case to try to return
+ * "Foo Bold Italic" if it exists, and it is only by locating "Foo Bold"
+ * and opening it that we really "know" it's Bold, and can look for
+ * a font that supports that and the italic style.
+ * The code in here is not overtly windows-specific but in fact it
+ * is unlikely to be useful as is on other platforms. It is maintained
+ * in this shared source file to be close to its sole client and
+ * because so much of the logic is intertwined with the logic in
+ * findFont2D.
+ */
+ private Font2D findFontFromPlatform(String lcName, int style) {
+ if (getFullNameToFileMap().size() == 0) {
+ return null;
+ }
+
+ ArrayList<String> family = null;
+ String fontFile = null;
+ String familyName = fontToFamilyNameMap.get(lcName);
+ if (familyName != null) {
+ fontFile = fontToFileMap.get(lcName);
+ family = familyToFontListMap.get
+ (familyName.toLowerCase(Locale.ENGLISH));
+ } else {
+ family = familyToFontListMap.get(lcName); // is lcName is a family?
+ if (family != null && family.size() > 0) {
+ String lcFontName = family.get(0).toLowerCase(Locale.ENGLISH);
+ if (lcFontName != null) {
+ familyName = fontToFamilyNameMap.get(lcFontName);
+ }
+ }
+ }
+ if (family == null || familyName == null) {
+ return null;
+ }
+ String [] fontList = (String[])family.toArray(STR_ARRAY);
+ if (fontList.length == 0) {
+ return null;
+ }
+
+ /* first check that for every font in this family we can find
+ * a font file. The specific reason for doing this is that
+ * in at least one case on Windows a font has the face name "David"
+ * but the registry entry is "David Regular". That is the "unique"
+ * name of the font but in other cases the registry contains the
+ * "full" name. See the specifications of name ids 3 and 4 in the
+ * TrueType 'name' table.
+ * In general this could cause a problem that we fail to register
+ * if we all members of a family that we may end up mapping to
+ * the wrong font member: eg return Bold when Plain is needed.
+ */
+ for (int f=0;f<fontList.length;f++) {
+ String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
+ String fileName = fontToFileMap.get(fontNameLC);
+ if (fileName == null) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Platform lookup : No file for font " +
+ fontList[f] + " in family " +familyName);
+ }
+ return null;
+ }
+ }
+
+ /* Currently this code only looks for TrueType fonts, so format
+ * and rank can be specified without looking at the filename.
+ */
+ PhysicalFont physicalFont = null;
+ if (fontFile != null) {
+ physicalFont = registerFontFile(getPathName(fontFile), null,
+ FONTFORMAT_TRUETYPE, false,
+ Font2D.TTF_RANK);
+ }
+ /* Register all fonts in this family. */
+ for (int f=0;f<fontList.length;f++) {
+ String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
+ String fileName = fontToFileMap.get(fontNameLC);
+ if (fontFile != null && fontFile.equals(fileName)) {
+ continue;
+ }
+ /* Currently this code only looks for TrueType fonts, so format
+ * and rank can be specified without looking at the filename.
+ */
+ registerFontFile(getPathName(fileName), null,
+ FONTFORMAT_TRUETYPE, false, Font2D.TTF_RANK);
+ }
+
+ Font2D font = null;
+ FontFamily fontFamily = FontFamily.getFamily(familyName);
+ /* Handle case where request "MyFont Bold", style=Font.ITALIC */
+ if (physicalFont != null) {
+ style |= physicalFont.style;
+ }
+ if (fontFamily != null) {
+ font = fontFamily.getFont(style);
+ if (font == null) {
+ font = fontFamily.getClosestStyle(style);
+ }
+ }
+ return font;
+ }
+
+ private ConcurrentHashMap<String, Font2D> fontNameCache =
+ new ConcurrentHashMap<String, Font2D>();
+
+ /*
+ * The client supplies a name and a style.
+ * The name could be a family name, or a full name.
+ * A font may exist with the specified style, or it may
+ * exist only in some other style. For non-native fonts the scaler
+ * may be able to emulate the required style.
+ */
+ public Font2D findFont2D(String name, int style, int fallback) {
+ String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
+ String mapName = lowerCaseName + dotStyleStr(style);
+ Font2D font;
+
+ /* If preferLocaleFonts() or preferProportionalFonts() has been
+ * called we may be using an alternate set of composite fonts in this
+ * app context. The presence of a pre-built name map indicates whether
+ * this is so, and gives access to the alternate composite for the
+ * name.
+ */
+ if (_usingPerAppContextComposites) {
+ ConcurrentHashMap<String, Font2D> altNameCache =
+ (ConcurrentHashMap<String, Font2D>)
+ AppContext.getAppContext().get(CompositeFont.class);
+ if (altNameCache != null) {
+ font = (Font2D)altNameCache.get(mapName);
+ } else {
+ font = null;
+ }
+ } else {
+ font = fontNameCache.get(mapName);
+ }
+ if (font != null) {
+ return font;
+ }
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info("Search for font: " + name);
+ }
+
+ // The check below is just so that the bitmap fonts being set by
+ // AWT and Swing thru the desktop properties do not trigger the
+ // the load fonts case. The two bitmap fonts are now mapped to
+ // appropriate equivalents for serif and sansserif.
+ // Note that the cost of this comparison is only for the first
+ // call until the map is filled.
+ if (FontUtilities.isWindows) {
+ if (lowerCaseName.equals("ms sans serif")) {
+ name = "sansserif";
+ } else if (lowerCaseName.equals("ms serif")) {
+ name = "serif";
+ }
+ }
+
+ /* This isn't intended to support a client passing in the
+ * string default, but if a client passes in null for the name
+ * the java.awt.Font class internally substitutes this name.
+ * So we need to recognise it here to prevent a loadFonts
+ * on the unrecognised name. The only potential problem with
+ * this is it would hide any real font called "default"!
+ * But that seems like a potential problem we can ignore for now.
+ */
+ if (lowerCaseName.equals("default")) {
+ name = "dialog";
+ }
+
+ /* First see if its a family name. */
+ FontFamily family = FontFamily.getFamily(name);
+ if (family != null) {
+ font = family.getFontWithExactStyleMatch(style);
+ if (font == null) {
+ font = findDeferredFont(name, style);
+ }
+ if (font == null) {
+ font = family.getFont(style);
+ }
+ if (font == null) {
+ font = family.getClosestStyle(style);
+ }
+ if (font != null) {
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+ }
+
+ /* If it wasn't a family name, it should be a full name of
+ * either a composite, or a physical font
+ */
+ font = fullNameToFont.get(lowerCaseName);
+ if (font != null) {
+ /* Check that the requested style matches the matched font's style.
+ * But also match style automatically if the requested style is
+ * "plain". This because the existing behaviour is that the fonts
+ * listed via getAllFonts etc always list their style as PLAIN.
+ * This does lead to non-commutative behaviours where you might
+ * start with "Lucida Sans Regular" and ask for a BOLD version
+ * and get "Lucida Sans DemiBold" but if you ask for the PLAIN
+ * style of "Lucida Sans DemiBold" you get "Lucida Sans DemiBold".
+ * This consistent however with what happens if you have a bold
+ * version of a font and no plain version exists - alg. styling
+ * doesn't "unbolden" the font.
+ */
+ if (font.style == style || style == Font.PLAIN) {
+ fontNameCache.put(mapName, font);
+ return font;
+ } else {
+ /* If it was a full name like "Lucida Sans Regular", but
+ * the style requested is "bold", then we want to see if
+ * there's the appropriate match against another font in
+ * that family before trying to load all fonts, or applying a
+ * algorithmic styling
+ */
+ family = FontFamily.getFamily(font.getFamilyName(null));
+ if (family != null) {
+ Font2D familyFont = family.getFont(style|font.style);
+ /* We exactly matched the requested style, use it! */
+ if (familyFont != null) {
+ fontNameCache.put(mapName, familyFont);
+ return familyFont;
+ } else {
+ /* This next call is designed to support the case
+ * where bold italic is requested, and if we must
+ * style, then base it on either bold or italic -
+ * not on plain!
+ */
+ familyFont = family.getClosestStyle(style|font.style);
+ if (familyFont != null) {
+ /* The next check is perhaps one
+ * that shouldn't be done. ie if we get this
+ * far we have probably as close a match as we
+ * are going to get. We could load all fonts to
+ * see if somehow some parts of the family are
+ * loaded but not all of it.
+ */
+ if (familyFont.canDoStyle(style|font.style)) {
+ fontNameCache.put(mapName, familyFont);
+ return familyFont;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (FontUtilities.isWindows) {
+ /* Don't want Windows to return a Lucida Sans font from
+ * C:\Windows\Fonts
+ */
+ if (deferredFontFiles.size() > 0) {
+ font = findJREDeferredFont(lowerCaseName, style);
+ if (font != null) {
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+ }
+ font = findFontFromPlatform(lowerCaseName, style);
+ if (font != null) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Found font via platform API for request:\"" +
+ name + "\":, style="+style+
+ " found font: " + font);
+ }
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+ }
+
+ /* If reach here and no match has been located, then if there are
+ * uninitialised deferred fonts, load as many of those as needed
+ * to find the deferred font. If none is found through that
+ * search continue on.
+ * There is possibly a minor issue when more than one
+ * deferred font implements the same font face. Since deferred
+ * fonts are only those in font configuration files, this is a
+ * controlled situation, the known case being Solaris euro_fonts
+ * versions of Arial, Times New Roman, Courier New. However
+ * the larger font will transparently replace the smaller one
+ * - see addToFontList() - when it is needed by the composite font.
+ */
+ if (deferredFontFiles.size() > 0) {
+ font = findDeferredFont(name, style);
+ if (font != null) {
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+ }
+
+ /* Some apps use deprecated 1.0 names such as helvetica and courier. On
+ * Solaris these are Type1 fonts in /usr/openwin/lib/X11/fonts/Type1.
+ * If running on Solaris will register all the fonts in this
+ * directory.
+ * May as well register the whole directory without actually testing
+ * the font name is one of the deprecated names as the next step would
+ * load all fonts which are in this directory anyway.
+ * In the event that this lookup is successful it potentially "hides"
+ * TrueType versions of such fonts that are elsewhere but since they
+ * do not exist on Solaris this is not a problem.
+ * Set a flag to indicate we've done this registration to avoid
+ * repetition and more seriously, to avoid recursion.
+ */
+ if (FontUtilities.isSolaris &&!loaded1dot0Fonts) {
+ /* "timesroman" is a special case since that's not the
+ * name of any known font on Solaris or elsewhere.
+ */
+ if (lowerCaseName.equals("timesroman")) {
+ font = findFont2D("serif", style, fallback);
+ fontNameCache.put(mapName, font);
+ }
+ register1dot0Fonts();
+ loaded1dot0Fonts = true;
+ Font2D ff = findFont2D(name, style, fallback);
+ return ff;
+ }
+
+ /* We check for application registered fonts before
+ * explicitly loading all fonts as if necessary the registration
+ * code will have done so anyway. And we don't want to needlessly
+ * load the actual files for all fonts.
+ * Just as for installed fonts we check for family before fullname.
+ * We do not add these fonts to fontNameCache for the
+ * app context case which eliminates the overhead of a per context
+ * cache for these.
+ */
+
+ if (fontsAreRegistered || fontsAreRegisteredPerAppContext) {
+ Hashtable<String, FontFamily> familyTable = null;
+ Hashtable<String, Font2D> nameTable;
+
+ if (fontsAreRegistered) {
+ familyTable = createdByFamilyName;
+ nameTable = createdByFullName;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ familyTable =
+ (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+ nameTable =
+ (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+ }
+
+ family = familyTable.get(lowerCaseName);
+ if (family != null) {
+ font = family.getFontWithExactStyleMatch(style);
+ if (font == null) {
+ font = family.getFont(style);
+ }
+ if (font == null) {
+ font = family.getClosestStyle(style);
+ }
+ if (font != null) {
+ if (fontsAreRegistered) {
+ fontNameCache.put(mapName, font);
+ }
+ return font;
+ }
+ }
+ font = nameTable.get(lowerCaseName);
+ if (font != null) {
+ if (fontsAreRegistered) {
+ fontNameCache.put(mapName, font);
+ }
+ return font;
+ }
+ }
+
+ /* If reach here and no match has been located, then if all fonts
+ * are not yet loaded, do so, and then recurse.
+ */
+ if (!loadedAllFonts) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Load fonts looking for:" + name);
+ }
+ loadFonts();
+ loadedAllFonts = true;
+ return findFont2D(name, style, fallback);
+ }
+
+ if (!loadedAllFontFiles) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Load font files looking for:" + name);
+ }
+ loadFontFiles();
+ loadedAllFontFiles = true;
+ return findFont2D(name, style, fallback);
+ }
+
+ /* The primary name is the locale default - ie not US/English but
+ * whatever is the default in this locale. This is the way it always
+ * has been but may be surprising to some developers if "Arial Regular"
+ * were hard-coded in their app and yet "Arial Regular" was not the
+ * default name. Fortunately for them, as a consequence of the JDK
+ * supporting returning names and family names for arbitrary locales,
+ * we also need to support searching all localised names for a match.
+ * But because this case of the name used to reference a font is not
+ * the same as the default for this locale is rare, it makes sense to
+ * search a much shorter list of default locale names and only go to
+ * a longer list of names in the event that no match was found.
+ * So add here code which searches localised names too.
+ * As in 1.4.x this happens only after loading all fonts, which
+ * is probably the right order.
+ */
+ if ((font = findFont2DAllLocales(name, style)) != null) {
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+
+ /* Perhaps its a "compatibility" name - timesroman, helvetica,
+ * or courier, which 1.0 apps used for logical fonts.
+ * We look for these "late" after a loadFonts as we must not
+ * hide real fonts of these names.
+ * Map these appropriately:
+ * On windows this means according to the rules specified by the
+ * FontConfiguration : do it only for encoding==Cp1252
+ *
+ * REMIND: this is something we plan to remove.
+ */
+ if (FontUtilities.isWindows) {
+ String compatName =
+ getFontConfiguration().getFallbackFamilyName(name, null);
+ if (compatName != null) {
+ font = findFont2D(compatName, style, fallback);
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+ } else if (lowerCaseName.equals("timesroman")) {
+ font = findFont2D("serif", style, fallback);
+ fontNameCache.put(mapName, font);
+ return font;
+ } else if (lowerCaseName.equals("helvetica")) {
+ font = findFont2D("sansserif", style, fallback);
+ fontNameCache.put(mapName, font);
+ return font;
+ } else if (lowerCaseName.equals("courier")) {
+ font = findFont2D("monospaced", style, fallback);
+ fontNameCache.put(mapName, font);
+ return font;
+ }
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info("No font found for:" + name);
+ }
+
+ switch (fallback) {
+ case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
+ case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
+ default: return null;
+ }
+ }
+
+ /*
+ * Workaround for apps which are dependent on a font metrics bug
+ * in JDK 1.1. This is an unsupported win32 private setting.
+ * Left in for a customer - do not remove.
+ */
+ public boolean usePlatformFontMetrics() {
+ return usePlatformFontMetrics;
+ }
+
+ public int getNumFonts() {
+ return physicalFonts.size()+maxCompFont;
+ }
+
+ private static boolean fontSupportsEncoding(Font font, String encoding) {
+ return FontUtilities.getFont2D(font).supportsEncoding(encoding);
+ }
+
+ public abstract String getFontPath(boolean noType1Fonts);
+
+ private Thread fileCloser = null;
+ Vector<File> tmpFontFiles = null;
+
+ public Font2D createFont2D(File fontFile, int fontFormat,
+ boolean isCopy, CreatedFontTracker tracker)
+ throws FontFormatException {
+
+ String fontFilePath = fontFile.getPath();
+ FileFont font2D = null;
+ final File fFile = fontFile;
+ final CreatedFontTracker _tracker = tracker;
+ try {
+ switch (fontFormat) {
+ case Font.TRUETYPE_FONT:
+ font2D = new TrueTypeFont(fontFilePath, null, 0, true);
+ break;
+ case Font.TYPE1_FONT:
+ font2D = new Type1Font(fontFilePath, null, isCopy);
+ break;
+ default:
+ throw new FontFormatException("Unrecognised Font Format");
+ }
+ } catch (FontFormatException e) {
+ if (isCopy) {
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ if (_tracker != null) {
+ _tracker.subBytes((int)fFile.length());
+ }
+ fFile.delete();
+ return null;
+ }
+ });
+ }
+ throw(e);
+ }
+ if (isCopy) {
+ font2D.setFileToRemove(fontFile, tracker);
+ synchronized (FontManager.class) {
+
+ if (tmpFontFiles == null) {
+ tmpFontFiles = new Vector<File>();
+ }
+ tmpFontFiles.add(fontFile);
+
+ if (fileCloser == null) {
+ final Runnable fileCloserRunnable = new Runnable() {
+ public void run() {
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+
+ for (int i=0;i<CHANNELPOOLSIZE;i++) {
+ if (fontFileCache[i] != null) {
+ try {
+ fontFileCache[i].close();
+ } catch (Exception e) {
+ }
+ }
+ }
+ if (tmpFontFiles != null) {
+ File[] files = new File[tmpFontFiles.size()];
+ files = tmpFontFiles.toArray(files);
+ for (int f=0; f<files.length;f++) {
+ try {
+ files[f].delete();
+ } catch (Exception e) {
+ }
+ }
+ }
+
+ return null;
+ }
+
+ });
+ }
+ };
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ /* The thread must be a member of a thread group
+ * which will not get GCed before VM exit.
+ * Make its parent the top-level thread group.
+ */
+ ThreadGroup tg =
+ Thread.currentThread().getThreadGroup();
+ for (ThreadGroup tgn = tg;
+ tgn != null;
+ tg = tgn, tgn = tg.getParent());
+ fileCloser = new Thread(tg, fileCloserRunnable);
+ Runtime.getRuntime().addShutdownHook(fileCloser);
+ return null;
+ }
+ });
+ }
+ }
+ }
+ return font2D;
+ }
+
+ /* remind: used in X11GraphicsEnvironment and called often enough
+ * that we ought to obsolete this code
+ */
+ public synchronized String getFullNameByFileName(String fileName) {
+ PhysicalFont[] physFonts = getPhysicalFonts();
+ for (int i=0;i<physFonts.length;i++) {
+ if (physFonts[i].platName.equals(fileName)) {
+ return (physFonts[i].getFontName(null));
+ }
+ }
+ return null;
+ }
+
+ /*
+ * This is called when font is determined to be invalid/bad.
+ * It designed to be called (for example) by the font scaler
+ * when in processing a font file it is discovered to be incorrect.
+ * This is different than the case where fonts are discovered to
+ * be incorrect during initial verification, as such fonts are
+ * never registered.
+ * Handles to this font held are re-directed to a default font.
+ * This default may not be an ideal substitute buts it better than
+ * crashing This code assumes a PhysicalFont parameter as it doesn't
+ * make sense for a Composite to be "bad".
+ */
+ public synchronized void deRegisterBadFont(Font2D font2D) {
+ if (!(font2D instanceof PhysicalFont)) {
+ /* We should never reach here, but just in case */
+ return;
+ } else {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .severe("Deregister bad font: " + font2D);
+ }
+ replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
+ }
+ }
+
+ /*
+ * This encapsulates all the work that needs to be done when a
+ * Font2D is replaced by a different Font2D.
+ */
+ public synchronized void replaceFont(PhysicalFont oldFont,
+ PhysicalFont newFont) {
+
+ if (oldFont.handle.font2D != oldFont) {
+ /* already done */
+ return;
+ }
+
+ /* If we try to replace the font with itself, that won't work,
+ * so pick any alternative physical font
+ */
+ if (oldFont == newFont) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .severe("Can't replace bad font with itself " + oldFont);
+ }
+ PhysicalFont[] physFonts = getPhysicalFonts();
+ for (int i=0; i<physFonts.length;i++) {
+ if (physFonts[i] != newFont) {
+ newFont = physFonts[i];
+ break;
+ }
+ }
+ if (oldFont == newFont) {
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .severe("This is bad. No good physicalFonts found.");
+ }
+ return;
+ }
+ }
+
+ /* eliminate references to this font, so it won't be located
+ * by future callers, and will be eligible for GC when all
+ * references are removed
+ */
+ oldFont.handle.font2D = newFont;
+ physicalFonts.remove(oldFont.fullName);
+ fullNameToFont.remove(oldFont.fullName.toLowerCase(Locale.ENGLISH));
+ FontFamily.remove(oldFont);
+
+ if (localeFullNamesToFont != null) {
+ Map.Entry[] mapEntries =
+ (Map.Entry[])localeFullNamesToFont.entrySet().
+ toArray(new Map.Entry[0]);
+ /* Should I be replacing these, or just I just remove
+ * the names from the map?
+ */
+ for (int i=0; i<mapEntries.length;i++) {
+ if (mapEntries[i].getValue() == oldFont) {
+ try {
+ mapEntries[i].setValue(newFont);
+ } catch (Exception e) {
+ /* some maps don't support this operation.
+ * In this case just give up and remove the entry.
+ */
+ localeFullNamesToFont.remove(mapEntries[i].getKey());
+ }
+ }
+ }
+ }
+
+ for (int i=0; i<maxCompFont; i++) {
+ /* Deferred initialization of composites shouldn't be
+ * a problem for this case, since a font must have been
+ * initialised to be discovered to be bad.
+ * Some JRE composites on Solaris use two versions of the same
+ * font. The replaced font isn't bad, just "smaller" so there's
+ * no need to make the slot point to the new font.
+ * Since composites have a direct reference to the Font2D (not
+ * via a handle) making this substitution is not safe and could
+ * cause an additional problem and so this substitution is
+ * warranted only when a font is truly "bad" and could cause
+ * a crash. So we now replace it only if its being substituted
+ * with some font other than a fontconfig rank font
+ * Since in practice a substitution will have the same rank
+ * this may never happen, but the code is safer even if its
+ * also now a no-op.
+ * The only obvious "glitch" from this stems from the current
+ * implementation that when asked for the number of glyphs in a
+ * composite it lies and returns the number in slot 0 because
+ * composite glyphs aren't contiguous. Since we live with that
+ * we can live with the glitch that depending on how it was
+ * initialised a composite may return different values for this.
+ * Fixing the issues with composite glyph ids is tricky as
+ * there are exclusion ranges and unlike other fonts even the
+ * true "numGlyphs" isn't a contiguous range. Likely the only
+ * solution is an API that returns an array of glyph ranges
+ * which takes precedence over the existing API. That might
+ * also need to address excluding ranges which represent a
+ * code point supported by an earlier component.
+ */
+ if (newFont.getRank() > Font2D.FONT_CONFIG_RANK) {
+ compFonts[i].replaceComponentFont(oldFont, newFont);
+ }
+ }
+ }
+
+ private synchronized void loadLocaleNames() {
+ if (localeFullNamesToFont != null) {
+ return;
+ }
+ localeFullNamesToFont = new HashMap<String, TrueTypeFont>();
+ Font2D[] fonts = getRegisteredFonts();
+ for (int i=0; i<fonts.length; i++) {
+ if (fonts[i] instanceof TrueTypeFont) {
+ TrueTypeFont ttf = (TrueTypeFont)fonts[i];
+ String[] fullNames = ttf.getAllFullNames();
+ for (int n=0; n<fullNames.length; n++) {
+ localeFullNamesToFont.put(fullNames[n], ttf);
+ }
+ FontFamily family = FontFamily.getFamily(ttf.familyName);
+ if (family != null) {
+ FontFamily.addLocaleNames(family, ttf.getAllFamilyNames());
+ }
+ }
+ }
+ }
+
+ /* This replicate the core logic of findFont2D but operates on
+ * all the locale names. This hasn't been merged into findFont2D to
+ * keep the logic simpler and reduce overhead, since this case is
+ * almost never used. The main case in which it is called is when
+ * a bogus font name is used and we need to check all possible names
+ * before returning the default case.
+ */
+ private Font2D findFont2DAllLocales(String name, int style) {
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("Searching localised font names for:" + name);
+ }
+
+ /* If reach here and no match has been located, then if we have
+ * not yet built the map of localeFullNamesToFont for TT fonts, do so
+ * now. This method must be called after all fonts have been loaded.
+ */
+ if (localeFullNamesToFont == null) {
+ loadLocaleNames();
+ }
+ String lowerCaseName = name.toLowerCase();
+ Font2D font = null;
+
+ /* First see if its a family name. */
+ FontFamily family = FontFamily.getLocaleFamily(lowerCaseName);
+ if (family != null) {
+ font = family.getFont(style);
+ if (font == null) {
+ font = family.getClosestStyle(style);
+ }
+ if (font != null) {
+ return font;
+ }
+ }
+
+ /* If it wasn't a family name, it should be a full name. */
+ synchronized (this) {
+ font = localeFullNamesToFont.get(name);
+ }
+ if (font != null) {
+ if (font.style == style || style == Font.PLAIN) {
+ return font;
+ } else {
+ family = FontFamily.getFamily(font.getFamilyName(null));
+ if (family != null) {
+ Font2D familyFont = family.getFont(style);
+ /* We exactly matched the requested style, use it! */
+ if (familyFont != null) {
+ return familyFont;
+ } else {
+ familyFont = family.getClosestStyle(style);
+ if (familyFont != null) {
+ /* The next check is perhaps one
+ * that shouldn't be done. ie if we get this
+ * far we have probably as close a match as we
+ * are going to get. We could load all fonts to
+ * see if somehow some parts of the family are
+ * loaded but not all of it.
+ * This check is commented out for now.
+ */
+ if (!familyFont.canDoStyle(style)) {
+ familyFont = null;
+ }
+ return familyFont;
+ }
+ }
+ }
+ }
+ }
+ return font;
+ }
+
+ /* Supporting "alternate" composite fonts on 2D graphics objects
+ * is accessed by the application by calling methods on the local
+ * GraphicsEnvironment. The overall implementation is described
+ * in one place, here, since otherwise the implementation is spread
+ * around it may be difficult to track.
+ * The methods below call into SunGraphicsEnvironment which creates a
+ * new FontConfiguration instance. The FontConfiguration class,
+ * and its platform sub-classes are updated to take parameters requesting
+ * these behaviours. This is then used to create new composite font
+ * instances. Since this calls the initCompositeFont method in
+ * SunGraphicsEnvironment it performs the same initialization as is
+ * performed normally. There may be some duplication of effort, but
+ * that code is already written to be able to perform properly if called
+ * to duplicate work. The main difference is that if we detect we are
+ * running in an applet/browser/Java plugin environment these new fonts
+ * are not placed in the "default" maps but into an AppContext instance.
+ * The font lookup mechanism in java.awt.Font.getFont2D() is also updated
+ * so that look-up for composite fonts will in that case always
+ * do a lookup rather than returning a cached result.
+ * This is inefficient but necessary else singleton java.awt.Font
+ * instances would not retrieve the correct Font2D for the appcontext.
+ * sun.font.FontManager.findFont2D is also updated to that it uses
+ * a name map cache specific to that appcontext.
+ *
+ * Getting an AppContext is expensive, so there is a global variable
+ * that records whether these methods have ever been called and can
+ * avoid the expense for almost all applications. Once the correct
+ * CompositeFont is associated with the Font, everything should work
+ * through existing mechanisms.
+ * A special case is that GraphicsEnvironment.getAllFonts() must
+ * return an AppContext specific list.
+ *
+ * Calling the methods below is "heavyweight" but it is expected that
+ * these methods will be called very rarely.
+ *
+ * If _usingPerAppContextComposites is true, we are in "applet"
+ * (eg browser) enviroment and at least one context has selected
+ * an alternate composite font behaviour.
+ * If _usingAlternateComposites is true, we are not in an "applet"
+ * environment and the (single) application has selected
+ * an alternate composite font behaviour.
+ *
+ * - Printing: The implementation delegates logical fonts to an AWT
+ * mechanism which cannot use these alternate configurations.
+ * We can detect that alternate fonts are in use and back-off to 2D, but
+ * that uses outlines. Much of this can be fixed with additional work
+ * but that may have to wait. The results should be correct, just not
+ * optimal.
+ */
+ private static final Object altJAFontKey = new Object();
+ private static final Object localeFontKey = new Object();
+ private static final Object proportionalFontKey = new Object();
+ private boolean _usingPerAppContextComposites = false;
+ private boolean _usingAlternateComposites = false;
+
+ /* These values are used only if we are running as a standalone
+ * application, as determined by maybeMultiAppContext();
+ */
+ private static boolean gAltJAFont = false;
+ private boolean gLocalePref = false;
+ private boolean gPropPref = false;
+
+ /* This method doesn't check if alternates are selected in this app
+ * context. Its used by the FontMetrics caching code which in such
+ * a case cannot retrieve a cached metrics solely on the basis of
+ * the Font.equals() method since it needs to also check if the Font2D
+ * is the same.
+ * We also use non-standard composites for Swing native L&F fonts on
+ * Windows. In that case the policy is that the metrics reported are
+ * based solely on the physical font in the first slot which is the
+ * visible java.awt.Font. So in that case the metrics cache which tests
+ * the Font does what we want. In the near future when we expand the GTK
+ * logical font definitions we may need to revisit this if GTK reports
+ * combined metrics instead. For now though this test can be simple.
+ */
+ public boolean maybeUsingAlternateCompositeFonts() {
+ return _usingAlternateComposites || _usingPerAppContextComposites;
+ }
+
+ public boolean usingAlternateCompositeFonts() {
+ return (_usingAlternateComposites ||
+ (_usingPerAppContextComposites &&
+ AppContext.getAppContext().get(CompositeFont.class) != null));
+ }
+
+ private static boolean maybeMultiAppContext() {
+ Boolean appletSM = (Boolean)
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ SecurityManager sm = System.getSecurityManager();
+ return new Boolean
+ (sm instanceof sun.applet.AppletSecurity);
+ }
+ });
+ return appletSM.booleanValue();
+ }
+
+ /* Modifies the behaviour of a subsequent call to preferLocaleFonts()
+ * to use Mincho instead of Gothic for dialoginput in JA locales
+ * on windows. Not needed on other platforms.
+ */
+ public synchronized void useAlternateFontforJALocales() {
+
+ if (!FontUtilities.isWindows) {
+ return;
+ }
+
+ if (!maybeMultiAppContext()) {
+ gAltJAFont = true;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ appContext.put(altJAFontKey, altJAFontKey);
+ }
+ }
+
+ public boolean usingAlternateFontforJALocales() {
+ if (!maybeMultiAppContext()) {
+ return gAltJAFont;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ return appContext.get(altJAFontKey) == altJAFontKey;
+ }
+ }
+
+ public synchronized void preferLocaleFonts() {
+
+ /* Test if re-ordering will have any effect */
+ if (!FontConfiguration.willReorderForStartupLocale()) {
+ return;
+ }
+
+ if (!maybeMultiAppContext()) {
+ if (gLocalePref == true) {
+ return;
+ }
+ gLocalePref = true;
+ createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
+ _usingAlternateComposites = true;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ if (appContext.get(localeFontKey) == localeFontKey) {
+ return;
+ }
+ appContext.put(localeFontKey, localeFontKey);
+ boolean acPropPref =
+ appContext.get(proportionalFontKey) == proportionalFontKey;
+ ConcurrentHashMap<String, Font2D>
+ altNameCache = new ConcurrentHashMap<String, Font2D> ();
+ /* If there is an existing hashtable, we can drop it. */
+ appContext.put(CompositeFont.class, altNameCache);
+ _usingPerAppContextComposites = true;
+ createCompositeFonts(altNameCache, true, acPropPref);
+ }
+ }
+
+ public synchronized void preferProportionalFonts() {
+
+ /* If no proportional fonts are configured, there's no need
+ * to take any action.
+ */
+ if (!FontConfiguration.hasMonoToPropMap()) {
+ return;
+ }
+
+ if (!maybeMultiAppContext()) {
+ if (gPropPref == true) {
+ return;
+ }
+ gPropPref = true;
+ createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
+ _usingAlternateComposites = true;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ if (appContext.get(proportionalFontKey) == proportionalFontKey) {
+ return;
+ }
+ appContext.put(proportionalFontKey, proportionalFontKey);
+ boolean acLocalePref =
+ appContext.get(localeFontKey) == localeFontKey;
+ ConcurrentHashMap<String, Font2D>
+ altNameCache = new ConcurrentHashMap<String, Font2D> ();
+ /* If there is an existing hashtable, we can drop it. */
+ appContext.put(CompositeFont.class, altNameCache);
+ _usingPerAppContextComposites = true;
+ createCompositeFonts(altNameCache, acLocalePref, true);
+ }
+ }
+
+ private static HashSet<String> installedNames = null;
+ private static HashSet<String> getInstalledNames() {
+ if (installedNames == null) {
+ Locale l = getSystemStartupLocale();
+ SunFontManager fontManager = SunFontManager.getInstance();
+ String[] installedFamilies =
+ fontManager.getInstalledFontFamilyNames(l);
+ Font[] installedFonts = fontManager.getAllInstalledFonts();
+ HashSet<String> names = new HashSet<String>();
+ for (int i=0; i<installedFamilies.length; i++) {
+ names.add(installedFamilies[i].toLowerCase(l));
+ }
+ for (int i=0; i<installedFonts.length; i++) {
+ names.add(installedFonts[i].getFontName(l).toLowerCase(l));
+ }
+ installedNames = names;
+ }
+ return installedNames;
+ }
+
+ /* Keys are used to lookup per-AppContext Hashtables */
+ private static final Object regFamilyKey = new Object();
+ private static final Object regFullNameKey = new Object();
+ private Hashtable<String,FontFamily> createdByFamilyName;
+ private Hashtable<String,Font2D> createdByFullName;
+ private boolean fontsAreRegistered = false;
+ private boolean fontsAreRegisteredPerAppContext = false;
+
+ public boolean registerFont(Font font) {
+ /* This method should not be called with "null".
+ * It is the caller's responsibility to ensure that.
+ */
+ if (font == null) {
+ return false;
+ }
+
+ /* Initialise these objects only once we start to use this API */
+ synchronized (regFamilyKey) {
+ if (createdByFamilyName == null) {
+ createdByFamilyName = new Hashtable<String,FontFamily>();
+ createdByFullName = new Hashtable<String,Font2D>();
+ }
+ }
+
+ if (! FontAccess.getFontAccess().isCreatedFont(font)) {
+ return false;
+ }
+ /* We want to ensure that this font cannot override existing
+ * installed fonts. Check these conditions :
+ * - family name is not that of an installed font
+ * - full name is not that of an installed font
+ * - family name is not the same as the full name of an installed font
+ * - full name is not the same as the family name of an installed font
+ * The last two of these may initially look odd but the reason is
+ * that (unfortunately) Font constructors do not distinuguish these.
+ * An extreme example of such a problem would be a font which has
+ * family name "Dialog.Plain" and full name of "Dialog".
+ * The one arguably overly stringent restriction here is that if an
+ * application wants to supply a new member of an existing family
+ * It will get rejected. But since the JRE can perform synthetic
+ * styling in many cases its not necessary.
+ * We don't apply the same logic to registered fonts. If apps want
+ * to do this lets assume they have a reason. It won't cause problems
+ * except for themselves.
+ */
+ HashSet<String> names = getInstalledNames();
+ Locale l = getSystemStartupLocale();
+ String familyName = font.getFamily(l).toLowerCase();
+ String fullName = font.getFontName(l).toLowerCase();
+ if (names.contains(familyName) || names.contains(fullName)) {
+ return false;
+ }
+
+ /* Checks passed, now register the font */
+ Hashtable<String,FontFamily> familyTable;
+ Hashtable<String,Font2D> fullNameTable;
+ if (!maybeMultiAppContext()) {
+ familyTable = createdByFamilyName;
+ fullNameTable = createdByFullName;
+ fontsAreRegistered = true;
+ } else {
+ AppContext appContext = AppContext.getAppContext();
+ familyTable =
+ (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+ fullNameTable =
+ (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+ if (familyTable == null) {
+ familyTable = new Hashtable<String,FontFamily>();
+ fullNameTable = new Hashtable<String,Font2D>();
+ appContext.put(regFamilyKey, familyTable);
+ appContext.put(regFullNameKey, fullNameTable);
+ }
+ fontsAreRegisteredPerAppContext = true;
+ }
+ /* Create the FontFamily and add font to the tables */
+ Font2D font2D = FontUtilities.getFont2D(font);
+ int style = font2D.getStyle();
+ FontFamily family = familyTable.get(familyName);
+ if (family == null) {
+ family = new FontFamily(font.getFamily(l));
+ familyTable.put(familyName, family);
+ }
+ /* Remove name cache entries if not using app contexts.
+ * To accommodate a case where code may have registered first a plain
+ * family member and then used it and is now registering a bold family
+ * member, we need to remove all members of the family, so that the
+ * new style can get picked up rather than continuing to synthesise.
+ */
+ if (fontsAreRegistered) {
+ removeFromCache(family.getFont(Font.PLAIN));
+ removeFromCache(family.getFont(Font.BOLD));
+ removeFromCache(family.getFont(Font.ITALIC));
+ removeFromCache(family.getFont(Font.BOLD|Font.ITALIC));
+ removeFromCache(fullNameTable.get(fullName));
+ }
+ family.setFont(font2D, style);
+ fullNameTable.put(fullName, font2D);
+ return true;
+ }
+
+ /* Remove from the name cache all references to the Font2D */
+ private void removeFromCache(Font2D font) {
+ if (font == null) {
+ return;
+ }
+ String[] keys = (String[])(fontNameCache.keySet().toArray(STR_ARRAY));
+ for (int k=0; k<keys.length;k++) {
+ if (fontNameCache.get(keys[k]) == font) {
+ fontNameCache.remove(keys[k]);
+ }
+ }
+ }
+
+ // It may look odd to use TreeMap but its more convenient to the caller.
+ public TreeMap<String, String> getCreatedFontFamilyNames() {
+
+ Hashtable<String,FontFamily> familyTable;
+ if (fontsAreRegistered) {
+ familyTable = createdByFamilyName;
+ } else if (fontsAreRegisteredPerAppContext) {
+ AppContext appContext = AppContext.getAppContext();
+ familyTable =
+ (Hashtable<String,FontFamily>)appContext.get(regFamilyKey);
+ } else {
+ return null;
+ }
+
+ Locale l = getSystemStartupLocale();
+ synchronized (familyTable) {
+ TreeMap<String, String> map = new TreeMap<String, String>();
+ for (FontFamily f : familyTable.values()) {
+ Font2D font2D = f.getFont(Font.PLAIN);
+ if (font2D == null) {
+ font2D = f.getClosestStyle(Font.PLAIN);
+ }
+ String name = font2D.getFamilyName(l);
+ map.put(name.toLowerCase(l), name);
+ }
+ return map;
+ }
+ }
+
+ public Font[] getCreatedFonts() {
+
+ Hashtable<String,Font2D> nameTable;
+ if (fontsAreRegistered) {
+ nameTable = createdByFullName;
+ } else if (fontsAreRegisteredPerAppContext) {
+ AppContext appContext = AppContext.getAppContext();
+ nameTable =
+ (Hashtable<String,Font2D>)appContext.get(regFullNameKey);
+ } else {
+ return null;
+ }
+
+ Locale l = getSystemStartupLocale();
+ synchronized (nameTable) {
+ Font[] fonts = new Font[nameTable.size()];
+ int i=0;
+ for (Font2D font2D : nameTable.values()) {
+ fonts[i++] = new Font(font2D.getFontName(l), Font.PLAIN, 1);
+ }
+ return fonts;
+ }
+ }
+
+ protected String[] getPlatformFontDirs(boolean noType1Fonts) {
+ String path = getFontPath(true);
+ StringTokenizer parser =
+ new StringTokenizer(path, File.pathSeparator);
+ ArrayList<String> pathList = new ArrayList<String>();
+ try {
+ while (parser.hasMoreTokens()) {
+ pathList.add(parser.nextToken());
+ }
+ } catch (NoSuchElementException e) {
+ }
+ return pathList.toArray(new String[0]);
+ }
+
+ /**
+ * Returns an array of two strings. The first element is the
+ * name of the font. The second element is the file name.
+ */
+ public abstract String[] getDefaultPlatformFont();
+
+ // Begin: Refactored from SunGraphicsEnviroment.
+
+ /*
+ * helper function for registerFonts
+ */
+ private void addDirFonts(String dirName, File dirFile,
+ FilenameFilter filter,
+ int fontFormat, boolean useJavaRasterizer,
+ int fontRank,
+ boolean defer, boolean resolveSymLinks) {
+ String[] ls = dirFile.list(filter);
+ if (ls == null || ls.length == 0) {
+ return;
+ }
+ String[] fontNames = new String[ls.length];
+ String[][] nativeNames = new String[ls.length][];
+ int fontCount = 0;
+
+ for (int i=0; i < ls.length; i++ ) {
+ File theFile = new File(dirFile, ls[i]);
+ String fullName = null;
+ if (resolveSymLinks) {
+ try {
+ fullName = theFile.getCanonicalPath();
+ } catch (IOException e) {
+ }
+ }
+ if (fullName == null) {
+ fullName = dirName + File.separator + ls[i];
+ }
+
+ // REMIND: case compare depends on platform
+ if (registeredFontFiles.contains(fullName)) {
+ continue;
+ }
+
+ if (badFonts != null && badFonts.contains(fullName)) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .warning("skip bad font " + fullName);
+ }
+ continue; // skip this font file.
+ }
+
+ registeredFontFiles.add(fullName);
+
+ if (FontUtilities.debugFonts()
+ && FontUtilities.getLogger().isLoggable(PlatformLogger.INFO)) {
+ String message = "Registering font " + fullName;
+ String[] natNames = getNativeNames(fullName, null);
+ if (natNames == null) {
+ message += " with no native name";
+ } else {
+ message += " with native name(s) " + natNames[0];
+ for (int nn = 1; nn < natNames.length; nn++) {
+ message += ", " + natNames[nn];
+ }
+ }
+ FontUtilities.getLogger().info(message);
+ }
+ fontNames[fontCount] = fullName;
+ nativeNames[fontCount++] = getNativeNames(fullName, null);
+ }
+ registerFonts(fontNames, nativeNames, fontCount, fontFormat,
+ useJavaRasterizer, fontRank, defer);
+ return;
+ }
+
+ protected String[] getNativeNames(String fontFileName,
+ String platformName) {
+ return null;
+ }
+
+ /**
+ * Returns a file name for the physical font represented by this platform
+ * font name. The default implementation tries to obtain the file name
+ * from the font configuration.
+ * Subclasses may override to provide information from other sources.
+ */
+ protected String getFileNameFromPlatformName(String platformFontName) {
+ return fontConfig.getFileNameFromPlatformName(platformFontName);
+ }
+
+ /**
+ * Return the default font configuration.
+ */
+ public FontConfiguration getFontConfiguration() {
+ return fontConfig;
+ }
+
+ /* A call to this method should be followed by a call to
+ * registerFontDirs(..)
+ */
+ protected String getPlatformFontPath(boolean noType1Font) {
+ if (fontPath == null) {
+ fontPath = getFontPath(noType1Font);
+ }
+ return fontPath;
+ }
+
+ public static boolean isOpenJDK() {
+ return FontUtilities.isOpenJDK;
+ }
+
+ protected void loadFonts() {
+ if (discoveredAllFonts) {
+ return;
+ }
+ /* Use lock specific to the font system */
+ synchronized (lucidaFontName) {
+ if (FontUtilities.debugFonts()) {
+ Thread.dumpStack();
+ FontUtilities.getLogger()
+ .info("SunGraphicsEnvironment.loadFonts() called");
+ }
+ initialiseDeferredFonts();
+
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ if (fontPath == null) {
+ fontPath = getPlatformFontPath(noType1Font);
+ registerFontDirs(fontPath);
+ }
+ if (fontPath != null) {
+ // this will find all fonts including those already
+ // registered. But we have checks in place to prevent
+ // double registration.
+ if (! gotFontsFromPlatform()) {
+ registerFontsOnPath(fontPath, false,
+ Font2D.UNKNOWN_RANK,
+ false, true);
+ loadedAllFontFiles = true;
+ }
+ }
+ registerOtherFontFiles(registeredFontFiles);
+ discoveredAllFonts = true;
+ return null;
+ }
+ });
+ }
+ }
+
+ protected void registerFontDirs(String pathName) {
+ return;
+ }
+
+ private void registerFontsOnPath(String pathName,
+ boolean useJavaRasterizer, int fontRank,
+ boolean defer, boolean resolveSymLinks) {
+
+ StringTokenizer parser = new StringTokenizer(pathName,
+ File.pathSeparator);
+ try {
+ while (parser.hasMoreTokens()) {
+ registerFontsInDir(parser.nextToken(),
+ useJavaRasterizer, fontRank,
+ defer, resolveSymLinks);
+ }
+ } catch (NoSuchElementException e) {
+ }
+ }
+
+ /* Called to register fall back fonts */
+ public void registerFontsInDir(String dirName) {
+ registerFontsInDir(dirName, true, Font2D.JRE_RANK, true, false);
+ }
+
+ private void registerFontsInDir(String dirName, boolean useJavaRasterizer,
+ int fontRank,
+ boolean defer, boolean resolveSymLinks) {
+ File pathFile = new File(dirName);
+ addDirFonts(dirName, pathFile, ttFilter,
+ FONTFORMAT_TRUETYPE, useJavaRasterizer,
+ fontRank==Font2D.UNKNOWN_RANK ?
+ Font2D.TTF_RANK : fontRank,
+ defer, resolveSymLinks);
+ addDirFonts(dirName, pathFile, t1Filter,
+ FONTFORMAT_TYPE1, useJavaRasterizer,
+ fontRank==Font2D.UNKNOWN_RANK ?
+ Font2D.TYPE1_RANK : fontRank,
+ defer, resolveSymLinks);
+ }
+
+ protected void registerFontDir(String path) {
+ }
+
+ /**
+ * Returns file name for default font, either absolute
+ * or relative as needed by registerFontFile.
+ */
+ public synchronized String getDefaultFontFile() {
+ if (defaultFontFileName == null) {
+ initDefaultFonts();
+ }
+ return defaultFontFileName;
+ }
+
+ private void initDefaultFonts() {
+ if (!isOpenJDK()) {
+ defaultFontName = lucidaFontName;
+ if (useAbsoluteFontFileNames()) {
+ defaultFontFileName =
+ jreFontDirName + File.separator + FontUtilities.LUCIDA_FILE_NAME;
+ } else {
+ defaultFontFileName = FontUtilities.LUCIDA_FILE_NAME;
+ }
+ }
+ }
+
+ /**
+ * Whether registerFontFile expects absolute or relative
+ * font file names.
+ */
+ protected boolean useAbsoluteFontFileNames() {
+ return true;
+ }
+
+ /**
+ * Creates this environment's FontConfiguration.
+ */
+ protected abstract FontConfiguration createFontConfiguration();
+
+ public abstract FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+ boolean preferPropFonts);
+
+ /**
+ * Returns face name for default font, or null if
+ * no face names are used for CompositeFontDescriptors
+ * for this platform.
+ */
+ public synchronized String getDefaultFontFaceName() {
+ if (defaultFontName == null) {
+ initDefaultFonts();
+ }
+ return defaultFontName;
+ }
+
+ public void loadFontFiles() {
+ loadFonts();
+ if (loadedAllFontFiles) {
+ return;
+ }
+ /* Use lock specific to the font system */
+ synchronized (lucidaFontName) {
+ if (FontUtilities.debugFonts()) {
+ Thread.dumpStack();
+ FontUtilities.getLogger().info("loadAllFontFiles() called");
+ }
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ if (fontPath == null) {
+ fontPath = getPlatformFontPath(noType1Font);
+ }
+ if (fontPath != null) {
+ // this will find all fonts including those already
+ // registered. But we have checks in place to prevent
+ // double registration.
+ registerFontsOnPath(fontPath, false,
+ Font2D.UNKNOWN_RANK,
+ false, true);
+ }
+ loadedAllFontFiles = true;
+ return null;
+ }
+ });
+ }
+ }
+
+ /*
+ * This method asks the font configuration API for all platform names
+ * used as components of composite/logical fonts and iterates over these
+ * looking up their corresponding file name and registers these fonts.
+ * It also ensures that the fonts are accessible via platform APIs.
+ * The composites themselves are then registered.
+ */
+ private void
+ initCompositeFonts(FontConfiguration fontConfig,
+ ConcurrentHashMap<String, Font2D> altNameCache) {
+
+ int numCoreFonts = fontConfig.getNumberCoreFonts();
+ String[] fcFonts = fontConfig.getPlatformFontNames();
+ for (int f=0; f<fcFonts.length; f++) {
+ String platformFontName = fcFonts[f];
+ String fontFileName =
+ getFileNameFromPlatformName(platformFontName);
+ String[] nativeNames = null;
+ if (fontFileName == null
+ || fontFileName.equals(platformFontName)) {
+ /* No file located, so register using the platform name,
+ * i.e. as a native font.
+ */
+ fontFileName = platformFontName;
+ } else {
+ if (f < numCoreFonts) {
+ /* If platform APIs also need to access the font, add it
+ * to a set to be registered with the platform too.
+ * This may be used to add the parent directory to the X11
+ * font path if its not already there. See the docs for the
+ * subclass implementation.
+ * This is now mainly for the benefit of X11-based AWT
+ * But for historical reasons, 2D initialisation code
+ * makes these calls.
+ * If the fontconfiguration file is properly set up
+ * so that all fonts are mapped to files and all their
+ * appropriate directories are specified, then this
+ * method will be low cost as it will return after
+ * a test that finds a null lookup map.
+ */
+ addFontToPlatformFontPath(platformFontName);
+ }
+ nativeNames = getNativeNames(fontFileName, platformFontName);
+ }
+ /* Uncomment these two lines to "generate" the XLFD->filename
+ * mappings needed to speed start-up on Solaris.
+ * Augment this with the appendedpathname and the mappings
+ * for native (F3) fonts
+ */
+ //String platName = platformFontName.replaceAll(" ", "_");
+ //System.out.println("filename."+platName+"="+fontFileName);
+ registerFontFile(fontFileName, nativeNames,
+ Font2D.FONT_CONFIG_RANK, true);
+
+
+ }
+ /* This registers accumulated paths from the calls to
+ * addFontToPlatformFontPath(..) and any specified by
+ * the font configuration. Rather than registering
+ * the fonts it puts them in a place and form suitable for
+ * the Toolkit to pick up and use if a toolkit is initialised,
+ * and if it uses X11 fonts.
+ */
+ registerPlatformFontsUsedByFontConfiguration();
+
+ CompositeFontDescriptor[] compositeFontInfo
+ = fontConfig.get2DCompositeFontInfo();
+ for (int i = 0; i < compositeFontInfo.length; i++) {
+ CompositeFontDescriptor descriptor = compositeFontInfo[i];
+ String[] componentFileNames = descriptor.getComponentFileNames();
+ String[] componentFaceNames = descriptor.getComponentFaceNames();
+
+ /* It would be better eventually to handle this in the
+ * FontConfiguration code which should also remove duplicate slots
+ */
+ if (missingFontFiles != null) {
+ for (int ii=0; ii<componentFileNames.length; ii++) {
+ if (missingFontFiles.contains(componentFileNames[ii])) {
+ componentFileNames[ii] = getDefaultFontFile();
+ componentFaceNames[ii] = getDefaultFontFaceName();
+ }
+ }
+ }
+
+ /* FontConfiguration needs to convey how many fonts it has added
+ * as fallback component fonts which should not affect metrics.
+ * The core component count will be the number of metrics slots.
+ * This does not preclude other mechanisms for adding
+ * fall back component fonts to the composite.
+ */
+ if (altNameCache != null) {
+ SunFontManager.registerCompositeFont(
+ descriptor.getFaceName(),
+ componentFileNames, componentFaceNames,
+ descriptor.getCoreComponentCount(),
+ descriptor.getExclusionRanges(),
+ descriptor.getExclusionRangeLimits(),
+ true,
+ altNameCache);
+ } else {
+ registerCompositeFont(descriptor.getFaceName(),
+ componentFileNames, componentFaceNames,
+ descriptor.getCoreComponentCount(),
+ descriptor.getExclusionRanges(),
+ descriptor.getExclusionRangeLimits(),
+ true);
+ }
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .info("registered " + descriptor.getFaceName());
+ }
+ }
+ }
+
+ /**
+ * Notifies graphics environment that the logical font configuration
+ * uses the given platform font name. The graphics environment may
+ * use this for platform specific initialization.
+ */
+ protected void addFontToPlatformFontPath(String platformFontName) {
+ }
+
+ protected void registerFontFile(String fontFileName, String[] nativeNames,
+ int fontRank, boolean defer) {
+// REMIND: case compare depends on platform
+ if (registeredFontFiles.contains(fontFileName)) {
+ return;
+ }
+ int fontFormat;
+ if (ttFilter.accept(null, fontFileName)) {
+ fontFormat = FONTFORMAT_TRUETYPE;
+ } else if (t1Filter.accept(null, fontFileName)) {
+ fontFormat = FONTFORMAT_TYPE1;
+ } else {
+ fontFormat = FONTFORMAT_NATIVE;
+ }
+ registeredFontFiles.add(fontFileName);
+ if (defer) {
+ registerDeferredFont(fontFileName, fontFileName, nativeNames,
+ fontFormat, false, fontRank);
+ } else {
+ registerFontFile(fontFileName, nativeNames, fontFormat, false,
+ fontRank);
+ }
+ }
+
+ protected void registerPlatformFontsUsedByFontConfiguration() {
+ }
+
+ /*
+ * A GE may verify whether a font file used in a fontconfiguration
+ * exists. If it doesn't then either we may substitute the default
+ * font, or perhaps elide it altogether from the composite font.
+ * This makes some sense on windows where the font file is only
+ * likely to be in one place. But on other OSes, eg Linux, the file
+ * can move around depending. So there we probably don't want to assume
+ * its missing and so won't add it to this list.
+ * If this list - missingFontFiles - is non-null then the composite
+ * font initialisation logic tests to see if a font file is in that
+ * set.
+ * Only one thread should be able to add to this set so we don't
+ * synchronize.
+ */
+ protected void addToMissingFontFileList(String fileName) {
+ if (missingFontFiles == null) {
+ missingFontFiles = new HashSet<String>();
+ }
+ missingFontFiles.add(fileName);
+ }
+
+ /*
+ * This is for use only within getAllFonts().
+ * Fonts listed in the fontconfig files for windows were all
+ * on the "deferred" initialisation list. They were registered
+ * either in the course of the application, or in the call to
+ * loadFonts() within getAllFonts(). The fontconfig file specifies
+ * the names of the fonts using the English names. If there's a
+ * different name in the execution locale, then the platform will
+ * report that, and we will construct the font with both names, and
+ * thereby enumerate it twice. This happens for Japanese fonts listed
+ * in the windows fontconfig, when run in the JA locale. The solution
+ * is to rely (in this case) on the platform's font->file mapping to
+ * determine that this name corresponds to a file we already registered.
+ * This works because
+ * - we know when we get here all deferred fonts are already initialised
+ * - when we register a font file, we register all fonts in it.
+ * - we know the fontconfig fonts are all in the windows registry
+ */
+ private boolean isNameForRegisteredFile(String fontName) {
+ String fileName = getFileNameForFontName(fontName);
+ if (fileName == null) {
+ return false;
+ }
+ return registeredFontFiles.contains(fileName);
+ }
+
+ /*
+ * This invocation is not in a privileged block because
+ * all privileged operations (reading files and properties)
+ * was conducted on the creation of the GE
+ */
+ public void
+ createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
+ boolean preferLocale,
+ boolean preferProportional) {
+
+ FontConfiguration fontConfig =
+ createFontConfiguration(preferLocale, preferProportional);
+ initCompositeFonts(fontConfig, altNameCache);
+ }
+
+ /**
+ * Returns all fonts installed in this environment.
+ */
+ public Font[] getAllInstalledFonts() {
+ if (allFonts == null) {
+ loadFonts();
+ TreeMap fontMapNames = new TreeMap();
+ /* warning: the number of composite fonts could change dynamically
+ * if applications are allowed to create them. "allfonts" could
+ * then be stale.
+ */
+ Font2D[] allfonts = getRegisteredFonts();
+ for (int i=0; i < allfonts.length; i++) {
+ if (!(allfonts[i] instanceof NativeFont)) {
+ fontMapNames.put(allfonts[i].getFontName(null),
+ allfonts[i]);
+ }
+ }
+
+ String[] platformNames = getFontNamesFromPlatform();
+ if (platformNames != null) {
+ for (int i=0; i<platformNames.length; i++) {
+ if (!isNameForRegisteredFile(platformNames[i])) {
+ fontMapNames.put(platformNames[i], null);
+ }
+ }
+ }
+
+ String[] fontNames = null;
+ if (fontMapNames.size() > 0) {
+ fontNames = new String[fontMapNames.size()];
+ Object [] keyNames = fontMapNames.keySet().toArray();
+ for (int i=0; i < keyNames.length; i++) {
+ fontNames[i] = (String)keyNames[i];
+ }
+ }
+ Font[] fonts = new Font[fontNames.length];
+ for (int i=0; i < fontNames.length; i++) {
+ fonts[i] = new Font(fontNames[i], Font.PLAIN, 1);
+ Font2D f2d = (Font2D)fontMapNames.get(fontNames[i]);
+ if (f2d != null) {
+ FontAccess.getFontAccess().setFont2D(fonts[i], f2d.handle);
+ }
+ }
+ allFonts = fonts;
+ }
+
+ Font []copyFonts = new Font[allFonts.length];
+ System.arraycopy(allFonts, 0, copyFonts, 0, allFonts.length);
+ return copyFonts;
+ }
+
+ /**
+ * Get a list of installed fonts in the requested {@link Locale}.
+ * The list contains the fonts Family Names.
+ * If Locale is null, the default locale is used.
+ *
+ * @param requestedLocale, if null the default locale is used.
+ * @return list of installed fonts in the system.
+ */
+ public String[] getInstalledFontFamilyNames(Locale requestedLocale) {
+ if (requestedLocale == null) {
+ requestedLocale = Locale.getDefault();
+ }
+ if (allFamilies != null && lastDefaultLocale != null &&
+ requestedLocale.equals(lastDefaultLocale)) {
+ String[] copyFamilies = new String[allFamilies.length];
+ System.arraycopy(allFamilies, 0, copyFamilies,
+ 0, allFamilies.length);
+ return copyFamilies;
+ }
+
+ TreeMap<String,String> familyNames = new TreeMap<String,String>();
+ // these names are always there and aren't localised
+ String str;
+ str = Font.SERIF; familyNames.put(str.toLowerCase(), str);
+ str = Font.SANS_SERIF; familyNames.put(str.toLowerCase(), str);
+ str = Font.MONOSPACED; familyNames.put(str.toLowerCase(), str);
+ str = Font.DIALOG; familyNames.put(str.toLowerCase(), str);
+ str = Font.DIALOG_INPUT; familyNames.put(str.toLowerCase(), str);
+
+ /* Platform APIs may be used to get the set of available family
+ * names for the current default locale so long as it is the same
+ * as the start-up system locale, rather than loading all fonts.
+ */
+ if (requestedLocale.equals(getSystemStartupLocale()) &&
+ getFamilyNamesFromPlatform(familyNames, requestedLocale)) {
+ /* Augment platform names with JRE font family names */
+ getJREFontFamilyNames(familyNames, requestedLocale);
+ } else {
+ loadFontFiles();
+ Font2D[] physicalfonts = getPhysicalFonts();
+ for (int i=0; i < physicalfonts.length; i++) {
+ if (!(physicalfonts[i] instanceof NativeFont)) {
+ String name =
+ physicalfonts[i].getFamilyName(requestedLocale);
+ familyNames.put(name.toLowerCase(requestedLocale), name);
+ }
+ }
+ }
+
+ String[] retval = new String[familyNames.size()];
+ Object [] keyNames = familyNames.keySet().toArray();
+ for (int i=0; i < keyNames.length; i++) {
+ retval[i] = (String)familyNames.get(keyNames[i]);
+ }
+ if (requestedLocale.equals(Locale.getDefault())) {
+ lastDefaultLocale = requestedLocale;
+ allFamilies = new String[retval.length];
+ System.arraycopy(retval, 0, allFamilies, 0, allFamilies.length);
+ }
+ return retval;
+ }
+
+ public void register1dot0Fonts() {
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ String type1Dir = "/usr/openwin/lib/X11/fonts/Type1";
+ registerFontsInDir(type1Dir, true, Font2D.TYPE1_RANK,
+ false, false);
+ return null;
+ }
+ });
+ }
+
+ /* Really we need only the JRE fonts family names, but there's little
+ * overhead in doing this the easy way by adding all the currently
+ * known fonts.
+ */
+ protected void getJREFontFamilyNames(TreeMap<String,String> familyNames,
+ Locale requestedLocale) {
+ registerDeferredJREFonts(jreFontDirName);
+ Font2D[] physicalfonts = getPhysicalFonts();
+ for (int i=0; i < physicalfonts.length; i++) {
+ if (!(physicalfonts[i] instanceof NativeFont)) {
+ String name =
+ physicalfonts[i].getFamilyName(requestedLocale);
+ familyNames.put(name.toLowerCase(requestedLocale), name);
+ }
+ }
+ }
+
+ /**
+ * Default locale can be changed but we need to know the initial locale
+ * as that is what is used by native code. Changing Java default locale
+ * doesn't affect that.
+ * Returns the locale in use when using native code to communicate
+ * with platform APIs. On windows this is known as the "system" locale,
+ * and it is usually the same as the platform locale, but not always,
+ * so this method also checks an implementation property used only
+ * on windows and uses that if set.
+ */
+ private static Locale systemLocale = null;
+ private static Locale getSystemStartupLocale() {
+ if (systemLocale == null) {
+ systemLocale = (Locale)
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ /* On windows the system locale may be different than the
+ * user locale. This is an unsupported configuration, but
+ * in that case we want to return a dummy locale that will
+ * never cause a match in the usage of this API. This is
+ * important because Windows documents that the family
+ * names of fonts are enumerated using the language of
+ * the system locale. BY returning a dummy locale in that
+ * case we do not use the platform API which would not
+ * return us the names we want.
+ */
+ String fileEncoding = System.getProperty("file.encoding", "");
+ String sysEncoding = System.getProperty("sun.jnu.encoding");
+ if (sysEncoding != null && !sysEncoding.equals(fileEncoding)) {
+ return Locale.ROOT;
+ }
+
+ String language = System.getProperty("user.language", "en");
+ String country = System.getProperty("user.country","");
+ String variant = System.getProperty("user.variant","");
+ return new Locale(language, country, variant);
+ }
+ });
+ }
+ return systemLocale;
+ }
+
+ void addToPool(FileFont font) {
+
+ FileFont fontFileToClose = null;
+ int freeSlot = -1;
+
+ synchronized (fontFileCache) {
+ /* Avoid duplicate entries in the pool, and don't close() it,
+ * since this method is called only from within open().
+ * Seeing a duplicate is most likely to happen if the thread
+ * was interrupted during a read, forcing perhaps repeated
+ * close and open calls and it eventually it ends up pointing
+ * at the same slot.
+ */
+ for (int i=0;i<CHANNELPOOLSIZE;i++) {
+ if (fontFileCache[i] == font) {
+ return;
+ }
+ if (fontFileCache[i] == null && freeSlot < 0) {
+ freeSlot = i;
+ }
+ }
+ if (freeSlot >= 0) {
+ fontFileCache[freeSlot] = font;
+ return;
+ } else {
+ /* replace with new font. */
+ fontFileToClose = fontFileCache[lastPoolIndex];
+ fontFileCache[lastPoolIndex] = font;
+ /* lastPoolIndex is updated so that the least recently opened
+ * file will be closed next.
+ */
+ lastPoolIndex = (lastPoolIndex+1) % CHANNELPOOLSIZE;
+ }
+ }
+ /* Need to close the font file outside of the synchronized block,
+ * since its possible some other thread is in an open() call on
+ * this font file, and could be holding its lock and the pool lock.
+ * Releasing the pool lock allows that thread to continue, so it can
+ * then release the lock on this font, allowing the close() call
+ * below to proceed.
+ * Also, calling close() is safe because any other thread using
+ * the font we are closing() synchronizes all reading, so we
+ * will not close the file while its in use.
+ */
+ if (fontFileToClose != null) {
+ fontFileToClose.close();
+ }
+ }
+
+ protected FontUIResource getFontConfigFUIR(String family, int style,
+ int size)
+ {
+ return new FontUIResource(family, style, size);
+ }
+}
diff --git a/src/share/classes/sun/font/TrueTypeFont.java b/src/share/classes/sun/font/TrueTypeFont.java
index 01893d6..ab769f2 100644
--- a/src/share/classes/sun/font/TrueTypeFont.java
+++ b/src/share/classes/sun/font/TrueTypeFont.java
@@ -39,9 +39,10 @@
import java.nio.ShortBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.FileChannel;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Locale;
-import java.util.logging.Level;
import sun.java2d.Disposer;
import sun.java2d.DisposerRecord;
@@ -101,6 +102,9 @@
public static final int FULL_NAME_ID = 4;
public static final int POSTSCRIPT_NAME_ID = 6;
+ private static final short US_LCID = 0x0409; // US English - default
+
+ private static Map<String, Short> lcidMap;
class DirectoryEntry {
int tag;
@@ -176,7 +180,7 @@
* @throws FontFormatException - if the font can't be opened
* or fails verification, or there's no usable cmap
*/
- TrueTypeFont(String platname, Object nativeNames, int fIndex,
+ public TrueTypeFont(String platname, Object nativeNames, int fIndex,
boolean javaRasterizer)
throws FontFormatException {
super(platname, nativeNames);
@@ -207,12 +211,13 @@
* as PCF bitmap fonts on the X11 font path).
* This method is called when creating the first strike for this font.
*/
+ @Override
protected boolean checkUseNatives() {
if (checkedNatives) {
return useNatives;
}
- if (!FontManager.isSolaris || useJavaRasterizer ||
- FontManager.useT2K || nativeNames == null ||
+ if (!FontUtilities.isSolaris || useJavaRasterizer ||
+ FontUtilities.useT2K || nativeNames == null ||
getDirectoryEntry(EBLCTag) != null ||
GraphicsEnvironment.isHeadless()) {
checkedNatives = true;
@@ -279,8 +284,8 @@
*/
private synchronized FileChannel open() throws FontFormatException {
if (disposerRecord.channel == null) {
- if (FontManager.logging) {
- FontManager.logger.info("open TTF: " + platName);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().info("open TTF: " + platName);
}
try {
RandomAccessFile raf = (RandomAccessFile)
@@ -296,7 +301,10 @@
});
disposerRecord.channel = raf.getChannel();
fileSize = (int)disposerRecord.channel.size();
- FontManager.addToPool(this);
+ FontManager fm = FontManagerFactory.getInstance();
+ if (fm instanceof SunFontManager) {
+ ((SunFontManager) fm).addToPool(this);
+ }
} catch (NullPointerException e) {
close();
throw new FontFormatException(e.toString());
@@ -340,11 +348,11 @@
* isn't updated. If the file has changed whilst we
* are executing we want to bail, not spin.
*/
- if (FontManager.logging) {
+ if (FontUtilities.isLogging()) {
String msg = "Read offset is " + offset +
" file size is " + fileSize+
" file is " + platName;
- FontManager.logger.severe(msg);
+ FontUtilities.getLogger().severe(msg);
}
return -1;
} else {
@@ -362,8 +370,8 @@
msg += " File size was " + fileSize +
" and now is " + currSize;
}
- if (FontManager.logging) {
- FontManager.logger.severe(msg);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().severe(msg);
}
// We could still flip() the buffer here because
// it's possible that we did read some data in
@@ -377,10 +385,10 @@
// data was read to probably continue.
if (bread > length/2 || bread > 16384) {
buffer.flip();
- if (FontManager.logging) {
+ if (FontUtilities.isLogging()) {
msg = "Returning " + bread +
" bytes instead of " + length;
- FontManager.logger.severe(msg);
+ FontUtilities.getLogger().severe(msg);
}
} else {
bread = -1;
@@ -395,8 +403,8 @@
}
}
} catch (FontFormatException e) {
- if (FontManager.logging) {
- FontManager.logger.log(Level.SEVERE,
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().severe(
"While reading " + platName, e);
}
bread = -1; // signal EOF
@@ -416,8 +424,8 @@
* seems unlikely this would occur as problems opening the
* file are handled as a FontFormatException.
*/
- if (FontManager.logging) {
- FontManager.logger.log(Level.SEVERE,
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().severe(
"While reading " + platName, e);
}
if (bread == 0) {
@@ -540,8 +548,8 @@
}
initNames();
} catch (Exception e) {
- if (FontManager.logging) {
- FontManager.logger.severe(e.toString());
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().severe(e.toString());
}
if (e instanceof FontFormatException) {
throw (FontFormatException)e;
@@ -687,7 +695,7 @@
return defaultCodePage;
}
- if (FontManager.isWindows) {
+ if (FontUtilities.isWindows) {
defaultCodePage =
(String)java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("file.encoding"));
@@ -724,6 +732,7 @@
/* Theoretically, reserved bits must not be set, include symbol bits */
public static final int reserved_bits1 = 0x80000000;
public static final int reserved_bits2 = 0x0000ffff;
+ @Override
boolean supportsEncoding(String encoding) {
if (encoding == null) {
encoding = getCodePage();
@@ -858,6 +867,7 @@
}
}
+ @Override
byte[] getTableBytes(int tag) {
ByteBuffer buffer = getTableBuffer(tag);
if (buffer == null) {
@@ -932,6 +942,7 @@
/* This probably won't get called but is there to support the
* contract() of setStyle() defined in the superclass.
*/
+ @Override
protected void setStyle() {
setStyle(getTableBuffer(os_2Tag));
}
@@ -977,7 +988,7 @@
style = Font.ITALIC;
break;
case fsSelectionBoldBit:
- if (FontManager.isSolaris && platName.endsWith("HG-GothicB.ttf")) {
+ if (FontUtilities.isSolaris && platName.endsWith("HG-GothicB.ttf")) {
/* Workaround for Solaris's use of a JA font that's marked as
* being designed bold, but is used as a PLAIN font.
*/
@@ -1015,6 +1026,7 @@
ulPos = -sb.get(4) / (float)upem;
}
+ @Override
public void getStyleMetrics(float pointSize, float[] metrics, int offset) {
if (ulSize == 0f && ulPos == 0f) {
@@ -1075,8 +1087,8 @@
try {
return new String(bytes, 0, len, charset);
} catch (UnsupportedEncodingException e) {
- if (FontManager.logging) {
- FontManager.logger.warning(e + " EncodingID=" + encoding);
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().warning(e + " EncodingID=" + encoding);
}
return new String(bytes, 0, len);
} catch (Throwable t) {
@@ -1101,7 +1113,7 @@
int stringPtr = sbuffer.get() & 0xffff;
nameLocale = sun.awt.SunToolkit.getStartupLocale();
- short nameLocaleID = FontManager.getLCIDFromLocale(nameLocale);
+ short nameLocaleID = getLCIDFromLocale(nameLocale);
for (int i=0; i<numRecords; i++) {
short platformID = sbuffer.get();
@@ -1232,7 +1244,7 @@
protected synchronized FontScaler getScaler() {
if (scaler == null) {
- scaler = FontManager.getScaler(this, fontIndex,
+ scaler = FontScaler.getScaler(this, fontIndex,
supportsCJK, fileSize);
}
return scaler;
@@ -1242,6 +1254,7 @@
/* Postscript name is rarely requested. Don't waste cycles locating it
* as part of font creation, nor storage to hold it. Get it only on demand.
*/
+ @Override
public String getPostscriptName() {
String name = lookupName(ENGLISH_LOCALE_ID, POSTSCRIPT_NAME_ID);
if (name == null) {
@@ -1251,13 +1264,14 @@
}
}
+ @Override
public String getFontName(Locale locale) {
if (locale == null) {
return fullName;
} else if (locale.equals(nameLocale) && localeFullName != null) {
return localeFullName;
} else {
- short localeID = FontManager.getLCIDFromLocale(locale);
+ short localeID = getLCIDFromLocale(locale);
String name = lookupName(localeID, FULL_NAME_ID);
if (name == null) {
return fullName;
@@ -1267,16 +1281,239 @@
}
}
+ // Return a Microsoft LCID from the given Locale.
+ // Used when getting localized font data.
+
+ private static void addLCIDMapEntry(Map<String, Short> map,
+ String key, short value) {
+ map.put(key, Short.valueOf(value));
+ }
+
+ private static synchronized void createLCIDMap() {
+ if (lcidMap != null) {
+ return;
+ }
+
+ Map<String, Short> map = new HashMap<String, Short>(200);
+
+ // the following statements are derived from the langIDMap
+ // in src/windows/native/java/lang/java_props_md.c using the following
+ // awk script:
+ // $1~/\/\*/ { next}
+ // $3~/\?\?/ { next }
+ // $3!~/_/ { next }
+ // $1~/0x0409/ { next }
+ // $1~/0x0c0a/ { next }
+ // $1~/0x042c/ { next }
+ // $1~/0x0443/ { next }
+ // $1~/0x0812/ { next }
+ // $1~/0x04/ { print " addLCIDMapEntry(map, " substr($3, 0, 3) "\", (short) " substr($1, 0, 6) ");" ; next }
+ // $3~/,/ { print " addLCIDMapEntry(map, " $3 " (short) " substr($1, 0, 6) ");" ; next }
+ // { print " addLCIDMapEntry(map, " $3 ", (short) " substr($1, 0, 6) ");" ; next }
+ // The lines of this script:
+ // - eliminate comments
+ // - eliminate questionable locales
+ // - eliminate language-only locales
+ // - eliminate the default LCID value
+ // - eliminate a few other unneeded LCID values
+ // - print language-only locale entries for x04* LCID values
+ // (apparently Microsoft doesn't use language-only LCID values -
+ // see http://www.microsoft.com/OpenType/otspec/name.htm
+ // - print complete entries for all other LCID values
+ // Run
+ // awk -f awk-script langIDMap > statements
+ addLCIDMapEntry(map, "ar", (short) 0x0401);
+ addLCIDMapEntry(map, "bg", (short) 0x0402);
+ addLCIDMapEntry(map, "ca", (short) 0x0403);
+ addLCIDMapEntry(map, "zh", (short) 0x0404);
+ addLCIDMapEntry(map, "cs", (short) 0x0405);
+ addLCIDMapEntry(map, "da", (short) 0x0406);
+ addLCIDMapEntry(map, "de", (short) 0x0407);
+ addLCIDMapEntry(map, "el", (short) 0x0408);
+ addLCIDMapEntry(map, "es", (short) 0x040a);
+ addLCIDMapEntry(map, "fi", (short) 0x040b);
+ addLCIDMapEntry(map, "fr", (short) 0x040c);
+ addLCIDMapEntry(map, "iw", (short) 0x040d);
+ addLCIDMapEntry(map, "hu", (short) 0x040e);
+ addLCIDMapEntry(map, "is", (short) 0x040f);
+ addLCIDMapEntry(map, "it", (short) 0x0410);
+ addLCIDMapEntry(map, "ja", (short) 0x0411);
+ addLCIDMapEntry(map, "ko", (short) 0x0412);
+ addLCIDMapEntry(map, "nl", (short) 0x0413);
+ addLCIDMapEntry(map, "no", (short) 0x0414);
+ addLCIDMapEntry(map, "pl", (short) 0x0415);
+ addLCIDMapEntry(map, "pt", (short) 0x0416);
+ addLCIDMapEntry(map, "rm", (short) 0x0417);
+ addLCIDMapEntry(map, "ro", (short) 0x0418);
+ addLCIDMapEntry(map, "ru", (short) 0x0419);
+ addLCIDMapEntry(map, "hr", (short) 0x041a);
+ addLCIDMapEntry(map, "sk", (short) 0x041b);
+ addLCIDMapEntry(map, "sq", (short) 0x041c);
+ addLCIDMapEntry(map, "sv", (short) 0x041d);
+ addLCIDMapEntry(map, "th", (short) 0x041e);
+ addLCIDMapEntry(map, "tr", (short) 0x041f);
+ addLCIDMapEntry(map, "ur", (short) 0x0420);
+ addLCIDMapEntry(map, "in", (short) 0x0421);
+ addLCIDMapEntry(map, "uk", (short) 0x0422);
+ addLCIDMapEntry(map, "be", (short) 0x0423);
+ addLCIDMapEntry(map, "sl", (short) 0x0424);
+ addLCIDMapEntry(map, "et", (short) 0x0425);
+ addLCIDMapEntry(map, "lv", (short) 0x0426);
+ addLCIDMapEntry(map, "lt", (short) 0x0427);
+ addLCIDMapEntry(map, "fa", (short) 0x0429);
+ addLCIDMapEntry(map, "vi", (short) 0x042a);
+ addLCIDMapEntry(map, "hy", (short) 0x042b);
+ addLCIDMapEntry(map, "eu", (short) 0x042d);
+ addLCIDMapEntry(map, "mk", (short) 0x042f);
+ addLCIDMapEntry(map, "tn", (short) 0x0432);
+ addLCIDMapEntry(map, "xh", (short) 0x0434);
+ addLCIDMapEntry(map, "zu", (short) 0x0435);
+ addLCIDMapEntry(map, "af", (short) 0x0436);
+ addLCIDMapEntry(map, "ka", (short) 0x0437);
+ addLCIDMapEntry(map, "fo", (short) 0x0438);
+ addLCIDMapEntry(map, "hi", (short) 0x0439);
+ addLCIDMapEntry(map, "mt", (short) 0x043a);
+ addLCIDMapEntry(map, "se", (short) 0x043b);
+ addLCIDMapEntry(map, "gd", (short) 0x043c);
+ addLCIDMapEntry(map, "ms", (short) 0x043e);
+ addLCIDMapEntry(map, "kk", (short) 0x043f);
+ addLCIDMapEntry(map, "ky", (short) 0x0440);
+ addLCIDMapEntry(map, "sw", (short) 0x0441);
+ addLCIDMapEntry(map, "tt", (short) 0x0444);
+ addLCIDMapEntry(map, "bn", (short) 0x0445);
+ addLCIDMapEntry(map, "pa", (short) 0x0446);
+ addLCIDMapEntry(map, "gu", (short) 0x0447);
+ addLCIDMapEntry(map, "ta", (short) 0x0449);
+ addLCIDMapEntry(map, "te", (short) 0x044a);
+ addLCIDMapEntry(map, "kn", (short) 0x044b);
+ addLCIDMapEntry(map, "ml", (short) 0x044c);
+ addLCIDMapEntry(map, "mr", (short) 0x044e);
+ addLCIDMapEntry(map, "sa", (short) 0x044f);
+ addLCIDMapEntry(map, "mn", (short) 0x0450);
+ addLCIDMapEntry(map, "cy", (short) 0x0452);
+ addLCIDMapEntry(map, "gl", (short) 0x0456);
+ addLCIDMapEntry(map, "dv", (short) 0x0465);
+ addLCIDMapEntry(map, "qu", (short) 0x046b);
+ addLCIDMapEntry(map, "mi", (short) 0x0481);
+ addLCIDMapEntry(map, "ar_IQ", (short) 0x0801);
+ addLCIDMapEntry(map, "zh_CN", (short) 0x0804);
+ addLCIDMapEntry(map, "de_CH", (short) 0x0807);
+ addLCIDMapEntry(map, "en_GB", (short) 0x0809);
+ addLCIDMapEntry(map, "es_MX", (short) 0x080a);
+ addLCIDMapEntry(map, "fr_BE", (short) 0x080c);
+ addLCIDMapEntry(map, "it_CH", (short) 0x0810);
+ addLCIDMapEntry(map, "nl_BE", (short) 0x0813);
+ addLCIDMapEntry(map, "no_NO_NY", (short) 0x0814);
+ addLCIDMapEntry(map, "pt_PT", (short) 0x0816);
+ addLCIDMapEntry(map, "ro_MD", (short) 0x0818);
+ addLCIDMapEntry(map, "ru_MD", (short) 0x0819);
+ addLCIDMapEntry(map, "sr_CS", (short) 0x081a);
+ addLCIDMapEntry(map, "sv_FI", (short) 0x081d);
+ addLCIDMapEntry(map, "az_AZ", (short) 0x082c);
+ addLCIDMapEntry(map, "se_SE", (short) 0x083b);
+ addLCIDMapEntry(map, "ga_IE", (short) 0x083c);
+ addLCIDMapEntry(map, "ms_BN", (short) 0x083e);
+ addLCIDMapEntry(map, "uz_UZ", (short) 0x0843);
+ addLCIDMapEntry(map, "qu_EC", (short) 0x086b);
+ addLCIDMapEntry(map, "ar_EG", (short) 0x0c01);
+ addLCIDMapEntry(map, "zh_HK", (short) 0x0c04);
+ addLCIDMapEntry(map, "de_AT", (short) 0x0c07);
+ addLCIDMapEntry(map, "en_AU", (short) 0x0c09);
+ addLCIDMapEntry(map, "fr_CA", (short) 0x0c0c);
+ addLCIDMapEntry(map, "sr_CS", (short) 0x0c1a);
+ addLCIDMapEntry(map, "se_FI", (short) 0x0c3b);
+ addLCIDMapEntry(map, "qu_PE", (short) 0x0c6b);
+ addLCIDMapEntry(map, "ar_LY", (short) 0x1001);
+ addLCIDMapEntry(map, "zh_SG", (short) 0x1004);
+ addLCIDMapEntry(map, "de_LU", (short) 0x1007);
+ addLCIDMapEntry(map, "en_CA", (short) 0x1009);
+ addLCIDMapEntry(map, "es_GT", (short) 0x100a);
+ addLCIDMapEntry(map, "fr_CH", (short) 0x100c);
+ addLCIDMapEntry(map, "hr_BA", (short) 0x101a);
+ addLCIDMapEntry(map, "ar_DZ", (short) 0x1401);
+ addLCIDMapEntry(map, "zh_MO", (short) 0x1404);
+ addLCIDMapEntry(map, "de_LI", (short) 0x1407);
+ addLCIDMapEntry(map, "en_NZ", (short) 0x1409);
+ addLCIDMapEntry(map, "es_CR", (short) 0x140a);
+ addLCIDMapEntry(map, "fr_LU", (short) 0x140c);
+ addLCIDMapEntry(map, "bs_BA", (short) 0x141a);
+ addLCIDMapEntry(map, "ar_MA", (short) 0x1801);
+ addLCIDMapEntry(map, "en_IE", (short) 0x1809);
+ addLCIDMapEntry(map, "es_PA", (short) 0x180a);
+ addLCIDMapEntry(map, "fr_MC", (short) 0x180c);
+ addLCIDMapEntry(map, "sr_BA", (short) 0x181a);
+ addLCIDMapEntry(map, "ar_TN", (short) 0x1c01);
+ addLCIDMapEntry(map, "en_ZA", (short) 0x1c09);
+ addLCIDMapEntry(map, "es_DO", (short) 0x1c0a);
+ addLCIDMapEntry(map, "sr_BA", (short) 0x1c1a);
+ addLCIDMapEntry(map, "ar_OM", (short) 0x2001);
+ addLCIDMapEntry(map, "en_JM", (short) 0x2009);
+ addLCIDMapEntry(map, "es_VE", (short) 0x200a);
+ addLCIDMapEntry(map, "ar_YE", (short) 0x2401);
+ addLCIDMapEntry(map, "es_CO", (short) 0x240a);
+ addLCIDMapEntry(map, "ar_SY", (short) 0x2801);
+ addLCIDMapEntry(map, "en_BZ", (short) 0x2809);
+ addLCIDMapEntry(map, "es_PE", (short) 0x280a);
+ addLCIDMapEntry(map, "ar_JO", (short) 0x2c01);
+ addLCIDMapEntry(map, "en_TT", (short) 0x2c09);
+ addLCIDMapEntry(map, "es_AR", (short) 0x2c0a);
+ addLCIDMapEntry(map, "ar_LB", (short) 0x3001);
+ addLCIDMapEntry(map, "en_ZW", (short) 0x3009);
+ addLCIDMapEntry(map, "es_EC", (short) 0x300a);
+ addLCIDMapEntry(map, "ar_KW", (short) 0x3401);
+ addLCIDMapEntry(map, "en_PH", (short) 0x3409);
+ addLCIDMapEntry(map, "es_CL", (short) 0x340a);
+ addLCIDMapEntry(map, "ar_AE", (short) 0x3801);
+ addLCIDMapEntry(map, "es_UY", (short) 0x380a);
+ addLCIDMapEntry(map, "ar_BH", (short) 0x3c01);
+ addLCIDMapEntry(map, "es_PY", (short) 0x3c0a);
+ addLCIDMapEntry(map, "ar_QA", (short) 0x4001);
+ addLCIDMapEntry(map, "es_BO", (short) 0x400a);
+ addLCIDMapEntry(map, "es_SV", (short) 0x440a);
+ addLCIDMapEntry(map, "es_HN", (short) 0x480a);
+ addLCIDMapEntry(map, "es_NI", (short) 0x4c0a);
+ addLCIDMapEntry(map, "es_PR", (short) 0x500a);
+
+ lcidMap = map;
+ }
+
+ private static short getLCIDFromLocale(Locale locale) {
+ // optimize for common case
+ if (locale.equals(Locale.US)) {
+ return US_LCID;
+ }
+
+ if (lcidMap == null) {
+ createLCIDMap();
+ }
+
+ String key = locale.toString();
+ while (!"".equals(key)) {
+ Short lcidObject = (Short) lcidMap.get(key);
+ if (lcidObject != null) {
+ return lcidObject.shortValue();
+ }
+ int pos = key.lastIndexOf('_');
+ if (pos < 1) {
+ return US_LCID;
+ }
+ key = key.substring(0, pos);
+ }
+
+ return US_LCID;
+ }
+
+ @Override
public String getFamilyName(Locale locale) {
if (locale == null) {
return familyName;
} else if (locale.equals(nameLocale) && localeFamilyName != null) {
return localeFamilyName;
} else {
- short localeID = FontManager.getLCIDFromLocale(locale);
+ short localeID = getLCIDFromLocale(locale);
String name = lookupName(localeID, FAMILY_NAME_ID);
if (name == null) {
- return familyName;
+ return familyName;
} else {
return name;
}
@@ -1353,6 +1590,7 @@
/* Used by the OpenType engine for mark positioning.
*/
+ @Override
Point2D.Float getGlyphPoint(long pScalerContext,
int glyphCode, int ptNumber) {
try {
@@ -1414,6 +1652,7 @@
* REMIND: consider unpacking the table into an array of booleans
* for faster use.
*/
+ @Override
public boolean useAAForPtSize(int ptsize) {
char[] gasp = getGaspTable();
@@ -1433,12 +1672,15 @@
}
}
+ @Override
public boolean hasSupplementaryChars() {
return ((TrueTypeGlyphMapper)getMapper()).hasSupplementaryChars();
}
+ @Override
public String toString() {
return "** TrueType Font: Family="+familyName+ " Name="+fullName+
" style="+style+" fileName="+platName;
}
+
}
diff --git a/src/share/classes/sun/font/TrueTypeGlyphMapper.java b/src/share/classes/sun/font/TrueTypeGlyphMapper.java
index ce2c12d..8fcc32e 100644
--- a/src/share/classes/sun/font/TrueTypeGlyphMapper.java
+++ b/src/share/classes/sun/font/TrueTypeGlyphMapper.java
@@ -60,9 +60,9 @@
missingGlyph = 0; /* standard for TrueType fonts */
ByteBuffer buffer = font.getTableBuffer(TrueTypeFont.maxpTag);
numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
- if (FontManager.isSolaris && isJAlocale && font.supportsJA()) {
+ if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) {
needsJAremapping = true;
- if (FontManager.isSolaris8 &&
+ if (FontUtilities.isSolaris8 &&
getGlyphFromCMAP(JA_WAVE_DASH_CHAR) == missingGlyph) {
remapJAWaveDash = true;
}
@@ -82,8 +82,8 @@
glyphCode >= FileFontStrike.INVISIBLE_GLYPHS) {
return glyphCode;
} else {
- if (FontManager.logging) {
- FontManager.logger.warning
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().warning
(font + " out of range glyph id=" +
Integer.toHexString((int)glyphCode) +
" for char " + Integer.toHexString(charCode));
@@ -97,11 +97,11 @@
}
private void handleBadCMAP() {
- if (FontManager.logging) {
- FontManager.logger.severe("Null Cmap for " + font +
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger().severe("Null Cmap for " + font +
"substituting for this font");
}
- FontManager.deRegisterBadFont(font);
+ SunFontManager.getInstance().deRegisterBadFont(font);
/* The next line is not really a solution, but might
* reduce the exceptions until references to this font2D
* are gone.
@@ -242,10 +242,10 @@
font.glyphToCharMap[glyphs[i]] = (char)code;
}
- if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+ if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
continue;
}
- else if (FontManager.isComplexCharCode(code)) {
+ else if (FontUtilities.isComplexCharCode(code)) {
return true;
}
else if (code >= 0x10000) {
diff --git a/src/share/classes/sun/font/Type1Font.java b/src/share/classes/sun/font/Type1Font.java
index a117310..34bed88 100644
--- a/src/share/classes/sun/font/Type1Font.java
+++ b/src/share/classes/sun/font/Type1Font.java
@@ -635,7 +635,7 @@
protected synchronized FontScaler getScaler() {
if (scaler == null) {
- scaler = FontManager.getScaler(this, 0, false, fileSize);
+ scaler = FontScaler.getScaler(this, 0, false, fileSize);
}
return scaler;
@@ -652,7 +652,7 @@
try {
return getScaler().getNumGlyphs();
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getNumGlyphs();
}
}
@@ -661,7 +661,7 @@
try {
return getScaler().getMissingGlyphCode();
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getMissingGlyphCode();
}
}
@@ -670,7 +670,7 @@
try {
return getScaler().getGlyphCode(charCode);
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getGlyphCode(charCode);
}
}
@@ -679,5 +679,4 @@
return "** Type1 Font: Family="+familyName+ " Name="+fullName+
" style="+style+" fileName="+platName;
}
-
}
diff --git a/src/share/classes/sun/font/Type1GlyphMapper.java b/src/share/classes/sun/font/Type1GlyphMapper.java
index ae80605..a91d47a 100644
--- a/src/share/classes/sun/font/Type1GlyphMapper.java
+++ b/src/share/classes/sun/font/Type1GlyphMapper.java
@@ -46,7 +46,7 @@
try {
missingGlyph = scaler.getMissingGlyphCode();
} catch (FontScalerException fe) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
try {
missingGlyph = scaler.getMissingGlyphCode();
} catch (FontScalerException e) { //should not happen
@@ -59,7 +59,7 @@
try {
return scaler.getNumGlyphs();
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return getNumGlyphs();
}
}
@@ -72,7 +72,7 @@
try {
return scaler.getGlyphCode(ch) != missingGlyph;
} catch(FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return canDisplay(ch);
}
}
@@ -81,7 +81,7 @@
try {
return scaler.getGlyphCode(ch);
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return charToGlyph(ch);
}
}
@@ -93,7 +93,7 @@
try {
return scaler.getGlyphCode((char)ch);
} catch (FontScalerException e) {
- scaler = FontManager.getNullScaler();
+ scaler = FontScaler.getNullScaler();
return charToGlyph(ch);
}
}
@@ -160,10 +160,10 @@
glyphs[i] = charToGlyph(code);
- if (code < FontManager.MIN_LAYOUT_CHARCODE) {
+ if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
continue;
}
- else if (FontManager.isComplexCharCode(code)) {
+ else if (FontUtilities.isComplexCharCode(code)) {
return true;
}
else if (code >= 0x10000) {
diff --git a/src/share/classes/sun/java2d/SunGraphics2D.java b/src/share/classes/sun/java2d/SunGraphics2D.java
index 0bb4bb6..c63db02 100644
--- a/src/share/classes/sun/java2d/SunGraphics2D.java
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java
@@ -66,6 +66,7 @@
import java.awt.font.GlyphVector;
import java.awt.font.TextLayout;
import sun.font.FontDesignMetrics;
+import sun.font.FontUtilities;
import sun.java2d.pipe.PixelDrawPipe;
import sun.java2d.pipe.PixelFillPipe;
import sun.java2d.pipe.ShapeDrawPipe;
@@ -592,7 +593,7 @@
}
}
- info.font2D = FontManager.getFont2D(font);
+ info.font2D = FontUtilities.getFont2D(font);
int fmhint = fractionalMetricsHint;
if (fmhint == SunHints.INTVAL_FRACTIONALMETRICS_DEFAULT) {
@@ -741,7 +742,8 @@
font.isTransformed() ||
fontInfo == null || // Precaution, if true shouldn't get here
(fontInfo.aaHint == SunHints.INTVAL_TEXT_ANTIALIAS_ON) !=
- FontManager.getFont2D(font).useAAForPtSize(font.getSize()))) {
+ FontUtilities.getFont2D(font).
+ useAAForPtSize(font.getSize()))) {
textpipe = invalidpipe;
}
this.font = font;
diff --git a/src/share/classes/sun/java2d/SunGraphicsEnvironment.java b/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
index 14029a0..389390f 100644
--- a/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+++ b/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
@@ -55,8 +55,6 @@
import java.util.TreeMap;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import sun.awt.AppContext;
import sun.awt.DisplayChangedListener;
import sun.awt.FontConfiguration;
@@ -64,6 +62,8 @@
import sun.font.CompositeFontDescriptor;
import sun.font.Font2D;
import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontManagerForSGE;
import sun.font.NativeFont;
/**
@@ -73,102 +73,16 @@
* @see GraphicsDevice
* @see GraphicsConfiguration
*/
-
public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
- implements FontSupport, DisplayChangedListener {
+ implements DisplayChangedListener {
- public static boolean isLinux;
- public static boolean isSolaris;
public static boolean isOpenSolaris;
- public static boolean isWindows;
- public static boolean noType1Font;
private static Font defaultFont;
- private static String defaultFontFileName;
- private static String defaultFontName;
- public static final String lucidaFontName = "Lucida Sans Regular";
- public static final String lucidaFileName = "LucidaSansRegular.ttf";
- public static boolean debugFonts = false;
- protected static Logger logger = null;
- private static ArrayList badFonts;
- public static String jreLibDirName;
- public static String jreFontDirName;
- private static HashSet<String> missingFontFiles = null;
-
- private FontConfiguration fontConfig;
-
- /* fontPath is the location of all fonts on the system, excluding the
- * JRE's own font directory but including any path specified using the
- * sun.java2d.fontpath property. Together with that property, it is
- * initialised by the getPlatformFontPath() method
- * This call must be followed by a call to registerFontDirs(fontPath)
- * once any extra debugging path has been appended.
- */
- protected String fontPath;
-
- /* discoveredAllFonts is set to true when all fonts on the font path are
- * discovered. This usually also implies opening, validating and
- * registering, but an implementation may be optimized to avold this.
- * So see also "loadedAllFontFiles"
- */
- private boolean discoveredAllFonts = false;
-
- /* loadedAllFontFiles is set to true when all fonts on the font path are
- * actually opened, validated and registered. This always implies
- * discoveredAllFonts is true.
- */
- private boolean loadedAllFontFiles = false;
-
- protected HashSet registeredFontFiles = new HashSet();
- public static String eudcFontFileName; /* Initialised only on windows */
-
- private static boolean isOpenJDK;
- /**
- * A few things in Java 2D code are different in OpenJDK,
- * so need a way to tell which implementation this is.
- * The absence of Lucida Sans Regular is the simplest way for now.
- */
- public static boolean isOpenJDK() {
- return isOpenJDK;
- }
-
- static {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
-
- jreLibDirName = System.getProperty("java.home","") +
- File.separator + "lib";
- jreFontDirName = jreLibDirName + File.separator + "fonts";
- File lucidaFile =
- new File(jreFontDirName + File.separator + lucidaFileName);
- isOpenJDK = !lucidaFile.exists();
-
- String debugLevel =
- System.getProperty("sun.java2d.debugfonts");
-
- if (debugLevel != null && !debugLevel.equals("false")) {
- debugFonts = true;
- logger = Logger.getLogger("sun.java2d");
- if (debugLevel.equals("warning")) {
- logger.setLevel(Level.WARNING);
- } else if (debugLevel.equals("severe")) {
- logger.setLevel(Level.SEVERE);
- }
- }
- return null;
- }
- });
- };
public SunGraphicsEnvironment() {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction() {
public Object run() {
- String osName = System.getProperty("os.name");
- if ("Linux".equals(osName)) {
- isLinux = true;
- } else if ("SunOS".equals(osName)) {
- isSolaris = true;
String version = System.getProperty("os.version", "0.0");
try {
float ver = Float.parseFloat(version);
@@ -186,188 +100,6 @@
}
} catch (Exception e) {
}
- } else if ("Windows".equals(osName)) {
- isWindows = true;
- }
-
- noType1Font = "true".
- equals(System.getProperty("sun.java2d.noType1Font"));
-
- if (!isOpenJDK()) {
- defaultFontName = lucidaFontName;
- if (useAbsoluteFontFileNames()) {
- defaultFontFileName =
- jreFontDirName + File.separator + lucidaFileName;
- } else {
- defaultFontFileName = lucidaFileName;
- }
- }
-
- File badFontFile =
- new File(jreFontDirName + File.separator + "badfonts.txt");
- if (badFontFile.exists()) {
- FileInputStream fis = null;
- try {
- badFonts = new ArrayList();
- fis = new FileInputStream(badFontFile);
- InputStreamReader isr = new InputStreamReader(fis);
- BufferedReader br = new BufferedReader(isr);
- while (true) {
- String name = br.readLine();
- if (name == null) {
- break;
- } else {
- if (debugFonts) {
- logger.warning("read bad font: " + name);
- }
- badFonts.add(name);
- }
- }
- } catch (IOException e) {
- try {
- if (fis != null) {
- fis.close();
- }
- } catch (IOException ioe) {
- }
- }
- }
-
- /* Here we get the fonts in jre/lib/fonts and register them
- * so they are always available and preferred over other fonts.
- * This needs to be registered before the composite fonts as
- * otherwise some native font that corresponds may be found
- * as we don't have a way to handle two fonts of the same
- * name, so the JRE one must be the first one registered.
- * Pass "true" to registerFonts method as on-screen these
- * JRE fonts always go through the T2K rasteriser.
- */
- if (isLinux) {
- /* Linux font configuration uses these fonts */
- registerFontDir(jreFontDirName);
- }
- registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
- true, false);
-
- /* Register the JRE fonts so that the native platform can
- * access them. This is used only on Windows so that when
- * printing the printer driver can access the fonts.
- */
- registerJREFontsWithPlatform(jreFontDirName);
-
- /* Create the font configuration and get any font path
- * that might be specified.
- */
- fontConfig = createFontConfiguration();
- if (isOpenJDK()) {
- String[] fontInfo = FontManager.getDefaultPlatformFont();
- defaultFontName = fontInfo[0];
- defaultFontFileName = fontInfo[1];
- }
- getPlatformFontPathFromFontConfig();
-
- String extraFontPath = fontConfig.getExtraFontPath();
-
- /* In prior releases the debugging font path replaced
- * all normally located font directories except for the
- * JRE fonts dir. This directory is still always located and
- * placed at the head of the path but as an augmentation
- * to the previous behaviour the
- * changes below allow you to additionally append to
- * the font path by starting with append: or prepend by
- * starting with a prepend: sign. Eg: to append
- * -Dsun.java2d.fontpath=append:/usr/local/myfonts
- * and to prepend
- * -Dsun.java2d.fontpath=prepend:/usr/local/myfonts Disp
- *
- * If there is an appendedfontpath it in the font configuration
- * it is used instead of searching the system for dirs.
- * The behaviour of append and prepend is then similar
- * to the normal case. ie it goes after what
- * you prepend and * before what you append. If the
- * sun.java2d.fontpath property is used, but it
- * neither the append or prepend syntaxes is used then as
- * except for the JRE dir the path is replaced and it is
- * up to you to make sure that all the right directories
- * are located. This is platform and locale-specific so
- * its almost impossible to get right, so it should be
- * used with caution.
- */
- boolean prependToPath = false;
- boolean appendToPath = false;
- String dbgFontPath = System.getProperty("sun.java2d.fontpath");
-
- if (dbgFontPath != null) {
- if (dbgFontPath.startsWith("prepend:")) {
- prependToPath = true;
- dbgFontPath =
- dbgFontPath.substring("prepend:".length());
- } else if (dbgFontPath.startsWith("append:")) {
- appendToPath = true;
- dbgFontPath =
- dbgFontPath.substring("append:".length());
- }
- }
-
- if (debugFonts) {
- logger.info("JRE font directory: " + jreFontDirName);
- logger.info("Extra font path: " + extraFontPath);
- logger.info("Debug font path: " + dbgFontPath);
- }
-
- if (dbgFontPath != null) {
- /* In debugging mode we register all the paths
- * Caution: this is a very expensive call on Solaris:-
- */
- fontPath = getPlatformFontPath(noType1Font);
-
- if (extraFontPath != null) {
- fontPath =
- extraFontPath + File.pathSeparator + fontPath;
- }
- if (appendToPath) {
- fontPath = fontPath + File.pathSeparator + dbgFontPath;
- } else if (prependToPath) {
- fontPath = dbgFontPath + File.pathSeparator + fontPath;
- } else {
- fontPath = dbgFontPath;
- }
- registerFontDirs(fontPath);
- } else if (extraFontPath != null) {
- /* If the font configuration contains an "appendedfontpath"
- * entry, it is interpreted as a set of locations that
- * should always be registered.
- * It may be additional to locations normally found for
- * that place, or it may be locations that need to have
- * all their paths registered to locate all the needed
- * platform names.
- * This is typically when the same .TTF file is referenced
- * from multiple font.dir files and all of these must be
- * read to find all the native (XLFD) names for the font,
- * so that X11 font APIs can be used for as many code
- * points as possible.
- */
- registerFontDirs(extraFontPath);
- }
-
- /* On Solaris, we need to register the Japanese TrueType
- * directory so that we can find the corresponding bitmap
- * fonts. This could be done by listing the directory in
- * the font configuration file, but we don't want to
- * confuse users with this quirk. There are no bitmap fonts
- * for other writing systems that correspond to TrueType
- * fonts and have matching XLFDs. We need to register the
- * bitmap fonts only in environments where they're on the
- * X font path, i.e., in the Japanese locale.
- * Note that if the X Toolkit is in use the font path isn't
- * set up by JDK, but users of a JA locale should have it
- * set up already by their login environment.
- */
- if (isSolaris && Locale.JAPAN.equals(Locale.getDefault())) {
- registerFontDir("/usr/openwin/lib/locale/ja/X11/fonts/TT");
- }
-
- initCompositeFonts(fontConfig, null);
/* Establish the default font to be used by SG2D etc */
defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@@ -395,7 +127,22 @@
return ret;
}
+ /**
+ * Returns the number of screen devices of this graphics environment.
+ *
+ * @return the number of screen devices of this graphics environment
+ */
protected abstract int getNumScreens();
+
+ /**
+ * Create and return the screen device with the specified number. The
+ * device with number <code>0</code> will be the default device (returned
+ * by {@link #getDefaultScreenDevice()}.
+ *
+ * @param screennum the number of the screen to create
+ *
+ * @return the created screen device
+ */
protected abstract GraphicsDevice makeScreenDevice(int screennum);
/**
@@ -418,220 +165,17 @@
return new SunGraphics2D(sd, Color.white, Color.black, defaultFont);
}
- /* A call to this method should be followed by a call to
- * registerFontDirs(..)
- */
- protected String getPlatformFontPath(boolean noType1Font) {
- if (fontPath == null) {
- fontPath = FontManager.getFontPath(noType1Font);
- }
- return fontPath;
+ private static FontManagerForSGE getFontManagerForSGE() {
+ FontManager fm = FontManagerFactory.getInstance();
+ return (FontManagerForSGE) fm;
}
-
- private String[] platformFontDirs;
- /**
- * Get all directories which contain installed fonts.
- */
- public String[] getPlatformFontDirs() {
- if (platformFontDirs == null) {
- String path = getPlatformFontPath(noType1Font);
- StringTokenizer parser =
- new StringTokenizer(path, File.pathSeparator);;
- ArrayList<String> pathList = new ArrayList<String>();
- try {
- while (parser.hasMoreTokens()) {
- pathList.add(parser.nextToken());
- }
- } catch (NoSuchElementException e) {
- }
- platformFontDirs = pathList.toArray(new String[0]);
- }
- return platformFontDirs;
- }
-
- /**
- * Whether registerFontFile expects absolute or relative
- * font file names.
- */
- protected boolean useAbsoluteFontFileNames() {
- return true;
- }
-
- /**
- * Returns file name for default font, either absolute
- * or relative as needed by registerFontFile.
- */
- public String getDefaultFontFile() {
- return defaultFontFileName;
- }
-
- /**
- * Returns face name for default font, or null if
- * no face names are used for CompositeFontDescriptors
- * for this platform.
- */
- public String getDefaultFontFaceName() {
- return defaultFontName;
- }
-
- public void loadFonts() {
- if (discoveredAllFonts) {
- return;
- }
- /* Use lock specific to the font system */
- synchronized (lucidaFontName) {
- if (debugFonts) {
- Thread.dumpStack();
- logger.info("SunGraphicsEnvironment.loadFonts() called");
- }
- FontManager.initialiseDeferredFonts();
-
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- if (fontPath == null) {
- fontPath = getPlatformFontPath(noType1Font);
- registerFontDirs(fontPath);
- }
- if (fontPath != null) {
- // this will find all fonts including those already
- // registered. But we have checks in place to prevent
- // double registration.
- if (!FontManager.gotFontsFromPlatform()) {
- registerFontsOnPath(fontPath, false,
- Font2D.UNKNOWN_RANK,
- false, true);
- loadedAllFontFiles = true;
- }
- }
- FontManager.registerOtherFontFiles(registeredFontFiles);
- discoveredAllFonts = true;
- return null;
- }
- });
- }
- }
-
-
- public void loadFontFiles() {
- loadFonts();
- if (loadedAllFontFiles) {
- return;
- }
- /* Use lock specific to the font system */
- synchronized (lucidaFontName) {
- if (debugFonts) {
- Thread.dumpStack();
- logger.info("loadAllFontFiles() called");
- }
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- if (fontPath == null) {
- fontPath = getPlatformFontPath(noType1Font);
- }
- if (fontPath != null) {
- // this will find all fonts including those already
- // registered. But we have checks in place to prevent
- // double registration.
- registerFontsOnPath(fontPath, false,
- Font2D.UNKNOWN_RANK,
- false, true);
- }
- loadedAllFontFiles = true;
- return null;
- }
- });
- }
- }
-
- /*
- * This is for use only within getAllFonts().
- * Fonts listed in the fontconfig files for windows were all
- * on the "deferred" initialisation list. They were registered
- * either in the course of the application, or in the call to
- * loadFonts() within getAllFonts(). The fontconfig file specifies
- * the names of the fonts using the English names. If there's a
- * different name in the execution locale, then the platform will
- * report that, and we will construct the font with both names, and
- * thereby enumerate it twice. This happens for Japanese fonts listed
- * in the windows fontconfig, when run in the JA locale. The solution
- * is to rely (in this case) on the platform's font->file mapping to
- * determine that this name corresponds to a file we already registered.
- * This works because
- * - we know when we get here all deferred fonts are already initialised
- * - when we register a font file, we register all fonts in it.
- * - we know the fontconfig fonts are all in the windows registry
- */
- private boolean isNameForRegisteredFile(String fontName) {
- String fileName = FontManager.getFileNameForFontName(fontName);
- if (fileName == null) {
- return false;
- }
- return registeredFontFiles.contains(fileName);
- }
-
- private Font[] allFonts;
-
- /**
- * Returns all fonts installed in this environment.
- */
- public Font[] getAllInstalledFonts() {
- if (allFonts == null) {
- loadFonts();
- TreeMap fontMapNames = new TreeMap();
- /* warning: the number of composite fonts could change dynamically
- * if applications are allowed to create them. "allfonts" could
- * then be stale.
- */
-
- Font2D[] allfonts = FontManager.getRegisteredFonts();
- for (int i=0; i < allfonts.length; i++) {
- if (!(allfonts[i] instanceof NativeFont)) {
- fontMapNames.put(allfonts[i].getFontName(null),
- allfonts[i]);
- }
- }
-
- String[] platformNames = FontManager.getFontNamesFromPlatform();
- if (platformNames != null) {
- for (int i=0; i<platformNames.length; i++) {
- if (!isNameForRegisteredFile(platformNames[i])) {
- fontMapNames.put(platformNames[i], null);
- }
- }
- }
-
- String[] fontNames = null;
- if (fontMapNames.size() > 0) {
- fontNames = new String[fontMapNames.size()];
- Object [] keyNames = fontMapNames.keySet().toArray();
- for (int i=0; i < keyNames.length; i++) {
- fontNames[i] = (String)keyNames[i];
- }
- }
- Font[] fonts = new Font[fontNames.length];
- for (int i=0; i < fontNames.length; i++) {
- fonts[i] = new Font(fontNames[i], Font.PLAIN, 1);
- Font2D f2d = (Font2D)fontMapNames.get(fontNames[i]);
- if (f2d != null) {
- FontManager.setFont2D(fonts[i], f2d.handle);
- }
- }
- allFonts = fonts;
- }
-
- Font []copyFonts = new Font[allFonts.length];
- System.arraycopy(allFonts, 0, copyFonts, 0, allFonts.length);
- return copyFonts;
- }
-
/**
* Returns all fonts available in this environment.
*/
public Font[] getAllFonts() {
- Font[] installedFonts = getAllInstalledFonts();
- Font[] created = FontManager.getCreatedFonts();
+ FontManagerForSGE fm = getFontManagerForSGE();
+ Font[] installedFonts = fm.getAllInstalledFonts();
+ Font[] created = fm.getCreatedFonts();
if (created == null || created.length == 0) {
return installedFonts;
} else {
@@ -643,126 +187,9 @@
}
}
- /**
- * Default locale can be changed but we need to know the initial locale
- * as that is what is used by native code. Changing Java default locale
- * doesn't affect that.
- * Returns the locale in use when using native code to communicate
- * with platform APIs. On windows this is known as the "system" locale,
- * and it is usually the same as the platform locale, but not always,
- * so this method also checks an implementation property used only
- * on windows and uses that if set.
- */
- private static Locale systemLocale = null;
- public static Locale getSystemStartupLocale() {
- if (systemLocale == null) {
- systemLocale = (Locale)
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- /* On windows the system locale may be different than the
- * user locale. This is an unsupported configuration, but
- * in that case we want to return a dummy locale that will
- * never cause a match in the usage of this API. This is
- * important because Windows documents that the family
- * names of fonts are enumerated using the language of
- * the system locale. BY returning a dummy locale in that
- * case we do not use the platform API which would not
- * return us the names we want.
- */
- String fileEncoding = System.getProperty("file.encoding", "");
- String sysEncoding = System.getProperty("sun.jnu.encoding");
- if (sysEncoding != null && !sysEncoding.equals(fileEncoding)) {
- return Locale.ROOT;
- }
-
- String language = System.getProperty("user.language", "en");
- String country = System.getProperty("user.country","");
- String variant = System.getProperty("user.variant","");
- return new Locale(language, country, variant);
- }
- });
- }
- return systemLocale;
- }
-
- /* Really we need only the JRE fonts family names, but there's little
- * overhead in doing this the easy way by adding all the currently
- * known fonts.
- */
- protected void getJREFontFamilyNames(TreeMap<String,String> familyNames,
- Locale requestedLocale) {
- FontManager.registerDeferredJREFonts(jreFontDirName);
- Font2D[] physicalfonts = FontManager.getPhysicalFonts();
- for (int i=0; i < physicalfonts.length; i++) {
- if (!(physicalfonts[i] instanceof NativeFont)) {
- String name =
- physicalfonts[i].getFamilyName(requestedLocale);
- familyNames.put(name.toLowerCase(requestedLocale), name);
- }
- }
- }
-
- private String[] allFamilies; // cache for default locale only
- private Locale lastDefaultLocale;
-
- public String[] getInstalledFontFamilyNames(Locale requestedLocale) {
- if (requestedLocale == null) {
- requestedLocale = Locale.getDefault();
- }
- if (allFamilies != null && lastDefaultLocale != null &&
- requestedLocale.equals(lastDefaultLocale)) {
- String[] copyFamilies = new String[allFamilies.length];
- System.arraycopy(allFamilies, 0, copyFamilies,
- 0, allFamilies.length);
- return copyFamilies;
- }
-
- TreeMap<String,String> familyNames = new TreeMap<String,String>();
- // these names are always there and aren't localised
- String str;
- str = Font.SERIF; familyNames.put(str.toLowerCase(), str);
- str = Font.SANS_SERIF; familyNames.put(str.toLowerCase(), str);
- str = Font.MONOSPACED; familyNames.put(str.toLowerCase(), str);
- str = Font.DIALOG; familyNames.put(str.toLowerCase(), str);
- str = Font.DIALOG_INPUT; familyNames.put(str.toLowerCase(), str);
-
- /* Platform APIs may be used to get the set of available family
- * names for the current default locale so long as it is the same
- * as the start-up system locale, rather than loading all fonts.
- */
- if (requestedLocale.equals(getSystemStartupLocale()) &&
- FontManager.getFamilyNamesFromPlatform(familyNames,
- requestedLocale)) {
- /* Augment platform names with JRE font family names */
- getJREFontFamilyNames(familyNames, requestedLocale);
- } else {
- loadFontFiles();
- Font2D[] physicalfonts = FontManager.getPhysicalFonts();
- for (int i=0; i < physicalfonts.length; i++) {
- if (!(physicalfonts[i] instanceof NativeFont)) {
- String name =
- physicalfonts[i].getFamilyName(requestedLocale);
- familyNames.put(name.toLowerCase(requestedLocale), name);
- }
- }
- }
-
- String[] retval = new String[familyNames.size()];
- Object [] keyNames = familyNames.keySet().toArray();
- for (int i=0; i < keyNames.length; i++) {
- retval[i] = (String)familyNames.get(keyNames[i]);
- }
- if (requestedLocale.equals(Locale.getDefault())) {
- lastDefaultLocale = requestedLocale;
- allFamilies = new String[retval.length];
- System.arraycopy(retval, 0, allFamilies, 0, allFamilies.length);
- }
- return retval;
- }
-
public String[] getAvailableFontFamilyNames(Locale requestedLocale) {
- String[] installed = getInstalledFontFamilyNames(requestedLocale);
+ FontManagerForSGE fm = getFontManagerForSGE();
+ String[] installed = fm.getInstalledFontFamilyNames(requestedLocale);
/* Use a new TreeMap as used in getInstalledFontFamilyNames
* and insert all the keys in lower case, so that the sort order
* is the same as the installed families. This preserves historical
@@ -771,7 +198,7 @@
* the tree map and just insert new entries, but not so much as
* to justify the extra internal interface.
*/
- TreeMap<String, String> map = FontManager.getCreatedFontFamilyNames();
+ TreeMap<String, String> map = fm.getCreatedFontFamilyNames();
if (map == null || map.size() == 0) {
return installed;
} else {
@@ -793,405 +220,6 @@
}
/**
- * Returns a file name for the physical font represented by this platform
- * font name. The default implementation tries to obtain the file name
- * from the font configuration.
- * Subclasses may override to provide information from other sources.
- */
- protected String getFileNameFromPlatformName(String platformFontName) {
- return fontConfig.getFileNameFromPlatformName(platformFontName);
- }
-
- public static class TTFilter implements FilenameFilter {
- public boolean accept(File dir,String name) {
- /* all conveniently have the same suffix length */
- int offset = name.length()-4;
- if (offset <= 0) { /* must be at least A.ttf */
- return false;
- } else {
- return(name.startsWith(".ttf", offset) ||
- name.startsWith(".TTF", offset) ||
- name.startsWith(".ttc", offset) ||
- name.startsWith(".TTC", offset) ||
- name.startsWith(".otf", offset) ||
- name.startsWith(".OTF", offset));
- }
- }
- }
-
- public static class T1Filter implements FilenameFilter {
- public boolean accept(File dir,String name) {
- if (noType1Font) {
- return false;
- }
- /* all conveniently have the same suffix length */
- int offset = name.length()-4;
- if (offset <= 0) { /* must be at least A.pfa */
- return false;
- } else {
- return(name.startsWith(".pfa", offset) ||
- name.startsWith(".pfb", offset) ||
- name.startsWith(".PFA", offset) ||
- name.startsWith(".PFB", offset));
- }
- }
- }
-
- public static class TTorT1Filter implements FilenameFilter {
- public boolean accept(File dir, String name) {
- return SunGraphicsEnvironment.ttFilter.accept(dir, name) ||
- SunGraphicsEnvironment.t1Filter.accept(dir, name);
- }
- }
-
- /* No need to keep consing up new instances - reuse a singleton.
- * The trade-off is that these objects don't get GC'd.
- */
- public static final TTFilter ttFilter = new TTFilter();
- public static final T1Filter t1Filter = new T1Filter();
-
- /* The majority of the register functions in this class are
- * registering platform fonts in the JRE's font maps.
- * The next one is opposite in function as it registers the JRE
- * fonts as platform fonts. If subsequent to calling this
- * your implementation enumerates platform fonts in a way that
- * would return these fonts too you may get duplicates.
- * This function is primarily used to install the JRE fonts
- * so that the native platform can access them.
- * It is intended to be overridden by platform subclasses
- * Currently minimal use is made of this as generally
- * Java 2D doesn't need the platform to be able to
- * use its fonts and platforms which already have matching
- * fonts registered (possibly even from other different JRE
- * versions) generally can't be guaranteed to use the
- * one registered by this JRE version in response to
- * requests from this JRE.
- */
- protected void registerJREFontsWithPlatform(String pathName) {
- return;
- }
-
- /* Called from FontManager - has Solaris specific implementation */
- public void register1dot0Fonts() {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- String type1Dir = "/usr/openwin/lib/X11/fonts/Type1";
- registerFontsInDir(type1Dir, true, Font2D.TYPE1_RANK,
- false, false);
- return null;
- }
- });
- }
-
- protected void registerFontDirs(String pathName) {
- return;
- }
-
- /* Called to register fall back fonts */
- public void registerFontsInDir(String dirName) {
- registerFontsInDir(dirName, true, Font2D.JRE_RANK, true, false);
- }
-
- private void registerFontsInDir(String dirName, boolean useJavaRasterizer,
- int fontRank,
- boolean defer, boolean resolveSymLinks) {
- File pathFile = new File(dirName);
- addDirFonts(dirName, pathFile, ttFilter,
- FontManager.FONTFORMAT_TRUETYPE, useJavaRasterizer,
- fontRank==Font2D.UNKNOWN_RANK ?
- Font2D.TTF_RANK : fontRank,
- defer, resolveSymLinks);
- addDirFonts(dirName, pathFile, t1Filter,
- FontManager.FONTFORMAT_TYPE1, useJavaRasterizer,
- fontRank==Font2D.UNKNOWN_RANK ?
- Font2D.TYPE1_RANK : fontRank,
- defer, resolveSymLinks);
- }
-
- private void registerFontsOnPath(String pathName,
- boolean useJavaRasterizer, int fontRank,
- boolean defer, boolean resolveSymLinks) {
-
- StringTokenizer parser = new StringTokenizer(pathName,
- File.pathSeparator);
- try {
- while (parser.hasMoreTokens()) {
- registerFontsInDir(parser.nextToken(),
- useJavaRasterizer, fontRank,
- defer, resolveSymLinks);
- }
- } catch (NoSuchElementException e) {
- }
- }
-
- protected void registerFontFile(String fontFileName, String[] nativeNames,
- int fontRank, boolean defer) {
- // REMIND: case compare depends on platform
- if (registeredFontFiles.contains(fontFileName)) {
- return;
- }
- int fontFormat;
- if (ttFilter.accept(null, fontFileName)) {
- fontFormat = FontManager.FONTFORMAT_TRUETYPE;
- } else if (t1Filter.accept(null, fontFileName)) {
- fontFormat = FontManager.FONTFORMAT_TYPE1;
- } else {
- fontFormat = FontManager.FONTFORMAT_NATIVE;
- }
- registeredFontFiles.add(fontFileName);
- if (defer) {
- FontManager.registerDeferredFont(fontFileName,
- fontFileName, nativeNames,
- fontFormat, false, fontRank);
- } else {
- FontManager.registerFontFile(fontFileName, nativeNames,
- fontFormat, false, fontRank);
- }
- }
-
- protected void registerFontDir(String path) {
- }
-
- protected String[] getNativeNames(String fontFileName,
- String platformName) {
- return null;
- }
-
- /*
- * helper function for registerFonts
- */
- private void addDirFonts(String dirName, File dirFile,
- FilenameFilter filter,
- int fontFormat, boolean useJavaRasterizer,
- int fontRank,
- boolean defer, boolean resolveSymLinks) {
- String[] ls = dirFile.list(filter);
- if (ls == null || ls.length == 0) {
- return;
- }
- String[] fontNames = new String[ls.length];
- String[][] nativeNames = new String[ls.length][];
- int fontCount = 0;
-
- for (int i=0; i < ls.length; i++ ) {
- File theFile = new File(dirFile, ls[i]);
- String fullName = null;
- if (resolveSymLinks) {
- try {
- fullName = theFile.getCanonicalPath();
- } catch (IOException e) {
- }
- }
- if (fullName == null) {
- fullName = dirName + File.separator + ls[i];
- }
-
- // REMIND: case compare depends on platform
- if (registeredFontFiles.contains(fullName)) {
- continue;
- }
-
- if (badFonts != null && badFonts.contains(fullName)) {
- if (debugFonts) {
- logger.warning("skip bad font " + fullName);
- }
- continue; // skip this font file.
- }
-
- registeredFontFiles.add(fullName);
-
- if (debugFonts && logger.isLoggable(Level.INFO)) {
- String message = "Registering font " + fullName;
- String[] natNames = getNativeNames(fullName, null);
- if (natNames == null) {
- message += " with no native name";
- } else {
- message += " with native name(s) " + natNames[0];
- for (int nn = 1; nn < natNames.length; nn++) {
- message += ", " + natNames[nn];
- }
- }
- logger.info(message);
- }
- fontNames[fontCount] = fullName;
- nativeNames[fontCount++] = getNativeNames(fullName, null);
- }
- FontManager.registerFonts(fontNames, nativeNames, fontCount,
- fontFormat, useJavaRasterizer, fontRank,
- defer);
- return;
- }
-
- /*
- * A GE may verify whether a font file used in a fontconfiguration
- * exists. If it doesn't then either we may substitute the default
- * font, or perhaps elide it altogether from the composite font.
- * This makes some sense on windows where the font file is only
- * likely to be in one place. But on other OSes, eg Linux, the file
- * can move around depending. So there we probably don't want to assume
- * its missing and so won't add it to this list.
- * If this list - missingFontFiles - is non-null then the composite
- * font initialisation logic tests to see if a font file is in that
- * set.
- * Only one thread should be able to add to this set so we don't
- * synchronize.
- */
- protected void addToMissingFontFileList(String fileName) {
- if (missingFontFiles == null) {
- missingFontFiles = new HashSet<String>();
- }
- missingFontFiles.add(fileName);
- }
-
- /**
- * Creates this environment's FontConfiguration.
- */
- protected abstract FontConfiguration createFontConfiguration();
-
- public abstract FontConfiguration
- createFontConfiguration(boolean preferLocaleFonts,
- boolean preferPropFonts);
-
- /*
- * This method asks the font configuration API for all platform names
- * used as components of composite/logical fonts and iterates over these
- * looking up their corresponding file name and registers these fonts.
- * It also ensures that the fonts are accessible via platform APIs.
- * The composites themselves are then registered.
- */
- private void
- initCompositeFonts(FontConfiguration fontConfig,
- ConcurrentHashMap<String, Font2D> altNameCache) {
-
- int numCoreFonts = fontConfig.getNumberCoreFonts();
- String[] fcFonts = fontConfig.getPlatformFontNames();
- for (int f=0; f<fcFonts.length; f++) {
- String platformFontName = fcFonts[f];
- String fontFileName =
- getFileNameFromPlatformName(platformFontName);
- String[] nativeNames = null;
- if (fontFileName == null || fontFileName.equals(platformFontName)){
- /* No file located, so register using the platform name,
- * i.e. as a native font.
- */
- fontFileName = platformFontName;
- } else {
- if (f < numCoreFonts) {
- /* If platform APIs also need to access the font, add it
- * to a set to be registered with the platform too.
- * This may be used to add the parent directory to the X11
- * font path if its not already there. See the docs for the
- * subclass implementation.
- * This is now mainly for the benefit of X11-based AWT
- * But for historical reasons, 2D initialisation code
- * makes these calls.
- * If the fontconfiguration file is properly set up
- * so that all fonts are mapped to files and all their
- * appropriate directories are specified, then this
- * method will be low cost as it will return after
- * a test that finds a null lookup map.
- */
- addFontToPlatformFontPath(platformFontName);
- }
- nativeNames = getNativeNames(fontFileName, platformFontName);
- }
- /* Uncomment these two lines to "generate" the XLFD->filename
- * mappings needed to speed start-up on Solaris.
- * Augment this with the appendedpathname and the mappings
- * for native (F3) fonts
- */
- //String platName = platformFontName.replaceAll(" ", "_");
- //System.out.println("filename."+platName+"="+fontFileName);
- registerFontFile(fontFileName, nativeNames,
- Font2D.FONT_CONFIG_RANK, true);
-
-
- }
- /* This registers accumulated paths from the calls to
- * addFontToPlatformFontPath(..) and any specified by
- * the font configuration. Rather than registering
- * the fonts it puts them in a place and form suitable for
- * the Toolkit to pick up and use if a toolkit is initialised,
- * and if it uses X11 fonts.
- */
- registerPlatformFontsUsedByFontConfiguration();
-
- CompositeFontDescriptor[] compositeFontInfo
- = fontConfig.get2DCompositeFontInfo();
- for (int i = 0; i < compositeFontInfo.length; i++) {
- CompositeFontDescriptor descriptor = compositeFontInfo[i];
- String[] componentFileNames = descriptor.getComponentFileNames();
- String[] componentFaceNames = descriptor.getComponentFaceNames();
-
- /* It would be better eventually to handle this in the
- * FontConfiguration code which should also remove duplicate slots
- */
- if (missingFontFiles != null) {
- for (int ii=0; ii<componentFileNames.length; ii++) {
- if (missingFontFiles.contains(componentFileNames[ii])) {
- componentFileNames[ii] = getDefaultFontFile();
- componentFaceNames[ii] = getDefaultFontFaceName();
- }
- }
- }
-
- /* FontConfiguration needs to convey how many fonts it has added
- * as fallback component fonts which should not affect metrics.
- * The core component count will be the number of metrics slots.
- * This does not preclude other mechanisms for adding
- * fall back component fonts to the composite.
- */
- if (altNameCache != null) {
- FontManager.registerCompositeFont(
- descriptor.getFaceName(),
- componentFileNames, componentFaceNames,
- descriptor.getCoreComponentCount(),
- descriptor.getExclusionRanges(),
- descriptor.getExclusionRangeLimits(),
- true,
- altNameCache);
- } else {
- FontManager.registerCompositeFont(
- descriptor.getFaceName(),
- componentFileNames, componentFaceNames,
- descriptor.getCoreComponentCount(),
- descriptor.getExclusionRanges(),
- descriptor.getExclusionRangeLimits(),
- true);
- }
- if (debugFonts) {
- logger.info("registered " + descriptor.getFaceName());
- }
- }
- }
-
- /**
- * Notifies graphics environment that the logical font configuration
- * uses the given platform font name. The graphics environment may
- * use this for platform specific initialization.
- */
- protected void addFontToPlatformFontPath(String platformFontName) {
- }
-
- protected void registerPlatformFontsUsedByFontConfiguration() {
- }
-
- /**
- * Determines whether the given font is a logical font.
- */
- public static boolean isLogicalFont(Font f) {
- return FontConfiguration.isLogicalFontFamilyName(f.getFamily());
- }
-
- /**
- * Return the default font configuration.
- */
- public FontConfiguration getFontConfiguration() {
- return fontConfig;
- }
-
- /**
* Return the bounds of a GraphicsDevice, less its screen insets.
* See also java.awt.GraphicsEnvironment.getUsableBounds();
*/
@@ -1209,45 +237,6 @@
}
/**
- * This method is provided for internal and exclusive use by Swing.
- * This method should no longer be called, instead directly call
- * FontManager.fontSupportsDefaultEncoding(Font).
- * This method will be removed once Swing is updated to no longer
- * call it.
- */
- public static boolean fontSupportsDefaultEncoding(Font font) {
- return FontManager.fontSupportsDefaultEncoding(font);
- }
-
- public static void useAlternateFontforJALocales() {
- FontManager.useAlternateFontforJALocales();
- }
-
- /*
- * This invocation is not in a privileged block because
- * all privileged operations (reading files and properties)
- * was conducted on the creation of the GE
- */
- public void
- createCompositeFonts(ConcurrentHashMap<String, Font2D> altNameCache,
- boolean preferLocale,
- boolean preferProportional) {
-
- FontConfiguration fontConfig =
- createFontConfiguration(preferLocale, preferProportional);
- initCompositeFonts(fontConfig, altNameCache);
- }
-
- /* If (as we do on X11) need to set a platform font path,
- * then the needed path may be specified by the platform
- * specific FontConfiguration class & data file. Such platforms
- * (ie X11) need to override this method to retrieve this information
- * into suitable data structures.
- */
- protected void getPlatformFontPathFromFontConfig() {
- }
-
- /**
* From the DisplayChangedListener interface; called
* when the display mode has been changed.
*/
diff --git a/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java b/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java
index 12296da..4c93791 100644
--- a/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java
+++ b/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java
@@ -171,9 +171,9 @@
float lw;
if (thin) {
if (antialias) {
- lw = 0.5f;
+ lw = userSpaceLineWidth(at, 0.5f);
} else {
- lw = 1.0f;
+ lw = userSpaceLineWidth(at, 1.0f);
}
} else {
lw = bs.getLineWidth();
@@ -189,6 +189,72 @@
lsink);
}
+ private float userSpaceLineWidth(AffineTransform at, float lw) {
+
+ double widthScale;
+
+ if ((at.getType() & (AffineTransform.TYPE_GENERAL_TRANSFORM |
+ AffineTransform.TYPE_GENERAL_SCALE)) != 0) {
+ widthScale = Math.sqrt(at.getDeterminant());
+ } else {
+ /* First calculate the "maximum scale" of this transform. */
+ double A = at.getScaleX(); // m00
+ double C = at.getShearX(); // m01
+ double B = at.getShearY(); // m10
+ double D = at.getScaleY(); // m11
+
+ /*
+ * Given a 2 x 2 affine matrix [ A B ] such that
+ * [ C D ]
+ * v' = [x' y'] = [Ax + Cy, Bx + Dy], we want to
+ * find the maximum magnitude (norm) of the vector v'
+ * with the constraint (x^2 + y^2 = 1).
+ * The equation to maximize is
+ * |v'| = sqrt((Ax+Cy)^2+(Bx+Dy)^2)
+ * or |v'| = sqrt((AA+BB)x^2 + 2(AC+BD)xy + (CC+DD)y^2).
+ * Since sqrt is monotonic we can maximize |v'|^2
+ * instead and plug in the substitution y = sqrt(1 - x^2).
+ * Trigonometric equalities can then be used to get
+ * rid of most of the sqrt terms.
+ */
+
+ double EA = A*A + B*B; // x^2 coefficient
+ double EB = 2*(A*C + B*D); // xy coefficient
+ double EC = C*C + D*D; // y^2 coefficient
+
+ /*
+ * There is a lot of calculus omitted here.
+ *
+ * Conceptually, in the interests of understanding the
+ * terms that the calculus produced we can consider
+ * that EA and EC end up providing the lengths along
+ * the major axes and the hypot term ends up being an
+ * adjustment for the additional length along the off-axis
+ * angle of rotated or sheared ellipses as well as an
+ * adjustment for the fact that the equation below
+ * averages the two major axis lengths. (Notice that
+ * the hypot term contains a part which resolves to the
+ * difference of these two axis lengths in the absence
+ * of rotation.)
+ *
+ * In the calculus, the ratio of the EB and (EA-EC) terms
+ * ends up being the tangent of 2*theta where theta is
+ * the angle that the long axis of the ellipse makes
+ * with the horizontal axis. Thus, this equation is
+ * calculating the length of the hypotenuse of a triangle
+ * along that axis.
+ */
+
+ double hypot = Math.sqrt(EB*EB + (EA-EC)*(EA-EC));
+ /* sqrt omitted, compare to squared limits below. */
+ double widthsquared = ((EA + EC + hypot)/2.0);
+
+ widthScale = Math.sqrt(widthsquared);
+ }
+
+ return (float) (lw / widthScale);
+ }
+
void strokeTo(Shape src,
AffineTransform at,
float width,
diff --git a/src/share/classes/sun/print/PSPrinterJob.java b/src/share/classes/sun/print/PSPrinterJob.java
index 6e2f776..84cee19 100644
--- a/src/share/classes/sun/print/PSPrinterJob.java
+++ b/src/share/classes/sun/print/PSPrinterJob.java
@@ -87,6 +87,8 @@
import sun.awt.FontDescriptor;
import sun.awt.PlatformFont;
import sun.awt.SunToolkit;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
import java.nio.charset.*;
import java.nio.CharBuffer;
@@ -1077,7 +1079,7 @@
}
int styleMask = font.getStyle() |
- sun.font.FontManager.getFont2D(font).getStyle();
+ FontUtilities.getFont2D(font).getStyle();
String style = FontConfiguration.getStyleString(styleMask);
diff --git a/src/share/classes/sun/print/PathGraphics.java b/src/share/classes/sun/print/PathGraphics.java
index 3a2da18..42cbac8 100644
--- a/src/share/classes/sun/print/PathGraphics.java
+++ b/src/share/classes/sun/print/PathGraphics.java
@@ -32,6 +32,8 @@
import sun.font.Font2D;
import sun.font.Font2DHandle;
import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
import java.awt.Color;
import java.awt.Font;
@@ -698,7 +700,7 @@
}
Font font = g.getFont();
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
if (font2D.handle.font2D != font2D) {
/* suspicious, may be a bad font. lets bail */
return false;
@@ -933,7 +935,7 @@
* The logic here is erring on the side of caution, in particular
* in including supplementary characters.
*/
- if (FontManager.isComplexText(chars, 0, chars.length)) {
+ if (FontUtilities.isComplexText(chars, 0, chars.length)) {
return printGlyphVector(g, x, y);
}
diff --git a/src/share/classes/sun/swing/SwingUtilities2.java b/src/share/classes/sun/swing/SwingUtilities2.java
index d4492e6..60681d5 100644
--- a/src/share/classes/sun/swing/SwingUtilities2.java
+++ b/src/share/classes/sun/swing/SwingUtilities2.java
@@ -53,7 +53,7 @@
import java.io.*;
import java.util.*;
import sun.font.FontDesignMetrics;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
import sun.java2d.SunGraphicsEnvironment;
import java.util.concurrent.Callable;
@@ -193,6 +193,19 @@
}
/**
+ * Fill the character buffer cache. Return the buffer length.
+ */
+ private static int syncCharsBuffer(String s) {
+ int length = s.length();
+ if ((charsBuffer == null) || (charsBuffer.length < length)) {
+ charsBuffer = s.toCharArray();
+ } else {
+ s.getChars(0, length, charsBuffer, 0);
+ }
+ return length;
+ }
+
+ /**
* checks whether TextLayout is required to handle characters.
*
* @param text characters to be tested
@@ -202,7 +215,7 @@
* <tt>false</tt> if TextLayout is not required
*/
public static final boolean isComplexLayout(char[] text, int start, int limit) {
- return FontManager.isComplexText(text, start, limit);
+ return FontUtilities.isComplexText(text, start, limit);
}
//
@@ -237,15 +250,23 @@
* Returns the left side bearing of the first character of string. The
* left side bearing is calculated from the passed in
* FontMetrics. If the passed in String is less than one
- * character, this will throw a StringIndexOutOfBoundsException exception.
+ * character {@code 0} is returned.
*
* @param c JComponent that will display the string
* @param fm FontMetrics used to measure the String width
* @param string String to get the left side bearing for.
+ * @throws NullPointerException if {@code string} is {@code null}
+ *
+ * @return the left side bearing of the first character of string
+ * or {@code 0} if the string is empty
*/
public static int getLeftSideBearing(JComponent c, FontMetrics fm,
String string) {
- return getLeftSideBearing(c, fm, string.charAt(0));
+ int res = 0;
+ if (!string.isEmpty()) {
+ res = getLeftSideBearing(c, fm, string.charAt(0));
+ }
+ return res;
}
/**
@@ -353,7 +374,21 @@
if (string == null || string.equals("")) {
return 0;
}
- return fm.stringWidth(string);
+ boolean needsTextLayout = ((c != null) &&
+ (c.getClientProperty(TextAttribute.NUMERIC_SHAPING) != null));
+ if (needsTextLayout) {
+ synchronized(charsBufferLock) {
+ int length = syncCharsBuffer(string);
+ needsTextLayout = isComplexLayout(charsBuffer, 0, length);
+ }
+ }
+ if (needsTextLayout) {
+ TextLayout layout = createTextLayout(c, string,
+ fm.getFont(), fm.getFontRenderContext());
+ return (int) layout.getAdvance();
+ } else {
+ return fm.stringWidth(string);
+ }
}
@@ -394,21 +429,11 @@
String string, int availTextWidth) {
// c may be null here.
String clipString = "...";
- int stringLength = string.length();
availTextWidth -= SwingUtilities2.stringWidth(c, fm, clipString);
- if (availTextWidth <= 0) {
- //can not fit any characters
- return clipString;
- }
-
boolean needsTextLayout;
synchronized (charsBufferLock) {
- if (charsBuffer == null || charsBuffer.length < stringLength) {
- charsBuffer = string.toCharArray();
- } else {
- string.getChars(0, stringLength, charsBuffer, 0);
- }
+ int stringLength = syncCharsBuffer(string);
needsTextLayout =
isComplexLayout(charsBuffer, 0, stringLength);
if (!needsTextLayout) {
@@ -425,6 +450,10 @@
if (needsTextLayout) {
FontRenderContext frc = getFontRenderContext(c, fm);
AttributedString aString = new AttributedString(string);
+ if (c != null) {
+ aString.addAttribute(TextAttribute.NUMERIC_SHAPING,
+ c.getClientProperty(TextAttribute.NUMERIC_SHAPING));
+ }
LineBreakMeasurer measurer =
new LineBreakMeasurer(aString.getIterator(), frc);
int nChars = measurer.nextOffset(availTextWidth);
@@ -465,7 +494,7 @@
*/
float screenWidth = (float)
g2d.getFont().getStringBounds(text, DEFAULT_FRC).getWidth();
- TextLayout layout = new TextLayout(text, g2d.getFont(),
+ TextLayout layout = createTextLayout(c, text, g2d.getFont(),
g2d.getFontRenderContext());
layout = layout.getJustifiedLayout(screenWidth);
@@ -505,7 +534,21 @@
}
}
- g.drawString(text, x, y);
+ boolean needsTextLayout = ((c != null) &&
+ (c.getClientProperty(TextAttribute.NUMERIC_SHAPING) != null));
+ if (needsTextLayout) {
+ synchronized(charsBufferLock) {
+ int length = syncCharsBuffer(text);
+ needsTextLayout = isComplexLayout(charsBuffer, 0, length);
+ }
+ }
+ if (needsTextLayout) {
+ TextLayout layout = createTextLayout(c, text, g2.getFont(),
+ g2.getFontRenderContext());
+ layout.draw(g2, x, y);
+ } else {
+ g.drawString(text, x, y);
+ }
if (oldAAValue != null) {
g2.setRenderingHint(KEY_TEXT_ANTIALIASING, oldAAValue);
@@ -547,11 +590,7 @@
boolean needsTextLayout = isPrinting;
if (!needsTextLayout) {
synchronized (charsBufferLock) {
- if (charsBuffer == null || charsBuffer.length < textLength) {
- charsBuffer = text.toCharArray();
- } else {
- text.getChars(0, textLength, charsBuffer, 0);
- }
+ syncCharsBuffer(text);
needsTextLayout =
isComplexLayout(charsBuffer, 0, textLength);
}
@@ -567,7 +606,7 @@
Graphics2D g2d = getGraphics2D(g);
if (g2d != null) {
TextLayout layout =
- new TextLayout(text, g2d.getFont(),
+ createTextLayout(c, text, g2d.getFont(),
g2d.getFontRenderContext());
if (isPrinting) {
float screenWidth = (float)g2d.getFont().
@@ -728,7 +767,7 @@
!isFontRenderContextPrintCompatible
(deviceFontRenderContext, frc)) {
TextLayout layout =
- new TextLayout(new String(data,offset,length),
+ createTextLayout(c, new String(data, offset, length),
g2d.getFont(),
deviceFontRenderContext);
float screenWidth = (float)g2d.getFont().
@@ -846,6 +885,20 @@
return retVal;
}
+ private static TextLayout createTextLayout(JComponent c, String s,
+ Font f, FontRenderContext frc) {
+ Object shaper = (c == null ?
+ null : c.getClientProperty(TextAttribute.NUMERIC_SHAPING));
+ if (shaper == null) {
+ return new TextLayout(s, f, frc);
+ } else {
+ Map<TextAttribute, Object> a = new HashMap<TextAttribute, Object>();
+ a.put(TextAttribute.FONT, f);
+ a.put(TextAttribute.NUMERIC_SHAPING, shaper);
+ return new TextLayout(s, a, frc);
+ }
+ }
+
/*
* Checks if two given FontRenderContexts are compatible for printing.
* We can't just use equals as we want to exclude from the comparison :
diff --git a/src/share/native/sun/awt/giflib/gifalloc.c b/src/share/native/sun/awt/giflib/gifalloc.c
index 1846247..aae33e2 100644
--- a/src/share/native/sun/awt/giflib/gifalloc.c
+++ b/src/share/native/sun/awt/giflib/gifalloc.c
@@ -88,6 +88,7 @@
Object->Colors = (GifColorType *)calloc(ColorCount, sizeof(GifColorType));
if (Object->Colors == (GifColorType *) NULL) {
+ free(Object);
return ((ColorMapObject *) NULL);
}
diff --git a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
index 9885687..590f8a4 100644
--- a/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
+++ b/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
@@ -37,6 +37,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
{
// NOTE: For now, we'll just pick the first alternative...
@@ -64,3 +66,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/AlternateSubstSubtables.h b/src/share/native/sun/font/layout/AlternateSubstSubtables.h
index 03e63c8..9d0e3b5 100644
--- a/src/share/native/sun/font/layout/AlternateSubstSubtables.h
+++ b/src/share/native/sun/font/layout/AlternateSubstSubtables.h
@@ -32,12 +32,19 @@
#ifndef __ALTERNATESUBSTITUTIONSUBTABLES_H
#define __ALTERNATESUBSTITUTIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "OpenTypeTables.h"
#include "GlyphSubstitutionTables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct AlternateSetTable
{
le_uint16 glyphCount;
@@ -52,4 +59,5 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/AnchorTables.cpp b/src/share/native/sun/font/layout/AnchorTables.cpp
index caaf349..3d13377 100644
--- a/src/share/native/sun/font/layout/AnchorTables.cpp
+++ b/src/share/native/sun/font/layout/AnchorTables.cpp
@@ -35,6 +35,8 @@
#include "AnchorTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance,
LEPoint &anchor) const
{
@@ -124,3 +126,6 @@
fontInstance->pixelsToUnits(pixels, anchor);
}
+
+U_NAMESPACE_END
+
diff --git a/src/share/native/sun/font/layout/AnchorTables.h b/src/share/native/sun/font/layout/AnchorTables.h
index d34124e..c267793 100644
--- a/src/share/native/sun/font/layout/AnchorTables.h
+++ b/src/share/native/sun/font/layout/AnchorTables.h
@@ -32,10 +32,17 @@
#ifndef __ANCHORTABLES_H
#define __ANCHORTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct AnchorTable
{
le_uint16 anchorFormat;
@@ -66,5 +73,7 @@
void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const;
};
-
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp b/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
index 85b73a1..4d055a9 100644
--- a/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp
@@ -49,23 +49,25 @@
#include "ArabicShaping.h"
#include "CanonShaping.h"
+U_NAMESPACE_BEGIN
+
le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const
{
return fFontInstance->canDisplay((LEUnicode) glyph);
}
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
- const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
- le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine)
+
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
: OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
{
fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
fFeatureOrder = TRUE;
}
-ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(
- const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags)
: OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
{
fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount);
@@ -86,9 +88,8 @@
// Input: characters
// Output: characters, char indices, tags
// Returns: output character count
-le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -124,8 +125,8 @@
return count;
}
-void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -137,24 +138,20 @@
}
if (fGPOSTable != NULL) {
- OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count,
- reverse, glyphStorage, success);
+ OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success);
} else if (fGDEFTable != NULL) {
GDEFMarkFilter filter(fGDEFTable);
adjustMarkGlyphs(glyphStorage, &filter, success);
} else {
- GlyphDefinitionTableHeader *gdefTable =
- (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
+ GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable;
GDEFMarkFilter filter(gdefTable);
adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
}
}
-UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(
- const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
: ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
{
fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
@@ -169,8 +166,7 @@
}
// "glyphs", "indices" -> glyphs, indices
-le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(
- LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -193,17 +189,14 @@
glyphStorage.adoptCharIndicesArray(tempGlyphStorage);
- ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE,
- TRUE, glyphStorage, success);
+ ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE, TRUE, glyphStorage, success);
LE_DELETE_ARRAY(tempChars);
return tempGlyphCount;
}
-void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -228,9 +221,8 @@
}
}
-void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_bool reverse,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -245,3 +237,6 @@
adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
}
+
+U_NAMESPACE_END
+
diff --git a/src/share/native/sun/font/layout/ArabicLayoutEngine.h b/src/share/native/sun/font/layout/ArabicLayoutEngine.h
index 45b0082..b8bd02b 100644
--- a/src/share/native/sun/font/layout/ArabicLayoutEngine.h
+++ b/src/share/native/sun/font/layout/ArabicLayoutEngine.h
@@ -43,6 +43,8 @@
#include "GlyphDefinitionTables.h"
#include "GlyphPositioningTables.h"
+U_NAMESPACE_BEGIN
+
/**
* This class implements OpenType layout for Arabic fonts. It overrides
* the characerProcessing method to assign the correct OpenType feature
@@ -71,8 +73,8 @@
*
* @internal
*/
- ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
/**
* This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -87,8 +89,8 @@
*
* @internal
*/
- ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, le_int32 typoFlags);
+ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -97,6 +99,20 @@
*/
virtual ~ArabicOpenTypeLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
@@ -108,8 +124,7 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the characters are in a
- * right to left directional run
+ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
*
* Output parameters:
* @param outChars - the output character arrayt
@@ -121,9 +136,8 @@
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method applies the GPOS table if it is present, otherwise it ensures that all vowel
@@ -142,11 +156,9 @@
*
* @internal
*/
- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
- // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
- // le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ // static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
};
@@ -178,8 +190,8 @@
*
* @internal
*/
- UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+ UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -208,8 +220,7 @@
*
* @internal
*/
- virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method copies the input characters into the output glyph index array,
@@ -227,8 +238,7 @@
*
* @internal
*/
- virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, le_bool mirror,
+ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
@@ -245,8 +255,9 @@
*
* @internal
*/
- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ArabicShaping.cpp b/src/share/native/sun/font/layout/ArabicShaping.cpp
index 4e476ca..140a7a0 100644
--- a/src/share/native/sun/font/layout/ArabicShaping.cpp
+++ b/src/share/native/sun/font/layout/ArabicShaping.cpp
@@ -35,6 +35,8 @@
#include "LEGlyphStorage.h"
#include "ClassDefinitionTables.h"
+U_NAMESPACE_BEGIN
+
// This table maps Unicode joining types to
// ShapeTypes.
const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] =
@@ -102,9 +104,7 @@
#define markFeatureMask 0x00040000UL
#define mkmkFeatureMask 0x00020000UL
-#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | \
- markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | \
- dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
+#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
#define SHAPE_MASK 0xF0000000UL
@@ -226,3 +226,5 @@
adjustTags(erout, 2, glyphStorage);
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ArabicShaping.h b/src/share/native/sun/font/layout/ArabicShaping.h
index 517ccf0..b3b3f90 100644
--- a/src/share/native/sun/font/layout/ArabicShaping.h
+++ b/src/share/native/sun/font/layout/ArabicShaping.h
@@ -32,12 +32,19 @@
#ifndef __ARABICSHAPING_H
#define __ARABICSHAPING_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
-class ArabicShaping {
+class ArabicShaping /* not : public UObject because all methods are static */ {
public:
// Joining types
enum JoiningTypes
@@ -74,8 +81,8 @@
typedef le_int32 ShapeType;
- static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount,
- le_int32 charMax, le_bool rightToLeft, LEGlyphStorage &glyphStorage);
+ static void shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
+ le_bool rightToLeft, LEGlyphStorage &glyphStorage);
static const FeatureMap *getFeatureMap(le_int32 &count);
@@ -88,8 +95,8 @@
static const le_uint8 shapingTypeTable[];
static const ShapeType shapeTypes[];
- static void adjustTags(le_int32 outIndex, le_int32 shapeOffset,
- LEGlyphStorage &glyphStorage);
+ static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage);
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/AttachmentPosnSubtables.h b/src/share/native/sun/font/layout/AttachmentPosnSubtables.h
index d7b109e..ad097c8 100644
--- a/src/share/native/sun/font/layout/AttachmentPosnSubtables.h
+++ b/src/share/native/sun/font/layout/AttachmentPosnSubtables.h
@@ -32,12 +32,19 @@
#ifndef __ATTACHMENTPOSITIONINGSUBTABLES_H
#define __ATTACHMENTPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "GlyphPositioningTables.h"
#include "ValueRecords.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct AttachmentPositioningSubtable : GlyphPositioningSubtable
{
Offset baseCoverageTableOffset;
@@ -55,4 +62,6 @@
return getGlyphCoverage(baseCoverageTableOffset, baseGlyphID);
}
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/CanonData.cpp b/src/share/native/sun/font/layout/CanonData.cpp
index 1450b5c..e3d14ad 100644
--- a/src/share/native/sun/font/layout/CanonData.cpp
+++ b/src/share/native/sun/font/layout/CanonData.cpp
@@ -36,6 +36,8 @@
#include "LETypes.h"
#include "CanonShaping.h"
+U_NAMESPACE_BEGIN
+
const le_uint8 CanonShaping::glyphSubstitutionTable[] = {
0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x01, 0x58, 0x02, 0x86, 0x00, 0x12, 0x61, 0x72, 0x61, 0x62,
0x00, 0x6E, 0x62, 0x65, 0x6E, 0x67, 0x00, 0x82, 0x63, 0x79, 0x72, 0x6C, 0x00, 0x8E, 0x64, 0x65,
@@ -3773,3 +3775,5 @@
0x00, 0xDC, 0xD1, 0x85, 0xD1, 0x89, 0x00, 0xE6, 0xD1, 0x8A, 0xD1, 0x8B, 0x00, 0xDC, 0xD1, 0xAA,
0xD1, 0xAD, 0x00, 0xE6, 0xD2, 0x42, 0xD2, 0x44, 0x00, 0xE6
};
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/CanonShaping.cpp b/src/share/native/sun/font/layout/CanonShaping.cpp
index 77aca5e..a95eddf 100644
--- a/src/share/native/sun/font/layout/CanonShaping.cpp
+++ b/src/share/native/sun/font/layout/CanonShaping.cpp
@@ -35,8 +35,9 @@
#include "GlyphDefinitionTables.h"
#include "ClassDefinitionTables.h"
-void CanonShaping::sortMarks(le_int32 *indices,
- const le_int32 *combiningClasses, le_int32 index, le_int32 limit)
+U_NAMESPACE_BEGIN
+
+void CanonShaping::sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit)
{
for (le_int32 j = index + 1; j < limit; j += 1) {
le_int32 i;
@@ -55,13 +56,11 @@
}
}
-void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount,
- le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage)
+void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
+ LEUnicode *outChars, LEGlyphStorage &glyphStorage)
{
- const GlyphDefinitionTableHeader *gdefTable =
- (const GlyphDefinitionTableHeader *) glyphDefinitionTable;
- const ClassDefinitionTable *classTable =
- gdefTable->getMarkAttachClassDefinitionTable();
+ const GlyphDefinitionTableHeader *gdefTable = (const GlyphDefinitionTableHeader *) glyphDefinitionTable;
+ const ClassDefinitionTable *classTable = gdefTable->getMarkAttachClassDefinitionTable();
le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount);
le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount);
LEErrorCode status = LE_NO_ERROR;
@@ -103,3 +102,5 @@
LE_DELETE_ARRAY(indices);
LE_DELETE_ARRAY(combiningClasses);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/CanonShaping.h b/src/share/native/sun/font/layout/CanonShaping.h
index 16a6a59..4980dda 100644
--- a/src/share/native/sun/font/layout/CanonShaping.h
+++ b/src/share/native/sun/font/layout/CanonShaping.h
@@ -34,20 +34,22 @@
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
-class CanonShaping
+class CanonShaping /* not : public UObject because all members are static */
{
public:
static const le_uint8 glyphSubstitutionTable[];
static const le_uint8 glyphDefinitionTable[];
- static void reorderMarks(const LEUnicode *inChars, le_int32 charCount,
- le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage);
+ static void reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft,
+ LEUnicode *outChars, LEGlyphStorage &glyphStorage);
private:
- static void sortMarks(le_int32 *indices, const le_int32 *combiningClasses,
- le_int32 index, le_int32 limit);
+ static void sortMarks(le_int32 *indices, const le_int32 *combiningClasses, le_int32 index, le_int32 limit);
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/CharSubstitutionFilter.h b/src/share/native/sun/font/layout/CharSubstitutionFilter.h
index 7d4dbac..c1514cd 100644
--- a/src/share/native/sun/font/layout/CharSubstitutionFilter.h
+++ b/src/share/native/sun/font/layout/CharSubstitutionFilter.h
@@ -35,6 +35,8 @@
#include "LETypes.h"
#include "LEGlyphFilter.h"
+U_NAMESPACE_BEGIN
+
class LEFontInstance;
/**
@@ -43,7 +45,7 @@
*
* @internal
*/
-class CharSubstitutionFilter : public LEGlyphFilter
+class CharSubstitutionFilter : public UMemory, public LEGlyphFilter
{
private:
/**
@@ -98,4 +100,7 @@
le_bool accept(LEGlyphID glyph) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/ClassDefinitionTables.cpp b/src/share/native/sun/font/layout/ClassDefinitionTables.cpp
index 49d3cd1..2988a34 100644
--- a/src/share/native/sun/font/layout/ClassDefinitionTables.cpp
+++ b/src/share/native/sun/font/layout/ClassDefinitionTables.cpp
@@ -35,6 +35,8 @@
#include "ClassDefinitionTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_int32 ClassDefinitionTable::getGlyphClass(LEGlyphID glyphID) const
{
switch(SWAPW(classFormat)) {
@@ -139,3 +141,5 @@
return FALSE;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ClassDefinitionTables.h b/src/share/native/sun/font/layout/ClassDefinitionTables.h
index b1ac424..cd728e0 100644
--- a/src/share/native/sun/font/layout/ClassDefinitionTables.h
+++ b/src/share/native/sun/font/layout/ClassDefinitionTables.h
@@ -32,9 +32,16 @@
#ifndef __CLASSDEFINITIONTABLES_H
#define __CLASSDEFINITIONTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct ClassDefinitionTable
{
le_uint16 classFormat;
@@ -69,4 +76,5 @@
le_bool hasGlyphClass(le_int32 glyphClass) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/ContextualGlyphInsertion.h b/src/share/native/sun/font/layout/ContextualGlyphInsertion.h
index 229322c..d0b2bc6 100644
--- a/src/share/native/sun/font/layout/ContextualGlyphInsertion.h
+++ b/src/share/native/sun/font/layout/ContextualGlyphInsertion.h
@@ -32,12 +32,19 @@
#ifndef __CONTEXTUALGLYPHINSERTION_H
#define __CONTEXTUALGLYPHINSERTION_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "StateTables.h"
#include "MorphTables.h"
#include "MorphStateTables.h"
+U_NAMESPACE_BEGIN
+
struct ContextualGlyphInsertionHeader : MorphStateTableHeader
{
};
@@ -60,4 +67,5 @@
ByteOffset markedInsertionListOffset;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
index 7168598..1d8dab5 100644
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp
@@ -39,6 +39,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor)
+
ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
{
@@ -57,8 +61,7 @@
markGlyph = 0;
}
-ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
- le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
{
const ContextualGlyphSubstitutionStateEntry *entry = &entryTable[index];
ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -97,3 +100,5 @@
void ContextualGlyphSubstitutionProcessor::endStateTable()
{
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h
index 0acd3d5..80b91d5 100644
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h
@@ -32,12 +32,19 @@
#ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
#define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "StateTableProcessor.h"
#include "ContextualGlyphSubstitution.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class ContextualGlyphSubstitutionProcessor : public StateTableProcessor
@@ -52,6 +59,20 @@
ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
virtual ~ContextualGlyphSubstitutionProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
ContextualGlyphSubstitutionProcessor();
@@ -62,6 +83,8 @@
le_int32 markGlyph;
const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader;
+
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h b/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h
index 137c9c2..550b048 100644
--- a/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h
+++ b/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h
@@ -32,11 +32,18 @@
#ifndef __CONTEXTUALGLYPHSUBSTITUTION_H
#define __CONTEXTUALGLYPHSUBSTITUTION_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "StateTables.h"
#include "MorphTables.h"
+U_NAMESPACE_BEGIN
+
struct ContextualGlyphSubstitutionHeader : MorphStateTableHeader
{
ByteOffset substitutionTableOffset;
@@ -55,4 +62,5 @@
WordOffset currOffset;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp b/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp
index e5ca631..e40d910 100644
--- a/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp
+++ b/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -39,6 +38,8 @@
#include "CoverageTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
/*
NOTE: This could be optimized somewhat by keeping track
of the previous sequenceIndex in the loop and doing next()
@@ -350,7 +351,7 @@
// NOTE: This could be a #define, but that seems to confuse
// the Visual Studio .NET 2003 compiler on the calls to the
-// GlyphIterator constructor. It somehow can't decide if
+// GlyphIterator constructor. It somehow can't decide if
// emptyFeatureList matches an le_uint32 or an le_uint16...
static const FeatureMask emptyFeatureList = 0x00000000UL;
@@ -542,3 +543,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ContextualSubstSubtables.h b/src/share/native/sun/font/layout/ContextualSubstSubtables.h
index aa1873c..35131e0 100644
--- a/src/share/native/sun/font/layout/ContextualSubstSubtables.h
+++ b/src/share/native/sun/font/layout/ContextualSubstSubtables.h
@@ -32,6 +32,11 @@
#ifndef __CONTEXTUALSUBSTITUTIONSUBTABLES_H
#define __CONTEXTUALSUBSTITUTIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "GlyphIterator.h"
#include "LookupProcessor.h"
+U_NAMESPACE_BEGIN
+
struct SubstitutionLookupRecord
{
le_uint16 sequenceIndex;
@@ -218,4 +225,5 @@
le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/CoverageTables.cpp b/src/share/native/sun/font/layout/CoverageTables.cpp
index f168196..022300f 100644
--- a/src/share/native/sun/font/layout/CoverageTables.cpp
+++ b/src/share/native/sun/font/layout/CoverageTables.cpp
@@ -35,6 +35,8 @@
#include "CoverageTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const
{
switch(SWAPW(coverageFormat))
@@ -106,3 +108,5 @@
return startCoverageIndex + (ttGlyphID - firstInRange);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/CoverageTables.h b/src/share/native/sun/font/layout/CoverageTables.h
index 900b3de..11e3359 100644
--- a/src/share/native/sun/font/layout/CoverageTables.h
+++ b/src/share/native/sun/font/layout/CoverageTables.h
@@ -32,9 +32,16 @@
#ifndef __COVERAGETABLES_H
#define __COVERAGETABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct CoverageTable
{
le_uint16 coverageFormat;
@@ -58,5 +65,5 @@
le_int32 getGlyphCoverage(LEGlyphID glyphID) const;
};
-
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp
index 712fa4c..1fecc4b 100644
--- a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp
+++ b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp
@@ -37,6 +37,8 @@
#include "OpenTypeUtilities.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
{
LEGlyphID glyphID = glyphIterator->getCurrGlyphID();
@@ -68,3 +70,5 @@
return 1;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h
index 9cd1949..27bfcf7 100644
--- a/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h
+++ b/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h
@@ -32,10 +32,17 @@
#ifndef __CURSIVEATTACHMENTSUBTABLES_H
#define __CURSIVEATTACHMENTSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "GlyphPositioningTables.h"
+U_NAMESPACE_BEGIN
+
class LEFontInstance;
class GlyphIterator;
@@ -53,4 +60,7 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/DefaultCharMapper.h b/src/share/native/sun/font/layout/DefaultCharMapper.h
index 99700ad..332aa74 100644
--- a/src/share/native/sun/font/layout/DefaultCharMapper.h
+++ b/src/share/native/sun/font/layout/DefaultCharMapper.h
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,9 +31,16 @@
#ifndef __DEFAULTCHARMAPPER_H
#define __DEFAULTCHARMAPPER_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
+U_NAMESPACE_BEGIN
+
/**
* This class is an instance of LECharMapper which
* implements control character filtering and bidi
@@ -42,7 +48,7 @@
*
* @see LECharMapper
*/
-class DefaultCharMapper : public LECharMapper
+class DefaultCharMapper : public UMemory, public LECharMapper
{
private:
le_bool fFilterControls;
@@ -77,4 +83,5 @@
LEUnicode32 mapChar(LEUnicode32 ch) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/DeviceTables.cpp b/src/share/native/sun/font/layout/DeviceTables.cpp
index d44b3a5..3a223e9 100644
--- a/src/share/native/sun/font/layout/DeviceTables.cpp
+++ b/src/share/native/sun/font/layout/DeviceTables.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved
*
*/
@@ -34,6 +35,8 @@
#include "DeviceTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
const le_uint16 DeviceTable::fieldMasks[] = {0x0003, 0x000F, 0x00FF};
const le_uint16 DeviceTable::fieldSignBits[] = {0x0002, 0x0008, 0x0080};
const le_uint16 DeviceTable::fieldBits[] = { 2, 4, 8};
@@ -62,3 +65,5 @@
return result;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/DeviceTables.h b/src/share/native/sun/font/layout/DeviceTables.h
index 038aeb5..80c54c9 100644
--- a/src/share/native/sun/font/layout/DeviceTables.h
+++ b/src/share/native/sun/font/layout/DeviceTables.h
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,10 +33,15 @@
#ifndef __DEVICETABLES_H
#define __DEVICETABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
-#include "GlyphIterator.h"
-#include "GlyphPositionAdjustments.h"
+
+U_NAMESPACE_BEGIN
struct DeviceTable
{
@@ -52,5 +58,7 @@
static const le_uint16 fieldBits[];
};
-
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/ExtensionSubtables.cpp b/src/share/native/sun/font/layout/ExtensionSubtables.cpp
index 44edea1..008e2e0 100644
--- a/src/share/native/sun/font/layout/ExtensionSubtables.cpp
+++ b/src/share/native/sun/font/layout/ExtensionSubtables.cpp
@@ -25,7 +25,8 @@
/*
*
- * (C) Copyright IBM Corp. 2003 - All Rights Reserved
+ *
+ * (C) Copyright IBM Corp. 2002 - All Rights Reserved
*
*/
@@ -37,6 +38,9 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+
// FIXME: should look at the format too... maybe have a sub-class for it?
le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
@@ -52,3 +56,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ExtensionSubtables.h b/src/share/native/sun/font/layout/ExtensionSubtables.h
index 5aa2121..1dedad8 100644
--- a/src/share/native/sun/font/layout/ExtensionSubtables.h
+++ b/src/share/native/sun/font/layout/ExtensionSubtables.h
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 2002-2003 - All Rights Reserved
*
*/
@@ -32,12 +33,19 @@
#ifndef __EXTENSIONSUBTABLES_H
#define __EXTENSIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "GlyphSubstitutionTables.h"
#include "LookupProcessor.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct ExtensionSubtable //: GlyphSubstitutionSubtable
{
le_uint16 substFormat;
@@ -48,4 +56,5 @@
GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/Features.cpp b/src/share/native/sun/font/layout/Features.cpp
index 339f819..09c2deb 100644
--- a/src/share/native/sun/font/layout/Features.cpp
+++ b/src/share/native/sun/font/layout/Features.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
*
*/
@@ -35,6 +36,8 @@
#include "Features.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
const FeatureTable *FeatureListTable::getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const
{
if (featureIndex >= SWAPW(featureCount)) {
@@ -79,3 +82,5 @@
return 0;
#endif
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/Features.h b/src/share/native/sun/font/layout/Features.h
index 5673fd4..d816b9e 100644
--- a/src/share/native/sun/font/layout/Features.h
+++ b/src/share/native/sun/font/layout/Features.h
@@ -32,9 +32,16 @@
#ifndef __FEATURES_H
#define __FEATURES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct FeatureRecord
{
ATag featureTag;
@@ -53,9 +60,10 @@
le_uint16 featureCount;
FeatureRecord featureRecordArray[ANY_NUMBER];
- const FeatureTable *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const;
+ const FeatureTable *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const;
const FeatureTable *getFeatureTable(LETag featureTag) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GDEFMarkFilter.cpp b/src/share/native/sun/font/layout/GDEFMarkFilter.cpp
index e326f90..3c4abf6 100644
--- a/src/share/native/sun/font/layout/GDEFMarkFilter.cpp
+++ b/src/share/native/sun/font/layout/GDEFMarkFilter.cpp
@@ -34,6 +34,8 @@
#include "GDEFMarkFilter.h"
#include "GlyphDefinitionTables.h"
+U_NAMESPACE_BEGIN
+
GDEFMarkFilter::GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable)
{
classDefTable = gdefTable->getGlyphClassDefinitionTable();
@@ -50,3 +52,5 @@
return glyphClass == gcdMarkGlyph;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GDEFMarkFilter.h b/src/share/native/sun/font/layout/GDEFMarkFilter.h
index 0658cb4..ccd149e 100644
--- a/src/share/native/sun/font/layout/GDEFMarkFilter.h
+++ b/src/share/native/sun/font/layout/GDEFMarkFilter.h
@@ -32,11 +32,18 @@
#ifndef __GDEFMARKFILTER__H
#define __GDEFMARKFILTER__H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "GlyphDefinitionTables.h"
-class GDEFMarkFilter : public LEGlyphFilter
+U_NAMESPACE_BEGIN
+
+class GDEFMarkFilter : public UMemory, public LEGlyphFilter
{
private:
const GlyphClassDefinitionTable *classDefTable;
@@ -51,5 +58,5 @@
virtual le_bool accept(LEGlyphID glyph) const;
};
-
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GXLayoutEngine.cpp b/src/share/native/sun/font/layout/GXLayoutEngine.cpp
index a039cfa..b449dc7 100644
--- a/src/share/native/sun/font/layout/GXLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/GXLayoutEngine.cpp
@@ -23,6 +23,7 @@
*
*/
+
/*
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -36,8 +37,11 @@
#include "MorphTables.h"
-GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, const MorphTableHeader *morphTable)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine)
+
+GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable)
: LayoutEngine(fontInstance, scriptCode, languageCode, 0), fMorphTable(morphTable)
{
// nothing else to do?
@@ -49,9 +53,7 @@
}
// apply 'mort' table
-le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
- LEErrorCode &success)
+le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -74,9 +76,8 @@
}
// apply positional tables
-void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_bool /*reverse*/,
- LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
+void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/,
+ LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -89,3 +90,5 @@
// FIXME: no positional processing yet...
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GXLayoutEngine.h b/src/share/native/sun/font/layout/GXLayoutEngine.h
index e333c82..9e3a114 100644
--- a/src/share/native/sun/font/layout/GXLayoutEngine.h
+++ b/src/share/native/sun/font/layout/GXLayoutEngine.h
@@ -23,6 +23,7 @@
*
*/
+
/*
*
* (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
@@ -37,6 +38,8 @@
#include "MorphTables.h"
+U_NAMESPACE_BEGIN
+
class LEFontInstance;
class LEGlyphStorage;
@@ -70,8 +73,7 @@
*
* @internal
*/
- GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, const MorphTableHeader *morphTable);
+ GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -80,6 +82,20 @@
*/
virtual ~GXLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
@@ -99,10 +115,8 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the text is in a
- * right to left directional run
- * @param glyphStorage - the glyph storage object. The glyph
- * and char index arrays will be set.
+ * @param rightToLeft - <code>TRUE</code> if the text is in a right to left directional run
+ * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -111,8 +125,7 @@
*
* @internal
*/
- virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
+ virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
@@ -120,16 +133,18 @@
* 'kern', 'trak', 'bsln', 'opbd' and 'just' tables.
*
* Input parameters:
- * @param glyphStorage - the object holding the glyph storage.
- * The positions will be updated as needed.
+ * @param glyphStorage - the object holding the glyph storage. The positions will be updated as needed.
*
* Output parameters:
* @param success - set to an error code if the operation fails
*
* @internal
*/
- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp b/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp
index 64ac003..32d6b1e 100644
--- a/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp
+++ b/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp
@@ -34,6 +34,8 @@
#include "GlyphDefinitionTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
const GlyphClassDefinitionTable *GlyphDefinitionTableHeader::getGlyphClassDefinitionTable() const
{
return (const GlyphClassDefinitionTable *) ((char *) this + SWAPW(glyphClassDefOffset));
@@ -53,3 +55,5 @@
{
return (const MarkAttachClassDefinitionTable *) ((char *) this + SWAPW(MarkAttachClassDefOffset));
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphDefinitionTables.h b/src/share/native/sun/font/layout/GlyphDefinitionTables.h
index d95f197..cea4372 100644
--- a/src/share/native/sun/font/layout/GlyphDefinitionTables.h
+++ b/src/share/native/sun/font/layout/GlyphDefinitionTables.h
@@ -32,10 +32,17 @@
#ifndef __GLYPHDEFINITIONTABLES_H
#define __GLYPHDEFINITIONTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "ClassDefinitionTables.h"
+U_NAMESPACE_BEGIN
+
typedef ClassDefinitionTable GlyphClassDefinitionTable;
enum GlyphClassDefinitions
@@ -110,4 +117,5 @@
const MarkAttachClassDefinitionTable *getMarkAttachClassDefinitionTable() const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphIterator.cpp b/src/share/native/sun/font/layout/GlyphIterator.cpp
index 525494d..f6e7b23 100644
--- a/src/share/native/sun/font/layout/GlyphIterator.cpp
+++ b/src/share/native/sun/font/layout/GlyphIterator.cpp
@@ -38,11 +38,10 @@
#include "Lookups.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
-GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage,
- GlyphPositionAdjustments *theGlyphPositionAdjustments,
- le_bool rightToLeft, le_uint16 theLookupFlags, FeatureMask theFeatureMask,
- const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
+GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
+ FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
: direction(1), position(-1), nextLimit(-1), prevLimit(-1),
glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments),
srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask),
@@ -262,8 +261,8 @@
glyphPositionAdjustments->setBaseOffset(position, baseOffset);
}
-void GlyphIterator::adjustCurrGlyphPositionAdjustment(float xPlacementAdjust,
- float yPlacementAdjust, float xAdvanceAdjust, float yAdvanceAdjust)
+void GlyphIterator::adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
+ float xAdvanceAdjust, float yAdvanceAdjust)
{
if (direction < 0) {
if (position <= nextLimit || position >= prevLimit) {
@@ -281,8 +280,8 @@
glyphPositionAdjustments->adjustYAdvance(position, yAdvanceAdjust);
}
-void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust,
- float yPlacementAdjust, float xAdvanceAdjust, float yAdvanceAdjust)
+void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
+ float xAdvanceAdjust, float yAdvanceAdjust)
{
if (direction < 0) {
if (position <= nextLimit || position >= prevLimit) {
@@ -484,10 +483,11 @@
do {
newPosition -= direction;
- } while (newPosition != prevLimit && glyphStorage[newPosition] != 0xFFFE &&
- filterGlyph(newPosition));
+ } while (newPosition != prevLimit && glyphStorage[newPosition] != 0xFFFE && filterGlyph(newPosition));
position = newPosition;
return position != prevLimit;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphIterator.h b/src/share/native/sun/font/layout/GlyphIterator.h
index e15f0f1..2933830 100644
--- a/src/share/native/sun/font/layout/GlyphIterator.h
+++ b/src/share/native/sun/font/layout/GlyphIterator.h
@@ -32,26 +32,24 @@
#ifndef __GLYPHITERATOR_H
#define __GLYPHITERATOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "GlyphDefinitionTables.h"
-struct InsertionRecord
-{
- InsertionRecord *next;
- le_int32 position;
- le_int32 count;
- LEGlyphID glyphs[ANY_NUMBER];
-};
+U_NAMESPACE_BEGIN
class LEGlyphStorage;
class GlyphPositionAdjustments;
-class GlyphIterator {
+class GlyphIterator : public UMemory {
public:
- GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments,
- le_bool rightToLeft, le_uint16 theLookupFlags, FeatureMask theFeatureMask,
- const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
+ GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags,
+ FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
GlyphIterator(GlyphIterator &that);
@@ -122,4 +120,5 @@
GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphLookupTables.cpp b/src/share/native/sun/font/layout/GlyphLookupTables.cpp
index 8b86a3e..1f35bec 100644
--- a/src/share/native/sun/font/layout/GlyphLookupTables.cpp
+++ b/src/share/native/sun/font/layout/GlyphLookupTables.cpp
@@ -35,6 +35,8 @@
#include "GlyphLookupTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_bool GlyphLookupTableHeader::coversScript(LETag scriptTag) const
{
const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
@@ -51,3 +53,5 @@
// Note: don't have to SWAPW langSysTable->featureCount to check for non-zero.
return langSysTable != NULL && langSysTable->featureCount != 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphLookupTables.h b/src/share/native/sun/font/layout/GlyphLookupTables.h
index 06729ae..a44bed7 100644
--- a/src/share/native/sun/font/layout/GlyphLookupTables.h
+++ b/src/share/native/sun/font/layout/GlyphLookupTables.h
@@ -32,9 +32,16 @@
#ifndef __GLYPHLOOKUPTABLES_H
#define __GLYPHLOOKUPTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct GlyphLookupTableHeader
{
fixed32 version;
@@ -46,4 +53,7 @@
le_bool coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
};
+U_NAMESPACE_END
+
#endif
+
diff --git a/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp b/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp
index 533f961..e9a17e0 100644
--- a/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp
+++ b/src/share/native/sun/font/layout/GlyphPositionAdjustments.cpp
@@ -34,6 +34,8 @@
#include "LEGlyphStorage.h"
#include "LEFontInstance.h"
+U_NAMESPACE_BEGIN
+
#define CHECK_ALLOCATE_ARRAY(array, type, size) \
if (array == NULL) { \
array = (type *) new type[size]; \
@@ -185,3 +187,5 @@
return NULL;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphPositionAdjustments.h b/src/share/native/sun/font/layout/GlyphPositionAdjustments.h
index 6523b0b..722af2f 100644
--- a/src/share/native/sun/font/layout/GlyphPositionAdjustments.h
+++ b/src/share/native/sun/font/layout/GlyphPositionAdjustments.h
@@ -32,16 +32,23 @@
#ifndef __GLYPHPOSITIONADJUSTMENTS_H
#define __GLYPHPOSITIONADJUSTMENTS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class LEFontInstance;
-class GlyphPositionAdjustments
+class GlyphPositionAdjustments : public UMemory
{
private:
- class Adjustment {
+ class Adjustment : public UMemory {
public:
inline Adjustment();
@@ -78,7 +85,7 @@
// allow copying of this class because all of its fields are simple types
};
- class EntryExitPoint
+ class EntryExitPoint : public UMemory
{
public:
inline EntryExitPoint();
@@ -144,14 +151,11 @@
inline void adjustXAdvance(le_int32 index, float xAdjustment);
inline void adjustYAdvance(le_int32 index, float yAdjustment);
- void setEntryPoint(le_int32 index, LEPoint &newEntryPoint,
- le_bool baselineIsLogicalEnd);
- void setExitPoint(le_int32 index, LEPoint &newExitPoint,
- le_bool baselineIsLogicalEnd);
+ void setEntryPoint(le_int32 index, LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd);
+ void setExitPoint(le_int32 index, LEPoint &newExitPoint, le_bool baselineIsLogicalEnd);
void setCursiveGlyph(le_int32 index, le_bool baselineIsLogicalEnd);
- void applyCursiveAdjustments(LEGlyphStorage &glyphStorage, le_bool rightToLeft,
- const LEFontInstance *fontInstance);
+ void applyCursiveAdjustments(LEGlyphStorage &glyphStorage, le_bool rightToLeft, const LEFontInstance *fontInstance);
};
inline GlyphPositionAdjustments::Adjustment::Adjustment()
@@ -160,10 +164,8 @@
// nothing else to do!
}
-inline GlyphPositionAdjustments::Adjustment::Adjustment(float xPlace, float yPlace,
- float xAdv, float yAdv, le_int32 baseOff)
- : xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv),
- baseOffset(baseOff)
+inline GlyphPositionAdjustments::Adjustment::Adjustment(float xPlace, float yPlace, float xAdv, float yAdv, le_int32 baseOff)
+ : xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv), baseOffset(baseOff)
{
// nothing else to do!
}
@@ -246,7 +248,7 @@
inline GlyphPositionAdjustments::EntryExitPoint::EntryExitPoint()
: fFlags(0)
{
- fEntryPoint.fX = fEntryPoint.fY = fExitPoint.fX = fEntryPoint.fY = 0;
+ fEntryPoint.fX = fEntryPoint.fY = fExitPoint.fX = fExitPoint.fY = 0;
}
inline GlyphPositionAdjustments::EntryExitPoint::~EntryExitPoint()
@@ -264,12 +266,10 @@
return (fFlags & EEF_BASELINE_IS_LOGICAL_END) != 0;
}
-inline void GlyphPositionAdjustments::EntryExitPoint::setEntryPoint(
- LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setEntryPoint(LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd)
{
if (baselineIsLogicalEnd) {
- fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH |
- EEF_BASELINE_IS_LOGICAL_END);
+ fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
} else {
fFlags |= (EEF_HAS_ENTRY_POINT | EEF_IS_CURSIVE_GLYPH);
}
@@ -277,12 +277,10 @@
fEntryPoint = newEntryPoint;
}
-inline void GlyphPositionAdjustments::EntryExitPoint::setExitPoint(
- LEPoint &newExitPoint, le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setExitPoint(LEPoint &newExitPoint, le_bool baselineIsLogicalEnd)
{
if (baselineIsLogicalEnd) {
- fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH |
- EEF_BASELINE_IS_LOGICAL_END);
+ fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
} else {
fFlags |= (EEF_HAS_EXIT_POINT | EEF_IS_CURSIVE_GLYPH);
}
@@ -290,8 +288,7 @@
fExitPoint = newExitPoint;
}
-inline void GlyphPositionAdjustments::EntryExitPoint::setCursiveGlyph(
- le_bool baselineIsLogicalEnd)
+inline void GlyphPositionAdjustments::EntryExitPoint::setCursiveGlyph(le_bool baselineIsLogicalEnd)
{
if (baselineIsLogicalEnd) {
fFlags |= (EEF_IS_CURSIVE_GLYPH | EEF_BASELINE_IS_LOGICAL_END);
@@ -386,4 +383,5 @@
return fEntryExitPoints != NULL;
}
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphPositioningTables.cpp b/src/share/native/sun/font/layout/GlyphPositioningTables.cpp
index 244e77e..0253aa0 100644
--- a/src/share/native/sun/font/layout/GlyphPositioningTables.cpp
+++ b/src/share/native/sun/font/layout/GlyphPositioningTables.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -40,18 +39,18 @@
#include "LEGlyphStorage.h"
#include "GlyphPositionAdjustments.h"
-void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage,
- GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
- LETag scriptTag, LETag languageTag,
- const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEFontInstance *fontInstance,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
-{
- GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap,
- featureMapCount, featureOrder);
+U_NAMESPACE_BEGIN
- processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft,
- glyphDefinitionTableHeader, fontInstance);
+void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
+ LETag scriptTag, LETag languageTag,
+ const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+ const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
+{
+ GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap, featureMapCount, featureOrder);
+
+ processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft, glyphDefinitionTableHeader, fontInstance);
glyphPositionAdjustments->applyCursiveAdjustments(glyphStorage, rightToLeft, fontInstance);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphPositioningTables.h b/src/share/native/sun/font/layout/GlyphPositioningTables.h
index fbe124e..346759b 100644
--- a/src/share/native/sun/font/layout/GlyphPositioningTables.h
+++ b/src/share/native/sun/font/layout/GlyphPositioningTables.h
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,11 +31,18 @@
#ifndef __GLYPHPOSITIONINGTABLES_H
#define __GLYPHPOSITIONINGTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "Lookups.h"
#include "GlyphLookupTables.h"
+U_NAMESPACE_BEGIN
+
class LEFontInstance;
class LEGlyphStorage;
class LEGlyphFilter;
@@ -45,12 +51,10 @@
struct GlyphPositioningTableHeader : public GlyphLookupTableHeader
{
- void process(LEGlyphStorage &glyphStorage,
- GlyphPositionAdjustments *glyphPositionAdjustments,
+ void process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
le_bool rightToLeft, LETag scriptTag, LETag languageTag,
const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEFontInstance *fontInstance,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
+ const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
};
enum GlyphPositioningSubtableTypes
@@ -68,4 +72,5 @@
typedef LookupSubtable GlyphPositioningSubtable;
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp b/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp
index 967529a..46b0350 100644
--- a/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp
+++ b/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved
*
*/
@@ -50,6 +49,8 @@
#include "GlyphPosnLookupProc.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
// Aside from the names, the contextual positioning subtables are
// the same as the contextual substitution subtables.
typedef ContextualSubstitutionSubtable ContextualPositioningSubtable;
@@ -57,8 +58,7 @@
GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor(
const GlyphPositioningTableHeader *glyphPositioningTableHeader,
- LETag scriptTag, LETag languageTag,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
+ LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
: LookupProcessor(
(char *) glyphPositioningTableHeader,
SWAPW(glyphPositioningTableHeader->scriptListOffset),
@@ -166,3 +166,5 @@
GlyphPositioningLookupProcessor::~GlyphPositioningLookupProcessor()
{
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphPosnLookupProc.h b/src/share/native/sun/font/layout/GlyphPosnLookupProc.h
index 99ac45f..742672a 100644
--- a/src/share/native/sun/font/layout/GlyphPosnLookupProc.h
+++ b/src/share/native/sun/font/layout/GlyphPosnLookupProc.h
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,6 +31,11 @@
#ifndef __GLYPHPOSITIONINGLOOKUPPROCESSOR_H
#define __GLYPHPOSITIONINGLOOKUPPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -42,12 +46,13 @@
#include "GlyphIterator.h"
#include "LookupProcessor.h"
+U_NAMESPACE_BEGIN
+
class GlyphPositioningLookupProcessor : public LookupProcessor
{
public:
GlyphPositioningLookupProcessor(const GlyphPositioningTableHeader *glyphPositioningTableHeader,
- LETag scriptTag, LETag languageTag,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
+ LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
virtual ~GlyphPositioningLookupProcessor();
@@ -63,4 +68,5 @@
GlyphPositioningLookupProcessor &operator=(const GlyphPositioningLookupProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp b/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp
index 0b65f72..29c0018 100644
--- a/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp
+++ b/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp
@@ -48,17 +48,17 @@
#include "GlyphSubstLookupProc.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor(
const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
- LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
+ LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder)
: LookupProcessor(
(char *) glyphSubstitutionTableHeader,
SWAPW(glyphSubstitutionTableHeader->scriptListOffset),
SWAPW(glyphSubstitutionTableHeader->featureListOffset),
SWAPW(glyphSubstitutionTableHeader->lookupListOffset),
- scriptTag, languageTag, featureMap, featureMapCount, featureOrder)
- , fFilter(filter)
+ scriptTag, languageTag, featureMap, featureMapCount, featureOrder), fFilter(filter)
{
// anything?
}
@@ -143,3 +143,5 @@
GlyphSubstitutionLookupProcessor::~GlyphSubstitutionLookupProcessor()
{
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphSubstLookupProc.h b/src/share/native/sun/font/layout/GlyphSubstLookupProc.h
index 2d9df0c..32b02ef 100644
--- a/src/share/native/sun/font/layout/GlyphSubstLookupProc.h
+++ b/src/share/native/sun/font/layout/GlyphSubstLookupProc.h
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,6 +31,11 @@
#ifndef __GLYPHSUBSTITUTIONLOOKUPPROCESSOR_H
#define __GLYPHSUBSTITUTIONLOOKUPPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "LEFontInstance.h"
@@ -43,12 +47,13 @@
#include "GlyphIterator.h"
#include "LookupProcessor.h"
+U_NAMESPACE_BEGIN
+
class GlyphSubstitutionLookupProcessor : public LookupProcessor
{
public:
GlyphSubstitutionLookupProcessor(const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader,
- LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter,
- const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
+ LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder);
virtual ~GlyphSubstitutionLookupProcessor();
@@ -65,4 +70,5 @@
GlyphSubstitutionLookupProcessor &operator=(const GlyphSubstitutionLookupProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp b/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp
index ef2d800..9245541 100644
--- a/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp
+++ b/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp
@@ -40,14 +40,15 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
-le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage,
- le_bool rightToLeft, LETag scriptTag, LETag languageTag,
- const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEGlyphFilter *filter, const FeatureMap *featureMap,
- le_int32 featureMapCount, le_bool featureOrder) const
+U_NAMESPACE_BEGIN
+
+le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag,
+ const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+ const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const
{
- GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap,
- featureMapCount, featureOrder);
+ GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder);
return processor.process(glyphStorage, NULL, rightToLeft, glyphDefinitionTableHeader, NULL);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/GlyphSubstitutionTables.h b/src/share/native/sun/font/layout/GlyphSubstitutionTables.h
index 0a56df1..556dc06 100644
--- a/src/share/native/sun/font/layout/GlyphSubstitutionTables.h
+++ b/src/share/native/sun/font/layout/GlyphSubstitutionTables.h
@@ -32,22 +32,27 @@
#ifndef __GLYPHSUBSTITUTIONTABLES_H
#define __GLYPHSUBSTITUTIONTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
#include "Lookups.h"
#include "GlyphLookupTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class LEGlyphFilter;
struct GlyphDefinitionTableHeader;
struct GlyphSubstitutionTableHeader : public GlyphLookupTableHeader
{
- le_int32 process(LEGlyphStorage &glyphStorage,
- le_bool rightToLeft, LETag scriptTag, LETag languageTag,
- const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEGlyphFilter *filter, const FeatureMap *featureMap,
- le_int32 featureMapCount, le_bool featureOrder) const;
+ le_int32 process(LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag,
+ const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEGlyphFilter *filter,
+ const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const;
};
enum GlyphSubstitutionSubtableTypes
@@ -64,4 +69,5 @@
typedef LookupSubtable GlyphSubstitutionSubtable;
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/HanLayoutEngine.cpp b/src/share/native/sun/font/layout/HanLayoutEngine.cpp
index d5573e0..5e7e936 100644
--- a/src/share/native/sun/font/layout/HanLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/HanLayoutEngine.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
* HanLayoutEngine.cpp: OpenType processing for Han fonts.
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved.
@@ -41,6 +40,10 @@
#include "LEGlyphStorage.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HanOpenTypeLayoutEngine)
+
#define loclFeatureTag LE_LOCL_FEATURE_TAG
#define smplFeatureTag LE_SMPL_FEATURE_TAG
#define tradFeatureTag LE_TRAD_FEATURE_TAG
@@ -60,9 +63,8 @@
#define features (loclFeatureMask)
-HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- const GlyphSubstitutionTableHeader *gsubTable)
+HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
: OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
{
fFeatureMap = featureMap;
@@ -74,9 +76,8 @@
// nothing to do
}
-le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
- LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
+ LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -104,3 +105,5 @@
return count;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/HanLayoutEngine.h b/src/share/native/sun/font/layout/HanLayoutEngine.h
index d14c17f..3967be7 100644
--- a/src/share/native/sun/font/layout/HanLayoutEngine.h
+++ b/src/share/native/sun/font/layout/HanLayoutEngine.h
@@ -23,8 +23,8 @@
*
*/
+
/*
- *
* HanLayoutEngine.h: OpenType processing for Han fonts.
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved.
@@ -40,6 +40,8 @@
#include "GlyphSubstitutionTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
/**
@@ -69,9 +71,8 @@
*
* @internal
*/
- HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode,
- le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+ HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
/**
@@ -81,6 +82,20 @@
*/
virtual ~HanOpenTypeLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
@@ -92,10 +107,8 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the characters are in a
- * right to left directional run
- * @param glyphStorage - the object holding the glyph storage. The char
- * index and auxillary data arrays will be set.
+ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+ * @param glyphStorage - the object holding the glyph storage. The char index and auxillary data arrays will be set.
*
* Output parameters:
* @param outChars - the output character arrayt
@@ -107,9 +120,10 @@
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/IndicClassTables.cpp b/src/share/native/sun/font/layout/IndicClassTables.cpp
index d606b25..3a76831 100644
--- a/src/share/native/sun/font/layout/IndicClassTables.cpp
+++ b/src/share/native/sun/font/layout/IndicClassTables.cpp
@@ -35,6 +35,8 @@
#include "OpenTypeUtilities.h"
#include "IndicReordering.h"
+U_NAMESPACE_BEGIN
+
// Split matra table indices
#define _x1 (1 << CF_INDEX_SHIFT)
#define _x2 (2 << CF_INDEX_SHIFT)
@@ -279,7 +281,7 @@
static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
-static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 3, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
+static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
//
// IndicClassTable addresses
@@ -385,3 +387,5 @@
return classTable->getWorstCaseExpansion();
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/IndicLayoutEngine.cpp b/src/share/native/sun/font/layout/IndicLayoutEngine.cpp
index df88840..bc75c9e 100644
--- a/src/share/native/sun/font/layout/IndicLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/IndicLayoutEngine.cpp
@@ -45,20 +45,20 @@
#include "IndicReordering.h"
-IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- const GlyphSubstitutionTableHeader *gsubTable)
- : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable),
- fMPreFixups(NULL)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine)
+
+IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+ : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable), fMPreFixups(NULL)
{
fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount);
fFeatureOrder = TRUE;
}
-IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
- : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
- fMPreFixups(NULL)
+IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+ : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fMPreFixups(NULL)
{
fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount);
fFeatureOrder = TRUE;
@@ -71,9 +71,8 @@
// Input: characters, tags
// Output: glyphs, char indices
-le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -84,8 +83,7 @@
return 0;
}
- le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max,
- rightToLeft, glyphStorage, success);
+ le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max, rightToLeft, glyphStorage, success);
if (LE_FAILURE(success)) {
return 0;
@@ -99,9 +97,8 @@
// Input: characters
// Output: characters, char indices, tags
// Returns: output character count
-le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -131,9 +128,10 @@
// NOTE: assumes this allocates featureTags...
// (probably better than doing the worst case stuff here...)
- le_int32 outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode,
- outChars, glyphStorage, &fMPreFixups);
- glyphStorage.adoptGlyphCount(outCharCount);
+ le_int32 outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups);
+ glyphStorage.adoptGlyphCount(outCharCount);
return outCharCount;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/IndicLayoutEngine.h b/src/share/native/sun/font/layout/IndicLayoutEngine.h
index bcaf528..c36fbce 100644
--- a/src/share/native/sun/font/layout/IndicLayoutEngine.h
+++ b/src/share/native/sun/font/layout/IndicLayoutEngine.h
@@ -43,6 +43,8 @@
#include "GlyphDefinitionTables.h"
#include "GlyphPositioningTables.h"
+U_NAMESPACE_BEGIN
+
class MPreFixups;
class LEGlyphStorage;
@@ -77,9 +79,8 @@
*
* @internal
*/
- IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode,
- le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+ IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
/**
* This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -94,8 +95,8 @@
*
* @internal
*/
- IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+ IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -104,6 +105,20 @@
*/
virtual ~IndicOpenTypeLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
@@ -117,10 +132,9 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the characters are in a
- * right to left directional run
- * @param glyphStorage - the glyph storage object. The glyph and character
- * index arrays will be set. The auxillary data array will be set to the feature tags.
+ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+ * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
+ * the auxillary data array will be set to the feature tags.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -129,9 +143,8 @@
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method does character to glyph mapping, applies the GSUB table and applies
@@ -147,11 +160,9 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the characters are in a
- * right to left directional run
+ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
* @param featureTags - the feature tag array
- * @param glyphStorage - the glyph storage object. The glyph and char
- * index arrays will be set.
+ * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -163,12 +174,14 @@
*
* @internal
*/
- virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
- LEErrorCode &success);
+ virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success);
private:
+
MPreFixups *fMPreFixups;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/IndicRearrangement.h b/src/share/native/sun/font/layout/IndicRearrangement.h
index 1791264..bb7a54a 100644
--- a/src/share/native/sun/font/layout/IndicRearrangement.h
+++ b/src/share/native/sun/font/layout/IndicRearrangement.h
@@ -32,12 +32,19 @@
#ifndef __INDICREARRANGEMENT_H
#define __INDICREARRANGEMENT_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "StateTables.h"
#include "MorphTables.h"
#include "MorphStateTables.h"
+U_NAMESPACE_BEGIN
+
struct IndicRearrangementSubtableHeader : MorphStateTableHeader
{
};
@@ -78,4 +85,6 @@
{
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp b/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp
index a1c2331..c86aa72 100644
--- a/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp
@@ -39,6 +39,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor)
+
IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
{
@@ -56,8 +60,7 @@
lastGlyph = 0;
}
-ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
- le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
{
const IndicRearrangementStateEntry *entry = &entryTable[index];
ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -416,3 +419,5 @@
break;
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/IndicRearrangementProcessor.h b/src/share/native/sun/font/layout/IndicRearrangementProcessor.h
index b12b195..be78b9f 100644
--- a/src/share/native/sun/font/layout/IndicRearrangementProcessor.h
+++ b/src/share/native/sun/font/layout/IndicRearrangementProcessor.h
@@ -32,12 +32,19 @@
#ifndef __INDICREARRANGEMENTPROCESSOR_H
#define __INDICREARRANGEMENTPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "StateTableProcessor.h"
#include "IndicRearrangement.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class IndicRearrangementProcessor : public StateTableProcessor
@@ -54,12 +61,28 @@
IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader);
virtual ~IndicRearrangementProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
le_int32 firstGlyph;
le_int32 lastGlyph;
const IndicRearrangementStateEntry *entryTable;
const IndicRearrangementSubtableHeader *indicRearrangementSubtableHeader;
+
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/IndicReordering.cpp b/src/share/native/sun/font/layout/IndicReordering.cpp
index 296c5da..ba48638 100644
--- a/src/share/native/sun/font/layout/IndicReordering.cpp
+++ b/src/share/native/sun/font/layout/IndicReordering.cpp
@@ -36,6 +36,8 @@
#include "LEGlyphStorage.h"
#include "MPreFixups.h"
+U_NAMESPACE_BEGIN
+
#define initFeatureTag LE_INIT_FEATURE_TAG
#define nuktFeatureTag LE_NUKT_FEATURE_TAG
#define akhnFeatureTag LE_AKHN_FEATURE_TAG
@@ -71,7 +73,7 @@
#define distFeatureMask 0x00020000UL
#define initFeatureMask 0x00010000UL
-class ReorderingOutput {
+class ReorderingOutput : public UMemory {
private:
le_int32 fOutIndex;
LEUnicode *fOutChars;
@@ -187,8 +189,7 @@
fOutIndex += 1;
}
- le_bool noteMatra(const IndicClassTable *classTable, LEUnicode matra, le_uint32 matraIndex,
- FeatureMask matraFeatures, le_bool wordStart)
+ le_bool noteMatra(const IndicClassTable *classTable, LEUnicode matra, le_uint32 matraIndex, FeatureMask matraFeatures, le_bool wordStart)
{
IndicClassTable::CharClass matraClass = classTable->getCharClass(matra);
@@ -219,13 +220,12 @@
return FALSE;
}
- void noteVowelModifier(const IndicClassTable *classTable, LEUnicode vowelModifier,
- le_uint32 vowelModifierIndex, FeatureMask vowelModifierFeatures)
+ void noteVowelModifier(const IndicClassTable *classTable, LEUnicode vowelModifier, le_uint32 vowelModifierIndex, FeatureMask vowelModifierFeatures)
{
IndicClassTable::CharClass vmClass = classTable->getCharClass(vowelModifier);
fVMIndex = vowelModifierIndex;
- fVMFeatures = vowelModifierFeatures;
+ fVMFeatures = vowelModifierFeatures;
if (IndicClassTable::isVowelModifier(vmClass)) {
switch (vmClass & CF_POS_MASK) {
@@ -244,13 +244,12 @@
}
}
- void noteStressMark(const IndicClassTable *classTable, LEUnicode stressMark,
- le_uint32 stressMarkIndex, FeatureMask stressMarkFeatures)
+ void noteStressMark(const IndicClassTable *classTable, LEUnicode stressMark, le_uint32 stressMarkIndex, FeatureMask stressMarkFeatures)
{
IndicClassTable::CharClass smClass = classTable->getCharClass(stressMark);
fSMIndex = stressMarkIndex;
- fSMFeatures = stressMarkFeatures;
+ fSMFeatures = stressMarkFeatures;
if (IndicClassTable::isStressMark(smClass)) {
switch (smClass & CF_POS_MASK) {
@@ -360,9 +359,7 @@
};
// TODO: Find better names for these!
-#define tagArray4 (nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | \
- blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | \
- blwmFeatureMask | abvmFeatureMask | distFeatureMask)
+#define tagArray4 (nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | blwmFeatureMask | abvmFeatureMask | distFeatureMask)
#define tagArray3 (pstfFeatureMask | tagArray4)
#define tagArray2 (halfFeatureMask | tagArray3)
#define tagArray1 (blwfFeatureMask | tagArray2)
@@ -415,8 +412,7 @@
return featureMap;
}
-le_int32 IndicReordering::findSyllable(const IndicClassTable *classTable,
- const LEUnicode *chars, le_int32 prev, le_int32 charCount)
+le_int32 IndicReordering::findSyllable(const IndicClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount)
{
le_int32 cursor = prev;
le_int8 state = 0;
@@ -752,3 +748,5 @@
delete mpreFixups;
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/IndicReordering.h b/src/share/native/sun/font/layout/IndicReordering.h
index 1b69e20..58327a3 100644
--- a/src/share/native/sun/font/layout/IndicReordering.h
+++ b/src/share/native/sun/font/layout/IndicReordering.h
@@ -32,9 +32,16 @@
#ifndef __INDICREORDERING_H
#define __INDICREORDERING_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
// Characters that get refered to by name...
#define C_SIGN_ZWNJ 0x200C
#define C_SIGN_ZWJ 0x200D
@@ -140,7 +147,7 @@
static const IndicClassTable *getScriptClassTable(le_int32 scriptCode);
};
-class IndicReordering {
+class IndicReordering /* not : public UObject because all methods are static */ {
public:
static le_int32 getWorstCaseExpansion(le_int32 scriptCode);
@@ -156,8 +163,7 @@
// do not instantiate
IndicReordering();
- static le_int32 findSyllable(const IndicClassTable *classTable, const LEUnicode *chars,
- le_int32 prev, le_int32 charCount);
+ static le_int32 findSyllable(const IndicClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount);
};
@@ -305,4 +311,5 @@
return hasBelowBaseForm(getCharClass(ch));
}
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/KernTable.cpp b/src/share/native/sun/font/layout/KernTable.cpp
index 8c7bae0..0f0979e 100644
--- a/src/share/native/sun/font/layout/KernTable.cpp
+++ b/src/share/native/sun/font/layout/KernTable.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved
*
*/
@@ -39,6 +40,8 @@
#define DEBUG 0
+U_NAMESPACE_BEGIN
+
struct PairInfo {
le_uint32 key; // sigh, MSVC compiler gags on union here
le_int16 value; // fword, kern value in funits
@@ -191,6 +194,12 @@
float adjust = 0;
for (int i = 1, e = storage.getGlyphCount(); i < e; ++i) {
key = key << 16 | (storage[i] & 0xffff);
+
+ // argh, to do a binary search, we need to have the pair list in sorted order
+ // but it is not in sorted order on win32 platforms because of the endianness difference
+ // so either I have to swap the element each time I examine it, or I have to swap
+ // all the elements ahead of time and store them in the font
+
const PairInfo* p = pairs;
const PairInfo* tp = (const PairInfo*)(p + rangeShift);
if (key > tp->key) {
@@ -238,3 +247,6 @@
storage.adjustPosition(storage.getGlyphCount(), adjust, 0, success);
}
}
+
+U_NAMESPACE_END
+
diff --git a/src/share/native/sun/font/layout/KernTable.h b/src/share/native/sun/font/layout/KernTable.h
index 34633a3..fb31625 100644
--- a/src/share/native/sun/font/layout/KernTable.h
+++ b/src/share/native/sun/font/layout/KernTable.h
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved
*
*/
@@ -37,9 +38,12 @@
#endif
#include "LETypes.h"
+//#include "LEFontInstance.h"
+//#include "LEGlyphStorage.h"
#include <stdio.h>
+U_NAMESPACE_BEGIN
struct PairInfo;
class LEFontInstance;
class LEGlyphStorage;
@@ -67,4 +71,6 @@
void process(LEGlyphStorage& storage);
};
+U_NAMESPACE_END
+
#endif
diff --git a/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp b/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp
index 78917b8..686d97b 100644
--- a/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp
@@ -23,8 +23,8 @@
*
*/
+
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
* This file is a modification of the ICU file IndicLayoutEngine.cpp
@@ -38,17 +38,20 @@
#include "LEGlyphStorage.h"
#include "KhmerReordering.h"
-KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- const GlyphSubstitutionTableHeader *gsubTable)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(KhmerOpenTypeLayoutEngine)
+
+KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
: OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable)
{
fFeatureMap = KhmerReordering::getFeatureMap(fFeatureMapCount);
fFeatureOrder = TRUE;
}
-KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags)
: OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
{
fFeatureMap = KhmerReordering::getFeatureMap(fFeatureMapCount);
@@ -63,16 +66,14 @@
// Input: characters
// Output: characters, char indices, tags
// Returns: output character count
-le_int32 KhmerOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 KhmerOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
- offset >= max || offset + count > max) {
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -96,9 +97,10 @@
// NOTE: assumes this allocates featureTags...
// (probably better than doing the worst case stuff here...)
- le_int32 outCharCount = KhmerReordering::reorder(&chars[offset], count,
- fScriptCode, outChars, glyphStorage);
+ le_int32 outCharCount = KhmerReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage);
glyphStorage.adoptGlyphCount(outCharCount);
return outCharCount;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/KhmerLayoutEngine.h b/src/share/native/sun/font/layout/KhmerLayoutEngine.h
index 24f1bed..3b38351 100644
--- a/src/share/native/sun/font/layout/KhmerLayoutEngine.h
+++ b/src/share/native/sun/font/layout/KhmerLayoutEngine.h
@@ -23,6 +23,7 @@
*
*/
+
/*
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -45,19 +46,18 @@
// #include "GlyphDefinitionTables.h"
// #include "GlyphPositioningTables.h"
+U_NAMESPACE_BEGIN
+
// class MPreFixups;
// class LEGlyphStorage;
/**
* This class implements OpenType layout for Khmer OpenType fonts, as
- * specified by Microsoft in "Creating and Supporting OpenType Fonts
- * for Khmer Scripts"
- * (http://www.microsoft.com/typography/otspec/indicot/default.htm)
- * TODO: change url
+ * specified by Microsoft in "Creating and Supporting OpenType Fonts for
+ * Khmer Scripts" (http://www.microsoft.com/typography/otspec/indicot/default.htm) TODO: change url
*
- * This class overrides the characterProcessing method to do Khmer
- * character processing and reordering (See the MS spec. for more
- * details)
+ * This class overrides the characterProcessing method to do Khmer character processing
+ * and reordering (See the MS spec. for more details)
*
* @internal
*/
@@ -65,11 +65,10 @@
{
public:
/**
- * This is the main constructor. It constructs an instance of
- * KhmerOpenTypeLayoutEngine for a particular font, script and
- * language. It takes the GSUB table as a parameter since
- * LayoutEngine::layoutEngineFactory has to read the GSUB table to
- * know that it has an Khmer OpenType font.
+ * This is the main constructor. It constructs an instance of KhmerOpenTypeLayoutEngine for
+ * a particular font, script and language. It takes the GSUB table as a parameter since
+ * LayoutEngine::layoutEngineFactory has to read the GSUB table to know that it has an
+ * Khmer OpenType font.
*
* @param fontInstance - the font
* @param scriptCode - the script
@@ -82,14 +81,12 @@
*
* @internal
*/
- KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- const GlyphSubstitutionTableHeader *gsubTable);
+ KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
/**
- * This constructor is used when the font requires a "canned" GSUB
- * table which can't be known until after this constructor has
- * been invoked.
+ * This constructor is used when the font requires a "canned" GSUB table which can't be known
+ * until after this constructor has been invoked.
*
* @param fontInstance - the font
* @param scriptCode - the script
@@ -100,8 +97,8 @@
*
* @internal
*/
- KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+ KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -110,25 +107,35 @@
*/
virtual ~KhmerOpenTypeLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
- * This method does Khmer OpenType character processing. It
- * assigns the OpenType feature tags to the characters, and may
- * generate output characters which have been reordered. It may
- * also split some vowels, resulting in more output characters
- * than input characters.
+ * This method does Khmer OpenType character processing. It assigns the OpenType feature
+ * tags to the characters, and may generate output characters which have been reordered.
+ * It may also split some vowels, resulting in more output characters than input characters.
*
* Input parameters:
* @param chars - the input character context
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the characters are in
- * a right to left directional run
- * @param glyphStorage - the glyph storage object. The glyph and
- * character index arrays will be set. the auxillary data array
- * will be set to the feature tags.
+ * @param rightToLeft - <code>TRUE</code> if the characters are in a right to left directional run
+ * @param glyphStorage - the glyph storage object. The glyph and character index arrays will be set.
+ * the auxillary data array will be set to the feature tags.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -137,9 +144,11 @@
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/KhmerReordering.cpp b/src/share/native/sun/font/layout/KhmerReordering.cpp
index 8b6f1f9..bb0e5fa 100644
--- a/src/share/native/sun/font/layout/KhmerReordering.cpp
+++ b/src/share/native/sun/font/layout/KhmerReordering.cpp
@@ -37,6 +37,9 @@
#include "KhmerReordering.h"
#include "LEGlyphStorage.h"
+
+U_NAMESPACE_BEGIN
+
// Characters that get refered to by name...
enum
{
@@ -53,35 +56,23 @@
enum
{
- // simple classes, they are used in the statetable (in this file)
- // to control the length of a syllable they are also used to know
- // where a character should be placed (location in reference to
- // the base character) and also to know if a character, when
- // independtly displayed, should be displayed with a dotted-circle
- // to indicate error in syllable construction
-
+ // simple classes, they are used in the statetable (in this file) to control the length of a syllable
+ // they are also used to know where a character should be placed (location in reference to the base character)
+ // and also to know if a character, when independtly displayed, should be displayed with a dotted-circle to
+ // indicate error in syllable construction
_xx = KhmerClassTable::CC_RESERVED,
- _sa = KhmerClassTable::CC_SIGN_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE
- | KhmerClassTable::CF_POS_ABOVE,
- _sp = KhmerClassTable::CC_SIGN_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE
- | KhmerClassTable::CF_POS_AFTER,
+ _sa = KhmerClassTable::CC_SIGN_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_POS_ABOVE,
+ _sp = KhmerClassTable::CC_SIGN_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE| KhmerClassTable::CF_POS_AFTER,
_c1 = KhmerClassTable::CC_CONSONANT | KhmerClassTable::CF_CONSONANT,
_c2 = KhmerClassTable::CC_CONSONANT2 | KhmerClassTable::CF_CONSONANT,
_c3 = KhmerClassTable::CC_CONSONANT3 | KhmerClassTable::CF_CONSONANT,
- _rb = KhmerClassTable::CC_ROBAT | KhmerClassTable::CF_POS_ABOVE
- | KhmerClassTable::CF_DOTTED_CIRCLE,
- _cs = KhmerClassTable::CC_CONSONANT_SHIFTER | KhmerClassTable::CF_DOTTED_CIRCLE
- | KhmerClassTable::CF_SHIFTER,
- _dl = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BEFORE
- | KhmerClassTable::CF_DOTTED_CIRCLE,
- _db = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BELOW
- | KhmerClassTable::CF_DOTTED_CIRCLE,
- _da = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_ABOVE
- | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_ABOVE_VOWEL,
- _dr = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_AFTER
- | KhmerClassTable::CF_DOTTED_CIRCLE,
- _co = KhmerClassTable::CC_COENG | KhmerClassTable::CF_COENG
- | KhmerClassTable::CF_DOTTED_CIRCLE,
+ _rb = KhmerClassTable::CC_ROBAT | KhmerClassTable::CF_POS_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE,
+ _cs = KhmerClassTable::CC_CONSONANT_SHIFTER | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_SHIFTER,
+ _dl = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BEFORE | KhmerClassTable::CF_DOTTED_CIRCLE,
+ _db = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_BELOW | KhmerClassTable::CF_DOTTED_CIRCLE,
+ _da = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_ABOVE | KhmerClassTable::CF_DOTTED_CIRCLE | KhmerClassTable::CF_ABOVE_VOWEL,
+ _dr = KhmerClassTable::CC_DEPENDENT_VOWEL | KhmerClassTable::CF_POS_AFTER | KhmerClassTable::CF_DOTTED_CIRCLE,
+ _co = KhmerClassTable::CC_COENG | KhmerClassTable::CF_COENG | KhmerClassTable::CF_DOTTED_CIRCLE,
// split vowel
_va = _da | KhmerClassTable::CF_SPLIT_VOWEL,
@@ -90,13 +81,10 @@
// Character class tables
-
-// _xx character does not combine into syllable, such as numbers,
-// puntuation marks, non-Khmer signs...
+// _xx character does not combine into syllable, such as numbers, puntuation marks, non-Khmer signs...
// _sa Sign placed above the base
// _sp Sign placed after the base
-// _c1 Consonant of type 1 or independent vowel (independent vowels
-// behave as type 1 consonants)
+// _c1 Consonant of type 1 or independent vowel (independent vowels behave as type 1 consonants)
// _c2 Consonant of type 2 (only RO)
// _c3 Consonant of type 3
// _rb Khmer sign robat u17CC. combining mark for subscript consonants
@@ -105,13 +93,10 @@
// _db Dependent vowel placed below the base
// _da Dependent vowel placed above the base
// _dr Dependent vowel placed behind the base (right of the base)
-// _co Khmer combining mark COENG u17D2, combines with the consonant
-// or independent vowel following it to create a subscript consonant
-// or independent vowel
-// _va Khmer split vowel in wich the first part is before the base and
-// the second one above the base
-// _vr Khmer split vowel in wich the first part is before the base and
-// the second one behind (right of) the base
+// _co Khmer combining mark COENG u17D2, combines with the consonant or independent vowel following
+// it to create a subscript consonant or independent vowel
+// _va Khmer split vowel in wich the first part is before the base and the second one above the base
+// _vr Khmer split vowel in wich the first part is before the base and the second one behind (right of) the base
static const KhmerClassTable::CharClass khmerCharClasses[] =
{
@@ -129,19 +114,19 @@
//
//
-// The range of characters defined in the above table is defined
-// here. FOr Khmer 1780 to 17DF Even if the Khmer range is bigger, all
-// other characters are not combinable, and therefore treated as _xx
+// The range of characters defined in the above table is defined here. FOr Khmer 1780 to 17DF
+// Even if the Khmer range is bigger, all other characters are not combinable, and therefore treated
+// as _xx
static const KhmerClassTable khmerClassTable = {0x1780, 0x17df, khmerCharClasses};
-// Below we define how a character in the input string is either in
-// the khmerCharClasses table (in which case we get its type back), a
-// ZWJ or ZWNJ (two characters that may appear within the syllable,
-// but are not in the table) we also get their type back, or an
-// unknown object in which case we get _xx (CC_RESERVED) back
+// Below we define how a character in the input string is either in the khmerCharClasses table
+// (in which case we get its type back), a ZWJ or ZWNJ (two characters that may appear
+// within the syllable, but are not in the table) we also get their type back, or an unknown object
+// in which case we get _xx (CC_RESERVED) back
KhmerClassTable::CharClass KhmerClassTable::getCharClass(LEUnicode ch) const
{
+
if (ch == C_SIGN_ZWJ) {
return CC_ZERO_WIDTH_J_MARK;
}
@@ -164,13 +149,14 @@
-class ReorderingOutput {
+class ReorderingOutput : public UMemory {
private:
le_int32 fOutIndex;
LEUnicode *fOutChars;
LEGlyphStorage &fGlyphStorage;
+
public:
ReorderingOutput(LEUnicode *outChars, LEGlyphStorage &glyphStorage)
: fOutIndex(0), fOutChars(outChars), fGlyphStorage(glyphStorage)
@@ -232,18 +218,11 @@
#define abvmFeatureMask 0x00100000UL
#define mkmkFeatureMask 0x00080000UL
-#define tagPref (prefFeatureMask | presFeatureMask | \
- cligFeatureMask | distFeatureMask)
-#define tagAbvf (abvfFeatureMask | abvsFeatureMask | \
- cligFeatureMask | distFeatureMask | abvmFeatureMask | mkmkFeatureMask)
-#define tagPstf (blwfFeatureMask | blwsFeatureMask | prefFeatureMask | \
- presFeatureMask | pstfFeatureMask | pstsFeatureMask | cligFeatureMask | \
- distFeatureMask | blwmFeatureMask)
-#define tagBlwf (blwfFeatureMask | blwsFeatureMask | cligFeatureMask | \
- distFeatureMask | blwmFeatureMask | mkmkFeatureMask)
-#define tagDefault (prefFeatureMask | blwfFeatureMask | presFeatureMask | \
- blwsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | \
- blwmFeatureMask | mkmkFeatureMask)
+#define tagPref (prefFeatureMask | presFeatureMask | cligFeatureMask | distFeatureMask)
+#define tagAbvf (abvfFeatureMask | abvsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | mkmkFeatureMask)
+#define tagPstf (blwfFeatureMask | blwsFeatureMask | prefFeatureMask | presFeatureMask | pstfFeatureMask | pstsFeatureMask | cligFeatureMask | distFeatureMask | blwmFeatureMask)
+#define tagBlwf (blwfFeatureMask | blwsFeatureMask | cligFeatureMask | distFeatureMask | blwmFeatureMask | mkmkFeatureMask)
+#define tagDefault (prefFeatureMask | blwfFeatureMask | presFeatureMask | blwsFeatureMask | cligFeatureMask | distFeatureMask | abvmFeatureMask | blwmFeatureMask | mkmkFeatureMask)
@@ -274,35 +253,32 @@
// The stateTable is used to calculate the end (the length) of a well
// formed Khmer Syllable.
//
-// Each horizontal line is ordered exactly the same way as the values
-// in KhmerClassTable CharClassValues in KhmerReordering.h This
-// coincidence of values allows the follow up of the table.
+// Each horizontal line is ordered exactly the same way as the values in KhmerClassTable
+// CharClassValues in KhmerReordering.h This coincidence of values allows the
+// follow up of the table.
//
-// Each line corresponds to a state, which does not necessarily need
-// to be a type of component... for example, state 2 is a base, with
-// is always a first character in the syllable, but the state could be
-// produced a consonant of any type when it is the first character
-// that is analysed (in ground state).
+// Each line corresponds to a state, which does not necessarily need to be a type
+// of component... for example, state 2 is a base, with is always a first character
+// in the syllable, but the state could be produced a consonant of any type when
+// it is the first character that is analysed (in ground state).
//
// Differentiating 3 types of consonants is necessary in order to
// forbid the use of certain combinations, such as having a second
-// coeng after a coeng RO.
-// The inexistent possibility of having a type 3 after another type 3
-// is permitted, eliminating it would very much complicate the table,
-// and it does not create typing problems, as the case above.
+// coeng after a coeng RO,
+// The inexistent possibility of having a type 3 after another type 3 is permitted,
+// eliminating it would very much complicate the table, and it does not create typing
+// problems, as the case above.
//
-// The table is quite complex, in order to limit the number of coeng
-// consonants to 2 (by means of the table).
+// The table is quite complex, in order to limit the number of coeng consonants
+// to 2 (by means of the table).
//
// There a peculiarity, as far as Unicode is concerned:
// - The consonant-shifter is considered in two possible different
-// locations, the one considered in Unicode 3.0 and the one considered
-// in Unicode 4.0. (there is a backwards compatibility problem in this
-// standard).
+// locations, the one considered in Unicode 3.0 and the one considered in
+// Unicode 4.0. (there is a backwards compatibility problem in this standard).
-// xx independent character, such as a number, punctuation sign or
-// non-khmer char
+// xx independent character, such as a number, punctuation sign or non-khmer char
//
// c1 Khmer consonant of type 1 or an independent vowel
// that is, a letter in which the subscript for is only under the
@@ -320,10 +296,9 @@
//
// co coeng character (u17D2)
//
-// dv dependent vowel (including split vowels, they are treated in the
-// same way). even if dv is not defined above, the component that is
-// really tested for is KhmerClassTable::CC_DEPENDENT_VOWEL, which is
-// common to all dependent vowels
+// dv dependent vowel (including split vowels, they are treated in the same way).
+// even if dv is not defined above, the component that is really tested for is
+// KhmerClassTable::CC_DEPENDENT_VOWEL, which is common to all dependent vowels
//
// zwj Zero Width joiner
//
@@ -352,8 +327,7 @@
{-1, -1, -1, -1, 12, 13, -1, -1, 16, 17, 1, 14}, // 8 - First consonant of type 2 after coeng
{-1, -1, -1, -1, 12, 13, -1, 10, 16, 17, 1, 14}, // 9 - First consonant or type 3 after ceong
{-1, 11, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1}, // 10 - Second Coeng (no register shifter before)
- {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17, 1, 14}, // 11 - Second coeng consonant
- // (or ind. vowel) no register shifter before
+ {-1, -1, -1, -1, 15, -1, -1, -1, 16, 17, 1, 14}, // 11 - Second coeng consonant (or ind. vowel) no register shifter before
{-1, -1, 1, -1, -1, 13, -1, -1, 16, -1, -1, -1}, // 12 - Second ZWNJ before a register shifter
{-1, -1, -1, -1, 15, -1, -1, -1, 16, 17, 1, 14}, // 13 - Second register shifter
{-1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1}, // 14 - ZWJ before vowel
@@ -363,6 +337,7 @@
{-1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1}, // 18 - ZWJ after vowel
{-1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1}, // 19 - Third coeng
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1}, // 20 - dependent vowel after a Robat
+
};
@@ -377,15 +352,13 @@
// Given an input string of characters and a location in which to start looking
// calculate, using the state table, which one is the last character of the syllable
// that starts in the starting position.
-le_int32 KhmerReordering::findSyllable(const KhmerClassTable *classTable,
- const LEUnicode *chars, le_int32 prev, le_int32 charCount)
+le_int32 KhmerReordering::findSyllable(const KhmerClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount)
{
le_int32 cursor = prev;
le_int8 state = 0;
while (cursor < charCount) {
- KhmerClassTable::CharClass charClass = (classTable->getCharClass(chars[cursor])
- & KhmerClassTable::CF_CLASS_MASK);
+ KhmerClassTable::CharClass charClass = (classTable->getCharClass(chars[cursor]) & KhmerClassTable::CF_CLASS_MASK);
state = khmerStateTable[state][charClass];
@@ -402,8 +375,8 @@
// This is the real reordering function as applied to the Khmer language
-le_int32 KhmerReordering::reorder(const LEUnicode *chars, le_int32 charCount,
- le_int32 /*scriptCode*/, LEUnicode *outChars, LEGlyphStorage &glyphStorage)
+le_int32 KhmerReordering::reorder(const LEUnicode *chars, le_int32 charCount, le_int32 /*scriptCode*/,
+ LEUnicode *outChars, LEGlyphStorage &glyphStorage)
{
const KhmerClassTable *classTable = KhmerClassTable::getKhmerClassTable();
@@ -442,8 +415,7 @@
// and because CC_CONSONANT2 is enough to identify it, as it is the only consonant
// with this flag
if ( (charClass & KhmerClassTable::CF_COENG) && (i + 1 < syllable) &&
- ( (classTable->getCharClass(chars[i + 1]) &
- KhmerClassTable::CF_CLASS_MASK) == KhmerClassTable::CC_CONSONANT2) )
+ ( (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_CLASS_MASK) == KhmerClassTable::CC_CONSONANT2) )
{
coengRo = i;
}
@@ -455,16 +427,15 @@
output.writeChar(C_RO, coengRo + 1, tagPref);
}
- // shall we add a dotted circle? If in the position in which
- // the base should be (first char in the string) there is a
- // character that has the Dotted circle flag (a character that
- // cannot be a base) then write a dotted circle
+ // shall we add a dotted circle?
+ // If in the position in which the base should be (first char in the string) there is
+ // a character that has the Dotted circle flag (a character that cannot be a base)
+ // then write a dotted circle
if (classTable->getCharClass(chars[prev]) & KhmerClassTable::CF_DOTTED_CIRCLE) {
output.writeChar(C_DOTTED_CIRCLE, prev, tagDefault);
}
- // copy what is left to the output, skipping before vowels and
- // coeng Ro if they are present
+ // copy what is left to the output, skipping before vowels and coeng Ro if they are present
for (i = prev; i < syllable; i += 1) {
charClass = classTable->getCharClass(chars[i]);
@@ -515,30 +486,14 @@
// and there is an extra rule for C_VOWEL_AA + C_SIGN_NIKAHIT also for two
// different positions, right after the shifter or after a vowel (Unicode 4)
if ( (charClass & KhmerClassTable::CF_SHIFTER) && (i + 1 < syllable) ) {
- if (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_ABOVE_VOWEL ) {
- output.writeChar(chars[i], i, tagBlwf);
- break;
- }
- if (i + 2 < syllable &&
- ( (classTable->getCharClass(chars[i + 1]) &
- KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA) &&
- ( (classTable->getCharClass(chars[i + 2]) &
- KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) )
- {
- output.writeChar(chars[i], i, tagBlwf);
- break;
- }
- if (i + 3 < syllable && (classTable->getCharClass(chars[i + 3]) &
- KhmerClassTable::CF_ABOVE_VOWEL) )
- {
- output.writeChar(chars[i], i, tagBlwf);
- break;
- }
- if (i + 4 < syllable &&
- ( (classTable->getCharClass(chars[i + 3]) &
- KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA) &&
- ( (classTable->getCharClass(chars[i + 4]) &
- KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) )
+ if ((classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_ABOVE_VOWEL)
+ || (i + 2 < syllable
+ && ( (classTable->getCharClass(chars[i + 1]) & KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA)
+ && ( (classTable->getCharClass(chars[i + 2]) & KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT))
+ || (i + 3 < syllable && (classTable->getCharClass(chars[i + 3]) & KhmerClassTable::CF_ABOVE_VOWEL))
+ || (i + 4 < syllable
+ && ( (classTable->getCharClass(chars[i + 3]) & KhmerClassTable::CF_CLASS_MASK) == C_VOWEL_AA)
+ && ( (classTable->getCharClass(chars[i + 4]) & KhmerClassTable::CF_CLASS_MASK) == C_SIGN_NIKAHIT) ) )
{
output.writeChar(chars[i], i, tagBlwf);
break;
@@ -556,3 +511,6 @@
return output.getOutputIndex();
}
+
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/KhmerReordering.h b/src/share/native/sun/font/layout/KhmerReordering.h
index 92b6158..349bf2b 100644
--- a/src/share/native/sun/font/layout/KhmerReordering.h
+++ b/src/share/native/sun/font/layout/KhmerReordering.h
@@ -24,7 +24,6 @@
*/
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
* This file is a modification of the ICU file IndicReordering.h
@@ -35,80 +34,60 @@
#ifndef __KHMERREORDERING_H
#define __KHMERREORDERING_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
// Vocabulary
-
-// Base ->
-// A consonant or an independent vowel in its full (not
-// subscript) form. It is the center of the syllable, it can be
-// souranded by coeng (subscript) consonants, vowels, split
-// vowels, signs... but there is only one base in a syllable, it
-// has to be coded as the first character of the syllable.
-// split vowel ->
-// vowel that has two parts placed separately (e.g. Before and
-// after the consonant). Khmer language has five of them. Khmer
-// split vowels either have one part before the base and one after
-// the base or they have a part before the base and a part above
-// the base. The first part of all Khmer split vowels is the same
-// character, identical to the glyph of Khmer dependent vowel SRA
-// EI
-// coeng ->
-// modifier used in Khmer to construct coeng (subscript)
-// consonants differently than indian languages, the coeng
-// modifies the consonant that follows it, not the one preceding
-// it Each consonant has two forms, the base form and the
-// subscript form the base form is the normal one (using the
-// consonants code-point), the subscript form is displayed when
-// the combination coeng + consonant is encountered.
-// Consonant of type 1 ->
-// A consonant which has subscript for that only occupies space
-// under a base consonant
-// Consonant of type 2 ->
-// Its subscript form occupies space under and before the base
-// (only one, RO)
-// Consonant of Type 3 ->
-// Its subscript form occupies space under and after the base
-// (KHO, CHHO, THHO, BA, YO, SA)
-// Consonant shifter ->
-// Khmer has to series of consonants. The same dependent vowel has
-// different sounds if it is attached to a consonant of the first
-// series or a consonant of the second series Most consonants have
-// an equivalent in the other series, but some of theme exist only
-// in one series (for example SA). If we want to use the consonant
-// SA with a vowel sound that can only be done with a vowel sound
-// that corresponds to a vowel accompanying a consonant of the
-// other series, then we need to use a consonant shifter: TRIISAP
-// or MUSIKATOAN x17C9 y x17CA. TRIISAP changes a first series
-// consonant to second series sound and MUSIKATOAN a second series
-// consonant to have a first series vowel sound. Consonant
-// shifter are both normally supercript marks, but, when they are
-// followed by a superscript, they change shape and take the form
-// of subscript dependent vowel SRA U. If they are in the same
-// syllable as a coeng consonant, Unicode 3.0 says that they
-// should be typed before the coeng. Unicode 4.0 breaks the
-// standard and says that it should be placed after the coeng
-// consonant.
-// Dependent vowel ->
-// In khmer dependent vowels can be placed above, below, before or
-// after the base Each vowel has its own position. Only one vowel
-// per syllable is allowed.
-// Signs ->
-// Khmer has above signs and post signs. Only one above sign
-// and/or one post sign are Allowed in a syllable.
+// Base -> A consonant or an independent vowel in its full (not subscript) form. It is the
+// center of the syllable, it can be souranded by coeng (subscript) consonants, vowels,
+// split vowels, signs... but there is only one base in a syllable, it has to be coded as
+// the first character of the syllable.
+// split vowel --> vowel that has two parts placed separately (e.g. Before and after the consonant).
+// Khmer language has five of them. Khmer split vowels either have one part before the
+// base and one after the base or they have a part before the base and a part above the base.
+// The first part of all Khmer split vowels is the same character, identical to
+// the glyph of Khmer dependent vowel SRA EI
+// coeng --> modifier used in Khmer to construct coeng (subscript) consonants
+// Differently than indian languages, the coeng modifies the consonant that follows it,
+// not the one preceding it Each consonant has two forms, the base form and the subscript form
+// the base form is the normal one (using the consonants code-point), the subscript form is
+// displayed when the combination coeng + consonant is encountered.
+// Consonant of type 1 -> A consonant which has subscript for that only occupies space under a base consonant
+// Consonant of type 2.-> Its subscript form occupies space under and before the base (only one, RO)
+// Consonant of Type 3 -> Its subscript form occupies space under and after the base (KHO, CHHO, THHO, BA, YO, SA)
+// Consonant shifter -> Khmer has to series of consonants. The same dependent vowel has different sounds
+// if it is attached to a consonant of the first series or a consonant of the second series
+// Most consonants have an equivalent in the other series, but some of theme exist only in
+// one series (for example SA). If we want to use the consonant SA with a vowel sound that
+// can only be done with a vowel sound that corresponds to a vowel accompanying a consonant
+// of the other series, then we need to use a consonant shifter: TRIISAP or MUSIKATOAN
+// x17C9 y x17CA. TRIISAP changes a first series consonant to second series sound and
+// MUSIKATOAN a second series consonant to have a first series vowel sound.
+// Consonant shifter are both normally supercript marks, but, when they are followed by a
+// superscript, they change shape and take the form of subscript dependent vowel SRA U.
+// If they are in the same syllable as a coeng consonant, Unicode 3.0 says that they
+// should be typed before the coeng. Unicode 4.0 breaks the standard and says that it should
+// be placed after the coeng consonant.
+// Dependent vowel -> In khmer dependent vowels can be placed above, below, before or after the base
+// Each vowel has its own position. Only one vowel per syllable is allowed.
+// Signs -> Khmer has above signs and post signs. Only one above sign and/or one post sign are
+// Allowed in a syllable.
+//
//
-// This list must include all types of components that can be used
-// inside a syllable
-struct KhmerClassTable
+struct KhmerClassTable // This list must include all types of components that can be used inside a syllable
{
- // order is important here! This order must be the same that is
- // found in each horizontal line in the statetable for Khmer (file
- // KhmerReordering.cpp).
- enum CharClassValues
+ enum CharClassValues // order is important here! This order must be the same that is found in each horizontal
+ // line in the statetable for Khmer (file KhmerReordering.cpp).
{
CC_RESERVED = 0,
CC_CONSONANT = 1, // consonant of type 1 or independent vowel
@@ -116,8 +95,7 @@
CC_CONSONANT3 = 3, // Consonant of type 3
CC_ZERO_WIDTH_NJ_MARK = 4, // Zero Width non joiner character (0x200C)
CC_CONSONANT_SHIFTER = 5,
- CC_ROBAT = 6, // Khmer special diacritic accent
- // -treated differently in state table
+ CC_ROBAT = 6, // Khmer special diacritic accent -treated differently in state table
CC_COENG = 7, // Subscript consonant combining character
CC_DEPENDENT_VOWEL = 8,
CC_SIGN_ABOVE = 9,
@@ -131,10 +109,8 @@
CF_CLASS_MASK = 0x0000FFFF,
CF_CONSONANT = 0x01000000, // flag to speed up comparing
- CF_SPLIT_VOWEL = 0x02000000, // flag for a split vowel -> the first part
- // is added in front of the syllable
- CF_DOTTED_CIRCLE = 0x04000000, // add a dotted circle if a character with
- // this flag is the first in a syllable
+ CF_SPLIT_VOWEL = 0x02000000, // flag for a split vowel -> the first part is added in front of the syllable
+ CF_DOTTED_CIRCLE = 0x04000000, // add a dotted circle if a character with this flag is the first in a syllable
CF_COENG = 0x08000000, // flag to speed up comparing
CF_SHIFTER = 0x10000000, // flag to speed up comparing
CF_ABOVE_VOWEL = 0x20000000, // flag to speed up comparing
@@ -161,10 +137,10 @@
};
-class KhmerReordering {
+class KhmerReordering /* not : public UObject because all methods are static */ {
public:
- static le_int32 reorder(const LEUnicode *theChars, le_int32 charCount,
- le_int32 scriptCode, LEUnicode *outChars, LEGlyphStorage &glyphStorage);
+ static le_int32 reorder(const LEUnicode *theChars, le_int32 charCount, le_int32 scriptCode,
+ LEUnicode *outChars, LEGlyphStorage &glyphStorage);
static const FeatureMap *getFeatureMap(le_int32 &count);
@@ -172,8 +148,10 @@
// do not instantiate
KhmerReordering();
- static le_int32 findSyllable(const KhmerClassTable *classTable,
- const LEUnicode *chars, le_int32 prev, le_int32 charCount);
+ static le_int32 findSyllable(const KhmerClassTable *classTable, const LEUnicode *chars, le_int32 prev, le_int32 charCount);
+
};
+
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LEFontInstance.cpp b/src/share/native/sun/font/layout/LEFontInstance.cpp
index 72290c7..619a0ce 100644
--- a/src/share/native/sun/font/layout/LEFontInstance.cpp
+++ b/src/share/native/sun/font/layout/LEFontInstance.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
*******************************************************************************
*
* Copyright (C) 1999-2005, International Business Machines
@@ -42,6 +41,10 @@
#include "LEFontInstance.h"
#include "LEGlyphStorage.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEFontInstance)
+
const LEFontInstance *LEFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit,
le_int32 script, LEErrorCode &success) const
{
@@ -59,7 +62,7 @@
}
void LEFontInstance::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
- le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const
+ le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const
{
le_int32 i, out = 0, dir = 1;
@@ -100,3 +103,5 @@
return mapCharToGlyph(mappedChar);
}
+U_NAMESPACE_END
+
diff --git a/src/share/native/sun/font/layout/LEFontInstance.h b/src/share/native/sun/font/layout/LEFontInstance.h
index 7c3e525..f336177 100644
--- a/src/share/native/sun/font/layout/LEFontInstance.h
+++ b/src/share/native/sun/font/layout/LEFontInstance.h
@@ -34,6 +34,12 @@
#define __LEFONTINSTANCE_H
#include "LETypes.h"
+/**
+ * \file
+ * \brief C++ API: Layout Engine Font Instance object
+ */
+
+U_NAMESPACE_BEGIN
/**
* Instances of this class are used by <code>LEFontInstance::mapCharsToGlyphs</code> and
@@ -44,7 +50,7 @@
*
* @stable ICU 3.2
*/
-class LECharMapper
+class LECharMapper /* not : public UObject because this is an interface/mixin class */
{
public:
/**
@@ -97,7 +103,7 @@
*
* @draft ICU 3.0
*/
-class LEFontInstance
+class U_LAYOUT_API LEFontInstance : public UObject
{
public:
@@ -160,8 +166,7 @@
*
* @stable ICU 3.2
*/
- virtual const LEFontInstance *getSubFont(const LEUnicode chars[], le_int32 *offset,
- le_int32 limit, le_int32 script, LEErrorCode &success) const;
+ virtual const LEFontInstance *getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const;
//
// Font file access
@@ -238,8 +243,7 @@
*
* @draft ICU 3.0
*/
- virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
- le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const;
+ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, const LECharMapper *mapper, LEGlyphStorage &glyphStorage) const;
/**
* This method maps a single character to a glyph index, using the
@@ -502,6 +506,21 @@
* @stable ICU 3.2
*/
virtual le_int32 getLineHeight() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 3.2
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 3.2
+ */
+ static UClassID getStaticClassID();
+
};
inline le_bool LEFontInstance::canDisplay(LEUnicode32 ch) const
@@ -562,4 +581,7 @@
return getAscent() + getDescent() + getLeading();
}
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/LEGlyphFilter.h b/src/share/native/sun/font/layout/LEGlyphFilter.h
index f93ceb2..87e029d 100644
--- a/src/share/native/sun/font/layout/LEGlyphFilter.h
+++ b/src/share/native/sun/font/layout/LEGlyphFilter.h
@@ -34,14 +34,15 @@
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
/**
* This is a helper class that is used to
* recognize a set of glyph indices.
*
* @internal
*/
-class LEGlyphFilter
-{
+class LEGlyphFilter /* not : public UObject because this is an interface/mixin class */ {
public:
/**
* Destructor.
@@ -63,4 +64,5 @@
virtual le_bool accept(LEGlyphID glyph) const = 0;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LEGlyphStorage.cpp b/src/share/native/sun/font/layout/LEGlyphStorage.cpp
index 693f92f..2598428 100644
--- a/src/share/native/sun/font/layout/LEGlyphStorage.cpp
+++ b/src/share/native/sun/font/layout/LEGlyphStorage.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
**********************************************************************
* Copyright (C) 1998-2005, International Business Machines
* Corporation and others. All Rights Reserved.
@@ -35,6 +34,10 @@
#include "LEInsertionList.h"
#include "LEGlyphStorage.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEGlyphStorage)
+
LEGlyphStorage::LEGlyphStorage()
: fGlyphCount(0), fGlyphs(NULL), fCharIndices(NULL), fPositions(NULL),
fAuxData(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0)
@@ -603,3 +606,6 @@
return FALSE;
}
+
+U_NAMESPACE_END
+
diff --git a/src/share/native/sun/font/layout/LEGlyphStorage.h b/src/share/native/sun/font/layout/LEGlyphStorage.h
index 945e409..47684f6 100644
--- a/src/share/native/sun/font/layout/LEGlyphStorage.h
+++ b/src/share/native/sun/font/layout/LEGlyphStorage.h
@@ -24,7 +24,6 @@
*/
/*
- *
**********************************************************************
* Copyright (C) 1998-2005, International Business Machines
* Corporation and others. All Rights Reserved.
@@ -38,6 +37,13 @@
#include "LEInsertionList.h"
/**
+ * \file
+ * \brief C++ API: This class encapsulates the per-glyph storage used by the ICU LayoutEngine.
+ */
+
+U_NAMESPACE_BEGIN
+
+/**
* This class encapsulates the per-glyph storage used by the ICU LayoutEngine.
* For each glyph it holds the glyph ID, the index of the backing store character
* which produced the glyph, the X and Y position of the glyph and an auxillary data
@@ -50,7 +56,7 @@
*
* @draft ICU 3.6
*/
-class U_LAYOUT_API LEGlyphStorage : protected LEInsertionCallback
+class U_LAYOUT_API LEGlyphStorage : public UObject, protected LEInsertionCallback
{
private:
/**
@@ -112,35 +118,37 @@
protected:
/**
- * This implements <code>LEInsertionCallback</code>. The
- * <code>LEInsertionList</code> will call this method once for
- * each insertion.
+ * This implements <code>LEInsertionCallback</code>. The <code>LEInsertionList</code>
+ * will call this method once for each insertion.
*
* @param atPosition the position of the insertion
* @param count the number of glyphs being inserted
* @param newGlyphs the address of the new glyph IDs
*
- * @return <code>true</code> if <code>LEInsertionList</code>
- * should stop processing the insertion list after this insertion.
+ * @return <code>true</code> if <code>LEInsertionList</code> should stop
+ * processing the insertion list after this insertion.
*
* @see LEInsertionList.h
*
* @draft ICU 3.0
*/
- virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count,
- LEGlyphID newGlyphs[]);
+ virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[]);
public:
/**
- * Allocates an empty <code>LEGlyphStorage</code> object. You must
- * call <code>allocateGlyphArray, allocatePositions and
- * allocateAuxData</code> to allocate the data.
+ * Allocates an empty <code>LEGlyphStorage</code> object. You must call
+ * <code>allocateGlyphArray, allocatePositions and allocateAuxData</code>
+ * to allocate the data.
+ *
+ * @draft ICU 3.0
*/
LEGlyphStorage();
/**
* The destructor. This will deallocate all of the arrays.
+ *
+ * @draft ICU 3.0
*/
~LEGlyphStorage();
@@ -154,9 +162,9 @@
inline le_int32 getGlyphCount() const;
/**
- * This method copies the glyph array into a caller supplied
- * array. The caller must ensure that the array is large enough
- * to hold all the glyphs.
+ * This method copies the glyph array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold all
+ * the glyphs.
*
* @param glyphs - the destiniation glyph array
* @param success - set to an error code if the operation fails
@@ -166,10 +174,10 @@
void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
/**
- * This method copies the glyph array into a caller supplied
- * array, ORing in extra bits. (This functionality is needed by
- * the JDK, which uses 32 bits pre glyph idex, with the high 16
- * bits encoding the composite font slot number)
+ * This method copies the glyph array into a caller supplied array,
+ * ORing in extra bits. (This functionality is needed by the JDK,
+ * which uses 32 bits pre glyph idex, with the high 16 bits encoding
+ * the composite font slot number)
*
* @param glyphs - the destination (32 bit) glyph array
* @param extraBits - this value will be ORed with each glyph index
@@ -177,13 +185,12 @@
*
* @draft ICU 3.0
*/
- void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
- LEErrorCode &success) const;
+ void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
/**
- * This method copies the character index array into a caller
- * supplied array. The caller must ensure that the array is large
- * enough to hold a character index for each glyph.
+ * This method copies the character index array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold a
+ * character index for each glyph.
*
* @param charIndices - the destiniation character index array
* @param success - set to an error code if the operation fails
@@ -193,9 +200,9 @@
void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
/**
- * This method copies the character index array into a caller
- * supplied array. The caller must ensure that the array is large
- * enough to hold a character index for each glyph.
+ * This method copies the character index array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold a
+ * character index for each glyph.
*
* @param charIndices - the destiniation character index array
* @param indexBase - an offset which will be added to each index
@@ -203,14 +210,13 @@
*
* @draft ICU 3.0
*/
- void getCharIndices(le_int32 charIndices[], le_int32 indexBase,
- LEErrorCode &success) const;
+ void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
/**
- * This method copies the position array into a caller supplied
- * array. The caller must ensure that the array is large enough
- * to hold an X and Y position for each glyph, plus an extra X and
- * Y for the advance of the last glyph.
+ * This method copies the position array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold an
+ * X and Y position for each glyph, plus an extra X and Y for the
+ * advance of the last glyph.
*
* @param positions - the destiniation position array
* @param success - set to an error code if the operation fails
@@ -233,33 +239,27 @@
*
* @draft ICU 3.0
*/
- void getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
- LEErrorCode &success) const;
+ void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
/**
- * This method allocates the glyph array, the char indices array
- * and the insertion list. You must call this method before using
- * the object. This method also initializes the char indices
+ * This method allocates the glyph array, the char indices array and the insertion list. You
+ * must call this method before using the object. This method also initializes the char indices
* array.
- * @param initialGlyphCount the initial size of the glyph and char
- * indices arrays.
- * @param rightToLeft <code>true</code> if the original input text
- * is right to left.
- * @param success set to an error code if the storage cannot be
- * allocated of if the initial glyph count is not positive.
+ *
+ * @param initialGlyphCount the initial size of the glyph and char indices arrays.
+ * @param rightToLeft <code>true</code> if the original input text is right to left.
+ * @param success set to an error code if the storage cannot be allocated of if the initial
+ * glyph count is not positive.
*
* @draft ICU 3.0
*/
- void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft,
- LEErrorCode &success);
+ void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft, LEErrorCode &success);
/**
- * This method allocates the storage for the glyph positions. It
- * allocates one extra X, Y position pair for the position just
- * after the last glyph.
+ * This method allocates the storage for the glyph positions. It allocates one extra X, Y
+ * position pair for the position just after the last glyph.
*
- * @param success set to an error code if the positions array
- * cannot be allocated.
+ * @param success set to an error code if the positions array cannot be allocated.
*
* @return the number of X, Y position pairs allocated.
*
@@ -270,8 +270,7 @@
/**
* This method allocates the storage for the auxillary glyph data.
*
- * @param success set to an error code if the aulillary data array
- * cannot be allocated.
+ * @param success set to an error code if the aulillary data array cannot be allocated.
*
* @return the size of the auxillary data array.
*
@@ -282,10 +281,8 @@
/**
* Copy the entire auxillary data array.
*
- * @param auxData the auxillary data array will be copied to this
- * address
- * @param success set to an error code if the data cannot be
- * copied
+ * @param auxData the auxillary data array will be copied to this address
+ * @param success set to an error code if the data cannot be copied
*
* @draft ICU 3.6
*/
@@ -295,8 +292,7 @@
* Get the glyph ID for a particular glyph.
*
* @param glyphIndex the index into the glyph array
- * @param success set to an error code if the glyph ID cannot be
- * retrieved.
+ * @param success set to an error code if the glyph ID cannot be retrieved.
*
* @return the glyph ID
*
@@ -308,8 +304,7 @@
* Get the char index for a particular glyph.
*
* @param glyphIndex the index into the glyph array
- * @param success set to an error code if the char index cannot be
- * retrieved.
+ * @param success set to an error code if the char index cannot be retrieved.
*
* @return the character index
*
@@ -322,8 +317,7 @@
* Get the auxillary data for a particular glyph.
*
* @param glyphIndex the index into the glyph array
- * @param success set to an error code if the auxillary data
- * cannot be retrieved.
+ * @param success set to an error code if the auxillary data cannot be retrieved.
*
* @return the auxillary data
*
@@ -345,11 +339,10 @@
/**
* Call this method to replace a single glyph in the glyph array
- * with multiple glyphs. This method uses the
- * <code>LEInsertionList</code> to do the insertion. It returns
- * the address of storage where the new glyph IDs can be
- * stored. They will not actually be inserted into the glyph array
- * until <code>applyInsertions</code> is called.
+ * with multiple glyphs. This method uses the <code>LEInsertionList</code>
+ * to do the insertion. It returns the address of storage where the new
+ * glyph IDs can be stored. They will not actually be inserted into the
+ * glyph array until <code>applyInsertions</code> is called.
*
* @param atIndex the index of the glyph to be replaced
* @param insertCount the number of glyphs to replace it with
@@ -381,26 +374,22 @@
*
* @param glyphIndex the index of the glyph
* @param glyphID the new glyph ID
- * @param success will be set to an error code if the glyph ID
- * cannot be set.
+ * @param success will be set to an error code if the glyph ID cannot be set.
*
* @draft ICU 3.0
*/
- void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID,
- LEErrorCode &success);
+ void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID, LEErrorCode &success);
/**
* Set the char index for a particular glyph.
*
* @param glyphIndex the index of the glyph
* @param charIndex the new char index
- * @param success will be set to an error code if the char index
- * cannot be set.
+ * @param success will be set to an error code if the char index cannot be set.
*
* @draft ICU 3.0
*/
- void setCharIndex(le_int32 glyphIndex, le_int32 charIndex,
- LEErrorCode &success);
+ void setCharIndex(le_int32 glyphIndex, le_int32 charIndex, LEErrorCode &success);
/**
* Set the X, Y position for a particular glyph.
@@ -408,13 +397,11 @@
* @param glyphIndex the index of the glyph
* @param x the new X position
* @param y the new Y position
- * @param success will be set to an error code if the position
- * cannot be set.
+ * @param success will be set to an error code if the position cannot be set.
*
* @draft ICU 3.0
*/
- void setPosition(le_int32 glyphIndex, float x, float y,
- LEErrorCode &success);
+ void setPosition(le_int32 glyphIndex, float x, float y, LEErrorCode &success);
/**
* Adjust the X, Y position for a particular glyph.
@@ -422,21 +409,18 @@
* @param glyphIndex the index of the glyph
* @param xAdjust the adjustment to the glyph's X position
* @param yAdjust the adjustment to the glyph's Y position
- * @param success will be set to an error code if the glyph's
- * position cannot be adjusted.
+ * @param success will be set to an error code if the glyph's position cannot be adjusted.
*
* @draft ICU 3.0
*/
- void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust,
- LEErrorCode &success);
+ void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success);
/**
* Set the auxillary data for a particular glyph.
*
* @param glyphIndex the index of the glyph
* @param auxData the new auxillary data
- * @param success will be set to an error code if the auxillary
- * data cannot be set.
+ * @param success will be set to an error code if the auxillary data cannot be set.
*
* @draft ICU 3.6
*/
@@ -511,14 +495,28 @@
void adoptGlyphCount(le_int32 newGlyphCount);
/**
- * This method frees the glyph, character index, position and
- * auxillary data arrays so that the LayoutEngine can be reused to
- * layout a different characer array. (This method is also called
+ * This method frees the glyph, character index, position and
+ * auxillary data arrays so that the LayoutEngine can be reused
+ * to layout a different characer array. (This method is also called
* by the destructor)
*
* @draft ICU 3.0
*/
void reset();
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @draft ICU 3.0
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @draft ICU 3.0
+ */
+ static UClassID getStaticClassID();
};
inline le_int32 LEGlyphStorage::getGlyphCount() const
@@ -531,4 +529,7 @@
return fGlyphs[glyphIndex];
}
+
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/LEInsertionList.cpp b/src/share/native/sun/font/layout/LEInsertionList.cpp
index f40bfaf..d1f2288 100644
--- a/src/share/native/sun/font/layout/LEInsertionList.cpp
+++ b/src/share/native/sun/font/layout/LEInsertionList.cpp
@@ -24,7 +24,6 @@
*/
/*
- *
**********************************************************************
* Copyright (C) 1998-2004, International Business Machines
* Corporation and others. All Rights Reserved.
@@ -34,6 +33,8 @@
#include "LETypes.h"
#include "LEInsertionList.h"
+U_NAMESPACE_BEGIN
+
#define ANY_NUMBER 1
struct InsertionRecord
@@ -44,6 +45,8 @@
LEGlyphID glyphs[ANY_NUMBER];
};
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEInsertionList)
+
LEInsertionList::LEInsertionList(le_bool rightToLeft)
: head(NULL), tail(NULL), growAmount(0), append(rightToLeft)
{
@@ -106,3 +109,5 @@
return FALSE;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LEInsertionList.h b/src/share/native/sun/font/layout/LEInsertionList.h
index bf54985..d57258a 100644
--- a/src/share/native/sun/font/layout/LEInsertionList.h
+++ b/src/share/native/sun/font/layout/LEInsertionList.h
@@ -24,7 +24,6 @@
*/
/*
- *
**********************************************************************
* Copyright (C) 1998-2004, International Business Machines
* Corporation and others. All Rights Reserved.
@@ -36,6 +35,8 @@
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
struct InsertionRecord;
/**
@@ -78,7 +79,7 @@
*
* @internal
*/
-class LEInsertionList
+class LEInsertionList : public UObject
{
public:
/**
@@ -140,6 +141,20 @@
*/
void reset();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
/**
@@ -174,4 +189,6 @@
le_bool append;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/LELanguages.h b/src/share/native/sun/font/layout/LELanguages.h
index 55396c1..8789bce 100644
--- a/src/share/native/sun/font/layout/LELanguages.h
+++ b/src/share/native/sun/font/layout/LELanguages.h
@@ -25,10 +25,12 @@
/*
*
- * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2005. All Rights Reserved.
*
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
* YOU REALLY KNOW WHAT YOU'RE DOING.
+ *
+ * Generated on: 07/19/2005 01:01:08 PM PDT
*/
#ifndef __LELANGUAGES_H
@@ -37,11 +39,18 @@
#include "LETypes.h"
/**
+ * \file
+ * \brief C++ API: List of language codes for LayoutEngine
+ */
+
+U_NAMESPACE_BEGIN
+
+/**
* A provisional list of language codes. For now,
* this is just a list of languages which the LayoutEngine
* supports.
*
- * @draft ICU 3.0
+ * @draft ICU 3.4
*/
enum LanguageCodes {
@@ -79,4 +88,5 @@
languageCodeCount = 30
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LEScripts.h b/src/share/native/sun/font/layout/LEScripts.h
index ca7a860..b5c7ba3 100644
--- a/src/share/native/sun/font/layout/LEScripts.h
+++ b/src/share/native/sun/font/layout/LEScripts.h
@@ -25,17 +25,23 @@
/*
*
- * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
+ * (C) Copyright IBM Corp. 1998-2005. All Rights Reserved.
*
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
* YOU REALLY KNOW WHAT YOU'RE DOING.
- *
*/
#ifndef __LESCRIPTS_H
#define __LESCRIPTS_H
#include "LETypes.h"
+/**
+ * \file
+ * \brief C++ API: Constants for Unicode script values
+ */
+
+
+U_NAMESPACE_BEGIN
/**
* Constants for Unicode script values, generated using
@@ -104,4 +110,5 @@
scriptCodeCount = 55
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LEStandalone.h b/src/share/native/sun/font/layout/LEStandalone.h
new file mode 100644
index 0000000..74304e6
--- /dev/null
+++ b/src/share/native/sun/font/layout/LEStandalone.h
@@ -0,0 +1,132 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+#ifndef __LESTANDALONE
+#define __LESTANDALONE
+
+/* Definitions to make Layout Engine work away from ICU. */
+#ifndef U_NAMESPACE_BEGIN
+#define U_NAMESPACE_BEGIN
+#endif
+
+#ifndef U_NAMESPACE_END
+#define U_NAMESPACE_END
+#endif
+
+/* RTTI Definition */
+typedef const char *UClassID;
+#ifndef UOBJECT_DEFINE_RTTI_IMPLEMENTATION
+#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(x) UClassID x::getStaticClassID(){static char z=0; return (UClassID)&z; } UClassID x::getDynamicClassID() const{return x::getStaticClassID(); }
+#endif
+
+/* UMemory's functions aren't used by the layout engine. */
+struct UMemory {};
+/* UObject's functions aren't used by the layout engine. */
+struct UObject {};
+
+/* String handling */
+#include <stdlib.h>
+#include <string.h>
+
+/**
+ * A convenience macro to test for the success of a LayoutEngine call.
+ *
+ * @stable ICU 2.4
+ */
+#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)
+
+/**
+ * A convenience macro to test for the failure of a LayoutEngine call.
+ *
+ * @stable ICU 2.4
+ */
+#define LE_FAILURE(code) ((code)>LE_NO_ERROR)
+
+
+#ifndef _LP64
+typedef long le_int32;
+typedef unsigned long le_uint32;
+#else
+typedef int le_int32;
+typedef unsigned int le_uint32;
+#endif
+
+#define HAVE_LE_INT32 1
+#define HAVE_LE_UINT32 1
+
+typedef unsigned short UChar;
+typedef le_uint32 UChar32;
+
+typedef short le_int16;
+#define HAVE_LE_INT16 1
+
+typedef unsigned short le_uint16;
+#define HAVE_LE_UINT16
+
+typedef signed char le_int8;
+#define HAVE_LE_INT8
+
+typedef unsigned char le_uint8;
+#define HAVE_LE_UINT8
+
+typedef char UBool;
+
+/**
+ * Error codes returned by the LayoutEngine.
+ *
+ * @stable ICU 2.4
+ */
+enum LEErrorCode {
+ /* informational */
+ LE_NO_SUBFONT_WARNING = -127, // U_USING_DEFAULT_WARNING,
+
+ /* success */
+ LE_NO_ERROR = 0, // U_ZERO_ERROR,
+
+ /* failures */
+ LE_ILLEGAL_ARGUMENT_ERROR = 1, // U_ILLEGAL_ARGUMENT_ERROR,
+ LE_MEMORY_ALLOCATION_ERROR = 7, // U_MEMORY_ALLOCATION_ERROR,
+ LE_INDEX_OUT_OF_BOUNDS_ERROR = 8, //U_INDEX_OUTOFBOUNDS_ERROR,
+ LE_NO_LAYOUT_ERROR = 16, // U_UNSUPPORTED_ERROR,
+ LE_INTERNAL_ERROR = 5, // U_INTERNAL_PROGRAM_ERROR,
+ LE_FONT_FILE_NOT_FOUND_ERROR = 4, // U_FILE_ACCESS_ERROR,
+ LE_MISSING_FONT_TABLE_ERROR = 2 // U_MISSING_RESOURCE_ERROR
+};
+#define HAVE_LEERRORCODE
+
+#define U_LAYOUT_API
+
+#define uprv_malloc malloc
+#define uprv_free free
+#define uprv_memcpy memcpy
+#define uprv_realloc realloc
+
+#if !defined(U_IS_BIG_ENDIAN)
+ #ifdef _LITTLE_ENDIAN
+ #define U_IS_BIG_ENDIAN 0
+ #endif
+#endif
+
+#endif
diff --git a/src/share/native/sun/font/layout/LESwaps.h b/src/share/native/sun/font/layout/LESwaps.h
index d8deeb9..75adeac 100644
--- a/src/share/native/sun/font/layout/LESwaps.h
+++ b/src/share/native/sun/font/layout/LESwaps.h
@@ -26,7 +26,7 @@
/*
*
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -35,11 +35,12 @@
#include "LETypes.h"
-#if !defined(U_IS_BIG_ENDIAN)
- #ifdef _LITTLE_ENDIAN
- #define U_IS_BIG_ENDIAN 0
- #endif
-#endif
+/**
+ * \file
+ * \brief C++ API: Endian independent access to data for LayoutEngine
+ */
+
+U_NAMESPACE_BEGIN
/**
* A convenience macro which invokes the swapWord member function
@@ -47,7 +48,6 @@
*
* @stable ICU 2.8
*/
-
#if defined(U_IS_BIG_ENDIAN)
#if U_IS_BIG_ENDIAN
#define SWAPW(value) (value)
@@ -64,7 +64,6 @@
*
* @stable ICU 2.8
*/
-
#if defined(U_IS_BIG_ENDIAN)
#if U_IS_BIG_ENDIAN
#define SWAPL(value) (value)
@@ -86,8 +85,7 @@
*
* @stable ICU 2.8
*/
-class LESwaps
-{
+class U_LAYOUT_API LESwaps /* not : public UObject because all methods are static */ {
public:
#if !defined(U_IS_BIG_ENDIAN)
@@ -144,4 +142,5 @@
LESwaps() {} // private - forbid instantiation
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LETypes.h b/src/share/native/sun/font/layout/LETypes.h
index db66c5b..d3b91b3 100644
--- a/src/share/native/sun/font/layout/LETypes.h
+++ b/src/share/native/sun/font/layout/LETypes.h
@@ -23,7 +23,6 @@
*
*/
-
/*
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -33,75 +32,99 @@
#ifndef __LETYPES_H
#define __LETYPES_H
+/**
+ * If LE_Standalone is defined, it must exist and contain
+ * definitions for some core ICU defines.
+ */
+#ifdef LE_STANDALONE
+#include "LEStandalone.h"
+#endif
+
+#ifdef LE_STANDALONE
+/* Stand-alone Layout Engine- without ICU. */
+#include "LEStandalone.h"
#define LE_USE_CMEMORY
-
-#ifdef LE_USE_CMEMORY
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-#ifndef _LP64
-typedef long le_int32;
-typedef unsigned long le_uint32;
#else
-typedef int le_int32;
-typedef unsigned int le_uint32;
+#if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION))
+#define LE_USE_CMEMORY
#endif
-typedef short le_int16;
-typedef unsigned short le_uint16;
-typedef signed char le_int8;
-typedef unsigned char le_uint8;
-typedef char le_bool;
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#ifdef LE_USE_CMEMORY
+#include "cmemory.h"
+#endif
+#endif /* not standalone */
-typedef char UClassID;
-#if 0
+U_NAMESPACE_BEGIN
+
+/*!
+ * \file
+ * \brief Basic definitions for the ICU LayoutEngine
+ */
+
/**
* A type used for signed, 32-bit integers.
*
* @stable ICU 2.4
*/
+#ifndef HAVE_LE_INT32
typedef int32_t le_int32;
+#endif
/**
* A type used for unsigned, 32-bit integers.
*
* @stable ICU 2.4
*/
+#ifndef HAVE_LE_UINT32
typedef uint32_t le_uint32;
+#endif
/**
* A type used for signed, 16-bit integers.
*
* @stable ICU 2.4
*/
+#ifndef HAVE_LE_INT16
typedef int16_t le_int16;
+#endif
+#ifndef HAVE_LE_UINT16
/**
* A type used for unsigned, 16-bit integers.
*
* @stable ICU 2.4
*/
typedef uint16_t le_uint16;
+#endif
+#ifndef HAVE_LE_INT8
/**
* A type used for signed, 8-bit integers.
*
* @stable ICU 2.4
*/
typedef int8_t le_int8;
+#endif
+#ifndef HAVE_LE_UINT8
/**
* A type used for unsigned, 8-bit integers.
*
* @stable ICU 2.4
*/
typedef uint8_t le_uint8;
-
-typedef char le_bool;
#endif
+/**
+* A type used for boolean values.
+*
+* @stable ICU 2.4
+*/
+typedef UBool le_bool;
+
#ifndef TRUE
/**
* Used for <code>le_bool</code> values which are <code>true</code>.
@@ -264,21 +287,21 @@
*
* @stable ICU 2.4
*/
-typedef le_uint16 LEUnicode16;
+typedef UChar LEUnicode16;
/**
* Used to represent 32-bit Unicode code points.
*
* @stable ICU 2.4
*/
-typedef le_uint32 LEUnicode32;
+typedef UChar32 LEUnicode32;
/**
* Used to represent 16-bit Unicode code points.
*
* @deprecated since ICU 2.4. Use LEUnicode16 instead
*/
-typedef le_uint16 LEUnicode;
+typedef UChar LEUnicode;
/**
* Used to hold a pair of (x, y) values which represent a point.
@@ -325,7 +348,7 @@
*
* @internal
*/
-#define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
+#define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
/**
* Allocate an array of basic types. This is used to isolate the rest of
@@ -333,7 +356,7 @@
*
* @internal
*/
-#define LE_NEW_ARRAY(type, count) (type *) malloc((count) * sizeof(type))
+#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type))
/**
* Re-allocate an array of basic types. This is used to isolate the rest of
@@ -341,7 +364,7 @@
*
* @internal
*/
-#define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
+#define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
/**
* Free an array of basic types. This is used to isolate the rest of
@@ -349,7 +372,7 @@
*
* @internal
*/
-#define LE_DELETE_ARRAY(array) free((void *) (array))
+#define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
#endif
/**
@@ -567,22 +590,24 @@
*
* @stable ICU 2.4
*/
+#ifndef HAVE_LEERRORCODE
enum LEErrorCode {
/* informational */
- LE_NO_SUBFONT_WARNING = -127, // U_USING_DEFAULT_WARNING,
+ LE_NO_SUBFONT_WARNING = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */
/* success */
- LE_NO_ERROR = 0, // U_ZERO_ERROR,
+ LE_NO_ERROR = U_ZERO_ERROR, /**< No error, no warning. */
/* failures */
- LE_ILLEGAL_ARGUMENT_ERROR = 1, // U_ILLEGAL_ARGUMENT_ERROR,
- LE_MEMORY_ALLOCATION_ERROR = 7, // U_MEMORY_ALLOCATION_ERROR,
- LE_INDEX_OUT_OF_BOUNDS_ERROR = 8, //U_INDEX_OUTOFBOUNDS_ERROR,
- LE_NO_LAYOUT_ERROR = 16, // U_UNSUPPORTED_ERROR,
- LE_INTERNAL_ERROR = 5, // U_INTERNAL_PROGRAM_ERROR,
- LE_FONT_FILE_NOT_FOUND_ERROR = 4, // U_FILE_ACCESS_ERROR,
- LE_MISSING_FONT_TABLE_ERROR = 2 // U_MISSING_RESOURCE_ERROR
+ LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, /**< An illegal argument was detected. */
+ LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, /**< Memory allocation error. */
+ LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, /**< Trying to access an index that is out of bounds. */
+ LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, /**< You must call layoutChars() first. */
+ LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR, /**< An internal error was encountered. */
+ LE_FONT_FILE_NOT_FOUND_ERROR = U_FILE_ACCESS_ERROR, /**< The requested font file cannot be opened. */
+ LE_MISSING_FONT_TABLE_ERROR = U_MISSING_RESOURCE_ERROR /**< The requested font table does not exist. */
};
+#endif
#ifndef XP_CPLUSPLUS
/**
@@ -598,14 +623,20 @@
*
* @stable ICU 2.4
*/
-#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)
+#ifndef LE_FAILURE
+#define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))
+#endif
/**
* A convenience macro to test for the failure of a LayoutEngine call.
*
* @stable ICU 2.4
*/
-#define LE_FAILURE(code) ((code)>LE_NO_ERROR)
-
-#define U_LAYOUT_API
+#ifndef LE_FAILURE
+#define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))
#endif
+
+U_NAMESPACE_END
+#endif
+
+
diff --git a/src/share/native/sun/font/layout/LayoutEngine.cpp b/src/share/native/sun/font/layout/LayoutEngine.cpp
index 0a877d3..916197b 100644
--- a/src/share/native/sun/font/layout/LayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/LayoutEngine.cpp
@@ -23,6 +23,7 @@
*
*/
+
/*
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -40,6 +41,7 @@
#include "IndicLayoutEngine.h"
#include "KhmerLayoutEngine.h"
#include "ThaiLayoutEngine.h"
+//#include "TibetanLayoutEngine.h"
#include "GXLayoutEngine.h"
#include "ScriptAndLanguageTags.h"
#include "CharSubstitutionFilter.h"
@@ -55,6 +57,8 @@
#include "KernTable.h"
+U_NAMESPACE_BEGIN
+
const LEUnicode32 DefaultCharMapper::controlChars[] = {
0x0009, 0x000A, 0x000D,
/*0x200C, 0x200D,*/ 0x200E, 0x200F,
@@ -101,9 +105,7 @@
}
if (fMirror) {
- le_int32 index = OpenTypeUtilities::search((le_uint32) ch,
- (le_uint32 *)DefaultCharMapper::mirroredChars,
- DefaultCharMapper::mirroredCharsCount);
+ le_int32 index = OpenTypeUtilities::search((le_uint32) ch, (le_uint32 *)DefaultCharMapper::mirroredChars, DefaultCharMapper::mirroredCharsCount);
if (mirroredChars[index] == ch) {
return DefaultCharMapper::srahCderorrim[index];
@@ -132,6 +134,9 @@
// nothing to do
}
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LayoutEngine)
+
#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
#define ccmpFeatureMask 0x80000000UL
@@ -145,10 +150,9 @@
static const le_int32 canonFeatureMapCount = LE_ARRAY_SIZE(canonFeatureMap);
-LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, le_int32 typoFlags)
- : fGlyphStorage(NULL), fFontInstance(fontInstance), fScriptCode(scriptCode),
- fLanguageCode(languageCode), fTypoFlags(typoFlags)
+LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+ : fGlyphStorage(NULL), fFontInstance(fontInstance), fScriptCode(scriptCode), fLanguageCode(languageCode),
+ fTypoFlags(typoFlags)
{
fGlyphStorage = new LEGlyphStorage();
}
@@ -158,8 +162,7 @@
return fGlyphStorage->getGlyphCount();
}
-void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase,
- LEErrorCode &success) const
+void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const
{
fGlyphStorage->getCharIndices(charIndices, indexBase, success);
}
@@ -170,8 +173,7 @@
}
// Copy the glyphs into caller's (32-bit) glyph array, OR in extraBits
-void LayoutEngine::getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
- LEErrorCode &success) const
+void LayoutEngine::getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const
{
fGlyphStorage->getGlyphs(glyphs, extraBits, success);
}
@@ -218,15 +220,13 @@
fGlyphStorage->getGlyphPositions(positions, success);
}
-void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
- LEErrorCode &success) const
+void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const
{
fGlyphStorage->getGlyphPosition(glyphIndex, x, y, success);
}
-le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft, LEUnicode *&outChars,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -237,12 +237,7 @@
return 0;
}
- if ((fTypoFlags & 0x4) == 0) { // no canonical processing
- return count;
- }
-
- const GlyphSubstitutionTableHeader *canonGSUBTable =
- (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
+ const GlyphSubstitutionTableHeader *canonGSUBTable = (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable;
LETag scriptTag = OpenTypeLayoutEngine::getScriptTag(fScriptCode);
LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode);
le_int32 i, dir = 1, out = 0, outCharCount = count;
@@ -256,16 +251,15 @@
// We could just do the mark reordering for all scripts, but most
// of them probably don't need it...
if (fScriptCode == hebrScriptCode) {
- reordered = LE_NEW_ARRAY(LEUnicode, count);
+ reordered = LE_NEW_ARRAY(LEUnicode, count);
- if (reordered == NULL) {
- success = LE_MEMORY_ALLOCATION_ERROR;
- return 0;
- }
+ if (reordered == NULL) {
+ success = LE_MEMORY_ALLOCATION_ERROR;
+ return 0;
+ }
- CanonShaping::reorderMarks(&chars[offset], count, rightToLeft,
- reordered, glyphStorage);
- inChars = reordered;
+ CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, glyphStorage);
+ inChars = reordered;
}
glyphStorage.allocateGlyphArray(count, rightToLeft, success);
@@ -289,8 +283,7 @@
LE_DELETE_ARRAY(reordered);
}
- outCharCount = canonGSUBTable->process(glyphStorage, rightToLeft, scriptTag,
- langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE);
+ outCharCount = canonGSUBTable->process(glyphStorage, rightToLeft, scriptTag, langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE);
out = (rightToLeft? count - 1 : 0);
@@ -305,35 +298,26 @@
return outCharCount;
}
-
-le_int32 LayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 LayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max ||
- offset + count > max) {
-
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
LEUnicode *outChars = NULL;
- le_int32 outCharCount = characterProcessing(chars, offset, count, max,
- rightToLeft, outChars, glyphStorage, success);
+ le_int32 outCharCount = characterProcessing(chars, offset, count, max, rightToLeft, outChars, glyphStorage, success);
if (outChars != NULL) {
- mapCharsToGlyphs(outChars, 0, outCharCount, rightToLeft, rightToLeft,
- glyphStorage, success);
- // FIXME: a subclass may have allocated this, in which case this delete
- // might not work...
- LE_DELETE_ARRAY(outChars);
+ mapCharsToGlyphs(outChars, 0, outCharCount, rightToLeft, rightToLeft, glyphStorage, success);
+ LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
} else {
- mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft,
- glyphStorage, success);
+ mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft, glyphStorage, success);
}
return glyphStorage.getGlyphCount();
@@ -341,8 +325,7 @@
// Input: glyphs
// Output: positions
-void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage,
- float x, float y, LEErrorCode &success)
+void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -369,9 +352,8 @@
glyphStorage.setPosition(glyphCount, x, y, success);
}
-void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -398,8 +380,7 @@
return;
}
-void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage,
- LEGlyphFilter *markFilter, LEErrorCode &success)
+void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
{
float xAdjust = 0;
le_int32 p, glyphCount = glyphStorage.getGlyphCount();
@@ -435,9 +416,7 @@
glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success);
}
-void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount,
- le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter,
- LEErrorCode &success)
+void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
{
float xAdjust = 0;
le_int32 c = 0, direction = 1, p;
@@ -484,9 +463,8 @@
return fFontInstance->getFontTable(tableTag);
}
-void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, le_bool mirror,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -496,32 +474,27 @@
DefaultCharMapper charMapper(TRUE, mirror);
- fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse,
- &charMapper, glyphStorage);
+ fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse, &charMapper, glyphStorage);
}
// Input: characters, font?
// Output: glyphs, positions, char indices
// Returns: number of glyphs
-le_int32 LayoutEngine::layoutChars(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- float x, float y, LEErrorCode &success)
+le_int32 LayoutEngine::layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ float x, float y, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max ||
- offset + count > max) {
-
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
le_int32 glyphCount;
- glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft,
- *fGlyphStorage, success);
+ glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft, *fGlyphStorage, success);
positionGlyphs(*fGlyphStorage, x, y, success);
adjustGlyphPositions(chars, offset, count, rightToLeft, *fGlyphStorage, success);
@@ -533,17 +506,13 @@
fGlyphStorage->reset();
}
-LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
+LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
{
// 3 -> kerning and ligatures
- return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode,
- languageCode, 3, success);
+ return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, 3, success);
}
-LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- LEErrorCode &success)
+LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
{
static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG;
static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG;
@@ -552,18 +521,12 @@
return NULL;
}
- // code2000 has GPOS kern feature tags for latn script
-
- const GlyphSubstitutionTableHeader *gsubTable =
- (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag);
+ const GlyphSubstitutionTableHeader *gsubTable = (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag);
LayoutEngine *result = NULL;
LETag scriptTag = 0x00000000;
LETag languageTag = 0x00000000;
- if (gsubTable != NULL &&
- gsubTable->coversScript(scriptTag =
- OpenTypeLayoutEngine::getScriptTag(scriptCode))) {
-
+ if (gsubTable != NULL && gsubTable->coversScript(scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode))) {
switch (scriptCode) {
case bengScriptCode:
case devaScriptCode:
@@ -575,13 +538,11 @@
case tamlScriptCode:
case teluScriptCode:
case sinhScriptCode:
- result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
case arabScriptCode:
- result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
case haniScriptCode:
@@ -593,33 +554,33 @@
case zhtLanguageCode:
case zhsLanguageCode:
if (gsubTable->coversScriptAndLanguage(scriptTag, languageTag, TRUE)) {
- result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
}
// note: falling through to default case.
default:
- result = new OpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
}
break;
+#if 0
+ case tibtScriptCode:
+ result = new TibetanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
+ break;
+#endif
case khmrScriptCode:
- result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
default:
- result = new OpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags, gsubTable);
+ result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable);
break;
}
} else {
- const MorphTableHeader *morphTable =
- (MorphTableHeader *) fontInstance->getFontTable(mortTableTag);
+ const MorphTableHeader *morphTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag);
if (morphTable != NULL) {
result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, morphTable);
@@ -636,16 +597,18 @@
case teluScriptCode:
case sinhScriptCode:
{
- result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags);
+ result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
break;
}
case arabScriptCode:
- result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode,
- languageCode, typoFlags);
+ //case hebrScriptCode:
+ result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
break;
+ //case hebrScriptCode:
+ // return new HebrewOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
+
case thaiScriptCode:
result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags);
break;
@@ -667,3 +630,5 @@
LayoutEngine::~LayoutEngine() {
delete fGlyphStorage;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LayoutEngine.h b/src/share/native/sun/font/layout/LayoutEngine.h
index fef3b30..84cfc40 100644
--- a/src/share/native/sun/font/layout/LayoutEngine.h
+++ b/src/share/native/sun/font/layout/LayoutEngine.h
@@ -23,6 +23,7 @@
*
*/
+
/*
*
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
@@ -34,63 +35,61 @@
#include "LETypes.h"
-#include <string.h>
+/**
+ * \file
+ * \brief C++ API: Virtual base class for complex text layout.
+ */
+
+U_NAMESPACE_BEGIN
class LEFontInstance;
class LEGlyphFilter;
class LEGlyphStorage;
/**
- * This is a virtual base class used to do complex text layout. The
- * text must all be in a single font, script, and language. An
- * instance of a LayoutEngine can be created by calling the
- * layoutEngineFactory method. Fonts are identified by instances of
- * the LEFontInstance class. Script and language codes are identified
+ * This is a virtual base class used to do complex text layout. The text must all
+ * be in a single font, script, and language. An instance of a LayoutEngine can be
+ * created by calling the layoutEngineFactory method. Fonts are identified by
+ * instances of the LEFontInstance class. Script and language codes are identified
* by integer codes, which are defined in ScriptAndLanuageTags.h.
*
- * Note that this class is not public API. It is declared public so
- * that it can be exported from the library that it is a part of.
+ * Note that this class is not public API. It is declared public so that it can be
+ * exported from the library that it is a part of.
*
- * The input to the layout process is an array of characters in
- * logical order, and a starting X, Y position for the text. The
- * output is an array of glyph indices, an array of character indices
- * for the glyphs, and an array of glyph positions. These arrays are
- * protected members of LayoutEngine which can be retreived by a
- * public method. The reset method can be called to free these arrays
- * so that the LayoutEngine can be reused.
+ * The input to the layout process is an array of characters in logical order,
+ * and a starting X, Y position for the text. The output is an array of glyph indices,
+ * an array of character indices for the glyphs, and an array of glyph positions.
+ * These arrays are protected members of LayoutEngine which can be retreived by a
+ * public method. The reset method can be called to free these arrays so that the
+ * LayoutEngine can be reused.
*
- * The layout process is done in three steps. There is a protected
- * virtual method for each step. These methods have a default
- * implementation which only does character to glyph mapping and
- * default positioning using the glyph's advance widths. Subclasses
- * can override these methods for more advanced layout. There is a
- * public method which invokes the steps in the correct order.
+ * The layout process is done in three steps. There is a protected virtual method
+ * for each step. These methods have a default implementation which only does
+ * character to glyph mapping and default positioning using the glyph's advance
+ * widths. Subclasses can override these methods for more advanced layout.
+ * There is a public method which invokes the steps in the correct order.
*
* The steps are:
*
- * 1) Glyph processing - character to glyph mapping and any other
- * glyph processing such as ligature substitution and contextual
- * forms.
+ * 1) Glyph processing - character to glyph mapping and any other glyph processing
+ * such as ligature substitution and contextual forms.
*
- * 2) Glyph positioning - position the glyphs based on their advance
- * widths.
+ * 2) Glyph positioning - position the glyphs based on their advance widths.
*
- * 3) Glyph position adjustments - adjustment of glyph positions for
- * kerning, accent placement, etc.
+ * 3) Glyph position adjustments - adjustment of glyph positions for kerning,
+ * accent placement, etc.
*
- * NOTE: in all methods below, output parameters are references to
- * pointers so the method can allocate and free the storage as
- * needed. All storage allocated in this way is owned by the object
- * which created it, and will be freed when it is no longer needed, or
- * when the object's destructor is invoked.
+ * NOTE: in all methods below, output parameters are references to pointers so
+ * the method can allocate and free the storage as needed. All storage allocated
+ * in this way is owned by the object which created it, and will be freed when it
+ * is no longer needed, or when the object's destructor is invoked.
*
* @see LEFontInstance
* @see ScriptAndLanguageTags.h
*
* @stable ICU 2.8
*/
-class U_LAYOUT_API LayoutEngine
-{
+class U_LAYOUT_API LayoutEngine : public UObject {
protected:
/**
* The object which holds the glyph storage
@@ -134,21 +133,21 @@
le_int32 fTypoFlags;
/**
- * This constructs an instance for a given font, script and
- * language. Subclass constructors
+ * This constructs an instance for a given font, script and language. Subclass constructors
* must call this constructor.
*
* @param fontInstance - the font for the text
* @param scriptCode - the script for the text
* @param languageCode - the language for the text
+ * @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning
+ * is desired, set bit 2 if ligature formation is desired. Others are reserved.
*
* @see LEFontInstance
* @see ScriptAndLanguageTags.h
*
* @internal
*/
- LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, le_int32 typoFlags);
+ LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
/**
* This overrides the default no argument constructor to make it
@@ -160,11 +159,10 @@
LayoutEngine();
/**
- * This method does any required pre-processing to the input
- * characters. It may generate output characters that differ from
- * the input charcters due to insertions, deletions, or
- * reorderings. In such cases, it will also generate an output
- * character index array reflecting these changes.
+ * This method does any required pre-processing to the input characters. It
+ * may generate output characters that differ from the input charcters due to
+ * insertions, deletions, or reorderings. In such cases, it will also generate an
+ * output character index array reflecting these changes.
*
* Subclasses must override this method.
*
@@ -173,44 +171,36 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - TRUE if the characters are in a right to
- * left directional run
- * @param outChars - the output character array, if different from
- * the input
- * @param glyphStorage - the object that holds the per-glyph
- * storage. The character index array may be set.
+ * @param rightToLeft - TRUE if the characters are in a right to left directional run
+ * @param outChars - the output character array, if different from the input
+ * @param glyphStorage - the object that holds the per-glyph storage. The character index array may be set.
* @param success - set to an error code if the operation fails
- * @return the output character count (input character count if no
- * change)
+ *
+ * @return the output character count (input character count if no change)
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
- * This method does the glyph processing. It converts an array of
- * characters into an array of glyph indices and character
- * indices. The characters to be processed are passed in a
- * surrounding context. The context is specified as a starting
- * address and a maximum character count. An offset and a count
- * are used to specify the characters to be processed.
+ * This method does the glyph processing. It converts an array of characters
+ * into an array of glyph indices and character indices. The characters to be
+ * processed are passed in a surrounding context. The context is specified as
+ * a starting address and a maximum character count. An offset and a count are
+ * used to specify the characters to be processed.
*
- * The default implementation of this method only does character
- * to glyph mapping. Subclasses needing more elaborate glyph
- * processing must override this method.
+ * The default implementation of this method only does character to glyph mapping.
+ * Subclasses needing more elaborate glyph processing must override this method.
*
* Input parameters:
* @param chars - the character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the context.
- * @param rightToLeft - TRUE if the text is in a right to left
- * directional run
- * @param glyphStorage - the object which holds the per-glyph
- * storage. The glyph and char indices arrays will be
- * set.
+ * @param rightToLeft - TRUE if the text is in a right to left directional run
+ * @param glyphStorage - the object which holds the per-glyph storage. The glyph and char indices arrays
+ * will be set.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -219,60 +209,50 @@
*
* @internal
*/
- virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
- * This method does basic glyph positioning. The default
- * implementation positions the glyphs based on their advance
- * widths. This is sufficient for most uses. It is not expected
- * that many subclasses will override this method.
+ * This method does basic glyph positioning. The default implementation positions
+ * the glyphs based on their advance widths. This is sufficient for most uses. It
+ * is not expected that many subclasses will override this method.
*
* Input parameters:
- * @param glyphStorage - the object which holds the per-glyph storage.
- * The glyph position array will be set.
+ * @param glyphStorage - the object which holds the per-glyph storage. The glyph position array will be set.
* @param x - the starting X position
* @param y - the starting Y position
* @param success - set to an error code if the operation fails
*
* @internal
*/
- virtual void positionGlyphs(LEGlyphStorage &glyphStorage,
- float x, float y, LEErrorCode &success);
+ virtual void positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success);
/**
- * This method does positioning adjustments like accent
- * positioning and kerning. The default implementation does
- * nothing. Subclasses needing position adjustments must override
- * this method.
+ * This method does positioning adjustments like accent positioning and
+ * kerning. The default implementation does nothing. Subclasses needing
+ * position adjustments must override this method.
*
- * Note that this method has both characters and glyphs as input
- * so that it can use the character codes to determine glyph types
- * if that information isn't directly available. (e.g. Some Arabic
- * OpenType fonts don't have a GDEF table)
+ * Note that this method has both characters and glyphs as input so that
+ * it can use the character codes to determine glyph types if that information
+ * isn't directly available. (e.g. Some Arabic OpenType fonts don't have a GDEF
+ * table)
*
* @param chars - the input character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
- * @param reverse - <code>TRUE</code> if the glyphs in the glyph
- * array have been reordered
- * @param glyphStorage - the object which holds the per-glyph
- * storage. The glyph positions will be adjusted as needed.
- * @param success - output parameter set to an error code if the
- * operation fails
+ * @param reverse - <code>TRUE</code> if the glyphs in the glyph array have been reordered
+ * @param glyphStorage - the object which holds the per-glyph storage. The glyph positions will be
+ * adjusted as needed.
+ * @param success - output parameter set to an error code if the operation fails
*
* @internal
*/
- virtual void adjustGlyphPositions(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_bool reverse,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
- * This method gets a table from the font associated with the
- * text. The default implementation gets the table from the font
- * instance. Subclasses which need to get the tables some other
- * way must override this method.
+ * This method gets a table from the font associated with
+ * the text. The default implementation gets the table from
+ * the font instance. Subclasses which need to get the tables
+ * some other way must override this method.
*
* @param tableTag - the four byte table tag.
*
@@ -283,127 +263,106 @@
virtual const void *getFontTable(LETag tableTag) const;
/**
- * This method does character to glyph mapping. The default
- * implementation uses the font instance to do the mapping. It
- * will allocate the glyph and character index arrays if they're
- * not already allocated. If it allocates the character index
- * array, it will fill it it.
+ * This method does character to glyph mapping. The default implementation
+ * uses the font instance to do the mapping. It will allocate the glyph and
+ * character index arrays if they're not already allocated. If it allocates the
+ * character index array, it will fill it it.
*
- * This method supports right to left text with the ability to
- * store the glyphs in reverse order, and by supporting character
- * mirroring, which will replace a character which has a left and
- * right form, such as parens, with the opposite form before
- * mapping it to a glyph index.
+ * This method supports right to left
+ * text with the ability to store the glyphs in reverse order, and by supporting
+ * character mirroring, which will replace a character which has a left and right
+ * form, such as parens, with the opposite form before mapping it to a glyph index.
*
* Input parameters:
* @param chars - the input character context
* @param offset - the offset of the first character to be mapped
* @param count - the number of characters to be mapped
- * @param reverse - if <code>TRUE</code>, the output will be in
- * reverse order
+ * @param reverse - if <code>TRUE</code>, the output will be in reverse order
* @param mirror - if <code>TRUE</code>, do character mirroring
- * @param glyphStorage - the object which holds the per-glyph
- * storage. The glyph and char indices arrays will be
- * filled in.
+ * @param glyphStorage - the object which holds the per-glyph storage. The glyph and char
+ * indices arrays will be filled in.
* @param success - set to an error code if the operation fails
*
* @see LEFontInstance
*
* @internal
*/
- virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, le_bool mirror,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
- * This is a convenience method that forces the advance width of
- * mark glyphs to be zero, which is required for proper selection
- * and highlighting.
+ * This is a convenience method that forces the advance width of mark
+ * glyphs to be zero, which is required for proper selection and highlighting.
*
- * @param glyphStorage - the object containing the per-glyph
- * storage. The positions array will be modified.
+ * @param glyphStorage - the object containing the per-glyph storage. The positions array will be modified.
* @param markFilter - used to identify mark glyphs
- * @param success - output parameter set to an error code if the
- * operation fails
+ * @param success - output parameter set to an error code if the operation fails
*
* @see LEGlyphFilter
*
* @internal
*/
- static void adjustMarkGlyphs(LEGlyphStorage &glyphStorage,
- LEGlyphFilter *markFilter, LEErrorCode &success);
+ static void adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
/**
- * This is a convenience method that forces the advance width of
- * mark glyphs to be zero, which is required for proper selection
- * and highlighting. This method uses the input characters to
- * identify marks. This is required in cases where the font does
- * not contain enough information to identify them based on the
- * glyph IDs.
+ * This is a convenience method that forces the advance width of mark
+ * glyphs to be zero, which is required for proper selection and highlighting.
+ * This method uses the input characters to identify marks. This is required in
+ * cases where the font does not contain enough information to identify them based
+ * on the glyph IDs.
*
* @param chars - the array of input characters
* @param charCount - the number of input characers
- * @param glyphStorage - the object containing the per-glyph
- * storage. The positions array will be modified.
- * @param reverse - <code>TRUE</code> if the glyph array has been
- * reordered
+ * @param glyphStorage - the object containing the per-glyph storage. The positions array will be modified.
+ * @param reverse - <code>TRUE</code> if the glyph array has been reordered
* @param markFilter - used to identify mark glyphs
- * @param success - output parameter set to an error code if the
- * operation fails
+ * @param success - output parameter set to an error code if the operation fails
*
* @see LEGlyphFilter
*
* @internal
*/
- static void adjustMarkGlyphs(const LEUnicode chars[],
- le_int32 charCount, le_bool reverse,
- LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter,
- LEErrorCode &success);
+ static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
+
public:
/**
* The destructor. It will free any storage allocated for the
* glyph, character index and position arrays by calling the reset
- * method. It is declared virtual so that it will be invoked by
- * the subclass destructors.
+ * method. It is declared virtual so that it will be invoked by the
+ * subclass destructors.
*
* @stable ICU 2.8
*/
virtual ~LayoutEngine();
/**
- * This method will invoke the layout steps in their correct order
- * by calling the 32 bit versions of the computeGlyphs and
- * positionGlyphs methods.(It doesn't * call the
- * adjustGlyphPositions method because that doesn't apply for
- * default * processing.) It will compute the glyph, character
- * index and position arrays.
+ * This method will invoke the layout steps in their correct order by calling
+ * the computeGlyphs, positionGlyphs and adjustGlyphPosition methods.. It will
+ * compute the glyph, character index and position arrays.
*
* @param chars - the input character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - true if the characers are in a right to
- * left directional run
+ * @param rightToLeft - TRUE if the characers are in a right to left directional run
* @param x - the initial X position
* @param y - the initial Y position
- * @param success - output parameter set to an error code if the
- * operation fails
+ * @param success - output parameter set to an error code if the operation fails
+ *
* @return the number of glyphs in the glyph array
*
- * Note: the glyph, character index and position array can be
- * accessed using the getter method below.
+ * Note; the glyph, character index and position array can be accessed
+ * using the getter method below.
+ *
+ * @stable ICU 2.8
*/
- le_int32 layoutChars(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft, float x,
- float y, LEErrorCode &success);
+ virtual le_int32 layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, float x, float y, LEErrorCode &success);
/**
- * This method returns the number of glyphs in the glyph
- * array. Note that the number of glyphs will be greater than or
- * equal to the number of characters used to create the
- * LayoutEngine.
+ * This method returns the number of glyphs in the glyph array. Note
+ * that the number of glyphs will be greater than or equal to the number
+ * of characters used to create the LayoutEngine.
*
* @return the number of glyphs in the glyph array
*
@@ -412,9 +371,9 @@
le_int32 getGlyphCount() const;
/**
- * This method copies the glyph array into a caller supplied
- * array. The caller must ensure that the array is large enough
- * to hold all the glyphs.
+ * This method copies the glyph array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold all
+ * the glyphs.
*
* @param glyphs - the destiniation glyph array
* @param success - set to an error code if the operation fails
@@ -424,10 +383,10 @@
void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
/**
- * This method copies the glyph array into a caller supplied
- * array, ORing in extra bits. (This functionality is needed by
- * the JDK, which uses 32 bits pre glyph idex, with the high 16
- * bits encoding the composite font slot number)
+ * This method copies the glyph array into a caller supplied array,
+ * ORing in extra bits. (This functionality is needed by the JDK,
+ * which uses 32 bits pre glyph idex, with the high 16 bits encoding
+ * the composite font slot number)
*
* @param glyphs - the destination (32 bit) glyph array
* @param extraBits - this value will be ORed with each glyph index
@@ -435,13 +394,12 @@
*
* @stable ICU 2.8
*/
- virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits,
- LEErrorCode &success) const;
+ virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
/**
- * This method copies the character index array into a caller
- * supplied array. The caller must ensure that the array is large
- * enough to hold a character index for each glyph.
+ * This method copies the character index array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold a
+ * character index for each glyph.
*
* @param charIndices - the destiniation character index array
* @param success - set to an error code if the operation fails
@@ -451,9 +409,9 @@
void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
/**
- * This method copies the character index array into a caller
- * supplied array. The caller must ensure that the array is large
- * enough to hold a character index for each glyph.
+ * This method copies the character index array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold a
+ * character index for each glyph.
*
* @param charIndices - the destiniation character index array
* @param indexBase - an offset which will be added to each index
@@ -461,14 +419,13 @@
*
* @stable ICU 2.8
*/
- void getCharIndices(le_int32 charIndices[], le_int32 indexBase,
- LEErrorCode &success) const;
+ void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
/**
- * This method copies the position array into a caller supplied
- * array. The caller must ensure that the array is large enough
- * to hold an X and Y position for each glyph, plus an extra X and
- * Y for the advance of the last glyph.
+ * This method copies the position array into a caller supplied array.
+ * The caller must ensure that the array is large enough to hold an
+ * X and Y position for each glyph, plus an extra X and Y for the
+ * advance of the last glyph.
*
* @param positions - the destiniation position array
* @param success - set to an error code if the operation fails
@@ -491,8 +448,7 @@
*
* @stable ICU 2.8
*/
- void getGlyphPosition(le_int32 glyphIndex, float &x, float &y,
- LEErrorCode &success) const;
+ void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
/**
* This method frees the glyph, character index and position arrays
@@ -511,8 +467,7 @@
* @param fontInstance - the font of the text
* @param scriptCode - the script of the text
* @param languageCode - the language of the text
- * @param success - output parameter set to an error code if the
- * operation fails
+ * @param success - output parameter set to an error code if the operation fails
*
* @return a LayoutEngine which can layout text in the given font.
*
@@ -520,17 +475,30 @@
*
* @stable ICU 2.8
*/
- static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
+ static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
/**
* Override of existing call that provides flags to control typography.
* @draft ICU 3.4
*/
- static LayoutEngine *layoutEngineFactory(
- const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode,
- le_int32 typo_flags, LEErrorCode &success);
+ static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typo_flags, LEErrorCode &success);
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/LayoutTables.h b/src/share/native/sun/font/layout/LayoutTables.h
index 7162d02..8528ade 100644
--- a/src/share/native/sun/font/layout/LayoutTables.h
+++ b/src/share/native/sun/font/layout/LayoutTables.h
@@ -32,11 +32,20 @@
#ifndef __LAYOUTTABLES_H
#define __LAYOUTTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
#define ANY_NUMBER 1
typedef le_int16 ByteOffset;
typedef le_int16 WordOffset;
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/LigatureSubstProc.cpp b/src/share/native/sun/font/layout/LigatureSubstProc.cpp
index 7120d0a..ade265d 100644
--- a/src/share/native/sun/font/layout/LigatureSubstProc.cpp
+++ b/src/share/native/sun/font/layout/LigatureSubstProc.cpp
@@ -39,10 +39,14 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
#define ExtendedComplement(m) ((le_int32) (~((le_uint32) (m))))
#define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m))
#define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v))
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor)
+
LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
{
@@ -63,8 +67,7 @@
m = -1;
}
-ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage,
- le_int32 &currGlyph, EntryTableIndex index)
+ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
{
const LigatureSubstitutionStateEntry *entry = &entryTable[index];
ByteOffset newState = SWAPW(entry->newStateOffset);
@@ -135,3 +138,5 @@
void LigatureSubstitutionProcessor::endStateTable()
{
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LigatureSubstProc.h b/src/share/native/sun/font/layout/LigatureSubstProc.h
index 304cdbd..289b555 100644
--- a/src/share/native/sun/font/layout/LigatureSubstProc.h
+++ b/src/share/native/sun/font/layout/LigatureSubstProc.h
@@ -32,12 +32,19 @@
#ifndef __LIGATURESUBSTITUTIONPROCESSOR_H
#define __LIGATURESUBSTITUTIONPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "StateTableProcessor.h"
#include "LigatureSubstitution.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
#define nComponents 16
@@ -54,6 +61,20 @@
LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader);
virtual ~LigatureSubstitutionProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
LigatureSubstitutionProcessor();
@@ -68,6 +89,8 @@
le_int16 m;
const LigatureSubstitutionHeader *ligatureSubstitutionHeader;
+
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp b/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
index dcc03b4..fa12ae9 100644
--- a/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
+++ b/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
*
*/
@@ -37,6 +38,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 LigatureSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
{
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@@ -92,3 +95,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LigatureSubstSubtables.h b/src/share/native/sun/font/layout/LigatureSubstSubtables.h
index bcddf19..c222e9d 100644
--- a/src/share/native/sun/font/layout/LigatureSubstSubtables.h
+++ b/src/share/native/sun/font/layout/LigatureSubstSubtables.h
@@ -32,12 +32,19 @@
#ifndef __LIGATURESUBSTITUTIONSUBTABLES_H
#define __LIGATURESUBSTITUTIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "OpenTypeTables.h"
#include "GlyphSubstitutionTables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct LigatureSetTable
{
le_uint16 ligatureCount;
@@ -59,4 +66,5 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LigatureSubstitution.h b/src/share/native/sun/font/layout/LigatureSubstitution.h
index f204927..6dbcd1e 100644
--- a/src/share/native/sun/font/layout/LigatureSubstitution.h
+++ b/src/share/native/sun/font/layout/LigatureSubstitution.h
@@ -32,12 +32,19 @@
#ifndef __LIGATURESUBSTITUTION_H
#define __LIGATURESUBSTITUTION_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "StateTables.h"
#include "MorphTables.h"
#include "MorphStateTables.h"
+U_NAMESPACE_BEGIN
+
struct LigatureSubstitutionHeader : MorphStateTableHeader
{
ByteOffset ligatureActionTableOffset;
@@ -65,4 +72,5 @@
lafComponentOffsetMask = 0x3FFFFFFF
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LookupProcessor.cpp b/src/share/native/sun/font/layout/LookupProcessor.cpp
index e5e1acf..81e9be7 100644
--- a/src/share/native/sun/font/layout/LookupProcessor.cpp
+++ b/src/share/native/sun/font/layout/LookupProcessor.cpp
@@ -42,6 +42,8 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
const LEFontInstance *fontInstance) const
{
@@ -65,10 +67,9 @@
return 1;
}
-le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage,
- GlyphPositionAdjustments *glyphPositionAdjustments,
- le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEFontInstance *fontInstance) const
+le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
+ le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
+ const LEFontInstance *fontInstance) const
{
le_int32 glyphCount = glyphStorage.getGlyphCount();
@@ -133,8 +134,7 @@
LookupProcessor::LookupProcessor(const char *baseAddress,
Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
- LETag scriptTag, LETag languageTag, const FeatureMap *featureMap,
- le_int32 featureMapCount, le_bool orderFeatures)
+ LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures)
: lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL),
lookupOrderArray(NULL), lookupOrderCount(0)
{
@@ -296,3 +296,5 @@
LE_DELETE_ARRAY(lookupOrderArray);
LE_DELETE_ARRAY(lookupSelectArray);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LookupProcessor.h b/src/share/native/sun/font/layout/LookupProcessor.h
index 86e01c6..5ba598a 100644
--- a/src/share/native/sun/font/layout/LookupProcessor.h
+++ b/src/share/native/sun/font/layout/LookupProcessor.h
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -32,9 +33,18 @@
#ifndef __LOOKUPPROCESSOR_H
#define __LOOKUPPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
+//#include "Lookups.h"
+//#include "Features.h"
+
+U_NAMESPACE_BEGIN
class LEFontInstance;
class LEGlyphStorage;
@@ -46,13 +56,10 @@
struct LookupSubtable;
struct LookupTable;
-class LookupProcessor
-{
+class LookupProcessor : public UMemory {
public:
- le_int32 process(LEGlyphStorage &glyphStorage,
- GlyphPositionAdjustments *glyphPositionAdjustments,
- le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
- const LEFontInstance *fontInstance) const;
+ le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments,
+ le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -64,19 +71,18 @@
virtual ~LookupProcessor();
protected:
- LookupProcessor(const char *baseAddress,
+ LookupProcessor(const char *baseAddress,
Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
- LETag scriptTag, LETag languageTag, const FeatureMap *featureMap,
- le_int32 featureMapCount, le_bool orderFeatures);
+ LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures);
- LookupProcessor();
+ LookupProcessor();
le_int32 selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order);
const LookupListTable *lookupListTable;
const FeatureListTable *featureListTable;
- FeatureMask *lookupSelectArray;
+ FeatureMask *lookupSelectArray;
le_uint16 *lookupOrderArray;
le_uint32 lookupOrderCount;
@@ -87,4 +93,5 @@
LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/LookupTables.cpp b/src/share/native/sun/font/layout/LookupTables.cpp
index 54de9a6..17ed428 100644
--- a/src/share/native/sun/font/layout/LookupTables.cpp
+++ b/src/share/native/sun/font/layout/LookupTables.cpp
@@ -34,6 +34,8 @@
#include "LookupTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
/*
These are the rolled-up versions of the uniform binary search.
Someday, if we need more performance, we can un-roll them.
@@ -104,3 +106,5 @@
return NULL;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/LookupTables.h b/src/share/native/sun/font/layout/LookupTables.h
index 67be72e..d6d424b 100644
--- a/src/share/native/sun/font/layout/LookupTables.h
+++ b/src/share/native/sun/font/layout/LookupTables.h
@@ -32,9 +32,16 @@
#ifndef __LOOKUPTABLES_H
#define __LOOKUPTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
+U_NAMESPACE_BEGIN
+
enum LookupTableFormat
{
ltfSimpleArray = 0,
@@ -104,4 +111,5 @@
LookupValue valueArray[ANY_NUMBER];
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/Lookups.cpp b/src/share/native/sun/font/layout/Lookups.cpp
index aac779e..13c5939 100644
--- a/src/share/native/sun/font/layout/Lookups.cpp
+++ b/src/share/native/sun/font/layout/Lookups.cpp
@@ -35,6 +35,8 @@
#include "CoverageTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const
{
if (lookupTableIndex >= SWAPW(lookupCount)) {
@@ -63,3 +65,5 @@
return coverageTable->getGlyphCoverage(glyphID);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/Lookups.h b/src/share/native/sun/font/layout/Lookups.h
index 8666123..b360c23 100644
--- a/src/share/native/sun/font/layout/Lookups.h
+++ b/src/share/native/sun/font/layout/Lookups.h
@@ -32,9 +32,16 @@
#ifndef __LOOKUPS_H
#define __LOOKUPS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
enum LookupFlags
{
lfBaselineIsLogicalEnd = 0x0001, // The MS spec. calls this flag "RightToLeft" but this name is more accurate
@@ -79,6 +86,5 @@
return getGlyphCoverage(coverageTableOffset, glyphID);
}
-
-
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/MPreFixups.cpp b/src/share/native/sun/font/layout/MPreFixups.cpp
index 3d25888..38a8aa8 100644
--- a/src/share/native/sun/font/layout/MPreFixups.cpp
+++ b/src/share/native/sun/font/layout/MPreFixups.cpp
@@ -33,6 +33,8 @@
#include "LEGlyphStorage.h"
#include "MPreFixups.h"
+U_NAMESPACE_BEGIN
+
struct FixupData
{
le_int32 fBaseIndex;
@@ -92,7 +94,7 @@
for (i = 0; i < mpreCount; i += 1) {
mpreSave[i] = glyphStorage[mpreIndex + i];
- indexSave[i] = glyphStorage.getCharIndex(mpreIndex + i, success);
+ indexSave[i] = glyphStorage.getCharIndex(mpreIndex + i, success); //charIndices[mpreIndex + i];
}
for (i = 0; i < moveCount; i += 1) {
@@ -112,3 +114,5 @@
LE_DELETE_ARRAY(mpreSave);
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MPreFixups.h b/src/share/native/sun/font/layout/MPreFixups.h
index 8f6e585..267ba10 100644
--- a/src/share/native/sun/font/layout/MPreFixups.h
+++ b/src/share/native/sun/font/layout/MPreFixups.h
@@ -32,14 +32,22 @@
#ifndef __MPREFIXUPS_H
#define __MPREFIXUPS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
// Might want to make this a private member...
struct FixupData;
-class MPreFixups {
+class MPreFixups : public UMemory
+{
public:
MPreFixups(le_int32 charCount);
~MPreFixups();
@@ -53,4 +61,7 @@
le_int32 fFixupCount;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/MarkArrays.cpp b/src/share/native/sun/font/layout/MarkArrays.cpp
index bba8887..02833d4 100644
--- a/src/share/native/sun/font/layout/MarkArrays.cpp
+++ b/src/share/native/sun/font/layout/MarkArrays.cpp
@@ -36,6 +36,8 @@
#include "MarkArrays.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance,
LEPoint &anchor) const
{
@@ -58,3 +60,5 @@
return markClass;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MarkArrays.h b/src/share/native/sun/font/layout/MarkArrays.h
index 99c42cb..99c3161 100644
--- a/src/share/native/sun/font/layout/MarkArrays.h
+++ b/src/share/native/sun/font/layout/MarkArrays.h
@@ -32,10 +32,17 @@
#ifndef __MARKARRAYS_H
#define __MARKARRAYS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
struct MarkRecord
{
le_uint16 markClass;
@@ -51,4 +58,7 @@
LEPoint &anchor) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
index 259ab20..f26d338 100644
--- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
+++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
@@ -40,6 +40,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphIterator) const
{
if (glyphIterator->prev()) {
@@ -106,7 +108,6 @@
glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
if (glyphIterator->isRightToLeft()) {
- // dlf flip advance to local coordinate system
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY);
} else {
LEPoint baseAdvance;
@@ -114,9 +115,10 @@
fontInstance->getGlyphAdvance(baseGlyph, pixels);
fontInstance->pixelsToUnits(pixels, baseAdvance);
- // flip advances to local coordinate system
glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY);
}
return 1;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h
index b9309d4..a94e40d 100644
--- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h
+++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h
@@ -32,6 +32,11 @@
#ifndef __MARKTOBASEPOSITIONINGSUBTABLES_H
#define __MARKTOBASEPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "AttachmentPosnSubtables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct MarkToBasePositioningSubtable : AttachmentPositioningSubtable
{
le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -56,4 +63,6 @@
BaseRecord baseRecordArray[ANY_NUMBER];
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
index e67b62f..3a8d12b 100644
--- a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
+++ b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
@@ -39,6 +39,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *glyphIterator) const
{
if (glyphIterator->prev()) {
@@ -117,9 +119,10 @@
fontInstance->getGlyphAdvance(ligatureGlyph, pixels);
fontInstance->pixelsToUnits(pixels, ligatureAdvance);
- glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX,
- anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY);
+ glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY);
}
return 1;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h
index f6cadc8..ef858cf 100644
--- a/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h
+++ b/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h
@@ -32,6 +32,11 @@
#ifndef __MARKTOLIGATUREPOSITIONINGSUBTABLES_H
#define __MARKTOLIGATUREPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "AttachmentPosnSubtables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct MarkToLigaturePositioningSubtable : AttachmentPositioningSubtable
{
le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -62,4 +69,6 @@
Offset ligatureAttachTableOffsetArray[ANY_NUMBER];
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
index 3048d13..71ca5fd 100644
--- a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
+++ b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
@@ -40,6 +40,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIterator) const
{
if (glyphIterator->findMark2Glyph()) {
@@ -88,7 +90,7 @@
const AnchorTable *anchorTable = (const AnchorTable *) ((char *) mark2Array + anchorTableOffset);
LEPoint mark2Anchor, markAdvance, pixels;
- if (anchorTableOffset == 0) { // jb4729
+ if (anchorTableOffset == 0) {
// this seems to mean that the marks don't attach...
return 0;
}
@@ -111,9 +113,10 @@
fontInstance->getGlyphAdvance(mark2Glyph, pixels);
fontInstance->pixelsToUnits(pixels, mark2Advance);
- glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX,
- anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY);
+ glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY);
}
return 1;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h
index f6acff3..ca5d28e 100644
--- a/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h
+++ b/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h
@@ -32,6 +32,11 @@
#ifndef __MARKTOMARKPOSITIONINGSUBTABLES_H
#define __MARKTOMARKPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "AttachmentPosnSubtables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct MarkToMarkPositioningSubtable : AttachmentPositioningSubtable
{
le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -56,4 +63,6 @@
Mark2Record mark2RecordArray[ANY_NUMBER];
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/MirroredCharData.cpp b/src/share/native/sun/font/layout/MirroredCharData.cpp
index 30cdded..dfdd7a3 100644
--- a/src/share/native/sun/font/layout/MirroredCharData.cpp
+++ b/src/share/native/sun/font/layout/MirroredCharData.cpp
@@ -36,6 +36,8 @@
#include "LETypes.h"
#include "DefaultCharMapper.h"
+U_NAMESPACE_BEGIN
+
const LEUnicode32 DefaultCharMapper::mirroredChars[] = {
0x0028, 0x0029, 0x003C, 0x003E, 0x005B, 0x005D, 0x007B, 0x007D,
0x00AB, 0x00BB, 0x2039, 0x203A, 0x2045, 0x2046, 0x207D, 0x207E,
@@ -127,3 +129,5 @@
};
const le_int32 DefaultCharMapper::mirroredCharsCount = 332;
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MorphStateTables.h b/src/share/native/sun/font/layout/MorphStateTables.h
index 8ebe2be..72032cf 100644
--- a/src/share/native/sun/font/layout/MorphStateTables.h
+++ b/src/share/native/sun/font/layout/MorphStateTables.h
@@ -32,14 +32,22 @@
#ifndef __MORPHSTATETABLES_H
#define __MORPHSTATETABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "MorphTables.h"
#include "StateTables.h"
+U_NAMESPACE_BEGIN
+
struct MorphStateTableHeader : MorphSubtableHeader
{
StateTableHeader stHeader;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/MorphTables.cpp b/src/share/native/sun/font/layout/MorphTables.cpp
index 863d2a9..0dce4dd 100644
--- a/src/share/native/sun/font/layout/MorphTables.cpp
+++ b/src/share/native/sun/font/layout/MorphTables.cpp
@@ -42,6 +42,8 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
void MorphTableHeader::process(LEGlyphStorage &glyphStorage) const
{
const ChainHeader *chainHeader = chains;
@@ -114,3 +116,5 @@
delete processor;
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MorphTables.h b/src/share/native/sun/font/layout/MorphTables.h
index 5eb5866..8f3fd20 100644
--- a/src/share/native/sun/font/layout/MorphTables.h
+++ b/src/share/native/sun/font/layout/MorphTables.h
@@ -32,9 +32,16 @@
#ifndef __MORPHTABLES_H
#define __MORPHTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
typedef le_uint32 FeatureFlags;
@@ -98,4 +105,6 @@
void process(LEGlyphStorage &glyphStorage) const;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp b/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp
index c54797c..0a16190 100644
--- a/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp
+++ b/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp
@@ -37,6 +37,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
{
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@@ -106,3 +108,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/MultipleSubstSubtables.h b/src/share/native/sun/font/layout/MultipleSubstSubtables.h
index 4546271..8aeceb8 100644
--- a/src/share/native/sun/font/layout/MultipleSubstSubtables.h
+++ b/src/share/native/sun/font/layout/MultipleSubstSubtables.h
@@ -32,12 +32,19 @@
#ifndef __MULTIPLESUBSTITUTIONSUBTABLES_H
#define __MULTIPLESUBSTITUTIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "OpenTypeTables.h"
#include "GlyphSubstitutionTables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct SequenceTable
{
le_uint16 glyphCount;
@@ -52,4 +59,5 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/NonContextualGlyphSubst.h b/src/share/native/sun/font/layout/NonContextualGlyphSubst.h
index 0f5b0f6..c59686c 100644
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubst.h
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubst.h
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
*
*/
@@ -32,14 +33,23 @@
#ifndef __NONCONTEXTUALGLYPHSUBSTITUTION_H
#define __NONCONTEXTUALGLYPHSUBSTITUTION_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
#include "LookupTables.h"
#include "MorphTables.h"
+U_NAMESPACE_BEGIN
+
struct NonContextualGlyphSubstitutionHeader : MorphSubtableHeader
{
LookupTable table;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp
index 0d748b1..87c9134 100644
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp
@@ -41,6 +41,8 @@
#include "TrimmedArrayProcessor.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor()
{
}
@@ -79,3 +81,5 @@
return NULL;
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h
index b7ea92e..6aa597e 100644
--- a/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h
+++ b/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h
@@ -32,11 +32,18 @@
#ifndef __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
#define __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class NonContextualGlyphSubstitutionProcessor : public SubtableProcessor
@@ -57,4 +64,5 @@
NonContextualGlyphSubstitutionProcessor &operator=(const NonContextualGlyphSubstitutionProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp
index 40ea74c..1835fe5 100644
--- a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp
@@ -47,6 +47,10 @@
#include "GDEFMarkFilter.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OpenTypeLayoutEngine)
+
#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
#define ligaFeatureTag LE_LIGA_FEATURE_TAG
#define cligFeatureTag LE_CLIG_FEATURE_TAG
@@ -78,7 +82,7 @@
{ccmpFeatureTag, ccmpFeatureMask},
{ligaFeatureTag, ligaFeatureMask},
{cligFeatureTag, cligFeatureMask},
- {kernFeatureTag, kernFeatureMask},
+ {kernFeatureTag, kernFeatureMask},
{paltFeatureTag, paltFeatureMask},
{markFeatureTag, markFeatureMask},
{mkmkFeatureTag, mkmkFeatureMask}
@@ -86,19 +90,15 @@
static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap);
-OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags,
- const GlyphSubstitutionTableHeader *gsubTable)
- : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
- fFeatureMask(minimalFeatures), fFeatureMap(featureMap),
- fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
- fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL),
- fSubstitutionFilter(NULL)
+OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable)
+ : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fFeatureMask(minimalFeatures),
+ fFeatureMap(featureMap), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
+ fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
{
static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG;
static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG;
- const GlyphPositioningTableHeader *gposTable =
- (const GlyphPositioningTableHeader *) getFontTable(gposTableTag);
+ const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag);
// todo: switch to more flags and bitfield rather than list of feature tags?
switch (typoFlags) {
@@ -127,11 +127,10 @@
LayoutEngine::reset();
}
-OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
- : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags),
- fFeatureOrder(FALSE), fGSUBTable(NULL), fGDEFTable(NULL),
- fGPOSTable(NULL), fSubstitutionFilter(NULL)
+OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags)
+ : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fFeatureOrder(FALSE),
+ fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
{
setScriptAndLanguageTags();
}
@@ -165,9 +164,8 @@
fLangSysTag = getLangSysTag(fLanguageCode);
}
-le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[],
- le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
- LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -178,8 +176,7 @@
return 0;
}
- le_int32 outCharCount = LayoutEngine::characterProcessing(chars, offset, count,
- max, rightToLeft, outChars, glyphStorage, success);
+ le_int32 outCharCount = LayoutEngine::characterProcessing(chars, offset, count, max, rightToLeft, outChars, glyphStorage, success);
if (LE_FAILURE(success)) {
return 0;
@@ -197,16 +194,14 @@
// Input: characters, tags
// Output: glyphs, char indices
-le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
- offset >= max || offset + count > max) {
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -218,16 +213,14 @@
}
if (fGSUBTable != NULL) {
- count = fGSUBTable->process(glyphStorage, rightToLeft,
- fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
- fFeatureMap, fFeatureMapCount, fFeatureOrder);
+ count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter,
+ fFeatureMap, fFeatureMapCount, fFeatureOrder);
}
return count;
}
-le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
@@ -241,9 +234,7 @@
return glyphStorage.getGlyphCount();
}
-le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage,
- LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
LEUnicode *outChars = NULL;
LEGlyphStorage fakeGlyphStorage;
@@ -253,25 +244,19 @@
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
- offset >= max || offset + count > max) {
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
- outCharCount = characterProcessing(chars, offset, count, max, rightToLeft,
- outChars, fakeGlyphStorage, success);
+ outCharCount = characterProcessing(chars, offset, count, max, rightToLeft, outChars, fakeGlyphStorage, success);
if (outChars != NULL) {
- fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount,
- rightToLeft, fakeGlyphStorage, success);
- // FIXME: a subclass may have allocated this, in which case
- // this delete might not work...
- LE_DELETE_ARRAY(outChars);
+ fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success);
+ LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work...
//adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount);
} else {
- fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft,
- fakeGlyphStorage, success);
+ fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success);
//adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount);
}
@@ -281,8 +266,8 @@
}
// apply GPOS table, if any
-void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success)
+void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return;
@@ -318,8 +303,8 @@
}
#endif
- fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag,
- fGDEFTable, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder);
+ fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, fGDEFTable, fFontInstance,
+ fFeatureMap, fFeatureMapCount, fFeatureOrder);
float xAdjust = 0, yAdjust = 0;
@@ -354,4 +339,12 @@
delete adjustments;
}
+
+#if 0
+ // Don't know why this is here...
+ LE_DELETE_ARRAY(fFeatureTags);
+ fFeatureTags = NULL;
+#endif
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h
index b0020cd..55092e7 100644
--- a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h
+++ b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h
@@ -23,9 +23,7 @@
*
*/
-
/*
- *
* (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
*
*/
@@ -42,6 +40,8 @@
#include "GlyphDefinitionTables.h"
#include "GlyphPositioningTables.h"
+U_NAMESPACE_BEGIN
+
/**
* OpenTypeLayoutEngine implements complex text layout for OpenType fonts - that is
* fonts which have GSUB and GPOS tables associated with them. In order to do this,
@@ -87,7 +87,7 @@
* @internal
*/
OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
- le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable);
/**
* This constructor is used when the font requires a "canned" GSUB table which can't be known
@@ -95,11 +95,12 @@
*
* @param fontInstance - the font
* @param scriptCode - the script
- * @param languageCode - the language
+ * @param langaugeCode - the language
*
* @internal
*/
- OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
+ OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -132,6 +133,20 @@
*/
static LETag getLangSysTag(le_int32 languageCode);
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
/**
@@ -254,9 +269,8 @@
*
* @internal
*/
- virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
- LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
+ LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method does character to glyph mapping, and applies the GSUB table. The
@@ -287,9 +301,8 @@
*
* @internal
*/
- virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+ LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method does any processing necessary to convert "fake"
@@ -316,8 +329,7 @@
*
* @internal
*/
- virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage,
- LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 glyphPostProcessing(LEGlyphStorage &tempGlyphStorage, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method applies the characterProcessing, glyphProcessing and glyphPostProcessing
@@ -341,8 +353,7 @@
*
* @internal
*/
- virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count,
- le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method uses the GPOS table, if there is one, to adjust the glyph positions.
@@ -359,8 +370,7 @@
*
* @internal
*/
- virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count,
- le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+ virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
/**
* This method frees the feature tag array so that the
@@ -372,4 +382,6 @@
virtual void reset();
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/OpenTypeTables.h b/src/share/native/sun/font/layout/OpenTypeTables.h
index dec5c64..1428633 100644
--- a/src/share/native/sun/font/layout/OpenTypeTables.h
+++ b/src/share/native/sun/font/layout/OpenTypeTables.h
@@ -32,8 +32,15 @@
#ifndef __OPENTYPETABLES_H
#define __OPENTYPETABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
#define ANY_NUMBER 1
typedef le_uint16 Offset;
@@ -62,4 +69,5 @@
FeatureMask mask;
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/OpenTypeUtilities.cpp b/src/share/native/sun/font/layout/OpenTypeUtilities.cpp
index 56491da..a87eb0a 100644
--- a/src/share/native/sun/font/layout/OpenTypeUtilities.cpp
+++ b/src/share/native/sun/font/layout/OpenTypeUtilities.cpp
@@ -34,6 +34,8 @@
#include "OpenTypeUtilities.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
//
// Finds the high bit by binary searching
// through the bits in n.
@@ -192,3 +194,7 @@
array[i + 1] = v;
}
}
+
+
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/OpenTypeUtilities.h b/src/share/native/sun/font/layout/OpenTypeUtilities.h
index 8c8f535..2154da9 100644
--- a/src/share/native/sun/font/layout/OpenTypeUtilities.h
+++ b/src/share/native/sun/font/layout/OpenTypeUtilities.h
@@ -32,10 +32,17 @@
#ifndef __OPENTYPEUTILITIES_H
#define __OPENTYPEUTILITIES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
-class OpenTypeUtilities {
+U_NAMESPACE_BEGIN
+
+class OpenTypeUtilities /* not : public UObject because all methods are static */ {
public:
static le_int8 highBit(le_int32 value);
static Offset getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount);
@@ -48,4 +55,5 @@
OpenTypeUtilities() {} // private - forbid instantiation
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/PairPositioningSubtables.cpp b/src/share/native/sun/font/layout/PairPositioningSubtables.cpp
index 18cefc4..435f918 100644
--- a/src/share/native/sun/font/layout/PairPositioningSubtables.cpp
+++ b/src/share/native/sun/font/layout/PairPositioningSubtables.cpp
@@ -39,6 +39,8 @@
#include "OpenTypeUtilities.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 PairPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
{
switch(SWAPW(subtableFormat))
@@ -82,8 +84,7 @@
const PairValueRecord *pairValueRecord = NULL;
if (pairValueCount != 0) {
- pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph),
- pairSetTable->pairValueRecordArray, pairValueCount, recordSize);
+ pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph), pairSetTable->pairValueRecordArray, pairValueCount, recordSize);
}
if (pairValueRecord == NULL) {
@@ -91,8 +92,7 @@
}
if (valueFormat1 != 0) {
- pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this,
- tempIterator, fontInstance);
+ pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance);
}
if (valueFormat2 != 0) {
@@ -171,3 +171,5 @@
return NULL;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/PairPositioningSubtables.h b/src/share/native/sun/font/layout/PairPositioningSubtables.h
index b3ae1bc..76cb564 100644
--- a/src/share/native/sun/font/layout/PairPositioningSubtables.h
+++ b/src/share/native/sun/font/layout/PairPositioningSubtables.h
@@ -32,6 +32,11 @@
#ifndef __PAIRPOSITIONINGSUBTABLES_H
#define __PAIRPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "ValueRecords.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
// NOTE: ValueRecord has a variable size
struct PairValueRecord
{
@@ -96,4 +103,7 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/ScriptAndLanguage.cpp b/src/share/native/sun/font/layout/ScriptAndLanguage.cpp
index 87bc205..5815397 100644
--- a/src/share/native/sun/font/layout/ScriptAndLanguage.cpp
+++ b/src/share/native/sun/font/layout/ScriptAndLanguage.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
*
*/
@@ -35,6 +36,8 @@
#include "ScriptAndLanguage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
const LangSysTable *ScriptTable::findLanguage(LETag languageTag, le_bool exactMatch) const
{
le_uint16 count = SWAPW(langSysCount);
@@ -79,3 +82,5 @@
return scriptTable->findLanguage(languageTag, exactMatch);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ScriptAndLanguage.h b/src/share/native/sun/font/layout/ScriptAndLanguage.h
index 60b55f4..b910244 100644
--- a/src/share/native/sun/font/layout/ScriptAndLanguage.h
+++ b/src/share/native/sun/font/layout/ScriptAndLanguage.h
@@ -32,9 +32,16 @@
#ifndef __SCRIPTANDLANGUAGE_H
#define __SCRIPTANDLANGUAGE_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
typedef TagAndOffsetRecord LangSysRecord;
struct LangSysTable
@@ -65,4 +72,6 @@
const LangSysTable *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp b/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp
index 305e6f0..c5afc00 100644
--- a/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp
+++ b/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp
@@ -35,6 +35,8 @@
#include "ScriptAndLanguageTags.h"
#include "OpenTypeLayoutEngine.h"
+U_NAMESPACE_BEGIN
+
const LETag OpenTypeLayoutEngine::scriptTags[] = {
zyyyScriptTag, /* 'zyyy' (COMMON) */
qaaiScriptTag, /* 'qaai' (INHERITED) */
@@ -125,3 +127,5 @@
zhsLanguageTag, /* 'ZHS' (Chinese (Simplified)) */
zhtLanguageTag /* 'ZHT' (Chinese (Traditional)) */
};
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ScriptAndLanguageTags.h b/src/share/native/sun/font/layout/ScriptAndLanguageTags.h
index 5422b80..0dc50cc 100644
--- a/src/share/native/sun/font/layout/ScriptAndLanguageTags.h
+++ b/src/share/native/sun/font/layout/ScriptAndLanguageTags.h
@@ -36,6 +36,13 @@
#include "LETypes.h"
+U_NAMESPACE_BEGIN
+
+/**
+ * \file
+ * \internal
+ */
+
const LETag zyyyScriptTag = 0x7A797979; /* 'zyyy' (COMMON) */
const LETag qaaiScriptTag = 0x71616169; /* 'qaai' (INHERITED) */
const LETag arabScriptTag = 0x61726162; /* 'arab' (ARABIC) */
@@ -126,4 +133,6 @@
const LETag zhsLanguageTag = 0x5A485320; /* 'ZHS' (Chinese (Simplified)) */
const LETag zhtLanguageTag = 0x5A485420; /* 'ZHT' (Chinese (Traditional)) */
+
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp b/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
index b5bc0b2..2532229 100644
--- a/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
@@ -38,6 +38,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentArrayProcessor)
+
SegmentArrayProcessor::SegmentArrayProcessor()
{
}
@@ -77,3 +81,5 @@
}
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SegmentArrayProcessor.h b/src/share/native/sun/font/layout/SegmentArrayProcessor.h
index f6e3177..042d447 100644
--- a/src/share/native/sun/font/layout/SegmentArrayProcessor.h
+++ b/src/share/native/sun/font/layout/SegmentArrayProcessor.h
@@ -32,12 +32,19 @@
#ifndef __SEGMENTARRAYPROCESSOR_H
#define __SEGMENTARRAYPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class SegmentArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
virtual ~SegmentArrayProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
SegmentArrayProcessor();
protected:
const SegmentArrayLookupTable *segmentArrayLookupTable;
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp b/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
index 310b872..ffd5315 100644
--- a/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
@@ -38,6 +38,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentSingleProcessor)
+
SegmentSingleProcessor::SegmentSingleProcessor()
{
}
@@ -71,3 +75,5 @@
}
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SegmentSingleProcessor.h b/src/share/native/sun/font/layout/SegmentSingleProcessor.h
index bbc95f1..17507c7 100644
--- a/src/share/native/sun/font/layout/SegmentSingleProcessor.h
+++ b/src/share/native/sun/font/layout/SegmentSingleProcessor.h
@@ -32,12 +32,19 @@
#ifndef __SEGMENTSINGLEPROCESSOR_H
#define __SEGMENTSINGLEPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class SegmentSingleProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
virtual ~SegmentSingleProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
SegmentSingleProcessor();
protected:
const SegmentSingleLookupTable *segmentSingleLookupTable;
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ShapingTypeData.cpp b/src/share/native/sun/font/layout/ShapingTypeData.cpp
index 0fd5bcd..d2efc38 100644
--- a/src/share/native/sun/font/layout/ShapingTypeData.cpp
+++ b/src/share/native/sun/font/layout/ShapingTypeData.cpp
@@ -36,6 +36,8 @@
#include "LETypes.h"
#include "ArabicShaping.h"
+U_NAMESPACE_BEGIN
+
const le_uint8 ArabicShaping::shapingTypeTable[] = {
0x00, 0x02, 0x00, 0xAD, 0x00, 0xAD, 0x00, 0xAD, 0x00, 0x05, 0x03, 0x00, 0x03, 0x6F, 0x00, 0x05,
0x04, 0x83, 0x04, 0x86, 0x00, 0x05, 0x04, 0x88, 0x04, 0x89, 0x00, 0x05, 0x05, 0x91, 0x05, 0xB9,
@@ -104,3 +106,5 @@
0xFE, 0x20, 0xFE, 0x23, 0x00, 0x05, 0xFE, 0xFF, 0xFE, 0xFF, 0x00, 0x05, 0xFF, 0xF9, 0xFF, 0xFB,
0x00, 0x05
};
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp b/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
index 8ba0fb0..2bf5eec 100644
--- a/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
@@ -38,6 +38,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor)
+
SimpleArrayProcessor::SimpleArrayProcessor()
{
}
@@ -68,3 +72,5 @@
}
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SimpleArrayProcessor.h b/src/share/native/sun/font/layout/SimpleArrayProcessor.h
index 6b387fe..d8e8de6 100644
--- a/src/share/native/sun/font/layout/SimpleArrayProcessor.h
+++ b/src/share/native/sun/font/layout/SimpleArrayProcessor.h
@@ -32,12 +32,19 @@
#ifndef __SIMPLEARRAYPROCESSOR_H
#define __SIMPLEARRAYPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class SimpleArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,28 @@
virtual ~SimpleArrayProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
SimpleArrayProcessor();
protected:
const SimpleArrayLookupTable *simpleArrayLookupTable;
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp b/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp
index 7716253..6411d40 100644
--- a/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp
+++ b/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp
@@ -38,6 +38,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
{
switch(SWAPW(subtableFormat))
@@ -84,11 +86,12 @@
le_int16 coverageIndex = (le_int16) getGlyphCoverage(glyph);
if (coverageIndex >= 0) {
- valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this,
- *glyphIterator, fontInstance);
+ valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance);
return 1;
}
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SinglePositioningSubtables.h b/src/share/native/sun/font/layout/SinglePositioningSubtables.h
index 10f8fe6..9a9338f 100644
--- a/src/share/native/sun/font/layout/SinglePositioningSubtables.h
+++ b/src/share/native/sun/font/layout/SinglePositioningSubtables.h
@@ -32,6 +32,11 @@
#ifndef __SINGLEPOSITIONINGSUBTABLES_H
#define __SINGLEPOSITIONINGSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "ValueRecords.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct SinglePositioningSubtable : GlyphPositioningSubtable
{
le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
@@ -61,4 +68,7 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp
index d62c8cf..44dae13 100644
--- a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp
+++ b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp
@@ -37,6 +37,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
{
switch(SWAPW(subtableFormat))
@@ -98,3 +100,5 @@
return 0;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h
index 581e5b3..bb1886c 100644
--- a/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h
+++ b/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h
@@ -32,12 +32,19 @@
#ifndef __SINGLESUBSTITUTIONSUBTABLES_H
#define __SINGLESUBSTITUTIONSUBTABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "OpenTypeTables.h"
#include "GlyphSubstitutionTables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
struct SingleSubstitutionSubtable : GlyphSubstitutionSubtable
{
le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
@@ -58,4 +65,7 @@
le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const;
};
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/SingleTableProcessor.cpp b/src/share/native/sun/font/layout/SingleTableProcessor.cpp
index d5254cc..a232468 100644
--- a/src/share/native/sun/font/layout/SingleTableProcessor.cpp
+++ b/src/share/native/sun/font/layout/SingleTableProcessor.cpp
@@ -38,6 +38,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SingleTableProcessor)
+
SingleTableProcessor::SingleTableProcessor()
{
}
@@ -68,3 +72,5 @@
}
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SingleTableProcessor.h b/src/share/native/sun/font/layout/SingleTableProcessor.h
index 6afb056..f9ce6fe 100644
--- a/src/share/native/sun/font/layout/SingleTableProcessor.h
+++ b/src/share/native/sun/font/layout/SingleTableProcessor.h
@@ -32,12 +32,19 @@
#ifndef __SINGLETABLEPROCESSOR_H
#define __SINGLETABLEPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class SingleTableProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,11 +56,27 @@
virtual ~SingleTableProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
SingleTableProcessor();
protected:
const SingleTableLookupTable *singleTableLookupTable;
+
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/StateTableProcessor.cpp b/src/share/native/sun/font/layout/StateTableProcessor.cpp
index a3898df..b7589ef 100644
--- a/src/share/native/sun/font/layout/StateTableProcessor.cpp
+++ b/src/share/native/sun/font/layout/StateTableProcessor.cpp
@@ -38,6 +38,8 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
StateTableProcessor::StateTableProcessor()
{
}
@@ -96,3 +98,5 @@
endStateTable();
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/StateTableProcessor.h b/src/share/native/sun/font/layout/StateTableProcessor.h
index 09660c8..9ace8d0 100644
--- a/src/share/native/sun/font/layout/StateTableProcessor.h
+++ b/src/share/native/sun/font/layout/StateTableProcessor.h
@@ -32,11 +32,18 @@
#ifndef __STATETABLEPROCESSOR_H
#define __STATETABLEPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "MorphStateTables.h"
#include "SubtableProcessor.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class StateTableProcessor : public SubtableProcessor
@@ -72,4 +79,5 @@
StateTableProcessor &operator=(const StateTableProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
diff --git a/src/share/native/sun/font/layout/StateTables.h b/src/share/native/sun/font/layout/StateTables.h
index 0854ad2..ee99097 100644
--- a/src/share/native/sun/font/layout/StateTables.h
+++ b/src/share/native/sun/font/layout/StateTables.h
@@ -32,9 +32,16 @@
#ifndef __STATETABLES_H
#define __STATETABLES_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LayoutTables.h"
+U_NAMESPACE_BEGIN
+
struct StateTableHeader
{
le_int16 stateSize;
@@ -78,4 +85,6 @@
le_int16 flags;
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/SubstitutionLookups.cpp b/src/share/native/sun/font/layout/SubstitutionLookups.cpp
index 3d2ac15..11a3206 100644
--- a/src/share/native/sun/font/layout/SubstitutionLookups.cpp
+++ b/src/share/native/sun/font/layout/SubstitutionLookups.cpp
@@ -39,6 +39,8 @@
#include "CoverageTables.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
/*
NOTE: This could be optimized somewhat by keeping track
of the previous sequenceIndex in the loop and doing next()
@@ -65,3 +67,5 @@
lookupProcessor->applySingleLookup(lookupListIndex, &tempIterator, fontInstance);
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SubstitutionLookups.h b/src/share/native/sun/font/layout/SubstitutionLookups.h
index 40947c4..6724b73 100644
--- a/src/share/native/sun/font/layout/SubstitutionLookups.h
+++ b/src/share/native/sun/font/layout/SubstitutionLookups.h
@@ -32,6 +32,11 @@
#ifndef __SUBSTITUTIONLOOKUPS_H
#define __SUBSTITUTIONLOOKUPS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
@@ -39,6 +44,8 @@
#include "GlyphIterator.h"
#include "LookupProcessor.h"
+U_NAMESPACE_BEGIN
+
struct SubstitutionLookupRecord
{
le_uint16 sequenceIndex;
@@ -56,4 +63,6 @@
le_int32 position);
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/SubtableProcessor.cpp b/src/share/native/sun/font/layout/SubtableProcessor.cpp
index 6af7684..c76e794 100644
--- a/src/share/native/sun/font/layout/SubtableProcessor.cpp
+++ b/src/share/native/sun/font/layout/SubtableProcessor.cpp
@@ -34,6 +34,8 @@
#include "SubtableProcessor.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
SubtableProcessor::SubtableProcessor()
{
}
@@ -50,3 +52,5 @@
SubtableProcessor::~SubtableProcessor()
{
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/SubtableProcessor.h b/src/share/native/sun/font/layout/SubtableProcessor.h
index f5b84e8..78ce978 100644
--- a/src/share/native/sun/font/layout/SubtableProcessor.h
+++ b/src/share/native/sun/font/layout/SubtableProcessor.h
@@ -32,13 +32,19 @@
#ifndef __SUBTABLEPROCESSOR_H
#define __SUBTABLEPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
-class SubtableProcessor
-{
+class SubtableProcessor : public UMemory {
public:
virtual void process(LEGlyphStorage &glyphStorage) = 0;
virtual ~SubtableProcessor();
@@ -60,4 +66,6 @@
SubtableProcessor &operator=(const SubtableProcessor &other); // forbid copying of this class
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp b/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp
index 5daf0f2..ee9581c 100644
--- a/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp
+++ b/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp
@@ -38,8 +38,11 @@
#include "ThaiShaping.h"
-ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance,
- le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ThaiLayoutEngine)
+
+ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags)
: LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags)
{
fErrorChar = 0x25CC;
@@ -73,16 +76,13 @@
// Output: glyphs, char indices
// Returns: the glyph count
// NOTE: this assumes that ThaiShaping::compose will allocate the outChars array...
-le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
- LEGlyphStorage &glyphStorage, LEErrorCode &success)
+le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
- if (chars == NULL || offset < 0 || count < 0 || max < 0 ||
- offset >= max || offset + count > max) {
+ if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
success = LE_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@@ -107,8 +107,7 @@
return 0;
}
- glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar,
- outChars, glyphStorage);
+ glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar, outChars, glyphStorage);
mapCharsToGlyphs(outChars, 0, glyphCount, FALSE, FALSE, glyphStorage, success);
LE_DELETE_ARRAY(outChars);
@@ -116,3 +115,5 @@
glyphStorage.adoptGlyphCount(glyphCount);
return glyphCount;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ThaiLayoutEngine.h b/src/share/native/sun/font/layout/ThaiLayoutEngine.h
index 5e636f2..e64bc28 100644
--- a/src/share/native/sun/font/layout/ThaiLayoutEngine.h
+++ b/src/share/native/sun/font/layout/ThaiLayoutEngine.h
@@ -39,6 +39,8 @@
#include "ThaiShaping.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
/**
@@ -66,8 +68,7 @@
*
* @internal
*/
- ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode,
- le_int32 languageCode, le_int32 typoFlags);
+ ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
/**
* The destructor, virtual for correct polymorphic invocation.
@@ -76,6 +77,20 @@
*/
virtual ~ThaiLayoutEngine();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
protected:
/**
* A small integer indicating which Thai encoding
@@ -109,10 +124,8 @@
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
- * @param rightToLeft - <code>TRUE</code> if the text is in a
- * right to left directional run
- * @param glyphStorage - the glyph storage object. The glyph and
- * char index arrays will be set.
+ * @param rightToLeft - <code>TRUE</code> if the text is in a right to left directional run
+ * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set.
*
* Output parameters:
* @param success - set to an error code if the operation fails
@@ -123,10 +136,11 @@
*
* @internal
*/
- virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset,
- le_int32 count, le_int32 max, le_bool rightToLeft,
+ virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
LEGlyphStorage &glyphStorage, LEErrorCode &success);
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ThaiShaping.cpp b/src/share/native/sun/font/layout/ThaiShaping.cpp
index f5a476a..d04230c 100644
--- a/src/share/native/sun/font/layout/ThaiShaping.cpp
+++ b/src/share/native/sun/font/layout/ThaiShaping.cpp
@@ -35,6 +35,8 @@
#include "LEGlyphStorage.h"
#include "ThaiShaping.h"
+U_NAMESPACE_BEGIN
+
enum {
CH_SPACE = 0x0020,
CH_YAMAKKAN = 0x0E4E,
@@ -248,9 +250,8 @@
return transition.nextState;
}
-le_uint8 ThaiShaping::getNextState(LEUnicode ch, le_uint8 prevState, le_int32 inputIndex,
- le_uint8 glyphSet, LEUnicode errorChar,
- le_uint8 &charClass, LEUnicode *output, LEGlyphStorage &glyphStorage, le_int32 &outputIndex)
+le_uint8 ThaiShaping::getNextState(LEUnicode ch, le_uint8 prevState, le_int32 inputIndex, le_uint8 glyphSet, LEUnicode errorChar,
+ le_uint8 &charClass, LEUnicode *output, LEGlyphStorage &glyphStorage, le_int32 &outputIndex)
{
StateTransition transition;
@@ -327,3 +328,5 @@
return outputIndex;
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ThaiShaping.h b/src/share/native/sun/font/layout/ThaiShaping.h
index ff7f8ef..a17eb35 100644
--- a/src/share/native/sun/font/layout/ThaiShaping.h
+++ b/src/share/native/sun/font/layout/ThaiShaping.h
@@ -32,13 +32,20 @@
#ifndef __THAISHAPING_H
#define __THAISHAPING_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEGlyphFilter.h"
#include "OpenTypeTables.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
-class ThaiShaping {
+class ThaiShaping /* not : public UObject because all methods are static */ {
public:
enum {
@@ -120,4 +127,7 @@
return thaiStateTable[state][currClass];
}
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/layout/ThaiStateTables.cpp b/src/share/native/sun/font/layout/ThaiStateTables.cpp
index 33f990b..dd620f4 100644
--- a/src/share/native/sun/font/layout/ThaiStateTables.cpp
+++ b/src/share/native/sun/font/layout/ThaiStateTables.cpp
@@ -25,6 +25,7 @@
/*
*
+ *
* (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved
*
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
@@ -35,6 +36,8 @@
#include "LETypes.h"
#include "ThaiShaping.h"
+U_NAMESPACE_BEGIN
+
const le_uint8 ThaiShaping::classTable[] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
// -------------------------------------------------------------------------------
@@ -105,3 +108,5 @@
/*50*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {51, tC}, { 0, tR}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
/*51*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}}
};
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp b/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp
index 203c7ab..e5e6919 100644
--- a/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp
@@ -38,6 +38,10 @@
#include "LEGlyphStorage.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TrimmedArrayProcessor)
+
TrimmedArrayProcessor::TrimmedArrayProcessor()
{
}
@@ -72,3 +76,5 @@
}
}
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/TrimmedArrayProcessor.h b/src/share/native/sun/font/layout/TrimmedArrayProcessor.h
index bda94e0..2fe27fc 100644
--- a/src/share/native/sun/font/layout/TrimmedArrayProcessor.h
+++ b/src/share/native/sun/font/layout/TrimmedArrayProcessor.h
@@ -32,12 +32,19 @@
#ifndef __TRIMMEDARRAYPROCESSOR_H
#define __TRIMMEDARRAYPROCESSOR_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "MorphTables.h"
#include "SubtableProcessor.h"
#include "NonContextualGlyphSubst.h"
#include "NonContextualGlyphSubstProc.h"
+U_NAMESPACE_BEGIN
+
class LEGlyphStorage;
class TrimmedArrayProcessor : public NonContextualGlyphSubstitutionProcessor
@@ -49,6 +56,20 @@
virtual ~TrimmedArrayProcessor();
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.8
+ */
+ virtual UClassID getDynamicClassID() const;
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.8
+ */
+ static UClassID getStaticClassID();
+
private:
TrimmedArrayProcessor();
@@ -56,6 +77,9 @@
TTGlyphID firstGlyph;
TTGlyphID lastGlyph;
const TrimmedArrayLookupTable *trimmedArrayLookupTable;
+
};
+U_NAMESPACE_END
#endif
+
diff --git a/src/share/native/sun/font/layout/ValueRecords.cpp b/src/share/native/sun/font/layout/ValueRecords.cpp
index e592be0..8fb4d87 100644
--- a/src/share/native/sun/font/layout/ValueRecords.cpp
+++ b/src/share/native/sun/font/layout/ValueRecords.cpp
@@ -37,6 +37,8 @@
#include "GlyphIterator.h"
#include "LESwaps.h"
+U_NAMESPACE_BEGIN
+
#define Nibble(value, nibble) ((value >> (nibble * 4)) & 0xF)
#define NibbleBits(value, nibble) (bitsInNibble[Nibble(value, nibble)])
@@ -161,8 +163,8 @@
xPlacementAdjustment, yPlacementAdjustment, xAdvanceAdjustment, yAdvanceAdjustment);
}
-void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base,
- GlyphIterator &glyphIterator, const LEFontInstance *fontInstance) const
+void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator,
+ const LEFontInstance *fontInstance) const
{
float xPlacementAdjustment = 0;
float yPlacementAdjustment = 0;
@@ -323,3 +325,5 @@
return getFieldCount(valueFormat & beforeMasks[field]);
}
+
+U_NAMESPACE_END
diff --git a/src/share/native/sun/font/layout/ValueRecords.h b/src/share/native/sun/font/layout/ValueRecords.h
index 599b10a..e390dfb 100644
--- a/src/share/native/sun/font/layout/ValueRecords.h
+++ b/src/share/native/sun/font/layout/ValueRecords.h
@@ -32,11 +32,18 @@
#ifndef __VALUERECORDS_H
#define __VALUERECORDS_H
+/**
+ * \file
+ * \internal
+ */
+
#include "LETypes.h"
#include "LEFontInstance.h"
#include "OpenTypeTables.h"
#include "GlyphIterator.h"
+U_NAMESPACE_BEGIN
+
typedef le_uint16 ValueFormat;
typedef le_int16 ValueRecordField;
@@ -84,5 +91,7 @@
vfbAnyDevice = vfbXPlaDevice + vfbYPlaDevice + vfbXAdvDevice + vfbYAdvDevice
};
-
+U_NAMESPACE_END
#endif
+
+
diff --git a/src/share/native/sun/font/sunFont.c b/src/share/native/sun/font/sunFont.c
index af8aa66..3bd9145 100644
--- a/src/share/native/sun/font/sunFont.c
+++ b/src/share/native/sun/font/sunFont.c
@@ -71,41 +71,14 @@
void initLCDGammaTables();
-/*
- * Class: sun_font_FontManager
- * Method: getPlatformFontVar
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL
-Java_sun_font_FontManager_getPlatformFontVar(JNIEnv *env, jclass cl) {
- char *c = getenv("JAVA2D_USEPLATFORMFONT");
- if (c) {
- return JNI_TRUE;
- } else {
- return JNI_FALSE;
- }
-}
-
/* placeholder for extern variable */
FontManagerNativeIDs sunFontIDs;
JNIEXPORT void JNICALL
-Java_sun_font_FontManager_initIDs
+Java_sun_font_SunFontManager_initIDs
(JNIEnv *env, jclass cls) {
- jclass tmpClass = (*env)->FindClass(env, "java/awt/Font");
-
- sunFontIDs.getFont2DMID =
- (*env)->GetMethodID(env, tmpClass, "getFont2D",
- "()Lsun/font/Font2D;");
- sunFontIDs.font2DHandle =
- (*env)->GetFieldID(env, tmpClass,
- "font2DHandle", "Lsun/font/Font2DHandle;");
-
- sunFontIDs.createdFont =
- (*env)->GetFieldID(env, tmpClass, "createdFont", "Z");
-
- tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont");
+ jclass tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont");
sunFontIDs.ttReadBlockMID =
(*env)->GetMethodID(env, tmpClass, "readBlock",
"(Ljava/nio/ByteBuffer;II)I");
@@ -207,40 +180,6 @@
return sunFontIDs;
}
-JNIEXPORT jobject JNICALL
-Java_sun_font_FontManager_getFont2D(
- JNIEnv *env,
- jclass clsFM,
- jobject javaFont) {
-
- return (*env)->CallObjectMethod(env, javaFont, sunFontIDs.getFont2DMID);
-}
-
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_setFont2D(
- JNIEnv *env,
- jclass clsFM,
- jobject javaFont,
- jobject fontHandle) {
- (*env)->SetObjectField(env, javaFont, sunFontIDs.font2DHandle, fontHandle);
-}
-
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_setCreatedFont(
- JNIEnv *env,
- jclass clsFM,
- jobject javaFont) {
- (*env)->SetBooleanField(env, javaFont, sunFontIDs.createdFont, JNI_TRUE);
-}
-
-JNIEXPORT jboolean JNICALL
-Java_sun_font_FontManager_isCreatedFont(
- JNIEnv *env,
- jclass clsFM,
- jobject javaFont) {
- return (*env)->GetBooleanField(env, javaFont, sunFontIDs.createdFont);
-}
-
/*
* Class: sun_font_StrikeCache
* Method: freeIntPointer
diff --git a/src/share/native/sun/font/sunfontids.h b/src/share/native/sun/font/sunfontids.h
index 8ef15a6..5f06197 100644
--- a/src/share/native/sun/font/sunfontids.h
+++ b/src/share/native/sun/font/sunfontids.h
@@ -34,11 +34,6 @@
typedef struct FontManagerNativeIDs {
- /* java/awt/Font methods & fields */
- jmethodID getFont2DMID;
- jfieldID font2DHandle;
- jfieldID createdFont;
-
/* sun/font/Font2D methods */
jmethodID getMapperMID;
jmethodID getTableBytesMID;
diff --git a/src/share/native/sun/security/ec/ec.h b/src/share/native/sun/security/ec/ec.h
deleted file mode 100644
index d472670..0000000
--- a/src/share/native/sun/security/ec/ec.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Elliptic Curve Cryptography library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef __ec_h_
-#define __ec_h_
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#define EC_DEBUG 0
-#define EC_POINT_FORM_COMPRESSED_Y0 0x02
-#define EC_POINT_FORM_COMPRESSED_Y1 0x03
-#define EC_POINT_FORM_UNCOMPRESSED 0x04
-#define EC_POINT_FORM_HYBRID_Y0 0x06
-#define EC_POINT_FORM_HYBRID_Y1 0x07
-
-#define ANSI_X962_CURVE_OID_TOTAL_LEN 10
-#define SECG_CURVE_OID_TOTAL_LEN 7
-
-#endif /* __ec_h_ */
diff --git a/src/share/native/sun/security/ec/ec2.h b/src/share/native/sun/security/ec/ec2.h
deleted file mode 100644
index c1b2d79..0000000
--- a/src/share/native/sun/security/ec/ec2.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _EC2_H
-#define _EC2_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
-mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py);
-
-/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
-mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py);
-
-/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx,
- * qy). Uses affine coordinates. */
-mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Computes R = P - Q. Uses affine coordinates. */
-mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Computes R = 2P. Uses affine coordinates. */
-mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Validates a point on a GF2m curve. */
-mp_err ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the irreducible that
- * determines the field GF2m. Uses affine coordinates. */
-mp_err ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-#endif
-
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the irreducible that
- * determines the field GF2m. Uses Montgomery projective coordinates. */
-mp_err ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-
-#ifdef ECL_ENABLE_GF2M_PROJ
-/* Converts a point P(px, py) from affine coordinates to projective
- * coordinates R(rx, ry, rz). */
-mp_err ec_GF2m_pt_aff2proj(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, mp_int *rz, const ECGroup *group);
-
-/* Converts a point P(px, py, pz) from projective coordinates to affine
- * coordinates R(rx, ry). */
-mp_err ec_GF2m_pt_proj2aff(const mp_int *px, const mp_int *py,
- const mp_int *pz, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-
-/* Checks if point P(px, py, pz) is at infinity. Uses projective
- * coordinates. */
-mp_err ec_GF2m_pt_is_inf_proj(const mp_int *px, const mp_int *py,
- const mp_int *pz);
-
-/* Sets P(px, py, pz) to be the point at infinity. Uses projective
- * coordinates. */
-mp_err ec_GF2m_pt_set_inf_proj(mp_int *px, mp_int *py, mp_int *pz);
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, qz). Uses projective coordinates. */
-mp_err ec_GF2m_pt_add_proj(const mp_int *px, const mp_int *py,
- const mp_int *pz, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- mp_int *rz, const ECGroup *group);
-
-/* Computes R = 2P. Uses projective coordinates. */
-mp_err ec_GF2m_pt_dbl_proj(const mp_int *px, const mp_int *py,
- const mp_int *pz, mp_int *rx, mp_int *ry,
- mp_int *rz, const ECGroup *group);
-
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GF2m. Uses projective coordinates. */
-mp_err ec_GF2m_pt_mul_proj(const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-#endif
-
-#endif /* _EC2_H */
diff --git a/src/share/native/sun/security/ec/ec2_163.c b/src/share/native/sun/security/ec/ec2_163.c
deleted file mode 100644
index ecdb512..0000000
--- a/src/share/native/sun/security/ec/ec2_163.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 163-bit curve. Assumes reduction
- * polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, z;
-
- if (a != r) {
- MP_CHECKOK(mp_copy(a, r));
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(r) < 6) {
- MP_CHECKOK(s_mp_pad(r, 6));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 6;
-
- /* u[5] only has 6 significant bits */
- z = u[5];
- u[2] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
- z = u[4];
- u[2] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35);
- u[1] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
- z = u[3];
- u[1] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35);
- u[0] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29);
- z = u[2] >> 35; /* z only has 29 significant bits */
- u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z;
- /* clear bits above 163 */
- u[5] = u[4] = u[3] = 0;
- u[2] ^= z << 35;
-#else
- if (MP_USED(r) < 11) {
- MP_CHECKOK(s_mp_pad(r, 11));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 11;
-
- /* u[11] only has 6 significant bits */
- z = u[10];
- u[5] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
- u[4] ^= (z << 29);
- z = u[9];
- u[5] ^= (z >> 28) ^ (z >> 29);
- u[4] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
- u[3] ^= (z << 29);
- z = u[8];
- u[4] ^= (z >> 28) ^ (z >> 29);
- u[3] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
- u[2] ^= (z << 29);
- z = u[7];
- u[3] ^= (z >> 28) ^ (z >> 29);
- u[2] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
- u[1] ^= (z << 29);
- z = u[6];
- u[2] ^= (z >> 28) ^ (z >> 29);
- u[1] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3);
- u[0] ^= (z << 29);
- z = u[5] >> 3; /* z only has 29 significant bits */
- u[1] ^= (z >> 25) ^ (z >> 26);
- u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z;
- /* clear bits above 163 */
- u[11] = u[10] = u[9] = u[8] = u[7] = u[6] = 0;
- u[5] ^= z << 3;
-#endif
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* Fast squaring for polynomials over a 163-bit curve. Assumes reduction
- * polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, *v;
-
- v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(a) < 3) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 6) {
- MP_CHECKOK(s_mp_pad(r, 6));
- }
- MP_USED(r) = 6;
-#else
- if (MP_USED(a) < 6) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 12) {
- MP_CHECKOK(s_mp_pad(r, 12));
- }
- MP_USED(r) = 12;
-#endif
- u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
- u[11] = gf2m_SQR1(v[5]);
- u[10] = gf2m_SQR0(v[5]);
- u[9] = gf2m_SQR1(v[4]);
- u[8] = gf2m_SQR0(v[4]);
- u[7] = gf2m_SQR1(v[3]);
- u[6] = gf2m_SQR0(v[3]);
-#endif
- u[5] = gf2m_SQR1(v[2]);
- u[4] = gf2m_SQR0(v[2]);
- u[3] = gf2m_SQR1(v[1]);
- u[2] = gf2m_SQR0(v[1]);
- u[1] = gf2m_SQR1(v[0]);
- u[0] = gf2m_SQR0(v[0]);
- return ec_GF2m_163_mod(r, r, meth);
-
- CLEANUP:
- return res;
-}
-
-/* Fast multiplication for polynomials over a 163-bit curve. Assumes
- * reduction polynomial with terms {163, 7, 6, 3, 0}. */
-mp_err
-ec_GF2m_163_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a2 = 0, a1 = 0, a0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a5 = 0, a4 = 0, a3 = 0, b5 = 0, b4 = 0, b3 = 0;
- mp_digit rm[6];
-#endif
-
- if (a == b) {
- return ec_GF2m_163_sqr(a, r, meth);
- } else {
- switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 6:
- a5 = MP_DIGIT(a, 5);
- case 5:
- a4 = MP_DIGIT(a, 4);
- case 4:
- a3 = MP_DIGIT(a, 3);
-#endif
- case 3:
- a2 = MP_DIGIT(a, 2);
- case 2:
- a1 = MP_DIGIT(a, 1);
- default:
- a0 = MP_DIGIT(a, 0);
- }
- switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 6:
- b5 = MP_DIGIT(b, 5);
- case 5:
- b4 = MP_DIGIT(b, 4);
- case 4:
- b3 = MP_DIGIT(b, 3);
-#endif
- case 3:
- b2 = MP_DIGIT(b, 2);
- case 2:
- b1 = MP_DIGIT(b, 1);
- default:
- b0 = MP_DIGIT(b, 0);
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- MP_CHECKOK(s_mp_pad(r, 6));
- s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0);
- MP_USED(r) = 6;
- s_mp_clamp(r);
-#else
- MP_CHECKOK(s_mp_pad(r, 12));
- s_bmul_3x3(MP_DIGITS(r) + 6, a5, a4, a3, b5, b4, b3);
- s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0);
- s_bmul_3x3(rm, a5 ^ a2, a4 ^ a1, a3 ^ a0, b5 ^ b2, b4 ^ b1,
- b3 ^ b0);
- rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 11);
- rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 10);
- rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 9);
- rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 8);
- rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 7);
- rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 6);
- MP_DIGIT(r, 8) ^= rm[5];
- MP_DIGIT(r, 7) ^= rm[4];
- MP_DIGIT(r, 6) ^= rm[3];
- MP_DIGIT(r, 5) ^= rm[2];
- MP_DIGIT(r, 4) ^= rm[1];
- MP_DIGIT(r, 3) ^= rm[0];
- MP_USED(r) = 12;
- s_mp_clamp(r);
-#endif
- return ec_GF2m_163_mod(r, r, meth);
- }
-
- CLEANUP:
- return res;
-}
-
-/* Wire in fast field arithmetic for 163-bit curves. */
-mp_err
-ec_group_set_gf2m163(ECGroup *group, ECCurveName name)
-{
- group->meth->field_mod = &ec_GF2m_163_mod;
- group->meth->field_mul = &ec_GF2m_163_mul;
- group->meth->field_sqr = &ec_GF2m_163_sqr;
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ec2_193.c b/src/share/native/sun/security/ec/ec2_193.c
deleted file mode 100644
index f6187d3..0000000
--- a/src/share/native/sun/security/ec/ec2_193.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 193-bit curve. Assumes reduction
- * polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, z;
-
- if (a != r) {
- MP_CHECKOK(mp_copy(a, r));
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(r) < 7) {
- MP_CHECKOK(s_mp_pad(r, 7));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 7;
-
- /* u[6] only has 2 significant bits */
- z = u[6];
- u[3] ^= (z << 14) ^ (z >> 1);
- u[2] ^= (z << 63);
- z = u[5];
- u[3] ^= (z >> 50);
- u[2] ^= (z << 14) ^ (z >> 1);
- u[1] ^= (z << 63);
- z = u[4];
- u[2] ^= (z >> 50);
- u[1] ^= (z << 14) ^ (z >> 1);
- u[0] ^= (z << 63);
- z = u[3] >> 1; /* z only has 63 significant bits */
- u[1] ^= (z >> 49);
- u[0] ^= (z << 15) ^ z;
- /* clear bits above 193 */
- u[6] = u[5] = u[4] = 0;
- u[3] ^= z << 1;
-#else
- if (MP_USED(r) < 13) {
- MP_CHECKOK(s_mp_pad(r, 13));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 13;
-
- /* u[12] only has 2 significant bits */
- z = u[12];
- u[6] ^= (z << 14) ^ (z >> 1);
- u[5] ^= (z << 31);
- z = u[11];
- u[6] ^= (z >> 18);
- u[5] ^= (z << 14) ^ (z >> 1);
- u[4] ^= (z << 31);
- z = u[10];
- u[5] ^= (z >> 18);
- u[4] ^= (z << 14) ^ (z >> 1);
- u[3] ^= (z << 31);
- z = u[9];
- u[4] ^= (z >> 18);
- u[3] ^= (z << 14) ^ (z >> 1);
- u[2] ^= (z << 31);
- z = u[8];
- u[3] ^= (z >> 18);
- u[2] ^= (z << 14) ^ (z >> 1);
- u[1] ^= (z << 31);
- z = u[7];
- u[2] ^= (z >> 18);
- u[1] ^= (z << 14) ^ (z >> 1);
- u[0] ^= (z << 31);
- z = u[6] >> 1; /* z only has 31 significant bits */
- u[1] ^= (z >> 17);
- u[0] ^= (z << 15) ^ z;
- /* clear bits above 193 */
- u[12] = u[11] = u[10] = u[9] = u[8] = u[7] = 0;
- u[6] ^= z << 1;
-#endif
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* Fast squaring for polynomials over a 193-bit curve. Assumes reduction
- * polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, *v;
-
- v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(a) < 4) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 7) {
- MP_CHECKOK(s_mp_pad(r, 7));
- }
- MP_USED(r) = 7;
-#else
- if (MP_USED(a) < 7) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 13) {
- MP_CHECKOK(s_mp_pad(r, 13));
- }
- MP_USED(r) = 13;
-#endif
- u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
- u[12] = gf2m_SQR0(v[6]);
- u[11] = gf2m_SQR1(v[5]);
- u[10] = gf2m_SQR0(v[5]);
- u[9] = gf2m_SQR1(v[4]);
- u[8] = gf2m_SQR0(v[4]);
- u[7] = gf2m_SQR1(v[3]);
-#endif
- u[6] = gf2m_SQR0(v[3]);
- u[5] = gf2m_SQR1(v[2]);
- u[4] = gf2m_SQR0(v[2]);
- u[3] = gf2m_SQR1(v[1]);
- u[2] = gf2m_SQR0(v[1]);
- u[1] = gf2m_SQR1(v[0]);
- u[0] = gf2m_SQR0(v[0]);
- return ec_GF2m_193_mod(r, r, meth);
-
- CLEANUP:
- return res;
-}
-
-/* Fast multiplication for polynomials over a 193-bit curve. Assumes
- * reduction polynomial with terms {193, 15, 0}. */
-mp_err
-ec_GF2m_193_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a6 = 0, a5 = 0, a4 = 0, b6 = 0, b5 = 0, b4 = 0;
- mp_digit rm[8];
-#endif
-
- if (a == b) {
- return ec_GF2m_193_sqr(a, r, meth);
- } else {
- switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 7:
- a6 = MP_DIGIT(a, 6);
- case 6:
- a5 = MP_DIGIT(a, 5);
- case 5:
- a4 = MP_DIGIT(a, 4);
-#endif
- case 4:
- a3 = MP_DIGIT(a, 3);
- case 3:
- a2 = MP_DIGIT(a, 2);
- case 2:
- a1 = MP_DIGIT(a, 1);
- default:
- a0 = MP_DIGIT(a, 0);
- }
- switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 7:
- b6 = MP_DIGIT(b, 6);
- case 6:
- b5 = MP_DIGIT(b, 5);
- case 5:
- b4 = MP_DIGIT(b, 4);
-#endif
- case 4:
- b3 = MP_DIGIT(b, 3);
- case 3:
- b2 = MP_DIGIT(b, 2);
- case 2:
- b1 = MP_DIGIT(b, 1);
- default:
- b0 = MP_DIGIT(b, 0);
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- MP_CHECKOK(s_mp_pad(r, 8));
- s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
- MP_USED(r) = 8;
- s_mp_clamp(r);
-#else
- MP_CHECKOK(s_mp_pad(r, 14));
- s_bmul_3x3(MP_DIGITS(r) + 8, a6, a5, a4, b6, b5, b4);
- s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
- s_bmul_4x4(rm, a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b3, b6 ^ b2, b5 ^ b1,
- b4 ^ b0);
- rm[7] ^= MP_DIGIT(r, 7);
- rm[6] ^= MP_DIGIT(r, 6);
- rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13);
- rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12);
- rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11);
- rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10);
- rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9);
- rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8);
- MP_DIGIT(r, 11) ^= rm[7];
- MP_DIGIT(r, 10) ^= rm[6];
- MP_DIGIT(r, 9) ^= rm[5];
- MP_DIGIT(r, 8) ^= rm[4];
- MP_DIGIT(r, 7) ^= rm[3];
- MP_DIGIT(r, 6) ^= rm[2];
- MP_DIGIT(r, 5) ^= rm[1];
- MP_DIGIT(r, 4) ^= rm[0];
- MP_USED(r) = 14;
- s_mp_clamp(r);
-#endif
- return ec_GF2m_193_mod(r, r, meth);
- }
-
- CLEANUP:
- return res;
-}
-
-/* Wire in fast field arithmetic for 193-bit curves. */
-mp_err
-ec_group_set_gf2m193(ECGroup *group, ECCurveName name)
-{
- group->meth->field_mod = &ec_GF2m_193_mod;
- group->meth->field_mul = &ec_GF2m_193_mul;
- group->meth->field_sqr = &ec_GF2m_193_sqr;
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ec2_233.c b/src/share/native/sun/security/ec/ec2_233.c
deleted file mode 100644
index 2b29c46..0000000
--- a/src/share/native/sun/security/ec/ec2_233.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ec2.h"
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mpi.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast reduction for polynomials over a 233-bit curve. Assumes reduction
- * polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, z;
-
- if (a != r) {
- MP_CHECKOK(mp_copy(a, r));
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(r) < 8) {
- MP_CHECKOK(s_mp_pad(r, 8));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 8;
-
- /* u[7] only has 18 significant bits */
- z = u[7];
- u[4] ^= (z << 33) ^ (z >> 41);
- u[3] ^= (z << 23);
- z = u[6];
- u[4] ^= (z >> 31);
- u[3] ^= (z << 33) ^ (z >> 41);
- u[2] ^= (z << 23);
- z = u[5];
- u[3] ^= (z >> 31);
- u[2] ^= (z << 33) ^ (z >> 41);
- u[1] ^= (z << 23);
- z = u[4];
- u[2] ^= (z >> 31);
- u[1] ^= (z << 33) ^ (z >> 41);
- u[0] ^= (z << 23);
- z = u[3] >> 41; /* z only has 23 significant bits */
- u[1] ^= (z << 10);
- u[0] ^= z;
- /* clear bits above 233 */
- u[7] = u[6] = u[5] = u[4] = 0;
- u[3] ^= z << 41;
-#else
- if (MP_USED(r) < 15) {
- MP_CHECKOK(s_mp_pad(r, 15));
- }
- u = MP_DIGITS(r);
- MP_USED(r) = 15;
-
- /* u[14] only has 18 significant bits */
- z = u[14];
- u[9] ^= (z << 1);
- u[7] ^= (z >> 9);
- u[6] ^= (z << 23);
- z = u[13];
- u[9] ^= (z >> 31);
- u[8] ^= (z << 1);
- u[6] ^= (z >> 9);
- u[5] ^= (z << 23);
- z = u[12];
- u[8] ^= (z >> 31);
- u[7] ^= (z << 1);
- u[5] ^= (z >> 9);
- u[4] ^= (z << 23);
- z = u[11];
- u[7] ^= (z >> 31);
- u[6] ^= (z << 1);
- u[4] ^= (z >> 9);
- u[3] ^= (z << 23);
- z = u[10];
- u[6] ^= (z >> 31);
- u[5] ^= (z << 1);
- u[3] ^= (z >> 9);
- u[2] ^= (z << 23);
- z = u[9];
- u[5] ^= (z >> 31);
- u[4] ^= (z << 1);
- u[2] ^= (z >> 9);
- u[1] ^= (z << 23);
- z = u[8];
- u[4] ^= (z >> 31);
- u[3] ^= (z << 1);
- u[1] ^= (z >> 9);
- u[0] ^= (z << 23);
- z = u[7] >> 9; /* z only has 23 significant bits */
- u[3] ^= (z >> 22);
- u[2] ^= (z << 10);
- u[0] ^= z;
- /* clear bits above 233 */
- u[14] = u[13] = u[12] = u[11] = u[10] = u[9] = u[8] = 0;
- u[7] ^= z << 9;
-#endif
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* Fast squaring for polynomials over a 233-bit curve. Assumes reduction
- * polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit *u, *v;
-
- v = MP_DIGITS(a);
-
-#ifdef ECL_SIXTY_FOUR_BIT
- if (MP_USED(a) < 4) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 8) {
- MP_CHECKOK(s_mp_pad(r, 8));
- }
- MP_USED(r) = 8;
-#else
- if (MP_USED(a) < 8) {
- return mp_bsqrmod(a, meth->irr_arr, r);
- }
- if (MP_USED(r) < 15) {
- MP_CHECKOK(s_mp_pad(r, 15));
- }
- MP_USED(r) = 15;
-#endif
- u = MP_DIGITS(r);
-
-#ifdef ECL_THIRTY_TWO_BIT
- u[14] = gf2m_SQR0(v[7]);
- u[13] = gf2m_SQR1(v[6]);
- u[12] = gf2m_SQR0(v[6]);
- u[11] = gf2m_SQR1(v[5]);
- u[10] = gf2m_SQR0(v[5]);
- u[9] = gf2m_SQR1(v[4]);
- u[8] = gf2m_SQR0(v[4]);
-#endif
- u[7] = gf2m_SQR1(v[3]);
- u[6] = gf2m_SQR0(v[3]);
- u[5] = gf2m_SQR1(v[2]);
- u[4] = gf2m_SQR0(v[2]);
- u[3] = gf2m_SQR1(v[1]);
- u[2] = gf2m_SQR0(v[1]);
- u[1] = gf2m_SQR1(v[0]);
- u[0] = gf2m_SQR0(v[0]);
- return ec_GF2m_233_mod(r, r, meth);
-
- CLEANUP:
- return res;
-}
-
-/* Fast multiplication for polynomials over a 233-bit curve. Assumes
- * reduction polynomial with terms {233, 74, 0}. */
-mp_err
-ec_GF2m_233_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0;
-
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a7 = 0, a6 = 0, a5 = 0, a4 = 0, b7 = 0, b6 = 0, b5 = 0, b4 =
- 0;
- mp_digit rm[8];
-#endif
-
- if (a == b) {
- return ec_GF2m_233_sqr(a, r, meth);
- } else {
- switch (MP_USED(a)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 8:
- a7 = MP_DIGIT(a, 7);
- case 7:
- a6 = MP_DIGIT(a, 6);
- case 6:
- a5 = MP_DIGIT(a, 5);
- case 5:
- a4 = MP_DIGIT(a, 4);
-#endif
- case 4:
- a3 = MP_DIGIT(a, 3);
- case 3:
- a2 = MP_DIGIT(a, 2);
- case 2:
- a1 = MP_DIGIT(a, 1);
- default:
- a0 = MP_DIGIT(a, 0);
- }
- switch (MP_USED(b)) {
-#ifdef ECL_THIRTY_TWO_BIT
- case 8:
- b7 = MP_DIGIT(b, 7);
- case 7:
- b6 = MP_DIGIT(b, 6);
- case 6:
- b5 = MP_DIGIT(b, 5);
- case 5:
- b4 = MP_DIGIT(b, 4);
-#endif
- case 4:
- b3 = MP_DIGIT(b, 3);
- case 3:
- b2 = MP_DIGIT(b, 2);
- case 2:
- b1 = MP_DIGIT(b, 1);
- default:
- b0 = MP_DIGIT(b, 0);
- }
-#ifdef ECL_SIXTY_FOUR_BIT
- MP_CHECKOK(s_mp_pad(r, 8));
- s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
- MP_USED(r) = 8;
- s_mp_clamp(r);
-#else
- MP_CHECKOK(s_mp_pad(r, 16));
- s_bmul_4x4(MP_DIGITS(r) + 8, a7, a6, a5, a4, b7, b6, b5, b4);
- s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0);
- s_bmul_4x4(rm, a7 ^ a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b7 ^ b3,
- b6 ^ b2, b5 ^ b1, b4 ^ b0);
- rm[7] ^= MP_DIGIT(r, 7) ^ MP_DIGIT(r, 15);
- rm[6] ^= MP_DIGIT(r, 6) ^ MP_DIGIT(r, 14);
- rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13);
- rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12);
- rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11);
- rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10);
- rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9);
- rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8);
- MP_DIGIT(r, 11) ^= rm[7];
- MP_DIGIT(r, 10) ^= rm[6];
- MP_DIGIT(r, 9) ^= rm[5];
- MP_DIGIT(r, 8) ^= rm[4];
- MP_DIGIT(r, 7) ^= rm[3];
- MP_DIGIT(r, 6) ^= rm[2];
- MP_DIGIT(r, 5) ^= rm[1];
- MP_DIGIT(r, 4) ^= rm[0];
- MP_USED(r) = 16;
- s_mp_clamp(r);
-#endif
- return ec_GF2m_233_mod(r, r, meth);
- }
-
- CLEANUP:
- return res;
-}
-
-/* Wire in fast field arithmetic for 233-bit curves. */
-mp_err
-ec_group_set_gf2m233(ECGroup *group, ECCurveName name)
-{
- group->meth->field_mod = &ec_GF2m_233_mod;
- group->meth->field_mul = &ec_GF2m_233_mul;
- group->meth->field_sqr = &ec_GF2m_233_sqr;
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ec2_aff.c b/src/share/native/sun/security/ec/ec2_aff.c
deleted file mode 100644
index bb52cbc..0000000
--- a/src/share/native/sun/security/ec/ec2_aff.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ec2.h"
-#include "mplogic.h"
-#include "mp_gf2m.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py)
-{
-
- if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
- return MP_YES;
- } else {
- return MP_NO;
- }
-
-}
-
-/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py)
-{
- mp_zero(px);
- mp_zero(py);
- return MP_OKAY;
-}
-
-/* Computes R = P + Q based on IEEE P1363 A.10.2. Elliptic curve points P,
- * Q, and R can all be identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int lambda, tempx, tempy;
-
- MP_DIGITS(&lambda) = 0;
- MP_DIGITS(&tempx) = 0;
- MP_DIGITS(&tempy) = 0;
- MP_CHECKOK(mp_init(&lambda, FLAG(px)));
- MP_CHECKOK(mp_init(&tempx, FLAG(px)));
- MP_CHECKOK(mp_init(&tempy, FLAG(px)));
- /* if P = inf, then R = Q */
- if (ec_GF2m_pt_is_inf_aff(px, py) == 0) {
- MP_CHECKOK(mp_copy(qx, rx));
- MP_CHECKOK(mp_copy(qy, ry));
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* if Q = inf, then R = P */
- if (ec_GF2m_pt_is_inf_aff(qx, qy) == 0) {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* if px != qx, then lambda = (py+qy) / (px+qx), tempx = a + lambda^2
- * + lambda + px + qx */
- if (mp_cmp(px, qx) != 0) {
- MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth));
- MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_div(&tempy, &tempx, &lambda, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, &lambda, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, &group->curvea, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, px, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, qx, &tempx, group->meth));
- } else {
- /* if py != qy or qx = 0, then R = inf */
- if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qx) == 0)) {
- mp_zero(rx);
- mp_zero(ry);
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* lambda = qx + qy / qx */
- MP_CHECKOK(group->meth->field_div(qy, qx, &lambda, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&lambda, qx, &lambda, group->meth));
- /* tempx = a + lambda^2 + lambda */
- MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, &lambda, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, &group->curvea, &tempx, group->meth));
- }
- /* ry = (qx + tempx) * lambda + tempx + qy */
- MP_CHECKOK(group->meth->field_add(qx, &tempx, &tempy, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(&tempy, &lambda, &tempy, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempy, &tempx, &tempy, group->meth));
- MP_CHECKOK(group->meth->field_add(&tempy, qy, ry, group->meth));
- /* rx = tempx */
- MP_CHECKOK(mp_copy(&tempx, rx));
-
- CLEANUP:
- mp_clear(&lambda);
- mp_clear(&tempx);
- mp_clear(&tempy);
- return res;
-}
-
-/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be
- * identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int nqy;
-
- MP_DIGITS(&nqy) = 0;
- MP_CHECKOK(mp_init(&nqy, FLAG(px)));
- /* nqy = qx+qy */
- MP_CHECKOK(group->meth->field_add(qx, qy, &nqy, group->meth));
- MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group));
- CLEANUP:
- mp_clear(&nqy);
- return res;
-}
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * affine coordinates. */
-mp_err
-ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group)
-{
- return group->point_add(px, py, px, py, rx, ry, group);
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF
-/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and
- * R can be identical. Uses affine coordinates. */
-mp_err
-ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int k, k3, qx, qy, sx, sy;
- int b1, b3, i, l;
-
- MP_DIGITS(&k) = 0;
- MP_DIGITS(&k3) = 0;
- MP_DIGITS(&qx) = 0;
- MP_DIGITS(&qy) = 0;
- MP_DIGITS(&sx) = 0;
- MP_DIGITS(&sy) = 0;
- MP_CHECKOK(mp_init(&k));
- MP_CHECKOK(mp_init(&k3));
- MP_CHECKOK(mp_init(&qx));
- MP_CHECKOK(mp_init(&qy));
- MP_CHECKOK(mp_init(&sx));
- MP_CHECKOK(mp_init(&sy));
-
- /* if n = 0 then r = inf */
- if (mp_cmp_z(n) == 0) {
- mp_zero(rx);
- mp_zero(ry);
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* Q = P, k = n */
- MP_CHECKOK(mp_copy(px, &qx));
- MP_CHECKOK(mp_copy(py, &qy));
- MP_CHECKOK(mp_copy(n, &k));
- /* if n < 0 then Q = -Q, k = -k */
- if (mp_cmp_z(n) < 0) {
- MP_CHECKOK(group->meth->field_add(&qx, &qy, &qy, group->meth));
- MP_CHECKOK(mp_neg(&k, &k));
- }
-#ifdef ECL_DEBUG /* basic double and add method */
- l = mpl_significant_bits(&k) - 1;
- MP_CHECKOK(mp_copy(&qx, &sx));
- MP_CHECKOK(mp_copy(&qy, &sy));
- for (i = l - 1; i >= 0; i--) {
- /* S = 2S */
- MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
- /* if k_i = 1, then S = S + Q */
- if (mpl_get_bit(&k, i) != 0) {
- MP_CHECKOK(group->
- point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
- }
- }
-#else /* double and add/subtract method from
- * standard */
- /* k3 = 3 * k */
- MP_CHECKOK(mp_set_int(&k3, 3));
- MP_CHECKOK(mp_mul(&k, &k3, &k3));
- /* S = Q */
- MP_CHECKOK(mp_copy(&qx, &sx));
- MP_CHECKOK(mp_copy(&qy, &sy));
- /* l = index of high order bit in binary representation of 3*k */
- l = mpl_significant_bits(&k3) - 1;
- /* for i = l-1 downto 1 */
- for (i = l - 1; i >= 1; i--) {
- /* S = 2S */
- MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
- b3 = MP_GET_BIT(&k3, i);
- b1 = MP_GET_BIT(&k, i);
- /* if k3_i = 1 and k_i = 0, then S = S + Q */
- if ((b3 == 1) && (b1 == 0)) {
- MP_CHECKOK(group->
- point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
- /* if k3_i = 0 and k_i = 1, then S = S - Q */
- } else if ((b3 == 0) && (b1 == 1)) {
- MP_CHECKOK(group->
- point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
- }
- }
-#endif
- /* output S */
- MP_CHECKOK(mp_copy(&sx, rx));
- MP_CHECKOK(mp_copy(&sy, ry));
-
- CLEANUP:
- mp_clear(&k);
- mp_clear(&k3);
- mp_clear(&qx);
- mp_clear(&qy);
- mp_clear(&sx);
- mp_clear(&sy);
- return res;
-}
-#endif
-
-/* Validates a point on a GF2m curve. */
-mp_err
-ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
-{
- mp_err res = MP_NO;
- mp_int accl, accr, tmp, pxt, pyt;
-
- MP_DIGITS(&accl) = 0;
- MP_DIGITS(&accr) = 0;
- MP_DIGITS(&tmp) = 0;
- MP_DIGITS(&pxt) = 0;
- MP_DIGITS(&pyt) = 0;
- MP_CHECKOK(mp_init(&accl, FLAG(px)));
- MP_CHECKOK(mp_init(&accr, FLAG(px)));
- MP_CHECKOK(mp_init(&tmp, FLAG(px)));
- MP_CHECKOK(mp_init(&pxt, FLAG(px)));
- MP_CHECKOK(mp_init(&pyt, FLAG(px)));
-
- /* 1: Verify that publicValue is not the point at infinity */
- if (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 2: Verify that the coordinates of publicValue are elements
- * of the field.
- */
- if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
- (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 3: Verify that publicValue is on the curve. */
- if (group->meth->field_enc) {
- group->meth->field_enc(px, &pxt, group->meth);
- group->meth->field_enc(py, &pyt, group->meth);
- } else {
- mp_copy(px, &pxt);
- mp_copy(py, &pyt);
- }
- /* left-hand side: y^2 + x*y */
- MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) );
- MP_CHECKOK( group->meth->field_mul(&pxt, &pyt, &tmp, group->meth) );
- MP_CHECKOK( group->meth->field_add(&accl, &tmp, &accl, group->meth) );
- /* right-hand side: x^3 + a*x^2 + b */
- MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) );
- MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) );
- MP_CHECKOK( group->meth->field_mul(&group->curvea, &tmp, &tmp, group->meth) );
- MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) );
- MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) );
- /* check LHS - RHS == 0 */
- MP_CHECKOK( group->meth->field_add(&accl, &accr, &accr, group->meth) );
- if (mp_cmp_z(&accr) != 0) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 4: Verify that the order of the curve times the publicValue
- * is the point at infinity.
- */
- MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );
- if (ec_GF2m_pt_is_inf_aff(&pxt, &pyt) != MP_YES) {
- res = MP_NO;
- goto CLEANUP;
- }
-
- res = MP_YES;
-
-CLEANUP:
- mp_clear(&accl);
- mp_clear(&accr);
- mp_clear(&tmp);
- mp_clear(&pxt);
- mp_clear(&pyt);
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ec2_mont.c b/src/share/native/sun/security/ec/ec2_mont.c
deleted file mode 100644
index 5cef20f..0000000
--- a/src/share/native/sun/security/ec/ec2_mont.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for binary polynomial field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ec2.h"
-#include "mplogic.h"
-#include "mp_gf2m.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery
- * projective coordinates. Uses algorithm Mdouble in appendix of Lopez, J.
- * and Dahab, R. "Fast multiplication on elliptic curves over GF(2^m)
- * without precomputation". modified to not require precomputation of
- * c=b^{2^{m-1}}. */
-static mp_err
-gf2m_Mdouble(mp_int *x, mp_int *z, const ECGroup *group, int kmflag)
-{
- mp_err res = MP_OKAY;
- mp_int t1;
-
- MP_DIGITS(&t1) = 0;
- MP_CHECKOK(mp_init(&t1, kmflag));
-
- MP_CHECKOK(group->meth->field_sqr(x, x, group->meth));
- MP_CHECKOK(group->meth->field_sqr(z, &t1, group->meth));
- MP_CHECKOK(group->meth->field_mul(x, &t1, z, group->meth));
- MP_CHECKOK(group->meth->field_sqr(x, x, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&t1, &t1, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(&group->curveb, &t1, &t1, group->meth));
- MP_CHECKOK(group->meth->field_add(x, &t1, x, group->meth));
-
- CLEANUP:
- mp_clear(&t1);
- return res;
-}
-
-/* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in
- * Montgomery projective coordinates. Uses algorithm Madd in appendix of
- * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over
- * GF(2^m) without precomputation". */
-static mp_err
-gf2m_Madd(const mp_int *x, mp_int *x1, mp_int *z1, mp_int *x2, mp_int *z2,
- const ECGroup *group, int kmflag)
-{
- mp_err res = MP_OKAY;
- mp_int t1, t2;
-
- MP_DIGITS(&t1) = 0;
- MP_DIGITS(&t2) = 0;
- MP_CHECKOK(mp_init(&t1, kmflag));
- MP_CHECKOK(mp_init(&t2, kmflag));
-
- MP_CHECKOK(mp_copy(x, &t1));
- MP_CHECKOK(group->meth->field_mul(x1, z2, x1, group->meth));
- MP_CHECKOK(group->meth->field_mul(z1, x2, z1, group->meth));
- MP_CHECKOK(group->meth->field_mul(x1, z1, &t2, group->meth));
- MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth));
- MP_CHECKOK(group->meth->field_sqr(z1, z1, group->meth));
- MP_CHECKOK(group->meth->field_mul(z1, &t1, x1, group->meth));
- MP_CHECKOK(group->meth->field_add(x1, &t2, x1, group->meth));
-
- CLEANUP:
- mp_clear(&t1);
- mp_clear(&t2);
- return res;
-}
-
-/* Compute the x, y affine coordinates from the point (x1, z1) (x2, z2)
- * using Montgomery point multiplication algorithm Mxy() in appendix of
- * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over
- * GF(2^m) without precomputation". Returns: 0 on error 1 if return value
- * should be the point at infinity 2 otherwise */
-static int
-gf2m_Mxy(const mp_int *x, const mp_int *y, mp_int *x1, mp_int *z1,
- mp_int *x2, mp_int *z2, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- int ret = 0;
- mp_int t3, t4, t5;
-
- MP_DIGITS(&t3) = 0;
- MP_DIGITS(&t4) = 0;
- MP_DIGITS(&t5) = 0;
- MP_CHECKOK(mp_init(&t3, FLAG(x2)));
- MP_CHECKOK(mp_init(&t4, FLAG(x2)));
- MP_CHECKOK(mp_init(&t5, FLAG(x2)));
-
- if (mp_cmp_z(z1) == 0) {
- mp_zero(x2);
- mp_zero(z2);
- ret = 1;
- goto CLEANUP;
- }
-
- if (mp_cmp_z(z2) == 0) {
- MP_CHECKOK(mp_copy(x, x2));
- MP_CHECKOK(group->meth->field_add(x, y, z2, group->meth));
- ret = 2;
- goto CLEANUP;
- }
-
- MP_CHECKOK(mp_set_int(&t5, 1));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(&t5, &t5, group->meth));
- }
-
- MP_CHECKOK(group->meth->field_mul(z1, z2, &t3, group->meth));
-
- MP_CHECKOK(group->meth->field_mul(z1, x, z1, group->meth));
- MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth));
- MP_CHECKOK(group->meth->field_mul(z2, x, z2, group->meth));
- MP_CHECKOK(group->meth->field_mul(z2, x1, x1, group->meth));
- MP_CHECKOK(group->meth->field_add(z2, x2, z2, group->meth));
-
- MP_CHECKOK(group->meth->field_mul(z2, z1, z2, group->meth));
- MP_CHECKOK(group->meth->field_sqr(x, &t4, group->meth));
- MP_CHECKOK(group->meth->field_add(&t4, y, &t4, group->meth));
- MP_CHECKOK(group->meth->field_mul(&t4, &t3, &t4, group->meth));
- MP_CHECKOK(group->meth->field_add(&t4, z2, &t4, group->meth));
-
- MP_CHECKOK(group->meth->field_mul(&t3, x, &t3, group->meth));
- MP_CHECKOK(group->meth->field_div(&t5, &t3, &t3, group->meth));
- MP_CHECKOK(group->meth->field_mul(&t3, &t4, &t4, group->meth));
- MP_CHECKOK(group->meth->field_mul(x1, &t3, x2, group->meth));
- MP_CHECKOK(group->meth->field_add(x2, x, z2, group->meth));
-
- MP_CHECKOK(group->meth->field_mul(z2, &t4, z2, group->meth));
- MP_CHECKOK(group->meth->field_add(z2, y, z2, group->meth));
-
- ret = 2;
-
- CLEANUP:
- mp_clear(&t3);
- mp_clear(&t4);
- mp_clear(&t5);
- if (res == MP_OKAY) {
- return ret;
- } else {
- return 0;
- }
-}
-
-/* Computes R = nP based on algorithm 2P of Lopex, J. and Dahab, R. "Fast
- * multiplication on elliptic curves over GF(2^m) without
- * precomputation". Elliptic curve points P and R can be identical. Uses
- * Montgomery projective coordinates. */
-mp_err
-ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int x1, x2, z1, z2;
- int i, j;
- mp_digit top_bit, mask;
-
- MP_DIGITS(&x1) = 0;
- MP_DIGITS(&x2) = 0;
- MP_DIGITS(&z1) = 0;
- MP_DIGITS(&z2) = 0;
- MP_CHECKOK(mp_init(&x1, FLAG(n)));
- MP_CHECKOK(mp_init(&x2, FLAG(n)));
- MP_CHECKOK(mp_init(&z1, FLAG(n)));
- MP_CHECKOK(mp_init(&z2, FLAG(n)));
-
- /* if result should be point at infinity */
- if ((mp_cmp_z(n) == 0) || (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES)) {
- MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry));
- goto CLEANUP;
- }
-
- MP_CHECKOK(mp_copy(px, &x1)); /* x1 = px */
- MP_CHECKOK(mp_set_int(&z1, 1)); /* z1 = 1 */
- MP_CHECKOK(group->meth->field_sqr(&x1, &z2, group->meth)); /* z2 =
- * x1^2 =
- * px^2 */
- MP_CHECKOK(group->meth->field_sqr(&z2, &x2, group->meth));
- MP_CHECKOK(group->meth->field_add(&x2, &group->curveb, &x2, group->meth)); /* x2
- * =
- * px^4
- * +
- * b
- */
-
- /* find top-most bit and go one past it */
- i = MP_USED(n) - 1;
- j = MP_DIGIT_BIT - 1;
- top_bit = 1;
- top_bit <<= MP_DIGIT_BIT - 1;
- mask = top_bit;
- while (!(MP_DIGITS(n)[i] & mask)) {
- mask >>= 1;
- j--;
- }
- mask >>= 1;
- j--;
-
- /* if top most bit was at word break, go to next word */
- if (!mask) {
- i--;
- j = MP_DIGIT_BIT - 1;
- mask = top_bit;
- }
-
- for (; i >= 0; i--) {
- for (; j >= 0; j--) {
- if (MP_DIGITS(n)[i] & mask) {
- MP_CHECKOK(gf2m_Madd(px, &x1, &z1, &x2, &z2, group, FLAG(n)));
- MP_CHECKOK(gf2m_Mdouble(&x2, &z2, group, FLAG(n)));
- } else {
- MP_CHECKOK(gf2m_Madd(px, &x2, &z2, &x1, &z1, group, FLAG(n)));
- MP_CHECKOK(gf2m_Mdouble(&x1, &z1, group, FLAG(n)));
- }
- mask >>= 1;
- }
- j = MP_DIGIT_BIT - 1;
- mask = top_bit;
- }
-
- /* convert out of "projective" coordinates */
- i = gf2m_Mxy(px, py, &x1, &z1, &x2, &z2, group);
- if (i == 0) {
- res = MP_BADARG;
- goto CLEANUP;
- } else if (i == 1) {
- MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry));
- } else {
- MP_CHECKOK(mp_copy(&x2, rx));
- MP_CHECKOK(mp_copy(&z2, ry));
- }
-
- CLEANUP:
- mp_clear(&x1);
- mp_clear(&x2);
- mp_clear(&z1);
- mp_clear(&z2);
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ec_naf.c b/src/share/native/sun/security/ec/ec_naf.c
deleted file mode 100644
index 1d11090..0000000
--- a/src/share/native/sun/security/ec/ec_naf.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Returns 2^e as an integer. This is meant to be used for small powers of
- * two. */
-int
-ec_twoTo(int e)
-{
- int a = 1;
- int i;
-
- for (i = 0; i < e; i++) {
- a *= 2;
- }
- return a;
-}
-
-/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should
- * be an array of signed char's to output to, bitsize should be the number
- * of bits of out, in is the original scalar, and w is the window size.
- * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A.
- * Menezes, "Software implementation of elliptic curve cryptography over
- * binary fields", Proc. CHES 2000. */
-mp_err
-ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in, int w)
-{
- mp_int k;
- mp_err res = MP_OKAY;
- int i, twowm1, mask;
-
- twowm1 = ec_twoTo(w - 1);
- mask = 2 * twowm1 - 1;
-
- MP_DIGITS(&k) = 0;
- MP_CHECKOK(mp_init_copy(&k, in));
-
- i = 0;
- /* Compute wNAF form */
- while (mp_cmp_z(&k) > 0) {
- if (mp_isodd(&k)) {
- out[i] = MP_DIGIT(&k, 0) & mask;
- if (out[i] >= twowm1)
- out[i] -= 2 * twowm1;
-
- /* Subtract off out[i]. Note mp_sub_d only works with
- * unsigned digits */
- if (out[i] >= 0) {
- mp_sub_d(&k, out[i], &k);
- } else {
- mp_add_d(&k, -(out[i]), &k);
- }
- } else {
- out[i] = 0;
- }
- mp_div_2(&k, &k);
- i++;
- }
- /* Zero out the remaining elements of the out array. */
- for (; i < bitsize + 1; i++) {
- out[i] = 0;
- }
- CLEANUP:
- mp_clear(&k);
- return res;
-
-}
diff --git a/src/share/native/sun/security/ec/ecc_impl.h b/src/share/native/sun/security/ec/ecc_impl.h
deleted file mode 100644
index 702ab1d..0000000
--- a/src/share/native/sun/security/ec/ecc_impl.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com> and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECC_IMPL_H
-#define _ECC_IMPL_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include "ecl-exp.h"
-
-/*
- * Multi-platform definitions
- */
-#ifdef __linux__
-#define B_FALSE FALSE
-#define B_TRUE TRUE
-typedef unsigned char uint8_t;
-typedef unsigned long ulong_t;
-typedef enum { B_FALSE, B_TRUE } boolean_t;
-#endif /* __linux__ */
-
-#ifdef _WIN32
-typedef unsigned char uint8_t;
-typedef unsigned long ulong_t;
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-#endif /* _WIN32 */
-
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif /* _KERNEL */
-
-#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */
-#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */
-#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */
-#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */
-#define EC_MIN_KEY_LEN 112 /* min key length in bits */
-#define EC_MAX_KEY_LEN 571 /* max key length in bits */
-#define EC_MAX_OID_LEN 10 /* max length of OID buffer */
-
-/*
- * Various structures and definitions from NSS are here.
- */
-
-#ifdef _KERNEL
-#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f))
-#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f))
-#define PORT_ArenaGrow(a, b, c, d) NULL
-#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f))
-#define PORT_Alloc(n, f) kmem_alloc((n), (f))
-#else
-#define PORT_ArenaAlloc(a, n, f) malloc((n))
-#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n))
-#define PORT_ArenaGrow(a, b, c, d) NULL
-#define PORT_ZAlloc(n, f) calloc(1, (n))
-#define PORT_Alloc(n, f) malloc((n))
-#endif
-
-#define PORT_NewArena(b) (char *)12345
-#define PORT_ArenaMark(a) NULL
-#define PORT_ArenaUnmark(a, b)
-#define PORT_ArenaRelease(a, m)
-#define PORT_FreeArena(a, b)
-#define PORT_Strlen(s) strlen((s))
-#define PORT_SetError(e)
-
-#define PRBool boolean_t
-#define PR_TRUE B_TRUE
-#define PR_FALSE B_FALSE
-
-#ifdef _KERNEL
-#define PORT_Assert ASSERT
-#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l))
-#else
-#define PORT_Assert assert
-#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l))
-#endif
-
-#define CHECK_OK(func) if (func == NULL) goto cleanup
-#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
-
-typedef enum {
- siBuffer = 0,
- siClearDataBuffer = 1,
- siCipherDataBuffer = 2,
- siDERCertBuffer = 3,
- siEncodedCertBuffer = 4,
- siDERNameBuffer = 5,
- siEncodedNameBuffer = 6,
- siAsciiNameString = 7,
- siAsciiString = 8,
- siDEROID = 9,
- siUnsignedInteger = 10,
- siUTCTime = 11,
- siGeneralizedTime = 12
-} SECItemType;
-
-typedef struct SECItemStr SECItem;
-
-struct SECItemStr {
- SECItemType type;
- unsigned char *data;
- unsigned int len;
-};
-
-typedef SECItem SECKEYECParams;
-
-typedef enum { ec_params_explicit,
- ec_params_named
-} ECParamsType;
-
-typedef enum { ec_field_GFp = 1,
- ec_field_GF2m
-} ECFieldType;
-
-struct ECFieldIDStr {
- int size; /* field size in bits */
- ECFieldType type;
- union {
- SECItem prime; /* prime p for (GFp) */
- SECItem poly; /* irreducible binary polynomial for (GF2m) */
- } u;
- int k1; /* first coefficient of pentanomial or
- * the only coefficient of trinomial
- */
- int k2; /* two remaining coefficients of pentanomial */
- int k3;
-};
-typedef struct ECFieldIDStr ECFieldID;
-
-struct ECCurveStr {
- SECItem a; /* contains octet stream encoding of
- * field element (X9.62 section 4.3.3)
- */
- SECItem b;
- SECItem seed;
-};
-typedef struct ECCurveStr ECCurve;
-
-typedef void PRArenaPool;
-
-struct ECParamsStr {
- PRArenaPool * arena;
- ECParamsType type;
- ECFieldID fieldID;
- ECCurve curve;
- SECItem base;
- SECItem order;
- int cofactor;
- SECItem DEREncoding;
- ECCurveName name;
- SECItem curveOID;
-};
-typedef struct ECParamsStr ECParams;
-
-struct ECPublicKeyStr {
- ECParams ecParams;
- SECItem publicValue; /* elliptic curve point encoded as
- * octet stream.
- */
-};
-typedef struct ECPublicKeyStr ECPublicKey;
-
-struct ECPrivateKeyStr {
- ECParams ecParams;
- SECItem publicValue; /* encoded ec point */
- SECItem privateValue; /* private big integer */
- SECItem version; /* As per SEC 1, Appendix C, Section C.4 */
-};
-typedef struct ECPrivateKeyStr ECPrivateKey;
-
-typedef enum _SECStatus {
- SECBufferTooSmall = -3,
- SECWouldBlock = -2,
- SECFailure = -1,
- SECSuccess = 0
-} SECStatus;
-
-#ifdef _KERNEL
-#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l))
-#else
-/*
- This function is no longer required because the random bytes are now
- supplied by the caller. Force a failure.
-VR
-#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure
-*/
-#define RNG_GenerateGlobalRandomBytes(p,l) SECSuccess
-#endif
-#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup
-#define MP_TO_SEC_ERROR(err)
-
-#define SECITEM_TO_MPINT(it, mp) \
- CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
-
-extern int ecc_knzero_random_generator(uint8_t *, size_t);
-extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t);
-
-extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int);
-extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int);
-extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *,
- int);
-extern void SECITEM_FreeItem(SECItem *, boolean_t);
-extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, const unsigned char* random, int randomlen, int);
-extern SECStatus EC_NewKeyFromSeed(ECParams *ecParams, ECPrivateKey **privKey,
- const unsigned char *seed, int seedlen, int kmflag);
-extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *,
- const unsigned char* randon, int randomlen, int);
-extern SECStatus ECDSA_SignDigestWithSeed(ECPrivateKey *, SECItem *,
- const SECItem *, const unsigned char *seed, int seedlen, int kmflag);
-extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *,
- const SECItem *, int);
-extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t,
- SECItem *, int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ECC_IMPL_H */
diff --git a/src/share/native/sun/security/ec/ecdecode.c b/src/share/native/sun/security/ec/ecdecode.c
deleted file mode 100644
index d610f3b..0000000
--- a/src/share/native/sun/security/ec/ecdecode.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Elliptic Curve Cryptography library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com> and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-
-#define MAX_ECKEY_LEN 72
-#define SEC_ASN1_OBJECT_ID 0x06
-
-/*
- * Initializes a SECItem from a hexadecimal string
- *
- * Warning: This function ignores leading 00's, so any leading 00's
- * in the hexadecimal string must be optional.
- */
-static SECItem *
-hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str,
- int kmflag)
-{
- int i = 0;
- int byteval = 0;
- int tmp = strlen(str);
-
- if ((tmp % 2) != 0) return NULL;
-
- /* skip leading 00's unless the hex string is "00" */
- while ((tmp > 2) && (str[0] == '0') && (str[1] == '0')) {
- str += 2;
- tmp -= 2;
- }
-
- item->data = (unsigned char *) PORT_ArenaAlloc(arena, tmp/2, kmflag);
- if (item->data == NULL) return NULL;
- item->len = tmp/2;
-
- while (str[i]) {
- if ((str[i] >= '0') && (str[i] <= '9'))
- tmp = str[i] - '0';
- else if ((str[i] >= 'a') && (str[i] <= 'f'))
- tmp = str[i] - 'a' + 10;
- else if ((str[i] >= 'A') && (str[i] <= 'F'))
- tmp = str[i] - 'A' + 10;
- else
- return NULL;
-
- byteval = byteval * 16 + tmp;
- if ((i % 2) != 0) {
- item->data[i/2] = byteval;
- byteval = 0;
- }
- i++;
- }
-
- return item;
-}
-
-static SECStatus
-gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params,
- int kmflag)
-{
- SECStatus rv = SECFailure;
- const ECCurveParams *curveParams;
- /* 2 ['0'+'4'] + MAX_ECKEY_LEN * 2 [x,y] * 2 [hex string] + 1 ['\0'] */
- char genenc[3 + 2 * 2 * MAX_ECKEY_LEN];
-
- if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve)) goto cleanup;
- params->name = name;
- curveParams = ecCurve_map[params->name];
- CHECK_OK(curveParams);
- params->fieldID.size = curveParams->size;
- params->fieldID.type = field_type;
- if (field_type == ec_field_GFp) {
- CHECK_OK(hexString2SECItem(NULL, ¶ms->fieldID.u.prime,
- curveParams->irr, kmflag));
- } else {
- CHECK_OK(hexString2SECItem(NULL, ¶ms->fieldID.u.poly,
- curveParams->irr, kmflag));
- }
- CHECK_OK(hexString2SECItem(NULL, ¶ms->curve.a,
- curveParams->curvea, kmflag));
- CHECK_OK(hexString2SECItem(NULL, ¶ms->curve.b,
- curveParams->curveb, kmflag));
- genenc[0] = '0';
- genenc[1] = '4';
- genenc[2] = '\0';
- strcat(genenc, curveParams->genx);
- strcat(genenc, curveParams->geny);
- CHECK_OK(hexString2SECItem(NULL, ¶ms->base, genenc, kmflag));
- CHECK_OK(hexString2SECItem(NULL, ¶ms->order,
- curveParams->order, kmflag));
- params->cofactor = curveParams->cofactor;
-
- rv = SECSuccess;
-
-cleanup:
- return rv;
-}
-
-ECCurveName SECOID_FindOIDTag(const SECItem *);
-
-SECStatus
-EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams,
- ECParams *params, int kmflag)
-{
- SECStatus rv = SECFailure;
- ECCurveName tag;
- SECItem oid = { siBuffer, NULL, 0};
-
-#if EC_DEBUG
- int i;
-
- printf("Encoded params in EC_DecodeParams: ");
- for (i = 0; i < encodedParams->len; i++) {
- printf("%02x:", encodedParams->data[i]);
- }
- printf("\n");
-#endif
-
- if ((encodedParams->len != ANSI_X962_CURVE_OID_TOTAL_LEN) &&
- (encodedParams->len != SECG_CURVE_OID_TOTAL_LEN)) {
- PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
- return SECFailure;
- };
-
- oid.len = encodedParams->len - 2;
- oid.data = encodedParams->data + 2;
- if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) ||
- ((tag = SECOID_FindOIDTag(&oid)) == ECCurve_noName)) {
- PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
- return SECFailure;
- }
-
- params->arena = arena;
- params->cofactor = 0;
- params->type = ec_params_named;
- params->name = ECCurve_noName;
-
- /* For named curves, fill out curveOID */
- params->curveOID.len = oid.len;
- params->curveOID.data = (unsigned char *) PORT_ArenaAlloc(NULL, oid.len,
- kmflag);
- if (params->curveOID.data == NULL) goto cleanup;
- memcpy(params->curveOID.data, oid.data, oid.len);
-
-#if EC_DEBUG
-#ifndef SECOID_FindOIDTagDescription
- printf("Curve: %s\n", ecCurve_map[tag]->text);
-#else
- printf("Curve: %s\n", SECOID_FindOIDTagDescription(tag));
-#endif
-#endif
-
- switch (tag) {
-
- /* Binary curves */
-
- case ECCurve_X9_62_CHAR2_PNB163V1:
- /* Populate params for c2pnb163v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB163V2:
- /* Populate params for c2pnb163v2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB163V3:
- /* Populate params for c2pnb163v3 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V3, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB176V1:
- /* Populate params for c2pnb176v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB176V1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB191V1:
- /* Populate params for c2tnb191v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB191V2:
- /* Populate params for c2tnb191v2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB191V3:
- /* Populate params for c2tnb191v3 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V3, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB208W1:
- /* Populate params for c2pnb208w1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB208W1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB239V1:
- /* Populate params for c2tnb239v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB239V2:
- /* Populate params for c2tnb239v2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB239V3:
- /* Populate params for c2tnb239v3 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V3, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB272W1:
- /* Populate params for c2pnb272w1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB272W1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB304W1:
- /* Populate params for c2pnb304w1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB304W1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB359V1:
- /* Populate params for c2tnb359v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB359V1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_PNB368W1:
- /* Populate params for c2pnb368w1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB368W1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_CHAR2_TNB431R1:
- /* Populate params for c2tnb431r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB431R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_113R1:
- /* Populate params for sect113r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_113R2:
- /* Populate params for sect113r2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_131R1:
- /* Populate params for sect131r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_131R2:
- /* Populate params for sect131r2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_163K1:
- /* Populate params for sect163k1
- * (the NIST K-163 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_163R1:
- /* Populate params for sect163r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_163R2:
- /* Populate params for sect163r2
- * (the NIST B-163 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_193R1:
- /* Populate params for sect193r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_193R2:
- /* Populate params for sect193r2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R2, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_233K1:
- /* Populate params for sect233k1
- * (the NIST K-233 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_233R1:
- /* Populate params for sect233r1
- * (the NIST B-233 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_239K1:
- /* Populate params for sect239k1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_239K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_283K1:
- /* Populate params for sect283k1
- * (the NIST K-283 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_283R1:
- /* Populate params for sect283r1
- * (the NIST B-283 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_409K1:
- /* Populate params for sect409k1
- * (the NIST K-409 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_409R1:
- /* Populate params for sect409r1
- * (the NIST B-409 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_571K1:
- /* Populate params for sect571k1
- * (the NIST K-571 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571K1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_CHAR2_571R1:
- /* Populate params for sect571r1
- * (the NIST B-571 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571R1, ec_field_GF2m,
- params, kmflag) );
- break;
-
- /* Prime curves */
-
- case ECCurve_X9_62_PRIME_192V1:
- /* Populate params for prime192v1 aka secp192r1
- * (the NIST P-192 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_192V2:
- /* Populate params for prime192v2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V2, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_192V3:
- /* Populate params for prime192v3 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V3, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_239V1:
- /* Populate params for prime239v1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_239V2:
- /* Populate params for prime239v2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V2, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_239V3:
- /* Populate params for prime239v3 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V3, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_X9_62_PRIME_256V1:
- /* Populate params for prime256v1 aka secp256r1
- * (the NIST P-256 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_256V1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_112R1:
- /* Populate params for secp112r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_112R2:
- /* Populate params for secp112r2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R2, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_128R1:
- /* Populate params for secp128r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_128R2:
- /* Populate params for secp128r2 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R2, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_160K1:
- /* Populate params for secp160k1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160K1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_160R1:
- /* Populate params for secp160r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_160R2:
- /* Populate params for secp160r1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R2, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_192K1:
- /* Populate params for secp192k1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_192K1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_224K1:
- /* Populate params for secp224k1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224K1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_224R1:
- /* Populate params for secp224r1
- * (the NIST P-224 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_256K1:
- /* Populate params for secp256k1 */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_256K1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_384R1:
- /* Populate params for secp384r1
- * (the NIST P-384 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_384R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- case ECCurve_SECG_PRIME_521R1:
- /* Populate params for secp521r1
- * (the NIST P-521 curve)
- */
- CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_521R1, ec_field_GFp,
- params, kmflag) );
- break;
-
- default:
- break;
- };
-
-cleanup:
- if (!params->cofactor) {
- PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
-#if EC_DEBUG
- printf("Unrecognized curve, returning NULL params\n");
-#endif
- }
-
- return rv;
-}
-
-SECStatus
-EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams, int kmflag)
-{
- PRArenaPool *arena;
- ECParams *params;
- SECStatus rv = SECFailure;
-
- /* Initialize an arena for the ECParams structure */
- if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
- return SECFailure;
-
- params = (ECParams *)PORT_ArenaZAlloc(NULL, sizeof(ECParams), kmflag);
- if (!params) {
- PORT_FreeArena(NULL, B_TRUE);
- return SECFailure;
- }
-
- /* Copy the encoded params */
- SECITEM_AllocItem(arena, &(params->DEREncoding), encodedParams->len,
- kmflag);
- memcpy(params->DEREncoding.data, encodedParams->data, encodedParams->len);
-
- /* Fill out the rest of the ECParams structure based on
- * the encoded params
- */
- rv = EC_FillParams(NULL, encodedParams, params, kmflag);
- if (rv == SECFailure) {
- PORT_FreeArena(NULL, B_TRUE);
- return SECFailure;
- } else {
- *ecparams = params;;
- return SECSuccess;
- }
-}
diff --git a/src/share/native/sun/security/ec/ecl-curve.h b/src/share/native/sun/security/ec/ecl-curve.h
deleted file mode 100644
index bb7f9a7..0000000
--- a/src/share/native/sun/security/ec/ecl-curve.h
+++ /dev/null
@@ -1,710 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_CURVE_H
-#define _ECL_CURVE_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl-exp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* NIST prime curves */
-static const ECCurveParams ecCurve_NIST_P192 = {
- "NIST-P192", ECField_GFp, 192,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
- "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1",
- "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012",
- "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",
- "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P224 = {
- "NIST-P224", ECField_GFp, 224,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE",
- "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4",
- "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21",
- "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P256 = {
- "NIST-P256", ECField_GFp, 256,
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
- "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
- "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
- "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
- "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1
-};
-
-static const ECCurveParams ecCurve_NIST_P384 = {
- "NIST-P384", ECField_GFp, 384,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
- "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
- "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
- "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
- 1
-};
-
-static const ECCurveParams ecCurve_NIST_P521 = {
- "NIST-P521", ECField_GFp, 521,
- "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
- "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
- "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
- "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
- "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
- "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
- 1
-};
-
-/* NIST binary curves */
-static const ECCurveParams ecCurve_NIST_K163 = {
- "NIST-K163", ECField_GF2m, 163,
- "0800000000000000000000000000000000000000C9",
- "000000000000000000000000000000000000000001",
- "000000000000000000000000000000000000000001",
- "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8",
- "0289070FB05D38FF58321F2E800536D538CCDAA3D9",
- "04000000000000000000020108A2E0CC0D99F8A5EF", 2
-};
-
-static const ECCurveParams ecCurve_NIST_B163 = {
- "NIST-B163", ECField_GF2m, 163,
- "0800000000000000000000000000000000000000C9",
- "000000000000000000000000000000000000000001",
- "020A601907B8C953CA1481EB10512F78744A3205FD",
- "03F0EBA16286A2D57EA0991168D4994637E8343E36",
- "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1",
- "040000000000000000000292FE77E70C12A4234C33", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K233 = {
- "NIST-K233", ECField_GF2m, 233,
- "020000000000000000000000000000000000000004000000000000000001",
- "000000000000000000000000000000000000000000000000000000000000",
- "000000000000000000000000000000000000000000000000000000000001",
- "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
- "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
- "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B233 = {
- "NIST-B233", ECField_GF2m, 233,
- "020000000000000000000000000000000000000004000000000000000001",
- "000000000000000000000000000000000000000000000000000000000001",
- "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD",
- "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B",
- "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052",
- "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K283 = {
- "NIST-K283", ECField_GF2m, 283,
- "0800000000000000000000000000000000000000000000000000000000000000000010A1",
- "000000000000000000000000000000000000000000000000000000000000000000000000",
- "000000000000000000000000000000000000000000000000000000000000000000000001",
- "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836",
- "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259",
- "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B283 = {
- "NIST-B283", ECField_GF2m, 283,
- "0800000000000000000000000000000000000000000000000000000000000000000010A1",
- "000000000000000000000000000000000000000000000000000000000000000000000001",
- "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5",
- "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053",
- "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4",
- "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K409 = {
- "NIST-K409", ECField_GF2m, 409,
- "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
- "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
- "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B409 = {
- "NIST-B409", ECField_GF2m, 409,
- "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F",
- "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7",
- "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706",
- "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2
-};
-
-static const ECCurveParams ecCurve_NIST_K571 = {
- "NIST-K571", ECField_GF2m, 571,
- "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972",
- "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3",
- "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4
-};
-
-static const ECCurveParams ecCurve_NIST_B571 = {
- "NIST-B571", ECField_GF2m, 571,
- "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425",
- "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A",
- "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19",
- "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B",
- "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2
-};
-
-/* ANSI X9.62 prime curves */
-static const ECCurveParams ecCurve_X9_62_PRIME_192V2 = {
- "X9.62 P-192V2", ECField_GFp, 192,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
- "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953",
- "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A",
- "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15",
- "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_192V3 = {
- "X9.62 P-192V3", ECField_GFp, 192,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC",
- "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916",
- "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896",
- "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0",
- "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V1 = {
- "X9.62 P-239V1", ECField_GFp, 239,
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
- "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A",
- "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF",
- "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE",
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V2 = {
- "X9.62 P-239V2", ECField_GFp, 239,
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
- "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C",
- "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7",
- "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA",
- "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063", 1
-};
-
-static const ECCurveParams ecCurve_X9_62_PRIME_239V3 = {
- "X9.62 P-239V3", ECField_GFp, 239,
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF",
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC",
- "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E",
- "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A",
- "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3",
- "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551", 1
-};
-
-/* ANSI X9.62 binary curves */
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V1 = {
- "X9.62 C2-PNB163V1", ECField_GF2m, 163,
- "080000000000000000000000000000000000000107",
- "072546B5435234A422E0789675F432C89435DE5242",
- "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9",
- "07AF69989546103D79329FCC3D74880F33BBE803CB",
- "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F",
- "0400000000000000000001E60FC8821CC74DAEAFC1", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V2 = {
- "X9.62 C2-PNB163V2", ECField_GF2m, 163,
- "080000000000000000000000000000000000000107",
- "0108B39E77C4B108BED981ED0E890E117C511CF072",
- "0667ACEB38AF4E488C407433FFAE4F1C811638DF20",
- "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5",
- "079F684DDF6684C5CD258B3890021B2386DFD19FC5",
- "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V3 = {
- "X9.62 C2-PNB163V3", ECField_GF2m, 163,
- "080000000000000000000000000000000000000107",
- "07A526C63D3E25A256A007699F5447E32AE456B50E",
- "03F7061798EB99E238FD6F1BF95B48FEEB4854252B",
- "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB",
- "05B935590C155E17EA48EB3FF3718B893DF59A05D0",
- "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB176V1 = {
- "X9.62 C2-PNB176V1", ECField_GF2m, 176,
- "0100000000000000000000000000000000080000000007",
- "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B",
- "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2",
- "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798",
- "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C",
- "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V1 = {
- "X9.62 C2-TNB191V1", ECField_GF2m, 191,
- "800000000000000000000000000000000000000000000201",
- "2866537B676752636A68F56554E12640276B649EF7526267",
- "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC",
- "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D",
- "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB",
- "40000000000000000000000004A20E90C39067C893BBB9A5", 2
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V2 = {
- "X9.62 C2-TNB191V2", ECField_GF2m, 191,
- "800000000000000000000000000000000000000000000201",
- "401028774D7777C7B7666D1366EA432071274F89FF01E718",
- "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01",
- "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10",
- "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A",
- "20000000000000000000000050508CB89F652824E06B8173", 4
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V3 = {
- "X9.62 C2-TNB191V3", ECField_GF2m, 191,
- "800000000000000000000000000000000000000000000201",
- "6C01074756099122221056911C77D77E77A777E7E7E77FCB",
- "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8",
- "375D4CE24FDE434489DE8746E71786015009E66E38A926DD",
- "545A39176196575D985999366E6AD34CE0A77CD7127B06BE",
- "155555555555555555555555610C0B196812BFB6288A3EA3", 6
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB208W1 = {
- "X9.62 C2-PNB208W1", ECField_GF2m, 208,
- "010000000000000000000000000000000800000000000000000007",
- "0000000000000000000000000000000000000000000000000000",
- "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E",
- "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A",
- "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3",
- "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V1 = {
- "X9.62 C2-TNB239V1", ECField_GF2m, 239,
- "800000000000000000000000000000000000000000000000001000000001",
- "32010857077C5431123A46B808906756F543423E8D27877578125778AC76",
- "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16",
- "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D",
- "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305",
- "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V2 = {
- "X9.62 C2-TNB239V2", ECField_GF2m, 239,
- "800000000000000000000000000000000000000000000000001000000001",
- "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F",
- "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B",
- "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205",
- "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833",
- "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V3 = {
- "X9.62 C2-TNB239V3", ECField_GF2m, 239,
- "800000000000000000000000000000000000000000000000001000000001",
- "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F",
- "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40",
- "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92",
- "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461",
- "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB272W1 = {
- "X9.62 C2-PNB272W1", ECField_GF2m, 272,
- "010000000000000000000000000000000000000000000000000000010000000000000B",
- "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20",
- "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7",
- "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D",
- "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23",
- "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521",
- 0xFF06
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB304W1 = {
- "X9.62 C2-PNB304W1", ECField_GF2m, 304,
- "010000000000000000000000000000000000000000000000000000000000000000000000000807",
- "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681",
- "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE",
- "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614",
- "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B",
- "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D", 0xFE2E
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB359V1 = {
- "X9.62 C2-TNB359V1", ECField_GF2m, 359,
- "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001",
- "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557",
- "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988",
- "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097",
- "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD",
- "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B", 0x4C
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_PNB368W1 = {
- "X9.62 C2-PNB368W1", ECField_GF2m, 368,
- "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007",
- "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D",
- "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A",
- "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F",
- "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310",
- "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967", 0xFF70
-};
-
-static const ECCurveParams ecCurve_X9_62_CHAR2_TNB431R1 = {
- "X9.62 C2-TNB431R1", ECField_GF2m, 431,
- "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001",
- "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F",
- "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618",
- "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7",
- "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760",
- "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91", 0x2760
-};
-
-/* SEC2 prime curves */
-static const ECCurveParams ecCurve_SECG_PRIME_112R1 = {
- "SECP-112R1", ECField_GFp, 112,
- "DB7C2ABF62E35E668076BEAD208B",
- "DB7C2ABF62E35E668076BEAD2088",
- "659EF8BA043916EEDE8911702B22",
- "09487239995A5EE76B55F9C2F098",
- "A89CE5AF8724C0A23E0E0FF77500",
- "DB7C2ABF62E35E7628DFAC6561C5", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_112R2 = {
- "SECP-112R2", ECField_GFp, 112,
- "DB7C2ABF62E35E668076BEAD208B",
- "6127C24C05F38A0AAAF65C0EF02C",
- "51DEF1815DB5ED74FCC34C85D709",
- "4BA30AB5E892B4E1649DD0928643",
- "adcd46f5882e3747def36e956e97",
- "36DF0AAFD8B8D7597CA10520D04B", 4
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_128R1 = {
- "SECP-128R1", ECField_GFp, 128,
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC",
- "E87579C11079F43DD824993C2CEE5ED3",
- "161FF7528B899B2D0C28607CA52C5B86",
- "CF5AC8395BAFEB13C02DA292DDED7A83",
- "FFFFFFFE0000000075A30D1B9038A115", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_128R2 = {
- "SECP-128R2", ECField_GFp, 128,
- "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF",
- "D6031998D1B3BBFEBF59CC9BBFF9AEE1",
- "5EEEFCA380D02919DC2C6558BB6D8A5D",
- "7B6AA5D85E572983E6FB32A7CDEBC140",
- "27B6916A894D3AEE7106FE805FC34B44",
- "3FFFFFFF7FFFFFFFBE0024720613B5A3", 4
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160K1 = {
- "SECP-160K1", ECField_GFp, 160,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
- "0000000000000000000000000000000000000000",
- "0000000000000000000000000000000000000007",
- "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB",
- "938CF935318FDCED6BC28286531733C3F03C4FEE",
- "0100000000000000000001B8FA16DFAB9ACA16B6B3", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160R1 = {
- "SECP-160R1", ECField_GFp, 160,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC",
- "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45",
- "4A96B5688EF573284664698968C38BB913CBFC82",
- "23A628553168947D59DCC912042351377AC5FB32",
- "0100000000000000000001F4C8F927AED3CA752257", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_160R2 = {
- "SECP-160R2", ECField_GFp, 160,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70",
- "B4E134D3FB59EB8BAB57274904664D5AF50388BA",
- "52DCB034293A117E1F4FF11B30F7199D3144CE6D",
- "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E",
- "0100000000000000000000351EE786A818F3A1A16B", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_192K1 = {
- "SECP-192K1", ECField_GFp, 192,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37",
- "000000000000000000000000000000000000000000000000",
- "000000000000000000000000000000000000000000000003",
- "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D",
- "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",
- "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_224K1 = {
- "SECP-224K1", ECField_GFp, 224,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D",
- "00000000000000000000000000000000000000000000000000000000",
- "00000000000000000000000000000000000000000000000000000005",
- "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C",
- "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5",
- "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 1
-};
-
-static const ECCurveParams ecCurve_SECG_PRIME_256K1 = {
- "SECP-256K1", ECField_GFp, 256,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F",
- "0000000000000000000000000000000000000000000000000000000000000000",
- "0000000000000000000000000000000000000000000000000000000000000007",
- "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",
- "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 1
-};
-
-/* SEC2 binary curves */
-static const ECCurveParams ecCurve_SECG_CHAR2_113R1 = {
- "SECT-113R1", ECField_GF2m, 113,
- "020000000000000000000000000201",
- "003088250CA6E7C7FE649CE85820F7",
- "00E8BEE4D3E2260744188BE0E9C723",
- "009D73616F35F4AB1407D73562C10F",
- "00A52830277958EE84D1315ED31886",
- "0100000000000000D9CCEC8A39E56F", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_113R2 = {
- "SECT-113R2", ECField_GF2m, 113,
- "020000000000000000000000000201",
- "00689918DBEC7E5A0DD6DFC0AA55C7",
- "0095E9A9EC9B297BD4BF36E059184F",
- "01A57A6A7B26CA5EF52FCDB8164797",
- "00B3ADC94ED1FE674C06E695BABA1D",
- "010000000000000108789B2496AF93", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_131R1 = {
- "SECT-131R1", ECField_GF2m, 131,
- "080000000000000000000000000000010D",
- "07A11B09A76B562144418FF3FF8C2570B8",
- "0217C05610884B63B9C6C7291678F9D341",
- "0081BAF91FDF9833C40F9C181343638399",
- "078C6E7EA38C001F73C8134B1B4EF9E150",
- "0400000000000000023123953A9464B54D", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_131R2 = {
- "SECT-131R2", ECField_GF2m, 131,
- "080000000000000000000000000000010D",
- "03E5A88919D7CAFCBF415F07C2176573B2",
- "04B8266A46C55657AC734CE38F018F2192",
- "0356DCD8F2F95031AD652D23951BB366A8",
- "0648F06D867940A5366D9E265DE9EB240F",
- "0400000000000000016954A233049BA98F", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_163R1 = {
- "SECT-163R1", ECField_GF2m, 163,
- "0800000000000000000000000000000000000000C9",
- "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2",
- "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9",
- "0369979697AB43897789566789567F787A7876A654",
- "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883",
- "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_193R1 = {
- "SECT-193R1", ECField_GF2m, 193,
- "02000000000000000000000000000000000000000000008001",
- "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01",
- "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814",
- "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1",
- "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05",
- "01000000000000000000000000C7F34A778F443ACC920EBA49", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_193R2 = {
- "SECT-193R2", ECField_GF2m, 193,
- "02000000000000000000000000000000000000000000008001",
- "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B",
- "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE",
- "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F",
- "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C",
- "010000000000000000000000015AAB561B005413CCD4EE99D5", 2
-};
-
-static const ECCurveParams ecCurve_SECG_CHAR2_239K1 = {
- "SECT-239K1", ECField_GF2m, 239,
- "800000000000000000004000000000000000000000000000000000000001",
- "000000000000000000000000000000000000000000000000000000000000",
- "000000000000000000000000000000000000000000000000000000000001",
- "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC",
- "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA",
- "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4
-};
-
-/* WTLS curves */
-static const ECCurveParams ecCurve_WTLS_1 = {
- "WTLS-1", ECField_GF2m, 113,
- "020000000000000000000000000201",
- "000000000000000000000000000001",
- "000000000000000000000000000001",
- "01667979A40BA497E5D5C270780617",
- "00F44B4AF1ECC2630E08785CEBCC15",
- "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2
-};
-
-static const ECCurveParams ecCurve_WTLS_8 = {
- "WTLS-8", ECField_GFp, 112,
- "FFFFFFFFFFFFFFFFFFFFFFFFFDE7",
- "0000000000000000000000000000",
- "0000000000000000000000000003",
- "0000000000000000000000000001",
- "0000000000000000000000000002",
- "0100000000000001ECEA551AD837E9", 1
-};
-
-static const ECCurveParams ecCurve_WTLS_9 = {
- "WTLS-9", ECField_GFp, 160,
- "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F",
- "0000000000000000000000000000000000000000",
- "0000000000000000000000000000000000000003",
- "0000000000000000000000000000000000000001",
- "0000000000000000000000000000000000000002",
- "0100000000000000000001CDC98AE0E2DE574ABF33", 1
-};
-
-/* mapping between ECCurveName enum and pointers to ECCurveParams */
-static const ECCurveParams *ecCurve_map[] = {
- NULL, /* ECCurve_noName */
- &ecCurve_NIST_P192, /* ECCurve_NIST_P192 */
- &ecCurve_NIST_P224, /* ECCurve_NIST_P224 */
- &ecCurve_NIST_P256, /* ECCurve_NIST_P256 */
- &ecCurve_NIST_P384, /* ECCurve_NIST_P384 */
- &ecCurve_NIST_P521, /* ECCurve_NIST_P521 */
- &ecCurve_NIST_K163, /* ECCurve_NIST_K163 */
- &ecCurve_NIST_B163, /* ECCurve_NIST_B163 */
- &ecCurve_NIST_K233, /* ECCurve_NIST_K233 */
- &ecCurve_NIST_B233, /* ECCurve_NIST_B233 */
- &ecCurve_NIST_K283, /* ECCurve_NIST_K283 */
- &ecCurve_NIST_B283, /* ECCurve_NIST_B283 */
- &ecCurve_NIST_K409, /* ECCurve_NIST_K409 */
- &ecCurve_NIST_B409, /* ECCurve_NIST_B409 */
- &ecCurve_NIST_K571, /* ECCurve_NIST_K571 */
- &ecCurve_NIST_B571, /* ECCurve_NIST_B571 */
- &ecCurve_X9_62_PRIME_192V2, /* ECCurve_X9_62_PRIME_192V2 */
- &ecCurve_X9_62_PRIME_192V3, /* ECCurve_X9_62_PRIME_192V3 */
- &ecCurve_X9_62_PRIME_239V1, /* ECCurve_X9_62_PRIME_239V1 */
- &ecCurve_X9_62_PRIME_239V2, /* ECCurve_X9_62_PRIME_239V2 */
- &ecCurve_X9_62_PRIME_239V3, /* ECCurve_X9_62_PRIME_239V3 */
- &ecCurve_X9_62_CHAR2_PNB163V1, /* ECCurve_X9_62_CHAR2_PNB163V1 */
- &ecCurve_X9_62_CHAR2_PNB163V2, /* ECCurve_X9_62_CHAR2_PNB163V2 */
- &ecCurve_X9_62_CHAR2_PNB163V3, /* ECCurve_X9_62_CHAR2_PNB163V3 */
- &ecCurve_X9_62_CHAR2_PNB176V1, /* ECCurve_X9_62_CHAR2_PNB176V1 */
- &ecCurve_X9_62_CHAR2_TNB191V1, /* ECCurve_X9_62_CHAR2_TNB191V1 */
- &ecCurve_X9_62_CHAR2_TNB191V2, /* ECCurve_X9_62_CHAR2_TNB191V2 */
- &ecCurve_X9_62_CHAR2_TNB191V3, /* ECCurve_X9_62_CHAR2_TNB191V3 */
- &ecCurve_X9_62_CHAR2_PNB208W1, /* ECCurve_X9_62_CHAR2_PNB208W1 */
- &ecCurve_X9_62_CHAR2_TNB239V1, /* ECCurve_X9_62_CHAR2_TNB239V1 */
- &ecCurve_X9_62_CHAR2_TNB239V2, /* ECCurve_X9_62_CHAR2_TNB239V2 */
- &ecCurve_X9_62_CHAR2_TNB239V3, /* ECCurve_X9_62_CHAR2_TNB239V3 */
- &ecCurve_X9_62_CHAR2_PNB272W1, /* ECCurve_X9_62_CHAR2_PNB272W1 */
- &ecCurve_X9_62_CHAR2_PNB304W1, /* ECCurve_X9_62_CHAR2_PNB304W1 */
- &ecCurve_X9_62_CHAR2_TNB359V1, /* ECCurve_X9_62_CHAR2_TNB359V1 */
- &ecCurve_X9_62_CHAR2_PNB368W1, /* ECCurve_X9_62_CHAR2_PNB368W1 */
- &ecCurve_X9_62_CHAR2_TNB431R1, /* ECCurve_X9_62_CHAR2_TNB431R1 */
- &ecCurve_SECG_PRIME_112R1, /* ECCurve_SECG_PRIME_112R1 */
- &ecCurve_SECG_PRIME_112R2, /* ECCurve_SECG_PRIME_112R2 */
- &ecCurve_SECG_PRIME_128R1, /* ECCurve_SECG_PRIME_128R1 */
- &ecCurve_SECG_PRIME_128R2, /* ECCurve_SECG_PRIME_128R2 */
- &ecCurve_SECG_PRIME_160K1, /* ECCurve_SECG_PRIME_160K1 */
- &ecCurve_SECG_PRIME_160R1, /* ECCurve_SECG_PRIME_160R1 */
- &ecCurve_SECG_PRIME_160R2, /* ECCurve_SECG_PRIME_160R2 */
- &ecCurve_SECG_PRIME_192K1, /* ECCurve_SECG_PRIME_192K1 */
- &ecCurve_SECG_PRIME_224K1, /* ECCurve_SECG_PRIME_224K1 */
- &ecCurve_SECG_PRIME_256K1, /* ECCurve_SECG_PRIME_256K1 */
- &ecCurve_SECG_CHAR2_113R1, /* ECCurve_SECG_CHAR2_113R1 */
- &ecCurve_SECG_CHAR2_113R2, /* ECCurve_SECG_CHAR2_113R2 */
- &ecCurve_SECG_CHAR2_131R1, /* ECCurve_SECG_CHAR2_131R1 */
- &ecCurve_SECG_CHAR2_131R2, /* ECCurve_SECG_CHAR2_131R2 */
- &ecCurve_SECG_CHAR2_163R1, /* ECCurve_SECG_CHAR2_163R1 */
- &ecCurve_SECG_CHAR2_193R1, /* ECCurve_SECG_CHAR2_193R1 */
- &ecCurve_SECG_CHAR2_193R2, /* ECCurve_SECG_CHAR2_193R2 */
- &ecCurve_SECG_CHAR2_239K1, /* ECCurve_SECG_CHAR2_239K1 */
- &ecCurve_WTLS_1, /* ECCurve_WTLS_1 */
- &ecCurve_WTLS_8, /* ECCurve_WTLS_8 */
- &ecCurve_WTLS_9, /* ECCurve_WTLS_9 */
- NULL /* ECCurve_pastLastCurve */
-};
-
-#endif /* _ECL_CURVE_H */
diff --git a/src/share/native/sun/security/ec/ecl-exp.h b/src/share/native/sun/security/ec/ecl-exp.h
deleted file mode 100644
index ce9a2cf..0000000
--- a/src/share/native/sun/security/ec/ecl-exp.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_EXP_H
-#define _ECL_EXP_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* Curve field type */
-typedef enum {
- ECField_GFp,
- ECField_GF2m
-} ECField;
-
-/* Hexadecimal encoding of curve parameters */
-struct ECCurveParamsStr {
- char *text;
- ECField field;
- unsigned int size;
- char *irr;
- char *curvea;
- char *curveb;
- char *genx;
- char *geny;
- char *order;
- int cofactor;
-};
-typedef struct ECCurveParamsStr ECCurveParams;
-
-/* Named curve parameters */
-typedef enum {
-
- ECCurve_noName = 0,
-
- /* NIST prime curves */
- ECCurve_NIST_P192,
- ECCurve_NIST_P224,
- ECCurve_NIST_P256,
- ECCurve_NIST_P384,
- ECCurve_NIST_P521,
-
- /* NIST binary curves */
- ECCurve_NIST_K163,
- ECCurve_NIST_B163,
- ECCurve_NIST_K233,
- ECCurve_NIST_B233,
- ECCurve_NIST_K283,
- ECCurve_NIST_B283,
- ECCurve_NIST_K409,
- ECCurve_NIST_B409,
- ECCurve_NIST_K571,
- ECCurve_NIST_B571,
-
- /* ANSI X9.62 prime curves */
- /* ECCurve_X9_62_PRIME_192V1 == ECCurve_NIST_P192 */
- ECCurve_X9_62_PRIME_192V2,
- ECCurve_X9_62_PRIME_192V3,
- ECCurve_X9_62_PRIME_239V1,
- ECCurve_X9_62_PRIME_239V2,
- ECCurve_X9_62_PRIME_239V3,
- /* ECCurve_X9_62_PRIME_256V1 == ECCurve_NIST_P256 */
-
- /* ANSI X9.62 binary curves */
- ECCurve_X9_62_CHAR2_PNB163V1,
- ECCurve_X9_62_CHAR2_PNB163V2,
- ECCurve_X9_62_CHAR2_PNB163V3,
- ECCurve_X9_62_CHAR2_PNB176V1,
- ECCurve_X9_62_CHAR2_TNB191V1,
- ECCurve_X9_62_CHAR2_TNB191V2,
- ECCurve_X9_62_CHAR2_TNB191V3,
- ECCurve_X9_62_CHAR2_PNB208W1,
- ECCurve_X9_62_CHAR2_TNB239V1,
- ECCurve_X9_62_CHAR2_TNB239V2,
- ECCurve_X9_62_CHAR2_TNB239V3,
- ECCurve_X9_62_CHAR2_PNB272W1,
- ECCurve_X9_62_CHAR2_PNB304W1,
- ECCurve_X9_62_CHAR2_TNB359V1,
- ECCurve_X9_62_CHAR2_PNB368W1,
- ECCurve_X9_62_CHAR2_TNB431R1,
-
- /* SEC2 prime curves */
- ECCurve_SECG_PRIME_112R1,
- ECCurve_SECG_PRIME_112R2,
- ECCurve_SECG_PRIME_128R1,
- ECCurve_SECG_PRIME_128R2,
- ECCurve_SECG_PRIME_160K1,
- ECCurve_SECG_PRIME_160R1,
- ECCurve_SECG_PRIME_160R2,
- ECCurve_SECG_PRIME_192K1,
- /* ECCurve_SECG_PRIME_192R1 == ECCurve_NIST_P192 */
- ECCurve_SECG_PRIME_224K1,
- /* ECCurve_SECG_PRIME_224R1 == ECCurve_NIST_P224 */
- ECCurve_SECG_PRIME_256K1,
- /* ECCurve_SECG_PRIME_256R1 == ECCurve_NIST_P256 */
- /* ECCurve_SECG_PRIME_384R1 == ECCurve_NIST_P384 */
- /* ECCurve_SECG_PRIME_521R1 == ECCurve_NIST_P521 */
-
- /* SEC2 binary curves */
- ECCurve_SECG_CHAR2_113R1,
- ECCurve_SECG_CHAR2_113R2,
- ECCurve_SECG_CHAR2_131R1,
- ECCurve_SECG_CHAR2_131R2,
- /* ECCurve_SECG_CHAR2_163K1 == ECCurve_NIST_K163 */
- ECCurve_SECG_CHAR2_163R1,
- /* ECCurve_SECG_CHAR2_163R2 == ECCurve_NIST_B163 */
- ECCurve_SECG_CHAR2_193R1,
- ECCurve_SECG_CHAR2_193R2,
- /* ECCurve_SECG_CHAR2_233K1 == ECCurve_NIST_K233 */
- /* ECCurve_SECG_CHAR2_233R1 == ECCurve_NIST_B233 */
- ECCurve_SECG_CHAR2_239K1,
- /* ECCurve_SECG_CHAR2_283K1 == ECCurve_NIST_K283 */
- /* ECCurve_SECG_CHAR2_283R1 == ECCurve_NIST_B283 */
- /* ECCurve_SECG_CHAR2_409K1 == ECCurve_NIST_K409 */
- /* ECCurve_SECG_CHAR2_409R1 == ECCurve_NIST_B409 */
- /* ECCurve_SECG_CHAR2_571K1 == ECCurve_NIST_K571 */
- /* ECCurve_SECG_CHAR2_571R1 == ECCurve_NIST_B571 */
-
- /* WTLS curves */
- ECCurve_WTLS_1,
- /* there is no WTLS 2 curve */
- /* ECCurve_WTLS_3 == ECCurve_NIST_K163 */
- /* ECCurve_WTLS_4 == ECCurve_SECG_CHAR2_113R1 */
- /* ECCurve_WTLS_5 == ECCurve_X9_62_CHAR2_PNB163V1 */
- /* ECCurve_WTLS_6 == ECCurve_SECG_PRIME_112R1 */
- /* ECCurve_WTLS_7 == ECCurve_SECG_PRIME_160R1 */
- ECCurve_WTLS_8,
- ECCurve_WTLS_9,
- /* ECCurve_WTLS_10 == ECCurve_NIST_K233 */
- /* ECCurve_WTLS_11 == ECCurve_NIST_B233 */
- /* ECCurve_WTLS_12 == ECCurve_NIST_P224 */
-
- ECCurve_pastLastCurve
-} ECCurveName;
-
-/* Aliased named curves */
-
-#define ECCurve_X9_62_PRIME_192V1 ECCurve_NIST_P192
-#define ECCurve_X9_62_PRIME_256V1 ECCurve_NIST_P256
-#define ECCurve_SECG_PRIME_192R1 ECCurve_NIST_P192
-#define ECCurve_SECG_PRIME_224R1 ECCurve_NIST_P224
-#define ECCurve_SECG_PRIME_256R1 ECCurve_NIST_P256
-#define ECCurve_SECG_PRIME_384R1 ECCurve_NIST_P384
-#define ECCurve_SECG_PRIME_521R1 ECCurve_NIST_P521
-#define ECCurve_SECG_CHAR2_163K1 ECCurve_NIST_K163
-#define ECCurve_SECG_CHAR2_163R2 ECCurve_NIST_B163
-#define ECCurve_SECG_CHAR2_233K1 ECCurve_NIST_K233
-#define ECCurve_SECG_CHAR2_233R1 ECCurve_NIST_B233
-#define ECCurve_SECG_CHAR2_283K1 ECCurve_NIST_K283
-#define ECCurve_SECG_CHAR2_283R1 ECCurve_NIST_B283
-#define ECCurve_SECG_CHAR2_409K1 ECCurve_NIST_K409
-#define ECCurve_SECG_CHAR2_409R1 ECCurve_NIST_B409
-#define ECCurve_SECG_CHAR2_571K1 ECCurve_NIST_K571
-#define ECCurve_SECG_CHAR2_571R1 ECCurve_NIST_B571
-#define ECCurve_WTLS_3 ECCurve_NIST_K163
-#define ECCurve_WTLS_4 ECCurve_SECG_CHAR2_113R1
-#define ECCurve_WTLS_5 ECCurve_X9_62_CHAR2_PNB163V1
-#define ECCurve_WTLS_6 ECCurve_SECG_PRIME_112R1
-#define ECCurve_WTLS_7 ECCurve_SECG_PRIME_160R1
-#define ECCurve_WTLS_10 ECCurve_NIST_K233
-#define ECCurve_WTLS_11 ECCurve_NIST_B233
-#define ECCurve_WTLS_12 ECCurve_NIST_P224
-
-#endif /* _ECL_EXP_H */
diff --git a/src/share/native/sun/security/ec/ecl-priv.h b/src/share/native/sun/security/ec/ecl-priv.h
deleted file mode 100644
index 12caaf7..0000000
--- a/src/share/native/sun/security/ec/ecl-priv.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Stephen Fung <fungstep@hotmail.com> and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_PRIV_H
-#define _ECL_PRIV_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl.h"
-#include "mpi.h"
-#include "mplogic.h"
-
-/* MAX_FIELD_SIZE_DIGITS is the maximum size of field element supported */
-/* the following needs to go away... */
-#if defined(MP_USE_LONG_LONG_DIGIT) || defined(MP_USE_LONG_DIGIT)
-#define ECL_SIXTY_FOUR_BIT
-#else
-#define ECL_THIRTY_TWO_BIT
-#endif
-
-#define ECL_CURVE_DIGITS(curve_size_in_bits) \
- (((curve_size_in_bits)+(sizeof(mp_digit)*8-1))/(sizeof(mp_digit)*8))
-#define ECL_BITS (sizeof(mp_digit)*8)
-#define ECL_MAX_FIELD_SIZE_DIGITS (80/sizeof(mp_digit))
-
-/* Gets the i'th bit in the binary representation of a. If i >= length(a),
- * then return 0. (The above behaviour differs from mpl_get_bit, which
- * causes an error if i >= length(a).) */
-#define MP_GET_BIT(a, i) \
- ((i) >= mpl_significant_bits((a))) ? 0 : mpl_get_bit((a), (i))
-
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
-#define MP_ADD_CARRY(a1, a2, s, cin, cout) \
- { mp_word w; \
- w = ((mp_word)(cin)) + (a1) + (a2); \
- s = ACCUM(w); \
- cout = CARRYOUT(w); }
-
-#define MP_SUB_BORROW(a1, a2, s, bin, bout) \
- { mp_word w; \
- w = ((mp_word)(a1)) - (a2) - (bin); \
- s = ACCUM(w); \
- bout = (w >> MP_DIGIT_BIT) & 1; }
-
-#else
-/* NOTE,
- * cin and cout could be the same variable.
- * bin and bout could be the same variable.
- * a1 or a2 and s could be the same variable.
- * don't trash those outputs until their respective inputs have
- * been read. */
-#define MP_ADD_CARRY(a1, a2, s, cin, cout) \
- { mp_digit tmp,sum; \
- tmp = (a1); \
- sum = tmp + (a2); \
- tmp = (sum < tmp); /* detect overflow */ \
- s = sum += (cin); \
- cout = tmp + (sum < (cin)); }
-
-#define MP_SUB_BORROW(a1, a2, s, bin, bout) \
- { mp_digit tmp; \
- tmp = (a1); \
- s = tmp - (a2); \
- tmp = (s > tmp); /* detect borrow */ \
- if ((bin) && !s--) tmp++; \
- bout = tmp; }
-#endif
-
-
-struct GFMethodStr;
-typedef struct GFMethodStr GFMethod;
-struct GFMethodStr {
- /* Indicates whether the structure was constructed from dynamic memory
- * or statically created. */
- int constructed;
- /* Irreducible that defines the field. For prime fields, this is the
- * prime p. For binary polynomial fields, this is the bitstring
- * representation of the irreducible polynomial. */
- mp_int irr;
- /* For prime fields, the value irr_arr[0] is the number of bits in the
- * field. For binary polynomial fields, the irreducible polynomial
- * f(t) is represented as an array of unsigned int[], where f(t) is
- * of the form: f(t) = t^p[0] + t^p[1] + ... + t^p[4] where m = p[0]
- * > p[1] > ... > p[4] = 0. */
- unsigned int irr_arr[5];
- /* Field arithmetic methods. All methods (except field_enc and
- * field_dec) are assumed to take field-encoded parameters and return
- * field-encoded values. All methods (except field_enc and field_dec)
- * are required to be implemented. */
- mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
- mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth);
- mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
- mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth);
- mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
- mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth);
- mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
- mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth);
- mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth);
- /* Extra storage for implementation-specific data. Any memory
- * allocated to these extra fields will be cleared by extra_free. */
- void *extra1;
- void *extra2;
- void (*extra_free) (GFMethod *meth);
-};
-
-/* Construct generic GFMethods. */
-GFMethod *GFMethod_consGFp(const mp_int *irr);
-GFMethod *GFMethod_consGFp_mont(const mp_int *irr);
-GFMethod *GFMethod_consGF2m(const mp_int *irr,
- const unsigned int irr_arr[5]);
-/* Free the memory allocated (if any) to a GFMethod object. */
-void GFMethod_free(GFMethod *meth);
-
-struct ECGroupStr {
- /* Indicates whether the structure was constructed from dynamic memory
- * or statically created. */
- int constructed;
- /* Field definition and arithmetic. */
- GFMethod *meth;
- /* Textual representation of curve name, if any. */
- char *text;
-#ifdef _KERNEL
- int text_len;
-#endif
- /* Curve parameters, field-encoded. */
- mp_int curvea, curveb;
- /* x and y coordinates of the base point, field-encoded. */
- mp_int genx, geny;
- /* Order and cofactor of the base point. */
- mp_int order;
- int cofactor;
- /* Point arithmetic methods. All methods are assumed to take
- * field-encoded parameters and return field-encoded values. All
- * methods (except base_point_mul and points_mul) are required to be
- * implemented. */
- mp_err (*point_add) (const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
- mp_err (*point_sub) (const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
- mp_err (*point_dbl) (const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
- mp_err (*point_mul) (const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
- mp_err (*base_point_mul) (const mp_int *n, mp_int *rx, mp_int *ry,
- const ECGroup *group);
- mp_err (*points_mul) (const mp_int *k1, const mp_int *k2,
- const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
- mp_err (*validate_point) (const mp_int *px, const mp_int *py, const ECGroup *group);
- /* Extra storage for implementation-specific data. Any memory
- * allocated to these extra fields will be cleared by extra_free. */
- void *extra1;
- void *extra2;
- void (*extra_free) (ECGroup *group);
-};
-
-/* Wrapper functions for generic prime field arithmetic. */
-mp_err ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-
-/* fixed length in-line adds. Count is in words */
-mp_err ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-
-mp_err ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-/* Wrapper functions for generic binary polynomial field arithmetic. */
-mp_err ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-
-/* Montgomery prime field arithmetic. */
-mp_err ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth);
-mp_err ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-mp_err ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth);
-void ec_GFp_extra_free_mont(GFMethod *meth);
-
-/* point multiplication */
-mp_err ec_pts_mul_basic(const mp_int *k1, const mp_int *k2,
- const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-mp_err ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2,
- const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should
- * be an array of signed char's to output to, bitsize should be the number
- * of bits of out, in is the original scalar, and w is the window size.
- * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A.
- * Menezes, "Software implementation of elliptic curve cryptography over
- * binary fields", Proc. CHES 2000. */
-mp_err ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in,
- int w);
-
-/* Optimized field arithmetic */
-mp_err ec_group_set_gfp192(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp224(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp256(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp384(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gfp521(ECGroup *group, ECCurveName);
-mp_err ec_group_set_gf2m163(ECGroup *group, ECCurveName name);
-mp_err ec_group_set_gf2m193(ECGroup *group, ECCurveName name);
-mp_err ec_group_set_gf2m233(ECGroup *group, ECCurveName name);
-
-/* Optimized floating-point arithmetic */
-#ifdef ECL_USE_FP
-mp_err ec_group_set_secp160r1_fp(ECGroup *group);
-mp_err ec_group_set_nistp192_fp(ECGroup *group);
-mp_err ec_group_set_nistp224_fp(ECGroup *group);
-#endif
-
-#endif /* _ECL_PRIV_H */
diff --git a/src/share/native/sun/security/ec/ecl.c b/src/share/native/sun/security/ec/ecl.c
deleted file mode 100644
index 7089a6d..0000000
--- a/src/share/native/sun/security/ec/ecl.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "ecl.h"
-#include "ecl-priv.h"
-#include "ec2.h"
-#include "ecp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-/* Allocate memory for a new ECGroup object. */
-ECGroup *
-ECGroup_new(int kmflag)
-{
- mp_err res = MP_OKAY;
- ECGroup *group;
-#ifdef _KERNEL
- group = (ECGroup *) kmem_alloc(sizeof(ECGroup), kmflag);
-#else
- group = (ECGroup *) malloc(sizeof(ECGroup));
-#endif
- if (group == NULL)
- return NULL;
- group->constructed = MP_YES;
- group->meth = NULL;
- group->text = NULL;
- MP_DIGITS(&group->curvea) = 0;
- MP_DIGITS(&group->curveb) = 0;
- MP_DIGITS(&group->genx) = 0;
- MP_DIGITS(&group->geny) = 0;
- MP_DIGITS(&group->order) = 0;
- group->base_point_mul = NULL;
- group->points_mul = NULL;
- group->validate_point = NULL;
- group->extra1 = NULL;
- group->extra2 = NULL;
- group->extra_free = NULL;
- MP_CHECKOK(mp_init(&group->curvea, kmflag));
- MP_CHECKOK(mp_init(&group->curveb, kmflag));
- MP_CHECKOK(mp_init(&group->genx, kmflag));
- MP_CHECKOK(mp_init(&group->geny, kmflag));
- MP_CHECKOK(mp_init(&group->order, kmflag));
-
- CLEANUP:
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-
-/* Construct a generic ECGroup for elliptic curves over prime fields. */
-ECGroup *
-ECGroup_consGFp(const mp_int *irr, const mp_int *curvea,
- const mp_int *curveb, const mp_int *genx,
- const mp_int *geny, const mp_int *order, int cofactor)
-{
- mp_err res = MP_OKAY;
- ECGroup *group = NULL;
-
- group = ECGroup_new(FLAG(irr));
- if (group == NULL)
- return NULL;
-
- group->meth = GFMethod_consGFp(irr);
- if (group->meth == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
- MP_CHECKOK(mp_copy(curvea, &group->curvea));
- MP_CHECKOK(mp_copy(curveb, &group->curveb));
- MP_CHECKOK(mp_copy(genx, &group->genx));
- MP_CHECKOK(mp_copy(geny, &group->geny));
- MP_CHECKOK(mp_copy(order, &group->order));
- group->cofactor = cofactor;
- group->point_add = &ec_GFp_pt_add_aff;
- group->point_sub = &ec_GFp_pt_sub_aff;
- group->point_dbl = &ec_GFp_pt_dbl_aff;
- group->point_mul = &ec_GFp_pt_mul_jm_wNAF;
- group->base_point_mul = NULL;
- group->points_mul = &ec_GFp_pts_mul_jac;
- group->validate_point = &ec_GFp_validate_point;
-
- CLEANUP:
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-
-/* Construct a generic ECGroup for elliptic curves over prime fields with
- * field arithmetic implemented in Montgomery coordinates. */
-ECGroup *
-ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea,
- const mp_int *curveb, const mp_int *genx,
- const mp_int *geny, const mp_int *order, int cofactor)
-{
- mp_err res = MP_OKAY;
- ECGroup *group = NULL;
-
- group = ECGroup_new(FLAG(irr));
- if (group == NULL)
- return NULL;
-
- group->meth = GFMethod_consGFp_mont(irr);
- if (group->meth == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
- MP_CHECKOK(group->meth->
- field_enc(curvea, &group->curvea, group->meth));
- MP_CHECKOK(group->meth->
- field_enc(curveb, &group->curveb, group->meth));
- MP_CHECKOK(group->meth->field_enc(genx, &group->genx, group->meth));
- MP_CHECKOK(group->meth->field_enc(geny, &group->geny, group->meth));
- MP_CHECKOK(mp_copy(order, &group->order));
- group->cofactor = cofactor;
- group->point_add = &ec_GFp_pt_add_aff;
- group->point_sub = &ec_GFp_pt_sub_aff;
- group->point_dbl = &ec_GFp_pt_dbl_aff;
- group->point_mul = &ec_GFp_pt_mul_jm_wNAF;
- group->base_point_mul = NULL;
- group->points_mul = &ec_GFp_pts_mul_jac;
- group->validate_point = &ec_GFp_validate_point;
-
- CLEANUP:
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
-/* Construct a generic ECGroup for elliptic curves over binary polynomial
- * fields. */
-ECGroup *
-ECGroup_consGF2m(const mp_int *irr, const unsigned int irr_arr[5],
- const mp_int *curvea, const mp_int *curveb,
- const mp_int *genx, const mp_int *geny,
- const mp_int *order, int cofactor)
-{
- mp_err res = MP_OKAY;
- ECGroup *group = NULL;
-
- group = ECGroup_new(FLAG(irr));
- if (group == NULL)
- return NULL;
-
- group->meth = GFMethod_consGF2m(irr, irr_arr);
- if (group->meth == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
- MP_CHECKOK(mp_copy(curvea, &group->curvea));
- MP_CHECKOK(mp_copy(curveb, &group->curveb));
- MP_CHECKOK(mp_copy(genx, &group->genx));
- MP_CHECKOK(mp_copy(geny, &group->geny));
- MP_CHECKOK(mp_copy(order, &group->order));
- group->cofactor = cofactor;
- group->point_add = &ec_GF2m_pt_add_aff;
- group->point_sub = &ec_GF2m_pt_sub_aff;
- group->point_dbl = &ec_GF2m_pt_dbl_aff;
- group->point_mul = &ec_GF2m_pt_mul_mont;
- group->base_point_mul = NULL;
- group->points_mul = &ec_pts_mul_basic;
- group->validate_point = &ec_GF2m_validate_point;
-
- CLEANUP:
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-#endif
-
-/* Construct ECGroup from hex parameters and name, if any. Called by
- * ECGroup_fromHex and ECGroup_fromName. */
-ECGroup *
-ecgroup_fromNameAndHex(const ECCurveName name,
- const ECCurveParams * params, int kmflag)
-{
- mp_int irr, curvea, curveb, genx, geny, order;
- int bits;
- ECGroup *group = NULL;
- mp_err res = MP_OKAY;
-
- /* initialize values */
- MP_DIGITS(&irr) = 0;
- MP_DIGITS(&curvea) = 0;
- MP_DIGITS(&curveb) = 0;
- MP_DIGITS(&genx) = 0;
- MP_DIGITS(&geny) = 0;
- MP_DIGITS(&order) = 0;
- MP_CHECKOK(mp_init(&irr, kmflag));
- MP_CHECKOK(mp_init(&curvea, kmflag));
- MP_CHECKOK(mp_init(&curveb, kmflag));
- MP_CHECKOK(mp_init(&genx, kmflag));
- MP_CHECKOK(mp_init(&geny, kmflag));
- MP_CHECKOK(mp_init(&order, kmflag));
- MP_CHECKOK(mp_read_radix(&irr, params->irr, 16));
- MP_CHECKOK(mp_read_radix(&curvea, params->curvea, 16));
- MP_CHECKOK(mp_read_radix(&curveb, params->curveb, 16));
- MP_CHECKOK(mp_read_radix(&genx, params->genx, 16));
- MP_CHECKOK(mp_read_radix(&geny, params->geny, 16));
- MP_CHECKOK(mp_read_radix(&order, params->order, 16));
-
- /* determine number of bits */
- bits = mpl_significant_bits(&irr) - 1;
- if (bits < MP_OKAY) {
- res = bits;
- goto CLEANUP;
- }
-
- /* determine which optimizations (if any) to use */
- if (params->field == ECField_GFp) {
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
- switch (name) {
-#ifdef ECL_USE_FP
- case ECCurve_SECG_PRIME_160R1:
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_secp160r1_fp(group));
- break;
-#endif
- case ECCurve_SECG_PRIME_192R1:
-#ifdef ECL_USE_FP
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_nistp192_fp(group));
-#else
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_gfp192(group, name));
-#endif
- break;
- case ECCurve_SECG_PRIME_224R1:
-#ifdef ECL_USE_FP
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_nistp224_fp(group));
-#else
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_gfp224(group, name));
-#endif
- break;
- case ECCurve_SECG_PRIME_256R1:
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_gfp256(group, name));
- break;
- case ECCurve_SECG_PRIME_521R1:
- group =
- ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- MP_CHECKOK(ec_group_set_gfp521(group, name));
- break;
- default:
- /* use generic arithmetic */
-#endif
- group =
- ECGroup_consGFp_mont(&irr, &curvea, &curveb, &genx, &geny,
- &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
-#ifdef NSS_ECC_MORE_THAN_SUITE_B
- }
- } else if (params->field == ECField_GF2m) {
- group = ECGroup_consGF2m(&irr, NULL, &curvea, &curveb, &genx, &geny, &order, params->cofactor);
- if (group == NULL) { res = MP_UNDEF; goto CLEANUP; }
- if ((name == ECCurve_NIST_K163) ||
- (name == ECCurve_NIST_B163) ||
- (name == ECCurve_SECG_CHAR2_163R1)) {
- MP_CHECKOK(ec_group_set_gf2m163(group, name));
- } else if ((name == ECCurve_SECG_CHAR2_193R1) ||
- (name == ECCurve_SECG_CHAR2_193R2)) {
- MP_CHECKOK(ec_group_set_gf2m193(group, name));
- } else if ((name == ECCurve_NIST_K233) ||
- (name == ECCurve_NIST_B233)) {
- MP_CHECKOK(ec_group_set_gf2m233(group, name));
- }
-#endif
- } else {
- res = MP_UNDEF;
- goto CLEANUP;
- }
-
- /* set name, if any */
- if ((group != NULL) && (params->text != NULL)) {
-#ifdef _KERNEL
- int n = strlen(params->text) + 1;
-
- group->text = kmem_alloc(n, kmflag);
- if (group->text == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
- bcopy(params->text, group->text, n);
- group->text_len = n;
-#else
- group->text = strdup(params->text);
- if (group->text == NULL) {
- res = MP_MEM;
- }
-#endif
- }
-
- CLEANUP:
- mp_clear(&irr);
- mp_clear(&curvea);
- mp_clear(&curveb);
- mp_clear(&genx);
- mp_clear(&geny);
- mp_clear(&order);
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-
-/* Construct ECGroup from hexadecimal representations of parameters. */
-ECGroup *
-ECGroup_fromHex(const ECCurveParams * params, int kmflag)
-{
- return ecgroup_fromNameAndHex(ECCurve_noName, params, kmflag);
-}
-
-/* Construct ECGroup from named parameters. */
-ECGroup *
-ECGroup_fromName(const ECCurveName name, int kmflag)
-{
- ECGroup *group = NULL;
- ECCurveParams *params = NULL;
- mp_err res = MP_OKAY;
-
- params = EC_GetNamedCurveParams(name, kmflag);
- if (params == NULL) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
-
- /* construct actual group */
- group = ecgroup_fromNameAndHex(name, params, kmflag);
- if (group == NULL) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
-
- CLEANUP:
- EC_FreeCurveParams(params);
- if (res != MP_OKAY) {
- ECGroup_free(group);
- return NULL;
- }
- return group;
-}
-
-/* Validates an EC public key as described in Section 5.2.2 of X9.62. */
-mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
- mp_int *py)
-{
- /* 1: Verify that publicValue is not the point at infinity */
- /* 2: Verify that the coordinates of publicValue are elements
- * of the field.
- */
- /* 3: Verify that publicValue is on the curve. */
- /* 4: Verify that the order of the curve times the publicValue
- * is the point at infinity.
- */
- return group->validate_point(px, py, group);
-}
-
-/* Free the memory allocated (if any) to an ECGroup object. */
-void
-ECGroup_free(ECGroup *group)
-{
- if (group == NULL)
- return;
- GFMethod_free(group->meth);
- if (group->constructed == MP_NO)
- return;
- mp_clear(&group->curvea);
- mp_clear(&group->curveb);
- mp_clear(&group->genx);
- mp_clear(&group->geny);
- mp_clear(&group->order);
- if (group->text != NULL)
-#ifdef _KERNEL
- kmem_free(group->text, group->text_len);
-#else
- free(group->text);
-#endif
- if (group->extra_free != NULL)
- group->extra_free(group);
-#ifdef _KERNEL
- kmem_free(group, sizeof (ECGroup));
-#else
- free(group);
-#endif
-}
diff --git a/src/share/native/sun/security/ec/ecl.h b/src/share/native/sun/security/ec/ecl.h
deleted file mode 100644
index 9dcdbc6..0000000
--- a/src/share/native/sun/security/ec/ecl.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECL_H
-#define _ECL_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* Although this is not an exported header file, code which uses elliptic
- * curve point operations will need to include it. */
-
-#include "ecl-exp.h"
-#include "mpi.h"
-
-struct ECGroupStr;
-typedef struct ECGroupStr ECGroup;
-
-/* Construct ECGroup from hexadecimal representations of parameters. */
-ECGroup *ECGroup_fromHex(const ECCurveParams * params, int kmflag);
-
-/* Construct ECGroup from named parameters. */
-ECGroup *ECGroup_fromName(const ECCurveName name, int kmflag);
-
-/* Free an allocated ECGroup. */
-void ECGroup_free(ECGroup *group);
-
-/* Construct ECCurveParams from an ECCurveName */
-ECCurveParams *EC_GetNamedCurveParams(const ECCurveName name, int kmflag);
-
-/* Duplicates an ECCurveParams */
-ECCurveParams *ECCurveParams_dup(const ECCurveParams * params, int kmflag);
-
-/* Free an allocated ECCurveParams */
-void EC_FreeCurveParams(ECCurveParams * params);
-
-/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k * P(x,
- * y). If x, y = NULL, then P is assumed to be the generator (base point)
- * of the group of points on the elliptic curve. Input and output values
- * are assumed to be NOT field-encoded. */
-mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
- const mp_int *py, mp_int *qx, mp_int *qy);
-
-/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Input and output values are assumed to
- * be NOT field-encoded. */
-mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1,
- const mp_int *k2, const mp_int *px, const mp_int *py,
- mp_int *qx, mp_int *qy);
-
-/* Validates an EC public key as described in Section 5.2.2 of X9.62.
- * Returns MP_YES if the public key is valid, MP_NO if the public key
- * is invalid, or an error code if the validation could not be
- * performed. */
-mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
- mp_int *py);
-
-#endif /* _ECL_H */
diff --git a/src/share/native/sun/security/ec/ecl_curve.c b/src/share/native/sun/security/ec/ecl_curve.c
deleted file mode 100644
index d2d2d82..0000000
--- a/src/share/native/sun/security/ec/ecl_curve.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl.h"
-#include "ecl-curve.h"
-#include "ecl-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-#define CHECK(func) if ((func) == NULL) { res = 0; goto CLEANUP; }
-
-/* Duplicates an ECCurveParams */
-ECCurveParams *
-ECCurveParams_dup(const ECCurveParams * params, int kmflag)
-{
- int res = 1;
- ECCurveParams *ret = NULL;
-
-#ifdef _KERNEL
- ret = (ECCurveParams *) kmem_zalloc(sizeof(ECCurveParams), kmflag);
-#else
- CHECK(ret = (ECCurveParams *) calloc(1, sizeof(ECCurveParams)));
-#endif
- if (params->text != NULL) {
-#ifdef _KERNEL
- ret->text = kmem_alloc(strlen(params->text) + 1, kmflag);
- bcopy(params->text, ret->text, strlen(params->text) + 1);
-#else
- CHECK(ret->text = strdup(params->text));
-#endif
- }
- ret->field = params->field;
- ret->size = params->size;
- if (params->irr != NULL) {
-#ifdef _KERNEL
- ret->irr = kmem_alloc(strlen(params->irr) + 1, kmflag);
- bcopy(params->irr, ret->irr, strlen(params->irr) + 1);
-#else
- CHECK(ret->irr = strdup(params->irr));
-#endif
- }
- if (params->curvea != NULL) {
-#ifdef _KERNEL
- ret->curvea = kmem_alloc(strlen(params->curvea) + 1, kmflag);
- bcopy(params->curvea, ret->curvea, strlen(params->curvea) + 1);
-#else
- CHECK(ret->curvea = strdup(params->curvea));
-#endif
- }
- if (params->curveb != NULL) {
-#ifdef _KERNEL
- ret->curveb = kmem_alloc(strlen(params->curveb) + 1, kmflag);
- bcopy(params->curveb, ret->curveb, strlen(params->curveb) + 1);
-#else
- CHECK(ret->curveb = strdup(params->curveb));
-#endif
- }
- if (params->genx != NULL) {
-#ifdef _KERNEL
- ret->genx = kmem_alloc(strlen(params->genx) + 1, kmflag);
- bcopy(params->genx, ret->genx, strlen(params->genx) + 1);
-#else
- CHECK(ret->genx = strdup(params->genx));
-#endif
- }
- if (params->geny != NULL) {
-#ifdef _KERNEL
- ret->geny = kmem_alloc(strlen(params->geny) + 1, kmflag);
- bcopy(params->geny, ret->geny, strlen(params->geny) + 1);
-#else
- CHECK(ret->geny = strdup(params->geny));
-#endif
- }
- if (params->order != NULL) {
-#ifdef _KERNEL
- ret->order = kmem_alloc(strlen(params->order) + 1, kmflag);
- bcopy(params->order, ret->order, strlen(params->order) + 1);
-#else
- CHECK(ret->order = strdup(params->order));
-#endif
- }
- ret->cofactor = params->cofactor;
-
- CLEANUP:
- if (res != 1) {
- EC_FreeCurveParams(ret);
- return NULL;
- }
- return ret;
-}
-
-#undef CHECK
-
-/* Construct ECCurveParams from an ECCurveName */
-ECCurveParams *
-EC_GetNamedCurveParams(const ECCurveName name, int kmflag)
-{
- if ((name <= ECCurve_noName) || (ECCurve_pastLastCurve <= name) ||
- (ecCurve_map[name] == NULL)) {
- return NULL;
- } else {
- return ECCurveParams_dup(ecCurve_map[name], kmflag);
- }
-}
-
-/* Free the memory allocated (if any) to an ECCurveParams object. */
-void
-EC_FreeCurveParams(ECCurveParams * params)
-{
- if (params == NULL)
- return;
- if (params->text != NULL)
-#ifdef _KERNEL
- kmem_free(params->text, strlen(params->text) + 1);
-#else
- free(params->text);
-#endif
- if (params->irr != NULL)
-#ifdef _KERNEL
- kmem_free(params->irr, strlen(params->irr) + 1);
-#else
- free(params->irr);
-#endif
- if (params->curvea != NULL)
-#ifdef _KERNEL
- kmem_free(params->curvea, strlen(params->curvea) + 1);
-#else
- free(params->curvea);
-#endif
- if (params->curveb != NULL)
-#ifdef _KERNEL
- kmem_free(params->curveb, strlen(params->curveb) + 1);
-#else
- free(params->curveb);
-#endif
- if (params->genx != NULL)
-#ifdef _KERNEL
- kmem_free(params->genx, strlen(params->genx) + 1);
-#else
- free(params->genx);
-#endif
- if (params->geny != NULL)
-#ifdef _KERNEL
- kmem_free(params->geny, strlen(params->geny) + 1);
-#else
- free(params->geny);
-#endif
- if (params->order != NULL)
-#ifdef _KERNEL
- kmem_free(params->order, strlen(params->order) + 1);
-#else
- free(params->order);
-#endif
-#ifdef _KERNEL
- kmem_free(params, sizeof(ECCurveParams));
-#else
- free(params);
-#endif
-}
diff --git a/src/share/native/sun/security/ec/ecl_gf.c b/src/share/native/sun/security/ec/ecl_gf.c
deleted file mode 100644
index a651fa8..0000000
--- a/src/share/native/sun/security/ec/ecl_gf.c
+++ /dev/null
@@ -1,1062 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Stephen Fung <fungstep@hotmail.com> and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi.h"
-#include "mp_gf2m.h"
-#include "ecl-priv.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Allocate memory for a new GFMethod object. */
-GFMethod *
-GFMethod_new(int kmflag)
-{
- mp_err res = MP_OKAY;
- GFMethod *meth;
-#ifdef _KERNEL
- meth = (GFMethod *) kmem_alloc(sizeof(GFMethod), kmflag);
-#else
- meth = (GFMethod *) malloc(sizeof(GFMethod));
- if (meth == NULL)
- return NULL;
-#endif
- meth->constructed = MP_YES;
- MP_DIGITS(&meth->irr) = 0;
- meth->extra_free = NULL;
- MP_CHECKOK(mp_init(&meth->irr, kmflag));
-
- CLEANUP:
- if (res != MP_OKAY) {
- GFMethod_free(meth);
- return NULL;
- }
- return meth;
-}
-
-/* Construct a generic GFMethod for arithmetic over prime fields with
- * irreducible irr. */
-GFMethod *
-GFMethod_consGFp(const mp_int *irr)
-{
- mp_err res = MP_OKAY;
- GFMethod *meth = NULL;
-
- meth = GFMethod_new(FLAG(irr));
- if (meth == NULL)
- return NULL;
-
- MP_CHECKOK(mp_copy(irr, &meth->irr));
- meth->irr_arr[0] = mpl_significant_bits(irr);
- meth->irr_arr[1] = meth->irr_arr[2] = meth->irr_arr[3] =
- meth->irr_arr[4] = 0;
- switch(MP_USED(&meth->irr)) {
- /* maybe we need 1 and 2 words here as well?*/
- case 3:
- meth->field_add = &ec_GFp_add_3;
- meth->field_sub = &ec_GFp_sub_3;
- break;
- case 4:
- meth->field_add = &ec_GFp_add_4;
- meth->field_sub = &ec_GFp_sub_4;
- break;
- case 5:
- meth->field_add = &ec_GFp_add_5;
- meth->field_sub = &ec_GFp_sub_5;
- break;
- case 6:
- meth->field_add = &ec_GFp_add_6;
- meth->field_sub = &ec_GFp_sub_6;
- break;
- default:
- meth->field_add = &ec_GFp_add;
- meth->field_sub = &ec_GFp_sub;
- }
- meth->field_neg = &ec_GFp_neg;
- meth->field_mod = &ec_GFp_mod;
- meth->field_mul = &ec_GFp_mul;
- meth->field_sqr = &ec_GFp_sqr;
- meth->field_div = &ec_GFp_div;
- meth->field_enc = NULL;
- meth->field_dec = NULL;
- meth->extra1 = NULL;
- meth->extra2 = NULL;
- meth->extra_free = NULL;
-
- CLEANUP:
- if (res != MP_OKAY) {
- GFMethod_free(meth);
- return NULL;
- }
- return meth;
-}
-
-/* Construct a generic GFMethod for arithmetic over binary polynomial
- * fields with irreducible irr that has array representation irr_arr (see
- * ecl-priv.h for description of the representation). If irr_arr is NULL,
- * then it is constructed from the bitstring representation. */
-GFMethod *
-GFMethod_consGF2m(const mp_int *irr, const unsigned int irr_arr[5])
-{
- mp_err res = MP_OKAY;
- int ret;
- GFMethod *meth = NULL;
-
- meth = GFMethod_new(FLAG(irr));
- if (meth == NULL)
- return NULL;
-
- MP_CHECKOK(mp_copy(irr, &meth->irr));
- if (irr_arr != NULL) {
- /* Irreducible polynomials are either trinomials or pentanomials. */
- meth->irr_arr[0] = irr_arr[0];
- meth->irr_arr[1] = irr_arr[1];
- meth->irr_arr[2] = irr_arr[2];
- if (irr_arr[2] > 0) {
- meth->irr_arr[3] = irr_arr[3];
- meth->irr_arr[4] = irr_arr[4];
- } else {
- meth->irr_arr[3] = meth->irr_arr[4] = 0;
- }
- } else {
- ret = mp_bpoly2arr(irr, meth->irr_arr, 5);
- /* Irreducible polynomials are either trinomials or pentanomials. */
- if ((ret != 5) && (ret != 3)) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
- }
- meth->field_add = &ec_GF2m_add;
- meth->field_neg = &ec_GF2m_neg;
- meth->field_sub = &ec_GF2m_add;
- meth->field_mod = &ec_GF2m_mod;
- meth->field_mul = &ec_GF2m_mul;
- meth->field_sqr = &ec_GF2m_sqr;
- meth->field_div = &ec_GF2m_div;
- meth->field_enc = NULL;
- meth->field_dec = NULL;
- meth->extra1 = NULL;
- meth->extra2 = NULL;
- meth->extra_free = NULL;
-
- CLEANUP:
- if (res != MP_OKAY) {
- GFMethod_free(meth);
- return NULL;
- }
- return meth;
-}
-
-/* Free the memory allocated (if any) to a GFMethod object. */
-void
-GFMethod_free(GFMethod *meth)
-{
- if (meth == NULL)
- return;
- if (meth->constructed == MP_NO)
- return;
- mp_clear(&meth->irr);
- if (meth->extra_free != NULL)
- meth->extra_free(meth);
-#ifdef _KERNEL
- kmem_free(meth, sizeof(GFMethod));
-#else
- free(meth);
-#endif
-}
-
-/* Wrapper functions for generic prime field arithmetic. */
-
-/* Add two field elements. Assumes that 0 <= a, b < meth->irr */
-mp_err
-ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a + b (mod p) */
- mp_err res;
-
- if ((res = mp_add(a, b, r)) != MP_OKAY) {
- return res;
- }
- if (mp_cmp(r, &meth->irr) >= 0) {
- return mp_sub(r, &meth->irr, r);
- }
- return res;
-}
-
-/* Negates a field element. Assumes that 0 <= a < meth->irr */
-mp_err
-ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- /* PRE: 0 <= a < p = meth->irr POST: 0 <= r < p, r = -a (mod p) */
-
- if (mp_cmp_z(a) == 0) {
- mp_zero(r);
- return MP_OKAY;
- }
- return mp_sub(&meth->irr, a, r);
-}
-
-/* Subtracts two field elements. Assumes that 0 <= a, b < meth->irr */
-mp_err
-ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a - b (mod p) */
- res = mp_sub(a, b, r);
- if (res == MP_RANGE) {
- MP_CHECKOK(mp_sub(b, a, r));
- if (mp_cmp_z(r) < 0) {
- MP_CHECKOK(mp_add(r, &meth->irr, r));
- }
- MP_CHECKOK(ec_GFp_neg(r, r, meth));
- }
- if (mp_cmp_z(r) < 0) {
- MP_CHECKOK(mp_add(r, &meth->irr, r));
- }
- CLEANUP:
- return res;
-}
-/*
- * Inline adds for small curve lengths.
- */
-/* 3 words */
-mp_err
-ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a0 = 0, a1 = 0, a2 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0;
- mp_digit carry;
-
- switch(MP_USED(a)) {
- case 3:
- a2 = MP_DIGIT(a,2);
- case 2:
- a1 = MP_DIGIT(a,1);
- case 1:
- a0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 3:
- r2 = MP_DIGIT(b,2);
- case 2:
- r1 = MP_DIGIT(b,1);
- case 1:
- r0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(a0, r0, r0, 0, carry);
- MP_ADD_CARRY(a1, r1, r1, carry, carry);
- MP_ADD_CARRY(a2, r2, r2, carry, carry);
-#else
- __asm__ (
- "xorq %3,%3 \n\t"
- "addq %4,%0 \n\t"
- "adcq %5,%1 \n\t"
- "adcq %6,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry)
- : "r" (a0), "r" (a1), "r" (a2),
- "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
-
- MP_CHECKOK(s_mp_pad(r, 3));
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 3;
-
- /* Do quick 'subract' if we've gone over
- * (add the 2's complement of the curve field) */
- a2 = MP_DIGIT(&meth->irr,2);
- if (carry || r2 > a2 ||
- ((r2 == a2) && mp_cmp(r,&meth->irr) != MP_LT)) {
- a1 = MP_DIGIT(&meth->irr,1);
- a0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, a0, r0, 0, carry);
- MP_SUB_BORROW(r1, a1, r1, carry, carry);
- MP_SUB_BORROW(r2, a2, r2, carry, carry);
-#else
- __asm__ (
- "subq %3,%0 \n\t"
- "sbbq %4,%1 \n\t"
- "sbbq %5,%2 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2)
- : "r" (a0), "r" (a1), "r" (a2),
- "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- }
-
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 4 words */
-mp_err
-ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0;
- mp_digit carry;
-
- switch(MP_USED(a)) {
- case 4:
- a3 = MP_DIGIT(a,3);
- case 3:
- a2 = MP_DIGIT(a,2);
- case 2:
- a1 = MP_DIGIT(a,1);
- case 1:
- a0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 4:
- r3 = MP_DIGIT(b,3);
- case 3:
- r2 = MP_DIGIT(b,2);
- case 2:
- r1 = MP_DIGIT(b,1);
- case 1:
- r0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(a0, r0, r0, 0, carry);
- MP_ADD_CARRY(a1, r1, r1, carry, carry);
- MP_ADD_CARRY(a2, r2, r2, carry, carry);
- MP_ADD_CARRY(a3, r3, r3, carry, carry);
-#else
- __asm__ (
- "xorq %4,%4 \n\t"
- "addq %5,%0 \n\t"
- "adcq %6,%1 \n\t"
- "adcq %7,%2 \n\t"
- "adcq %8,%3 \n\t"
- "adcq $0,%4 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(carry)
- : "r" (a0), "r" (a1), "r" (a2), "r" (a3),
- "0" (r0), "1" (r1), "2" (r2), "3" (r3)
- : "%cc" );
-#endif
-
- MP_CHECKOK(s_mp_pad(r, 4));
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 4;
-
- /* Do quick 'subract' if we've gone over
- * (add the 2's complement of the curve field) */
- a3 = MP_DIGIT(&meth->irr,3);
- if (carry || r3 > a3 ||
- ((r3 == a3) && mp_cmp(r,&meth->irr) != MP_LT)) {
- a2 = MP_DIGIT(&meth->irr,2);
- a1 = MP_DIGIT(&meth->irr,1);
- a0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, a0, r0, 0, carry);
- MP_SUB_BORROW(r1, a1, r1, carry, carry);
- MP_SUB_BORROW(r2, a2, r2, carry, carry);
- MP_SUB_BORROW(r3, a3, r3, carry, carry);
-#else
- __asm__ (
- "subq %4,%0 \n\t"
- "sbbq %5,%1 \n\t"
- "sbbq %6,%2 \n\t"
- "sbbq %7,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3)
- : "r" (a0), "r" (a1), "r" (a2), "r" (a3),
- "0" (r0), "1" (r1), "2" (r2), "3" (r3)
- : "%cc" );
-#endif
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- }
-
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 5 words */
-mp_err
-ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0;
- mp_digit carry;
-
- switch(MP_USED(a)) {
- case 5:
- a4 = MP_DIGIT(a,4);
- case 4:
- a3 = MP_DIGIT(a,3);
- case 3:
- a2 = MP_DIGIT(a,2);
- case 2:
- a1 = MP_DIGIT(a,1);
- case 1:
- a0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 5:
- r4 = MP_DIGIT(b,4);
- case 4:
- r3 = MP_DIGIT(b,3);
- case 3:
- r2 = MP_DIGIT(b,2);
- case 2:
- r1 = MP_DIGIT(b,1);
- case 1:
- r0 = MP_DIGIT(b,0);
- }
-
- MP_ADD_CARRY(a0, r0, r0, 0, carry);
- MP_ADD_CARRY(a1, r1, r1, carry, carry);
- MP_ADD_CARRY(a2, r2, r2, carry, carry);
- MP_ADD_CARRY(a3, r3, r3, carry, carry);
- MP_ADD_CARRY(a4, r4, r4, carry, carry);
-
- MP_CHECKOK(s_mp_pad(r, 5));
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 5;
-
- /* Do quick 'subract' if we've gone over
- * (add the 2's complement of the curve field) */
- a4 = MP_DIGIT(&meth->irr,4);
- if (carry || r4 > a4 ||
- ((r4 == a4) && mp_cmp(r,&meth->irr) != MP_LT)) {
- a3 = MP_DIGIT(&meth->irr,3);
- a2 = MP_DIGIT(&meth->irr,2);
- a1 = MP_DIGIT(&meth->irr,1);
- a0 = MP_DIGIT(&meth->irr,0);
- MP_SUB_BORROW(r0, a0, r0, 0, carry);
- MP_SUB_BORROW(r1, a1, r1, carry, carry);
- MP_SUB_BORROW(r2, a2, r2, carry, carry);
- MP_SUB_BORROW(r3, a3, r3, carry, carry);
- MP_SUB_BORROW(r4, a4, r4, carry, carry);
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- }
-
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 6 words */
-mp_err
-ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0;
- mp_digit carry;
-
- switch(MP_USED(a)) {
- case 6:
- a5 = MP_DIGIT(a,5);
- case 5:
- a4 = MP_DIGIT(a,4);
- case 4:
- a3 = MP_DIGIT(a,3);
- case 3:
- a2 = MP_DIGIT(a,2);
- case 2:
- a1 = MP_DIGIT(a,1);
- case 1:
- a0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 6:
- r5 = MP_DIGIT(b,5);
- case 5:
- r4 = MP_DIGIT(b,4);
- case 4:
- r3 = MP_DIGIT(b,3);
- case 3:
- r2 = MP_DIGIT(b,2);
- case 2:
- r1 = MP_DIGIT(b,1);
- case 1:
- r0 = MP_DIGIT(b,0);
- }
-
- MP_ADD_CARRY(a0, r0, r0, 0, carry);
- MP_ADD_CARRY(a1, r1, r1, carry, carry);
- MP_ADD_CARRY(a2, r2, r2, carry, carry);
- MP_ADD_CARRY(a3, r3, r3, carry, carry);
- MP_ADD_CARRY(a4, r4, r4, carry, carry);
- MP_ADD_CARRY(a5, r5, r5, carry, carry);
-
- MP_CHECKOK(s_mp_pad(r, 6));
- MP_DIGIT(r, 5) = r5;
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 6;
-
- /* Do quick 'subract' if we've gone over
- * (add the 2's complement of the curve field) */
- a5 = MP_DIGIT(&meth->irr,5);
- if (carry || r5 > a5 ||
- ((r5 == a5) && mp_cmp(r,&meth->irr) != MP_LT)) {
- a4 = MP_DIGIT(&meth->irr,4);
- a3 = MP_DIGIT(&meth->irr,3);
- a2 = MP_DIGIT(&meth->irr,2);
- a1 = MP_DIGIT(&meth->irr,1);
- a0 = MP_DIGIT(&meth->irr,0);
- MP_SUB_BORROW(r0, a0, r0, 0, carry);
- MP_SUB_BORROW(r1, a1, r1, carry, carry);
- MP_SUB_BORROW(r2, a2, r2, carry, carry);
- MP_SUB_BORROW(r3, a3, r3, carry, carry);
- MP_SUB_BORROW(r4, a4, r4, carry, carry);
- MP_SUB_BORROW(r5, a5, r5, carry, carry);
- MP_DIGIT(r, 5) = r5;
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- }
-
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/*
- * The following subraction functions do in-line subractions based
- * on our curve size.
- *
- * ... 3 words
- */
-mp_err
-ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit b0 = 0, b1 = 0, b2 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0;
- mp_digit borrow;
-
- switch(MP_USED(a)) {
- case 3:
- r2 = MP_DIGIT(a,2);
- case 2:
- r1 = MP_DIGIT(a,1);
- case 1:
- r0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 3:
- b2 = MP_DIGIT(b,2);
- case 2:
- b1 = MP_DIGIT(b,1);
- case 1:
- b0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, b0, r0, 0, borrow);
- MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-#else
- __asm__ (
- "xorq %3,%3 \n\t"
- "subq %4,%0 \n\t"
- "sbbq %5,%1 \n\t"
- "sbbq %6,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r" (borrow)
- : "r" (b0), "r" (b1), "r" (b2),
- "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
-
- /* Do quick 'add' if we've gone under 0
- * (subtract the 2's complement of the curve field) */
- if (borrow) {
- b2 = MP_DIGIT(&meth->irr,2);
- b1 = MP_DIGIT(&meth->irr,1);
- b0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(b0, r0, r0, 0, borrow);
- MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
- MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
-#else
- __asm__ (
- "addq %3,%0 \n\t"
- "adcq %4,%1 \n\t"
- "adcq %5,%2 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2)
- : "r" (b0), "r" (b1), "r" (b2),
- "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
- }
-
-#ifdef MPI_AMD64_ADD
- /* compiler fakeout? */
- if ((r2 == b0) && (r1 == b0) && (r0 == b0)) {
- MP_CHECKOK(s_mp_pad(r, 4));
- }
-#endif
- MP_CHECKOK(s_mp_pad(r, 3));
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 3;
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 4 words */
-mp_err
-ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0;
- mp_digit borrow;
-
- switch(MP_USED(a)) {
- case 4:
- r3 = MP_DIGIT(a,3);
- case 3:
- r2 = MP_DIGIT(a,2);
- case 2:
- r1 = MP_DIGIT(a,1);
- case 1:
- r0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 4:
- b3 = MP_DIGIT(b,3);
- case 3:
- b2 = MP_DIGIT(b,2);
- case 2:
- b1 = MP_DIGIT(b,1);
- case 1:
- b0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, b0, r0, 0, borrow);
- MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
- MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
-#else
- __asm__ (
- "xorq %4,%4 \n\t"
- "subq %5,%0 \n\t"
- "sbbq %6,%1 \n\t"
- "sbbq %7,%2 \n\t"
- "sbbq %8,%3 \n\t"
- "adcq $0,%4 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r" (borrow)
- : "r" (b0), "r" (b1), "r" (b2), "r" (b3),
- "0" (r0), "1" (r1), "2" (r2), "3" (r3)
- : "%cc" );
-#endif
-
- /* Do quick 'add' if we've gone under 0
- * (subtract the 2's complement of the curve field) */
- if (borrow) {
- b3 = MP_DIGIT(&meth->irr,3);
- b2 = MP_DIGIT(&meth->irr,2);
- b1 = MP_DIGIT(&meth->irr,1);
- b0 = MP_DIGIT(&meth->irr,0);
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(b0, r0, r0, 0, borrow);
- MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
- MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
- MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
-#else
- __asm__ (
- "addq %4,%0 \n\t"
- "adcq %5,%1 \n\t"
- "adcq %6,%2 \n\t"
- "adcq %7,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3)
- : "r" (b0), "r" (b1), "r" (b2), "r" (b3),
- "0" (r0), "1" (r1), "2" (r2), "3" (r3)
- : "%cc" );
-#endif
- }
-#ifdef MPI_AMD64_ADD
- /* compiler fakeout? */
- if ((r3 == b0) && (r1 == b0) && (r0 == b0)) {
- MP_CHECKOK(s_mp_pad(r, 4));
- }
-#endif
- MP_CHECKOK(s_mp_pad(r, 4));
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 4;
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 5 words */
-mp_err
-ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0;
- mp_digit borrow;
-
- switch(MP_USED(a)) {
- case 5:
- r4 = MP_DIGIT(a,4);
- case 4:
- r3 = MP_DIGIT(a,3);
- case 3:
- r2 = MP_DIGIT(a,2);
- case 2:
- r1 = MP_DIGIT(a,1);
- case 1:
- r0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 5:
- b4 = MP_DIGIT(b,4);
- case 4:
- b3 = MP_DIGIT(b,3);
- case 3:
- b2 = MP_DIGIT(b,2);
- case 2:
- b1 = MP_DIGIT(b,1);
- case 1:
- b0 = MP_DIGIT(b,0);
- }
-
- MP_SUB_BORROW(r0, b0, r0, 0, borrow);
- MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
- MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
- MP_SUB_BORROW(r4, b4, r4, borrow, borrow);
-
- /* Do quick 'add' if we've gone under 0
- * (subtract the 2's complement of the curve field) */
- if (borrow) {
- b4 = MP_DIGIT(&meth->irr,4);
- b3 = MP_DIGIT(&meth->irr,3);
- b2 = MP_DIGIT(&meth->irr,2);
- b1 = MP_DIGIT(&meth->irr,1);
- b0 = MP_DIGIT(&meth->irr,0);
- MP_ADD_CARRY(b0, r0, r0, 0, borrow);
- MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
- MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
- MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
- }
- MP_CHECKOK(s_mp_pad(r, 5));
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 5;
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-/* 6 words */
-mp_err
-ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0, b5 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0;
- mp_digit borrow;
-
- switch(MP_USED(a)) {
- case 6:
- r5 = MP_DIGIT(a,5);
- case 5:
- r4 = MP_DIGIT(a,4);
- case 4:
- r3 = MP_DIGIT(a,3);
- case 3:
- r2 = MP_DIGIT(a,2);
- case 2:
- r1 = MP_DIGIT(a,1);
- case 1:
- r0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 6:
- b5 = MP_DIGIT(b,5);
- case 5:
- b4 = MP_DIGIT(b,4);
- case 4:
- b3 = MP_DIGIT(b,3);
- case 3:
- b2 = MP_DIGIT(b,2);
- case 2:
- b1 = MP_DIGIT(b,1);
- case 1:
- b0 = MP_DIGIT(b,0);
- }
-
- MP_SUB_BORROW(r0, b0, r0, 0, borrow);
- MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
- MP_SUB_BORROW(r3, b3, r3, borrow, borrow);
- MP_SUB_BORROW(r4, b4, r4, borrow, borrow);
- MP_SUB_BORROW(r5, b5, r5, borrow, borrow);
-
- /* Do quick 'add' if we've gone under 0
- * (subtract the 2's complement of the curve field) */
- if (borrow) {
- b5 = MP_DIGIT(&meth->irr,5);
- b4 = MP_DIGIT(&meth->irr,4);
- b3 = MP_DIGIT(&meth->irr,3);
- b2 = MP_DIGIT(&meth->irr,2);
- b1 = MP_DIGIT(&meth->irr,1);
- b0 = MP_DIGIT(&meth->irr,0);
- MP_ADD_CARRY(b0, r0, r0, 0, borrow);
- MP_ADD_CARRY(b1, r1, r1, borrow, borrow);
- MP_ADD_CARRY(b2, r2, r2, borrow, borrow);
- MP_ADD_CARRY(b3, r3, r3, borrow, borrow);
- MP_ADD_CARRY(b4, r4, r4, borrow, borrow);
- }
-
- MP_CHECKOK(s_mp_pad(r, 6));
- MP_DIGIT(r, 5) = r5;
- MP_DIGIT(r, 4) = r4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 6;
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-
-/* Reduces an integer to a field element. */
-mp_err
-ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- return mp_mod(a, &meth->irr, r);
-}
-
-/* Multiplies two field elements. */
-mp_err
-ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- return mp_mulmod(a, b, &meth->irr, r);
-}
-
-/* Squares a field element. */
-mp_err
-ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- return mp_sqrmod(a, &meth->irr, r);
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_int t;
-
- /* If a is NULL, then return the inverse of b, otherwise return a/b. */
- if (a == NULL) {
- return mp_invmod(b, &meth->irr, r);
- } else {
- /* MPI doesn't support divmod, so we implement it using invmod and
- * mulmod. */
- MP_CHECKOK(mp_init(&t, FLAG(b)));
- MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
- MP_CHECKOK(mp_mulmod(a, &t, &meth->irr, r));
- CLEANUP:
- mp_clear(&t);
- return res;
- }
-}
-
-/* Wrapper functions for generic binary polynomial field arithmetic. */
-
-/* Adds two field elements. */
-mp_err
-ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- return mp_badd(a, b, r);
-}
-
-/* Negates a field element. Note that for binary polynomial fields, the
- * negation of a field element is the field element itself. */
-mp_err
-ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- if (a == r) {
- return MP_OKAY;
- } else {
- return mp_copy(a, r);
- }
-}
-
-/* Reduces a binary polynomial to a field element. */
-mp_err
-ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- return mp_bmod(a, meth->irr_arr, r);
-}
-
-/* Multiplies two field elements. */
-mp_err
-ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- return mp_bmulmod(a, b, meth->irr_arr, r);
-}
-
-/* Squares a field element. */
-mp_err
-ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- return mp_bsqrmod(a, meth->irr_arr, r);
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_int t;
-
- /* If a is NULL, then return the inverse of b, otherwise return a/b. */
- if (a == NULL) {
- /* The GF(2^m) portion of MPI doesn't support invmod, so we
- * compute 1/b. */
- MP_CHECKOK(mp_init(&t, FLAG(b)));
- MP_CHECKOK(mp_set_int(&t, 1));
- MP_CHECKOK(mp_bdivmod(&t, b, &meth->irr, meth->irr_arr, r));
- CLEANUP:
- mp_clear(&t);
- return res;
- } else {
- return mp_bdivmod(a, b, &meth->irr, meth->irr_arr, r);
- }
-}
diff --git a/src/share/native/sun/security/ec/ecl_mult.c b/src/share/native/sun/security/ec/ecl_mult.c
deleted file mode 100644
index c5a01fa..0000000
--- a/src/share/native/sun/security/ec/ecl_mult.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "ecl.h"
-#include "ecl-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k * P(x,
- * y). If x, y = NULL, then P is assumed to be the generator (base point)
- * of the group of points on the elliptic curve. Input and output values
- * are assumed to be NOT field-encoded. */
-mp_err
-ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry)
-{
- mp_err res = MP_OKAY;
- mp_int kt;
-
- ARGCHK((k != NULL) && (group != NULL), MP_BADARG);
- MP_DIGITS(&kt) = 0;
-
- /* want scalar to be less than or equal to group order */
- if (mp_cmp(k, &group->order) > 0) {
- MP_CHECKOK(mp_init(&kt, FLAG(k)));
- MP_CHECKOK(mp_mod(k, &group->order, &kt));
- } else {
- MP_SIGN(&kt) = MP_ZPOS;
- MP_USED(&kt) = MP_USED(k);
- MP_ALLOC(&kt) = MP_ALLOC(k);
- MP_DIGITS(&kt) = MP_DIGITS(k);
- }
-
- if ((px == NULL) || (py == NULL)) {
- if (group->base_point_mul) {
- MP_CHECKOK(group->base_point_mul(&kt, rx, ry, group));
- } else {
- MP_CHECKOK(group->
- point_mul(&kt, &group->genx, &group->geny, rx, ry,
- group));
- }
- } else {
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(px, rx, group->meth));
- MP_CHECKOK(group->meth->field_enc(py, ry, group->meth));
- MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group));
- } else {
- MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group));
- }
- }
- if (group->meth->field_dec) {
- MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
- }
-
- CLEANUP:
- if (MP_DIGITS(&kt) != MP_DIGITS(k)) {
- mp_clear(&kt);
- }
- return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. */
-mp_err
-ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int sx, sy;
-
- ARGCHK(group != NULL, MP_BADARG);
- ARGCHK(!((k1 == NULL)
- && ((k2 == NULL) || (px == NULL)
- || (py == NULL))), MP_BADARG);
-
- /* if some arguments are not defined used ECPoint_mul */
- if (k1 == NULL) {
- return ECPoint_mul(group, k2, px, py, rx, ry);
- } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
- return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
- }
-
- MP_DIGITS(&sx) = 0;
- MP_DIGITS(&sy) = 0;
- MP_CHECKOK(mp_init(&sx, FLAG(k1)));
- MP_CHECKOK(mp_init(&sy, FLAG(k1)));
-
- MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy));
- MP_CHECKOK(ECPoint_mul(group, k2, px, py, rx, ry));
-
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(&sx, &sx, group->meth));
- MP_CHECKOK(group->meth->field_enc(&sy, &sy, group->meth));
- MP_CHECKOK(group->meth->field_enc(rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_enc(ry, ry, group->meth));
- }
-
- MP_CHECKOK(group->point_add(&sx, &sy, rx, ry, rx, ry, group));
-
- if (group->meth->field_dec) {
- MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
- }
-
- CLEANUP:
- mp_clear(&sx);
- mp_clear(&sy);
- return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. Uses
- * algorithm 15 (simultaneous multiple point multiplication) from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST
- * Elliptic Curves over Prime Fields. */
-mp_err
-ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int precomp[4][4][2];
- const mp_int *a, *b;
- int i, j;
- int ai, bi, d;
-
- ARGCHK(group != NULL, MP_BADARG);
- ARGCHK(!((k1 == NULL)
- && ((k2 == NULL) || (px == NULL)
- || (py == NULL))), MP_BADARG);
-
- /* if some arguments are not defined used ECPoint_mul */
- if (k1 == NULL) {
- return ECPoint_mul(group, k2, px, py, rx, ry);
- } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
- return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
- }
-
- /* initialize precomputation table */
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- MP_DIGITS(&precomp[i][j][0]) = 0;
- MP_DIGITS(&precomp[i][j][1]) = 0;
- }
- }
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- MP_CHECKOK( mp_init_size(&precomp[i][j][0],
- ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
- MP_CHECKOK( mp_init_size(&precomp[i][j][1],
- ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
- }
- }
-
- /* fill precomputation table */
- /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
- if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
- a = k2;
- b = k1;
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->
- field_enc(px, &precomp[1][0][0], group->meth));
- MP_CHECKOK(group->meth->
- field_enc(py, &precomp[1][0][1], group->meth));
- } else {
- MP_CHECKOK(mp_copy(px, &precomp[1][0][0]));
- MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
- }
- MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0]));
- MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1]));
- } else {
- a = k1;
- b = k2;
- MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0]));
- MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1]));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->
- field_enc(px, &precomp[0][1][0], group->meth));
- MP_CHECKOK(group->meth->
- field_enc(py, &precomp[0][1][1], group->meth));
- } else {
- MP_CHECKOK(mp_copy(px, &precomp[0][1][0]));
- MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));
- }
- }
- /* precompute [*][0][*] */
- mp_zero(&precomp[0][0][0]);
- mp_zero(&precomp[0][0][1]);
- MP_CHECKOK(group->
- point_dbl(&precomp[1][0][0], &precomp[1][0][1],
- &precomp[2][0][0], &precomp[2][0][1], group));
- MP_CHECKOK(group->
- point_add(&precomp[1][0][0], &precomp[1][0][1],
- &precomp[2][0][0], &precomp[2][0][1],
- &precomp[3][0][0], &precomp[3][0][1], group));
- /* precompute [*][1][*] */
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][1][0], &precomp[i][1][1], group));
- }
- /* precompute [*][2][*] */
- MP_CHECKOK(group->
- point_dbl(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[0][2][0], &precomp[0][2][1], group));
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][2][0], &precomp[0][2][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][2][0], &precomp[i][2][1], group));
- }
- /* precompute [*][3][*] */
- MP_CHECKOK(group->
- point_add(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[0][2][0], &precomp[0][2][1],
- &precomp[0][3][0], &precomp[0][3][1], group));
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][3][0], &precomp[0][3][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][3][0], &precomp[i][3][1], group));
- }
-
- d = (mpl_significant_bits(a) + 1) / 2;
-
- /* R = inf */
- mp_zero(rx);
- mp_zero(ry);
-
- for (i = d - 1; i >= 0; i--) {
- ai = MP_GET_BIT(a, 2 * i + 1);
- ai <<= 1;
- ai |= MP_GET_BIT(a, 2 * i);
- bi = MP_GET_BIT(b, 2 * i + 1);
- bi <<= 1;
- bi |= MP_GET_BIT(b, 2 * i);
- /* R = 2^2 * R */
- MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group));
- MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group));
- /* R = R + (ai * A + bi * B) */
- MP_CHECKOK(group->
- point_add(rx, ry, &precomp[ai][bi][0],
- &precomp[ai][bi][1], rx, ry, group));
- }
-
- if (group->meth->field_dec) {
- MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
- }
-
- CLEANUP:
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- mp_clear(&precomp[i][j][0]);
- mp_clear(&precomp[i][j][1]);
- }
- }
- return res;
-}
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Input and output values are assumed to be NOT field-encoded. */
-mp_err
-ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
- const mp_int *px, const mp_int *py, mp_int *rx, mp_int *ry)
-{
- mp_err res = MP_OKAY;
- mp_int k1t, k2t;
- const mp_int *k1p, *k2p;
-
- MP_DIGITS(&k1t) = 0;
- MP_DIGITS(&k2t) = 0;
-
- ARGCHK(group != NULL, MP_BADARG);
-
- /* want scalar to be less than or equal to group order */
- if (k1 != NULL) {
- if (mp_cmp(k1, &group->order) >= 0) {
- MP_CHECKOK(mp_init(&k1t, FLAG(k1)));
- MP_CHECKOK(mp_mod(k1, &group->order, &k1t));
- k1p = &k1t;
- } else {
- k1p = k1;
- }
- } else {
- k1p = k1;
- }
- if (k2 != NULL) {
- if (mp_cmp(k2, &group->order) >= 0) {
- MP_CHECKOK(mp_init(&k2t, FLAG(k2)));
- MP_CHECKOK(mp_mod(k2, &group->order, &k2t));
- k2p = &k2t;
- } else {
- k2p = k2;
- }
- } else {
- k2p = k2;
- }
-
- /* if points_mul is defined, then use it */
- if (group->points_mul) {
- res = group->points_mul(k1p, k2p, px, py, rx, ry, group);
- } else {
- res = ec_pts_mul_simul_w2(k1p, k2p, px, py, rx, ry, group);
- }
-
- CLEANUP:
- mp_clear(&k1t);
- mp_clear(&k2t);
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ecp.h b/src/share/native/sun/security/ec/ecp.h
deleted file mode 100644
index 5e045ba..0000000
--- a/src/share/native/sun/security/ec/ecp.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _ECP_H
-#define _ECP_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecl-priv.h"
-
-/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
-mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py);
-
-/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
-mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py);
-
-/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx,
- * qy). Uses affine coordinates. */
-mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Computes R = P - Q. Uses affine coordinates. */
-mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Computes R = 2P. Uses affine coordinates. */
-mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group);
-
-/* Validates a point on a GFp curve. */
-mp_err ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
-
-#ifdef ECL_ENABLE_GFP_PT_MUL_AFF
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp. Uses affine coordinates. */
-mp_err ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-#endif
-
-/* Converts a point P(px, py) from affine coordinates to Jacobian
- * projective coordinates R(rx, ry, rz). */
-mp_err ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, mp_int *rz, const ECGroup *group);
-
-/* Converts a point P(px, py, pz) from Jacobian projective coordinates to
- * affine coordinates R(rx, ry). */
-mp_err ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py,
- const mp_int *pz, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-
-/* Checks if point P(px, py, pz) is at infinity. Uses Jacobian
- * coordinates. */
-mp_err ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py,
- const mp_int *pz);
-
-/* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian
- * coordinates. */
-mp_err ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz);
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, qz). Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py,
- const mp_int *pz, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- mp_int *rz, const ECGroup *group);
-
-/* Computes R = 2P. Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py,
- const mp_int *pz, mp_int *rx, mp_int *ry,
- mp_int *rz, const ECGroup *group);
-
-#ifdef ECL_ENABLE_GFP_PT_MUL_JAC
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp. Uses Jacobian coordinates. */
-mp_err ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-#endif
-
-/* Computes R(x, y) = k1 * G + k2 * P(x, y), where G is the generator
- * (base point) of the group of points on the elliptic curve. Allows k1 =
- * NULL or { k2, P } = NULL. Implemented using mixed Jacobian-affine
- * coordinates. Input and output values are assumed to be NOT
- * field-encoded and are in affine form. */
-mp_err
- ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group);
-
-/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic
- * curve points P and R can be identical. Uses mixed Modified-Jacobian
- * co-ordinates for doubling and Chudnovsky Jacobian coordinates for
- * additions. Assumes input is already field-encoded using field_enc, and
- * returns output that is still field-encoded. Uses 5-bit window NAF
- * method (algorithm 11) for scalar-point multiplication from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic
- * Curves Over Prime Fields. */
-mp_err
- ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group);
-
-#endif /* _ECP_H */
diff --git a/src/share/native/sun/security/ec/ecp_192.c b/src/share/native/sun/security/ec/ecp_192.c
deleted file mode 100644
index f2c62a4..0000000
--- a/src/share/native/sun/security/ec/ecp_192.c
+++ /dev/null
@@ -1,538 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP192_DIGITS ECL_CURVE_DIGITS(192)
-
-/* Fast modular reduction for p192 = 2^192 - 2^64 - 1. a can be r. Uses
- * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software
- * Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_size a_used = MP_USED(a);
- mp_digit r3;
-#ifndef MPI_AMD64_ADD
- mp_digit carry;
-#endif
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0;
- mp_digit r0a, r0b, r1a, r1b, r2a, r2b;
-#else
- mp_digit a5 = 0, a4 = 0, a3 = 0;
- mp_digit r0, r1, r2;
-#endif
-
- /* reduction not needed if a is not larger than field size */
- if (a_used < ECP192_DIGITS) {
- if (a == r) {
- return MP_OKAY;
- }
- return mp_copy(a, r);
- }
-
- /* for polynomials larger than twice the field size, use regular
- * reduction */
- if (a_used > ECP192_DIGITS*2) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
- /* copy out upper words of a */
-
-#ifdef ECL_THIRTY_TWO_BIT
-
- /* in all the math below,
- * nXb is most signifiant, nXa is least significant */
- switch (a_used) {
- case 12:
- a5b = MP_DIGIT(a, 11);
- case 11:
- a5a = MP_DIGIT(a, 10);
- case 10:
- a4b = MP_DIGIT(a, 9);
- case 9:
- a4a = MP_DIGIT(a, 8);
- case 8:
- a3b = MP_DIGIT(a, 7);
- case 7:
- a3a = MP_DIGIT(a, 6);
- }
-
-
- r2b= MP_DIGIT(a, 5);
- r2a= MP_DIGIT(a, 4);
- r1b = MP_DIGIT(a, 3);
- r1a = MP_DIGIT(a, 2);
- r0b = MP_DIGIT(a, 1);
- r0a = MP_DIGIT(a, 0);
-
- /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */
- MP_ADD_CARRY(r0a, a3a, r0a, 0, carry);
- MP_ADD_CARRY(r0b, a3b, r0b, carry, carry);
- MP_ADD_CARRY(r1a, a3a, r1a, carry, carry);
- MP_ADD_CARRY(r1b, a3b, r1b, carry, carry);
- MP_ADD_CARRY(r2a, a4a, r2a, carry, carry);
- MP_ADD_CARRY(r2b, a4b, r2b, carry, carry);
- r3 = carry; carry = 0;
- MP_ADD_CARRY(r0a, a5a, r0a, 0, carry);
- MP_ADD_CARRY(r0b, a5b, r0b, carry, carry);
- MP_ADD_CARRY(r1a, a5a, r1a, carry, carry);
- MP_ADD_CARRY(r1b, a5b, r1b, carry, carry);
- MP_ADD_CARRY(r2a, a5a, r2a, carry, carry);
- MP_ADD_CARRY(r2b, a5b, r2b, carry, carry);
- r3 += carry;
- MP_ADD_CARRY(r1a, a4a, r1a, 0, carry);
- MP_ADD_CARRY(r1b, a4b, r1b, carry, carry);
- MP_ADD_CARRY(r2a, 0, r2a, carry, carry);
- MP_ADD_CARRY(r2b, 0, r2b, carry, carry);
- r3 += carry;
-
- /* reduce out the carry */
- while (r3) {
- MP_ADD_CARRY(r0a, r3, r0a, 0, carry);
- MP_ADD_CARRY(r0b, 0, r0b, carry, carry);
- MP_ADD_CARRY(r1a, r3, r1a, carry, carry);
- MP_ADD_CARRY(r1b, 0, r1b, carry, carry);
- MP_ADD_CARRY(r2a, 0, r2a, carry, carry);
- MP_ADD_CARRY(r2b, 0, r2b, carry, carry);
- r3 = carry;
- }
-
- /* check for final reduction */
- /*
- * our field is 0xffffffffffffffff, 0xfffffffffffffffe,
- * 0xffffffffffffffff. That means we can only be over and need
- * one more reduction
- * if r2 == 0xffffffffffffffffff (same as r2+1 == 0)
- * and
- * r1 == 0xffffffffffffffffff or
- * r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff
- * In all cases, we subtract the field (or add the 2's
- * complement value (1,1,0)). (r0, r1, r2)
- */
- if (((r2b == 0xffffffff) && (r2a == 0xffffffff)
- && (r1b == 0xffffffff) ) &&
- ((r1a == 0xffffffff) ||
- (r1a == 0xfffffffe) && (r0a == 0xffffffff) &&
- (r0b == 0xffffffff)) ) {
- /* do a quick subtract */
- MP_ADD_CARRY(r0a, 1, r0a, 0, carry);
- r0b += carry;
- r1a = r1b = r2a = r2b = 0;
- }
-
- /* set the lower words of r */
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r, 6));
- }
- MP_DIGIT(r, 5) = r2b;
- MP_DIGIT(r, 4) = r2a;
- MP_DIGIT(r, 3) = r1b;
- MP_DIGIT(r, 2) = r1a;
- MP_DIGIT(r, 1) = r0b;
- MP_DIGIT(r, 0) = r0a;
- MP_USED(r) = 6;
-#else
- switch (a_used) {
- case 6:
- a5 = MP_DIGIT(a, 5);
- case 5:
- a4 = MP_DIGIT(a, 4);
- case 4:
- a3 = MP_DIGIT(a, 3);
- }
-
- r2 = MP_DIGIT(a, 2);
- r1 = MP_DIGIT(a, 1);
- r0 = MP_DIGIT(a, 0);
-
- /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(r0, a3, r0, 0, carry);
- MP_ADD_CARRY(r1, a3, r1, carry, carry);
- MP_ADD_CARRY(r2, a4, r2, carry, carry);
- r3 = carry;
- MP_ADD_CARRY(r0, a5, r0, 0, carry);
- MP_ADD_CARRY(r1, a5, r1, carry, carry);
- MP_ADD_CARRY(r2, a5, r2, carry, carry);
- r3 += carry;
- MP_ADD_CARRY(r1, a4, r1, 0, carry);
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
- r3 += carry;
-
-#else
- r2 = MP_DIGIT(a, 2);
- r1 = MP_DIGIT(a, 1);
- r0 = MP_DIGIT(a, 0);
-
- /* set the lower words of r */
- __asm__ (
- "xorq %3,%3 \n\t"
- "addq %4,%0 \n\t"
- "adcq %4,%1 \n\t"
- "adcq %5,%2 \n\t"
- "adcq $0,%3 \n\t"
- "addq %6,%0 \n\t"
- "adcq %6,%1 \n\t"
- "adcq %6,%2 \n\t"
- "adcq $0,%3 \n\t"
- "addq %5,%1 \n\t"
- "adcq $0,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3),
- "=r"(a4), "=r"(a5)
- : "0" (r0), "1" (r1), "2" (r2), "3" (r3),
- "4" (a3), "5" (a4), "6"(a5)
- : "%cc" );
-#endif
-
- /* reduce out the carry */
- while (r3) {
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(r0, r3, r0, 0, carry);
- MP_ADD_CARRY(r1, r3, r1, carry, carry);
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
- r3 = carry;
-#else
- a3=r3;
- __asm__ (
- "xorq %3,%3 \n\t"
- "addq %4,%0 \n\t"
- "adcq %4,%1 \n\t"
- "adcq $0,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3)
- : "0" (r0), "1" (r1), "2" (r2), "3" (r3), "4"(a3)
- : "%cc" );
-#endif
- }
-
- /* check for final reduction */
- /*
- * our field is 0xffffffffffffffff, 0xfffffffffffffffe,
- * 0xffffffffffffffff. That means we can only be over and need
- * one more reduction
- * if r2 == 0xffffffffffffffffff (same as r2+1 == 0)
- * and
- * r1 == 0xffffffffffffffffff or
- * r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff
- * In all cases, we subtract the field (or add the 2's
- * complement value (1,1,0)). (r0, r1, r2)
- */
- if (r3 || ((r2 == MP_DIGIT_MAX) &&
- ((r1 == MP_DIGIT_MAX) ||
- ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) {
- /* do a quick subtract */
- r0++;
- r1 = r2 = 0;
- }
- /* set the lower words of r */
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r, 3));
- }
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_USED(r) = 3;
-#endif
- }
-
- CLEANUP:
- return res;
-}
-
-#ifndef ECL_THIRTY_TWO_BIT
-/* Compute the sum of 192 bit curves. Do the work in-line since the
- * number of words are so small, we don't want to overhead of mp function
- * calls. Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit a0 = 0, a1 = 0, a2 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0;
- mp_digit carry;
-
- switch(MP_USED(a)) {
- case 3:
- a2 = MP_DIGIT(a,2);
- case 2:
- a1 = MP_DIGIT(a,1);
- case 1:
- a0 = MP_DIGIT(a,0);
- }
- switch(MP_USED(b)) {
- case 3:
- r2 = MP_DIGIT(b,2);
- case 2:
- r1 = MP_DIGIT(b,1);
- case 1:
- r0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(a0, r0, r0, 0, carry);
- MP_ADD_CARRY(a1, r1, r1, carry, carry);
- MP_ADD_CARRY(a2, r2, r2, carry, carry);
-#else
- __asm__ (
- "xorq %3,%3 \n\t"
- "addq %4,%0 \n\t"
- "adcq %5,%1 \n\t"
- "adcq %6,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry)
- : "r" (a0), "r" (a1), "r" (a2), "0" (r0),
- "1" (r1), "2" (r2)
- : "%cc" );
-#endif
-
- /* Do quick 'subract' if we've gone over
- * (add the 2's complement of the curve field) */
- if (carry || ((r2 == MP_DIGIT_MAX) &&
- ((r1 == MP_DIGIT_MAX) ||
- ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) {
-#ifndef MPI_AMD64_ADD
- MP_ADD_CARRY(r0, 1, r0, 0, carry);
- MP_ADD_CARRY(r1, 1, r1, carry, carry);
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
-#else
- __asm__ (
- "addq $1,%0 \n\t"
- "adcq $1,%1 \n\t"
- "adcq $0,%2 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2)
- : "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
- }
-
-
- MP_CHECKOK(s_mp_pad(r, 3));
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 3;
- s_mp_clamp(r);
-
-
- CLEANUP:
- return res;
-}
-
-/* Compute the diff of 192 bit curves. Do the work in-line since the
- * number of words are so small, we don't want to overhead of mp function
- * calls. Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_sub(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_digit b0 = 0, b1 = 0, b2 = 0;
- mp_digit r0 = 0, r1 = 0, r2 = 0;
- mp_digit borrow;
-
- switch(MP_USED(a)) {
- case 3:
- r2 = MP_DIGIT(a,2);
- case 2:
- r1 = MP_DIGIT(a,1);
- case 1:
- r0 = MP_DIGIT(a,0);
- }
-
- switch(MP_USED(b)) {
- case 3:
- b2 = MP_DIGIT(b,2);
- case 2:
- b1 = MP_DIGIT(b,1);
- case 1:
- b0 = MP_DIGIT(b,0);
- }
-
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, b0, r0, 0, borrow);
- MP_SUB_BORROW(r1, b1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, b2, r2, borrow, borrow);
-#else
- __asm__ (
- "xorq %3,%3 \n\t"
- "subq %4,%0 \n\t"
- "sbbq %5,%1 \n\t"
- "sbbq %6,%2 \n\t"
- "adcq $0,%3 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(borrow)
- : "r" (b0), "r" (b1), "r" (b2), "0" (r0),
- "1" (r1), "2" (r2)
- : "%cc" );
-#endif
-
- /* Do quick 'add' if we've gone under 0
- * (subtract the 2's complement of the curve field) */
- if (borrow) {
-#ifndef MPI_AMD64_ADD
- MP_SUB_BORROW(r0, 1, r0, 0, borrow);
- MP_SUB_BORROW(r1, 1, r1, borrow, borrow);
- MP_SUB_BORROW(r2, 0, r2, borrow, borrow);
-#else
- __asm__ (
- "subq $1,%0 \n\t"
- "sbbq $1,%1 \n\t"
- "sbbq $0,%2 \n\t"
- : "=r"(r0), "=r"(r1), "=r"(r2)
- : "0" (r0), "1" (r1), "2" (r2)
- : "%cc" );
-#endif
- }
-
- MP_CHECKOK(s_mp_pad(r, 3));
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 3;
- s_mp_clamp(r);
-
- CLEANUP:
- return res;
-}
-
-#endif
-
-/* Compute the square of polynomial a, reduce modulo p192. Store the
- * result in r. r could be a. Uses optimized modular reduction for p192.
- */
-mp_err
-ec_GFp_nistp192_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_sqr(a, r));
- MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p192.
- * Store the result in r. r could be a or b; a could be b. Uses
- * optimized modular reduction for p192. */
-mp_err
-ec_GFp_nistp192_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp192_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_int t;
-
- /* If a is NULL, then return the inverse of b, otherwise return a/b. */
- if (a == NULL) {
- return mp_invmod(b, &meth->irr, r);
- } else {
- /* MPI doesn't support divmod, so we implement it using invmod and
- * mulmod. */
- MP_CHECKOK(mp_init(&t, FLAG(b)));
- MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
- MP_CHECKOK(mp_mul(a, &t, r));
- MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth));
- CLEANUP:
- mp_clear(&t);
- return res;
- }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp192(ECGroup *group, ECCurveName name)
-{
- if (name == ECCurve_NIST_P192) {
- group->meth->field_mod = &ec_GFp_nistp192_mod;
- group->meth->field_mul = &ec_GFp_nistp192_mul;
- group->meth->field_sqr = &ec_GFp_nistp192_sqr;
- group->meth->field_div = &ec_GFp_nistp192_div;
-#ifndef ECL_THIRTY_TWO_BIT
- group->meth->field_add = &ec_GFp_nistp192_add;
- group->meth->field_sub = &ec_GFp_nistp192_sub;
-#endif
- }
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ecp_224.c b/src/share/native/sun/security/ec/ecp_224.c
deleted file mode 100644
index 1ea82fd..0000000
--- a/src/share/native/sun/security/ec/ecp_224.c
+++ /dev/null
@@ -1,394 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP224_DIGITS ECL_CURVE_DIGITS(224)
-
-/* Fast modular reduction for p224 = 2^224 - 2^96 + 1. a can be r. Uses
- * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software
- * Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_size a_used = MP_USED(a);
-
- int r3b;
- mp_digit carry;
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a6a = 0, a6b = 0,
- a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0;
- mp_digit r0a, r0b, r1a, r1b, r2a, r2b, r3a;
-#else
- mp_digit a6 = 0, a5 = 0, a4 = 0, a3b = 0, a5a = 0;
- mp_digit a6b = 0, a6a_a5b = 0, a5b = 0, a5a_a4b = 0, a4a_a3b = 0;
- mp_digit r0, r1, r2, r3;
-#endif
-
- /* reduction not needed if a is not larger than field size */
- if (a_used < ECP224_DIGITS) {
- if (a == r) return MP_OKAY;
- return mp_copy(a, r);
- }
- /* for polynomials larger than twice the field size, use regular
- * reduction */
- if (a_used > ECL_CURVE_DIGITS(224*2)) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
-#ifdef ECL_THIRTY_TWO_BIT
- /* copy out upper words of a */
- switch (a_used) {
- case 14:
- a6b = MP_DIGIT(a, 13);
- case 13:
- a6a = MP_DIGIT(a, 12);
- case 12:
- a5b = MP_DIGIT(a, 11);
- case 11:
- a5a = MP_DIGIT(a, 10);
- case 10:
- a4b = MP_DIGIT(a, 9);
- case 9:
- a4a = MP_DIGIT(a, 8);
- case 8:
- a3b = MP_DIGIT(a, 7);
- }
- r3a = MP_DIGIT(a, 6);
- r2b= MP_DIGIT(a, 5);
- r2a= MP_DIGIT(a, 4);
- r1b = MP_DIGIT(a, 3);
- r1a = MP_DIGIT(a, 2);
- r0b = MP_DIGIT(a, 1);
- r0a = MP_DIGIT(a, 0);
-
-
- /* implement r = (a3a,a2,a1,a0)
- +(a5a, a4,a3b, 0)
- +( 0, a6,a5b, 0)
- -( 0 0, 0|a6b, a6a|a5b )
- -( a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */
- MP_ADD_CARRY (r1b, a3b, r1b, 0, carry);
- MP_ADD_CARRY (r2a, a4a, r2a, carry, carry);
- MP_ADD_CARRY (r2b, a4b, r2b, carry, carry);
- MP_ADD_CARRY (r3a, a5a, r3a, carry, carry);
- r3b = carry;
- MP_ADD_CARRY (r1b, a5b, r1b, 0, carry);
- MP_ADD_CARRY (r2a, a6a, r2a, carry, carry);
- MP_ADD_CARRY (r2b, a6b, r2b, carry, carry);
- MP_ADD_CARRY (r3a, 0, r3a, carry, carry);
- r3b += carry;
- MP_SUB_BORROW(r0a, a3b, r0a, 0, carry);
- MP_SUB_BORROW(r0b, a4a, r0b, carry, carry);
- MP_SUB_BORROW(r1a, a4b, r1a, carry, carry);
- MP_SUB_BORROW(r1b, a5a, r1b, carry, carry);
- MP_SUB_BORROW(r2a, a5b, r2a, carry, carry);
- MP_SUB_BORROW(r2b, a6a, r2b, carry, carry);
- MP_SUB_BORROW(r3a, a6b, r3a, carry, carry);
- r3b -= carry;
- MP_SUB_BORROW(r0a, a5b, r0a, 0, carry);
- MP_SUB_BORROW(r0b, a6a, r0b, carry, carry);
- MP_SUB_BORROW(r1a, a6b, r1a, carry, carry);
- if (carry) {
- MP_SUB_BORROW(r1b, 0, r1b, carry, carry);
- MP_SUB_BORROW(r2a, 0, r2a, carry, carry);
- MP_SUB_BORROW(r2b, 0, r2b, carry, carry);
- MP_SUB_BORROW(r3a, 0, r3a, carry, carry);
- r3b -= carry;
- }
-
- while (r3b > 0) {
- int tmp;
- MP_ADD_CARRY(r1b, r3b, r1b, 0, carry);
- if (carry) {
- MP_ADD_CARRY(r2a, 0, r2a, carry, carry);
- MP_ADD_CARRY(r2b, 0, r2b, carry, carry);
- MP_ADD_CARRY(r3a, 0, r3a, carry, carry);
- }
- tmp = carry;
- MP_SUB_BORROW(r0a, r3b, r0a, 0, carry);
- if (carry) {
- MP_SUB_BORROW(r0b, 0, r0b, carry, carry);
- MP_SUB_BORROW(r1a, 0, r1a, carry, carry);
- MP_SUB_BORROW(r1b, 0, r1b, carry, carry);
- MP_SUB_BORROW(r2a, 0, r2a, carry, carry);
- MP_SUB_BORROW(r2b, 0, r2b, carry, carry);
- MP_SUB_BORROW(r3a, 0, r3a, carry, carry);
- tmp -= carry;
- }
- r3b = tmp;
- }
-
- while (r3b < 0) {
- mp_digit maxInt = MP_DIGIT_MAX;
- MP_ADD_CARRY (r0a, 1, r0a, 0, carry);
- MP_ADD_CARRY (r0b, 0, r0b, carry, carry);
- MP_ADD_CARRY (r1a, 0, r1a, carry, carry);
- MP_ADD_CARRY (r1b, maxInt, r1b, carry, carry);
- MP_ADD_CARRY (r2a, maxInt, r2a, carry, carry);
- MP_ADD_CARRY (r2b, maxInt, r2b, carry, carry);
- MP_ADD_CARRY (r3a, maxInt, r3a, carry, carry);
- r3b += carry;
- }
- /* check for final reduction */
- /* now the only way we are over is if the top 4 words are all ones */
- if ((r3a == MP_DIGIT_MAX) && (r2b == MP_DIGIT_MAX)
- && (r2a == MP_DIGIT_MAX) && (r1b == MP_DIGIT_MAX) &&
- ((r1a != 0) || (r0b != 0) || (r0a != 0)) ) {
- /* one last subraction */
- MP_SUB_BORROW(r0a, 1, r0a, 0, carry);
- MP_SUB_BORROW(r0b, 0, r0b, carry, carry);
- MP_SUB_BORROW(r1a, 0, r1a, carry, carry);
- r1b = r2a = r2b = r3a = 0;
- }
-
-
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r, 7));
- }
- /* set the lower words of r */
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 7;
- MP_DIGIT(r, 6) = r3a;
- MP_DIGIT(r, 5) = r2b;
- MP_DIGIT(r, 4) = r2a;
- MP_DIGIT(r, 3) = r1b;
- MP_DIGIT(r, 2) = r1a;
- MP_DIGIT(r, 1) = r0b;
- MP_DIGIT(r, 0) = r0a;
-#else
- /* copy out upper words of a */
- switch (a_used) {
- case 7:
- a6 = MP_DIGIT(a, 6);
- a6b = a6 >> 32;
- a6a_a5b = a6 << 32;
- case 6:
- a5 = MP_DIGIT(a, 5);
- a5b = a5 >> 32;
- a6a_a5b |= a5b;
- a5b = a5b << 32;
- a5a_a4b = a5 << 32;
- a5a = a5 & 0xffffffff;
- case 5:
- a4 = MP_DIGIT(a, 4);
- a5a_a4b |= a4 >> 32;
- a4a_a3b = a4 << 32;
- case 4:
- a3b = MP_DIGIT(a, 3) >> 32;
- a4a_a3b |= a3b;
- a3b = a3b << 32;
- }
-
- r3 = MP_DIGIT(a, 3) & 0xffffffff;
- r2 = MP_DIGIT(a, 2);
- r1 = MP_DIGIT(a, 1);
- r0 = MP_DIGIT(a, 0);
-
- /* implement r = (a3a,a2,a1,a0)
- +(a5a, a4,a3b, 0)
- +( 0, a6,a5b, 0)
- -( 0 0, 0|a6b, a6a|a5b )
- -( a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */
- MP_ADD_CARRY (r1, a3b, r1, 0, carry);
- MP_ADD_CARRY (r2, a4 , r2, carry, carry);
- MP_ADD_CARRY (r3, a5a, r3, carry, carry);
- MP_ADD_CARRY (r1, a5b, r1, 0, carry);
- MP_ADD_CARRY (r2, a6 , r2, carry, carry);
- MP_ADD_CARRY (r3, 0, r3, carry, carry);
-
- MP_SUB_BORROW(r0, a4a_a3b, r0, 0, carry);
- MP_SUB_BORROW(r1, a5a_a4b, r1, carry, carry);
- MP_SUB_BORROW(r2, a6a_a5b, r2, carry, carry);
- MP_SUB_BORROW(r3, a6b , r3, carry, carry);
- MP_SUB_BORROW(r0, a6a_a5b, r0, 0, carry);
- MP_SUB_BORROW(r1, a6b , r1, carry, carry);
- if (carry) {
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, 0, r3, carry, carry);
- }
-
-
- /* if the value is negative, r3 has a 2's complement
- * high value */
- r3b = (int)(r3 >>32);
- while (r3b > 0) {
- r3 &= 0xffffffff;
- MP_ADD_CARRY(r1,((mp_digit)r3b) << 32, r1, 0, carry);
- if (carry) {
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
- MP_ADD_CARRY(r3, 0, r3, carry, carry);
- }
- MP_SUB_BORROW(r0, r3b, r0, 0, carry);
- if (carry) {
- MP_SUB_BORROW(r1, 0, r1, carry, carry);
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, 0, r3, carry, carry);
- }
- r3b = (int)(r3 >>32);
- }
-
- while (r3b < 0) {
- MP_ADD_CARRY (r0, 1, r0, 0, carry);
- MP_ADD_CARRY (r1, MP_DIGIT_MAX <<32, r1, carry, carry);
- MP_ADD_CARRY (r2, MP_DIGIT_MAX, r2, carry, carry);
- MP_ADD_CARRY (r3, MP_DIGIT_MAX >> 32, r3, carry, carry);
- r3b = (int)(r3 >>32);
- }
- /* check for final reduction */
- /* now the only way we are over is if the top 4 words are all ones */
- if ((r3 == (MP_DIGIT_MAX >> 32)) && (r2 == MP_DIGIT_MAX)
- && ((r1 & MP_DIGIT_MAX << 32)== MP_DIGIT_MAX << 32) &&
- ((r1 != MP_DIGIT_MAX << 32 ) || (r0 != 0)) ) {
- /* one last subraction */
- MP_SUB_BORROW(r0, 1, r0, 0, carry);
- MP_SUB_BORROW(r1, 0, r1, carry, carry);
- r2 = r3 = 0;
- }
-
-
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r, 4));
- }
- /* set the lower words of r */
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 4;
- MP_DIGIT(r, 3) = r3;
- MP_DIGIT(r, 2) = r2;
- MP_DIGIT(r, 1) = r1;
- MP_DIGIT(r, 0) = r0;
-#endif
- }
-
- CLEANUP:
- return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p224. Store the
- * result in r. r could be a. Uses optimized modular reduction for p224.
- */
-mp_err
-ec_GFp_nistp224_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_sqr(a, r));
- MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p224.
- * Store the result in r. r could be a or b; a could be b. Uses
- * optimized modular reduction for p224. */
-mp_err
-ec_GFp_nistp224_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp224_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_int t;
-
- /* If a is NULL, then return the inverse of b, otherwise return a/b. */
- if (a == NULL) {
- return mp_invmod(b, &meth->irr, r);
- } else {
- /* MPI doesn't support divmod, so we implement it using invmod and
- * mulmod. */
- MP_CHECKOK(mp_init(&t, FLAG(b)));
- MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
- MP_CHECKOK(mp_mul(a, &t, r));
- MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth));
- CLEANUP:
- mp_clear(&t);
- return res;
- }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp224(ECGroup *group, ECCurveName name)
-{
- if (name == ECCurve_NIST_P224) {
- group->meth->field_mod = &ec_GFp_nistp224_mod;
- group->meth->field_mul = &ec_GFp_nistp224_mul;
- group->meth->field_sqr = &ec_GFp_nistp224_sqr;
- group->meth->field_div = &ec_GFp_nistp224_div;
- }
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ecp_256.c b/src/share/native/sun/security/ec/ecp_256.c
deleted file mode 100644
index 6f4de5b..0000000
--- a/src/share/native/sun/security/ec/ecp_256.c
+++ /dev/null
@@ -1,451 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast modular reduction for p256 = 2^256 - 2^224 + 2^192+ 2^96 - 1. a can be r.
- * Uses algorithm 2.29 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_size a_used = MP_USED(a);
- int a_bits = mpl_significant_bits(a);
- mp_digit carry;
-
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit a8=0, a9=0, a10=0, a11=0, a12=0, a13=0, a14=0, a15=0;
- mp_digit r0, r1, r2, r3, r4, r5, r6, r7;
- int r8; /* must be a signed value ! */
-#else
- mp_digit a4=0, a5=0, a6=0, a7=0;
- mp_digit a4h, a4l, a5h, a5l, a6h, a6l, a7h, a7l;
- mp_digit r0, r1, r2, r3;
- int r4; /* must be a signed value ! */
-#endif
- /* for polynomials larger than twice the field size
- * use regular reduction */
- if (a_bits < 256) {
- if (a == r) return MP_OKAY;
- return mp_copy(a,r);
- }
- if (a_bits > 512) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
-
-#ifdef ECL_THIRTY_TWO_BIT
- switch (a_used) {
- case 16:
- a15 = MP_DIGIT(a,15);
- case 15:
- a14 = MP_DIGIT(a,14);
- case 14:
- a13 = MP_DIGIT(a,13);
- case 13:
- a12 = MP_DIGIT(a,12);
- case 12:
- a11 = MP_DIGIT(a,11);
- case 11:
- a10 = MP_DIGIT(a,10);
- case 10:
- a9 = MP_DIGIT(a,9);
- case 9:
- a8 = MP_DIGIT(a,8);
- }
-
- r0 = MP_DIGIT(a,0);
- r1 = MP_DIGIT(a,1);
- r2 = MP_DIGIT(a,2);
- r3 = MP_DIGIT(a,3);
- r4 = MP_DIGIT(a,4);
- r5 = MP_DIGIT(a,5);
- r6 = MP_DIGIT(a,6);
- r7 = MP_DIGIT(a,7);
-
- /* sum 1 */
- MP_ADD_CARRY(r3, a11, r3, 0, carry);
- MP_ADD_CARRY(r4, a12, r4, carry, carry);
- MP_ADD_CARRY(r5, a13, r5, carry, carry);
- MP_ADD_CARRY(r6, a14, r6, carry, carry);
- MP_ADD_CARRY(r7, a15, r7, carry, carry);
- r8 = carry;
- MP_ADD_CARRY(r3, a11, r3, 0, carry);
- MP_ADD_CARRY(r4, a12, r4, carry, carry);
- MP_ADD_CARRY(r5, a13, r5, carry, carry);
- MP_ADD_CARRY(r6, a14, r6, carry, carry);
- MP_ADD_CARRY(r7, a15, r7, carry, carry);
- r8 += carry;
- /* sum 2 */
- MP_ADD_CARRY(r3, a12, r3, 0, carry);
- MP_ADD_CARRY(r4, a13, r4, carry, carry);
- MP_ADD_CARRY(r5, a14, r5, carry, carry);
- MP_ADD_CARRY(r6, a15, r6, carry, carry);
- MP_ADD_CARRY(r7, 0, r7, carry, carry);
- r8 += carry;
- /* combine last bottom of sum 3 with second sum 2 */
- MP_ADD_CARRY(r0, a8, r0, 0, carry);
- MP_ADD_CARRY(r1, a9, r1, carry, carry);
- MP_ADD_CARRY(r2, a10, r2, carry, carry);
- MP_ADD_CARRY(r3, a12, r3, carry, carry);
- MP_ADD_CARRY(r4, a13, r4, carry, carry);
- MP_ADD_CARRY(r5, a14, r5, carry, carry);
- MP_ADD_CARRY(r6, a15, r6, carry, carry);
- MP_ADD_CARRY(r7, a15, r7, carry, carry); /* from sum 3 */
- r8 += carry;
- /* sum 3 (rest of it)*/
- MP_ADD_CARRY(r6, a14, r6, 0, carry);
- MP_ADD_CARRY(r7, 0, r7, carry, carry);
- r8 += carry;
- /* sum 4 (rest of it)*/
- MP_ADD_CARRY(r0, a9, r0, 0, carry);
- MP_ADD_CARRY(r1, a10, r1, carry, carry);
- MP_ADD_CARRY(r2, a11, r2, carry, carry);
- MP_ADD_CARRY(r3, a13, r3, carry, carry);
- MP_ADD_CARRY(r4, a14, r4, carry, carry);
- MP_ADD_CARRY(r5, a15, r5, carry, carry);
- MP_ADD_CARRY(r6, a13, r6, carry, carry);
- MP_ADD_CARRY(r7, a8, r7, carry, carry);
- r8 += carry;
- /* diff 5 */
- MP_SUB_BORROW(r0, a11, r0, 0, carry);
- MP_SUB_BORROW(r1, a12, r1, carry, carry);
- MP_SUB_BORROW(r2, a13, r2, carry, carry);
- MP_SUB_BORROW(r3, 0, r3, carry, carry);
- MP_SUB_BORROW(r4, 0, r4, carry, carry);
- MP_SUB_BORROW(r5, 0, r5, carry, carry);
- MP_SUB_BORROW(r6, a8, r6, carry, carry);
- MP_SUB_BORROW(r7, a10, r7, carry, carry);
- r8 -= carry;
- /* diff 6 */
- MP_SUB_BORROW(r0, a12, r0, 0, carry);
- MP_SUB_BORROW(r1, a13, r1, carry, carry);
- MP_SUB_BORROW(r2, a14, r2, carry, carry);
- MP_SUB_BORROW(r3, a15, r3, carry, carry);
- MP_SUB_BORROW(r4, 0, r4, carry, carry);
- MP_SUB_BORROW(r5, 0, r5, carry, carry);
- MP_SUB_BORROW(r6, a9, r6, carry, carry);
- MP_SUB_BORROW(r7, a11, r7, carry, carry);
- r8 -= carry;
- /* diff 7 */
- MP_SUB_BORROW(r0, a13, r0, 0, carry);
- MP_SUB_BORROW(r1, a14, r1, carry, carry);
- MP_SUB_BORROW(r2, a15, r2, carry, carry);
- MP_SUB_BORROW(r3, a8, r3, carry, carry);
- MP_SUB_BORROW(r4, a9, r4, carry, carry);
- MP_SUB_BORROW(r5, a10, r5, carry, carry);
- MP_SUB_BORROW(r6, 0, r6, carry, carry);
- MP_SUB_BORROW(r7, a12, r7, carry, carry);
- r8 -= carry;
- /* diff 8 */
- MP_SUB_BORROW(r0, a14, r0, 0, carry);
- MP_SUB_BORROW(r1, a15, r1, carry, carry);
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, a9, r3, carry, carry);
- MP_SUB_BORROW(r4, a10, r4, carry, carry);
- MP_SUB_BORROW(r5, a11, r5, carry, carry);
- MP_SUB_BORROW(r6, 0, r6, carry, carry);
- MP_SUB_BORROW(r7, a13, r7, carry, carry);
- r8 -= carry;
-
- /* reduce the overflows */
- while (r8 > 0) {
- mp_digit r8_d = r8;
- MP_ADD_CARRY(r0, r8_d, r0, 0, carry);
- MP_ADD_CARRY(r1, 0, r1, carry, carry);
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
- MP_ADD_CARRY(r3, -r8_d, r3, carry, carry);
- MP_ADD_CARRY(r4, MP_DIGIT_MAX, r4, carry, carry);
- MP_ADD_CARRY(r5, MP_DIGIT_MAX, r5, carry, carry);
- MP_ADD_CARRY(r6, -(r8_d+1), r6, carry, carry);
- MP_ADD_CARRY(r7, (r8_d-1), r7, carry, carry);
- r8 = carry;
- }
-
- /* reduce the underflows */
- while (r8 < 0) {
- mp_digit r8_d = -r8;
- MP_SUB_BORROW(r0, r8_d, r0, 0, carry);
- MP_SUB_BORROW(r1, 0, r1, carry, carry);
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, -r8_d, r3, carry, carry);
- MP_SUB_BORROW(r4, MP_DIGIT_MAX, r4, carry, carry);
- MP_SUB_BORROW(r5, MP_DIGIT_MAX, r5, carry, carry);
- MP_SUB_BORROW(r6, -(r8_d+1), r6, carry, carry);
- MP_SUB_BORROW(r7, (r8_d-1), r7, carry, carry);
- r8 = -carry;
- }
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r,8));
- }
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 8;
-
- MP_DIGIT(r,7) = r7;
- MP_DIGIT(r,6) = r6;
- MP_DIGIT(r,5) = r5;
- MP_DIGIT(r,4) = r4;
- MP_DIGIT(r,3) = r3;
- MP_DIGIT(r,2) = r2;
- MP_DIGIT(r,1) = r1;
- MP_DIGIT(r,0) = r0;
-
- /* final reduction if necessary */
- if ((r7 == MP_DIGIT_MAX) &&
- ((r6 > 1) || ((r6 == 1) &&
- (r5 || r4 || r3 ||
- ((r2 == MP_DIGIT_MAX) && (r1 == MP_DIGIT_MAX)
- && (r0 == MP_DIGIT_MAX)))))) {
- MP_CHECKOK(mp_sub(r, &meth->irr, r));
- }
-#ifdef notdef
-
-
- /* smooth the negatives */
- while (MP_SIGN(r) != MP_ZPOS) {
- MP_CHECKOK(mp_add(r, &meth->irr, r));
- }
- while (MP_USED(r) > 8) {
- MP_CHECKOK(mp_sub(r, &meth->irr, r));
- }
-
- /* final reduction if necessary */
- if (MP_DIGIT(r,7) >= MP_DIGIT(&meth->irr,7)) {
- if (mp_cmp(r,&meth->irr) != MP_LT) {
- MP_CHECKOK(mp_sub(r, &meth->irr, r));
- }
- }
-#endif
- s_mp_clamp(r);
-#else
- switch (a_used) {
- case 8:
- a7 = MP_DIGIT(a,7);
- case 7:
- a6 = MP_DIGIT(a,6);
- case 6:
- a5 = MP_DIGIT(a,5);
- case 5:
- a4 = MP_DIGIT(a,4);
- }
- a7l = a7 << 32;
- a7h = a7 >> 32;
- a6l = a6 << 32;
- a6h = a6 >> 32;
- a5l = a5 << 32;
- a5h = a5 >> 32;
- a4l = a4 << 32;
- a4h = a4 >> 32;
- r3 = MP_DIGIT(a,3);
- r2 = MP_DIGIT(a,2);
- r1 = MP_DIGIT(a,1);
- r0 = MP_DIGIT(a,0);
-
- /* sum 1 */
- MP_ADD_CARRY(r1, a5h << 32, r1, 0, carry);
- MP_ADD_CARRY(r2, a6, r2, carry, carry);
- MP_ADD_CARRY(r3, a7, r3, carry, carry);
- r4 = carry;
- MP_ADD_CARRY(r1, a5h << 32, r1, 0, carry);
- MP_ADD_CARRY(r2, a6, r2, carry, carry);
- MP_ADD_CARRY(r3, a7, r3, carry, carry);
- r4 += carry;
- /* sum 2 */
- MP_ADD_CARRY(r1, a6l, r1, 0, carry);
- MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry);
- MP_ADD_CARRY(r3, a7h, r3, carry, carry);
- r4 += carry;
- MP_ADD_CARRY(r1, a6l, r1, 0, carry);
- MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry);
- MP_ADD_CARRY(r3, a7h, r3, carry, carry);
- r4 += carry;
-
- /* sum 3 */
- MP_ADD_CARRY(r0, a4, r0, 0, carry);
- MP_ADD_CARRY(r1, a5l >> 32, r1, carry, carry);
- MP_ADD_CARRY(r2, 0, r2, carry, carry);
- MP_ADD_CARRY(r3, a7, r3, carry, carry);
- r4 += carry;
- /* sum 4 */
- MP_ADD_CARRY(r0, a4h | a5l, r0, 0, carry);
- MP_ADD_CARRY(r1, a5h|(a6h<<32), r1, carry, carry);
- MP_ADD_CARRY(r2, a7, r2, carry, carry);
- MP_ADD_CARRY(r3, a6h | a4l, r3, carry, carry);
- r4 += carry;
- /* diff 5 */
- MP_SUB_BORROW(r0, a5h | a6l, r0, 0, carry);
- MP_SUB_BORROW(r1, a6h, r1, carry, carry);
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, (a4l>>32)|a5l,r3, carry, carry);
- r4 -= carry;
- /* diff 6 */
- MP_SUB_BORROW(r0, a6, r0, 0, carry);
- MP_SUB_BORROW(r1, a7, r1, carry, carry);
- MP_SUB_BORROW(r2, 0, r2, carry, carry);
- MP_SUB_BORROW(r3, a4h|(a5h<<32),r3, carry, carry);
- r4 -= carry;
- /* diff 7 */
- MP_SUB_BORROW(r0, a6h|a7l, r0, 0, carry);
- MP_SUB_BORROW(r1, a7h|a4l, r1, carry, carry);
- MP_SUB_BORROW(r2, a4h|a5l, r2, carry, carry);
- MP_SUB_BORROW(r3, a6l, r3, carry, carry);
- r4 -= carry;
- /* diff 8 */
- MP_SUB_BORROW(r0, a7, r0, 0, carry);
- MP_SUB_BORROW(r1, a4h<<32, r1, carry, carry);
- MP_SUB_BORROW(r2, a5, r2, carry, carry);
- MP_SUB_BORROW(r3, a6h<<32, r3, carry, carry);
- r4 -= carry;
-
- /* reduce the overflows */
- while (r4 > 0) {
- mp_digit r4_long = r4;
- mp_digit r4l = (r4_long << 32);
- MP_ADD_CARRY(r0, r4_long, r0, 0, carry);
- MP_ADD_CARRY(r1, -r4l, r1, carry, carry);
- MP_ADD_CARRY(r2, MP_DIGIT_MAX, r2, carry, carry);
- MP_ADD_CARRY(r3, r4l-r4_long-1,r3, carry, carry);
- r4 = carry;
- }
-
- /* reduce the underflows */
- while (r4 < 0) {
- mp_digit r4_long = -r4;
- mp_digit r4l = (r4_long << 32);
- MP_SUB_BORROW(r0, r4_long, r0, 0, carry);
- MP_SUB_BORROW(r1, -r4l, r1, carry, carry);
- MP_SUB_BORROW(r2, MP_DIGIT_MAX, r2, carry, carry);
- MP_SUB_BORROW(r3, r4l-r4_long-1,r3, carry, carry);
- r4 = -carry;
- }
-
- if (a != r) {
- MP_CHECKOK(s_mp_pad(r,4));
- }
- MP_SIGN(r) = MP_ZPOS;
- MP_USED(r) = 4;
-
- MP_DIGIT(r,3) = r3;
- MP_DIGIT(r,2) = r2;
- MP_DIGIT(r,1) = r1;
- MP_DIGIT(r,0) = r0;
-
- /* final reduction if necessary */
- if ((r3 > 0xFFFFFFFF00000001ULL) ||
- ((r3 == 0xFFFFFFFF00000001ULL) &&
- (r2 || (r1 >> 32)||
- (r1 == 0xFFFFFFFFULL && r0 == MP_DIGIT_MAX)))) {
- /* very rare, just use mp_sub */
- MP_CHECKOK(mp_sub(r, &meth->irr, r));
- }
-
- s_mp_clamp(r);
-#endif
- }
-
- CLEANUP:
- return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p256. Store the
- * result in r. r could be a. Uses optimized modular reduction for p256.
- */
-mp_err
-ec_GFp_nistp256_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_sqr(a, r));
- MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p256.
- * Store the result in r. r could be a or b; a could be b. Uses
- * optimized modular reduction for p256. */
-mp_err
-ec_GFp_nistp256_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp256(ECGroup *group, ECCurveName name)
-{
- if (name == ECCurve_NIST_P256) {
- group->meth->field_mod = &ec_GFp_nistp256_mod;
- group->meth->field_mul = &ec_GFp_nistp256_mul;
- group->meth->field_sqr = &ec_GFp_nistp256_sqr;
- }
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ecp_384.c b/src/share/native/sun/security/ec/ecp_384.c
deleted file mode 100644
index 93b9259..0000000
--- a/src/share/native/sun/security/ec/ecp_384.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Fast modular reduction for p384 = 2^384 - 2^128 - 2^96 + 2^32 - 1. a can be r.
- * Uses algorithm 2.30 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp384_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- int a_bits = mpl_significant_bits(a);
- int i;
-
- /* m1, m2 are statically-allocated mp_int of exactly the size we need */
- mp_int m[10];
-
-#ifdef ECL_THIRTY_TWO_BIT
- mp_digit s[10][12];
- for (i = 0; i < 10; i++) {
- MP_SIGN(&m[i]) = MP_ZPOS;
- MP_ALLOC(&m[i]) = 12;
- MP_USED(&m[i]) = 12;
- MP_DIGITS(&m[i]) = s[i];
- }
-#else
- mp_digit s[10][6];
- for (i = 0; i < 10; i++) {
- MP_SIGN(&m[i]) = MP_ZPOS;
- MP_ALLOC(&m[i]) = 6;
- MP_USED(&m[i]) = 6;
- MP_DIGITS(&m[i]) = s[i];
- }
-#endif
-
-#ifdef ECL_THIRTY_TWO_BIT
- /* for polynomials larger than twice the field size or polynomials
- * not using all words, use regular reduction */
- if ((a_bits > 768) || (a_bits <= 736)) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
- for (i = 0; i < 12; i++) {
- s[0][i] = MP_DIGIT(a, i);
- }
- s[1][0] = 0;
- s[1][1] = 0;
- s[1][2] = 0;
- s[1][3] = 0;
- s[1][4] = MP_DIGIT(a, 21);
- s[1][5] = MP_DIGIT(a, 22);
- s[1][6] = MP_DIGIT(a, 23);
- s[1][7] = 0;
- s[1][8] = 0;
- s[1][9] = 0;
- s[1][10] = 0;
- s[1][11] = 0;
- for (i = 0; i < 12; i++) {
- s[2][i] = MP_DIGIT(a, i+12);
- }
- s[3][0] = MP_DIGIT(a, 21);
- s[3][1] = MP_DIGIT(a, 22);
- s[3][2] = MP_DIGIT(a, 23);
- for (i = 3; i < 12; i++) {
- s[3][i] = MP_DIGIT(a, i+9);
- }
- s[4][0] = 0;
- s[4][1] = MP_DIGIT(a, 23);
- s[4][2] = 0;
- s[4][3] = MP_DIGIT(a, 20);
- for (i = 4; i < 12; i++) {
- s[4][i] = MP_DIGIT(a, i+8);
- }
- s[5][0] = 0;
- s[5][1] = 0;
- s[5][2] = 0;
- s[5][3] = 0;
- s[5][4] = MP_DIGIT(a, 20);
- s[5][5] = MP_DIGIT(a, 21);
- s[5][6] = MP_DIGIT(a, 22);
- s[5][7] = MP_DIGIT(a, 23);
- s[5][8] = 0;
- s[5][9] = 0;
- s[5][10] = 0;
- s[5][11] = 0;
- s[6][0] = MP_DIGIT(a, 20);
- s[6][1] = 0;
- s[6][2] = 0;
- s[6][3] = MP_DIGIT(a, 21);
- s[6][4] = MP_DIGIT(a, 22);
- s[6][5] = MP_DIGIT(a, 23);
- s[6][6] = 0;
- s[6][7] = 0;
- s[6][8] = 0;
- s[6][9] = 0;
- s[6][10] = 0;
- s[6][11] = 0;
- s[7][0] = MP_DIGIT(a, 23);
- for (i = 1; i < 12; i++) {
- s[7][i] = MP_DIGIT(a, i+11);
- }
- s[8][0] = 0;
- s[8][1] = MP_DIGIT(a, 20);
- s[8][2] = MP_DIGIT(a, 21);
- s[8][3] = MP_DIGIT(a, 22);
- s[8][4] = MP_DIGIT(a, 23);
- s[8][5] = 0;
- s[8][6] = 0;
- s[8][7] = 0;
- s[8][8] = 0;
- s[8][9] = 0;
- s[8][10] = 0;
- s[8][11] = 0;
- s[9][0] = 0;
- s[9][1] = 0;
- s[9][2] = 0;
- s[9][3] = MP_DIGIT(a, 23);
- s[9][4] = MP_DIGIT(a, 23);
- s[9][5] = 0;
- s[9][6] = 0;
- s[9][7] = 0;
- s[9][8] = 0;
- s[9][9] = 0;
- s[9][10] = 0;
- s[9][11] = 0;
-
- MP_CHECKOK(mp_add(&m[0], &m[1], r));
- MP_CHECKOK(mp_add(r, &m[1], r));
- MP_CHECKOK(mp_add(r, &m[2], r));
- MP_CHECKOK(mp_add(r, &m[3], r));
- MP_CHECKOK(mp_add(r, &m[4], r));
- MP_CHECKOK(mp_add(r, &m[5], r));
- MP_CHECKOK(mp_add(r, &m[6], r));
- MP_CHECKOK(mp_sub(r, &m[7], r));
- MP_CHECKOK(mp_sub(r, &m[8], r));
- MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r));
- s_mp_clamp(r);
- }
-#else
- /* for polynomials larger than twice the field size or polynomials
- * not using all words, use regular reduction */
- if ((a_bits > 768) || (a_bits <= 736)) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
- for (i = 0; i < 6; i++) {
- s[0][i] = MP_DIGIT(a, i);
- }
- s[1][0] = 0;
- s[1][1] = 0;
- s[1][2] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
- s[1][3] = MP_DIGIT(a, 11) >> 32;
- s[1][4] = 0;
- s[1][5] = 0;
- for (i = 0; i < 6; i++) {
- s[2][i] = MP_DIGIT(a, i+6);
- }
- s[3][0] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
- s[3][1] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32);
- for (i = 2; i < 6; i++) {
- s[3][i] = (MP_DIGIT(a, i+4) >> 32) | (MP_DIGIT(a, i+5) << 32);
- }
- s[4][0] = (MP_DIGIT(a, 11) >> 32) << 32;
- s[4][1] = MP_DIGIT(a, 10) << 32;
- for (i = 2; i < 6; i++) {
- s[4][i] = MP_DIGIT(a, i+4);
- }
- s[5][0] = 0;
- s[5][1] = 0;
- s[5][2] = MP_DIGIT(a, 10);
- s[5][3] = MP_DIGIT(a, 11);
- s[5][4] = 0;
- s[5][5] = 0;
- s[6][0] = (MP_DIGIT(a, 10) << 32) >> 32;
- s[6][1] = (MP_DIGIT(a, 10) >> 32) << 32;
- s[6][2] = MP_DIGIT(a, 11);
- s[6][3] = 0;
- s[6][4] = 0;
- s[6][5] = 0;
- s[7][0] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32);
- for (i = 1; i < 6; i++) {
- s[7][i] = (MP_DIGIT(a, i+5) >> 32) | (MP_DIGIT(a, i+6) << 32);
- }
- s[8][0] = MP_DIGIT(a, 10) << 32;
- s[8][1] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32);
- s[8][2] = MP_DIGIT(a, 11) >> 32;
- s[8][3] = 0;
- s[8][4] = 0;
- s[8][5] = 0;
- s[9][0] = 0;
- s[9][1] = (MP_DIGIT(a, 11) >> 32) << 32;
- s[9][2] = MP_DIGIT(a, 11) >> 32;
- s[9][3] = 0;
- s[9][4] = 0;
- s[9][5] = 0;
-
- MP_CHECKOK(mp_add(&m[0], &m[1], r));
- MP_CHECKOK(mp_add(r, &m[1], r));
- MP_CHECKOK(mp_add(r, &m[2], r));
- MP_CHECKOK(mp_add(r, &m[3], r));
- MP_CHECKOK(mp_add(r, &m[4], r));
- MP_CHECKOK(mp_add(r, &m[5], r));
- MP_CHECKOK(mp_add(r, &m[6], r));
- MP_CHECKOK(mp_sub(r, &m[7], r));
- MP_CHECKOK(mp_sub(r, &m[8], r));
- MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r));
- s_mp_clamp(r);
- }
-#endif
-
- CLEANUP:
- return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p384. Store the
- * result in r. r could be a. Uses optimized modular reduction for p384.
- */
-mp_err
-ec_GFp_nistp384_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_sqr(a, r));
- MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p384.
- * Store the result in r. r could be a or b; a could be b. Uses
- * optimized modular reduction for p384. */
-mp_err
-ec_GFp_nistp384_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp384(ECGroup *group, ECCurveName name)
-{
- if (name == ECCurve_NIST_P384) {
- group->meth->field_mod = &ec_GFp_nistp384_mod;
- group->meth->field_mul = &ec_GFp_nistp384_mul;
- group->meth->field_sqr = &ec_GFp_nistp384_sqr;
- }
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ecp_521.c b/src/share/native/sun/security/ec/ecp_521.c
deleted file mode 100644
index 68dca16..0000000
--- a/src/share/native/sun/security/ec/ecp_521.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define ECP521_DIGITS ECL_CURVE_DIGITS(521)
-
-/* Fast modular reduction for p521 = 2^521 - 1. a can be r. Uses
- * algorithm 2.31 from Hankerson, Menezes, Vanstone. Guide to
- * Elliptic Curve Cryptography. */
-mp_err
-ec_GFp_nistp521_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- int a_bits = mpl_significant_bits(a);
- int i;
-
- /* m1, m2 are statically-allocated mp_int of exactly the size we need */
- mp_int m1;
-
- mp_digit s1[ECP521_DIGITS] = { 0 };
-
- MP_SIGN(&m1) = MP_ZPOS;
- MP_ALLOC(&m1) = ECP521_DIGITS;
- MP_USED(&m1) = ECP521_DIGITS;
- MP_DIGITS(&m1) = s1;
-
- if (a_bits < 521) {
- if (a==r) return MP_OKAY;
- return mp_copy(a, r);
- }
- /* for polynomials larger than twice the field size or polynomials
- * not using all words, use regular reduction */
- if (a_bits > (521*2)) {
- MP_CHECKOK(mp_mod(a, &meth->irr, r));
- } else {
-#define FIRST_DIGIT (ECP521_DIGITS-1)
- for (i = FIRST_DIGIT; i < MP_USED(a)-1; i++) {
- s1[i-FIRST_DIGIT] = (MP_DIGIT(a, i) >> 9)
- | (MP_DIGIT(a, 1+i) << (MP_DIGIT_BIT-9));
- }
- s1[i-FIRST_DIGIT] = MP_DIGIT(a, i) >> 9;
-
- if ( a != r ) {
- MP_CHECKOK(s_mp_pad(r,ECP521_DIGITS));
- for (i = 0; i < ECP521_DIGITS; i++) {
- MP_DIGIT(r,i) = MP_DIGIT(a, i);
- }
- }
- MP_USED(r) = ECP521_DIGITS;
- MP_DIGIT(r,FIRST_DIGIT) &= 0x1FF;
-
- MP_CHECKOK(s_mp_add(r, &m1));
- if (MP_DIGIT(r, FIRST_DIGIT) & 0x200) {
- MP_CHECKOK(s_mp_add_d(r,1));
- MP_DIGIT(r,FIRST_DIGIT) &= 0x1FF;
- }
- s_mp_clamp(r);
- }
-
- CLEANUP:
- return res;
-}
-
-/* Compute the square of polynomial a, reduce modulo p521. Store the
- * result in r. r could be a. Uses optimized modular reduction for p521.
- */
-mp_err
-ec_GFp_nistp521_sqr(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_sqr(a, r));
- MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p521.
- * Store the result in r. r could be a or b; a could be b. Uses
- * optimized modular reduction for p521. */
-mp_err
-ec_GFp_nistp521_mul(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
- CLEANUP:
- return res;
-}
-
-/* Divides two field elements. If a is NULL, then returns the inverse of
- * b. */
-mp_err
-ec_GFp_nistp521_div(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
- mp_int t;
-
- /* If a is NULL, then return the inverse of b, otherwise return a/b. */
- if (a == NULL) {
- return mp_invmod(b, &meth->irr, r);
- } else {
- /* MPI doesn't support divmod, so we implement it using invmod and
- * mulmod. */
- MP_CHECKOK(mp_init(&t, FLAG(b)));
- MP_CHECKOK(mp_invmod(b, &meth->irr, &t));
- MP_CHECKOK(mp_mul(a, &t, r));
- MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth));
- CLEANUP:
- mp_clear(&t);
- return res;
- }
-}
-
-/* Wire in fast field arithmetic and precomputation of base point for
- * named curves. */
-mp_err
-ec_group_set_gfp521(ECGroup *group, ECCurveName name)
-{
- if (name == ECCurve_NIST_P521) {
- group->meth->field_mod = &ec_GFp_nistp521_mod;
- group->meth->field_mul = &ec_GFp_nistp521_mul;
- group->meth->field_sqr = &ec_GFp_nistp521_sqr;
- group->meth->field_div = &ec_GFp_nistp521_div;
- }
- return MP_OKAY;
-}
diff --git a/src/share/native/sun/security/ec/ecp_aff.c b/src/share/native/sun/security/ec/ecp_aff.c
deleted file mode 100644
index f8d88d4..0000000
--- a/src/share/native/sun/security/ec/ecp_aff.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>,
- * Nils Larsch <nla@trustcenter.de>, and
- * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
-mp_err
-ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py)
-{
-
- if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
- return MP_YES;
- } else {
- return MP_NO;
- }
-
-}
-
-/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
-mp_err
-ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py)
-{
- mp_zero(px);
- mp_zero(py);
- return MP_OKAY;
-}
-
-/* Computes R = P + Q based on IEEE P1363 A.10.1. Elliptic curve points P,
- * Q, and R can all be identical. Uses affine coordinates. Assumes input
- * is already field-encoded using field_enc, and returns output that is
- * still field-encoded. */
-mp_err
-ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int lambda, temp, tempx, tempy;
-
- MP_DIGITS(&lambda) = 0;
- MP_DIGITS(&temp) = 0;
- MP_DIGITS(&tempx) = 0;
- MP_DIGITS(&tempy) = 0;
- MP_CHECKOK(mp_init(&lambda, FLAG(px)));
- MP_CHECKOK(mp_init(&temp, FLAG(px)));
- MP_CHECKOK(mp_init(&tempx, FLAG(px)));
- MP_CHECKOK(mp_init(&tempy, FLAG(px)));
- /* if P = inf, then R = Q */
- if (ec_GFp_pt_is_inf_aff(px, py) == 0) {
- MP_CHECKOK(mp_copy(qx, rx));
- MP_CHECKOK(mp_copy(qy, ry));
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* if Q = inf, then R = P */
- if (ec_GFp_pt_is_inf_aff(qx, qy) == 0) {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* if px != qx, then lambda = (py-qy) / (px-qx) */
- if (mp_cmp(px, qx) != 0) {
- MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth));
- MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_div(&tempy, &tempx, &lambda, group->meth));
- } else {
- /* if py != qy or qy = 0, then R = inf */
- if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qy) == 0)) {
- mp_zero(rx);
- mp_zero(ry);
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* lambda = (3qx^2+a) / (2qy) */
- MP_CHECKOK(group->meth->field_sqr(qx, &tempx, group->meth));
- MP_CHECKOK(mp_set_int(&temp, 3));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
- }
- MP_CHECKOK(group->meth->
- field_mul(&tempx, &temp, &tempx, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&tempx, &group->curvea, &tempx, group->meth));
- MP_CHECKOK(mp_set_int(&temp, 2));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth));
- }
- MP_CHECKOK(group->meth->field_mul(qy, &temp, &tempy, group->meth));
- MP_CHECKOK(group->meth->
- field_div(&tempx, &tempy, &lambda, group->meth));
- }
- /* rx = lambda^2 - px - qx */
- MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth));
- MP_CHECKOK(group->meth->field_sub(&tempx, px, &tempx, group->meth));
- MP_CHECKOK(group->meth->field_sub(&tempx, qx, &tempx, group->meth));
- /* ry = (x1-x2) * lambda - y1 */
- MP_CHECKOK(group->meth->field_sub(qx, &tempx, &tempy, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(&tempy, &lambda, &tempy, group->meth));
- MP_CHECKOK(group->meth->field_sub(&tempy, qy, &tempy, group->meth));
- MP_CHECKOK(mp_copy(&tempx, rx));
- MP_CHECKOK(mp_copy(&tempy, ry));
-
- CLEANUP:
- mp_clear(&lambda);
- mp_clear(&temp);
- mp_clear(&tempx);
- mp_clear(&tempy);
- return res;
-}
-
-/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be
- * identical. Uses affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int nqy;
-
- MP_DIGITS(&nqy) = 0;
- MP_CHECKOK(mp_init(&nqy, FLAG(px)));
- /* nqy = -qy */
- MP_CHECKOK(group->meth->field_neg(qy, &nqy, group->meth));
- res = group->point_add(px, py, qx, &nqy, rx, ry, group);
- CLEANUP:
- mp_clear(&nqy);
- return res;
-}
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * affine coordinates. Assumes input is already field-encoded using
- * field_enc, and returns output that is still field-encoded. */
-mp_err
-ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, const ECGroup *group)
-{
- return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group);
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GFP_PT_MUL_AFF
-/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and
- * R can be identical. Uses affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int k, k3, qx, qy, sx, sy;
- int b1, b3, i, l;
-
- MP_DIGITS(&k) = 0;
- MP_DIGITS(&k3) = 0;
- MP_DIGITS(&qx) = 0;
- MP_DIGITS(&qy) = 0;
- MP_DIGITS(&sx) = 0;
- MP_DIGITS(&sy) = 0;
- MP_CHECKOK(mp_init(&k));
- MP_CHECKOK(mp_init(&k3));
- MP_CHECKOK(mp_init(&qx));
- MP_CHECKOK(mp_init(&qy));
- MP_CHECKOK(mp_init(&sx));
- MP_CHECKOK(mp_init(&sy));
-
- /* if n = 0 then r = inf */
- if (mp_cmp_z(n) == 0) {
- mp_zero(rx);
- mp_zero(ry);
- res = MP_OKAY;
- goto CLEANUP;
- }
- /* Q = P, k = n */
- MP_CHECKOK(mp_copy(px, &qx));
- MP_CHECKOK(mp_copy(py, &qy));
- MP_CHECKOK(mp_copy(n, &k));
- /* if n < 0 then Q = -Q, k = -k */
- if (mp_cmp_z(n) < 0) {
- MP_CHECKOK(group->meth->field_neg(&qy, &qy, group->meth));
- MP_CHECKOK(mp_neg(&k, &k));
- }
-#ifdef ECL_DEBUG /* basic double and add method */
- l = mpl_significant_bits(&k) - 1;
- MP_CHECKOK(mp_copy(&qx, &sx));
- MP_CHECKOK(mp_copy(&qy, &sy));
- for (i = l - 1; i >= 0; i--) {
- /* S = 2S */
- MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
- /* if k_i = 1, then S = S + Q */
- if (mpl_get_bit(&k, i) != 0) {
- MP_CHECKOK(group->
- point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
- }
- }
-#else /* double and add/subtract method from
- * standard */
- /* k3 = 3 * k */
- MP_CHECKOK(mp_set_int(&k3, 3));
- MP_CHECKOK(mp_mul(&k, &k3, &k3));
- /* S = Q */
- MP_CHECKOK(mp_copy(&qx, &sx));
- MP_CHECKOK(mp_copy(&qy, &sy));
- /* l = index of high order bit in binary representation of 3*k */
- l = mpl_significant_bits(&k3) - 1;
- /* for i = l-1 downto 1 */
- for (i = l - 1; i >= 1; i--) {
- /* S = 2S */
- MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group));
- b3 = MP_GET_BIT(&k3, i);
- b1 = MP_GET_BIT(&k, i);
- /* if k3_i = 1 and k_i = 0, then S = S + Q */
- if ((b3 == 1) && (b1 == 0)) {
- MP_CHECKOK(group->
- point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
- /* if k3_i = 0 and k_i = 1, then S = S - Q */
- } else if ((b3 == 0) && (b1 == 1)) {
- MP_CHECKOK(group->
- point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
- }
- }
-#endif
- /* output S */
- MP_CHECKOK(mp_copy(&sx, rx));
- MP_CHECKOK(mp_copy(&sy, ry));
-
- CLEANUP:
- mp_clear(&k);
- mp_clear(&k3);
- mp_clear(&qx);
- mp_clear(&qy);
- mp_clear(&sx);
- mp_clear(&sy);
- return res;
-}
-#endif
-
-/* Validates a point on a GFp curve. */
-mp_err
-ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
-{
- mp_err res = MP_NO;
- mp_int accl, accr, tmp, pxt, pyt;
-
- MP_DIGITS(&accl) = 0;
- MP_DIGITS(&accr) = 0;
- MP_DIGITS(&tmp) = 0;
- MP_DIGITS(&pxt) = 0;
- MP_DIGITS(&pyt) = 0;
- MP_CHECKOK(mp_init(&accl, FLAG(px)));
- MP_CHECKOK(mp_init(&accr, FLAG(px)));
- MP_CHECKOK(mp_init(&tmp, FLAG(px)));
- MP_CHECKOK(mp_init(&pxt, FLAG(px)));
- MP_CHECKOK(mp_init(&pyt, FLAG(px)));
-
- /* 1: Verify that publicValue is not the point at infinity */
- if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 2: Verify that the coordinates of publicValue are elements
- * of the field.
- */
- if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
- (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 3: Verify that publicValue is on the curve. */
- if (group->meth->field_enc) {
- group->meth->field_enc(px, &pxt, group->meth);
- group->meth->field_enc(py, &pyt, group->meth);
- } else {
- mp_copy(px, &pxt);
- mp_copy(py, &pyt);
- }
- /* left-hand side: y^2 */
- MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) );
- /* right-hand side: x^3 + a*x + b */
- MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) );
- MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) );
- MP_CHECKOK( group->meth->field_mul(&group->curvea, &pxt, &tmp, group->meth) );
- MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) );
- MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) );
- /* check LHS - RHS == 0 */
- MP_CHECKOK( group->meth->field_sub(&accl, &accr, &accr, group->meth) );
- if (mp_cmp_z(&accr) != 0) {
- res = MP_NO;
- goto CLEANUP;
- }
- /* 4: Verify that the order of the curve times the publicValue
- * is the point at infinity.
- */
- MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );
- if (ec_GFp_pt_is_inf_aff(&pxt, &pyt) != MP_YES) {
- res = MP_NO;
- goto CLEANUP;
- }
-
- res = MP_YES;
-
-CLEANUP:
- mp_clear(&accl);
- mp_clear(&accr);
- mp_clear(&tmp);
- mp_clear(&pxt);
- mp_clear(&pyt);
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ecp_jac.c b/src/share/native/sun/security/ec/ecp_jac.c
deleted file mode 100644
index 47c0e19..0000000
--- a/src/share/native/sun/security/ec/ecp_jac.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang-Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <fungstep@hotmail.com>, and
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories.
- * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>,
- * Nils Larsch <nla@trustcenter.de>, and
- * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-#ifdef ECL_DEBUG
-#include <assert.h>
-#endif
-
-/* Converts a point P(px, py) from affine coordinates to Jacobian
- * projective coordinates R(rx, ry, rz). Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
- mp_int *ry, mp_int *rz, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
-
- if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
- } else {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- MP_CHECKOK(mp_set_int(rz, 1));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth));
- }
- }
- CLEANUP:
- return res;
-}
-
-/* Converts a point P(px, py, pz) from Jacobian projective coordinates to
- * affine coordinates R(rx, ry). P and R can share x and y coordinates.
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded. */
-mp_err
-ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int z1, z2, z3;
-
- MP_DIGITS(&z1) = 0;
- MP_DIGITS(&z2) = 0;
- MP_DIGITS(&z3) = 0;
- MP_CHECKOK(mp_init(&z1, FLAG(px)));
- MP_CHECKOK(mp_init(&z2, FLAG(px)));
- MP_CHECKOK(mp_init(&z3, FLAG(px)));
-
- /* if point at infinity, then set point at infinity and exit */
- if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
- MP_CHECKOK(ec_GFp_pt_set_inf_aff(rx, ry));
- goto CLEANUP;
- }
-
- /* transform (px, py, pz) into (px / pz^2, py / pz^3) */
- if (mp_cmp_d(pz, 1) == 0) {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- } else {
- MP_CHECKOK(group->meth->field_div(NULL, pz, &z1, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&z1, &z2, group->meth));
- MP_CHECKOK(group->meth->field_mul(&z1, &z2, &z3, group->meth));
- MP_CHECKOK(group->meth->field_mul(px, &z2, rx, group->meth));
- MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth));
- }
-
- CLEANUP:
- mp_clear(&z1);
- mp_clear(&z2);
- mp_clear(&z3);
- return res;
-}
-
-/* Checks if point P(px, py, pz) is at infinity. Uses Jacobian
- * coordinates. */
-mp_err
-ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz)
-{
- return mp_cmp_z(pz);
-}
-
-/* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian
- * coordinates. */
-mp_err
-ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz)
-{
- mp_zero(pz);
- return MP_OKAY;
-}
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, 1). Elliptic curve points P, Q, and R can all be identical.
- * Uses mixed Jacobian-affine coordinates. Assumes input is already
- * field-encoded using field_enc, and returns output that is still
- * field-encoded. Uses equation (2) from Brown, Hankerson, Lopez, and
- * Menezes. Software Implementation of the NIST Elliptic Curves Over Prime
- * Fields. */
-mp_err
-ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
- const mp_int *qx, const mp_int *qy, mp_int *rx,
- mp_int *ry, mp_int *rz, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int A, B, C, D, C2, C3;
-
- MP_DIGITS(&A) = 0;
- MP_DIGITS(&B) = 0;
- MP_DIGITS(&C) = 0;
- MP_DIGITS(&D) = 0;
- MP_DIGITS(&C2) = 0;
- MP_DIGITS(&C3) = 0;
- MP_CHECKOK(mp_init(&A, FLAG(px)));
- MP_CHECKOK(mp_init(&B, FLAG(px)));
- MP_CHECKOK(mp_init(&C, FLAG(px)));
- MP_CHECKOK(mp_init(&D, FLAG(px)));
- MP_CHECKOK(mp_init(&C2, FLAG(px)));
- MP_CHECKOK(mp_init(&C3, FLAG(px)));
-
- /* If either P or Q is the point at infinity, then return the other
- * point */
- if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
- MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group));
- goto CLEANUP;
- }
- if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- MP_CHECKOK(mp_copy(pz, rz));
- goto CLEANUP;
- }
-
- /* A = qx * pz^2, B = qy * pz^3 */
- MP_CHECKOK(group->meth->field_sqr(pz, &A, group->meth));
- MP_CHECKOK(group->meth->field_mul(&A, pz, &B, group->meth));
- MP_CHECKOK(group->meth->field_mul(&A, qx, &A, group->meth));
- MP_CHECKOK(group->meth->field_mul(&B, qy, &B, group->meth));
-
- /* C = A - px, D = B - py */
- MP_CHECKOK(group->meth->field_sub(&A, px, &C, group->meth));
- MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth));
-
- /* C2 = C^2, C3 = C^3 */
- MP_CHECKOK(group->meth->field_sqr(&C, &C2, group->meth));
- MP_CHECKOK(group->meth->field_mul(&C, &C2, &C3, group->meth));
-
- /* rz = pz * C */
- MP_CHECKOK(group->meth->field_mul(pz, &C, rz, group->meth));
-
- /* C = px * C^2 */
- MP_CHECKOK(group->meth->field_mul(px, &C2, &C, group->meth));
- /* A = D^2 */
- MP_CHECKOK(group->meth->field_sqr(&D, &A, group->meth));
-
- /* rx = D^2 - (C^3 + 2 * (px * C^2)) */
- MP_CHECKOK(group->meth->field_add(&C, &C, rx, group->meth));
- MP_CHECKOK(group->meth->field_add(&C3, rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_sub(&A, rx, rx, group->meth));
-
- /* C3 = py * C^3 */
- MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth));
-
- /* ry = D * (px * C^2 - rx) - py * C^3 */
- MP_CHECKOK(group->meth->field_sub(&C, rx, ry, group->meth));
- MP_CHECKOK(group->meth->field_mul(&D, ry, ry, group->meth));
- MP_CHECKOK(group->meth->field_sub(ry, &C3, ry, group->meth));
-
- CLEANUP:
- mp_clear(&A);
- mp_clear(&B);
- mp_clear(&C);
- mp_clear(&D);
- mp_clear(&C2);
- mp_clear(&C3);
- return res;
-}
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * Jacobian coordinates.
- *
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded.
- *
- * This routine implements Point Doubling in the Jacobian Projective
- * space as described in the paper "Efficient elliptic curve exponentiation
- * using mixed coordinates", by H. Cohen, A Miyaji, T. Ono.
- */
-mp_err
-ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz,
- mp_int *rx, mp_int *ry, mp_int *rz, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int t0, t1, M, S;
-
- MP_DIGITS(&t0) = 0;
- MP_DIGITS(&t1) = 0;
- MP_DIGITS(&M) = 0;
- MP_DIGITS(&S) = 0;
- MP_CHECKOK(mp_init(&t0, FLAG(px)));
- MP_CHECKOK(mp_init(&t1, FLAG(px)));
- MP_CHECKOK(mp_init(&M, FLAG(px)));
- MP_CHECKOK(mp_init(&S, FLAG(px)));
-
- if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
- goto CLEANUP;
- }
-
- if (mp_cmp_d(pz, 1) == 0) {
- /* M = 3 * px^2 + a */
- MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
- MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
- MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
- MP_CHECKOK(group->meth->
- field_add(&t0, &group->curvea, &M, group->meth));
- } else if (mp_cmp_int(&group->curvea, -3, FLAG(px)) == 0) {
- /* M = 3 * (px + pz^2) * (px - pz^2) */
- MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
- MP_CHECKOK(group->meth->field_add(px, &M, &t0, group->meth));
- MP_CHECKOK(group->meth->field_sub(px, &M, &t1, group->meth));
- MP_CHECKOK(group->meth->field_mul(&t0, &t1, &M, group->meth));
- MP_CHECKOK(group->meth->field_add(&M, &M, &t0, group->meth));
- MP_CHECKOK(group->meth->field_add(&t0, &M, &M, group->meth));
- } else {
- /* M = 3 * (px^2) + a * (pz^4) */
- MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth));
- MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth));
- MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth));
- MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&M, &M, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(&M, &group->curvea, &M, group->meth));
- MP_CHECKOK(group->meth->field_add(&M, &t0, &M, group->meth));
- }
-
- /* rz = 2 * py * pz */
- /* t0 = 4 * py^2 */
- if (mp_cmp_d(pz, 1) == 0) {
- MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth));
- MP_CHECKOK(group->meth->field_sqr(rz, &t0, group->meth));
- } else {
- MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth));
- MP_CHECKOK(group->meth->field_mul(&t0, pz, rz, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&t0, &t0, group->meth));
- }
-
- /* S = 4 * px * py^2 = px * (2 * py)^2 */
- MP_CHECKOK(group->meth->field_mul(px, &t0, &S, group->meth));
-
- /* rx = M^2 - 2 * S */
- MP_CHECKOK(group->meth->field_add(&S, &S, &t1, group->meth));
- MP_CHECKOK(group->meth->field_sqr(&M, rx, group->meth));
- MP_CHECKOK(group->meth->field_sub(rx, &t1, rx, group->meth));
-
- /* ry = M * (S - rx) - 8 * py^4 */
- MP_CHECKOK(group->meth->field_sqr(&t0, &t1, group->meth));
- if (mp_isodd(&t1)) {
- MP_CHECKOK(mp_add(&t1, &group->meth->irr, &t1));
- }
- MP_CHECKOK(mp_div_2(&t1, &t1));
- MP_CHECKOK(group->meth->field_sub(&S, rx, &S, group->meth));
- MP_CHECKOK(group->meth->field_mul(&M, &S, &M, group->meth));
- MP_CHECKOK(group->meth->field_sub(&M, &t1, ry, group->meth));
-
- CLEANUP:
- mp_clear(&t0);
- mp_clear(&t1);
- mp_clear(&M);
- mp_clear(&S);
- return res;
-}
-
-/* by default, this routine is unused and thus doesn't need to be compiled */
-#ifdef ECL_ENABLE_GFP_PT_MUL_JAC
-/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
- * a, b and p are the elliptic curve coefficients and the prime that
- * determines the field GFp. Elliptic curve points P and R can be
- * identical. Uses mixed Jacobian-affine coordinates. Assumes input is
- * already field-encoded using field_enc, and returns output that is still
- * field-encoded. Uses 4-bit window method. */
-mp_err
-ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int precomp[16][2], rz;
- int i, ni, d;
-
- MP_DIGITS(&rz) = 0;
- for (i = 0; i < 16; i++) {
- MP_DIGITS(&precomp[i][0]) = 0;
- MP_DIGITS(&precomp[i][1]) = 0;
- }
-
- ARGCHK(group != NULL, MP_BADARG);
- ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
-
- /* initialize precomputation table */
- for (i = 0; i < 16; i++) {
- MP_CHECKOK(mp_init(&precomp[i][0]));
- MP_CHECKOK(mp_init(&precomp[i][1]));
- }
-
- /* fill precomputation table */
- mp_zero(&precomp[0][0]);
- mp_zero(&precomp[0][1]);
- MP_CHECKOK(mp_copy(px, &precomp[1][0]));
- MP_CHECKOK(mp_copy(py, &precomp[1][1]));
- for (i = 2; i < 16; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[1][0], &precomp[1][1],
- &precomp[i - 1][0], &precomp[i - 1][1],
- &precomp[i][0], &precomp[i][1], group));
- }
-
- d = (mpl_significant_bits(n) + 3) / 4;
-
- /* R = inf */
- MP_CHECKOK(mp_init(&rz));
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
- for (i = d - 1; i >= 0; i--) {
- /* compute window ni */
- ni = MP_GET_BIT(n, 4 * i + 3);
- ni <<= 1;
- ni |= MP_GET_BIT(n, 4 * i + 2);
- ni <<= 1;
- ni |= MP_GET_BIT(n, 4 * i + 1);
- ni <<= 1;
- ni |= MP_GET_BIT(n, 4 * i);
- /* R = 2^4 * R */
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- /* R = R + (ni * P) */
- MP_CHECKOK(ec_GFp_pt_add_jac_aff
- (rx, ry, &rz, &precomp[ni][0], &precomp[ni][1], rx, ry,
- &rz, group));
- }
-
- /* convert result S to affine coordinates */
- MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
- CLEANUP:
- mp_clear(&rz);
- for (i = 0; i < 16; i++) {
- mp_clear(&precomp[i][0]);
- mp_clear(&precomp[i][1]);
- }
- return res;
-}
-#endif
-
-/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
- * k2 * P(x, y), where G is the generator (base point) of the group of
- * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
- * Uses mixed Jacobian-affine coordinates. Input and output values are
- * assumed to be NOT field-encoded. Uses algorithm 15 (simultaneous
- * multiple point multiplication) from Brown, Hankerson, Lopez, Menezes.
- * Software Implementation of the NIST Elliptic Curves over Prime Fields. */
-mp_err
-ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px,
- const mp_int *py, mp_int *rx, mp_int *ry,
- const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int precomp[4][4][2];
- mp_int rz;
- const mp_int *a, *b;
- int i, j;
- int ai, bi, d;
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- MP_DIGITS(&precomp[i][j][0]) = 0;
- MP_DIGITS(&precomp[i][j][1]) = 0;
- }
- }
- MP_DIGITS(&rz) = 0;
-
- ARGCHK(group != NULL, MP_BADARG);
- ARGCHK(!((k1 == NULL)
- && ((k2 == NULL) || (px == NULL)
- || (py == NULL))), MP_BADARG);
-
- /* if some arguments are not defined used ECPoint_mul */
- if (k1 == NULL) {
- return ECPoint_mul(group, k2, px, py, rx, ry);
- } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
- return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
- }
-
- /* initialize precomputation table */
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- MP_CHECKOK(mp_init(&precomp[i][j][0], FLAG(k1)));
- MP_CHECKOK(mp_init(&precomp[i][j][1], FLAG(k1)));
- }
- }
-
- /* fill precomputation table */
- /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
- if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
- a = k2;
- b = k1;
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->
- field_enc(px, &precomp[1][0][0], group->meth));
- MP_CHECKOK(group->meth->
- field_enc(py, &precomp[1][0][1], group->meth));
- } else {
- MP_CHECKOK(mp_copy(px, &precomp[1][0][0]));
- MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
- }
- MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0]));
- MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1]));
- } else {
- a = k1;
- b = k2;
- MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0]));
- MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1]));
- if (group->meth->field_enc) {
- MP_CHECKOK(group->meth->
- field_enc(px, &precomp[0][1][0], group->meth));
- MP_CHECKOK(group->meth->
- field_enc(py, &precomp[0][1][1], group->meth));
- } else {
- MP_CHECKOK(mp_copy(px, &precomp[0][1][0]));
- MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));
- }
- }
- /* precompute [*][0][*] */
- mp_zero(&precomp[0][0][0]);
- mp_zero(&precomp[0][0][1]);
- MP_CHECKOK(group->
- point_dbl(&precomp[1][0][0], &precomp[1][0][1],
- &precomp[2][0][0], &precomp[2][0][1], group));
- MP_CHECKOK(group->
- point_add(&precomp[1][0][0], &precomp[1][0][1],
- &precomp[2][0][0], &precomp[2][0][1],
- &precomp[3][0][0], &precomp[3][0][1], group));
- /* precompute [*][1][*] */
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][1][0], &precomp[i][1][1], group));
- }
- /* precompute [*][2][*] */
- MP_CHECKOK(group->
- point_dbl(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[0][2][0], &precomp[0][2][1], group));
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][2][0], &precomp[0][2][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][2][0], &precomp[i][2][1], group));
- }
- /* precompute [*][3][*] */
- MP_CHECKOK(group->
- point_add(&precomp[0][1][0], &precomp[0][1][1],
- &precomp[0][2][0], &precomp[0][2][1],
- &precomp[0][3][0], &precomp[0][3][1], group));
- for (i = 1; i < 4; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[0][3][0], &precomp[0][3][1],
- &precomp[i][0][0], &precomp[i][0][1],
- &precomp[i][3][0], &precomp[i][3][1], group));
- }
-
- d = (mpl_significant_bits(a) + 1) / 2;
-
- /* R = inf */
- MP_CHECKOK(mp_init(&rz, FLAG(k1)));
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
- for (i = d - 1; i >= 0; i--) {
- ai = MP_GET_BIT(a, 2 * i + 1);
- ai <<= 1;
- ai |= MP_GET_BIT(a, 2 * i);
- bi = MP_GET_BIT(b, 2 * i + 1);
- bi <<= 1;
- bi |= MP_GET_BIT(b, 2 * i);
- /* R = 2^2 * R */
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group));
- /* R = R + (ai * A + bi * B) */
- MP_CHECKOK(ec_GFp_pt_add_jac_aff
- (rx, ry, &rz, &precomp[ai][bi][0], &precomp[ai][bi][1],
- rx, ry, &rz, group));
- }
-
- MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
- if (group->meth->field_dec) {
- MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth));
- }
-
- CLEANUP:
- mp_clear(&rz);
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- mp_clear(&precomp[i][j][0]);
- mp_clear(&precomp[i][j][1]);
- }
- }
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ecp_jm.c b/src/share/native/sun/security/ec/ecp_jm.c
deleted file mode 100644
index a5e38db..0000000
--- a/src/share/native/sun/security/ec/ecp_jm.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library for prime field curves.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "ecp.h"
-#include "ecl-priv.h"
-#include "mplogic.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#endif
-
-#define MAX_SCRATCH 6
-
-/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses
- * Modified Jacobian coordinates.
- *
- * Assumes input is already field-encoded using field_enc, and returns
- * output that is still field-encoded.
- *
- */
-mp_err
-ec_GFp_pt_dbl_jm(const mp_int *px, const mp_int *py, const mp_int *pz,
- const mp_int *paz4, mp_int *rx, mp_int *ry, mp_int *rz,
- mp_int *raz4, mp_int scratch[], const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int *t0, *t1, *M, *S;
-
- t0 = &scratch[0];
- t1 = &scratch[1];
- M = &scratch[2];
- S = &scratch[3];
-
-#if MAX_SCRATCH < 4
-#error "Scratch array defined too small "
-#endif
-
- /* Check for point at infinity */
- if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
- /* Set r = pt at infinity by setting rz = 0 */
-
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz));
- goto CLEANUP;
- }
-
- /* M = 3 (px^2) + a*(pz^4) */
- MP_CHECKOK(group->meth->field_sqr(px, t0, group->meth));
- MP_CHECKOK(group->meth->field_add(t0, t0, M, group->meth));
- MP_CHECKOK(group->meth->field_add(t0, M, t0, group->meth));
- MP_CHECKOK(group->meth->field_add(t0, paz4, M, group->meth));
-
- /* rz = 2 * py * pz */
- MP_CHECKOK(group->meth->field_mul(py, pz, S, group->meth));
- MP_CHECKOK(group->meth->field_add(S, S, rz, group->meth));
-
- /* t0 = 2y^2 , t1 = 8y^4 */
- MP_CHECKOK(group->meth->field_sqr(py, t0, group->meth));
- MP_CHECKOK(group->meth->field_add(t0, t0, t0, group->meth));
- MP_CHECKOK(group->meth->field_sqr(t0, t1, group->meth));
- MP_CHECKOK(group->meth->field_add(t1, t1, t1, group->meth));
-
- /* S = 4 * px * py^2 = 2 * px * t0 */
- MP_CHECKOK(group->meth->field_mul(px, t0, S, group->meth));
- MP_CHECKOK(group->meth->field_add(S, S, S, group->meth));
-
-
- /* rx = M^2 - 2S */
- MP_CHECKOK(group->meth->field_sqr(M, rx, group->meth));
- MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth));
- MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth));
-
- /* ry = M * (S - rx) - t1 */
- MP_CHECKOK(group->meth->field_sub(S, rx, S, group->meth));
- MP_CHECKOK(group->meth->field_mul(S, M, ry, group->meth));
- MP_CHECKOK(group->meth->field_sub(ry, t1, ry, group->meth));
-
- /* ra*z^4 = 2*t1*(apz4) */
- MP_CHECKOK(group->meth->field_mul(paz4, t1, raz4, group->meth));
- MP_CHECKOK(group->meth->field_add(raz4, raz4, raz4, group->meth));
-
-
- CLEANUP:
- return res;
-}
-
-/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
- * (qx, qy, 1). Elliptic curve points P, Q, and R can all be identical.
- * Uses mixed Modified_Jacobian-affine coordinates. Assumes input is
- * already field-encoded using field_enc, and returns output that is still
- * field-encoded. */
-mp_err
-ec_GFp_pt_add_jm_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
- const mp_int *paz4, const mp_int *qx,
- const mp_int *qy, mp_int *rx, mp_int *ry, mp_int *rz,
- mp_int *raz4, mp_int scratch[], const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int *A, *B, *C, *D, *C2, *C3;
-
- A = &scratch[0];
- B = &scratch[1];
- C = &scratch[2];
- D = &scratch[3];
- C2 = &scratch[4];
- C3 = &scratch[5];
-
-#if MAX_SCRATCH < 6
-#error "Scratch array defined too small "
-#endif
-
- /* If either P or Q is the point at infinity, then return the other
- * point */
- if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
- MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group));
- MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth));
- MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(raz4, &group->curvea, raz4, group->meth));
- goto CLEANUP;
- }
- if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) {
- MP_CHECKOK(mp_copy(px, rx));
- MP_CHECKOK(mp_copy(py, ry));
- MP_CHECKOK(mp_copy(pz, rz));
- MP_CHECKOK(mp_copy(paz4, raz4));
- goto CLEANUP;
- }
-
- /* A = qx * pz^2, B = qy * pz^3 */
- MP_CHECKOK(group->meth->field_sqr(pz, A, group->meth));
- MP_CHECKOK(group->meth->field_mul(A, pz, B, group->meth));
- MP_CHECKOK(group->meth->field_mul(A, qx, A, group->meth));
- MP_CHECKOK(group->meth->field_mul(B, qy, B, group->meth));
-
- /* C = A - px, D = B - py */
- MP_CHECKOK(group->meth->field_sub(A, px, C, group->meth));
- MP_CHECKOK(group->meth->field_sub(B, py, D, group->meth));
-
- /* C2 = C^2, C3 = C^3 */
- MP_CHECKOK(group->meth->field_sqr(C, C2, group->meth));
- MP_CHECKOK(group->meth->field_mul(C, C2, C3, group->meth));
-
- /* rz = pz * C */
- MP_CHECKOK(group->meth->field_mul(pz, C, rz, group->meth));
-
- /* C = px * C^2 */
- MP_CHECKOK(group->meth->field_mul(px, C2, C, group->meth));
- /* A = D^2 */
- MP_CHECKOK(group->meth->field_sqr(D, A, group->meth));
-
- /* rx = D^2 - (C^3 + 2 * (px * C^2)) */
- MP_CHECKOK(group->meth->field_add(C, C, rx, group->meth));
- MP_CHECKOK(group->meth->field_add(C3, rx, rx, group->meth));
- MP_CHECKOK(group->meth->field_sub(A, rx, rx, group->meth));
-
- /* C3 = py * C^3 */
- MP_CHECKOK(group->meth->field_mul(py, C3, C3, group->meth));
-
- /* ry = D * (px * C^2 - rx) - py * C^3 */
- MP_CHECKOK(group->meth->field_sub(C, rx, ry, group->meth));
- MP_CHECKOK(group->meth->field_mul(D, ry, ry, group->meth));
- MP_CHECKOK(group->meth->field_sub(ry, C3, ry, group->meth));
-
- /* raz4 = a * rz^4 */
- MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth));
- MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth));
- MP_CHECKOK(group->meth->
- field_mul(raz4, &group->curvea, raz4, group->meth));
-CLEANUP:
- return res;
-}
-
-/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic
- * curve points P and R can be identical. Uses mixed Modified-Jacobian
- * co-ordinates for doubling and Chudnovsky Jacobian coordinates for
- * additions. Assumes input is already field-encoded using field_enc, and
- * returns output that is still field-encoded. Uses 5-bit window NAF
- * method (algorithm 11) for scalar-point multiplication from Brown,
- * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic
- * Curves Over Prime Fields. */
-mp_err
-ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py,
- mp_int *rx, mp_int *ry, const ECGroup *group)
-{
- mp_err res = MP_OKAY;
- mp_int precomp[16][2], rz, tpx, tpy;
- mp_int raz4;
- mp_int scratch[MAX_SCRATCH];
- signed char *naf = NULL;
- int i, orderBitSize;
-
- MP_DIGITS(&rz) = 0;
- MP_DIGITS(&raz4) = 0;
- MP_DIGITS(&tpx) = 0;
- MP_DIGITS(&tpy) = 0;
- for (i = 0; i < 16; i++) {
- MP_DIGITS(&precomp[i][0]) = 0;
- MP_DIGITS(&precomp[i][1]) = 0;
- }
- for (i = 0; i < MAX_SCRATCH; i++) {
- MP_DIGITS(&scratch[i]) = 0;
- }
-
- ARGCHK(group != NULL, MP_BADARG);
- ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
-
- /* initialize precomputation table */
- MP_CHECKOK(mp_init(&tpx, FLAG(n)));
- MP_CHECKOK(mp_init(&tpy, FLAG(n)));;
- MP_CHECKOK(mp_init(&rz, FLAG(n)));
- MP_CHECKOK(mp_init(&raz4, FLAG(n)));
-
- for (i = 0; i < 16; i++) {
- MP_CHECKOK(mp_init(&precomp[i][0], FLAG(n)));
- MP_CHECKOK(mp_init(&precomp[i][1], FLAG(n)));
- }
- for (i = 0; i < MAX_SCRATCH; i++) {
- MP_CHECKOK(mp_init(&scratch[i], FLAG(n)));
- }
-
- /* Set out[8] = P */
- MP_CHECKOK(mp_copy(px, &precomp[8][0]));
- MP_CHECKOK(mp_copy(py, &precomp[8][1]));
-
- /* Set (tpx, tpy) = 2P */
- MP_CHECKOK(group->
- point_dbl(&precomp[8][0], &precomp[8][1], &tpx, &tpy,
- group));
-
- /* Set 3P, 5P, ..., 15P */
- for (i = 8; i < 15; i++) {
- MP_CHECKOK(group->
- point_add(&precomp[i][0], &precomp[i][1], &tpx, &tpy,
- &precomp[i + 1][0], &precomp[i + 1][1],
- group));
- }
-
- /* Set -15P, -13P, ..., -P */
- for (i = 0; i < 8; i++) {
- MP_CHECKOK(mp_copy(&precomp[15 - i][0], &precomp[i][0]));
- MP_CHECKOK(group->meth->
- field_neg(&precomp[15 - i][1], &precomp[i][1],
- group->meth));
- }
-
- /* R = inf */
- MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz));
-
- orderBitSize = mpl_significant_bits(&group->order);
-
- /* Allocate memory for NAF */
-#ifdef _KERNEL
- naf = (signed char *) kmem_alloc((orderBitSize + 1), FLAG(n));
-#else
- naf = (signed char *) malloc(sizeof(signed char) * (orderBitSize + 1));
- if (naf == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
-#endif
-
- /* Compute 5NAF */
- ec_compute_wNAF(naf, orderBitSize, n, 5);
-
- /* wNAF method */
- for (i = orderBitSize; i >= 0; i--) {
- /* R = 2R */
- ec_GFp_pt_dbl_jm(rx, ry, &rz, &raz4, rx, ry, &rz,
- &raz4, scratch, group);
- if (naf[i] != 0) {
- ec_GFp_pt_add_jm_aff(rx, ry, &rz, &raz4,
- &precomp[(naf[i] + 15) / 2][0],
- &precomp[(naf[i] + 15) / 2][1], rx, ry,
- &rz, &raz4, scratch, group);
- }
- }
-
- /* convert result S to affine coordinates */
- MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group));
-
- CLEANUP:
- for (i = 0; i < MAX_SCRATCH; i++) {
- mp_clear(&scratch[i]);
- }
- for (i = 0; i < 16; i++) {
- mp_clear(&precomp[i][0]);
- mp_clear(&precomp[i][1]);
- }
- mp_clear(&tpx);
- mp_clear(&tpy);
- mp_clear(&rz);
- mp_clear(&raz4);
-#ifdef _KERNEL
- kmem_free(naf, (orderBitSize + 1));
-#else
- free(naf);
-#endif
- return res;
-}
diff --git a/src/share/native/sun/security/ec/ecp_mont.c b/src/share/native/sun/security/ec/ecp_mont.c
deleted file mode 100644
index 6b4dbb2..0000000
--- a/src/share/native/sun/security/ec/ecp_mont.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the elliptic curve math library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* Uses Montgomery reduction for field arithmetic. See mpi/mpmontg.c for
- * code implementation. */
-
-#include "mpi.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-#include "ecl-priv.h"
-#include "ecp.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <stdio.h>
-#endif
-
-/* Construct a generic GFMethod for arithmetic over prime fields with
- * irreducible irr. */
-GFMethod *
-GFMethod_consGFp_mont(const mp_int *irr)
-{
- mp_err res = MP_OKAY;
- int i;
- GFMethod *meth = NULL;
- mp_mont_modulus *mmm;
-
- meth = GFMethod_consGFp(irr);
- if (meth == NULL)
- return NULL;
-
-#ifdef _KERNEL
- mmm = (mp_mont_modulus *) kmem_alloc(sizeof(mp_mont_modulus),
- FLAG(irr));
-#else
- mmm = (mp_mont_modulus *) malloc(sizeof(mp_mont_modulus));
-#endif
- if (mmm == NULL) {
- res = MP_MEM;
- goto CLEANUP;
- }
-
- meth->field_mul = &ec_GFp_mul_mont;
- meth->field_sqr = &ec_GFp_sqr_mont;
- meth->field_div = &ec_GFp_div_mont;
- meth->field_enc = &ec_GFp_enc_mont;
- meth->field_dec = &ec_GFp_dec_mont;
- meth->extra1 = mmm;
- meth->extra2 = NULL;
- meth->extra_free = &ec_GFp_extra_free_mont;
-
- mmm->N = meth->irr;
- i = mpl_significant_bits(&meth->irr);
- i += MP_DIGIT_BIT - 1;
- mmm->b = i - i % MP_DIGIT_BIT;
- mmm->n0prime = 0 - s_mp_invmod_radix(MP_DIGIT(&meth->irr, 0));
-
- CLEANUP:
- if (res != MP_OKAY) {
- GFMethod_free(meth);
- return NULL;
- }
- return meth;
-}
-
-/* Wrapper functions for generic prime field arithmetic. */
-
-/* Field multiplication using Montgomery reduction. */
-mp_err
-ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
-#ifdef MP_MONT_USE_MP_MUL
- /* if MP_MONT_USE_MP_MUL is defined, then the function s_mp_mul_mont
- * is not implemented and we have to use mp_mul and s_mp_redc directly
- */
- MP_CHECKOK(mp_mul(a, b, r));
- MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1));
-#else
- mp_int s;
-
- MP_DIGITS(&s) = 0;
- /* s_mp_mul_mont doesn't allow source and destination to be the same */
- if ((a == r) || (b == r)) {
- MP_CHECKOK(mp_init(&s, FLAG(a)));
- MP_CHECKOK(s_mp_mul_mont
- (a, b, &s, (mp_mont_modulus *) meth->extra1));
- MP_CHECKOK(mp_copy(&s, r));
- mp_clear(&s);
- } else {
- return s_mp_mul_mont(a, b, r, (mp_mont_modulus *) meth->extra1);
- }
-#endif
- CLEANUP:
- return res;
-}
-
-/* Field squaring using Montgomery reduction. */
-mp_err
-ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- return ec_GFp_mul_mont(a, a, r, meth);
-}
-
-/* Field division using Montgomery reduction. */
-mp_err
-ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r,
- const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- /* if A=aZ represents a encoded in montgomery coordinates with Z and #
- * and \ respectively represent multiplication and division in
- * montgomery coordinates, then A\B = (a/b)Z = (A/B)Z and Binv =
- * (1/b)Z = (1/B)(Z^2) where B # Binv = Z */
- MP_CHECKOK(ec_GFp_div(a, b, r, meth));
- MP_CHECKOK(ec_GFp_enc_mont(r, r, meth));
- if (a == NULL) {
- MP_CHECKOK(ec_GFp_enc_mont(r, r, meth));
- }
- CLEANUP:
- return res;
-}
-
-/* Encode a field element in Montgomery form. See s_mp_to_mont in
- * mpi/mpmontg.c */
-mp_err
-ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_mont_modulus *mmm;
- mp_err res = MP_OKAY;
-
- mmm = (mp_mont_modulus *) meth->extra1;
- MP_CHECKOK(mpl_lsh(a, r, mmm->b));
- MP_CHECKOK(mp_mod(r, &mmm->N, r));
- CLEANUP:
- return res;
-}
-
-/* Decode a field element from Montgomery form. */
-mp_err
-ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth)
-{
- mp_err res = MP_OKAY;
-
- if (a != r) {
- MP_CHECKOK(mp_copy(a, r));
- }
- MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1));
- CLEANUP:
- return res;
-}
-
-/* Free the memory allocated to the extra fields of Montgomery GFMethod
- * object. */
-void
-ec_GFp_extra_free_mont(GFMethod *meth)
-{
- if (meth->extra1 != NULL) {
-#ifdef _KERNEL
- kmem_free(meth->extra1, sizeof(mp_mont_modulus));
-#else
- free(meth->extra1);
-#endif
- meth->extra1 = NULL;
- }
-}
diff --git a/src/share/native/sun/security/ec/logtab.h b/src/share/native/sun/security/ec/logtab.h
deleted file mode 100644
index 6efa019..0000000
--- a/src/share/native/sun/security/ec/logtab.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LOGTAB_H
-#define _LOGTAB_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-const float s_logv_2[] = {
- 0.000000000f, 0.000000000f, 1.000000000f, 0.630929754f, /* 0 1 2 3 */
- 0.500000000f, 0.430676558f, 0.386852807f, 0.356207187f, /* 4 5 6 7 */
- 0.333333333f, 0.315464877f, 0.301029996f, 0.289064826f, /* 8 9 10 11 */
- 0.278942946f, 0.270238154f, 0.262649535f, 0.255958025f, /* 12 13 14 15 */
- 0.250000000f, 0.244650542f, 0.239812467f, 0.235408913f, /* 16 17 18 19 */
- 0.231378213f, 0.227670249f, 0.224243824f, 0.221064729f, /* 20 21 22 23 */
- 0.218104292f, 0.215338279f, 0.212746054f, 0.210309918f, /* 24 25 26 27 */
- 0.208014598f, 0.205846832f, 0.203795047f, 0.201849087f, /* 28 29 30 31 */
- 0.200000000f, 0.198239863f, 0.196561632f, 0.194959022f, /* 32 33 34 35 */
- 0.193426404f, 0.191958720f, 0.190551412f, 0.189200360f, /* 36 37 38 39 */
- 0.187901825f, 0.186652411f, 0.185449023f, 0.184288833f, /* 40 41 42 43 */
- 0.183169251f, 0.182087900f, 0.181042597f, 0.180031327f, /* 44 45 46 47 */
- 0.179052232f, 0.178103594f, 0.177183820f, 0.176291434f, /* 48 49 50 51 */
- 0.175425064f, 0.174583430f, 0.173765343f, 0.172969690f, /* 52 53 54 55 */
- 0.172195434f, 0.171441601f, 0.170707280f, 0.169991616f, /* 56 57 58 59 */
- 0.169293808f, 0.168613099f, 0.167948779f, 0.167300179f, /* 60 61 62 63 */
- 0.166666667f
-};
-
-#endif /* _LOGTAB_H */
diff --git a/src/share/native/sun/security/ec/mp_gf2m-priv.h b/src/share/native/sun/security/ec/mp_gf2m-priv.h
deleted file mode 100644
index 7a45058..0000000
--- a/src/share/native/sun/security/ec/mp_gf2m-priv.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang Shantz <sheueling.chang@sun.com> and
- * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_GF2M_PRIV_H_
-#define _MP_GF2M_PRIV_H_
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi-priv.h"
-
-extern const mp_digit mp_gf2m_sqr_tb[16];
-
-#if defined(MP_USE_UINT_DIGIT)
-#define MP_DIGIT_BITS 32
-#else
-#define MP_DIGIT_BITS 64
-#endif
-
-/* Platform-specific macros for fast binary polynomial squaring. */
-#if MP_DIGIT_BITS == 32
-#define gf2m_SQR1(w) \
- mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 16 | \
- mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF]
-#define gf2m_SQR0(w) \
- mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \
- mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF]
-#else
-#define gf2m_SQR1(w) \
- mp_gf2m_sqr_tb[(w) >> 60 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 56 & 0xF] << 48 | \
- mp_gf2m_sqr_tb[(w) >> 52 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 48 & 0xF] << 32 | \
- mp_gf2m_sqr_tb[(w) >> 44 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 40 & 0xF] << 16 | \
- mp_gf2m_sqr_tb[(w) >> 36 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 32 & 0xF]
-#define gf2m_SQR0(w) \
- mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 48 | \
- mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF] << 32 | \
- mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \
- mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF]
-#endif
-
-/* Multiply two binary polynomials mp_digits a, b.
- * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
- * Output in two mp_digits rh, rl.
- */
-void s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b);
-
-/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0)
- * result is a binary polynomial in 4 mp_digits r[4].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
- const mp_digit b0);
-
-/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0)
- * result is a binary polynomial in 6 mp_digits r[6].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
- const mp_digit b2, const mp_digit b1, const mp_digit b0);
-
-/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0)
- * result is a binary polynomial in 8 mp_digits r[8].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
- const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
- const mp_digit b0);
-
-#endif /* _MP_GF2M_PRIV_H_ */
diff --git a/src/share/native/sun/security/ec/mp_gf2m.c b/src/share/native/sun/security/ec/mp_gf2m.c
deleted file mode 100644
index 74b6478..0000000
--- a/src/share/native/sun/security/ec/mp_gf2m.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang Shantz <sheueling.chang@sun.com> and
- * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mp_gf2m.h"
-#include "mp_gf2m-priv.h"
-#include "mplogic.h"
-#include "mpi-priv.h"
-
-const mp_digit mp_gf2m_sqr_tb[16] =
-{
- 0, 1, 4, 5, 16, 17, 20, 21,
- 64, 65, 68, 69, 80, 81, 84, 85
-};
-
-/* Multiply two binary polynomials mp_digits a, b.
- * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1.
- * Output in two mp_digits rh, rl.
- */
-#if MP_DIGIT_BITS == 32
-void
-s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
-{
- register mp_digit h, l, s;
- mp_digit tab[8], top2b = a >> 30;
- register mp_digit a1, a2, a4;
-
- a1 = a & (0x3FFFFFFF); a2 = a1 << 1; a4 = a2 << 1;
-
- tab[0] = 0; tab[1] = a1; tab[2] = a2; tab[3] = a1^a2;
- tab[4] = a4; tab[5] = a1^a4; tab[6] = a2^a4; tab[7] = a1^a2^a4;
-
- s = tab[b & 0x7]; l = s;
- s = tab[b >> 3 & 0x7]; l ^= s << 3; h = s >> 29;
- s = tab[b >> 6 & 0x7]; l ^= s << 6; h ^= s >> 26;
- s = tab[b >> 9 & 0x7]; l ^= s << 9; h ^= s >> 23;
- s = tab[b >> 12 & 0x7]; l ^= s << 12; h ^= s >> 20;
- s = tab[b >> 15 & 0x7]; l ^= s << 15; h ^= s >> 17;
- s = tab[b >> 18 & 0x7]; l ^= s << 18; h ^= s >> 14;
- s = tab[b >> 21 & 0x7]; l ^= s << 21; h ^= s >> 11;
- s = tab[b >> 24 & 0x7]; l ^= s << 24; h ^= s >> 8;
- s = tab[b >> 27 & 0x7]; l ^= s << 27; h ^= s >> 5;
- s = tab[b >> 30 ]; l ^= s << 30; h ^= s >> 2;
-
- /* compensate for the top two bits of a */
-
- if (top2b & 01) { l ^= b << 30; h ^= b >> 2; }
- if (top2b & 02) { l ^= b << 31; h ^= b >> 1; }
-
- *rh = h; *rl = l;
-}
-#else
-void
-s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
-{
- register mp_digit h, l, s;
- mp_digit tab[16], top3b = a >> 61;
- register mp_digit a1, a2, a4, a8;
-
- a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1;
- a4 = a2 << 1; a8 = a4 << 1;
- tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
- tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;
- tab[ 8] = a8; tab[ 9] = a1^a8; tab[10] = a2^a8; tab[11] = a1^a2^a8;
- tab[12] = a4^a8; tab[13] = a1^a4^a8; tab[14] = a2^a4^a8; tab[15] = a1^a2^a4^a8;
-
- s = tab[b & 0xF]; l = s;
- s = tab[b >> 4 & 0xF]; l ^= s << 4; h = s >> 60;
- s = tab[b >> 8 & 0xF]; l ^= s << 8; h ^= s >> 56;
- s = tab[b >> 12 & 0xF]; l ^= s << 12; h ^= s >> 52;
- s = tab[b >> 16 & 0xF]; l ^= s << 16; h ^= s >> 48;
- s = tab[b >> 20 & 0xF]; l ^= s << 20; h ^= s >> 44;
- s = tab[b >> 24 & 0xF]; l ^= s << 24; h ^= s >> 40;
- s = tab[b >> 28 & 0xF]; l ^= s << 28; h ^= s >> 36;
- s = tab[b >> 32 & 0xF]; l ^= s << 32; h ^= s >> 32;
- s = tab[b >> 36 & 0xF]; l ^= s << 36; h ^= s >> 28;
- s = tab[b >> 40 & 0xF]; l ^= s << 40; h ^= s >> 24;
- s = tab[b >> 44 & 0xF]; l ^= s << 44; h ^= s >> 20;
- s = tab[b >> 48 & 0xF]; l ^= s << 48; h ^= s >> 16;
- s = tab[b >> 52 & 0xF]; l ^= s << 52; h ^= s >> 12;
- s = tab[b >> 56 & 0xF]; l ^= s << 56; h ^= s >> 8;
- s = tab[b >> 60 ]; l ^= s << 60; h ^= s >> 4;
-
- /* compensate for the top three bits of a */
-
- if (top3b & 01) { l ^= b << 61; h ^= b >> 3; }
- if (top3b & 02) { l ^= b << 62; h ^= b >> 2; }
- if (top3b & 04) { l ^= b << 63; h ^= b >> 1; }
-
- *rh = h; *rl = l;
-}
-#endif
-
-/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0)
- * result is a binary polynomial in 4 mp_digits r[4].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void
-s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1,
- const mp_digit b0)
-{
- mp_digit m1, m0;
- /* r[3] = h1, r[2] = h0; r[1] = l1; r[0] = l0 */
- s_bmul_1x1(r+3, r+2, a1, b1);
- s_bmul_1x1(r+1, r, a0, b0);
- s_bmul_1x1(&m1, &m0, a0 ^ a1, b0 ^ b1);
- /* Correction on m1 ^= l1 ^ h1; m0 ^= l0 ^ h0; */
- r[2] ^= m1 ^ r[1] ^ r[3]; /* h0 ^= m1 ^ l1 ^ h1; */
- r[1] = r[3] ^ r[2] ^ r[0] ^ m1 ^ m0; /* l1 ^= l0 ^ h0 ^ m0; */
-}
-
-/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0)
- * result is a binary polynomial in 6 mp_digits r[6].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void
-s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0,
- const mp_digit b2, const mp_digit b1, const mp_digit b0)
-{
- mp_digit zm[4];
-
- s_bmul_1x1(r+5, r+4, a2, b2); /* fill top 2 words */
- s_bmul_2x2(zm, a1, a2^a0, b1, b2^b0); /* fill middle 4 words */
- s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */
-
- zm[3] ^= r[3];
- zm[2] ^= r[2];
- zm[1] ^= r[1] ^ r[5];
- zm[0] ^= r[0] ^ r[4];
-
- r[5] ^= zm[3];
- r[4] ^= zm[2];
- r[3] ^= zm[1];
- r[2] ^= zm[0];
-}
-
-/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0)
- * result is a binary polynomial in 8 mp_digits r[8].
- * The caller MUST ensure that r has the right amount of space allocated.
- */
-void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1,
- const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1,
- const mp_digit b0)
-{
- mp_digit zm[4];
-
- s_bmul_2x2(r+4, a3, a2, b3, b2); /* fill top 4 words */
- s_bmul_2x2(zm, a3^a1, a2^a0, b3^b1, b2^b0); /* fill middle 4 words */
- s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */
-
- zm[3] ^= r[3] ^ r[7];
- zm[2] ^= r[2] ^ r[6];
- zm[1] ^= r[1] ^ r[5];
- zm[0] ^= r[0] ^ r[4];
-
- r[5] ^= zm[3];
- r[4] ^= zm[2];
- r[3] ^= zm[1];
- r[2] ^= zm[0];
-}
-
-/* Compute addition of two binary polynomials a and b,
- * store result in c; c could be a or b, a and b could be equal;
- * c is the bitwise XOR of a and b.
- */
-mp_err
-mp_badd(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_digit *pa, *pb, *pc;
- mp_size ix;
- mp_size used_pa, used_pb;
- mp_err res = MP_OKAY;
-
- /* Add all digits up to the precision of b. If b had more
- * precision than a initially, swap a, b first
- */
- if (MP_USED(a) >= MP_USED(b)) {
- pa = MP_DIGITS(a);
- pb = MP_DIGITS(b);
- used_pa = MP_USED(a);
- used_pb = MP_USED(b);
- } else {
- pa = MP_DIGITS(b);
- pb = MP_DIGITS(a);
- used_pa = MP_USED(b);
- used_pb = MP_USED(a);
- }
-
- /* Make sure c has enough precision for the output value */
- MP_CHECKOK( s_mp_pad(c, used_pa) );
-
- /* Do word-by-word xor */
- pc = MP_DIGITS(c);
- for (ix = 0; ix < used_pb; ix++) {
- (*pc++) = (*pa++) ^ (*pb++);
- }
-
- /* Finish the rest of digits until we're actually done */
- for (; ix < used_pa; ++ix) {
- *pc++ = *pa++;
- }
-
- MP_USED(c) = used_pa;
- MP_SIGN(c) = ZPOS;
- s_mp_clamp(c);
-
-CLEANUP:
- return res;
-}
-
-#define s_mp_div2(a) MP_CHECKOK( mpl_rsh((a), (a), 1) );
-
-/* Compute binary polynomial multiply d = a * b */
-static void
-s_bmul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
-{
- mp_digit a_i, a0b0, a1b1, carry = 0;
- while (a_len--) {
- a_i = *a++;
- s_bmul_1x1(&a1b1, &a0b0, a_i, b);
- *d++ = a0b0 ^ carry;
- carry = a1b1;
- }
- *d = carry;
-}
-
-/* Compute binary polynomial xor multiply accumulate d ^= a * b */
-static void
-s_bmul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
-{
- mp_digit a_i, a0b0, a1b1, carry = 0;
- while (a_len--) {
- a_i = *a++;
- s_bmul_1x1(&a1b1, &a0b0, a_i, b);
- *d++ ^= a0b0 ^ carry;
- carry = a1b1;
- }
- *d ^= carry;
-}
-
-/* Compute binary polynomial xor multiply c = a * b.
- * All parameters may be identical.
- */
-mp_err
-mp_bmul(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_digit *pb, b_i;
- mp_int tmp;
- mp_size ib, a_used, b_used;
- mp_err res = MP_OKAY;
-
- MP_DIGITS(&tmp) = 0;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if (a == c) {
- MP_CHECKOK( mp_init_copy(&tmp, a) );
- if (a == b)
- b = &tmp;
- a = &tmp;
- } else if (b == c) {
- MP_CHECKOK( mp_init_copy(&tmp, b) );
- b = &tmp;
- }
-
- if (MP_USED(a) < MP_USED(b)) {
- const mp_int *xch = b; /* switch a and b if b longer */
- b = a;
- a = xch;
- }
-
- MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
- MP_CHECKOK( s_mp_pad(c, USED(a) + USED(b)) );
-
- pb = MP_DIGITS(b);
- s_bmul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
-
- /* Outer loop: Digits of b */
- a_used = MP_USED(a);
- b_used = MP_USED(b);
- MP_USED(c) = a_used + b_used;
- for (ib = 1; ib < b_used; ib++) {
- b_i = *pb++;
-
- /* Inner product: Digits of a */
- if (b_i)
- s_bmul_d_add(MP_DIGITS(a), a_used, b_i, MP_DIGITS(c) + ib);
- else
- MP_DIGIT(c, ib + a_used) = b_i;
- }
-
- s_mp_clamp(c);
-
- SIGN(c) = ZPOS;
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-}
-
-
-/* Compute modular reduction of a and store result in r.
- * r could be a.
- * For modular arithmetic, the irreducible polynomial f(t) is represented
- * as an array of int[], where f(t) is of the form:
- * f(t) = t^p[0] + t^p[1] + ... + t^p[k]
- * where m = p[0] > p[1] > ... > p[k] = 0.
- */
-mp_err
-mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r)
-{
- int j, k;
- int n, dN, d0, d1;
- mp_digit zz, *z, tmp;
- mp_size used;
- mp_err res = MP_OKAY;
-
- /* The algorithm does the reduction in place in r,
- * if a != r, copy a into r first so reduction can be done in r
- */
- if (a != r) {
- MP_CHECKOK( mp_copy(a, r) );
- }
- z = MP_DIGITS(r);
-
- /* start reduction */
- dN = p[0] / MP_DIGIT_BITS;
- used = MP_USED(r);
-
- for (j = used - 1; j > dN;) {
-
- zz = z[j];
- if (zz == 0) {
- j--; continue;
- }
- z[j] = 0;
-
- for (k = 1; p[k] > 0; k++) {
- /* reducing component t^p[k] */
- n = p[0] - p[k];
- d0 = n % MP_DIGIT_BITS;
- d1 = MP_DIGIT_BITS - d0;
- n /= MP_DIGIT_BITS;
- z[j-n] ^= (zz>>d0);
- if (d0)
- z[j-n-1] ^= (zz<<d1);
- }
-
- /* reducing component t^0 */
- n = dN;
- d0 = p[0] % MP_DIGIT_BITS;
- d1 = MP_DIGIT_BITS - d0;
- z[j-n] ^= (zz >> d0);
- if (d0)
- z[j-n-1] ^= (zz << d1);
-
- }
-
- /* final round of reduction */
- while (j == dN) {
-
- d0 = p[0] % MP_DIGIT_BITS;
- zz = z[dN] >> d0;
- if (zz == 0) break;
- d1 = MP_DIGIT_BITS - d0;
-
- /* clear up the top d1 bits */
- if (d0) z[dN] = (z[dN] << d1) >> d1;
- *z ^= zz; /* reduction t^0 component */
-
- for (k = 1; p[k] > 0; k++) {
- /* reducing component t^p[k]*/
- n = p[k] / MP_DIGIT_BITS;
- d0 = p[k] % MP_DIGIT_BITS;
- d1 = MP_DIGIT_BITS - d0;
- z[n] ^= (zz << d0);
- tmp = zz >> d1;
- if (d0 && tmp)
- z[n+1] ^= tmp;
- }
- }
-
- s_mp_clamp(r);
-CLEANUP:
- return res;
-}
-
-/* Compute the product of two polynomials a and b, reduce modulo p,
- * Store the result in r. r could be a or b; a could be b.
- */
-mp_err
-mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], mp_int *r)
-{
- mp_err res;
-
- if (a == b) return mp_bsqrmod(a, p, r);
- if ((res = mp_bmul(a, b, r) ) != MP_OKAY)
- return res;
- return mp_bmod(r, p, r);
-}
-
-/* Compute binary polynomial squaring c = a*a mod p .
- * Parameter r and a can be identical.
- */
-
-mp_err
-mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r)
-{
- mp_digit *pa, *pr, a_i;
- mp_int tmp;
- mp_size ia, a_used;
- mp_err res;
-
- ARGCHK(a != NULL && r != NULL, MP_BADARG);
- MP_DIGITS(&tmp) = 0;
-
- if (a == r) {
- MP_CHECKOK( mp_init_copy(&tmp, a) );
- a = &tmp;
- }
-
- MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
- MP_CHECKOK( s_mp_pad(r, 2*USED(a)) );
-
- pa = MP_DIGITS(a);
- pr = MP_DIGITS(r);
- a_used = MP_USED(a);
- MP_USED(r) = 2 * a_used;
-
- for (ia = 0; ia < a_used; ia++) {
- a_i = *pa++;
- *pr++ = gf2m_SQR0(a_i);
- *pr++ = gf2m_SQR1(a_i);
- }
-
- MP_CHECKOK( mp_bmod(r, p, r) );
- s_mp_clamp(r);
- SIGN(r) = ZPOS;
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-}
-
-/* Compute binary polynomial y/x mod p, y divided by x, reduce modulo p.
- * Store the result in r. r could be x or y, and x could equal y.
- * Uses algorithm Modular_Division_GF(2^m) from
- * Chang-Shantz, S. "From Euclid's GCD to Montgomery Multiplication to
- * the Great Divide".
- */
-int
-mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
- const unsigned int p[], mp_int *r)
-{
- mp_int aa, bb, uu;
- mp_int *a, *b, *u, *v;
- mp_err res = MP_OKAY;
-
- MP_DIGITS(&aa) = 0;
- MP_DIGITS(&bb) = 0;
- MP_DIGITS(&uu) = 0;
-
- MP_CHECKOK( mp_init_copy(&aa, x) );
- MP_CHECKOK( mp_init_copy(&uu, y) );
- MP_CHECKOK( mp_init_copy(&bb, pp) );
- MP_CHECKOK( s_mp_pad(r, USED(pp)) );
- MP_USED(r) = 1; MP_DIGIT(r, 0) = 0;
-
- a = &aa; b= &bb; u=&uu; v=r;
- /* reduce x and y mod p */
- MP_CHECKOK( mp_bmod(a, p, a) );
- MP_CHECKOK( mp_bmod(u, p, u) );
-
- while (!mp_isodd(a)) {
- s_mp_div2(a);
- if (mp_isodd(u)) {
- MP_CHECKOK( mp_badd(u, pp, u) );
- }
- s_mp_div2(u);
- }
-
- do {
- if (mp_cmp_mag(b, a) > 0) {
- MP_CHECKOK( mp_badd(b, a, b) );
- MP_CHECKOK( mp_badd(v, u, v) );
- do {
- s_mp_div2(b);
- if (mp_isodd(v)) {
- MP_CHECKOK( mp_badd(v, pp, v) );
- }
- s_mp_div2(v);
- } while (!mp_isodd(b));
- }
- else if ((MP_DIGIT(a,0) == 1) && (MP_USED(a) == 1))
- break;
- else {
- MP_CHECKOK( mp_badd(a, b, a) );
- MP_CHECKOK( mp_badd(u, v, u) );
- do {
- s_mp_div2(a);
- if (mp_isodd(u)) {
- MP_CHECKOK( mp_badd(u, pp, u) );
- }
- s_mp_div2(u);
- } while (!mp_isodd(a));
- }
- } while (1);
-
- MP_CHECKOK( mp_copy(u, r) );
-
-CLEANUP:
- /* XXX this appears to be a memory leak in the NSS code */
- mp_clear(&aa);
- mp_clear(&bb);
- mp_clear(&uu);
- return res;
-
-}
-
-/* Convert the bit-string representation of a polynomial a into an array
- * of integers corresponding to the bits with non-zero coefficient.
- * Up to max elements of the array will be filled. Return value is total
- * number of coefficients that would be extracted if array was large enough.
- */
-int
-mp_bpoly2arr(const mp_int *a, unsigned int p[], int max)
-{
- int i, j, k;
- mp_digit top_bit, mask;
-
- top_bit = 1;
- top_bit <<= MP_DIGIT_BIT - 1;
-
- for (k = 0; k < max; k++) p[k] = 0;
- k = 0;
-
- for (i = MP_USED(a) - 1; i >= 0; i--) {
- mask = top_bit;
- for (j = MP_DIGIT_BIT - 1; j >= 0; j--) {
- if (MP_DIGITS(a)[i] & mask) {
- if (k < max) p[k] = MP_DIGIT_BIT * i + j;
- k++;
- }
- mask >>= 1;
- }
- }
-
- return k;
-}
-
-/* Convert the coefficient array representation of a polynomial to a
- * bit-string. The array must be terminated by 0.
- */
-mp_err
-mp_barr2poly(const unsigned int p[], mp_int *a)
-{
-
- mp_err res = MP_OKAY;
- int i;
-
- mp_zero(a);
- for (i = 0; p[i] > 0; i++) {
- MP_CHECKOK( mpl_set_bit(a, p[i], 1) );
- }
- MP_CHECKOK( mpl_set_bit(a, 0, 1) );
-
-CLEANUP:
- return res;
-}
diff --git a/src/share/native/sun/security/ec/mp_gf2m.h b/src/share/native/sun/security/ec/mp_gf2m.h
deleted file mode 100644
index b09f3d3..0000000
--- a/src/share/native/sun/security/ec/mp_gf2m.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library.
- *
- * The Initial Developer of the Original Code is
- * Sun Microsystems, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang Shantz <sheueling.chang@sun.com> and
- * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_GF2M_H_
-#define _MP_GF2M_H_
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi.h"
-
-mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c);
-
-/* For modular arithmetic, the irreducible polynomial f(t) is represented
- * as an array of int[], where f(t) is of the form:
- * f(t) = t^p[0] + t^p[1] + ... + t^p[k]
- * where m = p[0] > p[1] > ... > p[k] = 0.
- */
-mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r);
-mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[],
- mp_int *r);
-mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r);
-mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
- const unsigned int p[], mp_int *r);
-
-int mp_bpoly2arr(const mp_int *a, unsigned int p[], int max);
-mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
-
-#endif /* _MP_GF2M_H_ */
diff --git a/src/share/native/sun/security/ec/mpi-config.h b/src/share/native/sun/security/ec/mpi-config.h
deleted file mode 100644
index 3618677..0000000
--- a/src/share/native/sun/security/ec/mpi-config.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1997
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_CONFIG_H
-#define _MPI_CONFIG_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mpi-config.h,v 1.5 2004/04/25 15:03:10 gerv%gerv.net Exp $ */
-
-/*
- For boolean options,
- 0 = no
- 1 = yes
-
- Other options are documented individually.
-
- */
-
-#ifndef MP_IOFUNC
-#define MP_IOFUNC 0 /* include mp_print() ? */
-#endif
-
-#ifndef MP_MODARITH
-#define MP_MODARITH 1 /* include modular arithmetic ? */
-#endif
-
-#ifndef MP_NUMTH
-#define MP_NUMTH 1 /* include number theoretic functions? */
-#endif
-
-#ifndef MP_LOGTAB
-#define MP_LOGTAB 1 /* use table of logs instead of log()? */
-#endif
-
-#ifndef MP_MEMSET
-#define MP_MEMSET 1 /* use memset() to zero buffers? */
-#endif
-
-#ifndef MP_MEMCPY
-#define MP_MEMCPY 1 /* use memcpy() to copy buffers? */
-#endif
-
-#ifndef MP_CRYPTO
-#define MP_CRYPTO 1 /* erase memory on free? */
-#endif
-
-#ifndef MP_ARGCHK
-/*
- 0 = no parameter checks
- 1 = runtime checks, continue execution and return an error to caller
- 2 = assertions; dump core on parameter errors
- */
-#ifdef DEBUG
-#define MP_ARGCHK 2 /* how to check input arguments */
-#else
-#define MP_ARGCHK 1 /* how to check input arguments */
-#endif
-#endif
-
-#ifndef MP_DEBUG
-#define MP_DEBUG 0 /* print diagnostic output? */
-#endif
-
-#ifndef MP_DEFPREC
-#define MP_DEFPREC 64 /* default precision, in digits */
-#endif
-
-#ifndef MP_MACRO
-#define MP_MACRO 0 /* use macros for frequent calls? */
-#endif
-
-#ifndef MP_SQUARE
-#define MP_SQUARE 1 /* use separate squaring code? */
-#endif
-
-#endif /* _MPI_CONFIG_H */
diff --git a/src/share/native/sun/security/ec/mpi-priv.h b/src/share/native/sun/security/ec/mpi-priv.h
deleted file mode 100644
index b2b07ec..0000000
--- a/src/share/native/sun/security/ec/mpi-priv.h
+++ /dev/null
@@ -1,340 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Arbitrary precision integer arithmetic library
- *
- * NOTE WELL: the content of this header file is NOT part of the "public"
- * API for the MPI library, and may change at any time.
- * Application programs that use libmpi should NOT include this header file.
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_PRIV_H
-#define _MPI_PRIV_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mpi-priv.h,v 1.20 2005/11/22 07:16:43 relyea%netscape.com Exp $ */
-
-#include "mpi.h"
-#ifndef _KERNEL
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#endif /* _KERNEL */
-
-#if MP_DEBUG
-#include <stdio.h>
-
-#define DIAG(T,V) {fprintf(stderr,T);mp_print(V,stderr);fputc('\n',stderr);}
-#else
-#define DIAG(T,V)
-#endif
-
-/* If we aren't using a wired-in logarithm table, we need to include
- the math library to get the log() function
- */
-
-/* {{{ s_logv_2[] - log table for 2 in various bases */
-
-#if MP_LOGTAB
-/*
- A table of the logs of 2 for various bases (the 0 and 1 entries of
- this table are meaningless and should not be referenced).
-
- This table is used to compute output lengths for the mp_toradix()
- function. Since a number n in radix r takes up about log_r(n)
- digits, we estimate the output size by taking the least integer
- greater than log_r(n), where:
-
- log_r(n) = log_2(n) * log_r(2)
-
- This table, therefore, is a table of log_r(2) for 2 <= r <= 36,
- which are the output bases supported.
- */
-
-extern const float s_logv_2[];
-#define LOG_V_2(R) s_logv_2[(R)]
-
-#else
-
-/*
- If MP_LOGTAB is not defined, use the math library to compute the
- logarithms on the fly. Otherwise, use the table.
- Pick which works best for your system.
- */
-
-#include <math.h>
-#define LOG_V_2(R) (log(2.0)/log(R))
-
-#endif /* if MP_LOGTAB */
-
-/* }}} */
-
-/* {{{ Digit arithmetic macros */
-
-/*
- When adding and multiplying digits, the results can be larger than
- can be contained in an mp_digit. Thus, an mp_word is used. These
- macros mask off the upper and lower digits of the mp_word (the
- mp_word may be more than 2 mp_digits wide, but we only concern
- ourselves with the low-order 2 mp_digits)
- */
-
-#define CARRYOUT(W) (mp_digit)((W)>>DIGIT_BIT)
-#define ACCUM(W) (mp_digit)(W)
-
-#define MP_MIN(a,b) (((a) < (b)) ? (a) : (b))
-#define MP_MAX(a,b) (((a) > (b)) ? (a) : (b))
-#define MP_HOWMANY(a,b) (((a) + (b) - 1)/(b))
-#define MP_ROUNDUP(a,b) (MP_HOWMANY(a,b) * (b))
-
-/* }}} */
-
-/* {{{ Comparison constants */
-
-#define MP_LT -1
-#define MP_EQ 0
-#define MP_GT 1
-
-/* }}} */
-
-/* {{{ private function declarations */
-
-/*
- If MP_MACRO is false, these will be defined as actual functions;
- otherwise, suitable macro definitions will be used. This works
- around the fact that ANSI C89 doesn't support an 'inline' keyword
- (although I hear C9x will ... about bloody time). At present, the
- macro definitions are identical to the function bodies, but they'll
- expand in place, instead of generating a function call.
-
- I chose these particular functions to be made into macros because
- some profiling showed they are called a lot on a typical workload,
- and yet they are primarily housekeeping.
- */
-#if MP_MACRO == 0
- void s_mp_setz(mp_digit *dp, mp_size count); /* zero digits */
- void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count); /* copy */
- void *s_mp_alloc(size_t nb, size_t ni, int flag); /* general allocator */
- void s_mp_free(void *ptr, mp_size); /* general free function */
-extern unsigned long mp_allocs;
-extern unsigned long mp_frees;
-extern unsigned long mp_copies;
-#else
-
- /* Even if these are defined as macros, we need to respect the settings
- of the MP_MEMSET and MP_MEMCPY configuration options...
- */
- #if MP_MEMSET == 0
- #define s_mp_setz(dp, count) \
- {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=0;}
- #else
- #define s_mp_setz(dp, count) memset(dp, 0, (count) * sizeof(mp_digit))
- #endif /* MP_MEMSET */
-
- #if MP_MEMCPY == 0
- #define s_mp_copy(sp, dp, count) \
- {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=(sp)[ix];}
- #else
- #define s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit))
- #endif /* MP_MEMCPY */
-
- #define s_mp_alloc(nb, ni) calloc(nb, ni)
- #define s_mp_free(ptr) {if(ptr) free(ptr);}
-#endif /* MP_MACRO */
-
-mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */
-mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */
-
-#if MP_MACRO == 0
- void s_mp_clamp(mp_int *mp); /* clip leading zeroes */
-#else
- #define s_mp_clamp(mp)\
- { mp_size used = MP_USED(mp); \
- while (used > 1 && DIGIT(mp, used - 1) == 0) --used; \
- MP_USED(mp) = used; \
- }
-#endif /* MP_MACRO */
-
-void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */
-
-mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
-void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */
-mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */
-void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */
-void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */
-void s_mp_div_2(mp_int *mp); /* divide by 2 in place */
-mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */
-mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd);
- /* normalize for division */
-mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */
-mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */
-mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */
-mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r);
- /* unsigned digit divide */
-mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu);
- /* Barrett reduction */
-mp_err s_mp_add(mp_int *a, const mp_int *b); /* magnitude addition */
-mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err s_mp_sub(mp_int *a, const mp_int *b); /* magnitude subtract */
-mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset);
- /* a += b * RADIX^offset */
-mp_err s_mp_mul(mp_int *a, const mp_int *b); /* magnitude multiply */
-#if MP_SQUARE
-mp_err s_mp_sqr(mp_int *a); /* magnitude square */
-#else
-#define s_mp_sqr(a) s_mp_mul(a, a)
-#endif
-mp_err s_mp_div(mp_int *rem, mp_int *div, mp_int *quot); /* magnitude div */
-mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err s_mp_2expt(mp_int *a, mp_digit k); /* a = 2^k */
-int s_mp_cmp(const mp_int *a, const mp_int *b); /* magnitude comparison */
-int s_mp_cmp_d(const mp_int *a, mp_digit d); /* magnitude digit compare */
-int s_mp_ispow2(const mp_int *v); /* is v a power of 2? */
-int s_mp_ispow2d(mp_digit d); /* is d a power of 2? */
-
-int s_mp_tovalue(char ch, int r); /* convert ch to value */
-char s_mp_todigit(mp_digit val, int r, int low); /* convert val to digit */
-int s_mp_outlen(int bits, int r); /* output length in bytes */
-mp_digit s_mp_invmod_radix(mp_digit P); /* returns (P ** -1) mod RADIX */
-mp_err s_mp_invmod_odd_m( const mp_int *a, const mp_int *m, mp_int *c);
-mp_err s_mp_invmod_2d( const mp_int *a, mp_size k, mp_int *c);
-mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c);
-
-#ifdef NSS_USE_COMBA
-
-#define IS_POWER_OF_2(a) ((a) && !((a) & ((a)-1)))
-
-void s_mp_mul_comba_4(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_8(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_16(const mp_int *A, const mp_int *B, mp_int *C);
-void s_mp_mul_comba_32(const mp_int *A, const mp_int *B, mp_int *C);
-
-void s_mp_sqr_comba_4(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_8(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_16(const mp_int *A, mp_int *B);
-void s_mp_sqr_comba_32(const mp_int *A, mp_int *B);
-
-#endif /* end NSS_USE_COMBA */
-
-/* ------ mpv functions, operate on arrays of digits, not on mp_int's ------ */
-#if defined (__OS2__) && defined (__IBMC__)
-#define MPI_ASM_DECL __cdecl
-#else
-#define MPI_ASM_DECL
-#endif
-
-#ifdef MPI_AMD64
-
-mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
-mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
-
-/* c = a * b */
-#define s_mpv_mul_d(a, a_len, b, c) \
- ((unsigned long*)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
-
-/* c += a * b */
-#define s_mpv_mul_d_add(a, a_len, b, c) \
- ((unsigned long*)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b)
-
-#else
-
-void MPI_ASM_DECL s_mpv_mul_d(const mp_digit *a, mp_size a_len,
- mp_digit b, mp_digit *c);
-void MPI_ASM_DECL s_mpv_mul_d_add(const mp_digit *a, mp_size a_len,
- mp_digit b, mp_digit *c);
-
-#endif
-
-void MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a,
- mp_size a_len, mp_digit b,
- mp_digit *c);
-void MPI_ASM_DECL s_mpv_sqr_add_prop(const mp_digit *a,
- mp_size a_len,
- mp_digit *sqrs);
-
-mp_err MPI_ASM_DECL s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo,
- mp_digit divisor, mp_digit *quot, mp_digit *rem);
-
-/* c += a * b * (MP_RADIX ** offset); */
-#define s_mp_mul_d_add_offset(a, b, c, off) \
-(s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off), MP_OKAY)
-
-typedef struct {
- mp_int N; /* modulus N */
- mp_digit n0prime; /* n0' = - (n0 ** -1) mod MP_RADIX */
- mp_size b; /* R == 2 ** b, also b = # significant bits in N */
-} mp_mont_modulus;
-
-mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
- mp_mont_modulus *mmm);
-mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm);
-
-/*
- * s_mpi_getProcessorLineSize() returns the size in bytes of the cache line
- * if a cache exists, or zero if there is no cache. If more than one
- * cache line exists, it should return the smallest line size (which is
- * usually the L1 cache).
- *
- * mp_modexp uses this information to make sure that private key information
- * isn't being leaked through the cache.
- *
- * see mpcpucache.c for the implementation.
- */
-unsigned long s_mpi_getProcessorLineSize();
-
-/* }}} */
-#endif /* _MPI_PRIV_H */
diff --git a/src/share/native/sun/security/ec/mpi.c b/src/share/native/sun/security/ec/mpi.c
deleted file mode 100644
index 9f77188..0000000
--- a/src/share/native/sun/security/ec/mpi.c
+++ /dev/null
@@ -1,4886 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- * Arbitrary precision integer arithmetic library
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Netscape Communications Corporation
- * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mpi.c,v 1.45 2006/09/29 20:12:21 alexei.volkov.bugs%sun.com Exp $ */
-
-#include "mpi-priv.h"
-#if defined(OSF1)
-#include <c_asm.h>
-#endif
-
-#if MP_LOGTAB
-/*
- A table of the logs of 2 for various bases (the 0 and 1 entries of
- this table are meaningless and should not be referenced).
-
- This table is used to compute output lengths for the mp_toradix()
- function. Since a number n in radix r takes up about log_r(n)
- digits, we estimate the output size by taking the least integer
- greater than log_r(n), where:
-
- log_r(n) = log_2(n) * log_r(2)
-
- This table, therefore, is a table of log_r(2) for 2 <= r <= 36,
- which are the output bases supported.
- */
-#include "logtab.h"
-#endif
-
-/* {{{ Constant strings */
-
-/* Constant strings returned by mp_strerror() */
-static const char *mp_err_string[] = {
- "unknown result code", /* say what? */
- "boolean true", /* MP_OKAY, MP_YES */
- "boolean false", /* MP_NO */
- "out of memory", /* MP_MEM */
- "argument out of range", /* MP_RANGE */
- "invalid input parameter", /* MP_BADARG */
- "result is undefined" /* MP_UNDEF */
-};
-
-/* Value to digit maps for radix conversion */
-
-/* s_dmap_1 - standard digits and letters */
-static const char *s_dmap_1 =
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
-
-/* }}} */
-
-unsigned long mp_allocs;
-unsigned long mp_frees;
-unsigned long mp_copies;
-
-/* {{{ Default precision manipulation */
-
-/* Default precision for newly created mp_int's */
-static mp_size s_mp_defprec = MP_DEFPREC;
-
-mp_size mp_get_prec(void)
-{
- return s_mp_defprec;
-
-} /* end mp_get_prec() */
-
-void mp_set_prec(mp_size prec)
-{
- if(prec == 0)
- s_mp_defprec = MP_DEFPREC;
- else
- s_mp_defprec = prec;
-
-} /* end mp_set_prec() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ mp_init(mp, kmflag) */
-
-/*
- mp_init(mp, kmflag)
-
- Initialize a new zero-valued mp_int. Returns MP_OKAY if successful,
- MP_MEM if memory could not be allocated for the structure.
- */
-
-mp_err mp_init(mp_int *mp, int kmflag)
-{
- return mp_init_size(mp, s_mp_defprec, kmflag);
-
-} /* end mp_init() */
-
-/* }}} */
-
-/* {{{ mp_init_size(mp, prec, kmflag) */
-
-/*
- mp_init_size(mp, prec, kmflag)
-
- Initialize a new zero-valued mp_int with at least the given
- precision; returns MP_OKAY if successful, or MP_MEM if memory could
- not be allocated for the structure.
- */
-
-mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag)
-{
- ARGCHK(mp != NULL && prec > 0, MP_BADARG);
-
- prec = MP_ROUNDUP(prec, s_mp_defprec);
- if((DIGITS(mp) = s_mp_alloc(prec, sizeof(mp_digit), kmflag)) == NULL)
- return MP_MEM;
-
- SIGN(mp) = ZPOS;
- USED(mp) = 1;
- ALLOC(mp) = prec;
-
- return MP_OKAY;
-
-} /* end mp_init_size() */
-
-/* }}} */
-
-/* {{{ mp_init_copy(mp, from) */
-
-/*
- mp_init_copy(mp, from)
-
- Initialize mp as an exact copy of from. Returns MP_OKAY if
- successful, MP_MEM if memory could not be allocated for the new
- structure.
- */
-
-mp_err mp_init_copy(mp_int *mp, const mp_int *from)
-{
- ARGCHK(mp != NULL && from != NULL, MP_BADARG);
-
- if(mp == from)
- return MP_OKAY;
-
- if((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL)
- return MP_MEM;
-
- s_mp_copy(DIGITS(from), DIGITS(mp), USED(from));
- USED(mp) = USED(from);
- ALLOC(mp) = ALLOC(from);
- SIGN(mp) = SIGN(from);
-
-#ifndef _WIN32
- FLAG(mp) = FLAG(from);
-#endif /* _WIN32 */
-
- return MP_OKAY;
-
-} /* end mp_init_copy() */
-
-/* }}} */
-
-/* {{{ mp_copy(from, to) */
-
-/*
- mp_copy(from, to)
-
- Copies the mp_int 'from' to the mp_int 'to'. It is presumed that
- 'to' has already been initialized (if not, use mp_init_copy()
- instead). If 'from' and 'to' are identical, nothing happens.
- */
-
-mp_err mp_copy(const mp_int *from, mp_int *to)
-{
- ARGCHK(from != NULL && to != NULL, MP_BADARG);
-
- if(from == to)
- return MP_OKAY;
-
- ++mp_copies;
- { /* copy */
- mp_digit *tmp;
-
- /*
- If the allocated buffer in 'to' already has enough space to hold
- all the used digits of 'from', we'll re-use it to avoid hitting
- the memory allocater more than necessary; otherwise, we'd have
- to grow anyway, so we just allocate a hunk and make the copy as
- usual
- */
- if(ALLOC(to) >= USED(from)) {
- s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
- s_mp_copy(DIGITS(from), DIGITS(to), USED(from));
-
- } else {
- if((tmp = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL)
- return MP_MEM;
-
- s_mp_copy(DIGITS(from), tmp, USED(from));
-
- if(DIGITS(to) != NULL) {
-#if MP_CRYPTO
- s_mp_setz(DIGITS(to), ALLOC(to));
-#endif
- s_mp_free(DIGITS(to), ALLOC(to));
- }
-
- DIGITS(to) = tmp;
- ALLOC(to) = ALLOC(from);
- }
-
- /* Copy the precision and sign from the original */
- USED(to) = USED(from);
- SIGN(to) = SIGN(from);
- } /* end copy */
-
- return MP_OKAY;
-
-} /* end mp_copy() */
-
-/* }}} */
-
-/* {{{ mp_exch(mp1, mp2) */
-
-/*
- mp_exch(mp1, mp2)
-
- Exchange mp1 and mp2 without allocating any intermediate memory
- (well, unless you count the stack space needed for this call and the
- locals it creates...). This cannot fail.
- */
-
-void mp_exch(mp_int *mp1, mp_int *mp2)
-{
-#if MP_ARGCHK == 2
- assert(mp1 != NULL && mp2 != NULL);
-#else
- if(mp1 == NULL || mp2 == NULL)
- return;
-#endif
-
- s_mp_exch(mp1, mp2);
-
-} /* end mp_exch() */
-
-/* }}} */
-
-/* {{{ mp_clear(mp) */
-
-/*
- mp_clear(mp)
-
- Release the storage used by an mp_int, and void its fields so that
- if someone calls mp_clear() again for the same int later, we won't
- get tollchocked.
- */
-
-void mp_clear(mp_int *mp)
-{
- if(mp == NULL)
- return;
-
- if(DIGITS(mp) != NULL) {
-#if MP_CRYPTO
- s_mp_setz(DIGITS(mp), ALLOC(mp));
-#endif
- s_mp_free(DIGITS(mp), ALLOC(mp));
- DIGITS(mp) = NULL;
- }
-
- USED(mp) = 0;
- ALLOC(mp) = 0;
-
-} /* end mp_clear() */
-
-/* }}} */
-
-/* {{{ mp_zero(mp) */
-
-/*
- mp_zero(mp)
-
- Set mp to zero. Does not change the allocated size of the structure,
- and therefore cannot fail (except on a bad argument, which we ignore)
- */
-void mp_zero(mp_int *mp)
-{
- if(mp == NULL)
- return;
-
- s_mp_setz(DIGITS(mp), ALLOC(mp));
- USED(mp) = 1;
- SIGN(mp) = ZPOS;
-
-} /* end mp_zero() */
-
-/* }}} */
-
-/* {{{ mp_set(mp, d) */
-
-void mp_set(mp_int *mp, mp_digit d)
-{
- if(mp == NULL)
- return;
-
- mp_zero(mp);
- DIGIT(mp, 0) = d;
-
-} /* end mp_set() */
-
-/* }}} */
-
-/* {{{ mp_set_int(mp, z) */
-
-mp_err mp_set_int(mp_int *mp, long z)
-{
- int ix;
- unsigned long v = labs(z);
- mp_err res;
-
- ARGCHK(mp != NULL, MP_BADARG);
-
- mp_zero(mp);
- if(z == 0)
- return MP_OKAY; /* shortcut for zero */
-
- if (sizeof v <= sizeof(mp_digit)) {
- DIGIT(mp,0) = v;
- } else {
- for (ix = sizeof(long) - 1; ix >= 0; ix--) {
- if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
- return res;
-
- res = s_mp_add_d(mp, (mp_digit)((v >> (ix * CHAR_BIT)) & UCHAR_MAX));
- if (res != MP_OKAY)
- return res;
- }
- }
- if(z < 0)
- SIGN(mp) = NEG;
-
- return MP_OKAY;
-
-} /* end mp_set_int() */
-
-/* }}} */
-
-/* {{{ mp_set_ulong(mp, z) */
-
-mp_err mp_set_ulong(mp_int *mp, unsigned long z)
-{
- int ix;
- mp_err res;
-
- ARGCHK(mp != NULL, MP_BADARG);
-
- mp_zero(mp);
- if(z == 0)
- return MP_OKAY; /* shortcut for zero */
-
- if (sizeof z <= sizeof(mp_digit)) {
- DIGIT(mp,0) = z;
- } else {
- for (ix = sizeof(long) - 1; ix >= 0; ix--) {
- if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
- return res;
-
- res = s_mp_add_d(mp, (mp_digit)((z >> (ix * CHAR_BIT)) & UCHAR_MAX));
- if (res != MP_OKAY)
- return res;
- }
- }
- return MP_OKAY;
-} /* end mp_set_ulong() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Digit arithmetic */
-
-/* {{{ mp_add_d(a, d, b) */
-
-/*
- mp_add_d(a, d, b)
-
- Compute the sum b = a + d, for a single digit d. Respects the sign of
- its primary addend (single digits are unsigned anyway).
- */
-
-mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b)
-{
- mp_int tmp;
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
- return res;
-
- if(SIGN(&tmp) == ZPOS) {
- if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
- goto CLEANUP;
- } else if(s_mp_cmp_d(&tmp, d) >= 0) {
- if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
- goto CLEANUP;
- } else {
- mp_neg(&tmp, &tmp);
-
- DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
- }
-
- if(s_mp_cmp_d(&tmp, 0) == 0)
- SIGN(&tmp) = ZPOS;
-
- s_mp_exch(&tmp, b);
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-
-} /* end mp_add_d() */
-
-/* }}} */
-
-/* {{{ mp_sub_d(a, d, b) */
-
-/*
- mp_sub_d(a, d, b)
-
- Compute the difference b = a - d, for a single digit d. Respects the
- sign of its subtrahend (single digits are unsigned anyway).
- */
-
-mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b)
-{
- mp_int tmp;
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
- return res;
-
- if(SIGN(&tmp) == NEG) {
- if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
- goto CLEANUP;
- } else if(s_mp_cmp_d(&tmp, d) >= 0) {
- if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
- goto CLEANUP;
- } else {
- mp_neg(&tmp, &tmp);
-
- DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
- SIGN(&tmp) = NEG;
- }
-
- if(s_mp_cmp_d(&tmp, 0) == 0)
- SIGN(&tmp) = ZPOS;
-
- s_mp_exch(&tmp, b);
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-
-} /* end mp_sub_d() */
-
-/* }}} */
-
-/* {{{ mp_mul_d(a, d, b) */
-
-/*
- mp_mul_d(a, d, b)
-
- Compute the product b = a * d, for a single digit d. Respects the sign
- of its multiplicand (single digits are unsigned anyway)
- */
-
-mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if(d == 0) {
- mp_zero(b);
- return MP_OKAY;
- }
-
- if((res = mp_copy(a, b)) != MP_OKAY)
- return res;
-
- res = s_mp_mul_d(b, d);
-
- return res;
-
-} /* end mp_mul_d() */
-
-/* }}} */
-
-/* {{{ mp_mul_2(a, c) */
-
-mp_err mp_mul_2(const mp_int *a, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_copy(a, c)) != MP_OKAY)
- return res;
-
- return s_mp_mul_2(c);
-
-} /* end mp_mul_2() */
-
-/* }}} */
-
-/* {{{ mp_div_d(a, d, q, r) */
-
-/*
- mp_div_d(a, d, q, r)
-
- Compute the quotient q = a / d and remainder r = a mod d, for a
- single digit d. Respects the sign of its divisor (single digits are
- unsigned anyway).
- */
-
-mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r)
-{
- mp_err res;
- mp_int qp;
- mp_digit rem;
- int pow;
-
- ARGCHK(a != NULL, MP_BADARG);
-
- if(d == 0)
- return MP_RANGE;
-
- /* Shortcut for powers of two ... */
- if((pow = s_mp_ispow2d(d)) >= 0) {
- mp_digit mask;
-
- mask = ((mp_digit)1 << pow) - 1;
- rem = DIGIT(a, 0) & mask;
-
- if(q) {
- mp_copy(a, q);
- s_mp_div_2d(q, pow);
- }
-
- if(r)
- *r = rem;
-
- return MP_OKAY;
- }
-
- if((res = mp_init_copy(&qp, a)) != MP_OKAY)
- return res;
-
- res = s_mp_div_d(&qp, d, &rem);
-
- if(s_mp_cmp_d(&qp, 0) == 0)
- SIGN(q) = ZPOS;
-
- if(r)
- *r = rem;
-
- if(q)
- s_mp_exch(&qp, q);
-
- mp_clear(&qp);
- return res;
-
-} /* end mp_div_d() */
-
-/* }}} */
-
-/* {{{ mp_div_2(a, c) */
-
-/*
- mp_div_2(a, c)
-
- Compute c = a / 2, disregarding the remainder.
- */
-
-mp_err mp_div_2(const mp_int *a, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_copy(a, c)) != MP_OKAY)
- return res;
-
- s_mp_div_2(c);
-
- return MP_OKAY;
-
-} /* end mp_div_2() */
-
-/* }}} */
-
-/* {{{ mp_expt_d(a, d, b) */
-
-mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c)
-{
- mp_int s, x;
- mp_err res;
-
- ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
- return res;
- if((res = mp_init_copy(&x, a)) != MP_OKAY)
- goto X;
-
- DIGIT(&s, 0) = 1;
-
- while(d != 0) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d /= 2;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- s_mp_exch(&s, c);
-
-CLEANUP:
- mp_clear(&x);
-X:
- mp_clear(&s);
-
- return res;
-
-} /* end mp_expt_d() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Full arithmetic */
-
-/* {{{ mp_abs(a, b) */
-
-/*
- mp_abs(a, b)
-
- Compute b = |a|. 'a' and 'b' may be identical.
- */
-
-mp_err mp_abs(const mp_int *a, mp_int *b)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_copy(a, b)) != MP_OKAY)
- return res;
-
- SIGN(b) = ZPOS;
-
- return MP_OKAY;
-
-} /* end mp_abs() */
-
-/* }}} */
-
-/* {{{ mp_neg(a, b) */
-
-/*
- mp_neg(a, b)
-
- Compute b = -a. 'a' and 'b' may be identical.
- */
-
-mp_err mp_neg(const mp_int *a, mp_int *b)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_copy(a, b)) != MP_OKAY)
- return res;
-
- if(s_mp_cmp_d(b, 0) == MP_EQ)
- SIGN(b) = ZPOS;
- else
- SIGN(b) = (SIGN(b) == NEG) ? ZPOS : NEG;
-
- return MP_OKAY;
-
-} /* end mp_neg() */
-
-/* }}} */
-
-/* {{{ mp_add(a, b, c) */
-
-/*
- mp_add(a, b, c)
-
- Compute c = a + b. All parameters may be identical.
- */
-
-mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if(SIGN(a) == SIGN(b)) { /* same sign: add values, keep sign */
- MP_CHECKOK( s_mp_add_3arg(a, b, c) );
- } else if(s_mp_cmp(a, b) >= 0) { /* different sign: |a| >= |b| */
- MP_CHECKOK( s_mp_sub_3arg(a, b, c) );
- } else { /* different sign: |a| < |b| */
- MP_CHECKOK( s_mp_sub_3arg(b, a, c) );
- }
-
- if (s_mp_cmp_d(c, 0) == MP_EQ)
- SIGN(c) = ZPOS;
-
-CLEANUP:
- return res;
-
-} /* end mp_add() */
-
-/* }}} */
-
-/* {{{ mp_sub(a, b, c) */
-
-/*
- mp_sub(a, b, c)
-
- Compute c = a - b. All parameters may be identical.
- */
-
-mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_err res;
- int magDiff;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if (a == b) {
- mp_zero(c);
- return MP_OKAY;
- }
-
- if (MP_SIGN(a) != MP_SIGN(b)) {
- MP_CHECKOK( s_mp_add_3arg(a, b, c) );
- } else if (!(magDiff = s_mp_cmp(a, b))) {
- mp_zero(c);
- res = MP_OKAY;
- } else if (magDiff > 0) {
- MP_CHECKOK( s_mp_sub_3arg(a, b, c) );
- } else {
- MP_CHECKOK( s_mp_sub_3arg(b, a, c) );
- MP_SIGN(c) = !MP_SIGN(a);
- }
-
- if (s_mp_cmp_d(c, 0) == MP_EQ)
- MP_SIGN(c) = MP_ZPOS;
-
-CLEANUP:
- return res;
-
-} /* end mp_sub() */
-
-/* }}} */
-
-/* {{{ mp_mul(a, b, c) */
-
-/*
- mp_mul(a, b, c)
-
- Compute c = a * b. All parameters may be identical.
- */
-mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int * c)
-{
- mp_digit *pb;
- mp_int tmp;
- mp_err res;
- mp_size ib;
- mp_size useda, usedb;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if (a == c) {
- if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
- return res;
- if (a == b)
- b = &tmp;
- a = &tmp;
- } else if (b == c) {
- if ((res = mp_init_copy(&tmp, b)) != MP_OKAY)
- return res;
- b = &tmp;
- } else {
- MP_DIGITS(&tmp) = 0;
- }
-
- if (MP_USED(a) < MP_USED(b)) {
- const mp_int *xch = b; /* switch a and b, to do fewer outer loops */
- b = a;
- a = xch;
- }
-
- MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
- if((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
- goto CLEANUP;
-
-#ifdef NSS_USE_COMBA
- if ((MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) {
- if (MP_USED(a) == 4) {
- s_mp_mul_comba_4(a, b, c);
- goto CLEANUP;
- }
- if (MP_USED(a) == 8) {
- s_mp_mul_comba_8(a, b, c);
- goto CLEANUP;
- }
- if (MP_USED(a) == 16) {
- s_mp_mul_comba_16(a, b, c);
- goto CLEANUP;
- }
- if (MP_USED(a) == 32) {
- s_mp_mul_comba_32(a, b, c);
- goto CLEANUP;
- }
- }
-#endif
-
- pb = MP_DIGITS(b);
- s_mpv_mul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
-
- /* Outer loop: Digits of b */
- useda = MP_USED(a);
- usedb = MP_USED(b);
- for (ib = 1; ib < usedb; ib++) {
- mp_digit b_i = *pb++;
-
- /* Inner product: Digits of a */
- if (b_i)
- s_mpv_mul_d_add(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
- else
- MP_DIGIT(c, ib + useda) = b_i;
- }
-
- s_mp_clamp(c);
-
- if(SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ)
- SIGN(c) = ZPOS;
- else
- SIGN(c) = NEG;
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-} /* end mp_mul() */
-
-/* }}} */
-
-/* {{{ mp_sqr(a, sqr) */
-
-#if MP_SQUARE
-/*
- Computes the square of a. This can be done more
- efficiently than a general multiplication, because many of the
- computation steps are redundant when squaring. The inner product
- step is a bit more complicated, but we save a fair number of
- iterations of the multiplication loop.
- */
-
-/* sqr = a^2; Caller provides both a and tmp; */
-mp_err mp_sqr(const mp_int *a, mp_int *sqr)
-{
- mp_digit *pa;
- mp_digit d;
- mp_err res;
- mp_size ix;
- mp_int tmp;
- int count;
-
- ARGCHK(a != NULL && sqr != NULL, MP_BADARG);
-
- if (a == sqr) {
- if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
- return res;
- a = &tmp;
- } else {
- DIGITS(&tmp) = 0;
- res = MP_OKAY;
- }
-
- ix = 2 * MP_USED(a);
- if (ix > MP_ALLOC(sqr)) {
- MP_USED(sqr) = 1;
- MP_CHECKOK( s_mp_grow(sqr, ix) );
- }
- MP_USED(sqr) = ix;
- MP_DIGIT(sqr, 0) = 0;
-
-#ifdef NSS_USE_COMBA
- if (IS_POWER_OF_2(MP_USED(a))) {
- if (MP_USED(a) == 4) {
- s_mp_sqr_comba_4(a, sqr);
- goto CLEANUP;
- }
- if (MP_USED(a) == 8) {
- s_mp_sqr_comba_8(a, sqr);
- goto CLEANUP;
- }
- if (MP_USED(a) == 16) {
- s_mp_sqr_comba_16(a, sqr);
- goto CLEANUP;
- }
- if (MP_USED(a) == 32) {
- s_mp_sqr_comba_32(a, sqr);
- goto CLEANUP;
- }
- }
-#endif
-
- pa = MP_DIGITS(a);
- count = MP_USED(a) - 1;
- if (count > 0) {
- d = *pa++;
- s_mpv_mul_d(pa, count, d, MP_DIGITS(sqr) + 1);
- for (ix = 3; --count > 0; ix += 2) {
- d = *pa++;
- s_mpv_mul_d_add(pa, count, d, MP_DIGITS(sqr) + ix);
- } /* for(ix ...) */
- MP_DIGIT(sqr, MP_USED(sqr)-1) = 0; /* above loop stopped short of this. */
-
- /* now sqr *= 2 */
- s_mp_mul_2(sqr);
- } else {
- MP_DIGIT(sqr, 1) = 0;
- }
-
- /* now add the squares of the digits of a to sqr. */
- s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr));
-
- SIGN(sqr) = ZPOS;
- s_mp_clamp(sqr);
-
-CLEANUP:
- mp_clear(&tmp);
- return res;
-
-} /* end mp_sqr() */
-#endif
-
-/* }}} */
-
-/* {{{ mp_div(a, b, q, r) */
-
-/*
- mp_div(a, b, q, r)
-
- Compute q = a / b and r = a mod b. Input parameters may be re-used
- as output parameters. If q or r is NULL, that portion of the
- computation will be discarded (although it will still be computed)
- */
-mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r)
-{
- mp_err res;
- mp_int *pQ, *pR;
- mp_int qtmp, rtmp, btmp;
- int cmp;
- mp_sign signA;
- mp_sign signB;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- signA = MP_SIGN(a);
- signB = MP_SIGN(b);
-
- if(mp_cmp_z(b) == MP_EQ)
- return MP_RANGE;
-
- DIGITS(&qtmp) = 0;
- DIGITS(&rtmp) = 0;
- DIGITS(&btmp) = 0;
-
- /* Set up some temporaries... */
- if (!r || r == a || r == b) {
- MP_CHECKOK( mp_init_copy(&rtmp, a) );
- pR = &rtmp;
- } else {
- MP_CHECKOK( mp_copy(a, r) );
- pR = r;
- }
-
- if (!q || q == a || q == b) {
- MP_CHECKOK( mp_init_size(&qtmp, MP_USED(a), FLAG(a)) );
- pQ = &qtmp;
- } else {
- MP_CHECKOK( s_mp_pad(q, MP_USED(a)) );
- pQ = q;
- mp_zero(pQ);
- }
-
- /*
- If |a| <= |b|, we can compute the solution without division;
- otherwise, we actually do the work required.
- */
- if ((cmp = s_mp_cmp(a, b)) <= 0) {
- if (cmp) {
- /* r was set to a above. */
- mp_zero(pQ);
- } else {
- mp_set(pQ, 1);
- mp_zero(pR);
- }
- } else {
- MP_CHECKOK( mp_init_copy(&btmp, b) );
- MP_CHECKOK( s_mp_div(pR, &btmp, pQ) );
- }
-
- /* Compute the signs for the output */
- MP_SIGN(pR) = signA; /* Sr = Sa */
- /* Sq = ZPOS if Sa == Sb */ /* Sq = NEG if Sa != Sb */
- MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG;
-
- if(s_mp_cmp_d(pQ, 0) == MP_EQ)
- SIGN(pQ) = ZPOS;
- if(s_mp_cmp_d(pR, 0) == MP_EQ)
- SIGN(pR) = ZPOS;
-
- /* Copy output, if it is needed */
- if(q && q != pQ)
- s_mp_exch(pQ, q);
-
- if(r && r != pR)
- s_mp_exch(pR, r);
-
-CLEANUP:
- mp_clear(&btmp);
- mp_clear(&rtmp);
- mp_clear(&qtmp);
-
- return res;
-
-} /* end mp_div() */
-
-/* }}} */
-
-/* {{{ mp_div_2d(a, d, q, r) */
-
-mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r)
-{
- mp_err res;
-
- ARGCHK(a != NULL, MP_BADARG);
-
- if(q) {
- if((res = mp_copy(a, q)) != MP_OKAY)
- return res;
- }
- if(r) {
- if((res = mp_copy(a, r)) != MP_OKAY)
- return res;
- }
- if(q) {
- s_mp_div_2d(q, d);
- }
- if(r) {
- s_mp_mod_2d(r, d);
- }
-
- return MP_OKAY;
-
-} /* end mp_div_2d() */
-
-/* }}} */
-
-/* {{{ mp_expt(a, b, c) */
-
-/*
- mp_expt(a, b, c)
-
- Compute c = a ** b, that is, raise a to the b power. Uses a
- standard iterative square-and-multiply technique.
- */
-
-mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c)
-{
- mp_int s, x;
- mp_err res;
- mp_digit d;
- int dig, bit;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if(mp_cmp_z(b) < 0)
- return MP_RANGE;
-
- if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
- return res;
-
- mp_set(&s, 1);
-
- if((res = mp_init_copy(&x, a)) != MP_OKAY)
- goto X;
-
- /* Loop over low-order digits in ascending order */
- for(dig = 0; dig < (USED(b) - 1); dig++) {
- d = DIGIT(b, dig);
-
- /* Loop over bits of each non-maximal digit */
- for(bit = 0; bit < DIGIT_BIT; bit++) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d >>= 1;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY)
- goto CLEANUP;
- }
- }
-
- /* Consider now the last digit... */
- d = DIGIT(b, dig);
-
- while(d) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d >>= 1;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- if(mp_iseven(b))
- SIGN(&s) = SIGN(a);
-
- res = mp_copy(&s, c);
-
-CLEANUP:
- mp_clear(&x);
-X:
- mp_clear(&s);
-
- return res;
-
-} /* end mp_expt() */
-
-/* }}} */
-
-/* {{{ mp_2expt(a, k) */
-
-/* Compute a = 2^k */
-
-mp_err mp_2expt(mp_int *a, mp_digit k)
-{
- ARGCHK(a != NULL, MP_BADARG);
-
- return s_mp_2expt(a, k);
-
-} /* end mp_2expt() */
-
-/* }}} */
-
-/* {{{ mp_mod(a, m, c) */
-
-/*
- mp_mod(a, m, c)
-
- Compute c = a (mod m). Result will always be 0 <= c < m.
- */
-
-mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c)
-{
- mp_err res;
- int mag;
-
- ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
-
- if(SIGN(m) == NEG)
- return MP_RANGE;
-
- /*
- If |a| > m, we need to divide to get the remainder and take the
- absolute value.
-
- If |a| < m, we don't need to do any division, just copy and adjust
- the sign (if a is negative).
-
- If |a| == m, we can simply set the result to zero.
-
- This order is intended to minimize the average path length of the
- comparison chain on common workloads -- the most frequent cases are
- that |a| != m, so we do those first.
- */
- if((mag = s_mp_cmp(a, m)) > 0) {
- if((res = mp_div(a, m, NULL, c)) != MP_OKAY)
- return res;
-
- if(SIGN(c) == NEG) {
- if((res = mp_add(c, m, c)) != MP_OKAY)
- return res;
- }
-
- } else if(mag < 0) {
- if((res = mp_copy(a, c)) != MP_OKAY)
- return res;
-
- if(mp_cmp_z(a) < 0) {
- if((res = mp_add(c, m, c)) != MP_OKAY)
- return res;
-
- }
-
- } else {
- mp_zero(c);
-
- }
-
- return MP_OKAY;
-
-} /* end mp_mod() */
-
-/* }}} */
-
-/* {{{ mp_mod_d(a, d, c) */
-
-/*
- mp_mod_d(a, d, c)
-
- Compute c = a (mod d). Result will always be 0 <= c < d
- */
-mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c)
-{
- mp_err res;
- mp_digit rem;
-
- ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
- if(s_mp_cmp_d(a, d) > 0) {
- if((res = mp_div_d(a, d, NULL, &rem)) != MP_OKAY)
- return res;
-
- } else {
- if(SIGN(a) == NEG)
- rem = d - DIGIT(a, 0);
- else
- rem = DIGIT(a, 0);
- }
-
- if(c)
- *c = rem;
-
- return MP_OKAY;
-
-} /* end mp_mod_d() */
-
-/* }}} */
-
-/* {{{ mp_sqrt(a, b) */
-
-/*
- mp_sqrt(a, b)
-
- Compute the integer square root of a, and store the result in b.
- Uses an integer-arithmetic version of Newton's iterative linear
- approximation technique to determine this value; the result has the
- following two properties:
-
- b^2 <= a
- (b+1)^2 >= a
-
- It is a range error to pass a negative value.
- */
-mp_err mp_sqrt(const mp_int *a, mp_int *b)
-{
- mp_int x, t;
- mp_err res;
- mp_size used;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- /* Cannot take square root of a negative value */
- if(SIGN(a) == NEG)
- return MP_RANGE;
-
- /* Special cases for zero and one, trivial */
- if(mp_cmp_d(a, 1) <= 0)
- return mp_copy(a, b);
-
- /* Initialize the temporaries we'll use below */
- if((res = mp_init_size(&t, USED(a), FLAG(a))) != MP_OKAY)
- return res;
-
- /* Compute an initial guess for the iteration as a itself */
- if((res = mp_init_copy(&x, a)) != MP_OKAY)
- goto X;
-
- used = MP_USED(&x);
- if (used > 1) {
- s_mp_rshd(&x, used / 2);
- }
-
- for(;;) {
- /* t = (x * x) - a */
- mp_copy(&x, &t); /* can't fail, t is big enough for original x */
- if((res = mp_sqr(&t, &t)) != MP_OKAY ||
- (res = mp_sub(&t, a, &t)) != MP_OKAY)
- goto CLEANUP;
-
- /* t = t / 2x */
- s_mp_mul_2(&x);
- if((res = mp_div(&t, &x, &t, NULL)) != MP_OKAY)
- goto CLEANUP;
- s_mp_div_2(&x);
-
- /* Terminate the loop, if the quotient is zero */
- if(mp_cmp_z(&t) == MP_EQ)
- break;
-
- /* x = x - t */
- if((res = mp_sub(&x, &t, &x)) != MP_OKAY)
- goto CLEANUP;
-
- }
-
- /* Copy result to output parameter */
- mp_sub_d(&x, 1, &x);
- s_mp_exch(&x, b);
-
- CLEANUP:
- mp_clear(&x);
- X:
- mp_clear(&t);
-
- return res;
-
-} /* end mp_sqrt() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Modular arithmetic */
-
-#if MP_MODARITH
-/* {{{ mp_addmod(a, b, m, c) */
-
-/*
- mp_addmod(a, b, m, c)
-
- Compute c = (a + b) mod m
- */
-
-mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_add(a, b, c)) != MP_OKAY)
- return res;
- if((res = mp_mod(c, m, c)) != MP_OKAY)
- return res;
-
- return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_submod(a, b, m, c) */
-
-/*
- mp_submod(a, b, m, c)
-
- Compute c = (a - b) mod m
- */
-
-mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_sub(a, b, c)) != MP_OKAY)
- return res;
- if((res = mp_mod(c, m, c)) != MP_OKAY)
- return res;
-
- return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_mulmod(a, b, m, c) */
-
-/*
- mp_mulmod(a, b, m, c)
-
- Compute c = (a * b) mod m
- */
-
-mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_mul(a, b, c)) != MP_OKAY)
- return res;
- if((res = mp_mod(c, m, c)) != MP_OKAY)
- return res;
-
- return MP_OKAY;
-
-}
-
-/* }}} */
-
-/* {{{ mp_sqrmod(a, m, c) */
-
-#if MP_SQUARE
-mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c)
-{
- mp_err res;
-
- ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_sqr(a, c)) != MP_OKAY)
- return res;
- if((res = mp_mod(c, m, c)) != MP_OKAY)
- return res;
-
- return MP_OKAY;
-
-} /* end mp_sqrmod() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_exptmod(a, b, m, c) */
-
-/*
- s_mp_exptmod(a, b, m, c)
-
- Compute c = (a ** b) mod m. Uses a standard square-and-multiply
- method with modular reductions at each step. (This is basically the
- same code as mp_expt(), except for the addition of the reductions)
-
- The modular reductions are done using Barrett's algorithm (see
- s_mp_reduce() below for details)
- */
-
-mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c)
-{
- mp_int s, x, mu;
- mp_err res;
- mp_digit d;
- int dig, bit;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if(mp_cmp_z(b) < 0 || mp_cmp_z(m) <= 0)
- return MP_RANGE;
-
- if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
- return res;
- if((res = mp_init_copy(&x, a)) != MP_OKAY ||
- (res = mp_mod(&x, m, &x)) != MP_OKAY)
- goto X;
- if((res = mp_init(&mu, FLAG(a))) != MP_OKAY)
- goto MU;
-
- mp_set(&s, 1);
-
- /* mu = b^2k / m */
- s_mp_add_d(&mu, 1);
- s_mp_lshd(&mu, 2 * USED(m));
- if((res = mp_div(&mu, m, &mu, NULL)) != MP_OKAY)
- goto CLEANUP;
-
- /* Loop over digits of b in ascending order, except highest order */
- for(dig = 0; dig < (USED(b) - 1); dig++) {
- d = DIGIT(b, dig);
-
- /* Loop over the bits of the lower-order digits */
- for(bit = 0; bit < DIGIT_BIT; bit++) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY)
- goto CLEANUP;
- if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d >>= 1;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY)
- goto CLEANUP;
- if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
- goto CLEANUP;
- }
- }
-
- /* Now do the last digit... */
- d = DIGIT(b, dig);
-
- while(d) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY)
- goto CLEANUP;
- if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d >>= 1;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY)
- goto CLEANUP;
- if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
- goto CLEANUP;
- }
-
- s_mp_exch(&s, c);
-
- CLEANUP:
- mp_clear(&mu);
- MU:
- mp_clear(&x);
- X:
- mp_clear(&s);
-
- return res;
-
-} /* end s_mp_exptmod() */
-
-/* }}} */
-
-/* {{{ mp_exptmod_d(a, d, m, c) */
-
-mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c)
-{
- mp_int s, x;
- mp_err res;
-
- ARGCHK(a != NULL && c != NULL, MP_BADARG);
-
- if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
- return res;
- if((res = mp_init_copy(&x, a)) != MP_OKAY)
- goto X;
-
- mp_set(&s, 1);
-
- while(d != 0) {
- if(d & 1) {
- if((res = s_mp_mul(&s, &x)) != MP_OKAY ||
- (res = mp_mod(&s, m, &s)) != MP_OKAY)
- goto CLEANUP;
- }
-
- d /= 2;
-
- if((res = s_mp_sqr(&x)) != MP_OKAY ||
- (res = mp_mod(&x, m, &x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- s_mp_exch(&s, c);
-
-CLEANUP:
- mp_clear(&x);
-X:
- mp_clear(&s);
-
- return res;
-
-} /* end mp_exptmod_d() */
-
-/* }}} */
-#endif /* if MP_MODARITH */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Comparison functions */
-
-/* {{{ mp_cmp_z(a) */
-
-/*
- mp_cmp_z(a)
-
- Compare a <=> 0. Returns <0 if a<0, 0 if a=0, >0 if a>0.
- */
-
-int mp_cmp_z(const mp_int *a)
-{
- if(SIGN(a) == NEG)
- return MP_LT;
- else if(USED(a) == 1 && DIGIT(a, 0) == 0)
- return MP_EQ;
- else
- return MP_GT;
-
-} /* end mp_cmp_z() */
-
-/* }}} */
-
-/* {{{ mp_cmp_d(a, d) */
-
-/*
- mp_cmp_d(a, d)
-
- Compare a <=> d. Returns <0 if a<d, 0 if a=d, >0 if a>d
- */
-
-int mp_cmp_d(const mp_int *a, mp_digit d)
-{
- ARGCHK(a != NULL, MP_EQ);
-
- if(SIGN(a) == NEG)
- return MP_LT;
-
- return s_mp_cmp_d(a, d);
-
-} /* end mp_cmp_d() */
-
-/* }}} */
-
-/* {{{ mp_cmp(a, b) */
-
-int mp_cmp(const mp_int *a, const mp_int *b)
-{
- ARGCHK(a != NULL && b != NULL, MP_EQ);
-
- if(SIGN(a) == SIGN(b)) {
- int mag;
-
- if((mag = s_mp_cmp(a, b)) == MP_EQ)
- return MP_EQ;
-
- if(SIGN(a) == ZPOS)
- return mag;
- else
- return -mag;
-
- } else if(SIGN(a) == ZPOS) {
- return MP_GT;
- } else {
- return MP_LT;
- }
-
-} /* end mp_cmp() */
-
-/* }}} */
-
-/* {{{ mp_cmp_mag(a, b) */
-
-/*
- mp_cmp_mag(a, b)
-
- Compares |a| <=> |b|, and returns an appropriate comparison result
- */
-
-int mp_cmp_mag(mp_int *a, mp_int *b)
-{
- ARGCHK(a != NULL && b != NULL, MP_EQ);
-
- return s_mp_cmp(a, b);
-
-} /* end mp_cmp_mag() */
-
-/* }}} */
-
-/* {{{ mp_cmp_int(a, z, kmflag) */
-
-/*
- This just converts z to an mp_int, and uses the existing comparison
- routines. This is sort of inefficient, but it's not clear to me how
- frequently this wil get used anyway. For small positive constants,
- you can always use mp_cmp_d(), and for zero, there is mp_cmp_z().
- */
-int mp_cmp_int(const mp_int *a, long z, int kmflag)
-{
- mp_int tmp;
- int out;
-
- ARGCHK(a != NULL, MP_EQ);
-
- mp_init(&tmp, kmflag); mp_set_int(&tmp, z);
- out = mp_cmp(a, &tmp);
- mp_clear(&tmp);
-
- return out;
-
-} /* end mp_cmp_int() */
-
-/* }}} */
-
-/* {{{ mp_isodd(a) */
-
-/*
- mp_isodd(a)
-
- Returns a true (non-zero) value if a is odd, false (zero) otherwise.
- */
-int mp_isodd(const mp_int *a)
-{
- ARGCHK(a != NULL, 0);
-
- return (int)(DIGIT(a, 0) & 1);
-
-} /* end mp_isodd() */
-
-/* }}} */
-
-/* {{{ mp_iseven(a) */
-
-int mp_iseven(const mp_int *a)
-{
- return !mp_isodd(a);
-
-} /* end mp_iseven() */
-
-/* }}} */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ Number theoretic functions */
-
-#if MP_NUMTH
-/* {{{ mp_gcd(a, b, c) */
-
-/*
- Like the old mp_gcd() function, except computes the GCD using the
- binary algorithm due to Josef Stein in 1961 (via Knuth).
- */
-mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c)
-{
- mp_err res;
- mp_int u, v, t;
- mp_size k = 0;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if(mp_cmp_z(a) == MP_EQ && mp_cmp_z(b) == MP_EQ)
- return MP_RANGE;
- if(mp_cmp_z(a) == MP_EQ) {
- return mp_copy(b, c);
- } else if(mp_cmp_z(b) == MP_EQ) {
- return mp_copy(a, c);
- }
-
- if((res = mp_init(&t, FLAG(a))) != MP_OKAY)
- return res;
- if((res = mp_init_copy(&u, a)) != MP_OKAY)
- goto U;
- if((res = mp_init_copy(&v, b)) != MP_OKAY)
- goto V;
-
- SIGN(&u) = ZPOS;
- SIGN(&v) = ZPOS;
-
- /* Divide out common factors of 2 until at least 1 of a, b is even */
- while(mp_iseven(&u) && mp_iseven(&v)) {
- s_mp_div_2(&u);
- s_mp_div_2(&v);
- ++k;
- }
-
- /* Initialize t */
- if(mp_isodd(&u)) {
- if((res = mp_copy(&v, &t)) != MP_OKAY)
- goto CLEANUP;
-
- /* t = -v */
- if(SIGN(&v) == ZPOS)
- SIGN(&t) = NEG;
- else
- SIGN(&t) = ZPOS;
-
- } else {
- if((res = mp_copy(&u, &t)) != MP_OKAY)
- goto CLEANUP;
-
- }
-
- for(;;) {
- while(mp_iseven(&t)) {
- s_mp_div_2(&t);
- }
-
- if(mp_cmp_z(&t) == MP_GT) {
- if((res = mp_copy(&t, &u)) != MP_OKAY)
- goto CLEANUP;
-
- } else {
- if((res = mp_copy(&t, &v)) != MP_OKAY)
- goto CLEANUP;
-
- /* v = -t */
- if(SIGN(&t) == ZPOS)
- SIGN(&v) = NEG;
- else
- SIGN(&v) = ZPOS;
- }
-
- if((res = mp_sub(&u, &v, &t)) != MP_OKAY)
- goto CLEANUP;
-
- if(s_mp_cmp_d(&t, 0) == MP_EQ)
- break;
- }
-
- s_mp_2expt(&v, k); /* v = 2^k */
- res = mp_mul(&u, &v, c); /* c = u * v */
-
- CLEANUP:
- mp_clear(&v);
- V:
- mp_clear(&u);
- U:
- mp_clear(&t);
-
- return res;
-
-} /* end mp_gcd() */
-
-/* }}} */
-
-/* {{{ mp_lcm(a, b, c) */
-
-/* We compute the least common multiple using the rule:
-
- ab = [a, b](a, b)
-
- ... by computing the product, and dividing out the gcd.
- */
-
-mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c)
-{
- mp_int gcd, prod;
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- /* Set up temporaries */
- if((res = mp_init(&gcd, FLAG(a))) != MP_OKAY)
- return res;
- if((res = mp_init(&prod, FLAG(a))) != MP_OKAY)
- goto GCD;
-
- if((res = mp_mul(a, b, &prod)) != MP_OKAY)
- goto CLEANUP;
- if((res = mp_gcd(a, b, &gcd)) != MP_OKAY)
- goto CLEANUP;
-
- res = mp_div(&prod, &gcd, c, NULL);
-
- CLEANUP:
- mp_clear(&prod);
- GCD:
- mp_clear(&gcd);
-
- return res;
-
-} /* end mp_lcm() */
-
-/* }}} */
-
-/* {{{ mp_xgcd(a, b, g, x, y) */
-
-/*
- mp_xgcd(a, b, g, x, y)
-
- Compute g = (a, b) and values x and y satisfying Bezout's identity
- (that is, ax + by = g). This uses the binary extended GCD algorithm
- based on the Stein algorithm used for mp_gcd()
- See algorithm 14.61 in Handbook of Applied Cryptogrpahy.
- */
-
-mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y)
-{
- mp_int gx, xc, yc, u, v, A, B, C, D;
- mp_int *clean[9];
- mp_err res;
- int last = -1;
-
- if(mp_cmp_z(b) == 0)
- return MP_RANGE;
-
- /* Initialize all these variables we need */
- MP_CHECKOK( mp_init(&u, FLAG(a)) );
- clean[++last] = &u;
- MP_CHECKOK( mp_init(&v, FLAG(a)) );
- clean[++last] = &v;
- MP_CHECKOK( mp_init(&gx, FLAG(a)) );
- clean[++last] = &gx;
- MP_CHECKOK( mp_init(&A, FLAG(a)) );
- clean[++last] = &A;
- MP_CHECKOK( mp_init(&B, FLAG(a)) );
- clean[++last] = &B;
- MP_CHECKOK( mp_init(&C, FLAG(a)) );
- clean[++last] = &C;
- MP_CHECKOK( mp_init(&D, FLAG(a)) );
- clean[++last] = &D;
- MP_CHECKOK( mp_init_copy(&xc, a) );
- clean[++last] = &xc;
- mp_abs(&xc, &xc);
- MP_CHECKOK( mp_init_copy(&yc, b) );
- clean[++last] = &yc;
- mp_abs(&yc, &yc);
-
- mp_set(&gx, 1);
-
- /* Divide by two until at least one of them is odd */
- while(mp_iseven(&xc) && mp_iseven(&yc)) {
- mp_size nx = mp_trailing_zeros(&xc);
- mp_size ny = mp_trailing_zeros(&yc);
- mp_size n = MP_MIN(nx, ny);
- s_mp_div_2d(&xc,n);
- s_mp_div_2d(&yc,n);
- MP_CHECKOK( s_mp_mul_2d(&gx,n) );
- }
-
- mp_copy(&xc, &u);
- mp_copy(&yc, &v);
- mp_set(&A, 1); mp_set(&D, 1);
-
- /* Loop through binary GCD algorithm */
- do {
- while(mp_iseven(&u)) {
- s_mp_div_2(&u);
-
- if(mp_iseven(&A) && mp_iseven(&B)) {
- s_mp_div_2(&A); s_mp_div_2(&B);
- } else {
- MP_CHECKOK( mp_add(&A, &yc, &A) );
- s_mp_div_2(&A);
- MP_CHECKOK( mp_sub(&B, &xc, &B) );
- s_mp_div_2(&B);
- }
- }
-
- while(mp_iseven(&v)) {
- s_mp_div_2(&v);
-
- if(mp_iseven(&C) && mp_iseven(&D)) {
- s_mp_div_2(&C); s_mp_div_2(&D);
- } else {
- MP_CHECKOK( mp_add(&C, &yc, &C) );
- s_mp_div_2(&C);
- MP_CHECKOK( mp_sub(&D, &xc, &D) );
- s_mp_div_2(&D);
- }
- }
-
- if(mp_cmp(&u, &v) >= 0) {
- MP_CHECKOK( mp_sub(&u, &v, &u) );
- MP_CHECKOK( mp_sub(&A, &C, &A) );
- MP_CHECKOK( mp_sub(&B, &D, &B) );
- } else {
- MP_CHECKOK( mp_sub(&v, &u, &v) );
- MP_CHECKOK( mp_sub(&C, &A, &C) );
- MP_CHECKOK( mp_sub(&D, &B, &D) );
- }
- } while (mp_cmp_z(&u) != 0);
-
- /* copy results to output */
- if(x)
- MP_CHECKOK( mp_copy(&C, x) );
-
- if(y)
- MP_CHECKOK( mp_copy(&D, y) );
-
- if(g)
- MP_CHECKOK( mp_mul(&gx, &v, g) );
-
- CLEANUP:
- while(last >= 0)
- mp_clear(clean[last--]);
-
- return res;
-
-} /* end mp_xgcd() */
-
-/* }}} */
-
-mp_size mp_trailing_zeros(const mp_int *mp)
-{
- mp_digit d;
- mp_size n = 0;
- int ix;
-
- if (!mp || !MP_DIGITS(mp) || !mp_cmp_z(mp))
- return n;
-
- for (ix = 0; !(d = MP_DIGIT(mp,ix)) && (ix < MP_USED(mp)); ++ix)
- n += MP_DIGIT_BIT;
- if (!d)
- return 0; /* shouldn't happen, but ... */
-#if !defined(MP_USE_UINT_DIGIT)
- if (!(d & 0xffffffffU)) {
- d >>= 32;
- n += 32;
- }
-#endif
- if (!(d & 0xffffU)) {
- d >>= 16;
- n += 16;
- }
- if (!(d & 0xffU)) {
- d >>= 8;
- n += 8;
- }
- if (!(d & 0xfU)) {
- d >>= 4;
- n += 4;
- }
- if (!(d & 0x3U)) {
- d >>= 2;
- n += 2;
- }
- if (!(d & 0x1U)) {
- d >>= 1;
- n += 1;
- }
-#if MP_ARGCHK == 2
- assert(0 != (d & 1));
-#endif
- return n;
-}
-
-/* Given a and prime p, computes c and k such that a*c == 2**k (mod p).
-** Returns k (positive) or error (negative).
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_err s_mp_almost_inverse(const mp_int *a, const mp_int *p, mp_int *c)
-{
- mp_err res;
- mp_err k = 0;
- mp_int d, f, g;
-
- ARGCHK(a && p && c, MP_BADARG);
-
- MP_DIGITS(&d) = 0;
- MP_DIGITS(&f) = 0;
- MP_DIGITS(&g) = 0;
- MP_CHECKOK( mp_init(&d, FLAG(a)) );
- MP_CHECKOK( mp_init_copy(&f, a) ); /* f = a */
- MP_CHECKOK( mp_init_copy(&g, p) ); /* g = p */
-
- mp_set(c, 1);
- mp_zero(&d);
-
- if (mp_cmp_z(&f) == 0) {
- res = MP_UNDEF;
- } else
- for (;;) {
- int diff_sign;
- while (mp_iseven(&f)) {
- mp_size n = mp_trailing_zeros(&f);
- if (!n) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
- s_mp_div_2d(&f, n);
- MP_CHECKOK( s_mp_mul_2d(&d, n) );
- k += n;
- }
- if (mp_cmp_d(&f, 1) == MP_EQ) { /* f == 1 */
- res = k;
- break;
- }
- diff_sign = mp_cmp(&f, &g);
- if (diff_sign < 0) { /* f < g */
- s_mp_exch(&f, &g);
- s_mp_exch(c, &d);
- } else if (diff_sign == 0) { /* f == g */
- res = MP_UNDEF; /* a and p are not relatively prime */
- break;
- }
- if ((MP_DIGIT(&f,0) % 4) == (MP_DIGIT(&g,0) % 4)) {
- MP_CHECKOK( mp_sub(&f, &g, &f) ); /* f = f - g */
- MP_CHECKOK( mp_sub(c, &d, c) ); /* c = c - d */
- } else {
- MP_CHECKOK( mp_add(&f, &g, &f) ); /* f = f + g */
- MP_CHECKOK( mp_add(c, &d, c) ); /* c = c + d */
- }
- }
- if (res >= 0) {
- while (MP_SIGN(c) != MP_ZPOS) {
- MP_CHECKOK( mp_add(c, p, c) );
- }
- res = k;
- }
-
-CLEANUP:
- mp_clear(&d);
- mp_clear(&f);
- mp_clear(&g);
- return res;
-}
-
-/* Compute T = (P ** -1) mod MP_RADIX. Also works for 16-bit mp_digits.
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_digit s_mp_invmod_radix(mp_digit P)
-{
- mp_digit T = P;
- T *= 2 - (P * T);
- T *= 2 - (P * T);
- T *= 2 - (P * T);
- T *= 2 - (P * T);
-#if !defined(MP_USE_UINT_DIGIT)
- T *= 2 - (P * T);
- T *= 2 - (P * T);
-#endif
- return T;
-}
-
-/* Given c, k, and prime p, where a*c == 2**k (mod p),
-** Compute x = (a ** -1) mod p. This is similar to Montgomery reduction.
-** This technique from the paper "Fast Modular Reciprocals" (unpublished)
-** by Richard Schroeppel (a.k.a. Captain Nemo).
-*/
-mp_err s_mp_fixup_reciprocal(const mp_int *c, const mp_int *p, int k, mp_int *x)
-{
- int k_orig = k;
- mp_digit r;
- mp_size ix;
- mp_err res;
-
- if (mp_cmp_z(c) < 0) { /* c < 0 */
- MP_CHECKOK( mp_add(c, p, x) ); /* x = c + p */
- } else {
- MP_CHECKOK( mp_copy(c, x) ); /* x = c */
- }
-
- /* make sure x is large enough */
- ix = MP_HOWMANY(k, MP_DIGIT_BIT) + MP_USED(p) + 1;
- ix = MP_MAX(ix, MP_USED(x));
- MP_CHECKOK( s_mp_pad(x, ix) );
-
- r = 0 - s_mp_invmod_radix(MP_DIGIT(p,0));
-
- for (ix = 0; k > 0; ix++) {
- int j = MP_MIN(k, MP_DIGIT_BIT);
- mp_digit v = r * MP_DIGIT(x, ix);
- if (j < MP_DIGIT_BIT) {
- v &= ((mp_digit)1 << j) - 1; /* v = v mod (2 ** j) */
- }
- s_mp_mul_d_add_offset(p, v, x, ix); /* x += p * v * (RADIX ** ix) */
- k -= j;
- }
- s_mp_clamp(x);
- s_mp_div_2d(x, k_orig);
- res = MP_OKAY;
-
-CLEANUP:
- return res;
-}
-
-/* compute mod inverse using Schroeppel's method, only if m is odd */
-mp_err s_mp_invmod_odd_m(const mp_int *a, const mp_int *m, mp_int *c)
-{
- int k;
- mp_err res;
- mp_int x;
-
- ARGCHK(a && m && c, MP_BADARG);
-
- if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
- return MP_RANGE;
- if (mp_iseven(m))
- return MP_UNDEF;
-
- MP_DIGITS(&x) = 0;
-
- if (a == c) {
- if ((res = mp_init_copy(&x, a)) != MP_OKAY)
- return res;
- if (a == m)
- m = &x;
- a = &x;
- } else if (m == c) {
- if ((res = mp_init_copy(&x, m)) != MP_OKAY)
- return res;
- m = &x;
- } else {
- MP_DIGITS(&x) = 0;
- }
-
- MP_CHECKOK( s_mp_almost_inverse(a, m, c) );
- k = res;
- MP_CHECKOK( s_mp_fixup_reciprocal(c, m, k, c) );
-CLEANUP:
- mp_clear(&x);
- return res;
-}
-
-/* Known good algorithm for computing modular inverse. But slow. */
-mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c)
-{
- mp_int g, x;
- mp_err res;
-
- ARGCHK(a && m && c, MP_BADARG);
-
- if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
- return MP_RANGE;
-
- MP_DIGITS(&g) = 0;
- MP_DIGITS(&x) = 0;
- MP_CHECKOK( mp_init(&x, FLAG(a)) );
- MP_CHECKOK( mp_init(&g, FLAG(a)) );
-
- MP_CHECKOK( mp_xgcd(a, m, &g, &x, NULL) );
-
- if (mp_cmp_d(&g, 1) != MP_EQ) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
-
- res = mp_mod(&x, m, c);
- SIGN(c) = SIGN(a);
-
-CLEANUP:
- mp_clear(&x);
- mp_clear(&g);
-
- return res;
-}
-
-/* modular inverse where modulus is 2**k. */
-/* c = a**-1 mod 2**k */
-mp_err s_mp_invmod_2d(const mp_int *a, mp_size k, mp_int *c)
-{
- mp_err res;
- mp_size ix = k + 4;
- mp_int t0, t1, val, tmp, two2k;
-
- static const mp_digit d2 = 2;
- static const mp_int two = { 0, MP_ZPOS, 1, 1, (mp_digit *)&d2 };
-
- if (mp_iseven(a))
- return MP_UNDEF;
- if (k <= MP_DIGIT_BIT) {
- mp_digit i = s_mp_invmod_radix(MP_DIGIT(a,0));
- if (k < MP_DIGIT_BIT)
- i &= ((mp_digit)1 << k) - (mp_digit)1;
- mp_set(c, i);
- return MP_OKAY;
- }
- MP_DIGITS(&t0) = 0;
- MP_DIGITS(&t1) = 0;
- MP_DIGITS(&val) = 0;
- MP_DIGITS(&tmp) = 0;
- MP_DIGITS(&two2k) = 0;
- MP_CHECKOK( mp_init_copy(&val, a) );
- s_mp_mod_2d(&val, k);
- MP_CHECKOK( mp_init_copy(&t0, &val) );
- MP_CHECKOK( mp_init_copy(&t1, &t0) );
- MP_CHECKOK( mp_init(&tmp, FLAG(a)) );
- MP_CHECKOK( mp_init(&two2k, FLAG(a)) );
- MP_CHECKOK( s_mp_2expt(&two2k, k) );
- do {
- MP_CHECKOK( mp_mul(&val, &t1, &tmp) );
- MP_CHECKOK( mp_sub(&two, &tmp, &tmp) );
- MP_CHECKOK( mp_mul(&t1, &tmp, &t1) );
- s_mp_mod_2d(&t1, k);
- while (MP_SIGN(&t1) != MP_ZPOS) {
- MP_CHECKOK( mp_add(&t1, &two2k, &t1) );
- }
- if (mp_cmp(&t1, &t0) == MP_EQ)
- break;
- MP_CHECKOK( mp_copy(&t1, &t0) );
- } while (--ix > 0);
- if (!ix) {
- res = MP_UNDEF;
- } else {
- mp_exch(c, &t1);
- }
-
-CLEANUP:
- mp_clear(&t0);
- mp_clear(&t1);
- mp_clear(&val);
- mp_clear(&tmp);
- mp_clear(&two2k);
- return res;
-}
-
-mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c)
-{
- mp_err res;
- mp_size k;
- mp_int oddFactor, evenFactor; /* factors of the modulus */
- mp_int oddPart, evenPart; /* parts to combine via CRT. */
- mp_int C2, tmp1, tmp2;
-
- /*static const mp_digit d1 = 1; */
- /*static const mp_int one = { MP_ZPOS, 1, 1, (mp_digit *)&d1 }; */
-
- if ((res = s_mp_ispow2(m)) >= 0) {
- k = res;
- return s_mp_invmod_2d(a, k, c);
- }
- MP_DIGITS(&oddFactor) = 0;
- MP_DIGITS(&evenFactor) = 0;
- MP_DIGITS(&oddPart) = 0;
- MP_DIGITS(&evenPart) = 0;
- MP_DIGITS(&C2) = 0;
- MP_DIGITS(&tmp1) = 0;
- MP_DIGITS(&tmp2) = 0;
-
- MP_CHECKOK( mp_init_copy(&oddFactor, m) ); /* oddFactor = m */
- MP_CHECKOK( mp_init(&evenFactor, FLAG(m)) );
- MP_CHECKOK( mp_init(&oddPart, FLAG(m)) );
- MP_CHECKOK( mp_init(&evenPart, FLAG(m)) );
- MP_CHECKOK( mp_init(&C2, FLAG(m)) );
- MP_CHECKOK( mp_init(&tmp1, FLAG(m)) );
- MP_CHECKOK( mp_init(&tmp2, FLAG(m)) );
-
- k = mp_trailing_zeros(m);
- s_mp_div_2d(&oddFactor, k);
- MP_CHECKOK( s_mp_2expt(&evenFactor, k) );
-
- /* compute a**-1 mod oddFactor. */
- MP_CHECKOK( s_mp_invmod_odd_m(a, &oddFactor, &oddPart) );
- /* compute a**-1 mod evenFactor, where evenFactor == 2**k. */
- MP_CHECKOK( s_mp_invmod_2d( a, k, &evenPart) );
-
- /* Use Chinese Remainer theorem to compute a**-1 mod m. */
- /* let m1 = oddFactor, v1 = oddPart,
- * let m2 = evenFactor, v2 = evenPart.
- */
-
- /* Compute C2 = m1**-1 mod m2. */
- MP_CHECKOK( s_mp_invmod_2d(&oddFactor, k, &C2) );
-
- /* compute u = (v2 - v1)*C2 mod m2 */
- MP_CHECKOK( mp_sub(&evenPart, &oddPart, &tmp1) );
- MP_CHECKOK( mp_mul(&tmp1, &C2, &tmp2) );
- s_mp_mod_2d(&tmp2, k);
- while (MP_SIGN(&tmp2) != MP_ZPOS) {
- MP_CHECKOK( mp_add(&tmp2, &evenFactor, &tmp2) );
- }
-
- /* compute answer = v1 + u*m1 */
- MP_CHECKOK( mp_mul(&tmp2, &oddFactor, c) );
- MP_CHECKOK( mp_add(&oddPart, c, c) );
- /* not sure this is necessary, but it's low cost if not. */
- MP_CHECKOK( mp_mod(c, m, c) );
-
-CLEANUP:
- mp_clear(&oddFactor);
- mp_clear(&evenFactor);
- mp_clear(&oddPart);
- mp_clear(&evenPart);
- mp_clear(&C2);
- mp_clear(&tmp1);
- mp_clear(&tmp2);
- return res;
-}
-
-
-/* {{{ mp_invmod(a, m, c) */
-
-/*
- mp_invmod(a, m, c)
-
- Compute c = a^-1 (mod m), if there is an inverse for a (mod m).
- This is equivalent to the question of whether (a, m) = 1. If not,
- MP_UNDEF is returned, and there is no inverse.
- */
-
-mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c)
-{
-
- ARGCHK(a && m && c, MP_BADARG);
-
- if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
- return MP_RANGE;
-
- if (mp_isodd(m)) {
- return s_mp_invmod_odd_m(a, m, c);
- }
- if (mp_iseven(a))
- return MP_UNDEF; /* not invertable */
-
- return s_mp_invmod_even_m(a, m, c);
-
-} /* end mp_invmod() */
-
-/* }}} */
-#endif /* if MP_NUMTH */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ mp_print(mp, ofp) */
-
-#if MP_IOFUNC
-/*
- mp_print(mp, ofp)
-
- Print a textual representation of the given mp_int on the output
- stream 'ofp'. Output is generated using the internal radix.
- */
-
-void mp_print(mp_int *mp, FILE *ofp)
-{
- int ix;
-
- if(mp == NULL || ofp == NULL)
- return;
-
- fputc((SIGN(mp) == NEG) ? '-' : '+', ofp);
-
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- fprintf(ofp, DIGIT_FMT, DIGIT(mp, ix));
- }
-
-} /* end mp_print() */
-
-#endif /* if MP_IOFUNC */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/* {{{ More I/O Functions */
-
-/* {{{ mp_read_raw(mp, str, len) */
-
-/*
- mp_read_raw(mp, str, len)
-
- Read in a raw value (base 256) into the given mp_int
- */
-
-mp_err mp_read_raw(mp_int *mp, char *str, int len)
-{
- int ix;
- mp_err res;
- unsigned char *ustr = (unsigned char *)str;
-
- ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
-
- mp_zero(mp);
-
- /* Get sign from first byte */
- if(ustr[0])
- SIGN(mp) = NEG;
- else
- SIGN(mp) = ZPOS;
-
- /* Read the rest of the digits */
- for(ix = 1; ix < len; ix++) {
- if((res = mp_mul_d(mp, 256, mp)) != MP_OKAY)
- return res;
- if((res = mp_add_d(mp, ustr[ix], mp)) != MP_OKAY)
- return res;
- }
-
- return MP_OKAY;
-
-} /* end mp_read_raw() */
-
-/* }}} */
-
-/* {{{ mp_raw_size(mp) */
-
-int mp_raw_size(mp_int *mp)
-{
- ARGCHK(mp != NULL, 0);
-
- return (USED(mp) * sizeof(mp_digit)) + 1;
-
-} /* end mp_raw_size() */
-
-/* }}} */
-
-/* {{{ mp_toraw(mp, str) */
-
-mp_err mp_toraw(mp_int *mp, char *str)
-{
- int ix, jx, pos = 1;
-
- ARGCHK(mp != NULL && str != NULL, MP_BADARG);
-
- str[0] = (char)SIGN(mp);
-
- /* Iterate over each digit... */
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- mp_digit d = DIGIT(mp, ix);
-
- /* Unpack digit bytes, high order first */
- for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
- str[pos++] = (char)(d >> (jx * CHAR_BIT));
- }
- }
-
- return MP_OKAY;
-
-} /* end mp_toraw() */
-
-/* }}} */
-
-/* {{{ mp_read_radix(mp, str, radix) */
-
-/*
- mp_read_radix(mp, str, radix)
-
- Read an integer from the given string, and set mp to the resulting
- value. The input is presumed to be in base 10. Leading non-digit
- characters are ignored, and the function reads until a non-digit
- character or the end of the string.
- */
-
-mp_err mp_read_radix(mp_int *mp, const char *str, int radix)
-{
- int ix = 0, val = 0;
- mp_err res;
- mp_sign sig = ZPOS;
-
- ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX,
- MP_BADARG);
-
- mp_zero(mp);
-
- /* Skip leading non-digit characters until a digit or '-' or '+' */
- while(str[ix] &&
- (s_mp_tovalue(str[ix], radix) < 0) &&
- str[ix] != '-' &&
- str[ix] != '+') {
- ++ix;
- }
-
- if(str[ix] == '-') {
- sig = NEG;
- ++ix;
- } else if(str[ix] == '+') {
- sig = ZPOS; /* this is the default anyway... */
- ++ix;
- }
-
- while((val = s_mp_tovalue(str[ix], radix)) >= 0) {
- if((res = s_mp_mul_d(mp, radix)) != MP_OKAY)
- return res;
- if((res = s_mp_add_d(mp, val)) != MP_OKAY)
- return res;
- ++ix;
- }
-
- if(s_mp_cmp_d(mp, 0) == MP_EQ)
- SIGN(mp) = ZPOS;
- else
- SIGN(mp) = sig;
-
- return MP_OKAY;
-
-} /* end mp_read_radix() */
-
-mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix)
-{
- int radix = default_radix;
- int cx;
- mp_sign sig = ZPOS;
- mp_err res;
-
- /* Skip leading non-digit characters until a digit or '-' or '+' */
- while ((cx = *str) != 0 &&
- (s_mp_tovalue(cx, radix) < 0) &&
- cx != '-' &&
- cx != '+') {
- ++str;
- }
-
- if (cx == '-') {
- sig = NEG;
- ++str;
- } else if (cx == '+') {
- sig = ZPOS; /* this is the default anyway... */
- ++str;
- }
-
- if (str[0] == '0') {
- if ((str[1] | 0x20) == 'x') {
- radix = 16;
- str += 2;
- } else {
- radix = 8;
- str++;
- }
- }
- res = mp_read_radix(a, str, radix);
- if (res == MP_OKAY) {
- MP_SIGN(a) = (s_mp_cmp_d(a, 0) == MP_EQ) ? ZPOS : sig;
- }
- return res;
-}
-
-/* }}} */
-
-/* {{{ mp_radix_size(mp, radix) */
-
-int mp_radix_size(mp_int *mp, int radix)
-{
- int bits;
-
- if(!mp || radix < 2 || radix > MAX_RADIX)
- return 0;
-
- bits = USED(mp) * DIGIT_BIT - 1;
-
- return s_mp_outlen(bits, radix);
-
-} /* end mp_radix_size() */
-
-/* }}} */
-
-/* {{{ mp_toradix(mp, str, radix) */
-
-mp_err mp_toradix(mp_int *mp, char *str, int radix)
-{
- int ix, pos = 0;
-
- ARGCHK(mp != NULL && str != NULL, MP_BADARG);
- ARGCHK(radix > 1 && radix <= MAX_RADIX, MP_RANGE);
-
- if(mp_cmp_z(mp) == MP_EQ) {
- str[0] = '0';
- str[1] = '\0';
- } else {
- mp_err res;
- mp_int tmp;
- mp_sign sgn;
- mp_digit rem, rdx = (mp_digit)radix;
- char ch;
-
- if((res = mp_init_copy(&tmp, mp)) != MP_OKAY)
- return res;
-
- /* Save sign for later, and take absolute value */
- sgn = SIGN(&tmp); SIGN(&tmp) = ZPOS;
-
- /* Generate output digits in reverse order */
- while(mp_cmp_z(&tmp) != 0) {
- if((res = mp_div_d(&tmp, rdx, &tmp, &rem)) != MP_OKAY) {
- mp_clear(&tmp);
- return res;
- }
-
- /* Generate digits, use capital letters */
- ch = s_mp_todigit(rem, radix, 0);
-
- str[pos++] = ch;
- }
-
- /* Add - sign if original value was negative */
- if(sgn == NEG)
- str[pos++] = '-';
-
- /* Add trailing NUL to end the string */
- str[pos--] = '\0';
-
- /* Reverse the digits and sign indicator */
- ix = 0;
- while(ix < pos) {
- char tmp = str[ix];
-
- str[ix] = str[pos];
- str[pos] = tmp;
- ++ix;
- --pos;
- }
-
- mp_clear(&tmp);
- }
-
- return MP_OKAY;
-
-} /* end mp_toradix() */
-
-/* }}} */
-
-/* {{{ mp_tovalue(ch, r) */
-
-int mp_tovalue(char ch, int r)
-{
- return s_mp_tovalue(ch, r);
-
-} /* end mp_tovalue() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ mp_strerror(ec) */
-
-/*
- mp_strerror(ec)
-
- Return a string describing the meaning of error code 'ec'. The
- string returned is allocated in static memory, so the caller should
- not attempt to modify or free the memory associated with this
- string.
- */
-const char *mp_strerror(mp_err ec)
-{
- int aec = (ec < 0) ? -ec : ec;
-
- /* Code values are negative, so the senses of these comparisons
- are accurate */
- if(ec < MP_LAST_CODE || ec > MP_OKAY) {
- return mp_err_string[0]; /* unknown error code */
- } else {
- return mp_err_string[aec + 1];
- }
-
-} /* end mp_strerror() */
-
-/* }}} */
-
-/*========================================================================*/
-/*------------------------------------------------------------------------*/
-/* Static function definitions (internal use only) */
-
-/* {{{ Memory management */
-
-/* {{{ s_mp_grow(mp, min) */
-
-/* Make sure there are at least 'min' digits allocated to mp */
-mp_err s_mp_grow(mp_int *mp, mp_size min)
-{
- if(min > ALLOC(mp)) {
- mp_digit *tmp;
-
- /* Set min to next nearest default precision block size */
- min = MP_ROUNDUP(min, s_mp_defprec);
-
- if((tmp = s_mp_alloc(min, sizeof(mp_digit), FLAG(mp))) == NULL)
- return MP_MEM;
-
- s_mp_copy(DIGITS(mp), tmp, USED(mp));
-
-#if MP_CRYPTO
- s_mp_setz(DIGITS(mp), ALLOC(mp));
-#endif
- s_mp_free(DIGITS(mp), ALLOC(mp));
- DIGITS(mp) = tmp;
- ALLOC(mp) = min;
- }
-
- return MP_OKAY;
-
-} /* end s_mp_grow() */
-
-/* }}} */
-
-/* {{{ s_mp_pad(mp, min) */
-
-/* Make sure the used size of mp is at least 'min', growing if needed */
-mp_err s_mp_pad(mp_int *mp, mp_size min)
-{
- if(min > USED(mp)) {
- mp_err res;
-
- /* Make sure there is room to increase precision */
- if (min > ALLOC(mp)) {
- if ((res = s_mp_grow(mp, min)) != MP_OKAY)
- return res;
- } else {
- s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp));
- }
-
- /* Increase precision; should already be 0-filled */
- USED(mp) = min;
- }
-
- return MP_OKAY;
-
-} /* end s_mp_pad() */
-
-/* }}} */
-
-/* {{{ s_mp_setz(dp, count) */
-
-#if MP_MACRO == 0
-/* Set 'count' digits pointed to by dp to be zeroes */
-void s_mp_setz(mp_digit *dp, mp_size count)
-{
-#if MP_MEMSET == 0
- int ix;
-
- for(ix = 0; ix < count; ix++)
- dp[ix] = 0;
-#else
- memset(dp, 0, count * sizeof(mp_digit));
-#endif
-
-} /* end s_mp_setz() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_copy(sp, dp, count) */
-
-#if MP_MACRO == 0
-/* Copy 'count' digits from sp to dp */
-void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count)
-{
-#if MP_MEMCPY == 0
- int ix;
-
- for(ix = 0; ix < count; ix++)
- dp[ix] = sp[ix];
-#else
- memcpy(dp, sp, count * sizeof(mp_digit));
-#endif
-
-} /* end s_mp_copy() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_alloc(nb, ni, kmflag) */
-
-#if MP_MACRO == 0
-/* Allocate ni records of nb bytes each, and return a pointer to that */
-void *s_mp_alloc(size_t nb, size_t ni, int kmflag)
-{
- mp_int *mp;
- ++mp_allocs;
-#ifdef _KERNEL
- mp = kmem_zalloc(nb * ni, kmflag);
- if (mp != NULL)
- FLAG(mp) = kmflag;
- return (mp);
-#else
- return calloc(nb, ni);
-#endif
-
-} /* end s_mp_alloc() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_free(ptr) */
-
-#if MP_MACRO == 0
-/* Free the memory pointed to by ptr */
-void s_mp_free(void *ptr, mp_size alloc)
-{
- if(ptr) {
- ++mp_frees;
-#ifdef _KERNEL
- kmem_free(ptr, alloc * sizeof (mp_digit));
-#else
- free(ptr);
-#endif
- }
-} /* end s_mp_free() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_clamp(mp) */
-
-#if MP_MACRO == 0
-/* Remove leading zeroes from the given value */
-void s_mp_clamp(mp_int *mp)
-{
- mp_size used = MP_USED(mp);
- while (used > 1 && DIGIT(mp, used - 1) == 0)
- --used;
- MP_USED(mp) = used;
-} /* end s_mp_clamp() */
-#endif
-
-/* }}} */
-
-/* {{{ s_mp_exch(a, b) */
-
-/* Exchange the data for a and b; (b, a) = (a, b) */
-void s_mp_exch(mp_int *a, mp_int *b)
-{
- mp_int tmp;
-
- tmp = *a;
- *a = *b;
- *b = tmp;
-
-} /* end s_mp_exch() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Arithmetic helpers */
-
-/* {{{ s_mp_lshd(mp, p) */
-
-/*
- Shift mp leftward by p digits, growing if needed, and zero-filling
- the in-shifted digits at the right end. This is a convenient
- alternative to multiplication by powers of the radix
- The value of USED(mp) must already have been set to the value for
- the shifted result.
- */
-
-mp_err s_mp_lshd(mp_int *mp, mp_size p)
-{
- mp_err res;
- mp_size pos;
- int ix;
-
- if(p == 0)
- return MP_OKAY;
-
- if (MP_USED(mp) == 1 && MP_DIGIT(mp, 0) == 0)
- return MP_OKAY;
-
- if((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY)
- return res;
-
- pos = USED(mp) - 1;
-
- /* Shift all the significant figures over as needed */
- for(ix = pos - p; ix >= 0; ix--)
- DIGIT(mp, ix + p) = DIGIT(mp, ix);
-
- /* Fill the bottom digits with zeroes */
- for(ix = 0; ix < p; ix++)
- DIGIT(mp, ix) = 0;
-
- return MP_OKAY;
-
-} /* end s_mp_lshd() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_2d(mp, d) */
-
-/*
- Multiply the integer by 2^d, where d is a number of bits. This
- amounts to a bitwise shift of the value.
- */
-mp_err s_mp_mul_2d(mp_int *mp, mp_digit d)
-{
- mp_err res;
- mp_digit dshift, bshift;
- mp_digit mask;
-
- ARGCHK(mp != NULL, MP_BADARG);
-
- dshift = d / MP_DIGIT_BIT;
- bshift = d % MP_DIGIT_BIT;
- /* bits to be shifted out of the top word */
- mask = ((mp_digit)~0 << (MP_DIGIT_BIT - bshift));
- mask &= MP_DIGIT(mp, MP_USED(mp) - 1);
-
- if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (mask != 0) )))
- return res;
-
- if (dshift && MP_OKAY != (res = s_mp_lshd(mp, dshift)))
- return res;
-
- if (bshift) {
- mp_digit *pa = MP_DIGITS(mp);
- mp_digit *alim = pa + MP_USED(mp);
- mp_digit prev = 0;
-
- for (pa += dshift; pa < alim; ) {
- mp_digit x = *pa;
- *pa++ = (x << bshift) | prev;
- prev = x >> (DIGIT_BIT - bshift);
- }
- }
-
- s_mp_clamp(mp);
- return MP_OKAY;
-} /* end s_mp_mul_2d() */
-
-/* {{{ s_mp_rshd(mp, p) */
-
-/*
- Shift mp rightward by p digits. Maintains the invariant that
- digits above the precision are all zero. Digits shifted off the
- end are lost. Cannot fail.
- */
-
-void s_mp_rshd(mp_int *mp, mp_size p)
-{
- mp_size ix;
- mp_digit *src, *dst;
-
- if(p == 0)
- return;
-
- /* Shortcut when all digits are to be shifted off */
- if(p >= USED(mp)) {
- s_mp_setz(DIGITS(mp), ALLOC(mp));
- USED(mp) = 1;
- SIGN(mp) = ZPOS;
- return;
- }
-
- /* Shift all the significant figures over as needed */
- dst = MP_DIGITS(mp);
- src = dst + p;
- for (ix = USED(mp) - p; ix > 0; ix--)
- *dst++ = *src++;
-
- MP_USED(mp) -= p;
- /* Fill the top digits with zeroes */
- while (p-- > 0)
- *dst++ = 0;
-
-#if 0
- /* Strip off any leading zeroes */
- s_mp_clamp(mp);
-#endif
-
-} /* end s_mp_rshd() */
-
-/* }}} */
-
-/* {{{ s_mp_div_2(mp) */
-
-/* Divide by two -- take advantage of radix properties to do it fast */
-void s_mp_div_2(mp_int *mp)
-{
- s_mp_div_2d(mp, 1);
-
-} /* end s_mp_div_2() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_2(mp) */
-
-mp_err s_mp_mul_2(mp_int *mp)
-{
- mp_digit *pd;
- int ix, used;
- mp_digit kin = 0;
-
- /* Shift digits leftward by 1 bit */
- used = MP_USED(mp);
- pd = MP_DIGITS(mp);
- for (ix = 0; ix < used; ix++) {
- mp_digit d = *pd;
- *pd++ = (d << 1) | kin;
- kin = (d >> (DIGIT_BIT - 1));
- }
-
- /* Deal with rollover from last digit */
- if (kin) {
- if (ix >= ALLOC(mp)) {
- mp_err res;
- if((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY)
- return res;
- }
-
- DIGIT(mp, ix) = kin;
- USED(mp) += 1;
- }
-
- return MP_OKAY;
-
-} /* end s_mp_mul_2() */
-
-/* }}} */
-
-/* {{{ s_mp_mod_2d(mp, d) */
-
-/*
- Remainder the integer by 2^d, where d is a number of bits. This
- amounts to a bitwise AND of the value, and does not require the full
- division code
- */
-void s_mp_mod_2d(mp_int *mp, mp_digit d)
-{
- mp_size ndig = (d / DIGIT_BIT), nbit = (d % DIGIT_BIT);
- mp_size ix;
- mp_digit dmask;
-
- if(ndig >= USED(mp))
- return;
-
- /* Flush all the bits above 2^d in its digit */
- dmask = ((mp_digit)1 << nbit) - 1;
- DIGIT(mp, ndig) &= dmask;
-
- /* Flush all digits above the one with 2^d in it */
- for(ix = ndig + 1; ix < USED(mp); ix++)
- DIGIT(mp, ix) = 0;
-
- s_mp_clamp(mp);
-
-} /* end s_mp_mod_2d() */
-
-/* }}} */
-
-/* {{{ s_mp_div_2d(mp, d) */
-
-/*
- Divide the integer by 2^d, where d is a number of bits. This
- amounts to a bitwise shift of the value, and does not require the
- full division code (used in Barrett reduction, see below)
- */
-void s_mp_div_2d(mp_int *mp, mp_digit d)
-{
- int ix;
- mp_digit save, next, mask;
-
- s_mp_rshd(mp, d / DIGIT_BIT);
- d %= DIGIT_BIT;
- if (d) {
- mask = ((mp_digit)1 << d) - 1;
- save = 0;
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- next = DIGIT(mp, ix) & mask;
- DIGIT(mp, ix) = (DIGIT(mp, ix) >> d) | (save << (DIGIT_BIT - d));
- save = next;
- }
- }
- s_mp_clamp(mp);
-
-} /* end s_mp_div_2d() */
-
-/* }}} */
-
-/* {{{ s_mp_norm(a, b, *d) */
-
-/*
- s_mp_norm(a, b, *d)
-
- Normalize a and b for division, where b is the divisor. In order
- that we might make good guesses for quotient digits, we want the
- leading digit of b to be at least half the radix, which we
- accomplish by multiplying a and b by a power of 2. The exponent
- (shift count) is placed in *pd, so that the remainder can be shifted
- back at the end of the division process.
- */
-
-mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd)
-{
- mp_digit d;
- mp_digit mask;
- mp_digit b_msd;
- mp_err res = MP_OKAY;
-
- d = 0;
- mask = DIGIT_MAX & ~(DIGIT_MAX >> 1); /* mask is msb of digit */
- b_msd = DIGIT(b, USED(b) - 1);
- while (!(b_msd & mask)) {
- b_msd <<= 1;
- ++d;
- }
-
- if (d) {
- MP_CHECKOK( s_mp_mul_2d(a, d) );
- MP_CHECKOK( s_mp_mul_2d(b, d) );
- }
-
- *pd = d;
-CLEANUP:
- return res;
-
-} /* end s_mp_norm() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive digit arithmetic */
-
-/* {{{ s_mp_add_d(mp, d) */
-
-/* Add d to |mp| in place */
-mp_err s_mp_add_d(mp_int *mp, mp_digit d) /* unsigned digit addition */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- mp_word w, k = 0;
- mp_size ix = 1;
-
- w = (mp_word)DIGIT(mp, 0) + d;
- DIGIT(mp, 0) = ACCUM(w);
- k = CARRYOUT(w);
-
- while(ix < USED(mp) && k) {
- w = (mp_word)DIGIT(mp, ix) + k;
- DIGIT(mp, ix) = ACCUM(w);
- k = CARRYOUT(w);
- ++ix;
- }
-
- if(k != 0) {
- mp_err res;
-
- if((res = s_mp_pad(mp, USED(mp) + 1)) != MP_OKAY)
- return res;
-
- DIGIT(mp, ix) = (mp_digit)k;
- }
-
- return MP_OKAY;
-#else
- mp_digit * pmp = MP_DIGITS(mp);
- mp_digit sum, mp_i, carry = 0;
- mp_err res = MP_OKAY;
- int used = (int)MP_USED(mp);
-
- mp_i = *pmp;
- *pmp++ = sum = d + mp_i;
- carry = (sum < d);
- while (carry && --used > 0) {
- mp_i = *pmp;
- *pmp++ = sum = carry + mp_i;
- carry = !sum;
- }
- if (carry && !used) {
- /* mp is growing */
- used = MP_USED(mp);
- MP_CHECKOK( s_mp_pad(mp, used + 1) );
- MP_DIGIT(mp, used) = carry;
- }
-CLEANUP:
- return res;
-#endif
-} /* end s_mp_add_d() */
-
-/* }}} */
-
-/* {{{ s_mp_sub_d(mp, d) */
-
-/* Subtract d from |mp| in place, assumes |mp| > d */
-mp_err s_mp_sub_d(mp_int *mp, mp_digit d) /* unsigned digit subtract */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- mp_word w, b = 0;
- mp_size ix = 1;
-
- /* Compute initial subtraction */
- w = (RADIX + (mp_word)DIGIT(mp, 0)) - d;
- b = CARRYOUT(w) ? 0 : 1;
- DIGIT(mp, 0) = ACCUM(w);
-
- /* Propagate borrows leftward */
- while(b && ix < USED(mp)) {
- w = (RADIX + (mp_word)DIGIT(mp, ix)) - b;
- b = CARRYOUT(w) ? 0 : 1;
- DIGIT(mp, ix) = ACCUM(w);
- ++ix;
- }
-
- /* Remove leading zeroes */
- s_mp_clamp(mp);
-
- /* If we have a borrow out, it's a violation of the input invariant */
- if(b)
- return MP_RANGE;
- else
- return MP_OKAY;
-#else
- mp_digit *pmp = MP_DIGITS(mp);
- mp_digit mp_i, diff, borrow;
- mp_size used = MP_USED(mp);
-
- mp_i = *pmp;
- *pmp++ = diff = mp_i - d;
- borrow = (diff > mp_i);
- while (borrow && --used) {
- mp_i = *pmp;
- *pmp++ = diff = mp_i - borrow;
- borrow = (diff > mp_i);
- }
- s_mp_clamp(mp);
- return (borrow && !used) ? MP_RANGE : MP_OKAY;
-#endif
-} /* end s_mp_sub_d() */
-
-/* }}} */
-
-/* {{{ s_mp_mul_d(a, d) */
-
-/* Compute a = a * d, single digit multiplication */
-mp_err s_mp_mul_d(mp_int *a, mp_digit d)
-{
- mp_err res;
- mp_size used;
- int pow;
-
- if (!d) {
- mp_zero(a);
- return MP_OKAY;
- }
- if (d == 1)
- return MP_OKAY;
- if (0 <= (pow = s_mp_ispow2d(d))) {
- return s_mp_mul_2d(a, (mp_digit)pow);
- }
-
- used = MP_USED(a);
- MP_CHECKOK( s_mp_pad(a, used + 1) );
-
- s_mpv_mul_d(MP_DIGITS(a), used, d, MP_DIGITS(a));
-
- s_mp_clamp(a);
-
-CLEANUP:
- return res;
-
-} /* end s_mp_mul_d() */
-
-/* }}} */
-
-/* {{{ s_mp_div_d(mp, d, r) */
-
-/*
- s_mp_div_d(mp, d, r)
-
- Compute the quotient mp = mp / d and remainder r = mp mod d, for a
- single digit d. If r is null, the remainder will be discarded.
- */
-
-mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
- mp_word w = 0, q;
-#else
- mp_digit w, q;
-#endif
- int ix;
- mp_err res;
- mp_int quot;
- mp_int rem;
-
- if(d == 0)
- return MP_RANGE;
- if (d == 1) {
- if (r)
- *r = 0;
- return MP_OKAY;
- }
- /* could check for power of 2 here, but mp_div_d does that. */
- if (MP_USED(mp) == 1) {
- mp_digit n = MP_DIGIT(mp,0);
- mp_digit rem;
-
- q = n / d;
- rem = n % d;
- MP_DIGIT(mp,0) = q;
- if (r)
- *r = rem;
- return MP_OKAY;
- }
-
- MP_DIGITS(&rem) = 0;
- MP_DIGITS(") = 0;
- /* Make room for the quotient */
- MP_CHECKOK( mp_init_size(", USED(mp), FLAG(mp)) );
-
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- w = (w << DIGIT_BIT) | DIGIT(mp, ix);
-
- if(w >= d) {
- q = w / d;
- w = w % d;
- } else {
- q = 0;
- }
-
- s_mp_lshd(", 1);
- DIGIT(", 0) = (mp_digit)q;
- }
-#else
- {
- mp_digit p;
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
- mp_digit norm;
-#endif
-
- MP_CHECKOK( mp_init_copy(&rem, mp) );
-
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
- MP_DIGIT(", 0) = d;
- MP_CHECKOK( s_mp_norm(&rem, ", &norm) );
- if (norm)
- d <<= norm;
- MP_DIGIT(", 0) = 0;
-#endif
-
- p = 0;
- for (ix = USED(&rem) - 1; ix >= 0; ix--) {
- w = DIGIT(&rem, ix);
-
- if (p) {
- MP_CHECKOK( s_mpv_div_2dx1d(p, w, d, &q, &w) );
- } else if (w >= d) {
- q = w / d;
- w = w % d;
- } else {
- q = 0;
- }
-
- MP_CHECKOK( s_mp_lshd(", 1) );
- DIGIT(", 0) = q;
- p = w;
- }
-#if !defined(MP_ASSEMBLY_DIV_2DX1D)
- if (norm)
- w >>= norm;
-#endif
- }
-#endif
-
- /* Deliver the remainder, if desired */
- if(r)
- *r = (mp_digit)w;
-
- s_mp_clamp(");
- mp_exch(", mp);
-CLEANUP:
- mp_clear(");
- mp_clear(&rem);
-
- return res;
-} /* end s_mp_div_d() */
-
-/* }}} */
-
-
-/* }}} */
-
-/* {{{ Primitive full arithmetic */
-
-/* {{{ s_mp_add(a, b) */
-
-/* Compute a = |a| + |b| */
-mp_err s_mp_add(mp_int *a, const mp_int *b) /* magnitude addition */
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- mp_word w = 0;
-#else
- mp_digit d, sum, carry = 0;
-#endif
- mp_digit *pa, *pb;
- mp_size ix;
- mp_size used;
- mp_err res;
-
- /* Make sure a has enough precision for the output value */
- if((USED(b) > USED(a)) && (res = s_mp_pad(a, USED(b))) != MP_OKAY)
- return res;
-
- /*
- Add up all digits up to the precision of b. If b had initially
- the same precision as a, or greater, we took care of it by the
- padding step above, so there is no problem. If b had initially
- less precision, we'll have to make sure the carry out is duly
- propagated upward among the higher-order digits of the sum.
- */
- pa = MP_DIGITS(a);
- pb = MP_DIGITS(b);
- used = MP_USED(b);
- for(ix = 0; ix < used; ix++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- w = w + *pa + *pb++;
- *pa++ = ACCUM(w);
- w = CARRYOUT(w);
-#else
- d = *pa;
- sum = d + *pb++;
- d = (sum < d); /* detect overflow */
- *pa++ = sum += carry;
- carry = d + (sum < carry); /* detect overflow */
-#endif
- }
-
- /* If we run out of 'b' digits before we're actually done, make
- sure the carries get propagated upward...
- */
- used = MP_USED(a);
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- while (w && ix < used) {
- w = w + *pa;
- *pa++ = ACCUM(w);
- w = CARRYOUT(w);
- ++ix;
- }
-#else
- while (carry && ix < used) {
- sum = carry + *pa;
- *pa++ = sum;
- carry = !sum;
- ++ix;
- }
-#endif
-
- /* If there's an overall carry out, increase precision and include
- it. We could have done this initially, but why touch the memory
- allocator unless we're sure we have to?
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- if (w) {
- if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
- return res;
-
- DIGIT(a, ix) = (mp_digit)w;
- }
-#else
- if (carry) {
- if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
- return res;
-
- DIGIT(a, used) = carry;
- }
-#endif
-
- return MP_OKAY;
-} /* end s_mp_add() */
-
-/* }}} */
-
-/* Compute c = |a| + |b| */ /* magnitude addition */
-mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_digit *pa, *pb, *pc;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- mp_word w = 0;
-#else
- mp_digit sum, carry = 0, d;
-#endif
- mp_size ix;
- mp_size used;
- mp_err res;
-
- MP_SIGN(c) = MP_SIGN(a);
- if (MP_USED(a) < MP_USED(b)) {
- const mp_int *xch = a;
- a = b;
- b = xch;
- }
-
- /* Make sure a has enough precision for the output value */
- if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
- return res;
-
- /*
- Add up all digits up to the precision of b. If b had initially
- the same precision as a, or greater, we took care of it by the
- exchange step above, so there is no problem. If b had initially
- less precision, we'll have to make sure the carry out is duly
- propagated upward among the higher-order digits of the sum.
- */
- pa = MP_DIGITS(a);
- pb = MP_DIGITS(b);
- pc = MP_DIGITS(c);
- used = MP_USED(b);
- for (ix = 0; ix < used; ix++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- w = w + *pa++ + *pb++;
- *pc++ = ACCUM(w);
- w = CARRYOUT(w);
-#else
- d = *pa++;
- sum = d + *pb++;
- d = (sum < d); /* detect overflow */
- *pc++ = sum += carry;
- carry = d + (sum < carry); /* detect overflow */
-#endif
- }
-
- /* If we run out of 'b' digits before we're actually done, make
- sure the carries get propagated upward...
- */
- for (used = MP_USED(a); ix < used; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- w = w + *pa++;
- *pc++ = ACCUM(w);
- w = CARRYOUT(w);
-#else
- *pc++ = sum = carry + *pa++;
- carry = (sum < carry);
-#endif
- }
-
- /* If there's an overall carry out, increase precision and include
- it. We could have done this initially, but why touch the memory
- allocator unless we're sure we have to?
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- if (w) {
- if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
- return res;
-
- DIGIT(c, used) = (mp_digit)w;
- ++used;
- }
-#else
- if (carry) {
- if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
- return res;
-
- DIGIT(c, used) = carry;
- ++used;
- }
-#endif
- MP_USED(c) = used;
- return MP_OKAY;
-}
-/* {{{ s_mp_add_offset(a, b, offset) */
-
-/* Compute a = |a| + ( |b| * (RADIX ** offset) ) */
-mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- mp_word w, k = 0;
-#else
- mp_digit d, sum, carry = 0;
-#endif
- mp_size ib;
- mp_size ia;
- mp_size lim;
- mp_err res;
-
- /* Make sure a has enough precision for the output value */
- lim = MP_USED(b) + offset;
- if((lim > USED(a)) && (res = s_mp_pad(a, lim)) != MP_OKAY)
- return res;
-
- /*
- Add up all digits up to the precision of b. If b had initially
- the same precision as a, or greater, we took care of it by the
- padding step above, so there is no problem. If b had initially
- less precision, we'll have to make sure the carry out is duly
- propagated upward among the higher-order digits of the sum.
- */
- lim = USED(b);
- for(ib = 0, ia = offset; ib < lim; ib++, ia++) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- w = (mp_word)DIGIT(a, ia) + DIGIT(b, ib) + k;
- DIGIT(a, ia) = ACCUM(w);
- k = CARRYOUT(w);
-#else
- d = MP_DIGIT(a, ia);
- sum = d + MP_DIGIT(b, ib);
- d = (sum < d);
- MP_DIGIT(a,ia) = sum += carry;
- carry = d + (sum < carry);
-#endif
- }
-
- /* If we run out of 'b' digits before we're actually done, make
- sure the carries get propagated upward...
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- for (lim = MP_USED(a); k && (ia < lim); ++ia) {
- w = (mp_word)DIGIT(a, ia) + k;
- DIGIT(a, ia) = ACCUM(w);
- k = CARRYOUT(w);
- }
-#else
- for (lim = MP_USED(a); carry && (ia < lim); ++ia) {
- d = MP_DIGIT(a, ia);
- MP_DIGIT(a,ia) = sum = d + carry;
- carry = (sum < d);
- }
-#endif
-
- /* If there's an overall carry out, increase precision and include
- it. We could have done this initially, but why touch the memory
- allocator unless we're sure we have to?
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
- if(k) {
- if((res = s_mp_pad(a, USED(a) + 1)) != MP_OKAY)
- return res;
-
- DIGIT(a, ia) = (mp_digit)k;
- }
-#else
- if (carry) {
- if((res = s_mp_pad(a, lim + 1)) != MP_OKAY)
- return res;
-
- DIGIT(a, lim) = carry;
- }
-#endif
- s_mp_clamp(a);
-
- return MP_OKAY;
-
-} /* end s_mp_add_offset() */
-
-/* }}} */
-
-/* {{{ s_mp_sub(a, b) */
-
-/* Compute a = |a| - |b|, assumes |a| >= |b| */
-mp_err s_mp_sub(mp_int *a, const mp_int *b) /* magnitude subtract */
-{
- mp_digit *pa, *pb, *limit;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- mp_sword w = 0;
-#else
- mp_digit d, diff, borrow = 0;
-#endif
-
- /*
- Subtract and propagate borrow. Up to the precision of b, this
- accounts for the digits of b; after that, we just make sure the
- carries get to the right place. This saves having to pad b out to
- the precision of a just to make the loops work right...
- */
- pa = MP_DIGITS(a);
- pb = MP_DIGITS(b);
- limit = pb + MP_USED(b);
- while (pb < limit) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- w = w + *pa - *pb++;
- *pa++ = ACCUM(w);
- w >>= MP_DIGIT_BIT;
-#else
- d = *pa;
- diff = d - *pb++;
- d = (diff > d); /* detect borrow */
- if (borrow && --diff == MP_DIGIT_MAX)
- ++d;
- *pa++ = diff;
- borrow = d;
-#endif
- }
- limit = MP_DIGITS(a) + MP_USED(a);
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- while (w && pa < limit) {
- w = w + *pa;
- *pa++ = ACCUM(w);
- w >>= MP_DIGIT_BIT;
- }
-#else
- while (borrow && pa < limit) {
- d = *pa;
- *pa++ = diff = d - borrow;
- borrow = (diff > d);
- }
-#endif
-
- /* Clobber any leading zeroes we created */
- s_mp_clamp(a);
-
- /*
- If there was a borrow out, then |b| > |a| in violation
- of our input invariant. We've already done the work,
- but we'll at least complain about it...
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- return w ? MP_RANGE : MP_OKAY;
-#else
- return borrow ? MP_RANGE : MP_OKAY;
-#endif
-} /* end s_mp_sub() */
-
-/* }}} */
-
-/* Compute c = |a| - |b|, assumes |a| >= |b| */ /* magnitude subtract */
-mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c)
-{
- mp_digit *pa, *pb, *pc;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- mp_sword w = 0;
-#else
- mp_digit d, diff, borrow = 0;
-#endif
- int ix, limit;
- mp_err res;
-
- MP_SIGN(c) = MP_SIGN(a);
-
- /* Make sure a has enough precision for the output value */
- if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
- return res;
-
- /*
- Subtract and propagate borrow. Up to the precision of b, this
- accounts for the digits of b; after that, we just make sure the
- carries get to the right place. This saves having to pad b out to
- the precision of a just to make the loops work right...
- */
- pa = MP_DIGITS(a);
- pb = MP_DIGITS(b);
- pc = MP_DIGITS(c);
- limit = MP_USED(b);
- for (ix = 0; ix < limit; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- w = w + *pa++ - *pb++;
- *pc++ = ACCUM(w);
- w >>= MP_DIGIT_BIT;
-#else
- d = *pa++;
- diff = d - *pb++;
- d = (diff > d);
- if (borrow && --diff == MP_DIGIT_MAX)
- ++d;
- *pc++ = diff;
- borrow = d;
-#endif
- }
- for (limit = MP_USED(a); ix < limit; ++ix) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- w = w + *pa++;
- *pc++ = ACCUM(w);
- w >>= MP_DIGIT_BIT;
-#else
- d = *pa++;
- *pc++ = diff = d - borrow;
- borrow = (diff > d);
-#endif
- }
-
- /* Clobber any leading zeroes we created */
- MP_USED(c) = ix;
- s_mp_clamp(c);
-
- /*
- If there was a borrow out, then |b| > |a| in violation
- of our input invariant. We've already done the work,
- but we'll at least complain about it...
- */
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
- return w ? MP_RANGE : MP_OKAY;
-#else
- return borrow ? MP_RANGE : MP_OKAY;
-#endif
-}
-/* {{{ s_mp_mul(a, b) */
-
-/* Compute a = |a| * |b| */
-mp_err s_mp_mul(mp_int *a, const mp_int *b)
-{
- return mp_mul(a, b, a);
-} /* end s_mp_mul() */
-
-/* }}} */
-
-#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY)
-/* This trick works on Sparc V8 CPUs with the Workshop compilers. */
-#define MP_MUL_DxD(a, b, Phi, Plo) \
- { unsigned long long product = (unsigned long long)a * b; \
- Plo = (mp_digit)product; \
- Phi = (mp_digit)(product >> MP_DIGIT_BIT); }
-#elif defined(OSF1)
-#define MP_MUL_DxD(a, b, Phi, Plo) \
- { Plo = asm ("mulq %a0, %a1, %v0", a, b);\
- Phi = asm ("umulh %a0, %a1, %v0", a, b); }
-#else
-#define MP_MUL_DxD(a, b, Phi, Plo) \
- { mp_digit a0b1, a1b0; \
- Plo = (a & MP_HALF_DIGIT_MAX) * (b & MP_HALF_DIGIT_MAX); \
- Phi = (a >> MP_HALF_DIGIT_BIT) * (b >> MP_HALF_DIGIT_BIT); \
- a0b1 = (a & MP_HALF_DIGIT_MAX) * (b >> MP_HALF_DIGIT_BIT); \
- a1b0 = (a >> MP_HALF_DIGIT_BIT) * (b & MP_HALF_DIGIT_MAX); \
- a1b0 += a0b1; \
- Phi += a1b0 >> MP_HALF_DIGIT_BIT; \
- if (a1b0 < a0b1) \
- Phi += MP_HALF_RADIX; \
- a1b0 <<= MP_HALF_DIGIT_BIT; \
- Plo += a1b0; \
- if (Plo < a1b0) \
- ++Phi; \
- }
-#endif
-
-#if !defined(MP_ASSEMBLY_MULTIPLY)
-/* c = a * b */
-void s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
- mp_digit d = 0;
-
- /* Inner product: Digits of a */
- while (a_len--) {
- mp_word w = ((mp_word)b * *a++) + d;
- *c++ = ACCUM(w);
- d = CARRYOUT(w);
- }
- *c = d;
-#else
- mp_digit carry = 0;
- while (a_len--) {
- mp_digit a_i = *a++;
- mp_digit a0b0, a1b1;
-
- MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
- a0b0 += carry;
- if (a0b0 < carry)
- ++a1b1;
- *c++ = a0b0;
- carry = a1b1;
- }
- *c = carry;
-#endif
-}
-
-/* c += a * b */
-void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b,
- mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
- mp_digit d = 0;
-
- /* Inner product: Digits of a */
- while (a_len--) {
- mp_word w = ((mp_word)b * *a++) + *c + d;
- *c++ = ACCUM(w);
- d = CARRYOUT(w);
- }
- *c = d;
-#else
- mp_digit carry = 0;
- while (a_len--) {
- mp_digit a_i = *a++;
- mp_digit a0b0, a1b1;
-
- MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
- a0b0 += carry;
- if (a0b0 < carry)
- ++a1b1;
- a0b0 += a_i = *c;
- if (a0b0 < a_i)
- ++a1b1;
- *c++ = a0b0;
- carry = a1b1;
- }
- *c = carry;
-#endif
-}
-
-/* Presently, this is only used by the Montgomery arithmetic code. */
-/* c += a * b */
-void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
- mp_digit d = 0;
-
- /* Inner product: Digits of a */
- while (a_len--) {
- mp_word w = ((mp_word)b * *a++) + *c + d;
- *c++ = ACCUM(w);
- d = CARRYOUT(w);
- }
-
- while (d) {
- mp_word w = (mp_word)*c + d;
- *c++ = ACCUM(w);
- d = CARRYOUT(w);
- }
-#else
- mp_digit carry = 0;
- while (a_len--) {
- mp_digit a_i = *a++;
- mp_digit a0b0, a1b1;
-
- MP_MUL_DxD(a_i, b, a1b1, a0b0);
-
- a0b0 += carry;
- if (a0b0 < carry)
- ++a1b1;
-
- a0b0 += a_i = *c;
- if (a0b0 < a_i)
- ++a1b1;
-
- *c++ = a0b0;
- carry = a1b1;
- }
- while (carry) {
- mp_digit c_i = *c;
- carry += c_i;
- *c++ = carry;
- carry = carry < c_i;
- }
-#endif
-}
-#endif
-
-#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY)
-/* This trick works on Sparc V8 CPUs with the Workshop compilers. */
-#define MP_SQR_D(a, Phi, Plo) \
- { unsigned long long square = (unsigned long long)a * a; \
- Plo = (mp_digit)square; \
- Phi = (mp_digit)(square >> MP_DIGIT_BIT); }
-#elif defined(OSF1)
-#define MP_SQR_D(a, Phi, Plo) \
- { Plo = asm ("mulq %a0, %a0, %v0", a);\
- Phi = asm ("umulh %a0, %a0, %v0", a); }
-#else
-#define MP_SQR_D(a, Phi, Plo) \
- { mp_digit Pmid; \
- Plo = (a & MP_HALF_DIGIT_MAX) * (a & MP_HALF_DIGIT_MAX); \
- Phi = (a >> MP_HALF_DIGIT_BIT) * (a >> MP_HALF_DIGIT_BIT); \
- Pmid = (a & MP_HALF_DIGIT_MAX) * (a >> MP_HALF_DIGIT_BIT); \
- Phi += Pmid >> (MP_HALF_DIGIT_BIT - 1); \
- Pmid <<= (MP_HALF_DIGIT_BIT + 1); \
- Plo += Pmid; \
- if (Plo < Pmid) \
- ++Phi; \
- }
-#endif
-
-#if !defined(MP_ASSEMBLY_SQUARE)
-/* Add the squares of the digits of a to the digits of b. */
-void s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps)
-{
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
- mp_word w;
- mp_digit d;
- mp_size ix;
-
- w = 0;
-#define ADD_SQUARE(n) \
- d = pa[n]; \
- w += (d * (mp_word)d) + ps[2*n]; \
- ps[2*n] = ACCUM(w); \
- w = (w >> DIGIT_BIT) + ps[2*n+1]; \
- ps[2*n+1] = ACCUM(w); \
- w = (w >> DIGIT_BIT)
-
- for (ix = a_len; ix >= 4; ix -= 4) {
- ADD_SQUARE(0);
- ADD_SQUARE(1);
- ADD_SQUARE(2);
- ADD_SQUARE(3);
- pa += 4;
- ps += 8;
- }
- if (ix) {
- ps += 2*ix;
- pa += ix;
- switch (ix) {
- case 3: ADD_SQUARE(-3); /* FALLTHRU */
- case 2: ADD_SQUARE(-2); /* FALLTHRU */
- case 1: ADD_SQUARE(-1); /* FALLTHRU */
- case 0: break;
- }
- }
- while (w) {
- w += *ps;
- *ps++ = ACCUM(w);
- w = (w >> DIGIT_BIT);
- }
-#else
- mp_digit carry = 0;
- while (a_len--) {
- mp_digit a_i = *pa++;
- mp_digit a0a0, a1a1;
-
- MP_SQR_D(a_i, a1a1, a0a0);
-
- /* here a1a1 and a0a0 constitute a_i ** 2 */
- a0a0 += carry;
- if (a0a0 < carry)
- ++a1a1;
-
- /* now add to ps */
- a0a0 += a_i = *ps;
- if (a0a0 < a_i)
- ++a1a1;
- *ps++ = a0a0;
- a1a1 += a_i = *ps;
- carry = (a1a1 < a_i);
- *ps++ = a1a1;
- }
- while (carry) {
- mp_digit s_i = *ps;
- carry += s_i;
- *ps++ = carry;
- carry = carry < s_i;
- }
-#endif
-}
-#endif
-
-#if (defined(MP_NO_MP_WORD) || defined(MP_NO_DIV_WORD)) \
-&& !defined(MP_ASSEMBLY_DIV_2DX1D)
-/*
-** Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized
-** so its high bit is 1. This code is from NSPR.
-*/
-mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor,
- mp_digit *qp, mp_digit *rp)
-{
- mp_digit d1, d0, q1, q0;
- mp_digit r1, r0, m;
-
- d1 = divisor >> MP_HALF_DIGIT_BIT;
- d0 = divisor & MP_HALF_DIGIT_MAX;
- r1 = Nhi % d1;
- q1 = Nhi / d1;
- m = q1 * d0;
- r1 = (r1 << MP_HALF_DIGIT_BIT) | (Nlo >> MP_HALF_DIGIT_BIT);
- if (r1 < m) {
- q1--, r1 += divisor;
- if (r1 >= divisor && r1 < m) {
- q1--, r1 += divisor;
- }
- }
- r1 -= m;
- r0 = r1 % d1;
- q0 = r1 / d1;
- m = q0 * d0;
- r0 = (r0 << MP_HALF_DIGIT_BIT) | (Nlo & MP_HALF_DIGIT_MAX);
- if (r0 < m) {
- q0--, r0 += divisor;
- if (r0 >= divisor && r0 < m) {
- q0--, r0 += divisor;
- }
- }
- if (qp)
- *qp = (q1 << MP_HALF_DIGIT_BIT) | q0;
- if (rp)
- *rp = r0 - m;
- return MP_OKAY;
-}
-#endif
-
-#if MP_SQUARE
-/* {{{ s_mp_sqr(a) */
-
-mp_err s_mp_sqr(mp_int *a)
-{
- mp_err res;
- mp_int tmp;
-
- if((res = mp_init_size(&tmp, 2 * USED(a), FLAG(a))) != MP_OKAY)
- return res;
- res = mp_sqr(a, &tmp);
- if (res == MP_OKAY) {
- s_mp_exch(&tmp, a);
- }
- mp_clear(&tmp);
- return res;
-}
-
-/* }}} */
-#endif
-
-/* {{{ s_mp_div(a, b) */
-
-/*
- s_mp_div(a, b)
-
- Compute a = a / b and b = a mod b. Assumes b > a.
- */
-
-mp_err s_mp_div(mp_int *rem, /* i: dividend, o: remainder */
- mp_int *div, /* i: divisor */
- mp_int *quot) /* i: 0; o: quotient */
-{
- mp_int part, t;
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
- mp_word q_msd;
-#else
- mp_digit q_msd;
-#endif
- mp_err res;
- mp_digit d;
- mp_digit div_msd;
- int ix;
-
- if(mp_cmp_z(div) == 0)
- return MP_RANGE;
-
- /* Shortcut if divisor is power of two */
- if((ix = s_mp_ispow2(div)) >= 0) {
- MP_CHECKOK( mp_copy(rem, quot) );
- s_mp_div_2d(quot, (mp_digit)ix);
- s_mp_mod_2d(rem, (mp_digit)ix);
-
- return MP_OKAY;
- }
-
- DIGITS(&t) = 0;
- MP_SIGN(rem) = ZPOS;
- MP_SIGN(div) = ZPOS;
-
- /* A working temporary for division */
- MP_CHECKOK( mp_init_size(&t, MP_ALLOC(rem), FLAG(rem)));
-
- /* Normalize to optimize guessing */
- MP_CHECKOK( s_mp_norm(rem, div, &d) );
-
- part = *rem;
-
- /* Perform the division itself...woo! */
- MP_USED(quot) = MP_ALLOC(quot);
-
- /* Find a partial substring of rem which is at least div */
- /* If we didn't find one, we're finished dividing */
- while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) {
- int i;
- int unusedRem;
-
- unusedRem = MP_USED(rem) - MP_USED(div);
- MP_DIGITS(&part) = MP_DIGITS(rem) + unusedRem;
- MP_ALLOC(&part) = MP_ALLOC(rem) - unusedRem;
- MP_USED(&part) = MP_USED(div);
- if (s_mp_cmp(&part, div) < 0) {
- -- unusedRem;
-#if MP_ARGCHK == 2
- assert(unusedRem >= 0);
-#endif
- -- MP_DIGITS(&part);
- ++ MP_USED(&part);
- ++ MP_ALLOC(&part);
- }
-
- /* Compute a guess for the next quotient digit */
- q_msd = MP_DIGIT(&part, MP_USED(&part) - 1);
- div_msd = MP_DIGIT(div, MP_USED(div) - 1);
- if (q_msd >= div_msd) {
- q_msd = 1;
- } else if (MP_USED(&part) > 1) {
-#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD)
- q_msd = (q_msd << MP_DIGIT_BIT) | MP_DIGIT(&part, MP_USED(&part) - 2);
- q_msd /= div_msd;
- if (q_msd == RADIX)
- --q_msd;
-#else
- mp_digit r;
- MP_CHECKOK( s_mpv_div_2dx1d(q_msd, MP_DIGIT(&part, MP_USED(&part) - 2),
- div_msd, &q_msd, &r) );
-#endif
- } else {
- q_msd = 0;
- }
-#if MP_ARGCHK == 2
- assert(q_msd > 0); /* This case should never occur any more. */
-#endif
- if (q_msd <= 0)
- break;
-
- /* See what that multiplies out to */
- mp_copy(div, &t);
- MP_CHECKOK( s_mp_mul_d(&t, (mp_digit)q_msd) );
-
- /*
- If it's too big, back it off. We should not have to do this
- more than once, or, in rare cases, twice. Knuth describes a
- method by which this could be reduced to a maximum of once, but
- I didn't implement that here.
- * When using s_mpv_div_2dx1d, we may have to do this 3 times.
- */
- for (i = 4; s_mp_cmp(&t, &part) > 0 && i > 0; --i) {
- --q_msd;
- s_mp_sub(&t, div); /* t -= div */
- }
- if (i < 0) {
- res = MP_RANGE;
- goto CLEANUP;
- }
-
- /* At this point, q_msd should be the right next digit */
- MP_CHECKOK( s_mp_sub(&part, &t) ); /* part -= t */
- s_mp_clamp(rem);
-
- /*
- Include the digit in the quotient. We allocated enough memory
- for any quotient we could ever possibly get, so we should not
- have to check for failures here
- */
- MP_DIGIT(quot, unusedRem) = (mp_digit)q_msd;
- }
-
- /* Denormalize remainder */
- if (d) {
- s_mp_div_2d(rem, d);
- }
-
- s_mp_clamp(quot);
-
-CLEANUP:
- mp_clear(&t);
-
- return res;
-
-} /* end s_mp_div() */
-
-
-/* }}} */
-
-/* {{{ s_mp_2expt(a, k) */
-
-mp_err s_mp_2expt(mp_int *a, mp_digit k)
-{
- mp_err res;
- mp_size dig, bit;
-
- dig = k / DIGIT_BIT;
- bit = k % DIGIT_BIT;
-
- mp_zero(a);
- if((res = s_mp_pad(a, dig + 1)) != MP_OKAY)
- return res;
-
- DIGIT(a, dig) |= ((mp_digit)1 << bit);
-
- return MP_OKAY;
-
-} /* end s_mp_2expt() */
-
-/* }}} */
-
-/* {{{ s_mp_reduce(x, m, mu) */
-
-/*
- Compute Barrett reduction, x (mod m), given a precomputed value for
- mu = b^2k / m, where b = RADIX and k = #digits(m). This should be
- faster than straight division, when many reductions by the same
- value of m are required (such as in modular exponentiation). This
- can nearly halve the time required to do modular exponentiation,
- as compared to using the full integer divide to reduce.
-
- This algorithm was derived from the _Handbook of Applied
- Cryptography_ by Menezes, Oorschot and VanStone, Ch. 14,
- pp. 603-604.
- */
-
-mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu)
-{
- mp_int q;
- mp_err res;
-
- if((res = mp_init_copy(&q, x)) != MP_OKAY)
- return res;
-
- s_mp_rshd(&q, USED(m) - 1); /* q1 = x / b^(k-1) */
- s_mp_mul(&q, mu); /* q2 = q1 * mu */
- s_mp_rshd(&q, USED(m) + 1); /* q3 = q2 / b^(k+1) */
-
- /* x = x mod b^(k+1), quick (no division) */
- s_mp_mod_2d(x, DIGIT_BIT * (USED(m) + 1));
-
- /* q = q * m mod b^(k+1), quick (no division) */
- s_mp_mul(&q, m);
- s_mp_mod_2d(&q, DIGIT_BIT * (USED(m) + 1));
-
- /* x = x - q */
- if((res = mp_sub(x, &q, x)) != MP_OKAY)
- goto CLEANUP;
-
- /* If x < 0, add b^(k+1) to it */
- if(mp_cmp_z(x) < 0) {
- mp_set(&q, 1);
- if((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY)
- goto CLEANUP;
- if((res = mp_add(x, &q, x)) != MP_OKAY)
- goto CLEANUP;
- }
-
- /* Back off if it's too big */
- while(mp_cmp(x, m) >= 0) {
- if((res = s_mp_sub(x, m)) != MP_OKAY)
- break;
- }
-
- CLEANUP:
- mp_clear(&q);
-
- return res;
-
-} /* end s_mp_reduce() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive comparisons */
-
-/* {{{ s_mp_cmp(a, b) */
-
-/* Compare |a| <=> |b|, return 0 if equal, <0 if a<b, >0 if a>b */
-int s_mp_cmp(const mp_int *a, const mp_int *b)
-{
- mp_size used_a = MP_USED(a);
- {
- mp_size used_b = MP_USED(b);
-
- if (used_a > used_b)
- goto IS_GT;
- if (used_a < used_b)
- goto IS_LT;
- }
- {
- mp_digit *pa, *pb;
- mp_digit da = 0, db = 0;
-
-#define CMP_AB(n) if ((da = pa[n]) != (db = pb[n])) goto done
-
- pa = MP_DIGITS(a) + used_a;
- pb = MP_DIGITS(b) + used_a;
- while (used_a >= 4) {
- pa -= 4;
- pb -= 4;
- used_a -= 4;
- CMP_AB(3);
- CMP_AB(2);
- CMP_AB(1);
- CMP_AB(0);
- }
- while (used_a-- > 0 && ((da = *--pa) == (db = *--pb)))
- /* do nothing */;
-done:
- if (da > db)
- goto IS_GT;
- if (da < db)
- goto IS_LT;
- }
- return MP_EQ;
-IS_LT:
- return MP_LT;
-IS_GT:
- return MP_GT;
-} /* end s_mp_cmp() */
-
-/* }}} */
-
-/* {{{ s_mp_cmp_d(a, d) */
-
-/* Compare |a| <=> d, return 0 if equal, <0 if a<d, >0 if a>d */
-int s_mp_cmp_d(const mp_int *a, mp_digit d)
-{
- if(USED(a) > 1)
- return MP_GT;
-
- if(DIGIT(a, 0) < d)
- return MP_LT;
- else if(DIGIT(a, 0) > d)
- return MP_GT;
- else
- return MP_EQ;
-
-} /* end s_mp_cmp_d() */
-
-/* }}} */
-
-/* {{{ s_mp_ispow2(v) */
-
-/*
- Returns -1 if the value is not a power of two; otherwise, it returns
- k such that v = 2^k, i.e. lg(v).
- */
-int s_mp_ispow2(const mp_int *v)
-{
- mp_digit d;
- int extra = 0, ix;
-
- ix = MP_USED(v) - 1;
- d = MP_DIGIT(v, ix); /* most significant digit of v */
-
- extra = s_mp_ispow2d(d);
- if (extra < 0 || ix == 0)
- return extra;
-
- while (--ix >= 0) {
- if (DIGIT(v, ix) != 0)
- return -1; /* not a power of two */
- extra += MP_DIGIT_BIT;
- }
-
- return extra;
-
-} /* end s_mp_ispow2() */
-
-/* }}} */
-
-/* {{{ s_mp_ispow2d(d) */
-
-int s_mp_ispow2d(mp_digit d)
-{
- if ((d != 0) && ((d & (d-1)) == 0)) { /* d is a power of 2 */
- int pow = 0;
-#if defined (MP_USE_UINT_DIGIT)
- if (d & 0xffff0000U)
- pow += 16;
- if (d & 0xff00ff00U)
- pow += 8;
- if (d & 0xf0f0f0f0U)
- pow += 4;
- if (d & 0xccccccccU)
- pow += 2;
- if (d & 0xaaaaaaaaU)
- pow += 1;
-#elif defined(MP_USE_LONG_LONG_DIGIT)
- if (d & 0xffffffff00000000ULL)
- pow += 32;
- if (d & 0xffff0000ffff0000ULL)
- pow += 16;
- if (d & 0xff00ff00ff00ff00ULL)
- pow += 8;
- if (d & 0xf0f0f0f0f0f0f0f0ULL)
- pow += 4;
- if (d & 0xccccccccccccccccULL)
- pow += 2;
- if (d & 0xaaaaaaaaaaaaaaaaULL)
- pow += 1;
-#elif defined(MP_USE_LONG_DIGIT)
- if (d & 0xffffffff00000000UL)
- pow += 32;
- if (d & 0xffff0000ffff0000UL)
- pow += 16;
- if (d & 0xff00ff00ff00ff00UL)
- pow += 8;
- if (d & 0xf0f0f0f0f0f0f0f0UL)
- pow += 4;
- if (d & 0xccccccccccccccccUL)
- pow += 2;
- if (d & 0xaaaaaaaaaaaaaaaaUL)
- pow += 1;
-#else
-#error "unknown type for mp_digit"
-#endif
- return pow;
- }
- return -1;
-
-} /* end s_mp_ispow2d() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ Primitive I/O helpers */
-
-/* {{{ s_mp_tovalue(ch, r) */
-
-/*
- Convert the given character to its digit value, in the given radix.
- If the given character is not understood in the given radix, -1 is
- returned. Otherwise the digit's numeric value is returned.
-
- The results will be odd if you use a radix < 2 or > 62, you are
- expected to know what you're up to.
- */
-int s_mp_tovalue(char ch, int r)
-{
- int val, xch;
-
- if(r > 36)
- xch = ch;
- else
- xch = toupper(ch);
-
- if(isdigit(xch))
- val = xch - '0';
- else if(isupper(xch))
- val = xch - 'A' + 10;
- else if(islower(xch))
- val = xch - 'a' + 36;
- else if(xch == '+')
- val = 62;
- else if(xch == '/')
- val = 63;
- else
- return -1;
-
- if(val < 0 || val >= r)
- return -1;
-
- return val;
-
-} /* end s_mp_tovalue() */
-
-/* }}} */
-
-/* {{{ s_mp_todigit(val, r, low) */
-
-/*
- Convert val to a radix-r digit, if possible. If val is out of range
- for r, returns zero. Otherwise, returns an ASCII character denoting
- the value in the given radix.
-
- The results may be odd if you use a radix < 2 or > 64, you are
- expected to know what you're doing.
- */
-
-char s_mp_todigit(mp_digit val, int r, int low)
-{
- char ch;
-
- if(val >= r)
- return 0;
-
- ch = s_dmap_1[val];
-
- if(r <= 36 && low)
- ch = tolower(ch);
-
- return ch;
-
-} /* end s_mp_todigit() */
-
-/* }}} */
-
-/* {{{ s_mp_outlen(bits, radix) */
-
-/*
- Return an estimate for how long a string is needed to hold a radix
- r representation of a number with 'bits' significant bits, plus an
- extra for a zero terminator (assuming C style strings here)
- */
-int s_mp_outlen(int bits, int r)
-{
- return (int)((double)bits * LOG_V_2(r) + 1.5) + 1;
-
-} /* end s_mp_outlen() */
-
-/* }}} */
-
-/* }}} */
-
-/* {{{ mp_read_unsigned_octets(mp, str, len) */
-/* mp_read_unsigned_octets(mp, str, len)
- Read in a raw value (base 256) into the given mp_int
- No sign bit, number is positive. Leading zeros ignored.
- */
-
-mp_err
-mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len)
-{
- int count;
- mp_err res;
- mp_digit d;
-
- ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
-
- mp_zero(mp);
-
- count = len % sizeof(mp_digit);
- if (count) {
- for (d = 0; count-- > 0; --len) {
- d = (d << 8) | *str++;
- }
- MP_DIGIT(mp, 0) = d;
- }
-
- /* Read the rest of the digits */
- for(; len > 0; len -= sizeof(mp_digit)) {
- for (d = 0, count = sizeof(mp_digit); count > 0; --count) {
- d = (d << 8) | *str++;
- }
- if (MP_EQ == mp_cmp_z(mp)) {
- if (!d)
- continue;
- } else {
- if((res = s_mp_lshd(mp, 1)) != MP_OKAY)
- return res;
- }
- MP_DIGIT(mp, 0) = d;
- }
- return MP_OKAY;
-} /* end mp_read_unsigned_octets() */
-/* }}} */
-
-/* {{{ mp_unsigned_octet_size(mp) */
-int
-mp_unsigned_octet_size(const mp_int *mp)
-{
- int bytes;
- int ix;
- mp_digit d = 0;
-
- ARGCHK(mp != NULL, MP_BADARG);
- ARGCHK(MP_ZPOS == SIGN(mp), MP_BADARG);
-
- bytes = (USED(mp) * sizeof(mp_digit));
-
- /* subtract leading zeros. */
- /* Iterate over each digit... */
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- d = DIGIT(mp, ix);
- if (d)
- break;
- bytes -= sizeof(d);
- }
- if (!bytes)
- return 1;
-
- /* Have MSD, check digit bytes, high order first */
- for(ix = sizeof(mp_digit) - 1; ix >= 0; ix--) {
- unsigned char x = (unsigned char)(d >> (ix * CHAR_BIT));
- if (x)
- break;
- --bytes;
- }
- return bytes;
-} /* end mp_unsigned_octet_size() */
-/* }}} */
-
-/* {{{ mp_to_unsigned_octets(mp, str) */
-/* output a buffer of big endian octets no longer than specified. */
-mp_err
-mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
-{
- int ix, pos = 0;
- int bytes;
-
- ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
- bytes = mp_unsigned_octet_size(mp);
- ARGCHK(bytes <= maxlen, MP_BADARG);
-
- /* Iterate over each digit... */
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- mp_digit d = DIGIT(mp, ix);
- int jx;
-
- /* Unpack digit bytes, high order first */
- for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
- unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
- if (!pos && !x) /* suppress leading zeros */
- continue;
- str[pos++] = x;
- }
- }
- if (!pos)
- str[pos++] = 0;
- return pos;
-} /* end mp_to_unsigned_octets() */
-/* }}} */
-
-/* {{{ mp_to_signed_octets(mp, str) */
-/* output a buffer of big endian octets no longer than specified. */
-mp_err
-mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen)
-{
- int ix, pos = 0;
- int bytes;
-
- ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
- bytes = mp_unsigned_octet_size(mp);
- ARGCHK(bytes <= maxlen, MP_BADARG);
-
- /* Iterate over each digit... */
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- mp_digit d = DIGIT(mp, ix);
- int jx;
-
- /* Unpack digit bytes, high order first */
- for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
- unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
- if (!pos) {
- if (!x) /* suppress leading zeros */
- continue;
- if (x & 0x80) { /* add one leading zero to make output positive. */
- ARGCHK(bytes + 1 <= maxlen, MP_BADARG);
- if (bytes + 1 > maxlen)
- return MP_BADARG;
- str[pos++] = 0;
- }
- }
- str[pos++] = x;
- }
- }
- if (!pos)
- str[pos++] = 0;
- return pos;
-} /* end mp_to_signed_octets() */
-/* }}} */
-
-/* {{{ mp_to_fixlen_octets(mp, str) */
-/* output a buffer of big endian octets exactly as long as requested. */
-mp_err
-mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size length)
-{
- int ix, pos = 0;
- int bytes;
-
- ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
-
- bytes = mp_unsigned_octet_size(mp);
- ARGCHK(bytes <= length, MP_BADARG);
-
- /* place any needed leading zeros */
- for (;length > bytes; --length) {
- *str++ = 0;
- }
-
- /* Iterate over each digit... */
- for(ix = USED(mp) - 1; ix >= 0; ix--) {
- mp_digit d = DIGIT(mp, ix);
- int jx;
-
- /* Unpack digit bytes, high order first */
- for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
- unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
- if (!pos && !x) /* suppress leading zeros */
- continue;
- str[pos++] = x;
- }
- }
- if (!pos)
- str[pos++] = 0;
- return MP_OKAY;
-} /* end mp_to_fixlen_octets() */
-/* }}} */
-
-
-/*------------------------------------------------------------------------*/
-/* HERE THERE BE DRAGONS */
diff --git a/src/share/native/sun/security/ec/mpi.h b/src/share/native/sun/security/ec/mpi.h
deleted file mode 100644
index 5f70b76..0000000
--- a/src/share/native/sun/security/ec/mpi.h
+++ /dev/null
@@ -1,409 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- * Arbitrary precision integer arithmetic library
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Netscape Communications Corporation
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPI_H
-#define _MPI_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mpi.h,v 1.22 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi-config.h"
-
-#ifndef _WIN32
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/debug.h>
-#include <sys/systm.h>
-#define assert ASSERT
-#define labs(a) (a >= 0 ? a : -a)
-#define UCHAR_MAX 255
-#define memset(s, c, n) bzero(s, n)
-#define memcpy(a,b,c) bcopy((caddr_t)b, (caddr_t)a, c)
-/*
- * Generic #define's to cover missing things in the kernel
- */
-#ifndef isdigit
-#define isdigit(x) ((x) >= '0' && (x) <= '9')
-#endif
-#ifndef isupper
-#define isupper(x) (((unsigned)(x) >= 'A') && ((unsigned)(x) <= 'Z'))
-#endif
-#ifndef islower
-#define islower(x) (((unsigned)(x) >= 'a') && ((unsigned)(x) <= 'z'))
-#endif
-#ifndef isalpha
-#define isalpha(x) (isupper(x) || islower(x))
-#endif
-#ifndef toupper
-#define toupper(x) (islower(x) ? (x) - 'a' + 'A' : (x))
-#endif
-#ifndef tolower
-#define tolower(x) (isupper(x) ? (x) + 'a' - 'A' : (x))
-#endif
-#ifndef isspace
-#define isspace(x) (((x) == ' ') || ((x) == '\r') || ((x) == '\n') || \
- ((x) == '\t') || ((x) == '\b'))
-#endif
-#endif /* _KERNEL */
-
-#if MP_DEBUG
-#undef MP_IOFUNC
-#define MP_IOFUNC 1
-#endif
-
-#if MP_IOFUNC
-#include <stdio.h>
-#include <ctype.h>
-#endif
-
-#ifndef _KERNEL
-#include <limits.h>
-#endif
-
-#if defined(BSDI)
-#undef ULLONG_MAX
-#endif
-
-#if defined( macintosh )
-#include <Types.h>
-#elif defined( _WIN32_WCE)
-/* #include <sys/types.h> What do we need here ?? */
-#else
-#include <sys/types.h>
-#endif
-
-#define MP_NEG 1
-#define MP_ZPOS 0
-
-#define MP_OKAY 0 /* no error, all is well */
-#define MP_YES 0 /* yes (boolean result) */
-#define MP_NO -1 /* no (boolean result) */
-#define MP_MEM -2 /* out of memory */
-#define MP_RANGE -3 /* argument out of range */
-#define MP_BADARG -4 /* invalid parameter */
-#define MP_UNDEF -5 /* answer is undefined */
-#define MP_LAST_CODE MP_UNDEF
-
-typedef unsigned int mp_sign;
-typedef unsigned int mp_size;
-typedef int mp_err;
-typedef int mp_flag;
-
-#define MP_32BIT_MAX 4294967295U
-
-#if !defined(ULONG_MAX)
-#error "ULONG_MAX not defined"
-#elif !defined(UINT_MAX)
-#error "UINT_MAX not defined"
-#elif !defined(USHRT_MAX)
-#error "USHRT_MAX not defined"
-#endif
-
-#if defined(ULONG_LONG_MAX) /* GCC, HPUX */
-#define MP_ULONG_LONG_MAX ULONG_LONG_MAX
-#elif defined(ULLONG_MAX) /* Solaris */
-#define MP_ULONG_LONG_MAX ULLONG_MAX
-/* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */
-#elif defined(ULONGLONG_MAX) /* IRIX, AIX */
-#define MP_ULONG_LONG_MAX ULONGLONG_MAX
-#endif
-
-/* We only use unsigned long for mp_digit iff long is more than 32 bits. */
-#if !defined(MP_USE_UINT_DIGIT) && ULONG_MAX > MP_32BIT_MAX
-typedef unsigned long mp_digit;
-#define MP_DIGIT_MAX ULONG_MAX
-#define MP_DIGIT_FMT "%016lX" /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX UINT_MAX
-#undef MP_NO_MP_WORD
-#define MP_NO_MP_WORD 1
-#undef MP_USE_LONG_DIGIT
-#define MP_USE_LONG_DIGIT 1
-#undef MP_USE_LONG_LONG_DIGIT
-
-#elif !defined(MP_USE_UINT_DIGIT) && defined(MP_ULONG_LONG_MAX)
-typedef unsigned long long mp_digit;
-#define MP_DIGIT_MAX MP_ULONG_LONG_MAX
-#define MP_DIGIT_FMT "%016llX" /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX UINT_MAX
-#undef MP_NO_MP_WORD
-#define MP_NO_MP_WORD 1
-#undef MP_USE_LONG_LONG_DIGIT
-#define MP_USE_LONG_LONG_DIGIT 1
-#undef MP_USE_LONG_DIGIT
-
-#else
-typedef unsigned int mp_digit;
-#define MP_DIGIT_MAX UINT_MAX
-#define MP_DIGIT_FMT "%08X" /* printf() format for 1 digit */
-#define MP_HALF_DIGIT_MAX USHRT_MAX
-#undef MP_USE_UINT_DIGIT
-#define MP_USE_UINT_DIGIT 1
-#undef MP_USE_LONG_LONG_DIGIT
-#undef MP_USE_LONG_DIGIT
-#endif
-
-#if !defined(MP_NO_MP_WORD)
-#if defined(MP_USE_UINT_DIGIT) && \
- (defined(MP_ULONG_LONG_MAX) || (ULONG_MAX > UINT_MAX))
-
-#if (ULONG_MAX > UINT_MAX)
-typedef unsigned long mp_word;
-typedef long mp_sword;
-#define MP_WORD_MAX ULONG_MAX
-
-#else
-typedef unsigned long long mp_word;
-typedef long long mp_sword;
-#define MP_WORD_MAX MP_ULONG_LONG_MAX
-#endif
-
-#else
-#define MP_NO_MP_WORD 1
-#endif
-#endif /* !defined(MP_NO_MP_WORD) */
-
-#if !defined(MP_WORD_MAX) && defined(MP_DEFINE_SMALL_WORD)
-typedef unsigned int mp_word;
-typedef int mp_sword;
-#define MP_WORD_MAX UINT_MAX
-#endif
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
-#define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit))
-#define MP_WORD_BIT (CHAR_BIT*sizeof(mp_word))
-#define MP_RADIX (1+(mp_word)MP_DIGIT_MAX)
-
-#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT/2)
-#define MP_HALF_RADIX (1+(mp_digit)MP_HALF_DIGIT_MAX)
-/* MP_HALF_RADIX really ought to be called MP_SQRT_RADIX, but it's named
-** MP_HALF_RADIX because it's the radix for MP_HALF_DIGITs, and it's
-** consistent with the other _HALF_ names.
-*/
-
-
-/* Macros for accessing the mp_int internals */
-#define MP_FLAG(MP) ((MP)->flag)
-#define MP_SIGN(MP) ((MP)->sign)
-#define MP_USED(MP) ((MP)->used)
-#define MP_ALLOC(MP) ((MP)->alloc)
-#define MP_DIGITS(MP) ((MP)->dp)
-#define MP_DIGIT(MP,N) (MP)->dp[(N)]
-
-/* This defines the maximum I/O base (minimum is 2) */
-#define MP_MAX_RADIX 64
-
-typedef struct {
- mp_sign flag; /* KM_SLEEP/KM_NOSLEEP */
- mp_sign sign; /* sign of this quantity */
- mp_size alloc; /* how many digits allocated */
- mp_size used; /* how many digits used */
- mp_digit *dp; /* the digits themselves */
-} mp_int;
-
-/* Default precision */
-mp_size mp_get_prec(void);
-void mp_set_prec(mp_size prec);
-
-/* Memory management */
-mp_err mp_init(mp_int *mp, int kmflag);
-mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag);
-mp_err mp_init_copy(mp_int *mp, const mp_int *from);
-mp_err mp_copy(const mp_int *from, mp_int *to);
-void mp_exch(mp_int *mp1, mp_int *mp2);
-void mp_clear(mp_int *mp);
-void mp_zero(mp_int *mp);
-void mp_set(mp_int *mp, mp_digit d);
-mp_err mp_set_int(mp_int *mp, long z);
-#define mp_set_long(mp,z) mp_set_int(mp,z)
-mp_err mp_set_ulong(mp_int *mp, unsigned long z);
-
-/* Single digit arithmetic */
-mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b);
-mp_err mp_mul_2(const mp_int *a, mp_int *c);
-mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r);
-mp_err mp_div_2(const mp_int *a, mp_int *c);
-mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c);
-
-/* Sign manipulations */
-mp_err mp_abs(const mp_int *a, mp_int *b);
-mp_err mp_neg(const mp_int *a, mp_int *b);
-
-/* Full arithmetic */
-mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
-mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int *c);
-#if MP_SQUARE
-mp_err mp_sqr(const mp_int *a, mp_int *b);
-#else
-#define mp_sqr(a, b) mp_mul(a, a, b)
-#endif
-mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r);
-mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r);
-mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_2expt(mp_int *a, mp_digit k);
-mp_err mp_sqrt(const mp_int *a, mp_int *b);
-
-/* Modular arithmetic */
-#if MP_MODARITH
-mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c);
-mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c);
-mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-#if MP_SQUARE
-mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c);
-#else
-#define mp_sqrmod(a, m, c) mp_mulmod(a, a, m, c)
-#endif
-mp_err mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c);
-mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c);
-#endif /* MP_MODARITH */
-
-/* Comparisons */
-int mp_cmp_z(const mp_int *a);
-int mp_cmp_d(const mp_int *a, mp_digit d);
-int mp_cmp(const mp_int *a, const mp_int *b);
-int mp_cmp_mag(mp_int *a, mp_int *b);
-int mp_cmp_int(const mp_int *a, long z, int kmflag);
-int mp_isodd(const mp_int *a);
-int mp_iseven(const mp_int *a);
-
-/* Number theoretic */
-#if MP_NUMTH
-mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c);
-mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y);
-mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c);
-mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c);
-#endif /* end MP_NUMTH */
-
-/* Input and output */
-#if MP_IOFUNC
-void mp_print(mp_int *mp, FILE *ofp);
-#endif /* end MP_IOFUNC */
-
-/* Base conversion */
-mp_err mp_read_raw(mp_int *mp, char *str, int len);
-int mp_raw_size(mp_int *mp);
-mp_err mp_toraw(mp_int *mp, char *str);
-mp_err mp_read_radix(mp_int *mp, const char *str, int radix);
-mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix);
-int mp_radix_size(mp_int *mp, int radix);
-mp_err mp_toradix(mp_int *mp, char *str, int radix);
-int mp_tovalue(char ch, int r);
-
-#define mp_tobinary(M, S) mp_toradix((M), (S), 2)
-#define mp_tooctal(M, S) mp_toradix((M), (S), 8)
-#define mp_todecimal(M, S) mp_toradix((M), (S), 10)
-#define mp_tohex(M, S) mp_toradix((M), (S), 16)
-
-/* Error strings */
-const char *mp_strerror(mp_err ec);
-
-/* Octet string conversion functions */
-mp_err mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len);
-int mp_unsigned_octet_size(const mp_int *mp);
-mp_err mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
-mp_err mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen);
-mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size len);
-
-/* Miscellaneous */
-mp_size mp_trailing_zeros(const mp_int *mp);
-
-#define MP_CHECKOK(x) if (MP_OKAY > (res = (x))) goto CLEANUP
-#define MP_CHECKERR(x) if (MP_OKAY > (res = (x))) goto CLEANUP
-
-#if defined(MP_API_COMPATIBLE)
-#define NEG MP_NEG
-#define ZPOS MP_ZPOS
-#define DIGIT_MAX MP_DIGIT_MAX
-#define DIGIT_BIT MP_DIGIT_BIT
-#define DIGIT_FMT MP_DIGIT_FMT
-#define RADIX MP_RADIX
-#define MAX_RADIX MP_MAX_RADIX
-#define FLAG(MP) MP_FLAG(MP)
-#define SIGN(MP) MP_SIGN(MP)
-#define USED(MP) MP_USED(MP)
-#define ALLOC(MP) MP_ALLOC(MP)
-#define DIGITS(MP) MP_DIGITS(MP)
-#define DIGIT(MP,N) MP_DIGIT(MP,N)
-
-#if MP_ARGCHK == 1
-#define ARGCHK(X,Y) {if(!(X)){return (Y);}}
-#elif MP_ARGCHK == 2
-#ifdef _KERNEL
-#define ARGCHK(X,Y) ASSERT(X)
-#else
-#include <assert.h>
-#define ARGCHK(X,Y) assert(X)
-#endif
-#else
-#define ARGCHK(X,Y) /* */
-#endif
-#endif /* defined MP_API_COMPATIBLE */
-
-#endif /* _MPI_H */
diff --git a/src/share/native/sun/security/ec/mplogic.c b/src/share/native/sun/security/ec/mplogic.c
deleted file mode 100644
index 6a5f00a..0000000
--- a/src/share/native/sun/security/ec/mplogic.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- * Bitwise logical operations on MPI values
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mplogic.c,v 1.15 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi-priv.h"
-#include "mplogic.h"
-
-/* {{{ Lookup table for population count */
-
-static unsigned char bitc[] = {
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
-};
-
-/* }}} */
-
-/*
- mpl_rsh(a, b, d) - b = a >> d
- mpl_lsh(a, b, d) - b = a << d
- */
-
-/* {{{ mpl_rsh(a, b, d) */
-
-mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_copy(a, b)) != MP_OKAY)
- return res;
-
- s_mp_div_2d(b, d);
-
- return MP_OKAY;
-
-} /* end mpl_rsh() */
-
-/* }}} */
-
-/* {{{ mpl_lsh(a, b, d) */
-
-mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d)
-{
- mp_err res;
-
- ARGCHK(a != NULL && b != NULL, MP_BADARG);
-
- if((res = mp_copy(a, b)) != MP_OKAY)
- return res;
-
- return s_mp_mul_2d(b, d);
-
-} /* end mpl_lsh() */
-
-/* }}} */
-
-/*------------------------------------------------------------------------*/
-/*
- mpl_set_bit
-
- Returns MP_OKAY or some error code.
- Grows a if needed to set a bit to 1.
- */
-mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value)
-{
- mp_size ix;
- mp_err rv;
- mp_digit mask;
-
- ARGCHK(a != NULL, MP_BADARG);
-
- ix = bitNum / MP_DIGIT_BIT;
- if (ix + 1 > MP_USED(a)) {
- rv = s_mp_pad(a, ix + 1);
- if (rv != MP_OKAY)
- return rv;
- }
-
- bitNum = bitNum % MP_DIGIT_BIT;
- mask = (mp_digit)1 << bitNum;
- if (value)
- MP_DIGIT(a,ix) |= mask;
- else
- MP_DIGIT(a,ix) &= ~mask;
- s_mp_clamp(a);
- return MP_OKAY;
-}
-
-/*
- mpl_get_bit
-
- returns 0 or 1 or some (negative) error code.
- */
-mp_err mpl_get_bit(const mp_int *a, mp_size bitNum)
-{
- mp_size bit, ix;
- mp_err rv;
-
- ARGCHK(a != NULL, MP_BADARG);
-
- ix = bitNum / MP_DIGIT_BIT;
- ARGCHK(ix <= MP_USED(a) - 1, MP_RANGE);
-
- bit = bitNum % MP_DIGIT_BIT;
- rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1;
- return rv;
-}
-
-/*
- mpl_get_bits
- - Extracts numBits bits from a, where the least significant extracted bit
- is bit lsbNum. Returns a negative value if error occurs.
- - Because sign bit is used to indicate error, maximum number of bits to
- be returned is the lesser of (a) the number of bits in an mp_digit, or
- (b) one less than the number of bits in an mp_err.
- - lsbNum + numbits can be greater than the number of significant bits in
- integer a, as long as bit lsbNum is in the high order digit of a.
- */
-mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits)
-{
- mp_size rshift = (lsbNum % MP_DIGIT_BIT);
- mp_size lsWndx = (lsbNum / MP_DIGIT_BIT);
- mp_digit * digit = MP_DIGITS(a) + lsWndx;
- mp_digit mask = ((1 << numBits) - 1);
-
- ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG);
- ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE);
-
- if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) ||
- (lsWndx + 1 >= MP_USED(a))) {
- mask &= (digit[0] >> rshift);
- } else {
- mask &= ((digit[0] >> rshift) | (digit[1] << (MP_DIGIT_BIT - rshift)));
- }
- return (mp_err)mask;
-}
-
-/*
- mpl_significant_bits
- returns number of significnant bits in abs(a).
- returns 1 if value is zero.
- */
-mp_err mpl_significant_bits(const mp_int *a)
-{
- mp_err bits = 0;
- int ix;
-
- ARGCHK(a != NULL, MP_BADARG);
-
- ix = MP_USED(a);
- for (ix = MP_USED(a); ix > 0; ) {
- mp_digit d;
- d = MP_DIGIT(a, --ix);
- if (d) {
- while (d) {
- ++bits;
- d >>= 1;
- }
- break;
- }
- }
- bits += ix * MP_DIGIT_BIT;
- if (!bits)
- bits = 1;
- return bits;
-}
-
-/*------------------------------------------------------------------------*/
-/* HERE THERE BE DRAGONS */
diff --git a/src/share/native/sun/security/ec/mplogic.h b/src/share/native/sun/security/ec/mplogic.h
deleted file mode 100644
index 97ddb49..0000000
--- a/src/share/native/sun/security/ec/mplogic.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- * Bitwise logical operations on MPI values
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MPLOGIC_H
-#define _MPLOGIC_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mplogic.h,v 1.7 2004/04/27 23:04:36 gerv%gerv.net Exp $ */
-
-#include "mpi.h"
-
-/*
- The logical operations treat an mp_int as if it were a bit vector,
- without regard to its sign (an mp_int is represented in a signed
- magnitude format). Values are treated as if they had an infinite
- string of zeros left of the most-significant bit.
- */
-
-/* Parity results */
-
-#define MP_EVEN MP_YES
-#define MP_ODD MP_NO
-
-/* Bitwise functions */
-
-mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */
-mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */
-mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */
-mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */
-
-/* Shift functions */
-
-mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */
-mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */
-
-/* Bit count and parity */
-
-mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */
-mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */
-mp_err mpl_parity(mp_int *a); /* determine parity */
-
-/* Get & Set the value of a bit */
-
-mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value);
-mp_err mpl_get_bit(const mp_int *a, mp_size bitNum);
-mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits);
-mp_err mpl_significant_bits(const mp_int *a);
-
-#endif /* _MPLOGIC_H */
diff --git a/src/share/native/sun/security/ec/mpmontg.c b/src/share/native/sun/security/ec/mpmontg.c
deleted file mode 100644
index df17f42..0000000
--- a/src/share/native/sun/security/ec/mpmontg.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Sheueling Chang Shantz <sheueling.chang@sun.com>,
- * Stephen Fung <stephen.fung@sun.com>, and
- * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/* $Id: mpmontg.c,v 1.20 2006/08/29 02:41:38 nelson%bolyard.com Exp $ */
-
-/* This file implements moduluar exponentiation using Montgomery's
- * method for modular reduction. This file implements the method
- * described as "Improvement 1" in the paper "A Cryptogrpahic Library for
- * the Motorola DSP56000" by Stephen R. Dusse' and Burton S. Kaliski Jr.
- * published in "Advances in Cryptology: Proceedings of EUROCRYPT '90"
- * "Lecture Notes in Computer Science" volume 473, 1991, pg 230-244,
- * published by Springer Verlag.
- */
-
-#define MP_USING_CACHE_SAFE_MOD_EXP 1
-#ifndef _KERNEL
-#include <string.h>
-#include <stddef.h> /* ptrdiff_t */
-#endif
-#include "mpi-priv.h"
-#include "mplogic.h"
-#include "mpprime.h"
-#ifdef MP_USING_MONT_MULF
-#include "montmulf.h"
-#endif
-
-/* if MP_CHAR_STORE_SLOW is defined, we */
-/* need to know endianness of this platform. */
-#ifdef MP_CHAR_STORE_SLOW
-#if !defined(MP_IS_BIG_ENDIAN) && !defined(MP_IS_LITTLE_ENDIAN)
-#error "You must define MP_IS_BIG_ENDIAN or MP_IS_LITTLE_ENDIAN\n" \
- " if you define MP_CHAR_STORE_SLOW."
-#endif
-#endif
-
-#ifndef STATIC
-#define STATIC
-#endif
-
-#define MAX_ODD_INTS 32 /* 2 ** (WINDOW_BITS - 1) */
-
-#ifndef _KERNEL
-#if defined(_WIN32_WCE)
-#define ABORT res = MP_UNDEF; goto CLEANUP
-#else
-#define ABORT abort()
-#endif
-#else
-#define ABORT res = MP_UNDEF; goto CLEANUP
-#endif /* _KERNEL */
-
-/* computes T = REDC(T), 2^b == R */
-mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm)
-{
- mp_err res;
- mp_size i;
-
- i = MP_USED(T) + MP_USED(&mmm->N) + 2;
- MP_CHECKOK( s_mp_pad(T, i) );
- for (i = 0; i < MP_USED(&mmm->N); ++i ) {
- mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime;
- /* T += N * m_i * (MP_RADIX ** i); */
- MP_CHECKOK( s_mp_mul_d_add_offset(&mmm->N, m_i, T, i) );
- }
- s_mp_clamp(T);
-
- /* T /= R */
- s_mp_div_2d(T, mmm->b);
-
- if ((res = s_mp_cmp(T, &mmm->N)) >= 0) {
- /* T = T - N */
- MP_CHECKOK( s_mp_sub(T, &mmm->N) );
-#ifdef DEBUG
- if ((res = mp_cmp(T, &mmm->N)) >= 0) {
- res = MP_UNDEF;
- goto CLEANUP;
- }
-#endif
- }
- res = MP_OKAY;
-CLEANUP:
- return res;
-}
-
-#if !defined(MP_ASSEMBLY_MUL_MONT) && !defined(MP_MONT_USE_MP_MUL)
-mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c,
- mp_mont_modulus *mmm)
-{
- mp_digit *pb;
- mp_digit m_i;
- mp_err res;
- mp_size ib;
- mp_size useda, usedb;
-
- ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
-
- if (MP_USED(a) < MP_USED(b)) {
- const mp_int *xch = b; /* switch a and b, to do fewer outer loops */
- b = a;
- a = xch;
- }
-
- MP_USED(c) = 1; MP_DIGIT(c, 0) = 0;
- ib = MP_USED(a) + MP_MAX(MP_USED(b), MP_USED(&mmm->N)) + 2;
- if((res = s_mp_pad(c, ib)) != MP_OKAY)
- goto CLEANUP;
-
- useda = MP_USED(a);
- pb = MP_DIGITS(b);
- s_mpv_mul_d(MP_DIGITS(a), useda, *pb++, MP_DIGITS(c));
- s_mp_setz(MP_DIGITS(c) + useda + 1, ib - (useda + 1));
- m_i = MP_DIGIT(c, 0) * mmm->n0prime;
- s_mp_mul_d_add_offset(&mmm->N, m_i, c, 0);
-
- /* Outer loop: Digits of b */
- usedb = MP_USED(b);
- for (ib = 1; ib < usedb; ib++) {
- mp_digit b_i = *pb++;
-
- /* Inner product: Digits of a */
- if (b_i)
- s_mpv_mul_d_add_prop(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
- m_i = MP_DIGIT(c, ib) * mmm->n0prime;
- s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
- }
- if (usedb < MP_USED(&mmm->N)) {
- for (usedb = MP_USED(&mmm->N); ib < usedb; ++ib ) {
- m_i = MP_DIGIT(c, ib) * mmm->n0prime;
- s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
- }
- }
- s_mp_clamp(c);
- s_mp_div_2d(c, mmm->b);
- if (s_mp_cmp(c, &mmm->N) >= 0) {
- MP_CHECKOK( s_mp_sub(c, &mmm->N) );
- }
- res = MP_OKAY;
-
-CLEANUP:
- return res;
-}
-#endif
diff --git a/src/share/native/sun/security/ec/mpprime.h b/src/share/native/sun/security/ec/mpprime.h
deleted file mode 100644
index 78bcb18..0000000
--- a/src/share/native/sun/security/ec/mpprime.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- *
- * Utilities for finding and working with prime and pseudo-prime
- * integers
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
- *
- * The Initial Developer of the Original Code is
- * Michael J. Fromberger.
- * Portions created by the Initial Developer are Copyright (C) 1997
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MP_PRIME_H
-#define _MP_PRIME_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "mpi.h"
-
-extern const int prime_tab_size; /* number of primes available */
-extern const mp_digit prime_tab[];
-
-/* Tests for divisibility */
-mp_err mpp_divis(mp_int *a, mp_int *b);
-mp_err mpp_divis_d(mp_int *a, mp_digit d);
-
-/* Random selection */
-mp_err mpp_random(mp_int *a);
-mp_err mpp_random_size(mp_int *a, mp_size prec);
-
-/* Pseudo-primality testing */
-mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
-mp_err mpp_divis_primes(mp_int *a, mp_digit *np);
-mp_err mpp_fermat(mp_int *a, mp_digit w);
-mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
-mp_err mpp_pprime(mp_int *a, int nt);
-mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
- unsigned char *sieve, mp_size nSieve);
-mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong,
- unsigned long * nTries);
-
-#endif /* _MP_PRIME_H */
diff --git a/src/share/native/sun/security/ec/oid.c b/src/share/native/sun/security/ec/oid.c
deleted file mode 100644
index f3ced99..0000000
--- a/src/share/native/sun/security/ec/oid.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-#include "secoidt.h"
-
-#define CERTICOM_OID 0x2b, 0x81, 0x04
-#define SECG_OID CERTICOM_OID, 0x00
-
-#define ANSI_X962_OID 0x2a, 0x86, 0x48, 0xce, 0x3d
-#define ANSI_X962_CURVE_OID ANSI_X962_OID, 0x03
-#define ANSI_X962_GF2m_OID ANSI_X962_CURVE_OID, 0x00
-#define ANSI_X962_GFp_OID ANSI_X962_CURVE_OID, 0x01
-
-#define CONST_OID static const unsigned char
-
-/* ANSI X9.62 prime curve OIDs */
-/* NOTE: prime192v1 is the same as secp192r1, prime256v1 is the
- * same as secp256r1
- */
-CONST_OID ansiX962prime192v1[] = { ANSI_X962_GFp_OID, 0x01 };
-CONST_OID ansiX962prime192v2[] = { ANSI_X962_GFp_OID, 0x02 };
-CONST_OID ansiX962prime192v3[] = { ANSI_X962_GFp_OID, 0x03 };
-CONST_OID ansiX962prime239v1[] = { ANSI_X962_GFp_OID, 0x04 };
-CONST_OID ansiX962prime239v2[] = { ANSI_X962_GFp_OID, 0x05 };
-CONST_OID ansiX962prime239v3[] = { ANSI_X962_GFp_OID, 0x06 };
-CONST_OID ansiX962prime256v1[] = { ANSI_X962_GFp_OID, 0x07 };
-
-/* SECG prime curve OIDs */
-CONST_OID secgECsecp112r1[] = { SECG_OID, 0x06 };
-CONST_OID secgECsecp112r2[] = { SECG_OID, 0x07 };
-CONST_OID secgECsecp128r1[] = { SECG_OID, 0x1c };
-CONST_OID secgECsecp128r2[] = { SECG_OID, 0x1d };
-CONST_OID secgECsecp160k1[] = { SECG_OID, 0x09 };
-CONST_OID secgECsecp160r1[] = { SECG_OID, 0x08 };
-CONST_OID secgECsecp160r2[] = { SECG_OID, 0x1e };
-CONST_OID secgECsecp192k1[] = { SECG_OID, 0x1f };
-CONST_OID secgECsecp224k1[] = { SECG_OID, 0x20 };
-CONST_OID secgECsecp224r1[] = { SECG_OID, 0x21 };
-CONST_OID secgECsecp256k1[] = { SECG_OID, 0x0a };
-CONST_OID secgECsecp384r1[] = { SECG_OID, 0x22 };
-CONST_OID secgECsecp521r1[] = { SECG_OID, 0x23 };
-
-/* SECG characterisitic two curve OIDs */
-CONST_OID secgECsect113r1[] = {SECG_OID, 0x04 };
-CONST_OID secgECsect113r2[] = {SECG_OID, 0x05 };
-CONST_OID secgECsect131r1[] = {SECG_OID, 0x16 };
-CONST_OID secgECsect131r2[] = {SECG_OID, 0x17 };
-CONST_OID secgECsect163k1[] = {SECG_OID, 0x01 };
-CONST_OID secgECsect163r1[] = {SECG_OID, 0x02 };
-CONST_OID secgECsect163r2[] = {SECG_OID, 0x0f };
-CONST_OID secgECsect193r1[] = {SECG_OID, 0x18 };
-CONST_OID secgECsect193r2[] = {SECG_OID, 0x19 };
-CONST_OID secgECsect233k1[] = {SECG_OID, 0x1a };
-CONST_OID secgECsect233r1[] = {SECG_OID, 0x1b };
-CONST_OID secgECsect239k1[] = {SECG_OID, 0x03 };
-CONST_OID secgECsect283k1[] = {SECG_OID, 0x10 };
-CONST_OID secgECsect283r1[] = {SECG_OID, 0x11 };
-CONST_OID secgECsect409k1[] = {SECG_OID, 0x24 };
-CONST_OID secgECsect409r1[] = {SECG_OID, 0x25 };
-CONST_OID secgECsect571k1[] = {SECG_OID, 0x26 };
-CONST_OID secgECsect571r1[] = {SECG_OID, 0x27 };
-
-/* ANSI X9.62 characteristic two curve OIDs */
-CONST_OID ansiX962c2pnb163v1[] = { ANSI_X962_GF2m_OID, 0x01 };
-CONST_OID ansiX962c2pnb163v2[] = { ANSI_X962_GF2m_OID, 0x02 };
-CONST_OID ansiX962c2pnb163v3[] = { ANSI_X962_GF2m_OID, 0x03 };
-CONST_OID ansiX962c2pnb176v1[] = { ANSI_X962_GF2m_OID, 0x04 };
-CONST_OID ansiX962c2tnb191v1[] = { ANSI_X962_GF2m_OID, 0x05 };
-CONST_OID ansiX962c2tnb191v2[] = { ANSI_X962_GF2m_OID, 0x06 };
-CONST_OID ansiX962c2tnb191v3[] = { ANSI_X962_GF2m_OID, 0x07 };
-CONST_OID ansiX962c2onb191v4[] = { ANSI_X962_GF2m_OID, 0x08 };
-CONST_OID ansiX962c2onb191v5[] = { ANSI_X962_GF2m_OID, 0x09 };
-CONST_OID ansiX962c2pnb208w1[] = { ANSI_X962_GF2m_OID, 0x0a };
-CONST_OID ansiX962c2tnb239v1[] = { ANSI_X962_GF2m_OID, 0x0b };
-CONST_OID ansiX962c2tnb239v2[] = { ANSI_X962_GF2m_OID, 0x0c };
-CONST_OID ansiX962c2tnb239v3[] = { ANSI_X962_GF2m_OID, 0x0d };
-CONST_OID ansiX962c2onb239v4[] = { ANSI_X962_GF2m_OID, 0x0e };
-CONST_OID ansiX962c2onb239v5[] = { ANSI_X962_GF2m_OID, 0x0f };
-CONST_OID ansiX962c2pnb272w1[] = { ANSI_X962_GF2m_OID, 0x10 };
-CONST_OID ansiX962c2pnb304w1[] = { ANSI_X962_GF2m_OID, 0x11 };
-CONST_OID ansiX962c2tnb359v1[] = { ANSI_X962_GF2m_OID, 0x12 };
-CONST_OID ansiX962c2pnb368w1[] = { ANSI_X962_GF2m_OID, 0x13 };
-CONST_OID ansiX962c2tnb431r1[] = { ANSI_X962_GF2m_OID, 0x14 };
-
-#define OI(x) { siDEROID, (unsigned char *)x, sizeof x }
-#ifndef SECOID_NO_STRINGS
-#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, desc, mech, ext }
-#else
-#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, 0, mech, ext }
-#endif
-
-#define CKM_INVALID_MECHANISM 0xffffffffUL
-
-/* XXX this is incorrect */
-#define INVALID_CERT_EXTENSION 1
-
-#define CKM_ECDSA 0x00001041
-#define CKM_ECDSA_SHA1 0x00001042
-#define CKM_ECDH1_DERIVE 0x00001050
-
-static SECOidData ANSI_prime_oids[] = {
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
- OD( ansiX962prime192v1, ECCurve_NIST_P192,
- "ANSI X9.62 elliptic curve prime192v1 (aka secp192r1, NIST P-192)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime192v2, ECCurve_X9_62_PRIME_192V2,
- "ANSI X9.62 elliptic curve prime192v2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime192v3, ECCurve_X9_62_PRIME_192V3,
- "ANSI X9.62 elliptic curve prime192v3",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime239v1, ECCurve_X9_62_PRIME_239V1,
- "ANSI X9.62 elliptic curve prime239v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime239v2, ECCurve_X9_62_PRIME_239V2,
- "ANSI X9.62 elliptic curve prime239v2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime239v3, ECCurve_X9_62_PRIME_239V3,
- "ANSI X9.62 elliptic curve prime239v3",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962prime256v1, ECCurve_NIST_P256,
- "ANSI X9.62 elliptic curve prime256v1 (aka secp256r1, NIST P-256)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION )
-};
-
-static SECOidData SECG_oids[] = {
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
- OD( secgECsect163k1, ECCurve_NIST_K163,
- "SECG elliptic curve sect163k1 (aka NIST K-163)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect163r1, ECCurve_SECG_CHAR2_163R1,
- "SECG elliptic curve sect163r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect239k1, ECCurve_SECG_CHAR2_239K1,
- "SECG elliptic curve sect239k1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect113r1, ECCurve_SECG_CHAR2_113R1,
- "SECG elliptic curve sect113r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect113r2, ECCurve_SECG_CHAR2_113R2,
- "SECG elliptic curve sect113r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp112r1, ECCurve_SECG_PRIME_112R1,
- "SECG elliptic curve secp112r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp112r2, ECCurve_SECG_PRIME_112R2,
- "SECG elliptic curve secp112r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp160r1, ECCurve_SECG_PRIME_160R1,
- "SECG elliptic curve secp160r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp160k1, ECCurve_SECG_PRIME_160K1,
- "SECG elliptic curve secp160k1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp256k1, ECCurve_SECG_PRIME_256K1,
- "SECG elliptic curve secp256k1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- OD( secgECsect163r2, ECCurve_NIST_B163,
- "SECG elliptic curve sect163r2 (aka NIST B-163)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect283k1, ECCurve_NIST_K283,
- "SECG elliptic curve sect283k1 (aka NIST K-283)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect283r1, ECCurve_NIST_B283,
- "SECG elliptic curve sect283r1 (aka NIST B-283)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- OD( secgECsect131r1, ECCurve_SECG_CHAR2_131R1,
- "SECG elliptic curve sect131r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect131r2, ECCurve_SECG_CHAR2_131R2,
- "SECG elliptic curve sect131r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect193r1, ECCurve_SECG_CHAR2_193R1,
- "SECG elliptic curve sect193r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect193r2, ECCurve_SECG_CHAR2_193R2,
- "SECG elliptic curve sect193r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect233k1, ECCurve_NIST_K233,
- "SECG elliptic curve sect233k1 (aka NIST K-233)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect233r1, ECCurve_NIST_B233,
- "SECG elliptic curve sect233r1 (aka NIST B-233)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp128r1, ECCurve_SECG_PRIME_128R1,
- "SECG elliptic curve secp128r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp128r2, ECCurve_SECG_PRIME_128R2,
- "SECG elliptic curve secp128r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp160r2, ECCurve_SECG_PRIME_160R2,
- "SECG elliptic curve secp160r2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp192k1, ECCurve_SECG_PRIME_192K1,
- "SECG elliptic curve secp192k1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp224k1, ECCurve_SECG_PRIME_224K1,
- "SECG elliptic curve secp224k1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp224r1, ECCurve_NIST_P224,
- "SECG elliptic curve secp224r1 (aka NIST P-224)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp384r1, ECCurve_NIST_P384,
- "SECG elliptic curve secp384r1 (aka NIST P-384)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsecp521r1, ECCurve_NIST_P521,
- "SECG elliptic curve secp521r1 (aka NIST P-521)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect409k1, ECCurve_NIST_K409,
- "SECG elliptic curve sect409k1 (aka NIST K-409)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect409r1, ECCurve_NIST_B409,
- "SECG elliptic curve sect409r1 (aka NIST B-409)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect571k1, ECCurve_NIST_K571,
- "SECG elliptic curve sect571k1 (aka NIST K-571)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( secgECsect571r1, ECCurve_NIST_B571,
- "SECG elliptic curve sect571r1 (aka NIST B-571)",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION )
-};
-
-static SECOidData ANSI_oids[] = {
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
-
- /* ANSI X9.62 named elliptic curves (characteristic two field) */
- OD( ansiX962c2pnb163v1, ECCurve_X9_62_CHAR2_PNB163V1,
- "ANSI X9.62 elliptic curve c2pnb163v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2pnb163v2, ECCurve_X9_62_CHAR2_PNB163V2,
- "ANSI X9.62 elliptic curve c2pnb163v2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2pnb163v3, ECCurve_X9_62_CHAR2_PNB163V3,
- "ANSI X9.62 elliptic curve c2pnb163v3",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2pnb176v1, ECCurve_X9_62_CHAR2_PNB176V1,
- "ANSI X9.62 elliptic curve c2pnb176v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb191v1, ECCurve_X9_62_CHAR2_TNB191V1,
- "ANSI X9.62 elliptic curve c2tnb191v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb191v2, ECCurve_X9_62_CHAR2_TNB191V2,
- "ANSI X9.62 elliptic curve c2tnb191v2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb191v3, ECCurve_X9_62_CHAR2_TNB191V3,
- "ANSI X9.62 elliptic curve c2tnb191v3",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- OD( ansiX962c2pnb208w1, ECCurve_X9_62_CHAR2_PNB208W1,
- "ANSI X9.62 elliptic curve c2pnb208w1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb239v1, ECCurve_X9_62_CHAR2_TNB239V1,
- "ANSI X9.62 elliptic curve c2tnb239v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb239v2, ECCurve_X9_62_CHAR2_TNB239V2,
- "ANSI X9.62 elliptic curve c2tnb239v2",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb239v3, ECCurve_X9_62_CHAR2_TNB239V3,
- "ANSI X9.62 elliptic curve c2tnb239v3",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- { { siDEROID, NULL, 0 }, ECCurve_noName,
- "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION },
- OD( ansiX962c2pnb272w1, ECCurve_X9_62_CHAR2_PNB272W1,
- "ANSI X9.62 elliptic curve c2pnb272w1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2pnb304w1, ECCurve_X9_62_CHAR2_PNB304W1,
- "ANSI X9.62 elliptic curve c2pnb304w1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb359v1, ECCurve_X9_62_CHAR2_TNB359V1,
- "ANSI X9.62 elliptic curve c2tnb359v1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2pnb368w1, ECCurve_X9_62_CHAR2_PNB368W1,
- "ANSI X9.62 elliptic curve c2pnb368w1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION ),
- OD( ansiX962c2tnb431r1, ECCurve_X9_62_CHAR2_TNB431R1,
- "ANSI X9.62 elliptic curve c2tnb431r1",
- CKM_INVALID_MECHANISM,
- INVALID_CERT_EXTENSION )
-};
-
-SECOidData *
-SECOID_FindOID(const SECItem *oid)
-{
- SECOidData *po;
- SECOidData *ret;
- int i;
-
- if (oid->len == 8) {
- if (oid->data[6] == 0x00) {
- /* XXX bounds check */
- po = &ANSI_oids[oid->data[7]];
- if (memcmp(oid->data, po->oid.data, 8) == 0)
- ret = po;
- }
- if (oid->data[6] == 0x01) {
- /* XXX bounds check */
- po = &ANSI_prime_oids[oid->data[7]];
- if (memcmp(oid->data, po->oid.data, 8) == 0)
- ret = po;
- }
- } else if (oid->len == 5) {
- /* XXX bounds check */
- po = &SECG_oids[oid->data[4]];
- if (memcmp(oid->data, po->oid.data, 5) == 0)
- ret = po;
- } else {
- ret = NULL;
- }
- return(ret);
-}
-
-ECCurveName
-SECOID_FindOIDTag(const SECItem *oid)
-{
- SECOidData *oiddata;
-
- oiddata = SECOID_FindOID (oid);
- if (oiddata == NULL)
- return ECCurve_noName;
-
- return oiddata->offset;
-}
diff --git a/src/share/native/sun/security/ec/secitem.c b/src/share/native/sun/security/ec/secitem.c
deleted file mode 100644
index d9daacc..0000000
--- a/src/share/native/sun/security/ec/secitem.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Support routines for SECItem data structure.
- *
- * $Id: secitem.c,v 1.14 2006/05/22 22:24:34 wtchang%redhat.com Exp $
- */
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#ifndef __linux__
-#include <sys/systm.h>
-#endif /* __linux__ */
-#include <sys/param.h>
-#endif /* _WIN32 */
-
-#ifdef _KERNEL
-#include <sys/kmem.h>
-#else
-#include <string.h>
-
-#ifndef _WIN32
-#include <strings.h>
-#endif /* _WIN32 */
-
-#include <assert.h>
-#endif
-#include "ec.h"
-#include "ecl-curve.h"
-#include "ecc_impl.h"
-
-void SECITEM_FreeItem(SECItem *, PRBool);
-
-SECItem *
-SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len,
- int kmflag)
-{
- SECItem *result = NULL;
- void *mark = NULL;
-
- if (arena != NULL) {
- mark = PORT_ArenaMark(arena);
- }
-
- if (item == NULL) {
- if (arena != NULL) {
- result = PORT_ArenaZAlloc(arena, sizeof(SECItem), kmflag);
- } else {
- result = PORT_ZAlloc(sizeof(SECItem), kmflag);
- }
- if (result == NULL) {
- goto loser;
- }
- } else {
- PORT_Assert(item->data == NULL);
- result = item;
- }
-
- result->len = len;
- if (len) {
- if (arena != NULL) {
- result->data = PORT_ArenaAlloc(arena, len, kmflag);
- } else {
- result->data = PORT_Alloc(len, kmflag);
- }
- if (result->data == NULL) {
- goto loser;
- }
- } else {
- result->data = NULL;
- }
-
- if (mark) {
- PORT_ArenaUnmark(arena, mark);
- }
- return(result);
-
-loser:
- if ( arena != NULL ) {
- if (mark) {
- PORT_ArenaRelease(arena, mark);
- }
- if (item != NULL) {
- item->data = NULL;
- item->len = 0;
- }
- } else {
- if (result != NULL) {
- SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
- }
- /*
- * If item is not NULL, the above has set item->data and
- * item->len to 0.
- */
- }
- return(NULL);
-}
-
-SECStatus
-SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, const SECItem *from,
- int kmflag)
-{
- to->type = from->type;
- if (from->data && from->len) {
- if ( arena ) {
- to->data = (unsigned char*) PORT_ArenaAlloc(arena, from->len,
- kmflag);
- } else {
- to->data = (unsigned char*) PORT_Alloc(from->len, kmflag);
- }
-
- if (!to->data) {
- return SECFailure;
- }
- PORT_Memcpy(to->data, from->data, from->len);
- to->len = from->len;
- } else {
- to->data = 0;
- to->len = 0;
- }
- return SECSuccess;
-}
-
-void
-SECITEM_FreeItem(SECItem *zap, PRBool freeit)
-{
- if (zap) {
-#ifdef _KERNEL
- kmem_free(zap->data, zap->len);
-#else
- free(zap->data);
-#endif
- zap->data = 0;
- zap->len = 0;
- if (freeit) {
-#ifdef _KERNEL
- kmem_free(zap, sizeof (SECItem));
-#else
- free(zap);
-#endif
- }
- }
-}
diff --git a/src/share/native/sun/security/ec/secoidt.h b/src/share/native/sun/security/ec/secoidt.h
deleted file mode 100644
index 0935388..0000000
--- a/src/share/native/sun/security/ec/secoidt.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* *********************************************************************
- *
- * Sun elects to have this file available under and governed by the
- * Mozilla Public License Version 1.1 ("MPL") (see
- * http://www.mozilla.org/MPL/ for full license text). For the avoidance
- * of doubt and subject to the following, Sun also elects to allow
- * licensees to use this file under the MPL, the GNU General Public
- * License version 2 only or the Lesser General Public License version
- * 2.1 only. Any references to the "GNU General Public License version 2
- * or later" or "GPL" in the following shall be construed to mean the
- * GNU General Public License version 2 only. Any references to the "GNU
- * Lesser General Public License version 2.1 or later" or "LGPL" in the
- * following shall be construed to mean the GNU Lesser General Public
- * License version 2.1 only. However, the following notice accompanied
- * the original version of this file:
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (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.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1994-2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- *********************************************************************** */
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SECOIDT_H_
-#define _SECOIDT_H_
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * secoidt.h - public data structures for ASN.1 OID functions
- *
- * $Id: secoidt.h,v 1.23 2007/05/05 22:45:16 nelson%bolyard.com Exp $
- */
-
-typedef struct SECOidDataStr SECOidData;
-typedef struct SECAlgorithmIDStr SECAlgorithmID;
-
-/*
-** An X.500 algorithm identifier
-*/
-struct SECAlgorithmIDStr {
- SECItem algorithm;
- SECItem parameters;
-};
-
-#define SEC_OID_SECG_EC_SECP192R1 SEC_OID_ANSIX962_EC_PRIME192V1
-#define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1
-#define SEC_OID_PKCS12_KEY_USAGE SEC_OID_X509_KEY_USAGE
-
-/* fake OID for DSS sign/verify */
-#define SEC_OID_SHA SEC_OID_MISS_DSS
-
-typedef enum {
- INVALID_CERT_EXTENSION = 0,
- UNSUPPORTED_CERT_EXTENSION = 1,
- SUPPORTED_CERT_EXTENSION = 2
-} SECSupportExtenTag;
-
-struct SECOidDataStr {
- SECItem oid;
- ECCurveName offset;
- const char * desc;
- unsigned long mechanism;
- SECSupportExtenTag supportedExtension;
- /* only used for x.509 v3 extensions, so
- that we can print the names of those
- extensions that we don't even support */
-};
-
-#endif /* _SECOIDT_H_ */
diff --git a/src/solaris/classes/sun/awt/X11/InfoWindow.java b/src/solaris/classes/sun/awt/X11/InfoWindow.java
index ea485b2..d0abaa0 100644
--- a/src/solaris/classes/sun/awt/X11/InfoWindow.java
+++ b/src/solaris/classes/sun/awt/X11/InfoWindow.java
@@ -31,8 +31,6 @@
import sun.awt.*;
import java.awt.image.*;
import java.text.BreakIterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
import java.util.concurrent.ArrayBlockingQueue;
import java.security.AccessController;
import java.security.PrivilegedAction;
diff --git a/src/solaris/classes/sun/awt/X11/ListHelper.java b/src/solaris/classes/sun/awt/X11/ListHelper.java
index 3291b1e..38e94e0 100644
--- a/src/solaris/classes/sun/awt/X11/ListHelper.java
+++ b/src/solaris/classes/sun/awt/X11/ListHelper.java
@@ -33,7 +33,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import sun.awt.motif.X11FontMetrics;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
// FIXME: implement multi-select
/*
@@ -43,7 +43,7 @@
* posting of Item or ActionEvents
*/
public class ListHelper implements XScrollbarClient {
- private static final Logger log = Logger.getLogger("sun.awt.X11.ListHelper");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.ListHelper");
private final int FOCUS_INSET = 1;
@@ -263,7 +263,7 @@
}
public int y2index(int y) {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("y=" + y +", firstIdx=" + firstDisplayedIndex() +", itemHeight=" + getItemHeight()
+ ",item_margin=" + ITEM_MARGIN);
}
diff --git a/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java b/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java
index eee63ae..fded9dc 100644
--- a/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java
+++ b/src/solaris/classes/sun/awt/X11/UnsafeXDisposerRecord.java
@@ -25,10 +25,10 @@
package sun.awt.X11;
import sun.misc.Unsafe;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord {
- private static final Logger log = Logger.getLogger("sun.awt.X11.UnsafeXDisposerRecord");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.UnsafeXDisposerRecord");
private static Unsafe unsafe = XlibWrapper.unsafe;
final long[] unsafe_ptrs, x_ptrs;
final String name;
@@ -59,11 +59,11 @@
XToolkit.awtLock();
try {
if (!disposed) {
- if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(Level.WARNING)) {
+ if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(PlatformLogger.WARNING)) {
if (place != null) {
- log.log(Level.WARNING, name + " object was not disposed before finalization!", place);
+ log.warning(name + " object was not disposed before finalization!", place);
} else {
- log.log(Level.WARNING, name + " object was not disposed before finalization!");
+ log.warning(name + " object was not disposed before finalization!");
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XAWTXSettings.java b/src/solaris/classes/sun/awt/X11/XAWTXSettings.java
index e022ae9..c2a3d3c 100644
--- a/src/solaris/classes/sun/awt/X11/XAWTXSettings.java
+++ b/src/solaris/classes/sun/awt/X11/XAWTXSettings.java
@@ -35,15 +35,14 @@
import java.util.*;
import java.awt.*;
import sun.awt.XSettings;
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
class XAWTXSettings extends XSettings implements XMSelectionListener {
private final XAtom xSettingsPropertyAtom = XAtom.get("_XSETTINGS_SETTINGS");
- private static Logger log = Logger.getLogger("sun.awt.X11.XAWTXSettings");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XAWTXSettings");
/* The maximal length of the property data. */
public static final long MAX_LENGTH = 1000000;
@@ -56,7 +55,7 @@
}
void initXSettings() {
- if (log.isLoggable(Level.FINE)) log.fine("Initializing XAWT XSettings");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Initializing XAWT XSettings");
settings = new XMSelection("_XSETTINGS");
settings.addSelectionListener(this);
initPerScreenXSettings();
@@ -67,12 +66,12 @@
}
public void ownerDeath(int screen, XMSelection sel, long deadOwner) {
- if (log.isLoggable(Level.FINE)) log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen);
}
public void ownerChanged(int screen, XMSelection sel, long newOwner, long data, long timestamp) {
- if (log.isLoggable(Level.FINE)) log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen );
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen );
}
public void selectionChanged(int screen, XMSelection sel, long owner , XPropertyEvent event) {
@@ -81,7 +80,7 @@
}
void initPerScreenXSettings() {
- if (log.isLoggable(Level.FINE)) log.fine("Updating Per XSettings changes");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Updating Per XSettings changes");
/*
* As toolkit cannot yet cope with per-screen desktop properties,
@@ -115,7 +114,7 @@
}
private Map getUpdatedSettings(final long owner) {
- if (log.isLoggable(Level.FINE)) log.fine("owner =" + owner);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("owner =" + owner);
if (0 == owner) {
return null;
}
@@ -129,13 +128,13 @@
int status = getter.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance());
if (status != XConstants.Success || getter.getData() == 0) {
- if (log.isLoggable(Level.FINE)) log.fine("OH OH : getter failed status = " + status );
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("OH OH : getter failed status = " + status );
settings = null;
}
long ptr = getter.getData();
- if (log.isLoggable(Level.FINE)) log.fine("noItems = " + getter.getNumberOfItems());
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("noItems = " + getter.getNumberOfItems());
byte array[] = Native.toBytes(ptr,getter.getNumberOfItems());
if (array != null) {
settings = update(array);
diff --git a/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java b/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
index 1655be6..f53d68d 100644
--- a/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
@@ -33,7 +33,7 @@
import java.util.ArrayList;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.java2d.SurfaceData;
import sun.java2d.SunGraphics2D;
@@ -49,7 +49,7 @@
*
************************************************/
- private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseMenuWindow");
/*
* Colors are calculated using MotifColorUtilities class
@@ -330,7 +330,7 @@
items.add(mp);
}
} else {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("WARNING: Attempt to add menu item without a peer");
}
}
@@ -351,7 +351,7 @@
if (index < items.size()) {
items.remove(index);
} else {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("WARNING: Attempt to remove non-existing menu item, index : " + index + ", item count : " + items.size());
}
}
@@ -386,7 +386,7 @@
XMenuPeer showingSubmenu = getShowingSubmenu();
int newSelectedIndex = (item != null) ? items.indexOf(item) : -1;
if (this.selectedIndex != newSelectedIndex) {
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("Selected index changed, was : " + this.selectedIndex + ", new : " + newSelectedIndex);
}
this.selectedIndex = newSelectedIndex;
@@ -426,7 +426,7 @@
try {
synchronized(getMenuTreeLock()) {
if (showingSubmenu != submenuToShow) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finest("Changing showing submenu");
}
if (showingSubmenu != null) {
@@ -1122,7 +1122,7 @@
* that grabs input focus
*/
void doHandleJavaKeyEvent(KeyEvent event) {
- if (log.isLoggable(Level.FINER)) log.finer(event.toString());
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer(event.toString());
if (event.getID() != KeyEvent.KEY_PRESSED) {
return;
}
diff --git a/src/solaris/classes/sun/awt/X11/XBaseWindow.java b/src/solaris/classes/sun/awt/X11/XBaseWindow.java
index 3577b5f..e531583 100644
--- a/src/solaris/classes/sun/awt/X11/XBaseWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XBaseWindow.java
@@ -27,15 +27,15 @@
import java.awt.*;
import sun.awt.*;
-import java.util.logging.*;
import java.util.*;
+import sun.util.logging.PlatformLogger;
public class XBaseWindow {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XBaseWindow");
- private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XBaseWindow");
- private static final Logger eventLog = Logger.getLogger("sun.awt.X11.event.XBaseWindow");
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XBaseWindow");
- private static final Logger grabLog = Logger.getLogger("sun.awt.X11.grab.XBaseWindow");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseWindow");
+ private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XBaseWindow");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XBaseWindow");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XBaseWindow");
+ private static final PlatformLogger grabLog = PlatformLogger.getLogger("sun.awt.X11.grab.XBaseWindow");
public static final String
PARENT_WINDOW = "parent window", // parent window, Long
@@ -160,7 +160,7 @@
* with class-specific values and perform post-initialization actions.
*/
void postInit(XCreateWindowParams params) {
- if (log.isLoggable(Level.FINE)) log.fine("WM name is " + getWMName());
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("WM name is " + getWMName());
updateWMName();
// Set WM_CLIENT_LEADER property
@@ -198,7 +198,7 @@
awtUnlock();
throw re;
} catch (Throwable t) {
- log.log(Level.WARNING, "Exception during peer initialization", t);
+ log.warning("Exception during peer initialization", t);
awtLock();
initialising = InitialiseState.FAILED_INITIALISATION;
awtLockNotifyAll();
@@ -360,7 +360,7 @@
value_mask |= XConstants.CWBitGravity;
}
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Creating window for " + this + " with the following attributes: \n" + params);
}
window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(),
@@ -480,7 +480,7 @@
}
public void setSizeHints(long flags, int x, int y, int width, int height) {
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
XToolkit.awtLock();
try {
XSizeHints hints = getHints();
@@ -541,7 +541,7 @@
flags |= XUtilConstants.PWinGravity;
hints.set_flags(flags);
hints.set_win_gravity((int)XConstants.NorthWestGravity);
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
", values " + hints);
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData);
} finally {
@@ -593,7 +593,7 @@
public void xRequestFocus(long time) {
XToolkit.awtLock();
try {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time);
} finally {
XToolkit.awtUnlock();
@@ -602,7 +602,7 @@
public void xRequestFocus() {
XToolkit.awtLock();
try {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow());
} finally {
XToolkit.awtUnlock();
@@ -619,7 +619,7 @@
}
public void xSetVisible(boolean visible) {
- if (log.isLoggable(Level.FINE)) log.fine("Setting visible on " + this + " to " + visible);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
XToolkit.awtLock();
try {
this.visible = visible;
@@ -824,9 +824,7 @@
* The active grab overrides activated automatic grab.
*/
public boolean grabInput() {
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "Grab input on {0}", new Object[] {String.valueOf(this)});
- }
+ grabLog.fine("Grab input on {0}", this);
XToolkit.awtLock();
try {
@@ -889,10 +887,7 @@
XToolkit.awtLock();
try {
XBaseWindow grabWindow = XAwtState.getGrabWindow();
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "UnGrab input on {0}",
- new Object[] {String.valueOf(grabWindow)});
- }
+ grabLog.fine("UnGrab input on {0}", grabWindow);
if (grabWindow != null) {
grabWindow.ungrabInputImpl();
if (!XToolkit.getSunAwtDisableGrab()) {
@@ -934,7 +929,7 @@
mapped = false;
}
public void handleReparentNotifyEvent(XEvent xev) {
- if (eventLog.isLoggable(Level.FINER)) {
+ if (eventLog.isLoggable(PlatformLogger.FINER)) {
XReparentEvent msg = xev.get_xreparent();
eventLog.finer(msg.toString());
}
@@ -944,8 +939,8 @@
if (XPropertyCache.isCachingSupported()) {
XPropertyCache.clearCache(window, XAtom.get(msg.get_atom()));
}
- if (eventLog.isLoggable(Level.FINER)) {
- eventLog.log(Level.FINER, "{0}", new Object[] {String.valueOf(msg)});
+ if (eventLog.isLoggable(PlatformLogger.FINER)) {
+ eventLog.finer("{0}", msg);
}
}
@@ -974,7 +969,7 @@
}
public void handleClientMessage(XEvent xev) {
- if (eventLog.isLoggable(Level.FINER)) {
+ if (eventLog.isLoggable(PlatformLogger.FINER)) {
XClientMessageEvent msg = xev.get_xclient();
eventLog.finer(msg.toString());
}
@@ -1026,10 +1021,7 @@
}
public void handleConfigureNotifyEvent(XEvent xev) {
XConfigureEvent xe = xev.get_xconfigure();
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "Configure, {0}",
- new Object[] {String.valueOf(xe)});
- }
+ insLog.finer("Configure, {0}", xe);
x = xe.get_x();
y = xe.get_y();
width = xe.get_width();
@@ -1080,7 +1072,7 @@
}
public void dispatchEvent(XEvent xev) {
- if (eventLog.isLoggable(Level.FINEST)) eventLog.finest(xev.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xev.toString());
int type = xev.get_type();
if (isDisposed()) {
diff --git a/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java b/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java
index 4f57de6..f819d45 100644
--- a/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java
@@ -32,11 +32,11 @@
import javax.swing.plaf.basic.BasicGraphicsUtils;
import java.awt.geom.AffineTransform;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XCheckboxPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XCheckboxPeer");
private static final Insets focusInsets = new Insets(0,0,0,0);
private static final Insets borderInsets = new Insets(2,2,2,2);
@@ -172,7 +172,7 @@
Checkbox cb = (Checkbox) e.getSource();
if (cb.contains(e.getX(), e.getY())) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("mousePressed() on " + target.getName() + " : armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled());
}
@@ -190,7 +190,7 @@
}
public void mouseReleased(MouseEvent e) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("mouseReleased() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled());
}
@@ -215,7 +215,7 @@
}
public void mouseEntered(MouseEvent e) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("mouseEntered() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled());
}
@@ -226,7 +226,7 @@
}
public void mouseExited(MouseEvent e) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("mouseExited() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled());
}
diff --git a/src/solaris/classes/sun/awt/X11/XChoicePeer.java b/src/solaris/classes/sun/awt/X11/XChoicePeer.java
index 510d75e..4e84d39 100644
--- a/src/solaris/classes/sun/awt/X11/XChoicePeer.java
+++ b/src/solaris/classes/sun/awt/X11/XChoicePeer.java
@@ -28,7 +28,7 @@
import java.awt.*;
import java.awt.peer.*;
import java.awt.event.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
// FIXME: tab traversal should be disabled when mouse is captured (4816336)
@@ -43,7 +43,7 @@
// TODO: make painting more efficient (i.e. when down arrow is pressed, only two items should need to be repainted.
public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XChoicePeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XChoicePeer");
private static final int MAX_UNFURLED_ITEMS = 10; // Maximum number of
// items to be displayed
@@ -892,7 +892,7 @@
if (transX > 0 && transX < width &&
transY > 0 && transY < height) {
int newIdx = helper.y2index(transY);
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("transX=" + transX + ", transY=" + transY
+ ",width=" + width + ", height=" + height
+ ", newIdx=" + newIdx + " on " + target);
diff --git a/src/solaris/classes/sun/awt/X11/XComponentPeer.java b/src/solaris/classes/sun/awt/X11/XComponentPeer.java
index 606f6de..a0ca6ef 100644
--- a/src/solaris/classes/sun/awt/X11/XComponentPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XComponentPeer.java
@@ -66,7 +66,8 @@
import java.util.HashSet;
import java.util.Set;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
import sun.awt.*;
import sun.awt.event.IgnorePaintEvent;
import sun.awt.image.SunVolatileImage;
@@ -77,12 +78,12 @@
public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer,
BackBufferCapsProvider
{
- private static final Logger log = Logger.getLogger("sun.awt.X11.XComponentPeer");
- private static final Logger buffersLog = Logger.getLogger("sun.awt.X11.XComponentPeer.multibuffer");
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XComponentPeer");
- private static final Logger fontLog = Logger.getLogger("sun.awt.X11.font.XComponentPeer");
- private static final Logger enableLog = Logger.getLogger("sun.awt.X11.enable.XComponentPeer");
- private static final Logger shapeLog = Logger.getLogger("sun.awt.X11.shape.XComponentPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer");
+ private static final PlatformLogger buffersLog = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer.multibuffer");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XComponentPeer");
+ private static final PlatformLogger fontLog = PlatformLogger.getLogger("sun.awt.X11.font.XComponentPeer");
+ private static final PlatformLogger enableLog = PlatformLogger.getLogger("sun.awt.X11.enable.XComponentPeer");
+ private static final PlatformLogger shapeLog = PlatformLogger.getLogger("sun.awt.X11.shape.XComponentPeer");
boolean paintPending = false;
boolean isLayouting = false;
@@ -159,7 +160,7 @@
break;
}
}
- enableLog.log(Level.FINE, "Initial enable state: {0}", new Object[] {Boolean.valueOf(enabled)});
+ enableLog.fine("Initial enable state: {0}", Boolean.valueOf(enabled));
if (target.isVisible()) {
setVisible(true);
@@ -253,9 +254,7 @@
* Called when component receives focus
*/
public void focusGained(FocusEvent e) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "{0}", new Object[] {String.valueOf(e)});
- }
+ focusLog.fine("{0}", e);
bHasFocus = true;
}
@@ -263,9 +262,7 @@
* Called when component loses focus
*/
public void focusLost(FocusEvent e) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "{0}", new Object[] {String.valueOf(e)});
- }
+ focusLog.fine("{0}", e);
bHasFocus = false;
}
@@ -337,7 +334,7 @@
case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
// Currently we just generate focus events like we deal with lightweight instead of calling
// XSetInputFocus on native window
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Proceeding with request to " +
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Proceeding with request to " +
lightweightChild + " in " + target);
/**
* The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight
@@ -362,7 +359,7 @@
*/
boolean res = wpeer.requestWindowFocus(null);
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Requested window focus: " + res);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Requested window focus: " + res);
// If parent window can be made focused and has been made focused(synchronously)
// then we can proceed with children, otherwise we retreat.
if (!(res && parentWindow.isFocused())) {
@@ -382,13 +379,13 @@
}
private boolean rejectFocusRequestHelper(String logMsg) {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer(logMsg);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg);
XKeyboardFocusManagerPeer.removeLastFocusRequest(target);
return false;
}
void handleJavaFocusEvent(AWTEvent e) {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer(e.toString());
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(e.toString());
if (e.getID() == FocusEvent.FOCUS_GAINED) {
focusGained((FocusEvent)e);
} else {
@@ -418,10 +415,7 @@
* @see java.awt.peer.ComponentPeer
*/
public void setEnabled(boolean value) {
- if (enableLog.isLoggable(Level.FINE)) {
- enableLog.log(Level.FINE, "{0}ing {1}",
- new Object[] {(value?"Enabl":"Disabl"), String.valueOf(this)});
- }
+ enableLog.fine("{0}ing {1}", (value?"Enabl":"Disabl"), this);
boolean repaintNeeded = (enabled != value);
enabled = value;
if (target instanceof Container) {
@@ -697,7 +691,7 @@
}
public void setBackground(Color c) {
- if (log.isLoggable(Level.FINE)) log.fine("Set background to " + c);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set background to " + c);
synchronized (getStateLock()) {
background = c;
}
@@ -706,7 +700,7 @@
}
public void setForeground(Color c) {
- if (log.isLoggable(Level.FINE)) log.fine("Set foreground to " + c);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set foreground to " + c);
synchronized (getStateLock()) {
foreground = c;
}
@@ -725,7 +719,7 @@
* @since JDK1.0
*/
public FontMetrics getFontMetrics(Font font) {
- if (fontLog.isLoggable(Level.FINE)) fontLog.fine("Getting font metrics for " + font);
+ if (fontLog.isLoggable(PlatformLogger.FINE)) fontLog.fine("Getting font metrics for " + font);
return sun.font.FontDesignMetrics.getMetrics(font);
}
@@ -1195,7 +1189,7 @@
public void createBuffers(int numBuffers, BufferCapabilities caps)
throws AWTException
{
- if (buffersLog.isLoggable(Level.FINE)) {
+ if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("createBuffers(" + numBuffers + ", " + caps + ")");
}
// set the caps first, they're used when creating the bb
@@ -1213,7 +1207,7 @@
public void flip(int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction)
{
- if (buffersLog.isLoggable(Level.FINE)) {
+ if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("flip(" + flipAction + ")");
}
if (backBuffer == 0) {
@@ -1224,7 +1218,7 @@
}
public Image getBackBuffer() {
- if (buffersLog.isLoggable(Level.FINE)) {
+ if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("getBackBuffer()");
}
if (backBuffer == 0) {
@@ -1234,7 +1228,7 @@
}
public void destroyBuffers() {
- if (buffersLog.isLoggable(Level.FINE)) {
+ if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("destroyBuffers()");
}
graphicsConfig.destroyBackBuffer(backBuffer);
@@ -1269,10 +1263,7 @@
* ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify
*/
protected boolean isEventDisabled(XEvent e) {
- if (enableLog.isLoggable(Level.FINEST)) {
- enableLog.log(Level.FINEST, "Component is {1}, checking for disabled event {0}",
- new Object[] {String.valueOf(e), (isEnabled()?"enabled":"disable")});
- }
+ enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
if (!isEnabled()) {
switch (e.get_type()) {
case XConstants.ButtonPress:
@@ -1282,9 +1273,7 @@
case XConstants.EnterNotify:
case XConstants.LeaveNotify:
case XConstants.MotionNotify:
- if (enableLog.isLoggable(Level.FINER)) {
- enableLog.log(Level.FINER, "Event {0} is disable", new Object[] {String.valueOf(e)});
- }
+ enableLog.finer("Event {0} is disable", e);
return true;
}
}
@@ -1405,7 +1394,7 @@
*/
public void applyShape(Region shape) {
if (XlibUtil.isShapingSupported()) {
- if (shapeLog.isLoggable(Level.FINER)) {
+ if (shapeLog.isLoggable(PlatformLogger.FINER)) {
shapeLog.finer(
"*** INFO: Setting shape: PEER: " + this
+ "; WINDOW: " + getWindow()
@@ -1435,7 +1424,7 @@
XToolkit.awtUnlock();
}
} else {
- if (shapeLog.isLoggable(Level.FINER)) {
+ if (shapeLog.isLoggable(PlatformLogger.FINER)) {
shapeLog.finer("*** WARNING: Shaping is NOT supported!");
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XContentWindow.java b/src/solaris/classes/sun/awt/X11/XContentWindow.java
index 93ddcae..0c4cf62 100644
--- a/src/solaris/classes/sun/awt/X11/XContentWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XContentWindow.java
@@ -30,8 +30,7 @@
import java.awt.event.ComponentEvent;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.ComponentAccessor;
@@ -44,7 +43,7 @@
* decorated window. So coordinates in it would be the same as java coordinates.
*/
public final class XContentWindow extends XWindow {
- private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XContentWindow");
+ private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XContentWindow");
static XContentWindow createContent(XDecoratedPeer parentFrame) {
final WindowDimensions dims = parentFrame.getDimensions();
@@ -116,10 +115,8 @@
if (in != null) {
newBounds.setLocation(-in.left, -in.top);
}
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINE, "Setting content bounds {0}, old bounds {1}",
- new Object[] {String.valueOf(newBounds), String.valueOf(getBounds())});
- }
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting content bounds {0}, old bounds {1}",
+ newBounds, getBounds());
// Fix for 5023533:
// Change in the size of the content window means, well, change of the size
// Change in the location of the content window means change in insets
diff --git a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
index a067d7a..a855ade 100644
--- a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
@@ -30,17 +30,16 @@
import java.awt.event.InvocationEvent;
import java.awt.event.WindowEvent;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.ComponentAccessor;
import sun.awt.SunToolkit;
abstract class XDecoratedPeer extends XWindowPeer {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XDecoratedPeer");
- private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XDecoratedPeer");
- private static final Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XDecoratedPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XDecoratedPeer");
+ private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XDecoratedPeer");
+ private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XDecoratedPeer");
// Set to true when we get the first ConfigureNotify after being
// reparented - indicates that WM has adopted the top-level.
@@ -79,9 +78,7 @@
Rectangle bounds = (Rectangle)params.get(BOUNDS);
dimensions = new WindowDimensions(bounds, getRealInsets(), false);
params.put(BOUNDS, dimensions.getClientRect());
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINE, "Initial dimensions {0}",new Object[] { String.valueOf(dimensions) });
- }
+ insLog.fine("Initial dimensions {0}", dimensions);
// Deny default processing of these events on the shell - proxy will take care of
// them instead
@@ -177,7 +174,7 @@
}
public void setTitle(String title) {
- if (log.isLoggable(Level.FINE)) log.fine("Title is " + title);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Title is " + title);
winAttr.title = title;
updateWMName();
}
@@ -267,10 +264,7 @@
wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom);
}
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "FRAME_EXTENTS: {0}",
- new Object[]{String.valueOf(wm_set_insets)});
- }
+ insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets);
if (wm_set_insets != null) {
wm_set_insets = copy(wm_set_insets);
@@ -297,7 +291,7 @@
public void handleReparentNotifyEvent(XEvent xev) {
XReparentEvent xe = xev.get_xreparent();
- if (insLog.isLoggable(Level.FINE)) insLog.fine(xe.toString());
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine(xe.toString());
reparent_serial = xe.get_serial();
XToolkit.awtLock();
try {
@@ -336,10 +330,7 @@
// Check if we have insets provided by the WM
Insets correctWM = getWMSetInsets(null);
if (correctWM != null) {
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "wm-provided insets {0}",
- new Object[]{String.valueOf(correctWM)});
- }
+ insLog.finer("wm-provided insets {0}", correctWM);
// If these insets are equal to our current insets - no actions are necessary
Insets dimInsets = dimensions.getInsets();
if (correctWM.equals(dimInsets)) {
@@ -353,11 +344,9 @@
correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
if (correctWM != null) {
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINER, "correctWM {0}", new Object[] {String.valueOf(correctWM)});
- }
+ insLog.finer("correctWM {0}", correctWM);
} else {
- insLog.log(Level.FINER, "correctWM insets are not available, waiting for configureNotify");
+ insLog.finer("correctWM insets are not available, waiting for configureNotify");
}
}
@@ -378,10 +367,7 @@
* initial insets were wrong (most likely they were).
*/
Insets correction = difference(correctWM, currentInsets);
- if (insLog.isLoggable(Level.FINEST)) {
- insLog.log(Level.FINEST, "Corrention {0}",
- new Object[] {String.valueOf(correction)});
- }
+ insLog.finest("Corrention {0}", correction);
if (!isNull(correction)) {
currentInsets = copy(correctWM);
applyGuessedInsets();
@@ -391,7 +377,7 @@
//update minimum size hints
updateMinSizeHints();
}
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Dimensions before reparent: " + dimensions);
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Dimensions before reparent: " + dimensions);
dimensions.setInsets(getRealInsets());
insets_corrected = true;
@@ -465,8 +451,8 @@
public Insets getInsets() {
Insets in = copy(getRealInsets());
in.top += getMenuBarHeight();
- if (insLog.isLoggable(Level.FINEST)) {
- insLog.log(Level.FINEST, "Get insets returns {0}", new Object[] {String.valueOf(in)});
+ if (insLog.isLoggable(PlatformLogger.FINEST)) {
+ insLog.finest("Get insets returns {0}", in);
}
return in;
}
@@ -495,7 +481,7 @@
public void reshape(WindowDimensions newDimensions, int op,
boolean userReshape)
{
- if (insLog.isLoggable(Level.FINE)) {
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape);
}
if (userReshape) {
@@ -516,8 +502,8 @@
XToolkit.awtLock();
try {
if (!isReparented() || !isVisible()) {
- insLog.log(Level.FINE, "- not reparented({0}) or not visible({1}), default reshape",
- new Object[] {Boolean.valueOf(isReparented()), Boolean.valueOf(visible)});
+ insLog.fine("- not reparented({0}) or not visible({1}), default reshape",
+ Boolean.valueOf(isReparented()), Boolean.valueOf(visible));
// Fix for 6323293.
// This actually is needed to preserve compatibility with previous releases -
@@ -622,8 +608,9 @@
dims.setSize(width, height);
break;
}
- if (insLog.isLoggable(Level.FINE)) insLog.log(Level.FINE, "For the operation {0} new dimensions are {1}",
- new Object[] {operationToString(operation), String.valueOf(dims)});
+ if (insLog.isLoggable(PlatformLogger.FINE))
+ insLog.fine("For the operation {0} new dimensions are {1}",
+ operationToString(operation), dims);
reshape(dims, operation, userReshape);
}
@@ -653,9 +640,7 @@
public void handleConfigureNotifyEvent(XEvent xev) {
assert (SunToolkit.isAWTLockHeldByCurrentThread());
XConfigureEvent xe = xev.get_xconfigure();
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINE, "Configure notify {0}", new Object[] {String.valueOf(xe)});
- }
+ insLog.fine("Configure notify {0}", xe);
// XXX: should really only consider synthetic events, but
if (isReparented()) {
@@ -692,9 +677,9 @@
* it!!!! or we wind up in a bogus location.
*/
int runningWM = XWM.getWMID();
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINE, "reparented={0}, visible={1}, WM={2}, decorations={3}",
- new Object[] {isReparented(), isVisible(), runningWM, getDecorations()});
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
+ insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}",
+ isReparented(), isVisible(), runningWM, getDecorations());
}
if (!isReparented() && isVisible() && runningWM != XWM.NO_WM
&& !XWM.isNonReparentingWM()
@@ -706,7 +691,7 @@
if (!insets_corrected && getDecorations() != XWindowAttributesData.AWT_DECOR_NONE) {
long parent = XlibUtil.getParentWindow(window);
Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
- if (insLog.isLoggable(Level.FINER)) {
+ if (insLog.isLoggable(PlatformLogger.FINER)) {
if (correctWM != null) {
insLog.finer("Configure notify - insets : " + correctWM);
} else {
@@ -747,10 +732,7 @@
case XWM.SAWFISH_WM:
{
Point xlocation = queryXLocation();
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "New X location: {0}",
- new Object[]{String.valueOf(xlocation)});
- }
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("New X location: {0}", xlocation);
if (xlocation != null) {
newLocation = xlocation;
}
@@ -767,10 +749,8 @@
copy(currentInsets),
true);
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "Insets are {0}, new dimensions {1}",
- new Object[] {String.valueOf(currentInsets), String.valueOf(newDimensions)});
- }
+ insLog.finer("Insets are {0}, new dimensions {1}",
+ currentInsets, newDimensions);
checkIfOnNewScreen(newDimensions.getBounds());
@@ -809,8 +789,8 @@
}
public void setShellBounds(Rectangle rec) {
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell bounds on " +
- this + " to " + rec);
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell bounds on " +
+ this + " to " + rec);
XToolkit.awtLock();
try {
updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -822,8 +802,8 @@
}
}
public void setShellSize(Rectangle rec) {
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell size on " +
- this + " to " + rec);
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell size on " +
+ this + " to " + rec);
XToolkit.awtLock();
try {
updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -834,8 +814,8 @@
}
}
public void setShellPosition(Rectangle rec) {
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell position on " +
- this + " to " + rec);
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell position on " +
+ this + " to " + rec);
XToolkit.awtLock();
try {
updateSizeHints(rec.x, rec.y, rec.width, rec.height);
@@ -935,9 +915,9 @@
return toGlobal(0,0);
} else {
Point location = target.getLocation();
- if (insLog.isLoggable(Level.FINE))
- insLog.log(Level.FINE, "getLocationOnScreen {0} not reparented: {1} ",
- new Object[] {String.valueOf(this), String.valueOf(location)});
+ if (insLog.isLoggable(PlatformLogger.FINE))
+ insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
+ this, location);
return location;
}
} finally {
@@ -974,10 +954,7 @@
}
public void setVisible(boolean vis) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINER, "Setting {0} to visible {1}",
- new Object[] {String.valueOf(this), Boolean.valueOf(vis)});
- }
+ log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
if (vis && !isVisible()) {
XWM.setShellDecor(this);
super.setVisible(vis);
@@ -1028,9 +1005,7 @@
}
private void handleWmTakeFocus(XClientMessageEvent cl) {
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "WM_TAKE_FOCUS on {0}", new Object[]{String.valueOf(this)});
- }
+ focusLog.fine("WM_TAKE_FOCUS on {0}", this);
requestWindowFocus(cl.get_data(1), true);
}
@@ -1043,9 +1018,9 @@
// by "proxy" - invisible mapped window. When we want to set X input focus to
// toplevel set it on proxy instead.
if (focusProxy == null) {
- if (focusLog.isLoggable(Level.FINE)) focusLog.warning("Focus proxy is null for " + this);
+ if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.warning("Focus proxy is null for " + this);
} else {
- if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy);
+ if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy);
if (timeProvided) {
focusProxy.xRequestFocus(time);
} else {
@@ -1136,9 +1111,9 @@
Window focusedWindow = XKeyboardFocusManagerPeer.getCurrentNativeFocusedWindow();
Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow);
- focusLog.log(Level.FINER, "Current window is: active={0}, focused={1}",
- new Object[]{ Boolean.valueOf(target == activeWindow),
- Boolean.valueOf(target == focusedWindow)});
+ focusLog.finer("Current window is: active={0}, focused={1}",
+ Boolean.valueOf(target == activeWindow),
+ Boolean.valueOf(target == focusedWindow));
XWindowPeer toFocus = this;
while (toFocus.nextTransientFor != null) {
diff --git a/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java b/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java
index d88f95b..f81e118 100644
--- a/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java
@@ -32,7 +32,7 @@
import java.util.Map;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.misc.Unsafe;
@@ -42,8 +42,8 @@
* @since 1.5
*/
class XDnDDragSourceProtocol extends XDragSourceProtocol {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol");
private static final Unsafe unsafe = XlibWrapper.unsafe;
@@ -395,7 +395,7 @@
return false;
}
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" sourceWindow=" + sourceWindow +
" get_window=" + xclient.get_window() +
" xclient=" + xclient);
diff --git a/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java b/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java
index f2ba2dc..2a082d4 100644
--- a/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java
@@ -33,7 +33,7 @@
import java.io.IOException;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.misc.Unsafe;
@@ -43,8 +43,8 @@
* @since 1.5
*/
class XDnDDropTargetProtocol extends XDropTargetProtocol {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol");
private static final Unsafe unsafe = XlibWrapper.unsafe;
@@ -999,7 +999,7 @@
if (sourceFormats != null && sourceFormats.length > 3) {
data1 |= XDnDConstants.XDND_DATA_TYPES_BIT;
}
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" "
+ " entryVersion=" + version
+ " sourceProtocolVersion=" +
@@ -1058,7 +1058,7 @@
public boolean forwardEventToEmbedded(long embedded, long ctxt,
int eventID) {
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" ctxt=" + ctxt +
" type=" + (ctxt != 0 ?
getMessageType(new
@@ -1086,7 +1086,7 @@
long data3 = Native.getLong(ctxt + size + 2 * Native.getLongSize());
long data4 = Native.getLong(ctxt + size + 3 * Native.getLongSize());
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" 1 "
+ " embedded=" + embedded
+ " source=" + xclient.get_data(0)
@@ -1120,7 +1120,7 @@
if (XToolkit.saved_error != null &&
XToolkit.saved_error.get_error_code() != XConstants.Success) {
- if (logger.isLoggable(Level.WARNING)) {
+ if (logger.isLoggable(PlatformLogger.WARNING)) {
logger.warning("Cannot set XdndTypeList on the proxy window");
}
}
@@ -1128,7 +1128,7 @@
XToolkit.awtUnlock();
}
} else {
- if (logger.isLoggable(Level.WARNING)) {
+ if (logger.isLoggable(PlatformLogger.WARNING)) {
logger.warning("Cannot read XdndTypeList from the source window");
}
}
@@ -1143,7 +1143,7 @@
overXEmbedClient = true;
}
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" 2 "
+ " embedded=" + embedded
+ " xclient=" + xclient);
diff --git a/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java b/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java
index 4186628..5188fe7 100644
--- a/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XDragSourceContextPeer.java
@@ -37,7 +37,8 @@
import java.util.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
import sun.awt.ComponentAccessor;
import sun.awt.dnd.SunDragSourceContextPeer;
@@ -52,8 +53,8 @@
*/
public final class XDragSourceContextPeer
extends SunDragSourceContextPeer implements XDragSourceProtocolListener {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer");
/* The events selected on the root window when the drag begins. */
private static final int ROOT_EVENT_MASK = (int)XConstants.ButtonMotionMask |
@@ -542,7 +543,7 @@
return false;
}
- if (logger.isLoggable(Level.FINEST)) {
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" proxyModeSourceWindow=" +
getProxyModeSourceWindow() +
" ev=" + ev);
diff --git a/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java b/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java
index efce539..4ffa9e4 100644
--- a/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XDropTargetContextPeer.java
@@ -31,7 +31,8 @@
import java.io.IOException;
import java.util.Iterator;
-import java.util.logging.*;
+
+import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
@@ -48,8 +49,8 @@
* @since 1.5
*/
final class XDropTargetContextPeer extends SunDropTargetContextPeer {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer");
private static final Unsafe unsafe = XlibWrapper.unsafe;
@@ -198,7 +199,7 @@
structure. */
long ctxt = getNativeDragContext();
- if (logger.isLoggable(Level.FINER)) {
+ if (logger.isLoggable(PlatformLogger.FINER)) {
logger.finer(" processing " + event + " ctxt=" + ctxt +
" consumed=" + event.isConsumed());
}
diff --git a/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java b/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java
index 13ff5bf..2b23873 100644
--- a/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java
@@ -29,7 +29,7 @@
import java.util.HashMap;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/**
* An abstract class for drop protocols on X11 systems.
@@ -38,8 +38,8 @@
* @since 1.5
*/
abstract class XDropTargetProtocol {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol");
private final XDropTargetProtocolListener listener;
@@ -116,16 +116,16 @@
XClientMessageEvent xclient) {
EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel);
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, " entry={0}", new Object[] {String.valueOf(entry)});
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
+ logger.finest(" entry={0}", entry);
}
// Window not registered as an embedder for this protocol.
if (entry == null) {
return false;
}
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, " entry.isOverriden()={0}", new Object[] {entry.isOverriden()});
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
+ logger.finest(" entry.isOverriden()={0}", entry.isOverriden());
}
// Window didn't have an associated drop site, so there is no need
// to forward the message.
@@ -137,9 +137,8 @@
long proxy = entry.getProxy();
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, " proxy={0} toplevel={1}",
- new Object[] {String.valueOf(proxy), String.valueOf(toplevel)});
+ if (logger.isLoggable(PlatformLogger.FINEST)) {
+ logger.finest(" proxy={0} toplevel={1}", proxy, toplevel);
}
if (proxy == 0) {
proxy = toplevel;
diff --git a/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java b/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java
index 1678d92..509a5e3 100644
--- a/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java
+++ b/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java
@@ -31,7 +31,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.awt.Point;
@@ -42,8 +42,8 @@
* @since 1.5
*/
final class XDropTargetRegistry {
- private static final Logger logger =
- Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry");
+ private static final PlatformLogger logger =
+ PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry");
private static final long DELAYED_REGISTRATION_PERIOD = 200;
@@ -614,7 +614,7 @@
if (info != null &&
info.getProtocolVersion() >= XDnDConstants.XDND_MIN_PROTOCOL_VERSION) {
- if (logger.isLoggable(Level.FINE)) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
logger.fine(" XEmbed drop site will be registered for " + Long.toHexString(clientWindow));
}
registerEmbeddedDropSite(canvasWindow, clientWindow);
@@ -628,14 +628,14 @@
dropTargetProtocol.registerEmbeddedDropSite(clientWindow);
}
- if (logger.isLoggable(Level.FINE)) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
logger.fine(" XEmbed drop site has been registered for " + Long.toHexString(clientWindow));
}
}
}
public void unregisterXEmbedClient(long canvasWindow, long clientWindow) {
- if (logger.isLoggable(Level.FINE)) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
logger.fine(" XEmbed drop site will be unregistered for " + Long.toHexString(clientWindow));
}
Iterator dropTargetProtocols =
@@ -649,7 +649,7 @@
unregisterEmbeddedDropSite(canvasWindow, clientWindow);
- if (logger.isLoggable(Level.FINE)) {
+ if (logger.isLoggable(PlatformLogger.FINE)) {
logger.fine(" XEmbed drop site has beed unregistered for " + Long.toHexString(clientWindow));
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java b/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java
index 94d130b..53dace5 100644
--- a/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java
@@ -37,7 +37,7 @@
import sun.awt.*;
import sun.awt.motif.X11FontMetrics;
import java.lang.reflect.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.util.*;
import static sun.awt.X11.XEmbedHelper.*;
@@ -45,7 +45,7 @@
import sun.security.action.GetBooleanAction;
public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider {
- private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer");
+ private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer");
boolean applicationActive; // Whether the application is active(has focus)
XEmbedServer xembed = new XEmbedServer(); // Helper object, contains XEmbed intrinsics
@@ -129,7 +129,7 @@
}
void initDispatching() {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
XToolkit.awtLock();
try {
XToolkit.addEventDispatcher(xembed.handle, xembed);
@@ -196,10 +196,10 @@
switch (ev.get_type()) {
case XConstants.CreateNotify:
XCreateWindowEvent cr = ev.get_xcreatewindow();
- if (xembedLog.isLoggable(Level.FINEST)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + cr);
}
- if (xembedLog.isLoggable(Level.FINER)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) {
xembedLog.finer("Create notify for parent " + Long.toHexString(cr.get_parent()) +
", window " + Long.toHexString(cr.get_window()));
}
@@ -207,20 +207,20 @@
break;
case XConstants.DestroyNotify:
XDestroyWindowEvent dn = ev.get_xdestroywindow();
- if (xembedLog.isLoggable(Level.FINEST)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + dn);
}
- if (xembedLog.isLoggable(Level.FINER)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) {
xembedLog.finer("Destroy notify for parent: " + dn);
}
childDestroyed();
break;
case XConstants.ReparentNotify:
XReparentEvent rep = ev.get_xreparent();
- if (xembedLog.isLoggable(Level.FINEST)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + rep);
}
- if (xembedLog.isLoggable(Level.FINER)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) {
xembedLog.finer("Reparent notify for parent " + Long.toHexString(rep.get_parent()) +
", window " + Long.toHexString(rep.get_window()) +
", event " + Long.toHexString(rep.get_event()));
@@ -323,7 +323,7 @@
}
void childResized() {
- if (xembedLog.isLoggable(Level.FINER)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) {
Rectangle bounds = getClientBounds();
xembedLog.finer("Child resized: " + bounds);
// It is not required to update embedder's size when client size changes
@@ -388,7 +388,7 @@
}
void detachChild() {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
/**
* XEmbed specification:
* "The embedder can unmap the client and reparent the client window to the root window. If the
@@ -477,7 +477,7 @@
try {
XKeyEvent ke = new XKeyEvent(data);
ke.set_window(xembed.handle);
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Forwarding native key event: " + ke);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding native key event: " + ke);
XToolkit.awtLock();
try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data);
@@ -508,7 +508,7 @@
postEvent(new InvocationEvent(target, new Runnable() {
public void run() {
GrabbedKey grab = new GrabbedKey(keysym, modifiers);
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Grabbing key: " + grab);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Grabbing key: " + grab);
synchronized(GRAB_LOCK) {
grabbed_keys.add(grab);
}
@@ -520,7 +520,7 @@
postEvent(new InvocationEvent(target, new Runnable() {
public void run() {
GrabbedKey grab = new GrabbedKey(keysym, modifiers);
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
synchronized(GRAB_LOCK) {
grabbed_keys.remove(grab);
}
@@ -533,7 +533,7 @@
public void run() {
AWTKeyStroke stroke = xembed.getKeyStrokeForKeySym(keysym, modifiers);
if (stroke != null) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
synchronized(ACCEL_LOCK) {
accelerators.put(accel_id, stroke);
accel_lookup.put(stroke, accel_id);
@@ -551,7 +551,7 @@
synchronized(ACCEL_LOCK) {
stroke = accelerators.get(accel_id);
if (stroke != null) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
accelerators.remove(accel_id);
accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke?
}
@@ -597,7 +597,7 @@
boolean result = false;
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Post-processing event " + e);
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Post-processing event " + e);
// Process ACCELERATORS
AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);
@@ -610,7 +610,7 @@
}
}
if (exists) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Activating accelerator " + accel_id);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Activating accelerator " + accel_id);
xembed.sendMessage(xembed.handle, XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded?
result = true;
}
@@ -622,7 +622,7 @@
exists = grabbed_keys.contains(key);
}
if (exists) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
forwardKeyEvent(e);
result = true;
}
@@ -641,9 +641,9 @@
public void handleClientMessage(XEvent xev) {
super.handleClientMessage(xev);
XClientMessageEvent msg = xev.get_xclient();
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Client message to embedder: " + msg);
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Client message to embedder: " + msg);
if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg));
}
if (isXEmbedActive()) {
switch ((int)msg.get_data(1)) {
@@ -709,7 +709,7 @@
}
public boolean processXEmbedDnDEvent(long ctxt, int eventID) {
- if (xembedLog.isLoggable(Level.FINEST)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest(" Drop target=" + target.getDropTarget());
}
if (target.getDropTarget() instanceof XEmbedDropTarget) {
@@ -744,7 +744,7 @@
boolean new_mapped = (flags & XEMBED_MAPPED) != 0;
boolean currently_mapped = XlibUtil.getWindowMapState(handle) != XConstants.IsUnmapped;
if (new_mapped != currently_mapped) {
- if (xembedLog.isLoggable(Level.FINER))
+ if (xembedLog.isLoggable(PlatformLogger.FINER))
xembedLog.fine("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped);
if (new_mapped) {
XToolkit.awtLock();
@@ -773,7 +773,7 @@
public void handlePropertyNotify(XEvent xev) {
if (isXEmbedActive()) {
XPropertyEvent ev = xev.get_xproperty();
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Property change on client: " + ev);
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Property change on client: " + ev);
if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) {
childResized();
} else if (ev.get_atom() == XEmbedInfo.getAtom()) {
@@ -794,7 +794,7 @@
void handleConfigureNotify(XEvent xev) {
if (isXEmbedActive()) {
XConfigureEvent ev = xev.get_xconfigure();
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Bounds change on client: " + ev);
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Bounds change on client: " + ev);
if (xev.get_xany().get_window() == handle) {
childResized();
}
@@ -845,7 +845,7 @@
// We recognize only these masks
modifiers = ke.get_state() & (XConstants.ShiftMask | XConstants.ControlMask | XConstants.LockMask);
- if (xembedLog.isLoggable(Level.FINEST)) xembedLog.finest("Mapped " + e + " to " + this);
+ if (xembedLog.isLoggable(PlatformLogger.FINEST)) xembedLog.finest("Mapped " + e + " to " + this);
} finally {
XlibWrapper.unsafe.freeMemory(data);
}
diff --git a/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java b/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java
index 8be23907..f79de9c 100644
--- a/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java
+++ b/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java
@@ -26,10 +26,10 @@
package sun.awt.X11;
import java.awt.AWTKeyStroke;
-import java.util.logging.*;
import sun.awt.SunToolkit;
import java.awt.Component;
import java.awt.Container;
+import sun.util.logging.PlatformLogger;
import sun.awt.X11GraphicsConfig;
import sun.awt.X11GraphicsDevice;
@@ -40,7 +40,7 @@
* call install and forward all XClientMessageEvents to it.
*/
public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher {
- private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
+ private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
private XEmbeddedFramePeer embedded; // XEmbed client
private long server; // XEmbed server
@@ -53,7 +53,7 @@
}
void setClient(XEmbeddedFramePeer client) {
- if (xembedLog.isLoggable(Level.FINE)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) {
xembedLog.fine("XEmbed client: " + client);
}
if (embedded != null) {
@@ -67,7 +67,7 @@
}
void install() {
- if (xembedLog.isLoggable(Level.FINE)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) {
xembedLog.fine("Installing xembedder on " + embedded);
}
long[] info = new long[] { XEMBED_VERSION, XEMBED_MAPPED };
@@ -95,9 +95,9 @@
void handleClientMessage(XEvent xev) {
XClientMessageEvent msg = xev.get_xclient();
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine(msg.toString());
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(msg.toString());
if (msg.get_message_type() == XEmbed.getAtom()) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
switch ((int)msg.get_data(1)) {
case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
active = true;
diff --git a/src/solaris/classes/sun/awt/X11/XEmbedHelper.java b/src/solaris/classes/sun/awt/X11/XEmbedHelper.java
index 4b3c7d9..5726703 100644
--- a/src/solaris/classes/sun/awt/X11/XEmbedHelper.java
+++ b/src/solaris/classes/sun/awt/X11/XEmbedHelper.java
@@ -27,7 +27,8 @@
import sun.misc.Unsafe;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
import java.awt.AWTKeyStroke;
import java.awt.event.InputEvent;
@@ -36,7 +37,7 @@
* Contains constant definitions and helper routines.
*/
public class XEmbedHelper {
- private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed");
+ private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed");
final static Unsafe unsafe = Unsafe.getUnsafe();
final static int XEMBED_VERSION = 0,
@@ -81,11 +82,11 @@
XEmbedHelper() {
if (XEmbed == null) {
XEmbed = XAtom.get("_XEMBED");
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Created atom " + XEmbed.toString());
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbed.toString());
}
if (XEmbedInfo == null) {
XEmbedInfo = XAtom.get("_XEMBED_INFO");
- if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
+ if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
}
}
@@ -105,7 +106,7 @@
msg.set_data(4, data2);
XToolkit.awtLock();
try {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg));
XlibWrapper.XSendEvent(XToolkit.getDisplay(), window, false, XConstants.NoEventMask, msg.pData);
}
finally {
diff --git a/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java b/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java
index 932f8bd..bc4759f 100644
--- a/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java
+++ b/src/solaris/classes/sun/awt/X11/XEmbedServerTester.java
@@ -28,7 +28,7 @@
//import static sun.awt.X11.XEmbed.*;
import java.awt.*;
import java.awt.event.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import static sun.awt.X11.XConstants.*;
import java.util.LinkedList;
@@ -37,7 +37,7 @@
* specification and references.
*/
public class XEmbedServerTester implements XEventDispatcher {
- private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedServerTester");
+ private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedServerTester");
private final Object EVENT_LOCK = new Object();
static final int SYSTEM_EVENT_MASK = 0x8000;
int my_version, server_version;
@@ -544,7 +544,7 @@
try {
EVENT_LOCK.wait(3000);
} catch (InterruptedException ie) {
- xembedLog.log(Level.WARNING, "Event wait interrupted", ie);
+ xembedLog.warning("Event wait interrupted", ie);
}
eventWaited = -1;
if (checkEventList(position, event) == -1) {
@@ -634,7 +634,7 @@
if (ev.get_type() == ClientMessage) {
XClientMessageEvent msg = ev.get_xclient();
if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
- if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
switch ((int)msg.get_data(1)) {
case XEmbedHelper.XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
xembedActive = true;
diff --git a/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java b/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java
index 4b9bcc9..a2d0df1 100644
--- a/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java
+++ b/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java
@@ -30,15 +30,14 @@
import java.util.LinkedList;
import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.EmbeddedFrame;
import sun.awt.SunToolkit;
public class XEmbeddedFramePeer extends XFramePeer {
- private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer");
+ private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer");
LinkedList<AWTKeyStroke> strokes;
@@ -138,7 +137,7 @@
{
assert (SunToolkit.isAWTLockHeldByCurrentThread());
XConfigureEvent xe = xev.get_xconfigure();
- if (xembedLog.isLoggable(Level.FINE)) {
+ if (xembedLog.isLoggable(PlatformLogger.FINE)) {
xembedLog.fine(xe.toString());
}
diff --git a/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java b/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java
index 0b8085e..a50437a 100644
--- a/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XFileDialogPeer.java
@@ -34,12 +34,12 @@
import java.util.Arrays;
import com.sun.java.swing.plaf.motif.*;
import javax.swing.plaf.ComponentUI;
-import java.util.logging.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import sun.util.logging.PlatformLogger;
class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XFileDialogPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
FileDialog target;
diff --git a/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java b/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java
index bd30f69..d5295eb 100644
--- a/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XFocusProxyWindow.java
@@ -26,7 +26,6 @@
package sun.awt.X11;
import java.awt.*;
-import java.util.logging.*;
/**
* This class represent focus holder window implementation. When toplevel requests or receives focus
diff --git a/src/solaris/classes/sun/awt/X11/XFramePeer.java b/src/solaris/classes/sun/awt/X11/XFramePeer.java
index b1e4223..b2f298d 100644
--- a/src/solaris/classes/sun/awt/X11/XFramePeer.java
+++ b/src/solaris/classes/sun/awt/X11/XFramePeer.java
@@ -34,14 +34,13 @@
import java.awt.MenuBar;
import java.awt.Rectangle;
import java.awt.peer.FramePeer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.AWTAccessor;
class XFramePeer extends XDecoratedPeer implements FramePeer {
- private static Logger log = Logger.getLogger("sun.awt.X11.XFramePeer");
- private static Logger stateLog = Logger.getLogger("sun.awt.X11.states");
- private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XFramePeer");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFramePeer");
+ private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states");
+ private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XFramePeer");
XMenuBarPeer menubarPeer;
MenuBar menubar;
@@ -76,10 +75,10 @@
winAttr.isResizable = true; // target.isResizable();
winAttr.title = target.getTitle();
winAttr.initialResizability = target.isResizable();
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}",
- new Object[] {Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability),
- Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState)});
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}",
+ Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability),
+ Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState));
}
}
@@ -208,7 +207,7 @@
}
public void setMaximizedBounds(Rectangle b) {
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting maximized bounds to " + b);
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting maximized bounds to " + b);
if (b == null) return;
maxBounds = new Rectangle(b);
XToolkit.awtLock();
@@ -225,7 +224,7 @@
} else {
hints.set_max_height((int)XlibWrapper.DisplayHeight(XToolkit.getDisplay(), XlibWrapper.DefaultScreen(XToolkit.getDisplay())));
}
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData);
} finally {
XToolkit.awtUnlock();
@@ -253,14 +252,14 @@
int changed = state ^ newState;
int changeIconic = changed & Frame.ICONIFIED;
boolean iconic = (newState & Frame.ICONIFIED) != 0;
- stateLog.log(Level.FINER, "Changing state, old state {0}, new state {1}(iconic {2})",
- new Object[] {Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic)});
+ stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})",
+ Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic));
if (changeIconic != 0 && iconic) {
- if (stateLog.isLoggable(Level.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
+ if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
XToolkit.awtLock();
try {
int res = XlibWrapper.XIconifyWindow(XToolkit.getDisplay(), getShell(), getScreenNumber());
- if (stateLog.isLoggable(Level.FINER)) stateLog.finer("XIconifyWindow returned " + res);
+ if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("XIconifyWindow returned " + res);
}
finally {
XToolkit.awtUnlock();
@@ -270,7 +269,7 @@
setExtendedState(newState);
}
if (changeIconic != 0 && !iconic) {
- if (stateLog.isLoggable(Level.FINER)) stateLog.finer("DeIconifying " + this);
+ if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("DeIconifying " + this);
xSetVisible(true);
}
}
@@ -283,9 +282,7 @@
super.handlePropertyNotify(xev);
XPropertyEvent ev = xev.get_xproperty();
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Property change {0}", new Object[] {String.valueOf(ev)});
- }
+ log.finer("Property change {0}", ev);
/*
* Let's see if this is a window state protocol message, and
* if it is - decode a new state in terms of java constants.
@@ -350,7 +347,7 @@
XWMHints hints = getWMHints();
hints.set_flags((int)XUtilConstants.StateHint | hints.get_flags());
hints.set_initial_state(wm_state);
- if (stateLog.isLoggable(Level.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
+ if (stateLog.isLoggable(PlatformLogger.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
XlibWrapper.XSetWMHints(XToolkit.getDisplay(), getWindow(), hints.pData);
}
finally {
diff --git a/src/solaris/classes/sun/awt/X11/XIconWindow.java b/src/solaris/classes/sun/awt/X11/XIconWindow.java
index e9643c9..918ecdf 100644
--- a/src/solaris/classes/sun/awt/X11/XIconWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XIconWindow.java
@@ -30,10 +30,10 @@
import sun.awt.image.ToolkitImage;
import sun.awt.image.ImageRepresentation;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
public class XIconWindow extends XBaseWindow {
- private final static Logger log = Logger.getLogger("sun.awt.X11.XIconWindow");
+ private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
XDecoratedPeer parent;
Dimension size;
long iconPixmap = 0;
@@ -61,7 +61,7 @@
final long screen = adata.get_awt_visInfo().get_screen();
final long display = XToolkit.getDisplay();
- if (log.isLoggable(Level.FINEST)) log.finest(adata.toString());
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest(adata.toString());
long status =
XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(),
@@ -71,11 +71,11 @@
}
int count = Native.getInt(XlibWrapper.iarg1);
long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize*
- log.log(Level.FINEST, "count = {1}, sizes_ptr = {0}", new Object[] {Long.valueOf(sizes_ptr), Integer.valueOf(count)});
+ log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count));
XIconSize[] res = new XIconSize[count];
for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) {
res[i] = new XIconSize(sizes_ptr);
- log.log(Level.FINEST, "sizes_ptr[{1}] = {0}", new Object[] {String.valueOf(res[i]), Integer.valueOf(i)});
+ log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i));
}
return res;
} finally {
@@ -87,15 +87,12 @@
if (XWM.getWMID() == XWM.ICE_WM) {
// ICE_WM has a bug - it only displays icons of the size
// 16x16, while reporting 32x32 in its size list
- log.log(Level.FINEST, "Returning ICE_WM icon size: 16x16");
+ log.finest("Returning ICE_WM icon size: 16x16");
return new Dimension(16, 16);
}
XIconSize[] sizeList = getIconSizes();
-
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "Icon sizes: {0}", new Object[] {String.valueOf(sizeList)});
- }
+ log.finest("Icon sizes: {0}", sizeList);
if (sizeList == null) {
// No icon sizes so we simply fall back to 16x16
return new Dimension(16, 16);
@@ -142,11 +139,11 @@
}
}
}
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("found=" + found);
}
if (!found) {
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint
+ ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight
+ ", max_width=" + sizeList[0].get_max_width()
@@ -162,7 +159,7 @@
/* determine which way to scale */
int wdiff = widthHint - sizeList[0].get_max_width();
int hdiff = heightHint - sizeList[0].get_max_height();
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff);
}
if (wdiff >= hdiff) { /* need to scale width more */
@@ -194,7 +191,7 @@
XToolkit.awtUnlock();
}
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("return " + saveWidth + "x" + saveHeight);
}
return new Dimension(saveWidth, saveHeight);
@@ -421,7 +418,7 @@
}
}
if (min != null) {
- log.log(Level.FINER, "Icon: {0}x{1}", new Object[] { min.getWidth(null), min.getHeight(null)});
+ log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
setIconImage(min);
}
}
@@ -447,9 +444,7 @@
}
Dimension iconSize = getIconSize(width, height);
if (iconSize != null) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "Icon size: {0}", String.valueOf(iconSize));
- }
+ log.finest("Icon size: {0}", iconSize);
iconWidth = iconSize.width;
iconHeight = iconSize.height;
} else {
diff --git a/src/solaris/classes/sun/awt/X11/XInputMethod.java b/src/solaris/classes/sun/awt/X11/XInputMethod.java
index 756c0ae..709654b 100644
--- a/src/solaris/classes/sun/awt/X11/XInputMethod.java
+++ b/src/solaris/classes/sun/awt/X11/XInputMethod.java
@@ -33,7 +33,7 @@
import java.awt.peer.ComponentPeer;
import sun.awt.X11InputMethod;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/**
* Input Method Adapter for XIM (without Motif)
@@ -41,7 +41,7 @@
* @author JavaSoft International
*/
public class XInputMethod extends X11InputMethod {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XInputMethod");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XInputMethod");
public XInputMethod() throws AWTException {
super();
@@ -102,16 +102,13 @@
protected ComponentPeer getPeer(Component client) {
XComponentPeer peer;
- if (log.isLoggable(Level.FINE)) log.fine("Client is " + client);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Client is " + client);
peer = (XComponentPeer)XToolkit.targetToPeer(client);
while (client != null && peer == null) {
client = getParent(client);
peer = (XComponentPeer)XToolkit.targetToPeer(client);
}
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Peer is {0}, client is {1}",
- new Object[] {String.valueOf(peer), String.valueOf(client)});
- }
+ log.fine("Peer is {0}, client is {1}", peer, client);
if (peer != null)
return peer;
diff --git a/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java b/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java
index 19c2134..6e11c1a 100644
--- a/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java
@@ -36,15 +36,14 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.CausedFocusEvent;
import sun.awt.SunToolkit;
import sun.awt.KeyboardFocusManagerPeerImpl;
public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
private static Object lock = new Object() {};
private static Component currentFocusOwner;
@@ -82,7 +81,7 @@
}
public static void setCurrentNativeFocusedWindow(Window win) {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Setting current native focused window " + win);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Setting current native focused window " + win);
XWindowPeer from = null, to = null;
synchronized(lock) {
diff --git a/src/solaris/classes/sun/awt/X11/XKeysym.java b/src/solaris/classes/sun/awt/X11/XKeysym.java
index 83c655f..abf3c65 100644
--- a/src/solaris/classes/sun/awt/X11/XKeysym.java
+++ b/src/solaris/classes/sun/awt/X11/XKeysym.java
@@ -29,8 +29,7 @@
import java.util.Hashtable;
import sun.misc.Unsafe;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
public class XKeysym {
@@ -70,7 +69,7 @@
static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>();
static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize());
static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
- private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XKeysym");
+ private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
public static char convertKeysym( long ks, int state ) {
/* First check for Latin-1 characters (1:1 mapping) */
diff --git a/src/solaris/classes/sun/awt/X11/XListPeer.java b/src/solaris/classes/sun/awt/X11/XListPeer.java
index 56c4ef9..f0b3fc1 100644
--- a/src/solaris/classes/sun/awt/X11/XListPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XListPeer.java
@@ -34,13 +34,13 @@
import java.util.Vector;
import java.awt.geom.*;
import java.awt.image.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
// TODO: some input actions should do nothing if Shift or Control are down
class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XListPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XListPeer");
public final static int MARGIN = 2;
public final static int SPACE = 1;
@@ -578,10 +578,10 @@
}
void mousePressed(MouseEvent mouseEvent) {
- if (log.isLoggable(Level.FINER)) log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
if (inWindow(mouseEvent.getX(), mouseEvent.getY())) {
- if (log.isLoggable(Level.FINE)) log.fine("Mouse press in items area");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in items area");
active = WINDOW;
int i = y2index(mouseEvent.getY());
if (i >= 0) {
@@ -618,14 +618,14 @@
currentIndex = -1;
}
} else if (inVerticalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
- if (log.isLoggable(Level.FINE)) log.fine("Mouse press in vertical scrollbar");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in vertical scrollbar");
active = VERSCROLLBAR;
vsb.handleMouseEvent(mouseEvent.getID(),
mouseEvent.getModifiers(),
mouseEvent.getX() - (width - SCROLLBAR_WIDTH),
mouseEvent.getY());
} else if (inHorizontalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
- if (log.isLoggable(Level.FINE)) log.fine("Mouse press in horizontal scrollbar");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in horizontal scrollbar");
active = HORSCROLLBAR;
hsb.handleMouseEvent(mouseEvent.getID(),
mouseEvent.getModifiers(),
@@ -808,7 +808,7 @@
void keyPressed(KeyEvent e) {
int keyCode = e.getKeyCode();
- if (log.isLoggable(Level.FINE)) log.fine(e.toString());
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine(e.toString());
switch(keyCode) {
case KeyEvent.VK_UP:
case KeyEvent.VK_KP_UP: // TODO: I assume we also want this, too
@@ -993,7 +993,7 @@
*/
public void notifyValue(XScrollbar obj, int type, int v, boolean isAdjusting) {
- if (log.isLoggable(Level.FINE)) log.fine("Notify value changed on " + obj + " to " + v);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Notify value changed on " + obj + " to " + v);
int value = obj.getValue();
if (obj == vsb) {
scrollVertical(v - value);
@@ -1076,7 +1076,7 @@
}
}
}
- if (log.isLoggable(Level.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex);
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex);
// Update maxLength
boolean repaintItems = !isItemHidden(addedIndex);
@@ -1094,7 +1094,7 @@
| ((vsb.needsRepaint())?(PAINT_VSCROLL):0);
}
- if (log.isLoggable(Level.FINEST)) log.finest("Last visible: " + getLastVisibleItem() +
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last visible: " + getLastVisibleItem() +
", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems);
repaint(addedIndex, getLastVisibleItem(), options);
}
@@ -1110,9 +1110,9 @@
boolean vsbWasVisible = vsbVis;
int oldLastDisplayed = lastItemDisplayed();
- if (log.isLoggable(Level.FINE)) log.fine("Deleting from " + s + " to " + e);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Deleting from " + s + " to " + e);
- if (log.isLoggable(Level.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
", size " + items.size());
if (items.size() == 0) {
@@ -1180,7 +1180,7 @@
options |= PAINT_FOCUS;
}
- if (log.isLoggable(Level.FINEST)) log.finest("Multiple selections: " + multipleSelections);
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Multiple selections: " + multipleSelections);
// update vsb.val
if (vsb.getValue() >= s) {
@@ -1433,7 +1433,7 @@
* y is the number of items to scroll
*/
void scrollVertical(int y) {
- if (log.isLoggable(Level.FINE)) log.fine("Scrolling vertically by " + y);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling vertically by " + y);
int itemsInWin = itemsInWindow();
int h = getItemHeight();
int pixelsToScroll = y * h;
@@ -1473,7 +1473,7 @@
* x is the number of pixels to scroll
*/
void scrollHorizontal(int x) {
- if (log.isLoggable(Level.FINE)) log.fine("Scrolling horizontally by " + y);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling horizontally by " + y);
int w = getListWidth();
w -= ((2 * SPACE) + (2 * MARGIN));
int h = height - (SCROLLBAR_AREA + (2 * MARGIN));
@@ -1706,7 +1706,7 @@
}
if (localBuffer == null) {
- if (log.isLoggable(Level.FINE)) log.fine("Creating buffer " + width + "x" + height);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Creating buffer " + width + "x" + height);
// use GraphicsConfig.cCVI() instead of Component.cVI(),
// because the latter may cause a deadlock with the tree lock
localBuffer =
@@ -1743,7 +1743,7 @@
private void paint(Graphics listG, int firstItem, int lastItem, int options,
Rectangle source, Point distance) {
- if (log.isLoggable(Level.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
if (firstItem > lastItem) {
int t = lastItem;
lastItem = firstItem;
@@ -1832,7 +1832,7 @@
}
private void paintItems(Graphics g, int firstItem, int lastItem, int options) {
- if (log.isLoggable(Level.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
firstItem = Math.max(getFirstVisibleItem(), firstItem);
if (firstItem > lastItem) {
@@ -1843,7 +1843,7 @@
firstItem = Math.max(getFirstVisibleItem(), firstItem);
lastItem = Math.min(lastItem, items.size()-1);
- if (log.isLoggable(Level.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem +
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem +
", items in window " + itemsInWindow());
for (int i = firstItem; i <= lastItem; i++) {
paintItem(g, i);
@@ -1851,7 +1851,7 @@
}
private void paintItem(Graphics g, int index) {
- if (log.isLoggable(Level.FINEST)) log.finest("Painting item " + index);
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting item " + index);
// 4895367 - only paint items which are visible
if (!isItemHidden(index)) {
Shape clip = g.getClip();
@@ -1859,18 +1859,18 @@
int h = getItemHeight();
int y = getItemY(index);
int x = getItemX();
- if (log.isLoggable(Level.FINEST)) log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2)));
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2)));
g.setClip(x, y, w - (SPACE*2), h-(SPACE*2));
// Always paint the background so that focus is unpainted in
// multiselect mode
if (isSelected(index)) {
- if (log.isLoggable(Level.FINEST)) log.finest("Painted item is selected");
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painted item is selected");
g.setColor(getListForeground());
} else {
g.setColor(getListBackground());
}
- if (log.isLoggable(Level.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h));
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h));
g.fillRect(x, y, w, h);
if (index <= getLastVisibleItem() && index < items.size()) {
@@ -1894,7 +1894,7 @@
}
void paintScrollBar(XScrollbar scr, Graphics g, int x, int y, int width, int height, boolean paintAll) {
- if (log.isLoggable(Level.FINEST)) log.finest("Painting scrollbar " + scr + " width " +
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting scrollbar " + scr + " width " +
width + " height " + height + ", paintAll " + paintAll);
g.translate(x, y);
scr.paint(g, getSystemColors(), paintAll);
@@ -1932,22 +1932,22 @@
if (paintFocus && !hasFocus()) {
paintFocus = false;
}
- if (log.isLoggable(Level.FINE)) log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " +
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " +
(isItemHidden(getFocusIndex())?("invisible"):("visible")) + ", paint focus is " + paintFocus);
Shape clip = g.getClip();
g.setClip(0, 0, listWidth, listHeight);
- if (log.isLoggable(Level.FINEST)) log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight));
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight));
Rectangle rect = getFocusRect();
if (prevFocusRect != null) {
// Erase focus rect
- if (log.isLoggable(Level.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect);
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect);
g.setColor(getListBackground());
g.drawRect(prevFocusRect.x, prevFocusRect.y, prevFocusRect.width, prevFocusRect.height);
prevFocusRect = null;
}
if (paintFocus) {
// Paint new
- if (log.isLoggable(Level.FINEST)) log.finest("Painting focus rect " + rect);
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting focus rect " + rect);
g.setColor(getListForeground()); // Focus color is always black on Linux
g.drawRect(rect.x, rect.y, rect.width, rect.height);
prevFocusRect = rect;
diff --git a/src/solaris/classes/sun/awt/X11/XMSelection.java b/src/solaris/classes/sun/awt/X11/XMSelection.java
index 8fb4f4b..16de13f 100644
--- a/src/solaris/classes/sun/awt/X11/XMSelection.java
+++ b/src/solaris/classes/sun/awt/X11/XMSelection.java
@@ -32,8 +32,7 @@
package sun.awt.X11;
import java.util.*;
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
public class XMSelection {
@@ -56,7 +55,7 @@
*/
- private static Logger log = Logger.getLogger("sun.awt.X11.XMSelection");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMSelection");
/* Name of the selection */
String selectionName;
@@ -129,7 +128,7 @@
long display = XToolkit.getDisplay();
synchronized(this) {
setOwner(owner, screen);
- if (log.isLoggable(Level.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner );
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner );
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask);
XToolkit.addEventDispatcher(owner,
new XEventDispatcher() {
@@ -149,19 +148,19 @@
try {
try {
long display = XToolkit.getDisplay();
- if (log.isLoggable(Level.FINE)) log.fine("Grabbing XServer");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Grabbing XServer");
XlibWrapper.XGrabServer(display);
synchronized(this) {
String selection_name = getName()+"_S"+screen;
- if (log.isLoggable(Level.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name);
XAtom atom = XAtom.get(selection_name);
selectionMap.put(Long.valueOf(atom.getAtom()),this); // add mapping from atom to the instance of XMSelection
setAtom(atom,screen);
long owner = XlibWrapper.XGetSelectionOwner(display, atom.getAtom());
if (owner != 0) {
setOwner(owner, screen);
- if (log.isLoggable(Level.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner );
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner );
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask);
XToolkit.addEventDispatcher(owner,
new XEventDispatcher() {
@@ -176,7 +175,7 @@
e.printStackTrace();
}
finally {
- if (log.isLoggable(Level.FINE)) log.fine("UnGrabbing XServer");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("UnGrabbing XServer");
XlibWrapper.XUngrabServer(XToolkit.getDisplay());
}
} finally {
@@ -188,7 +187,7 @@
static boolean processClientMessage(XEvent xev, int screen) {
XClientMessageEvent xce = xev.get_xclient();
if (xce.get_message_type() == XA_MANAGER.getAtom()) {
- if (log.isLoggable(Level.FINE)) log.fine("client messags = " + xce);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("client messags = " + xce);
long timestamp = xce.get_data(0);
long atom = xce.get_data(1);
long owner = xce.get_data(2);
@@ -295,7 +294,7 @@
synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) {
- if (log.isLoggable(Level.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
if (listeners != null) {
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
@@ -306,7 +305,7 @@
}
synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) {
- if (log.isLoggable(Level.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de);
if (listeners != null) {
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
@@ -318,7 +317,7 @@
}
void dispatchSelectionEvent(XEvent xev, int screen) {
- if (log.isLoggable(Level.FINE)) log.fine("Event =" + xev);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Event =" + xev);
if (xev.get_type() == XConstants.DestroyNotify) {
XDestroyWindowEvent de = xev.get_xdestroywindow();
dispatchOwnerDeath( de, screen);
diff --git a/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java b/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java
index 1d4b8be..30fa706 100644
--- a/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XMenuBarPeer.java
@@ -30,7 +30,7 @@
import java.lang.reflect.Field;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit;
public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
@@ -41,7 +41,7 @@
*
************************************************/
- private static Logger log = Logger.getLogger("sun.awt.X11.XMenuBarPeer");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuBarPeer");
/*
* Primary members
@@ -533,7 +533,7 @@
*/
public void handleKeyPress(XEvent xev) {
XKeyEvent xkey = xev.get_xkey();
- if (log.isLoggable(Level.FINE)) log.fine(xkey.toString());
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine(xkey.toString());
if (isEventDisabled(xev)) {
return;
}
diff --git a/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java b/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java
index 99e8d3f..032426a 100644
--- a/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java
@@ -28,8 +28,6 @@
import java.awt.peer.*;
import java.awt.event.*;
-import java.util.logging.*;
-
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/solaris/classes/sun/awt/X11/XMenuPeer.java b/src/solaris/classes/sun/awt/X11/XMenuPeer.java
index d5e217f..9aed53e 100644
--- a/src/solaris/classes/sun/awt/X11/XMenuPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XMenuPeer.java
@@ -29,7 +29,7 @@
import java.lang.reflect.Field;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit;
public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
@@ -39,7 +39,7 @@
* Data members
*
************************************************/
- private static Logger log = Logger.getLogger("sun.awt.X11.XMenuPeer");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuPeer");
/**
* Window that correspond to this menu
@@ -122,7 +122,7 @@
* for adding separators
*/
public void addSeparator() {
- if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented");
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("addSeparator is not implemented");
}
public void addItem(MenuItem item) {
@@ -130,7 +130,7 @@
if (menuWindow != null) {
menuWindow.addItem(item);
} else {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window");
}
}
@@ -141,7 +141,7 @@
if (menuWindow != null) {
menuWindow.delItem(index);
} else {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window");
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XMenuWindow.java b/src/solaris/classes/sun/awt/X11/XMenuWindow.java
index 8a722b1..1fdb711 100644
--- a/src/solaris/classes/sun/awt/X11/XMenuWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XMenuWindow.java
@@ -32,7 +32,7 @@
import java.awt.geom.Point2D;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
public class XMenuWindow extends XBaseMenuWindow {
@@ -42,7 +42,7 @@
*
************************************************/
- private static Logger log = Logger.getLogger("sun.awt.X11.XMenuWindow");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuWindow");
/*
* Primary members
@@ -399,7 +399,7 @@
if (!isCreated()) {
return;
}
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("showing menu window + " + getWindow() + " at " + bounds);
}
XToolkit.awtLock();
diff --git a/src/solaris/classes/sun/awt/X11/XNETProtocol.java b/src/solaris/classes/sun/awt/X11/XNETProtocol.java
index 02a5708..8625272 100644
--- a/src/solaris/classes/sun/awt/X11/XNETProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XNETProtocol.java
@@ -27,14 +27,13 @@
package sun.awt.X11;
import java.awt.Frame;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol
{
- private final static Logger log = Logger.getLogger("sun.awt.X11.XNETProtocol");
- private final static Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XNETProtocol");
- private static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XNETProtocol");
+ private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
+ private final static PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
+ private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XNETProtocol");
/**
* XStateProtocol
@@ -44,7 +43,7 @@
}
public void setState(XWindowPeer window, int state) {
- if (log.isLoggable(Level.FINE)) log.fine("Setting state of " + window + " to " + state);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting state of " + window + " to " + state);
if (window.isShowing()) {
requestState(window, state);
} else {
@@ -54,11 +53,7 @@
private void setInitialState(XWindowPeer window, int state) {
XAtomList old_state = window.getNETWMState();
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Current state of the window {0} is {1}",
- new Object[] {String.valueOf(window),
- String.valueOf(old_state)});
- }
+ log.fine("Current state of the window {0} is {1}", window, old_state);
if ((state & Frame.MAXIMIZED_VERT) != 0) {
old_state.add(XA_NET_WM_STATE_MAXIMIZED_VERT);
} else {
@@ -69,10 +64,7 @@
} else {
old_state.remove(XA_NET_WM_STATE_MAXIMIZED_HORZ);
}
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Setting initial state of the window {0} to {1}",
- new Object[] {String.valueOf(window), String.valueOf(old_state)});
- }
+ log.fine("Setting initial state of the window {0} to {1}", window, old_state);
window.setNETWMState(old_state);
}
@@ -105,7 +97,7 @@
default:
return;
}
- if (log.isLoggable(Level.FINE)) log.fine("Requesting state on " + window + " for " + state);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Requesting state on " + window + " for " + state);
req.set_type((int)XConstants.ClientMessage);
req.set_window(window.getWindow());
req.set_message_type(XA_NET_WM_STATE.getAtom());
@@ -187,11 +179,7 @@
req.set_data(1, state.getAtom());
// Fix for 6735584: req.data[2] must be set to 0 when only one property is changed
req.set_data(2, 0);
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Setting _NET_STATE atom {0} on {1} for {2}",
- new Object[] {String.valueOf(state), String.valueOf(window),
- Boolean.valueOf(isAdd)});
- }
+ log.fine("Setting _NET_STATE atom {0} on {1} for {2}", state, window, Boolean.valueOf(isAdd));
XToolkit.awtLock();
try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -216,26 +204,20 @@
* @param reset Indicates operation, 'set' if false, 'reset' if true
*/
private void setStateHelper(XWindowPeer window, XAtom state, boolean set) {
- log.log(Level.FINER, "Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}",
- new Object[] {Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()),
- Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing())});
+ log.finer("Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}",
+ Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()),
+ Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing()));
if (window.isShowing()) {
requestState(window, state, set);
} else {
XAtomList net_wm_state = window.getNETWMState();
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Current state on {0} is {1}",
- new Object[] {String.valueOf(window), net_wm_state});
- }
+ log.finer("Current state on {0} is {1}", window, net_wm_state);
if (!set) {
net_wm_state.remove(state);
} else {
net_wm_state.add(state);
}
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Setting states on {0} to {1}",
- new Object[] {String.valueOf(window), net_wm_state});
- }
+ log.fine("Setting states on {0} to {1}", window, net_wm_state);
window.setNETWMState(net_wm_state);
}
XToolkit.XSync();
@@ -289,7 +271,7 @@
}
NetWindow = checkAnchor(XA_NET_SUPPORTING_WM_CHECK, XAtom.XA_WINDOW);
supportChecked = true;
- if (log.isLoggable(Level.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0));
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0));
}
boolean active() {
@@ -326,7 +308,7 @@
if (net_wm_name_string == null) {
return false;
}
- if (log.isLoggable(Level.FINE)) log.fine("### WM_NAME = " + net_wm_name_string);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### WM_NAME = " + net_wm_name_string);
return net_wm_name_string.startsWith(name);
}
diff --git a/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java b/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java
index 55fcfb5..7eba1b8 100644
--- a/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XPopupMenuPeer.java
@@ -33,7 +33,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.Vector;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit;
@@ -44,7 +44,7 @@
* Data members
*
************************************************/
- private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseMenuWindow");
/*
* Primary members
@@ -146,7 +146,7 @@
* for adding separators
*/
public void addSeparator() {
- if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented");
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("addSeparator is not implemented");
}
/*
@@ -382,7 +382,7 @@
*/
public void handleKeyPress(XEvent xev) {
XKeyEvent xkey = xev.get_xkey();
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(xkey.toString());
}
if (isEventDisabled(xev)) {
diff --git a/src/solaris/classes/sun/awt/X11/XProtocol.java b/src/solaris/classes/sun/awt/X11/XProtocol.java
index 9fe1d02..44e10f8 100644
--- a/src/solaris/classes/sun/awt/X11/XProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XProtocol.java
@@ -25,12 +25,12 @@
package sun.awt.X11;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.util.*;
class XProtocol {
- private final static Logger log = Logger.getLogger("sun.awt.X11.XProtocol");
+ private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
private Map<XAtom, XAtomList> atomToList = new HashMap<XAtom, XAtomList>();
private Map<XAtom, Long> atomToAnchor = new HashMap<XAtom, Long>();
@@ -54,11 +54,7 @@
} finally {
if (firstCheck) {
firstCheck = false;
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "{0}:{1} supports {2}",
- new Object[] {String.valueOf(this), String.valueOf(listName),
- String.valueOf(protocols)});
- }
+ log.fine("{0}:{1} supports {2}", this, listName, protocols);
}
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XQueryTree.java b/src/solaris/classes/sun/awt/X11/XQueryTree.java
index e3e4901..c352cbb 100644
--- a/src/solaris/classes/sun/awt/X11/XQueryTree.java
+++ b/src/solaris/classes/sun/awt/X11/XQueryTree.java
@@ -28,7 +28,6 @@
package sun.awt.X11;
import sun.misc.Unsafe;
-import java.util.logging.*;
public class XQueryTree {
private static Unsafe unsafe = XlibWrapper.unsafe;
diff --git a/src/solaris/classes/sun/awt/X11/XScrollbar.java b/src/solaris/classes/sun/awt/X11/XScrollbar.java
index 6e4bd8c..6c26c47 100644
--- a/src/solaris/classes/sun/awt/X11/XScrollbar.java
+++ b/src/solaris/classes/sun/awt/X11/XScrollbar.java
@@ -30,14 +30,14 @@
import java.awt.image.BufferedImage;
import sun.awt.SunToolkit;
import sun.awt.X11GraphicsConfig;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
/**
* A simple vertical scroll bar.
*/
abstract class XScrollbar {
- private static Logger log = Logger.getLogger("sun.awt.X11.XScrollbar");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbar");
/**
* The thread that asynchronously tells the scrollbar to scroll.
* @see #startScrolling
@@ -118,7 +118,7 @@
abstract protected void rebuildArrows();
public void setSize(int width, int height) {
- if (log.isLoggable(Level.FINER)) log.finer("Setting scroll bar " + this + " size to " + width + "x" + height);
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Setting scroll bar " + this + " size to " + width + "x" + height);
this.width = width;
this.height = height;
}
@@ -164,7 +164,7 @@
* @param paintAll paint the whole scrollbar if true, just the thumb is false
*/
void paint(Graphics g, Color colors[], boolean paintAll) {
- if (log.isLoggable(Level.FINER)) log.finer("Painting scrollbar " + this);
+ if (log.isLoggable(PlatformLogger.FINER)) log.finer("Painting scrollbar " + this);
boolean useBufferedImage = false;
Graphics2D g2 = null;
@@ -454,7 +454,7 @@
return;
}
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
String type;
switch (id) {
case MouseEvent.MOUSE_PRESSED:
diff --git a/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java b/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
index f90bde0..a5e6d3e 100644
--- a/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
@@ -28,10 +28,10 @@
import java.awt.*;
import java.awt.event.*;
import java.awt.peer.*;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbarClient {
- private final static Logger log = Logger.getLogger("sun.awt.X11.XScrollbarPeer");
+ private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
private static final int DEFAULT_LENGTH = 50;
private static final int DEFAULT_WIDTH_SOLARIS = 19;
@@ -162,7 +162,7 @@
public void handleJavaKeyEvent(KeyEvent event) {
super.handleJavaKeyEvent(event);
- if (log.isLoggable(Level.FINEST)) log.finer("KeyEvent on scrollbar: " + event);
+ if (log.isLoggable(PlatformLogger.FINEST)) log.finer("KeyEvent on scrollbar: " + event);
if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) {
switch(event.getKeyCode()) {
case KeyEvent.VK_UP:
diff --git a/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java b/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java
index 83ba45c..1fa4e43 100644
--- a/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java
@@ -27,14 +27,14 @@
import java.awt.*;
import java.awt.peer.SystemTrayPeer;
-import java.util.logging.Logger;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import sun.awt.SunToolkit;
import sun.awt.AppContext;
+import sun.util.logging.PlatformLogger;
public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XSystemTrayPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XSystemTrayPeer");
SystemTray target;
static XSystemTrayPeer peerInstance; // there is only one SystemTray peer per application
diff --git a/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java b/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
index 8d0d79e..981478f 100644
--- a/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
@@ -52,12 +52,13 @@
import com.sun.java.swing.plaf.motif.*;
import java.awt.im.InputMethodRequests;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
+
import sun.awt.CausedFocusEvent;
import sun.awt.ComponentAccessor;
public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XTextField");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XTextField");
String text;
XAWTTextField xtext;
@@ -256,7 +257,7 @@
}
public void setBackground(Color c) {
- if (log.isLoggable(Level.FINE)) log.fine("target="+ target + ", old=" + background + ", new=" + c);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("target="+ target + ", old=" + background + ", new=" + c);
background = c;
if (xtext != null) {
xtext.setBackground(c);
diff --git a/src/solaris/classes/sun/awt/X11/XToolkit.java b/src/solaris/classes/sun/awt/X11/XToolkit.java
index dd72f5e..1103ee6 100644
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java
@@ -46,22 +46,22 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import javax.swing.LookAndFeel;
import javax.swing.UIDefaults;
import sun.awt.*;
+import sun.font.FontConfigManager;
import sun.font.FontManager;
import sun.misc.PerformanceLogger;
import sun.print.PrintJob2D;
import sun.security.action.GetBooleanAction;
+import sun.util.logging.PlatformLogger;
public final class XToolkit extends UNIXToolkit implements Runnable {
- private static Logger log = Logger.getLogger("sun.awt.X11.XToolkit");
- private static Logger eventLog = Logger.getLogger("sun.awt.X11.event.XToolkit");
- private static final Logger timeoutTaskLog = Logger.getLogger("sun.awt.X11.timeoutTask.XToolkit");
- private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XToolkit");
- private static final Logger backingStoreLog = Logger.getLogger("sun.awt.X11.backingStore.XToolkit");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XToolkit");
+ private static final PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XToolkit");
+ private static final PlatformLogger timeoutTaskLog = PlatformLogger.getLogger("sun.awt.X11.timeoutTask.XToolkit");
+ private static final PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XToolkit");
+ private static final PlatformLogger backingStoreLog = PlatformLogger.getLogger("sun.awt.X11.backingStore.XToolkit");
//There is 400 ms is set by default on Windows and 500 by default on KDE and GNOME.
//We use the same hardcoded constant.
@@ -95,6 +95,8 @@
*/
private XSettings xs;
+ private FontConfigManager fcManager = new FontConfigManager();
+
static int arrowCursor;
static TreeMap winMap = new TreeMap();
static HashMap specialPeerMap = new HashMap();
@@ -178,13 +180,13 @@
// Default XErrorHandler may just terminate the process. Don't call it.
// return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData);
}
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Unhandled XErrorEvent: " +
- "id=" + error.get_resourceid() + ", " +
- "serial=" + error.get_serial() + ", " +
- "ec=" + error.get_error_code() + ", " +
- "rc=" + error.get_request_code() + ", " +
- "mc=" + error.get_minor_code());
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Unhandled XErrorEvent: " +
+ "id=" + error.get_resourceid() + ", " +
+ "serial=" + error.get_serial() + ", " +
+ "ec=" + error.get_error_code() + ", " +
+ "rc=" + error.get_request_code() + ", " +
+ "mc=" + error.get_minor_code());
}
return 0;
}
@@ -203,7 +205,7 @@
return SAVED_ERROR_HANDLER(display, event);
}
} catch (Throwable z) {
- log.log(Level.FINE, "Error in GlobalErrorHandler", z);
+ log.fine("Error in GlobalErrorHandler", z);
}
return 0;
}
@@ -321,16 +323,9 @@
((XAWTXSettings)xs).dispose();
}
freeXKB();
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
dumpPeers();
}
-
- awtLock();
- try {
- XlibWrapper.XSetErrorHandler(saved_error_handler);
- } finally {
- awtUnlock();
- }
}
});
}
@@ -564,8 +559,8 @@
}
static void processException(Throwable thr) {
- if (log.isLoggable(Level.WARNING)) {
- log.log(Level.WARNING, "Exception on Toolkit thread", thr);
+ if (log.isLoggable(PlatformLogger.WARNING)) {
+ log.warning("Exception on Toolkit thread", thr);
}
}
@@ -626,8 +621,8 @@
continue;
}
- if (eventLog.isLoggable(Level.FINER)) {
- eventLog.log(Level.FINER, "{0}", String.valueOf(ev));
+ if (eventLog.isLoggable(PlatformLogger.FINER)) {
+ eventLog.finer("{0}", ev);
}
// Check if input method consumes the event
@@ -642,13 +637,13 @@
}
}
}
- if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+ if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("before XFilterEvent:"+ev);
}
if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
continue;
}
- if( keyEventLog.isLoggable(Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+ if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
}
@@ -1335,7 +1330,7 @@
}
static void dumpPeers() {
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Mapped windows:");
Iterator iter = winMap.entrySet().iterator();
while (iter.hasNext()) {
@@ -1431,7 +1426,7 @@
}
} catch (InterruptedException ie) {
// Note: the returned timeStamp can be incorrect in this case.
- if (log.isLoggable(Level.FINE)) log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
}
} finally {
awtUnlock();
@@ -1530,7 +1525,7 @@
*/
if (desktopProperties.get(SunToolkit.DESKTOPFONTHINTS) == null) {
if (XWM.isKDE2()) {
- Object hint = FontManager.getFontConfigAAHint();
+ Object hint = fcManager.getFontConfigAAHint();
if (hint != null) {
/* set the fontconfig/KDE property so that
* getDesktopHints() below will see it
@@ -1764,7 +1759,7 @@
} finally {
awtUnlock();
}
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("metaMask = " + metaMask);
log.fine("altMask = " + altMask);
log.fine("numLockMask = " + numLockMask);
@@ -1786,11 +1781,11 @@
}
awtLock();
try {
- if (timeoutTaskLog.isLoggable(Level.FINER)) {
+ if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
timeoutTaskLog.finer("Removing task " + task);
}
if (timeoutTasks == null) {
- if (timeoutTaskLog.isLoggable(Level.FINER)) {
+ if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
timeoutTaskLog.finer("Task is not scheduled");
}
return;
@@ -1837,13 +1832,11 @@
awtLock();
try {
- if (timeoutTaskLog.isLoggable(Level.FINER)) {
- timeoutTaskLog.log(Level.FINER, "XToolkit.schedule(): current time={0}" +
- "; interval={1}" +
- "; task being added={2}" + "; tasks before addition={3}",
- new Object[] {Long.valueOf(System.currentTimeMillis()),
- Long.valueOf(interval), String.valueOf(task),
- String.valueOf(timeoutTasks)});
+ if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+ timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" +
+ "; interval={1}" +
+ "; task being added={2}" + "; tasks before addition={3}",
+ Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval), task, timeoutTasks);
}
if (timeoutTasks == null) {
@@ -1886,10 +1879,9 @@
* Called from run() under awtLock.
*/
private static void callTimeoutTasks() {
- if (timeoutTaskLog.isLoggable(Level.FINER)) {
- timeoutTaskLog.log(Level.FINER, "XToolkit.callTimeoutTasks(): current time={0}" +
- "; tasks={1}",
- new Object[] {Long.valueOf(System.currentTimeMillis()), String.valueOf(timeoutTasks)});
+ if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+ timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
+ "; tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks);
}
if (timeoutTasks == null || timeoutTasks.isEmpty()) {
@@ -1905,10 +1897,9 @@
for (Iterator iter = tasks.iterator(); iter.hasNext();) {
Runnable task = (Runnable)iter.next();
- if (timeoutTaskLog.isLoggable(Level.FINER)) {
- timeoutTaskLog.log(Level.FINER, "XToolkit.callTimeoutTasks(): current time={0}" +
- "; about to run task={1}",
- new Object[] {Long.valueOf(currentTime), String.valueOf(task)});
+ if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+ timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
+ "; about to run task={1}", Long.valueOf(currentTime), task);
}
try {
@@ -1981,7 +1972,7 @@
*/
long current_time_utc = System.currentTimeMillis();
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("reset_time=" + reset_time_utc + ", current_time=" + current_time_utc
+ ", server_offset=" + server_offset + ", wrap_time=" + WRAP_TIME_MILLIS);
}
@@ -1990,7 +1981,7 @@
reset_time_utc = System.currentTimeMillis() - getCurrentServerTime();
}
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("result = " + (reset_time_utc + server_offset));
}
return reset_time_utc + server_offset;
@@ -2075,14 +2066,14 @@
if (prop == null) {
backingStoreType = XConstants.NotUseful;
- if (backingStoreLog.isLoggable(Level.CONFIG)) {
+ if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
backingStoreLog.config("The system property sun.awt.backingStore is not set" +
", by default backingStore=NotUseful");
}
return;
}
- if (backingStoreLog.isLoggable(Level.CONFIG)) {
+ if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
backingStoreLog.config("The system property sun.awt.backingStore is " + prop);
}
prop = prop.toLowerCase();
@@ -2094,7 +2085,7 @@
backingStoreType = XConstants.NotUseful;
}
- if (backingStoreLog.isLoggable(Level.CONFIG)) {
+ if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
backingStoreLog.config("backingStore(as provided by the system property)=" +
( backingStoreType == XConstants.NotUseful ? "NotUseful"
: backingStoreType == XConstants.WhenMapped ?
@@ -2104,7 +2095,7 @@
if (sun.java2d.x11.X11SurfaceData.isDgaAvailable()) {
backingStoreType = XConstants.NotUseful;
- if (backingStoreLog.isLoggable(Level.CONFIG)) {
+ if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
backingStoreLog.config("DGA is available, backingStore=NotUseful");
}
@@ -2119,7 +2110,7 @@
== XConstants.NotUseful) {
backingStoreType = XConstants.NotUseful;
- if (backingStoreLog.isLoggable(Level.CONFIG)) {
+ if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
backingStoreLog.config("Backing store is not available on the screen " +
i + ", backingStore=NotUseful");
}
@@ -2365,10 +2356,7 @@
// Wait for selection notify for oops on win
long event_number = getEventNumber();
XAtom atom = XAtom.get("WM_S0");
- if (eventLog.isLoggable(Level.FINER)) {
- eventLog.log(Level.FINER, "WM_S0 selection owner {0}",
- new Object[] {String.valueOf(XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom()))});
- }
+ eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom()));
XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(),
XAtom.get("VERSION").getAtom(), oops.getAtom(),
win.getWindow(), XConstants.CurrentTime);
@@ -2394,7 +2382,7 @@
// If selection update failed we can simply wait some time
// hoping some events will arrive
awtUnlock();
- eventLog.log(Level.FINEST, "Emergency sleep");
+ eventLog.finest("Emergency sleep");
try {
Thread.sleep(WORKAROUND_SLEEP);
} catch (InterruptedException ie) {
@@ -2406,7 +2394,7 @@
return getEventNumber() - event_number > 2;
} finally {
removeEventDispatcher(win.getWindow(), oops_waiter);
- eventLog.log(Level.FINER, "Exiting syncNativeQueue");
+ eventLog.finer("Exiting syncNativeQueue");
awtUnlock();
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java b/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
index f3b6310..da4a6b0 100644
--- a/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
@@ -31,18 +31,17 @@
import sun.awt.*;
import java.awt.image.*;
import java.text.BreakIterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
import java.util.concurrent.ArrayBlockingQueue;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.InvocationTargetException;
+import sun.util.logging.PlatformLogger;
public class XTrayIconPeer implements TrayIconPeer,
InfoWindow.Balloon.LiveArguments,
InfoWindow.Tooltip.LiveArguments
{
- private static final Logger ctrLog = Logger.getLogger("sun.awt.X11.XTrayIconPeer.centering");
+ private static final PlatformLogger ctrLog = PlatformLogger.getLogger("sun.awt.X11.XTrayIconPeer.centering");
TrayIcon target;
TrayIconEventProxy eventProxy;
@@ -107,9 +106,9 @@
XConfigureEvent ce = ev.get_xconfigure();
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
- new Object[] { XTrayIconPeer.this, ce.get_width(), ce.get_height(),
- ce.get_x(), ce.get_y(), old_x, old_y });
+ ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
+ XTrayIconPeer.this, ce.get_width(), ce.get_height(),
+ ce.get_x(), ce.get_y(), old_x, old_y);
// A workaround for Gnome/Metacity (it doesn't affect the behaviour on KDE).
// On Metacity the EmbeddedFrame's parent window bounds are larger
@@ -129,17 +128,14 @@
// If both the height and the width differ from the fixed size then WM
// must level at least one side to the fixed size. For some reason it may take
// a few hops (even after reparenting) and we have to skip the intermediate ones.
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
- String.valueOf(XTrayIconPeer.this));
- }
+ ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
+ XTrayIconPeer.this);
return;
} else if (ce.get_height() > TRAY_ICON_HEIGHT) {
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Centering by \"Y\".",
- String.valueOf(XTrayIconPeer.this));
- }
+
+ ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".",
+ XTrayIconPeer.this);
XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
ce.get_x(),
@@ -150,10 +146,9 @@
ex_width = 0;
} else if (ce.get_width() > TRAY_ICON_WIDTH) {
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}. Centering by \"X\".",
- String.valueOf(XTrayIconPeer.this));
- }
+
+ ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".",
+ XTrayIconPeer.this);
XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
ce.get_x()+ce.get_width()/2 - TRAY_ICON_WIDTH/2,
@@ -169,32 +164,25 @@
// In this case the parent window also lose centering. We have to restore it.
if (ex_height != 0) {
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}." +
- " Move detected. Centering by \"Y\".",
- String.valueOf(XTrayIconPeer.this));
- }
+
+ ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
+ XTrayIconPeer.this);
XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
ce.get_x(),
ce.get_y() + ex_height/2 - TRAY_ICON_HEIGHT/2);
} else if (ex_width != 0) {
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}." +
- "Move detected. Centering by \"X\".",
- String.valueOf(XTrayIconPeer.this));
- }
+
+ ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
+ XTrayIconPeer.this);
XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
ce.get_x() + ex_width/2 - TRAY_ICON_WIDTH/2,
ce.get_y());
} else {
- if (ctrLog.isLoggable(Level.FINE)) {
- ctrLog.log(Level.FINE, "ConfigureNotify on parent of {0}." +
- "Move detected. Skipping.",
- String.valueOf(XTrayIconPeer.this));
- }
+ ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.",
+ XTrayIconPeer.this);
}
}
old_x = ce.get_x();
diff --git a/src/solaris/classes/sun/awt/X11/XWINProtocol.java b/src/solaris/classes/sun/awt/X11/XWINProtocol.java
index 83b676a..fae0ec1 100644
--- a/src/solaris/classes/sun/awt/X11/XWINProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XWINProtocol.java
@@ -27,11 +27,10 @@
package sun.awt.X11;
import java.awt.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
- final static Logger log = Logger.getLogger("sun.awt.X11.XWINProtocol");
+ final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
/* Gnome WM spec */
XAtom XA_WIN_SUPPORTING_WM_CHECK = XAtom.get("_WIN_SUPPORTING_WM_CHECK");
@@ -64,7 +63,7 @@
req.set_format(32);
req.set_data(0, (WIN_STATE_MAXIMIZED_HORIZ | WIN_STATE_MAXIMIZED_VERT));
req.set_data(1, win_state);
- if (log.isLoggable(Level.FINE)) log.fine("Sending WIN_STATE to root to change the state to " + win_state);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Sending WIN_STATE to root to change the state to " + win_state);
try {
XToolkit.awtLock();
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -112,7 +111,7 @@
win_state &= ~WIN_STATE_MAXIMIZED_HORIZ;
}
if ((old_win_state ^ win_state) != 0) {
- if (log.isLoggable(Level.FINE)) log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state);
XA_WIN_STATE.setCard32Property(window, win_state);
}
}
@@ -157,7 +156,7 @@
req.set_data(0, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
req.set_data(1, 0);
req.set_data(2, 0);
- if (log.isLoggable(Level.FINE)) log.fine("Setting layer " + layer + " by root message : " + req);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting layer " + layer + " by root message : " + req);
XToolkit.awtLock();
try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -172,7 +171,7 @@
}
req.dispose();
} else {
- if (log.isLoggable(Level.FINE)) log.fine("Setting layer property to " + layer);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting layer property to " + layer);
XA_WIN_LAYER.setCard32Property(window, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
}
}
@@ -198,7 +197,7 @@
}
WinWindow = checkAnchor(XA_WIN_SUPPORTING_WM_CHECK, XAtom.XA_CARDINAL);
supportChecked = true;
- if (log.isLoggable(Level.FINE)) log.fine("### " + this + " is active: " + (WinWindow != 0));
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " is active: " + (WinWindow != 0));
}
boolean active() {
@@ -207,13 +206,13 @@
}
boolean doStateProtocol() {
boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_STATE);
- if (log.isLoggable(Level.FINE)) log.fine("### " + this + " supports state: " + res);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " supports state: " + res);
return res;
}
boolean doLayerProtocol() {
boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_LAYER);
- if (log.isLoggable(Level.FINE)) log.fine("### " + this + " supports layer: " + res);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " supports layer: " + res);
return res;
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XWM.java b/src/solaris/classes/sun/awt/X11/XWM.java
index 74aa311..d37d24a 100644
--- a/src/solaris/classes/sun/awt/X11/XWM.java
+++ b/src/solaris/classes/sun/awt/X11/XWM.java
@@ -37,10 +37,10 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import sun.util.logging.PlatformLogger;
+
/**
* Class incapsulating knowledge about window managers in general
@@ -49,9 +49,9 @@
final class XWM
{
- private final static Logger log = Logger.getLogger("sun.awt.X11.XWM");
- private final static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWM");
- private final static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XWM");
+ private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
+ private final static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
+ private final static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
static final XAtom XA_MWM_HINTS = new XAtom();
@@ -142,7 +142,7 @@
XWM(int WMID) {
this.WMID = WMID;
initializeProtocols();
- if (log.isLoggable(Level.FINE)) log.fine("Window manager: " + toString());
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Window manager: " + toString());
}
int getID() {
return WMID;
@@ -246,7 +246,7 @@
* having a window manager running. I.e. it does not reparent
* top level shells.
*/
- if (insLog.isLoggable(Level.FINE)) {
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.finer("eXcursion means NO_WM");
}
return true;
@@ -264,7 +264,7 @@
long selection_owner =
XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(),
XAtom.get(selection_name).getAtom());
- if (insLog.isLoggable(Level.FINE)) {
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.finer("selection owner of " + selection_name
+ " is " + selection_owner);
}
@@ -293,7 +293,7 @@
XToolkit.getDefaultRootWindow(),
XConstants.CWEventMask,
substruct.pData);
- if (insLog.isLoggable(Level.FINE)) {
+ if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.finer("It looks like there is no WM thus NO_WM");
}
}
@@ -355,7 +355,7 @@
return 0;
}
} catch (Exception e) {
- if (log.isLoggable(Level.FINER)) {
+ if (log.isLoggable(PlatformLogger.FINER)) {
e.printStackTrace();
}
return 0;
@@ -401,10 +401,7 @@
static boolean isCDE() {
if (!XA_DT_SM_WINDOW_INFO.isInterned()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "{0} is not interned",
- new Object[] {String.valueOf(XA_DT_SM_WINDOW_INFO)});
- }
+ log.finer("{0} is not interned", XA_DT_SM_WINDOW_INFO);
return false;
}
@@ -435,10 +432,7 @@
/* Now check that this window has _DT_SM_STATE_INFO (ignore contents) */
if (!XA_DT_SM_STATE_INFO.isInterned()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "{0} is not interned",
- new Object[] {String.valueOf(XA_DT_SM_STATE_INFO)});
- }
+ log.finer("{0} is not interned", XA_DT_SM_STATE_INFO);
return false;
}
WindowPropertyGetter getter2 =
@@ -602,10 +596,7 @@
*/
if (!XA_ICEWM_WINOPTHINT.isInterned()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "{0} is not interned",
- String.valueOf(XA_ICEWM_WINOPTHINT));
- }
+ log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
return false;
}
@@ -638,10 +629,7 @@
*/
static boolean isIceWM() {
if (!XA_ICEWM_WINOPTHINT.isInterned()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "{0} is not interned",
- new Object[] {String.valueOf(XA_ICEWM_WINOPTHINT)});
- }
+ log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
return false;
}
@@ -706,7 +694,7 @@
return wm;
}
static int getWMID() {
- if (insLog.isLoggable(Level.FINEST)) {
+ if (insLog.isLoggable(PlatformLogger.FINEST)) {
insLog.finest("awt_wmgr = " + awt_wmgr);
}
/*
@@ -730,7 +718,7 @@
// Later, WM will initialize its own version of protocol
XNETProtocol l_net_protocol = g_net_protocol = new XNETProtocol();
l_net_protocol.detect();
- if (log.isLoggable(Level.FINE) && l_net_protocol.active()) {
+ if (log.isLoggable(PlatformLogger.FINE) && l_net_protocol.active()) {
log.fine("_NET_WM_NAME is " + l_net_protocol.getWMName());
}
XWINProtocol win = g_win_protocol = new XWINProtocol();
@@ -810,7 +798,7 @@
}
hints.set_flags(hints.get_flags() & ~mask);
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(),
window.getWindow(),
hints.pData);
@@ -867,7 +855,7 @@
XAtomList decorDel = new XAtomList();
decorations = normalizeMotifDecor(decorations);
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations));
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations));
if ((decorations & MWMConstants.MWM_DECOR_TITLE) == 0) {
decorDel.add(XA_OL_DECOR_HEADER);
}
@@ -884,7 +872,7 @@
insLog.finer("Deleting OL_DECOR");
XA_OL_DECOR_DEL.DeleteProperty(window);
} else {
- if (insLog.isLoggable(Level.FINER)) insLog.finer("Setting OL_DECOR to " + decorDel);
+ if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting OL_DECOR to " + decorDel);
XA_OL_DECOR_DEL.setAtomListProperty(window, decorDel);
}
}
@@ -912,7 +900,7 @@
hints.set_functions(functions);
hints.set_decorations(decorations);
- if (stateLog.isLoggable(Level.FINER)) stateLog.finer("Setting MWM_HINTS to " + hints);
+ if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("Setting MWM_HINTS to " + hints);
window.setMWMHints(hints);
}
@@ -974,7 +962,7 @@
* Make specified shell resizable.
*/
static void setShellResizable(XDecoratedPeer window) {
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell resizable " + window);
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell resizable " + window);
XToolkit.awtLock();
try {
Rectangle shellBounds = window.getShellBounds();
@@ -1004,7 +992,7 @@
static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds,
boolean justChangeSize)
{
- if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
+ if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
", shellBounds " + shellBounds +", just change size: " + justChangeSize);
XToolkit.awtLock();
try {
@@ -1297,7 +1285,7 @@
res = defaultInsets;
}
}
- if (insLog.isLoggable(Level.FINEST)) insLog.finest("WM guessed insets: " + res);
+ if (insLog.isLoggable(PlatformLogger.FINEST)) insLog.finest("WM guessed insets: " + res);
return res;
}
/*
@@ -1366,9 +1354,7 @@
XNETProtocol net_protocol = getWM().getNETProtocol();
if (net_protocol != null && net_protocol.active()) {
Insets insets = getInsetsFromProp(window, XA_NET_FRAME_EXTENTS);
- if (insLog.isLoggable(Level.FINE)) {
- insLog.log(Level.FINE, "_NET_FRAME_EXTENTS: {0}", String.valueOf(insets));
- }
+ insLog.fine("_NET_FRAME_EXTENTS: {0}", insets);
if (insets != null) {
return insets;
@@ -1509,10 +1495,7 @@
* [mwm, e!, kwin, fvwm2 ... ]
*/
Insets correctWM = XWM.getInsetsFromExtents(window);
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "Got insets from property: {0}",
- String.valueOf(correctWM));
- }
+ insLog.finer("Got insets from property: {0}", correctWM);
if (correctWM == null) {
correctWM = new Insets(0,0,0,0);
@@ -1573,10 +1556,7 @@
}
case XWM.OTHER_WM:
default: { /* this is very similar to the E! case above */
- if (insLog.isLoggable(Level.FINEST)) {
- insLog.log(Level.FINEST, "Getting correct insets for OTHER_WM/default, parent: {0}",
- String.valueOf(parent));
- }
+ insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}", parent);
syncTopLevelPos(parent, lwinAttr);
int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
window, lwinAttr.pData);
@@ -1603,11 +1583,8 @@
&& lwinAttr.get_width()+2*lwinAttr.get_border_width() == pattr.get_width()
&& lwinAttr.get_height()+2*lwinAttr.get_border_width() == pattr.get_height())
{
- if (insLog.isLoggable(Level.FINEST)) {
- insLog.log(Level.FINEST, "Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
- new Object[] {String.valueOf(lwinAttr), String.valueOf(pattr),
- String.valueOf(parent), String.valueOf(window)});
- }
+ insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
+ lwinAttr, pattr, parent, window);
lwinAttr.set_x(pattr.get_x());
lwinAttr.set_y(pattr.get_y());
lwinAttr.set_border_width(lwinAttr.get_border_width()+pattr.get_border_width());
@@ -1634,11 +1611,8 @@
* widths and inner/outer distinction, so for the time
* being, just ignore it.
*/
- if (insLog.isLoggable(Level.FINEST)) {
- insLog.log(Level.FINEST, "Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
- new Object[] {String.valueOf(lwinAttr), String.valueOf(pattr),
- String.valueOf(parent), String.valueOf(window)});
- }
+ insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
+ lwinAttr, pattr, parent, window);
correctWM = new Insets(lwinAttr.get_y() + lwinAttr.get_border_width(),
lwinAttr.get_x() + lwinAttr.get_border_width(),
pattr.get_height() - (lwinAttr.get_y() + lwinAttr.get_height() + 2*lwinAttr.get_border_width()),
diff --git a/src/solaris/classes/sun/awt/X11/XWindow.java b/src/solaris/classes/sun/awt/X11/XWindow.java
index 4f7d568..8c44c32 100644
--- a/src/solaris/classes/sun/awt/X11/XWindow.java
+++ b/src/solaris/classes/sun/awt/X11/XWindow.java
@@ -35,8 +35,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.*;
@@ -46,11 +45,11 @@
import sun.java2d.SurfaceData;
public class XWindow extends XBaseWindow implements X11ComponentPeer {
- private static Logger log = Logger.getLogger("sun.awt.X11.XWindow");
- private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWindow");
- private static Logger eventLog = Logger.getLogger("sun.awt.X11.event.XWindow");
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XWindow");
- private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XWindow");
+ private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWindow");
+ private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWindow");
+ private static PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XWindow");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XWindow");
+ private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XWindow");
/* If a motion comes in while a multi-click is pending,
* allow a smudge factor so that moving the mouse by a small
* amount does not wipe out the multi-click state variables.
@@ -414,7 +413,7 @@
((Component)e.getSource()).dispatchEvent(e);
}
}, PeerEvent.ULTIMATE_PRIORITY_EVENT);
- if (focusLog.isLoggable(Level.FINER) && (e instanceof FocusEvent)) focusLog.finer("Sending " + e);
+ if (focusLog.isLoggable(PlatformLogger.FINER) && (e instanceof FocusEvent)) focusLog.finer("Sending " + e);
XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe);
}
@@ -670,7 +669,7 @@
if (isEventDisabled(xev)) {
return;
}
- if (eventLog.isLoggable(Level.FINE)) eventLog.fine(xbe.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(xbe.toString());
long when;
int modifiers;
boolean popupTrigger = false;
@@ -704,7 +703,7 @@
/*
multiclick checking
*/
- if (eventLog.isLoggable(Level.FINEST)) eventLog.finest("lastWindow = " + lastWindow + ", lastButton "
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest("lastWindow = " + lastWindow + ", lastButton "
+ lastButton + ", lastTime " + lastTime + ", multiClickTime "
+ XToolkit.getMultiClickTime());
if (lastWindow == this && lastButton == lbutton && (when - lastTime) < XToolkit.getMultiClickTime()) {
@@ -895,7 +894,7 @@
super.handleXCrossingEvent(xev);
XCrossingEvent xce = xev.get_xcrossing();
- if (eventLog.isLoggable(Level.FINEST)) eventLog.finest(xce.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xce.toString());
if (xce.get_type() == XConstants.EnterNotify) {
enterNotify(xce.get_window());
@@ -997,10 +996,8 @@
Rectangle oldBounds = getBounds();
super.handleConfigureNotifyEvent(xev);
- if (insLog.isLoggable(Level.FINER)) {
- insLog.log(Level.FINER, "Configure, {0}, event disabled: {1}",
- new Object[] {String.valueOf(xev.get_xconfigure()), isEventDisabled(xev)});
- }
+ insLog.finer("Configure, {0}, event disabled: {1}",
+ xev.get_xconfigure(), isEventDisabled(xev));
if (isEventDisabled(xev)) {
return;
}
@@ -1019,9 +1016,7 @@
public void handleMapNotifyEvent(XEvent xev) {
super.handleMapNotifyEvent(xev);
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Mapped {0}", new Object[] {String.valueOf(this)});
- }
+ log.fine("Mapped {0}", this);
if (isEventDisabled(xev)) {
return;
}
@@ -1078,7 +1073,7 @@
public void handleKeyPress(XEvent xev) {
super.handleKeyPress(xev);
XKeyEvent ev = xev.get_xkey();
- if (eventLog.isLoggable(Level.FINE)) eventLog.fine(ev.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString());
if (isEventDisabled(xev)) {
return;
}
@@ -1091,14 +1086,14 @@
int unicodeKey = 0;
keysym[0] = XConstants.NoSymbol;
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
logIncomingKeyEvent( ev );
}
if ( //TODO check if there's an active input method instance
// without calling a native method. Is it necessary though?
haveCurrentX11InputMethodInstance()) {
if (x11inputMethodLookupString(ev.pData, keysym)) {
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
keyEventLog.fine("--XWindow.java XIM did process event; return; dec keysym processed:"+(keysym[0])+
"; hex keysym processed:"+Long.toHexString(keysym[0])
);
@@ -1106,7 +1101,7 @@
return;
}else {
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
keyEventLog.fine("--XWindow.java XIM did NOT process event, hex keysym:"+Long.toHexString(keysym[0])+"\n"+
" unicode key:"+Integer.toHexString((int)unicodeKey));
}
@@ -1116,7 +1111,7 @@
// Produce do-it-yourself keysym and perhaps unicode character.
keysym[0] = xkeycodeToKeysym(ev);
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
keyEventLog.fine("--XWindow.java XIM is absent; hex keysym:"+Long.toHexString(keysym[0])+"\n"+
" unicode key:"+Integer.toHexString((int)unicodeKey));
}
@@ -1139,7 +1134,7 @@
// is undefined, we still have a guess of what has been engraved on a keytop.
int unicodeFromPrimaryKeysym = keysymToUnicode( xkeycodeToPrimaryKeysym(ev) ,0);
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
keyEventLog.fine(">>>Fire Event:"+
(ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
"jkeycode:decimal="+jkc.getJavaKeycode()+
@@ -1182,7 +1177,7 @@
public void handleKeyRelease(XEvent xev) {
super.handleKeyRelease(xev);
XKeyEvent ev = xev.get_xkey();
- if (eventLog.isLoggable(Level.FINE)) eventLog.fine(ev.toString());
+ if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString());
if (isEventDisabled(xev)) {
return;
}
@@ -1194,7 +1189,7 @@
int unicodeKey = 0;
keysym[0] = XConstants.NoSymbol;
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
logIncomingKeyEvent( ev );
}
// Keysym should be converted to Unicode, if possible and necessary,
@@ -1205,7 +1200,7 @@
if( jkc == null ) {
jkc = new XKeysym.Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_UNDEFINED, java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN);
}
- if (keyEventLog.isLoggable(Level.FINE)) {
+ if (keyEventLog.isLoggable(PlatformLogger.FINE)) {
keyEventLog.fine(">>>Fire Event:"+
(ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
"jkeycode:decimal="+jkc.getJavaKeycode()+
@@ -1337,16 +1332,10 @@
void updateSizeHints(int x, int y, int width, int height) {
long flags = XUtilConstants.PSize | (isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition));
if (!isResizable()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Window {0} is not resizable",
- new Object[] {String.valueOf(this)});
- }
+ log.finer("Window {0} is not resizable", this);
flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize;
} else {
- if (keyEventLog.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Window {0} is resizable",
- new Object[] {String.valueOf(this)});
- }
+ log.finer("Window {0} is resizable", this);
}
setSizeHints(flags, x, y, width, height);
}
@@ -1354,16 +1343,10 @@
void updateSizeHints(int x, int y) {
long flags = isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition);
if (!isResizable()) {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Window {0} is not resizable",
- new Object[] {String.valueOf(this)});
- }
+ log.finer("Window {0} is not resizable", this);
flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize | XUtilConstants.PSize;
} else {
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Window {0} is resizable",
- new Object[] {String.valueOf(this)});
- }
+ log.finer("Window {0} is resizable", this);
}
setSizeHints(flags, x, y, width, height);
}
diff --git a/src/solaris/classes/sun/awt/X11/XWindowPeer.java b/src/solaris/classes/sun/awt/X11/XWindowPeer.java
index 0c3a12a..f87ec27 100644
--- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java
+++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java
@@ -41,8 +41,7 @@
import java.util.Set;
import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import sun.util.logging.PlatformLogger;
import sun.awt.AWTAccessor;
import sun.awt.ComponentAccessor;
@@ -58,11 +57,11 @@
class XWindowPeer extends XPanelPeer implements WindowPeer,
DisplayChangedListener {
- private static final Logger log = Logger.getLogger("sun.awt.X11.XWindowPeer");
- private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XWindowPeer");
- private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XWindowPeer");
- private static final Logger grabLog = Logger.getLogger("sun.awt.X11.grab.XWindowPeer");
- private static final Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XWindowPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWindowPeer");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XWindowPeer");
+ private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWindowPeer");
+ private static final PlatformLogger grabLog = PlatformLogger.getLogger("sun.awt.X11.grab.XWindowPeer");
+ private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XWindowPeer");
// should be synchronized on awtLock
private static Set<XWindowPeer> windows = new HashSet<XWindowPeer>();
@@ -201,7 +200,7 @@
Window owner = t_window.getOwner();
if (owner != null) {
ownerPeer = (XWindowPeer)owner.getPeer();
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.fine("Owner is " + owner);
focusLog.fine("Owner peer is " + ownerPeer);
focusLog.fine("Owner X window " + Long.toHexString(ownerPeer.getWindow()));
@@ -214,7 +213,7 @@
XToolkit.awtLock();
try {
// Set WM_TRANSIENT_FOR
- if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+ if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+ " for " + Long.toHexString(ownerWindow));
setToplevelTransientFor(this, ownerPeer, false, true);
@@ -259,7 +258,7 @@
for (Iterator<Image> i = iconImages.iterator(); i.hasNext(); ) {
Image image = i.next();
if (image == null) {
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("XWindowPeer.updateIconImages: Skipping the image passed into Java because it's null.");
}
continue;
@@ -268,7 +267,7 @@
try {
iconInfo = new XIconInfo(image);
} catch (Exception e){
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("XWindowPeer.updateIconImages: Perhaps the image passed into Java is broken. Skipping this icon.");
}
continue;
@@ -339,9 +338,9 @@
}
}
- if (iconLog.isLoggable(Level.FINEST)) {
- iconLog.log(Level.FINEST, ">>> Length_ of buffer of icons data: " + totalLength +
- ", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON);
+ if (iconLog.isLoggable(PlatformLogger.FINEST)) {
+ iconLog.finest(">>> Length_ of buffer of icons data: " + totalLength +
+ ", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON);
}
return result;
@@ -351,10 +350,10 @@
* Dumps each icon from the list
*/
static void dumpIcons(java.util.List<XIconInfo> icons) {
- if (iconLog.isLoggable(Level.FINEST)) {
- iconLog.log(Level.FINEST, ">>> Sizes of icon images:");
+ if (iconLog.isLoggable(PlatformLogger.FINEST)) {
+ iconLog.finest(">>> Sizes of icon images:");
for (Iterator<XIconInfo> i = icons.iterator(); i.hasNext(); ) {
- iconLog.log(Level.FINEST, " {0}", String.valueOf(i.next()));
+ iconLog.finest(" {0}", i.next());
}
}
}
@@ -631,7 +630,7 @@
return;
}
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("XWindowPeer: Check if we've been moved to a new screen since we're running in Xinerama mode");
}
@@ -668,7 +667,7 @@
}
}
if (newScreenNum != curScreenNum) {
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("XWindowPeer: Moved to a new screen");
}
executeDisplayChangedOnEDT(newGC);
@@ -743,7 +742,7 @@
// override_redirect all we can do is check whether our parent
// is active. If it is - we can freely synthesize focus transfer.
// Luckily, this logic is already implemented in requestWindowFocus.
- if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Requesting window focus");
+ if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting window focus");
requestWindowFocus(time, timeProvided);
}
@@ -769,9 +768,7 @@
public void handleFocusEvent(XEvent xev) {
XFocusChangeEvent xfe = xev.get_xfocus();
FocusEvent fe;
- if (focusLog.isLoggable(Level.FINE)) {
- focusLog.log(Level.FINE, "{0}", new Object[] {String.valueOf(xfe)});
- }
+ focusLog.fine("{0}", xfe);
if (isEventDisabled(xev)) {
return;
}
@@ -954,7 +951,7 @@
}
private void updateAlwaysOnTop() {
- log.log(Level.FINE, "Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop));
+ log.fine("Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop));
XWM.getWM().setLayer(this,
alwaysOnTop ?
XLayerProtocol.LAYER_ALWAYS_ON_TOP :
@@ -1390,10 +1387,7 @@
synchronized(getStateLock()) {
XDialogPeer blockerPeer = (XDialogPeer) ComponentAccessor.getPeer(d);
if (blocked) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "{0} is blocked by {1}",
- new Object[] { String.valueOf(this), String.valueOf(blockerPeer)});
- }
+ log.fine("{0} is blocked by {1}", this, blockerPeer);
modalBlocker = d;
if (isReparented() || XWM.isNonReparentingWM()) {
@@ -1746,7 +1740,7 @@
}
public void xSetVisible(boolean visible) {
- if (log.isLoggable(Level.FINE)) log.fine("Setting visible on " + this + " to " + visible);
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
XToolkit.awtLock();
try {
this.visible = visible;
@@ -1869,10 +1863,9 @@
public void handleXCrossingEvent(XEvent xev) {
XCrossingEvent xce = xev.get_xcrossing();
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "{0}, when grabbed {1}, contains {2}",
- new Object[] {String.valueOf(xce), isGrabbed(),
- containsGlobal(xce.get_x_root(), xce.get_y_root())});
+ if (grabLog.isLoggable(PlatformLogger.FINE)) {
+ grabLog.fine("{0}, when grabbed {1}, contains {2}",
+ xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root()));
}
if (isGrabbed()) {
// When window is grabbed, all events are dispatched to
@@ -1883,10 +1876,7 @@
// since it generates MOUSE_ENTERED/MOUSE_EXITED for frame and dialog.
// (fix for 6390326)
XBaseWindow target = XToolkit.windowToXWindow(xce.get_window());
- if (grabLog.isLoggable(Level.FINER)) {
- grabLog.log(Level.FINER, " - Grab event target {0}",
- new Object[] {String.valueOf(target)});
- }
+ grabLog.finer(" - Grab event target {0}", target);
if (target != null && target != this) {
target.dispatchEvent(xev);
return;
@@ -1897,10 +1887,9 @@
public void handleMotionNotify(XEvent xev) {
XMotionEvent xme = xev.get_xmotion();
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINER, "{0}, when grabbed {1}, contains {2}",
- new Object[] {String.valueOf(xme), isGrabbed(),
- containsGlobal(xme.get_x_root(), xme.get_y_root())});
+ if (grabLog.isLoggable(PlatformLogger.FINE)) {
+ grabLog.finer("{0}, when grabbed {1}, contains {2}",
+ xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root()));
}
if (isGrabbed()) {
boolean dragging = false;
@@ -1929,10 +1918,7 @@
xme.set_x(localCoord.x);
xme.set_y(localCoord.y);
}
- if (grabLog.isLoggable(Level.FINER)) {
- grabLog.log(Level.FINER, " - Grab event target {0}",
- new Object[] {String.valueOf(target)});
- }
+ grabLog.finer(" - Grab event target {0}", target);
if (target != null) {
if (target != getContentXWindow() && target != this) {
target.dispatchEvent(xev);
@@ -1964,11 +1950,9 @@
if (xbe.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) {
return;
}
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
- new Object[] {String.valueOf(xbe), isGrabbed(),
- containsGlobal(xbe.get_x_root(), xbe.get_y_root()),
- getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight()});
+ if (grabLog.isLoggable(PlatformLogger.FINE)) {
+ grabLog.fine("{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
+ xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight());
}
if (isGrabbed()) {
// When window is grabbed, all events are dispatched to
@@ -1977,10 +1961,7 @@
// translation)
XBaseWindow target = XToolkit.windowToXWindow(xbe.get_window());
try {
- if (grabLog.isLoggable(Level.FINER)) {
- grabLog.log(Level.FINER, " - Grab event target {0} (press target {1})",
- new Object[] {String.valueOf(target), String.valueOf(pressTarget)});
- }
+ grabLog.finer(" - Grab event target {0} (press target {1})", target, pressTarget);
if (xbe.get_type() == XConstants.ButtonPress
&& xbe.get_button() == XConstants.buttons[0])
{
@@ -2013,10 +1994,7 @@
// Outside this toplevel hierarchy
// According to the specification of UngrabEvent, post it
// when press occurs outside of the window and not on its owned windows
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because not inside of shell",
- String.valueOf(this));
- }
+ grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
return;
}
@@ -2034,27 +2012,18 @@
// toplevel == null - outside of
// hierarchy, toplevel is Dialog - should
// send ungrab (but shouldn't for Window)
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because hierarchy ended",
- String.valueOf(this));
- }
+ grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended", this);
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
}
} else {
// toplevel is null - outside of hierarchy
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "Generating UngrabEvent on {0} because toplevel is null",
- String.valueOf(this));
- }
+ grabLog.fine("Generating UngrabEvent on {0} because toplevel is null", this);
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
return;
}
} else {
// target doesn't map to XAWT window - outside of hierarchy
- if (grabLog.isLoggable(Level.FINE)) {
- grabLog.log(Level.FINE, "Generating UngrabEvent on because target is null {0}",
- String.valueOf(this));
- }
+ grabLog.fine("Generating UngrabEvent on because target is null {0}", this);
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
return;
}
diff --git a/src/solaris/classes/sun/awt/X11/XWrapperBase.java b/src/solaris/classes/sun/awt/X11/XWrapperBase.java
index 4a5e852..50efd11 100644
--- a/src/solaris/classes/sun/awt/X11/XWrapperBase.java
+++ b/src/solaris/classes/sun/awt/X11/XWrapperBase.java
@@ -26,10 +26,10 @@
package sun.awt.X11;
// This class serves as the base class for all the wrappers.
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
abstract class XWrapperBase {
- static final Logger log = Logger.getLogger("sun.awt.X11.wrappers");
+ static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.wrappers");
public String toString() {
String ret = "";
diff --git a/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java b/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
index 3ad8662..ac36932 100644
--- a/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
+++ b/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
@@ -27,7 +27,8 @@
import java.io.*;
import java.nio.charset.*;
import java.text.MessageFormat;
-import java.util.logging.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
public class WrapperGenerator {
/* XLibParser converts Xlib.h to a Java Object that encapsulates the
@@ -835,7 +836,7 @@
pw.println("package "+package_name+";\n");
pw.println("import sun.misc.*;\n");
- pw.println("import java.util.logging.*;");
+ pw.println("import sun.util.logging.PlatformLogger;");
String baseClass = stp.getBaseClass();
if (baseClass == null) {
baseClass = defaultBaseClass;
diff --git a/src/solaris/classes/sun/awt/X11/keysym2ucs.h b/src/solaris/classes/sun/awt/X11/keysym2ucs.h
index e2372ac..32ecd66 100644
--- a/src/solaris/classes/sun/awt/X11/keysym2ucs.h
+++ b/src/solaris/classes/sun/awt/X11/keysym2ucs.h
@@ -67,8 +67,7 @@
tojava import java.util.Hashtable;
tojava import sun.misc.Unsafe;
tojava
-tojava import java.util.logging.Level;
-tojava import java.util.logging.Logger;
+tojava import sun.util.logging.PlatformLogger;
tojava
tojava public class XKeysym {
tojava
@@ -108,7 +107,7 @@
tojava static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>();
tojava static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize());
tojava static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
-tojava private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XKeysym");
+tojava private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
tojava public static char convertKeysym( long ks, int state ) {
tojava
tojava /* First check for Latin-1 characters (1:1 mapping) */
diff --git a/src/solaris/classes/sun/awt/X11FontManager.java b/src/solaris/classes/sun/awt/X11FontManager.java
new file mode 100644
index 0000000..fea46ff
--- /dev/null
+++ b/src/solaris/classes/sun/awt/X11FontManager.java
@@ -0,0 +1,850 @@
+package sun.awt;
+
+import java.awt.GraphicsEnvironment;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.plaf.FontUIResource;
+import sun.awt.motif.MFontConfiguration;
+import sun.font.CompositeFont;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.FontConfigManager;
+import sun.font.FcFontConfiguration;
+import sun.font.FontAccess;
+import sun.font.FontUtilities;
+import sun.font.NativeFont;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * The X11 implementation of {@link FontManager}.
+ */
+public class X11FontManager extends SunFontManager {
+
+ // constants identifying XLFD and font ID fields
+ private static final int FOUNDRY_FIELD = 1;
+ private static final int FAMILY_NAME_FIELD = 2;
+ private static final int WEIGHT_NAME_FIELD = 3;
+ private static final int SLANT_FIELD = 4;
+ private static final int SETWIDTH_NAME_FIELD = 5;
+ private static final int ADD_STYLE_NAME_FIELD = 6;
+ private static final int PIXEL_SIZE_FIELD = 7;
+ private static final int POINT_SIZE_FIELD = 8;
+ private static final int RESOLUTION_X_FIELD = 9;
+ private static final int RESOLUTION_Y_FIELD = 10;
+ private static final int SPACING_FIELD = 11;
+ private static final int AVERAGE_WIDTH_FIELD = 12;
+ private static final int CHARSET_REGISTRY_FIELD = 13;
+ private static final int CHARSET_ENCODING_FIELD = 14;
+
+ /*
+ * fontNameMap is a map from a fontID (which is a substring of an XLFD like
+ * "-monotype-arial-bold-r-normal-iso8859-7")
+ * to font file path like
+ * /usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType/ArialBoldItalic.ttf
+ * It's used in a couple of methods like
+ * getFileNameFomPlatformName(..) to help locate the font file.
+ * We use this substring of a full XLFD because the font configuration files
+ * define the XLFDs in a way that's easier to make into a request.
+ * E.g., the -0-0-0-0-p-0- reported by X is -*-%d-*-*-p-*- in the font
+ * configuration files. We need to remove that part for comparisons.
+ */
+ private static Map fontNameMap = new HashMap();
+
+ /*
+ * xlfdMap is a map from a platform path like
+ * /usr/openwin/lib/locale/ja/X11/fonts/TT/HG-GothicB.ttf to an XLFD like
+ * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
+ * Because there may be multiple native names, because the font is used
+ * to support multiple X encodings for example, the value of an entry in
+ * this map is always a vector where we store all the native names.
+ * For fonts which we don't understand the key isn't a pathname, its
+ * the full XLFD string like :-
+ * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
+ */
+ private static Map xlfdMap = new HashMap();
+
+ /* xFontDirsMap is also a map from a font ID to a font filepath.
+ * The difference from fontNameMap is just that it does not have
+ * resolved symbolic links. Normally this is not interesting except
+ * that we need to know the directory in which a font was found to
+ * add it to the X font server path, since although the files may
+ * be linked, the fonts.dir is different and specific to the encoding
+ * handled by that directory. This map is nulled out after use to free
+ * heap space. If the optimal path is taken, such that all fonts in
+ * font configuration files are referenced by filename, then the font
+ * dir can be directly derived as its parent directory.
+ * If a font is used by two XLFDs, each corresponding to a different
+ * X11 font directory, then precautions must be taken to include both
+ * directories.
+ */
+ private static Map xFontDirsMap;
+
+ /*
+ * This is the set of font directories needed to be on the X font path
+ * to enable AWT heavyweights to find all of the font configuration fonts.
+ * It is populated by :
+ * - awtfontpath entries in the fontconfig.properties
+ * - parent directories of "core" fonts used in the fontconfig.properties
+ * - looking up font dirs in the xFontDirsMap where the key is a fontID
+ * (cut down version of the XLFD read from the font configuration file).
+ * This set is nulled out after use to free heap space.
+ */
+ private static HashSet<String> fontConfigDirs = null;
+
+ /* These maps are used on Linux where we reference the Lucida oblique
+ * fonts in fontconfig files even though they aren't in the standard
+ * font directory. This explicitly remaps the XLFDs for these to the
+ * correct base font. This is needed to prevent composite fonts from
+ * defaulting to the Lucida Sans which is a bad substitute for the
+ * monospaced Lucida Sans Typewriter. Also these maps prevent the
+ * JRE from doing wasted work at start up.
+ */
+ HashMap<String, String> oblmap = null;
+
+
+ /*
+ * Used to eliminate redundant work. When a font directory is
+ * registered it added to this list. Subsequent registrations for the
+ * same directory can then be skipped by checking this Map.
+ * Access to this map is not synchronised here since creation
+ * of the singleton GE instance is already synchronised and that is
+ * the only code path that accesses this map.
+ */
+ private static HashMap registeredDirs = new HashMap();
+
+ /* Array of directories to be added to the X11 font path.
+ * Used by static method called from Toolkits which use X11 fonts.
+ * Specifically this means MToolkit
+ */
+ private static String[] fontdirs = null;
+
+ private static String[] defaultPlatformFont = null;
+
+ private FontConfigManager fcManager = null;
+
+ public static X11FontManager getInstance() {
+ return (X11FontManager) SunFontManager.getInstance();
+ }
+
+ /**
+ * Takes family name property in the following format:
+ * "-linotype-helvetica-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1"
+ * and returns the name of the corresponding physical font.
+ * This code is used to resolve font configuration fonts, and expects
+ * only to get called for these fonts.
+ */
+ @Override
+ public String getFileNameFromPlatformName(String platName) {
+
+ /* If the FontConfig file doesn't use xlfds, or its
+ * FcFontConfiguration, this may be already a file name.
+ */
+ if (platName.startsWith("/")) {
+ return platName;
+ }
+
+ String fileName = null;
+ String fontID = specificFontIDForName(platName);
+
+ /* If the font filename has been explicitly assigned in the
+ * font configuration file, use it. This avoids accessing
+ * the wrong fonts on Linux, where different fonts (some
+ * of which may not be usable by 2D) may share the same
+ * specific font ID. It may also speed up the lookup.
+ */
+ fileName = super.getFileNameFromPlatformName(platName);
+ if (fileName != null) {
+ if (isHeadless() && fileName.startsWith("-")) {
+ /* if it's headless, no xlfd should be used */
+ return null;
+ }
+ if (fileName.startsWith("/")) {
+ /* If a path is assigned in the font configuration file,
+ * it is required that the config file also specify using the
+ * new awtfontpath key the X11 font directories
+ * which must be added to the X11 font path to support
+ * AWT access to that font. For that reason we no longer
+ * have code here to add the parent directory to the list
+ * of font config dirs, since the parent directory may not
+ * be sufficient if fonts are symbolically linked to a
+ * different directory.
+ *
+ * Add this XLFD (platform name) to the list of known
+ * ones for this file.
+ */
+ Vector xVal = (Vector) xlfdMap.get(fileName);
+ if (xVal == null) {
+ /* Try to be robust on Linux distros which move fonts
+ * around by verifying that the fileName represents a
+ * file that exists. If it doesn't, set it to null
+ * to trigger a search.
+ */
+ if (getFontConfiguration().needToSearchForFile(fileName)) {
+ fileName = null;
+ }
+ if (fileName != null) {
+ xVal = new Vector();
+ xVal.add(platName);
+ xlfdMap.put(fileName, xVal);
+ }
+ } else {
+ if (!xVal.contains(platName)) {
+ xVal.add(platName);
+ }
+ }
+ }
+ if (fileName != null) {
+ fontNameMap.put(fontID, fileName);
+ return fileName;
+ }
+ }
+
+ if (fontID != null) {
+ fileName = (String)fontNameMap.get(fontID);
+ /* On Linux check for the Lucida Oblique fonts */
+ if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) {
+ if (oblmap == null) {
+ initObliqueLucidaFontMap();
+ }
+ String oblkey = getObliqueLucidaFontID(fontID);
+ if (oblkey != null) {
+ fileName = oblmap.get(oblkey);
+ }
+ }
+ if (fontPath == null &&
+ (fileName == null || !fileName.startsWith("/"))) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .warning("** Registering all font paths because " +
+ "can't find file for " + platName);
+ }
+ fontPath = getPlatformFontPath(noType1Font);
+ registerFontDirs(fontPath);
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .warning("** Finished registering all font paths");
+ }
+ fileName = (String)fontNameMap.get(fontID);
+ }
+ if (fileName == null && !isHeadless()) {
+ /* Query X11 directly to see if this font is available
+ * as a native font.
+ */
+ fileName = getX11FontName(platName);
+ }
+ if (fileName == null) {
+ fontID = switchFontIDForName(platName);
+ fileName = (String)fontNameMap.get(fontID);
+ }
+ if (fileName != null) {
+ fontNameMap.put(fontID, fileName);
+ }
+ }
+ return fileName;
+ }
+
+ @Override
+ protected String[] getNativeNames(String fontFileName,
+ String platformName) {
+ Vector nativeNames;
+ if ((nativeNames=(Vector)xlfdMap.get(fontFileName))==null) {
+ if (platformName == null) {
+ return null;
+ } else {
+ /* back-stop so that at least the name used in the
+ * font configuration file is known as a native name
+ */
+ String []natNames = new String[1];
+ natNames[0] = platformName;
+ return natNames;
+ }
+ } else {
+ int len = nativeNames.size();
+ return (String[])nativeNames.toArray(new String[len]);
+ }
+ }
+
+ /* NOTE: this method needs to be executed in a privileged context.
+ * The superclass constructor which is the primary caller of
+ * this method executes entirely in such a context. Additionally
+ * the loadFonts() method does too. So all should be well.
+
+ */
+ @Override
+ protected void registerFontDir(String path) {
+ /* fonts.dir file format looks like :-
+ * 47
+ * Arial.ttf -monotype-arial-regular-r-normal--0-0-0-0-p-0-iso8859-1
+ * Arial-Bold.ttf -monotype-arial-bold-r-normal--0-0-0-0-p-0-iso8859-1
+ * ...
+ */
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger().info("ParseFontDir " + path);
+ }
+ File fontsDotDir = new File(path + File.separator + "fonts.dir");
+ FileReader fr = null;
+ try {
+ if (fontsDotDir.canRead()) {
+ fr = new FileReader(fontsDotDir);
+ BufferedReader br = new BufferedReader(fr, 8192);
+ StreamTokenizer st = new StreamTokenizer(br);
+ st.eolIsSignificant(true);
+ int ttype = st.nextToken();
+ if (ttype == StreamTokenizer.TT_NUMBER) {
+ int numEntries = (int)st.nval;
+ ttype = st.nextToken();
+ if (ttype == StreamTokenizer.TT_EOL) {
+ st.resetSyntax();
+ st.wordChars(32, 127);
+ st.wordChars(128 + 32, 255);
+ st.whitespaceChars(0, 31);
+
+ for (int i=0; i < numEntries; i++) {
+ ttype = st.nextToken();
+ if (ttype == StreamTokenizer.TT_EOF) {
+ break;
+ }
+ if (ttype != StreamTokenizer.TT_WORD) {
+ break;
+ }
+ int breakPos = st.sval.indexOf(' ');
+ if (breakPos <= 0) {
+ /* On TurboLinux 8.0 a fonts.dir file had
+ * a line with integer value "24" which
+ * appeared to be the number of remaining
+ * entries in the file. This didn't add to
+ * the value on the first line of the file.
+ * Seemed like XFree86 didn't like this line
+ * much either. It failed to parse the file.
+ * Ignore lines like this completely, and
+ * don't let them count as an entry.
+ */
+ numEntries++;
+ ttype = st.nextToken();
+ if (ttype != StreamTokenizer.TT_EOL) {
+ break;
+ }
+
+ continue;
+ }
+ if (st.sval.charAt(0) == '!') {
+ /* TurboLinux 8.0 comment line: ignore.
+ * can't use st.commentChar('!') to just
+ * skip because this line mustn't count
+ * against numEntries.
+ */
+ numEntries++;
+ ttype = st.nextToken();
+ if (ttype != StreamTokenizer.TT_EOL) {
+ break;
+ }
+ continue;
+ }
+ String fileName = st.sval.substring(0, breakPos);
+ /* TurboLinux 8.0 uses some additional syntax to
+ * indicate algorithmic styling values.
+ * Ignore ':' separated files at the beginning
+ * of the fileName
+ */
+ int lastColon = fileName.lastIndexOf(':');
+ if (lastColon > 0) {
+ if (lastColon+1 >= fileName.length()) {
+ continue;
+ }
+ fileName = fileName.substring(lastColon+1);
+ }
+ String fontPart = st.sval.substring(breakPos+1);
+ String fontID = specificFontIDForName(fontPart);
+ String sVal = (String) fontNameMap.get(fontID);
+
+ if (FontUtilities.debugFonts()) {
+ PlatformLogger logger = FontUtilities.getLogger();
+ logger.info("file=" + fileName +
+ " xlfd=" + fontPart);
+ logger.info("fontID=" + fontID +
+ " sVal=" + sVal);
+ }
+ String fullPath = null;
+ try {
+ File file = new File(path,fileName);
+ /* we may have a resolved symbolic link
+ * this becomes important for an xlfd we
+ * still need to know the location it was
+ * found to update the X server font path
+ * for use by AWT heavyweights - and when 2D
+ * wants to use the native rasteriser.
+ */
+ if (xFontDirsMap == null) {
+ xFontDirsMap = new HashMap();
+ }
+ xFontDirsMap.put(fontID, path);
+ fullPath = file.getCanonicalPath();
+ } catch (IOException e) {
+ fullPath = path + File.separator + fileName;
+ }
+ Vector xVal = (Vector) xlfdMap.get(fullPath);
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .info("fullPath=" + fullPath +
+ " xVal=" + xVal);
+ }
+ if ((xVal == null || !xVal.contains(fontPart)) &&
+ (sVal == null) || !sVal.startsWith("/")) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .info("Map fontID:"+fontID +
+ "to file:" + fullPath);
+ }
+ fontNameMap.put(fontID, fullPath);
+ if (xVal == null) {
+ xVal = new Vector();
+ xlfdMap.put (fullPath, xVal);
+ }
+ xVal.add(fontPart);
+ }
+
+ ttype = st.nextToken();
+ if (ttype != StreamTokenizer.TT_EOL) {
+ break;
+ }
+ }
+ }
+ }
+ fr.close();
+ }
+ } catch (IOException ioe1) {
+ } finally {
+ if (fr != null) {
+ try {
+ fr.close();
+ } catch (IOException ioe2) {
+ }
+ }
+ }
+ }
+
+ @Override
+ public void loadFonts() {
+ super.loadFonts();
+ /* These maps are greatly expanded during a loadFonts but
+ * can be reset to their initial state afterwards.
+ * Since preferLocaleFonts() and preferProportionalFonts() will
+ * trigger a partial repopulating from the FontConfiguration
+ * it has to be the inital (empty) state for the latter two, not
+ * simply nulling out.
+ * xFontDirsMap is a special case in that the implementation
+ * will typically not ever need to initialise it so it can be null.
+ */
+ xFontDirsMap = null;
+ xlfdMap = new HashMap(1);
+ fontNameMap = new HashMap(1);
+ }
+
+ private String getObliqueLucidaFontID(String fontID) {
+ if (fontID.startsWith("-lucidasans-medium-i-normal") ||
+ fontID.startsWith("-lucidasans-bold-i-normal") ||
+ fontID.startsWith("-lucidatypewriter-medium-i-normal") ||
+ fontID.startsWith("-lucidatypewriter-bold-i-normal")) {
+ return fontID.substring(0, fontID.indexOf("-i-"));
+ } else {
+ return null;
+ }
+ }
+
+ private static String getX11FontName(String platName) {
+ String xlfd = platName.replaceAll("%d", "*");
+ if (NativeFont.fontExists(xlfd)) {
+ return xlfd;
+ } else {
+ return null;
+ }
+ }
+
+ private void initObliqueLucidaFontMap() {
+ oblmap = new HashMap<String, String>();
+ oblmap.put("-lucidasans-medium",
+ jreLibDirName+"/fonts/LucidaSansRegular.ttf");
+ oblmap.put("-lucidasans-bold",
+ jreLibDirName+"/fonts/LucidaSansDemiBold.ttf");
+ oblmap.put("-lucidatypewriter-medium",
+ jreLibDirName+"/fonts/LucidaTypewriterRegular.ttf");
+ oblmap.put("-lucidatypewriter-bold",
+ jreLibDirName+"/fonts/LucidaTypewriterBold.ttf");
+ }
+
+ private boolean isHeadless() {
+ GraphicsEnvironment ge =
+ GraphicsEnvironment.getLocalGraphicsEnvironment();
+ return GraphicsEnvironment.isHeadless();
+ }
+
+ private String specificFontIDForName(String name) {
+
+ int[] hPos = new int[14];
+ int hyphenCnt = 1;
+ int pos = 1;
+
+ while (pos != -1 && hyphenCnt < 14) {
+ pos = name.indexOf('-', pos);
+ if (pos != -1) {
+ hPos[hyphenCnt++] = pos;
+ pos++;
+ }
+ }
+
+ if (hyphenCnt != 14) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .severe("Font Configuration Font ID is malformed:" + name);
+ }
+ return name; // what else can we do?
+ }
+
+ StringBuffer sb =
+ new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
+ hPos[SETWIDTH_NAME_FIELD]));
+ sb.append(name.substring(hPos[CHARSET_REGISTRY_FIELD-1]));
+ String retval = sb.toString().toLowerCase (Locale.ENGLISH);
+ return retval;
+ }
+
+ private String switchFontIDForName(String name) {
+
+ int[] hPos = new int[14];
+ int hyphenCnt = 1;
+ int pos = 1;
+
+ while (pos != -1 && hyphenCnt < 14) {
+ pos = name.indexOf('-', pos);
+ if (pos != -1) {
+ hPos[hyphenCnt++] = pos;
+ pos++;
+ }
+ }
+
+ if (hyphenCnt != 14) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger()
+ .severe("Font Configuration Font ID is malformed:" + name);
+ }
+ return name; // what else can we do?
+ }
+
+ String slant = name.substring(hPos[SLANT_FIELD-1]+1,
+ hPos[SLANT_FIELD]);
+ String family = name.substring(hPos[FAMILY_NAME_FIELD-1]+1,
+ hPos[FAMILY_NAME_FIELD]);
+ String registry = name.substring(hPos[CHARSET_REGISTRY_FIELD-1]+1,
+ hPos[CHARSET_REGISTRY_FIELD]);
+ String encoding = name.substring(hPos[CHARSET_ENCODING_FIELD-1]+1);
+
+ if (slant.equals("i")) {
+ slant = "o";
+ } else if (slant.equals("o")) {
+ slant = "i";
+ }
+ // workaround for #4471000
+ if (family.equals("itc zapfdingbats")
+ && registry.equals("sun")
+ && encoding.equals("fontspecific")){
+ registry = "adobe";
+ }
+ StringBuffer sb =
+ new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
+ hPos[SLANT_FIELD-1]+1));
+ sb.append(slant);
+ sb.append(name.substring(hPos[SLANT_FIELD],
+ hPos[SETWIDTH_NAME_FIELD]+1));
+ sb.append(registry);
+ sb.append(name.substring(hPos[CHARSET_ENCODING_FIELD-1]));
+ String retval = sb.toString().toLowerCase (Locale.ENGLISH);
+ return retval;
+ }
+
+ /**
+ * Returns the face name for the given XLFD.
+ */
+ public String getFileNameFromXLFD(String name) {
+ String fileName = null;
+ String fontID = specificFontIDForName(name);
+ if (fontID != null) {
+ fileName = (String)fontNameMap.get(fontID);
+ if (fileName == null) {
+ fontID = switchFontIDForName(name);
+ fileName = (String)fontNameMap.get(fontID);
+ }
+ if (fileName == null) {
+ fileName = getDefaultFontFile();
+ }
+ }
+ return fileName;
+ }
+
+ /* Register just the paths, (it doesn't register the fonts).
+ * If a font configuration file has specified a baseFontPath
+ * fontPath is just those directories, unless on usage we
+ * find it doesn't contain what we need for the logical fonts.
+ * Otherwise, we register all the paths on Solaris, because
+ * the fontPath we have here is the complete one from
+ * parsing /var/sadm/install/contents, not just
+ * what's on the X font path (may be this should be
+ * changed).
+ * But for now what it means is that if we didn't do
+ * this then if the font weren't listed anywhere on the
+ * less complete font path we'd trigger loadFonts which
+ * actually registers the fonts. This may actually be
+ * the right thing tho' since that would also set up
+ * the X font path without which we wouldn't be able to
+ * display some "native" fonts.
+ * So something to revisit is that probably fontPath
+ * here ought to be only the X font path + jre font dir.
+ * loadFonts should have a separate native call to
+ * get the rest of the platform font path.
+ *
+ * Registering the directories can now be avoided in the
+ * font configuration initialisation when filename entries
+ * exist in the font configuration file for all fonts.
+ * (Perhaps a little confusingly a filename entry is
+ * actually keyed using the XLFD used in the font entries,
+ * and it maps *to* a real filename).
+ * In the event any are missing, registration of all
+ * directories will be invoked to find the real files.
+ *
+ * But registering the directory performed other
+ * functions such as filling in the map of all native names
+ * for the font. So when this method isn't invoked, they still
+ * must be found. This is mitigated by getNativeNames now
+ * being able to return at least the platform name, but mostly
+ * by ensuring that when a filename key is found, that
+ * xlfd key is stored as one of the set of platform names
+ * for the font. Its a set because typical font configuration
+ * files reference the same CJK font files using multiple
+ * X11 encodings. For the code that adds this to the map
+ * see X11GE.getFileNameFromPlatformName(..)
+ * If you don't get all of these then some code points may
+ * not use the Xserver, and will not get the PCF bitmaps
+ * that are available for some point sizes.
+ * So, in the event that there is such a problem,
+ * unconditionally making this call may be necessary, at
+ * some cost to JRE start-up
+ */
+ @Override
+ protected void registerFontDirs(String pathName) {
+
+ StringTokenizer parser = new StringTokenizer(pathName,
+ File.pathSeparator);
+ try {
+ while (parser.hasMoreTokens()) {
+ String dirPath = parser.nextToken();
+ if (dirPath != null && !registeredDirs.containsKey(dirPath)) {
+ registeredDirs.put(dirPath, null);
+ registerFontDir(dirPath);
+ }
+ }
+ } catch (NoSuchElementException e) {
+ }
+ }
+
+ // An X font spec (xlfd) includes an encoding. The same TrueType font file
+ // may be referenced from different X font directories in font.dir files
+ // to support use in multiple encodings by X apps.
+ // So for the purposes of font configuration logical fonts where AWT
+ // heavyweights need to access the font via X APIs we need to ensure that
+ // the directory for precisely the encodings needed by this are added to
+ // the x font path. This requires that we note the platform names
+ // specified in font configuration files and use that to identify the
+ // X font directory that contains a font.dir file for that platform name
+ // and add it to the X font path (if display is local)
+ // Here we make use of an already built map of xlfds to font locations
+ // to add the font location to the set of those required to build the
+ // x font path needed by AWT.
+ // These are added to the x font path later.
+ // All this is necessary because on Solaris the font.dir directories
+ // may contain not real font files, but symbolic links to the actual
+ // location but that location is not suitable for the x font path, since
+ // it probably doesn't have a font.dir at all and certainly not one
+ // with the required encodings
+ // If the fontconfiguration file is properly set up so that all fonts
+ // are mapped to files then we will never trigger initialising
+ // xFontDirsMap (it will be null). In this case the awtfontpath entries
+ // must specify all the X11 directories needed by AWT.
+ @Override
+ protected void addFontToPlatformFontPath(String platformName) {
+ // Lazily initialize fontConfigDirs.
+ getPlatformFontPathFromFontConfig();
+ if (xFontDirsMap != null) {
+ String fontID = specificFontIDForName(platformName);
+ String dirName = (String)xFontDirsMap.get(fontID);
+ if (dirName != null) {
+ fontConfigDirs.add(dirName);
+ }
+ }
+ return;
+ }
+
+ private void getPlatformFontPathFromFontConfig() {
+ if (fontConfigDirs == null) {
+ fontConfigDirs = getFontConfiguration().getAWTFontPathSet();
+ if (FontUtilities.debugFonts() && fontConfigDirs != null) {
+ String[] names = fontConfigDirs.toArray(new String[0]);
+ for (int i=0;i<names.length;i++) {
+ FontUtilities.getLogger().info("awtfontpath : " + names[i]);
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void registerPlatformFontsUsedByFontConfiguration() {
+ // Lazily initialize fontConfigDirs.
+ getPlatformFontPathFromFontConfig();
+ if (fontConfigDirs == null) {
+ return;
+ }
+ if (FontUtilities.isLinux) {
+ fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
+ }
+ fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
+ }
+
+ /* Called by MToolkit to set the X11 font path */
+ public static void setNativeFontPath() {
+ if (fontdirs == null) {
+ return;
+ }
+
+ // need to register these individually rather than by one call
+ // to ensure that one bad directory doesn't cause all to be rejected
+ for (int i=0; i<fontdirs.length; i++) {
+ if (FontUtilities.debugFonts()) {
+ FontUtilities.getLogger().info("Add " + fontdirs[i] + " to X11 fontpath");
+ }
+ setNativeFontPath(fontdirs[i]);
+ }
+ }
+
+ private synchronized static native void setNativeFontPath(String fontPath);
+
+
+ // Implements SunGraphicsEnvironment.createFontConfiguration.
+ protected FontConfiguration createFontConfiguration() {
+ /* The logic here decides whether to use a preconfigured
+ * fontconfig.properties file, or synthesise one using platform APIs.
+ * On Solaris (as opposed to OpenSolaris) we try to use the
+ * pre-configured ones, but if the files it specifies are missing
+ * we fail-safe to synthesising one. This might happen if Solaris
+ * changes its fonts.
+ * For OpenSolaris I don't expect us to ever create fontconfig files,
+ * so it will always synthesise. Note that if we misidentify
+ * OpenSolaris as Solaris, then the test for the presence of
+ * Solaris-only font files will correct this.
+ * For Linux we require an exact match of distro and version to
+ * use the preconfigured file, and also that it points to
+ * existent fonts.
+ * If synthesising fails, we fall back to any preconfigured file
+ * and do the best we can. For the commercial JDK this will be
+ * fine as it includes the Lucida fonts. OpenJDK should not hit
+ * this as the synthesis should always work on its platforms.
+ */
+ FontConfiguration mFontConfig = new MFontConfiguration(this);
+ if (FontUtilities.isOpenSolaris ||
+ (FontUtilities.isLinux &&
+ (!mFontConfig.foundOsSpecificFile() ||
+ !mFontConfig.fontFilesArePresent()) ||
+ (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
+ FcFontConfiguration fcFontConfig =
+ new FcFontConfiguration(this);
+ if (fcFontConfig.init()) {
+ return fcFontConfig;
+ }
+ }
+ mFontConfig.init();
+ return mFontConfig;
+ }
+ public FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+ boolean preferPropFonts) {
+
+ return new MFontConfiguration(this,
+ preferLocaleFonts, preferPropFonts);
+ }
+
+ public synchronized native String getFontPath(boolean noType1Fonts);
+
+ public String[] getDefaultPlatformFont() {
+ if (defaultPlatformFont != null) {
+ return defaultPlatformFont;
+ }
+ String[] info = new String[2];
+ getFontConfigManager().initFontConfigFonts(false);
+ FontConfigManager.FcCompFont[] fontConfigFonts =
+ getFontConfigManager().getFontConfigFonts();
+ for (int i=0; i<fontConfigFonts.length; i++) {
+ if ("sans".equals(fontConfigFonts[i].fcFamily) &&
+ 0 == fontConfigFonts[i].style) {
+ info[0] = fontConfigFonts[i].firstFont.familyName;
+ info[1] = fontConfigFonts[i].firstFont.fontFile;
+ break;
+ }
+ }
+ /* Absolute last ditch attempt in the face of fontconfig problems.
+ * If we didn't match, pick the first, or just make something
+ * up so we don't NPE.
+ */
+ if (info[0] == null) {
+ if (fontConfigFonts.length > 0 &&
+ fontConfigFonts[0].firstFont.fontFile != null) {
+ info[0] = fontConfigFonts[0].firstFont.familyName;
+ info[1] = fontConfigFonts[0].firstFont.fontFile;
+ } else {
+ info[0] = "Dialog";
+ info[1] = "/dialog.ttf";
+ }
+ }
+ defaultPlatformFont = info;
+ return defaultPlatformFont;
+ }
+
+ public synchronized FontConfigManager getFontConfigManager() {
+
+ if (fcManager == null) {
+ fcManager = new FontConfigManager();
+ }
+
+ return fcManager;
+ }
+
+ @Override
+ protected FontUIResource getFontConfigFUIR(String family, int style, int size) {
+
+ CompositeFont font2D = getFontConfigManager().getFontConfigFont(family, style);
+
+ if (font2D == null) { // Not expected, just a precaution.
+ return new FontUIResource(family, style, size);
+ }
+
+ /* The name of the font will be that of the physical font in slot,
+ * but by setting the handle to that of the CompositeFont it
+ * renders as that CompositeFont.
+ * It also needs to be marked as a created font which is the
+ * current mechanism to signal that deriveFont etc must copy
+ * the handle from the original font.
+ */
+ FontUIResource fuir =
+ new FontUIResource(font2D.getFamilyName(null), style, size);
+ FontAccess.getFontAccess().setFont2D(fuir, font2D.handle);
+ FontAccess.getFontAccess().setCreatedFont(fuir);
+ return fuir;
+ }
+}
diff --git a/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java b/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
index 47ca64f..6ea0756 100644
--- a/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+++ b/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
@@ -41,7 +41,6 @@
import java.net.UnknownHostException;
import java.util.*;
-import java.util.logging.*;
import sun.awt.motif.MFontConfiguration;
import sun.font.FcFontConfiguration;
@@ -51,6 +50,7 @@
import sun.java2d.SunGraphicsEnvironment;
import sun.java2d.SurfaceManagerFactory;
import sun.java2d.UnixSurfaceManagerFactory;
+import sun.util.logging.PlatformLogger;
/**
* This is an implementation of a GraphicsEnvironment object for the
@@ -63,82 +63,11 @@
public class X11GraphicsEnvironment
extends SunGraphicsEnvironment
{
- private static final Logger log = Logger.getLogger("sun.awt.X11GraphicsEnvironment");
- private static final Logger screenLog = Logger.getLogger("sun.awt.screen.X11GraphicsEnvironment");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11GraphicsEnvironment");
+ private static final PlatformLogger screenLog = PlatformLogger.getLogger("sun.awt.screen.X11GraphicsEnvironment");
private static Boolean xinerState;
- /*
- * This is the set of font directories needed to be on the X font path
- * to enable AWT heavyweights to find all of the font configuration fonts.
- * It is populated by :
- * - awtfontpath entries in the fontconfig.properties
- * - parent directories of "core" fonts used in the fontconfig.properties
- * - looking up font dirs in the xFontDirsMap where the key is a fontID
- * (cut down version of the XLFD read from the font configuration file).
- * This set is nulled out after use to free heap space.
- */
- private static HashSet<String> fontConfigDirs = null;
-
- /*
- * fontNameMap is a map from a fontID (which is a substring of an XLFD like
- * "-monotype-arial-bold-r-normal-iso8859-7")
- * to font file path like
- * /usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType/ArialBoldItalic.ttf
- * It's used in a couple of methods like
- * getFileNameFomPlatformName(..) to help locate the font file.
- * We use this substring of a full XLFD because the font configuration files
- * define the XLFDs in a way that's easier to make into a request.
- * E.g., the -0-0-0-0-p-0- reported by X is -*-%d-*-*-p-*- in the font
- * configuration files. We need to remove that part for comparisons.
- */
- private static Map fontNameMap = new HashMap();
-
- /* xFontDirsMap is also a map from a font ID to a font filepath.
- * The difference from fontNameMap is just that it does not have
- * resolved symbolic links. Normally this is not interesting except
- * that we need to know the directory in which a font was found to
- * add it to the X font server path, since although the files may
- * be linked, the fonts.dir is different and specific to the encoding
- * handled by that directory. This map is nulled out after use to free
- * heap space. If the optimal path is taken, such that all fonts in
- * font configuration files are referenced by filename, then the font
- * dir can be directly derived as its parent directory.
- * If a font is used by two XLFDs, each corresponding to a different
- * X11 font directory, then precautions must be taken to include both
- * directories.
- */
- private static Map xFontDirsMap;
-
- /*
- * xlfdMap is a map from a platform path like
- * /usr/openwin/lib/locale/ja/X11/fonts/TT/HG-GothicB.ttf to an XLFD like
- * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
- * Because there may be multiple native names, because the font is used
- * to support multiple X encodings for example, the value of an entry in
- * this map is always a vector where we store all the native names.
- * For fonts which we don't understand the key isn't a pathname, its
- * the full XLFD string like :-
- * "-ricoh-hg gothic b-medium-r-normal--0-0-0-0-m-0-jisx0201.1976-0"
- */
- private static Map xlfdMap = new HashMap();
-
- /*
- * Used to eliminate redundant work. When a font directory is
- * registered it added to this list. Subsequent registrations for the
- * same directory can then be skipped by checking this Map.
- * Access to this map is not synchronised here since creation
- * of the singleton GE instance is already synchronised and that is
- * the only code path that accesses this map.
- */
- private static HashMap registeredDirs = new HashMap();
-
- /* Array of directories to be added to the X11 font path.
- * Used by static method called from Toolkits which use X11 fonts.
- * Specifically this means MToolkit
- */
- private static String[] fontdirs = null;
-
static {
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction() {
@@ -234,7 +163,6 @@
return getScreenDevices()[getDefaultScreenNum()];
}
- @Override
public boolean isDisplayLocal() {
if (isDisplayLocal == null) {
SunToolkit.awtLock();
@@ -311,657 +239,7 @@
return result.booleanValue();
}
- /* These maps are used on Linux where we reference the Lucida oblique
- * fonts in fontconfig files even though they aren't in the standard
- * font directory. This explicitly remaps the XLFDs for these to the
- * correct base font. This is needed to prevent composite fonts from
- * defaulting to the Lucida Sans which is a bad substitute for the
- * monospaced Lucida Sans Typewriter. Also these maps prevent the
- * JRE from doing wasted work at start up.
- */
- HashMap<String, String> oblmap = null;
- private String getObliqueLucidaFontID(String fontID) {
- if (fontID.startsWith("-lucidasans-medium-i-normal") ||
- fontID.startsWith("-lucidasans-bold-i-normal") ||
- fontID.startsWith("-lucidatypewriter-medium-i-normal") ||
- fontID.startsWith("-lucidatypewriter-bold-i-normal")) {
- return fontID.substring(0, fontID.indexOf("-i-"));
- } else {
- return null;
- }
- }
-
- private void initObliqueLucidaFontMap() {
- oblmap = new HashMap<String, String>();
- oblmap.put("-lucidasans-medium",
- jreLibDirName+"/fonts/LucidaSansRegular.ttf");
- oblmap.put("-lucidasans-bold",
- jreLibDirName+"/fonts/LucidaSansDemiBold.ttf");
- oblmap.put("-lucidatypewriter-medium",
- jreLibDirName+"/fonts/LucidaTypewriterRegular.ttf");
- oblmap.put("-lucidatypewriter-bold",
- jreLibDirName+"/fonts/LucidaTypewriterBold.ttf");
- }
-
- /**
- * Takes family name property in the following format:
- * "-linotype-helvetica-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1"
- * and returns the name of the corresponding physical font.
- * This code is used to resolve font configuration fonts, and expects
- * only to get called for these fonts.
- */
- public String getFileNameFromPlatformName(String platName) {
-
- /* If the FontConfig file doesn't use xlfds, or its
- * FcFontConfiguration, this may be already a file name.
- */
- if (platName.startsWith("/")) {
- return platName;
- }
-
- String fileName = null;
- String fontID = specificFontIDForName(platName);
-
- /* If the font filename has been explicitly assigned in the
- * font configuration file, use it. This avoids accessing
- * the wrong fonts on Linux, where different fonts (some
- * of which may not be usable by 2D) may share the same
- * specific font ID. It may also speed up the lookup.
- */
- fileName = super.getFileNameFromPlatformName(platName);
- if (fileName != null) {
- if (isHeadless() && fileName.startsWith("-")) {
- /* if it's headless, no xlfd should be used */
- return null;
- }
- if (fileName.startsWith("/")) {
- /* If a path is assigned in the font configuration file,
- * it is required that the config file also specify using the
- * new awtfontpath key the X11 font directories
- * which must be added to the X11 font path to support
- * AWT access to that font. For that reason we no longer
- * have code here to add the parent directory to the list
- * of font config dirs, since the parent directory may not
- * be sufficient if fonts are symbolically linked to a
- * different directory.
- *
- * Add this XLFD (platform name) to the list of known
- * ones for this file.
- */
- Vector xVal = (Vector) xlfdMap.get(fileName);
- if (xVal == null) {
- /* Try to be robust on Linux distros which move fonts
- * around by verifying that the fileName represents a
- * file that exists. If it doesn't, set it to null
- * to trigger a search.
- */
- if (getFontConfiguration().needToSearchForFile(fileName)) {
- fileName = null;
- }
- if (fileName != null) {
- xVal = new Vector();
- xVal.add(platName);
- xlfdMap.put(fileName, xVal);
- }
- } else {
- if (!xVal.contains(platName)) {
- xVal.add(platName);
- }
- }
- }
- if (fileName != null) {
- fontNameMap.put(fontID, fileName);
- return fileName;
- }
- }
-
- if (fontID != null) {
- fileName = (String)fontNameMap.get(fontID);
- /* On Linux check for the Lucida Oblique fonts */
- if (fileName == null && isLinux && !isOpenJDK()) {
- if (oblmap == null) {
- initObliqueLucidaFontMap();
- }
- String oblkey = getObliqueLucidaFontID(fontID);
- if (oblkey != null) {
- fileName = oblmap.get(oblkey);
- }
- }
- if (fontPath == null &&
- (fileName == null || !fileName.startsWith("/"))) {
- if (debugFonts) {
- logger.warning("** Registering all font paths because " +
- "can't find file for " + platName);
- }
- fontPath = getPlatformFontPath(noType1Font);
- registerFontDirs(fontPath);
- if (debugFonts) {
- logger.warning("** Finished registering all font paths");
- }
- fileName = (String)fontNameMap.get(fontID);
- }
- if (fileName == null && !isHeadless()) {
- /* Query X11 directly to see if this font is available
- * as a native font.
- */
- fileName = getX11FontName(platName);
- }
- if (fileName == null) {
- fontID = switchFontIDForName(platName);
- fileName = (String)fontNameMap.get(fontID);
- }
- if (fileName != null) {
- fontNameMap.put(fontID, fileName);
- }
- }
- return fileName;
- }
-
- private static String getX11FontName(String platName) {
- String xlfd = platName.replaceAll("%d", "*");
- if (NativeFont.fontExists(xlfd)) {
- return xlfd;
- } else {
- return null;
- }
- }
-
- /**
- * Returns the face name for the given XLFD.
- */
- public String getFileNameFromXLFD(String name) {
- String fileName = null;
- String fontID = specificFontIDForName(name);
- if (fontID != null) {
- fileName = (String)fontNameMap.get(fontID);
- if (fileName == null) {
- fontID = switchFontIDForName(name);
- fileName = (String)fontNameMap.get(fontID);
- }
- if (fileName == null) {
- fileName = getDefaultFontFile();
- }
- }
- return fileName;
- }
-
- // constants identifying XLFD and font ID fields
- private static final int FOUNDRY_FIELD = 1;
- private static final int FAMILY_NAME_FIELD = 2;
- private static final int WEIGHT_NAME_FIELD = 3;
- private static final int SLANT_FIELD = 4;
- private static final int SETWIDTH_NAME_FIELD = 5;
- private static final int ADD_STYLE_NAME_FIELD = 6;
- private static final int PIXEL_SIZE_FIELD = 7;
- private static final int POINT_SIZE_FIELD = 8;
- private static final int RESOLUTION_X_FIELD = 9;
- private static final int RESOLUTION_Y_FIELD = 10;
- private static final int SPACING_FIELD = 11;
- private static final int AVERAGE_WIDTH_FIELD = 12;
- private static final int CHARSET_REGISTRY_FIELD = 13;
- private static final int CHARSET_ENCODING_FIELD = 14;
-
- private String switchFontIDForName(String name) {
-
- int[] hPos = new int[14];
- int hyphenCnt = 1;
- int pos = 1;
-
- while (pos != -1 && hyphenCnt < 14) {
- pos = name.indexOf('-', pos);
- if (pos != -1) {
- hPos[hyphenCnt++] = pos;
- pos++;
- }
- }
-
- if (hyphenCnt != 14) {
- if (debugFonts) {
- logger.severe("Font Configuration Font ID is malformed:" + name);
- }
- return name; // what else can we do?
- }
-
- String slant = name.substring(hPos[SLANT_FIELD-1]+1,
- hPos[SLANT_FIELD]);
- String family = name.substring(hPos[FAMILY_NAME_FIELD-1]+1,
- hPos[FAMILY_NAME_FIELD]);
- String registry = name.substring(hPos[CHARSET_REGISTRY_FIELD-1]+1,
- hPos[CHARSET_REGISTRY_FIELD]);
- String encoding = name.substring(hPos[CHARSET_ENCODING_FIELD-1]+1);
-
- if (slant.equals("i")) {
- slant = "o";
- } else if (slant.equals("o")) {
- slant = "i";
- }
- // workaround for #4471000
- if (family.equals("itc zapfdingbats")
- && registry.equals("sun")
- && encoding.equals("fontspecific")){
- registry = "adobe";
- }
- StringBuffer sb =
- new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
- hPos[SLANT_FIELD-1]+1));
- sb.append(slant);
- sb.append(name.substring(hPos[SLANT_FIELD],
- hPos[SETWIDTH_NAME_FIELD]+1));
- sb.append(registry);
- sb.append(name.substring(hPos[CHARSET_ENCODING_FIELD-1]));
- String retval = sb.toString().toLowerCase (Locale.ENGLISH);
- return retval;
- }
-
-
- private String specificFontIDForName(String name) {
-
- int[] hPos = new int[14];
- int hyphenCnt = 1;
- int pos = 1;
-
- while (pos != -1 && hyphenCnt < 14) {
- pos = name.indexOf('-', pos);
- if (pos != -1) {
- hPos[hyphenCnt++] = pos;
- pos++;
- }
- }
-
- if (hyphenCnt != 14) {
- if (debugFonts) {
- logger.severe("Font Configuration Font ID is malformed:" + name);
- }
- return name; // what else can we do?
- }
-
- StringBuffer sb =
- new StringBuffer(name.substring(hPos[FAMILY_NAME_FIELD-1],
- hPos[SETWIDTH_NAME_FIELD]));
- sb.append(name.substring(hPos[CHARSET_REGISTRY_FIELD-1]));
- String retval = sb.toString().toLowerCase (Locale.ENGLISH);
- return retval;
- }
-
- protected String[] getNativeNames(String fontFileName,
- String platformName) {
- Vector nativeNames;
- if ((nativeNames=(Vector)xlfdMap.get(fontFileName))==null) {
- if (platformName == null) {
- return null;
- } else {
- /* back-stop so that at least the name used in the
- * font configuration file is known as a native name
- */
- String []natNames = new String[1];
- natNames[0] = platformName;
- return natNames;
- }
- } else {
- int len = nativeNames.size();
- return (String[])nativeNames.toArray(new String[len]);
- }
- }
-
-
- // An X font spec (xlfd) includes an encoding. The same TrueType font file
- // may be referenced from different X font directories in font.dir files
- // to support use in multiple encodings by X apps.
- // So for the purposes of font configuration logical fonts where AWT
- // heavyweights need to access the font via X APIs we need to ensure that
- // the directory for precisely the encodings needed by this are added to
- // the x font path. This requires that we note the platform names
- // specified in font configuration files and use that to identify the
- // X font directory that contains a font.dir file for that platform name
- // and add it to the X font path (if display is local)
- // Here we make use of an already built map of xlfds to font locations
- // to add the font location to the set of those required to build the
- // x font path needed by AWT.
- // These are added to the x font path later.
- // All this is necessary because on Solaris the font.dir directories
- // may contain not real font files, but symbolic links to the actual
- // location but that location is not suitable for the x font path, since
- // it probably doesn't have a font.dir at all and certainly not one
- // with the required encodings
- // If the fontconfiguration file is properly set up so that all fonts
- // are mapped to files then we will never trigger initialising
- // xFontDirsMap (it will be null). In this case the awtfontpath entries
- // must specify all the X11 directories needed by AWT.
- protected void addFontToPlatformFontPath(String platformName) {
- if (xFontDirsMap != null) {
- String fontID = specificFontIDForName(platformName);
- String dirName = (String)xFontDirsMap.get(fontID);
- if (dirName != null) {
- fontConfigDirs.add(dirName);
- }
- }
- return;
- }
-
- protected void getPlatformFontPathFromFontConfig() {
- if (fontConfigDirs == null) {
- fontConfigDirs = getFontConfiguration().getAWTFontPathSet();
- if (debugFonts && fontConfigDirs != null) {
- String[] names = fontConfigDirs.toArray(new String[0]);
- for (int i=0;i<names.length;i++) {
- logger.info("awtfontpath : " + names[i]);
- }
- }
- }
- }
-
- protected void registerPlatformFontsUsedByFontConfiguration() {
- if (fontConfigDirs == null) {
- return;
- }
- if (isLinux) {
- fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
- }
- fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
- }
-
- /* Called by MToolkit to set the X11 font path */
- public static void setNativeFontPath() {
- if (fontdirs == null) {
- return;
- }
-
- // need to register these individually rather than by one call
- // to ensure that one bad directory doesn't cause all to be rejected
- for (int i=0; i<fontdirs.length; i++) {
- if (debugFonts) {
- logger.info("Add " + fontdirs[i] + " to X11 fontpath");
- }
- FontManager.setNativeFontPath(fontdirs[i]);
- }
- }
-
- /* Register just the paths, (it doesn't register the fonts).
- * If a font configuration file has specified a baseFontPath
- * fontPath is just those directories, unless on usage we
- * find it doesn't contain what we need for the logical fonts.
- * Otherwise, we register all the paths on Solaris, because
- * the fontPath we have here is the complete one from
- * parsing /var/sadm/install/contents, not just
- * what's on the X font path (may be this should be
- * changed).
- * But for now what it means is that if we didn't do
- * this then if the font weren't listed anywhere on the
- * less complete font path we'd trigger loadFonts which
- * actually registers the fonts. This may actually be
- * the right thing tho' since that would also set up
- * the X font path without which we wouldn't be able to
- * display some "native" fonts.
- * So something to revisit is that probably fontPath
- * here ought to be only the X font path + jre font dir.
- * loadFonts should have a separate native call to
- * get the rest of the platform font path.
- *
- * Registering the directories can now be avoided in the
- * font configuration initialisation when filename entries
- * exist in the font configuration file for all fonts.
- * (Perhaps a little confusingly a filename entry is
- * actually keyed using the XLFD used in the font entries,
- * and it maps *to* a real filename).
- * In the event any are missing, registration of all
- * directories will be invoked to find the real files.
- *
- * But registering the directory performed other
- * functions such as filling in the map of all native names
- * for the font. So when this method isn't invoked, they still
- * must be found. This is mitigated by getNativeNames now
- * being able to return at least the platform name, but mostly
- * by ensuring that when a filename key is found, that
- * xlfd key is stored as one of the set of platform names
- * for the font. Its a set because typical font configuration
- * files reference the same CJK font files using multiple
- * X11 encodings. For the code that adds this to the map
- * see X11GE.getFileNameFromPlatformName(..)
- * If you don't get all of these then some code points may
- * not use the Xserver, and will not get the PCF bitmaps
- * that are available for some point sizes.
- * So, in the event that there is such a problem,
- * unconditionally making this call may be necessary, at
- * some cost to JRE start-up
- */
- protected void registerFontDirs(String pathName) {
-
- StringTokenizer parser = new StringTokenizer(pathName,
- File.pathSeparator);
- try {
- while (parser.hasMoreTokens()) {
- String dirPath = parser.nextToken();
- if (dirPath != null && !registeredDirs.containsKey(dirPath)) {
- registeredDirs.put(dirPath, null);
- registerFontDir(dirPath);
- }
- }
- } catch (NoSuchElementException e) {
- }
- }
-
- /* NOTE: this method needs to be executed in a privileged context.
- * The superclass constructor which is the primary caller of
- * this method executes entirely in such a context. Additionally
- * the loadFonts() method does too. So all should be well.
-
- */
- protected void registerFontDir(String path) {
- /* fonts.dir file format looks like :-
- * 47
- * Arial.ttf -monotype-arial-regular-r-normal--0-0-0-0-p-0-iso8859-1
- * Arial-Bold.ttf -monotype-arial-bold-r-normal--0-0-0-0-p-0-iso8859-1
- * ...
- */
- if (debugFonts) {
- logger.info("ParseFontDir " + path);
- }
- File fontsDotDir = new File(path + File.separator + "fonts.dir");
- FileReader fr = null;
- try {
- if (fontsDotDir.canRead()) {
- fr = new FileReader(fontsDotDir);
- BufferedReader br = new BufferedReader(fr, 8192);
- StreamTokenizer st = new StreamTokenizer(br);
- st.eolIsSignificant(true);
- int ttype = st.nextToken();
- if (ttype == StreamTokenizer.TT_NUMBER) {
- int numEntries = (int)st.nval;
- ttype = st.nextToken();
- if (ttype == StreamTokenizer.TT_EOL) {
- st.resetSyntax();
- st.wordChars(32, 127);
- st.wordChars(128 + 32, 255);
- st.whitespaceChars(0, 31);
-
- for (int i=0; i < numEntries; i++) {
- ttype = st.nextToken();
- if (ttype == StreamTokenizer.TT_EOF) {
- break;
- }
- if (ttype != StreamTokenizer.TT_WORD) {
- break;
- }
- int breakPos = st.sval.indexOf(' ');
- if (breakPos <= 0) {
- /* On TurboLinux 8.0 a fonts.dir file had
- * a line with integer value "24" which
- * appeared to be the number of remaining
- * entries in the file. This didn't add to
- * the value on the first line of the file.
- * Seemed like XFree86 didn't like this line
- * much either. It failed to parse the file.
- * Ignore lines like this completely, and
- * don't let them count as an entry.
- */
- numEntries++;
- ttype = st.nextToken();
- if (ttype != StreamTokenizer.TT_EOL) {
- break;
- }
-
- continue;
- }
- if (st.sval.charAt(0) == '!') {
- /* TurboLinux 8.0 comment line: ignore.
- * can't use st.commentChar('!') to just
- * skip because this line mustn't count
- * against numEntries.
- */
- numEntries++;
- ttype = st.nextToken();
- if (ttype != StreamTokenizer.TT_EOL) {
- break;
- }
- continue;
- }
- String fileName = st.sval.substring(0, breakPos);
- /* TurboLinux 8.0 uses some additional syntax to
- * indicate algorithmic styling values.
- * Ignore ':' separated files at the beginning
- * of the fileName
- */
- int lastColon = fileName.lastIndexOf(':');
- if (lastColon > 0) {
- if (lastColon+1 >= fileName.length()) {
- continue;
- }
- fileName = fileName.substring(lastColon+1);
- }
- String fontPart = st.sval.substring(breakPos+1);
- String fontID = specificFontIDForName(fontPart);
- String sVal = (String) fontNameMap.get(fontID);
-
- if (debugFonts) {
- logger.info("file=" + fileName +
- " xlfd=" + fontPart);
- logger.info("fontID=" + fontID +
- " sVal=" + sVal);
- }
- String fullPath = null;
- try {
- File file = new File(path,fileName);
- /* we may have a resolved symbolic link
- * this becomes important for an xlfd we
- * still need to know the location it was
- * found to update the X server font path
- * for use by AWT heavyweights - and when 2D
- * wants to use the native rasteriser.
- */
- if (xFontDirsMap == null) {
- xFontDirsMap = new HashMap();
- }
- xFontDirsMap.put(fontID, path);
- fullPath = file.getCanonicalPath();
- } catch (IOException e) {
- fullPath = path + File.separator + fileName;
- }
- Vector xVal = (Vector) xlfdMap.get(fullPath);
- if (debugFonts) {
- logger.info("fullPath=" + fullPath +
- " xVal=" + xVal);
- }
- if ((xVal == null || !xVal.contains(fontPart)) &&
- (sVal == null) || !sVal.startsWith("/")) {
- if (debugFonts) {
- logger.info("Map fontID:"+fontID +
- "to file:" + fullPath);
- }
- fontNameMap.put(fontID, fullPath);
- if (xVal == null) {
- xVal = new Vector();
- xlfdMap.put (fullPath, xVal);
- }
- xVal.add(fontPart);
- }
-
- ttype = st.nextToken();
- if (ttype != StreamTokenizer.TT_EOL) {
- break;
- }
- }
- }
- }
- fr.close();
- }
- } catch (IOException ioe1) {
- } finally {
- if (fr != null) {
- try {
- fr.close();
- } catch (IOException ioe2) {
- }
- }
- }
- }
-
- @Override
- public void loadFonts() {
- super.loadFonts();
- /* These maps are greatly expanded during a loadFonts but
- * can be reset to their initial state afterwards.
- * Since preferLocaleFonts() and preferProportionalFonts() will
- * trigger a partial repopulating from the FontConfiguration
- * it has to be the inital (empty) state for the latter two, not
- * simply nulling out.
- * xFontDirsMap is a special case in that the implementation
- * will typically not ever need to initialise it so it can be null.
- */
- xFontDirsMap = null;
- xlfdMap = new HashMap(1);
- fontNameMap = new HashMap(1);
- }
-
- // Implements SunGraphicsEnvironment.createFontConfiguration.
- protected FontConfiguration createFontConfiguration() {
-
- /* The logic here decides whether to use a preconfigured
- * fontconfig.properties file, or synthesise one using platform APIs.
- * On Solaris (as opposed to OpenSolaris) we try to use the
- * pre-configured ones, but if the files it specifies are missing
- * we fail-safe to synthesising one. This might happen if Solaris
- * changes its fonts.
- * For OpenSolaris I don't expect us to ever create fontconfig files,
- * so it will always synthesise. Note that if we misidentify
- * OpenSolaris as Solaris, then the test for the presence of
- * Solaris-only font files will correct this.
- * For Linux we require an exact match of distro and version to
- * use the preconfigured file, and also that it points to
- * existent fonts.
- * If synthesising fails, we fall back to any preconfigured file
- * and do the best we can. For the commercial JDK this will be
- * fine as it includes the Lucida fonts. OpenJDK should not hit
- * this as the synthesis should always work on its platforms.
- */
- FontConfiguration mFontConfig = new MFontConfiguration(this);
- if (isOpenSolaris ||
- (isLinux &&
- (!mFontConfig.foundOsSpecificFile() ||
- !mFontConfig.fontFilesArePresent()) ||
- (isSolaris && !mFontConfig.fontFilesArePresent()))) {
- FcFontConfiguration fcFontConfig =
- new FcFontConfiguration(this);
- if (fcFontConfig.init()) {
- return fcFontConfig;
- }
- }
- mFontConfig.init();
- return mFontConfig;
- }
- public FontConfiguration
- createFontConfiguration(boolean preferLocaleFonts,
- boolean preferPropFonts) {
-
- FontConfiguration config = getFontConfiguration();
- if (config instanceof FcFontConfiguration) {
- // Doesn't need to implement the alternate support.
- return config;
- }
-
- return new MFontConfiguration(this,
- preferLocaleFonts, preferPropFonts);
- }
/**
* Returns face name for default font, or null if
@@ -1006,8 +284,8 @@
// pRunningXinerama() simply returns a global boolean variable,
// so there is no need to synchronize here
xinerState = Boolean.valueOf(pRunningXinerama());
- if (screenLog.isLoggable(Level.FINER)) {
- screenLog.log(Level.FINER, "Running Xinerama: " + xinerState);
+ if (screenLog.isLoggable(PlatformLogger.FINER)) {
+ screenLog.finer("Running Xinerama: " + xinerState);
}
}
return xinerState.booleanValue();
@@ -1090,24 +368,24 @@
(unionRect.width / 2) + unionRect.x < center.x + 1 &&
(unionRect.height / 2) + unionRect.y < center.y + 1) {
- if (screenLog.isLoggable(Level.FINER)) {
- screenLog.log(Level.FINER, "Video Wall: center point is at center of all displays.");
+ if (screenLog.isLoggable(PlatformLogger.FINER)) {
+ screenLog.finer("Video Wall: center point is at center of all displays.");
}
return unionRect;
}
// next, check if at center of one monitor
if (centerMonitorRect != null) {
- if (screenLog.isLoggable(Level.FINER)) {
- screenLog.log(Level.FINER, "Center point at center of a particular " +
- "monitor, but not of the entire virtual display.");
+ if (screenLog.isLoggable(PlatformLogger.FINER)) {
+ screenLog.finer("Center point at center of a particular " +
+ "monitor, but not of the entire virtual display.");
}
return centerMonitorRect;
}
// otherwise, the center is at some weird spot: return unionRect
- if (screenLog.isLoggable(Level.FINER)) {
- screenLog.log(Level.FINER, "Center point is somewhere strange - return union of all bounds.");
+ if (screenLog.isLoggable(PlatformLogger.FINER)) {
+ screenLog.finer("Center point is somewhere strange - return union of all bounds.");
}
return unionRect;
}
diff --git a/src/solaris/classes/sun/awt/X11InputMethod.java b/src/solaris/classes/sun/awt/X11InputMethod.java
index 2ff0140..ca7a324 100644
--- a/src/solaris/classes/sun/awt/X11InputMethod.java
+++ b/src/solaris/classes/sun/awt/X11InputMethod.java
@@ -57,7 +57,7 @@
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.IOException;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
@@ -68,7 +68,7 @@
* @author JavaSoft International
*/
public abstract class X11InputMethod extends InputMethodAdapter {
- private static final Logger log = Logger.getLogger("sun.awt.X11InputMethod");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11InputMethod");
/*
* The following XIM* values must be the same as those defined in
* Xlib.h
@@ -324,8 +324,8 @@
return;
if (lastXICFocussedComponent != null){
- if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "XICFocused {0}, AWTFocused {1}", new Object[] {
- lastXICFocussedComponent, awtFocussedComponent});
+ if (log.isLoggable(PlatformLogger.FINE)) log.fine("XICFocused {0}, AWTFocused {1}",
+ lastXICFocussedComponent, awtFocussedComponent);
}
if (pData == 0) {
diff --git a/src/solaris/classes/sun/awt/motif/MFontConfiguration.java b/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
index 67a7b09..ab532d4 100644
--- a/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
+++ b/src/solaris/classes/sun/awt/motif/MFontConfiguration.java
@@ -30,37 +30,42 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
+import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
-import java.util.logging.Logger;
import java.util.Properties;
import java.util.Scanner;
import sun.awt.FontConfiguration;
+import sun.awt.X11FontManager;
import sun.awt.X11GraphicsEnvironment;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.FontManagerFactory;
+import sun.font.FontUtilities;
import sun.java2d.SunGraphicsEnvironment;
-import java.nio.charset.Charset;
+import sun.util.logging.PlatformLogger;
public class MFontConfiguration extends FontConfiguration {
private static FontConfiguration fontConfig = null;
- private static Logger logger;
+ private static PlatformLogger logger;
- public MFontConfiguration(SunGraphicsEnvironment environment) {
- super(environment);
- if (SunGraphicsEnvironment.debugFonts) {
- logger = Logger.getLogger("sun.awt.FontConfiguration");
+ public MFontConfiguration(SunFontManager fm) {
+ super(fm);
+ if (FontUtilities.debugFonts()) {
+ logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
}
initTables();
}
- public MFontConfiguration(SunGraphicsEnvironment environment,
+ public MFontConfiguration(SunFontManager fm,
boolean preferLocaleFonts,
boolean preferPropFonts) {
- super(environment, preferLocaleFonts, preferPropFonts);
- if (SunGraphicsEnvironment.debugFonts) {
- logger = Logger.getLogger("sun.awt.FontConfiguration");
+ super(fm, preferLocaleFonts, preferPropFonts);
+ if (FontUtilities.debugFonts()) {
+ logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
}
initTables();
}
@@ -90,7 +95,7 @@
reorderMap.put("UTF-8.th", "thai");
reorderMap.put("UTF-8.zh.TW", "chinese-big5");
reorderMap.put("UTF-8.zh.HK", split("chinese-big5,chinese-hkscs"));
- if (sun.font.FontManager.isSolaris8) {
+ if (FontUtilities.isSolaris8) {
reorderMap.put("UTF-8.zh.CN", split("chinese-gb2312,chinese-big5"));
} else {
reorderMap.put("UTF-8.zh.CN",
@@ -100,7 +105,7 @@
split("chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1"));
reorderMap.put("Big5", "chinese-big5");
reorderMap.put("Big5-HKSCS", split("chinese-big5,chinese-hkscs"));
- if (! sun.font.FontManager.isSolaris8 && ! sun.font.FontManager.isSolaris9) {
+ if (! FontUtilities.isSolaris8 && ! FontUtilities.isSolaris9) {
reorderMap.put("GB2312", split("chinese-gbk,chinese-gb2312"));
} else {
reorderMap.put("GB2312","chinese-gb2312");
@@ -209,7 +214,7 @@
protected String mapFileName(String fileName) {
if (fileName != null && fileName.startsWith(fontsDirPrefix)) {
- return SunGraphicsEnvironment.jreFontDirName
+ return SunFontManager.jreFontDirName
+ fileName.substring(fontsDirPrefix.length());
}
return fileName;
@@ -310,7 +315,7 @@
!needToSearchForFile(fileName)) {
return fileName;
}
- return ((X11GraphicsEnvironment) environment).getFileNameFromXLFD(componentFontName);
+ return ((X11FontManager) fontManager).getFileNameFromXLFD(componentFontName);
}
/**
diff --git a/src/solaris/classes/sun/awt/motif/MToolkit.java b/src/solaris/classes/sun/awt/motif/MToolkit.java
index 8f9f611..318897a 100644
--- a/src/solaris/classes/sun/awt/motif/MToolkit.java
+++ b/src/solaris/classes/sun/awt/motif/MToolkit.java
@@ -43,7 +43,6 @@
import java.util.Properties;
import java.util.Map;
import java.util.Iterator;
-import java.util.logging.*;
import sun.awt.AppContext;
import sun.awt.AWTAutoShutdown;
@@ -61,6 +60,7 @@
import java.awt.dnd.peer.DragSourceContextPeer;
//import sun.awt.motif.MInputMethod;
+import sun.awt.X11FontManager;
import sun.awt.X11GraphicsConfig;
import sun.awt.X11GraphicsEnvironment;
import sun.awt.XSettings;
@@ -73,10 +73,11 @@
import sun.misc.Unsafe;
import sun.security.action.GetBooleanAction;
+import sun.util.logging.PlatformLogger;
public class MToolkit extends UNIXToolkit implements Runnable {
- private static final Logger log = Logger.getLogger("sun.awt.motif.MToolkit");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.motif.MToolkit");
// the system clipboard - CLIPBOARD selection
//X11Clipboard clipboard;
@@ -124,7 +125,7 @@
* and when we know that MToolkit is the one that will be used,
* since XToolkit doesn't need the X11 font path set
*/
- X11GraphicsEnvironment.setNativeFontPath();
+ X11FontManager.getInstance().setNativeFontPath();
motifdnd = ((Boolean)java.security.AccessController.doPrivileged(
new GetBooleanAction("awt.dnd.motifdnd"))).booleanValue();
@@ -616,8 +617,8 @@
protected Boolean lazilyLoadDynamicLayoutSupportedProperty(String name) {
boolean nativeDynamic = isDynamicLayoutSupportedNative();
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "nativeDynamic == " + nativeDynamic);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("nativeDynamic == " + nativeDynamic);
}
return Boolean.valueOf(nativeDynamic);
diff --git a/src/solaris/classes/sun/font/FcFontConfiguration.java b/src/solaris/classes/sun/font/FcFontConfiguration.java
index a34fed0..7699a94 100644
--- a/src/solaris/classes/sun/font/FcFontConfiguration.java
+++ b/src/solaris/classes/sun/font/FcFontConfiguration.java
@@ -35,18 +35,19 @@
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.logging.Logger;
import java.util.Properties;
import java.util.Scanner;
import sun.awt.FontConfiguration;
import sun.awt.FontDescriptor;
import sun.awt.SunToolkit;
+import sun.awt.X11FontManager;
import sun.font.CompositeFontDescriptor;
import sun.font.FontManager;
-import sun.font.FontManager.FontConfigInfo;
-import sun.font.FontManager.FcCompFont;
-import sun.font.FontManager.FontConfigFont;
+import sun.font.FontConfigManager.FontConfigInfo;
+import sun.font.FontConfigManager.FcCompFont;
+import sun.font.FontConfigManager.FontConfigFont;
import sun.java2d.SunGraphicsEnvironment;
+import sun.util.logging.PlatformLogger;
public class FcFontConfiguration extends FontConfiguration {
@@ -68,16 +69,16 @@
private FcCompFont[] fcCompFonts = null;
- public FcFontConfiguration(SunGraphicsEnvironment environment) {
- super(environment);
+ public FcFontConfiguration(SunFontManager fm) {
+ super(fm);
init();
}
/* This isn't called but is needed to satisfy super-class contract. */
- public FcFontConfiguration(SunGraphicsEnvironment environment,
+ public FcFontConfiguration(SunFontManager fm,
boolean preferLocaleFonts,
boolean preferPropFonts) {
- super(environment, preferLocaleFonts, preferPropFonts);
+ super(fm, preferLocaleFonts, preferPropFonts);
init();
}
@@ -89,24 +90,23 @@
setFontConfiguration();
readFcInfo();
+ X11FontManager fm = (X11FontManager) fontManager;
+ FontConfigManager fcm = fm.getFontConfigManager();
if (fcCompFonts == null) {
- fcCompFonts = FontManager.loadFontConfig();
+ fcCompFonts = fcm.loadFontConfig();
if (fcCompFonts != null) {
try {
writeFcInfo();
} catch (Exception e) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger =
- Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("Exception writing fcInfo " + e);
+ if (FontUtilities.debugFonts()) {
+ warning("Exception writing fcInfo " + e);
}
}
- } else if (SunGraphicsEnvironment.debugFonts) {
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("Failed to get info from libfontconfig");
+ } else if (FontUtilities.debugFonts()) {
+ warning("Failed to get info from libfontconfig");
}
} else {
- FontManager.populateFontConfig(fcCompFonts);
+ fcm.populateFontConfig(fcCompFonts);
}
if (fcCompFonts == null) {
@@ -184,7 +184,9 @@
@Override
public String[] getPlatformFontNames() {
HashSet<String> nameSet = new HashSet<String>();
- FcCompFont[] fcCompFonts = FontManager.loadFontConfig();
+ X11FontManager fm = (X11FontManager) fontManager;
+ FontConfigManager fcm = fm.getFontConfigManager();
+ FcCompFont[] fcCompFonts = fcm.loadFontConfig();
for (int i=0; i<fcCompFonts.length; i++) {
for (int j=0; j<fcCompFonts[i].allFonts.length; j++) {
nameSet.add(fcCompFonts[i].allFonts[j].fontFile);
@@ -223,7 +225,9 @@
@Override
public CompositeFontDescriptor[] get2DCompositeFontInfo() {
- FcCompFont[] fcCompFonts = FontManager.loadFontConfig();
+ X11FontManager fm = (X11FontManager) fontManager;
+ FontConfigManager fcm = fm.getFontConfigManager();
+ FcCompFont[] fcCompFonts = fcm.loadFontConfig();
CompositeFontDescriptor[] result =
new CompositeFontDescriptor[NUM_FONTS * NUM_STYLES];
@@ -321,9 +325,8 @@
osVersion = getVersionString(f);
}
} catch (Exception e) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("Exception identifying Linux distro.");
+ if (FontUtilities.debugFonts()) {
+ warning("Exception identifying Linux distro.");
}
}
}
@@ -356,7 +359,9 @@
private void writeFcInfo() {
Properties props = new Properties();
props.setProperty("version", fileVersion);
- FontConfigInfo fcInfo = FontManager.getFontConfigInfo();
+ X11FontManager fm = (X11FontManager) fontManager;
+ FontConfigManager fcm = fm.getFontConfigManager();
+ FontConfigInfo fcInfo = fcm.getFontConfigInfo();
props.setProperty("fcversion", Integer.toString(fcInfo.fcVersion));
if (fcInfo.cacheDirs != null) {
for (int i=0;i<fcInfo.cacheDirs.length;i++) {
@@ -391,15 +396,13 @@
"JDK Font Configuration Generated File: *Do Not Edit*");
fos.close();
boolean renamed = tempFile.renameTo(fcInfoFile);
- if (!renamed && SunGraphicsEnvironment.debugFonts) {
+ if (!renamed && FontUtilities.debugFonts()) {
System.out.println("rename failed");
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("Failed renaming file to "+ getFcInfoFile());
+ warning("Failed renaming file to "+ getFcInfoFile());
}
} catch (Exception e) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("IOException writing to "+ getFcInfoFile());
+ if (FontUtilities.debugFonts()) {
+ warning("IOException writing to "+ getFcInfoFile());
}
}
}
@@ -415,14 +418,15 @@
return;
}
Properties props = new Properties();
+ X11FontManager fm = (X11FontManager) fontManager;
+ FontConfigManager fcm = fm.getFontConfigManager();
try {
FileInputStream fis = new FileInputStream(fcFile);
props.load(fis);
fis.close();
} catch (IOException e) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("IOException reading from "+fcFile.toString());
+ if (FontUtilities.debugFonts()) {
+ warning("IOException reading from "+fcFile.toString());
}
return;
}
@@ -439,15 +443,12 @@
try {
fcVersion = Integer.parseInt(fcVersionStr);
if (fcVersion != 0 &&
- fcVersion != FontManager.getFontConfigVersion()) {
+ fcVersion != fcm.getFontConfigVersion()) {
return;
}
} catch (Exception e) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger =
- Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning("Exception parsing version " +
- fcVersionStr);
+ if (FontUtilities.debugFonts()) {
+ warning("Exception parsing version " + fcVersionStr);
}
return;
}
@@ -509,10 +510,14 @@
}
fcCompFonts = fci;
} catch (Throwable t) {
- if (SunGraphicsEnvironment.debugFonts) {
- Logger logger = Logger.getLogger("sun.awt.FontConfiguration");
- logger.warning(t.toString());
+ if (FontUtilities.debugFonts()) {
+ warning(t.toString());
}
}
}
+
+ private static void warning(String msg) {
+ PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
+ logger.warning(msg);
+ }
}
diff --git a/src/solaris/classes/sun/font/FontConfigManager.java b/src/solaris/classes/sun/font/FontConfigManager.java
new file mode 100644
index 0000000..af9b086
--- /dev/null
+++ b/src/solaris/classes/sun/font/FontConfigManager.java
@@ -0,0 +1,472 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.font;
+
+import java.util.Locale;
+
+import sun.awt.SunHints;
+import sun.awt.SunToolkit;
+import sun.util.logging.PlatformLogger;
+
+/**
+ * Small utility class to manage FontConfig.
+ */
+public class FontConfigManager {
+
+ static boolean fontConfigFailed = false;
+
+ /* This is populated by native */
+ private static final FontConfigInfo fcInfo = new FontConfigInfo();
+
+ /* Begin support for GTK Look and Feel - query libfontconfig and
+ * return a composite Font to Swing that uses the desktop font(s).
+ */
+
+ /* These next three classes are just data structures.
+ */
+ public static class FontConfigFont {
+ public String familyName; // eg Bitstream Vera Sans
+ public String styleStr; // eg Bold
+ public String fullName; // eg Bitstream Vera Sans Bold
+ public String fontFile; // eg /usr/X11/lib/fonts/foo.ttf
+ }
+
+ public static class FcCompFont {
+ public String fcName; // eg sans
+ public String fcFamily; // eg sans
+ public String jdkName; // eg sansserif
+ public int style; // eg 0=PLAIN
+ public FontConfigFont firstFont;
+ public FontConfigFont[] allFonts;
+ //boolean preferBitmaps; // if embedded bitmaps preferred over AA
+ public CompositeFont compFont; // null if not yet created/known.
+ }
+
+ public static class FontConfigInfo {
+ public int fcVersion;
+ public String[] cacheDirs = new String[4];
+ }
+
+ /* fontconfig recognises slants roman, italic, as well as oblique,
+ * and a slew of weights, where the ones that matter here are
+ * regular and bold.
+ * To fully qualify what we want, we can for example ask for (eg)
+ * Font.PLAIN : "serif:regular:roman"
+ * Font.BOLD : "serif:bold:roman"
+ * Font.ITALIC : "serif:regular:italic"
+ * Font.BOLD|Font.ITALIC : "serif:bold:italic"
+ */
+ private static String[] fontConfigNames = {
+ "sans:regular:roman",
+ "sans:bold:roman",
+ "sans:regular:italic",
+ "sans:bold:italic",
+
+ "serif:regular:roman",
+ "serif:bold:roman",
+ "serif:regular:italic",
+ "serif:bold:italic",
+
+ "monospace:regular:roman",
+ "monospace:bold:roman",
+ "monospace:regular:italic",
+ "monospace:bold:italic",
+ };
+
+ /* This array has the array elements created in Java code and is
+ * passed down to native to be filled in.
+ */
+ private FcCompFont[] fontConfigFonts;
+
+ /**
+ * Instantiates a new FontConfigManager getting the default instance
+ * of FontManager from the FontManagerFactory.
+ */
+ public FontConfigManager() {
+ }
+
+ public static String[] getFontConfigNames() {
+ return fontConfigNames;
+ }
+
+ /* Called from code that needs to know what are the AA settings
+ * that apps using FC would pick up for the default desktop font.
+ * Note apps can change the default desktop font. etc, so this
+ * isn't certain to be right but its going to correct for most cases.
+ * Native return values map to the text aa values in sun.awt.SunHints.
+ * which is used to look up the renderinghint value object.
+ */
+ public static Object getFontConfigAAHint() {
+ return getFontConfigAAHint("sans");
+ }
+
+ /* This is public solely so that for debugging purposes it can be called
+ * with other names, which might (eg) include a size, eg "sans-24"
+ * The return value is a text aa rendering hint value.
+ * Normally we should call the no-args version.
+ */
+ public static Object getFontConfigAAHint(String fcFamily) {
+ if (FontUtilities.isWindows) {
+ return null;
+ } else {
+ int hint = getFontConfigAASettings(getFCLocaleStr(), fcFamily);
+ if (hint < 0) {
+ return null;
+ } else {
+ return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
+ hint);
+ }
+ }
+ }
+
+
+ private static String getFCLocaleStr() {
+ Locale l = SunToolkit.getStartupLocale();
+ String localeStr = l.getLanguage();
+ String country = l.getCountry();
+ if (!country.equals("")) {
+ localeStr = localeStr + "-" + country;
+ }
+ return localeStr;
+ }
+
+ /* This does cause the native libfontconfig to be loaded and unloaded,
+ * but it does not incur the overhead of initialisation of its
+ * data structures, so shouldn't have a measurable impact.
+ */
+ public static native int getFontConfigVersion();
+
+ /* This can be made public if it's needed to force a re-read
+ * rather than using the cached values. The re-read would be needed
+ * only if some event signalled that the fontconfig has changed.
+ * In that event this method would need to return directly the array
+ * to be used by the caller in case it subsequently changed.
+ */
+ public synchronized void initFontConfigFonts(boolean includeFallbacks) {
+
+ if (fontConfigFonts != null) {
+ if (!includeFallbacks || (fontConfigFonts[0].allFonts != null)) {
+ return;
+ }
+ }
+
+ if (FontUtilities.isWindows || fontConfigFailed) {
+ return;
+ }
+
+ long t0 = 0;
+ if (FontUtilities.isLogging()) {
+ t0 = System.nanoTime();
+ }
+
+ String[] fontConfigNames = FontConfigManager.getFontConfigNames();
+ FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length];
+
+ for (int i = 0; i< fontArr.length; i++) {
+ fontArr[i] = new FcCompFont();
+ fontArr[i].fcName = fontConfigNames[i];
+ int colonPos = fontArr[i].fcName.indexOf(':');
+ fontArr[i].fcFamily = fontArr[i].fcName.substring(0, colonPos);
+ fontArr[i].jdkName = FontUtilities.mapFcName(fontArr[i].fcFamily);
+ fontArr[i].style = i % 4; // depends on array order.
+ }
+ getFontConfig(getFCLocaleStr(), fcInfo, fontArr, includeFallbacks);
+ FontConfigFont anyFont = null;
+ /* If don't find anything (eg no libfontconfig), then just return */
+ for (int i = 0; i< fontArr.length; i++) {
+ FcCompFont fci = fontArr[i];
+ if (fci.firstFont == null) {
+ if (FontUtilities.isLogging()) {
+ PlatformLogger logger = FontUtilities.getLogger();
+ logger.info("Fontconfig returned no font for " +
+ fontArr[i].fcName);
+ }
+ fontConfigFailed = true;
+ } else if (anyFont == null) {
+ anyFont = fci.firstFont;
+ }
+ }
+
+ if (anyFont == null) {
+ if (FontUtilities.isLogging()) {
+ PlatformLogger logger = FontUtilities.getLogger();
+ logger.info("Fontconfig returned no fonts at all.");
+ return;
+ }
+ } else if (fontConfigFailed) {
+ for (int i = 0; i< fontArr.length; i++) {
+ if (fontArr[i].firstFont == null) {
+ fontArr[i].firstFont = anyFont;
+ }
+ }
+ }
+
+ fontConfigFonts = fontArr;
+
+ if (FontUtilities.isLogging()) {
+
+ PlatformLogger logger = FontUtilities.getLogger();
+
+ long t1 = System.nanoTime();
+ logger.info("Time spent accessing fontconfig="
+ + ((t1 - t0) / 1000000) + "ms.");
+
+ for (int i = 0; i< fontConfigFonts.length; i++) {
+ FcCompFont fci = fontConfigFonts[i];
+ logger.info("FC font " + fci.fcName+" maps to family " +
+ fci.firstFont.familyName +
+ " in file " + fci.firstFont.fontFile);
+ if (fci.allFonts != null) {
+ for (int f=0;f<fci.allFonts.length;f++) {
+ FontConfigFont fcf = fci.allFonts[f];
+ logger.info("Family=" + fcf.familyName +
+ " Style="+ fcf.styleStr +
+ " Fullname="+fcf.fullName +
+ " File="+fcf.fontFile);
+ }
+ }
+ }
+ }
+ }
+
+ public PhysicalFont registerFromFcInfo(FcCompFont fcInfo) {
+
+ SunFontManager fm = SunFontManager.getInstance();
+
+ /* If it's a TTC file we need to know that as we will need to
+ * make sure we return the right font */
+ String fontFile = fcInfo.firstFont.fontFile;
+ int offset = fontFile.length()-4;
+ if (offset <= 0) {
+ return null;
+ }
+ String ext = fontFile.substring(offset).toLowerCase();
+ boolean isTTC = ext.equals(".ttc");
+
+ /* If this file is already registered, can just return its font.
+ * However we do need to check in case it's a TTC as we need
+ * a specific font, so rather than directly returning it, let
+ * findFont2D resolve that.
+ */
+ PhysicalFont physFont = fm.getRegisteredFontFile(fontFile);
+ if (physFont != null) {
+ if (isTTC) {
+ Font2D f2d = fm.findFont2D(fcInfo.firstFont.familyName,
+ fcInfo.style,
+ FontManager.NO_FALLBACK);
+ if (f2d instanceof PhysicalFont) { /* paranoia */
+ return (PhysicalFont)f2d;
+ } else {
+ return null;
+ }
+ } else {
+ return physFont;
+ }
+ }
+
+ /* If the font may hide a JRE font (eg fontconfig says it is
+ * Lucida Sans), we want to use the JRE version, so make it
+ * point to the JRE font.
+ */
+ physFont = fm.findJREDeferredFont(fcInfo.firstFont.familyName,
+ fcInfo.style);
+
+ /* It is also possible the font file is on the "deferred" list,
+ * in which case we can just initialise it now.
+ */
+ if (physFont == null &&
+ fm.isDeferredFont(fontFile) == true) {
+ physFont = fm.initialiseDeferredFont(fcInfo.firstFont.fontFile);
+ /* use findFont2D to get the right font from TTC's */
+ if (physFont != null) {
+ if (isTTC) {
+ Font2D f2d = fm.findFont2D(fcInfo.firstFont.familyName,
+ fcInfo.style,
+ FontManager.NO_FALLBACK);
+ if (f2d instanceof PhysicalFont) { /* paranoia */
+ return (PhysicalFont)f2d;
+ } else {
+ return null;
+ }
+ } else {
+ return physFont;
+ }
+ }
+ }
+
+ /* In the majority of cases we reach here, and need to determine
+ * the type and rank to register the font.
+ */
+ if (physFont == null) {
+ int fontFormat = SunFontManager.FONTFORMAT_NONE;
+ int fontRank = Font2D.UNKNOWN_RANK;
+
+ if (ext.equals(".ttf") || isTTC) {
+ fontFormat = SunFontManager.FONTFORMAT_TRUETYPE;
+ fontRank = Font2D.TTF_RANK;
+ } else if (ext.equals(".pfa") || ext.equals(".pfb")) {
+ fontFormat = SunFontManager.FONTFORMAT_TYPE1;
+ fontRank = Font2D.TYPE1_RANK;
+ }
+ physFont = fm.registerFontFile(fcInfo.firstFont.fontFile, null,
+ fontFormat, true, fontRank);
+ }
+ return physFont;
+ }
+
+ /*
+ * We need to return a Composite font which has as the font in
+ * its first slot one obtained from fontconfig.
+ */
+ public CompositeFont getFontConfigFont(String name, int style) {
+
+ name = name.toLowerCase();
+
+ initFontConfigFonts(false);
+
+ FcCompFont fcInfo = null;
+ for (int i=0; i<fontConfigFonts.length; i++) {
+ if (name.equals(fontConfigFonts[i].fcFamily) &&
+ style == fontConfigFonts[i].style) {
+ fcInfo = fontConfigFonts[i];
+ break;
+ }
+ }
+ if (fcInfo == null) {
+ fcInfo = fontConfigFonts[0];
+ }
+
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .info("FC name=" + name + " style=" + style +
+ " uses " + fcInfo.firstFont.familyName +
+ " in file: " + fcInfo.firstFont.fontFile);
+ }
+
+ if (fcInfo.compFont != null) {
+ return fcInfo.compFont;
+ }
+
+ /* jdkFont is going to be used for slots 1..N and as a fallback.
+ * Slot 0 will be the physical font from fontconfig.
+ */
+ FontManager fm = FontManagerFactory.getInstance();
+ CompositeFont jdkFont = (CompositeFont)
+ fm.findFont2D(fcInfo.jdkName, style, FontManager.LOGICAL_FALLBACK);
+
+ if (fcInfo.firstFont.familyName == null ||
+ fcInfo.firstFont.fontFile == null) {
+ return (fcInfo.compFont = jdkFont);
+ }
+
+ /* First, see if the family and exact style is already registered.
+ * If it is, use it. If it's not, then try to register it.
+ * If that registration fails (signalled by null) just return the
+ * regular JDK composite.
+ * Algorithmically styled fonts won't match on exact style, so
+ * will fall through this code, but the regisration code will
+ * find that file already registered and return its font.
+ */
+ FontFamily family = FontFamily.getFamily(fcInfo.firstFont.familyName);
+ PhysicalFont physFont = null;
+ if (family != null) {
+ Font2D f2D = family.getFontWithExactStyleMatch(fcInfo.style);
+ if (f2D instanceof PhysicalFont) {
+ physFont = (PhysicalFont)f2D;
+ }
+ }
+
+ if (physFont == null ||
+ !fcInfo.firstFont.fontFile.equals(physFont.platName)) {
+ physFont = registerFromFcInfo(fcInfo);
+ if (physFont == null) {
+ return (fcInfo.compFont = jdkFont);
+ }
+ family = FontFamily.getFamily(physFont.getFamilyName(null));
+ }
+
+ /* Now register the fonts in the family (the other styles) after
+ * checking that they aren't already registered and are actually in
+ * a different file. They may be the same file in CJK cases.
+ * For cases where they are different font files - eg as is common for
+ * Latin fonts, then we rely on fontconfig to report these correctly.
+ * Assume that all styles of this font are found by fontconfig,
+ * so we can find all the family members which must be registered
+ * together to prevent synthetic styling.
+ */
+ for (int i=0; i<fontConfigFonts.length; i++) {
+ FcCompFont fc = fontConfigFonts[i];
+ if (fc != fcInfo &&
+ physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
+ !fc.firstFont.fontFile.equals(physFont.platName) &&
+ family.getFontWithExactStyleMatch(fc.style) == null) {
+
+ registerFromFcInfo(fontConfigFonts[i]);
+ }
+ }
+
+ /* Now we have a physical font. We will back this up with the JDK
+ * logical font (sansserif, serif, or monospaced) that corresponds
+ * to the Pango/GTK/FC logical font name.
+ */
+ return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
+ }
+
+ /**
+ *
+ * @param locale
+ * @param fcFamily
+ * @return
+ */
+ public FcCompFont[] getFontConfigFonts() {
+ return fontConfigFonts;
+ }
+
+ /* Return an array of FcCompFont structs describing the primary
+ * font located for each of fontconfig/GTK/Pango's logical font names.
+ */
+ private static native void getFontConfig(String locale,
+ FontConfigInfo fcInfo,
+ FcCompFont[] fonts,
+ boolean includeFallbacks);
+
+ void populateFontConfig(FcCompFont[] fcInfo) {
+ fontConfigFonts = fcInfo;
+ }
+
+ FcCompFont[] loadFontConfig() {
+ initFontConfigFonts(true);
+ return fontConfigFonts;
+ }
+
+ FontConfigInfo getFontConfigInfo() {
+ initFontConfigFonts(true);
+ return fcInfo;
+ }
+
+ private static native int
+ getFontConfigAASettings(String locale, String fcFamily);
+}
diff --git a/src/solaris/classes/sun/font/NativeFont.java b/src/solaris/classes/sun/font/NativeFont.java
index 82fda58..ac4b314 100644
--- a/src/solaris/classes/sun/font/NativeFont.java
+++ b/src/solaris/classes/sun/font/NativeFont.java
@@ -242,7 +242,8 @@
mapper = new NativeGlyphMapper(this);
} else {
/* we need to delegate */
- delegateFont = FontManager.getDefaultPhysicalFont();
+ SunFontManager fm = SunFontManager.getInstance();
+ delegateFont = fm.getDefaultPhysicalFont();
mapper = delegateFont.getMapper();
}
}
@@ -254,7 +255,8 @@
return new NativeStrike(this, desc);
} else {
if (delegateFont == null) {
- delegateFont = FontManager.getDefaultPhysicalFont();
+ SunFontManager fm = SunFontManager.getInstance();
+ delegateFont = fm.getDefaultPhysicalFont();
}
/* If no FileFont's are found, delegate font may be
* a NativeFont, so we need to avoid recursing here.
@@ -314,7 +316,8 @@
PhysicalFont getDelegateFont() {
if (delegateFont == null) {
- delegateFont = FontManager.getDefaultPhysicalFont();
+ SunFontManager fm = SunFontManager.getInstance();
+ delegateFont = fm.getDefaultPhysicalFont();
}
return delegateFont;
}
diff --git a/src/solaris/classes/sun/font/NativeStrike.java b/src/solaris/classes/sun/font/NativeStrike.java
index b6cd9a0..6d0531a 100644
--- a/src/solaris/classes/sun/font/NativeStrike.java
+++ b/src/solaris/classes/sun/font/NativeStrike.java
@@ -112,11 +112,12 @@
double scale = Math.abs(desc.devTx.getScaleX());
pScalerContext = createScalerContext(nameBytes, ptSize, scale);
if (pScalerContext == 0L) {
- FontManager.deRegisterBadFont(nativeFont);
+ SunFontManager.getInstance().deRegisterBadFont(nativeFont);
pScalerContext = createNullScalerContext();
numGlyphs = 0;
- if (FontManager.logging) {
- FontManager.logger.severe("Could not create native strike " +
+ if (FontUtilities.isLogging()) {
+ FontUtilities.getLogger()
+ .severe("Could not create native strike " +
new String(nameBytes));
}
return;
@@ -134,7 +135,7 @@
private boolean usingIntGlyphImages() {
if (intGlyphImages != null) {
return true;
- } else if (FontManager.longAddresses) {
+ } else if (longAddresses) {
return false;
} else {
/* We could obtain minGlyphIndex and index relative to that
@@ -153,7 +154,7 @@
}
private long[] getLongGlyphImages() {
- if (longGlyphImages == null && FontManager.longAddresses) {
+ if (longGlyphImages == null && longAddresses) {
/* We could obtain minGlyphIndex and index relative to that
* if we need to save space.
diff --git a/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java b/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java
index 591f490..79550d1 100644
--- a/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java
+++ b/src/solaris/classes/sun/nio/fs/UnixDirectoryStream.java
@@ -235,7 +235,8 @@
@Override
public void remove() {
if (isClosed) {
- throw new ClosedDirectoryStreamException();
+ throwAsConcurrentModificationException(new
+ ClosedDirectoryStreamException());
}
Path entry;
synchronized (this) {
diff --git a/src/solaris/classes/sun/print/IPPPrintService.java b/src/solaris/classes/sun/print/IPPPrintService.java
index ec5344a..0b52e17 100644
--- a/src/solaris/classes/sun/print/IPPPrintService.java
+++ b/src/solaris/classes/sun/print/IPPPrintService.java
@@ -661,9 +661,10 @@
}
}
} else if (category == OrientationRequested.class) {
- if (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
- flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
- flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT)) {
+ if ((flavor != null) &&
+ (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
+ flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
+ flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT))) {
return null;
}
diff --git a/src/solaris/native/sun/awt/fontpath.c b/src/solaris/native/sun/awt/fontpath.c
index b944ff9..c6b1fc7 100644
--- a/src/solaris/native/sun/awt/fontpath.c
+++ b/src/solaris/native/sun/awt/fontpath.c
@@ -150,15 +150,26 @@
static jboolean isLocalSet = False;
jboolean ret;
- if (isLocalSet) {
- return isLocal;
+ if (! isLocalSet) {
+ jclass geCls = (*env)->FindClass(env, "java/awt/GraphicsEnvironment");
+ jmethodID getLocalGE = (*env)->GetStaticMethodID(env, geCls,
+ "getLocalGraphicsEnvironment",
+ "()Ljava/awt/GraphicsEnvironment;");
+ jobject ge = (*env)->CallStaticObjectMethod(env, geCls, getLocalGE);
+
+ jclass sgeCls = (*env)->FindClass(env,
+ "sun/java2d/SunGraphicsEnvironment");
+ if ((*env)->IsInstanceOf(env, ge, sgeCls)) {
+ jmethodID isDisplayLocal = (*env)->GetMethodID(env, sgeCls,
+ "isDisplayLocal",
+ "()Z");
+ isLocal = (*env)->CallBooleanMethod(env, ge, isDisplayLocal);
+ } else {
+ isLocal = True;
+ }
+ isLocalSet = True;
}
- isLocal = JNU_CallStaticMethodByName(env, NULL,
- "sun/awt/X11GraphicsEnvironment",
- "_isDisplayLocal",
- "()Z").z;
- isLocalSet = True;
return isLocal;
}
@@ -516,8 +527,8 @@
return path;
}
-JNIEXPORT jstring JNICALL Java_sun_font_FontManager_getFontPath
-(JNIEnv *env, jclass obj, jboolean noType1) {
+JNIEXPORT jstring JNICALL Java_sun_awt_X11FontManager_getFontPath
+(JNIEnv *env, jobject thiz, jboolean noType1) {
jstring ret;
static char *ptr = NULL; /* retain result across calls */
@@ -564,7 +575,7 @@
}
#endif /* !HEADLESS */
-JNIEXPORT void JNICALL Java_sun_font_FontManager_setNativeFontPath
+JNIEXPORT void JNICALL Java_sun_font_X11FontManager_setNativeFontPath
(JNIEnv *env, jclass obj, jstring theString) {
#ifdef HEADLESS
return;
@@ -592,21 +603,6 @@
#endif
}
-/* This isn't yet used on unix, the implementation is added since shared
- * code calls this method in preparation for future use.
- */
-/* Obtain all the fontname -> filename mappings.
- * This is called once and the results returned to Java code which can
- * use it for lookups to reduce or avoid the need to search font files.
- */
-JNIEXPORT void JNICALL
-Java_sun_font_FontManager_populateFontFileNameMap
-(JNIEnv *env, jclass obj, jobject fontToFileMap,
- jobject fontToFamilyMap, jobject familyToFontListMap, jobject locale)
-{
- return;
-}
-
#include <dlfcn.h>
#ifndef __linux__ /* i.e. is solaris */
#include <link.h>
@@ -865,7 +861,7 @@
#define TEXT_AA_LCD_VBGR 7
JNIEXPORT jint JNICALL
-Java_sun_font_FontManager_getFontConfigAASettings
+Java_sun_font_FontConfigManager_getFontConfigAASettings
(JNIEnv *env, jclass obj, jstring localeStr, jstring fcNameStr) {
FcNameParseFuncType FcNameParse;
@@ -975,7 +971,7 @@
}
JNIEXPORT jint JNICALL
-Java_sun_font_FontManager_getFontConfigVersion
+Java_sun_font_FontConfigManager_getFontConfigVersion
(JNIEnv *env, jclass obj) {
void* libfontconfig;
@@ -1000,7 +996,7 @@
JNIEXPORT void JNICALL
-Java_sun_font_FontManager_getFontConfig
+Java_sun_font_FontConfigManager_getFontConfig
(JNIEnv *env, jclass obj, jstring localeStr, jobject fcInfoObj,
jobjectArray fcCompFontArray, jboolean includeFallbacks) {
@@ -1034,11 +1030,11 @@
char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS");
jclass fcInfoClass =
- (*env)->FindClass(env, "sun/font/FontManager$FontConfigInfo");
+ (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo");
jclass fcCompFontClass =
- (*env)->FindClass(env, "sun/font/FontManager$FcCompFont");
+ (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont");
jclass fcFontClass =
- (*env)->FindClass(env, "sun/font/FontManager$FontConfigFont");
+ (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont");
if (fcInfoObj == NULL || fcCompFontArray == NULL || fcInfoClass == NULL ||
fcCompFontClass == NULL || fcFontClass == NULL) {
@@ -1054,11 +1050,11 @@
"fcName", "Ljava/lang/String;");
fcFirstFontID =
(*env)->GetFieldID(env, fcCompFontClass, "firstFont",
- "Lsun/font/FontManager$FontConfigFont;");
+ "Lsun/font/FontConfigManager$FontConfigFont;");
fcAllFontsID =
(*env)->GetFieldID(env, fcCompFontClass, "allFonts",
- "[Lsun/font/FontManager$FontConfigFont;");
+ "[Lsun/font/FontConfigManager$FontConfigFont;");
fcFontCons = (*env)->GetMethodID(env, fcFontClass, "<init>", "()V");
@@ -1207,11 +1203,7 @@
* Inspect the returned fonts and the ones we like (adds enough glyphs)
* are added to the arrays and we increment 'fontCount'.
*/
- if (includeFallbacks) {
- nfonts = fontset->nfont;
- } else {
- nfonts = 1;
- }
+ nfonts = fontset->nfont;
family = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
styleStr = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
fullname = (FcChar8**)calloc(nfonts, sizeof(FcChar8*));
@@ -1253,7 +1245,7 @@
* adversely affects load time for minimal value-add.
* This is still likely far more than we've had in the past.
*/
- if (nfonts==10) {
+ if (j==10) {
minGlyphs = 50;
}
if (unionCharset == NULL) {
@@ -1272,6 +1264,9 @@
(*FcPatternGetString)(fontPattern, FC_FAMILY, 0, &family[j]);
(*FcPatternGetString)(fontPattern, FC_STYLE, 0, &styleStr[j]);
(*FcPatternGetString)(fontPattern, FC_FULLNAME, 0, &fullname[j]);
+ if (!includeFallbacks) {
+ break;
+ }
}
/* Once we get here 'fontCount' is the number of returned fonts
@@ -1313,6 +1308,8 @@
}
if (includeFallbacks) {
(*env)->SetObjectArrayElement(env, fcFontArr, fn++,fcFont);
+ } else {
+ break;
}
}
}
diff --git a/src/windows/classes/sun/awt/Win32FontManager.java b/src/windows/classes/sun/awt/Win32FontManager.java
new file mode 100644
index 0000000..a982432
--- /dev/null
+++ b/src/windows/classes/sun/awt/Win32FontManager.java
@@ -0,0 +1,280 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+
+package sun.awt;
+
+import java.awt.FontFormatException;
+import java.awt.GraphicsEnvironment;
+import java.io.File;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+import sun.awt.Win32GraphicsEnvironment;
+import sun.awt.windows.WFontConfiguration;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
+import sun.font.TrueTypeFont;
+import sun.java2d.HeadlessGraphicsEnvironment;
+import sun.java2d.SunGraphicsEnvironment;
+
+/**
+ * The X11 implementation of {@link FontManager}.
+ */
+public class Win32FontManager extends SunFontManager {
+
+ private static String[] defaultPlatformFont = null;
+
+ private static TrueTypeFont eudcFont;
+
+ static {
+
+ AccessController.doPrivileged(new PrivilegedAction() {
+
+ public Object run() {
+ String eudcFile = getEUDCFontFile();
+ if (eudcFile != null) {
+ try {
+ eudcFont = new TrueTypeFont(eudcFile, null, 0,
+ true);
+ } catch (FontFormatException e) {
+ }
+ }
+ return null;
+ }
+
+ });
+ }
+
+ /* Used on Windows to obtain from the windows registry the name
+ * of a file containing the system EUFC font. If running in one of
+ * the locales for which this applies, and one is defined, the font
+ * defined by this file is appended to all composite fonts as a
+ * fallback component.
+ */
+ private static native String getEUDCFontFile();
+
+ public Win32FontManager() {
+ super();
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+
+ /* Register the JRE fonts so that the native platform can
+ * access them. This is used only on Windows so that when
+ * printing the printer driver can access the fonts.
+ */
+ registerJREFontsWithPlatform(jreFontDirName);
+ return null;
+ }
+ });
+ }
+
+ /* Unlike the shared code version, this expects a base file name -
+ * not a full path name.
+ * The font configuration file has base file names and the FontConfiguration
+ * class reports these back to the GraphicsEnvironment, so these
+ * are the componentFileNames of CompositeFonts.
+ */
+ protected void registerFontFile(String fontFileName, String[] nativeNames,
+ int fontRank, boolean defer) {
+
+ // REMIND: case compare depends on platform
+ if (registeredFontFiles.contains(fontFileName)) {
+ return;
+ }
+ registeredFontFiles.add(fontFileName);
+
+ int fontFormat;
+ if (getTrueTypeFilter().accept(null, fontFileName)) {
+ fontFormat = SunFontManager.FONTFORMAT_TRUETYPE;
+ } else if (getType1Filter().accept(null, fontFileName)) {
+ fontFormat = SunFontManager.FONTFORMAT_TYPE1;
+ } else {
+ /* on windows we don't use/register native fonts */
+ return;
+ }
+
+ if (fontPath == null) {
+ fontPath = getPlatformFontPath(noType1Font);
+ }
+
+ /* Look in the JRE font directory first.
+ * This is playing it safe as we would want to find fonts in the
+ * JRE font directory ahead of those in the system directory
+ */
+ String tmpFontPath = jreFontDirName+File.pathSeparator+fontPath;
+ StringTokenizer parser = new StringTokenizer(tmpFontPath,
+ File.pathSeparator);
+
+ boolean found = false;
+ try {
+ while (!found && parser.hasMoreTokens()) {
+ String newPath = parser.nextToken();
+ File theFile = new File(newPath, fontFileName);
+ if (theFile.canRead()) {
+ found = true;
+ String path = theFile.getAbsolutePath();
+ if (defer) {
+ registerDeferredFont(fontFileName, path,
+ nativeNames,
+ fontFormat, true,
+ fontRank);
+ } else {
+ registerFontFile(path, nativeNames,
+ fontFormat, true,
+ fontRank);
+ }
+ break;
+ }
+ }
+ } catch (NoSuchElementException e) {
+ System.err.println(e);
+ }
+ if (!found) {
+ addToMissingFontFileList(fontFileName);
+ }
+ }
+
+ @Override
+ protected FontConfiguration createFontConfiguration() {
+
+ FontConfiguration fc = new WFontConfiguration(this);
+ fc.init();
+ return fc;
+ }
+
+ @Override
+ public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
+ boolean preferPropFonts) {
+
+ return new WFontConfiguration(this,
+ preferLocaleFonts,preferPropFonts);
+ }
+
+ protected void
+ populateFontFileNameMap(HashMap<String,String> fontToFileMap,
+ HashMap<String,String> fontToFamilyNameMap,
+ HashMap<String,ArrayList<String>>
+ familyToFontListMap,
+ Locale locale) {
+
+ populateFontFileNameMap0(fontToFileMap, fontToFamilyNameMap,
+ familyToFontListMap, locale);
+
+ }
+
+ private static native void
+ populateFontFileNameMap0(HashMap<String,String> fontToFileMap,
+ HashMap<String,String> fontToFamilyNameMap,
+ HashMap<String,ArrayList<String>>
+ familyToFontListMap,
+ Locale locale);
+
+ public synchronized native String getFontPath(boolean noType1Fonts);
+
+ public String[] getDefaultPlatformFont() {
+
+ if (defaultPlatformFont != null) {
+ return defaultPlatformFont;
+ }
+
+ String[] info = new String[2];
+ info[0] = "Arial";
+ info[1] = "c:\\windows\\fonts";
+ final String[] dirs = getPlatformFontDirs(true);
+ if (dirs.length > 1) {
+ String dir = (String)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ for (int i=0; i<dirs.length; i++) {
+ String path =
+ dirs[i] + File.separator + "arial.ttf";
+ File file = new File(path);
+ if (file.exists()) {
+ return dirs[i];
+ }
+ }
+ return null;
+ }
+ });
+ if (dir != null) {
+ info[1] = dir;
+ }
+ } else {
+ info[1] = dirs[0];
+ }
+ info[1] = info[1] + File.separator + "arial.ttf";
+ defaultPlatformFont = info;
+ return defaultPlatformFont;
+ }
+
+ /* register only TrueType/OpenType fonts
+ * Because these need to be registed just for use when printing,
+ * we defer the actual registration and the static initialiser
+ * for the printing class makes the call to registerJREFontsForPrinting()
+ */
+ static String fontsForPrinting = null;
+ protected void registerJREFontsWithPlatform(String pathName) {
+ fontsForPrinting = pathName;
+ }
+
+ public static void registerJREFontsForPrinting() {
+ final String pathName;
+ synchronized (Win32GraphicsEnvironment.class) {
+ GraphicsEnvironment.getLocalGraphicsEnvironment();
+ if (fontsForPrinting == null) {
+ return;
+ }
+ pathName = fontsForPrinting;
+ fontsForPrinting = null;
+ }
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public Object run() {
+ File f1 = new File(pathName);
+ String[] ls = f1.list(SunFontManager.getInstance().
+ getTrueTypeFilter());
+ if (ls == null) {
+ return null;
+ }
+ for (int i=0; i <ls.length; i++ ) {
+ File fontFile = new File(f1, ls[i]);
+ registerFontWithPlatform(fontFile.getAbsolutePath());
+ }
+ return null;
+ }
+ });
+ }
+
+ protected static native void registerFontWithPlatform(String fontName);
+
+ protected static native void deRegisterFontWithPlatform(String fontName);
+
+}
diff --git a/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java b/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
index 69723c1..e15575d 100644
--- a/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
+++ b/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
@@ -43,6 +43,8 @@
import sun.awt.windows.WPrinterJob;
import sun.awt.windows.WToolkit;
import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
import sun.java2d.SunGraphicsEnvironment;
import sun.java2d.SurfaceManagerFactory;
import sun.java2d.WindowsSurfaceManagerFactory;
@@ -68,7 +70,6 @@
// setup flags before initializing native layer
WindowsFlags.initFlags();
initDisplayWrapper();
- eudcFontFileName = getEUDCFontFile();
// Install correct surface manager factory.
SurfaceManagerFactory.setInstance(new WindowsSurfaceManagerFactory());
@@ -211,14 +212,6 @@
* ----END DISPLAY CHANGE SUPPORT----
*/
- /* Used on Windows to obtain from the windows registry the name
- * of a file containing the system EUFC font. If running in one of
- * the locales for which this applies, and one is defined, the font
- * defined by this file is appended to all composite fonts as a
- * fallback component.
- */
- private static native String getEUDCFontFile();
-
/**
* Whether registerFontFile expects absolute or relative
* font file names.
@@ -227,114 +220,6 @@
return false;
}
- /* Unlike the shared code version, this expects a base file name -
- * not a full path name.
- * The font configuration file has base file names and the FontConfiguration
- * class reports these back to the GraphicsEnvironment, so these
- * are the componentFileNames of CompositeFonts.
- */
- protected void registerFontFile(String fontFileName, String[] nativeNames,
- int fontRank, boolean defer) {
-
- // REMIND: case compare depends on platform
- if (registeredFontFiles.contains(fontFileName)) {
- return;
- }
- registeredFontFiles.add(fontFileName);
-
- int fontFormat;
- if (ttFilter.accept(null, fontFileName)) {
- fontFormat = FontManager.FONTFORMAT_TRUETYPE;
- } else if (t1Filter.accept(null, fontFileName)) {
- fontFormat = FontManager.FONTFORMAT_TYPE1;
- } else {
- /* on windows we don't use/register native fonts */
- return;
- }
-
- if (fontPath == null) {
- fontPath = getPlatformFontPath(noType1Font);
- }
-
- /* Look in the JRE font directory first.
- * This is playing it safe as we would want to find fonts in the
- * JRE font directory ahead of those in the system directory
- */
- String tmpFontPath = jreFontDirName+File.pathSeparator+fontPath;
- StringTokenizer parser = new StringTokenizer(tmpFontPath,
- File.pathSeparator);
-
- boolean found = false;
- try {
- while (!found && parser.hasMoreTokens()) {
- String newPath = parser.nextToken();
- boolean ujr = newPath.equals(jreFontDirName);
- File theFile = new File(newPath, fontFileName);
- if (theFile.canRead()) {
- found = true;
- String path = theFile.getAbsolutePath();
- if (defer) {
- FontManager.registerDeferredFont(fontFileName, path,
- nativeNames,
- fontFormat, ujr,
- fontRank);
- } else {
- FontManager.registerFontFile(path, nativeNames,
- fontFormat, ujr,
- fontRank);
- }
- break;
- }
- }
- } catch (NoSuchElementException e) {
- System.err.println(e);
- }
- if (!found) {
- addToMissingFontFileList(fontFileName);
- }
- }
-
- /* register only TrueType/OpenType fonts
- * Because these need to be registed just for use when printing,
- * we defer the actual registration and the static initialiser
- * for the printing class makes the call to registerJREFontsForPrinting()
- */
- static String fontsForPrinting = null;
- protected void registerJREFontsWithPlatform(String pathName) {
- fontsForPrinting = pathName;
- }
-
- public static void registerJREFontsForPrinting() {
- final String pathName;
- synchronized (Win32GraphicsEnvironment.class) {
- GraphicsEnvironment.getLocalGraphicsEnvironment();
- if (fontsForPrinting == null) {
- return;
- }
- pathName = fontsForPrinting;
- fontsForPrinting = null;
- }
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public Object run() {
- File f1 = new File(pathName);
- String[] ls = f1.list(new TTFilter());
- if (ls == null) {
- return null;
- }
- for (int i=0; i <ls.length; i++ ) {
- File fontFile = new File(f1, ls[i]);
- registerFontWithPlatform(fontFile.getAbsolutePath());
- }
- return null;
- }
- });
- }
-
- protected static native void registerFontWithPlatform(String fontName);
-
- protected static native void deRegisterFontWithPlatform(String fontName);
-
protected GraphicsDevice makeScreenDevice(int screennum) {
GraphicsDevice device = null;
if (WindowsFlags.isD3DEnabled()) {
@@ -348,7 +233,7 @@
// Implements SunGraphicsEnvironment.createFontConfiguration.
protected FontConfiguration createFontConfiguration() {
- FontConfiguration fc = new WFontConfiguration(this);
+ FontConfiguration fc = new WFontConfiguration(SunFontManager.getInstance());
fc.init();
return fc;
}
@@ -356,7 +241,12 @@
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
boolean preferPropFonts) {
- return new WFontConfiguration(this, preferLocaleFonts,preferPropFonts);
+ return new WFontConfiguration(SunFontManager.getInstance(),
+ preferLocaleFonts,preferPropFonts);
+ }
+
+ public boolean isDisplayLocal() {
+ return true;
}
@Override
@@ -394,11 +284,6 @@
isDWMCompositionEnabled = enabled;
}
- @Override
- public boolean isDisplayLocal() {
- return true;
- }
-
/**
* Used to find out if the OS is Windows Vista or later.
*
diff --git a/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java b/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
index c1efb0d..36636ae 100644
--- a/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
+++ b/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
@@ -922,7 +922,7 @@
// Dispose the HICON
private static native void disposeIcon(long hIcon);
- public static native int[] getFileChooserBitmapBits();
+ static native int[] getStandardViewButton0(int iconIndex);
// Should be called from the COM thread
private long getIShellIcon() {
@@ -933,34 +933,6 @@
return pIShellIcon;
}
-
- static int[] fileChooserBitmapBits = null;
- static Image[] fileChooserIcons = new Image[47];
-
- static Image getFileChooserIcon(int i) {
- if (fileChooserIcons[i] != null) {
- return fileChooserIcons[i];
- } else {
- if (fileChooserBitmapBits == null) {
- fileChooserBitmapBits = getFileChooserBitmapBits();
- }
- if (fileChooserBitmapBits != null) {
- int nImages = fileChooserBitmapBits.length / (16*16);
- int[] bitmapBits = new int[16 * 16];
- for (int y = 0; y < 16; y++) {
- for (int x = 0; x < 16; x++) {
- bitmapBits[y * 16 + x] = fileChooserBitmapBits[y * (nImages * 16) + (i * 16) + x];
- }
- }
- BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
- img.setRGB(0, 0, 16, 16, bitmapBits, 0, 16);
- fileChooserIcons[i] = img;
- }
- }
- return fileChooserIcons[i];
- }
-
-
private static Image makeIcon(long hIcon, boolean getLargeIcon) {
if (hIcon != 0L && hIcon != -1L) {
// Get the bits. This has the side effect of setting the imageHash value for this object.
diff --git a/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java b/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
index 8b692fa..97cc532 100644
--- a/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
+++ b/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
@@ -25,7 +25,8 @@
package sun.awt.shell;
-import java.awt.Toolkit;
+import java.awt.*;
+import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileNotFoundException;
@@ -33,6 +34,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.*;
+import java.util.List;
import java.util.concurrent.*;
import sun.security.action.LoadLibraryAction;
@@ -98,6 +100,29 @@
return parent;
}
+ private static final int VIEW_LIST = 2;
+ private static final int VIEW_DETAILS = 3;
+ private static final int VIEW_PARENTFOLDER = 8;
+ private static final int VIEW_NEWFOLDER = 11;
+
+ private static final Image[] STANDARD_VIEW_BUTTONS = new Image[12];
+
+ private static Image getStandardViewButton(int iconIndex) {
+ Image result = STANDARD_VIEW_BUTTONS[iconIndex];
+
+ if (result != null) {
+ return result;
+ }
+
+ BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
+
+ img.setRGB(0, 0, 16, 16, Win32ShellFolder2.getStandardViewButton0(iconIndex), 0, 16);
+
+ STANDARD_VIEW_BUTTONS[iconIndex] = img;
+
+ return img;
+ }
+
// Special folders
private static Win32ShellFolder2 desktop;
private static Win32ShellFolder2 drives;
@@ -105,12 +130,6 @@
private static Win32ShellFolder2 network;
private static Win32ShellFolder2 personal;
- private static final boolean USE_SHELL32_ICONS = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
- public Boolean run() {
- return OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_XP) >= 0;
- }
- });
-
static Win32ShellFolder2 getDesktop() {
if (desktop == null) {
try {
@@ -206,9 +225,9 @@
* folders, such as Desktop, Documents, History, Network, Home, etc.
* This is used in the shortcut panel of the filechooser on Windows 2000
* and Windows Me.
- * "fileChooserIcon nn":
- * Returns an <code>Image</code> - icon nn from resource 216 in shell32.dll,
- * or if not found there from resource 124 in comctl32.dll (Windows only).
+ * "fileChooserIcon <icon>":
+ * Returns an <code>Image</code> - icon can be ListView, DetailsView, UpFolder, NewFolder or
+ * ViewMenu (Windows only).
* "optionPaneIcon iconName":
* Returns an <code>Image</code> - icon from the system icon list
*
@@ -303,26 +322,23 @@
}
return folders.toArray(new File[folders.size()]);
} else if (key.startsWith("fileChooserIcon ")) {
- int i = -1;
- String name = key.substring(key.indexOf(" ")+1);
- try {
- i = Integer.parseInt(name);
- } catch (NumberFormatException ex) {
- if (name.equals("ListView")) {
- i = (USE_SHELL32_ICONS) ? 21 : 2;
- } else if (name.equals("DetailsView")) {
- i = (USE_SHELL32_ICONS) ? 23 : 3;
- } else if (name.equals("UpFolder")) {
- i = (USE_SHELL32_ICONS) ? 28 : 8;
- } else if (name.equals("NewFolder")) {
- i = (USE_SHELL32_ICONS) ? 31 : 11;
- } else if (name.equals("ViewMenu")) {
- i = (USE_SHELL32_ICONS) ? 21 : 2;
- }
+ String name = key.substring(key.indexOf(" ") + 1);
+
+ int iconIndex;
+
+ if (name.equals("ListView") || name.equals("ViewMenu")) {
+ iconIndex = VIEW_LIST;
+ } else if (name.equals("DetailsView")) {
+ iconIndex = VIEW_DETAILS;
+ } else if (name.equals("UpFolder")) {
+ iconIndex = VIEW_PARENTFOLDER;
+ } else if (name.equals("NewFolder")) {
+ iconIndex = VIEW_NEWFOLDER;
+ } else {
+ return null;
}
- if (i >= 0) {
- return Win32ShellFolder2.getFileChooserIcon(i);
- }
+
+ return getStandardViewButton(iconIndex);
} else if (key.startsWith("optionPaneIcon ")) {
Win32ShellFolder2.SystemIcon iconType;
if (key == "optionPaneIcon Error") {
diff --git a/src/windows/classes/sun/awt/windows/WComponentPeer.java b/src/windows/classes/sun/awt/windows/WComponentPeer.java
index 04b3e99..4b73c2e 100644
--- a/src/windows/classes/sun/awt/windows/WComponentPeer.java
+++ b/src/windows/classes/sun/awt/windows/WComponentPeer.java
@@ -59,8 +59,7 @@
import java.awt.dnd.peer.DropTargetPeer;
import sun.awt.ComponentAccessor;
-import java.util.logging.*;
-
+import sun.util.logging.PlatformLogger;
public abstract class WComponentPeer extends WObjectPeer
implements ComponentPeer, DropTargetPeer
@@ -70,9 +69,9 @@
*/
protected volatile long hwnd;
- private static final Logger log = Logger.getLogger("sun.awt.windows.WComponentPeer");
- private static final Logger shapeLog = Logger.getLogger("sun.awt.windows.shape.WComponentPeer");
- private static final Logger focusLog = Logger.getLogger("sun.awt.windows.focus.WComponentPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WComponentPeer");
+ private static final PlatformLogger shapeLog = PlatformLogger.getLogger("sun.awt.windows.shape.WComponentPeer");
+ private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.windows.focus.WComponentPeer");
// ComponentPeer implementation
SurfaceData surfaceData;
@@ -178,10 +177,10 @@
void dynamicallyLayoutContainer() {
// If we got the WM_SIZING, this must be a Container, right?
// In fact, it must be the top-level Container.
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
Container parent = WToolkit.getNativeContainer((Component)target);
if (parent != null) {
- log.log(Level.FINE, "Assertion (parent == null) failed");
+ log.fine("Assertion (parent == null) failed");
}
}
final Container cont = (Container)target;
@@ -283,14 +282,14 @@
paintArea.add(r, e.getID());
}
- if (log.isLoggable(Level.FINEST)) {
+ if (log.isLoggable(PlatformLogger.FINEST)) {
switch(e.getID()) {
case PaintEvent.UPDATE:
- log.log(Level.FINEST, "coalescePaintEvent: UPDATE: add: x = " +
+ log.finest("coalescePaintEvent: UPDATE: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
case PaintEvent.PAINT:
- log.log(Level.FINEST, "coalescePaintEvent: PAINT: add: x = " +
+ log.finest("coalescePaintEvent: PAINT: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
}
@@ -360,7 +359,7 @@
}
void handleJavaFocusEvent(FocusEvent fe) {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer(fe.toString());
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(fe.toString());
setFocus(fe.getID() == FocusEvent.FOCUS_GAINED);
}
@@ -641,7 +640,7 @@
case WKeyboardFocusManagerPeer.SNFH_FAILURE:
return false;
case WKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
- if (focusLog.isLoggable(Level.FINER)) {
+ if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target);
}
Window parentWindow = SunToolkit.getContainingWindow((Component)target);
@@ -654,7 +653,7 @@
}
boolean res = wpeer.requestWindowFocus(cause);
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Requested window focus: " + res);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Requested window focus: " + res);
// If parent window can be made focused and has been made focused(synchronously)
// then we can proceed with children, otherwise we retreat.
if (!(res && parentWindow.isFocused())) {
@@ -674,7 +673,7 @@
}
private boolean rejectFocusRequestHelper(String logMsg) {
- if (focusLog.isLoggable(Level.FINER)) focusLog.finer(logMsg);
+ if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg);
WKeyboardFocusManagerPeer.removeLastFocusRequest((Component)target);
return false;
}
@@ -1017,7 +1016,7 @@
* @since 1.7
*/
public void applyShape(Region shape) {
- if (shapeLog.isLoggable(Level.FINER)) {
+ if (shapeLog.isLoggable(PlatformLogger.FINER)) {
shapeLog.finer(
"*** INFO: Setting shape: PEER: " + this
+ "; TARGET: " + target
diff --git a/src/windows/classes/sun/awt/windows/WDesktopProperties.java b/src/windows/classes/sun/awt/windows/WDesktopProperties.java
index 3ef6119..3310fcb 100644
--- a/src/windows/classes/sun/awt/windows/WDesktopProperties.java
+++ b/src/windows/classes/sun/awt/windows/WDesktopProperties.java
@@ -34,8 +34,7 @@
import java.util.HashMap;
import java.util.Map;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit;
@@ -54,7 +53,7 @@
* itself when running on a Windows platform.
*/
class WDesktopProperties {
- private static final Logger log = Logger.getLogger("sun.awt.windows.WDesktopProperties");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WDesktopProperties");
private static final String PREFIX = "win.";
private static final String FILE_PREFIX = "awt.file.";
private static final String PROP_NAMES = "win.propNames";
@@ -111,7 +110,7 @@
*/
private synchronized void setBooleanProperty(String key, boolean value) {
assert( key != null );
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + String.valueOf(value));
}
map.put(key, Boolean.valueOf(value));
@@ -122,7 +121,7 @@
*/
private synchronized void setIntegerProperty(String key, int value) {
assert( key != null );
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + String.valueOf(value));
}
map.put(key, Integer.valueOf(value));
@@ -133,7 +132,7 @@
*/
private synchronized void setStringProperty(String key, String value) {
assert( key != null );
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + value);
}
map.put(key, value);
@@ -145,7 +144,7 @@
private synchronized void setColorProperty(String key, int r, int g, int b) {
assert( key != null && r <= 255 && g <=255 && b <= 255 );
Color color = new Color(r, g, b);
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + color);
}
map.put(key, color);
@@ -173,14 +172,14 @@
name = mappedName;
}
Font font = new Font(name, style, size);
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + font);
}
map.put(key, font);
String sizeKey = key + ".height";
Integer iSize = Integer.valueOf(size);
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(sizeKey + "=" + iSize);
}
map.put(sizeKey, iSize);
@@ -193,7 +192,7 @@
assert( key != null && winEventName != null );
Runnable soundRunnable = new WinPlaySound(winEventName);
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
log.fine(key + "=" + soundRunnable);
}
map.put(key, soundRunnable);
diff --git a/src/windows/classes/sun/awt/windows/WFontConfiguration.java b/src/windows/classes/sun/awt/windows/WFontConfiguration.java
index 2c7b001..8a9fbbb 100644
--- a/src/windows/classes/sun/awt/windows/WFontConfiguration.java
+++ b/src/windows/classes/sun/awt/windows/WFontConfiguration.java
@@ -29,6 +29,8 @@
import java.util.Hashtable;
import sun.awt.FontDescriptor;
import sun.awt.FontConfiguration;
+import sun.font.FontManager;
+import sun.font.SunFontManager;
import sun.java2d.SunGraphicsEnvironment;
import java.nio.charset.*;
@@ -37,16 +39,16 @@
// whether compatibility fallbacks for TimesRoman and Co. are used
private boolean useCompatibilityFallbacks;
- public WFontConfiguration(SunGraphicsEnvironment environment) {
- super(environment);
+ public WFontConfiguration(SunFontManager fm) {
+ super(fm);
useCompatibilityFallbacks = "windows-1252".equals(encoding);
initTables(encoding);
}
- public WFontConfiguration(SunGraphicsEnvironment environment,
+ public WFontConfiguration(SunFontManager fm,
boolean preferLocaleFonts,
boolean preferPropFonts) {
- super(environment, preferLocaleFonts, preferPropFonts);
+ super(fm, preferLocaleFonts, preferPropFonts);
useCompatibilityFallbacks = "windows-1252".equals(encoding);
}
diff --git a/src/windows/classes/sun/awt/windows/WMenuItemPeer.java b/src/windows/classes/sun/awt/windows/WMenuItemPeer.java
index 7080de4..671df53 100644
--- a/src/windows/classes/sun/awt/windows/WMenuItemPeer.java
+++ b/src/windows/classes/sun/awt/windows/WMenuItemPeer.java
@@ -31,11 +31,10 @@
import java.awt.event.ActionEvent;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import sun.util.logging.PlatformLogger;
class WMenuItemPeer extends WObjectPeer implements MenuItemPeer {
- private static final Logger log = Logger.getLogger("sun.awt.windows.WMenuItemPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.WMenuItemPeer");
static {
initIDs();
@@ -166,8 +165,8 @@
ResourceBundle rb = ResourceBundle.getBundle("sun.awt.windows.awtLocalization");
return Font.decode(rb.getString("menuFont"));
} catch (MissingResourceException e) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e);
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e);
}
return new Font("SanSerif", Font.PLAIN, 11);
}
diff --git a/src/windows/classes/sun/awt/windows/WPanelPeer.java b/src/windows/classes/sun/awt/windows/WPanelPeer.java
index 4f38013..95ea1d7 100644
--- a/src/windows/classes/sun/awt/windows/WPanelPeer.java
+++ b/src/windows/classes/sun/awt/windows/WPanelPeer.java
@@ -30,7 +30,6 @@
import java.util.Vector;
import sun.awt.SunGraphicsCallback;
-import java.util.logging.*;
class WPanelPeer extends WCanvasPeer implements PanelPeer {
diff --git a/src/windows/classes/sun/awt/windows/WPathGraphics.java b/src/windows/classes/sun/awt/windows/WPathGraphics.java
index ffcead1..2b48238 100644
--- a/src/windows/classes/sun/awt/windows/WPathGraphics.java
+++ b/src/windows/classes/sun/awt/windows/WPathGraphics.java
@@ -64,7 +64,7 @@
import sun.font.CharToGlyphMapper;
import sun.font.CompositeFont;
import sun.font.Font2D;
-import sun.font.FontManager;
+import sun.font.FontUtilities;
import sun.font.PhysicalFont;
import sun.font.TrueTypeFont;
@@ -119,6 +119,7 @@
* this graphics context.
* @since JDK1.0
*/
+ @Override
public Graphics create() {
return new WPathGraphics((Graphics2D) getDelegate().create(),
@@ -143,6 +144,7 @@
* @see #setClip
* @see #setComposite
*/
+ @Override
public void draw(Shape s) {
Stroke stroke = getStroke();
@@ -250,10 +252,12 @@
* @see java.awt.Graphics#drawChars
* @since JDK1.0
*/
+ @Override
public void drawString(String str, int x, int y) {
drawString(str, (float) x, (float) y);
}
+ @Override
public void drawString(String str, float x, float y) {
drawString(str, x, y, getFont(), getFontRenderContext(), 0f);
}
@@ -270,6 +274,7 @@
* the default render context (as canDrawStringToWidth() will return
* false. That is why it ignores the frc and width arguments.
*/
+ @Override
protected int platformFontCount(Font font, String str) {
AffineTransform deviceTransform = getTransform();
@@ -294,7 +299,7 @@
* fail that case. Just do a quick check whether its a TrueTypeFont
* - ie not a Type1 font etc, and let drawString() resolve the rest.
*/
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
if (font2D instanceof CompositeFont ||
font2D instanceof TrueTypeFont) {
return 1;
@@ -320,14 +325,14 @@
*/
private boolean strNeedsTextLayout(String str, Font font) {
char[] chars = str.toCharArray();
- boolean isComplex = FontManager.isComplexText(chars, 0, chars.length);
+ boolean isComplex = FontUtilities.isComplexText(chars, 0, chars.length);
if (!isComplex) {
return false;
} else if (!useGDITextLayout) {
return true;
} else {
if (preferGDITextLayout ||
- (isXP() && FontManager.textLayoutIsCompatible(font))) {
+ (isXP() && FontUtilities.textLayoutIsCompatible(font))) {
return false;
} else {
return true;
@@ -388,6 +393,7 @@
* @see #setComposite
* @see #setClip
*/
+ @Override
public void drawString(String str, float x, float y,
Font font, FontRenderContext frc, float targetW) {
if (str.length() == 0) {
@@ -498,7 +504,7 @@
float awScale = getAwScale(scaleFactorX, scaleFactorY);
int iangle = getAngle(ptx);
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
if (font2D instanceof TrueTypeFont) {
textOut(str, font, (TrueTypeFont)font2D, frc,
scaledFontSizeY, iangle, awScale,
@@ -549,6 +555,7 @@
/** return true if the Graphics instance can directly print
* this glyphvector
*/
+ @Override
protected boolean printGlyphVector(GlyphVector gv, float x, float y) {
/* We don't want to try to handle per-glyph transforms. GDI can't
* handle per-glyph rotations, etc. There's no way to express it
@@ -693,7 +700,7 @@
glyphAdvPos, 0, //destination
glyphPos.length/2); //num points
- Font2D font2D = FontManager.getFont2D(font);
+ Font2D font2D = FontUtilities.getFont2D(font);
if (font2D instanceof TrueTypeFont) {
String family = font2D.getFamilyName(null);
int style = font.getStyle() | font2D.getStyle();
@@ -792,7 +799,7 @@
char[] chars = str.toCharArray();
int len = chars.length;
GlyphVector gv = null;
- if (!FontManager.isComplexText(chars, 0, len)) {
+ if (!FontUtilities.isComplexText(chars, 0, len)) {
gv = font.createGlyphVector(frc, str);
}
if (gv == null) {
diff --git a/src/windows/classes/sun/awt/windows/WPrinterJob.java b/src/windows/classes/sun/awt/windows/WPrinterJob.java
index 128f10f..674716c 100644
--- a/src/windows/classes/sun/awt/windows/WPrinterJob.java
+++ b/src/windows/classes/sun/awt/windows/WPrinterJob.java
@@ -98,6 +98,8 @@
import javax.print.attribute.Size2DSyntax;
import javax.print.StreamPrintService;
+import sun.awt.Win32FontManager;
+
import sun.print.RasterPrinterJob;
import sun.print.SunAlternateMedia;
import sun.print.SunPageSelection;
@@ -359,7 +361,7 @@
initIDs();
- Win32GraphicsEnvironment.registerJREFontsForPrinting();
+ Win32FontManager.registerJREFontsForPrinting();
}
/* Constructors */
diff --git a/src/windows/classes/sun/awt/windows/WScrollPanePeer.java b/src/windows/classes/sun/awt/windows/WScrollPanePeer.java
index 2e8c5e6..189d344 100644
--- a/src/windows/classes/sun/awt/windows/WScrollPanePeer.java
+++ b/src/windows/classes/sun/awt/windows/WScrollPanePeer.java
@@ -29,11 +29,11 @@
import java.awt.peer.ScrollPanePeer;
import sun.awt.PeerEvent;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
- private static final Logger log = Logger.getLogger("sun.awt.windows.WScrollPanePeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WScrollPanePeer");
int scrollbarWidth;
int scrollbarHeight;
@@ -159,8 +159,8 @@
}
public PeerEvent coalesceEvents(PeerEvent newEvent) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "ScrollEvent coalesced: " + newEvent);
+ if (log.isLoggable(PlatformLogger.FINEST)) {
+ log.finest("ScrollEvent coalesced: " + newEvent);
}
if (newEvent instanceof ScrollEvent) {
return newEvent;
@@ -204,8 +204,8 @@
} else if (orient == Adjustable.HORIZONTAL) {
adj = (ScrollPaneAdjustable)sp.getHAdjustable();
} else {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Assertion failed: unknown orient");
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Assertion failed: unknown orient");
}
}
@@ -231,8 +231,8 @@
newpos = this.pos;
break;
default:
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Assertion failed: unknown type");
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Assertion failed: unknown type");
}
return;
}
@@ -258,10 +258,10 @@
{
hwAncestor = hwAncestor.getParent();
}
- if (log.isLoggable(Level.FINE)) {
+ if (log.isLoggable(PlatformLogger.FINE)) {
if (hwAncestor == null) {
- log.log(Level.FINE, "Assertion (hwAncestor != null) failed, " +
- "couldn't find heavyweight ancestor of scroll pane child");
+ log.fine("Assertion (hwAncestor != null) failed, " +
+ "couldn't find heavyweight ancestor of scroll pane child");
}
}
WComponentPeer hwPeer = (WComponentPeer)hwAncestor.getPeer();
diff --git a/src/windows/classes/sun/awt/windows/WToolkit.java b/src/windows/classes/sun/awt/windows/WToolkit.java
index 9fcf3d6..465c8ef 100644
--- a/src/windows/classes/sun/awt/windows/WToolkit.java
+++ b/src/windows/classes/sun/awt/windows/WToolkit.java
@@ -58,13 +58,15 @@
import java.util.Map;
import java.util.Properties;
-import java.util.logging.*;
-
+import sun.font.FontManager;
+import sun.font.FontManagerFactory;
+import sun.font.SunFontManager;
import sun.misc.PerformanceLogger;
+import sun.util.logging.PlatformLogger;
public class WToolkit extends SunToolkit implements Runnable {
- private static final Logger log = Logger.getLogger("sun.awt.windows.WToolkit");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WToolkit");
static GraphicsConfiguration config;
@@ -107,8 +109,8 @@
initIDs();
// Print out which version of Windows is running
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "Win version: " + getWindowsVersion());
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine("Win version: " + getWindowsVersion());
}
java.security.AccessController.doPrivileged(
@@ -572,8 +574,11 @@
public FontMetrics getFontMetrics(Font font) {
- // REMIND: platform font flag should be removed post-merlin.
- if (sun.font.FontManager.usePlatformFontMetrics()) {
+ // This is an unsupported hack, but left in for a customer.
+ // Do not remove.
+ FontManager fm = FontManagerFactory.getInstance();
+ if (fm instanceof SunFontManager
+ && ((SunFontManager) fm).usePlatformFontMetrics()) {
return WFontMetrics.getFontMetrics(font);
}
return super.getFontMetrics(font);
@@ -824,10 +829,10 @@
lazilyInitWProps();
Boolean prop = (Boolean) desktopProperties.get("awt.dynamicLayoutSupported");
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "In WTK.isDynamicLayoutSupported()" +
- " nativeDynamic == " + nativeDynamic +
- " wprops.dynamic == " + prop);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("In WTK.isDynamicLayoutSupported()" +
+ " nativeDynamic == " + nativeDynamic +
+ " wprops.dynamic == " + prop);
}
if ((prop == null) || (nativeDynamic != prop.booleanValue())) {
@@ -862,8 +867,8 @@
Map<String, Object> props = wprops.getProperties();
for (String propName : props.keySet()) {
Object val = props.get(propName);
- if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "changed " + propName + " to " + val);
+ if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("changed " + propName + " to " + val);
}
setDesktopProperty(propName, val);
}
diff --git a/src/windows/classes/sun/awt/windows/WWindowPeer.java b/src/windows/classes/sun/awt/windows/WWindowPeer.java
index fbb7442..009593a 100644
--- a/src/windows/classes/sun/awt/windows/WWindowPeer.java
+++ b/src/windows/classes/sun/awt/windows/WWindowPeer.java
@@ -35,7 +35,7 @@
import java.util.*;
import java.util.List;
-import java.util.logging.*;
+import sun.util.logging.PlatformLogger;
import sun.awt.*;
@@ -45,8 +45,8 @@
DisplayChangedListener
{
- private static final Logger log = Logger.getLogger("sun.awt.windows.WWindowPeer");
- private static final Logger screenLog = Logger.getLogger("sun.awt.windows.screen.WWindowPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.windows.WWindowPeer");
+ private static final PlatformLogger screenLog = PlatformLogger.getLogger("sun.awt.windows.screen.WWindowPeer");
// we can't use WDialogPeer as blocker may be an instance of WPrintDialogPeer that
// extends WWindowPeer, not WDialogPeer
@@ -440,8 +440,8 @@
public void updateGC() {
int scrn = getScreenImOn();
- if (screenLog.isLoggable(Level.FINER)) {
- log.log(Level.FINER, "Screen number: " + scrn);
+ if (screenLog.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Screen number: " + scrn);
}
// get current GD
@@ -465,9 +465,9 @@
// is now mostly on.
winGraphicsConfig = (Win32GraphicsConfig)newDev
.getDefaultConfiguration();
- if (screenLog.isLoggable(Level.FINE)) {
+ if (screenLog.isLoggable(PlatformLogger.FINE)) {
if (winGraphicsConfig == null) {
- screenLog.log(Level.FINE, "Assertion (winGraphicsConfig != null) failed");
+ screenLog.fine("Assertion (winGraphicsConfig != null) failed");
}
}
@@ -700,9 +700,8 @@
TranslucentWindowPainter currentPainter = painter;
if (currentPainter != null) {
currentPainter.updateWindow(repaint);
- } else if (log.isLoggable(Level.FINER)) {
- log.log(Level.FINER,
- "Translucent window painter is null in updateWindow");
+ } else if (log.isLoggable(PlatformLogger.FINER)) {
+ log.finer("Translucent window painter is null in updateWindow");
}
}
}
@@ -736,8 +735,8 @@
public void propertyChange(PropertyChangeEvent e) {
boolean isDisposed = (Boolean)e.getNewValue();
if (isDisposed != true) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, " Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
+ if (log.isLoggable(PlatformLogger.FINE)) {
+ log.fine(" Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
}
}
AppContext appContext = AppContext.getAppContext();
diff --git a/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java b/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java
index df77348..478648b 100644
--- a/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java
+++ b/src/windows/classes/sun/nio/fs/WindowsDirectoryStream.java
@@ -179,7 +179,7 @@
synchronized (closeLock) {
if (!isOpen)
throwAsConcurrentModificationException(new
- IllegalStateException("Directory stream is closed"));
+ ClosedDirectoryStreamException());
try {
name = FindNextFile(handle, findDataBuffer.address());
if (name == null) {
@@ -236,7 +236,8 @@
@Override
public void remove() {
if (!isOpen) {
- throw new IllegalStateException("Directory stream is closed");
+ throwAsConcurrentModificationException(new
+ ClosedDirectoryStreamException());
}
Path entry;
synchronized (this) {
diff --git a/src/windows/native/sun/font/fontpath.c b/src/windows/native/sun/font/fontpath.c
index 2fd3c3a..2ed94b9 100644
--- a/src/windows/native/sun/font/fontpath.c
+++ b/src/windows/native/sun/font/fontpath.c
@@ -28,12 +28,12 @@
#include <jni.h>
#include <jni_util.h>
-#include <sun_font_FontManager.h>
+#include <sun_awt_Win32FontManager.h>
#define BSIZE (max(512, MAX_PATH+1))
-JNIEXPORT jstring JNICALL Java_sun_font_FontManager_getFontPath(JNIEnv *env, jclass obj, jboolean noType1)
+JNIEXPORT jstring JNICALL Java_sun_awt_Win32FontManager_getFontPath(JNIEnv *env, jobject thiz, jboolean noType1)
{
char windir[BSIZE];
char sysdir[BSIZE];
@@ -68,15 +68,6 @@
return JNU_NewStringPlatform(env, fontpath);
}
-/* This isn't used on windows, the implementation is added in case shared
- * code accidentally calls this method to prevent an UnsatisfiedLinkError
- */
-JNIEXPORT void JNICALL Java_sun_font_FontManager_setNativeFontPath
-(JNIEnv *env, jclass obj, jstring theString)
-{
- return;
-}
-
/* The code below is used to obtain information from the windows font APIS
* and registry on which fonts are available and what font files hold those
* fonts. The results are used to speed font lookup.
@@ -546,7 +537,7 @@
* use it for lookups to reduce or avoid the need to search font files.
*/
JNIEXPORT void JNICALL
-Java_sun_font_FontManager_populateFontFileNameMap
+Java_sun_awt_Win32FontManager_populateFontFileNameMap0
(JNIEnv *env, jclass obj, jobject fontToFileMap,
jobject fontToFamilyMap, jobject familyToFontListMap, jobject locale)
{
diff --git a/src/windows/native/sun/windows/ShellFolder2.cpp b/src/windows/native/sun/windows/ShellFolder2.cpp
index 64eea69..353e47c 100644
--- a/src/windows/native/sun/windows/ShellFolder2.cpp
+++ b/src/windows/native/sun/windows/ShellFolder2.cpp
@@ -256,7 +256,6 @@
static IShellIcon* getIShellIcon(IShellFolder* pIShellFolder) {
// http://msdn.microsoft.com/library/en-us/shellcc/platform/Shell/programmersguide/shell_int/shell_int_programming/std_ifaces.asp
HRESULT hres;
- HICON hIcon = NULL;
IShellIcon* pIShellIcon;
if (pIShellFolder != NULL) {
hres = pIShellFolder->QueryInterface(IID_IShellIcon, (void**)&pIShellIcon);
@@ -965,89 +964,40 @@
/*
* Class: sun_awt_shell_Win32ShellFolder2
- * Method: getFileChooserBitmapBits
- * Signature: ()[I
+ * Method: getStandardViewButton0
+ * Signature: (I)[I
*/
-JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getFileChooserBitmapBits
- (JNIEnv* env, jclass cls)
+JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getStandardViewButton0
+ (JNIEnv* env, jclass cls, jint iconIndex)
{
- HBITMAP hBitmap = NULL;
- BITMAP bm;
- HINSTANCE libComCtl32;
- HINSTANCE libShell32;
+ jintArray result = NULL;
- libShell32 = LoadLibrary(TEXT("shell32.dll"));
- if (libShell32 != NULL) {
- hBitmap = (HBITMAP)LoadImage(libShell32,
- IS_WINVISTA ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216),
- IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+ // Create a toolbar
+ HWND hWndToolbar = ::CreateWindowEx(0, TOOLBARCLASSNAME, NULL,
+ 0, 0, 0, 0, 0,
+ NULL, NULL, NULL, NULL);
- if (hBitmap == NULL) {
- // version of shell32.dll doesn't match OS version.
- // So we either are in a Vista Compatibility Mode
- // or shell32.dll was copied from OS of another version
- hBitmap = (HBITMAP)LoadImage(libShell32,
- IS_WINVISTA ? MAKEINTRESOURCE(216) : TEXT("IDB_TB_SH_DEF_16"),
- IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
+ if (hWndToolbar != NULL) {
+ SendMessage(hWndToolbar, TB_LOADIMAGES, (WPARAM)IDB_VIEW_SMALL_COLOR, (LPARAM)HINST_COMMCTRL);
+
+ HIMAGELIST hImageList = (HIMAGELIST) SendMessage(hWndToolbar, TB_GETIMAGELIST, 0, 0);
+
+ if (hImageList != NULL) {
+ HICON hIcon = ImageList_GetIcon(hImageList, iconIndex, ILD_TRANSPARENT);
+
+ if (hIcon != NULL) {
+ result = Java_sun_awt_shell_Win32ShellFolder2_getIconBits(env, cls, ptr_to_jlong(hIcon), 16);
+
+ DestroyIcon(hIcon);
+ }
+
+ ImageList_Destroy(hImageList);
}
- }
- if (hBitmap == NULL) {
- libComCtl32 = LoadLibrary(TEXT("comctl32.dll"));
- if (libComCtl32 != NULL) {
- hBitmap = (HBITMAP)LoadImage(libComCtl32, MAKEINTRESOURCE(124),
- IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
- }
- }
- if (hBitmap == NULL) {
- return NULL;
+
+ DestroyWindow(hWndToolbar);
}
- GetObject(hBitmap, sizeof(bm), (LPSTR)&bm);
-
- // Get the screen DC
- HDC dc = GetDC(NULL);
- if (dc == NULL) {
- return NULL;
- }
-
- // Set up BITMAPINFO
- BITMAPINFO bmi;
- memset(&bmi, 0, sizeof(BITMAPINFO));
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bmi.bmiHeader.biWidth = bm.bmWidth;
- bmi.bmiHeader.biHeight = -bm.bmHeight;
- bmi.bmiHeader.biPlanes = 1;
- bmi.bmiHeader.biBitCount = 32;
- bmi.bmiHeader.biCompression = BI_RGB;
- // Extract the color bitmap
- int numPixels = bm.bmWidth * bm.bmHeight;
- //long colorBits[192 * 16];
- long *colorBits = (long*)safe_Malloc(numPixels * sizeof(long));
- if (GetDIBits(dc, hBitmap, 0, bm.bmHeight, colorBits, &bmi, DIB_RGB_COLORS) == 0) {
- return NULL;
- }
-
- // Release DC
- ReleaseDC(NULL, dc);
-
- // The color of the first pixel defines the transparency, according
- // to the documentation for LR_LOADTRANSPARENT at
- // http://msdn.microsoft.com/library/psdk/winui/resource_9fhi.htm
- long transparent = colorBits[0];
- for (int i=0; i < numPixels; i++) {
- if (colorBits[i] != transparent) {
- colorBits[i] |= 0xff000000;
- }
- }
-
- // Create java array
- jintArray bits = env->NewIntArray(numPixels);
- // Copy values to java array
- env->SetIntArrayRegion(bits, 0, numPixels, colorBits);
- // Fix 4745575 GDI Resource Leak
- ::DeleteObject(hBitmap);
- ::FreeLibrary(libComCtl32);
- return bits;
+ return result;
}
/*
diff --git a/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp b/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp
index 150ff8f..1842ce6 100644
--- a/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp
+++ b/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp
@@ -25,6 +25,7 @@
#include <awt.h>
#include <sun_awt_Win32GraphicsEnvironment.h>
+#include <sun_awt_Win32FontManager.h>
#include "awt_Canvas.h"
#include "awt_Win32GraphicsDevice.h"
#include "Devices.h"
@@ -173,14 +174,14 @@
}
/*
- * Class: sun_awt_Win32GraphicsEnvironment
+ * Class: sun_awt_Win32FontManager
* Method: registerFontWithPlatform
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_registerFontWithPlatform(JNIEnv *env,
- jclass cl,
- jstring fontName)
+Java_sun_awt_Win32FontManager_registerFontWithPlatform(JNIEnv *env,
+ jclass cl,
+ jstring fontName)
{
LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE);
if (file) {
@@ -191,16 +192,16 @@
/*
- * Class: sun_awt_Win32GraphicsEnvironment
+ * Class: sun_awt_Win32FontManagerEnvironment
* Method: deRegisterFontWithPlatform
* Signature: (Ljava/lang/String;)V
*
* This method intended for future use.
*/
JNIEXPORT void JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_deRegisterFontWithPlatform(JNIEnv *env,
- jclass cl,
- jstring fontName)
+Java_sun_awt_Win32FontManager_deRegisterFontWithPlatform(JNIEnv *env,
+ jclass cl,
+ jstring fontName)
{
LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE);
if (file) {
@@ -223,7 +224,7 @@
JNIEXPORT jstring JNICALL
-Java_sun_awt_Win32GraphicsEnvironment_getEUDCFontFile(JNIEnv *env, jclass cl) {
+Java_sun_awt_Win32FontManager_getEUDCFontFile(JNIEnv *env, jclass cl) {
int rc;
HKEY key;
DWORD type;
diff --git a/test/java/awt/font/TextLayout/TestSinhalaChar.java b/test/java/awt/font/TextLayout/TestSinhalaChar.java
new file mode 100644
index 0000000..9d0539d
--- /dev/null
+++ b/test/java/awt/font/TextLayout/TestSinhalaChar.java
@@ -0,0 +1,70 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+/* @test @(#)TestSinhalaChar.java
+ * @summary verify lack of crash on U+0DDD.
+ * @bug 6795060
+ */
+
+import javax.swing.*;
+import javax.swing.border.LineBorder;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+public class TestSinhalaChar {
+ public static void main(String[] args) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ new TestSinhalaChar().run();
+ }
+ });
+ }
+ public static boolean AUTOMATIC_TEST=true; // true; run test automatically, else manually at button push
+
+ private void run() {
+ JFrame frame = new JFrame("Test Character (no crash = PASS)");
+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ JPanel panel = new JPanel();
+ final JLabel label = new JLabel("(empty)");
+ label.setSize(400, 100);
+ label.setBorder(new LineBorder(Color.black));
+ label.setFont(new Font("Lucida Bright", Font.PLAIN, 12));
+ if(AUTOMATIC_TEST) { /* run the test automatically (else, manually) */
+ label.setText(Character.toString('\u0DDD'));
+ } else {
+ JButton button = new JButton("Set Char x0DDD");
+ button.addActionListener(new AbstractAction() {
+ public void actionPerformed(ActionEvent actionEvent) {
+ label.setText(Character.toString('\u0DDD'));
+ }
+ });
+ panel.add(button);
+ }
+ panel.add(label);
+
+ frame.getContentPane().add(panel);
+ frame.pack();
+ frame.setVisible(true);
+ }
+}
+
diff --git a/test/java/awt/print/PageFormat/PageFormatFromAttributes.java b/test/java/awt/print/PageFormat/PageFormatFromAttributes.java
new file mode 100644
index 0000000..e965982
--- /dev/null
+++ b/test/java/awt/print/PageFormat/PageFormatFromAttributes.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4500750 6848799
+ * @summary Tests creating page format from attributes
+ * @run main PageFormatFromAttributes
+ */
+import java.awt.print.*;
+import javax.print.*;
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+
+public class PageFormatFromAttributes {
+
+ public static void main(String args[]) {
+ PrinterJob job = PrinterJob.getPrinterJob();
+ PrintService service = job.getPrintService();
+ if (service == null) {
+ return; // No printers
+ }
+ PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
+ test(job, MediaSizeName.ISO_A4, OrientationRequested.PORTRAIT);
+ test(job, MediaSizeName.ISO_A4, OrientationRequested.LANDSCAPE);
+ test(job, MediaSizeName.ISO_A4,
+ OrientationRequested.REVERSE_LANDSCAPE);
+ test(job, MediaSizeName.ISO_A3, OrientationRequested.PORTRAIT);
+ test(job, MediaSizeName.NA_LETTER, OrientationRequested.PORTRAIT);
+ test(job, MediaSizeName.NA_LETTER, OrientationRequested.LANDSCAPE);
+ test(job, MediaSizeName.NA_LEGAL, OrientationRequested.PORTRAIT);
+ }
+
+ static void test(PrinterJob job,
+ MediaSizeName media, OrientationRequested orient) {
+
+ PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
+ aset.add(media);
+ aset.add(orient);
+
+ PrintService service = job.getPrintService();
+ if (!service.isAttributeValueSupported(media, null, aset) ||
+ !service.isAttributeValueSupported(orient, null, aset)) {
+ return; // Can't test this case.
+ }
+ PageFormat pf = job.getPageFormat(aset);
+ boolean ok = true;
+ switch (pf.getOrientation()) {
+ case PageFormat.PORTRAIT :
+ ok = orient == OrientationRequested.PORTRAIT;
+ break;
+ case PageFormat.LANDSCAPE :
+ ok = orient == OrientationRequested.LANDSCAPE;
+ break;
+ case PageFormat.REVERSE_LANDSCAPE :
+ ok = orient == OrientationRequested.REVERSE_LANDSCAPE;
+ break;
+ }
+ if (!ok) {
+ throw new RuntimeException("orientation not as specified");
+ }
+ MediaSize mediaSize = MediaSize.getMediaSizeForName(media);
+ if (mediaSize == null) {
+ throw new RuntimeException("expected a media size");
+ }
+ double units = Size2DSyntax.INCH/72.0;
+ int w = (int)(mediaSize.getX(1)/units);
+ int h = (int)(mediaSize.getY(1)/units);
+ Paper paper = pf.getPaper();
+ int pw = (int)paper.getWidth();
+ int ph = (int)paper.getHeight();
+ if (pw != w || ph != h) {
+ throw new RuntimeException("size not as specified");
+ }
+ }
+}
diff --git a/test/java/nio/file/DirectoryStream/Basic.java b/test/java/nio/file/DirectoryStream/Basic.java
index 4b5a5df..87b5c38 100644
--- a/test/java/nio/file/DirectoryStream/Basic.java
+++ b/test/java/nio/file/DirectoryStream/Basic.java
@@ -154,8 +154,10 @@
stream.close();
// test IllegalStateException
+ dir.resolve(foo).createFile();
stream = dir.newDirectoryStream();
i = stream.iterator();
+ i.next();
try {
stream.iterator();
throw new RuntimeException("IllegalStateException not thrown as expected");
@@ -172,17 +174,26 @@
throw new RuntimeException("ConcurrentModificationException not thrown as expected");
} catch (ConcurrentModificationException x) {
Throwable t = x.getCause();
- if (!(t instanceof IllegalStateException))
- throw new RuntimeException("Cause is not IllegalStateException as expected");
+ if (!(t instanceof ClosedDirectoryStreamException))
+ throw new RuntimeException("Cause is not ClosedDirectoryStreamException as expected");
}
try {
i.next();
- throw new RuntimeException("IllegalStateException not thrown as expected");
+ throw new RuntimeException("ConcurrentModificationException not thrown as expected");
} catch (ConcurrentModificationException x) {
Throwable t = x.getCause();
- if (!(t instanceof IllegalStateException))
- throw new RuntimeException("Cause is not IllegalStateException as expected");
+ if (!(t instanceof ClosedDirectoryStreamException))
+ throw new RuntimeException("Cause is not ClosedDirectoryStreamException as expected");
}
+ try {
+ i.remove();
+ throw new RuntimeException("ConcurrentModificationException not thrown as expected");
+ } catch (ConcurrentModificationException x) {
+ Throwable t = x.getCause();
+ if (!(t instanceof ClosedDirectoryStreamException))
+ throw new RuntimeException("Cause is not ClosedDirectoryStreamException as expected");
+ }
+
}
public static void main(String[] args) throws IOException {
diff --git a/test/java/nio/file/Files/ContentType.java b/test/java/nio/file/Files/ContentType.java
index fdbb901..3cea265 100644
--- a/test/java/nio/file/Files/ContentType.java
+++ b/test/java/nio/file/Files/ContentType.java
@@ -26,7 +26,7 @@
* @summary Unit test for probeContentType method
* @library ..
* @build ContentType SimpleFileTypeDetector
- * @run main ContentType
+ * @run main/othervm ContentType
*/
import java.nio.file.*;
diff --git a/test/java/nio/file/Path/CheckPermissions.java b/test/java/nio/file/Path/CheckPermissions.java
index a8aef0f..9e0f796 100644
--- a/test/java/nio/file/Path/CheckPermissions.java
+++ b/test/java/nio/file/Path/CheckPermissions.java
@@ -25,6 +25,8 @@
* @bug 6866804
* @summary Unit test for java.nio.file.Path
* @library ..
+ * @build CheckPermissions
+ * @run main/othervm CheckPermissions
*/
import java.nio.ByteBuffer;
diff --git a/test/java/nio/file/Path/CopyAndMove.java b/test/java/nio/file/Path/CopyAndMove.java
index 39ac668..5894b28 100644
--- a/test/java/nio/file/Path/CopyAndMove.java
+++ b/test/java/nio/file/Path/CopyAndMove.java
@@ -92,7 +92,6 @@
{
assertTrue(attrs1.isReadOnly() == attrs2.isReadOnly());
assertTrue(attrs1.isHidden() == attrs2.isHidden());
- assertTrue(attrs1.isArchive() == attrs2.isArchive());
assertTrue(attrs1.isSystem() == attrs2.isSystem());
}
diff --git a/test/java/util/Objects/BasicObjectsTest.java b/test/java/util/Objects/BasicObjectsTest.java
index be45b2c..f5c45f7 100644
--- a/test/java/util/Objects/BasicObjectsTest.java
+++ b/test/java/util/Objects/BasicObjectsTest.java
@@ -37,6 +37,7 @@
errors += testHashCode();
errors += testToString();
errors += testCompare();
+ errors += testNonNull();
if (errors > 0 )
throw new RuntimeException();
}
@@ -102,4 +103,53 @@
}
return errors;
}
+
+ private static int testNonNull() {
+ int errors = 0;
+ String s;
+
+ // Test 1-arg variant
+ try {
+ s = Objects.nonNull("pants");
+ if (s != "pants") {
+ System.err.printf("1-arg non-null failed to return its arg");
+ errors++;
+ }
+ } catch (NullPointerException e) {
+ System.err.printf("1-arg nonNull threw unexpected NPE");
+ errors++;
+ }
+
+ try {
+ s = Objects.nonNull(null);
+ System.err.printf("1-arg nonNull failed to throw NPE");
+ errors++;
+ } catch (NullPointerException e) {
+ // Expected
+ }
+
+ // Test 2-arg variant
+ try {
+ s = Objects.nonNull("pants", "trousers");
+ if (s != "pants") {
+ System.err.printf("2-arg nonNull failed to return its arg");
+ errors++;
+ }
+ } catch (NullPointerException e) {
+ System.err.printf("2-arg nonNull threw unexpected NPE");
+ errors++;
+ }
+
+ try {
+ s = Objects.nonNull(null, "pantaloons");
+ System.err.printf("2-arg nonNull failed to throw NPE");
+ errors++;
+ } catch (NullPointerException e) {
+ if (e.getMessage() != "pantaloons") {
+ System.err.printf("2-arg nonNull threw NPE w/ bad detail msg");
+ errors++;
+ }
+ }
+ return errors;
+ }
}
diff --git a/test/javax/swing/JComponent/4337267/bug4337267.java b/test/javax/swing/JComponent/4337267/bug4337267.java
new file mode 100644
index 0000000..a3e3f24
--- /dev/null
+++ b/test/javax/swing/JComponent/4337267/bug4337267.java
@@ -0,0 +1,254 @@
+/*
+ * @test
+ * @bug 4337267
+ * @summary test that numeric shaping works in Swing components
+ * @author Sergey Groznyh
+ * @run main bug4337267
+ */
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.font.NumericShaper;
+import java.awt.font.TextAttribute;
+import java.awt.image.BufferedImage;
+import javax.swing.BoxLayout;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
+public class bug4337267 {
+ TestJPanel p1, p2;
+ TestBufferedImage i1, i2;
+ JComponent[] printq;
+ JFrame window;
+ static boolean testFailed = false;
+ static boolean done = false;
+
+ String shaped =
+ "000 (E) 111 (A) \u0641\u0642\u0643 \u0662\u0662\u0662 (E) 333";
+ String text = "000 (E) 111 (A) \u0641\u0642\u0643 222 (E) 333";
+
+ void run() {
+ initUI();
+ testTextComponent();
+ testNonTextComponentHTML();
+ testNonTextComponentPlain();
+
+ doneTask();
+ }
+
+ void initUI() {
+ window = new JFrame("bug4337267");
+ window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ window.setSize(800, 600);
+ Component content = createContentPane();
+ window.add(content);
+ window.setVisible(true);
+ }
+
+ Runnable printComponents = new Runnable() {
+ public void run() {
+ printComponent(printq[0], i1);
+ printComponent(printq[1], i2);
+ }
+ };
+
+ Runnable compareRasters = new Runnable() {
+ public void run() {
+ assertEquals(p1.image, p2.image);
+ assertEquals(i1, i2);
+ }
+ };
+
+ void doneTask() {
+ final Object monitor = this;
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ done = true;
+ synchronized(monitor) {
+ monitor.notify();
+ }
+ }
+ });
+ }
+
+
+ void fail(String message) {
+ testFailed = true;
+ throw new RuntimeException(message);
+ }
+
+ void assertEquals(Object o1, Object o2) {
+ if ((o1 == null) && (o2 != null)) {
+ fail("Expected null, got " + o2);
+ } else if ((o1 != null) && (o2 == null)) {
+ fail("Expected " + o1 + ", got null");
+ } else if (!o1.equals(o2)) {
+ fail("Expected " + o1 + ", got " + o2);
+ }
+ }
+
+ void testTextComponent() {
+ System.out.println("testTextComponent:");
+ JTextArea area1 = new JTextArea();
+ injectComponent(p1, area1, false);
+ area1.setText(shaped);
+ JTextArea area2 = new JTextArea();
+ injectComponent(p2, area2, true);
+ area2.setText(text);
+ window.repaint();
+ printq = new JComponent[] { area1, area2 };
+ SwingUtilities.invokeLater(printComponents);
+ SwingUtilities.invokeLater(compareRasters);
+ }
+
+ void testNonTextComponentHTML() {
+ System.out.println("testNonTextComponentHTML:");
+ JLabel label1 = new JLabel();
+ injectComponent(p1, label1, false);
+ label1.setText("<html>" + shaped);
+ JLabel label2 = new JLabel();
+ injectComponent(p2, label2, true);
+ label2.setText("<html>" + text);
+ window.repaint();
+ printq = new JComponent[] { label1, label2 };
+ SwingUtilities.invokeLater(printComponents);
+ SwingUtilities.invokeLater(compareRasters);
+ }
+
+ void testNonTextComponentPlain() {
+ System.out.println("testNonTextComponentHTML:");
+ JLabel label1 = new JLabel();
+ injectComponent(p1, label1, false);
+ label1.setText(shaped);
+ JLabel label2 = new JLabel();
+ injectComponent(p2, label2, true);
+ label2.setText(text);
+ window.repaint();
+ printq = new JComponent[] { label1, label2 };
+ SwingUtilities.invokeLater(printComponents);
+ SwingUtilities.invokeLater(compareRasters);
+ }
+
+ void setShaping(JComponent c) {
+ c.putClientProperty(TextAttribute.NUMERIC_SHAPING,
+ NumericShaper.getContextualShaper(NumericShaper.ARABIC));
+ }
+
+ void injectComponent(JComponent p, JComponent c, boolean shape) {
+ if (shape) {
+ setShaping(c);
+ }
+ p.removeAll();
+ p.add(c);
+ }
+
+ void printComponent(JComponent c, TestBufferedImage i) {
+ Graphics g = i.getGraphics();
+ g.setColor(c.getBackground());
+ g.fillRect(0, 0, i.getWidth(), i.getHeight());
+ c.print(g);
+ }
+
+ Component createContentPane() {
+ Dimension size = new Dimension(500, 100);
+ i1 = new TestBufferedImage(size.width, size.height,
+ BufferedImage.TYPE_INT_ARGB);
+ i2 = new TestBufferedImage(size.width, size.height,
+ BufferedImage.TYPE_INT_ARGB);
+ p1 = new TestJPanel();
+ p1.setPreferredSize(size);
+ p2 = new TestJPanel();
+ p2.setPreferredSize(size);
+ JPanel panel = new JPanel();
+ panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+ panel.add(p1);
+ panel.add(p2);
+
+ return panel;
+ }
+
+ static class TestBufferedImage extends BufferedImage {
+ int MAX_GLITCHES = 0;
+
+ TestBufferedImage(int width, int height, int imageType) {
+ super(width, height, imageType);
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (! (other instanceof TestBufferedImage)) {
+ return false;
+ }
+ TestBufferedImage image2 = (TestBufferedImage) other;
+ int width = getWidth();
+ int height = getHeight();
+ if ((image2.getWidth() != width) || (image2.getHeight() != height)) {
+ return false;
+ }
+ int glitches = 0;
+ for (int x = 0; x < width; x++) {
+ for (int y = 0; y < height; y++) {
+ int rgb1 = getRGB(x, y);
+ int rgb2 = image2.getRGB(x, y);
+ if (rgb1 != rgb2) {
+ //System.out.println(x+" "+y+" "+rgb1+" "+rgb2);
+ glitches++;
+ }
+ }
+ }
+ return glitches <= MAX_GLITCHES;
+ }
+ }
+
+ static class TestJPanel extends JPanel {
+ TestBufferedImage image = createImage(new Dimension(1, 1));
+
+ TestBufferedImage createImage(Dimension d) {
+ return new TestBufferedImage(d.width, d.height,
+ BufferedImage.TYPE_INT_ARGB);
+ }
+
+ public void setPreferredSize(Dimension size) {
+ super.setPreferredSize(size);
+ image = createImage(size);
+ }
+
+ public void paint(Graphics g) {
+ Graphics g0 = image.getGraphics();
+ super.paint(g0);
+ g.drawImage(image, 0, 0, this);
+ }
+ }
+
+
+
+ public static void main(String[] args) throws Throwable {
+ final bug4337267 test = new bug4337267();
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ test.run();
+ }
+ });
+
+ synchronized(test) {
+ while (!done) {
+ try {
+ test.wait();
+ } catch (InterruptedException ex) {
+ // do nothing
+ }
+ }
+ }
+
+ if (testFailed) {
+ throw new RuntimeException("FAIL");
+ }
+
+ System.out.println("OK");
+ }
+}
diff --git a/test/javax/swing/JFileChooser/6489130/bug6489130.java b/test/javax/swing/JFileChooser/6489130/bug6489130.java
new file mode 100644
index 0000000..684d691
--- /dev/null
+++ b/test/javax/swing/JFileChooser/6489130/bug6489130.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6489130
+ * @summary FileChooserDemo hung by keeping pressing Enter key
+ * @author Pavel Porvatov
+ @run main bug6489130
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class bug6489130 {
+ private final JFileChooser chooser = new JFileChooser();
+
+ private static final CountDownLatch MUX = new CountDownLatch(1);
+
+ private final Timer timer = new Timer(1000, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ switch (state) {
+ case 0:
+ case 1: {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ chooser.showOpenDialog(null);
+ }
+ });
+
+ break;
+ }
+
+ case 2:
+ case 3: {
+ Window[] windows = Frame.getWindows();
+
+ if (windows.length > 0) {
+ windows[0].dispose();
+ }
+
+ break;
+ }
+
+ case 4: {
+ MUX.countDown();
+
+ break;
+ }
+ }
+
+ state++;
+ }
+ });
+
+ private int state = 0;
+
+ public static void main(String[] args) throws InterruptedException {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ new bug6489130().run();
+ }
+ });
+
+ if (!MUX.await(10, TimeUnit.SECONDS)) {
+ throw new RuntimeException("Timeout");
+ }
+ }
+
+ private void run() {
+ timer.start();
+ }
+}
diff --git a/test/javax/swing/JFileChooser/6840086/bug6840086.java b/test/javax/swing/JFileChooser/6840086/bug6840086.java
new file mode 100644
index 0000000..bdd012f
--- /dev/null
+++ b/test/javax/swing/JFileChooser/6840086/bug6840086.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ @bug 6840086
+ @summary JFileChooser lacks icons on top right when running on Windows 7
+ @author Pavel Porvatov
+ @run main bug6840086
+*/
+
+import sun.awt.OSInfo;
+import sun.awt.shell.ShellFolder;
+
+import java.awt.*;
+
+public class bug6840086 {
+ private static final String[] KEYS = {
+ "fileChooserIcon ListView",
+ "fileChooserIcon ViewMenu",
+ "fileChooserIcon DetailsView",
+ "fileChooserIcon UpFolder",
+ "fileChooserIcon NewFolder",
+ };
+
+ public static void main(String[] args) {
+ if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+ System.out.println("The test was skipped because it is sensible only for Windows.");
+
+ return;
+ }
+
+ for (String key : KEYS) {
+ Image image = (Image) ShellFolder.get(key);
+
+ if (image == null) {
+ throw new RuntimeException("The image '" + key + "' not found.");
+ }
+
+ if (image != ShellFolder.get(key)) {
+ throw new RuntimeException("The image '" + key + "' is not cached.");
+ }
+ }
+
+ System.out.println("The test passed.");
+ }
+}
diff --git a/test/javax/swing/JLayer/6875716/bug6875716.java b/test/javax/swing/JLayer/6875716/bug6875716.java
new file mode 100644
index 0000000..c59c454
--- /dev/null
+++ b/test/javax/swing/JLayer/6875716/bug6875716.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/* @test
+ * @bug 6875716
+ * @summary JLayer.remove((Component)null) should behave consistently in (not) throwing NPE
+ * @author Alexander Potochkin
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug6875716 {
+
+ public static void main(String[] args) throws Exception {
+ JLayer<Component> layer = new JLayer<Component>(new Component(){});
+ layer.setGlassPane(null);
+ try {
+ layer.remove((Component)null);
+ } catch (NullPointerException e) {
+ //this is what we expect
+ return;
+ }
+ throw new RuntimeException("Test failed");
+ }
+}
diff --git a/test/javax/swing/JMenuItem/6883341/bug6883341.java b/test/javax/swing/JMenuItem/6883341/bug6883341.java
new file mode 100644
index 0000000..9abaef9
--- /dev/null
+++ b/test/javax/swing/JMenuItem/6883341/bug6883341.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+ /*
+ * @test
+ * @bug 6883341
+ * @summary Checks that menu items with no text don't throw an exception
+ * @author Alexander Potochkin
+ * @run main bug6883341
+ */
+
+import javax.swing.*;
+
+public class bug6883341 {
+
+ private static void createGui() {
+ JPopupMenu menu = new JPopupMenu();
+ menu.add(new JMenuItem());
+ menu.setVisible(true);
+ menu.setVisible(false);
+ }
+
+ public static void main(String[] args) throws Exception {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ bug6883341.createGui();
+ }
+ });
+ }
+}
diff --git a/test/sun/pisces/ThinLineTest.java b/test/sun/pisces/ThinLineTest.java
new file mode 100644
index 0000000..fff015a
--- /dev/null
+++ b/test/sun/pisces/ThinLineTest.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+import java.awt.*;
+import java.awt.geom.Ellipse2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+
+/**
+ * @author chrisn@google.com (Chris Nokleberg)
+ * @author yamauchi@google.com (Hiroshi Yamauchi)
+ */
+public class ThinLineTest {
+ private static final int PIXEL = 381;
+
+ public static void main(String[] args) throws Exception {
+ BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = image.createGraphics();
+
+ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g.setPaint(Color.WHITE);
+ g.fill(new Rectangle(image.getWidth(), image.getHeight()));
+
+ g.scale(0.5 / PIXEL, 0.5 / PIXEL);
+ g.setPaint(Color.BLACK);
+ g.setStroke(new BasicStroke(PIXEL));
+ g.draw(new Ellipse2D.Double(PIXEL * 50, PIXEL * 50, PIXEL * 300, PIXEL * 300));
+
+ // To visually check it
+ //ImageIO.write(image, "PNG", new File(args[0]));
+
+ boolean nonWhitePixelFound = false;
+ for (int x = 0; x < 200; ++x) {
+ if (image.getRGB(x, 100) != Color.WHITE.getRGB()) {
+ nonWhitePixelFound = true;
+ break;
+ }
+ }
+ if (!nonWhitePixelFound) {
+ throw new RuntimeException("The thin line disappeared.");
+ }
+ }
+}