提交 cf3ccce3 编写于 作者: A asaha

Merge

......@@ -32,3 +32,6 @@ d1c43d1f5676a24ba86221ac7cad5694f3a9afda jdk7-b54
522bb5aa17e0c0cff00b1ed7d1b51bc4db2cfef9 jdk7-b55
7fd3bc37afe36f8f6165ba679db1229716db822a jdk7-b56
d5a1223e961891564de25c39fba6f2442d0fb045 jdk7-b57
9ba256e2e5c161b89e638390f998baa175ec9abe jdk7-b58
2a5a1b269e89f27ebe419ef4cf6e66a3face0df1 jdk7-b59
0c3ef2d612a47667829eb17a192decef23f1c536 jdk7-b60
......@@ -165,6 +165,12 @@ ifeq ($(FASTDEBUG), true)
endif
endif
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_FLAG = -g
CFLAGS_REQUIRED += $(DEBUG_FLAG)
endif
CFLAGS_OPT = $(CC_OPT)
CFLAGS_DBG = $(DEBUG_FLAG)
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
......@@ -240,8 +246,11 @@ AUTOMATIC_PCH_OPTION =
#
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
# Debug 'strip -g' leaves local function Elf symbols (better stack traces)
POST_STRIP_PROCESS = $(STRIP) -g
ifneq ($(DEBUG_BINARIES), true)
# Debug 'strip -g' leaves local function Elf symbols (better stack
# traces)
POST_STRIP_PROCESS = $(STRIP) -g
endif
endif
endif
......
......@@ -52,6 +52,9 @@ EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf \
com.sun.java.swing.plaf.motif \
com.sun.java.swing.plaf.gtk
# This is a stopgap until 6839872 is fixed.
EXCLUDE_PROPWARN_PKGS += sun.dyn
# 64-bit solaris has a few special cases. We define the variable
# SOLARIS64 for use in this Makefile to easily test those cases
ifeq ($(PLATFORM), solaris)
......@@ -342,7 +345,6 @@ TOOLS = \
sun/tools/jar \
sun/tools/java \
sun/tools/javac \
sun/tools/javap \
sun/tools/jps \
sun/tools/jstat \
sun/tools/jstatd \
......@@ -567,7 +569,6 @@ $(NOT_RT_JAR_LIST): FRC
$(ECHO) "sun/tools/asm/" >> $@
$(ECHO) "sun/tools/java/" >> $@
$(ECHO) "sun/tools/javac/" >> $@
$(ECHO) "sun/tools/javap/" >> $@
$(ECHO) "com/sun/tools/classfile/" >> $@
$(ECHO) "com/sun/tools/javap/" >> $@
$(ECHO) "sun/tools/jconsole/" >> $@
......
......@@ -92,6 +92,7 @@ sanity-all:: sanity-base \
sane-ld_run_path \
sane-alt_bootdir \
sane-bootdir \
sane-local-bootdir \
sane-alsa-headers \
sane-jibx
......
......@@ -40,6 +40,5 @@ IMPORT_TOOLS_PACKAGES += \
com/sun/tools/javac \
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap \
sun/tools/javap
com/sun/tools/javap
......@@ -91,6 +91,8 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
# The language version we want for this jdk build
SOURCE_LANGUAGE_VERSION=5
# The class version we want for this jdk build
TARGET_CLASS_VERSION=5
......
......@@ -123,7 +123,8 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true)
endif
# Add the source level (currently all source is 1.5, should this be 1.6?)
LANGUAGE_VERSION = -source 1.5
SOURCE_LANGUAGE_VERSION = 5
LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
JAVACFLAGS += $(LANGUAGE_VERSION)
# Add the class version we want (currently this is 5, should it be 6 or even 7?)
......
......@@ -277,9 +277,9 @@ ifeq ($(ARCH_DATA_MODEL), 32)
# Assume PlatformSDK is in VS71 (will be empty if VS90)
_ms_sdk :=$(call FullPath,$(_msvc_dir)/PlatformSDK)
# Assume VS90, then VS80, then VS71
_redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v3.5/Bin)
_redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT)
ifeq ($(_redist_sdk),)
_redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v2.0/Bin)
_redist_sdk :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT)
ifeq ($(_redist_sdk),)
_redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin)
endif
......@@ -431,9 +431,11 @@ DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
# _BOOTDIR2: Second choice
# The _BOOTDIR3 is defind optionally.
ifndef ALT_BOOTDIR
_BOOTDIR1 =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
_BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
_BOOTDIR3 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
endif
# 32 bit always needs 2 runtimes, 64 bit usually does too
......
......@@ -94,6 +94,21 @@ $(shell \
fi)
endef
# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4
define DirExists4
$(shell \
if [ -d "$1" ]; then \
echo "$1"; \
elif [ -d "$2" ]; then \
echo "$2"; \
elif [ -d "$3" ]; then \
echo "$3"; \
else \
echo "$4"; \
fi)
endef
# Select a writable directory if it exists and is writable, or the alternate
define WriteDirExists
$(shell \
......@@ -356,10 +371,15 @@ endif
# BOOTDIR: Bootstrap JDK, previous released JDK.
# _BOOTDIR1 and _BOOTDIR2 picked by platform
# Platform may optionally define _BOOTDIR3 as well.
ifdef ALT_BOOTDIR
BOOTDIR =$(ALT_BOOTDIR)
else
BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
ifdef _BOOTDIR3
BOOTDIR :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR)
else
BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
endif
endif
export BOOTDIR
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
......
......@@ -194,7 +194,8 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
sane-outputdir \
sane-alt_bootdir \
sane-bootdir \
sane-cups \
sane-local-bootdir \
sane-cups \
sane-devtools_path \
sane-compiler_path \
sane-unixcommand_path \
......@@ -766,6 +767,23 @@ sane-bootdir:
"" >> $(ERROR_FILE) ; \
fi
######################################################
# BOOTDIR is recommended to reside on a local drive
######################################################
sane-local-bootdir:
ifeq ($(PLATFORM), windows)
@if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
$(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
" drive is mapped over a network. Using a mapped drive for\n" \
" the BOOTDIR may significantly slow down the build process.\n" \
" You may want to consider using the ALT_BOOTDIR variable\n" \
" to point the build to another location for the BOOTDIR instead. \n" \
" Your current BOOTDIR is:\n" \
" $(BOOTDIR) \n" \
"" >> $(WARNING_FILE) ; \
fi
endif
######################################################
# CACERTS_FILE must be absoulte path and readable
######################################################
......@@ -1502,6 +1520,9 @@ endif
# JIBX_LIBS_PATH must be valid
######################################################
sane-jibx:
ifdef DISABLE_NIMBUS
$(call SanityWarning,Disabling Nimbus will remove public API in javax.swing.plaf.nimbus.)
else
@if [ ! -r $(subst \,/,$(JIBX_LIBS_PATH))/jibx-run.jar ]; then \
$(ECHO) "ERROR: You do not have access to valid JIBX library files. \n" \
" Please check your access to \n" \
......@@ -1509,6 +1530,7 @@ sane-jibx:
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_JIBX_LIBS_PATH \n" \
"" >> $(ERROR_FILE) ; \
fi
endif
######################################################
# MOZILLA_HEADERS_PATH must be valid
......
......@@ -97,6 +97,7 @@ CORE_PKGS = \
java.awt.print \
java.beans \
java.beans.beancontext \
java.dyn \
java.io \
java.lang \
java.lang.annotation \
......
......@@ -323,6 +323,30 @@ HTTPSERVER_DOCTITLE = "Java$(TRADEMARK) HTTP Server"
HTTPSERVER_JAVADOCHEADER = "Java HTTP Server"
# HTTPSERVER_PKGS is located in NON_CORE_PKGS.gmk
#
# Variables used by sctp target
#
SCTPAPI_SOURCEPATH = $(TOPDIR)/src/share/classes
SCTPAPI_DOCDIR = $(DOCSDIR)/jre/api/nio/sctp/spec
SCTPAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-encoding ascii \
-nodeprecatedlist \
-d $(SCTPAPI_DOCDIR) \
-sourcepath $(SCTPAPI_SOURCEPATH) \
-windowtitle $(SCTPAPI_WINDOWTITLE) \
-doctitle $(SCTPAPI_DOCTITLE) \
-header $(SCTPAPI_JAVADOCHEADER) \
-bottom $(SCTPAPI_JAVADOCBOTTOM) \
-linkoffline ../../../../../api $(DOCSDIR)/api/
SCTPAPI_WINDOWTITLE = "SCTP API"
SCTPAPI_DOCTITLE = "SCTP API"
SCTPAPI_JAVADOCHEADER = "SCTP API"
SCTPAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>'
# SCTPAPI_PKGS is located in NON_CORE_PKGS.gmk
#
# Variables used by jvmti target
#
......@@ -451,6 +475,7 @@ ALL_OTHER_TARGETS = \
smartcardiodocs \
tracingdocs \
httpserverdocs \
sctpdocs \
mgmtdocs \
attachdocs \
jconsoledocs \
......@@ -620,7 +645,7 @@ tracingdocs:
@# ######## api-tracing ############################
$(RM) -r $(TRACING_DOCDIR)
$(MKDIR) -p $(TRACING_DOCDIR)
$(JAVADOC) $(TRACING_JAVADOCFLAGS) \
$(JAVADOC_CMD) $(TRACING_JAVADOCFLAGS) \
$(TRACING_PKGS)
.PHONY: httpserverdocs
......@@ -631,6 +656,14 @@ httpserverdocs:
$(JAVADOC_CMD) $(HTTPSERVER_JAVADOCFLAGS) \
$(HTTPSERVER_PKGS)
.PHONY: sctpdocs
sctpdocs:
@# ######## api-sctp #######################
$(RM) -r $(SCTPAPI_DOCDIR)
$(MKDIR) -p $(SCTPAPI_DOCDIR)
$(JAVADOC_CMD) $(SCTPAPI_JAVADOCFLAGS) \
$(SCTPAPI_PKGS)
.PHONY: mgmtdocs
mgmtdocs: $(COPY-MIB-TARGET)
@# ######## api-management ############################
......
......@@ -827,8 +827,7 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
$(FILES_gensbcs_out): $(GENCSSRC)/SingleByte-X.java $(GENCSSRC)/sbcs
@$(prep-target)
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
$(GENCSSRC) $(SCS_GEN) sbcs
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSSRC) $(SCS_GEN) sbcs
#
# Generated file system implementation classes (Unix only)
......
......@@ -50,6 +50,8 @@ PREFIX = 1.2
JAVADOCFLAGS = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
SWINGPKG = javax/swing
LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS)
# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
DOCLET_JAVAC_FLAGS = -source 6 -target 6
include FILES.gmk
include $(BUILDDIR)/common/Release.gmk
......@@ -86,7 +88,7 @@ $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(DOCLETDST)::
@$(MKDIR) -p $@
$(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
@$(java-vm-cleanup)
# To run, the doclet needs SwingBeanInfoBase class. Also Notice the lie
......@@ -95,11 +97,11 @@ $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
.SwingBeanInfo: $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(SWINGPKG)/BeanInfoUtils.class $(SWINGPKG)/SwingBeanInfoBase.class
$(SWINGPKG)/BeanInfoUtils.class: $(BEANSRCDIR)/BeanInfoUtils.java
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
@$(java-vm-cleanup)
$(SWINGPKG)/SwingBeanInfoBase.class: $(BEANSRCDIR)/SwingBeanInfoBase.java $(BEANSRCDIR)/BeanInfoUtils.java
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
@$(java-vm-cleanup)
#
......
......@@ -34,7 +34,9 @@ include $(BUILDDIR)/common/Defs.gmk
#
include FILES.gmk
AUTO_FILES_JAVA_DIRS = javax/swing/plaf sun/swing com/sun/java/swing/plaf
SUBDIRS = nimbus
ifndef DISABLE_NIMBUS
SUBDIRS = nimbus
endif
# Nimbus is handled in its own directory
AUTO_JAVA_PRUNE = nimbus
......
......@@ -53,19 +53,19 @@ jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
# Standard list of jprt test targets for this workspace
jprt.test.targets=*-*-*-jvm98
jprt.regression.test.targets= \
*-*-*-java/lang, \
*-*-*-java/security, \
*-*-*-java/text, \
*-*-*-java/util
jprt.regression.test.targets= \
*-product-*-java/lang, \
*-product-*-java/security, \
*-product-*-java/text, \
*-product-*-java/util
#jprt.regression.test.targets= \
# *-*-*-java/awt, \
# *-*-*-java/beans, \
# *-*-*-java/io, \
# *-*-*-java/net, \
# *-*-*-java/nio, \
# *-*-*-java/rmi, \
# *-product-*-java/awt, \
# *-product-*-java/beans, \
# *-product-*-java/io, \
# *-product-*-java/net, \
# *-product-*-java/nio, \
# *-product-*-java/rmi, \
# Directories needed to build
jprt.bundle.exclude.src.dirs=build
......
......@@ -66,7 +66,7 @@ $(call make-launcher, jarsigner, sun.security.tools.JarSigner, , )
$(call make-launcher, javac, com.sun.tools.javac.Main, , )
$(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
$(call make-launcher, javah, com.sun.tools.javah.Main, , )
$(call make-launcher, javap, sun.tools.javap.Main, , )
$(call make-launcher, javap, com.sun.tools.javap.Main, , )
$(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
-J-Djconsole.showOutputViewer, )
$(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , )
......
......@@ -58,11 +58,12 @@ ifdef OPENJDK
else
RENDER_SUBDIR = dcpr
endif
# nio need to be compiled before awt to have all charsets ready
SUBDIRS = jar security javazic misc net audio $(RENDER_SUBDIR) image \
awt splashscreen $(XAWT_SUBDIR) \
nio awt splashscreen $(XAWT_SUBDIR) \
$(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
jawt text nio launcher management $(ORG_SUBDIR) \
jawt text launcher management $(ORG_SUBDIR) \
native2ascii serialver tools jconsole tracing
all build clean clobber::
......
......@@ -108,7 +108,9 @@ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child
#
#CFLAGS += -g
ifeq ($(DEBUG_BINARIES), true)
CFLAGS += -g
endif
ifeq ($(HEADLESS),true)
CFLAGS += -DHEADLESS=$(HEADLESS)
CPPFLAGS += -DHEADLESS=$(HEADLESS)
......
......@@ -21,4 +21,4 @@
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
tzdata2009a
tzdata2009g
......@@ -258,7 +258,46 @@ Rule Egypt 2007 only - Sep Thu>=1 23:00s 0 -
# unless discontinued, next DST may end Thursday 28 August 2008.
# From Paul Eggert (2007-08-17):
# For lack of better info, assume the new rule is last Thursday in August.
Rule Egypt 2008 max - Aug lastThu 23:00s 0 -
# From Petr Machata (2009-04-06):
# The following appeared in Red Hat bugzilla[1] (edited):
#
# > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC =3D Thu =
# Apr 23
# > 23:59:59 2009 EET isdst=3D0 gmtoff=3D7200
# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC =3D Fri =
# Apr 24
# > 01:00:00 2009 EEST isdst=3D1 gmtoff=3D10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC =3D Thu =
# Aug 27
# > 23:59:59 2009 EEST isdst=3D1 gmtoff=3D10800
# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC =3D Thu =
# Aug 27
# > 23:00:00 2009 EET isdst=3D0 gmtoff=3D7200
#
# > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59=
# :59)
# > http://support.microsoft.com/kb/958729/
#
# timeanddate[2] and another site I've found[3] also support that.
#
# [1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=3D492263">
# https://bugzilla.redhat.com/show_bug.cgi?id=3D492263
# </a>
# [2] <a href="http://www.timeanddate.com/worldclock/clockchange.html?n=3D53">
# http://www.timeanddate.com/worldclock/clockchange.html?n=3D53
# </a>
# [3] <a href="http://wwp.greenwichmeantime.com/time-zone/africa/egypt/">
# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
# </a>
# From Arthur David Olson (2009-04-20):
# In 2009 (and for the next several years), Ramadan ends before the fourth
# Thursday in September; Egypt is expected to revert to the last Thursday
# in September.
Rule Egypt 2008 only - Aug lastThu 23:00s 0 -
Rule Egypt 2009 max - Sep lastThu 23:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Cairo 2:05:00 - LMT 1900 Oct
......@@ -586,6 +625,40 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
# <a href="http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html">
# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
# </a>
# From Steffen Thorsen (2009-03-17):
# Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
# to many sources, such as
# <a href="http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html">
# http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
# </a>
# <a href="http://www.medi1sat.ma/fr/depeche.aspx?idp=2312">
# http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
# </a>
# (French)
#
# Our summary:
# <a href="http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html">
# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
# </a>
# From Alexander Krivenyshev (2009-03-17):
# Here is a link to official document from Royaume du Maroc Premier Ministre,
# Ministere de la Modernisation des Secteurs Publics
#
# Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
# concerning the amendment of the legal time, the Ministry of Modernization of
# Public Sectors announced that the official time in the Kingdom will be
# advanced 60 minutes from Sunday 31 May 2009 at midnight.
#
# <a href="http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf">
# http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
# </a>
#
# <a href="http://www.worldtimezone.com/dst_news/dst_news_morocco03.html">
# http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
# </a>
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Morocco 1939 only - Sep 12 0:00 1:00 S
......@@ -605,6 +678,8 @@ Rule Morocco 1978 only - Jun 1 0:00 1:00 S
Rule Morocco 1978 only - Aug 4 0:00 0 -
Rule Morocco 2008 only - Jun 1 0:00 1:00 S
Rule Morocco 2008 only - Sep 1 0:00 0 -
Rule Morocco 2009 only - Jun 1 0:00 1:00 S
Rule Morocco 2009 only - Aug 21 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
0:00 Morocco WE%sT 1984 Mar 16
......@@ -809,6 +884,43 @@ Zone Africa/Lome 0:04:52 - LMT 1893
# Ending : the last Sunday of October at 03:00 ...
# http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=1188&Itemid=50
# From Steffen Thorsen (2009-03-16):
# According to several news sources, Tunisia will not observe DST this year.
# (Arabic)
# <a href="http://www.elbashayer.com/?page=viewn&nid=42546">
# http://www.elbashayer.com/?page=viewn&nid=42546
# </a>
# <a href="http://www.babnet.net/kiwidetail-15295.asp">
# http://www.babnet.net/kiwidetail-15295.asp
# </a>
#
# We have also confirmed this with the US embassy in Tunisia.
# We have a wrap-up about this on the following page:
# <a href="http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html">
# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
# </a>
# From Alexander Krivenyshev (2009-03-17):
# Here is a link to Tunis Afrique Presse News Agency
#
# Standard time to be kept the whole year long (tap.info.tn):
#
# (in English)
# <a href="http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157">
# http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
# </a>
#
# (in Arabic)
# <a href="http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1">
# http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
# </a>
# From Arthur David Olson (2009--3-18):
# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
# that the fasting month of ramadan coincides with the period concerned by summer time.
# Therefore, the standard time will be kept unchanged the whole year long."
# So foregoing DST seems to be an exception (albeit one that may be repeated in the future).
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Tunisia 1939 only - Apr 15 23:00s 1:00 S
Rule Tunisia 1939 only - Nov 18 23:00s 0 -
......@@ -833,8 +945,10 @@ Rule Tunisia 1989 only - Mar 26 0:00s 1:00 S
Rule Tunisia 1990 only - May 1 0:00s 1:00 S
Rule Tunisia 2005 only - May 1 0:00s 1:00 S
Rule Tunisia 2005 only - Sep 30 1:00s 0 -
Rule Tunisia 2006 max - Mar lastSun 2:00s 1:00 S
Rule Tunisia 2006 max - Oct lastSun 2:00s 0 -
Rule Tunisia 2006 2008 - Mar lastSun 2:00s 1:00 S
Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 -
Rule Tunisia 2010 max - Mar lastSun 2:00s 1:00 S
Rule Tunisia 2010 max - Oct lastSun 2:00s 0 -
# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
# more precise 0:09:21.
# Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11.
......
......@@ -1071,6 +1071,40 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# http://www.petranews.gov.jo/nepras/2006/Sep/05/4000.htm
# "Jordan will switch to winter time on Friday, October 27".
#
# From Phil Pizzey (2009-04-02):
# ...I think I may have spotted an error in the timezone data for
# Jordan.
# The current (2009d) asia file shows Jordan going to daylight
# saving
# time on the last Thursday in March.
#
# Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S
#
# However timeanddate.com, which I usually find reliable, shows Jordan
# going to daylight saving time on the last Friday in March since 2002.
# Please see
# <a href="http://www.timeanddate.com/worldclock/timezone.html?n=11">
# http://www.timeanddate.com/worldclock/timezone.html?n=11
# </a>
# From Steffen Thorsen (2009-04-02):
# This single one might be good enough, (2009-03-24, Arabic):
# <a href="http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279">
# http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279
# </a>
#
# Google's translation:
#
# > The Council of Ministers decided in 2002 to adopt the principle of timely
# > submission of the summer at 60 minutes as of midnight on the last Thursday
# > of the month of March of each year.
#
# So - this means the midnight between Thursday and Friday since 2002.
# From Arthur David Olson (2009-04-06):
# We still have Jordan switching to DST on Thursdays in 2000 and 2001.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 -
......@@ -1093,8 +1127,9 @@ Rule Jordan 1993 1998 - Apr Fri>=1 0:00 1:00 S
Rule Jordan 1994 only - Sep Fri>=15 0:00 0 -
Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 -
Rule Jordan 1999 only - Jul 1 0:00s 1:00 S
Rule Jordan 1999 2002 - Sep lastThu 0:00s 0 -
Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S
Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 -
Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S
Rule Jordan 2002 max - Mar lastFri 0:00s 1:00 S
Rule Jordan 2003 only - Oct 24 0:00s 0 -
Rule Jordan 2004 only - Oct 15 0:00s 0 -
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
......@@ -1576,11 +1611,46 @@ Zone Asia/Muscat 3:54:20 - LMT 1920
# http://dailymailnews.com/200808/28/news/dmbrn03.html
# </a>
# From Alexander Krivenyshev (2009-04-08):
# Based on previous media reports that "... proposed plan to
# advance clocks by one hour from May 1 will cause disturbance
# to the working schedules rather than bringing discipline in
# official working."
# <a href="http://www.thenews.com.pk/daily_detail.asp?id=171280">
# http://www.thenews.com.pk/daily_detail.asp?id=171280
# </a>
#
# recent news that instead of May 2009 - Pakistan plan to
# introduce DST from April 15, 2009
#
# FYI: Associated Press Of Pakistan
# April 08, 2009
# Cabinet okays proposal to advance clocks by one hour from April 15
# <a href="http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=73043&Itemid=1">
# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=73043&Itemid=1
# </a>
#
# or
#
# <a href="http://www.worldtimezone.com/dst_news/dst_news_pakistan05.html">
# http://www.worldtimezone.com/dst_news/dst_news_pakistan05.html
# </a>
#
# ....
# The Federal Cabinet on Wednesday approved the proposal to
# advance clocks in the country by one hour from April 15 to
# conserve energy"
# From Arthur David Olson (2009-04-10):
# Assume for now that Pakistan will end DST in 2009 as it did in 2008.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Pakistan 2002 only - Apr Sun>=2 0:01 1:00 S
Rule Pakistan 2002 only - Oct Sun>=2 0:01 0 -
Rule Pakistan 2008 only - Jun 1 0:00 1:00 S
Rule Pakistan 2008 only - Nov 1 0:00 0 -
Rule Pakistan 2009 only - Apr 15 0:00 1:00 S
Rule Pakistan 2009 only - Nov 1 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Karachi 4:28:12 - LMT 1907
5:30 - IST 1942 Sep
......@@ -1717,6 +1787,22 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# http://www.worldtimezone.com/dst_news/dst_news_gazastrip01.html
# </a>
# From Alexander Krivenyshev (2009-03-26):
# According to the Palestine News Network (arabic.pnn.ps), Palestinian
# government decided to start Daylight Time on Thursday night March
# 26 and continue until the night of 27 September 2009.
#
# (in Arabic)
# <a href="http://arabic.pnn.ps/index.php?option=com_content&task=view&id=50850">
# http://arabic.pnn.ps/index.php?option=com_content&task=view&id=50850
# </a>
#
# or
# (English translation)
# <a href="http://www.worldtimezone.com/dst_news/dst_news_westbank01.html">
# http://www.worldtimezone.com/dst_news/dst_news_westbank01.html
# </a>
# The rules for Egypt are stolen from the `africa' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
......@@ -1730,10 +1816,12 @@ Rule Palestine 1999 2005 - Apr Fri>=15 0:00 1:00 S
Rule Palestine 1999 2003 - Oct Fri>=15 0:00 0 -
Rule Palestine 2004 only - Oct 1 1:00 0 -
Rule Palestine 2005 only - Oct 4 2:00 0 -
Rule Palestine 2006 max - Apr 1 0:00 1:00 S
Rule Palestine 2006 2008 - Apr 1 0:00 1:00 S
Rule Palestine 2006 only - Sep 22 0:00 0 -
Rule Palestine 2007 only - Sep Thu>=8 2:00 0 -
Rule Palestine 2008 max - Aug lastThu 2:00 0 -
Rule Palestine 2008 only - Aug lastFri 2:00 0 -
Rule Palestine 2009 max - Mar lastFri 0:00 1:00 S
Rule Palestine 2009 max - Sep lastMon 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
......@@ -1991,8 +2079,29 @@ Rule Syria 2007 only - Nov Fri>=1 0:00 0 -
# http://sana.sy/ara/2/2008/10/07/195459.htm
# </a>
Rule Syria 2008 max - Apr Fri>=1 0:00 1:00 S
# From Steffen Thorsen (2009-03-19):
# Syria will start DST on 2009-03-27 00:00 this year according to many sources,
# two examples:
#
# <a href="http://www.sana.sy/eng/21/2009/03/17/217563.htm">
# http://www.sana.sy/eng/21/2009/03/17/217563.htm
# </a>
# (English, Syrian Arab News # Agency)
# <a href="http://thawra.alwehda.gov.sy/_View_news2.asp?FileName=94459258720090318012209">
# http://thawra.alwehda.gov.sy/_View_news2.asp?FileName=94459258720090318012209
# </a>
# (Arabic, gov-site)
#
# We have not found any sources saying anything about when DST ends this year.
#
# Our summary
# <a href="http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html">
# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
# </a>
Rule Syria 2008 only - Apr Fri>=1 0:00 1:00 S
Rule Syria 2008 max - Nov 1 0:00 0 -
Rule Syria 2009 max - Mar lastFri 0:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq
......
......@@ -75,40 +75,32 @@ Leap 2008 Dec 31 23:59:60 + S
# SERVICE DE LA ROTATION TERRESTRE
# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
# Tel. : 33 (0) 1 40 51 22 26
# Tel. : 33 (0) 1 40 51 22 29
# FAX : 33 (0) 1 40 51 22 91
# e-mail : services.iers@obspm.fr
# http://hpiers.obspm.fr/eop-pc
# Internet : services.iers@obspm.fr
#
# Paris, 4 July 2008
# Paris, 15 January 2009
#
# Bulletin C 36
# Bulletin C 37
#
# To authorities responsible
# for the measurement and
# distribution of time
#
# UTC TIME STEP
# on the 1st of January 2009
# INFORMATION ON UTC - TAI
#
# A positive leap second will be introduced at the end of December 2008.
# The sequence of dates of the UTC second markers will be:
# NO positive leap second will be introduced at the end of June 2009.
# The difference between Coordinated Universal Time UTC and the
# International Atomic Time TAI is :
#
# 2008 December 31, 23h 59m 59s
# 2008 December 31, 23h 59m 60s
# 2009 January 1, 0h 0m 0s
#
# The difference between UTC and the International Atomic Time TAI is:
#
# from 2006 January 1, 0h UTC, to 2009 January 1 0h UTC : UTC-TAI = - 33s
# from 2009 January 1, 0h UTC, until further notice : UTC-TAI = - 34s
# from 2009 January 1, 0h UTC, until further notice : UTC-TAI = -34 s
#
# Leap seconds can be introduced in UTC at the end of the months of December
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
# six months, either to announce a time step in UTC or to confirm that there
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
# six months, either to announce a time step in UTC, or to confirm that there
# will be no time step at the next possible date.
#
# Daniel GAMBIS
# Head
# Earth Orientation Center of IERS
# Head
# Earth Orientation Center of the IERS
# Observatoire de Paris, France
......@@ -2280,6 +2280,25 @@ Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose
# From Arthur David Olson (2008-03-12):
# Assume Sun>=15 (third Sunday) going forward.
# From Alexander Krivenyshev (2009-03-04)
# According to the Radio Reloj - Cuba will start Daylight Saving Time on
# midnight between Saturday, March 07, 2009 and Sunday, March 08, 2009-
# not on midnight March 14 / March 15 as previously thought.
#
# <a href="http://www.worldtimezone.com/dst_news/dst_news_cuba05.html">
# http://www.worldtimezone.com/dst_news/dst_news_cuba05.html
# (in Spanish)
# </a>
# From Arthur David Olson (2009-03-09)
# I listened over the Internet to
# <a href="http://media.enet.cu/readioreloj">
# http://media.enet.cu/readioreloj
# </a>
# this morning; when it was 10:05 a. m. here in Bethesda, Maryland the
# the time was announced as "diez cinco"--the same time as here, indicating
# that has indeed switched to DST. Assume second Sunday from 2009 forward.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cuba 1928 only - Jun 10 0:00 1:00 D
Rule Cuba 1928 only - Oct 10 0:00 0 S
......@@ -2312,7 +2331,8 @@ Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S
Rule Cuba 2000 2004 - Apr Sun>=1 0:00s 1:00 D
Rule Cuba 2006 max - Oct lastSun 0:00s 0 S
Rule Cuba 2007 only - Mar Sun>=8 0:00s 1:00 D
Rule Cuba 2008 max - Mar Sun>=15 0:00s 1:00 D
Rule Cuba 2008 only - Mar Sun>=15 0:00s 1:00 D
Rule Cuba 2009 max - Mar Sun>=8 0:00s 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Havana -5:29:28 - LMT 1890
......
......@@ -373,6 +373,50 @@ Rule Arg 2008 max - Oct Sun>=15 0:00 1:00 S
# keep America/Cordoba a single region rather than splitting it into the
# other 5 subregions.
# From Mariano Absatz (2009-03-13):
# Yesterday (with our usual 2-day notice) the Province of San Luis
# decided that next Sunday instead of "staying" @utc-03:00 they will go
# to utc-04:00 until the second Saturday in October...
#
# The press release is at
# <a href="http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102">
# http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102
# </a>
# (I couldn't find the decree, but
# <a href="http://www.sanluis.gov.ar">
# www.sanluis.gov.ar
# <a/>
# is the official page for the Province Government).
#
# There's also a note in only one of the major national papers (La Nación) at
# <a href="http://www.lanacion.com.ar/nota.asp?nota_id=1107912">
# http://www.lanacion.com.ar/nota.asp?nota_id=1107912
# </a>
#
# The press release says:
# (...) anunció que el próximo domingo a las 00:00 los puntanos deberán
# atrasar una hora sus relojes.
#
# A partir de entonces, San Luis establecerá el huso horario propio de
# la Provincia. De esta manera, durante el periodo del calendario anual
# 2009, el cambio horario quedará comprendido entre las 00:00 del tercer
# domingo de marzo y las 24:00 del segundo sábado de octubre.
# Quick&dirty translation
# (...) announced that next Sunday, at 00:00, Puntanos (the San Luis
# inhabitants) will have to turn back one hour their clocks
#
# Since then, San Luis will establish its own Province timezone. Thus,
# during 2009, this timezone change will run from 00:00 the third Sunday
# in March until 24:00 of the second Saturday in October.
# From Arthur David Olson (2009-03-16):
# The unofficial claim at
# <a href="http://www.timeanddate.com/news/time/san-luis-new-time-zone.html">
# http://www.timeanddate.com/news/time/san-luis-new-time-zone.html
# </a>
# is that "The province will most likely follow the next daylight saving schedule,
# which is planned for the second Sunday in October."
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
#
......@@ -520,7 +564,8 @@ Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31
-3:00 - ART 2004 May 31
-4:00 - WART 2004 Jul 25
-3:00 Arg AR%sT 2008 Jan 21
-3:00 - ART
-3:00 - ART 2009 Mar 15
-4:00 Arg WAR%sT
#
# Santa Cruz (SC)
Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
......
......@@ -304,7 +304,7 @@ FILES_src = \
sun/io/CharToByteMacUkraine.java \
sun/io/CharToByteTIS620.java
FILES_gen_extsbcs = \
FILES_gen_extcs = \
sun/nio/cs/ext/IBM037.java \
sun/nio/cs/ext/IBM1006.java \
sun/nio/cs/ext/IBM1025.java \
......@@ -374,6 +374,21 @@ FILES_gen_extsbcs = \
sun/nio/cs/ext/MacThai.java \
sun/nio/cs/ext/MacTurkish.java \
sun/nio/cs/ext/MacUkraine.java \
sun/nio/cs/ext/TIS_620.java
sun/nio/cs/ext/TIS_620.java \
sun/nio/cs/ext/EUC_TWMapping.java \
sun/nio/cs/ext/IBM1381.java \
sun/nio/cs/ext/IBM1383.java \
sun/nio/cs/ext/IBM930.java \
sun/nio/cs/ext/IBM933.java \
sun/nio/cs/ext/IBM935.java \
sun/nio/cs/ext/IBM937.java \
sun/nio/cs/ext/IBM939.java \
sun/nio/cs/ext/IBM942.java \
sun/nio/cs/ext/IBM943.java \
sun/nio/cs/ext/IBM948.java \
sun/nio/cs/ext/IBM949.java \
sun/nio/cs/ext/IBM950.java \
sun/nio/cs/ext/IBM970.java
FILES_java = $(FILES_src) $(FILES_gen_extcs)
FILES_java = $(FILES_src) $(FILES_gen_extsbcs)
\ No newline at end of file
......@@ -60,15 +60,15 @@ endif # PLATFORM
# this define is for the rule:
CHARSETS_JAR = $(LIBDIR)/charsets.jar
# extsbcs
FILES_genout_extsbcs = $(FILES_gen_extsbcs:%.java=$(GENSRCDIR)/%.java)
# extcs
FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
#
# Rules
#
include $(BUILDDIR)/common/Classes.gmk
build: $(FILES_genout_extsbcs) $(CHARSETS_JAR)
build: $(FILES_genout_extcs) $(CHARSETS_JAR)
#
# Extra rules to build character converters.
......@@ -77,6 +77,7 @@ SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
FILES_MAP = $(GENCSDATASRC)/sjis0213.map
......@@ -86,16 +87,18 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
$(FILES_DAT): $(FILES_MAP)
@$(prep-target)
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
$(FILES_MAP) $(FILES_DAT)
$(FILES_MAP) $(FILES_DAT) sjis0213
$(FILES_genout_extsbcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/extsbcs
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/DoubleByte-X.java \
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
@$(prep-target)
$(RM) -r $(GENCSEXT)
$(MKDIR) -p $(GENCSEXT)
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
$(GENCSDATASRC) $(GENCSEXT) extsbcs
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
$(GENCSSRCDIR)/GenerateEUC_TW.java
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
......
......@@ -128,6 +128,7 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_XlibWrapper_SetToolkitErrorHandler;
Java_sun_awt_X11_XlibWrapper_XSetErrorHandler;
Java_sun_awt_X11_XlibWrapper_CallErrorHandler;
Java_sun_awt_X11_XlibWrapper_PrintXErrorEvent;
Java_sun_awt_X11_XlibWrapper_XInternAtoms;
Java_sun_awt_X11_XlibWrapper_XChangeWindowAttributes;
Java_sun_awt_X11_XlibWrapper_XDeleteProperty;
......@@ -154,7 +155,7 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_XRobotPeer_mouseReleaseImpl;
Java_sun_awt_X11_XRobotPeer_mouseWheelImpl;
Java_sun_awt_X11_XRobotPeer_setup;
Java_sun_awt_X11_XRobotPeer_getNumberOfButtonsImpl;
Java_sun_awt_X11_XToolkit_getNumberOfButtonsImpl;
Java_java_awt_Component_initIDs;
Java_java_awt_Container_initIDs;
Java_java_awt_Button_initIDs;
......@@ -276,7 +277,6 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_XToolkit_getDefaultXColormap;
Java_sun_awt_X11_XToolkit_getDefaultScreenData;
Java_sun_awt_X11_XToolkit_getEnv;
Java_sun_awt_X11_XToolkit_setNoisyXErrorHandler;
Java_sun_awt_X11_XlibWrapper_XCreateBitmapFromData;
Java_sun_awt_X11_XlibWrapper_XFreePixmap;
Java_sun_awt_X11_XlibWrapper_XAllocColor;
......
/*
* 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. 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.
*/
// -- This file was mechanically generated: Do not edit! -- //
package $PACKAGE$;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.util.Arrays;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.ext.DoubleByte;
public class $NAME_CLZ$ extends Charset
$IMPLEMENTS$
{
public $NAME_CLZ$() {
super("$NAME_CS$", $NAME_ALIASES$);
}
$HISTORICALNAME$
public boolean contains(Charset cs) {
$CONTAINS$
}
public CharsetDecoder newDecoder() {
initb2c();
return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$);
}
public CharsetEncoder newEncoder() {
initc2b();
return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
}
$B2C$
static char[][] b2c = new char[b2cStr.length][];
static char[] b2cSB;
private static volatile boolean b2cInitialized = false;
static void initb2c() {
if (b2cInitialized)
return;
synchronized (b2c) {
if (b2cInitialized)
return;
for (int i = 0; i < b2cStr.length; i++) {
if (b2cStr[i] == null)
b2c[i] = DoubleByte.B2C_UNMAPPABLE;
else
b2c[i] = b2cStr[i].toCharArray();
}
b2cSB = b2cSBStr.toCharArray();
b2cInitialized = true;
}
}
static char[] c2b = new char[$C2BLENGTH$];
static char[] c2bIndex = new char[0x100];
private static volatile boolean c2bInitialized = false;
static void initc2b() {
if (c2bInitialized)
return;
synchronized (c2b) {
if (c2bInitialized)
return;
$NONROUNDTRIP_B2C$
$NONROUNDTRIP_C2B$
DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
$B2MIN$, $B2MAX$,
c2b, c2bIndex);
c2bInitialized = true;
}
}
}
# See 4201529/4296969
A1AA 2014
A1A4 00B7
A1A4 7AC2
\ No newline at end of file
此差异已折叠。
# See 4201529/4296969
A1AA 2014
A1A4 00B7
A1A4 8EA2
FEEE F83D
FEF4 F83E
此差异已折叠。
#
# diff result of 03A234B0.TPMAP12A & 03A234B0.UXMAP120, with
#
# (1)added following entries from existing Cp930.java's c->b only
# encoding result.
#
# 6be1 -> 54d4 -> 5516
# 6d00 -> 5550 -> 6d9c
# 70ff -> 52ec -> 4fa0
# 841d -> 53e8 -> 8749
# 841f -> 52a1 -> 874b
# 8f91 -> 446e -> 2116
# 92ca -> 547d -> 565b
# 9b7e -> 53da -> 9a28
# f86f -> 446e -> 2116
#
# (2)entries does not exist in "old"
#
# 51F1 6805
# 53B3 8346
#
# (3)the 0x15 U+0085 entries for ebcdic
#
15 0085
#
54d4 6be1
5550 6d00
52ec 70ff
53e8 841d
52a1 841f
446e 8f91
547d 92ca
53da 9b7e
446e f86f
#
# we should use this one instead of the 4260<-ff0d
#4260 2212
4260 ff0d
#
426A 00A6
43A1 301C
444A 2014
447C 2016
4C7D 9E7C
4EB3 9830
4F5E 5861
507F 91AC
5190 56CA
51F1 6805
51FA 91B1
5261 9EB4
52A1 881F
52C9 840A
52DA 7E61
52EC 4FE0
5353 8EC0
5373 7E6B
53DA 9A52
53E8 87EC
53EE 7130
53F8 8523
5443 5C5B
5464 9DD7
547D 5699
5481 525D
54A3 6414
54A4 7626
54CA 7C1E
54CD 6451
54D4 555E
54FA 6F51
5550 7006
5553 79B1
555F 9EB5
55C0 5C62
55C1 985A
5B72 6522
5BFE 688E
60F1 7E48
61B0 8141
66C8 9839
此差异已折叠。
此差异已折叠。
此差异已折叠。
15 0085
#
# see .map for more info regarding the following 5 entries
#445C F83E
#46A8 F83F
#46A9 F840
#46AA F841
#46AB F842
\ No newline at end of file
此差异已折叠。
#
25 000a
#
# following are from Cp937.nr
454A 5341
454C 5345
4841 4E00
4845 4E59
4847 4E8C
4849 4EBA
484A 513F
484B 5165
484C 516B
4850 51E0
4851 51F5
4852 5200
4853 529B
4855 5315
4856 531A
4858 5341
4859 535C
485B 5382
485D 53C8
485E 53E3
485F 56D7
4860 571F
4861 58EB
4863 5915
4864 5927
4865 5973
4866 5B50
4868 5BF8
4869 5C0F
486A 5C22
486B 5C38
486C 5C6E
486D 5C71
486F 5DE5
4870 5DF1
4871 5DFE
4872 5E72
4876 5EFE
4877 5F0B
4878 5F13
487B 5F73
487C 5FC3
487D 6208
487E 6236
487F 624B
4881 652F
4883 6587
4884 6597
4885 65A4
4886 65B9
4888 65E5
4889 66F0
488A 6708
488B 6728
488C 6B20
488D 6B62
488E 6B79
488F 6BB3
4890 6BCB
4891 6BD4
4892 6BDB
4893 6C0F
4894 6C14
4895 6C34
4896 706B
4897 722A
4898 7236
4899 723B
489A 723F
489B 7247
489C 7259
489D 725B
489E 72AC
489F 7384
48A0 7389
48A1 74DC
48A2 74E6
48A3 7518
48A4 751F
48A5 7528
48A6 7530
48A7 758B
48AA 767D
48AB 76AE
48AC 76BF
48AD 76EE
48AE 77DB
48AF 77E2
48B0 77F3
48B1 793A
48B2 79B8
48B3 79BE
48B4 7A74
48B5 7ACB
48B6 7AF9
48B7 7C73
48B8 7CF8
48B9 7F36
48BA 7F51
48BB 7F8A
48BC 7FBD
48BD 8001
48BE 800C
48BF 8012
48C0 8033
48C1 807F
48C2 8089
48C3 81E3
48C4 81EA
48C5 81F3
48C6 81FC
48C7 820C
48C8 821B
48C9 821F
48CA 826E
48CB 8272
48CC 8278
48CD 864D
48CE 866B
48CF 8840
48D0 884C
48D1 8863
48D2 897E
48D3 898B
48D4 89D2
48D5 8A00
48D6 8C37
48D7 8C46
48D8 8C55
48D9 8C78
48DA 8C9D
48DB 8D64
48DC 8D70
48DD 8DB3
48DE 8EAB
48DF 8ECA
48E0 8F9B
48E1 8FB0
48E3 9091
48E4 9149
48E5 91C6
48E6 91CC
48E7 91D1
48E8 9577
48E9 9580
48EA 961C
48EC 96B9
48ED 96E8
48EE 9752
48EF 975E
48F0 9762
48F1 9769
48F2 97CB
48F3 97ED
48F4 97F3
48F5 9801
48F6 98A8
48F7 98DB
48F8 98DF
48F9 9996
48FA 9999
48FB 99AC
48FC 9AA8
48FD 9AD8
4941 9ADF
4942 9B25
4943 9B2F
4944 9B32
4945 9B3C
4946 9B5A
4947 9CE5
4948 9E75
4949 9E7F
494A 9EA5
494B 9EBB
494C 9EC3
494D 9ECD
494E 9ED1
494F 9EF9
4950 9EFD
4951 9F0E
4952 9F13
4953 9F20
4954 9F3B
4955 9F4A
4956 9F52
4957 9F8D
4958 9F9C
4959 9FA0
#
15 0085
#
# diff of:
# package2/939/03AB34B0.TPMAP12A
# package2/939/03AB34B0.UPMAP13A
#
4260 2212
426A 00A6
43A1 301C
444A 2014
446E F86F
447C 2016
4C7D 9E7C
4EB3 9830
4F5E 5861
507F 91AC
5190 56CA
51F1 6805
51FA 91B1
5261 9EB4
52A1 881F
52C9 840A
52DA 7E61
52EC 4FE0
5353 8EC0
5373 7E6B
53B3 8346
53DA 9A52
53E8 87EC
53EE 7130
53F8 8523
5443 5C5B
5464 9DD7
547D 5699
5481 525D
54A3 6414
54A4 7626
54CA 7C1E
54CD 6451
54D4 555E
54FA 6F51
5550 7006
5553 79B1
555F 9EB5
55C0 5C62
55C1 985A
5B72 6522
5BFE 688E
60F1 7E48
61B0 8141
66C8 9839
#
# see .map for details for following entries
54d4 6be1
5550 6d00
52ec 70ff
53e8 841d
52a1 841f
446e 8f91
547d 92ca
53da 9b7e
\ No newline at end of file
此差异已折叠。
# diff of
# 03AE34B0.TPMAP110 (b2c)
# 03AE34B0.UPMAP120 (c2b)
# (1) removed "redundant" entries
# 5C 005C
# 7E 007E
# (2) have following "incompatible" entries compared
# to existing/old mappings
#
# (a) c->b only don't exist in old table
# 2015 815c 2014
# 2225 8161 2016
# 6805 8df2 67f5
# 8346 8c74 834a
# ff0d 817c 2212
# ff5e 8160 301c
# ffe4 fa55 a6
#
# (b) c->b only don't exist in new table
# 551e 90e4 8749
# 6d00 93c0 6d9c
# 6f1e 91cb 9a28
# 70ff 8ba0 4fa0
# 8741 88a0 5516
# 8f91 fa59 2116
# 92ca 8a9a 565b
#
# Warning: to compatible, added (b) into c2b table
#
90e4 551e
93c0 6d00
91cb 6f1e
8ba0 70ff
88a0 8741
fa59 8f91
8a9a 92ca
#
#
#
815C 2015
8160 FF5E
8161 2225
817C FF0D
88A0 555E
898B 7130
89A8 9DD7
8A9A 5699
8BA0 4FE0
8BEB 8EC0
8C71 7E6B
8C74 8346
8CB2 9E7C
8D8D 9EB4
8DF2 6805
8EC6 5C62
8F4A 7E61
8FD3 8523
8FDD 91AC
90E4 87EC
917E 6414
9189 7626
91CB 9A52
925C 7C1E
92CD 6451
9355 5861
935E 985A
9398 79B1
93C0 7006
9458 56CA
948D 525D
94AC 6F51
94AE 91B1
966A 9830
96CB 9EB5
9789 840A
9858 881F
9BA0 5C5B
9DB7 6522
9E94 688E
E379 7E48
E445 8141
E8F6 9839
FA55 FFE4
FA59 F86F
此差异已折叠。
此差异已折叠。
#
# b->c only entries
#
8754 2160
8755 2161
8756 2162
8757 2163
8758 2164
8759 2165
875A 2166
875B 2167
875C 2168
875D 2169
8782 2116
8784 2121
878A 3231
8790 2252
8791 2261
8792 222B
8795 221A
8796 22A5
8797 2220
879A 2235
879B 2229
879C 222A
ED40 7E8A
ED41 891C
ED42 9348
ED43 9288
ED44 84DC
ED45 4FC9
ED46 70BB
ED47 6631
ED48 68C8
ED49 92F9
ED4A 66FB
ED4B 5F45
ED4C 4E28
ED4D 4EE1
ED4E 4EFC
ED4F 4F00
ED50 4F03
ED51 4F39
ED52 4F56
ED53 4F92
ED54 4F8A
ED55 4F9A
ED56 4F94
ED57 4FCD
ED58 5040
ED59 5022
ED5A 4FFF
ED5B 501E
ED5C 5046
ED5D 5070
ED5E 5042
ED5F 5094
ED60 50F4
ED61 50D8
ED62 514A
ED63 5164
ED64 519D
ED65 51BE
ED66 51EC
ED67 5215
ED68 529C
ED69 52A6
ED6A 52C0
ED6B 52DB
ED6C 5300
ED6D 5307
ED6E 5324
ED6F 5372
ED70 5393
ED71 53B2
ED72 53DD
ED73 FA0E
ED74 549C
ED75 548A
ED76 54A9
ED77 54FF
ED78 5586
ED79 5759
ED7A 5765
ED7B 57AC
ED7C 57C8
ED7D 57C7
ED7E FA0F
ED80 FA10
ED81 589E
ED82 58B2
ED83 590B
ED84 5953
ED85 595B
ED86 595D
ED87 5963
ED88 59A4
ED89 59BA
ED8A 5B56
ED8B 5BC0
ED8C 752F
ED8D 5BD8
ED8E 5BEC
ED8F 5C1E
ED90 5CA6
ED91 5CBA
ED92 5CF5
ED93 5D27
ED94 5D53
ED95 FA11
ED96 5D42
ED97 5D6D
ED98 5DB8
ED99 5DB9
ED9A 5DD0
ED9B 5F21
ED9C 5F34
ED9D 5F67
ED9E 5FB7
ED9F 5FDE
EDA0 605D
EDA1 6085
EDA2 608A
EDA3 60DE
EDA4 60D5
EDA5 6120
EDA6 60F2
EDA7 6111
EDA8 6137
EDA9 6130
EDAA 6198
EDAB 6213
EDAC 62A6
EDAD 63F5
EDAE 6460
EDAF 649D
EDB0 64CE
EDB1 654E
EDB2 6600
EDB3 6615
EDB4 663B
EDB5 6609
EDB6 662E
EDB7 661E
EDB8 6624
EDB9 6665
EDBA 6657
EDBB 6659
EDBC FA12
EDBD 6673
EDBE 6699
EDBF 66A0
EDC0 66B2
EDC1 66BF
EDC2 66FA
EDC3 670E
EDC4 F929
EDC5 6766
EDC6 67BB
EDC7 6852
EDC8 67C0
EDC9 6801
EDCA 6844
EDCB 68CF
EDCC FA13
EDCD 6968
EDCE FA14
EDCF 6998
EDD0 69E2
EDD1 6A30
EDD2 6A6B
EDD3 6A46
EDD4 6A73
EDD5 6A7E
EDD6 6AE2
EDD7 6AE4
EDD8 6BD6
EDD9 6C3F
EDDA 6C5C
EDDB 6C86
EDDC 6C6F
EDDD 6CDA
EDDE 6D04
EDDF 6D87
EDE0 6D6F
EDE1 6D96
EDE2 6DAC
EDE3 6DCF
EDE4 6DF8
EDE5 6DF2
EDE6 6DFC
EDE7 6E39
EDE8 6E5C
EDE9 6E27
EDEA 6E3C
EDEB 6EBF
EDEC 6F88
EDED 6FB5
EDEE 6FF5
EDEF 7005
EDF0 7007
EDF1 7028
EDF2 7085
EDF3 70AB
EDF4 710F
EDF5 7104
EDF6 715C
EDF7 7146
EDF8 7147
EDF9 FA15
EDFA 71C1
EDFB 71FE
EDFC 72B1
EE40 72BE
EE41 7324
EE42 FA16
EE43 7377
EE44 73BD
EE45 73C9
EE46 73D6
EE47 73E3
EE48 73D2
EE49 7407
EE4A 73F5
EE4B 7426
EE4C 742A
EE4D 7429
EE4E 742E
EE4F 7462
EE50 7489
EE51 749F
EE52 7501
EE53 756F
EE54 7682
EE55 769C
EE56 769E
EE57 769B
EE58 76A6
EE59 FA17
EE5A 7746
EE5B 52AF
EE5C 7821
EE5D 784E
EE5E 7864
EE5F 787A
EE60 7930
EE61 FA18
EE62 FA19
EE63 FA1A
EE64 7994
EE65 FA1B
EE66 799B
EE67 7AD1
EE68 7AE7
EE69 FA1C
EE6A 7AEB
EE6B 7B9E
EE6C FA1D
EE6D 7D48
EE6E 7D5C
EE6F 7DB7
EE70 7DA0
EE71 7DD6
EE72 7E52
EE73 7F47
EE74 7FA1
EE75 FA1E
EE76 8301
EE77 8362
EE78 837F
EE79 83C7
EE7A 83F6
EE7B 8448
EE7C 84B4
EE7D 8553
EE7E 8559
EE80 856B
EE81 FA1F
EE82 85B0
EE83 FA20
EE84 FA21
EE85 8807
EE86 88F5
EE87 8A12
EE88 8A37
EE89 8A79
EE8A 8AA7
EE8B 8ABE
EE8C 8ADF
EE8D FA22
EE8E 8AF6
EE8F 8B53
EE90 8B7F
EE91 8CF0
EE92 8CF4
EE93 8D12
EE94 8D76
EE95 FA23
EE96 8ECF
EE97 FA24
EE98 FA25
EE99 9067
EE9A 90DE
EE9B FA26
EE9C 9115
EE9D 9127
EE9E 91DA
EE9F 91D7
EEA0 91DE
EEA1 91ED
EEA2 91EE
EEA3 91E4
EEA4 91E5
EEA5 9206
EEA6 9210
EEA7 920A
EEA8 923A
EEA9 9240
EEAA 923C
EEAB 924E
EEAC 9259
EEAD 9251
EEAE 9239
EEAF 9267
EEB0 92A7
EEB1 9277
EEB2 9278
EEB3 92E7
EEB4 92D7
EEB5 92D9
EEB6 92D0
EEB7 FA27
EEB8 92D5
EEB9 92E0
EEBA 92D3
EEBB 9325
EEBC 9321
EEBD 92FB
EEBE FA28
EEBF 931E
EEC0 92FF
EEC1 931D
EEC2 9302
EEC3 9370
EEC4 9357
EEC5 93A4
EEC6 93C6
EEC7 93DE
EEC8 93F8
EEC9 9431
EECA 9445
EECB 9448
EECC 9592
EECD F9DC
EECE FA29
EECF 969D
EED0 96AF
EED1 9733
EED2 973B
EED3 9743
EED4 974D
EED5 974F
EED6 9751
EED7 9755
EED8 9857
EED9 9865
EEDA FA2A
EEDB FA2B
EEDC 9927
EEDD FA2C
EEDE 999E
EEDF 9A4E
EEE0 9AD9
EEE1 9ADC
EEE2 9B75
EEE3 9B72
EEE4 9B8F
EEE5 9BB1
EEE6 9BBB
EEE7 9C00
EEE8 9D70
EEE9 9D6B
EEEA FA2D
EEEB 9E19
EEEC 9ED1
EEEF 2170
EEF0 2171
EEF1 2172
EEF2 2173
EEF3 2174
EEF4 2175
EEF5 2176
EEF6 2177
EEF7 2178
EEF8 2179
EEF9 FFE2
EEFA 00A6
EEFB FF07
EEFC FF02
FA54 FFE2
FA5B 2235
8C40 4E00
8C41 4E59
8C47 4E8C
8C48 4EBA
8C49 513F
8C4A 5165
8C4B 516B
8C4C 51E0
8C4D 5200
8C4F 529B
8C50 5315
8C51 5341
8C52 535C
8C53 53C8
8C66 53E3
8C67 571F
8C68 58EB
8C69 5915
8C6A 5927
8C6B 5973
8C6C 5B50
8C6F 5BF8
8C70 5C0F
8C71 5C22
8C72 5C38
8C73 5C71
8C75 5DE5
8C76 5DF1
8C79 5DFE
8C7A 5E72
8C7B 5EFE
8C7C 5F0B
8C7D 5F13
8CA9 5345
8CBE 5FC3
8CBF 6208
8CC0 6236
8CC1 624B
8CC3 652F
8CC4 6587
8CC5 6597
8CC6 65A4
8CC7 65B9
8CC8 65E5
8CC9 66F0
8CCA 6708
8CCB 6728
8CCC 6B20
8CCD 6B62
8CCE 6B79
8CCF 6BCB
8CD0 6BD4
8CD1 6BDB
8CD2 6C0F
8CD3 6C34
8CD4 706B
8CD5 722A
8CD6 7236
8CD7 723B
8CD8 7247
8CD9 7259
8CDA 725B
8CDB 72AC
8D88 7384
8D89 7389
8D8A 74DC
8D8B 74E6
8D8C 7518
8D8D 751F
8D8E 7528
8D90 7530
8D94 758B
8D95 767D
8D96 76AE
8D97 76BF
8D98 76EE
8D99 77DB
8D9A 77E2
8D9B 77F3
8D9C 793A
8D9D 79BE
8D9E 7A74
8D9F 7ACB
8E6B 7AF9
8E6C 7C73
8E6D 7CF8
8E6E 7F36
8E6F 7F8A
8E70 7FBD
8E71 8001
8E73 800C
8E74 8012
8E75 8033
8E76 807F
8E77 8089
8E7A 81E3
8E7B 81EA
8E7C 81F3
8E7D 81FC
8E7E 820C
8E80 821B
8E81 821F
8E82 826E
8E83 8272
8E85 866B
8E86 8840
8E87 884C
8E88 8863
8FC2 898B
8FC3 89D2
8FC4 8A00
8FC5 8C37
8FC6 8C46
8FC7 8C55
8FC8 8C9D
8FC9 8D64
8FCA 8D70
8FCB 8DB3
8FCC 8EAB
8FCD 8ECA
8FCE 8F9B
8FCF 8FB0
8FD5 9091
8FDA 9149
8FDB 91C6
8FDC 91CC
91D8 91D1
91D9 9577
91DA 9580
91DB 961C
91E1 96B9
91E2 96E8
91E3 9752
91E4 975E
93F1 9762
93F2 9769
93F3 97CB
93F4 97ED
93F5 97F3
93F6 9801
93F7 98A8
93F8 98DB
93F9 98DF
93FA 9996
93FB 9999
968B 99AC
968C 9AA8
968D 9AD8
968E 9B25
968F 9B32
9690 9B3C
9942 9B5A
9943 9CE5
9944 9E75
9945 9E7F
9946 9EA5
9947 9EBB
9BA5 9EC3
9BA6 9ECD
9BA7 9ED1
9DED 9F0E
9DEE 9F13
9DEF 9F20
9FF9 9F3B
9FFA 9F4A
A24E 9F52
A3BC 9F8D
A3BD 9F9C
A942 51F5
A943 531A
A944 5382
A949 56D7
A94B 5C6E
A94C 5F73
A95F 6BB3
A961 6C14
A962 723F
A987 79B8
A9E7 7F51
A9E8 8278
A9ED 864D
A9EE 897E
AB44 8C78
B26C 9ADF
B26D 9B2F
B975 9EF9
BCF5 9EFD
C962 9FA0
此差异已折叠。
此差异已折叠。
A440 4E00
A441 4E59
A447 4E8C
A448 4EBA
A449 513F
A44A 5165
A44B 516B
A44C 51E0
A44D 5200
A44F 529B
A450 5315
A451 5341
A452 535C
A453 53C8
A466 53E3
A467 571F
A468 58EB
A469 5915
A46A 5927
A46B 5973
A46C 5B50
A46F 5BF8
A470 5C0F
A471 5C22
A472 5C38
A473 5C71
A475 5DE5
A476 5DF1
A479 5DFE
A47A 5E72
A47B 5EFE
A47C 5F0B
A47D 5F13
A4CA 5345
A4DF 5FC3
A4E0 6208
A4E1 6236
A4E2 624B
A4E4 652F
A4E5 6587
A4E6 6597
A4E7 65A4
A4E8 65B9
A4E9 65E5
A4EA 66F0
A4EB 6708
A4EC 6728
A4ED 6B20
A4EE 6B62
A4EF 6B79
A4F0 6BCB
A4F1 6BD4
A4F2 6BDB
A4F3 6C0F
A4F4 6C34
A4F5 706B
A4F6 722A
A4F7 7236
A4F8 723B
A4F9 7247
A4FA 7259
A4FB 725B
A4FC 72AC
A5C8 7384
A5C9 7389
A5CA 74DC
A5CB 74E6
A5CC 7518
A5CD 751F
A5CE 7528
A5D0 7530
A5D4 758B
A5D5 767D
A5D6 76AE
A5D7 76BF
A5D8 76EE
A5D9 77DB
A5DA 77E2
A5DB 77F3
A5DC 793A
A5DD 79BE
A5DE 7A74
A5DF 7ACB
A6CB 7AF9
A6CC 7C73
A6CD 7CF8
A6CE 7F36
A6CF 7F8A
A6D0 7FBD
A6D1 8001
A6D3 800C
A6D4 8012
A6D5 8033
A6D6 807F
A6D7 8089
A6DA 81E3
A6DB 81EA
A6DC 81F3
A6DD 81FC
A6DE 820C
A6DF 821B
A6E0 821F
A6E1 826E
A6E2 8272
A6E4 866B
A6E5 8840
A6E6 884C
A6E7 8863
A8A3 898B
A8A4 89D2
A8A5 8A00
A8A6 8C37
A8A7 8C46
A8A8 8C55
A8A9 8C9D
A8AA 8D64
A8AB 8D70
A8AC 8DB3
A8AD 8EAB
A8AE 8ECA
A8AF 8F9B
A8B0 8FB0
A8B6 9091
A8BB 9149
A8BC 91C6
A8BD 91CC
AAF7 91D1
AAF8 9577
AAF9 9580
AAFA 961C
AB41 96B9
AB42 96E8
AB43 9752
AB44 975E
ADB1 9762
ADB2 9769
ADB3 97CB
ADB4 97ED
ADB5 97F3
ADB6 9801
ADB7 98A8
ADB8 98DB
ADB9 98DF
ADBA 9996
ADBB 9999
B0A8 99AC
B0A9 9AA8
B0AA 9AD8
B0AB 9B25
B0AC 9B32
B0AD 9B3C
B3BD 9B5A
B3BE 9CE5
B3BF 9E75
B3C0 9E7F
B3C1 9EA5
B3C2 9EBB
B6C0 9EC3
B6C1 9ECD
B6C2 9ED1
B9A9 9F0E
B9AA 9F13
B9AB 9F20
BBF3 9F3B
BBF4 9F4A
BEA6 9F52
C073 9F8D
C074 9F9C
C942 51F5
C943 531A
C944 5382
C949 56D7
C94B 5C6E
C94C 5F73
C95F 6BB3
C961 6C14
C962 723F
C9A8 79B8
CA49 7F51
CA4A 8278
CA4F 864D
CA50 897E
CBA4 8C78
D449 9ADF
D44A 9B2F
DCB0 9EF9
E0EF 9EFD
EFB6 9FA0
此差异已折叠。
A1A4 00B7
A1A9 00AD
A1AA 2015
A1AD 223C
A2A6 FF5E
A2C1 2299
A3DC 20A9
#
# see .map file for the info regarding following 3 entries
#
a1aa 6950
a1a9 84f1
a1ad cf7f
此差异已折叠。
......@@ -34,7 +34,7 @@ PROGRAM = charsetmapping
include $(BUILDDIR)/common/Defs.gmk
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
BUILDTOOL_MAIN = $(PKGDIR)/GenerateMapping.java
BUILDTOOL_MAIN = $(PKGDIR)/Main.java
#
# Build tool jar rules.
......
#
#clzName csName hisName dbtype pkg ascii b1min b1max b2min b2max
#
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM937 x-IBM937 Cp937 ebcdic sun.nio.cs.ext false 0x40 0xe2 0x40 0xfe
IBM939 x-IBM939 Cp939 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM942 x-IBM942 Cp942 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
IBM943 x-IBM943 Cp943 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
IBM948 x-IBM948 Cp948 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfc
IBM949 x-IBM949 Cp949 basic sun.nio.cs.ext false 0x8f 0xfe 0xa1 0xfe
IBM950 x-IBM950 Cp950 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
IBM970 x-IBM970 Cp970 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
此差异已折叠。
......@@ -51,9 +51,12 @@ SUBDIRS = \
makeclasslist \
strip_properties \
spp \
swing-nimbus \
CharsetMapping
ifndef DISABLE_NIMBUS
SUBDIRS += swing-nimbus
endif
all build clean clobber::
$(SUBDIRS-loop)
......
......@@ -36,7 +36,7 @@ import java.util.*;
public class CharsetMapping {
public final static char UNMAPPABLE_DECODING = '\uFFFD';
public final static int UNMAPPABLE_ENCODING = -1;
public final static int UNMAPPABLE_ENCODING = 0xFFFD;
public static class Entry {
public int bs; //byte sequence reps
......
/*
* 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. 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 build.tools.charsetmapping;
import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Formatter;
import java.util.regex.*;
import java.nio.charset.*;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateDBCS {
// pattern used by this class to read in mapping table
static Pattern mPattern = Pattern.compile("(\\p{XDigit}++)\\s++(\\p{XDigit}++)(\\s++#.*)?");
public static void genDBCS(String args[]) throws Exception {
Scanner s = new Scanner(new File(args[0], args[2]));
while (s.hasNextLine()) {
String line = s.nextLine();
if (line.startsWith("#") || line.length() == 0)
continue;
String[] fields = line.split("\\s+");
if (fields.length < 10) {
System.err.println("Misconfiged sbcs line <" + line + ">?");
continue;
}
String clzName = fields[0];
String csName = fields[1];
String hisName = ("null".equals(fields[2]))?null:fields[2];
String type = fields[3].toUpperCase();
if ("BASIC".equals(type))
type = "";
else
type = "_" + type;
String pkgName = fields[4];
boolean isASCII = Boolean.valueOf(fields[5]);
int b1Min = toInteger(fields[6]);
int b1Max = toInteger(fields[7]);
int b2Min = toInteger(fields[8]);
int b2Max = toInteger(fields[9]);
System.out.printf("%s,%s,%s,%b,%s%n", clzName, csName, hisName, isASCII, pkgName);
genClass(args[0], args[1], "DoubleByte-X.java",
clzName, csName, hisName, pkgName,
isASCII, type,
b1Min, b1Max, b2Min, b2Max);
}
}
private static int toInteger(String s) {
if (s.startsWith("0x") || s.startsWith("0X"))
return Integer.valueOf(s.substring(2), 16);
else
return Integer.valueOf(s);
}
private static void outString(Formatter out,
char[] cc, int off, int end,
String closure)
{
while (off < end) {
out.format(" \"");
for (int j = 0; j < 8; j++) {
if (off == end)
break;
char c = cc[off++];
switch (c) {
case '\b':
out.format("\\b"); break;
case '\t':
out.format("\\t"); break;
case '\n':
out.format("\\n"); break;
case '\f':
out.format("\\f"); break;
case '\r':
out.format("\\r"); break;
case '\"':
out.format("\\\""); break;
case '\'':
out.format("\\'"); break;
case '\\':
out.format("\\\\"); break;
default:
out.format("\\u%04X", c & 0xffff);
}
}
if (off == end)
out.format("\" %s%n", closure);
else
out.format("\" + %n");
}
}
private static void outString(Formatter out,
char[] db,
int b1,
int b2Min, int b2Max,
String closure)
{
char[] cc = new char[b2Max - b2Min + 1];
int off = 0;
for (int b2 = b2Min; b2 <= b2Max; b2++) {
cc[off++] = db[(b1 << 8) | b2];
}
outString(out, cc, 0, cc.length, closure);
}
private static void genClass(String srcDir, String dstDir, String template,
String clzName,
String csName,
String hisName,
String pkgName,
boolean isASCII,
String type,
int b1Min, int b1Max,
int b2Min, int b2Max)
throws Exception
{
StringBuilder b2cSB = new StringBuilder();
StringBuilder b2cNRSB = new StringBuilder();
StringBuilder c2bNRSB = new StringBuilder();
char[] db = new char[0x10000];
char[] c2bIndex = new char[0x100];
int c2bOff = 0x100; // first 0x100 for unmappable segs
Arrays.fill(db, UNMAPPABLE_DECODING);
Arrays.fill(c2bIndex, UNMAPPABLE_DECODING);
char[] b2cIndex = new char[0x100];
Arrays.fill(b2cIndex, UNMAPPABLE_DECODING);
// (1)read in .map to parse all b->c entries
FileInputStream in = new FileInputStream(new File(srcDir, clzName + ".map"));
Parser p = new Parser(in, mPattern);
Entry e = null;
while ((e = p.next()) != null) {
db[e.bs] = (char)e.cp;
if (e.bs > 0x100 && // db
b2cIndex[e.bs>>8] == UNMAPPABLE_DECODING) {
b2cIndex[e.bs>>8] = 1;
}
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
}
Formatter fm = new Formatter(b2cSB);
fm.format("%n static final String b2cSBStr =%n");
outString(fm, db, 0x00, 0x100, ";");
fm.format("%n static final String[] b2cStr = {%n");
for (int i = 0; i < 0x100; i++) {
if (b2cIndex[i] == UNMAPPABLE_DECODING) {
fm.format(" null,%n"); //unmappable segments
} else {
outString(fm, db, i, b2Min, b2Max, ",");
}
}
fm.format(" };%n");
fm.close();
// (2)now parse the .nr file which includes "b->c" non-roundtrip entries
File f = new File(srcDir, clzName + ".nr");
if (f.exists()) {
StringBuilder sb = new StringBuilder();
in = new FileInputStream(f);
p = new Parser(in, mPattern);
e = null;
while ((e = p.next()) != null) {
// A <b,c> pair
sb.append((char)e.bs);
sb.append((char)e.cp);
}
char[] nr = sb.toString().toCharArray();
fm = new Formatter(b2cNRSB);
fm.format("String b2cNR =%n");
outString(fm, nr, 0, nr.length, ";");
fm.close();
} else {
b2cNRSB.append("String b2cNR = null;");
}
// (3)finally the .c2b file which includes c->b non-roundtrip entries
f = new File(srcDir, clzName + ".c2b");
if (f.exists()) {
StringBuilder sb = new StringBuilder();
in = new FileInputStream(f);
p = new Parser(in, mPattern);
e = null;
while ((e = p.next()) != null) {
// A <b,c> pair
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
c2bOff += 0x100;
c2bIndex[e.cp>>8] = 1;
}
sb.append((char)e.bs);
sb.append((char)e.cp);
}
char[] nr = sb.toString().toCharArray();
fm = new Formatter(c2bNRSB);
fm.format("String c2bNR =%n");
outString(fm, nr, 0, nr.length, ";");
fm.close();
} else {
c2bNRSB.append("String c2bNR = null;");
}
// (4)it's time to generate the source file
String b2c = b2cSB.toString();
String b2cNR = b2cNRSB.toString();
String c2bNR = c2bNRSB.toString();
Scanner s = new Scanner(new File(srcDir, template));
PrintStream out = new PrintStream(new FileOutputStream(
new File(dstDir, clzName + ".java")));
if (hisName == null)
hisName = "";
while (s.hasNextLine()) {
String line = s.nextLine();
if (line.indexOf("$") == -1) {
out.println(line);
continue;
}
line = line.replace("$PACKAGE$" , pkgName)
.replace("$IMPLEMENTS$", (hisName == null)?
"" : "implements HistoricallyNamedCharset")
.replace("$NAME_CLZ$", clzName)
.replace("$NAME_ALIASES$",
"sun.nio.cs".equals(pkgName) ?
"StandardCharsets.aliases_" + clzName :
"ExtendedCharsets.aliasesFor(\"" + csName + "\")")
.replace("$NAME_CS$" , csName)
.replace("$CONTAINS$", isASCII ?
" return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof "
+ clzName + "));":
" return (cs instanceof " + clzName + ");")
.replace("$HISTORICALNAME$",
(hisName == null)? "" :
" public String historicalName() { return \"" + hisName + "\"; }")
.replace("$DECTYPE$", type)
.replace("$ENCTYPE$", type)
.replace("$B1MIN$" , "0x" + Integer.toString(b1Min, 16))
.replace("$B1MAX$" , "0x" + Integer.toString(b1Max, 16))
.replace("$B2MIN$" , "0x" + Integer.toString(b2Min, 16))
.replace("$B2MAX$" , "0x" + Integer.toString(b2Max, 16))
.replace("$B2C$", b2c)
.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16))
.replace("$NONROUNDTRIP_B2C$", b2cNR)
.replace("$NONROUNDTRIP_C2B$", c2bNR);
out.println(line);
}
out.close();
}
}
/*
* 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. 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 build.tools.charsetmapping;
import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Formatter;
import java.util.regex.*;
import java.nio.charset.*;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateEUC_TW {
public static void genEUC_TW(String args[]) throws Exception {
genClass(new FileInputStream(new File(args[0], "euc_tw.map")),
new PrintStream(new File(args[1], "EUC_TWMapping.java"), "ISO-8859-1"),
getCopyright(new File(args[3])));
}
private static String getCopyright(File f) throws IOException {
Scanner s = new Scanner(f, "ISO-8859-1");
StringBuilder sb = new StringBuilder();
while (s.hasNextLine()) {
String ln = s.nextLine();
sb.append(ln + "\n");
// assume we have the copyright as the first comment
if (ln.matches("^\\s\\*\\/$"))
break;
}
s.close();
return sb.toString();
}
private static char[] toCharArray(int[] db,
int b1Min, int b1Max,
int b2Min, int b2Max)
{
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
int off = 0;
for (int b1 = b1Min; b1 <= b1Max; b1++) {
for (int b2 = b2Min; b2 <= b2Max; b2++) {
ca[off++] = (char)(db[b1 * 256 + b2] & 0xffff);
}
}
return ca;
}
private static void toChar(Formatter out, String fmt, char c) {
switch (c) {
case '\b':
out.format("\\b"); break;
case '\t':
out.format("\\t"); break;
case '\n':
out.format("\\n"); break;
case '\f':
out.format("\\f"); break;
case '\r':
out.format("\\r"); break;
case '\"':
out.format("\\\""); break;
case '\'':
out.format("\\'"); break;
case '\\':
out.format("\\\\"); break;
default:
out.format(fmt, c & 0xffff);
}
}
private static void toString(Formatter out, char[] date, String endStr)
{
int off = 0;
int end = date.length;
while (off < end) {
out.format(" \"");
for (int j = 0; j < 8 && off < end; j++) {
toChar(out, "\\u%04X", date[off++]);
}
if (off == end)
out.format("\"%s%n", endStr);
else
out.format("\" +%n");
}
}
private static char[] toCharArray(byte[] ba,
int b1Min, int b1Max,
int b2Min, int b2Max)
{
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
int off = 0;
for (int b1 = b1Min; b1 <= b1Max; b1++) {
int b2 = b2Min;
while (b2 <= b2Max) {
ca[off++] = (char)(((ba[b1 * 256 + b2++] & 0xff) << 8) |
(ba[b1 * 256 + b2++] & 0xff));
}
}
return ca;
}
private static void toCharArray(Formatter out, char[] date) {
int off = 0;
int end = date.length;
while (off < end) {
out.format(" ");
for (int j = 0; j < 8 && off < end; j++) {
toChar(out, "'\\u%04X',", date[off++]);
}
out.format("%n");
}
}
private static int initC2BIndex(char[] index) {
int off = 0;
for (int i = 0; i < index.length; i++) {
if (index[i] != 0) {
index[i] = (char)off;
off += 0x100;
} else {
index[i] = CharsetMapping.UNMAPPABLE_ENCODING;
}
}
return off;
}
private static Pattern euctw = Pattern.compile("(?:8ea)?(\\p{XDigit}++)\\s++(\\p{XDigit}++)?\\s*+.*");
private static void genClass(InputStream is, PrintStream ps, String copyright)
throws Exception
{
// ranges of byte1 and byte2, something should come from a "config" file
int b1Min = 0xa1;
int b1Max = 0xfe;
int b2Min = 0xa1;
int b2Max = 0xfe;
try {
int[][] db = new int[8][0x10000]; // doublebyte
byte[] suppFlag = new byte[0x10000]; // doublebyte
char[] indexC2B = new char[256];
char[] indexC2BSupp = new char[256];
for (int i = 0; i < 8; i++)
for (int j = 0; j < 0x10000; j++)
db[i][j] = CharsetMapping.UNMAPPABLE_DECODING;
CharsetMapping.Parser p = new CharsetMapping.Parser(is, euctw);
CharsetMapping.Entry e = null;
while ((e = p.next()) != null) {
int plane = 0;
if (e.bs >= 0x10000) {
plane = ((e.bs >> 16) & 0xff) - 1;
if (plane >= 14)
plane = 7;
e.bs = e.bs & 0xffff;
}
db[plane][e.bs] = e.cp;
if (e.cp < 0x10000) {
indexC2B[e.cp>>8] = 1;
} else {
indexC2BSupp[(e.cp&0xffff)>>8] = 1;
suppFlag[e.bs] |= (1 << plane);
}
}
StringBuilder out = new StringBuilder();
Formatter fm = new Formatter(out);
fm.format(copyright);
fm.format("%n// -- This file was mechanically generated: Do not edit! -- //%n");
fm.format("package sun.nio.cs.ext;%n%n");
fm.format("class EUC_TWMapping {%n%n");
// boundaries
fm.format(" final static int b1Min = 0x%x;%n", b1Min);
fm.format(" final static int b1Max = 0x%x;%n", b1Max);
fm.format(" final static int b2Min = 0x%x;%n", b2Min);
fm.format(" final static int b2Max = 0x%x;%n", b2Max);
// b2c tables
fm.format("%n final static String[] b2c = {%n");
for (int plane = 0; plane < 8; plane++) {
fm.format(" // Plane %d%n", plane);
toString(fm, toCharArray(db[plane],
b1Min, b1Max, b2Min, b2Max),
",");
fm.format("%n");
}
fm.format(" };%n");
// c2bIndex
fm.format("%n static final int C2BSIZE = 0x%x;%n",
initC2BIndex(indexC2B));
fm.format("%n static char[] c2bIndex = new char[] {%n");
toCharArray(fm, indexC2B);
fm.format(" };%n");
// c2bIndexSupp
fm.format("%n static final int C2BSUPPSIZE = 0x%x;%n",
initC2BIndex(indexC2BSupp));
fm.format("%n static char[] c2bSuppIndex = new char[] {%n");
toCharArray(fm, indexC2BSupp);
fm.format(" };%n");
// suppFlags
fm.format("%n static String b2cIsSuppStr =%n");
toString(fm, toCharArray(suppFlag,
b1Min, b1Max, b2Min, b2Max),
";");
fm.format("}");
fm.close();
ps.println(out.toString());
ps.close();
} catch (Exception x) {
x.printStackTrace();
}
}
}
......@@ -27,15 +27,11 @@ package build.tools.charsetmapping;
import java.io.*;
import java.util.regex.*;
import build.tools.charsetmapping.GenerateSBCS;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateMapping {
public static void main(String argv[]) throws IOException {
if (argv.length < 2) {
System.out.println("Usage: java GenerateMapping fMap fDat");
System.exit(1);
}
public static void genMapping(String argv[]) throws IOException {
genDataJIS0213(new FileInputStream(argv[0]),
new FileOutputStream(argv[1]));
}
......
......@@ -34,11 +34,8 @@ import java.nio.charset.*;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateSBCS {
public static void main(String args[]) throws Exception {
if (args.length < 3) {
System.err.println("Usage: java GenSBCS srcDir dstDir config");
System.exit(1);
}
public static void genSBCS(String args[]) throws Exception {
Scanner s = new Scanner(new File(args[0], args[2]));
while (s.hasNextLine()) {
......
/*
* 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. 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 build.tools.charsetmapping;
import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String args[]) throws Exception {
if (args.length < 3 ) {
System.out.println("Usage: java -jar charsetmapping.jar src dst mType...");
System.exit(1);
}
if ("sbcs".equals(args[2]) || "extsbcs".equals(args[2])) {
GenerateSBCS.genSBCS(args);
} else if ("dbcs".equals(args[2])) {
GenerateDBCS.genDBCS(args);
} else if ("euctw".equals(args[2])) {
if (args.length != 4) {
System.out.println("Usage: java -jar charsetmapping.jar srcDir dstDir euctw copyrightSrc");
System.exit(1);
}
GenerateEUC_TW.genEUC_TW(args);
} else if ("sjis0213".equals(args[2])) {
GenerateMapping.genMapping(args);
}
}
}
/*
* Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
* 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
......@@ -148,8 +148,12 @@ public class TextCallbackHandler implements CallbackHandler {
/* Reads a line of input */
private String readLine() throws IOException {
return new BufferedReader
String result = new BufferedReader
(new InputStreamReader(System.in)).readLine();
if (result == null) {
throw new IOException("Cannot read from System.in");
}
return result;
}
private void doConfirmation(ConfirmationCallback confirmation)
......
/*
* Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
* 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
......@@ -1516,11 +1516,6 @@ abstract class DigestMD5Base extends AbstractSaslImpl {
// ---------------- DES and 3 DES key manipulation routines
/* Mask used to check for parity adjustment */
private static final byte[] PARITY_BIT_MASK = {
(byte)0x80, (byte)0x40, (byte)0x20, (byte)0x10,
(byte)0x08, (byte)0x04, (byte)0x02
};
private static final BigInteger MASK = new BigInteger("7f", 16);
/**
......@@ -1529,21 +1524,9 @@ abstract class DigestMD5Base extends AbstractSaslImpl {
*/
private static void setParityBit(byte[] key) {
for (int i = 0; i < key.length; i++) {
int bitCount = 0;
for (int maskIndex = 0;
maskIndex < PARITY_BIT_MASK.length; maskIndex++) {
if ((key[i] & PARITY_BIT_MASK[maskIndex])
== PARITY_BIT_MASK[maskIndex]) {
bitCount++;
}
}
if ((bitCount & 0x01) == 1) {
// Odd number of 1 bits in the top 7 bits. Set parity bit to 0
key[i] = (byte)(key[i] & (byte)0xfe);
} else {
// Even number of 1 bits in the top 7 bits. Set parity bit to 1
key[i] = (byte)(key[i] | 1);
}
int b = key[i] & 0xfe;
b |= (Integer.bitCount(b) & 1) ^ 1;
key[i] = (byte) b;
}
}
......
......@@ -1038,15 +1038,25 @@ public abstract class Component implements ImageObserver, MenuContainer,
void setGraphicsConfiguration(GraphicsConfiguration gc) {
synchronized(getTreeLock()) {
graphicsConfig = gc;
ComponentPeer peer = getPeer();
if (peer != null) {
peer.updateGraphicsData(gc);
if (updateGraphicsData(gc)) {
removeNotify();
addNotify();
}
}
}
boolean updateGraphicsData(GraphicsConfiguration gc) {
checkTreeLock();
graphicsConfig = gc;
ComponentPeer peer = getPeer();
if (peer != null) {
return peer.updateGraphicsData(gc);
}
return false;
}
/**
* Checks that this component's <code>GraphicsDevice</code>
* <code>idString</code> matches the string argument.
......
......@@ -1113,16 +1113,17 @@ public class Container extends Component {
}
@Override
void setGraphicsConfiguration(GraphicsConfiguration gc) {
synchronized (getTreeLock()) {
super.setGraphicsConfiguration(gc);
boolean updateGraphicsData(GraphicsConfiguration gc) {
checkTreeLock();
for (Component comp : component) {
if (comp != null) {
comp.setGraphicsConfiguration(gc);
}
boolean ret = super.updateGraphicsData(gc);
for (Component comp : component) {
if (comp != null) {
ret |= comp.updateGraphicsData(gc);
}
}
return ret;
}
/**
......
......@@ -436,7 +436,7 @@ public abstract class GraphicsConfiguration {
}
/**
* Returns whether this GraphicsConfiguration supports
* Returns whether this {@code GraphicsConfiguration} supports
* the {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT
* PERPIXEL_TRANSLUCENT} kind of translucency.
*
......
......@@ -246,7 +246,7 @@ public abstract class GraphicsDevice {
* Simulated full-screen mode resizes
* the window to the size of the screen and positions it at (0,0).
* <p>
* When entering full-screen mode, if the window to be used as the
* When entering full-screen mode, if the window to be used as a
* full-screen window is not visible, this method will make it visible.
* It will remain visible when returning to windowed mode.
* <p>
......@@ -261,9 +261,9 @@ public abstract class GraphicsDevice {
*
* @param w a window to use as the full-screen window; {@code null}
* if returning to windowed mode. Some platforms expect the
* fullscreen window to be a top-level component (i.e., a Frame);
* therefore it is preferable to use a Frame here rather than a
* Window.
* fullscreen window to be a top-level component (i.e., a {@code Frame});
* therefore it is preferable to use a {@code Frame} here rather than a
* {@code Window}.
*
* @see #isFullScreenSupported
* @see #getFullScreenWindow
......@@ -282,7 +282,7 @@ public abstract class GraphicsDevice {
w.setOpacity(1.0f);
}
Color bgColor = w.getBackground();
if (bgColor.getAlpha() < 255) {
if ((bgColor != null) && (bgColor.getAlpha() < 255)) {
bgColor = new Color(bgColor.getRed(), bgColor.getGreen(),
bgColor.getBlue(), 255);
w.setBackground(bgColor);
......
......@@ -96,9 +96,13 @@ public class Robot {
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice());
int tmpMask = 0;
if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){
for (int i = 0; i < peer.getNumberOfButtons(); i++){
tmpMask |= InputEvent.getMaskForButton(i+1);
if (Toolkit.getDefaultToolkit() instanceof SunToolkit) {
final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons();
for (int i = 0; i < buttonsNumber; i++){
tmpMask |= InputEvent.getMaskForButton(i+1);
}
}
}
tmpMask |= InputEvent.BUTTON1_MASK|
......
......@@ -296,7 +296,7 @@ public class Window extends Container implements Accessible {
transient boolean isInShow = false;
/*
* Opacity level of the window
* The opacity level of the window
*
* @serial
* @see #setOpacity(float)
......@@ -306,7 +306,7 @@ public class Window extends Container implements Accessible {
private float opacity = 1.0f;
/*
* The shape assigned to this window. This field is set to null if
* The shape assigned to this window. This field is set to {@code null} if
* no shape is set (rectangular window).
*
* @serial
......@@ -3592,10 +3592,10 @@ public class Window extends Container implements Accessible {
@Override
public void setBackground(Color bgColor) {
Color oldBg = getBackground();
super.setBackground(bgColor);
if (oldBg != null && oldBg.equals(bgColor)) {
return;
}
super.setBackground(bgColor);
int oldAlpha = oldBg != null ? oldBg.getAlpha() : 255;
int alpha = bgColor.getAlpha();
if ((oldAlpha == 255) && (alpha < 255)) { // non-opaque window
......@@ -3623,16 +3623,37 @@ public class Window extends Container implements Accessible {
}
}
private void updateWindow(BufferedImage backBuffer) {
private void updateWindow() {
synchronized (getTreeLock()) {
WindowPeer peer = (WindowPeer)getPeer();
if (peer != null) {
peer.updateWindow(backBuffer);
peer.updateWindow();
}
}
}
private static final Color TRANSPARENT_BACKGROUND_COLOR = new Color(0, 0, 0, 0);
/**
* {@inheritDoc}
*
* @since 1.7
*/
@Override
public void paint(Graphics g) {
Color bgColor = getBackground();
if ((bgColor != null) && (bgColor.getAlpha() < 255)) {
Graphics gg = g.create();
try {
if (gg instanceof Graphics2D) {
gg.setColor(bgColor);
((Graphics2D)gg).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC));
gg.fillRect(0, 0, getWidth(), getHeight());
}
} finally {
gg.dispose();
}
}
super.paint(g);
}
private static void setLayersOpaque(Component component, boolean isOpaque) {
// Shouldn't use instanceof to avoid loading Swing classes
......@@ -3644,18 +3665,10 @@ public class Window extends Container implements Accessible {
Container c = root.getContentPane();
javax.swing.JComponent content =
(c instanceof javax.swing.JComponent) ? (javax.swing.JComponent)c : null;
javax.swing.JComponent gp =
(rpc.getGlassPane() instanceof javax.swing.JComponent) ?
(javax.swing.JComponent)rpc.getGlassPane() : null;
if (gp != null) {
gp.setDoubleBuffered(isOpaque);
}
lp.setOpaque(isOpaque);
root.setOpaque(isOpaque);
root.setDoubleBuffered(isOpaque);
if (content != null) {
content.setOpaque(isOpaque);
content.setDoubleBuffered(isOpaque);
// Iterate down one level to see whether we have a JApplet
// (which is also a RootPaneContainer) which requires processing
......@@ -3790,8 +3803,8 @@ public class Window extends Container implements Accessible {
window.setBackground(new Color(bg.getRed(), bg.getGreen(), bg.getBlue(),
opaque ? 255 : 0));
}
public void updateWindow(Window window, BufferedImage backBuffer) {
window.updateWindow(backBuffer);
public void updateWindow(Window window) {
window.updateWindow();
}
public Dimension getSecurityWarningSize(Window window) {
......
......@@ -157,6 +157,8 @@ public abstract class InputEvent extends ComponentEvent {
/**
* An array of extended modifiers for additional buttons.
* @see getButtonDownMasks
* There are twenty buttons fit into 4byte space.
* one more bit is reserved for FIRST_HIGH_BIT.
* @since 7.0
*/
private static final int [] BUTTON_DOWN_MASK = new int [] { BUTTON1_DOWN_MASK,
......@@ -169,7 +171,16 @@ public abstract class InputEvent extends ComponentEvent {
1<<18,
1<<19,
1<<20,
1<<21 };
1<<21,
1<<22,
1<<23,
1<<24,
1<<25,
1<<26,
1<<27,
1<<28,
1<<29,
1<<30};
/**
* A method to access an array of extended modifiers for additional buttons.
......@@ -240,7 +251,7 @@ public abstract class InputEvent extends ComponentEvent {
// in fact, it is undesirable to add modifier bits
// to the same field as this may break applications
// see bug# 5066958
static final int FIRST_HIGH_BIT = 1 << 22;
static final int FIRST_HIGH_BIT = 1 << 31;
static final int JDK_1_3_MODIFIERS = SHIFT_DOWN_MASK - 1;
static final int HIGH_MODIFIERS = ~( FIRST_HIGH_BIT - 1 );
......
......@@ -33,6 +33,7 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.awt.IllegalComponentStateException;
import java.awt.MouseInfo;
import sun.awt.SunToolkit;
/**
* An event which indicates that a mouse action occurred in a component.
......@@ -379,12 +380,25 @@ public class MouseEvent extends InputEvent {
*/
private static final long serialVersionUID = -991214153494842848L;
/**
* A number of buttons available on the mouse at the {@code Toolkit} machinery startup.
*/
private static int cachedNumberOfButtons;
static {
/* ensure that the necessary native libraries are loaded */
NativeLibLoader.loadLibraries();
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
final Toolkit tk = Toolkit.getDefaultToolkit();
if (tk instanceof SunToolkit) {
cachedNumberOfButtons = ((SunToolkit)tk).getNumberOfButtons();
} else {
//It's expected that some toolkits (Headless,
//whatever besides SunToolkit) could also operate.
cachedNumberOfButtons = 3;
}
}
/**
......@@ -411,15 +425,6 @@ public class MouseEvent extends InputEvent {
return new Point(xAbs, yAbs);
}
/**
* A number of buttons available on the mouse at the {@code Toolkit} machinery startup.
*/
private static int cachedNumberOfButtons;
static {
cachedNumberOfButtons = MouseInfo.getNumberOfButtons();
}
/**
* Returns the absolute horizontal x position of the event.
* In a virtual device multi-screen environment in which the
......@@ -735,7 +740,6 @@ public class MouseEvent extends InputEvent {
if (button < NOBUTTON){
throw new IllegalArgumentException("Invalid button value :" + button);
}
//TODO: initialize MouseInfo.cachedNumber on toolkit creation.
if (button > BUTTON3) {
if (!Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){
throw new IllegalArgumentException("Extra mouse events are disabled " + button);
......
......@@ -548,7 +548,8 @@ public interface ComponentPeer {
/**
* Updates internal data structures related to the component's GC.
*
* @return if the peer needs to be recreated for the changes to take effect
* @since 1.7
*/
void updateGraphicsData(GraphicsConfiguration gc);
boolean updateGraphicsData(GraphicsConfiguration gc);
}
......@@ -121,11 +121,4 @@ public interface RobotPeer
* Disposes the robot peer when it is not needed anymore.
*/
void dispose();
/**
* Returns the number of buttons that the robot simulates.
*
* @return the number of buttons that the robot simulates
*/
int getNumberOfButtons();
}
......@@ -110,12 +110,11 @@ public interface WindowPeer extends ContainerPeer {
void setOpaque(boolean isOpaque);
/**
* Updates the native part of non-opaque window using
* the given image with color+alpha values for each pixel.
* Updates the native part of non-opaque window.
*
* @see Window#setBackground(Color)
*/
void updateWindow(BufferedImage backBuffer);
void updateWindow();
/**
* Instructs the peer to update the position of the security warning.
......
......@@ -28,18 +28,28 @@ package java.dyn;
import sun.dyn.util.BytecodeName;
/**
* An <code>invokedynamic</code> call site, as reified to the bootstrap method.
* Every instance of a call site corresponds to a distinct instance
* of the <code>invokedynamic</code> instruction.
* Call sites have state, one reference word, called the <code>target</code>,
* and typed as a {@link MethodHandle}. When this state is null (as it is
* initially) the call site is in the unlinked state. Otherwise, it is said
* to be linked to its target.
* An {@code invokedynamic} call site, as reified by the
* containing class's bootstrap method.
* Every call site object corresponds to a distinct instance
* of the <code>invokedynamic</code> instruction, and vice versa.
* Every call site has one state variable, called the {@code target}.
* It is typed as a {@link MethodHandle}. This state is never null, and
* it is the responsibility of the bootstrap method to produce call sites
* which have been pre-linked to an initial target method.
* <p>
* When an unlinked call site is executed, a bootstrap routine is called
* to finish the execution of the call site, and optionally to link
* the call site.
* (Note: The bootstrap method may elect to produce call sites of a
* language-specific subclass of {@code CallSite}. In such a case,
* the subclass may claim responsibility for initializing its target to
* a non-null value, by overriding {@link #initialTarget}.)
* <p>
* An {@code invokedynamic} instruction which has not yet been executed
* is said to be <em>unlinked</em>. When an unlinked call site is executed,
* the containing class's bootstrap method is called to manufacture a call site,
* for the instruction. If the bootstrap method does not assign a non-null
* value to the new call site's target variable, the method {@link #initialTarget}
* is called to produce the new call site's first target method.
* <p>
* @see Linkage#registerBootstrapMethod(java.lang.Class, java.dyn.MethodHandle)
* @author John Rose, JSR 292 EG
*/
public class CallSite {
......@@ -52,6 +62,15 @@ public class CallSite {
final String name;
final MethodType type;
/**
* Make a call site given the parameters from a call to the bootstrap method.
* The resulting call site is in an unlinked state, which means that before
* it is returned from a bootstrap method call it must be provided with
* a target method via a call to {@link CallSite#setTarget}.
* @param caller the class in which the relevant {@code invokedynamic} instruction occurs
* @param name the name specified by the {@code invokedynamic} instruction
* @param type the method handle type derived from descriptor of the {@code invokedynamic} instruction
*/
public CallSite(Object caller, String name, MethodType type) {
this.caller = caller;
this.name = name;
......@@ -73,7 +92,9 @@ public class CallSite {
* <p>
* If the bootstrap method itself does not initialize the call site,
* this method must be overridden, because it just raises an
* {@code InvokeDynamicBootstrapError}.
* {@code InvokeDynamicBootstrapError}, which in turn causes the
* linkage of the {@code invokedynamic} instruction to terminate
* abnormally.
*/
protected MethodHandle initialTarget() {
throw new InvokeDynamicBootstrapError("target must be initialized before call site is linked: "+this);
......@@ -81,7 +102,7 @@ public class CallSite {
/**
* Report the current linkage state of the call site. (This is mutable.)
* The value is null if and only if the call site is currently unlinked.
* The value maybe null only if the call site is currently unlinked.
* When a linked call site is invoked, the target method is used directly.
* When an unlinked call site is invoked, its bootstrap method receives
* the call, as if via {@link Linkage#bootstrapInvokeDynamic}.
......@@ -113,8 +134,9 @@ public class CallSite {
* into the bootstrap method and/or the target methods used
* at any given call site.
* @param target the new target, or null if it is to be unlinked
* @throws WrongMethodTypeException if the new target is not null
* and has a method type that differs from the call site's {@link #type}
* @throws NullPointerException if the proposed new target is null
* @throws WrongMethodTypeException if the proposed new target
* has a method type that differs from the call site's {@link #type()}
*/
public void setTarget(MethodHandle target) {
checkTarget(target);
......@@ -122,6 +144,7 @@ public class CallSite {
}
protected void checkTarget(MethodHandle target) {
target.type(); // provoke NPE
if (!canSetTarget(target))
throw new WrongMethodTypeException(String.valueOf(target));
}
......@@ -132,7 +155,7 @@ public class CallSite {
/**
* Report the class containing the call site.
* This is immutable static context.
* This is an immutable property of the call site, set from the first argument to the constructor.
* @return class containing the call site
*/
public Class<?> callerClass() {
......@@ -141,7 +164,7 @@ public class CallSite {
/**
* Report the method name specified in the {@code invokedynamic} instruction.
* This is immutable static context.
* This is an immutable property of the call site, set from the second argument to the constructor.
* <p>
* Note that the name is a JVM bytecode name, and as such can be any
* non-empty string, as long as it does not contain certain "dangerous"
......@@ -187,7 +210,7 @@ public class CallSite {
* which are derived from its bytecode-level invocation descriptor.
* The types are packaged into a {@link MethodType}.
* Any linked target of this call site must be exactly this method type.
* This is immutable static context.
* This is an immutable property of the call site, set from the third argument to the constructor.
* @return method type specified by the call site
*/
public MethodType type() {
......
......@@ -26,10 +26,25 @@
package java.dyn;
/**
* Syntactic marker interface to request javac to emit an {@code invokedynamic} instruction.
* Syntactic marker to request javac to emit an {@code invokedynamic} instruction.
* An {@code invokedynamic} instruction is a 5-byte bytecoded instruction
* which begins with an opcode byte of value 186 ({@code 0xBA}),
* and is followed by a two-byte index of a {@code NameAndType} constant
* pool entry, then by two zero bytes. The constant pool reference gives
* the method name and argument and return types of the call site; there
* is no other information provided at the call site.
* <p>
* This type has no particular meaning as a class or interface supertype, and can never be instantiated.
* The {@code invokedynamic} instruction is incomplete without a target method.
* The target method is a property of the reified call site object
* (of type {@link CallSite}) which is in a one-to-one association with each
* corresponding {@code invokedynamic} instruction. The call site object
* is initially produced by a <em>bootstrap method</em> associated with
* the call site, via the various overloadings of {@link Linkage#registerBootstrapMethod}.
* <p>
* The type {@code InvokeDynamic} has no particular meaning as a
* class or interface supertype, or an object type; it can never be instantiated.
* Logically, it denotes a source of all dynamically typed methods.
* It may be viewed as a pure syntactic marker (an importable one) of static calls.
* @author John Rose, JSR 292 EG
*/
public final class InvokeDynamic {
......
......@@ -37,16 +37,19 @@ public class Linkage {
private Linkage() {} // do not instantiate
/**
* Register a bootstrap method for use for a given caller class.
* The method handle must be of a type equivalent to {@link Linkage#makeCallSite}.
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Register a <em>bootstrap method</em> to use when linking a given caller class.
* It must be a method handle of a type equivalent to {@link CallSite#CallSite}.
* In other words, it must act as a factory method which accepts the arguments
* to {@code CallSite}'s constructor (a class, a string, and a method type),
* and returns a {@code CallSite} object (possibly of a subclass of {@code CallSite}).
* <p>
* The operation will fail with an exception if any of the following conditions hold:
* The registration will fail with an {@code IllegalStateException} if any of the following conditions hold:
* <ul>
* <li>The caller of this method is in a different package than the {@code callerClass},
* and there is a security manager, and its {@code checkPermission} call throws
* when passed {@link LinkagePermission}("registerBootstrapMethod",callerClass).
* <li>The given class already has a bootstrap method, either from an embedded
* {@code BootstrapInvokeDynamic} classfile attribute, or from a previous
* <li>The given class already has a bootstrap method from a previous
* call to this method.
* <li>The given class is already fully initialized.
* <li>The given class is in the process of initialization, in another thread.
......@@ -75,9 +78,10 @@ public class Linkage {
}
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Simplified version of registerBootstrapMethod for self-registration,
* to be called from a static initializer.
* Finds a static method of type (CallSite, Object[]) -> Object in the
* Finds a static method of the required type in the
* given class, and installs it on the caller.
* @throws IllegalArgumentException if there is no such method
*/
......@@ -92,9 +96,10 @@ public class Linkage {
}
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Simplified version of registerBootstrapMethod for self-registration,
* to be called from a static initializer.
* Finds a static method of type (CallSite, Object[]) -> Object in the
* Finds a static method of the required type in the
* caller's class, and installs it on the caller.
* @throws IllegalArgumentException if there is no such method
*/
......@@ -109,6 +114,7 @@ public class Linkage {
}
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Report the bootstrap method registered for a given class.
* Returns null if the class has never yet registered a bootstrap method,
* or if the class has explicitly registered a null bootstrap method.
......@@ -125,8 +131,10 @@ public class Linkage {
}
}
/** The type of any bootstrap method is a three-argument method
* {@code (Class<?>, String, MethodType)} returning a {@code CallSite}.
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* The type of any bootstrap method is a three-argument method
* {@code (Class, String, MethodType)} returning a {@code CallSite}.
*/
public static final MethodType BOOTSTRAP_METHOD_TYPE
= MethodType.make(CallSite.class,
......@@ -140,6 +148,7 @@ public class Linkage {
new WeakHashMap<Class, MethodHandle>();
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Invalidate all <code>invokedynamic</code> call sites everywhere.
* <p>
* When this method returns, every <code>invokedynamic</code> instruction
......@@ -163,6 +172,7 @@ public class Linkage {
}
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* Invalidate all <code>invokedynamic</code> call sites associated
* with the given class.
* (These are exactly those sites which report the given class
......
......@@ -73,6 +73,7 @@ public class MethodHandles {
}
/**
* <em>PROVISIONAL API, WORK IN PROGRESS:</em>
* A factory object for creating method handles, when the creation
* requires access checking. Method handles do not perform
* access checks when they are called; this is a major difference
......@@ -108,8 +109,10 @@ public class MethodHandles {
* access. In any of these cases, an exception will be
* thrown from the attempted lookup.
* In general, the conditions under which a method handle may be
* created for a method M are exactly as restrictive as the conditions
* under which the lookup class could have compiled a call to M.
* created for a method {@code M} are exactly as restrictive as the conditions
* under which the lookup class could have compiled a call to {@code M}.
* At least some of these error conditions are likely to be
* represented by checked exceptions in the final version of this API.
*/
public static final
class Lookup {
......@@ -142,27 +145,30 @@ public class MethodHandles {
this.lookupClass = lookupClass;
}
private static final Class<?> PUBLIC_ONLY = sun.dyn.empty.Empty.class;
/** Version of lookup which is trusted minimally.
* It can only be used to create method handles to
* publicly accessible members.
*/
public static final Lookup PUBLIC_LOOKUP = new Lookup(null);
public static final Lookup PUBLIC_LOOKUP = new Lookup(PUBLIC_ONLY);
/** Package-private version of lookup which is trusted. */
static final Lookup IMPL_LOOKUP = new Lookup(Access.class);
static final Lookup IMPL_LOOKUP = new Lookup(null);
static { MethodHandleImpl.initLookup(IMPL_TOKEN, IMPL_LOOKUP); }
private static void checkUnprivilegedlookupClass(Class<?> lookupClass) {
if (lookupClass == null ||
lookupClass == Access.class ||
lookupClass.getName().startsWith("java.dyn."))
String name = lookupClass.getName();
if (name.startsWith("java.dyn.") || name.startsWith("sun.dyn."))
throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
}
@Override
public String toString() {
if (lookupClass == null)
if (lookupClass == PUBLIC_ONLY)
return "public";
if (lookupClass == null)
return "privileged";
return lookupClass.getName();
}
......@@ -202,6 +208,13 @@ public class MethodHandles {
* with the receiver type ({@code defc}) prepended.
* The method and all its argument types must be accessible to the lookup class.
* <p>
* (<em>BUG NOTE:</em> The type {@code Object} may be prepended instead
* of the receiver type, if the receiver type is not on the boot class path.
* This is due to a temporary JVM limitation, in which MethodHandle
* claims to be unable to access such classes. To work around this
* bug, use {@code convertArguments} to normalize the type of the leading
* argument to a type on the boot class path, such as {@code Object}.)
* <p>
* When called, the handle will treat the first argument as a receiver
* and dispatch on the receiver's type to determine which method
* implementation to enter.
......@@ -222,11 +235,11 @@ public class MethodHandles {
/**
* Produce an early-bound method handle for a virtual method,
* or a handle for a constructor, as if called from an {@code invokespecial}
* as if called from an {@code invokespecial}
* instruction from {@code caller}.
* The type of the method handle will be that of the method or constructor,
* The type of the method handle will be that of the method,
* with a suitably restricted receiver type (such as {@code caller}) prepended.
* The method or constructor and all its argument types must be accessible
* The method and all its argument types must be accessible
* to the caller.
* <p>
* When called, the handle will treat the first argument as a receiver,
......@@ -250,8 +263,7 @@ public class MethodHandles {
MemberName method = IMPL_NAMES.resolveOrFail(new MemberName(defc, name, type), false, specialCaller);
checkStatic(false, method, lookupClass);
if (name.equals("<init>")) {
if (defc != specialCaller)
throw newNoAccessException("constructor must be local to lookup class", method, lookupClass);
throw newNoAccessException("cannot directly invoke a constructor", method, null);
} else if (defc.isInterface() || !defc.isAssignableFrom(specialCaller)) {
throw newNoAccessException("method must be in a superclass of lookup class", method, lookupClass);
}
......
......@@ -333,7 +333,7 @@ class MethodType {
/** Convenience method for {@link #make(java.lang.Class, java.lang.Class[])}.
* Convert all wrapper types to their corresponding primitive types.
* A return type of {@java.lang.Void} is changed to {@code void}.
* A return type of {@code java.lang.Void} is changed to {@code void}.
* @return a version of the original type with all wrapper types replaced
*/
public MethodType unwrap() {
......
......@@ -110,13 +110,11 @@ class BitSieve {
int convertedStep = (step *2) + 1;
// Construct the large sieve at an even offset specified by base
MutableBigInteger r = new MutableBigInteger();
MutableBigInteger b = new MutableBigInteger(base);
MutableBigInteger q = new MutableBigInteger();
do {
// Calculate base mod convertedStep
r.copyValue(base.mag);
r.divideOneWord(convertedStep, q);
start = r.value[r.offset];
start = b.divideOneWord(convertedStep, q);
// Take each multiple of step out of sieve
start = convertedStep - start;
......
......@@ -126,19 +126,6 @@ public final class MathContext implements Serializable {
*/
final RoundingMode roundingMode;
/**
* Lookaside for the rounding points (the numbers which determine
* whether the coefficient of a number will require rounding).
* These will be present if {@code precision > 0} and
* {@code precision <= MAX_LOOKASIDE}. In this case they will share the
* {@code BigInteger int[]} array. Note that the transients
* cannot be {@code final} because they are reconstructed on
* deserialization.
*/
transient BigInteger roundingMax = null;
transient BigInteger roundingMin = null;
private static final int MAX_LOOKASIDE = 1000;
/* ----- Constructors ----- */
/**
......@@ -173,11 +160,6 @@ public final class MathContext implements Serializable {
throw new NullPointerException("null RoundingMode");
precision = setPrecision;
if (precision > 0 && precision <= MAX_LOOKASIDE) {
roundingMax = BigInteger.TEN.pow(precision);
roundingMin = roundingMax.negate();
}
roundingMode = setRoundingMode;
return;
}
......@@ -221,10 +203,6 @@ public final class MathContext implements Serializable {
throw new IllegalArgumentException("Digits < 0");
// the other parameters cannot be invalid if we got here
precision = setPrecision;
if (precision > 0 && precision <= MAX_LOOKASIDE) {
roundingMax = BigInteger.TEN.pow(precision);
roundingMin = roundingMax.negate();
}
}
/**
......@@ -343,11 +321,6 @@ public final class MathContext implements Serializable {
String message = "MathContext: null roundingMode in stream";
throw new java.io.StreamCorruptedException(message);
}
// Set the lookaside, if applicable
if (precision <= MAX_LOOKASIDE) {
roundingMax = BigInteger.TEN.pow(precision);
roundingMin = roundingMax.negate();
}
}
}
......@@ -129,9 +129,7 @@ class SignedMutableBigInteger extends MutableBigInteger {
* array starting at offset.
*/
public String toString() {
BigInteger b = new BigInteger(this, sign);
return
b.toString();
return this.toBigInteger(sign).toString();
}
}
......@@ -286,6 +286,14 @@ public class CookieManager extends CookieHandler
}
cookie.setPath(path);
}
// As per RFC 2965, section 3.3.1:
// Domain Defaults to the effective request-host. (Note that because
// there is no dot at the beginning of effective request-host,
// the default Domain can only domain-match itself.)
if (cookie.getDomain() == null) {
cookie.setDomain(uri.getHost());
}
String ports = cookie.getPortlist();
if (ports != null) {
int port = uri.getPort();
......
......@@ -1237,7 +1237,6 @@ public abstract class URLConnection {
}
private static Hashtable handlers = new Hashtable();
private static final ContentHandler UnknownContentHandlerP = new UnknownContentHandler();
/**
* Gets the Content Handler appropriate for this connection.
......@@ -1264,7 +1263,7 @@ public abstract class URLConnection {
handler = lookupContentHandlerClassFor(contentType);
} catch(Exception e) {
e.printStackTrace();
handler = UnknownContentHandlerP;
handler = UnknownContentHandler.INSTANCE;
}
handlers.put(contentType, handler);
}
......@@ -1335,7 +1334,7 @@ public abstract class URLConnection {
}
}
return UnknownContentHandlerP;
return UnknownContentHandler.INSTANCE;
}
/**
......@@ -1761,6 +1760,8 @@ public abstract class URLConnection {
class UnknownContentHandler extends ContentHandler {
static final ContentHandler INSTANCE = new UnknownContentHandler();
public Object getContent(URLConnection uc) throws IOException {
return uc.getInputStream();
}
......
......@@ -49,6 +49,7 @@ package java.util.zip;
* compresser.setInput(input);
* compresser.finish();
* int compressedDataLength = compresser.deflate(output);
* compresser.end();
*
* // Decompress the bytes
* Inflater decompresser = new Inflater();
......
......@@ -32,6 +32,8 @@ import java.io.File;
import java.nio.charset.Charset;
import java.util.Vector;
import java.util.Enumeration;
import java.util.Set;
import java.util.HashSet;
import java.util.NoSuchElementException;
import static java.util.zip.ZipConstants64.*;
......@@ -277,6 +279,9 @@ class ZipFile implements ZipConstants {
// freeEntry releases the C jzentry struct.
private static native void freeEntry(long jzfile, long jzentry);
// the outstanding inputstreams that need to be closed.
private Set<ZipFileInputStream> streams = new HashSet<ZipFileInputStream>();
/**
* Returns an input stream for reading the contents of the specified
* zip file entry.
......@@ -308,6 +313,7 @@ class ZipFile implements ZipConstants {
return null;
}
in = new ZipFileInputStream(jzentry);
streams.add(in);
}
final ZipFileInputStream zfin = in;
switch (getEntryMethod(jzentry)) {
......@@ -323,7 +329,7 @@ class ZipFile implements ZipConstants {
public void close() throws IOException {
if (!isClosed) {
releaseInflater(inf);
releaseInflater(inf);
this.in.close();
isClosed = true;
}
......@@ -497,6 +503,13 @@ class ZipFile implements ZipConstants {
synchronized (this) {
closeRequested = true;
if (streams.size() !=0) {
Set<ZipFileInputStream> copy = streams;
streams = new HashSet<ZipFileInputStream>();
for (ZipFileInputStream is: copy)
is.close();
}
if (jzfile != 0) {
// Close the zip file
long zf = this.jzfile;
......@@ -631,9 +644,9 @@ class ZipFile implements ZipConstants {
freeEntry(ZipFile.this.jzfile, jzentry);
jzentry = 0;
}
streams.remove(this);
}
}
}
......
/*
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-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
......@@ -234,56 +234,58 @@ public abstract class Configuration {
*
* @see #setConfiguration
*/
public static synchronized Configuration getConfiguration() {
public static Configuration getConfiguration() {
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new AuthPermission("getLoginConfiguration"));
if (configuration == null) {
String config_class = null;
config_class = AccessController.doPrivileged
(new PrivilegedAction<String>() {
public String run() {
return java.security.Security.getProperty
("login.configuration.provider");
synchronized (Configuration.class) {
if (configuration == null) {
String config_class = null;
config_class = AccessController.doPrivileged
(new PrivilegedAction<String>() {
public String run() {
return java.security.Security.getProperty
("login.configuration.provider");
}
});
if (config_class == null) {
config_class = "com.sun.security.auth.login.ConfigFile";
}
});
if (config_class == null) {
config_class = "com.sun.security.auth.login.ConfigFile";
}
try {
final String finalClass = config_class;
configuration = AccessController.doPrivileged
(new PrivilegedExceptionAction<Configuration>() {
public Configuration run() throws ClassNotFoundException,
InstantiationException,
IllegalAccessException {
return (Configuration)Class.forName
(finalClass,
true,
contextClassLoader).newInstance();
try {
final String finalClass = config_class;
configuration = AccessController.doPrivileged
(new PrivilegedExceptionAction<Configuration>() {
public Configuration run() throws ClassNotFoundException,
InstantiationException,
IllegalAccessException {
return (Configuration)Class.forName
(finalClass,
true,
contextClassLoader).newInstance();
}
});
} catch (PrivilegedActionException e) {
Exception ee = e.getException();
if (ee instanceof InstantiationException) {
throw (SecurityException) new
SecurityException
("Configuration error:" +
ee.getCause().getMessage() +
"\n").initCause(ee.getCause());
} else {
throw (SecurityException) new
SecurityException
("Configuration error: " +
ee.toString() +
"\n").initCause(ee);
}
});
} catch (PrivilegedActionException e) {
Exception ee = e.getException();
if (ee instanceof InstantiationException) {
throw (SecurityException) new
SecurityException
("Configuration error:" +
ee.getCause().getMessage() +
"\n").initCause(ee.getCause());
} else {
throw (SecurityException) new
SecurityException
("Configuration error: " +
ee.toString() +
"\n").initCause(ee);
}
}
return configuration;
}
return configuration;
}
/**
......
......@@ -1021,8 +1021,10 @@ public abstract class JComponent extends Container implements Serializable,
int bw,bh;
boolean printing = getFlag(IS_PRINTING);
if(!printing && repaintManager.isDoubleBufferingEnabled() &&
!getFlag(ANCESTOR_USING_BUFFER) && isDoubleBuffered()) {
if (!printing && repaintManager.isDoubleBufferingEnabled() &&
!getFlag(ANCESTOR_USING_BUFFER) && isDoubleBuffered() &&
(getFlag(IS_REPAINTING) || repaintManager.isPainting()))
{
repaintManager.beginPaint();
try {
repaintManager.paint(this, this, co, clipX, clipY, clipW,
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册